From 030cb47b613683c3b338d3016e74166019c39faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Barboza=20Coelho=20de=20Souza?= Date: Tue, 23 Jul 2019 02:16:07 -0300 Subject: [PATCH] setup sequelizre --- .editorconfig | 2 +- .sequelizerc | 8 + node_modules/.bin/css-beautify | 1 + node_modules/.bin/editorconfig | 1 + node_modules/.bin/html-beautify | 1 + node_modules/.bin/js-beautify | 1 + node_modules/.bin/nopt | 2 +- node_modules/.bin/sequelize | 1 + node_modules/.bin/uuid | 1 + node_modules/.yarn-integrity | 87 +- node_modules/@types/node/LICENSE | 21 + node_modules/@types/node/README.md | 16 + node_modules/@types/node/assert.d.ts | 52 + node_modules/@types/node/async_hooks.d.ts | 132 + node_modules/@types/node/base.d.ts | 41 + node_modules/@types/node/buffer.d.ts | 22 + node_modules/@types/node/child_process.d.ts | 370 + node_modules/@types/node/cluster.d.ts | 260 + node_modules/@types/node/console.d.ts | 3 + node_modules/@types/node/constants.d.ts | 278 + node_modules/@types/node/crypto.d.ts | 602 + node_modules/@types/node/dgram.d.ts | 102 + node_modules/@types/node/dns.d.ts | 366 + node_modules/@types/node/domain.d.ts | 16 + node_modules/@types/node/events.d.ts | 30 + node_modules/@types/node/fs.d.ts | 2297 +++ node_modules/@types/node/globals.d.ts | 1180 ++ node_modules/@types/node/http.d.ts | 279 + node_modules/@types/node/http2.d.ts | 960 + node_modules/@types/node/https.d.ts | 53 + node_modules/@types/node/index.d.ts | 99 + node_modules/@types/node/inspector.d.ts | 3257 ++++ node_modules/@types/node/module.d.ts | 3 + node_modules/@types/node/net.d.ts | 249 + node_modules/@types/node/os.d.ts | 201 + node_modules/@types/node/package.json | 206 + node_modules/@types/node/path.d.ts | 159 + node_modules/@types/node/perf_hooks.d.ts | 304 + node_modules/@types/node/process.d.ts | 3 + node_modules/@types/node/punycode.d.ts | 12 + node_modules/@types/node/querystring.d.ts | 32 + node_modules/@types/node/readline.d.ts | 136 + node_modules/@types/node/repl.d.ts | 382 + node_modules/@types/node/stream.d.ts | 307 + node_modules/@types/node/string_decoder.d.ts | 7 + node_modules/@types/node/timers.d.ts | 16 + node_modules/@types/node/tls.d.ts | 418 + node_modules/@types/node/trace_events.d.ts | 61 + node_modules/@types/node/ts3.2/globals.d.ts | 19 + node_modules/@types/node/ts3.2/index.d.ts | 20 + node_modules/@types/node/ts3.2/util.d.ts | 15 + node_modules/@types/node/tty.d.ts | 50 + node_modules/@types/node/url.d.ts | 104 + node_modules/@types/node/util.d.ts | 165 + node_modules/@types/node/v8.d.ts | 52 + node_modules/@types/node/vm.d.ts | 95 + node_modules/@types/node/worker_threads.d.ts | 153 + node_modules/@types/node/zlib.d.ts | 352 + node_modules/babel-runtime/.npmignore | 2 + node_modules/babel-runtime/README.md | 2 + node_modules/babel-runtime/core-js.js | 4 + .../babel-runtime/core-js/array/concat.js | 1 + .../core-js/array/copy-within.js | 1 + .../babel-runtime/core-js/array/entries.js | 1 + .../babel-runtime/core-js/array/every.js | 1 + .../babel-runtime/core-js/array/fill.js | 1 + .../babel-runtime/core-js/array/filter.js | 1 + .../babel-runtime/core-js/array/find-index.js | 1 + .../babel-runtime/core-js/array/find.js | 1 + .../babel-runtime/core-js/array/for-each.js | 1 + .../babel-runtime/core-js/array/from.js | 1 + .../babel-runtime/core-js/array/includes.js | 1 + .../babel-runtime/core-js/array/index-of.js | 1 + .../babel-runtime/core-js/array/join.js | 1 + .../babel-runtime/core-js/array/keys.js | 1 + .../core-js/array/last-index-of.js | 1 + .../babel-runtime/core-js/array/map.js | 1 + .../babel-runtime/core-js/array/of.js | 1 + .../babel-runtime/core-js/array/pop.js | 1 + .../babel-runtime/core-js/array/push.js | 1 + .../core-js/array/reduce-right.js | 1 + .../babel-runtime/core-js/array/reduce.js | 1 + .../babel-runtime/core-js/array/reverse.js | 1 + .../babel-runtime/core-js/array/shift.js | 1 + .../babel-runtime/core-js/array/slice.js | 1 + .../babel-runtime/core-js/array/some.js | 1 + .../babel-runtime/core-js/array/sort.js | 1 + .../babel-runtime/core-js/array/splice.js | 1 + .../babel-runtime/core-js/array/unshift.js | 1 + .../babel-runtime/core-js/array/values.js | 1 + node_modules/babel-runtime/core-js/asap.js | 1 + .../babel-runtime/core-js/clear-immediate.js | 1 + .../babel-runtime/core-js/error/is-error.js | 1 + .../babel-runtime/core-js/get-iterator.js | 1 + .../babel-runtime/core-js/is-iterable.js | 1 + .../babel-runtime/core-js/json/stringify.js | 1 + node_modules/babel-runtime/core-js/map.js | 1 + .../babel-runtime/core-js/math/acosh.js | 1 + .../babel-runtime/core-js/math/asinh.js | 1 + .../babel-runtime/core-js/math/atanh.js | 1 + .../babel-runtime/core-js/math/cbrt.js | 1 + .../babel-runtime/core-js/math/clz32.js | 1 + .../babel-runtime/core-js/math/cosh.js | 1 + .../babel-runtime/core-js/math/expm1.js | 1 + .../babel-runtime/core-js/math/fround.js | 1 + .../babel-runtime/core-js/math/hypot.js | 1 + .../babel-runtime/core-js/math/iaddh.js | 1 + .../babel-runtime/core-js/math/imul.js | 1 + .../babel-runtime/core-js/math/imulh.js | 1 + .../babel-runtime/core-js/math/isubh.js | 1 + .../babel-runtime/core-js/math/log10.js | 1 + .../babel-runtime/core-js/math/log1p.js | 1 + .../babel-runtime/core-js/math/log2.js | 1 + .../babel-runtime/core-js/math/sign.js | 1 + .../babel-runtime/core-js/math/sinh.js | 1 + .../babel-runtime/core-js/math/tanh.js | 1 + .../babel-runtime/core-js/math/trunc.js | 1 + .../babel-runtime/core-js/math/umulh.js | 1 + .../babel-runtime/core-js/number/epsilon.js | 1 + .../babel-runtime/core-js/number/is-finite.js | 1 + .../core-js/number/is-integer.js | 1 + .../babel-runtime/core-js/number/is-nan.js | 1 + .../core-js/number/is-safe-integer.js | 1 + .../core-js/number/max-safe-integer.js | 1 + .../core-js/number/min-safe-integer.js | 1 + .../core-js/number/parse-float.js | 1 + .../babel-runtime/core-js/number/parse-int.js | 1 + .../babel-runtime/core-js/object/assign.js | 1 + .../babel-runtime/core-js/object/create.js | 1 + .../core-js/object/define-properties.js | 1 + .../core-js/object/define-property.js | 1 + .../babel-runtime/core-js/object/entries.js | 1 + .../babel-runtime/core-js/object/freeze.js | 1 + .../object/get-own-property-descriptor.js | 1 + .../object/get-own-property-descriptors.js | 1 + .../core-js/object/get-own-property-names.js | 1 + .../object/get-own-property-symbols.js | 1 + .../core-js/object/get-prototype-of.js | 1 + .../core-js/object/is-extensible.js | 1 + .../babel-runtime/core-js/object/is-frozen.js | 1 + .../babel-runtime/core-js/object/is-sealed.js | 1 + .../babel-runtime/core-js/object/is.js | 1 + .../babel-runtime/core-js/object/keys.js | 1 + .../core-js/object/prevent-extensions.js | 1 + .../babel-runtime/core-js/object/seal.js | 1 + .../core-js/object/set-prototype-of.js | 1 + .../babel-runtime/core-js/object/values.js | 1 + .../babel-runtime/core-js/observable.js | 1 + node_modules/babel-runtime/core-js/promise.js | 1 + .../babel-runtime/core-js/reflect/apply.js | 1 + .../core-js/reflect/construct.js | 1 + .../core-js/reflect/define-metadata.js | 1 + .../core-js/reflect/define-property.js | 1 + .../core-js/reflect/delete-metadata.js | 1 + .../core-js/reflect/delete-property.js | 1 + .../core-js/reflect/enumerate.js | 1 + .../core-js/reflect/get-metadata-keys.js | 1 + .../core-js/reflect/get-metadata.js | 1 + .../core-js/reflect/get-own-metadata-keys.js | 1 + .../core-js/reflect/get-own-metadata.js | 1 + .../reflect/get-own-property-descriptor.js | 1 + .../core-js/reflect/get-prototype-of.js | 1 + .../babel-runtime/core-js/reflect/get.js | 1 + .../core-js/reflect/has-metadata.js | 1 + .../core-js/reflect/has-own-metadata.js | 1 + .../babel-runtime/core-js/reflect/has.js | 1 + .../core-js/reflect/is-extensible.js | 1 + .../babel-runtime/core-js/reflect/metadata.js | 1 + .../babel-runtime/core-js/reflect/own-keys.js | 1 + .../core-js/reflect/prevent-extensions.js | 1 + .../core-js/reflect/set-prototype-of.js | 1 + .../babel-runtime/core-js/reflect/set.js | 1 + .../babel-runtime/core-js/regexp/escape.js | 1 + .../babel-runtime/core-js/set-immediate.js | 1 + node_modules/babel-runtime/core-js/set.js | 1 + .../babel-runtime/core-js/string/at.js | 1 + .../core-js/string/code-point-at.js | 1 + .../babel-runtime/core-js/string/ends-with.js | 1 + .../core-js/string/from-code-point.js | 1 + .../babel-runtime/core-js/string/includes.js | 1 + .../babel-runtime/core-js/string/match-all.js | 1 + .../babel-runtime/core-js/string/pad-end.js | 1 + .../babel-runtime/core-js/string/pad-left.js | 1 + .../babel-runtime/core-js/string/pad-right.js | 1 + .../babel-runtime/core-js/string/pad-start.js | 1 + .../babel-runtime/core-js/string/raw.js | 1 + .../babel-runtime/core-js/string/repeat.js | 1 + .../core-js/string/starts-with.js | 1 + .../babel-runtime/core-js/string/trim-end.js | 1 + .../babel-runtime/core-js/string/trim-left.js | 1 + .../core-js/string/trim-right.js | 1 + .../core-js/string/trim-start.js | 1 + .../babel-runtime/core-js/string/trim.js | 1 + node_modules/babel-runtime/core-js/symbol.js | 1 + .../core-js/symbol/async-iterator.js | 1 + .../babel-runtime/core-js/symbol/for.js | 1 + .../core-js/symbol/has-instance.js | 1 + .../core-js/symbol/is-concat-spreadable.js | 1 + .../babel-runtime/core-js/symbol/iterator.js | 1 + .../babel-runtime/core-js/symbol/key-for.js | 1 + .../babel-runtime/core-js/symbol/match.js | 1 + .../core-js/symbol/observable.js | 1 + .../babel-runtime/core-js/symbol/replace.js | 1 + .../babel-runtime/core-js/symbol/search.js | 1 + .../babel-runtime/core-js/symbol/species.js | 1 + .../babel-runtime/core-js/symbol/split.js | 1 + .../core-js/symbol/to-primitive.js | 1 + .../core-js/symbol/to-string-tag.js | 1 + .../core-js/symbol/unscopables.js | 1 + .../babel-runtime/core-js/system/global.js | 1 + .../babel-runtime/core-js/weak-map.js | 1 + .../babel-runtime/core-js/weak-set.js | 1 + .../helpers/_async-generator-delegate.js | 1 + .../babel-runtime/helpers/_async-generator.js | 1 + .../babel-runtime/helpers/_async-iterator.js | 1 + .../helpers/_async-to-generator.js | 1 + .../helpers/_class-call-check.js | 1 + .../babel-runtime/helpers/_create-class.js | 1 + .../babel-runtime/helpers/_defaults.js | 1 + .../helpers/_define-enumerable-properties.js | 1 + .../babel-runtime/helpers/_define-property.js | 1 + .../babel-runtime/helpers/_extends.js | 1 + node_modules/babel-runtime/helpers/_get.js | 1 + .../babel-runtime/helpers/_inherits.js | 1 + .../babel-runtime/helpers/_instanceof.js | 1 + .../helpers/_interop-require-default.js | 1 + .../helpers/_interop-require-wildcard.js | 1 + node_modules/babel-runtime/helpers/_jsx.js | 1 + .../babel-runtime/helpers/_new-arrow-check.js | 1 + .../helpers/_object-destructuring-empty.js | 1 + .../helpers/_object-without-properties.js | 1 + .../helpers/_possible-constructor-return.js | 1 + .../babel-runtime/helpers/_self-global.js | 1 + node_modules/babel-runtime/helpers/_set.js | 1 + .../helpers/_sliced-to-array-loose.js | 1 + .../babel-runtime/helpers/_sliced-to-array.js | 1 + .../helpers/_tagged-template-literal-loose.js | 1 + .../helpers/_tagged-template-literal.js | 1 + .../babel-runtime/helpers/_temporal-ref.js | 1 + .../helpers/_temporal-undefined.js | 1 + .../babel-runtime/helpers/_to-array.js | 1 + .../helpers/_to-consumable-array.js | 1 + node_modules/babel-runtime/helpers/_typeof.js | 1 + .../helpers/async-generator-delegate.js | 1 + .../babel-runtime/helpers/async-generator.js | 1 + .../babel-runtime/helpers/async-iterator.js | 1 + .../helpers/async-to-generator.js | 1 + .../babel-runtime/helpers/asyncGenerator.js | 126 + .../helpers/asyncGeneratorDelegate.js | 69 + .../babel-runtime/helpers/asyncIterator.js | 32 + .../babel-runtime/helpers/asyncToGenerator.js | 38 + .../babel-runtime/helpers/class-call-check.js | 1 + .../babel-runtime/helpers/classCallCheck.js | 9 + .../babel-runtime/helpers/create-class.js | 1 + .../babel-runtime/helpers/createClass.js | 27 + .../babel-runtime/helpers/defaults.js | 32 + .../helpers/define-enumerable-properties.js | 1 + .../babel-runtime/helpers/define-property.js | 1 + .../helpers/defineEnumerableProperties.js | 20 + .../babel-runtime/helpers/defineProperty.js | 24 + node_modules/babel-runtime/helpers/extends.js | 23 + node_modules/babel-runtime/helpers/get.js | 38 + .../babel-runtime/helpers/inherits.js | 33 + .../babel-runtime/helpers/instanceof.js | 21 + .../helpers/interop-require-default.js | 1 + .../helpers/interop-require-wildcard.js | 1 + .../helpers/interopRequireDefault.js | 9 + .../helpers/interopRequireWildcard.js | 20 + node_modules/babel-runtime/helpers/jsx.js | 56 + .../babel-runtime/helpers/new-arrow-check.js | 1 + .../babel-runtime/helpers/newArrowCheck.js | 9 + .../helpers/object-destructuring-empty.js | 1 + .../helpers/object-without-properties.js | 1 + .../helpers/objectDestructuringEmpty.js | 7 + .../helpers/objectWithoutProperties.js | 15 + .../helpers/possible-constructor-return.js | 1 + .../helpers/possibleConstructorReturn.js | 17 + .../babel-runtime/helpers/self-global.js | 1 + .../babel-runtime/helpers/selfGlobal.js | 4 + node_modules/babel-runtime/helpers/set.js | 35 + .../helpers/sliced-to-array-loose.js | 1 + .../babel-runtime/helpers/sliced-to-array.js | 1 + .../babel-runtime/helpers/slicedToArray.js | 51 + .../helpers/slicedToArrayLoose.js | 31 + .../helpers/tagged-template-literal-loose.js | 1 + .../helpers/tagged-template-literal.js | 1 + .../helpers/taggedTemplateLiteral.js | 21 + .../helpers/taggedTemplateLiteralLoose.js | 8 + .../babel-runtime/helpers/temporal-ref.js | 1 + .../helpers/temporal-undefined.js | 1 + .../babel-runtime/helpers/temporalRef.js | 11 + .../helpers/temporalUndefined.js | 4 + .../babel-runtime/helpers/to-array.js | 1 + .../helpers/to-consumable-array.js | 1 + node_modules/babel-runtime/helpers/toArray.js | 13 + .../helpers/toConsumableArray.js | 21 + node_modules/babel-runtime/helpers/typeof.js | 21 + node_modules/babel-runtime/package-lock.json | 232 + node_modules/babel-runtime/package.json | 16 + .../babel-runtime/regenerator/index.js | 1 + node_modules/bluebird/LICENSE | 21 + node_modules/bluebird/README.md | 57 + node_modules/bluebird/changelog.md | 1 + .../bluebird/js/browser/bluebird.core.js | 3824 ++++ .../bluebird/js/browser/bluebird.core.min.js | 31 + node_modules/bluebird/js/browser/bluebird.js | 5666 ++++++ .../bluebird/js/browser/bluebird.min.js | 31 + node_modules/bluebird/js/release/any.js | 21 + node_modules/bluebird/js/release/assert.js | 55 + node_modules/bluebird/js/release/async.js | 165 + node_modules/bluebird/js/release/bind.js | 67 + node_modules/bluebird/js/release/bluebird.js | 11 + node_modules/bluebird/js/release/call_get.js | 123 + node_modules/bluebird/js/release/cancel.js | 129 + .../bluebird/js/release/catch_filter.js | 42 + node_modules/bluebird/js/release/context.js | 69 + .../bluebird/js/release/debuggability.js | 934 + .../bluebird/js/release/direct_resolve.js | 46 + node_modules/bluebird/js/release/each.js | 30 + node_modules/bluebird/js/release/errors.js | 116 + node_modules/bluebird/js/release/es5.js | 80 + node_modules/bluebird/js/release/filter.js | 12 + node_modules/bluebird/js/release/finally.js | 146 + .../bluebird/js/release/generators.js | 223 + node_modules/bluebird/js/release/join.js | 168 + node_modules/bluebird/js/release/map.js | 168 + node_modules/bluebird/js/release/method.js | 55 + node_modules/bluebird/js/release/nodeback.js | 51 + node_modules/bluebird/js/release/nodeify.js | 58 + node_modules/bluebird/js/release/promise.js | 789 + .../bluebird/js/release/promise_array.js | 185 + node_modules/bluebird/js/release/promisify.js | 314 + node_modules/bluebird/js/release/props.js | 118 + node_modules/bluebird/js/release/queue.js | 73 + node_modules/bluebird/js/release/race.js | 49 + node_modules/bluebird/js/release/reduce.js | 172 + node_modules/bluebird/js/release/schedule.js | 62 + node_modules/bluebird/js/release/settle.js | 43 + node_modules/bluebird/js/release/some.js | 148 + .../js/release/synchronous_inspection.js | 103 + node_modules/bluebird/js/release/thenables.js | 86 + node_modules/bluebird/js/release/timers.js | 93 + node_modules/bluebird/js/release/using.js | 226 + node_modules/bluebird/js/release/util.js | 389 + node_modules/bluebird/package.json | 78 + node_modules/cli-color/.editorconfig | 14 + node_modules/cli-color/.lint | 13 + node_modules/cli-color/CHANGELOG.md | 29 + node_modules/cli-color/CHANGES | 107 + node_modules/cli-color/LICENSE | 15 + node_modules/cli-color/README.md | 738 + node_modules/cli-color/art.js | 13 + node_modules/cli-color/bare.js | 71 + node_modules/cli-color/beep.js | 3 + .../cli-color/bin/generate-color-images | 18 + node_modules/cli-color/columns.js | 56 + node_modules/cli-color/erase.js | 10 + node_modules/cli-color/examples/art.js | 8 + node_modules/cli-color/examples/basic.js | 25 + node_modules/cli-color/examples/erase.js | 22 + node_modules/cli-color/examples/styles.js | 10 + node_modules/cli-color/examples/throbber.js | 15 + node_modules/cli-color/examples/xterm.js | 6 + node_modules/cli-color/get-stripped-length.js | 11 + node_modules/cli-color/index.js | 17 + node_modules/cli-color/lib/sgr.js | 102 + node_modules/cli-color/lib/xterm-colors.js | 53 + node_modules/cli-color/lib/xterm-match.js | 52 + node_modules/cli-color/move.js | 43 + node_modules/cli-color/package.json | 57 + node_modules/cli-color/reset.js | 3 + node_modules/cli-color/slice.js | 141 + node_modules/cli-color/strip.js | 8 + .../test/__playground/throbber.formatted.js | 12 + .../cli-color/test/__playground/throbber.js | 11 + node_modules/cli-color/test/art.js | 28 + node_modules/cli-color/test/bare.js | 284 + node_modules/cli-color/test/beep.js | 3 + node_modules/cli-color/test/columns.js | 31 + node_modules/cli-color/test/erase.js | 6 + .../cli-color/test/get-stripped-length.js | 16 + node_modules/cli-color/test/index.js | 16 + node_modules/cli-color/test/lib/sgr.js | 14 + .../cli-color/test/lib/xterm-colors.js | 10 + .../cli-color/test/lib/xterm-match.js | 9 + node_modules/cli-color/test/move.js | 37 + node_modules/cli-color/test/reset.js | 5 + node_modules/cli-color/test/slice.js | 144 + node_modules/cli-color/test/strip.js | 98 + node_modules/cli-color/test/throbber.js | 41 + node_modules/cli-color/test/visual.js | 117 + node_modules/cli-color/test/window-size.js | 8 + node_modules/cli-color/throbber.js | 52 + node_modules/cli-color/window-size.js | 8 + node_modules/cliui/CHANGELOG.md | 65 + node_modules/cliui/LICENSE.txt | 14 + node_modules/cliui/README.md | 115 + node_modules/cliui/index.js | 324 + .../cliui/node_modules/string-width/index.js | 39 + .../node_modules/string-width}/license | 0 .../node_modules/string-width/package.json | 56 + .../cliui/node_modules/string-width/readme.md | 45 + node_modules/cliui/package.json | 67 + node_modules/cls-bluebird/README.md | 142 + node_modules/cls-bluebird/changelog.md | 48 + node_modules/cls-bluebird/lib/index.js | 265 + node_modules/cls-bluebird/lib/shimCall.js | 50 + .../cls-bluebird/lib/shimCoroutine.js | 85 + node_modules/cls-bluebird/lib/shimMethod.js | 41 + node_modules/cls-bluebird/lib/shimOnCancel.js | 44 + node_modules/cls-bluebird/lib/shimUsing.js | 114 + node_modules/cls-bluebird/package.json | 58 + node_modules/config-chain/LICENCE | 22 + node_modules/config-chain/index.js | 282 + node_modules/config-chain/package.json | 30 + node_modules/config-chain/readme.markdown | 257 + node_modules/core-js/CHANGELOG.md | 699 + node_modules/core-js/Gruntfile.js | 3 + node_modules/core-js/LICENSE | 19 + node_modules/core-js/README.md | 2307 +++ node_modules/core-js/bower.json | 49 + node_modules/core-js/build/Gruntfile.ls | 86 + node_modules/core-js/build/build.ls | 62 + node_modules/core-js/build/config.js | 275 + node_modules/core-js/build/index.js | 104 + node_modules/core-js/client/core.js | 9095 ++++++++++ node_modules/core-js/client/core.min.js | 10 + node_modules/core-js/client/core.min.js.map | 1 + node_modules/core-js/client/library.js | 8163 +++++++++ node_modules/core-js/client/library.min.js | 10 + .../core-js/client/library.min.js.map | 1 + node_modules/core-js/client/shim.js | 8663 +++++++++ node_modules/core-js/client/shim.min.js | 10 + node_modules/core-js/client/shim.min.js.map | 1 + node_modules/core-js/core/_.js | 2 + node_modules/core-js/core/delay.js | 2 + node_modules/core-js/core/dict.js | 2 + node_modules/core-js/core/function.js | 2 + node_modules/core-js/core/index.js | 15 + node_modules/core-js/core/number.js | 2 + node_modules/core-js/core/object.js | 5 + node_modules/core-js/core/regexp.js | 2 + node_modules/core-js/core/string.js | 3 + node_modules/core-js/es5/index.js | 37 + node_modules/core-js/es6/array.js | 23 + node_modules/core-js/es6/date.js | 6 + node_modules/core-js/es6/function.js | 4 + node_modules/core-js/es6/index.js | 139 + node_modules/core-js/es6/map.js | 5 + node_modules/core-js/es6/math.js | 18 + node_modules/core-js/es6/number.js | 13 + node_modules/core-js/es6/object.js | 20 + node_modules/core-js/es6/parse-float.js | 2 + node_modules/core-js/es6/parse-int.js | 2 + node_modules/core-js/es6/promise.js | 5 + node_modules/core-js/es6/reflect.js | 15 + node_modules/core-js/es6/regexp.js | 9 + node_modules/core-js/es6/set.js | 5 + node_modules/core-js/es6/string.js | 27 + node_modules/core-js/es6/symbol.js | 3 + node_modules/core-js/es6/typed.js | 13 + node_modules/core-js/es6/weak-map.js | 4 + node_modules/core-js/es6/weak-set.js | 4 + node_modules/core-js/es7/array.js | 4 + node_modules/core-js/es7/asap.js | 2 + node_modules/core-js/es7/error.js | 2 + node_modules/core-js/es7/global.js | 2 + node_modules/core-js/es7/index.js | 56 + node_modules/core-js/es7/map.js | 4 + node_modules/core-js/es7/math.js | 13 + node_modules/core-js/es7/object.js | 8 + node_modules/core-js/es7/observable.js | 7 + node_modules/core-js/es7/promise.js | 3 + node_modules/core-js/es7/reflect.js | 10 + node_modules/core-js/es7/set.js | 4 + node_modules/core-js/es7/string.js | 7 + node_modules/core-js/es7/symbol.js | 3 + node_modules/core-js/es7/system.js | 2 + node_modules/core-js/es7/weak-map.js | 3 + node_modules/core-js/es7/weak-set.js | 3 + node_modules/core-js/fn/_.js | 2 + node_modules/core-js/fn/array/concat.js | 4 + node_modules/core-js/fn/array/copy-within.js | 2 + node_modules/core-js/fn/array/entries.js | 2 + node_modules/core-js/fn/array/every.js | 2 + node_modules/core-js/fn/array/fill.js | 2 + node_modules/core-js/fn/array/filter.js | 2 + node_modules/core-js/fn/array/find-index.js | 2 + node_modules/core-js/fn/array/find.js | 2 + node_modules/core-js/fn/array/flat-map.js | 2 + node_modules/core-js/fn/array/flatten.js | 2 + node_modules/core-js/fn/array/for-each.js | 2 + node_modules/core-js/fn/array/from.js | 3 + node_modules/core-js/fn/array/includes.js | 2 + node_modules/core-js/fn/array/index-of.js | 2 + node_modules/core-js/fn/array/index.js | 26 + node_modules/core-js/fn/array/is-array.js | 2 + node_modules/core-js/fn/array/iterator.js | 2 + node_modules/core-js/fn/array/join.js | 2 + node_modules/core-js/fn/array/keys.js | 2 + .../core-js/fn/array/last-index-of.js | 2 + node_modules/core-js/fn/array/map.js | 2 + node_modules/core-js/fn/array/of.js | 2 + node_modules/core-js/fn/array/pop.js | 4 + node_modules/core-js/fn/array/push.js | 4 + node_modules/core-js/fn/array/reduce-right.js | 2 + node_modules/core-js/fn/array/reduce.js | 2 + node_modules/core-js/fn/array/reverse.js | 4 + node_modules/core-js/fn/array/shift.js | 4 + node_modules/core-js/fn/array/slice.js | 2 + node_modules/core-js/fn/array/some.js | 2 + node_modules/core-js/fn/array/sort.js | 2 + node_modules/core-js/fn/array/splice.js | 4 + node_modules/core-js/fn/array/unshift.js | 4 + node_modules/core-js/fn/array/values.js | 2 + .../core-js/fn/array/virtual/copy-within.js | 2 + .../core-js/fn/array/virtual/entries.js | 2 + .../core-js/fn/array/virtual/every.js | 2 + node_modules/core-js/fn/array/virtual/fill.js | 2 + .../core-js/fn/array/virtual/filter.js | 2 + .../core-js/fn/array/virtual/find-index.js | 2 + node_modules/core-js/fn/array/virtual/find.js | 2 + .../core-js/fn/array/virtual/flat-map.js | 2 + .../core-js/fn/array/virtual/flatten.js | 2 + .../core-js/fn/array/virtual/for-each.js | 2 + .../core-js/fn/array/virtual/includes.js | 2 + .../core-js/fn/array/virtual/index-of.js | 2 + .../core-js/fn/array/virtual/index.js | 20 + .../core-js/fn/array/virtual/iterator.js | 2 + node_modules/core-js/fn/array/virtual/join.js | 2 + node_modules/core-js/fn/array/virtual/keys.js | 2 + .../core-js/fn/array/virtual/last-index-of.js | 2 + node_modules/core-js/fn/array/virtual/map.js | 2 + .../core-js/fn/array/virtual/reduce-right.js | 2 + .../core-js/fn/array/virtual/reduce.js | 2 + .../core-js/fn/array/virtual/slice.js | 2 + node_modules/core-js/fn/array/virtual/some.js | 2 + node_modules/core-js/fn/array/virtual/sort.js | 2 + .../core-js/fn/array/virtual/values.js | 2 + node_modules/core-js/fn/asap.js | 2 + node_modules/core-js/fn/clear-immediate.js | 2 + node_modules/core-js/fn/date/index.js | 6 + node_modules/core-js/fn/date/now.js | 2 + node_modules/core-js/fn/date/to-iso-string.js | 3 + node_modules/core-js/fn/date/to-json.js | 2 + node_modules/core-js/fn/date/to-primitive.js | 5 + node_modules/core-js/fn/date/to-string.js | 5 + node_modules/core-js/fn/delay.js | 2 + node_modules/core-js/fn/dict.js | 2 + .../core-js/fn/dom-collections/index.js | 8 + .../core-js/fn/dom-collections/iterator.js | 2 + node_modules/core-js/fn/error/index.js | 2 + node_modules/core-js/fn/error/is-error.js | 2 + node_modules/core-js/fn/function/bind.js | 2 + .../core-js/fn/function/has-instance.js | 2 + node_modules/core-js/fn/function/index.js | 5 + node_modules/core-js/fn/function/name.js | 1 + node_modules/core-js/fn/function/part.js | 2 + .../core-js/fn/function/virtual/bind.js | 2 + .../core-js/fn/function/virtual/index.js | 3 + .../core-js/fn/function/virtual/part.js | 2 + .../core-js/fn/get-iterator-method.js | 3 + node_modules/core-js/fn/get-iterator.js | 3 + node_modules/core-js/fn/global.js | 2 + node_modules/core-js/fn/is-iterable.js | 3 + node_modules/core-js/fn/json/index.js | 2 + node_modules/core-js/fn/json/stringify.js | 5 + node_modules/core-js/fn/map.js | 8 + node_modules/core-js/fn/map/from.js | 8 + node_modules/core-js/fn/map/index.js | 8 + node_modules/core-js/fn/map/of.js | 8 + node_modules/core-js/fn/math/acosh.js | 2 + node_modules/core-js/fn/math/asinh.js | 2 + node_modules/core-js/fn/math/atanh.js | 2 + node_modules/core-js/fn/math/cbrt.js | 2 + node_modules/core-js/fn/math/clamp.js | 2 + node_modules/core-js/fn/math/clz32.js | 2 + node_modules/core-js/fn/math/cosh.js | 2 + node_modules/core-js/fn/math/deg-per-rad.js | 2 + node_modules/core-js/fn/math/degrees.js | 2 + node_modules/core-js/fn/math/expm1.js | 2 + node_modules/core-js/fn/math/fround.js | 2 + node_modules/core-js/fn/math/fscale.js | 2 + node_modules/core-js/fn/math/hypot.js | 2 + node_modules/core-js/fn/math/iaddh.js | 2 + node_modules/core-js/fn/math/imul.js | 2 + node_modules/core-js/fn/math/imulh.js | 2 + node_modules/core-js/fn/math/index.js | 30 + node_modules/core-js/fn/math/isubh.js | 2 + node_modules/core-js/fn/math/log10.js | 2 + node_modules/core-js/fn/math/log1p.js | 2 + node_modules/core-js/fn/math/log2.js | 2 + node_modules/core-js/fn/math/rad-per-deg.js | 2 + node_modules/core-js/fn/math/radians.js | 2 + node_modules/core-js/fn/math/scale.js | 2 + node_modules/core-js/fn/math/sign.js | 2 + node_modules/core-js/fn/math/signbit.js | 3 + node_modules/core-js/fn/math/sinh.js | 2 + node_modules/core-js/fn/math/tanh.js | 2 + node_modules/core-js/fn/math/trunc.js | 2 + node_modules/core-js/fn/math/umulh.js | 2 + node_modules/core-js/fn/number/constructor.js | 2 + node_modules/core-js/fn/number/epsilon.js | 2 + node_modules/core-js/fn/number/index.js | 14 + node_modules/core-js/fn/number/is-finite.js | 2 + node_modules/core-js/fn/number/is-integer.js | 2 + node_modules/core-js/fn/number/is-nan.js | 2 + .../core-js/fn/number/is-safe-integer.js | 2 + node_modules/core-js/fn/number/iterator.js | 5 + .../core-js/fn/number/max-safe-integer.js | 2 + .../core-js/fn/number/min-safe-integer.js | 2 + node_modules/core-js/fn/number/parse-float.js | 2 + node_modules/core-js/fn/number/parse-int.js | 2 + node_modules/core-js/fn/number/to-fixed.js | 2 + .../core-js/fn/number/to-precision.js | 2 + .../core-js/fn/number/virtual/index.js | 4 + .../core-js/fn/number/virtual/iterator.js | 2 + .../core-js/fn/number/virtual/to-fixed.js | 2 + .../core-js/fn/number/virtual/to-precision.js | 2 + node_modules/core-js/fn/object/assign.js | 2 + node_modules/core-js/fn/object/classof.js | 2 + node_modules/core-js/fn/object/create.js | 5 + .../core-js/fn/object/define-getter.js | 2 + .../core-js/fn/object/define-properties.js | 5 + .../core-js/fn/object/define-property.js | 5 + .../core-js/fn/object/define-setter.js | 2 + node_modules/core-js/fn/object/define.js | 2 + node_modules/core-js/fn/object/entries.js | 2 + node_modules/core-js/fn/object/freeze.js | 2 + .../fn/object/get-own-property-descriptor.js | 5 + .../fn/object/get-own-property-descriptors.js | 2 + .../fn/object/get-own-property-names.js | 5 + .../fn/object/get-own-property-symbols.js | 2 + .../core-js/fn/object/get-prototype-of.js | 2 + node_modules/core-js/fn/object/index.js | 30 + .../core-js/fn/object/is-extensible.js | 2 + node_modules/core-js/fn/object/is-frozen.js | 2 + node_modules/core-js/fn/object/is-object.js | 2 + node_modules/core-js/fn/object/is-sealed.js | 2 + node_modules/core-js/fn/object/is.js | 2 + node_modules/core-js/fn/object/keys.js | 2 + .../core-js/fn/object/lookup-getter.js | 2 + .../core-js/fn/object/lookup-setter.js | 2 + node_modules/core-js/fn/object/make.js | 2 + .../core-js/fn/object/prevent-extensions.js | 2 + node_modules/core-js/fn/object/seal.js | 2 + .../core-js/fn/object/set-prototype-of.js | 2 + node_modules/core-js/fn/object/values.js | 2 + node_modules/core-js/fn/observable.js | 7 + node_modules/core-js/fn/parse-float.js | 2 + node_modules/core-js/fn/parse-int.js | 2 + node_modules/core-js/fn/promise.js | 7 + node_modules/core-js/fn/promise/finally.js | 4 + node_modules/core-js/fn/promise/index.js | 7 + node_modules/core-js/fn/promise/try.js | 8 + node_modules/core-js/fn/reflect/apply.js | 2 + node_modules/core-js/fn/reflect/construct.js | 2 + .../core-js/fn/reflect/define-metadata.js | 2 + .../core-js/fn/reflect/define-property.js | 2 + .../core-js/fn/reflect/delete-metadata.js | 2 + .../core-js/fn/reflect/delete-property.js | 2 + node_modules/core-js/fn/reflect/enumerate.js | 2 + .../core-js/fn/reflect/get-metadata-keys.js | 2 + .../core-js/fn/reflect/get-metadata.js | 2 + .../fn/reflect/get-own-metadata-keys.js | 2 + .../core-js/fn/reflect/get-own-metadata.js | 2 + .../fn/reflect/get-own-property-descriptor.js | 2 + .../core-js/fn/reflect/get-prototype-of.js | 2 + node_modules/core-js/fn/reflect/get.js | 2 + .../core-js/fn/reflect/has-metadata.js | 2 + .../core-js/fn/reflect/has-own-metadata.js | 2 + node_modules/core-js/fn/reflect/has.js | 2 + node_modules/core-js/fn/reflect/index.js | 24 + .../core-js/fn/reflect/is-extensible.js | 2 + node_modules/core-js/fn/reflect/metadata.js | 2 + node_modules/core-js/fn/reflect/own-keys.js | 2 + .../core-js/fn/reflect/prevent-extensions.js | 2 + .../core-js/fn/reflect/set-prototype-of.js | 2 + node_modules/core-js/fn/reflect/set.js | 2 + node_modules/core-js/fn/regexp/constructor.js | 2 + node_modules/core-js/fn/regexp/escape.js | 2 + node_modules/core-js/fn/regexp/flags.js | 5 + node_modules/core-js/fn/regexp/index.js | 10 + node_modules/core-js/fn/regexp/match.js | 5 + node_modules/core-js/fn/regexp/replace.js | 5 + node_modules/core-js/fn/regexp/search.js | 5 + node_modules/core-js/fn/regexp/split.js | 5 + node_modules/core-js/fn/regexp/to-string.js | 5 + node_modules/core-js/fn/set-immediate.js | 2 + node_modules/core-js/fn/set-interval.js | 2 + node_modules/core-js/fn/set-timeout.js | 2 + node_modules/core-js/fn/set.js | 8 + node_modules/core-js/fn/set/from.js | 8 + node_modules/core-js/fn/set/index.js | 8 + node_modules/core-js/fn/set/of.js | 8 + node_modules/core-js/fn/string/anchor.js | 2 + node_modules/core-js/fn/string/at.js | 2 + node_modules/core-js/fn/string/big.js | 2 + node_modules/core-js/fn/string/blink.js | 2 + node_modules/core-js/fn/string/bold.js | 2 + .../core-js/fn/string/code-point-at.js | 2 + node_modules/core-js/fn/string/ends-with.js | 2 + node_modules/core-js/fn/string/escape-html.js | 2 + node_modules/core-js/fn/string/fixed.js | 2 + node_modules/core-js/fn/string/fontcolor.js | 2 + node_modules/core-js/fn/string/fontsize.js | 2 + .../core-js/fn/string/from-code-point.js | 2 + node_modules/core-js/fn/string/includes.js | 2 + node_modules/core-js/fn/string/index.js | 35 + node_modules/core-js/fn/string/italics.js | 2 + node_modules/core-js/fn/string/iterator.js | 5 + node_modules/core-js/fn/string/link.js | 2 + node_modules/core-js/fn/string/match-all.js | 2 + node_modules/core-js/fn/string/pad-end.js | 2 + node_modules/core-js/fn/string/pad-start.js | 2 + node_modules/core-js/fn/string/raw.js | 2 + node_modules/core-js/fn/string/repeat.js | 2 + node_modules/core-js/fn/string/small.js | 2 + node_modules/core-js/fn/string/starts-with.js | 2 + node_modules/core-js/fn/string/strike.js | 2 + node_modules/core-js/fn/string/sub.js | 2 + node_modules/core-js/fn/string/sup.js | 2 + node_modules/core-js/fn/string/trim-end.js | 2 + node_modules/core-js/fn/string/trim-left.js | 2 + node_modules/core-js/fn/string/trim-right.js | 2 + node_modules/core-js/fn/string/trim-start.js | 2 + node_modules/core-js/fn/string/trim.js | 2 + .../core-js/fn/string/unescape-html.js | 2 + .../core-js/fn/string/virtual/anchor.js | 2 + node_modules/core-js/fn/string/virtual/at.js | 2 + node_modules/core-js/fn/string/virtual/big.js | 2 + .../core-js/fn/string/virtual/blink.js | 2 + .../core-js/fn/string/virtual/bold.js | 2 + .../fn/string/virtual/code-point-at.js | 2 + .../core-js/fn/string/virtual/ends-with.js | 2 + .../core-js/fn/string/virtual/escape-html.js | 2 + .../core-js/fn/string/virtual/fixed.js | 2 + .../core-js/fn/string/virtual/fontcolor.js | 2 + .../core-js/fn/string/virtual/fontsize.js | 2 + .../core-js/fn/string/virtual/includes.js | 2 + .../core-js/fn/string/virtual/index.js | 33 + .../core-js/fn/string/virtual/italics.js | 2 + .../core-js/fn/string/virtual/iterator.js | 2 + .../core-js/fn/string/virtual/link.js | 2 + .../core-js/fn/string/virtual/match-all.js | 2 + .../core-js/fn/string/virtual/pad-end.js | 2 + .../core-js/fn/string/virtual/pad-start.js | 2 + .../core-js/fn/string/virtual/repeat.js | 2 + .../core-js/fn/string/virtual/small.js | 2 + .../core-js/fn/string/virtual/starts-with.js | 2 + .../core-js/fn/string/virtual/strike.js | 2 + node_modules/core-js/fn/string/virtual/sub.js | 2 + node_modules/core-js/fn/string/virtual/sup.js | 2 + .../core-js/fn/string/virtual/trim-end.js | 2 + .../core-js/fn/string/virtual/trim-left.js | 2 + .../core-js/fn/string/virtual/trim-right.js | 2 + .../core-js/fn/string/virtual/trim-start.js | 2 + .../core-js/fn/string/virtual/trim.js | 2 + .../fn/string/virtual/unescape-html.js | 2 + .../core-js/fn/symbol/async-iterator.js | 2 + node_modules/core-js/fn/symbol/for.js | 2 + .../core-js/fn/symbol/has-instance.js | 2 + node_modules/core-js/fn/symbol/index.js | 5 + .../core-js/fn/symbol/is-concat-spreadable.js | 1 + node_modules/core-js/fn/symbol/iterator.js | 3 + node_modules/core-js/fn/symbol/key-for.js | 2 + node_modules/core-js/fn/symbol/match.js | 2 + node_modules/core-js/fn/symbol/observable.js | 2 + node_modules/core-js/fn/symbol/replace.js | 2 + node_modules/core-js/fn/symbol/search.js | 2 + node_modules/core-js/fn/symbol/species.js | 1 + node_modules/core-js/fn/symbol/split.js | 2 + .../core-js/fn/symbol/to-primitive.js | 1 + .../core-js/fn/symbol/to-string-tag.js | 2 + node_modules/core-js/fn/symbol/unscopables.js | 1 + node_modules/core-js/fn/system/global.js | 2 + node_modules/core-js/fn/system/index.js | 2 + node_modules/core-js/fn/typed/array-buffer.js | 3 + node_modules/core-js/fn/typed/data-view.js | 3 + .../core-js/fn/typed/float32-array.js | 2 + .../core-js/fn/typed/float64-array.js | 2 + node_modules/core-js/fn/typed/index.js | 13 + node_modules/core-js/fn/typed/int16-array.js | 2 + node_modules/core-js/fn/typed/int32-array.js | 2 + node_modules/core-js/fn/typed/int8-array.js | 2 + node_modules/core-js/fn/typed/uint16-array.js | 2 + node_modules/core-js/fn/typed/uint32-array.js | 2 + node_modules/core-js/fn/typed/uint8-array.js | 2 + .../core-js/fn/typed/uint8-clamped-array.js | 2 + node_modules/core-js/fn/weak-map.js | 6 + node_modules/core-js/fn/weak-map/from.js | 8 + node_modules/core-js/fn/weak-map/index.js | 6 + node_modules/core-js/fn/weak-map/of.js | 8 + node_modules/core-js/fn/weak-set.js | 6 + node_modules/core-js/fn/weak-set/from.js | 8 + node_modules/core-js/fn/weak-set/index.js | 6 + node_modules/core-js/fn/weak-set/of.js | 8 + node_modules/core-js/index.js | 16 + node_modules/core-js/library/core/_.js | 2 + node_modules/core-js/library/core/delay.js | 2 + node_modules/core-js/library/core/dict.js | 2 + node_modules/core-js/library/core/function.js | 2 + node_modules/core-js/library/core/index.js | 15 + node_modules/core-js/library/core/number.js | 2 + node_modules/core-js/library/core/object.js | 5 + node_modules/core-js/library/core/regexp.js | 2 + node_modules/core-js/library/core/string.js | 3 + node_modules/core-js/library/es5/index.js | 37 + node_modules/core-js/library/es6/array.js | 23 + node_modules/core-js/library/es6/date.js | 6 + node_modules/core-js/library/es6/function.js | 4 + node_modules/core-js/library/es6/index.js | 139 + node_modules/core-js/library/es6/map.js | 5 + node_modules/core-js/library/es6/math.js | 18 + node_modules/core-js/library/es6/number.js | 13 + node_modules/core-js/library/es6/object.js | 20 + .../core-js/library/es6/parse-float.js | 2 + node_modules/core-js/library/es6/parse-int.js | 2 + node_modules/core-js/library/es6/promise.js | 5 + node_modules/core-js/library/es6/reflect.js | 15 + node_modules/core-js/library/es6/regexp.js | 9 + node_modules/core-js/library/es6/set.js | 5 + node_modules/core-js/library/es6/string.js | 27 + node_modules/core-js/library/es6/symbol.js | 3 + node_modules/core-js/library/es6/typed.js | 13 + node_modules/core-js/library/es6/weak-map.js | 4 + node_modules/core-js/library/es6/weak-set.js | 4 + node_modules/core-js/library/es7/array.js | 4 + node_modules/core-js/library/es7/asap.js | 2 + node_modules/core-js/library/es7/error.js | 2 + node_modules/core-js/library/es7/global.js | 2 + node_modules/core-js/library/es7/index.js | 56 + node_modules/core-js/library/es7/map.js | 4 + node_modules/core-js/library/es7/math.js | 13 + node_modules/core-js/library/es7/object.js | 8 + .../core-js/library/es7/observable.js | 7 + node_modules/core-js/library/es7/promise.js | 3 + node_modules/core-js/library/es7/reflect.js | 10 + node_modules/core-js/library/es7/set.js | 4 + node_modules/core-js/library/es7/string.js | 7 + node_modules/core-js/library/es7/symbol.js | 3 + node_modules/core-js/library/es7/system.js | 2 + node_modules/core-js/library/es7/weak-map.js | 3 + node_modules/core-js/library/es7/weak-set.js | 3 + node_modules/core-js/library/fn/_.js | 2 + .../core-js/library/fn/array/concat.js | 4 + .../core-js/library/fn/array/copy-within.js | 2 + .../core-js/library/fn/array/entries.js | 2 + .../core-js/library/fn/array/every.js | 2 + node_modules/core-js/library/fn/array/fill.js | 2 + .../core-js/library/fn/array/filter.js | 2 + .../core-js/library/fn/array/find-index.js | 2 + node_modules/core-js/library/fn/array/find.js | 2 + .../core-js/library/fn/array/flat-map.js | 2 + .../core-js/library/fn/array/flatten.js | 2 + .../core-js/library/fn/array/for-each.js | 2 + node_modules/core-js/library/fn/array/from.js | 3 + .../core-js/library/fn/array/includes.js | 2 + .../core-js/library/fn/array/index-of.js | 2 + .../core-js/library/fn/array/index.js | 26 + .../core-js/library/fn/array/is-array.js | 2 + .../core-js/library/fn/array/iterator.js | 2 + node_modules/core-js/library/fn/array/join.js | 2 + node_modules/core-js/library/fn/array/keys.js | 2 + .../core-js/library/fn/array/last-index-of.js | 2 + node_modules/core-js/library/fn/array/map.js | 2 + node_modules/core-js/library/fn/array/of.js | 2 + node_modules/core-js/library/fn/array/pop.js | 4 + node_modules/core-js/library/fn/array/push.js | 4 + .../core-js/library/fn/array/reduce-right.js | 2 + .../core-js/library/fn/array/reduce.js | 2 + .../core-js/library/fn/array/reverse.js | 4 + .../core-js/library/fn/array/shift.js | 4 + .../core-js/library/fn/array/slice.js | 2 + node_modules/core-js/library/fn/array/some.js | 2 + node_modules/core-js/library/fn/array/sort.js | 2 + .../core-js/library/fn/array/splice.js | 4 + .../core-js/library/fn/array/unshift.js | 4 + .../core-js/library/fn/array/values.js | 2 + .../library/fn/array/virtual/copy-within.js | 2 + .../library/fn/array/virtual/entries.js | 2 + .../core-js/library/fn/array/virtual/every.js | 2 + .../core-js/library/fn/array/virtual/fill.js | 2 + .../library/fn/array/virtual/filter.js | 2 + .../library/fn/array/virtual/find-index.js | 2 + .../core-js/library/fn/array/virtual/find.js | 2 + .../library/fn/array/virtual/flat-map.js | 2 + .../library/fn/array/virtual/flatten.js | 2 + .../library/fn/array/virtual/for-each.js | 2 + .../library/fn/array/virtual/includes.js | 2 + .../library/fn/array/virtual/index-of.js | 2 + .../core-js/library/fn/array/virtual/index.js | 20 + .../library/fn/array/virtual/iterator.js | 2 + .../core-js/library/fn/array/virtual/join.js | 2 + .../core-js/library/fn/array/virtual/keys.js | 2 + .../library/fn/array/virtual/last-index-of.js | 2 + .../core-js/library/fn/array/virtual/map.js | 2 + .../library/fn/array/virtual/reduce-right.js | 2 + .../library/fn/array/virtual/reduce.js | 2 + .../core-js/library/fn/array/virtual/slice.js | 2 + .../core-js/library/fn/array/virtual/some.js | 2 + .../core-js/library/fn/array/virtual/sort.js | 2 + .../library/fn/array/virtual/values.js | 2 + node_modules/core-js/library/fn/asap.js | 2 + .../core-js/library/fn/clear-immediate.js | 2 + node_modules/core-js/library/fn/date/index.js | 6 + node_modules/core-js/library/fn/date/now.js | 2 + .../core-js/library/fn/date/to-iso-string.js | 3 + .../core-js/library/fn/date/to-json.js | 2 + .../core-js/library/fn/date/to-primitive.js | 5 + .../core-js/library/fn/date/to-string.js | 5 + node_modules/core-js/library/fn/delay.js | 2 + node_modules/core-js/library/fn/dict.js | 2 + .../library/fn/dom-collections/index.js | 8 + .../library/fn/dom-collections/iterator.js | 2 + .../core-js/library/fn/error/index.js | 2 + .../core-js/library/fn/error/is-error.js | 2 + .../core-js/library/fn/function/bind.js | 2 + .../library/fn/function/has-instance.js | 2 + .../core-js/library/fn/function/index.js | 5 + .../core-js/library/fn/function/name.js | 1 + .../core-js/library/fn/function/part.js | 2 + .../library/fn/function/virtual/bind.js | 2 + .../library/fn/function/virtual/index.js | 3 + .../library/fn/function/virtual/part.js | 2 + .../core-js/library/fn/get-iterator-method.js | 3 + .../core-js/library/fn/get-iterator.js | 3 + node_modules/core-js/library/fn/global.js | 2 + .../core-js/library/fn/is-iterable.js | 3 + node_modules/core-js/library/fn/json/index.js | 2 + .../core-js/library/fn/json/stringify.js | 5 + node_modules/core-js/library/fn/map.js | 8 + node_modules/core-js/library/fn/map/from.js | 8 + node_modules/core-js/library/fn/map/index.js | 8 + node_modules/core-js/library/fn/map/of.js | 8 + node_modules/core-js/library/fn/math/acosh.js | 2 + node_modules/core-js/library/fn/math/asinh.js | 2 + node_modules/core-js/library/fn/math/atanh.js | 2 + node_modules/core-js/library/fn/math/cbrt.js | 2 + node_modules/core-js/library/fn/math/clamp.js | 2 + node_modules/core-js/library/fn/math/clz32.js | 2 + node_modules/core-js/library/fn/math/cosh.js | 2 + .../core-js/library/fn/math/deg-per-rad.js | 2 + .../core-js/library/fn/math/degrees.js | 2 + node_modules/core-js/library/fn/math/expm1.js | 2 + .../core-js/library/fn/math/fround.js | 2 + .../core-js/library/fn/math/fscale.js | 2 + node_modules/core-js/library/fn/math/hypot.js | 2 + node_modules/core-js/library/fn/math/iaddh.js | 2 + node_modules/core-js/library/fn/math/imul.js | 2 + node_modules/core-js/library/fn/math/imulh.js | 2 + node_modules/core-js/library/fn/math/index.js | 30 + node_modules/core-js/library/fn/math/isubh.js | 2 + node_modules/core-js/library/fn/math/log10.js | 2 + node_modules/core-js/library/fn/math/log1p.js | 2 + node_modules/core-js/library/fn/math/log2.js | 2 + .../core-js/library/fn/math/rad-per-deg.js | 2 + .../core-js/library/fn/math/radians.js | 2 + node_modules/core-js/library/fn/math/scale.js | 2 + node_modules/core-js/library/fn/math/sign.js | 2 + .../core-js/library/fn/math/signbit.js | 3 + node_modules/core-js/library/fn/math/sinh.js | 2 + node_modules/core-js/library/fn/math/tanh.js | 2 + node_modules/core-js/library/fn/math/trunc.js | 2 + node_modules/core-js/library/fn/math/umulh.js | 2 + .../core-js/library/fn/number/constructor.js | 2 + .../core-js/library/fn/number/epsilon.js | 2 + .../core-js/library/fn/number/index.js | 14 + .../core-js/library/fn/number/is-finite.js | 2 + .../core-js/library/fn/number/is-integer.js | 2 + .../core-js/library/fn/number/is-nan.js | 2 + .../library/fn/number/is-safe-integer.js | 2 + .../core-js/library/fn/number/iterator.js | 5 + .../library/fn/number/max-safe-integer.js | 2 + .../library/fn/number/min-safe-integer.js | 2 + .../core-js/library/fn/number/parse-float.js | 2 + .../core-js/library/fn/number/parse-int.js | 2 + .../core-js/library/fn/number/to-fixed.js | 2 + .../core-js/library/fn/number/to-precision.js | 2 + .../library/fn/number/virtual/index.js | 4 + .../library/fn/number/virtual/iterator.js | 2 + .../library/fn/number/virtual/to-fixed.js | 2 + .../library/fn/number/virtual/to-precision.js | 2 + .../core-js/library/fn/object/assign.js | 2 + .../core-js/library/fn/object/classof.js | 2 + .../core-js/library/fn/object/create.js | 5 + .../library/fn/object/define-getter.js | 2 + .../library/fn/object/define-properties.js | 5 + .../library/fn/object/define-property.js | 5 + .../library/fn/object/define-setter.js | 2 + .../core-js/library/fn/object/define.js | 2 + .../core-js/library/fn/object/entries.js | 2 + .../core-js/library/fn/object/freeze.js | 2 + .../fn/object/get-own-property-descriptor.js | 5 + .../fn/object/get-own-property-descriptors.js | 2 + .../fn/object/get-own-property-names.js | 5 + .../fn/object/get-own-property-symbols.js | 2 + .../library/fn/object/get-prototype-of.js | 2 + .../core-js/library/fn/object/index.js | 30 + .../library/fn/object/is-extensible.js | 2 + .../core-js/library/fn/object/is-frozen.js | 2 + .../core-js/library/fn/object/is-object.js | 2 + .../core-js/library/fn/object/is-sealed.js | 2 + node_modules/core-js/library/fn/object/is.js | 2 + .../core-js/library/fn/object/keys.js | 2 + .../library/fn/object/lookup-getter.js | 2 + .../library/fn/object/lookup-setter.js | 2 + .../core-js/library/fn/object/make.js | 2 + .../library/fn/object/prevent-extensions.js | 2 + .../core-js/library/fn/object/seal.js | 2 + .../library/fn/object/set-prototype-of.js | 2 + .../core-js/library/fn/object/values.js | 2 + node_modules/core-js/library/fn/observable.js | 7 + .../core-js/library/fn/parse-float.js | 2 + node_modules/core-js/library/fn/parse-int.js | 2 + node_modules/core-js/library/fn/promise.js | 7 + .../core-js/library/fn/promise/finally.js | 4 + .../core-js/library/fn/promise/index.js | 7 + .../core-js/library/fn/promise/try.js | 8 + .../core-js/library/fn/reflect/apply.js | 2 + .../core-js/library/fn/reflect/construct.js | 2 + .../library/fn/reflect/define-metadata.js | 2 + .../library/fn/reflect/define-property.js | 2 + .../library/fn/reflect/delete-metadata.js | 2 + .../library/fn/reflect/delete-property.js | 2 + .../core-js/library/fn/reflect/enumerate.js | 2 + .../library/fn/reflect/get-metadata-keys.js | 2 + .../library/fn/reflect/get-metadata.js | 2 + .../fn/reflect/get-own-metadata-keys.js | 2 + .../library/fn/reflect/get-own-metadata.js | 2 + .../fn/reflect/get-own-property-descriptor.js | 2 + .../library/fn/reflect/get-prototype-of.js | 2 + .../core-js/library/fn/reflect/get.js | 2 + .../library/fn/reflect/has-metadata.js | 2 + .../library/fn/reflect/has-own-metadata.js | 2 + .../core-js/library/fn/reflect/has.js | 2 + .../core-js/library/fn/reflect/index.js | 24 + .../library/fn/reflect/is-extensible.js | 2 + .../core-js/library/fn/reflect/metadata.js | 2 + .../core-js/library/fn/reflect/own-keys.js | 2 + .../library/fn/reflect/prevent-extensions.js | 2 + .../library/fn/reflect/set-prototype-of.js | 2 + .../core-js/library/fn/reflect/set.js | 2 + .../core-js/library/fn/regexp/constructor.js | 2 + .../core-js/library/fn/regexp/escape.js | 2 + .../core-js/library/fn/regexp/flags.js | 5 + .../core-js/library/fn/regexp/index.js | 10 + .../core-js/library/fn/regexp/match.js | 5 + .../core-js/library/fn/regexp/replace.js | 5 + .../core-js/library/fn/regexp/search.js | 5 + .../core-js/library/fn/regexp/split.js | 5 + .../core-js/library/fn/regexp/to-string.js | 5 + .../core-js/library/fn/set-immediate.js | 2 + .../core-js/library/fn/set-interval.js | 2 + .../core-js/library/fn/set-timeout.js | 2 + node_modules/core-js/library/fn/set.js | 8 + node_modules/core-js/library/fn/set/from.js | 8 + node_modules/core-js/library/fn/set/index.js | 8 + node_modules/core-js/library/fn/set/of.js | 8 + .../core-js/library/fn/string/anchor.js | 2 + node_modules/core-js/library/fn/string/at.js | 2 + node_modules/core-js/library/fn/string/big.js | 2 + .../core-js/library/fn/string/blink.js | 2 + .../core-js/library/fn/string/bold.js | 2 + .../library/fn/string/code-point-at.js | 2 + .../core-js/library/fn/string/ends-with.js | 2 + .../core-js/library/fn/string/escape-html.js | 2 + .../core-js/library/fn/string/fixed.js | 2 + .../core-js/library/fn/string/fontcolor.js | 2 + .../core-js/library/fn/string/fontsize.js | 2 + .../library/fn/string/from-code-point.js | 2 + .../core-js/library/fn/string/includes.js | 2 + .../core-js/library/fn/string/index.js | 35 + .../core-js/library/fn/string/italics.js | 2 + .../core-js/library/fn/string/iterator.js | 5 + .../core-js/library/fn/string/link.js | 2 + .../core-js/library/fn/string/match-all.js | 2 + .../core-js/library/fn/string/pad-end.js | 2 + .../core-js/library/fn/string/pad-start.js | 2 + node_modules/core-js/library/fn/string/raw.js | 2 + .../core-js/library/fn/string/repeat.js | 2 + .../core-js/library/fn/string/small.js | 2 + .../core-js/library/fn/string/starts-with.js | 2 + .../core-js/library/fn/string/strike.js | 2 + node_modules/core-js/library/fn/string/sub.js | 2 + node_modules/core-js/library/fn/string/sup.js | 2 + .../core-js/library/fn/string/trim-end.js | 2 + .../core-js/library/fn/string/trim-left.js | 2 + .../core-js/library/fn/string/trim-right.js | 2 + .../core-js/library/fn/string/trim-start.js | 2 + .../core-js/library/fn/string/trim.js | 2 + .../library/fn/string/unescape-html.js | 2 + .../library/fn/string/virtual/anchor.js | 2 + .../core-js/library/fn/string/virtual/at.js | 2 + .../core-js/library/fn/string/virtual/big.js | 2 + .../library/fn/string/virtual/blink.js | 2 + .../core-js/library/fn/string/virtual/bold.js | 2 + .../fn/string/virtual/code-point-at.js | 2 + .../library/fn/string/virtual/ends-with.js | 2 + .../library/fn/string/virtual/escape-html.js | 2 + .../library/fn/string/virtual/fixed.js | 2 + .../library/fn/string/virtual/fontcolor.js | 2 + .../library/fn/string/virtual/fontsize.js | 2 + .../library/fn/string/virtual/includes.js | 2 + .../library/fn/string/virtual/index.js | 33 + .../library/fn/string/virtual/italics.js | 2 + .../library/fn/string/virtual/iterator.js | 2 + .../core-js/library/fn/string/virtual/link.js | 2 + .../library/fn/string/virtual/match-all.js | 2 + .../library/fn/string/virtual/pad-end.js | 2 + .../library/fn/string/virtual/pad-start.js | 2 + .../library/fn/string/virtual/repeat.js | 2 + .../library/fn/string/virtual/small.js | 2 + .../library/fn/string/virtual/starts-with.js | 2 + .../library/fn/string/virtual/strike.js | 2 + .../core-js/library/fn/string/virtual/sub.js | 2 + .../core-js/library/fn/string/virtual/sup.js | 2 + .../library/fn/string/virtual/trim-end.js | 2 + .../library/fn/string/virtual/trim-left.js | 2 + .../library/fn/string/virtual/trim-right.js | 2 + .../library/fn/string/virtual/trim-start.js | 2 + .../core-js/library/fn/string/virtual/trim.js | 2 + .../fn/string/virtual/unescape-html.js | 2 + .../library/fn/symbol/async-iterator.js | 2 + node_modules/core-js/library/fn/symbol/for.js | 2 + .../core-js/library/fn/symbol/has-instance.js | 2 + .../core-js/library/fn/symbol/index.js | 5 + .../library/fn/symbol/is-concat-spreadable.js | 1 + .../core-js/library/fn/symbol/iterator.js | 3 + .../core-js/library/fn/symbol/key-for.js | 2 + .../core-js/library/fn/symbol/match.js | 2 + .../core-js/library/fn/symbol/observable.js | 2 + .../core-js/library/fn/symbol/replace.js | 2 + .../core-js/library/fn/symbol/search.js | 2 + .../core-js/library/fn/symbol/species.js | 1 + .../core-js/library/fn/symbol/split.js | 2 + .../core-js/library/fn/symbol/to-primitive.js | 1 + .../library/fn/symbol/to-string-tag.js | 2 + .../core-js/library/fn/symbol/unscopables.js | 1 + .../core-js/library/fn/system/global.js | 2 + .../core-js/library/fn/system/index.js | 2 + .../core-js/library/fn/typed/array-buffer.js | 3 + .../core-js/library/fn/typed/data-view.js | 3 + .../core-js/library/fn/typed/float32-array.js | 2 + .../core-js/library/fn/typed/float64-array.js | 2 + .../core-js/library/fn/typed/index.js | 13 + .../core-js/library/fn/typed/int16-array.js | 2 + .../core-js/library/fn/typed/int32-array.js | 2 + .../core-js/library/fn/typed/int8-array.js | 2 + .../core-js/library/fn/typed/uint16-array.js | 2 + .../core-js/library/fn/typed/uint32-array.js | 2 + .../core-js/library/fn/typed/uint8-array.js | 2 + .../library/fn/typed/uint8-clamped-array.js | 2 + node_modules/core-js/library/fn/weak-map.js | 6 + .../core-js/library/fn/weak-map/from.js | 8 + .../core-js/library/fn/weak-map/index.js | 6 + .../core-js/library/fn/weak-map/of.js | 8 + node_modules/core-js/library/fn/weak-set.js | 6 + .../core-js/library/fn/weak-set/from.js | 8 + .../core-js/library/fn/weak-set/index.js | 6 + .../core-js/library/fn/weak-set/of.js | 8 + node_modules/core-js/library/index.js | 16 + .../core-js/library/modules/_a-function.js | 4 + .../library/modules/_a-number-value.js | 5 + .../library/modules/_add-to-unscopables.js | 1 + .../library/modules/_advance-string-index.js | 8 + .../core-js/library/modules/_an-instance.js | 5 + .../core-js/library/modules/_an-object.js | 5 + .../library/modules/_array-copy-within.js | 26 + .../core-js/library/modules/_array-fill.js | 15 + .../library/modules/_array-from-iterable.js | 7 + .../library/modules/_array-includes.js | 23 + .../core-js/library/modules/_array-methods.js | 44 + .../core-js/library/modules/_array-reduce.js | 28 + .../modules/_array-species-constructor.js | 16 + .../library/modules/_array-species-create.js | 6 + node_modules/core-js/library/modules/_bind.js | 25 + .../core-js/library/modules/_classof.js | 23 + node_modules/core-js/library/modules/_cof.js | 5 + .../library/modules/_collection-strong.js | 144 + .../library/modules/_collection-to-json.js | 9 + .../library/modules/_collection-weak.js | 85 + .../core-js/library/modules/_collection.js | 59 + node_modules/core-js/library/modules/_core.js | 2 + .../library/modules/_create-property.js | 8 + node_modules/core-js/library/modules/_ctx.js | 20 + .../library/modules/_date-to-iso-string.js | 26 + .../library/modules/_date-to-primitive.js | 9 + .../core-js/library/modules/_defined.js | 5 + .../core-js/library/modules/_descriptors.js | 4 + .../core-js/library/modules/_dom-create.js | 7 + .../core-js/library/modules/_entry-virtual.js | 5 + .../core-js/library/modules/_enum-bug-keys.js | 4 + .../core-js/library/modules/_enum-keys.js | 15 + .../core-js/library/modules/_export.js | 62 + .../library/modules/_fails-is-regexp.js | 12 + .../core-js/library/modules/_fails.js | 7 + .../core-js/library/modules/_fix-re-wks.js | 96 + .../core-js/library/modules/_flags.js | 13 + .../library/modules/_flatten-into-array.js | 39 + .../core-js/library/modules/_for-of.js | 25 + .../library/modules/_function-to-string.js | 1 + .../core-js/library/modules/_global.js | 6 + node_modules/core-js/library/modules/_has.js | 4 + node_modules/core-js/library/modules/_hide.js | 8 + node_modules/core-js/library/modules/_html.js | 2 + .../library/modules/_ie8-dom-define.js | 3 + .../library/modules/_inherit-if-required.js | 9 + .../core-js/library/modules/_invoke.js | 16 + .../core-js/library/modules/_iobject.js | 6 + .../core-js/library/modules/_is-array-iter.js | 8 + .../core-js/library/modules/_is-array.js | 5 + .../core-js/library/modules/_is-integer.js | 6 + .../core-js/library/modules/_is-object.js | 3 + .../core-js/library/modules/_is-regexp.js | 8 + .../core-js/library/modules/_iter-call.js | 12 + .../core-js/library/modules/_iter-create.js | 13 + .../core-js/library/modules/_iter-define.js | 69 + .../core-js/library/modules/_iter-detect.js | 22 + .../core-js/library/modules/_iter-step.js | 3 + .../core-js/library/modules/_iterators.js | 1 + .../core-js/library/modules/_keyof.js | 10 + .../core-js/library/modules/_library.js | 1 + .../core-js/library/modules/_math-expm1.js | 10 + .../core-js/library/modules/_math-fround.js | 23 + .../core-js/library/modules/_math-log1p.js | 4 + .../core-js/library/modules/_math-scale.js | 18 + .../core-js/library/modules/_math-sign.js | 5 + node_modules/core-js/library/modules/_meta.js | 53 + .../core-js/library/modules/_metadata.js | 51 + .../core-js/library/modules/_microtask.js | 69 + .../library/modules/_native-weak-map.js | 4 + .../modules/_new-promise-capability.js | 18 + .../core-js/library/modules/_object-assign.js | 38 + .../core-js/library/modules/_object-create.js | 41 + .../core-js/library/modules/_object-define.js | 13 + .../core-js/library/modules/_object-dp.js | 16 + .../core-js/library/modules/_object-dps.js | 13 + .../library/modules/_object-forced-pam.js | 9 + .../core-js/library/modules/_object-gopd.js | 16 + .../library/modules/_object-gopn-ext.js | 19 + .../core-js/library/modules/_object-gopn.js | 7 + .../core-js/library/modules/_object-gops.js | 1 + .../core-js/library/modules/_object-gpo.js | 13 + .../library/modules/_object-keys-internal.js | 17 + .../core-js/library/modules/_object-keys.js | 7 + .../core-js/library/modules/_object-pie.js | 1 + .../core-js/library/modules/_object-sap.js | 10 + .../library/modules/_object-to-array.js | 21 + .../core-js/library/modules/_own-keys.js | 10 + .../core-js/library/modules/_parse-float.js | 8 + .../core-js/library/modules/_parse-int.js | 9 + .../core-js/library/modules/_partial.js | 25 + node_modules/core-js/library/modules/_path.js | 1 + .../core-js/library/modules/_perform.js | 7 + .../library/modules/_promise-resolve.js | 12 + .../core-js/library/modules/_property-desc.js | 8 + .../core-js/library/modules/_redefine-all.js | 7 + .../core-js/library/modules/_redefine.js | 1 + .../library/modules/_regexp-exec-abstract.js | 1 + .../core-js/library/modules/_regexp-exec.js | 1 + .../core-js/library/modules/_replacer.js | 8 + .../core-js/library/modules/_same-value.js | 5 + .../library/modules/_set-collection-from.js | 28 + .../library/modules/_set-collection-of.js | 12 + .../core-js/library/modules/_set-proto.js | 25 + .../core-js/library/modules/_set-species.js | 14 + .../library/modules/_set-to-string-tag.js | 7 + .../core-js/library/modules/_shared-key.js | 5 + .../core-js/library/modules/_shared.js | 12 + .../library/modules/_species-constructor.js | 9 + .../core-js/library/modules/_strict-method.js | 9 + .../core-js/library/modules/_string-at.js | 17 + .../library/modules/_string-context.js | 8 + .../core-js/library/modules/_string-html.js | 19 + .../core-js/library/modules/_string-pad.js | 16 + .../core-js/library/modules/_string-repeat.js | 12 + .../core-js/library/modules/_string-trim.js | 30 + .../core-js/library/modules/_string-ws.js | 2 + node_modules/core-js/library/modules/_task.js | 84 + .../library/modules/_to-absolute-index.js | 7 + .../core-js/library/modules/_to-index.js | 10 + .../core-js/library/modules/_to-integer.js | 6 + .../core-js/library/modules/_to-iobject.js | 6 + .../core-js/library/modules/_to-length.js | 6 + .../core-js/library/modules/_to-object.js | 5 + .../core-js/library/modules/_to-primitive.js | 12 + .../core-js/library/modules/_typed-array.js | 480 + .../core-js/library/modules/_typed-buffer.js | 276 + .../core-js/library/modules/_typed.js | 28 + node_modules/core-js/library/modules/_uid.js | 5 + .../core-js/library/modules/_user-agent.js | 4 + .../library/modules/_validate-collection.js | 5 + .../core-js/library/modules/_wks-define.js | 9 + .../core-js/library/modules/_wks-ext.js | 1 + node_modules/core-js/library/modules/_wks.js | 11 + .../core-js/library/modules/core.delay.js | 12 + .../core-js/library/modules/core.dict.js | 157 + .../library/modules/core.function.part.js | 7 + .../modules/core.get-iterator-method.js | 8 + .../library/modules/core.get-iterator.js | 7 + .../library/modules/core.is-iterable.js | 10 + .../library/modules/core.number.iterator.js | 9 + .../library/modules/core.object.classof.js | 3 + .../library/modules/core.object.define.js | 4 + .../library/modules/core.object.is-object.js | 3 + .../library/modules/core.object.make.js | 9 + .../library/modules/core.regexp.escape.js | 5 + .../modules/core.string.escape-html.js | 11 + .../modules/core.string.unescape-html.js | 11 + node_modules/core-js/library/modules/es5.js | 35 + .../library/modules/es6.array.copy-within.js | 6 + .../library/modules/es6.array.every.js | 10 + .../core-js/library/modules/es6.array.fill.js | 6 + .../library/modules/es6.array.filter.js | 10 + .../library/modules/es6.array.find-index.js | 14 + .../core-js/library/modules/es6.array.find.js | 14 + .../library/modules/es6.array.for-each.js | 11 + .../core-js/library/modules/es6.array.from.js | 37 + .../library/modules/es6.array.index-of.js | 15 + .../library/modules/es6.array.is-array.js | 4 + .../library/modules/es6.array.iterator.js | 34 + .../core-js/library/modules/es6.array.join.js | 12 + .../modules/es6.array.last-index-of.js | 22 + .../core-js/library/modules/es6.array.map.js | 10 + .../core-js/library/modules/es6.array.of.js | 19 + .../library/modules/es6.array.reduce-right.js | 10 + .../library/modules/es6.array.reduce.js | 10 + .../library/modules/es6.array.slice.js | 28 + .../core-js/library/modules/es6.array.some.js | 10 + .../core-js/library/modules/es6.array.sort.js | 23 + .../library/modules/es6.array.species.js | 1 + .../core-js/library/modules/es6.date.now.js | 4 + .../library/modules/es6.date.to-iso-string.js | 8 + .../library/modules/es6.date.to-json.js | 19 + .../library/modules/es6.date.to-primitive.js} | 0 .../library/modules/es6.date.to-string.js | 0 .../library/modules/es6.function.bind.js | 4 + .../modules/es6.function.has-instance.js | 13 + .../library/modules/es6.function.name.js | 0 .../core-js/library/modules/es6.map.js | 19 + .../core-js/library/modules/es6.math.acosh.js | 18 + .../core-js/library/modules/es6.math.asinh.js | 10 + .../core-js/library/modules/es6.math.atanh.js | 10 + .../core-js/library/modules/es6.math.cbrt.js | 9 + .../core-js/library/modules/es6.math.clz32.js | 8 + .../core-js/library/modules/es6.math.cosh.js | 9 + .../core-js/library/modules/es6.math.expm1.js | 5 + .../library/modules/es6.math.fround.js | 4 + .../core-js/library/modules/es6.math.hypot.js | 25 + .../core-js/library/modules/es6.math.imul.js | 17 + .../core-js/library/modules/es6.math.log10.js | 8 + .../core-js/library/modules/es6.math.log1p.js | 4 + .../core-js/library/modules/es6.math.log2.js | 8 + .../core-js/library/modules/es6.math.sign.js | 4 + .../core-js/library/modules/es6.math.sinh.js | 15 + .../core-js/library/modules/es6.math.tanh.js | 12 + .../core-js/library/modules/es6.math.trunc.js | 8 + .../library/modules/es6.number.constructor.js | 0 .../library/modules/es6.number.epsilon.js | 4 + .../library/modules/es6.number.is-finite.js | 9 + .../library/modules/es6.number.is-integer.js | 4 + .../library/modules/es6.number.is-nan.js | 9 + .../modules/es6.number.is-safe-integer.js | 10 + .../modules/es6.number.max-safe-integer.js | 4 + .../modules/es6.number.min-safe-integer.js | 4 + .../library/modules/es6.number.parse-float.js | 4 + .../library/modules/es6.number.parse-int.js | 4 + .../library/modules/es6.number.to-fixed.js | 114 + .../modules/es6.number.to-precision.js | 18 + .../library/modules/es6.object.assign.js | 4 + .../library/modules/es6.object.create.js | 3 + .../modules/es6.object.define-properties.js | 3 + .../modules/es6.object.define-property.js | 3 + .../library/modules/es6.object.freeze.js | 9 + .../es6.object.get-own-property-descriptor.js | 9 + .../es6.object.get-own-property-names.js | 4 + .../modules/es6.object.get-prototype-of.js | 9 + .../modules/es6.object.is-extensible.js | 8 + .../library/modules/es6.object.is-frozen.js | 8 + .../library/modules/es6.object.is-sealed.js | 8 + .../core-js/library/modules/es6.object.is.js | 3 + .../library/modules/es6.object.keys.js | 9 + .../modules/es6.object.prevent-extensions.js | 9 + .../library/modules/es6.object.seal.js | 9 + .../modules/es6.object.set-prototype-of.js | 3 + .../library/modules/es6.object.to-string.js | 0 .../library/modules/es6.parse-float.js | 4 + .../core-js/library/modules/es6.parse-int.js | 4 + .../core-js/library/modules/es6.promise.js | 286 + .../library/modules/es6.reflect.apply.js | 16 + .../library/modules/es6.reflect.construct.js | 47 + .../modules/es6.reflect.define-property.js | 23 + .../modules/es6.reflect.delete-property.js | 11 + .../library/modules/es6.reflect.enumerate.js | 26 + ...es6.reflect.get-own-property-descriptor.js | 10 + .../modules/es6.reflect.get-prototype-of.js | 10 + .../library/modules/es6.reflect.get.js | 21 + .../library/modules/es6.reflect.has.js | 8 + .../modules/es6.reflect.is-extensible.js | 11 + .../library/modules/es6.reflect.own-keys.js | 4 + .../modules/es6.reflect.prevent-extensions.js | 16 + .../modules/es6.reflect.set-prototype-of.js | 15 + .../library/modules/es6.reflect.set.js | 33 + .../library/modules/es6.regexp.constructor.js | 1 + .../library/modules/es6.regexp.exec.js | 1 + .../library/modules/es6.regexp.flags.js | 0 .../library/modules/es6.regexp.match.js | 0 .../library/modules/es6.regexp.replace.js | 0 .../library/modules/es6.regexp.search.js | 0 .../library/modules/es6.regexp.split.js | 0 .../library/modules/es6.regexp.to-string.js | 0 .../core-js/library/modules/es6.set.js | 14 + .../library/modules/es6.string.anchor.js | 7 + .../core-js/library/modules/es6.string.big.js | 7 + .../library/modules/es6.string.blink.js | 7 + .../library/modules/es6.string.bold.js | 7 + .../modules/es6.string.code-point-at.js | 9 + .../library/modules/es6.string.ends-with.js | 20 + .../library/modules/es6.string.fixed.js | 7 + .../library/modules/es6.string.fontcolor.js | 7 + .../library/modules/es6.string.fontsize.js | 7 + .../modules/es6.string.from-code-point.js | 23 + .../library/modules/es6.string.includes.js | 12 + .../library/modules/es6.string.italics.js | 7 + .../library/modules/es6.string.iterator.js | 17 + .../library/modules/es6.string.link.js | 7 + .../core-js/library/modules/es6.string.raw.js | 18 + .../library/modules/es6.string.repeat.js | 6 + .../library/modules/es6.string.small.js | 7 + .../library/modules/es6.string.starts-with.js | 18 + .../library/modules/es6.string.strike.js | 7 + .../core-js/library/modules/es6.string.sub.js | 7 + .../core-js/library/modules/es6.string.sup.js | 7 + .../library/modules/es6.string.trim.js | 7 + .../core-js/library/modules/es6.symbol.js | 246 + .../library/modules/es6.typed.array-buffer.js | 46 + .../library/modules/es6.typed.data-view.js | 4 + .../modules/es6.typed.float32-array.js | 5 + .../modules/es6.typed.float64-array.js | 5 + .../library/modules/es6.typed.int16-array.js | 5 + .../library/modules/es6.typed.int32-array.js | 5 + .../library/modules/es6.typed.int8-array.js | 5 + .../library/modules/es6.typed.uint16-array.js | 5 + .../library/modules/es6.typed.uint32-array.js | 5 + .../library/modules/es6.typed.uint8-array.js | 5 + .../modules/es6.typed.uint8-clamped-array.js | 5 + .../core-js/library/modules/es6.weak-map.js | 60 + .../core-js/library/modules/es6.weak-set.js | 14 + .../library/modules/es7.array.flat-map.js | 22 + .../library/modules/es7.array.flatten.js | 21 + .../library/modules/es7.array.includes.js | 12 + .../core-js/library/modules/es7.asap.js | 12 + .../library/modules/es7.error.is-error.js | 9 + .../core-js/library/modules/es7.global.js | 4 + .../core-js/library/modules/es7.map.from.js | 2 + .../core-js/library/modules/es7.map.of.js | 2 + .../library/modules/es7.map.to-json.js | 4 + .../core-js/library/modules/es7.math.clamp.js | 8 + .../library/modules/es7.math.deg-per-rad.js | 4 + .../library/modules/es7.math.degrees.js | 9 + .../library/modules/es7.math.fscale.js | 10 + .../core-js/library/modules/es7.math.iaddh.js | 11 + .../core-js/library/modules/es7.math.imulh.js | 16 + .../core-js/library/modules/es7.math.isubh.js | 11 + .../library/modules/es7.math.rad-per-deg.js | 4 + .../library/modules/es7.math.radians.js | 9 + .../core-js/library/modules/es7.math.scale.js | 4 + .../library/modules/es7.math.signbit.js | 7 + .../core-js/library/modules/es7.math.umulh.js | 16 + .../modules/es7.object.define-getter.js | 12 + .../modules/es7.object.define-setter.js | 12 + .../library/modules/es7.object.entries.js | 9 + ...es7.object.get-own-property-descriptors.js | 22 + .../modules/es7.object.lookup-getter.js | 18 + .../modules/es7.object.lookup-setter.js | 18 + .../library/modules/es7.object.values.js | 9 + .../core-js/library/modules/es7.observable.js | 199 + .../library/modules/es7.promise.finally.js | 20 + .../library/modules/es7.promise.try.js | 12 + .../modules/es7.reflect.define-metadata.js | 8 + .../modules/es7.reflect.delete-metadata.js | 15 + .../modules/es7.reflect.get-metadata-keys.js | 19 + .../modules/es7.reflect.get-metadata.js | 17 + .../es7.reflect.get-own-metadata-keys.js | 8 + .../modules/es7.reflect.get-own-metadata.js | 9 + .../modules/es7.reflect.has-metadata.js | 16 + .../modules/es7.reflect.has-own-metadata.js | 9 + .../library/modules/es7.reflect.metadata.js | 15 + .../core-js/library/modules/es7.set.from.js | 2 + .../core-js/library/modules/es7.set.of.js | 2 + .../library/modules/es7.set.to-json.js | 4 + .../core-js/library/modules/es7.string.at.js | 10 + .../library/modules/es7.string.match-all.js | 30 + .../library/modules/es7.string.pad-end.js | 14 + .../library/modules/es7.string.pad-start.js | 14 + .../library/modules/es7.string.trim-left.js | 7 + .../library/modules/es7.string.trim-right.js | 7 + .../modules/es7.symbol.async-iterator.js | 1 + .../library/modules/es7.symbol.observable.js | 1 + .../library/modules/es7.system.global.js | 4 + .../library/modules/es7.weak-map.from.js | 2 + .../library/modules/es7.weak-map.of.js | 2 + .../library/modules/es7.weak-set.from.js | 2 + .../library/modules/es7.weak-set.of.js | 2 + .../library/modules/web.dom.iterable.js | 19 + .../core-js/library/modules/web.immediate.js | 6 + .../core-js/library/modules/web.timers.js | 20 + node_modules/core-js/library/shim.js | 198 + node_modules/core-js/library/stage/0.js | 10 + node_modules/core-js/library/stage/1.js | 23 + node_modules/core-js/library/stage/2.js | 4 + node_modules/core-js/library/stage/3.js | 4 + node_modules/core-js/library/stage/4.js | 11 + node_modules/core-js/library/stage/index.js | 1 + node_modules/core-js/library/stage/pre.js | 10 + .../core-js/library/web/dom-collections.js | 2 + node_modules/core-js/library/web/immediate.js | 2 + node_modules/core-js/library/web/index.js | 4 + node_modules/core-js/library/web/timers.js | 2 + node_modules/core-js/modules/_a-function.js | 4 + .../core-js/modules/_a-number-value.js | 5 + .../core-js/modules/_add-to-unscopables.js | 7 + .../core-js/modules/_advance-string-index.js | 8 + node_modules/core-js/modules/_an-instance.js | 5 + node_modules/core-js/modules/_an-object.js | 5 + .../core-js/modules/_array-copy-within.js | 26 + node_modules/core-js/modules/_array-fill.js | 15 + .../core-js/modules/_array-from-iterable.js | 7 + .../core-js/modules/_array-includes.js | 23 + .../core-js/modules/_array-methods.js | 44 + node_modules/core-js/modules/_array-reduce.js | 28 + .../modules/_array-species-constructor.js | 16 + .../core-js/modules/_array-species-create.js | 6 + node_modules/core-js/modules/_bind.js | 25 + node_modules/core-js/modules/_classof.js | 23 + node_modules/core-js/modules/_cof.js | 5 + .../core-js/modules/_collection-strong.js | 144 + .../core-js/modules/_collection-to-json.js | 9 + .../core-js/modules/_collection-weak.js | 85 + node_modules/core-js/modules/_collection.js | 85 + node_modules/core-js/modules/_core.js | 2 + .../core-js/modules/_create-property.js | 8 + node_modules/core-js/modules/_ctx.js | 20 + .../core-js/modules/_date-to-iso-string.js | 26 + .../core-js/modules/_date-to-primitive.js | 9 + node_modules/core-js/modules/_defined.js | 5 + node_modules/core-js/modules/_descriptors.js | 4 + node_modules/core-js/modules/_dom-create.js | 7 + .../core-js/modules/_entry-virtual.js | 5 + .../core-js/modules/_enum-bug-keys.js | 4 + node_modules/core-js/modules/_enum-keys.js | 15 + node_modules/core-js/modules/_export.js | 43 + .../core-js/modules/_fails-is-regexp.js | 12 + node_modules/core-js/modules/_fails.js | 7 + node_modules/core-js/modules/_fix-re-wks.js | 96 + node_modules/core-js/modules/_flags.js | 13 + .../core-js/modules/_flatten-into-array.js | 39 + node_modules/core-js/modules/_for-of.js | 25 + .../core-js/modules/_function-to-string.js | 1 + node_modules/core-js/modules/_global.js | 6 + node_modules/core-js/modules/_has.js | 4 + node_modules/core-js/modules/_hide.js | 8 + node_modules/core-js/modules/_html.js | 2 + .../core-js/modules/_ie8-dom-define.js | 3 + .../core-js/modules/_inherit-if-required.js | 9 + node_modules/core-js/modules/_invoke.js | 16 + node_modules/core-js/modules/_iobject.js | 6 + .../core-js/modules/_is-array-iter.js | 8 + node_modules/core-js/modules/_is-array.js | 5 + node_modules/core-js/modules/_is-integer.js | 6 + node_modules/core-js/modules/_is-object.js | 3 + node_modules/core-js/modules/_is-regexp.js | 8 + node_modules/core-js/modules/_iter-call.js | 12 + node_modules/core-js/modules/_iter-create.js | 13 + node_modules/core-js/modules/_iter-define.js | 69 + node_modules/core-js/modules/_iter-detect.js | 22 + node_modules/core-js/modules/_iter-step.js | 3 + node_modules/core-js/modules/_iterators.js | 1 + node_modules/core-js/modules/_keyof.js | 10 + node_modules/core-js/modules/_library.js | 1 + node_modules/core-js/modules/_math-expm1.js | 10 + node_modules/core-js/modules/_math-fround.js | 23 + node_modules/core-js/modules/_math-log1p.js | 4 + node_modules/core-js/modules/_math-scale.js | 18 + node_modules/core-js/modules/_math-sign.js | 5 + node_modules/core-js/modules/_meta.js | 53 + node_modules/core-js/modules/_metadata.js | 51 + node_modules/core-js/modules/_microtask.js | 69 + .../core-js/modules/_native-weak-map.js | 4 + .../modules/_new-promise-capability.js | 18 + .../core-js/modules/_object-assign.js | 38 + .../core-js/modules/_object-create.js | 41 + .../core-js/modules/_object-define.js | 13 + node_modules/core-js/modules/_object-dp.js | 16 + node_modules/core-js/modules/_object-dps.js | 13 + .../core-js/modules/_object-forced-pam.js | 9 + node_modules/core-js/modules/_object-gopd.js | 16 + .../core-js/modules/_object-gopn-ext.js | 19 + node_modules/core-js/modules/_object-gopn.js | 7 + node_modules/core-js/modules/_object-gops.js | 1 + node_modules/core-js/modules/_object-gpo.js | 13 + .../core-js/modules/_object-keys-internal.js | 17 + node_modules/core-js/modules/_object-keys.js | 7 + node_modules/core-js/modules/_object-pie.js | 1 + node_modules/core-js/modules/_object-sap.js | 10 + .../core-js/modules/_object-to-array.js | 21 + node_modules/core-js/modules/_own-keys.js | 10 + node_modules/core-js/modules/_parse-float.js | 8 + node_modules/core-js/modules/_parse-int.js | 9 + node_modules/core-js/modules/_partial.js | 25 + node_modules/core-js/modules/_path.js | 1 + node_modules/core-js/modules/_perform.js | 7 + .../core-js/modules/_promise-resolve.js | 12 + .../core-js/modules/_property-desc.js | 8 + node_modules/core-js/modules/_redefine-all.js | 5 + node_modules/core-js/modules/_redefine.js | 31 + .../core-js/modules/_regexp-exec-abstract.js | 21 + node_modules/core-js/modules/_regexp-exec.js | 58 + node_modules/core-js/modules/_replacer.js | 8 + node_modules/core-js/modules/_same-value.js | 5 + .../core-js/modules/_set-collection-from.js | 28 + .../core-js/modules/_set-collection-of.js | 12 + node_modules/core-js/modules/_set-proto.js | 25 + node_modules/core-js/modules/_set-species.js | 13 + .../core-js/modules/_set-to-string-tag.js | 7 + node_modules/core-js/modules/_shared-key.js | 5 + node_modules/core-js/modules/_shared.js | 12 + .../core-js/modules/_species-constructor.js | 9 + .../core-js/modules/_strict-method.js | 9 + node_modules/core-js/modules/_string-at.js | 17 + .../core-js/modules/_string-context.js | 8 + node_modules/core-js/modules/_string-html.js | 19 + node_modules/core-js/modules/_string-pad.js | 16 + .../core-js/modules/_string-repeat.js | 12 + node_modules/core-js/modules/_string-trim.js | 30 + node_modules/core-js/modules/_string-ws.js | 2 + node_modules/core-js/modules/_task.js | 84 + .../core-js/modules/_to-absolute-index.js | 7 + node_modules/core-js/modules/_to-index.js | 10 + node_modules/core-js/modules/_to-integer.js | 6 + node_modules/core-js/modules/_to-iobject.js | 6 + node_modules/core-js/modules/_to-length.js | 6 + node_modules/core-js/modules/_to-object.js | 5 + node_modules/core-js/modules/_to-primitive.js | 12 + node_modules/core-js/modules/_typed-array.js | 480 + node_modules/core-js/modules/_typed-buffer.js | 276 + node_modules/core-js/modules/_typed.js | 28 + node_modules/core-js/modules/_uid.js | 5 + node_modules/core-js/modules/_user-agent.js | 4 + .../core-js/modules/_validate-collection.js | 5 + node_modules/core-js/modules/_wks-define.js | 9 + node_modules/core-js/modules/_wks-ext.js | 1 + node_modules/core-js/modules/_wks.js | 11 + node_modules/core-js/modules/core.delay.js | 12 + node_modules/core-js/modules/core.dict.js | 157 + .../core-js/modules/core.function.part.js | 7 + .../modules/core.get-iterator-method.js | 8 + .../core-js/modules/core.get-iterator.js | 7 + .../core-js/modules/core.is-iterable.js | 10 + .../core-js/modules/core.number.iterator.js | 9 + .../core-js/modules/core.object.classof.js | 3 + .../core-js/modules/core.object.define.js | 4 + .../core-js/modules/core.object.is-object.js | 3 + .../core-js/modules/core.object.make.js | 9 + .../core-js/modules/core.regexp.escape.js | 5 + .../modules/core.string.escape-html.js | 11 + .../modules/core.string.unescape-html.js | 11 + node_modules/core-js/modules/es5.js | 35 + .../core-js/modules/es6.array.copy-within.js | 6 + .../core-js/modules/es6.array.every.js | 10 + .../core-js/modules/es6.array.fill.js | 6 + .../core-js/modules/es6.array.filter.js | 10 + .../core-js/modules/es6.array.find-index.js | 14 + .../core-js/modules/es6.array.find.js | 14 + .../core-js/modules/es6.array.for-each.js | 11 + .../core-js/modules/es6.array.from.js | 37 + .../core-js/modules/es6.array.index-of.js | 15 + .../core-js/modules/es6.array.is-array.js | 4 + .../core-js/modules/es6.array.iterator.js | 34 + .../core-js/modules/es6.array.join.js | 12 + .../modules/es6.array.last-index-of.js | 22 + node_modules/core-js/modules/es6.array.map.js | 10 + node_modules/core-js/modules/es6.array.of.js | 19 + .../core-js/modules/es6.array.reduce-right.js | 10 + .../core-js/modules/es6.array.reduce.js | 10 + .../core-js/modules/es6.array.slice.js | 28 + .../core-js/modules/es6.array.some.js | 10 + .../core-js/modules/es6.array.sort.js | 23 + .../core-js/modules/es6.array.species.js | 1 + node_modules/core-js/modules/es6.date.now.js | 4 + .../core-js/modules/es6.date.to-iso-string.js | 8 + .../core-js/modules/es6.date.to-json.js | 16 + .../core-js/modules/es6.date.to-primitive.js | 4 + .../core-js/modules/es6.date.to-string.js | 12 + .../core-js/modules/es6.function.bind.js | 4 + .../modules/es6.function.has-instance.js | 13 + .../core-js/modules/es6.function.name.js | 16 + node_modules/core-js/modules/es6.map.js | 19 + .../core-js/modules/es6.math.acosh.js | 18 + .../core-js/modules/es6.math.asinh.js | 10 + .../core-js/modules/es6.math.atanh.js | 10 + node_modules/core-js/modules/es6.math.cbrt.js | 9 + .../core-js/modules/es6.math.clz32.js | 8 + node_modules/core-js/modules/es6.math.cosh.js | 9 + .../core-js/modules/es6.math.expm1.js | 5 + .../core-js/modules/es6.math.fround.js | 4 + .../core-js/modules/es6.math.hypot.js | 25 + node_modules/core-js/modules/es6.math.imul.js | 17 + .../core-js/modules/es6.math.log10.js | 8 + .../core-js/modules/es6.math.log1p.js | 4 + node_modules/core-js/modules/es6.math.log2.js | 8 + node_modules/core-js/modules/es6.math.sign.js | 4 + node_modules/core-js/modules/es6.math.sinh.js | 15 + node_modules/core-js/modules/es6.math.tanh.js | 12 + .../core-js/modules/es6.math.trunc.js | 8 + .../core-js/modules/es6.number.constructor.js | 69 + .../core-js/modules/es6.number.epsilon.js | 4 + .../core-js/modules/es6.number.is-finite.js | 9 + .../core-js/modules/es6.number.is-integer.js | 4 + .../core-js/modules/es6.number.is-nan.js | 9 + .../modules/es6.number.is-safe-integer.js | 10 + .../modules/es6.number.max-safe-integer.js | 4 + .../modules/es6.number.min-safe-integer.js | 4 + .../core-js/modules/es6.number.parse-float.js | 4 + .../core-js/modules/es6.number.parse-int.js | 4 + .../core-js/modules/es6.number.to-fixed.js | 114 + .../modules/es6.number.to-precision.js | 18 + .../core-js/modules/es6.object.assign.js | 4 + .../core-js/modules/es6.object.create.js | 3 + .../modules/es6.object.define-properties.js | 3 + .../modules/es6.object.define-property.js | 3 + .../core-js/modules/es6.object.freeze.js | 9 + .../es6.object.get-own-property-descriptor.js | 9 + .../es6.object.get-own-property-names.js | 4 + .../modules/es6.object.get-prototype-of.js | 9 + .../modules/es6.object.is-extensible.js | 8 + .../core-js/modules/es6.object.is-frozen.js | 8 + .../core-js/modules/es6.object.is-sealed.js | 8 + node_modules/core-js/modules/es6.object.is.js | 3 + .../core-js/modules/es6.object.keys.js | 9 + .../modules/es6.object.prevent-extensions.js | 9 + .../core-js/modules/es6.object.seal.js | 9 + .../modules/es6.object.set-prototype-of.js | 3 + .../core-js/modules/es6.object.to-string.js | 10 + .../core-js/modules/es6.parse-float.js | 4 + node_modules/core-js/modules/es6.parse-int.js | 4 + node_modules/core-js/modules/es6.promise.js | 286 + .../core-js/modules/es6.reflect.apply.js | 16 + .../core-js/modules/es6.reflect.construct.js | 47 + .../modules/es6.reflect.define-property.js | 23 + .../modules/es6.reflect.delete-property.js | 11 + .../core-js/modules/es6.reflect.enumerate.js | 26 + ...es6.reflect.get-own-property-descriptor.js | 10 + .../modules/es6.reflect.get-prototype-of.js | 10 + .../core-js/modules/es6.reflect.get.js | 21 + .../core-js/modules/es6.reflect.has.js | 8 + .../modules/es6.reflect.is-extensible.js | 11 + .../core-js/modules/es6.reflect.own-keys.js | 4 + .../modules/es6.reflect.prevent-extensions.js | 16 + .../modules/es6.reflect.set-prototype-of.js | 15 + .../core-js/modules/es6.reflect.set.js | 33 + .../core-js/modules/es6.regexp.constructor.js | 43 + .../core-js/modules/es6.regexp.exec.js | 9 + .../core-js/modules/es6.regexp.flags.js | 5 + .../core-js/modules/es6.regexp.match.js | 40 + .../core-js/modules/es6.regexp.replace.js | 118 + .../core-js/modules/es6.regexp.search.js | 31 + .../core-js/modules/es6.regexp.split.js | 134 + .../core-js/modules/es6.regexp.to-string.js | 25 + node_modules/core-js/modules/es6.set.js | 14 + .../core-js/modules/es6.string.anchor.js | 7 + .../core-js/modules/es6.string.big.js | 7 + .../core-js/modules/es6.string.blink.js | 7 + .../core-js/modules/es6.string.bold.js | 7 + .../modules/es6.string.code-point-at.js | 9 + .../core-js/modules/es6.string.ends-with.js | 20 + .../core-js/modules/es6.string.fixed.js | 7 + .../core-js/modules/es6.string.fontcolor.js | 7 + .../core-js/modules/es6.string.fontsize.js | 7 + .../modules/es6.string.from-code-point.js | 23 + .../core-js/modules/es6.string.includes.js | 12 + .../core-js/modules/es6.string.italics.js | 7 + .../core-js/modules/es6.string.iterator.js | 17 + .../core-js/modules/es6.string.link.js | 7 + .../core-js/modules/es6.string.raw.js | 18 + .../core-js/modules/es6.string.repeat.js | 6 + .../core-js/modules/es6.string.small.js | 7 + .../core-js/modules/es6.string.starts-with.js | 18 + .../core-js/modules/es6.string.strike.js | 7 + .../core-js/modules/es6.string.sub.js | 7 + .../core-js/modules/es6.string.sup.js | 7 + .../core-js/modules/es6.string.trim.js | 7 + node_modules/core-js/modules/es6.symbol.js | 246 + .../core-js/modules/es6.typed.array-buffer.js | 46 + .../core-js/modules/es6.typed.data-view.js | 4 + .../modules/es6.typed.float32-array.js | 5 + .../modules/es6.typed.float64-array.js | 5 + .../core-js/modules/es6.typed.int16-array.js | 5 + .../core-js/modules/es6.typed.int32-array.js | 5 + .../core-js/modules/es6.typed.int8-array.js | 5 + .../core-js/modules/es6.typed.uint16-array.js | 5 + .../core-js/modules/es6.typed.uint32-array.js | 5 + .../core-js/modules/es6.typed.uint8-array.js | 5 + .../modules/es6.typed.uint8-clamped-array.js | 5 + node_modules/core-js/modules/es6.weak-map.js | 60 + node_modules/core-js/modules/es6.weak-set.js | 14 + .../core-js/modules/es7.array.flat-map.js | 22 + .../core-js/modules/es7.array.flatten.js | 21 + .../core-js/modules/es7.array.includes.js | 12 + node_modules/core-js/modules/es7.asap.js | 12 + .../core-js/modules/es7.error.is-error.js | 9 + node_modules/core-js/modules/es7.global.js | 4 + node_modules/core-js/modules/es7.map.from.js | 2 + node_modules/core-js/modules/es7.map.of.js | 2 + .../core-js/modules/es7.map.to-json.js | 4 + .../core-js/modules/es7.math.clamp.js | 8 + .../core-js/modules/es7.math.deg-per-rad.js | 4 + .../core-js/modules/es7.math.degrees.js | 9 + .../core-js/modules/es7.math.fscale.js | 10 + .../core-js/modules/es7.math.iaddh.js | 11 + .../core-js/modules/es7.math.imulh.js | 16 + .../core-js/modules/es7.math.isubh.js | 11 + .../core-js/modules/es7.math.rad-per-deg.js | 4 + .../core-js/modules/es7.math.radians.js | 9 + .../core-js/modules/es7.math.scale.js | 4 + .../core-js/modules/es7.math.signbit.js | 7 + .../core-js/modules/es7.math.umulh.js | 16 + .../modules/es7.object.define-getter.js | 12 + .../modules/es7.object.define-setter.js | 12 + .../core-js/modules/es7.object.entries.js | 9 + ...es7.object.get-own-property-descriptors.js | 22 + .../modules/es7.object.lookup-getter.js | 18 + .../modules/es7.object.lookup-setter.js | 18 + .../core-js/modules/es7.object.values.js | 9 + .../core-js/modules/es7.observable.js | 199 + .../core-js/modules/es7.promise.finally.js | 20 + .../core-js/modules/es7.promise.try.js | 12 + .../modules/es7.reflect.define-metadata.js | 8 + .../modules/es7.reflect.delete-metadata.js | 15 + .../modules/es7.reflect.get-metadata-keys.js | 19 + .../modules/es7.reflect.get-metadata.js | 17 + .../es7.reflect.get-own-metadata-keys.js | 8 + .../modules/es7.reflect.get-own-metadata.js | 9 + .../modules/es7.reflect.has-metadata.js | 16 + .../modules/es7.reflect.has-own-metadata.js | 9 + .../core-js/modules/es7.reflect.metadata.js | 15 + node_modules/core-js/modules/es7.set.from.js | 2 + node_modules/core-js/modules/es7.set.of.js | 2 + .../core-js/modules/es7.set.to-json.js | 4 + node_modules/core-js/modules/es7.string.at.js | 10 + .../core-js/modules/es7.string.match-all.js | 30 + .../core-js/modules/es7.string.pad-end.js | 14 + .../core-js/modules/es7.string.pad-start.js | 14 + .../core-js/modules/es7.string.trim-left.js | 7 + .../core-js/modules/es7.string.trim-right.js | 7 + .../modules/es7.symbol.async-iterator.js | 1 + .../core-js/modules/es7.symbol.observable.js | 1 + .../core-js/modules/es7.system.global.js | 4 + .../core-js/modules/es7.weak-map.from.js | 2 + .../core-js/modules/es7.weak-map.of.js | 2 + .../core-js/modules/es7.weak-set.from.js | 2 + .../core-js/modules/es7.weak-set.of.js | 2 + .../modules/library/_add-to-unscopables.js | 1 + .../core-js/modules/library/_collection.js | 59 + .../core-js/modules/library/_export.js | 62 + .../core-js/modules/library/_library.js | 1 + node_modules/core-js/modules/library/_path.js | 1 + .../core-js/modules/library/_redefine-all.js | 7 + .../core-js/modules/library/_redefine.js | 1 + .../modules/library/_regexp-exec-abstract.js | 1 + .../core-js/modules/library/_regexp-exec.js | 1 + .../core-js/modules/library/_set-species.js | 14 + .../modules/library/es6.date.to-json.js | 19 + .../modules/library/es6.date.to-primitive.js | 0 .../modules/library/es6.date.to-string.js | 0 .../modules/library/es6.function.name.js | 0 .../modules/library/es6.number.constructor.js | 0 .../modules/library/es6.object.to-string.js | 0 .../modules/library/es6.regexp.constructor.js | 1 + .../modules/library/es6.regexp.exec.js | 1 + .../modules/library/es6.regexp.flags.js | 0 .../modules/library/es6.regexp.match.js | 0 .../modules/library/es6.regexp.replace.js | 0 .../modules/library/es6.regexp.search.js | 0 .../modules/library/es6.regexp.split.js | 0 .../modules/library/es6.regexp.to-string.js | 0 .../modules/library/web.dom.iterable.js | 19 + .../core-js/modules/web.dom.iterable.js | 58 + node_modules/core-js/modules/web.immediate.js | 6 + node_modules/core-js/modules/web.timers.js | 20 + node_modules/core-js/package.json | 73 + node_modules/core-js/scripts/postinstall.js | 23 + node_modules/core-js/shim.js | 198 + node_modules/core-js/stage/0.js | 10 + node_modules/core-js/stage/1.js | 23 + node_modules/core-js/stage/2.js | 4 + node_modules/core-js/stage/3.js | 4 + node_modules/core-js/stage/4.js | 11 + node_modules/core-js/stage/index.js | 1 + node_modules/core-js/stage/pre.js | 10 + node_modules/core-js/web/dom-collections.js | 2 + node_modules/core-js/web/immediate.js | 2 + node_modules/core-js/web/index.js | 4 + node_modules/core-js/web/timers.js | 2 + node_modules/d/.editorconfig | 15 + node_modules/d/.github/FUNDING.yml | 1 + node_modules/d/CHANGELOG.md | 9 + node_modules/d/CHANGES | 17 + node_modules/d/LICENSE | 15 + node_modules/d/README.md | 134 + node_modules/d/auto-bind.js | 33 + node_modules/d/index.js | 62 + node_modules/d/lazy.js | 115 + node_modules/d/package.json | 72 + node_modules/d/test/auto-bind.js | 11 + node_modules/d/test/index.js | 209 + node_modules/d/test/lazy.js | 97 + node_modules/decamelize/index.js | 13 + node_modules/decamelize/license | 21 + node_modules/decamelize/package.json | 38 + node_modules/decamelize/readme.md | 48 + node_modules/dottie/LICENSE | 23 + node_modules/dottie/README.md | 109 + node_modules/dottie/dottie.js | 224 + node_modules/dottie/package.json | 22 + node_modules/editorconfig/CHANGELOG.md | 14 + node_modules/editorconfig/LICENSE | 19 + node_modules/editorconfig/README.md | 206 + node_modules/editorconfig/bin/editorconfig | 3 + .../editorconfig/node_modules/.bin/semver | 1 + node_modules/editorconfig/package.json | 59 + node_modules/editorconfig/src/cli.d.ts | 1 + node_modules/editorconfig/src/cli.js | 53 + node_modules/editorconfig/src/index.d.ts | 29 + node_modules/editorconfig/src/index.js | 261 + .../editorconfig/src/lib/fnmatch.d.ts | 214 + node_modules/editorconfig/src/lib/fnmatch.js | 1047 ++ node_modules/editorconfig/src/lib/ini.d.ts | 14 + node_modules/editorconfig/src/lib/ini.js | 106 + node_modules/es5-ext/.editorconfig | 15 + node_modules/es5-ext/CHANGELOG.md | 306 + node_modules/es5-ext/CHANGES | 650 + node_modules/es5-ext/LICENSE | 15 + node_modules/es5-ext/README.md | 1029 ++ .../es5-ext/array/#/@@iterator/implement.js | 10 + .../es5-ext/array/#/@@iterator/index.js | 4 + .../array/#/@@iterator/is-implemented.js | 16 + .../es5-ext/array/#/@@iterator/shim.js | 3 + .../es5-ext/array/#/_compare-by-length.js | 9 + node_modules/es5-ext/array/#/binary-search.js | 28 + node_modules/es5-ext/array/#/clear.js | 12 + node_modules/es5-ext/array/#/compact.js | 13 + .../es5-ext/array/#/concat/implement.js | 8 + node_modules/es5-ext/array/#/concat/index.js | 4 + .../es5-ext/array/#/concat/is-implemented.js | 7 + node_modules/es5-ext/array/#/concat/shim.js | 48 + node_modules/es5-ext/array/#/contains.js | 7 + .../es5-ext/array/#/copy-within/implement.js | 10 + .../es5-ext/array/#/copy-within/index.js | 4 + .../array/#/copy-within/is-implemented.js | 7 + .../es5-ext/array/#/copy-within/shim.js | 45 + node_modules/es5-ext/array/#/diff.js | 13 + node_modules/es5-ext/array/#/e-index-of.js | 28 + .../es5-ext/array/#/e-last-index-of.js | 31 + .../es5-ext/array/#/entries/implement.js | 8 + node_modules/es5-ext/array/#/entries/index.js | 4 + .../es5-ext/array/#/entries/is-implemented.js | 15 + node_modules/es5-ext/array/#/entries/shim.js | 6 + node_modules/es5-ext/array/#/exclusion.js | 31 + .../es5-ext/array/#/fill/implement.js | 8 + node_modules/es5-ext/array/#/fill/index.js | 4 + .../es5-ext/array/#/fill/is-implemented.js | 7 + node_modules/es5-ext/array/#/fill/shim.js | 25 + .../es5-ext/array/#/filter/implement.js | 8 + node_modules/es5-ext/array/#/filter/index.js | 4 + .../es5-ext/array/#/filter/is-implemented.js | 11 + node_modules/es5-ext/array/#/filter/shim.js | 23 + .../es5-ext/array/#/find-index/implement.js | 9 + .../es5-ext/array/#/find-index/index.js | 4 + .../array/#/find-index/is-implemented.js | 11 + .../es5-ext/array/#/find-index/shim.js | 26 + .../es5-ext/array/#/find/implement.js | 8 + node_modules/es5-ext/array/#/find/index.js | 4 + .../es5-ext/array/#/find/is-implemented.js | 11 + node_modules/es5-ext/array/#/find/shim.js | 9 + node_modules/es5-ext/array/#/first-index.js | 15 + node_modules/es5-ext/array/#/first.js | 9 + node_modules/es5-ext/array/#/flatten.js | 40 + .../es5-ext/array/#/for-each-right.js | 19 + node_modules/es5-ext/array/#/group.js | 28 + node_modules/es5-ext/array/#/index.js | 41 + node_modules/es5-ext/array/#/indexes-of.js | 12 + node_modules/es5-ext/array/#/intersection.js | 21 + node_modules/es5-ext/array/#/is-copy.js | 21 + node_modules/es5-ext/array/#/is-empty.js | 8 + node_modules/es5-ext/array/#/is-uniq.js | 14 + .../es5-ext/array/#/keys/implement.js | 8 + node_modules/es5-ext/array/#/keys/index.js | 4 + .../es5-ext/array/#/keys/is-implemented.js | 14 + node_modules/es5-ext/array/#/keys/shim.js | 6 + node_modules/es5-ext/array/#/last-index.js | 15 + node_modules/es5-ext/array/#/last.js | 9 + node_modules/es5-ext/array/#/map/implement.js | 8 + node_modules/es5-ext/array/#/map/index.js | 4 + .../es5-ext/array/#/map/is-implemented.js | 8 + node_modules/es5-ext/array/#/map/shim.js | 21 + node_modules/es5-ext/array/#/remove.js | 17 + node_modules/es5-ext/array/#/separate.js | 12 + .../es5-ext/array/#/slice/implement.js | 8 + node_modules/es5-ext/array/#/slice/index.js | 4 + .../es5-ext/array/#/slice/is-implemented.js | 7 + node_modules/es5-ext/array/#/slice/shim.js | 36 + node_modules/es5-ext/array/#/some-right.js | 21 + .../es5-ext/array/#/splice/implement.js | 8 + node_modules/es5-ext/array/#/splice/index.js | 4 + .../es5-ext/array/#/splice/is-implemented.js | 7 + node_modules/es5-ext/array/#/splice/shim.js | 17 + node_modules/es5-ext/array/#/uniq.js | 15 + .../es5-ext/array/#/values/implement.js | 8 + node_modules/es5-ext/array/#/values/index.js | 3 + .../es5-ext/array/#/values/is-implemented.js | 14 + node_modules/es5-ext/array/#/values/shim.js | 6 + node_modules/es5-ext/array/_is-extensible.js | 13 + .../es5-ext/array/_sub-array-dummy-safe.js | 25 + .../es5-ext/array/_sub-array-dummy.js | 20 + node_modules/es5-ext/array/from/implement.js | 8 + node_modules/es5-ext/array/from/index.js | 5 + .../es5-ext/array/from/is-implemented.js | 9 + node_modules/es5-ext/array/from/shim.js | 119 + node_modules/es5-ext/array/generate.js | 18 + node_modules/es5-ext/array/index.js | 11 + node_modules/es5-ext/array/is-plain-array.js | 11 + node_modules/es5-ext/array/of/implement.js | 8 + node_modules/es5-ext/array/of/index.js | 5 + .../es5-ext/array/of/is-implemented.js | 8 + node_modules/es5-ext/array/of/shim.js | 19 + node_modules/es5-ext/array/to-array.js | 9 + node_modules/es5-ext/array/valid-array.js | 8 + node_modules/es5-ext/boolean/index.js | 5 + node_modules/es5-ext/boolean/is-boolean.js | 10 + node_modules/es5-ext/date/#/copy.js | 7 + node_modules/es5-ext/date/#/days-in-month.js | 17 + node_modules/es5-ext/date/#/floor-day.js | 8 + node_modules/es5-ext/date/#/floor-month.js | 8 + node_modules/es5-ext/date/#/floor-year.js | 8 + node_modules/es5-ext/date/#/format.js | 38 + node_modules/es5-ext/date/#/index.js | 10 + .../es5-ext/date/ensure-time-value.js | 10 + node_modules/es5-ext/date/index.js | 9 + node_modules/es5-ext/date/is-date.js | 10 + node_modules/es5-ext/date/is-time-value.js | 9 + node_modules/es5-ext/date/valid-date.js | 8 + node_modules/es5-ext/error/#/index.js | 5 + node_modules/es5-ext/error/#/throw.js | 7 + node_modules/es5-ext/error/custom.js | 20 + node_modules/es5-ext/error/index.js | 8 + node_modules/es5-ext/error/is-error.js | 7 + node_modules/es5-ext/error/valid-error.js | 8 + node_modules/es5-ext/function/#/compose.js | 20 + node_modules/es5-ext/function/#/copy.js | 23 + node_modules/es5-ext/function/#/curry.js | 24 + node_modules/es5-ext/function/#/index.js | 13 + node_modules/es5-ext/function/#/lock.js | 14 + .../es5-ext/function/#/microtask-delay.js | 14 + node_modules/es5-ext/function/#/not.js | 14 + node_modules/es5-ext/function/#/partial.js | 16 + node_modules/es5-ext/function/#/spread.js | 12 + .../es5-ext/function/#/to-string-tokens.js | 17 + .../es5-ext/function/_define-length.js | 56 + node_modules/es5-ext/function/constant.js | 7 + node_modules/es5-ext/function/identity.js | 5 + node_modules/es5-ext/function/index.js | 15 + node_modules/es5-ext/function/invoke.js | 15 + node_modules/es5-ext/function/is-arguments.js | 12 + node_modules/es5-ext/function/is-function.js | 7 + node_modules/es5-ext/function/noop.js | 4 + node_modules/es5-ext/function/pluck.js | 9 + .../es5-ext/function/valid-function.js | 8 + node_modules/es5-ext/global.js | 15 + node_modules/es5-ext/index.js | 22 + node_modules/es5-ext/iterable/for-each.js | 12 + node_modules/es5-ext/iterable/index.js | 8 + node_modules/es5-ext/iterable/is.js | 11 + .../es5-ext/iterable/validate-object.js | 9 + node_modules/es5-ext/iterable/validate.js | 8 + node_modules/es5-ext/json/index.js | 5 + node_modules/es5-ext/json/safe-stringify.js | 41 + node_modules/es5-ext/math/_decimal-adjust.js | 29 + node_modules/es5-ext/math/_pack-ieee754.js | 88 + node_modules/es5-ext/math/_unpack-ieee754.js | 33 + node_modules/es5-ext/math/acosh/implement.js | 8 + node_modules/es5-ext/math/acosh/index.js | 5 + .../es5-ext/math/acosh/is-implemented.js | 7 + node_modules/es5-ext/math/acosh/shim.js | 12 + node_modules/es5-ext/math/asinh/implement.js | 8 + node_modules/es5-ext/math/asinh/index.js | 5 + .../es5-ext/math/asinh/is-implemented.js | 7 + node_modules/es5-ext/math/asinh/shim.js | 15 + node_modules/es5-ext/math/atanh/implement.js | 8 + node_modules/es5-ext/math/atanh/index.js | 5 + .../es5-ext/math/atanh/is-implemented.js | 7 + node_modules/es5-ext/math/atanh/shim.js | 14 + node_modules/es5-ext/math/cbrt/implement.js | 8 + node_modules/es5-ext/math/cbrt/index.js | 5 + .../es5-ext/math/cbrt/is-implemented.js | 7 + node_modules/es5-ext/math/cbrt/shim.js | 12 + node_modules/es5-ext/math/ceil-10.js | 3 + node_modules/es5-ext/math/clz32/implement.js | 8 + node_modules/es5-ext/math/clz32/index.js | 5 + .../es5-ext/math/clz32/is-implemented.js | 7 + node_modules/es5-ext/math/clz32/shim.js | 7 + node_modules/es5-ext/math/cosh/implement.js | 8 + node_modules/es5-ext/math/cosh/index.js | 5 + .../es5-ext/math/cosh/is-implemented.js | 7 + node_modules/es5-ext/math/cosh/shim.js | 11 + node_modules/es5-ext/math/expm1/implement.js | 8 + node_modules/es5-ext/math/expm1/index.js | 5 + .../es5-ext/math/expm1/is-implemented.js | 7 + node_modules/es5-ext/math/expm1/shim.js | 16 + node_modules/es5-ext/math/floor-10.js | 3 + node_modules/es5-ext/math/fround/implement.js | 8 + node_modules/es5-ext/math/fround/index.js | 5 + .../es5-ext/math/fround/is-implemented.js | 7 + node_modules/es5-ext/math/fround/shim.js | 35 + node_modules/es5-ext/math/hypot/implement.js | 8 + node_modules/es5-ext/math/hypot/index.js | 5 + .../es5-ext/math/hypot/is-implemented.js | 7 + node_modules/es5-ext/math/hypot/shim.js | 43 + node_modules/es5-ext/math/imul/implement.js | 8 + node_modules/es5-ext/math/imul/index.js | 5 + .../es5-ext/math/imul/is-implemented.js | 7 + node_modules/es5-ext/math/imul/shim.js | 17 + node_modules/es5-ext/math/index.js | 24 + node_modules/es5-ext/math/log10/implement.js | 8 + node_modules/es5-ext/math/log10/index.js | 5 + .../es5-ext/math/log10/is-implemented.js | 7 + node_modules/es5-ext/math/log10/shim.js | 14 + node_modules/es5-ext/math/log1p/implement.js | 8 + node_modules/es5-ext/math/log1p/index.js | 5 + .../es5-ext/math/log1p/is-implemented.js | 7 + node_modules/es5-ext/math/log1p/shim.js | 17 + node_modules/es5-ext/math/log2/implement.js | 8 + node_modules/es5-ext/math/log2/index.js | 5 + .../es5-ext/math/log2/is-implemented.js | 7 + node_modules/es5-ext/math/log2/shim.js | 14 + node_modules/es5-ext/math/round-10.js | 3 + node_modules/es5-ext/math/sign/implement.js | 8 + node_modules/es5-ext/math/sign/index.js | 5 + .../es5-ext/math/sign/is-implemented.js | 7 + node_modules/es5-ext/math/sign/shim.js | 7 + node_modules/es5-ext/math/sinh/implement.js | 8 + node_modules/es5-ext/math/sinh/index.js | 5 + .../es5-ext/math/sinh/is-implemented.js | 7 + node_modules/es5-ext/math/sinh/shim.js | 18 + node_modules/es5-ext/math/tanh/implement.js | 8 + node_modules/es5-ext/math/tanh/index.js | 5 + .../es5-ext/math/tanh/is-implemented.js | 7 + node_modules/es5-ext/math/tanh/shim.js | 17 + node_modules/es5-ext/math/trunc/implement.js | 8 + node_modules/es5-ext/math/trunc/index.js | 5 + .../es5-ext/math/trunc/is-implemented.js | 7 + node_modules/es5-ext/math/trunc/shim.js | 13 + node_modules/es5-ext/number/#/index.js | 5 + node_modules/es5-ext/number/#/pad.js | 15 + .../es5-ext/number/epsilon/implement.js | 8 + node_modules/es5-ext/number/epsilon/index.js | 3 + .../es5-ext/number/epsilon/is-implemented.js | 5 + node_modules/es5-ext/number/index.js | 17 + .../es5-ext/number/is-finite/implement.js | 8 + .../es5-ext/number/is-finite/index.js | 5 + .../number/is-finite/is-implemented.js | 7 + node_modules/es5-ext/number/is-finite/shim.js | 5 + .../es5-ext/number/is-integer/implement.js | 8 + .../es5-ext/number/is-integer/index.js | 5 + .../number/is-integer/is-implemented.js | 7 + .../es5-ext/number/is-integer/shim.js | 8 + .../es5-ext/number/is-nan/implement.js | 8 + node_modules/es5-ext/number/is-nan/index.js | 5 + .../es5-ext/number/is-nan/is-implemented.js | 7 + node_modules/es5-ext/number/is-nan/shim.js | 6 + node_modules/es5-ext/number/is-natural.js | 7 + node_modules/es5-ext/number/is-number.js | 10 + .../number/is-safe-integer/implement.js | 8 + .../es5-ext/number/is-safe-integer/index.js | 5 + .../number/is-safe-integer/is-implemented.js | 8 + .../es5-ext/number/is-safe-integer/shim.js | 11 + .../number/max-safe-integer/implement.js | 8 + .../es5-ext/number/max-safe-integer/index.js | 3 + .../number/max-safe-integer/is-implemented.js | 5 + .../number/min-safe-integer/implement.js | 8 + .../es5-ext/number/min-safe-integer/index.js | 3 + .../number/min-safe-integer/is-implemented.js | 5 + node_modules/es5-ext/number/to-integer.js | 12 + node_modules/es5-ext/number/to-pos-integer.js | 9 + node_modules/es5-ext/number/to-uint32.js | 6 + node_modules/es5-ext/object/_iterate.js | 30 + node_modules/es5-ext/object/assign-deep.js | 34 + .../es5-ext/object/assign/implement.js | 8 + node_modules/es5-ext/object/assign/index.js | 5 + .../es5-ext/object/assign/is-implemented.js | 9 + node_modules/es5-ext/object/assign/shim.js | 23 + node_modules/es5-ext/object/clear.js | 16 + node_modules/es5-ext/object/compact.js | 10 + node_modules/es5-ext/object/compare.js | 45 + node_modules/es5-ext/object/copy-deep.js | 37 + node_modules/es5-ext/object/copy.js | 19 + node_modules/es5-ext/object/count.js | 7 + node_modules/es5-ext/object/create.js | 48 + node_modules/es5-ext/object/ensure-array.js | 9 + .../es5-ext/object/ensure-finite-number.js | 9 + node_modules/es5-ext/object/ensure-integer.js | 9 + .../object/ensure-natural-number-value.js | 10 + .../es5-ext/object/ensure-natural-number.js | 10 + .../es5-ext/object/ensure-plain-function.js | 11 + .../es5-ext/object/ensure-plain-object.js | 9 + node_modules/es5-ext/object/ensure-promise.js | 9 + .../es5-ext/object/ensure-thenable.js | 9 + .../es5-ext/object/entries/implement.js | 10 + node_modules/es5-ext/object/entries/index.js | 3 + .../es5-ext/object/entries/is-implemented.js | 9 + node_modules/es5-ext/object/entries/shim.js | 14 + node_modules/es5-ext/object/eq.js | 7 + node_modules/es5-ext/object/every.js | 3 + node_modules/es5-ext/object/filter.js | 14 + node_modules/es5-ext/object/find-key.js | 3 + node_modules/es5-ext/object/find.js | 10 + node_modules/es5-ext/object/first-key.js | 13 + node_modules/es5-ext/object/flatten.js | 17 + node_modules/es5-ext/object/for-each.js | 3 + .../es5-ext/object/get-property-names.js | 17 + node_modules/es5-ext/object/index.js | 70 + node_modules/es5-ext/object/is-array-like.js | 17 + node_modules/es5-ext/object/is-callable.js | 7 + node_modules/es5-ext/object/is-copy-deep.js | 59 + node_modules/es5-ext/object/is-copy.js | 23 + node_modules/es5-ext/object/is-empty.js | 14 + .../es5-ext/object/is-finite-number.js | 7 + node_modules/es5-ext/object/is-integer.js | 10 + .../es5-ext/object/is-natural-number-value.js | 9 + .../es5-ext/object/is-natural-number.js | 7 + .../es5-ext/object/is-number-value.js | 12 + node_modules/es5-ext/object/is-object.js | 9 + .../es5-ext/object/is-plain-function.js | 11 + .../es5-ext/object/is-plain-object.js | 20 + node_modules/es5-ext/object/is-promise.js | 4 + node_modules/es5-ext/object/is-thenable.js | 8 + node_modules/es5-ext/object/is-value.js | 7 + node_modules/es5-ext/object/is.js | 10 + node_modules/es5-ext/object/key-of.js | 17 + node_modules/es5-ext/object/keys/implement.js | 10 + node_modules/es5-ext/object/keys/index.js | 3 + .../es5-ext/object/keys/is-implemented.js | 10 + node_modules/es5-ext/object/keys/shim.js | 7 + node_modules/es5-ext/object/map-keys.js | 18 + node_modules/es5-ext/object/map.js | 14 + .../es5-ext/object/mixin-prototypes.js | 25 + node_modules/es5-ext/object/mixin.js | 31 + .../es5-ext/object/normalize-options.js | 20 + node_modules/es5-ext/object/primitive-set.js | 12 + node_modules/es5-ext/object/safe-traverse.js | 16 + node_modules/es5-ext/object/serialize.js | 41 + .../object/set-prototype-of/implement.js | 8 + .../es5-ext/object/set-prototype-of/index.js | 5 + .../object/set-prototype-of/is-implemented.js | 9 + .../es5-ext/object/set-prototype-of/shim.js | 86 + node_modules/es5-ext/object/some.js | 3 + node_modules/es5-ext/object/to-array.js | 24 + node_modules/es5-ext/object/unserialize.js | 8 + node_modules/es5-ext/object/valid-callable.js | 6 + node_modules/es5-ext/object/valid-object.js | 8 + node_modules/es5-ext/object/valid-value.js | 8 + .../object/validate-array-like-object.js | 9 + .../es5-ext/object/validate-array-like.js | 8 + .../object/validate-stringifiable-value.js | 8 + .../es5-ext/object/validate-stringifiable.js | 12 + node_modules/es5-ext/optional-chaining.js | 12 + node_modules/es5-ext/package.json | 94 + node_modules/es5-ext/promise/#/as-callback.js | 19 + .../es5-ext/promise/#/finally/implement.js | 10 + .../es5-ext/promise/#/finally/index.js | 3 + .../promise/#/finally/is-implemented.js | 7 + .../es5-ext/promise/#/finally/shim.js | 24 + node_modules/es5-ext/promise/#/index.js | 3 + node_modules/es5-ext/promise/.eslintrc.json | 3 + node_modules/es5-ext/promise/index.js | 6 + node_modules/es5-ext/promise/lazy.js | 38 + node_modules/es5-ext/reg-exp/#/index.js | 10 + node_modules/es5-ext/reg-exp/#/is-sticky.js | 9 + node_modules/es5-ext/reg-exp/#/is-unicode.js | 9 + .../es5-ext/reg-exp/#/match/implement.js | 8 + node_modules/es5-ext/reg-exp/#/match/index.js | 5 + .../es5-ext/reg-exp/#/match/is-implemented.js | 8 + node_modules/es5-ext/reg-exp/#/match/shim.js | 8 + .../es5-ext/reg-exp/#/replace/implement.js | 8 + .../es5-ext/reg-exp/#/replace/index.js | 5 + .../reg-exp/#/replace/is-implemented.js | 8 + .../es5-ext/reg-exp/#/replace/shim.js | 8 + .../es5-ext/reg-exp/#/search/implement.js | 8 + .../es5-ext/reg-exp/#/search/index.js | 5 + .../reg-exp/#/search/is-implemented.js | 8 + node_modules/es5-ext/reg-exp/#/search/shim.js | 8 + .../es5-ext/reg-exp/#/split/implement.js | 8 + node_modules/es5-ext/reg-exp/#/split/index.js | 5 + .../es5-ext/reg-exp/#/split/is-implemented.js | 8 + node_modules/es5-ext/reg-exp/#/split/shim.js | 8 + .../es5-ext/reg-exp/#/sticky/implement.js | 9 + .../reg-exp/#/sticky/is-implemented.js | 10 + .../es5-ext/reg-exp/#/unicode/implement.js | 9 + .../reg-exp/#/unicode/is-implemented.js | 10 + node_modules/es5-ext/reg-exp/escape.js | 11 + node_modules/es5-ext/reg-exp/index.js | 8 + node_modules/es5-ext/reg-exp/is-reg-exp.js | 7 + node_modules/es5-ext/reg-exp/valid-reg-exp.js | 8 + node_modules/es5-ext/safe-to-string.js | 12 + .../es5-ext/string/#/@@iterator/implement.js | 6 + .../es5-ext/string/#/@@iterator/index.js | 4 + .../string/#/@@iterator/is-implemented.js | 16 + .../es5-ext/string/#/@@iterator/shim.js | 8 + node_modules/es5-ext/string/#/at.js | 35 + .../es5-ext/string/#/camel-to-hyphen.js | 10 + node_modules/es5-ext/string/#/capitalize.js | 8 + .../string/#/case-insensitive-compare.js | 7 + .../string/#/code-point-at/implement.js | 9 + .../es5-ext/string/#/code-point-at/index.js | 5 + .../string/#/code-point-at/is-implemented.js | 8 + .../es5-ext/string/#/code-point-at/shim.js | 26 + .../es5-ext/string/#/contains/implement.js | 9 + .../es5-ext/string/#/contains/index.js | 5 + .../string/#/contains/is-implemented.js | 8 + .../es5-ext/string/#/contains/shim.js | 7 + node_modules/es5-ext/string/#/count.js | 15 + .../es5-ext/string/#/ends-with/implement.js | 9 + .../es5-ext/string/#/ends-with/index.js | 5 + .../string/#/ends-with/is-implemented.js | 8 + .../es5-ext/string/#/ends-with/shim.js | 18 + .../es5-ext/string/#/hyphen-to-camel.js | 10 + node_modules/es5-ext/string/#/indent.js | 12 + node_modules/es5-ext/string/#/index.js | 23 + node_modules/es5-ext/string/#/last.js | 8 + .../es5-ext/string/#/normalize/_data.js | 7203 ++++++++ .../es5-ext/string/#/normalize/implement.js | 9 + .../es5-ext/string/#/normalize/index.js | 5 + .../string/#/normalize/is-implemented.js | 8 + .../es5-ext/string/#/normalize/shim.js | 317 + node_modules/es5-ext/string/#/pad.js | 18 + .../es5-ext/string/#/plain-replace-all.js | 16 + .../es5-ext/string/#/plain-replace.js | 10 + .../es5-ext/string/#/repeat/implement.js | 9 + node_modules/es5-ext/string/#/repeat/index.js | 5 + .../es5-ext/string/#/repeat/is-implemented.js | 8 + node_modules/es5-ext/string/#/repeat/shim.js | 24 + .../es5-ext/string/#/starts-with/implement.js | 9 + .../es5-ext/string/#/starts-with/index.js | 5 + .../string/#/starts-with/is-implemented.js | 9 + .../es5-ext/string/#/starts-with/shim.js | 12 + node_modules/es5-ext/string/#/uncapitalize.js | 8 + node_modules/es5-ext/string/format-method.js | 27 + .../string/from-code-point/implement.js | 8 + .../es5-ext/string/from-code-point/index.js | 5 + .../string/from-code-point/is-implemented.js | 7 + .../es5-ext/string/from-code-point/shim.js | 37 + node_modules/es5-ext/string/index.js | 11 + node_modules/es5-ext/string/is-string.js | 13 + node_modules/es5-ext/string/random-uniq.js | 13 + node_modules/es5-ext/string/random.js | 42 + node_modules/es5-ext/string/raw/implement.js | 8 + node_modules/es5-ext/string/raw/index.js | 5 + .../es5-ext/string/raw/is-implemented.js | 9 + node_modules/es5-ext/string/raw/shim.js | 14 + node_modules/es5-ext/test/.eslintrc.json | 14 + node_modules/es5-ext/test/__tad.js | 3 + .../test/array/#/@@iterator/implement.js | 7 + .../es5-ext/test/array/#/@@iterator/index.js | 3 + .../test/array/#/@@iterator/is-implemented.js | 5 + .../es5-ext/test/array/#/@@iterator/shim.js | 9 + .../test/array/#/_compare-by-length.js | 7 + .../es5-ext/test/array/#/binary-search.js | 17 + node_modules/es5-ext/test/array/#/clear.js | 7 + node_modules/es5-ext/test/array/#/compact.js | 17 + .../es5-ext/test/array/#/concat/implement.js | 7 + .../es5-ext/test/array/#/concat/index.js | 3 + .../test/array/#/concat/is-implemented.js | 5 + .../es5-ext/test/array/#/concat/shim.js | 26 + node_modules/es5-ext/test/array/#/contains.js | 21 + .../test/array/#/copy-within/implement.js | 7 + .../es5-ext/test/array/#/copy-within/index.js | 3 + .../array/#/copy-within/is-implemented.js | 5 + .../es5-ext/test/array/#/copy-within/shim.js | 29 + node_modules/es5-ext/test/array/#/diff.js | 17 + .../es5-ext/test/array/#/e-index-of.js | 13 + .../es5-ext/test/array/#/e-last-index-of.js | 12 + .../es5-ext/test/array/#/entries/implement.js | 7 + .../es5-ext/test/array/#/entries/index.js | 3 + .../test/array/#/entries/is-implemented.js | 5 + .../es5-ext/test/array/#/entries/shim.js | 9 + .../es5-ext/test/array/#/exclusion.js | 15 + .../es5-ext/test/array/#/fill/implement.js | 7 + .../es5-ext/test/array/#/fill/index.js | 3 + .../test/array/#/fill/is-implemented.js | 5 + .../es5-ext/test/array/#/fill/shim.js | 18 + .../es5-ext/test/array/#/filter/implement.js | 7 + .../es5-ext/test/array/#/filter/index.js | 3 + .../test/array/#/filter/is-implemented.js | 5 + .../es5-ext/test/array/#/filter/shim.js | 17 + .../test/array/#/find-index/implement.js | 7 + .../es5-ext/test/array/#/find-index/index.js | 3 + .../test/array/#/find-index/is-implemented.js | 5 + .../es5-ext/test/array/#/find-index/shim.js | 17 + .../es5-ext/test/array/#/find/implement.js | 7 + .../es5-ext/test/array/#/find/index.js | 3 + .../test/array/#/find/is-implemented.js | 5 + .../es5-ext/test/array/#/find/shim.js | 17 + .../es5-ext/test/array/#/first-index.js | 17 + node_modules/es5-ext/test/array/#/first.js | 13 + node_modules/es5-ext/test/array/#/flatten.js | 14 + .../es5-ext/test/array/#/for-each-right.js | 47 + node_modules/es5-ext/test/array/#/group.js | 24 + .../es5-ext/test/array/#/indexes-of.js | 14 + .../es5-ext/test/array/#/intersection.js | 24 + node_modules/es5-ext/test/array/#/is-copy.js | 13 + node_modules/es5-ext/test/array/#/is-empty.js | 8 + node_modules/es5-ext/test/array/#/is-uniq.js | 11 + .../es5-ext/test/array/#/keys/implement.js | 7 + .../es5-ext/test/array/#/keys/index.js | 3 + .../test/array/#/keys/is-implemented.js | 5 + .../es5-ext/test/array/#/keys/shim.js | 9 + .../es5-ext/test/array/#/last-index.js | 17 + node_modules/es5-ext/test/array/#/last.js | 15 + .../es5-ext/test/array/#/map/implement.js | 7 + .../es5-ext/test/array/#/map/index.js | 3 + .../test/array/#/map/is-implemented.js | 5 + node_modules/es5-ext/test/array/#/map/shim.js | 19 + node_modules/es5-ext/test/array/#/remove.js | 14 + node_modules/es5-ext/test/array/#/separate.js | 15 + .../es5-ext/test/array/#/slice/implement.js | 7 + .../es5-ext/test/array/#/slice/index.js | 3 + .../test/array/#/slice/is-implemented.js | 5 + .../es5-ext/test/array/#/slice/shim.js | 17 + .../es5-ext/test/array/#/some-right.js | 62 + .../es5-ext/test/array/#/splice/implement.js | 7 + .../es5-ext/test/array/#/splice/index.js | 3 + .../test/array/#/splice/is-implemented.js | 5 + .../es5-ext/test/array/#/splice/shim.js | 19 + node_modules/es5-ext/test/array/#/uniq.js | 14 + .../es5-ext/test/array/#/values/implement.js | 7 + .../es5-ext/test/array/#/values/index.js | 3 + .../test/array/#/values/is-implemented.js | 5 + .../es5-ext/test/array/#/values/shim.js | 9 + node_modules/es5-ext/test/array/__scopes.js | 11 + .../es5-ext/test/array/_is-extensible.js | 5 + .../test/array/_sub-array-dummy-safe.js | 7 + .../es5-ext/test/array/_sub-array-dummy.js | 7 + .../es5-ext/test/array/from/implement.js | 7 + node_modules/es5-ext/test/array/from/index.js | 3 + .../es5-ext/test/array/from/is-implemented.js | 5 + node_modules/es5-ext/test/array/from/shim.js | 138 + node_modules/es5-ext/test/array/generate.js | 10 + .../es5-ext/test/array/is-plain-array.js | 18 + .../es5-ext/test/array/of/implement.js | 7 + node_modules/es5-ext/test/array/of/index.js | 3 + .../es5-ext/test/array/of/is-implemented.js | 5 + node_modules/es5-ext/test/array/of/shim.js | 89 + node_modules/es5-ext/test/array/to-array.js | 27 + .../es5-ext/test/array/valid-array.js | 30 + .../es5-ext/test/boolean/is-boolean.js | 12 + node_modules/es5-ext/test/date/#/copy.js | 10 + .../es5-ext/test/date/#/days-in-month.js | 17 + node_modules/es5-ext/test/date/#/floor-day.js | 6 + .../es5-ext/test/date/#/floor-month.js | 6 + .../es5-ext/test/date/#/floor-year.js | 6 + node_modules/es5-ext/test/date/#/format.js | 6 + .../es5-ext/test/date/ensure-time-value.js | 14 + node_modules/es5-ext/test/date/is-date.js | 10 + .../es5-ext/test/date/is-time-value.js | 15 + node_modules/es5-ext/test/date/valid-date.js | 14 + node_modules/es5-ext/test/error/#/throw.js | 10 + node_modules/es5-ext/test/error/custom.js | 12 + node_modules/es5-ext/test/error/is-error.js | 18 + .../es5-ext/test/error/valid-error.js | 9 + .../es5-ext/test/function/#/compose.js | 10 + node_modules/es5-ext/test/function/#/copy.js | 22 + node_modules/es5-ext/test/function/#/curry.js | 20 + node_modules/es5-ext/test/function/#/lock.js | 7 + .../test/function/#/microtask-delay.js | 22 + node_modules/es5-ext/test/function/#/not.js | 11 + .../es5-ext/test/function/#/partial.js | 11 + .../es5-ext/test/function/#/spread.js | 10 + .../test/function/#/to-string-tokens.js | 33 + .../es5-ext/test/function/_define-length.js | 14 + .../es5-ext/test/function/constant.js | 7 + .../es5-ext/test/function/identity.js | 7 + node_modules/es5-ext/test/function/invoke.js | 9 + .../es5-ext/test/function/is-arguments.js | 13 + .../es5-ext/test/function/is-function.js | 8 + node_modules/es5-ext/test/function/noop.js | 5 + node_modules/es5-ext/test/function/pluck.js | 7 + .../es5-ext/test/function/valid-function.js | 22 + node_modules/es5-ext/test/global.js | 7 + .../es5-ext/test/iterable/for-each.js | 42 + node_modules/es5-ext/test/iterable/is.js | 28 + .../es5-ext/test/iterable/validate-object.js | 34 + .../es5-ext/test/iterable/validate.js | 32 + .../es5-ext/test/json/safe-stringify.js | 26 + .../es5-ext/test/math/_decimal-adjust.js | 6 + .../es5-ext/test/math/_pack-ieee754.js | 5 + .../es5-ext/test/math/_unpack-ieee754.js | 5 + .../es5-ext/test/math/acosh/implement.js | 7 + node_modules/es5-ext/test/math/acosh/index.js | 3 + .../es5-ext/test/math/acosh/is-implemented.js | 5 + node_modules/es5-ext/test/math/acosh/shim.js | 11 + .../es5-ext/test/math/asinh/implement.js | 7 + node_modules/es5-ext/test/math/asinh/index.js | 3 + .../es5-ext/test/math/asinh/is-implemented.js | 5 + node_modules/es5-ext/test/math/asinh/shim.js | 10 + .../es5-ext/test/math/atanh/implement.js | 7 + node_modules/es5-ext/test/math/atanh/index.js | 3 + .../es5-ext/test/math/atanh/is-implemented.js | 5 + node_modules/es5-ext/test/math/atanh/shim.js | 11 + .../es5-ext/test/math/cbrt/implement.js | 7 + node_modules/es5-ext/test/math/cbrt/index.js | 3 + .../es5-ext/test/math/cbrt/is-implemented.js | 5 + node_modules/es5-ext/test/math/cbrt/shim.js | 11 + node_modules/es5-ext/test/math/ceil-10.js | 8 + .../es5-ext/test/math/clz32/implement.js | 7 + node_modules/es5-ext/test/math/clz32/index.js | 3 + .../es5-ext/test/math/clz32/is-implemented.js | 5 + node_modules/es5-ext/test/math/clz32/shim.js | 12 + .../es5-ext/test/math/cosh/implement.js | 7 + node_modules/es5-ext/test/math/cosh/index.js | 3 + .../es5-ext/test/math/cosh/is-implemented.js | 5 + node_modules/es5-ext/test/math/cosh/shim.js | 13 + .../es5-ext/test/math/expm1/implement.js | 7 + node_modules/es5-ext/test/math/expm1/index.js | 3 + .../es5-ext/test/math/expm1/is-implemented.js | 5 + node_modules/es5-ext/test/math/expm1/shim.js | 9 + node_modules/es5-ext/test/math/floor-10.js | 8 + .../es5-ext/test/math/fround/implement.js | 7 + .../es5-ext/test/math/fround/index.js | 3 + .../test/math/fround/is-implemented.js | 5 + node_modules/es5-ext/test/math/fround/shim.js | 9 + .../es5-ext/test/math/hypot/implement.js | 7 + node_modules/es5-ext/test/math/hypot/index.js | 3 + .../es5-ext/test/math/hypot/is-implemented.js | 5 + node_modules/es5-ext/test/math/hypot/shim.js | 11 + .../es5-ext/test/math/imul/implement.js | 7 + node_modules/es5-ext/test/math/imul/index.js | 3 + .../es5-ext/test/math/imul/is-implemented.js | 5 + node_modules/es5-ext/test/math/imul/shim.js | 9 + .../es5-ext/test/math/log10/implement.js | 7 + node_modules/es5-ext/test/math/log10/index.js | 3 + .../es5-ext/test/math/log10/is-implemented.js | 5 + node_modules/es5-ext/test/math/log10/shim.js | 10 + .../es5-ext/test/math/log1p/implement.js | 7 + node_modules/es5-ext/test/math/log1p/index.js | 3 + .../es5-ext/test/math/log1p/is-implemented.js | 5 + node_modules/es5-ext/test/math/log1p/shim.js | 10 + .../es5-ext/test/math/log2/implement.js | 7 + node_modules/es5-ext/test/math/log2/index.js | 3 + .../es5-ext/test/math/log2/is-implemented.js | 5 + node_modules/es5-ext/test/math/log2/shim.js | 10 + node_modules/es5-ext/test/math/round-10.js | 14 + .../es5-ext/test/math/sign/implement.js | 7 + node_modules/es5-ext/test/math/sign/index.js | 3 + .../es5-ext/test/math/sign/is-implemented.js | 5 + node_modules/es5-ext/test/math/sign/shim.js | 11 + .../es5-ext/test/math/sinh/implement.js | 7 + node_modules/es5-ext/test/math/sinh/index.js | 3 + .../es5-ext/test/math/sinh/is-implemented.js | 5 + node_modules/es5-ext/test/math/sinh/shim.js | 13 + .../es5-ext/test/math/tanh/implement.js | 7 + node_modules/es5-ext/test/math/tanh/index.js | 3 + .../es5-ext/test/math/tanh/is-implemented.js | 5 + node_modules/es5-ext/test/math/tanh/shim.js | 11 + .../es5-ext/test/math/trunc/implement.js | 7 + node_modules/es5-ext/test/math/trunc/index.js | 3 + .../es5-ext/test/math/trunc/is-implemented.js | 5 + node_modules/es5-ext/test/math/trunc/shim.js | 16 + node_modules/es5-ext/test/number/#/pad.js | 7 + .../es5-ext/test/number/epsilon/implement.js | 7 + .../es5-ext/test/number/epsilon/index.js | 5 + .../test/number/epsilon/is-implemented.js | 5 + .../test/number/is-finite/implement.js | 7 + .../es5-ext/test/number/is-finite/index.js | 3 + .../test/number/is-finite/is-implemented.js | 5 + .../es5-ext/test/number/is-finite/shim.js | 8 + .../test/number/is-integer/implement.js | 7 + .../es5-ext/test/number/is-integer/index.js | 3 + .../test/number/is-integer/is-implemented.js | 5 + .../es5-ext/test/number/is-integer/shim.js | 9 + .../es5-ext/test/number/is-nan/implement.js | 7 + .../es5-ext/test/number/is-nan/index.js | 3 + .../test/number/is-nan/is-implemented.js | 5 + .../es5-ext/test/number/is-nan/shim.js | 7 + .../es5-ext/test/number/is-natural.js | 10 + node_modules/es5-ext/test/number/is-number.js | 13 + .../test/number/is-safe-integer/implement.js | 7 + .../test/number/is-safe-integer/index.js | 3 + .../number/is-safe-integer/is-implemented.js | 5 + .../test/number/is-safe-integer/shim.js | 11 + .../test/number/max-safe-integer/implement.js | 7 + .../test/number/max-safe-integer/index.js | 5 + .../number/max-safe-integer/is-implemented.js | 5 + .../test/number/min-safe-integer/implement.js | 7 + .../test/number/min-safe-integer/index.js | 5 + .../number/min-safe-integer/is-implemented.js | 5 + .../es5-ext/test/number/to-integer.js | 10 + .../es5-ext/test/number/to-pos-integer.js | 10 + node_modules/es5-ext/test/number/to-uint32.js | 8 + node_modules/es5-ext/test/object/_iterate.js | 30 + .../es5-ext/test/object/assign-deep.js | 27 + .../es5-ext/test/object/assign/implement.js | 7 + .../es5-ext/test/object/assign/index.js | 3 + .../test/object/assign/is-implemented.js | 5 + .../es5-ext/test/object/assign/shim.js | 11 + node_modules/es5-ext/test/object/clear.js | 13 + node_modules/es5-ext/test/object/compact.js | 20 + node_modules/es5-ext/test/object/compare.js | 13 + node_modules/es5-ext/test/object/copy-deep.js | 35 + node_modules/es5-ext/test/object/copy.js | 30 + node_modules/es5-ext/test/object/count.js | 11 + node_modules/es5-ext/test/object/create.js | 22 + .../es5-ext/test/object/ensure-array.js | 55 + .../test/object/ensure-finite-number.js | 54 + .../es5-ext/test/object/ensure-integer.js | 42 + .../object/ensure-natural-number-value.js | 24 + .../test/object/ensure-natural-number.js | 22 + .../test/object/ensure-plain-function.js | 14 + .../test/object/ensure-plain-object.js | 16 + .../es5-ext/test/object/ensure-promise.js | 32 + .../es5-ext/test/object/ensure-thenable.js | 11 + .../es5-ext/test/object/entries/implement.js | 5 + .../es5-ext/test/object/entries/index.js | 3 + .../test/object/entries/is-implemented.js | 5 + .../es5-ext/test/object/entries/shim.js | 8 + node_modules/es5-ext/test/object/eq.js | 12 + node_modules/es5-ext/test/object/every.js | 21 + node_modules/es5-ext/test/object/filter.js | 8 + node_modules/es5-ext/test/object/find-key.js | 23 + node_modules/es5-ext/test/object/find.js | 23 + node_modules/es5-ext/test/object/first-key.js | 13 + node_modules/es5-ext/test/object/flatten.js | 6 + node_modules/es5-ext/test/object/for-each.js | 10 + .../es5-ext/test/object/get-property-names.js | 18 + .../es5-ext/test/object/is-array-like.js | 22 + .../es5-ext/test/object/is-callable.js | 8 + .../es5-ext/test/object/is-copy-deep.js | 46 + node_modules/es5-ext/test/object/is-copy.js | 18 + node_modules/es5-ext/test/object/is-empty.js | 6 + .../es5-ext/test/object/is-finite-number.js | 18 + .../es5-ext/test/object/is-integer.js | 12 + .../test/object/is-natural-number-value.js | 12 + .../es5-ext/test/object/is-natural-number.js | 12 + .../es5-ext/test/object/is-number-value.js | 18 + node_modules/es5-ext/test/object/is-object.js | 13 + .../es5-ext/test/object/is-plain-function.js | 42 + .../es5-ext/test/object/is-plain-object.js | 18 + .../es5-ext/test/object/is-promise.js | 17 + .../es5-ext/test/object/is-thenable.js | 17 + node_modules/es5-ext/test/object/is-value.js | 14 + node_modules/es5-ext/test/object/is.js | 12 + node_modules/es5-ext/test/object/key-of.js | 12 + .../es5-ext/test/object/keys/implement.js | 5 + .../es5-ext/test/object/keys/index.js | 3 + .../test/object/keys/is-implemented.js | 3 + node_modules/es5-ext/test/object/keys/shim.js | 8 + node_modules/es5-ext/test/object/map-keys.js | 7 + node_modules/es5-ext/test/object/map.js | 9 + .../es5-ext/test/object/mixin-prototypes.js | 68 + node_modules/es5-ext/test/object/mixin.js | 75 + .../es5-ext/test/object/normalize-options.js | 46 + .../es5-ext/test/object/primitive-set.js | 15 + .../es5-ext/test/object/safe-traverse.js | 15 + node_modules/es5-ext/test/object/serialize.js | 45 + .../test/object/set-prototype-of/implement.js | 8 + .../test/object/set-prototype-of/index.js | 27 + .../object/set-prototype-of/is-implemented.js | 5 + .../test/object/set-prototype-of/shim.js | 27 + node_modules/es5-ext/test/object/some.js | 23 + node_modules/es5-ext/test/object/to-array.js | 15 + .../es5-ext/test/object/unserialize.js | 41 + .../es5-ext/test/object/valid-callable.js | 9 + .../es5-ext/test/object/valid-object.js | 25 + .../es5-ext/test/object/valid-value.js | 19 + .../test/object/validate-array-like-object.js | 29 + .../test/object/validate-array-like.js | 27 + .../object/validate-stringifiable-value.js | 22 + .../test/object/validate-stringifiable.js | 18 + .../es5-ext/test/optional-chaining.js | 17 + .../es5-ext/test/promise/#/as-callback.js | 32 + .../test/promise/#/finally/implement.js | 7 + .../es5-ext/test/promise/#/finally/index.js | 3 + .../test/promise/#/finally/is-implemented.js | 5 + .../es5-ext/test/promise/#/finally/shim.js | 75 + .../es5-ext/test/promise/.eslintrc.json | 3 + node_modules/es5-ext/test/promise/lazy.js | 52 + node_modules/es5-ext/test/reg-exp/#/index.js | 15 + .../es5-ext/test/reg-exp/#/is-sticky.js | 13 + .../es5-ext/test/reg-exp/#/is-unicode.js | 13 + .../es5-ext/test/reg-exp/#/match/implement.js | 7 + .../es5-ext/test/reg-exp/#/match/index.js | 3 + .../test/reg-exp/#/match/is-implemented.js | 5 + .../es5-ext/test/reg-exp/#/match/shim.js | 6 + .../test/reg-exp/#/replace/implement.js | 7 + .../es5-ext/test/reg-exp/#/replace/index.js | 3 + .../test/reg-exp/#/replace/is-implemented.js | 5 + .../es5-ext/test/reg-exp/#/replace/shim.js | 5 + .../test/reg-exp/#/search/implement.js | 7 + .../es5-ext/test/reg-exp/#/search/index.js | 3 + .../test/reg-exp/#/search/is-implemented.js | 5 + .../es5-ext/test/reg-exp/#/search/shim.js | 5 + .../es5-ext/test/reg-exp/#/split/implement.js | 7 + .../es5-ext/test/reg-exp/#/split/index.js | 3 + .../test/reg-exp/#/split/is-implemented.js | 5 + .../es5-ext/test/reg-exp/#/split/shim.js | 5 + .../test/reg-exp/#/sticky/implement.js | 7 + .../test/reg-exp/#/sticky/is-implemented.js | 5 + .../test/reg-exp/#/unicode/implement.js | 7 + .../test/reg-exp/#/unicode/is-implemented.js | 5 + node_modules/es5-ext/test/reg-exp/escape.js | 6 + .../es5-ext/test/reg-exp/is-reg-exp.js | 12 + .../es5-ext/test/reg-exp/valid-reg-exp.js | 19 + node_modules/es5-ext/test/safe-to-string.js | 12 + .../test/string/#/@@iterator/implement.js | 7 + .../es5-ext/test/string/#/@@iterator/index.js | 3 + .../string/#/@@iterator/is-implemented.js | 5 + .../es5-ext/test/string/#/@@iterator/shim.js | 9 + node_modules/es5-ext/test/string/#/at.js | 132 + .../es5-ext/test/string/#/camel-to-hyphen.js | 7 + .../es5-ext/test/string/#/capitalize.js | 9 + .../test/string/#/case-insensitive-compare.js | 7 + .../test/string/#/code-point-at/implement.js | 8 + .../test/string/#/code-point-at/index.js | 3 + .../string/#/code-point-at/is-implemented.js | 5 + .../test/string/#/code-point-at/shim.js | 119 + .../test/string/#/contains/implement.js | 7 + .../es5-ext/test/string/#/contains/index.js | 3 + .../test/string/#/contains/is-implemented.js | 5 + .../es5-ext/test/string/#/contains/shim.js | 14 + node_modules/es5-ext/test/string/#/count.js | 14 + .../test/string/#/ends-with/implement.js | 7 + .../es5-ext/test/string/#/ends-with/index.js | 3 + .../test/string/#/ends-with/is-implemented.js | 5 + .../es5-ext/test/string/#/ends-with/shim.js | 16 + .../es5-ext/test/string/#/hyphen-to-camel.js | 7 + node_modules/es5-ext/test/string/#/indent.js | 9 + node_modules/es5-ext/test/string/#/last.js | 6 + .../es5-ext/test/string/#/normalize/_data.js | 5 + .../test/string/#/normalize/implement.js | 7 + .../es5-ext/test/string/#/normalize/index.js | 3 + .../test/string/#/normalize/is-implemented.js | 5 + .../es5-ext/test/string/#/normalize/shim.js | 13 + node_modules/es5-ext/test/string/#/pad.js | 24 + .../test/string/#/plain-replace-all.js | 11 + .../es5-ext/test/string/#/plain-replace.js | 7 + .../es5-ext/test/string/#/repeat/implement.js | 7 + .../es5-ext/test/string/#/repeat/index.js | 3 + .../test/string/#/repeat/is-implemented.js | 5 + .../es5-ext/test/string/#/repeat/shim.js | 12 + .../test/string/#/starts-with/implement.js | 7 + .../test/string/#/starts-with/index.js | 3 + .../string/#/starts-with/is-implemented.js | 5 + .../es5-ext/test/string/#/starts-with/shim.js | 14 + .../es5-ext/test/string/#/uncapitalize.js | 10 + .../es5-ext/test/string/format-method.js | 14 + .../test/string/from-code-point/implement.js | 7 + .../test/string/from-code-point/index.js | 3 + .../string/from-code-point/is-implemented.js | 5 + .../test/string/from-code-point/shim.js | 73 + node_modules/es5-ext/test/string/is-string.js | 11 + .../es5-ext/test/string/random-uniq.js | 14 + node_modules/es5-ext/test/string/random.js | 13 + .../es5-ext/test/string/raw/implement.js | 7 + node_modules/es5-ext/test/string/raw/index.js | 3 + .../es5-ext/test/string/raw/is-implemented.js | 5 + node_modules/es5-ext/test/string/raw/shim.js | 15 + .../test/to-short-string-representation.js | 16 + .../es5-ext/to-short-string-representation.js | 16 + node_modules/es6-iterator/#/chain.js | 40 + node_modules/es6-iterator/.editorconfig | 14 + node_modules/es6-iterator/.npmignore | 12 + node_modules/es6-iterator/CHANGELOG.md | 27 + node_modules/es6-iterator/CHANGES | 42 + node_modules/es6-iterator/LICENSE | 21 + node_modules/es6-iterator/README.md | 148 + node_modules/es6-iterator/appveyor.yml | 26 + node_modules/es6-iterator/array.js | 32 + node_modules/es6-iterator/for-of.js | 47 + node_modules/es6-iterator/get.js | 15 + node_modules/es6-iterator/index.js | 106 + node_modules/es6-iterator/is-iterable.js | 16 + node_modules/es6-iterator/package.json | 41 + node_modules/es6-iterator/string.js | 39 + node_modules/es6-iterator/test/#/chain.js | 23 + node_modules/es6-iterator/test/.eslintrc.json | 5 + node_modules/es6-iterator/test/array.js | 67 + node_modules/es6-iterator/test/for-of.js | 42 + node_modules/es6-iterator/test/get.js | 27 + node_modules/es6-iterator/test/index.js | 99 + node_modules/es6-iterator/test/is-iterable.js | 23 + node_modules/es6-iterator/test/string.js | 23 + .../es6-iterator/test/valid-iterable.js | 28 + node_modules/es6-iterator/valid-iterable.js | 8 + node_modules/es6-symbol/.lint | 15 + node_modules/es6-symbol/.npmignore | 4 + node_modules/es6-symbol/.travis.yml | 11 + node_modules/es6-symbol/CHANGES | 57 + node_modules/es6-symbol/LICENSE | 19 + node_modules/es6-symbol/README.md | 71 + node_modules/es6-symbol/implement.js | 7 + node_modules/es6-symbol/index.js | 3 + node_modules/es6-symbol/is-implemented.js | 17 + .../es6-symbol/is-native-implemented.js | 5 + node_modules/es6-symbol/is-symbol.js | 9 + node_modules/es6-symbol/package.json | 35 + node_modules/es6-symbol/polyfill.js | 118 + node_modules/es6-symbol/test/implement.js | 3 + node_modules/es6-symbol/test/index.js | 12 + .../es6-symbol/test/is-implemented.js | 14 + .../es6-symbol/test/is-native-implemented.js | 3 + node_modules/es6-symbol/test/is-symbol.js | 16 + node_modules/es6-symbol/test/polyfill.js | 29 + .../es6-symbol/test/validate-symbol.js | 19 + node_modules/es6-symbol/validate-symbol.js | 8 + node_modules/es6-weak-map/.editorconfig | 14 + node_modules/es6-weak-map/CHANGELOG.md | 5 + node_modules/es6-weak-map/CHANGES | 45 + node_modules/es6-weak-map/LICENSE | 15 + node_modules/es6-weak-map/README.md | 78 + node_modules/es6-weak-map/implement.js | 11 + node_modules/es6-weak-map/index.js | 3 + node_modules/es6-weak-map/is-implemented.js | 21 + .../es6-weak-map/is-native-implemented.js | 8 + node_modules/es6-weak-map/is-weak-map.js | 13 + node_modules/es6-weak-map/package.json | 44 + node_modules/es6-weak-map/polyfill.js | 65 + node_modules/es6-weak-map/test/implement.js | 5 + node_modules/es6-weak-map/test/index.js | 7 + .../es6-weak-map/test/is-implemented.js | 15 + .../test/is-native-implemented.js | 5 + node_modules/es6-weak-map/test/is-weak-map.js | 16 + node_modules/es6-weak-map/test/polyfill.js | 23 + .../es6-weak-map/test/valid-weak-map.js | 32 + node_modules/es6-weak-map/valid-weak-map.js | 8 + node_modules/event-emitter/.lint | 15 + node_modules/event-emitter/.npmignore | 3 + node_modules/event-emitter/.testignore | 1 + node_modules/event-emitter/.travis.yml | 16 + node_modules/event-emitter/CHANGES | 73 + node_modules/event-emitter/LICENSE | 19 + node_modules/event-emitter/README.md | 98 + node_modules/event-emitter/all-off.js | 19 + .../event-emitter/benchmark/many-on.js | 83 + .../event-emitter/benchmark/single-on.js | 73 + node_modules/event-emitter/emit-error.js | 13 + node_modules/event-emitter/has-listeners.js | 16 + node_modules/event-emitter/index.js | 132 + node_modules/event-emitter/package.json | 34 + node_modules/event-emitter/pipe.js | 42 + node_modules/event-emitter/test/all-off.js | 48 + node_modules/event-emitter/test/emit-error.js | 14 + .../event-emitter/test/has-listeners.js | 42 + node_modules/event-emitter/test/index.js | 107 + node_modules/event-emitter/test/pipe.js | 53 + node_modules/event-emitter/test/unify.js | 123 + node_modules/event-emitter/unify.js | 50 + node_modules/fs-extra/CHANGELOG.md | 842 + node_modules/fs-extra/LICENSE | 15 + node_modules/fs-extra/README.md | 261 + .../fs-extra/lib/copy-sync/copy-sync.js | 193 + node_modules/fs-extra/lib/copy-sync/index.js | 5 + node_modules/fs-extra/lib/copy/copy.js | 246 + node_modules/fs-extra/lib/copy/index.js | 6 + node_modules/fs-extra/lib/empty/index.js | 48 + node_modules/fs-extra/lib/ensure/file.js | 49 + node_modules/fs-extra/lib/ensure/index.js | 23 + node_modules/fs-extra/lib/ensure/link.js | 61 + .../fs-extra/lib/ensure/symlink-paths.js | 99 + .../fs-extra/lib/ensure/symlink-type.js | 31 + node_modules/fs-extra/lib/ensure/symlink.js | 63 + node_modules/fs-extra/lib/fs/index.js | 104 + node_modules/fs-extra/lib/index.js | 28 + node_modules/fs-extra/lib/json/index.js | 16 + node_modules/fs-extra/lib/json/jsonfile.js | 12 + .../fs-extra/lib/json/output-json-sync.js | 18 + node_modules/fs-extra/lib/json/output-json.js | 27 + node_modules/fs-extra/lib/mkdirs/index.js | 14 + .../fs-extra/lib/mkdirs/mkdirs-sync.js | 54 + node_modules/fs-extra/lib/mkdirs/mkdirs.js | 63 + node_modules/fs-extra/lib/mkdirs/win32.js | 25 + node_modules/fs-extra/lib/move-sync/index.js | 117 + node_modules/fs-extra/lib/move/index.js | 82 + node_modules/fs-extra/lib/output/index.js | 40 + .../fs-extra/lib/path-exists/index.js | 12 + node_modules/fs-extra/lib/remove/index.js | 9 + node_modules/fs-extra/lib/remove/rimraf.js | 314 + node_modules/fs-extra/lib/util/buffer.js | 12 + node_modules/fs-extra/lib/util/utimes.js | 79 + node_modules/fs-extra/package.json | 68 + .../gauge/node_modules/strip-ansi/index.js | 6 + .../gauge/node_modules/strip-ansi/license | 21 + .../node_modules/strip-ansi/package.json | 57 + .../gauge/node_modules/strip-ansi/readme.md | 33 + node_modules/get-caller-file/LICENSE.md | 6 + node_modules/get-caller-file/README.md | 41 + node_modules/get-caller-file/index.d.ts | 2 + node_modules/get-caller-file/index.js | 22 + node_modules/get-caller-file/index.js.map | 1 + node_modules/get-caller-file/package.json | 42 + node_modules/inflection/.npmignore | 4 + node_modules/inflection/History.md | 232 + node_modules/inflection/Readme.md | 504 + node_modules/inflection/bower.json | 58 + node_modules/inflection/component.json | 36 + node_modules/inflection/inflection.min.js | 31 + node_modules/inflection/lib/inflection.js | 1086 ++ node_modules/inflection/package.json | 46 + .../inquirer/node_modules/strip-ansi/index.js | 7 - .../node_modules/strip-ansi/package.json | 54 - .../node_modules/strip-ansi/readme.md | 61 - node_modules/is-bluebird/License | 19 + node_modules/is-bluebird/README.md | 86 + node_modules/is-bluebird/changelog.md | 16 + node_modules/is-bluebird/lib/index.js | 79 + node_modules/is-bluebird/package.json | 51 + node_modules/js-beautify/CHANGELOG.md | 808 + node_modules/js-beautify/LICENSE | 9 + node_modules/js-beautify/README.md | 402 + .../js-beautify/js/bin/css-beautify.js | 4 + .../js-beautify/js/bin/html-beautify.js | 4 + .../js-beautify/js/bin/js-beautify.js | 4 + node_modules/js-beautify/js/index.js | 86 + node_modules/js-beautify/js/lib/beautifier.js | 5899 ++++++ .../js-beautify/js/lib/beautifier.min.js | 2 + .../js-beautify/js/lib/beautify-css.js | 1662 ++ .../js-beautify/js/lib/beautify-html.js | 3135 ++++ node_modules/js-beautify/js/lib/beautify.js | 4039 +++++ node_modules/js-beautify/js/lib/cli.js | 692 + .../javascriptobfuscator_unpacker.js | 132 + .../js/lib/unpackers/myobfuscate_unpacker.js | 119 + .../js/lib/unpackers/p_a_c_k_e_r_unpacker.js | 111 + .../js/lib/unpackers/urlencode_unpacker.js | 104 + node_modules/js-beautify/js/src/cli.js | 692 + .../js-beautify/js/src/core/directives.js | 62 + .../js-beautify/js/src/core/inputscanner.js | 192 + .../js-beautify/js/src/core/options.js | 193 + .../js-beautify/js/src/core/output.js | 419 + .../js-beautify/js/src/core/pattern.js | 94 + .../js/src/core/templatablepattern.js | 188 + node_modules/js-beautify/js/src/core/token.js | 54 + .../js-beautify/js/src/core/tokenizer.js | 140 + .../js-beautify/js/src/core/tokenstream.js | 78 + .../js/src/core/whitespacepattern.js | 105 + .../js-beautify/js/src/css/beautifier.js | 470 + node_modules/js-beautify/js/src/css/index.js | 42 + .../js-beautify/js/src/css/options.js | 46 + .../js-beautify/js/src/css/tokenizer.js | 29 + .../js-beautify/js/src/html/beautifier.js | 840 + node_modules/js-beautify/js/src/html/index.js | 42 + .../js-beautify/js/src/html/options.js | 91 + .../js-beautify/js/src/html/tokenizer.js | 329 + node_modules/js-beautify/js/src/index.js | 44 + .../js-beautify/js/src/javascript/acorn.js | 57 + .../js/src/javascript/beautifier.js | 1455 ++ .../js-beautify/js/src/javascript/index.js | 42 + .../js-beautify/js/src/javascript/options.js | 93 + .../js/src/javascript/tokenizer.js | 562 + .../javascriptobfuscator_unpacker.js | 132 + .../js/src/unpackers/myobfuscate_unpacker.js | 119 + .../js/src/unpackers/p_a_c_k_e_r_unpacker.js | 111 + .../js/src/unpackers/urlencode_unpacker.js | 104 + .../node_modules/.bin/editorconfig | 1 + .../js-beautify/node_modules/.bin/mkdirp | 1 + .../js-beautify/node_modules/.bin/nopt | 1 + node_modules/js-beautify/package.json | 64 + node_modules/jsonfile/CHANGELOG.md | 145 + node_modules/jsonfile/LICENSE | 15 + node_modules/jsonfile/README.md | 168 + node_modules/jsonfile/index.js | 134 + node_modules/jsonfile/package.json | 37 + node_modules/lru-queue/.lint | 11 + node_modules/lru-queue/.npmignore | 4 + node_modules/lru-queue/.travis.yml | 9 + node_modules/lru-queue/CHANGES | 3 + node_modules/lru-queue/LICENCE | 19 + node_modules/lru-queue/README.md | 65 + node_modules/lru-queue/index.js | 48 + node_modules/lru-queue/package.json | 25 + node_modules/lru-queue/test/index.js | 29 + node_modules/memoizee/.editorconfig | 14 + node_modules/memoizee/.testignore | 1 + node_modules/memoizee/CHANGELOG.md | 91 + node_modules/memoizee/CHANGES | 124 + node_modules/memoizee/LICENSE | 15 + node_modules/memoizee/README.md | 485 + node_modules/memoizee/benchmark/fibonacci.js | 140 + node_modules/memoizee/ext/async.js | 154 + node_modules/memoizee/ext/dispose.js | 33 + node_modules/memoizee/ext/max-age.js | 90 + node_modules/memoizee/ext/max.js | 27 + node_modules/memoizee/ext/promise.js | 147 + node_modules/memoizee/ext/ref-counter.js | 48 + node_modules/memoizee/index.js | 34 + node_modules/memoizee/lib/configure-map.js | 182 + node_modules/memoizee/lib/methods.js | 32 + .../memoizee/lib/registered-extensions.js | 1 + node_modules/memoizee/lib/resolve-length.js | 15 + .../memoizee/lib/resolve-normalize.js | 17 + node_modules/memoizee/lib/resolve-resolve.js | 21 + node_modules/memoizee/lib/weak.js | 134 + node_modules/memoizee/methods-plain.js | 3 + node_modules/memoizee/methods.js | 3 + node_modules/memoizee/normalizers/get-1.js | 29 + .../memoizee/normalizers/get-fixed.js | 71 + .../normalizers/get-primitive-fixed.js | 16 + node_modules/memoizee/normalizers/get.js | 90 + .../memoizee/normalizers/primitive.js | 9 + node_modules/memoizee/package.json | 61 + node_modules/memoizee/plain.js | 37 + node_modules/memoizee/profile.js | 107 + node_modules/memoizee/test/ext/async.js | 413 + node_modules/memoizee/test/ext/dispose.js | 243 + node_modules/memoizee/test/ext/max-age.js | 860 + node_modules/memoizee/test/ext/max.js | 1677 ++ node_modules/memoizee/test/ext/promise.js | 326 + node_modules/memoizee/test/ext/ref-counter.js | 302 + node_modules/memoizee/test/index.js | 2474 +++ .../memoizee/test/lib/configure-map.js | 156 + node_modules/memoizee/test/lib/methods.js | 50 + .../test/lib/registered-extensions.js | 6 + .../memoizee/test/lib/resolve-length.js | 10 + .../memoizee/test/lib/resolve-normalize.js | 9 + .../memoizee/test/lib/resolve-resolve.js | 5 + node_modules/memoizee/test/lib/weak.js | 53 + node_modules/memoizee/test/methods-plain.js | 48 + node_modules/memoizee/test/methods.js | 45 + .../memoizee/test/normalizers/get-1.js | 62 + .../memoizee/test/normalizers/get-fixed.js | 98 + .../test/normalizers/get-primitive-fixed.js | 70 + node_modules/memoizee/test/normalizers/get.js | 66 + .../memoizee/test/normalizers/primitive.js | 28 + node_modules/memoizee/test/plain.js | 56 + node_modules/memoizee/test/profile.js | 14 + node_modules/memoizee/test/weak-plain.js | 50 + node_modules/memoizee/test/weak.js | 62 + node_modules/memoizee/weak-plain.js | 3 + node_modules/memoizee/weak.js | 3 + node_modules/moment-timezone/LICENSE | 20 + node_modules/moment-timezone/README.md | 36 + ...moment-timezone-with-data-10-year-range.js | 1224 ++ ...nt-timezone-with-data-10-year-range.min.js | 1 + .../moment-timezone-with-data-1970-2030.js | 1224 ++ ...moment-timezone-with-data-1970-2030.min.js | 1 + .../moment-timezone-with-data-2012-2022.js | 1224 ++ ...moment-timezone-with-data-2012-2022.min.js | 1 + .../builds/moment-timezone-with-data.js | 1224 ++ .../builds/moment-timezone-with-data.min.js | 1 + .../builds/moment-timezone.min.js | 1 + node_modules/moment-timezone/changelog.md | 191 + node_modules/moment-timezone/composer.json | 43 + .../moment-timezone/data/meta/latest.json | 5130 ++++++ .../moment-timezone/data/packed/latest.json | 600 + node_modules/moment-timezone/index.js | 2 + .../moment-timezone/moment-timezone-utils.js | 318 + .../moment-timezone/moment-timezone.js | 627 + node_modules/moment-timezone/package.json | 52 + node_modules/moment/CHANGELOG.md | 895 + node_modules/moment/LICENSE | 22 + node_modules/moment/README.md | 65 + node_modules/moment/ender.js | 1 + node_modules/moment/locale/af.js | 72 + node_modules/moment/locale/ar-dz.js | 58 + node_modules/moment/locale/ar-kw.js | 58 + node_modules/moment/locale/ar-ly.js | 121 + node_modules/moment/locale/ar-ma.js | 58 + node_modules/moment/locale/ar-sa.js | 103 + node_modules/moment/locale/ar-tn.js | 58 + node_modules/moment/locale/ar.js | 134 + node_modules/moment/locale/az.js | 104 + node_modules/moment/locale/be.js | 131 + node_modules/moment/locale/bg.js | 89 + node_modules/moment/locale/bm.js | 57 + node_modules/moment/locale/bn.js | 118 + node_modules/moment/locale/bo.js | 118 + node_modules/moment/locale/br.js | 107 + node_modules/moment/locale/bs.js | 150 + node_modules/moment/locale/ca.js | 87 + node_modules/moment/locale/cs.js | 171 + node_modules/moment/locale/cv.js | 62 + node_modules/moment/locale/cy.js | 79 + node_modules/moment/locale/da.js | 59 + node_modules/moment/locale/de-at.js | 75 + node_modules/moment/locale/de-ch.js | 75 + node_modules/moment/locale/de.js | 75 + node_modules/moment/locale/dv.js | 98 + node_modules/moment/locale/el.js | 99 + node_modules/moment/locale/en-SG.js | 66 + node_modules/moment/locale/en-au.js | 66 + node_modules/moment/locale/en-ca.js | 62 + node_modules/moment/locale/en-gb.js | 66 + node_modules/moment/locale/en-ie.js | 66 + node_modules/moment/locale/en-il.js | 61 + node_modules/moment/locale/en-nz.js | 66 + node_modules/moment/locale/eo.js | 70 + node_modules/moment/locale/es-do.js | 91 + node_modules/moment/locale/es-us.js | 91 + node_modules/moment/locale/es.js | 91 + node_modules/moment/locale/et.js | 79 + node_modules/moment/locale/eu.js | 65 + node_modules/moment/locale/fa.js | 105 + node_modules/moment/locale/fi.js | 108 + node_modules/moment/locale/fo.js | 59 + node_modules/moment/locale/fr-ca.js | 73 + node_modules/moment/locale/fr-ch.js | 77 + node_modules/moment/locale/fr.js | 82 + node_modules/moment/locale/fy.js | 74 + node_modules/moment/locale/ga.js | 76 + node_modules/moment/locale/gd.js | 75 + node_modules/moment/locale/gl.js | 76 + node_modules/moment/locale/gom-latn.js | 122 + node_modules/moment/locale/gu.js | 123 + node_modules/moment/locale/he.js | 96 + node_modules/moment/locale/hi.js | 123 + node_modules/moment/locale/hr.js | 153 + node_modules/moment/locale/hu.js | 109 + node_modules/moment/locale/hy-am.js | 94 + node_modules/moment/locale/id.js | 81 + node_modules/moment/locale/is.js | 131 + node_modules/moment/locale/it-ch.js | 68 + node_modules/moment/locale/it.js | 68 + node_modules/moment/locale/ja.js | 91 + node_modules/moment/locale/jv.js | 81 + node_modules/moment/locale/ka.js | 88 + node_modules/moment/locale/kk.js | 86 + node_modules/moment/locale/km.js | 109 + node_modules/moment/locale/kn.js | 125 + node_modules/moment/locale/ko.js | 80 + node_modules/moment/locale/ku.js | 118 + node_modules/moment/locale/ky.js | 86 + node_modules/moment/locale/lb.js | 135 + node_modules/moment/locale/lo.js | 69 + node_modules/moment/locale/lt.js | 117 + node_modules/moment/locale/lv.js | 96 + node_modules/moment/locale/me.js | 111 + node_modules/moment/locale/mi.js | 63 + node_modules/moment/locale/mk.js | 89 + node_modules/moment/locale/ml.js | 80 + node_modules/moment/locale/mn.js | 103 + node_modules/moment/locale/mr.js | 159 + node_modules/moment/locale/ms-my.js | 81 + node_modules/moment/locale/ms.js | 81 + node_modules/moment/locale/mt.js | 59 + node_modules/moment/locale/my.js | 92 + node_modules/moment/locale/nb.js | 61 + node_modules/moment/locale/ne.js | 122 + node_modules/moment/locale/nl-be.js | 86 + node_modules/moment/locale/nl.js | 86 + node_modules/moment/locale/nn.js | 59 + node_modules/moment/locale/pa-in.js | 123 + node_modules/moment/locale/pl.js | 125 + node_modules/moment/locale/pt-br.js | 60 + node_modules/moment/locale/pt.js | 64 + node_modules/moment/locale/ro.js | 74 + node_modules/moment/locale/ru.js | 181 + node_modules/moment/locale/sd.js | 97 + node_modules/moment/locale/se.js | 59 + node_modules/moment/locale/si.js | 70 + node_modules/moment/locale/sk.js | 155 + node_modules/moment/locale/sl.js | 172 + node_modules/moment/locale/sq.js | 67 + node_modules/moment/locale/sr-cyrl.js | 110 + node_modules/moment/locale/sr.js | 110 + node_modules/moment/locale/ss.js | 87 + node_modules/moment/locale/sv.js | 68 + node_modules/moment/locale/sw.js | 58 + node_modules/moment/locale/ta.js | 128 + node_modules/moment/locale/te.js | 88 + node_modules/moment/locale/tet.js | 66 + node_modules/moment/locale/tg.js | 115 + node_modules/moment/locale/th.js | 66 + node_modules/moment/locale/tl-ph.js | 61 + node_modules/moment/locale/tlh.js | 121 + node_modules/moment/locale/tr.js | 93 + node_modules/moment/locale/tzl.js | 90 + node_modules/moment/locale/tzm-latn.js | 57 + node_modules/moment/locale/tzm.js | 57 + node_modules/moment/locale/ug-cn.js | 118 + node_modules/moment/locale/uk.js | 153 + node_modules/moment/locale/ur.js | 97 + node_modules/moment/locale/uz-latn.js | 57 + node_modules/moment/locale/uz.js | 57 + node_modules/moment/locale/vi.js | 78 + node_modules/moment/locale/x-pseudo.js | 67 + node_modules/moment/locale/yo.js | 59 + node_modules/moment/locale/zh-cn.js | 109 + node_modules/moment/locale/zh-hk.js | 102 + node_modules/moment/locale/zh-tw.js | 102 + node_modules/moment/min/locales.js | 10178 +++++++++++ node_modules/moment/min/locales.min.js | 1 + .../moment/min/moment-with-locales.js | 14765 ++++++++++++++++ .../moment/min/moment-with-locales.min.js | 1 + node_modules/moment/min/moment.min.js | 1 + node_modules/moment/moment.d.ts | 736 + node_modules/moment/moment.js | 4602 +++++ node_modules/moment/package.js | 11 + node_modules/moment/package.json | 99 + .../moment/src/lib/create/check-overflow.js | 34 + .../moment/src/lib/create/date-from-array.js | 35 + .../moment/src/lib/create/from-anything.js | 110 + .../moment/src/lib/create/from-array.js | 147 + .../moment/src/lib/create/from-object.js | 16 + .../src/lib/create/from-string-and-array.js | 50 + .../src/lib/create/from-string-and-format.js | 113 + .../moment/src/lib/create/from-string.js | 230 + node_modules/moment/src/lib/create/local.js | 5 + .../moment/src/lib/create/parsing-flags.js | 26 + node_modules/moment/src/lib/create/utc.js | 5 + node_modules/moment/src/lib/create/valid.js | 50 + node_modules/moment/src/lib/duration/abs.js | 18 + .../moment/src/lib/duration/add-subtract.js | 21 + node_modules/moment/src/lib/duration/as.js | 66 + .../moment/src/lib/duration/bubble.js | 61 + node_modules/moment/src/lib/duration/clone.js | 6 + .../moment/src/lib/duration/constructor.js | 44 + .../moment/src/lib/duration/create.js | 122 + .../moment/src/lib/duration/duration.js | 16 + node_modules/moment/src/lib/duration/get.js | 25 + .../moment/src/lib/duration/humanize.js | 85 + .../moment/src/lib/duration/iso-string.js | 64 + .../moment/src/lib/duration/prototype.js | 53 + node_modules/moment/src/lib/duration/valid.js | 36 + node_modules/moment/src/lib/format/format.js | 92 + .../moment/src/lib/locale/base-config.js | 44 + .../moment/src/lib/locale/calendar.js | 15 + .../moment/src/lib/locale/constructor.js | 5 + node_modules/moment/src/lib/locale/en.js | 15 + node_modules/moment/src/lib/locale/formats.js | 23 + node_modules/moment/src/lib/locale/invalid.js | 5 + node_modules/moment/src/lib/locale/lists.js | 93 + node_modules/moment/src/lib/locale/locale.js | 39 + node_modules/moment/src/lib/locale/locales.js | 197 + node_modules/moment/src/lib/locale/ordinal.js | 7 + .../moment/src/lib/locale/pre-post-format.js | 3 + .../moment/src/lib/locale/prototype.js | 69 + .../moment/src/lib/locale/relative.js | 30 + node_modules/moment/src/lib/locale/set.js | 49 + .../moment/src/lib/moment/add-subtract.js | 55 + .../moment/src/lib/moment/calendar.js | 26 + node_modules/moment/src/lib/moment/clone.js | 5 + node_modules/moment/src/lib/moment/compare.js | 63 + .../moment/src/lib/moment/constructor.js | 77 + .../moment/src/lib/moment/creation-data.js | 9 + node_modules/moment/src/lib/moment/diff.js | 58 + node_modules/moment/src/lib/moment/format.js | 62 + node_modules/moment/src/lib/moment/from.js | 17 + node_modules/moment/src/lib/moment/get-set.js | 61 + node_modules/moment/src/lib/moment/locale.js | 34 + node_modules/moment/src/lib/moment/min-max.js | 63 + node_modules/moment/src/lib/moment/moment.js | 28 + node_modules/moment/src/lib/moment/now.js | 3 + .../moment/src/lib/moment/prototype.js | 150 + .../moment/src/lib/moment/start-end-of.js | 128 + node_modules/moment/src/lib/moment/to-type.js | 34 + node_modules/moment/src/lib/moment/to.js | 17 + node_modules/moment/src/lib/moment/valid.js | 15 + node_modules/moment/src/lib/parse/regex.js | 54 + node_modules/moment/src/lib/parse/token.js | 33 + node_modules/moment/src/lib/units/aliases.js | 30 + .../moment/src/lib/units/constants.js | 9 + .../moment/src/lib/units/day-of-month.js | 39 + .../moment/src/lib/units/day-of-week.js | 367 + .../moment/src/lib/units/day-of-year.js | 36 + node_modules/moment/src/lib/units/hour.js | 144 + .../moment/src/lib/units/millisecond.js | 69 + node_modules/moment/src/lib/units/minute.js | 29 + node_modules/moment/src/lib/units/month.js | 290 + node_modules/moment/src/lib/units/offset.js | 235 + .../moment/src/lib/units/priorities.js | 16 + node_modules/moment/src/lib/units/quarter.js | 32 + node_modules/moment/src/lib/units/second.js | 29 + .../moment/src/lib/units/timestamp.js | 20 + node_modules/moment/src/lib/units/timezone.js | 16 + node_modules/moment/src/lib/units/units.js | 20 + .../src/lib/units/week-calendar-utils.js | 65 + .../moment/src/lib/units/week-year.js | 107 + node_modules/moment/src/lib/units/week.js | 67 + node_modules/moment/src/lib/units/year.js | 75 + node_modules/moment/src/lib/utils/abs-ceil.js | 7 + .../moment/src/lib/utils/abs-floor.js | 8 + .../moment/src/lib/utils/abs-round.js | 7 + .../moment/src/lib/utils/compare-arrays.js | 16 + node_modules/moment/src/lib/utils/defaults.js | 10 + .../moment/src/lib/utils/deprecate.js | 55 + node_modules/moment/src/lib/utils/extend.js | 19 + .../moment/src/lib/utils/has-own-prop.js | 3 + node_modules/moment/src/lib/utils/hooks.js | 13 + node_modules/moment/src/lib/utils/index-of.js | 18 + node_modules/moment/src/lib/utils/is-array.js | 3 + node_modules/moment/src/lib/utils/is-date.js | 3 + .../moment/src/lib/utils/is-function.js | 3 + .../moment/src/lib/utils/is-number.js | 3 + .../moment/src/lib/utils/is-object-empty.js | 13 + .../moment/src/lib/utils/is-object.js | 5 + .../moment/src/lib/utils/is-undefined.js | 3 + node_modules/moment/src/lib/utils/keys.js | 19 + node_modules/moment/src/lib/utils/map.js | 7 + node_modules/moment/src/lib/utils/mod.js | 3 + node_modules/moment/src/lib/utils/some.js | 19 + node_modules/moment/src/lib/utils/to-int.js | 12 + .../moment/src/lib/utils/zero-fill.js | 7 + node_modules/moment/src/locale/af.js | 64 + node_modules/moment/src/locale/ar-dz.js | 51 + node_modules/moment/src/locale/ar-kw.js | 50 + node_modules/moment/src/locale/ar-ly.js | 113 + node_modules/moment/src/locale/ar-ma.js | 52 + node_modules/moment/src/locale/ar-sa.js | 96 + node_modules/moment/src/locale/ar-tn.js | 51 + node_modules/moment/src/locale/ar.js | 128 + node_modules/moment/src/locale/az.js | 97 + node_modules/moment/src/locale/be.js | 126 + node_modules/moment/src/locale/bg.js | 82 + node_modules/moment/src/locale/bm.js | 50 + node_modules/moment/src/locale/bn.js | 110 + node_modules/moment/src/locale/bo.js | 111 + node_modules/moment/src/locale/br.js | 100 + node_modules/moment/src/locale/bs.js | 143 + node_modules/moment/src/locale/ca.js | 80 + node_modules/moment/src/locale/cs.js | 164 + node_modules/moment/src/locale/cv.js | 54 + node_modules/moment/src/locale/cy.js | 73 + node_modules/moment/src/locale/da.js | 51 + node_modules/moment/src/locale/de-at.js | 70 + node_modules/moment/src/locale/de-ch.js | 69 + node_modules/moment/src/locale/de.js | 69 + node_modules/moment/src/locale/dv.js | 90 + node_modules/moment/src/locale/el.js | 89 + node_modules/moment/src/locale/en-SG.js | 59 + node_modules/moment/src/locale/en-au.js | 58 + node_modules/moment/src/locale/en-ca.js | 54 + node_modules/moment/src/locale/en-gb.js | 59 + node_modules/moment/src/locale/en-ie.js | 59 + node_modules/moment/src/locale/en-il.js | 54 + node_modules/moment/src/locale/en-nz.js | 58 + node_modules/moment/src/locale/eo.js | 65 + node_modules/moment/src/locale/es-do.js | 83 + node_modules/moment/src/locale/es-us.js | 84 + node_modules/moment/src/locale/es.js | 83 + node_modules/moment/src/locale/et.js | 73 + node_modules/moment/src/locale/eu.js | 58 + node_modules/moment/src/locale/fa.js | 98 + node_modules/moment/src/locale/fi.js | 101 + node_modules/moment/src/locale/fo.js | 53 + node_modules/moment/src/locale/fr-ca.js | 66 + node_modules/moment/src/locale/fr-ch.js | 70 + node_modules/moment/src/locale/fr.js | 75 + node_modules/moment/src/locale/fy.js | 67 + node_modules/moment/src/locale/ga.js | 68 + node_modules/moment/src/locale/gd.js | 68 + node_modules/moment/src/locale/gl.js | 69 + node_modules/moment/src/locale/gom-latn.js | 114 + node_modules/moment/src/locale/gu.js | 115 + node_modules/moment/src/locale/he.js | 91 + node_modules/moment/src/locale/hi.js | 116 + node_modules/moment/src/locale/hr.js | 145 + node_modules/moment/src/locale/hu.js | 103 + node_modules/moment/src/locale/hy-am.js | 87 + node_modules/moment/src/locale/id.js | 74 + node_modules/moment/src/locale/is.js | 124 + node_modules/moment/src/locale/it-ch.js | 61 + node_modules/moment/src/locale/it.js | 62 + node_modules/moment/src/locale/ja.js | 84 + node_modules/moment/src/locale/jv.js | 74 + node_modules/moment/src/locale/ka.js | 81 + node_modules/moment/src/locale/kk.js | 78 + node_modules/moment/src/locale/km.js | 101 + node_modules/moment/src/locale/kn.js | 117 + node_modules/moment/src/locale/ko.js | 74 + node_modules/moment/src/locale/ku.js | 110 + node_modules/moment/src/locale/ky.js | 79 + node_modules/moment/src/locale/lb.js | 129 + node_modules/moment/src/locale/lo.js | 62 + node_modules/moment/src/locale/lt.js | 110 + node_modules/moment/src/locale/lv.js | 90 + node_modules/moment/src/locale/me.js | 103 + node_modules/moment/src/locale/mi.js | 55 + node_modules/moment/src/locale/mk.js | 82 + node_modules/moment/src/locale/ml.js | 73 + node_modules/moment/src/locale/mn.js | 96 + node_modules/moment/src/locale/mr.js | 153 + node_modules/moment/src/locale/ms-my.js | 75 + node_modules/moment/src/locale/ms.js | 74 + node_modules/moment/src/locale/mt.js | 51 + node_modules/moment/src/locale/my.js | 87 + node_modules/moment/src/locale/nb.js | 55 + node_modules/moment/src/locale/ne.js | 115 + node_modules/moment/src/locale/nl-be.js | 80 + node_modules/moment/src/locale/nl.js | 80 + node_modules/moment/src/locale/nn.js | 52 + node_modules/moment/src/locale/pa-in.js | 116 + node_modules/moment/src/locale/pl.js | 117 + node_modules/moment/src/locale/pt-br.js | 53 + node_modules/moment/src/locale/pt.js | 57 + node_modules/moment/src/locale/ro.js | 68 + node_modules/moment/src/locale/ru.js | 175 + node_modules/moment/src/locale/sd.js | 89 + node_modules/moment/src/locale/se.js | 52 + node_modules/moment/src/locale/si.js | 62 + node_modules/moment/src/locale/sk.js | 149 + node_modules/moment/src/locale/sl.js | 164 + node_modules/moment/src/locale/sq.js | 62 + node_modules/moment/src/locale/sr-cyrl.js | 102 + node_modules/moment/src/locale/sr.js | 102 + node_modules/moment/src/locale/ss.js | 81 + node_modules/moment/src/locale/sv.js | 61 + node_modules/moment/src/locale/sw.js | 51 + node_modules/moment/src/locale/ta.js | 121 + node_modules/moment/src/locale/te.js | 80 + node_modules/moment/src/locale/tet.js | 60 + node_modules/moment/src/locale/tg.js | 107 + node_modules/moment/src/locale/th.js | 58 + node_modules/moment/src/locale/tl-ph.js | 54 + node_modules/moment/src/locale/tlh.js | 113 + node_modules/moment/src/locale/tr.js | 90 + node_modules/moment/src/locale/tzl.js | 84 + node_modules/moment/src/locale/tzm-latn.js | 50 + node_modules/moment/src/locale/tzm.js | 50 + node_modules/moment/src/locale/ug-cn.js | 110 + node_modules/moment/src/locale/uk.js | 146 + node_modules/moment/src/locale/ur.js | 90 + node_modules/moment/src/locale/uz-latn.js | 50 + node_modules/moment/src/locale/uz.js | 50 + node_modules/moment/src/locale/vi.js | 71 + node_modules/moment/src/locale/x-pseudo.js | 59 + node_modules/moment/src/locale/yo.js | 51 + node_modules/moment/src/locale/zh-cn.js | 102 + node_modules/moment/src/locale/zh-hk.js | 96 + node_modules/moment/src/locale/zh-tw.js | 95 + node_modules/moment/src/moment.js | 95 + node_modules/next-tick/.lint | 14 + node_modules/next-tick/.npmignore | 4 + node_modules/next-tick/.travis.yml | 16 + node_modules/next-tick/CHANGES | 24 + node_modules/next-tick/LICENSE | 21 + node_modules/next-tick/README.md | 24 + node_modules/next-tick/index.js | 71 + node_modules/next-tick/package.json | 27 + node_modules/next-tick/test/index.js | 22 + .../node-pre-gyp/node_modules/.bin/nopt | 2 +- .../node_modules/nopt/package.json | 23 - .../node_modules => }/nopt/.npmignore | 0 .../node_modules => }/nopt/.travis.yml | 0 .../node_modules => }/nopt/CHANGELOG.md | 0 node_modules/nopt/LICENSE | 32 +- node_modules/nopt/README.md | 87 +- node_modules/nopt/bin/nopt.js | 14 +- node_modules/nopt/lib/nopt.js | 352 +- node_modules/nopt/package.json | 35 +- .../node_modules => }/nopt/test/basic.js | 0 .../node_modules/nopt => proto-list}/LICENSE | 0 node_modules/proto-list/README.md | 3 + node_modules/proto-list/package.json | 18 + node_modules/proto-list/proto-list.js | 88 + node_modules/proto-list/test/basic.js | 61 + node_modules/regenerator-runtime/README.md | 31 + node_modules/regenerator-runtime/package.json | 18 + node_modules/regenerator-runtime/path.js | 11 + .../regenerator-runtime/runtime-module.js | 35 + node_modules/regenerator-runtime/runtime.js | 727 + node_modules/require-directory/.jshintrc | 67 + node_modules/require-directory/.npmignore | 1 + node_modules/require-directory/.travis.yml | 3 + node_modules/require-directory/LICENSE | 22 + .../require-directory/README.markdown | 184 + node_modules/require-directory/index.js | 86 + node_modules/require-directory/package.json | 40 + .../require-main-filename/CHANGELOG.md | 26 + .../require-main-filename/LICENSE.txt | 14 + node_modules/require-main-filename/README.md | 26 + node_modules/require-main-filename/index.js | 18 + .../require-main-filename/package.json | 35 + node_modules/retry-as-promised/LICENSE | 23 + node_modules/retry-as-promised/README.md | 40 + node_modules/retry-as-promised/index.js | 117 + node_modules/retry-as-promised/package.json | 40 + node_modules/sequelize-cli/.babelrc | 24 + node_modules/sequelize-cli/.editorconfig | 21 + node_modules/sequelize-cli/.eslintrc.json | 49 + .../sequelize-cli/.github/ISSUE_TEMPLATE.md | 29 + node_modules/sequelize-cli/.travis.yml | 33 + node_modules/sequelize-cli/CHANGELOG.md | 430 + node_modules/sequelize-cli/CONTRIBUTING.md | 64 + node_modules/sequelize-cli/LICENSE | 21 + node_modules/sequelize-cli/README.md | 78 + node_modules/sequelize-cli/docker-compose.yml | 28 + node_modules/sequelize-cli/docs/FAQ.md | 54 + node_modules/sequelize-cli/docs/README.md | 246 + .../lib/assets/migrations/create-table.js | 35 + .../lib/assets/migrations/skeleton.js | 23 + .../sequelize-cli/lib/assets/models/index.js | 37 + .../sequelize-cli/lib/assets/models/model.js | 18 + .../lib/assets/seeders/skeleton.js | 26 + .../sequelize-cli/lib/commands/database.js | 139 + .../sequelize-cli/lib/commands/init.js | 77 + .../sequelize-cli/lib/commands/migrate.js | 105 + .../lib/commands/migrate_undo.js | 50 + .../lib/commands/migrate_undo_all.js | 45 + .../lib/commands/migration_generate.js | 35 + .../lib/commands/model_generate.js | 66 + .../sequelize-cli/lib/commands/seed.js | 69 + .../lib/commands/seed_generate.js | 35 + .../sequelize-cli/lib/commands/seed_one.js | 63 + .../sequelize-cli/lib/core/migrator.js | 159 + node_modules/sequelize-cli/lib/core/yargs.js | 75 + .../sequelize-cli/lib/helpers/asset-helper.js | 41 + .../lib/helpers/config-helper.js | 213 + .../lib/helpers/generic-helper.js | 53 + .../sequelize-cli/lib/helpers/index.js | 19 + .../sequelize-cli/lib/helpers/init-helper.js | 83 + .../lib/helpers/migration-helper.js | 39 + .../sequelize-cli/lib/helpers/model-helper.js | 104 + .../sequelize-cli/lib/helpers/path-helper.js | 100 + .../lib/helpers/template-helper.js | 34 + .../sequelize-cli/lib/helpers/umzug-helper.js | 67 + .../lib/helpers/version-helper.js | 50 + .../sequelize-cli/lib/helpers/view-helper.js | 73 + node_modules/sequelize-cli/lib/sequelize | 83 + .../node_modules/.bin/css-beautify | 1 + .../node_modules/.bin/html-beautify | 1 + .../node_modules/.bin/js-beautify | 1 + node_modules/sequelize-cli/package.json | 82 + .../sequelize-cli/scripts/mocha-bootload.js | 1 + .../src/assets/migrations/create-table.js | 35 + .../src/assets/migrations/skeleton.js | 23 + .../sequelize-cli/src/assets/models/index.js | 37 + .../sequelize-cli/src/assets/models/model.js | 18 + .../src/assets/seeders/skeleton.js | 26 + .../sequelize-cli/src/commands/database.js | 148 + .../sequelize-cli/src/commands/init.js | 64 + .../sequelize-cli/src/commands/migrate.js | 97 + .../src/commands/migrate_undo.js | 41 + .../src/commands/migrate_undo_all.js | 36 + .../src/commands/migration_generate.js | 36 + .../src/commands/model_generate.js | 82 + .../sequelize-cli/src/commands/seed.js | 55 + .../src/commands/seed_generate.js | 34 + .../sequelize-cli/src/commands/seed_one.js | 45 + .../sequelize-cli/src/core/migrator.js | 152 + node_modules/sequelize-cli/src/core/yargs.js | 70 + .../sequelize-cli/src/helpers/asset-helper.js | 32 + .../src/helpers/config-helper.js | 203 + .../src/helpers/generic-helper.js | 44 + .../sequelize-cli/src/helpers/index.js | 13 + .../sequelize-cli/src/helpers/init-helper.js | 80 + .../src/helpers/migration-helper.js | 30 + .../sequelize-cli/src/helpers/model-helper.js | 98 + .../sequelize-cli/src/helpers/path-helper.js | 103 + .../src/helpers/template-helper.js | 22 + .../sequelize-cli/src/helpers/umzug-helper.js | 55 + .../src/helpers/version-helper.js | 41 + .../sequelize-cli/src/helpers/view-helper.js | 67 + node_modules/sequelize-cli/src/sequelize.js | 66 + .../sequelize-cli/test/db/db-create.test.js | 197 + .../sequelize-cli/test/db/db-drop.test.js | 65 + .../test/db/migrate-json.test.js | 120 + .../sequelize-cli/test/db/migrate.test.js | 434 + .../db/migrate/schema/add_timestamps.test.js | 110 + .../test/db/migrate/status.test.js | 26 + .../test/db/migrate/undo.test.js | 97 + .../test/db/migrate/undo/all.test.js | 69 + .../test/db/migrate/undo/all_to.test.js | 81 + .../sequelize-cli/test/db/seed-json.test.js | 96 + .../sequelize-cli/test/db/seed.test.js | 115 + .../sequelize-cli/test/db/seed/all.test.js | 106 + .../sequelize-cli/test/db/seed/undo.test.js | 59 + .../test/db/seed/undo/all.test.js | 89 + .../test/environment-variable.test.js | 32 + node_modules/sequelize-cli/test/init.test.js | 129 + .../test/migration/create.test.js | 56 + .../sequelize-cli/test/model/create.test.js | 261 + .../sequelize-cli/test/options.test.js | 60 + .../sequelize-cli/test/seed/create.test.js | 58 + .../migrations/20111117063700-createPerson.js | 21 + .../20111130161100-emptyMigration.js | 10 + .../20111205064000-renamePersonToUser.js | 13 + ...20111205162700-addSignatureColumnToUser.js | 50 + ...0111205167000-addUniqueNameColumnToUser.js | 25 + ...111206061400-removeShopIdColumnFromUser.js | 16 + ...-changeSignatureColumnOfUserToMendatory.js | 17 + ...163300-renameSignatureColumnOfUserToSig.js | 13 + ...0130909174103-createFunctionGetAnAnswer.js | 12 + ...3-renameFunctionGetAnAnswerGetTheAnswer.js | 12 + ...130909175000-deleteFunctionGetTheAnswer.js | 12 + ...0130909175939-createTestTableForTrigger.js | 23 + ...9180846-createTriggerOnTriggerTestTable.js | 22 + ...renameTriggerUpdatedAtToUpdateUpdatedAt.js | 12 + ...0909185621-deleteTriggerUpdateUpdatedAt.js | 23 + .../migrations/20170526153000-createPost.js | 17 + .../invalid/20141208213500-createPerson.js | 13 + .../new/20141208213500-createPerson.js | 17 + .../test/support/assets/project.js | 7 + .../seeders/20111117063700-seedPerson.js | 18 + .../seeders/20111117063900-seedPerson2.js | 19 + .../seeders/new/20141208213500-seedPerson.js | 16 + .../test/support/config/config.js | 56 + .../test/support/config/options.js | 8 + .../sequelize-cli/test/support/helpers.js | 218 + .../sequelize-cli/test/support/index.js | 266 + .../sequelize-cli/test/support/tmp/.gitkeep | 0 .../test/support/tmp/config/config.js | 1 + .../migrations/20141208213500-createPerson.js | 13 + .../test/support/tmp/models/index.js | 37 + .../test/support/tmp/test.sqlite | Bin 0 -> 12288 bytes node_modules/sequelize-cli/test/url.test.js | 61 + .../sequelize-cli/test/version.test.js | 21 + node_modules/sequelize-pool/LICENSE | 50 + node_modules/sequelize-pool/README.md | 130 + node_modules/sequelize-pool/lib/Deferred.js | 45 + node_modules/sequelize-pool/lib/Pool.js | 487 + .../sequelize-pool/lib/TimeoutError.js | 5 + node_modules/sequelize-pool/package.json | 38 + node_modules/sequelize/LICENSE | 21 + node_modules/sequelize/README.md | 74 + node_modules/sequelize/index.js | 8 + .../sequelize/lib/associations/base.js | 144 + .../lib/associations/belongs-to-many.js | 781 + .../sequelize/lib/associations/belongs-to.js | 252 + .../sequelize/lib/associations/has-many.js | 487 + .../sequelize/lib/associations/has-one.js | 280 + .../sequelize/lib/associations/helpers.js | 69 + .../sequelize/lib/associations/index.js | 12 + .../sequelize/lib/associations/mixin.js | 124 + node_modules/sequelize/lib/data-types.js | 1052 ++ node_modules/sequelize/lib/deferrable.js | 103 + .../dialects/abstract/connection-manager.js | 346 + .../sequelize/lib/dialects/abstract/index.js | 71 + .../lib/dialects/abstract/query-generator.js | 2532 +++ .../abstract/query-generator/helpers/quote.js | 87 + .../abstract/query-generator/operators.js | 84 + .../abstract/query-generator/transaction.js | 80 + .../sequelize/lib/dialects/abstract/query.js | 727 + .../dialects/mariadb/connection-manager.js | 145 + .../lib/dialects/mariadb/data-types.js | 122 + .../sequelize/lib/dialects/mariadb/index.js | 60 + .../lib/dialects/mariadb/query-generator.js | 104 + .../sequelize/lib/dialects/mariadb/query.js | 324 + .../lib/dialects/mssql/connection-manager.js | 180 + .../lib/dialects/mssql/data-types.js | 216 + .../sequelize/lib/dialects/mssql/index.js | 63 + .../lib/dialects/mssql/query-generator.js | 899 + .../lib/dialects/mssql/query-interface.js | 68 + .../sequelize/lib/dialects/mssql/query.js | 384 + .../lib/dialects/mssql/resource-lock.js | 25 + .../lib/dialects/mysql/connection-manager.js | 159 + .../lib/dialects/mysql/data-types.js | 140 + .../sequelize/lib/dialects/mysql/index.js | 59 + .../lib/dialects/mysql/query-generator.js | 552 + .../lib/dialects/mysql/query-interface.js | 91 + .../sequelize/lib/dialects/mysql/query.js | 278 + .../sequelize/lib/dialects/parserStore.js | 23 + .../dialects/postgres/connection-manager.js | 320 + .../lib/dialects/postgres/data-types.js | 526 + .../sequelize/lib/dialects/postgres/hstore.js | 15 + .../sequelize/lib/dialects/postgres/index.js | 70 + .../lib/dialects/postgres/query-generator.js | 902 + .../lib/dialects/postgres/query-interface.js | 110 + .../sequelize/lib/dialects/postgres/query.js | 370 + .../sequelize/lib/dialects/postgres/range.js | 79 + .../lib/dialects/sqlite/connection-manager.js | 92 + .../lib/dialects/sqlite/data-types.js | 213 + .../sequelize/lib/dialects/sqlite/index.js | 56 + .../lib/dialects/sqlite/query-generator.js | 503 + .../lib/dialects/sqlite/query-interface.js | 207 + .../sequelize/lib/dialects/sqlite/query.js | 457 + .../sequelize/lib/errors/association-error.js | 16 + .../sequelize/lib/errors/base-error.js | 18 + .../sequelize/lib/errors/bulk-record-error.js | 22 + .../sequelize/lib/errors/connection-error.js | 22 + .../errors/connection/access-denied-error.js | 16 + .../connection-acquire-timeout-error.js | 16 + .../connection/connection-refused-error.js | 16 + .../connection/connection-timed-out-error.js | 16 + .../errors/connection/host-not-found-error.js | 16 + .../connection/host-not-reachable-error.js | 16 + .../connection/invalid-connection-error.js | 16 + .../sequelize/lib/errors/database-error.js | 29 + .../database/exclusion-constraint-error.js | 24 + .../database/foreign-key-constraint-error.js | 26 + .../lib/errors/database/timeout-error.js | 16 + .../database/unknown-constraint-error.js | 24 + .../lib/errors/eager-loading-error.js | 16 + .../lib/errors/empty-result-error.js | 16 + node_modules/sequelize/lib/errors/index.js | 31 + .../sequelize/lib/errors/instance-error.js | 16 + .../lib/errors/optimistic-lock-error.js | 33 + .../sequelize/lib/errors/query-error.js | 16 + .../lib/errors/sequelize-scope-error.js | 16 + .../sequelize/lib/errors/validation-error.js | 209 + .../validation/unique-constraint-error.js | 26 + node_modules/sequelize/lib/hooks.js | 557 + node_modules/sequelize/lib/index-hints.js | 14 + .../sequelize/lib/instance-validator.js | 431 + node_modules/sequelize/lib/model-manager.js | 98 + node_modules/sequelize/lib/model.js | 4366 +++++ node_modules/sequelize/lib/operators.js | 90 + node_modules/sequelize/lib/promise.js | 7 + node_modules/sequelize/lib/query-interface.js | 1455 ++ node_modules/sequelize/lib/query-types.js | 38 + node_modules/sequelize/lib/sequelize.js | 1371 ++ node_modules/sequelize/lib/sql-string.js | 124 + node_modules/sequelize/lib/table-hints.js | 38 + node_modules/sequelize/lib/transaction.js | 316 + node_modules/sequelize/lib/utils.js | 637 + .../sequelize/lib/utils/classToInvokable.js | 24 + .../sequelize/lib/utils/deprecations.js | 11 + node_modules/sequelize/lib/utils/logger.js | 39 + .../sequelize/lib/utils/validator-extras.js | 102 + .../sequelize/node_modules/.bin/semver | 1 + node_modules/sequelize/node_modules/.bin/uuid | 1 + .../sequelize/node_modules/debug/CHANGELOG.md | 395 + .../sequelize/node_modules/debug/LICENSE | 19 + .../sequelize/node_modules/debug/README.md | 455 + .../node_modules/debug/dist/debug.js | 912 + .../sequelize/node_modules/debug/package.json | 63 + .../node_modules/debug/src/browser.js | 264 + .../node_modules/debug/src/common.js | 266 + .../sequelize/node_modules/debug/src/index.js | 10 + .../sequelize/node_modules/debug/src/node.js | 257 + .../node_modules/semver/CHANGELOG.md | 47 + .../sequelize/node_modules/semver/LICENSE | 15 + .../sequelize/node_modules/semver/README.md | 443 + .../node_modules/semver/bin/.semver.js.swp | Bin 0 -> 16384 bytes .../node_modules/semver/bin/semver.js | 174 + .../node_modules/semver/package.json | 28 + .../sequelize/node_modules/semver/range.bnf | 16 + .../sequelize/node_modules/semver/semver.js | 1589 ++ node_modules/sequelize/package.json | 165 + node_modules/sequelize/types/index.d.ts | 20 + .../types/lib/associations/base.d.ts | 116 + .../lib/associations/belongs-to-many.d.ts | 468 + .../types/lib/associations/belongs-to.d.ts | 124 + .../types/lib/associations/has-many.d.ts | 398 + .../types/lib/associations/has-one.d.ts | 120 + .../types/lib/associations/index.d.ts | 5 + .../types/lib/connection-manager.d.ts | 36 + .../sequelize/types/lib/data-types.d.ts | 610 + .../sequelize/types/lib/deferrable.d.ts | 105 + node_modules/sequelize/types/lib/errors.d.ts | 176 + node_modules/sequelize/types/lib/hooks.d.ts | 110 + .../sequelize/types/lib/index-hints.d.ts | 10 + .../types/lib/instance-validator.d.ts | 15 + .../sequelize/types/lib/model-manager.d.ts | 15 + node_modules/sequelize/types/lib/model.d.ts | 2713 +++ .../sequelize/types/lib/operators.d.ts | 44 + node_modules/sequelize/types/lib/promise.d.ts | 6 + .../sequelize/types/lib/query-interface.d.ts | 640 + .../sequelize/types/lib/query-types.d.ts | 17 + .../sequelize/types/lib/sequelize.d.ts | 1441 ++ .../sequelize/types/lib/sql-string.d.ts | 5 + .../sequelize/types/lib/table-hints.d.ts | 19 + .../sequelize/types/lib/transaction.d.ts | 138 + node_modules/sequelize/types/lib/utils.d.ts | 119 + .../sequelize/types/lib/utils/logger.d.ts | 18 + .../types/lib/utils/validator-extras.d.ts | 27 + node_modules/shimmer/.travis.yml | 7 + node_modules/shimmer/LICENSE | 25 + node_modules/shimmer/README.md | 80 + node_modules/shimmer/index.js | 121 + node_modules/shimmer/package.json | 28 + node_modules/shimmer/test/init.tap.js | 48 + node_modules/shimmer/test/massUnwrap.tap.js | 121 + node_modules/shimmer/test/massWrap.tap.js | 174 + node_modules/shimmer/test/unwrap.tap.js | 101 + node_modules/shimmer/test/wrap.tap.js | 148 + node_modules/sigmund/LICENSE | 15 + node_modules/sigmund/README.md | 53 + node_modules/sigmund/bench.js | 283 + node_modules/sigmund/package.json | 30 + node_modules/sigmund/sigmund.js | 39 + node_modules/sigmund/test/basic.js | 24 + .../node_modules => }/strip-ansi/index.d.ts | 0 node_modules/strip-ansi/index.js | 9 +- node_modules/strip-ansi/license | 20 +- .../node_modules/ansi-regex/index.js | 0 .../node_modules/ansi-regex}/license | 0 .../node_modules/ansi-regex/package.json | 0 .../node_modules/ansi-regex/readme.md | 0 node_modules/strip-ansi/package.json | 107 +- node_modules/strip-ansi/readme.md | 40 +- .../table/node_modules/ansi-regex/index.js | 14 - .../node_modules/ansi-regex/package.json | 53 - .../table/node_modules/ansi-regex/readme.md | 87 - .../table/node_modules/strip-ansi/index.d.ts | 15 - .../table/node_modules/strip-ansi/index.js | 7 - .../table/node_modules/strip-ansi/readme.md | 61 - node_modules/timers-ext/.editorconfig | 14 + node_modules/timers-ext/CHANGELOG.md | 55 + node_modules/timers-ext/CHANGES | 26 + node_modules/timers-ext/LICENSE | 15 + node_modules/timers-ext/README.md | 69 + node_modules/timers-ext/delay.js | 21 + node_modules/timers-ext/max-timeout.js | 3 + node_modules/timers-ext/once.js | 42 + node_modules/timers-ext/package.json | 42 + .../timers-ext/promise/.eslintrc.json | 3 + node_modules/timers-ext/promise/sleep.js | 21 + node_modules/timers-ext/promise_/timeout.js | 43 + node_modules/timers-ext/test/.eslintrc.json | 6 + node_modules/timers-ext/test/delay.js | 27 + node_modules/timers-ext/test/max-timeout.js | 13 + node_modules/timers-ext/test/once.js | 42 + node_modules/timers-ext/test/promise/sleep.js | 34 + .../timers-ext/test/promise_/.eslintrc.json | 3 + .../timers-ext/test/promise_/timeout.js | 46 + node_modules/timers-ext/test/throttle.js | 41 + node_modules/timers-ext/test/valid-timeout.js | 10 + node_modules/timers-ext/throttle.js | 33 + node_modules/timers-ext/valid-timeout.js | 10 + node_modules/toposort-class/.eslintrc | 35 + node_modules/toposort-class/.gitattributes | 1 + node_modules/toposort-class/.npmignore | 44 + node_modules/toposort-class/LICENSE | 21 + node_modules/toposort-class/README.md | 93 + .../benchmark/0.3.1/toposort.js | 128 + .../toposort-class/benchmark/README.md | 11 + .../toposort-class/benchmark/general.js | 56 + .../toposort-class/benchmark/results.csv | 4 + node_modules/toposort-class/build/toposort.js | 281 + .../toposort-class/build/toposort.min.js | 1 + node_modules/toposort-class/index.js | 1 + node_modules/toposort-class/package.json | 46 + node_modules/touch/node_modules/.bin/nopt | 2 +- .../touch/node_modules/nopt/.gitignore | 0 node_modules/touch/node_modules/nopt/LICENSE | 23 + .../node_modules/nopt/README.md | 87 +- .../node_modules/nopt/bin/nopt.js | 14 +- .../node_modules/nopt/examples/my-program.js | 0 .../node_modules/nopt/lib/nopt.js | 352 +- .../touch/node_modules/nopt/package.json | 12 + node_modules/type/.editorconfig | 15 + node_modules/type/.prettierrc.js | 3 + node_modules/type/CHANGELOG.md | 62 + node_modules/type/README.md | 743 + node_modules/type/array-length/coerce.js | 10 + node_modules/type/array-length/ensure.js | 10 + node_modules/type/array-like/ensure.js | 9 + node_modules/type/array-like/is.js | 21 + node_modules/type/array/ensure.js | 9 + node_modules/type/array/is.js | 27 + node_modules/type/date/ensure.js | 9 + node_modules/type/date/is.js | 26 + node_modules/type/error/ensure.js | 9 + node_modules/type/error/is.js | 24 + node_modules/type/finite/coerce.js | 8 + node_modules/type/finite/ensure.js | 10 + node_modules/type/function/ensure.js | 9 + node_modules/type/function/is.js | 19 + node_modules/type/integer/coerce.js | 11 + node_modules/type/integer/ensure.js | 10 + node_modules/type/iterable/ensure.js | 9 + node_modules/type/iterable/is.js | 20 + .../type/lib/is-to-string-tag-supported.js | 3 + node_modules/type/lib/resolve-exception.js | 21 + node_modules/type/lib/safe-to-string.js | 10 + node_modules/type/lib/to-short-string.js | 29 + node_modules/type/natural-number/coerce.js | 10 + node_modules/type/natural-number/ensure.js | 10 + node_modules/type/number/coerce.js | 14 + node_modules/type/number/ensure.js | 10 + node_modules/type/object/ensure.js | 9 + node_modules/type/object/is.js | 11 + node_modules/type/package.json | 82 + node_modules/type/plain-function/ensure.js | 9 + node_modules/type/plain-function/is.js | 11 + node_modules/type/plain-object/ensure.js | 9 + node_modules/type/plain-object/is.js | 28 + node_modules/type/promise/ensure.js | 9 + node_modules/type/promise/is.js | 27 + node_modules/type/prototype/is.js | 13 + node_modules/type/reg-exp/ensure.js | 9 + node_modules/type/reg-exp/is.js | 37 + node_modules/type/safe-integer/coerce.js | 13 + node_modules/type/safe-integer/ensure.js | 10 + node_modules/type/string/coerce.js | 23 + node_modules/type/string/ensure.js | 10 + .../test/_lib/arrow-function-if-supported.js | 4 + .../type/test/_lib/class-if-supported.js | 4 + node_modules/type/test/array-length/coerce.js | 47 + node_modules/type/test/array-length/ensure.js | 19 + node_modules/type/test/array-like/ensure.js | 24 + node_modules/type/test/array-like/is.js | 47 + node_modules/type/test/array/ensure.js | 20 + node_modules/type/test/array/is.js | 41 + node_modules/type/test/date/ensure.js | 20 + node_modules/type/test/date/is.js | 46 + node_modules/type/test/error/ensure.js | 20 + node_modules/type/test/error/is.js | 42 + node_modules/type/test/finite/coerce.js | 40 + node_modules/type/test/finite/ensure.js | 17 + node_modules/type/test/function/ensure.js | 20 + node_modules/type/test/function/is.js | 46 + node_modules/type/test/integer/coerce.js | 49 + node_modules/type/test/integer/ensure.js | 17 + node_modules/type/test/iterable/ensure.js | 24 + node_modules/type/test/iterable/is.js | 50 + .../test/lib/is-to-string-tag-supported.js | 10 + .../type/test/lib/resolve-exception.js | 39 + node_modules/type/test/lib/safe-to-string.js | 32 + node_modules/type/test/lib/to-short-string.js | 41 + .../type/test/natural-number/coerce.js | 47 + .../type/test/natural-number/ensure.js | 19 + node_modules/type/test/number/coerce.js | 40 + node_modules/type/test/number/ensure.js | 17 + node_modules/type/test/object/ensure.js | 20 + node_modules/type/test/object/is.js | 30 + .../type/test/plain-function/ensure.js | 20 + node_modules/type/test/plain-function/is.js | 56 + node_modules/type/test/plain-object/ensure.js | 20 + node_modules/type/test/plain-object/is.js | 47 + node_modules/type/test/promise/ensure.js | 20 + node_modules/type/test/promise/is.js | 39 + node_modules/type/test/prototype/is.js | 39 + node_modules/type/test/reg-exp/ensure.js | 20 + node_modules/type/test/reg-exp/is.js | 47 + node_modules/type/test/safe-integer/coerce.js | 49 + node_modules/type/test/safe-integer/ensure.js | 19 + node_modules/type/test/string/coerce.js | 36 + node_modules/type/test/string/ensure.js | 17 + node_modules/type/test/thenable/ensure.js | 20 + node_modules/type/test/thenable/is.js | 44 + node_modules/type/test/time-value/coerce.js | 47 + node_modules/type/test/time-value/ensure.js | 17 + node_modules/type/test/value/ensure.js | 20 + node_modules/type/test/value/is.js | 29 + node_modules/type/thenable/ensure.js | 9 + node_modules/type/thenable/is.js | 9 + node_modules/type/time-value/coerce.js | 12 + node_modules/type/time-value/ensure.js | 10 + node_modules/type/value/ensure.js | 9 + node_modules/type/value/is.js | 6 + node_modules/umzug/.babelrc | 15 + node_modules/umzug/.eslintrc.json | 31 + node_modules/umzug/.travis.yml | 23 + node_modules/umzug/CHANGELOG.md | 135 + node_modules/umzug/Dockerfile | 5 + node_modules/umzug/LICENSE | 21 + node_modules/umzug/README.md | 380 + node_modules/umzug/docker-compose.yml | 13 + node_modules/umzug/lib/helper.js | 27 + node_modules/umzug/lib/index.js | 565 + node_modules/umzug/lib/migration.js | 138 + .../umzug/lib/storages/JSONStorage.js | 91 + .../umzug/lib/storages/MongoDBStorage.js | 70 + .../umzug/lib/storages/SequelizeStorage.js | 161 + node_modules/umzug/lib/storages/Storage.js | 46 + node_modules/umzug/lib/storages/json.js | 11 + node_modules/umzug/lib/storages/none.js | 11 + node_modules/umzug/lib/storages/sequelize.js | 11 + node_modules/umzug/package.json | 70 + node_modules/universalify/LICENSE | 20 + node_modules/universalify/README.md | 76 + node_modules/universalify/index.js | 25 + node_modules/universalify/package.json | 34 + node_modules/uuid/.eslintrc.json | 47 + node_modules/uuid/AUTHORS | 5 + node_modules/uuid/CHANGELOG.md | 110 + node_modules/uuid/LICENSE.md | 21 + node_modules/uuid/README.md | 293 + node_modules/uuid/README_js.md | 280 + node_modules/uuid/bin/uuid | 65 + node_modules/uuid/index.js | 8 + node_modules/uuid/lib/bytesToUuid.js | 24 + node_modules/uuid/lib/md5-browser.js | 216 + node_modules/uuid/lib/md5.js | 25 + node_modules/uuid/lib/rng-browser.js | 34 + node_modules/uuid/lib/rng.js | 8 + node_modules/uuid/lib/sha1-browser.js | 89 + node_modules/uuid/lib/sha1.js | 25 + node_modules/uuid/lib/v35.js | 57 + node_modules/uuid/package.json | 44 + node_modules/uuid/v1.js | 109 + node_modules/uuid/v3.js | 4 + node_modules/uuid/v4.js | 29 + node_modules/uuid/v5.js | 3 + node_modules/validator/CHANGELOG.md | 558 + node_modules/validator/LICENSE | 20 + node_modules/validator/README.md | 234 + node_modules/validator/index.js | 243 + node_modules/validator/lib/alpha.js | 109 + node_modules/validator/lib/blacklist.js | 18 + node_modules/validator/lib/contains.js | 20 + node_modules/validator/lib/equals.js | 18 + node_modules/validator/lib/escape.js | 18 + node_modules/validator/lib/isAfter.js | 23 + node_modules/validator/lib/isAlpha.js | 27 + node_modules/validator/lib/isAlphanumeric.js | 27 + node_modules/validator/lib/isAscii.js | 22 + node_modules/validator/lib/isBase64.js | 27 + node_modules/validator/lib/isBefore.js | 23 + node_modules/validator/lib/isBoolean.js | 18 + node_modules/validator/lib/isByteLength.js | 34 + node_modules/validator/lib/isCreditCard.js | 52 + node_modules/validator/lib/isCurrency.js | 89 + node_modules/validator/lib/isDataURI.js | 54 + node_modules/validator/lib/isDecimal.js | 42 + node_modules/validator/lib/isDivisibleBy.js | 20 + node_modules/validator/lib/isEmail.js | 133 + node_modules/validator/lib/isEmpty.js | 25 + node_modules/validator/lib/isFQDN.js | 75 + node_modules/validator/lib/isFloat.js | 29 + node_modules/validator/lib/isFullWidth.js | 19 + node_modules/validator/lib/isHalfWidth.js | 19 + node_modules/validator/lib/isHash.js | 35 + node_modules/validator/lib/isHexColor.js | 20 + node_modules/validator/lib/isHexadecimal.js | 20 + node_modules/validator/lib/isIP.js | 86 + node_modules/validator/lib/isIPRange.js | 37 + node_modules/validator/lib/isISBN.js | 65 + node_modules/validator/lib/isISIN.js | 52 + .../validator/lib/isISO31661Alpha2.js | 23 + .../validator/lib/isISO31661Alpha3.js | 23 + node_modules/validator/lib/isISO8601.js | 58 + node_modules/validator/lib/isISRC.js | 21 + node_modules/validator/lib/isISSN.js | 37 + node_modules/validator/lib/isIdentityCard.js | 61 + node_modules/validator/lib/isIn.js | 40 + node_modules/validator/lib/isInt.js | 30 + node_modules/validator/lib/isJSON.js | 28 + node_modules/validator/lib/isJWT.js | 20 + node_modules/validator/lib/isLatLong.js | 23 + node_modules/validator/lib/isLength.js | 35 + node_modules/validator/lib/isLowercase.js | 18 + node_modules/validator/lib/isMACAddress.js | 26 + node_modules/validator/lib/isMD5.js | 20 + node_modules/validator/lib/isMagnetURI.js | 20 + node_modules/validator/lib/isMimeType.js | 51 + node_modules/validator/lib/isMobilePhone.js | 132 + node_modules/validator/lib/isMongoId.js | 20 + node_modules/validator/lib/isMultibyte.js | 22 + node_modules/validator/lib/isNumeric.js | 26 + node_modules/validator/lib/isPort.js | 20 + node_modules/validator/lib/isPostalCode.js | 89 + node_modules/validator/lib/isRFC3339.js | 33 + node_modules/validator/lib/isSurrogatePair.js | 20 + node_modules/validator/lib/isURL.js | 152 + node_modules/validator/lib/isUUID.js | 27 + node_modules/validator/lib/isUppercase.js | 18 + node_modules/validator/lib/isVariableWidth.js | 22 + node_modules/validator/lib/isWhitelisted.js | 25 + node_modules/validator/lib/ltrim.js | 19 + node_modules/validator/lib/matches.js | 23 + node_modules/validator/lib/normalizeEmail.js | 151 + node_modules/validator/lib/rtrim.js | 25 + node_modules/validator/lib/stripLow.js | 21 + node_modules/validator/lib/toBoolean.js | 23 + node_modules/validator/lib/toDate.js | 19 + node_modules/validator/lib/toFloat.js | 18 + node_modules/validator/lib/toInt.js | 18 + node_modules/validator/lib/trim.js | 19 + node_modules/validator/lib/unescape.js | 18 + .../validator/lib/util/assertString.js | 33 + node_modules/validator/lib/util/includes.js | 17 + node_modules/validator/lib/util/merge.js | 22 + node_modules/validator/lib/util/toString.js | 25 + node_modules/validator/lib/whitelist.js | 18 + node_modules/validator/package.json | 71 + node_modules/validator/validator.js | 2098 +++ node_modules/validator/validator.min.js | 23 + node_modules/which-module/CHANGELOG.md | 26 + node_modules/which-module/LICENSE | 13 + node_modules/which-module/README.md | 55 + node_modules/which-module/index.js | 9 + node_modules/which-module/package.json | 41 + node_modules/wkx/LICENSE.txt | 20 + node_modules/wkx/README.md | 92 + node_modules/wkx/dist/wkx.js | 4988 ++++++ node_modules/wkx/dist/wkx.min.js | 1 + node_modules/wkx/lib/binaryreader.js | 47 + node_modules/wkx/lib/binarywriter.js | 65 + node_modules/wkx/lib/geometry.js | 384 + node_modules/wkx/lib/geometrycollection.js | 169 + node_modules/wkx/lib/linestring.js | 178 + node_modules/wkx/lib/multilinestring.js | 189 + node_modules/wkx/lib/multipoint.js | 172 + node_modules/wkx/lib/multipolygon.js | 226 + node_modules/wkx/lib/point.js | 217 + node_modules/wkx/lib/polygon.js | 288 + node_modules/wkx/lib/types.js | 29 + node_modules/wkx/lib/wktparser.js | 124 + node_modules/wkx/lib/wkx.d.ts | 100 + node_modules/wkx/lib/wkx.js | 9 + node_modules/wkx/lib/zigzag.js | 8 + node_modules/wkx/package.json | 50 + node_modules/wrap-ansi/index.js | 188 + .../ansi-regex => wrap-ansi}/license | 0 .../node_modules/string-width/index.js | 39 + .../node_modules/string-width}/license | 0 .../node_modules/string-width/package.json | 56 + .../node_modules/string-width/readme.md | 45 + .../strip-ansi => wrap-ansi}/package.json | 33 +- node_modules/wrap-ansi/readme.md | 108 + node_modules/y18n/CHANGELOG.md | 21 + node_modules/y18n/LICENSE | 13 + node_modules/y18n/README.md | 109 + node_modules/y18n/index.js | 188 + node_modules/y18n/package.json | 39 + node_modules/yargs-parser/CHANGELOG.md | 467 + node_modules/yargs-parser/LICENSE.txt | 14 + node_modules/yargs-parser/README.md | 396 + node_modules/yargs-parser/index.js | 903 + .../yargs-parser/lib/tokenize-arg-string.js | 40 + .../node_modules/camelcase/index.d.ts | 63 + .../node_modules/camelcase/index.js | 76 + .../node_modules/camelcase/license | 9 + .../node_modules/camelcase/package.json | 43 + .../node_modules/camelcase/readme.md | 99 + node_modules/yargs-parser/package.json | 47 + node_modules/yargs/CHANGELOG.md | 1335 ++ node_modules/yargs/LICENSE | 22 + node_modules/yargs/README.md | 122 + node_modules/yargs/index.js | 32 + node_modules/yargs/lib/apply-extends.js | 53 + node_modules/yargs/lib/argsert.js | 68 + node_modules/yargs/lib/command.js | 437 + .../yargs/lib/completion-templates.js | 49 + node_modules/yargs/lib/completion.js | 115 + node_modules/yargs/lib/decamelize.js | 32 + node_modules/yargs/lib/is-promise.js | 3 + node_modules/yargs/lib/levenshtein.js | 58 + node_modules/yargs/lib/middleware.js | 65 + node_modules/yargs/lib/obj-filter.js | 11 + node_modules/yargs/lib/usage.js | 540 + node_modules/yargs/lib/validation.js | 341 + node_modules/yargs/lib/yerror.js | 11 + node_modules/yargs/locales/be.json | 39 + node_modules/yargs/locales/de.json | 39 + node_modules/yargs/locales/en.json | 42 + node_modules/yargs/locales/es.json | 39 + node_modules/yargs/locales/fr.json | 37 + node_modules/yargs/locales/hi.json | 42 + node_modules/yargs/locales/hu.json | 39 + node_modules/yargs/locales/id.json | 43 + node_modules/yargs/locales/it.json | 39 + node_modules/yargs/locales/ja.json | 42 + node_modules/yargs/locales/ko.json | 42 + node_modules/yargs/locales/nb.json | 37 + node_modules/yargs/locales/nl.json | 42 + node_modules/yargs/locales/nn.json | 39 + node_modules/yargs/locales/pirate.json | 13 + node_modules/yargs/locales/pl.json | 42 + node_modules/yargs/locales/pt.json | 38 + node_modules/yargs/locales/pt_BR.json | 42 + node_modules/yargs/locales/ru.json | 39 + node_modules/yargs/locales/th.json | 39 + node_modules/yargs/locales/tr.json | 41 + node_modules/yargs/locales/zh_CN.json | 41 + node_modules/yargs/locales/zh_TW.json | 40 + .../yargs/node_modules/find-up/index.js | 46 + .../yargs/node_modules/find-up/license | 9 + .../yargs/node_modules/find-up/package.json | 50 + .../yargs/node_modules/find-up/readme.md | 87 + .../yargs/node_modules/locate-path/index.js | 24 + .../yargs/node_modules/locate-path/license | 9 + .../node_modules/locate-path/package.json | 44 + .../yargs/node_modules/locate-path/readme.md | 99 + .../yargs/node_modules/p-limit/index.d.ts | 29 + .../yargs/node_modules/p-limit/index.js | 52 + .../yargs/node_modules/p-limit/license | 9 + .../yargs/node_modules/p-limit/package.json | 51 + .../yargs/node_modules/p-limit/readme.md | 90 + .../yargs/node_modules/p-locate/index.js | 34 + .../yargs/node_modules/p-locate/license | 9 + .../yargs/node_modules/p-locate/package.json | 51 + .../yargs/node_modules/p-locate/readme.md | 88 + .../yargs/node_modules/p-try/index.d.ts | 39 + .../yargs/node_modules/p-try/index.js | 9 + node_modules/yargs/node_modules/p-try/license | 9 + .../yargs/node_modules/p-try/package.json | 42 + .../yargs/node_modules/p-try/readme.md | 58 + .../yargs/node_modules/string-width/index.js | 39 + .../yargs/node_modules/string-width/license | 9 + .../node_modules/string-width/package.json | 56 + .../yargs/node_modules/string-width/readme.md | 45 + node_modules/yargs/package.json | 78 + node_modules/yargs/yargs.js | 1206 ++ package.json | 4 +- src/config/database.js | 12 + yarn.lock | 450 +- 4187 files changed, 301170 insertions(+), 980 deletions(-) create mode 100644 .sequelizerc create mode 120000 node_modules/.bin/css-beautify create mode 120000 node_modules/.bin/editorconfig create mode 120000 node_modules/.bin/html-beautify create mode 120000 node_modules/.bin/js-beautify create mode 120000 node_modules/.bin/sequelize create mode 120000 node_modules/.bin/uuid create mode 100644 node_modules/@types/node/LICENSE create mode 100644 node_modules/@types/node/README.md create mode 100644 node_modules/@types/node/assert.d.ts create mode 100644 node_modules/@types/node/async_hooks.d.ts create mode 100644 node_modules/@types/node/base.d.ts create mode 100644 node_modules/@types/node/buffer.d.ts create mode 100644 node_modules/@types/node/child_process.d.ts create mode 100644 node_modules/@types/node/cluster.d.ts create mode 100644 node_modules/@types/node/console.d.ts create mode 100644 node_modules/@types/node/constants.d.ts create mode 100644 node_modules/@types/node/crypto.d.ts create mode 100644 node_modules/@types/node/dgram.d.ts create mode 100644 node_modules/@types/node/dns.d.ts create mode 100644 node_modules/@types/node/domain.d.ts create mode 100644 node_modules/@types/node/events.d.ts create mode 100644 node_modules/@types/node/fs.d.ts create mode 100644 node_modules/@types/node/globals.d.ts create mode 100644 node_modules/@types/node/http.d.ts create mode 100644 node_modules/@types/node/http2.d.ts create mode 100644 node_modules/@types/node/https.d.ts create mode 100644 node_modules/@types/node/index.d.ts create mode 100644 node_modules/@types/node/inspector.d.ts create mode 100644 node_modules/@types/node/module.d.ts create mode 100644 node_modules/@types/node/net.d.ts create mode 100644 node_modules/@types/node/os.d.ts create mode 100644 node_modules/@types/node/package.json create mode 100644 node_modules/@types/node/path.d.ts create mode 100644 node_modules/@types/node/perf_hooks.d.ts create mode 100644 node_modules/@types/node/process.d.ts create mode 100644 node_modules/@types/node/punycode.d.ts create mode 100644 node_modules/@types/node/querystring.d.ts create mode 100644 node_modules/@types/node/readline.d.ts create mode 100644 node_modules/@types/node/repl.d.ts create mode 100644 node_modules/@types/node/stream.d.ts create mode 100644 node_modules/@types/node/string_decoder.d.ts create mode 100644 node_modules/@types/node/timers.d.ts create mode 100644 node_modules/@types/node/tls.d.ts create mode 100644 node_modules/@types/node/trace_events.d.ts create mode 100644 node_modules/@types/node/ts3.2/globals.d.ts create mode 100644 node_modules/@types/node/ts3.2/index.d.ts create mode 100644 node_modules/@types/node/ts3.2/util.d.ts create mode 100644 node_modules/@types/node/tty.d.ts create mode 100644 node_modules/@types/node/url.d.ts create mode 100644 node_modules/@types/node/util.d.ts create mode 100644 node_modules/@types/node/v8.d.ts create mode 100644 node_modules/@types/node/vm.d.ts create mode 100644 node_modules/@types/node/worker_threads.d.ts create mode 100644 node_modules/@types/node/zlib.d.ts create mode 100644 node_modules/babel-runtime/.npmignore create mode 100644 node_modules/babel-runtime/README.md create mode 100644 node_modules/babel-runtime/core-js.js create mode 100644 node_modules/babel-runtime/core-js/array/concat.js create mode 100644 node_modules/babel-runtime/core-js/array/copy-within.js create mode 100644 node_modules/babel-runtime/core-js/array/entries.js create mode 100644 node_modules/babel-runtime/core-js/array/every.js create mode 100644 node_modules/babel-runtime/core-js/array/fill.js create mode 100644 node_modules/babel-runtime/core-js/array/filter.js create mode 100644 node_modules/babel-runtime/core-js/array/find-index.js create mode 100644 node_modules/babel-runtime/core-js/array/find.js create mode 100644 node_modules/babel-runtime/core-js/array/for-each.js create mode 100644 node_modules/babel-runtime/core-js/array/from.js create mode 100644 node_modules/babel-runtime/core-js/array/includes.js create mode 100644 node_modules/babel-runtime/core-js/array/index-of.js create mode 100644 node_modules/babel-runtime/core-js/array/join.js create mode 100644 node_modules/babel-runtime/core-js/array/keys.js create mode 100644 node_modules/babel-runtime/core-js/array/last-index-of.js create mode 100644 node_modules/babel-runtime/core-js/array/map.js create mode 100644 node_modules/babel-runtime/core-js/array/of.js create mode 100644 node_modules/babel-runtime/core-js/array/pop.js create mode 100644 node_modules/babel-runtime/core-js/array/push.js create mode 100644 node_modules/babel-runtime/core-js/array/reduce-right.js create mode 100644 node_modules/babel-runtime/core-js/array/reduce.js create mode 100644 node_modules/babel-runtime/core-js/array/reverse.js create mode 100644 node_modules/babel-runtime/core-js/array/shift.js create mode 100644 node_modules/babel-runtime/core-js/array/slice.js create mode 100644 node_modules/babel-runtime/core-js/array/some.js create mode 100644 node_modules/babel-runtime/core-js/array/sort.js create mode 100644 node_modules/babel-runtime/core-js/array/splice.js create mode 100644 node_modules/babel-runtime/core-js/array/unshift.js create mode 100644 node_modules/babel-runtime/core-js/array/values.js create mode 100644 node_modules/babel-runtime/core-js/asap.js create mode 100644 node_modules/babel-runtime/core-js/clear-immediate.js create mode 100644 node_modules/babel-runtime/core-js/error/is-error.js create mode 100644 node_modules/babel-runtime/core-js/get-iterator.js create mode 100644 node_modules/babel-runtime/core-js/is-iterable.js create mode 100644 node_modules/babel-runtime/core-js/json/stringify.js create mode 100644 node_modules/babel-runtime/core-js/map.js create mode 100644 node_modules/babel-runtime/core-js/math/acosh.js create mode 100644 node_modules/babel-runtime/core-js/math/asinh.js create mode 100644 node_modules/babel-runtime/core-js/math/atanh.js create mode 100644 node_modules/babel-runtime/core-js/math/cbrt.js create mode 100644 node_modules/babel-runtime/core-js/math/clz32.js create mode 100644 node_modules/babel-runtime/core-js/math/cosh.js create mode 100644 node_modules/babel-runtime/core-js/math/expm1.js create mode 100644 node_modules/babel-runtime/core-js/math/fround.js create mode 100644 node_modules/babel-runtime/core-js/math/hypot.js create mode 100644 node_modules/babel-runtime/core-js/math/iaddh.js create mode 100644 node_modules/babel-runtime/core-js/math/imul.js create mode 100644 node_modules/babel-runtime/core-js/math/imulh.js create mode 100644 node_modules/babel-runtime/core-js/math/isubh.js create mode 100644 node_modules/babel-runtime/core-js/math/log10.js create mode 100644 node_modules/babel-runtime/core-js/math/log1p.js create mode 100644 node_modules/babel-runtime/core-js/math/log2.js create mode 100644 node_modules/babel-runtime/core-js/math/sign.js create mode 100644 node_modules/babel-runtime/core-js/math/sinh.js create mode 100644 node_modules/babel-runtime/core-js/math/tanh.js create mode 100644 node_modules/babel-runtime/core-js/math/trunc.js create mode 100644 node_modules/babel-runtime/core-js/math/umulh.js create mode 100644 node_modules/babel-runtime/core-js/number/epsilon.js create mode 100644 node_modules/babel-runtime/core-js/number/is-finite.js create mode 100644 node_modules/babel-runtime/core-js/number/is-integer.js create mode 100644 node_modules/babel-runtime/core-js/number/is-nan.js create mode 100644 node_modules/babel-runtime/core-js/number/is-safe-integer.js create mode 100644 node_modules/babel-runtime/core-js/number/max-safe-integer.js create mode 100644 node_modules/babel-runtime/core-js/number/min-safe-integer.js create mode 100644 node_modules/babel-runtime/core-js/number/parse-float.js create mode 100644 node_modules/babel-runtime/core-js/number/parse-int.js create mode 100644 node_modules/babel-runtime/core-js/object/assign.js create mode 100644 node_modules/babel-runtime/core-js/object/create.js create mode 100644 node_modules/babel-runtime/core-js/object/define-properties.js create mode 100644 node_modules/babel-runtime/core-js/object/define-property.js create mode 100644 node_modules/babel-runtime/core-js/object/entries.js create mode 100644 node_modules/babel-runtime/core-js/object/freeze.js create mode 100644 node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js create mode 100644 node_modules/babel-runtime/core-js/object/get-own-property-descriptors.js create mode 100644 node_modules/babel-runtime/core-js/object/get-own-property-names.js create mode 100644 node_modules/babel-runtime/core-js/object/get-own-property-symbols.js create mode 100644 node_modules/babel-runtime/core-js/object/get-prototype-of.js create mode 100644 node_modules/babel-runtime/core-js/object/is-extensible.js create mode 100644 node_modules/babel-runtime/core-js/object/is-frozen.js create mode 100644 node_modules/babel-runtime/core-js/object/is-sealed.js create mode 100644 node_modules/babel-runtime/core-js/object/is.js create mode 100644 node_modules/babel-runtime/core-js/object/keys.js create mode 100644 node_modules/babel-runtime/core-js/object/prevent-extensions.js create mode 100644 node_modules/babel-runtime/core-js/object/seal.js create mode 100644 node_modules/babel-runtime/core-js/object/set-prototype-of.js create mode 100644 node_modules/babel-runtime/core-js/object/values.js create mode 100644 node_modules/babel-runtime/core-js/observable.js create mode 100644 node_modules/babel-runtime/core-js/promise.js create mode 100644 node_modules/babel-runtime/core-js/reflect/apply.js create mode 100644 node_modules/babel-runtime/core-js/reflect/construct.js create mode 100644 node_modules/babel-runtime/core-js/reflect/define-metadata.js create mode 100644 node_modules/babel-runtime/core-js/reflect/define-property.js create mode 100644 node_modules/babel-runtime/core-js/reflect/delete-metadata.js create mode 100644 node_modules/babel-runtime/core-js/reflect/delete-property.js create mode 100644 node_modules/babel-runtime/core-js/reflect/enumerate.js create mode 100644 node_modules/babel-runtime/core-js/reflect/get-metadata-keys.js create mode 100644 node_modules/babel-runtime/core-js/reflect/get-metadata.js create mode 100644 node_modules/babel-runtime/core-js/reflect/get-own-metadata-keys.js create mode 100644 node_modules/babel-runtime/core-js/reflect/get-own-metadata.js create mode 100644 node_modules/babel-runtime/core-js/reflect/get-own-property-descriptor.js create mode 100644 node_modules/babel-runtime/core-js/reflect/get-prototype-of.js create mode 100644 node_modules/babel-runtime/core-js/reflect/get.js create mode 100644 node_modules/babel-runtime/core-js/reflect/has-metadata.js create mode 100644 node_modules/babel-runtime/core-js/reflect/has-own-metadata.js create mode 100644 node_modules/babel-runtime/core-js/reflect/has.js create mode 100644 node_modules/babel-runtime/core-js/reflect/is-extensible.js create mode 100644 node_modules/babel-runtime/core-js/reflect/metadata.js create mode 100644 node_modules/babel-runtime/core-js/reflect/own-keys.js create mode 100644 node_modules/babel-runtime/core-js/reflect/prevent-extensions.js create mode 100644 node_modules/babel-runtime/core-js/reflect/set-prototype-of.js create mode 100644 node_modules/babel-runtime/core-js/reflect/set.js create mode 100644 node_modules/babel-runtime/core-js/regexp/escape.js create mode 100644 node_modules/babel-runtime/core-js/set-immediate.js create mode 100644 node_modules/babel-runtime/core-js/set.js create mode 100644 node_modules/babel-runtime/core-js/string/at.js create mode 100644 node_modules/babel-runtime/core-js/string/code-point-at.js create mode 100644 node_modules/babel-runtime/core-js/string/ends-with.js create mode 100644 node_modules/babel-runtime/core-js/string/from-code-point.js create mode 100644 node_modules/babel-runtime/core-js/string/includes.js create mode 100644 node_modules/babel-runtime/core-js/string/match-all.js create mode 100644 node_modules/babel-runtime/core-js/string/pad-end.js create mode 100644 node_modules/babel-runtime/core-js/string/pad-left.js create mode 100644 node_modules/babel-runtime/core-js/string/pad-right.js create mode 100644 node_modules/babel-runtime/core-js/string/pad-start.js create mode 100644 node_modules/babel-runtime/core-js/string/raw.js create mode 100644 node_modules/babel-runtime/core-js/string/repeat.js create mode 100644 node_modules/babel-runtime/core-js/string/starts-with.js create mode 100644 node_modules/babel-runtime/core-js/string/trim-end.js create mode 100644 node_modules/babel-runtime/core-js/string/trim-left.js create mode 100644 node_modules/babel-runtime/core-js/string/trim-right.js create mode 100644 node_modules/babel-runtime/core-js/string/trim-start.js create mode 100644 node_modules/babel-runtime/core-js/string/trim.js create mode 100644 node_modules/babel-runtime/core-js/symbol.js create mode 100644 node_modules/babel-runtime/core-js/symbol/async-iterator.js create mode 100644 node_modules/babel-runtime/core-js/symbol/for.js create mode 100644 node_modules/babel-runtime/core-js/symbol/has-instance.js create mode 100644 node_modules/babel-runtime/core-js/symbol/is-concat-spreadable.js create mode 100644 node_modules/babel-runtime/core-js/symbol/iterator.js create mode 100644 node_modules/babel-runtime/core-js/symbol/key-for.js create mode 100644 node_modules/babel-runtime/core-js/symbol/match.js create mode 100644 node_modules/babel-runtime/core-js/symbol/observable.js create mode 100644 node_modules/babel-runtime/core-js/symbol/replace.js create mode 100644 node_modules/babel-runtime/core-js/symbol/search.js create mode 100644 node_modules/babel-runtime/core-js/symbol/species.js create mode 100644 node_modules/babel-runtime/core-js/symbol/split.js create mode 100644 node_modules/babel-runtime/core-js/symbol/to-primitive.js create mode 100644 node_modules/babel-runtime/core-js/symbol/to-string-tag.js create mode 100644 node_modules/babel-runtime/core-js/symbol/unscopables.js create mode 100644 node_modules/babel-runtime/core-js/system/global.js create mode 100644 node_modules/babel-runtime/core-js/weak-map.js create mode 100644 node_modules/babel-runtime/core-js/weak-set.js create mode 100644 node_modules/babel-runtime/helpers/_async-generator-delegate.js create mode 100644 node_modules/babel-runtime/helpers/_async-generator.js create mode 100644 node_modules/babel-runtime/helpers/_async-iterator.js create mode 100644 node_modules/babel-runtime/helpers/_async-to-generator.js create mode 100644 node_modules/babel-runtime/helpers/_class-call-check.js create mode 100644 node_modules/babel-runtime/helpers/_create-class.js create mode 100644 node_modules/babel-runtime/helpers/_defaults.js create mode 100644 node_modules/babel-runtime/helpers/_define-enumerable-properties.js create mode 100644 node_modules/babel-runtime/helpers/_define-property.js create mode 100644 node_modules/babel-runtime/helpers/_extends.js create mode 100644 node_modules/babel-runtime/helpers/_get.js create mode 100644 node_modules/babel-runtime/helpers/_inherits.js create mode 100644 node_modules/babel-runtime/helpers/_instanceof.js create mode 100644 node_modules/babel-runtime/helpers/_interop-require-default.js create mode 100644 node_modules/babel-runtime/helpers/_interop-require-wildcard.js create mode 100644 node_modules/babel-runtime/helpers/_jsx.js create mode 100644 node_modules/babel-runtime/helpers/_new-arrow-check.js create mode 100644 node_modules/babel-runtime/helpers/_object-destructuring-empty.js create mode 100644 node_modules/babel-runtime/helpers/_object-without-properties.js create mode 100644 node_modules/babel-runtime/helpers/_possible-constructor-return.js create mode 100644 node_modules/babel-runtime/helpers/_self-global.js create mode 100644 node_modules/babel-runtime/helpers/_set.js create mode 100644 node_modules/babel-runtime/helpers/_sliced-to-array-loose.js create mode 100644 node_modules/babel-runtime/helpers/_sliced-to-array.js create mode 100644 node_modules/babel-runtime/helpers/_tagged-template-literal-loose.js create mode 100644 node_modules/babel-runtime/helpers/_tagged-template-literal.js create mode 100644 node_modules/babel-runtime/helpers/_temporal-ref.js create mode 100644 node_modules/babel-runtime/helpers/_temporal-undefined.js create mode 100644 node_modules/babel-runtime/helpers/_to-array.js create mode 100644 node_modules/babel-runtime/helpers/_to-consumable-array.js create mode 100644 node_modules/babel-runtime/helpers/_typeof.js create mode 100644 node_modules/babel-runtime/helpers/async-generator-delegate.js create mode 100644 node_modules/babel-runtime/helpers/async-generator.js create mode 100644 node_modules/babel-runtime/helpers/async-iterator.js create mode 100644 node_modules/babel-runtime/helpers/async-to-generator.js create mode 100644 node_modules/babel-runtime/helpers/asyncGenerator.js create mode 100644 node_modules/babel-runtime/helpers/asyncGeneratorDelegate.js create mode 100644 node_modules/babel-runtime/helpers/asyncIterator.js create mode 100644 node_modules/babel-runtime/helpers/asyncToGenerator.js create mode 100644 node_modules/babel-runtime/helpers/class-call-check.js create mode 100644 node_modules/babel-runtime/helpers/classCallCheck.js create mode 100644 node_modules/babel-runtime/helpers/create-class.js create mode 100644 node_modules/babel-runtime/helpers/createClass.js create mode 100644 node_modules/babel-runtime/helpers/defaults.js create mode 100644 node_modules/babel-runtime/helpers/define-enumerable-properties.js create mode 100644 node_modules/babel-runtime/helpers/define-property.js create mode 100644 node_modules/babel-runtime/helpers/defineEnumerableProperties.js create mode 100644 node_modules/babel-runtime/helpers/defineProperty.js create mode 100644 node_modules/babel-runtime/helpers/extends.js create mode 100644 node_modules/babel-runtime/helpers/get.js create mode 100644 node_modules/babel-runtime/helpers/inherits.js create mode 100644 node_modules/babel-runtime/helpers/instanceof.js create mode 100644 node_modules/babel-runtime/helpers/interop-require-default.js create mode 100644 node_modules/babel-runtime/helpers/interop-require-wildcard.js create mode 100644 node_modules/babel-runtime/helpers/interopRequireDefault.js create mode 100644 node_modules/babel-runtime/helpers/interopRequireWildcard.js create mode 100644 node_modules/babel-runtime/helpers/jsx.js create mode 100644 node_modules/babel-runtime/helpers/new-arrow-check.js create mode 100644 node_modules/babel-runtime/helpers/newArrowCheck.js create mode 100644 node_modules/babel-runtime/helpers/object-destructuring-empty.js create mode 100644 node_modules/babel-runtime/helpers/object-without-properties.js create mode 100644 node_modules/babel-runtime/helpers/objectDestructuringEmpty.js create mode 100644 node_modules/babel-runtime/helpers/objectWithoutProperties.js create mode 100644 node_modules/babel-runtime/helpers/possible-constructor-return.js create mode 100644 node_modules/babel-runtime/helpers/possibleConstructorReturn.js create mode 100644 node_modules/babel-runtime/helpers/self-global.js create mode 100644 node_modules/babel-runtime/helpers/selfGlobal.js create mode 100644 node_modules/babel-runtime/helpers/set.js create mode 100644 node_modules/babel-runtime/helpers/sliced-to-array-loose.js create mode 100644 node_modules/babel-runtime/helpers/sliced-to-array.js create mode 100644 node_modules/babel-runtime/helpers/slicedToArray.js create mode 100644 node_modules/babel-runtime/helpers/slicedToArrayLoose.js create mode 100644 node_modules/babel-runtime/helpers/tagged-template-literal-loose.js create mode 100644 node_modules/babel-runtime/helpers/tagged-template-literal.js create mode 100644 node_modules/babel-runtime/helpers/taggedTemplateLiteral.js create mode 100644 node_modules/babel-runtime/helpers/taggedTemplateLiteralLoose.js create mode 100644 node_modules/babel-runtime/helpers/temporal-ref.js create mode 100644 node_modules/babel-runtime/helpers/temporal-undefined.js create mode 100644 node_modules/babel-runtime/helpers/temporalRef.js create mode 100644 node_modules/babel-runtime/helpers/temporalUndefined.js create mode 100644 node_modules/babel-runtime/helpers/to-array.js create mode 100644 node_modules/babel-runtime/helpers/to-consumable-array.js create mode 100644 node_modules/babel-runtime/helpers/toArray.js create mode 100644 node_modules/babel-runtime/helpers/toConsumableArray.js create mode 100644 node_modules/babel-runtime/helpers/typeof.js create mode 100644 node_modules/babel-runtime/package-lock.json create mode 100644 node_modules/babel-runtime/package.json create mode 100644 node_modules/babel-runtime/regenerator/index.js create mode 100644 node_modules/bluebird/LICENSE create mode 100644 node_modules/bluebird/README.md create mode 100644 node_modules/bluebird/changelog.md create mode 100644 node_modules/bluebird/js/browser/bluebird.core.js create mode 100644 node_modules/bluebird/js/browser/bluebird.core.min.js create mode 100644 node_modules/bluebird/js/browser/bluebird.js create mode 100644 node_modules/bluebird/js/browser/bluebird.min.js create mode 100644 node_modules/bluebird/js/release/any.js create mode 100644 node_modules/bluebird/js/release/assert.js create mode 100644 node_modules/bluebird/js/release/async.js create mode 100644 node_modules/bluebird/js/release/bind.js create mode 100644 node_modules/bluebird/js/release/bluebird.js create mode 100644 node_modules/bluebird/js/release/call_get.js create mode 100644 node_modules/bluebird/js/release/cancel.js create mode 100644 node_modules/bluebird/js/release/catch_filter.js create mode 100644 node_modules/bluebird/js/release/context.js create mode 100644 node_modules/bluebird/js/release/debuggability.js create mode 100644 node_modules/bluebird/js/release/direct_resolve.js create mode 100644 node_modules/bluebird/js/release/each.js create mode 100644 node_modules/bluebird/js/release/errors.js create mode 100644 node_modules/bluebird/js/release/es5.js create mode 100644 node_modules/bluebird/js/release/filter.js create mode 100644 node_modules/bluebird/js/release/finally.js create mode 100644 node_modules/bluebird/js/release/generators.js create mode 100644 node_modules/bluebird/js/release/join.js create mode 100644 node_modules/bluebird/js/release/map.js create mode 100644 node_modules/bluebird/js/release/method.js create mode 100644 node_modules/bluebird/js/release/nodeback.js create mode 100644 node_modules/bluebird/js/release/nodeify.js create mode 100644 node_modules/bluebird/js/release/promise.js create mode 100644 node_modules/bluebird/js/release/promise_array.js create mode 100644 node_modules/bluebird/js/release/promisify.js create mode 100644 node_modules/bluebird/js/release/props.js create mode 100644 node_modules/bluebird/js/release/queue.js create mode 100644 node_modules/bluebird/js/release/race.js create mode 100644 node_modules/bluebird/js/release/reduce.js create mode 100644 node_modules/bluebird/js/release/schedule.js create mode 100644 node_modules/bluebird/js/release/settle.js create mode 100644 node_modules/bluebird/js/release/some.js create mode 100644 node_modules/bluebird/js/release/synchronous_inspection.js create mode 100644 node_modules/bluebird/js/release/thenables.js create mode 100644 node_modules/bluebird/js/release/timers.js create mode 100644 node_modules/bluebird/js/release/using.js create mode 100644 node_modules/bluebird/js/release/util.js create mode 100644 node_modules/bluebird/package.json create mode 100644 node_modules/cli-color/.editorconfig create mode 100644 node_modules/cli-color/.lint create mode 100644 node_modules/cli-color/CHANGELOG.md create mode 100644 node_modules/cli-color/CHANGES create mode 100644 node_modules/cli-color/LICENSE create mode 100644 node_modules/cli-color/README.md create mode 100644 node_modules/cli-color/art.js create mode 100644 node_modules/cli-color/bare.js create mode 100644 node_modules/cli-color/beep.js create mode 100755 node_modules/cli-color/bin/generate-color-images create mode 100644 node_modules/cli-color/columns.js create mode 100644 node_modules/cli-color/erase.js create mode 100644 node_modules/cli-color/examples/art.js create mode 100644 node_modules/cli-color/examples/basic.js create mode 100644 node_modules/cli-color/examples/erase.js create mode 100644 node_modules/cli-color/examples/styles.js create mode 100644 node_modules/cli-color/examples/throbber.js create mode 100644 node_modules/cli-color/examples/xterm.js create mode 100644 node_modules/cli-color/get-stripped-length.js create mode 100644 node_modules/cli-color/index.js create mode 100644 node_modules/cli-color/lib/sgr.js create mode 100644 node_modules/cli-color/lib/xterm-colors.js create mode 100644 node_modules/cli-color/lib/xterm-match.js create mode 100644 node_modules/cli-color/move.js create mode 100644 node_modules/cli-color/package.json create mode 100644 node_modules/cli-color/reset.js create mode 100644 node_modules/cli-color/slice.js create mode 100644 node_modules/cli-color/strip.js create mode 100755 node_modules/cli-color/test/__playground/throbber.formatted.js create mode 100755 node_modules/cli-color/test/__playground/throbber.js create mode 100644 node_modules/cli-color/test/art.js create mode 100644 node_modules/cli-color/test/bare.js create mode 100644 node_modules/cli-color/test/beep.js create mode 100644 node_modules/cli-color/test/columns.js create mode 100644 node_modules/cli-color/test/erase.js create mode 100644 node_modules/cli-color/test/get-stripped-length.js create mode 100644 node_modules/cli-color/test/index.js create mode 100644 node_modules/cli-color/test/lib/sgr.js create mode 100644 node_modules/cli-color/test/lib/xterm-colors.js create mode 100644 node_modules/cli-color/test/lib/xterm-match.js create mode 100644 node_modules/cli-color/test/move.js create mode 100644 node_modules/cli-color/test/reset.js create mode 100644 node_modules/cli-color/test/slice.js create mode 100644 node_modules/cli-color/test/strip.js create mode 100644 node_modules/cli-color/test/throbber.js create mode 100644 node_modules/cli-color/test/visual.js create mode 100644 node_modules/cli-color/test/window-size.js create mode 100644 node_modules/cli-color/throbber.js create mode 100644 node_modules/cli-color/window-size.js create mode 100644 node_modules/cliui/CHANGELOG.md create mode 100644 node_modules/cliui/LICENSE.txt create mode 100644 node_modules/cliui/README.md create mode 100644 node_modules/cliui/index.js create mode 100644 node_modules/cliui/node_modules/string-width/index.js rename node_modules/{inquirer/node_modules/ansi-regex => cliui/node_modules/string-width}/license (100%) create mode 100644 node_modules/cliui/node_modules/string-width/package.json create mode 100644 node_modules/cliui/node_modules/string-width/readme.md create mode 100644 node_modules/cliui/package.json create mode 100644 node_modules/cls-bluebird/README.md create mode 100644 node_modules/cls-bluebird/changelog.md create mode 100644 node_modules/cls-bluebird/lib/index.js create mode 100644 node_modules/cls-bluebird/lib/shimCall.js create mode 100644 node_modules/cls-bluebird/lib/shimCoroutine.js create mode 100644 node_modules/cls-bluebird/lib/shimMethod.js create mode 100644 node_modules/cls-bluebird/lib/shimOnCancel.js create mode 100644 node_modules/cls-bluebird/lib/shimUsing.js create mode 100644 node_modules/cls-bluebird/package.json create mode 100644 node_modules/config-chain/LICENCE create mode 100755 node_modules/config-chain/index.js create mode 100644 node_modules/config-chain/package.json create mode 100644 node_modules/config-chain/readme.markdown create mode 100644 node_modules/core-js/CHANGELOG.md create mode 100644 node_modules/core-js/Gruntfile.js create mode 100644 node_modules/core-js/LICENSE create mode 100644 node_modules/core-js/README.md create mode 100644 node_modules/core-js/bower.json create mode 100644 node_modules/core-js/build/Gruntfile.ls create mode 100644 node_modules/core-js/build/build.ls create mode 100644 node_modules/core-js/build/config.js create mode 100644 node_modules/core-js/build/index.js create mode 100644 node_modules/core-js/client/core.js create mode 100644 node_modules/core-js/client/core.min.js create mode 100644 node_modules/core-js/client/core.min.js.map create mode 100644 node_modules/core-js/client/library.js create mode 100644 node_modules/core-js/client/library.min.js create mode 100644 node_modules/core-js/client/library.min.js.map create mode 100644 node_modules/core-js/client/shim.js create mode 100644 node_modules/core-js/client/shim.min.js create mode 100644 node_modules/core-js/client/shim.min.js.map create mode 100644 node_modules/core-js/core/_.js create mode 100644 node_modules/core-js/core/delay.js create mode 100644 node_modules/core-js/core/dict.js create mode 100644 node_modules/core-js/core/function.js create mode 100644 node_modules/core-js/core/index.js create mode 100644 node_modules/core-js/core/number.js create mode 100644 node_modules/core-js/core/object.js create mode 100644 node_modules/core-js/core/regexp.js create mode 100644 node_modules/core-js/core/string.js create mode 100644 node_modules/core-js/es5/index.js create mode 100644 node_modules/core-js/es6/array.js create mode 100644 node_modules/core-js/es6/date.js create mode 100644 node_modules/core-js/es6/function.js create mode 100644 node_modules/core-js/es6/index.js create mode 100644 node_modules/core-js/es6/map.js create mode 100644 node_modules/core-js/es6/math.js create mode 100644 node_modules/core-js/es6/number.js create mode 100644 node_modules/core-js/es6/object.js create mode 100644 node_modules/core-js/es6/parse-float.js create mode 100644 node_modules/core-js/es6/parse-int.js create mode 100644 node_modules/core-js/es6/promise.js create mode 100644 node_modules/core-js/es6/reflect.js create mode 100644 node_modules/core-js/es6/regexp.js create mode 100644 node_modules/core-js/es6/set.js create mode 100644 node_modules/core-js/es6/string.js create mode 100644 node_modules/core-js/es6/symbol.js create mode 100644 node_modules/core-js/es6/typed.js create mode 100644 node_modules/core-js/es6/weak-map.js create mode 100644 node_modules/core-js/es6/weak-set.js create mode 100644 node_modules/core-js/es7/array.js create mode 100644 node_modules/core-js/es7/asap.js create mode 100644 node_modules/core-js/es7/error.js create mode 100644 node_modules/core-js/es7/global.js create mode 100644 node_modules/core-js/es7/index.js create mode 100644 node_modules/core-js/es7/map.js create mode 100644 node_modules/core-js/es7/math.js create mode 100644 node_modules/core-js/es7/object.js create mode 100644 node_modules/core-js/es7/observable.js create mode 100644 node_modules/core-js/es7/promise.js create mode 100644 node_modules/core-js/es7/reflect.js create mode 100644 node_modules/core-js/es7/set.js create mode 100644 node_modules/core-js/es7/string.js create mode 100644 node_modules/core-js/es7/symbol.js create mode 100644 node_modules/core-js/es7/system.js create mode 100644 node_modules/core-js/es7/weak-map.js create mode 100644 node_modules/core-js/es7/weak-set.js create mode 100644 node_modules/core-js/fn/_.js create mode 100644 node_modules/core-js/fn/array/concat.js create mode 100644 node_modules/core-js/fn/array/copy-within.js create mode 100644 node_modules/core-js/fn/array/entries.js create mode 100644 node_modules/core-js/fn/array/every.js create mode 100644 node_modules/core-js/fn/array/fill.js create mode 100644 node_modules/core-js/fn/array/filter.js create mode 100644 node_modules/core-js/fn/array/find-index.js create mode 100644 node_modules/core-js/fn/array/find.js create mode 100644 node_modules/core-js/fn/array/flat-map.js create mode 100644 node_modules/core-js/fn/array/flatten.js create mode 100644 node_modules/core-js/fn/array/for-each.js create mode 100644 node_modules/core-js/fn/array/from.js create mode 100644 node_modules/core-js/fn/array/includes.js create mode 100644 node_modules/core-js/fn/array/index-of.js create mode 100644 node_modules/core-js/fn/array/index.js create mode 100644 node_modules/core-js/fn/array/is-array.js create mode 100644 node_modules/core-js/fn/array/iterator.js create mode 100644 node_modules/core-js/fn/array/join.js create mode 100644 node_modules/core-js/fn/array/keys.js create mode 100644 node_modules/core-js/fn/array/last-index-of.js create mode 100644 node_modules/core-js/fn/array/map.js create mode 100644 node_modules/core-js/fn/array/of.js create mode 100644 node_modules/core-js/fn/array/pop.js create mode 100644 node_modules/core-js/fn/array/push.js create mode 100644 node_modules/core-js/fn/array/reduce-right.js create mode 100644 node_modules/core-js/fn/array/reduce.js create mode 100644 node_modules/core-js/fn/array/reverse.js create mode 100644 node_modules/core-js/fn/array/shift.js create mode 100644 node_modules/core-js/fn/array/slice.js create mode 100644 node_modules/core-js/fn/array/some.js create mode 100644 node_modules/core-js/fn/array/sort.js create mode 100644 node_modules/core-js/fn/array/splice.js create mode 100644 node_modules/core-js/fn/array/unshift.js create mode 100644 node_modules/core-js/fn/array/values.js create mode 100644 node_modules/core-js/fn/array/virtual/copy-within.js create mode 100644 node_modules/core-js/fn/array/virtual/entries.js create mode 100644 node_modules/core-js/fn/array/virtual/every.js create mode 100644 node_modules/core-js/fn/array/virtual/fill.js create mode 100644 node_modules/core-js/fn/array/virtual/filter.js create mode 100644 node_modules/core-js/fn/array/virtual/find-index.js create mode 100644 node_modules/core-js/fn/array/virtual/find.js create mode 100644 node_modules/core-js/fn/array/virtual/flat-map.js create mode 100644 node_modules/core-js/fn/array/virtual/flatten.js create mode 100644 node_modules/core-js/fn/array/virtual/for-each.js create mode 100644 node_modules/core-js/fn/array/virtual/includes.js create mode 100644 node_modules/core-js/fn/array/virtual/index-of.js create mode 100644 node_modules/core-js/fn/array/virtual/index.js create mode 100644 node_modules/core-js/fn/array/virtual/iterator.js create mode 100644 node_modules/core-js/fn/array/virtual/join.js create mode 100644 node_modules/core-js/fn/array/virtual/keys.js create mode 100644 node_modules/core-js/fn/array/virtual/last-index-of.js create mode 100644 node_modules/core-js/fn/array/virtual/map.js create mode 100644 node_modules/core-js/fn/array/virtual/reduce-right.js create mode 100644 node_modules/core-js/fn/array/virtual/reduce.js create mode 100644 node_modules/core-js/fn/array/virtual/slice.js create mode 100644 node_modules/core-js/fn/array/virtual/some.js create mode 100644 node_modules/core-js/fn/array/virtual/sort.js create mode 100644 node_modules/core-js/fn/array/virtual/values.js create mode 100644 node_modules/core-js/fn/asap.js create mode 100644 node_modules/core-js/fn/clear-immediate.js create mode 100644 node_modules/core-js/fn/date/index.js create mode 100644 node_modules/core-js/fn/date/now.js create mode 100644 node_modules/core-js/fn/date/to-iso-string.js create mode 100644 node_modules/core-js/fn/date/to-json.js create mode 100644 node_modules/core-js/fn/date/to-primitive.js create mode 100644 node_modules/core-js/fn/date/to-string.js create mode 100644 node_modules/core-js/fn/delay.js create mode 100644 node_modules/core-js/fn/dict.js create mode 100644 node_modules/core-js/fn/dom-collections/index.js create mode 100644 node_modules/core-js/fn/dom-collections/iterator.js create mode 100644 node_modules/core-js/fn/error/index.js create mode 100644 node_modules/core-js/fn/error/is-error.js create mode 100644 node_modules/core-js/fn/function/bind.js create mode 100644 node_modules/core-js/fn/function/has-instance.js create mode 100644 node_modules/core-js/fn/function/index.js create mode 100644 node_modules/core-js/fn/function/name.js create mode 100644 node_modules/core-js/fn/function/part.js create mode 100644 node_modules/core-js/fn/function/virtual/bind.js create mode 100644 node_modules/core-js/fn/function/virtual/index.js create mode 100644 node_modules/core-js/fn/function/virtual/part.js create mode 100644 node_modules/core-js/fn/get-iterator-method.js create mode 100644 node_modules/core-js/fn/get-iterator.js create mode 100644 node_modules/core-js/fn/global.js create mode 100644 node_modules/core-js/fn/is-iterable.js create mode 100644 node_modules/core-js/fn/json/index.js create mode 100644 node_modules/core-js/fn/json/stringify.js create mode 100644 node_modules/core-js/fn/map.js create mode 100644 node_modules/core-js/fn/map/from.js create mode 100644 node_modules/core-js/fn/map/index.js create mode 100644 node_modules/core-js/fn/map/of.js create mode 100644 node_modules/core-js/fn/math/acosh.js create mode 100644 node_modules/core-js/fn/math/asinh.js create mode 100644 node_modules/core-js/fn/math/atanh.js create mode 100644 node_modules/core-js/fn/math/cbrt.js create mode 100644 node_modules/core-js/fn/math/clamp.js create mode 100644 node_modules/core-js/fn/math/clz32.js create mode 100644 node_modules/core-js/fn/math/cosh.js create mode 100644 node_modules/core-js/fn/math/deg-per-rad.js create mode 100644 node_modules/core-js/fn/math/degrees.js create mode 100644 node_modules/core-js/fn/math/expm1.js create mode 100644 node_modules/core-js/fn/math/fround.js create mode 100644 node_modules/core-js/fn/math/fscale.js create mode 100644 node_modules/core-js/fn/math/hypot.js create mode 100644 node_modules/core-js/fn/math/iaddh.js create mode 100644 node_modules/core-js/fn/math/imul.js create mode 100644 node_modules/core-js/fn/math/imulh.js create mode 100644 node_modules/core-js/fn/math/index.js create mode 100644 node_modules/core-js/fn/math/isubh.js create mode 100644 node_modules/core-js/fn/math/log10.js create mode 100644 node_modules/core-js/fn/math/log1p.js create mode 100644 node_modules/core-js/fn/math/log2.js create mode 100644 node_modules/core-js/fn/math/rad-per-deg.js create mode 100644 node_modules/core-js/fn/math/radians.js create mode 100644 node_modules/core-js/fn/math/scale.js create mode 100644 node_modules/core-js/fn/math/sign.js create mode 100644 node_modules/core-js/fn/math/signbit.js create mode 100644 node_modules/core-js/fn/math/sinh.js create mode 100644 node_modules/core-js/fn/math/tanh.js create mode 100644 node_modules/core-js/fn/math/trunc.js create mode 100644 node_modules/core-js/fn/math/umulh.js create mode 100644 node_modules/core-js/fn/number/constructor.js create mode 100644 node_modules/core-js/fn/number/epsilon.js create mode 100644 node_modules/core-js/fn/number/index.js create mode 100644 node_modules/core-js/fn/number/is-finite.js create mode 100644 node_modules/core-js/fn/number/is-integer.js create mode 100644 node_modules/core-js/fn/number/is-nan.js create mode 100644 node_modules/core-js/fn/number/is-safe-integer.js create mode 100644 node_modules/core-js/fn/number/iterator.js create mode 100644 node_modules/core-js/fn/number/max-safe-integer.js create mode 100644 node_modules/core-js/fn/number/min-safe-integer.js create mode 100644 node_modules/core-js/fn/number/parse-float.js create mode 100644 node_modules/core-js/fn/number/parse-int.js create mode 100644 node_modules/core-js/fn/number/to-fixed.js create mode 100644 node_modules/core-js/fn/number/to-precision.js create mode 100644 node_modules/core-js/fn/number/virtual/index.js create mode 100644 node_modules/core-js/fn/number/virtual/iterator.js create mode 100644 node_modules/core-js/fn/number/virtual/to-fixed.js create mode 100644 node_modules/core-js/fn/number/virtual/to-precision.js create mode 100644 node_modules/core-js/fn/object/assign.js create mode 100644 node_modules/core-js/fn/object/classof.js create mode 100644 node_modules/core-js/fn/object/create.js create mode 100644 node_modules/core-js/fn/object/define-getter.js create mode 100644 node_modules/core-js/fn/object/define-properties.js create mode 100644 node_modules/core-js/fn/object/define-property.js create mode 100644 node_modules/core-js/fn/object/define-setter.js create mode 100644 node_modules/core-js/fn/object/define.js create mode 100644 node_modules/core-js/fn/object/entries.js create mode 100644 node_modules/core-js/fn/object/freeze.js create mode 100644 node_modules/core-js/fn/object/get-own-property-descriptor.js create mode 100644 node_modules/core-js/fn/object/get-own-property-descriptors.js create mode 100644 node_modules/core-js/fn/object/get-own-property-names.js create mode 100644 node_modules/core-js/fn/object/get-own-property-symbols.js create mode 100644 node_modules/core-js/fn/object/get-prototype-of.js create mode 100644 node_modules/core-js/fn/object/index.js create mode 100644 node_modules/core-js/fn/object/is-extensible.js create mode 100644 node_modules/core-js/fn/object/is-frozen.js create mode 100644 node_modules/core-js/fn/object/is-object.js create mode 100644 node_modules/core-js/fn/object/is-sealed.js create mode 100644 node_modules/core-js/fn/object/is.js create mode 100644 node_modules/core-js/fn/object/keys.js create mode 100644 node_modules/core-js/fn/object/lookup-getter.js create mode 100644 node_modules/core-js/fn/object/lookup-setter.js create mode 100644 node_modules/core-js/fn/object/make.js create mode 100644 node_modules/core-js/fn/object/prevent-extensions.js create mode 100644 node_modules/core-js/fn/object/seal.js create mode 100644 node_modules/core-js/fn/object/set-prototype-of.js create mode 100644 node_modules/core-js/fn/object/values.js create mode 100644 node_modules/core-js/fn/observable.js create mode 100644 node_modules/core-js/fn/parse-float.js create mode 100644 node_modules/core-js/fn/parse-int.js create mode 100644 node_modules/core-js/fn/promise.js create mode 100644 node_modules/core-js/fn/promise/finally.js create mode 100644 node_modules/core-js/fn/promise/index.js create mode 100644 node_modules/core-js/fn/promise/try.js create mode 100644 node_modules/core-js/fn/reflect/apply.js create mode 100644 node_modules/core-js/fn/reflect/construct.js create mode 100644 node_modules/core-js/fn/reflect/define-metadata.js create mode 100644 node_modules/core-js/fn/reflect/define-property.js create mode 100644 node_modules/core-js/fn/reflect/delete-metadata.js create mode 100644 node_modules/core-js/fn/reflect/delete-property.js create mode 100644 node_modules/core-js/fn/reflect/enumerate.js create mode 100644 node_modules/core-js/fn/reflect/get-metadata-keys.js create mode 100644 node_modules/core-js/fn/reflect/get-metadata.js create mode 100644 node_modules/core-js/fn/reflect/get-own-metadata-keys.js create mode 100644 node_modules/core-js/fn/reflect/get-own-metadata.js create mode 100644 node_modules/core-js/fn/reflect/get-own-property-descriptor.js create mode 100644 node_modules/core-js/fn/reflect/get-prototype-of.js create mode 100644 node_modules/core-js/fn/reflect/get.js create mode 100644 node_modules/core-js/fn/reflect/has-metadata.js create mode 100644 node_modules/core-js/fn/reflect/has-own-metadata.js create mode 100644 node_modules/core-js/fn/reflect/has.js create mode 100644 node_modules/core-js/fn/reflect/index.js create mode 100644 node_modules/core-js/fn/reflect/is-extensible.js create mode 100644 node_modules/core-js/fn/reflect/metadata.js create mode 100644 node_modules/core-js/fn/reflect/own-keys.js create mode 100644 node_modules/core-js/fn/reflect/prevent-extensions.js create mode 100644 node_modules/core-js/fn/reflect/set-prototype-of.js create mode 100644 node_modules/core-js/fn/reflect/set.js create mode 100644 node_modules/core-js/fn/regexp/constructor.js create mode 100644 node_modules/core-js/fn/regexp/escape.js create mode 100644 node_modules/core-js/fn/regexp/flags.js create mode 100644 node_modules/core-js/fn/regexp/index.js create mode 100644 node_modules/core-js/fn/regexp/match.js create mode 100644 node_modules/core-js/fn/regexp/replace.js create mode 100644 node_modules/core-js/fn/regexp/search.js create mode 100644 node_modules/core-js/fn/regexp/split.js create mode 100644 node_modules/core-js/fn/regexp/to-string.js create mode 100644 node_modules/core-js/fn/set-immediate.js create mode 100644 node_modules/core-js/fn/set-interval.js create mode 100644 node_modules/core-js/fn/set-timeout.js create mode 100644 node_modules/core-js/fn/set.js create mode 100644 node_modules/core-js/fn/set/from.js create mode 100644 node_modules/core-js/fn/set/index.js create mode 100644 node_modules/core-js/fn/set/of.js create mode 100644 node_modules/core-js/fn/string/anchor.js create mode 100644 node_modules/core-js/fn/string/at.js create mode 100644 node_modules/core-js/fn/string/big.js create mode 100644 node_modules/core-js/fn/string/blink.js create mode 100644 node_modules/core-js/fn/string/bold.js create mode 100644 node_modules/core-js/fn/string/code-point-at.js create mode 100644 node_modules/core-js/fn/string/ends-with.js create mode 100644 node_modules/core-js/fn/string/escape-html.js create mode 100644 node_modules/core-js/fn/string/fixed.js create mode 100644 node_modules/core-js/fn/string/fontcolor.js create mode 100644 node_modules/core-js/fn/string/fontsize.js create mode 100644 node_modules/core-js/fn/string/from-code-point.js create mode 100644 node_modules/core-js/fn/string/includes.js create mode 100644 node_modules/core-js/fn/string/index.js create mode 100644 node_modules/core-js/fn/string/italics.js create mode 100644 node_modules/core-js/fn/string/iterator.js create mode 100644 node_modules/core-js/fn/string/link.js create mode 100644 node_modules/core-js/fn/string/match-all.js create mode 100644 node_modules/core-js/fn/string/pad-end.js create mode 100644 node_modules/core-js/fn/string/pad-start.js create mode 100644 node_modules/core-js/fn/string/raw.js create mode 100644 node_modules/core-js/fn/string/repeat.js create mode 100644 node_modules/core-js/fn/string/small.js create mode 100644 node_modules/core-js/fn/string/starts-with.js create mode 100644 node_modules/core-js/fn/string/strike.js create mode 100644 node_modules/core-js/fn/string/sub.js create mode 100644 node_modules/core-js/fn/string/sup.js create mode 100644 node_modules/core-js/fn/string/trim-end.js create mode 100644 node_modules/core-js/fn/string/trim-left.js create mode 100644 node_modules/core-js/fn/string/trim-right.js create mode 100644 node_modules/core-js/fn/string/trim-start.js create mode 100644 node_modules/core-js/fn/string/trim.js create mode 100644 node_modules/core-js/fn/string/unescape-html.js create mode 100644 node_modules/core-js/fn/string/virtual/anchor.js create mode 100644 node_modules/core-js/fn/string/virtual/at.js create mode 100644 node_modules/core-js/fn/string/virtual/big.js create mode 100644 node_modules/core-js/fn/string/virtual/blink.js create mode 100644 node_modules/core-js/fn/string/virtual/bold.js create mode 100644 node_modules/core-js/fn/string/virtual/code-point-at.js create mode 100644 node_modules/core-js/fn/string/virtual/ends-with.js create mode 100644 node_modules/core-js/fn/string/virtual/escape-html.js create mode 100644 node_modules/core-js/fn/string/virtual/fixed.js create mode 100644 node_modules/core-js/fn/string/virtual/fontcolor.js create mode 100644 node_modules/core-js/fn/string/virtual/fontsize.js create mode 100644 node_modules/core-js/fn/string/virtual/includes.js create mode 100644 node_modules/core-js/fn/string/virtual/index.js create mode 100644 node_modules/core-js/fn/string/virtual/italics.js create mode 100644 node_modules/core-js/fn/string/virtual/iterator.js create mode 100644 node_modules/core-js/fn/string/virtual/link.js create mode 100644 node_modules/core-js/fn/string/virtual/match-all.js create mode 100644 node_modules/core-js/fn/string/virtual/pad-end.js create mode 100644 node_modules/core-js/fn/string/virtual/pad-start.js create mode 100644 node_modules/core-js/fn/string/virtual/repeat.js create mode 100644 node_modules/core-js/fn/string/virtual/small.js create mode 100644 node_modules/core-js/fn/string/virtual/starts-with.js create mode 100644 node_modules/core-js/fn/string/virtual/strike.js create mode 100644 node_modules/core-js/fn/string/virtual/sub.js create mode 100644 node_modules/core-js/fn/string/virtual/sup.js create mode 100644 node_modules/core-js/fn/string/virtual/trim-end.js create mode 100644 node_modules/core-js/fn/string/virtual/trim-left.js create mode 100644 node_modules/core-js/fn/string/virtual/trim-right.js create mode 100644 node_modules/core-js/fn/string/virtual/trim-start.js create mode 100644 node_modules/core-js/fn/string/virtual/trim.js create mode 100644 node_modules/core-js/fn/string/virtual/unescape-html.js create mode 100644 node_modules/core-js/fn/symbol/async-iterator.js create mode 100644 node_modules/core-js/fn/symbol/for.js create mode 100644 node_modules/core-js/fn/symbol/has-instance.js create mode 100644 node_modules/core-js/fn/symbol/index.js create mode 100644 node_modules/core-js/fn/symbol/is-concat-spreadable.js create mode 100644 node_modules/core-js/fn/symbol/iterator.js create mode 100644 node_modules/core-js/fn/symbol/key-for.js create mode 100644 node_modules/core-js/fn/symbol/match.js create mode 100644 node_modules/core-js/fn/symbol/observable.js create mode 100644 node_modules/core-js/fn/symbol/replace.js create mode 100644 node_modules/core-js/fn/symbol/search.js create mode 100644 node_modules/core-js/fn/symbol/species.js create mode 100644 node_modules/core-js/fn/symbol/split.js create mode 100644 node_modules/core-js/fn/symbol/to-primitive.js create mode 100644 node_modules/core-js/fn/symbol/to-string-tag.js create mode 100644 node_modules/core-js/fn/symbol/unscopables.js create mode 100644 node_modules/core-js/fn/system/global.js create mode 100644 node_modules/core-js/fn/system/index.js create mode 100644 node_modules/core-js/fn/typed/array-buffer.js create mode 100644 node_modules/core-js/fn/typed/data-view.js create mode 100644 node_modules/core-js/fn/typed/float32-array.js create mode 100644 node_modules/core-js/fn/typed/float64-array.js create mode 100644 node_modules/core-js/fn/typed/index.js create mode 100644 node_modules/core-js/fn/typed/int16-array.js create mode 100644 node_modules/core-js/fn/typed/int32-array.js create mode 100644 node_modules/core-js/fn/typed/int8-array.js create mode 100644 node_modules/core-js/fn/typed/uint16-array.js create mode 100644 node_modules/core-js/fn/typed/uint32-array.js create mode 100644 node_modules/core-js/fn/typed/uint8-array.js create mode 100644 node_modules/core-js/fn/typed/uint8-clamped-array.js create mode 100644 node_modules/core-js/fn/weak-map.js create mode 100644 node_modules/core-js/fn/weak-map/from.js create mode 100644 node_modules/core-js/fn/weak-map/index.js create mode 100644 node_modules/core-js/fn/weak-map/of.js create mode 100644 node_modules/core-js/fn/weak-set.js create mode 100644 node_modules/core-js/fn/weak-set/from.js create mode 100644 node_modules/core-js/fn/weak-set/index.js create mode 100644 node_modules/core-js/fn/weak-set/of.js create mode 100644 node_modules/core-js/index.js create mode 100644 node_modules/core-js/library/core/_.js create mode 100644 node_modules/core-js/library/core/delay.js create mode 100644 node_modules/core-js/library/core/dict.js create mode 100644 node_modules/core-js/library/core/function.js create mode 100644 node_modules/core-js/library/core/index.js create mode 100644 node_modules/core-js/library/core/number.js create mode 100644 node_modules/core-js/library/core/object.js create mode 100644 node_modules/core-js/library/core/regexp.js create mode 100644 node_modules/core-js/library/core/string.js create mode 100644 node_modules/core-js/library/es5/index.js create mode 100644 node_modules/core-js/library/es6/array.js create mode 100644 node_modules/core-js/library/es6/date.js create mode 100644 node_modules/core-js/library/es6/function.js create mode 100644 node_modules/core-js/library/es6/index.js create mode 100644 node_modules/core-js/library/es6/map.js create mode 100644 node_modules/core-js/library/es6/math.js create mode 100644 node_modules/core-js/library/es6/number.js create mode 100644 node_modules/core-js/library/es6/object.js create mode 100644 node_modules/core-js/library/es6/parse-float.js create mode 100644 node_modules/core-js/library/es6/parse-int.js create mode 100644 node_modules/core-js/library/es6/promise.js create mode 100644 node_modules/core-js/library/es6/reflect.js create mode 100644 node_modules/core-js/library/es6/regexp.js create mode 100644 node_modules/core-js/library/es6/set.js create mode 100644 node_modules/core-js/library/es6/string.js create mode 100644 node_modules/core-js/library/es6/symbol.js create mode 100644 node_modules/core-js/library/es6/typed.js create mode 100644 node_modules/core-js/library/es6/weak-map.js create mode 100644 node_modules/core-js/library/es6/weak-set.js create mode 100644 node_modules/core-js/library/es7/array.js create mode 100644 node_modules/core-js/library/es7/asap.js create mode 100644 node_modules/core-js/library/es7/error.js create mode 100644 node_modules/core-js/library/es7/global.js create mode 100644 node_modules/core-js/library/es7/index.js create mode 100644 node_modules/core-js/library/es7/map.js create mode 100644 node_modules/core-js/library/es7/math.js create mode 100644 node_modules/core-js/library/es7/object.js create mode 100644 node_modules/core-js/library/es7/observable.js create mode 100644 node_modules/core-js/library/es7/promise.js create mode 100644 node_modules/core-js/library/es7/reflect.js create mode 100644 node_modules/core-js/library/es7/set.js create mode 100644 node_modules/core-js/library/es7/string.js create mode 100644 node_modules/core-js/library/es7/symbol.js create mode 100644 node_modules/core-js/library/es7/system.js create mode 100644 node_modules/core-js/library/es7/weak-map.js create mode 100644 node_modules/core-js/library/es7/weak-set.js create mode 100644 node_modules/core-js/library/fn/_.js create mode 100644 node_modules/core-js/library/fn/array/concat.js create mode 100644 node_modules/core-js/library/fn/array/copy-within.js create mode 100644 node_modules/core-js/library/fn/array/entries.js create mode 100644 node_modules/core-js/library/fn/array/every.js create mode 100644 node_modules/core-js/library/fn/array/fill.js create mode 100644 node_modules/core-js/library/fn/array/filter.js create mode 100644 node_modules/core-js/library/fn/array/find-index.js create mode 100644 node_modules/core-js/library/fn/array/find.js create mode 100644 node_modules/core-js/library/fn/array/flat-map.js create mode 100644 node_modules/core-js/library/fn/array/flatten.js create mode 100644 node_modules/core-js/library/fn/array/for-each.js create mode 100644 node_modules/core-js/library/fn/array/from.js create mode 100644 node_modules/core-js/library/fn/array/includes.js create mode 100644 node_modules/core-js/library/fn/array/index-of.js create mode 100644 node_modules/core-js/library/fn/array/index.js create mode 100644 node_modules/core-js/library/fn/array/is-array.js create mode 100644 node_modules/core-js/library/fn/array/iterator.js create mode 100644 node_modules/core-js/library/fn/array/join.js create mode 100644 node_modules/core-js/library/fn/array/keys.js create mode 100644 node_modules/core-js/library/fn/array/last-index-of.js create mode 100644 node_modules/core-js/library/fn/array/map.js create mode 100644 node_modules/core-js/library/fn/array/of.js create mode 100644 node_modules/core-js/library/fn/array/pop.js create mode 100644 node_modules/core-js/library/fn/array/push.js create mode 100644 node_modules/core-js/library/fn/array/reduce-right.js create mode 100644 node_modules/core-js/library/fn/array/reduce.js create mode 100644 node_modules/core-js/library/fn/array/reverse.js create mode 100644 node_modules/core-js/library/fn/array/shift.js create mode 100644 node_modules/core-js/library/fn/array/slice.js create mode 100644 node_modules/core-js/library/fn/array/some.js create mode 100644 node_modules/core-js/library/fn/array/sort.js create mode 100644 node_modules/core-js/library/fn/array/splice.js create mode 100644 node_modules/core-js/library/fn/array/unshift.js create mode 100644 node_modules/core-js/library/fn/array/values.js create mode 100644 node_modules/core-js/library/fn/array/virtual/copy-within.js create mode 100644 node_modules/core-js/library/fn/array/virtual/entries.js create mode 100644 node_modules/core-js/library/fn/array/virtual/every.js create mode 100644 node_modules/core-js/library/fn/array/virtual/fill.js create mode 100644 node_modules/core-js/library/fn/array/virtual/filter.js create mode 100644 node_modules/core-js/library/fn/array/virtual/find-index.js create mode 100644 node_modules/core-js/library/fn/array/virtual/find.js create mode 100644 node_modules/core-js/library/fn/array/virtual/flat-map.js create mode 100644 node_modules/core-js/library/fn/array/virtual/flatten.js create mode 100644 node_modules/core-js/library/fn/array/virtual/for-each.js create mode 100644 node_modules/core-js/library/fn/array/virtual/includes.js create mode 100644 node_modules/core-js/library/fn/array/virtual/index-of.js create mode 100644 node_modules/core-js/library/fn/array/virtual/index.js create mode 100644 node_modules/core-js/library/fn/array/virtual/iterator.js create mode 100644 node_modules/core-js/library/fn/array/virtual/join.js create mode 100644 node_modules/core-js/library/fn/array/virtual/keys.js create mode 100644 node_modules/core-js/library/fn/array/virtual/last-index-of.js create mode 100644 node_modules/core-js/library/fn/array/virtual/map.js create mode 100644 node_modules/core-js/library/fn/array/virtual/reduce-right.js create mode 100644 node_modules/core-js/library/fn/array/virtual/reduce.js create mode 100644 node_modules/core-js/library/fn/array/virtual/slice.js create mode 100644 node_modules/core-js/library/fn/array/virtual/some.js create mode 100644 node_modules/core-js/library/fn/array/virtual/sort.js create mode 100644 node_modules/core-js/library/fn/array/virtual/values.js create mode 100644 node_modules/core-js/library/fn/asap.js create mode 100644 node_modules/core-js/library/fn/clear-immediate.js create mode 100644 node_modules/core-js/library/fn/date/index.js create mode 100644 node_modules/core-js/library/fn/date/now.js create mode 100644 node_modules/core-js/library/fn/date/to-iso-string.js create mode 100644 node_modules/core-js/library/fn/date/to-json.js create mode 100644 node_modules/core-js/library/fn/date/to-primitive.js create mode 100644 node_modules/core-js/library/fn/date/to-string.js create mode 100644 node_modules/core-js/library/fn/delay.js create mode 100644 node_modules/core-js/library/fn/dict.js create mode 100644 node_modules/core-js/library/fn/dom-collections/index.js create mode 100644 node_modules/core-js/library/fn/dom-collections/iterator.js create mode 100644 node_modules/core-js/library/fn/error/index.js create mode 100644 node_modules/core-js/library/fn/error/is-error.js create mode 100644 node_modules/core-js/library/fn/function/bind.js create mode 100644 node_modules/core-js/library/fn/function/has-instance.js create mode 100644 node_modules/core-js/library/fn/function/index.js create mode 100644 node_modules/core-js/library/fn/function/name.js create mode 100644 node_modules/core-js/library/fn/function/part.js create mode 100644 node_modules/core-js/library/fn/function/virtual/bind.js create mode 100644 node_modules/core-js/library/fn/function/virtual/index.js create mode 100644 node_modules/core-js/library/fn/function/virtual/part.js create mode 100644 node_modules/core-js/library/fn/get-iterator-method.js create mode 100644 node_modules/core-js/library/fn/get-iterator.js create mode 100644 node_modules/core-js/library/fn/global.js create mode 100644 node_modules/core-js/library/fn/is-iterable.js create mode 100644 node_modules/core-js/library/fn/json/index.js create mode 100644 node_modules/core-js/library/fn/json/stringify.js create mode 100644 node_modules/core-js/library/fn/map.js create mode 100644 node_modules/core-js/library/fn/map/from.js create mode 100644 node_modules/core-js/library/fn/map/index.js create mode 100644 node_modules/core-js/library/fn/map/of.js create mode 100644 node_modules/core-js/library/fn/math/acosh.js create mode 100644 node_modules/core-js/library/fn/math/asinh.js create mode 100644 node_modules/core-js/library/fn/math/atanh.js create mode 100644 node_modules/core-js/library/fn/math/cbrt.js create mode 100644 node_modules/core-js/library/fn/math/clamp.js create mode 100644 node_modules/core-js/library/fn/math/clz32.js create mode 100644 node_modules/core-js/library/fn/math/cosh.js create mode 100644 node_modules/core-js/library/fn/math/deg-per-rad.js create mode 100644 node_modules/core-js/library/fn/math/degrees.js create mode 100644 node_modules/core-js/library/fn/math/expm1.js create mode 100644 node_modules/core-js/library/fn/math/fround.js create mode 100644 node_modules/core-js/library/fn/math/fscale.js create mode 100644 node_modules/core-js/library/fn/math/hypot.js create mode 100644 node_modules/core-js/library/fn/math/iaddh.js create mode 100644 node_modules/core-js/library/fn/math/imul.js create mode 100644 node_modules/core-js/library/fn/math/imulh.js create mode 100644 node_modules/core-js/library/fn/math/index.js create mode 100644 node_modules/core-js/library/fn/math/isubh.js create mode 100644 node_modules/core-js/library/fn/math/log10.js create mode 100644 node_modules/core-js/library/fn/math/log1p.js create mode 100644 node_modules/core-js/library/fn/math/log2.js create mode 100644 node_modules/core-js/library/fn/math/rad-per-deg.js create mode 100644 node_modules/core-js/library/fn/math/radians.js create mode 100644 node_modules/core-js/library/fn/math/scale.js create mode 100644 node_modules/core-js/library/fn/math/sign.js create mode 100644 node_modules/core-js/library/fn/math/signbit.js create mode 100644 node_modules/core-js/library/fn/math/sinh.js create mode 100644 node_modules/core-js/library/fn/math/tanh.js create mode 100644 node_modules/core-js/library/fn/math/trunc.js create mode 100644 node_modules/core-js/library/fn/math/umulh.js create mode 100644 node_modules/core-js/library/fn/number/constructor.js create mode 100644 node_modules/core-js/library/fn/number/epsilon.js create mode 100644 node_modules/core-js/library/fn/number/index.js create mode 100644 node_modules/core-js/library/fn/number/is-finite.js create mode 100644 node_modules/core-js/library/fn/number/is-integer.js create mode 100644 node_modules/core-js/library/fn/number/is-nan.js create mode 100644 node_modules/core-js/library/fn/number/is-safe-integer.js create mode 100644 node_modules/core-js/library/fn/number/iterator.js create mode 100644 node_modules/core-js/library/fn/number/max-safe-integer.js create mode 100644 node_modules/core-js/library/fn/number/min-safe-integer.js create mode 100644 node_modules/core-js/library/fn/number/parse-float.js create mode 100644 node_modules/core-js/library/fn/number/parse-int.js create mode 100644 node_modules/core-js/library/fn/number/to-fixed.js create mode 100644 node_modules/core-js/library/fn/number/to-precision.js create mode 100644 node_modules/core-js/library/fn/number/virtual/index.js create mode 100644 node_modules/core-js/library/fn/number/virtual/iterator.js create mode 100644 node_modules/core-js/library/fn/number/virtual/to-fixed.js create mode 100644 node_modules/core-js/library/fn/number/virtual/to-precision.js create mode 100644 node_modules/core-js/library/fn/object/assign.js create mode 100644 node_modules/core-js/library/fn/object/classof.js create mode 100644 node_modules/core-js/library/fn/object/create.js create mode 100644 node_modules/core-js/library/fn/object/define-getter.js create mode 100644 node_modules/core-js/library/fn/object/define-properties.js create mode 100644 node_modules/core-js/library/fn/object/define-property.js create mode 100644 node_modules/core-js/library/fn/object/define-setter.js create mode 100644 node_modules/core-js/library/fn/object/define.js create mode 100644 node_modules/core-js/library/fn/object/entries.js create mode 100644 node_modules/core-js/library/fn/object/freeze.js create mode 100644 node_modules/core-js/library/fn/object/get-own-property-descriptor.js create mode 100644 node_modules/core-js/library/fn/object/get-own-property-descriptors.js create mode 100644 node_modules/core-js/library/fn/object/get-own-property-names.js create mode 100644 node_modules/core-js/library/fn/object/get-own-property-symbols.js create mode 100644 node_modules/core-js/library/fn/object/get-prototype-of.js create mode 100644 node_modules/core-js/library/fn/object/index.js create mode 100644 node_modules/core-js/library/fn/object/is-extensible.js create mode 100644 node_modules/core-js/library/fn/object/is-frozen.js create mode 100644 node_modules/core-js/library/fn/object/is-object.js create mode 100644 node_modules/core-js/library/fn/object/is-sealed.js create mode 100644 node_modules/core-js/library/fn/object/is.js create mode 100644 node_modules/core-js/library/fn/object/keys.js create mode 100644 node_modules/core-js/library/fn/object/lookup-getter.js create mode 100644 node_modules/core-js/library/fn/object/lookup-setter.js create mode 100644 node_modules/core-js/library/fn/object/make.js create mode 100644 node_modules/core-js/library/fn/object/prevent-extensions.js create mode 100644 node_modules/core-js/library/fn/object/seal.js create mode 100644 node_modules/core-js/library/fn/object/set-prototype-of.js create mode 100644 node_modules/core-js/library/fn/object/values.js create mode 100644 node_modules/core-js/library/fn/observable.js create mode 100644 node_modules/core-js/library/fn/parse-float.js create mode 100644 node_modules/core-js/library/fn/parse-int.js create mode 100644 node_modules/core-js/library/fn/promise.js create mode 100644 node_modules/core-js/library/fn/promise/finally.js create mode 100644 node_modules/core-js/library/fn/promise/index.js create mode 100644 node_modules/core-js/library/fn/promise/try.js create mode 100644 node_modules/core-js/library/fn/reflect/apply.js create mode 100644 node_modules/core-js/library/fn/reflect/construct.js create mode 100644 node_modules/core-js/library/fn/reflect/define-metadata.js create mode 100644 node_modules/core-js/library/fn/reflect/define-property.js create mode 100644 node_modules/core-js/library/fn/reflect/delete-metadata.js create mode 100644 node_modules/core-js/library/fn/reflect/delete-property.js create mode 100644 node_modules/core-js/library/fn/reflect/enumerate.js create mode 100644 node_modules/core-js/library/fn/reflect/get-metadata-keys.js create mode 100644 node_modules/core-js/library/fn/reflect/get-metadata.js create mode 100644 node_modules/core-js/library/fn/reflect/get-own-metadata-keys.js create mode 100644 node_modules/core-js/library/fn/reflect/get-own-metadata.js create mode 100644 node_modules/core-js/library/fn/reflect/get-own-property-descriptor.js create mode 100644 node_modules/core-js/library/fn/reflect/get-prototype-of.js create mode 100644 node_modules/core-js/library/fn/reflect/get.js create mode 100644 node_modules/core-js/library/fn/reflect/has-metadata.js create mode 100644 node_modules/core-js/library/fn/reflect/has-own-metadata.js create mode 100644 node_modules/core-js/library/fn/reflect/has.js create mode 100644 node_modules/core-js/library/fn/reflect/index.js create mode 100644 node_modules/core-js/library/fn/reflect/is-extensible.js create mode 100644 node_modules/core-js/library/fn/reflect/metadata.js create mode 100644 node_modules/core-js/library/fn/reflect/own-keys.js create mode 100644 node_modules/core-js/library/fn/reflect/prevent-extensions.js create mode 100644 node_modules/core-js/library/fn/reflect/set-prototype-of.js create mode 100644 node_modules/core-js/library/fn/reflect/set.js create mode 100644 node_modules/core-js/library/fn/regexp/constructor.js create mode 100644 node_modules/core-js/library/fn/regexp/escape.js create mode 100644 node_modules/core-js/library/fn/regexp/flags.js create mode 100644 node_modules/core-js/library/fn/regexp/index.js create mode 100644 node_modules/core-js/library/fn/regexp/match.js create mode 100644 node_modules/core-js/library/fn/regexp/replace.js create mode 100644 node_modules/core-js/library/fn/regexp/search.js create mode 100644 node_modules/core-js/library/fn/regexp/split.js create mode 100644 node_modules/core-js/library/fn/regexp/to-string.js create mode 100644 node_modules/core-js/library/fn/set-immediate.js create mode 100644 node_modules/core-js/library/fn/set-interval.js create mode 100644 node_modules/core-js/library/fn/set-timeout.js create mode 100644 node_modules/core-js/library/fn/set.js create mode 100644 node_modules/core-js/library/fn/set/from.js create mode 100644 node_modules/core-js/library/fn/set/index.js create mode 100644 node_modules/core-js/library/fn/set/of.js create mode 100644 node_modules/core-js/library/fn/string/anchor.js create mode 100644 node_modules/core-js/library/fn/string/at.js create mode 100644 node_modules/core-js/library/fn/string/big.js create mode 100644 node_modules/core-js/library/fn/string/blink.js create mode 100644 node_modules/core-js/library/fn/string/bold.js create mode 100644 node_modules/core-js/library/fn/string/code-point-at.js create mode 100644 node_modules/core-js/library/fn/string/ends-with.js create mode 100644 node_modules/core-js/library/fn/string/escape-html.js create mode 100644 node_modules/core-js/library/fn/string/fixed.js create mode 100644 node_modules/core-js/library/fn/string/fontcolor.js create mode 100644 node_modules/core-js/library/fn/string/fontsize.js create mode 100644 node_modules/core-js/library/fn/string/from-code-point.js create mode 100644 node_modules/core-js/library/fn/string/includes.js create mode 100644 node_modules/core-js/library/fn/string/index.js create mode 100644 node_modules/core-js/library/fn/string/italics.js create mode 100644 node_modules/core-js/library/fn/string/iterator.js create mode 100644 node_modules/core-js/library/fn/string/link.js create mode 100644 node_modules/core-js/library/fn/string/match-all.js create mode 100644 node_modules/core-js/library/fn/string/pad-end.js create mode 100644 node_modules/core-js/library/fn/string/pad-start.js create mode 100644 node_modules/core-js/library/fn/string/raw.js create mode 100644 node_modules/core-js/library/fn/string/repeat.js create mode 100644 node_modules/core-js/library/fn/string/small.js create mode 100644 node_modules/core-js/library/fn/string/starts-with.js create mode 100644 node_modules/core-js/library/fn/string/strike.js create mode 100644 node_modules/core-js/library/fn/string/sub.js create mode 100644 node_modules/core-js/library/fn/string/sup.js create mode 100644 node_modules/core-js/library/fn/string/trim-end.js create mode 100644 node_modules/core-js/library/fn/string/trim-left.js create mode 100644 node_modules/core-js/library/fn/string/trim-right.js create mode 100644 node_modules/core-js/library/fn/string/trim-start.js create mode 100644 node_modules/core-js/library/fn/string/trim.js create mode 100644 node_modules/core-js/library/fn/string/unescape-html.js create mode 100644 node_modules/core-js/library/fn/string/virtual/anchor.js create mode 100644 node_modules/core-js/library/fn/string/virtual/at.js create mode 100644 node_modules/core-js/library/fn/string/virtual/big.js create mode 100644 node_modules/core-js/library/fn/string/virtual/blink.js create mode 100644 node_modules/core-js/library/fn/string/virtual/bold.js create mode 100644 node_modules/core-js/library/fn/string/virtual/code-point-at.js create mode 100644 node_modules/core-js/library/fn/string/virtual/ends-with.js create mode 100644 node_modules/core-js/library/fn/string/virtual/escape-html.js create mode 100644 node_modules/core-js/library/fn/string/virtual/fixed.js create mode 100644 node_modules/core-js/library/fn/string/virtual/fontcolor.js create mode 100644 node_modules/core-js/library/fn/string/virtual/fontsize.js create mode 100644 node_modules/core-js/library/fn/string/virtual/includes.js create mode 100644 node_modules/core-js/library/fn/string/virtual/index.js create mode 100644 node_modules/core-js/library/fn/string/virtual/italics.js create mode 100644 node_modules/core-js/library/fn/string/virtual/iterator.js create mode 100644 node_modules/core-js/library/fn/string/virtual/link.js create mode 100644 node_modules/core-js/library/fn/string/virtual/match-all.js create mode 100644 node_modules/core-js/library/fn/string/virtual/pad-end.js create mode 100644 node_modules/core-js/library/fn/string/virtual/pad-start.js create mode 100644 node_modules/core-js/library/fn/string/virtual/repeat.js create mode 100644 node_modules/core-js/library/fn/string/virtual/small.js create mode 100644 node_modules/core-js/library/fn/string/virtual/starts-with.js create mode 100644 node_modules/core-js/library/fn/string/virtual/strike.js create mode 100644 node_modules/core-js/library/fn/string/virtual/sub.js create mode 100644 node_modules/core-js/library/fn/string/virtual/sup.js create mode 100644 node_modules/core-js/library/fn/string/virtual/trim-end.js create mode 100644 node_modules/core-js/library/fn/string/virtual/trim-left.js create mode 100644 node_modules/core-js/library/fn/string/virtual/trim-right.js create mode 100644 node_modules/core-js/library/fn/string/virtual/trim-start.js create mode 100644 node_modules/core-js/library/fn/string/virtual/trim.js create mode 100644 node_modules/core-js/library/fn/string/virtual/unescape-html.js create mode 100644 node_modules/core-js/library/fn/symbol/async-iterator.js create mode 100644 node_modules/core-js/library/fn/symbol/for.js create mode 100644 node_modules/core-js/library/fn/symbol/has-instance.js create mode 100644 node_modules/core-js/library/fn/symbol/index.js create mode 100644 node_modules/core-js/library/fn/symbol/is-concat-spreadable.js create mode 100644 node_modules/core-js/library/fn/symbol/iterator.js create mode 100644 node_modules/core-js/library/fn/symbol/key-for.js create mode 100644 node_modules/core-js/library/fn/symbol/match.js create mode 100644 node_modules/core-js/library/fn/symbol/observable.js create mode 100644 node_modules/core-js/library/fn/symbol/replace.js create mode 100644 node_modules/core-js/library/fn/symbol/search.js create mode 100644 node_modules/core-js/library/fn/symbol/species.js create mode 100644 node_modules/core-js/library/fn/symbol/split.js create mode 100644 node_modules/core-js/library/fn/symbol/to-primitive.js create mode 100644 node_modules/core-js/library/fn/symbol/to-string-tag.js create mode 100644 node_modules/core-js/library/fn/symbol/unscopables.js create mode 100644 node_modules/core-js/library/fn/system/global.js create mode 100644 node_modules/core-js/library/fn/system/index.js create mode 100644 node_modules/core-js/library/fn/typed/array-buffer.js create mode 100644 node_modules/core-js/library/fn/typed/data-view.js create mode 100644 node_modules/core-js/library/fn/typed/float32-array.js create mode 100644 node_modules/core-js/library/fn/typed/float64-array.js create mode 100644 node_modules/core-js/library/fn/typed/index.js create mode 100644 node_modules/core-js/library/fn/typed/int16-array.js create mode 100644 node_modules/core-js/library/fn/typed/int32-array.js create mode 100644 node_modules/core-js/library/fn/typed/int8-array.js create mode 100644 node_modules/core-js/library/fn/typed/uint16-array.js create mode 100644 node_modules/core-js/library/fn/typed/uint32-array.js create mode 100644 node_modules/core-js/library/fn/typed/uint8-array.js create mode 100644 node_modules/core-js/library/fn/typed/uint8-clamped-array.js create mode 100644 node_modules/core-js/library/fn/weak-map.js create mode 100644 node_modules/core-js/library/fn/weak-map/from.js create mode 100644 node_modules/core-js/library/fn/weak-map/index.js create mode 100644 node_modules/core-js/library/fn/weak-map/of.js create mode 100644 node_modules/core-js/library/fn/weak-set.js create mode 100644 node_modules/core-js/library/fn/weak-set/from.js create mode 100644 node_modules/core-js/library/fn/weak-set/index.js create mode 100644 node_modules/core-js/library/fn/weak-set/of.js create mode 100644 node_modules/core-js/library/index.js create mode 100644 node_modules/core-js/library/modules/_a-function.js create mode 100644 node_modules/core-js/library/modules/_a-number-value.js create mode 100644 node_modules/core-js/library/modules/_add-to-unscopables.js create mode 100644 node_modules/core-js/library/modules/_advance-string-index.js create mode 100644 node_modules/core-js/library/modules/_an-instance.js create mode 100644 node_modules/core-js/library/modules/_an-object.js create mode 100644 node_modules/core-js/library/modules/_array-copy-within.js create mode 100644 node_modules/core-js/library/modules/_array-fill.js create mode 100644 node_modules/core-js/library/modules/_array-from-iterable.js create mode 100644 node_modules/core-js/library/modules/_array-includes.js create mode 100644 node_modules/core-js/library/modules/_array-methods.js create mode 100644 node_modules/core-js/library/modules/_array-reduce.js create mode 100644 node_modules/core-js/library/modules/_array-species-constructor.js create mode 100644 node_modules/core-js/library/modules/_array-species-create.js create mode 100644 node_modules/core-js/library/modules/_bind.js create mode 100644 node_modules/core-js/library/modules/_classof.js create mode 100644 node_modules/core-js/library/modules/_cof.js create mode 100644 node_modules/core-js/library/modules/_collection-strong.js create mode 100644 node_modules/core-js/library/modules/_collection-to-json.js create mode 100644 node_modules/core-js/library/modules/_collection-weak.js create mode 100644 node_modules/core-js/library/modules/_collection.js create mode 100644 node_modules/core-js/library/modules/_core.js create mode 100644 node_modules/core-js/library/modules/_create-property.js create mode 100644 node_modules/core-js/library/modules/_ctx.js create mode 100644 node_modules/core-js/library/modules/_date-to-iso-string.js create mode 100644 node_modules/core-js/library/modules/_date-to-primitive.js create mode 100644 node_modules/core-js/library/modules/_defined.js create mode 100644 node_modules/core-js/library/modules/_descriptors.js create mode 100644 node_modules/core-js/library/modules/_dom-create.js create mode 100644 node_modules/core-js/library/modules/_entry-virtual.js create mode 100644 node_modules/core-js/library/modules/_enum-bug-keys.js create mode 100644 node_modules/core-js/library/modules/_enum-keys.js create mode 100644 node_modules/core-js/library/modules/_export.js create mode 100644 node_modules/core-js/library/modules/_fails-is-regexp.js create mode 100644 node_modules/core-js/library/modules/_fails.js create mode 100644 node_modules/core-js/library/modules/_fix-re-wks.js create mode 100644 node_modules/core-js/library/modules/_flags.js create mode 100644 node_modules/core-js/library/modules/_flatten-into-array.js create mode 100644 node_modules/core-js/library/modules/_for-of.js create mode 100644 node_modules/core-js/library/modules/_function-to-string.js create mode 100644 node_modules/core-js/library/modules/_global.js create mode 100644 node_modules/core-js/library/modules/_has.js create mode 100644 node_modules/core-js/library/modules/_hide.js create mode 100644 node_modules/core-js/library/modules/_html.js create mode 100644 node_modules/core-js/library/modules/_ie8-dom-define.js create mode 100644 node_modules/core-js/library/modules/_inherit-if-required.js create mode 100644 node_modules/core-js/library/modules/_invoke.js create mode 100644 node_modules/core-js/library/modules/_iobject.js create mode 100644 node_modules/core-js/library/modules/_is-array-iter.js create mode 100644 node_modules/core-js/library/modules/_is-array.js create mode 100644 node_modules/core-js/library/modules/_is-integer.js create mode 100644 node_modules/core-js/library/modules/_is-object.js create mode 100644 node_modules/core-js/library/modules/_is-regexp.js create mode 100644 node_modules/core-js/library/modules/_iter-call.js create mode 100644 node_modules/core-js/library/modules/_iter-create.js create mode 100644 node_modules/core-js/library/modules/_iter-define.js create mode 100644 node_modules/core-js/library/modules/_iter-detect.js create mode 100644 node_modules/core-js/library/modules/_iter-step.js create mode 100644 node_modules/core-js/library/modules/_iterators.js create mode 100644 node_modules/core-js/library/modules/_keyof.js create mode 100644 node_modules/core-js/library/modules/_library.js create mode 100644 node_modules/core-js/library/modules/_math-expm1.js create mode 100644 node_modules/core-js/library/modules/_math-fround.js create mode 100644 node_modules/core-js/library/modules/_math-log1p.js create mode 100644 node_modules/core-js/library/modules/_math-scale.js create mode 100644 node_modules/core-js/library/modules/_math-sign.js create mode 100644 node_modules/core-js/library/modules/_meta.js create mode 100644 node_modules/core-js/library/modules/_metadata.js create mode 100644 node_modules/core-js/library/modules/_microtask.js create mode 100644 node_modules/core-js/library/modules/_native-weak-map.js create mode 100644 node_modules/core-js/library/modules/_new-promise-capability.js create mode 100644 node_modules/core-js/library/modules/_object-assign.js create mode 100644 node_modules/core-js/library/modules/_object-create.js create mode 100644 node_modules/core-js/library/modules/_object-define.js create mode 100644 node_modules/core-js/library/modules/_object-dp.js create mode 100644 node_modules/core-js/library/modules/_object-dps.js create mode 100644 node_modules/core-js/library/modules/_object-forced-pam.js create mode 100644 node_modules/core-js/library/modules/_object-gopd.js create mode 100644 node_modules/core-js/library/modules/_object-gopn-ext.js create mode 100644 node_modules/core-js/library/modules/_object-gopn.js create mode 100644 node_modules/core-js/library/modules/_object-gops.js create mode 100644 node_modules/core-js/library/modules/_object-gpo.js create mode 100644 node_modules/core-js/library/modules/_object-keys-internal.js create mode 100644 node_modules/core-js/library/modules/_object-keys.js create mode 100644 node_modules/core-js/library/modules/_object-pie.js create mode 100644 node_modules/core-js/library/modules/_object-sap.js create mode 100644 node_modules/core-js/library/modules/_object-to-array.js create mode 100644 node_modules/core-js/library/modules/_own-keys.js create mode 100644 node_modules/core-js/library/modules/_parse-float.js create mode 100644 node_modules/core-js/library/modules/_parse-int.js create mode 100644 node_modules/core-js/library/modules/_partial.js create mode 100644 node_modules/core-js/library/modules/_path.js create mode 100644 node_modules/core-js/library/modules/_perform.js create mode 100644 node_modules/core-js/library/modules/_promise-resolve.js create mode 100644 node_modules/core-js/library/modules/_property-desc.js create mode 100644 node_modules/core-js/library/modules/_redefine-all.js create mode 100644 node_modules/core-js/library/modules/_redefine.js create mode 100644 node_modules/core-js/library/modules/_regexp-exec-abstract.js create mode 100644 node_modules/core-js/library/modules/_regexp-exec.js create mode 100644 node_modules/core-js/library/modules/_replacer.js create mode 100644 node_modules/core-js/library/modules/_same-value.js create mode 100644 node_modules/core-js/library/modules/_set-collection-from.js create mode 100644 node_modules/core-js/library/modules/_set-collection-of.js create mode 100644 node_modules/core-js/library/modules/_set-proto.js create mode 100644 node_modules/core-js/library/modules/_set-species.js create mode 100644 node_modules/core-js/library/modules/_set-to-string-tag.js create mode 100644 node_modules/core-js/library/modules/_shared-key.js create mode 100644 node_modules/core-js/library/modules/_shared.js create mode 100644 node_modules/core-js/library/modules/_species-constructor.js create mode 100644 node_modules/core-js/library/modules/_strict-method.js create mode 100644 node_modules/core-js/library/modules/_string-at.js create mode 100644 node_modules/core-js/library/modules/_string-context.js create mode 100644 node_modules/core-js/library/modules/_string-html.js create mode 100644 node_modules/core-js/library/modules/_string-pad.js create mode 100644 node_modules/core-js/library/modules/_string-repeat.js create mode 100644 node_modules/core-js/library/modules/_string-trim.js create mode 100644 node_modules/core-js/library/modules/_string-ws.js create mode 100644 node_modules/core-js/library/modules/_task.js create mode 100644 node_modules/core-js/library/modules/_to-absolute-index.js create mode 100644 node_modules/core-js/library/modules/_to-index.js create mode 100644 node_modules/core-js/library/modules/_to-integer.js create mode 100644 node_modules/core-js/library/modules/_to-iobject.js create mode 100644 node_modules/core-js/library/modules/_to-length.js create mode 100644 node_modules/core-js/library/modules/_to-object.js create mode 100644 node_modules/core-js/library/modules/_to-primitive.js create mode 100644 node_modules/core-js/library/modules/_typed-array.js create mode 100644 node_modules/core-js/library/modules/_typed-buffer.js create mode 100644 node_modules/core-js/library/modules/_typed.js create mode 100644 node_modules/core-js/library/modules/_uid.js create mode 100644 node_modules/core-js/library/modules/_user-agent.js create mode 100644 node_modules/core-js/library/modules/_validate-collection.js create mode 100644 node_modules/core-js/library/modules/_wks-define.js create mode 100644 node_modules/core-js/library/modules/_wks-ext.js create mode 100644 node_modules/core-js/library/modules/_wks.js create mode 100644 node_modules/core-js/library/modules/core.delay.js create mode 100644 node_modules/core-js/library/modules/core.dict.js create mode 100644 node_modules/core-js/library/modules/core.function.part.js create mode 100644 node_modules/core-js/library/modules/core.get-iterator-method.js create mode 100644 node_modules/core-js/library/modules/core.get-iterator.js create mode 100644 node_modules/core-js/library/modules/core.is-iterable.js create mode 100644 node_modules/core-js/library/modules/core.number.iterator.js create mode 100644 node_modules/core-js/library/modules/core.object.classof.js create mode 100644 node_modules/core-js/library/modules/core.object.define.js create mode 100644 node_modules/core-js/library/modules/core.object.is-object.js create mode 100644 node_modules/core-js/library/modules/core.object.make.js create mode 100644 node_modules/core-js/library/modules/core.regexp.escape.js create mode 100644 node_modules/core-js/library/modules/core.string.escape-html.js create mode 100644 node_modules/core-js/library/modules/core.string.unescape-html.js create mode 100644 node_modules/core-js/library/modules/es5.js create mode 100644 node_modules/core-js/library/modules/es6.array.copy-within.js create mode 100644 node_modules/core-js/library/modules/es6.array.every.js create mode 100644 node_modules/core-js/library/modules/es6.array.fill.js create mode 100644 node_modules/core-js/library/modules/es6.array.filter.js create mode 100644 node_modules/core-js/library/modules/es6.array.find-index.js create mode 100644 node_modules/core-js/library/modules/es6.array.find.js create mode 100644 node_modules/core-js/library/modules/es6.array.for-each.js create mode 100644 node_modules/core-js/library/modules/es6.array.from.js create mode 100644 node_modules/core-js/library/modules/es6.array.index-of.js create mode 100644 node_modules/core-js/library/modules/es6.array.is-array.js create mode 100644 node_modules/core-js/library/modules/es6.array.iterator.js create mode 100644 node_modules/core-js/library/modules/es6.array.join.js create mode 100644 node_modules/core-js/library/modules/es6.array.last-index-of.js create mode 100644 node_modules/core-js/library/modules/es6.array.map.js create mode 100644 node_modules/core-js/library/modules/es6.array.of.js create mode 100644 node_modules/core-js/library/modules/es6.array.reduce-right.js create mode 100644 node_modules/core-js/library/modules/es6.array.reduce.js create mode 100644 node_modules/core-js/library/modules/es6.array.slice.js create mode 100644 node_modules/core-js/library/modules/es6.array.some.js create mode 100644 node_modules/core-js/library/modules/es6.array.sort.js create mode 100644 node_modules/core-js/library/modules/es6.array.species.js create mode 100644 node_modules/core-js/library/modules/es6.date.now.js create mode 100644 node_modules/core-js/library/modules/es6.date.to-iso-string.js create mode 100644 node_modules/core-js/library/modules/es6.date.to-json.js rename node_modules/{nopt/.gitignore => core-js/library/modules/es6.date.to-primitive.js} (100%) create mode 100644 node_modules/core-js/library/modules/es6.date.to-string.js create mode 100644 node_modules/core-js/library/modules/es6.function.bind.js create mode 100644 node_modules/core-js/library/modules/es6.function.has-instance.js create mode 100644 node_modules/core-js/library/modules/es6.function.name.js create mode 100644 node_modules/core-js/library/modules/es6.map.js create mode 100644 node_modules/core-js/library/modules/es6.math.acosh.js create mode 100644 node_modules/core-js/library/modules/es6.math.asinh.js create mode 100644 node_modules/core-js/library/modules/es6.math.atanh.js create mode 100644 node_modules/core-js/library/modules/es6.math.cbrt.js create mode 100644 node_modules/core-js/library/modules/es6.math.clz32.js create mode 100644 node_modules/core-js/library/modules/es6.math.cosh.js create mode 100644 node_modules/core-js/library/modules/es6.math.expm1.js create mode 100644 node_modules/core-js/library/modules/es6.math.fround.js create mode 100644 node_modules/core-js/library/modules/es6.math.hypot.js create mode 100644 node_modules/core-js/library/modules/es6.math.imul.js create mode 100644 node_modules/core-js/library/modules/es6.math.log10.js create mode 100644 node_modules/core-js/library/modules/es6.math.log1p.js create mode 100644 node_modules/core-js/library/modules/es6.math.log2.js create mode 100644 node_modules/core-js/library/modules/es6.math.sign.js create mode 100644 node_modules/core-js/library/modules/es6.math.sinh.js create mode 100644 node_modules/core-js/library/modules/es6.math.tanh.js create mode 100644 node_modules/core-js/library/modules/es6.math.trunc.js create mode 100644 node_modules/core-js/library/modules/es6.number.constructor.js create mode 100644 node_modules/core-js/library/modules/es6.number.epsilon.js create mode 100644 node_modules/core-js/library/modules/es6.number.is-finite.js create mode 100644 node_modules/core-js/library/modules/es6.number.is-integer.js create mode 100644 node_modules/core-js/library/modules/es6.number.is-nan.js create mode 100644 node_modules/core-js/library/modules/es6.number.is-safe-integer.js create mode 100644 node_modules/core-js/library/modules/es6.number.max-safe-integer.js create mode 100644 node_modules/core-js/library/modules/es6.number.min-safe-integer.js create mode 100644 node_modules/core-js/library/modules/es6.number.parse-float.js create mode 100644 node_modules/core-js/library/modules/es6.number.parse-int.js create mode 100644 node_modules/core-js/library/modules/es6.number.to-fixed.js create mode 100644 node_modules/core-js/library/modules/es6.number.to-precision.js create mode 100644 node_modules/core-js/library/modules/es6.object.assign.js create mode 100644 node_modules/core-js/library/modules/es6.object.create.js create mode 100644 node_modules/core-js/library/modules/es6.object.define-properties.js create mode 100644 node_modules/core-js/library/modules/es6.object.define-property.js create mode 100644 node_modules/core-js/library/modules/es6.object.freeze.js create mode 100644 node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js create mode 100644 node_modules/core-js/library/modules/es6.object.get-own-property-names.js create mode 100644 node_modules/core-js/library/modules/es6.object.get-prototype-of.js create mode 100644 node_modules/core-js/library/modules/es6.object.is-extensible.js create mode 100644 node_modules/core-js/library/modules/es6.object.is-frozen.js create mode 100644 node_modules/core-js/library/modules/es6.object.is-sealed.js create mode 100644 node_modules/core-js/library/modules/es6.object.is.js create mode 100644 node_modules/core-js/library/modules/es6.object.keys.js create mode 100644 node_modules/core-js/library/modules/es6.object.prevent-extensions.js create mode 100644 node_modules/core-js/library/modules/es6.object.seal.js create mode 100644 node_modules/core-js/library/modules/es6.object.set-prototype-of.js create mode 100644 node_modules/core-js/library/modules/es6.object.to-string.js create mode 100644 node_modules/core-js/library/modules/es6.parse-float.js create mode 100644 node_modules/core-js/library/modules/es6.parse-int.js create mode 100644 node_modules/core-js/library/modules/es6.promise.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.apply.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.construct.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.define-property.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.delete-property.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.enumerate.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.get.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.has.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.is-extensible.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.own-keys.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js create mode 100644 node_modules/core-js/library/modules/es6.reflect.set.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.constructor.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.exec.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.flags.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.match.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.replace.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.search.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.split.js create mode 100644 node_modules/core-js/library/modules/es6.regexp.to-string.js create mode 100644 node_modules/core-js/library/modules/es6.set.js create mode 100644 node_modules/core-js/library/modules/es6.string.anchor.js create mode 100644 node_modules/core-js/library/modules/es6.string.big.js create mode 100644 node_modules/core-js/library/modules/es6.string.blink.js create mode 100644 node_modules/core-js/library/modules/es6.string.bold.js create mode 100644 node_modules/core-js/library/modules/es6.string.code-point-at.js create mode 100644 node_modules/core-js/library/modules/es6.string.ends-with.js create mode 100644 node_modules/core-js/library/modules/es6.string.fixed.js create mode 100644 node_modules/core-js/library/modules/es6.string.fontcolor.js create mode 100644 node_modules/core-js/library/modules/es6.string.fontsize.js create mode 100644 node_modules/core-js/library/modules/es6.string.from-code-point.js create mode 100644 node_modules/core-js/library/modules/es6.string.includes.js create mode 100644 node_modules/core-js/library/modules/es6.string.italics.js create mode 100644 node_modules/core-js/library/modules/es6.string.iterator.js create mode 100644 node_modules/core-js/library/modules/es6.string.link.js create mode 100644 node_modules/core-js/library/modules/es6.string.raw.js create mode 100644 node_modules/core-js/library/modules/es6.string.repeat.js create mode 100644 node_modules/core-js/library/modules/es6.string.small.js create mode 100644 node_modules/core-js/library/modules/es6.string.starts-with.js create mode 100644 node_modules/core-js/library/modules/es6.string.strike.js create mode 100644 node_modules/core-js/library/modules/es6.string.sub.js create mode 100644 node_modules/core-js/library/modules/es6.string.sup.js create mode 100644 node_modules/core-js/library/modules/es6.string.trim.js create mode 100644 node_modules/core-js/library/modules/es6.symbol.js create mode 100644 node_modules/core-js/library/modules/es6.typed.array-buffer.js create mode 100644 node_modules/core-js/library/modules/es6.typed.data-view.js create mode 100644 node_modules/core-js/library/modules/es6.typed.float32-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.float64-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.int16-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.int32-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.int8-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.uint16-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.uint32-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.uint8-array.js create mode 100644 node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js create mode 100644 node_modules/core-js/library/modules/es6.weak-map.js create mode 100644 node_modules/core-js/library/modules/es6.weak-set.js create mode 100644 node_modules/core-js/library/modules/es7.array.flat-map.js create mode 100644 node_modules/core-js/library/modules/es7.array.flatten.js create mode 100644 node_modules/core-js/library/modules/es7.array.includes.js create mode 100644 node_modules/core-js/library/modules/es7.asap.js create mode 100644 node_modules/core-js/library/modules/es7.error.is-error.js create mode 100644 node_modules/core-js/library/modules/es7.global.js create mode 100644 node_modules/core-js/library/modules/es7.map.from.js create mode 100644 node_modules/core-js/library/modules/es7.map.of.js create mode 100644 node_modules/core-js/library/modules/es7.map.to-json.js create mode 100644 node_modules/core-js/library/modules/es7.math.clamp.js create mode 100644 node_modules/core-js/library/modules/es7.math.deg-per-rad.js create mode 100644 node_modules/core-js/library/modules/es7.math.degrees.js create mode 100644 node_modules/core-js/library/modules/es7.math.fscale.js create mode 100644 node_modules/core-js/library/modules/es7.math.iaddh.js create mode 100644 node_modules/core-js/library/modules/es7.math.imulh.js create mode 100644 node_modules/core-js/library/modules/es7.math.isubh.js create mode 100644 node_modules/core-js/library/modules/es7.math.rad-per-deg.js create mode 100644 node_modules/core-js/library/modules/es7.math.radians.js create mode 100644 node_modules/core-js/library/modules/es7.math.scale.js create mode 100644 node_modules/core-js/library/modules/es7.math.signbit.js create mode 100644 node_modules/core-js/library/modules/es7.math.umulh.js create mode 100644 node_modules/core-js/library/modules/es7.object.define-getter.js create mode 100644 node_modules/core-js/library/modules/es7.object.define-setter.js create mode 100644 node_modules/core-js/library/modules/es7.object.entries.js create mode 100644 node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js create mode 100644 node_modules/core-js/library/modules/es7.object.lookup-getter.js create mode 100644 node_modules/core-js/library/modules/es7.object.lookup-setter.js create mode 100644 node_modules/core-js/library/modules/es7.object.values.js create mode 100644 node_modules/core-js/library/modules/es7.observable.js create mode 100644 node_modules/core-js/library/modules/es7.promise.finally.js create mode 100644 node_modules/core-js/library/modules/es7.promise.try.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.define-metadata.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.delete-metadata.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.get-metadata.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.has-metadata.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js create mode 100644 node_modules/core-js/library/modules/es7.reflect.metadata.js create mode 100644 node_modules/core-js/library/modules/es7.set.from.js create mode 100644 node_modules/core-js/library/modules/es7.set.of.js create mode 100644 node_modules/core-js/library/modules/es7.set.to-json.js create mode 100644 node_modules/core-js/library/modules/es7.string.at.js create mode 100644 node_modules/core-js/library/modules/es7.string.match-all.js create mode 100644 node_modules/core-js/library/modules/es7.string.pad-end.js create mode 100644 node_modules/core-js/library/modules/es7.string.pad-start.js create mode 100644 node_modules/core-js/library/modules/es7.string.trim-left.js create mode 100644 node_modules/core-js/library/modules/es7.string.trim-right.js create mode 100644 node_modules/core-js/library/modules/es7.symbol.async-iterator.js create mode 100644 node_modules/core-js/library/modules/es7.symbol.observable.js create mode 100644 node_modules/core-js/library/modules/es7.system.global.js create mode 100644 node_modules/core-js/library/modules/es7.weak-map.from.js create mode 100644 node_modules/core-js/library/modules/es7.weak-map.of.js create mode 100644 node_modules/core-js/library/modules/es7.weak-set.from.js create mode 100644 node_modules/core-js/library/modules/es7.weak-set.of.js create mode 100644 node_modules/core-js/library/modules/web.dom.iterable.js create mode 100644 node_modules/core-js/library/modules/web.immediate.js create mode 100644 node_modules/core-js/library/modules/web.timers.js create mode 100644 node_modules/core-js/library/shim.js create mode 100644 node_modules/core-js/library/stage/0.js create mode 100644 node_modules/core-js/library/stage/1.js create mode 100644 node_modules/core-js/library/stage/2.js create mode 100644 node_modules/core-js/library/stage/3.js create mode 100644 node_modules/core-js/library/stage/4.js create mode 100644 node_modules/core-js/library/stage/index.js create mode 100644 node_modules/core-js/library/stage/pre.js create mode 100644 node_modules/core-js/library/web/dom-collections.js create mode 100644 node_modules/core-js/library/web/immediate.js create mode 100644 node_modules/core-js/library/web/index.js create mode 100644 node_modules/core-js/library/web/timers.js create mode 100644 node_modules/core-js/modules/_a-function.js create mode 100644 node_modules/core-js/modules/_a-number-value.js create mode 100644 node_modules/core-js/modules/_add-to-unscopables.js create mode 100644 node_modules/core-js/modules/_advance-string-index.js create mode 100644 node_modules/core-js/modules/_an-instance.js create mode 100644 node_modules/core-js/modules/_an-object.js create mode 100644 node_modules/core-js/modules/_array-copy-within.js create mode 100644 node_modules/core-js/modules/_array-fill.js create mode 100644 node_modules/core-js/modules/_array-from-iterable.js create mode 100644 node_modules/core-js/modules/_array-includes.js create mode 100644 node_modules/core-js/modules/_array-methods.js create mode 100644 node_modules/core-js/modules/_array-reduce.js create mode 100644 node_modules/core-js/modules/_array-species-constructor.js create mode 100644 node_modules/core-js/modules/_array-species-create.js create mode 100644 node_modules/core-js/modules/_bind.js create mode 100644 node_modules/core-js/modules/_classof.js create mode 100644 node_modules/core-js/modules/_cof.js create mode 100644 node_modules/core-js/modules/_collection-strong.js create mode 100644 node_modules/core-js/modules/_collection-to-json.js create mode 100644 node_modules/core-js/modules/_collection-weak.js create mode 100644 node_modules/core-js/modules/_collection.js create mode 100644 node_modules/core-js/modules/_core.js create mode 100644 node_modules/core-js/modules/_create-property.js create mode 100644 node_modules/core-js/modules/_ctx.js create mode 100644 node_modules/core-js/modules/_date-to-iso-string.js create mode 100644 node_modules/core-js/modules/_date-to-primitive.js create mode 100644 node_modules/core-js/modules/_defined.js create mode 100644 node_modules/core-js/modules/_descriptors.js create mode 100644 node_modules/core-js/modules/_dom-create.js create mode 100644 node_modules/core-js/modules/_entry-virtual.js create mode 100644 node_modules/core-js/modules/_enum-bug-keys.js create mode 100644 node_modules/core-js/modules/_enum-keys.js create mode 100644 node_modules/core-js/modules/_export.js create mode 100644 node_modules/core-js/modules/_fails-is-regexp.js create mode 100644 node_modules/core-js/modules/_fails.js create mode 100644 node_modules/core-js/modules/_fix-re-wks.js create mode 100644 node_modules/core-js/modules/_flags.js create mode 100644 node_modules/core-js/modules/_flatten-into-array.js create mode 100644 node_modules/core-js/modules/_for-of.js create mode 100644 node_modules/core-js/modules/_function-to-string.js create mode 100644 node_modules/core-js/modules/_global.js create mode 100644 node_modules/core-js/modules/_has.js create mode 100644 node_modules/core-js/modules/_hide.js create mode 100644 node_modules/core-js/modules/_html.js create mode 100644 node_modules/core-js/modules/_ie8-dom-define.js create mode 100644 node_modules/core-js/modules/_inherit-if-required.js create mode 100644 node_modules/core-js/modules/_invoke.js create mode 100644 node_modules/core-js/modules/_iobject.js create mode 100644 node_modules/core-js/modules/_is-array-iter.js create mode 100644 node_modules/core-js/modules/_is-array.js create mode 100644 node_modules/core-js/modules/_is-integer.js create mode 100644 node_modules/core-js/modules/_is-object.js create mode 100644 node_modules/core-js/modules/_is-regexp.js create mode 100644 node_modules/core-js/modules/_iter-call.js create mode 100644 node_modules/core-js/modules/_iter-create.js create mode 100644 node_modules/core-js/modules/_iter-define.js create mode 100644 node_modules/core-js/modules/_iter-detect.js create mode 100644 node_modules/core-js/modules/_iter-step.js create mode 100644 node_modules/core-js/modules/_iterators.js create mode 100644 node_modules/core-js/modules/_keyof.js create mode 100644 node_modules/core-js/modules/_library.js create mode 100644 node_modules/core-js/modules/_math-expm1.js create mode 100644 node_modules/core-js/modules/_math-fround.js create mode 100644 node_modules/core-js/modules/_math-log1p.js create mode 100644 node_modules/core-js/modules/_math-scale.js create mode 100644 node_modules/core-js/modules/_math-sign.js create mode 100644 node_modules/core-js/modules/_meta.js create mode 100644 node_modules/core-js/modules/_metadata.js create mode 100644 node_modules/core-js/modules/_microtask.js create mode 100644 node_modules/core-js/modules/_native-weak-map.js create mode 100644 node_modules/core-js/modules/_new-promise-capability.js create mode 100644 node_modules/core-js/modules/_object-assign.js create mode 100644 node_modules/core-js/modules/_object-create.js create mode 100644 node_modules/core-js/modules/_object-define.js create mode 100644 node_modules/core-js/modules/_object-dp.js create mode 100644 node_modules/core-js/modules/_object-dps.js create mode 100644 node_modules/core-js/modules/_object-forced-pam.js create mode 100644 node_modules/core-js/modules/_object-gopd.js create mode 100644 node_modules/core-js/modules/_object-gopn-ext.js create mode 100644 node_modules/core-js/modules/_object-gopn.js create mode 100644 node_modules/core-js/modules/_object-gops.js create mode 100644 node_modules/core-js/modules/_object-gpo.js create mode 100644 node_modules/core-js/modules/_object-keys-internal.js create mode 100644 node_modules/core-js/modules/_object-keys.js create mode 100644 node_modules/core-js/modules/_object-pie.js create mode 100644 node_modules/core-js/modules/_object-sap.js create mode 100644 node_modules/core-js/modules/_object-to-array.js create mode 100644 node_modules/core-js/modules/_own-keys.js create mode 100644 node_modules/core-js/modules/_parse-float.js create mode 100644 node_modules/core-js/modules/_parse-int.js create mode 100644 node_modules/core-js/modules/_partial.js create mode 100644 node_modules/core-js/modules/_path.js create mode 100644 node_modules/core-js/modules/_perform.js create mode 100644 node_modules/core-js/modules/_promise-resolve.js create mode 100644 node_modules/core-js/modules/_property-desc.js create mode 100644 node_modules/core-js/modules/_redefine-all.js create mode 100644 node_modules/core-js/modules/_redefine.js create mode 100644 node_modules/core-js/modules/_regexp-exec-abstract.js create mode 100644 node_modules/core-js/modules/_regexp-exec.js create mode 100644 node_modules/core-js/modules/_replacer.js create mode 100644 node_modules/core-js/modules/_same-value.js create mode 100644 node_modules/core-js/modules/_set-collection-from.js create mode 100644 node_modules/core-js/modules/_set-collection-of.js create mode 100644 node_modules/core-js/modules/_set-proto.js create mode 100644 node_modules/core-js/modules/_set-species.js create mode 100644 node_modules/core-js/modules/_set-to-string-tag.js create mode 100644 node_modules/core-js/modules/_shared-key.js create mode 100644 node_modules/core-js/modules/_shared.js create mode 100644 node_modules/core-js/modules/_species-constructor.js create mode 100644 node_modules/core-js/modules/_strict-method.js create mode 100644 node_modules/core-js/modules/_string-at.js create mode 100644 node_modules/core-js/modules/_string-context.js create mode 100644 node_modules/core-js/modules/_string-html.js create mode 100644 node_modules/core-js/modules/_string-pad.js create mode 100644 node_modules/core-js/modules/_string-repeat.js create mode 100644 node_modules/core-js/modules/_string-trim.js create mode 100644 node_modules/core-js/modules/_string-ws.js create mode 100644 node_modules/core-js/modules/_task.js create mode 100644 node_modules/core-js/modules/_to-absolute-index.js create mode 100644 node_modules/core-js/modules/_to-index.js create mode 100644 node_modules/core-js/modules/_to-integer.js create mode 100644 node_modules/core-js/modules/_to-iobject.js create mode 100644 node_modules/core-js/modules/_to-length.js create mode 100644 node_modules/core-js/modules/_to-object.js create mode 100644 node_modules/core-js/modules/_to-primitive.js create mode 100644 node_modules/core-js/modules/_typed-array.js create mode 100644 node_modules/core-js/modules/_typed-buffer.js create mode 100644 node_modules/core-js/modules/_typed.js create mode 100644 node_modules/core-js/modules/_uid.js create mode 100644 node_modules/core-js/modules/_user-agent.js create mode 100644 node_modules/core-js/modules/_validate-collection.js create mode 100644 node_modules/core-js/modules/_wks-define.js create mode 100644 node_modules/core-js/modules/_wks-ext.js create mode 100644 node_modules/core-js/modules/_wks.js create mode 100644 node_modules/core-js/modules/core.delay.js create mode 100644 node_modules/core-js/modules/core.dict.js create mode 100644 node_modules/core-js/modules/core.function.part.js create mode 100644 node_modules/core-js/modules/core.get-iterator-method.js create mode 100644 node_modules/core-js/modules/core.get-iterator.js create mode 100644 node_modules/core-js/modules/core.is-iterable.js create mode 100644 node_modules/core-js/modules/core.number.iterator.js create mode 100644 node_modules/core-js/modules/core.object.classof.js create mode 100644 node_modules/core-js/modules/core.object.define.js create mode 100644 node_modules/core-js/modules/core.object.is-object.js create mode 100644 node_modules/core-js/modules/core.object.make.js create mode 100644 node_modules/core-js/modules/core.regexp.escape.js create mode 100644 node_modules/core-js/modules/core.string.escape-html.js create mode 100644 node_modules/core-js/modules/core.string.unescape-html.js create mode 100644 node_modules/core-js/modules/es5.js create mode 100644 node_modules/core-js/modules/es6.array.copy-within.js create mode 100644 node_modules/core-js/modules/es6.array.every.js create mode 100644 node_modules/core-js/modules/es6.array.fill.js create mode 100644 node_modules/core-js/modules/es6.array.filter.js create mode 100644 node_modules/core-js/modules/es6.array.find-index.js create mode 100644 node_modules/core-js/modules/es6.array.find.js create mode 100644 node_modules/core-js/modules/es6.array.for-each.js create mode 100644 node_modules/core-js/modules/es6.array.from.js create mode 100644 node_modules/core-js/modules/es6.array.index-of.js create mode 100644 node_modules/core-js/modules/es6.array.is-array.js create mode 100644 node_modules/core-js/modules/es6.array.iterator.js create mode 100644 node_modules/core-js/modules/es6.array.join.js create mode 100644 node_modules/core-js/modules/es6.array.last-index-of.js create mode 100644 node_modules/core-js/modules/es6.array.map.js create mode 100644 node_modules/core-js/modules/es6.array.of.js create mode 100644 node_modules/core-js/modules/es6.array.reduce-right.js create mode 100644 node_modules/core-js/modules/es6.array.reduce.js create mode 100644 node_modules/core-js/modules/es6.array.slice.js create mode 100644 node_modules/core-js/modules/es6.array.some.js create mode 100644 node_modules/core-js/modules/es6.array.sort.js create mode 100644 node_modules/core-js/modules/es6.array.species.js create mode 100644 node_modules/core-js/modules/es6.date.now.js create mode 100644 node_modules/core-js/modules/es6.date.to-iso-string.js create mode 100644 node_modules/core-js/modules/es6.date.to-json.js create mode 100644 node_modules/core-js/modules/es6.date.to-primitive.js create mode 100644 node_modules/core-js/modules/es6.date.to-string.js create mode 100644 node_modules/core-js/modules/es6.function.bind.js create mode 100644 node_modules/core-js/modules/es6.function.has-instance.js create mode 100644 node_modules/core-js/modules/es6.function.name.js create mode 100644 node_modules/core-js/modules/es6.map.js create mode 100644 node_modules/core-js/modules/es6.math.acosh.js create mode 100644 node_modules/core-js/modules/es6.math.asinh.js create mode 100644 node_modules/core-js/modules/es6.math.atanh.js create mode 100644 node_modules/core-js/modules/es6.math.cbrt.js create mode 100644 node_modules/core-js/modules/es6.math.clz32.js create mode 100644 node_modules/core-js/modules/es6.math.cosh.js create mode 100644 node_modules/core-js/modules/es6.math.expm1.js create mode 100644 node_modules/core-js/modules/es6.math.fround.js create mode 100644 node_modules/core-js/modules/es6.math.hypot.js create mode 100644 node_modules/core-js/modules/es6.math.imul.js create mode 100644 node_modules/core-js/modules/es6.math.log10.js create mode 100644 node_modules/core-js/modules/es6.math.log1p.js create mode 100644 node_modules/core-js/modules/es6.math.log2.js create mode 100644 node_modules/core-js/modules/es6.math.sign.js create mode 100644 node_modules/core-js/modules/es6.math.sinh.js create mode 100644 node_modules/core-js/modules/es6.math.tanh.js create mode 100644 node_modules/core-js/modules/es6.math.trunc.js create mode 100644 node_modules/core-js/modules/es6.number.constructor.js create mode 100644 node_modules/core-js/modules/es6.number.epsilon.js create mode 100644 node_modules/core-js/modules/es6.number.is-finite.js create mode 100644 node_modules/core-js/modules/es6.number.is-integer.js create mode 100644 node_modules/core-js/modules/es6.number.is-nan.js create mode 100644 node_modules/core-js/modules/es6.number.is-safe-integer.js create mode 100644 node_modules/core-js/modules/es6.number.max-safe-integer.js create mode 100644 node_modules/core-js/modules/es6.number.min-safe-integer.js create mode 100644 node_modules/core-js/modules/es6.number.parse-float.js create mode 100644 node_modules/core-js/modules/es6.number.parse-int.js create mode 100644 node_modules/core-js/modules/es6.number.to-fixed.js create mode 100644 node_modules/core-js/modules/es6.number.to-precision.js create mode 100644 node_modules/core-js/modules/es6.object.assign.js create mode 100644 node_modules/core-js/modules/es6.object.create.js create mode 100644 node_modules/core-js/modules/es6.object.define-properties.js create mode 100644 node_modules/core-js/modules/es6.object.define-property.js create mode 100644 node_modules/core-js/modules/es6.object.freeze.js create mode 100644 node_modules/core-js/modules/es6.object.get-own-property-descriptor.js create mode 100644 node_modules/core-js/modules/es6.object.get-own-property-names.js create mode 100644 node_modules/core-js/modules/es6.object.get-prototype-of.js create mode 100644 node_modules/core-js/modules/es6.object.is-extensible.js create mode 100644 node_modules/core-js/modules/es6.object.is-frozen.js create mode 100644 node_modules/core-js/modules/es6.object.is-sealed.js create mode 100644 node_modules/core-js/modules/es6.object.is.js create mode 100644 node_modules/core-js/modules/es6.object.keys.js create mode 100644 node_modules/core-js/modules/es6.object.prevent-extensions.js create mode 100644 node_modules/core-js/modules/es6.object.seal.js create mode 100644 node_modules/core-js/modules/es6.object.set-prototype-of.js create mode 100644 node_modules/core-js/modules/es6.object.to-string.js create mode 100644 node_modules/core-js/modules/es6.parse-float.js create mode 100644 node_modules/core-js/modules/es6.parse-int.js create mode 100644 node_modules/core-js/modules/es6.promise.js create mode 100644 node_modules/core-js/modules/es6.reflect.apply.js create mode 100644 node_modules/core-js/modules/es6.reflect.construct.js create mode 100644 node_modules/core-js/modules/es6.reflect.define-property.js create mode 100644 node_modules/core-js/modules/es6.reflect.delete-property.js create mode 100644 node_modules/core-js/modules/es6.reflect.enumerate.js create mode 100644 node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js create mode 100644 node_modules/core-js/modules/es6.reflect.get-prototype-of.js create mode 100644 node_modules/core-js/modules/es6.reflect.get.js create mode 100644 node_modules/core-js/modules/es6.reflect.has.js create mode 100644 node_modules/core-js/modules/es6.reflect.is-extensible.js create mode 100644 node_modules/core-js/modules/es6.reflect.own-keys.js create mode 100644 node_modules/core-js/modules/es6.reflect.prevent-extensions.js create mode 100644 node_modules/core-js/modules/es6.reflect.set-prototype-of.js create mode 100644 node_modules/core-js/modules/es6.reflect.set.js create mode 100644 node_modules/core-js/modules/es6.regexp.constructor.js create mode 100644 node_modules/core-js/modules/es6.regexp.exec.js create mode 100644 node_modules/core-js/modules/es6.regexp.flags.js create mode 100644 node_modules/core-js/modules/es6.regexp.match.js create mode 100644 node_modules/core-js/modules/es6.regexp.replace.js create mode 100644 node_modules/core-js/modules/es6.regexp.search.js create mode 100644 node_modules/core-js/modules/es6.regexp.split.js create mode 100644 node_modules/core-js/modules/es6.regexp.to-string.js create mode 100644 node_modules/core-js/modules/es6.set.js create mode 100644 node_modules/core-js/modules/es6.string.anchor.js create mode 100644 node_modules/core-js/modules/es6.string.big.js create mode 100644 node_modules/core-js/modules/es6.string.blink.js create mode 100644 node_modules/core-js/modules/es6.string.bold.js create mode 100644 node_modules/core-js/modules/es6.string.code-point-at.js create mode 100644 node_modules/core-js/modules/es6.string.ends-with.js create mode 100644 node_modules/core-js/modules/es6.string.fixed.js create mode 100644 node_modules/core-js/modules/es6.string.fontcolor.js create mode 100644 node_modules/core-js/modules/es6.string.fontsize.js create mode 100644 node_modules/core-js/modules/es6.string.from-code-point.js create mode 100644 node_modules/core-js/modules/es6.string.includes.js create mode 100644 node_modules/core-js/modules/es6.string.italics.js create mode 100644 node_modules/core-js/modules/es6.string.iterator.js create mode 100644 node_modules/core-js/modules/es6.string.link.js create mode 100644 node_modules/core-js/modules/es6.string.raw.js create mode 100644 node_modules/core-js/modules/es6.string.repeat.js create mode 100644 node_modules/core-js/modules/es6.string.small.js create mode 100644 node_modules/core-js/modules/es6.string.starts-with.js create mode 100644 node_modules/core-js/modules/es6.string.strike.js create mode 100644 node_modules/core-js/modules/es6.string.sub.js create mode 100644 node_modules/core-js/modules/es6.string.sup.js create mode 100644 node_modules/core-js/modules/es6.string.trim.js create mode 100644 node_modules/core-js/modules/es6.symbol.js create mode 100644 node_modules/core-js/modules/es6.typed.array-buffer.js create mode 100644 node_modules/core-js/modules/es6.typed.data-view.js create mode 100644 node_modules/core-js/modules/es6.typed.float32-array.js create mode 100644 node_modules/core-js/modules/es6.typed.float64-array.js create mode 100644 node_modules/core-js/modules/es6.typed.int16-array.js create mode 100644 node_modules/core-js/modules/es6.typed.int32-array.js create mode 100644 node_modules/core-js/modules/es6.typed.int8-array.js create mode 100644 node_modules/core-js/modules/es6.typed.uint16-array.js create mode 100644 node_modules/core-js/modules/es6.typed.uint32-array.js create mode 100644 node_modules/core-js/modules/es6.typed.uint8-array.js create mode 100644 node_modules/core-js/modules/es6.typed.uint8-clamped-array.js create mode 100644 node_modules/core-js/modules/es6.weak-map.js create mode 100644 node_modules/core-js/modules/es6.weak-set.js create mode 100644 node_modules/core-js/modules/es7.array.flat-map.js create mode 100644 node_modules/core-js/modules/es7.array.flatten.js create mode 100644 node_modules/core-js/modules/es7.array.includes.js create mode 100644 node_modules/core-js/modules/es7.asap.js create mode 100644 node_modules/core-js/modules/es7.error.is-error.js create mode 100644 node_modules/core-js/modules/es7.global.js create mode 100644 node_modules/core-js/modules/es7.map.from.js create mode 100644 node_modules/core-js/modules/es7.map.of.js create mode 100644 node_modules/core-js/modules/es7.map.to-json.js create mode 100644 node_modules/core-js/modules/es7.math.clamp.js create mode 100644 node_modules/core-js/modules/es7.math.deg-per-rad.js create mode 100644 node_modules/core-js/modules/es7.math.degrees.js create mode 100644 node_modules/core-js/modules/es7.math.fscale.js create mode 100644 node_modules/core-js/modules/es7.math.iaddh.js create mode 100644 node_modules/core-js/modules/es7.math.imulh.js create mode 100644 node_modules/core-js/modules/es7.math.isubh.js create mode 100644 node_modules/core-js/modules/es7.math.rad-per-deg.js create mode 100644 node_modules/core-js/modules/es7.math.radians.js create mode 100644 node_modules/core-js/modules/es7.math.scale.js create mode 100644 node_modules/core-js/modules/es7.math.signbit.js create mode 100644 node_modules/core-js/modules/es7.math.umulh.js create mode 100644 node_modules/core-js/modules/es7.object.define-getter.js create mode 100644 node_modules/core-js/modules/es7.object.define-setter.js create mode 100644 node_modules/core-js/modules/es7.object.entries.js create mode 100644 node_modules/core-js/modules/es7.object.get-own-property-descriptors.js create mode 100644 node_modules/core-js/modules/es7.object.lookup-getter.js create mode 100644 node_modules/core-js/modules/es7.object.lookup-setter.js create mode 100644 node_modules/core-js/modules/es7.object.values.js create mode 100644 node_modules/core-js/modules/es7.observable.js create mode 100644 node_modules/core-js/modules/es7.promise.finally.js create mode 100644 node_modules/core-js/modules/es7.promise.try.js create mode 100644 node_modules/core-js/modules/es7.reflect.define-metadata.js create mode 100644 node_modules/core-js/modules/es7.reflect.delete-metadata.js create mode 100644 node_modules/core-js/modules/es7.reflect.get-metadata-keys.js create mode 100644 node_modules/core-js/modules/es7.reflect.get-metadata.js create mode 100644 node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js create mode 100644 node_modules/core-js/modules/es7.reflect.get-own-metadata.js create mode 100644 node_modules/core-js/modules/es7.reflect.has-metadata.js create mode 100644 node_modules/core-js/modules/es7.reflect.has-own-metadata.js create mode 100644 node_modules/core-js/modules/es7.reflect.metadata.js create mode 100644 node_modules/core-js/modules/es7.set.from.js create mode 100644 node_modules/core-js/modules/es7.set.of.js create mode 100644 node_modules/core-js/modules/es7.set.to-json.js create mode 100644 node_modules/core-js/modules/es7.string.at.js create mode 100644 node_modules/core-js/modules/es7.string.match-all.js create mode 100644 node_modules/core-js/modules/es7.string.pad-end.js create mode 100644 node_modules/core-js/modules/es7.string.pad-start.js create mode 100644 node_modules/core-js/modules/es7.string.trim-left.js create mode 100644 node_modules/core-js/modules/es7.string.trim-right.js create mode 100644 node_modules/core-js/modules/es7.symbol.async-iterator.js create mode 100644 node_modules/core-js/modules/es7.symbol.observable.js create mode 100644 node_modules/core-js/modules/es7.system.global.js create mode 100644 node_modules/core-js/modules/es7.weak-map.from.js create mode 100644 node_modules/core-js/modules/es7.weak-map.of.js create mode 100644 node_modules/core-js/modules/es7.weak-set.from.js create mode 100644 node_modules/core-js/modules/es7.weak-set.of.js create mode 100644 node_modules/core-js/modules/library/_add-to-unscopables.js create mode 100644 node_modules/core-js/modules/library/_collection.js create mode 100644 node_modules/core-js/modules/library/_export.js create mode 100644 node_modules/core-js/modules/library/_library.js create mode 100644 node_modules/core-js/modules/library/_path.js create mode 100644 node_modules/core-js/modules/library/_redefine-all.js create mode 100644 node_modules/core-js/modules/library/_redefine.js create mode 100644 node_modules/core-js/modules/library/_regexp-exec-abstract.js create mode 100644 node_modules/core-js/modules/library/_regexp-exec.js create mode 100644 node_modules/core-js/modules/library/_set-species.js create mode 100644 node_modules/core-js/modules/library/es6.date.to-json.js create mode 100644 node_modules/core-js/modules/library/es6.date.to-primitive.js create mode 100644 node_modules/core-js/modules/library/es6.date.to-string.js create mode 100644 node_modules/core-js/modules/library/es6.function.name.js create mode 100644 node_modules/core-js/modules/library/es6.number.constructor.js create mode 100644 node_modules/core-js/modules/library/es6.object.to-string.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.constructor.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.exec.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.flags.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.match.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.replace.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.search.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.split.js create mode 100644 node_modules/core-js/modules/library/es6.regexp.to-string.js create mode 100644 node_modules/core-js/modules/library/web.dom.iterable.js create mode 100644 node_modules/core-js/modules/web.dom.iterable.js create mode 100644 node_modules/core-js/modules/web.immediate.js create mode 100644 node_modules/core-js/modules/web.timers.js create mode 100644 node_modules/core-js/package.json create mode 100644 node_modules/core-js/scripts/postinstall.js create mode 100644 node_modules/core-js/shim.js create mode 100644 node_modules/core-js/stage/0.js create mode 100644 node_modules/core-js/stage/1.js create mode 100644 node_modules/core-js/stage/2.js create mode 100644 node_modules/core-js/stage/3.js create mode 100644 node_modules/core-js/stage/4.js create mode 100644 node_modules/core-js/stage/index.js create mode 100644 node_modules/core-js/stage/pre.js create mode 100644 node_modules/core-js/web/dom-collections.js create mode 100644 node_modules/core-js/web/immediate.js create mode 100644 node_modules/core-js/web/index.js create mode 100644 node_modules/core-js/web/timers.js create mode 100755 node_modules/d/.editorconfig create mode 100644 node_modules/d/.github/FUNDING.yml create mode 100644 node_modules/d/CHANGELOG.md create mode 100644 node_modules/d/CHANGES create mode 100644 node_modules/d/LICENSE create mode 100644 node_modules/d/README.md create mode 100644 node_modules/d/auto-bind.js create mode 100644 node_modules/d/index.js create mode 100644 node_modules/d/lazy.js create mode 100644 node_modules/d/package.json create mode 100644 node_modules/d/test/auto-bind.js create mode 100644 node_modules/d/test/index.js create mode 100644 node_modules/d/test/lazy.js create mode 100644 node_modules/decamelize/index.js create mode 100644 node_modules/decamelize/license create mode 100644 node_modules/decamelize/package.json create mode 100644 node_modules/decamelize/readme.md create mode 100644 node_modules/dottie/LICENSE create mode 100644 node_modules/dottie/README.md create mode 100644 node_modules/dottie/dottie.js create mode 100644 node_modules/dottie/package.json create mode 100644 node_modules/editorconfig/CHANGELOG.md create mode 100644 node_modules/editorconfig/LICENSE create mode 100644 node_modules/editorconfig/README.md create mode 100755 node_modules/editorconfig/bin/editorconfig create mode 120000 node_modules/editorconfig/node_modules/.bin/semver create mode 100644 node_modules/editorconfig/package.json create mode 100644 node_modules/editorconfig/src/cli.d.ts create mode 100644 node_modules/editorconfig/src/cli.js create mode 100644 node_modules/editorconfig/src/index.d.ts create mode 100644 node_modules/editorconfig/src/index.js create mode 100644 node_modules/editorconfig/src/lib/fnmatch.d.ts create mode 100644 node_modules/editorconfig/src/lib/fnmatch.js create mode 100644 node_modules/editorconfig/src/lib/ini.d.ts create mode 100644 node_modules/editorconfig/src/lib/ini.js create mode 100644 node_modules/es5-ext/.editorconfig create mode 100644 node_modules/es5-ext/CHANGELOG.md create mode 100644 node_modules/es5-ext/CHANGES create mode 100644 node_modules/es5-ext/LICENSE create mode 100644 node_modules/es5-ext/README.md create mode 100644 node_modules/es5-ext/array/#/@@iterator/implement.js create mode 100644 node_modules/es5-ext/array/#/@@iterator/index.js create mode 100644 node_modules/es5-ext/array/#/@@iterator/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/@@iterator/shim.js create mode 100644 node_modules/es5-ext/array/#/_compare-by-length.js create mode 100644 node_modules/es5-ext/array/#/binary-search.js create mode 100644 node_modules/es5-ext/array/#/clear.js create mode 100644 node_modules/es5-ext/array/#/compact.js create mode 100644 node_modules/es5-ext/array/#/concat/implement.js create mode 100644 node_modules/es5-ext/array/#/concat/index.js create mode 100644 node_modules/es5-ext/array/#/concat/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/concat/shim.js create mode 100644 node_modules/es5-ext/array/#/contains.js create mode 100644 node_modules/es5-ext/array/#/copy-within/implement.js create mode 100644 node_modules/es5-ext/array/#/copy-within/index.js create mode 100644 node_modules/es5-ext/array/#/copy-within/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/copy-within/shim.js create mode 100644 node_modules/es5-ext/array/#/diff.js create mode 100644 node_modules/es5-ext/array/#/e-index-of.js create mode 100644 node_modules/es5-ext/array/#/e-last-index-of.js create mode 100644 node_modules/es5-ext/array/#/entries/implement.js create mode 100644 node_modules/es5-ext/array/#/entries/index.js create mode 100644 node_modules/es5-ext/array/#/entries/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/entries/shim.js create mode 100644 node_modules/es5-ext/array/#/exclusion.js create mode 100644 node_modules/es5-ext/array/#/fill/implement.js create mode 100644 node_modules/es5-ext/array/#/fill/index.js create mode 100644 node_modules/es5-ext/array/#/fill/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/fill/shim.js create mode 100644 node_modules/es5-ext/array/#/filter/implement.js create mode 100644 node_modules/es5-ext/array/#/filter/index.js create mode 100644 node_modules/es5-ext/array/#/filter/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/filter/shim.js create mode 100644 node_modules/es5-ext/array/#/find-index/implement.js create mode 100644 node_modules/es5-ext/array/#/find-index/index.js create mode 100644 node_modules/es5-ext/array/#/find-index/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/find-index/shim.js create mode 100644 node_modules/es5-ext/array/#/find/implement.js create mode 100644 node_modules/es5-ext/array/#/find/index.js create mode 100644 node_modules/es5-ext/array/#/find/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/find/shim.js create mode 100644 node_modules/es5-ext/array/#/first-index.js create mode 100644 node_modules/es5-ext/array/#/first.js create mode 100644 node_modules/es5-ext/array/#/flatten.js create mode 100644 node_modules/es5-ext/array/#/for-each-right.js create mode 100644 node_modules/es5-ext/array/#/group.js create mode 100644 node_modules/es5-ext/array/#/index.js create mode 100644 node_modules/es5-ext/array/#/indexes-of.js create mode 100644 node_modules/es5-ext/array/#/intersection.js create mode 100644 node_modules/es5-ext/array/#/is-copy.js create mode 100644 node_modules/es5-ext/array/#/is-empty.js create mode 100644 node_modules/es5-ext/array/#/is-uniq.js create mode 100644 node_modules/es5-ext/array/#/keys/implement.js create mode 100644 node_modules/es5-ext/array/#/keys/index.js create mode 100644 node_modules/es5-ext/array/#/keys/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/keys/shim.js create mode 100644 node_modules/es5-ext/array/#/last-index.js create mode 100644 node_modules/es5-ext/array/#/last.js create mode 100644 node_modules/es5-ext/array/#/map/implement.js create mode 100644 node_modules/es5-ext/array/#/map/index.js create mode 100644 node_modules/es5-ext/array/#/map/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/map/shim.js create mode 100644 node_modules/es5-ext/array/#/remove.js create mode 100644 node_modules/es5-ext/array/#/separate.js create mode 100644 node_modules/es5-ext/array/#/slice/implement.js create mode 100644 node_modules/es5-ext/array/#/slice/index.js create mode 100644 node_modules/es5-ext/array/#/slice/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/slice/shim.js create mode 100644 node_modules/es5-ext/array/#/some-right.js create mode 100644 node_modules/es5-ext/array/#/splice/implement.js create mode 100644 node_modules/es5-ext/array/#/splice/index.js create mode 100644 node_modules/es5-ext/array/#/splice/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/splice/shim.js create mode 100644 node_modules/es5-ext/array/#/uniq.js create mode 100644 node_modules/es5-ext/array/#/values/implement.js create mode 100644 node_modules/es5-ext/array/#/values/index.js create mode 100644 node_modules/es5-ext/array/#/values/is-implemented.js create mode 100644 node_modules/es5-ext/array/#/values/shim.js create mode 100644 node_modules/es5-ext/array/_is-extensible.js create mode 100644 node_modules/es5-ext/array/_sub-array-dummy-safe.js create mode 100644 node_modules/es5-ext/array/_sub-array-dummy.js create mode 100644 node_modules/es5-ext/array/from/implement.js create mode 100644 node_modules/es5-ext/array/from/index.js create mode 100644 node_modules/es5-ext/array/from/is-implemented.js create mode 100644 node_modules/es5-ext/array/from/shim.js create mode 100644 node_modules/es5-ext/array/generate.js create mode 100644 node_modules/es5-ext/array/index.js create mode 100644 node_modules/es5-ext/array/is-plain-array.js create mode 100644 node_modules/es5-ext/array/of/implement.js create mode 100644 node_modules/es5-ext/array/of/index.js create mode 100644 node_modules/es5-ext/array/of/is-implemented.js create mode 100644 node_modules/es5-ext/array/of/shim.js create mode 100644 node_modules/es5-ext/array/to-array.js create mode 100644 node_modules/es5-ext/array/valid-array.js create mode 100644 node_modules/es5-ext/boolean/index.js create mode 100644 node_modules/es5-ext/boolean/is-boolean.js create mode 100644 node_modules/es5-ext/date/#/copy.js create mode 100644 node_modules/es5-ext/date/#/days-in-month.js create mode 100644 node_modules/es5-ext/date/#/floor-day.js create mode 100644 node_modules/es5-ext/date/#/floor-month.js create mode 100644 node_modules/es5-ext/date/#/floor-year.js create mode 100644 node_modules/es5-ext/date/#/format.js create mode 100644 node_modules/es5-ext/date/#/index.js create mode 100644 node_modules/es5-ext/date/ensure-time-value.js create mode 100644 node_modules/es5-ext/date/index.js create mode 100644 node_modules/es5-ext/date/is-date.js create mode 100644 node_modules/es5-ext/date/is-time-value.js create mode 100644 node_modules/es5-ext/date/valid-date.js create mode 100644 node_modules/es5-ext/error/#/index.js create mode 100644 node_modules/es5-ext/error/#/throw.js create mode 100644 node_modules/es5-ext/error/custom.js create mode 100644 node_modules/es5-ext/error/index.js create mode 100644 node_modules/es5-ext/error/is-error.js create mode 100644 node_modules/es5-ext/error/valid-error.js create mode 100644 node_modules/es5-ext/function/#/compose.js create mode 100644 node_modules/es5-ext/function/#/copy.js create mode 100644 node_modules/es5-ext/function/#/curry.js create mode 100644 node_modules/es5-ext/function/#/index.js create mode 100644 node_modules/es5-ext/function/#/lock.js create mode 100644 node_modules/es5-ext/function/#/microtask-delay.js create mode 100644 node_modules/es5-ext/function/#/not.js create mode 100644 node_modules/es5-ext/function/#/partial.js create mode 100644 node_modules/es5-ext/function/#/spread.js create mode 100644 node_modules/es5-ext/function/#/to-string-tokens.js create mode 100644 node_modules/es5-ext/function/_define-length.js create mode 100644 node_modules/es5-ext/function/constant.js create mode 100644 node_modules/es5-ext/function/identity.js create mode 100644 node_modules/es5-ext/function/index.js create mode 100644 node_modules/es5-ext/function/invoke.js create mode 100644 node_modules/es5-ext/function/is-arguments.js create mode 100644 node_modules/es5-ext/function/is-function.js create mode 100644 node_modules/es5-ext/function/noop.js create mode 100644 node_modules/es5-ext/function/pluck.js create mode 100644 node_modules/es5-ext/function/valid-function.js create mode 100644 node_modules/es5-ext/global.js create mode 100644 node_modules/es5-ext/index.js create mode 100644 node_modules/es5-ext/iterable/for-each.js create mode 100644 node_modules/es5-ext/iterable/index.js create mode 100644 node_modules/es5-ext/iterable/is.js create mode 100644 node_modules/es5-ext/iterable/validate-object.js create mode 100644 node_modules/es5-ext/iterable/validate.js create mode 100644 node_modules/es5-ext/json/index.js create mode 100644 node_modules/es5-ext/json/safe-stringify.js create mode 100644 node_modules/es5-ext/math/_decimal-adjust.js create mode 100644 node_modules/es5-ext/math/_pack-ieee754.js create mode 100644 node_modules/es5-ext/math/_unpack-ieee754.js create mode 100644 node_modules/es5-ext/math/acosh/implement.js create mode 100644 node_modules/es5-ext/math/acosh/index.js create mode 100644 node_modules/es5-ext/math/acosh/is-implemented.js create mode 100644 node_modules/es5-ext/math/acosh/shim.js create mode 100644 node_modules/es5-ext/math/asinh/implement.js create mode 100644 node_modules/es5-ext/math/asinh/index.js create mode 100644 node_modules/es5-ext/math/asinh/is-implemented.js create mode 100644 node_modules/es5-ext/math/asinh/shim.js create mode 100644 node_modules/es5-ext/math/atanh/implement.js create mode 100644 node_modules/es5-ext/math/atanh/index.js create mode 100644 node_modules/es5-ext/math/atanh/is-implemented.js create mode 100644 node_modules/es5-ext/math/atanh/shim.js create mode 100644 node_modules/es5-ext/math/cbrt/implement.js create mode 100644 node_modules/es5-ext/math/cbrt/index.js create mode 100644 node_modules/es5-ext/math/cbrt/is-implemented.js create mode 100644 node_modules/es5-ext/math/cbrt/shim.js create mode 100644 node_modules/es5-ext/math/ceil-10.js create mode 100644 node_modules/es5-ext/math/clz32/implement.js create mode 100644 node_modules/es5-ext/math/clz32/index.js create mode 100644 node_modules/es5-ext/math/clz32/is-implemented.js create mode 100644 node_modules/es5-ext/math/clz32/shim.js create mode 100644 node_modules/es5-ext/math/cosh/implement.js create mode 100644 node_modules/es5-ext/math/cosh/index.js create mode 100644 node_modules/es5-ext/math/cosh/is-implemented.js create mode 100644 node_modules/es5-ext/math/cosh/shim.js create mode 100644 node_modules/es5-ext/math/expm1/implement.js create mode 100644 node_modules/es5-ext/math/expm1/index.js create mode 100644 node_modules/es5-ext/math/expm1/is-implemented.js create mode 100644 node_modules/es5-ext/math/expm1/shim.js create mode 100644 node_modules/es5-ext/math/floor-10.js create mode 100644 node_modules/es5-ext/math/fround/implement.js create mode 100644 node_modules/es5-ext/math/fround/index.js create mode 100644 node_modules/es5-ext/math/fround/is-implemented.js create mode 100644 node_modules/es5-ext/math/fround/shim.js create mode 100644 node_modules/es5-ext/math/hypot/implement.js create mode 100644 node_modules/es5-ext/math/hypot/index.js create mode 100644 node_modules/es5-ext/math/hypot/is-implemented.js create mode 100644 node_modules/es5-ext/math/hypot/shim.js create mode 100644 node_modules/es5-ext/math/imul/implement.js create mode 100644 node_modules/es5-ext/math/imul/index.js create mode 100644 node_modules/es5-ext/math/imul/is-implemented.js create mode 100644 node_modules/es5-ext/math/imul/shim.js create mode 100644 node_modules/es5-ext/math/index.js create mode 100644 node_modules/es5-ext/math/log10/implement.js create mode 100644 node_modules/es5-ext/math/log10/index.js create mode 100644 node_modules/es5-ext/math/log10/is-implemented.js create mode 100644 node_modules/es5-ext/math/log10/shim.js create mode 100644 node_modules/es5-ext/math/log1p/implement.js create mode 100644 node_modules/es5-ext/math/log1p/index.js create mode 100644 node_modules/es5-ext/math/log1p/is-implemented.js create mode 100644 node_modules/es5-ext/math/log1p/shim.js create mode 100644 node_modules/es5-ext/math/log2/implement.js create mode 100644 node_modules/es5-ext/math/log2/index.js create mode 100644 node_modules/es5-ext/math/log2/is-implemented.js create mode 100644 node_modules/es5-ext/math/log2/shim.js create mode 100644 node_modules/es5-ext/math/round-10.js create mode 100644 node_modules/es5-ext/math/sign/implement.js create mode 100644 node_modules/es5-ext/math/sign/index.js create mode 100644 node_modules/es5-ext/math/sign/is-implemented.js create mode 100644 node_modules/es5-ext/math/sign/shim.js create mode 100644 node_modules/es5-ext/math/sinh/implement.js create mode 100644 node_modules/es5-ext/math/sinh/index.js create mode 100644 node_modules/es5-ext/math/sinh/is-implemented.js create mode 100644 node_modules/es5-ext/math/sinh/shim.js create mode 100644 node_modules/es5-ext/math/tanh/implement.js create mode 100644 node_modules/es5-ext/math/tanh/index.js create mode 100644 node_modules/es5-ext/math/tanh/is-implemented.js create mode 100644 node_modules/es5-ext/math/tanh/shim.js create mode 100644 node_modules/es5-ext/math/trunc/implement.js create mode 100644 node_modules/es5-ext/math/trunc/index.js create mode 100644 node_modules/es5-ext/math/trunc/is-implemented.js create mode 100644 node_modules/es5-ext/math/trunc/shim.js create mode 100644 node_modules/es5-ext/number/#/index.js create mode 100644 node_modules/es5-ext/number/#/pad.js create mode 100644 node_modules/es5-ext/number/epsilon/implement.js create mode 100644 node_modules/es5-ext/number/epsilon/index.js create mode 100644 node_modules/es5-ext/number/epsilon/is-implemented.js create mode 100644 node_modules/es5-ext/number/index.js create mode 100644 node_modules/es5-ext/number/is-finite/implement.js create mode 100644 node_modules/es5-ext/number/is-finite/index.js create mode 100644 node_modules/es5-ext/number/is-finite/is-implemented.js create mode 100644 node_modules/es5-ext/number/is-finite/shim.js create mode 100644 node_modules/es5-ext/number/is-integer/implement.js create mode 100644 node_modules/es5-ext/number/is-integer/index.js create mode 100644 node_modules/es5-ext/number/is-integer/is-implemented.js create mode 100644 node_modules/es5-ext/number/is-integer/shim.js create mode 100644 node_modules/es5-ext/number/is-nan/implement.js create mode 100644 node_modules/es5-ext/number/is-nan/index.js create mode 100644 node_modules/es5-ext/number/is-nan/is-implemented.js create mode 100644 node_modules/es5-ext/number/is-nan/shim.js create mode 100644 node_modules/es5-ext/number/is-natural.js create mode 100644 node_modules/es5-ext/number/is-number.js create mode 100644 node_modules/es5-ext/number/is-safe-integer/implement.js create mode 100644 node_modules/es5-ext/number/is-safe-integer/index.js create mode 100644 node_modules/es5-ext/number/is-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/number/is-safe-integer/shim.js create mode 100644 node_modules/es5-ext/number/max-safe-integer/implement.js create mode 100644 node_modules/es5-ext/number/max-safe-integer/index.js create mode 100644 node_modules/es5-ext/number/max-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/number/min-safe-integer/implement.js create mode 100644 node_modules/es5-ext/number/min-safe-integer/index.js create mode 100644 node_modules/es5-ext/number/min-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/number/to-integer.js create mode 100644 node_modules/es5-ext/number/to-pos-integer.js create mode 100644 node_modules/es5-ext/number/to-uint32.js create mode 100644 node_modules/es5-ext/object/_iterate.js create mode 100644 node_modules/es5-ext/object/assign-deep.js create mode 100644 node_modules/es5-ext/object/assign/implement.js create mode 100644 node_modules/es5-ext/object/assign/index.js create mode 100644 node_modules/es5-ext/object/assign/is-implemented.js create mode 100644 node_modules/es5-ext/object/assign/shim.js create mode 100644 node_modules/es5-ext/object/clear.js create mode 100644 node_modules/es5-ext/object/compact.js create mode 100644 node_modules/es5-ext/object/compare.js create mode 100644 node_modules/es5-ext/object/copy-deep.js create mode 100644 node_modules/es5-ext/object/copy.js create mode 100644 node_modules/es5-ext/object/count.js create mode 100644 node_modules/es5-ext/object/create.js create mode 100644 node_modules/es5-ext/object/ensure-array.js create mode 100644 node_modules/es5-ext/object/ensure-finite-number.js create mode 100644 node_modules/es5-ext/object/ensure-integer.js create mode 100644 node_modules/es5-ext/object/ensure-natural-number-value.js create mode 100644 node_modules/es5-ext/object/ensure-natural-number.js create mode 100644 node_modules/es5-ext/object/ensure-plain-function.js create mode 100644 node_modules/es5-ext/object/ensure-plain-object.js create mode 100644 node_modules/es5-ext/object/ensure-promise.js create mode 100644 node_modules/es5-ext/object/ensure-thenable.js create mode 100644 node_modules/es5-ext/object/entries/implement.js create mode 100644 node_modules/es5-ext/object/entries/index.js create mode 100644 node_modules/es5-ext/object/entries/is-implemented.js create mode 100644 node_modules/es5-ext/object/entries/shim.js create mode 100644 node_modules/es5-ext/object/eq.js create mode 100644 node_modules/es5-ext/object/every.js create mode 100644 node_modules/es5-ext/object/filter.js create mode 100644 node_modules/es5-ext/object/find-key.js create mode 100644 node_modules/es5-ext/object/find.js create mode 100644 node_modules/es5-ext/object/first-key.js create mode 100644 node_modules/es5-ext/object/flatten.js create mode 100644 node_modules/es5-ext/object/for-each.js create mode 100644 node_modules/es5-ext/object/get-property-names.js create mode 100644 node_modules/es5-ext/object/index.js create mode 100644 node_modules/es5-ext/object/is-array-like.js create mode 100644 node_modules/es5-ext/object/is-callable.js create mode 100644 node_modules/es5-ext/object/is-copy-deep.js create mode 100644 node_modules/es5-ext/object/is-copy.js create mode 100644 node_modules/es5-ext/object/is-empty.js create mode 100644 node_modules/es5-ext/object/is-finite-number.js create mode 100644 node_modules/es5-ext/object/is-integer.js create mode 100644 node_modules/es5-ext/object/is-natural-number-value.js create mode 100644 node_modules/es5-ext/object/is-natural-number.js create mode 100644 node_modules/es5-ext/object/is-number-value.js create mode 100644 node_modules/es5-ext/object/is-object.js create mode 100644 node_modules/es5-ext/object/is-plain-function.js create mode 100644 node_modules/es5-ext/object/is-plain-object.js create mode 100644 node_modules/es5-ext/object/is-promise.js create mode 100644 node_modules/es5-ext/object/is-thenable.js create mode 100644 node_modules/es5-ext/object/is-value.js create mode 100644 node_modules/es5-ext/object/is.js create mode 100644 node_modules/es5-ext/object/key-of.js create mode 100644 node_modules/es5-ext/object/keys/implement.js create mode 100644 node_modules/es5-ext/object/keys/index.js create mode 100644 node_modules/es5-ext/object/keys/is-implemented.js create mode 100644 node_modules/es5-ext/object/keys/shim.js create mode 100644 node_modules/es5-ext/object/map-keys.js create mode 100644 node_modules/es5-ext/object/map.js create mode 100644 node_modules/es5-ext/object/mixin-prototypes.js create mode 100644 node_modules/es5-ext/object/mixin.js create mode 100644 node_modules/es5-ext/object/normalize-options.js create mode 100644 node_modules/es5-ext/object/primitive-set.js create mode 100644 node_modules/es5-ext/object/safe-traverse.js create mode 100644 node_modules/es5-ext/object/serialize.js create mode 100644 node_modules/es5-ext/object/set-prototype-of/implement.js create mode 100644 node_modules/es5-ext/object/set-prototype-of/index.js create mode 100644 node_modules/es5-ext/object/set-prototype-of/is-implemented.js create mode 100644 node_modules/es5-ext/object/set-prototype-of/shim.js create mode 100644 node_modules/es5-ext/object/some.js create mode 100644 node_modules/es5-ext/object/to-array.js create mode 100644 node_modules/es5-ext/object/unserialize.js create mode 100644 node_modules/es5-ext/object/valid-callable.js create mode 100644 node_modules/es5-ext/object/valid-object.js create mode 100644 node_modules/es5-ext/object/valid-value.js create mode 100644 node_modules/es5-ext/object/validate-array-like-object.js create mode 100644 node_modules/es5-ext/object/validate-array-like.js create mode 100644 node_modules/es5-ext/object/validate-stringifiable-value.js create mode 100644 node_modules/es5-ext/object/validate-stringifiable.js create mode 100644 node_modules/es5-ext/optional-chaining.js create mode 100644 node_modules/es5-ext/package.json create mode 100644 node_modules/es5-ext/promise/#/as-callback.js create mode 100644 node_modules/es5-ext/promise/#/finally/implement.js create mode 100644 node_modules/es5-ext/promise/#/finally/index.js create mode 100644 node_modules/es5-ext/promise/#/finally/is-implemented.js create mode 100644 node_modules/es5-ext/promise/#/finally/shim.js create mode 100644 node_modules/es5-ext/promise/#/index.js create mode 100644 node_modules/es5-ext/promise/.eslintrc.json create mode 100644 node_modules/es5-ext/promise/index.js create mode 100644 node_modules/es5-ext/promise/lazy.js create mode 100644 node_modules/es5-ext/reg-exp/#/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/is-sticky.js create mode 100644 node_modules/es5-ext/reg-exp/#/is-unicode.js create mode 100644 node_modules/es5-ext/reg-exp/#/match/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/match/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/match/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/match/shim.js create mode 100644 node_modules/es5-ext/reg-exp/#/replace/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/replace/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/replace/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/replace/shim.js create mode 100644 node_modules/es5-ext/reg-exp/#/search/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/search/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/search/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/search/shim.js create mode 100644 node_modules/es5-ext/reg-exp/#/split/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/split/index.js create mode 100644 node_modules/es5-ext/reg-exp/#/split/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/split/shim.js create mode 100644 node_modules/es5-ext/reg-exp/#/sticky/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/#/unicode/implement.js create mode 100644 node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js create mode 100644 node_modules/es5-ext/reg-exp/escape.js create mode 100644 node_modules/es5-ext/reg-exp/index.js create mode 100644 node_modules/es5-ext/reg-exp/is-reg-exp.js create mode 100644 node_modules/es5-ext/reg-exp/valid-reg-exp.js create mode 100644 node_modules/es5-ext/safe-to-string.js create mode 100644 node_modules/es5-ext/string/#/@@iterator/implement.js create mode 100644 node_modules/es5-ext/string/#/@@iterator/index.js create mode 100644 node_modules/es5-ext/string/#/@@iterator/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/@@iterator/shim.js create mode 100644 node_modules/es5-ext/string/#/at.js create mode 100644 node_modules/es5-ext/string/#/camel-to-hyphen.js create mode 100644 node_modules/es5-ext/string/#/capitalize.js create mode 100644 node_modules/es5-ext/string/#/case-insensitive-compare.js create mode 100644 node_modules/es5-ext/string/#/code-point-at/implement.js create mode 100644 node_modules/es5-ext/string/#/code-point-at/index.js create mode 100644 node_modules/es5-ext/string/#/code-point-at/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/code-point-at/shim.js create mode 100644 node_modules/es5-ext/string/#/contains/implement.js create mode 100644 node_modules/es5-ext/string/#/contains/index.js create mode 100644 node_modules/es5-ext/string/#/contains/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/contains/shim.js create mode 100644 node_modules/es5-ext/string/#/count.js create mode 100644 node_modules/es5-ext/string/#/ends-with/implement.js create mode 100644 node_modules/es5-ext/string/#/ends-with/index.js create mode 100644 node_modules/es5-ext/string/#/ends-with/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/ends-with/shim.js create mode 100644 node_modules/es5-ext/string/#/hyphen-to-camel.js create mode 100644 node_modules/es5-ext/string/#/indent.js create mode 100644 node_modules/es5-ext/string/#/index.js create mode 100644 node_modules/es5-ext/string/#/last.js create mode 100644 node_modules/es5-ext/string/#/normalize/_data.js create mode 100644 node_modules/es5-ext/string/#/normalize/implement.js create mode 100644 node_modules/es5-ext/string/#/normalize/index.js create mode 100644 node_modules/es5-ext/string/#/normalize/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/normalize/shim.js create mode 100644 node_modules/es5-ext/string/#/pad.js create mode 100644 node_modules/es5-ext/string/#/plain-replace-all.js create mode 100644 node_modules/es5-ext/string/#/plain-replace.js create mode 100644 node_modules/es5-ext/string/#/repeat/implement.js create mode 100644 node_modules/es5-ext/string/#/repeat/index.js create mode 100644 node_modules/es5-ext/string/#/repeat/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/repeat/shim.js create mode 100644 node_modules/es5-ext/string/#/starts-with/implement.js create mode 100644 node_modules/es5-ext/string/#/starts-with/index.js create mode 100644 node_modules/es5-ext/string/#/starts-with/is-implemented.js create mode 100644 node_modules/es5-ext/string/#/starts-with/shim.js create mode 100644 node_modules/es5-ext/string/#/uncapitalize.js create mode 100644 node_modules/es5-ext/string/format-method.js create mode 100644 node_modules/es5-ext/string/from-code-point/implement.js create mode 100644 node_modules/es5-ext/string/from-code-point/index.js create mode 100644 node_modules/es5-ext/string/from-code-point/is-implemented.js create mode 100644 node_modules/es5-ext/string/from-code-point/shim.js create mode 100644 node_modules/es5-ext/string/index.js create mode 100644 node_modules/es5-ext/string/is-string.js create mode 100644 node_modules/es5-ext/string/random-uniq.js create mode 100644 node_modules/es5-ext/string/random.js create mode 100644 node_modules/es5-ext/string/raw/implement.js create mode 100644 node_modules/es5-ext/string/raw/index.js create mode 100644 node_modules/es5-ext/string/raw/is-implemented.js create mode 100644 node_modules/es5-ext/string/raw/shim.js create mode 100644 node_modules/es5-ext/test/.eslintrc.json create mode 100644 node_modules/es5-ext/test/__tad.js create mode 100644 node_modules/es5-ext/test/array/#/@@iterator/implement.js create mode 100644 node_modules/es5-ext/test/array/#/@@iterator/index.js create mode 100644 node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/@@iterator/shim.js create mode 100644 node_modules/es5-ext/test/array/#/_compare-by-length.js create mode 100644 node_modules/es5-ext/test/array/#/binary-search.js create mode 100644 node_modules/es5-ext/test/array/#/clear.js create mode 100644 node_modules/es5-ext/test/array/#/compact.js create mode 100644 node_modules/es5-ext/test/array/#/concat/implement.js create mode 100644 node_modules/es5-ext/test/array/#/concat/index.js create mode 100644 node_modules/es5-ext/test/array/#/concat/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/concat/shim.js create mode 100644 node_modules/es5-ext/test/array/#/contains.js create mode 100644 node_modules/es5-ext/test/array/#/copy-within/implement.js create mode 100644 node_modules/es5-ext/test/array/#/copy-within/index.js create mode 100644 node_modules/es5-ext/test/array/#/copy-within/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/copy-within/shim.js create mode 100644 node_modules/es5-ext/test/array/#/diff.js create mode 100644 node_modules/es5-ext/test/array/#/e-index-of.js create mode 100644 node_modules/es5-ext/test/array/#/e-last-index-of.js create mode 100644 node_modules/es5-ext/test/array/#/entries/implement.js create mode 100644 node_modules/es5-ext/test/array/#/entries/index.js create mode 100644 node_modules/es5-ext/test/array/#/entries/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/entries/shim.js create mode 100644 node_modules/es5-ext/test/array/#/exclusion.js create mode 100644 node_modules/es5-ext/test/array/#/fill/implement.js create mode 100644 node_modules/es5-ext/test/array/#/fill/index.js create mode 100644 node_modules/es5-ext/test/array/#/fill/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/fill/shim.js create mode 100644 node_modules/es5-ext/test/array/#/filter/implement.js create mode 100644 node_modules/es5-ext/test/array/#/filter/index.js create mode 100644 node_modules/es5-ext/test/array/#/filter/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/filter/shim.js create mode 100644 node_modules/es5-ext/test/array/#/find-index/implement.js create mode 100644 node_modules/es5-ext/test/array/#/find-index/index.js create mode 100644 node_modules/es5-ext/test/array/#/find-index/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/find-index/shim.js create mode 100644 node_modules/es5-ext/test/array/#/find/implement.js create mode 100644 node_modules/es5-ext/test/array/#/find/index.js create mode 100644 node_modules/es5-ext/test/array/#/find/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/find/shim.js create mode 100644 node_modules/es5-ext/test/array/#/first-index.js create mode 100644 node_modules/es5-ext/test/array/#/first.js create mode 100644 node_modules/es5-ext/test/array/#/flatten.js create mode 100644 node_modules/es5-ext/test/array/#/for-each-right.js create mode 100644 node_modules/es5-ext/test/array/#/group.js create mode 100644 node_modules/es5-ext/test/array/#/indexes-of.js create mode 100644 node_modules/es5-ext/test/array/#/intersection.js create mode 100644 node_modules/es5-ext/test/array/#/is-copy.js create mode 100644 node_modules/es5-ext/test/array/#/is-empty.js create mode 100644 node_modules/es5-ext/test/array/#/is-uniq.js create mode 100644 node_modules/es5-ext/test/array/#/keys/implement.js create mode 100644 node_modules/es5-ext/test/array/#/keys/index.js create mode 100644 node_modules/es5-ext/test/array/#/keys/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/keys/shim.js create mode 100644 node_modules/es5-ext/test/array/#/last-index.js create mode 100644 node_modules/es5-ext/test/array/#/last.js create mode 100644 node_modules/es5-ext/test/array/#/map/implement.js create mode 100644 node_modules/es5-ext/test/array/#/map/index.js create mode 100644 node_modules/es5-ext/test/array/#/map/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/map/shim.js create mode 100644 node_modules/es5-ext/test/array/#/remove.js create mode 100644 node_modules/es5-ext/test/array/#/separate.js create mode 100644 node_modules/es5-ext/test/array/#/slice/implement.js create mode 100644 node_modules/es5-ext/test/array/#/slice/index.js create mode 100644 node_modules/es5-ext/test/array/#/slice/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/slice/shim.js create mode 100644 node_modules/es5-ext/test/array/#/some-right.js create mode 100644 node_modules/es5-ext/test/array/#/splice/implement.js create mode 100644 node_modules/es5-ext/test/array/#/splice/index.js create mode 100644 node_modules/es5-ext/test/array/#/splice/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/splice/shim.js create mode 100644 node_modules/es5-ext/test/array/#/uniq.js create mode 100644 node_modules/es5-ext/test/array/#/values/implement.js create mode 100644 node_modules/es5-ext/test/array/#/values/index.js create mode 100644 node_modules/es5-ext/test/array/#/values/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/#/values/shim.js create mode 100644 node_modules/es5-ext/test/array/__scopes.js create mode 100644 node_modules/es5-ext/test/array/_is-extensible.js create mode 100644 node_modules/es5-ext/test/array/_sub-array-dummy-safe.js create mode 100644 node_modules/es5-ext/test/array/_sub-array-dummy.js create mode 100644 node_modules/es5-ext/test/array/from/implement.js create mode 100644 node_modules/es5-ext/test/array/from/index.js create mode 100644 node_modules/es5-ext/test/array/from/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/from/shim.js create mode 100644 node_modules/es5-ext/test/array/generate.js create mode 100644 node_modules/es5-ext/test/array/is-plain-array.js create mode 100644 node_modules/es5-ext/test/array/of/implement.js create mode 100644 node_modules/es5-ext/test/array/of/index.js create mode 100644 node_modules/es5-ext/test/array/of/is-implemented.js create mode 100644 node_modules/es5-ext/test/array/of/shim.js create mode 100644 node_modules/es5-ext/test/array/to-array.js create mode 100644 node_modules/es5-ext/test/array/valid-array.js create mode 100644 node_modules/es5-ext/test/boolean/is-boolean.js create mode 100644 node_modules/es5-ext/test/date/#/copy.js create mode 100644 node_modules/es5-ext/test/date/#/days-in-month.js create mode 100644 node_modules/es5-ext/test/date/#/floor-day.js create mode 100644 node_modules/es5-ext/test/date/#/floor-month.js create mode 100644 node_modules/es5-ext/test/date/#/floor-year.js create mode 100644 node_modules/es5-ext/test/date/#/format.js create mode 100644 node_modules/es5-ext/test/date/ensure-time-value.js create mode 100644 node_modules/es5-ext/test/date/is-date.js create mode 100644 node_modules/es5-ext/test/date/is-time-value.js create mode 100644 node_modules/es5-ext/test/date/valid-date.js create mode 100644 node_modules/es5-ext/test/error/#/throw.js create mode 100644 node_modules/es5-ext/test/error/custom.js create mode 100644 node_modules/es5-ext/test/error/is-error.js create mode 100644 node_modules/es5-ext/test/error/valid-error.js create mode 100644 node_modules/es5-ext/test/function/#/compose.js create mode 100644 node_modules/es5-ext/test/function/#/copy.js create mode 100644 node_modules/es5-ext/test/function/#/curry.js create mode 100644 node_modules/es5-ext/test/function/#/lock.js create mode 100644 node_modules/es5-ext/test/function/#/microtask-delay.js create mode 100644 node_modules/es5-ext/test/function/#/not.js create mode 100644 node_modules/es5-ext/test/function/#/partial.js create mode 100644 node_modules/es5-ext/test/function/#/spread.js create mode 100644 node_modules/es5-ext/test/function/#/to-string-tokens.js create mode 100644 node_modules/es5-ext/test/function/_define-length.js create mode 100644 node_modules/es5-ext/test/function/constant.js create mode 100644 node_modules/es5-ext/test/function/identity.js create mode 100644 node_modules/es5-ext/test/function/invoke.js create mode 100644 node_modules/es5-ext/test/function/is-arguments.js create mode 100644 node_modules/es5-ext/test/function/is-function.js create mode 100644 node_modules/es5-ext/test/function/noop.js create mode 100644 node_modules/es5-ext/test/function/pluck.js create mode 100644 node_modules/es5-ext/test/function/valid-function.js create mode 100644 node_modules/es5-ext/test/global.js create mode 100644 node_modules/es5-ext/test/iterable/for-each.js create mode 100644 node_modules/es5-ext/test/iterable/is.js create mode 100644 node_modules/es5-ext/test/iterable/validate-object.js create mode 100644 node_modules/es5-ext/test/iterable/validate.js create mode 100644 node_modules/es5-ext/test/json/safe-stringify.js create mode 100644 node_modules/es5-ext/test/math/_decimal-adjust.js create mode 100644 node_modules/es5-ext/test/math/_pack-ieee754.js create mode 100644 node_modules/es5-ext/test/math/_unpack-ieee754.js create mode 100644 node_modules/es5-ext/test/math/acosh/implement.js create mode 100644 node_modules/es5-ext/test/math/acosh/index.js create mode 100644 node_modules/es5-ext/test/math/acosh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/acosh/shim.js create mode 100644 node_modules/es5-ext/test/math/asinh/implement.js create mode 100644 node_modules/es5-ext/test/math/asinh/index.js create mode 100644 node_modules/es5-ext/test/math/asinh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/asinh/shim.js create mode 100644 node_modules/es5-ext/test/math/atanh/implement.js create mode 100644 node_modules/es5-ext/test/math/atanh/index.js create mode 100644 node_modules/es5-ext/test/math/atanh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/atanh/shim.js create mode 100644 node_modules/es5-ext/test/math/cbrt/implement.js create mode 100644 node_modules/es5-ext/test/math/cbrt/index.js create mode 100644 node_modules/es5-ext/test/math/cbrt/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/cbrt/shim.js create mode 100644 node_modules/es5-ext/test/math/ceil-10.js create mode 100644 node_modules/es5-ext/test/math/clz32/implement.js create mode 100644 node_modules/es5-ext/test/math/clz32/index.js create mode 100644 node_modules/es5-ext/test/math/clz32/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/clz32/shim.js create mode 100644 node_modules/es5-ext/test/math/cosh/implement.js create mode 100644 node_modules/es5-ext/test/math/cosh/index.js create mode 100644 node_modules/es5-ext/test/math/cosh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/cosh/shim.js create mode 100644 node_modules/es5-ext/test/math/expm1/implement.js create mode 100644 node_modules/es5-ext/test/math/expm1/index.js create mode 100644 node_modules/es5-ext/test/math/expm1/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/expm1/shim.js create mode 100644 node_modules/es5-ext/test/math/floor-10.js create mode 100644 node_modules/es5-ext/test/math/fround/implement.js create mode 100644 node_modules/es5-ext/test/math/fround/index.js create mode 100644 node_modules/es5-ext/test/math/fround/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/fround/shim.js create mode 100644 node_modules/es5-ext/test/math/hypot/implement.js create mode 100644 node_modules/es5-ext/test/math/hypot/index.js create mode 100644 node_modules/es5-ext/test/math/hypot/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/hypot/shim.js create mode 100644 node_modules/es5-ext/test/math/imul/implement.js create mode 100644 node_modules/es5-ext/test/math/imul/index.js create mode 100644 node_modules/es5-ext/test/math/imul/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/imul/shim.js create mode 100644 node_modules/es5-ext/test/math/log10/implement.js create mode 100644 node_modules/es5-ext/test/math/log10/index.js create mode 100644 node_modules/es5-ext/test/math/log10/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/log10/shim.js create mode 100644 node_modules/es5-ext/test/math/log1p/implement.js create mode 100644 node_modules/es5-ext/test/math/log1p/index.js create mode 100644 node_modules/es5-ext/test/math/log1p/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/log1p/shim.js create mode 100644 node_modules/es5-ext/test/math/log2/implement.js create mode 100644 node_modules/es5-ext/test/math/log2/index.js create mode 100644 node_modules/es5-ext/test/math/log2/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/log2/shim.js create mode 100644 node_modules/es5-ext/test/math/round-10.js create mode 100644 node_modules/es5-ext/test/math/sign/implement.js create mode 100644 node_modules/es5-ext/test/math/sign/index.js create mode 100644 node_modules/es5-ext/test/math/sign/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/sign/shim.js create mode 100644 node_modules/es5-ext/test/math/sinh/implement.js create mode 100644 node_modules/es5-ext/test/math/sinh/index.js create mode 100644 node_modules/es5-ext/test/math/sinh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/sinh/shim.js create mode 100644 node_modules/es5-ext/test/math/tanh/implement.js create mode 100644 node_modules/es5-ext/test/math/tanh/index.js create mode 100644 node_modules/es5-ext/test/math/tanh/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/tanh/shim.js create mode 100644 node_modules/es5-ext/test/math/trunc/implement.js create mode 100644 node_modules/es5-ext/test/math/trunc/index.js create mode 100644 node_modules/es5-ext/test/math/trunc/is-implemented.js create mode 100644 node_modules/es5-ext/test/math/trunc/shim.js create mode 100644 node_modules/es5-ext/test/number/#/pad.js create mode 100644 node_modules/es5-ext/test/number/epsilon/implement.js create mode 100644 node_modules/es5-ext/test/number/epsilon/index.js create mode 100644 node_modules/es5-ext/test/number/epsilon/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-finite/implement.js create mode 100644 node_modules/es5-ext/test/number/is-finite/index.js create mode 100644 node_modules/es5-ext/test/number/is-finite/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-finite/shim.js create mode 100644 node_modules/es5-ext/test/number/is-integer/implement.js create mode 100644 node_modules/es5-ext/test/number/is-integer/index.js create mode 100644 node_modules/es5-ext/test/number/is-integer/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-integer/shim.js create mode 100644 node_modules/es5-ext/test/number/is-nan/implement.js create mode 100644 node_modules/es5-ext/test/number/is-nan/index.js create mode 100644 node_modules/es5-ext/test/number/is-nan/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-nan/shim.js create mode 100644 node_modules/es5-ext/test/number/is-natural.js create mode 100644 node_modules/es5-ext/test/number/is-number.js create mode 100644 node_modules/es5-ext/test/number/is-safe-integer/implement.js create mode 100644 node_modules/es5-ext/test/number/is-safe-integer/index.js create mode 100644 node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/is-safe-integer/shim.js create mode 100644 node_modules/es5-ext/test/number/max-safe-integer/implement.js create mode 100644 node_modules/es5-ext/test/number/max-safe-integer/index.js create mode 100644 node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/min-safe-integer/implement.js create mode 100644 node_modules/es5-ext/test/number/min-safe-integer/index.js create mode 100644 node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js create mode 100644 node_modules/es5-ext/test/number/to-integer.js create mode 100644 node_modules/es5-ext/test/number/to-pos-integer.js create mode 100644 node_modules/es5-ext/test/number/to-uint32.js create mode 100644 node_modules/es5-ext/test/object/_iterate.js create mode 100644 node_modules/es5-ext/test/object/assign-deep.js create mode 100644 node_modules/es5-ext/test/object/assign/implement.js create mode 100644 node_modules/es5-ext/test/object/assign/index.js create mode 100644 node_modules/es5-ext/test/object/assign/is-implemented.js create mode 100644 node_modules/es5-ext/test/object/assign/shim.js create mode 100644 node_modules/es5-ext/test/object/clear.js create mode 100644 node_modules/es5-ext/test/object/compact.js create mode 100644 node_modules/es5-ext/test/object/compare.js create mode 100644 node_modules/es5-ext/test/object/copy-deep.js create mode 100644 node_modules/es5-ext/test/object/copy.js create mode 100644 node_modules/es5-ext/test/object/count.js create mode 100644 node_modules/es5-ext/test/object/create.js create mode 100644 node_modules/es5-ext/test/object/ensure-array.js create mode 100644 node_modules/es5-ext/test/object/ensure-finite-number.js create mode 100644 node_modules/es5-ext/test/object/ensure-integer.js create mode 100644 node_modules/es5-ext/test/object/ensure-natural-number-value.js create mode 100644 node_modules/es5-ext/test/object/ensure-natural-number.js create mode 100644 node_modules/es5-ext/test/object/ensure-plain-function.js create mode 100644 node_modules/es5-ext/test/object/ensure-plain-object.js create mode 100644 node_modules/es5-ext/test/object/ensure-promise.js create mode 100644 node_modules/es5-ext/test/object/ensure-thenable.js create mode 100644 node_modules/es5-ext/test/object/entries/implement.js create mode 100644 node_modules/es5-ext/test/object/entries/index.js create mode 100644 node_modules/es5-ext/test/object/entries/is-implemented.js create mode 100644 node_modules/es5-ext/test/object/entries/shim.js create mode 100644 node_modules/es5-ext/test/object/eq.js create mode 100644 node_modules/es5-ext/test/object/every.js create mode 100644 node_modules/es5-ext/test/object/filter.js create mode 100644 node_modules/es5-ext/test/object/find-key.js create mode 100644 node_modules/es5-ext/test/object/find.js create mode 100644 node_modules/es5-ext/test/object/first-key.js create mode 100644 node_modules/es5-ext/test/object/flatten.js create mode 100644 node_modules/es5-ext/test/object/for-each.js create mode 100644 node_modules/es5-ext/test/object/get-property-names.js create mode 100644 node_modules/es5-ext/test/object/is-array-like.js create mode 100644 node_modules/es5-ext/test/object/is-callable.js create mode 100644 node_modules/es5-ext/test/object/is-copy-deep.js create mode 100644 node_modules/es5-ext/test/object/is-copy.js create mode 100644 node_modules/es5-ext/test/object/is-empty.js create mode 100644 node_modules/es5-ext/test/object/is-finite-number.js create mode 100644 node_modules/es5-ext/test/object/is-integer.js create mode 100644 node_modules/es5-ext/test/object/is-natural-number-value.js create mode 100644 node_modules/es5-ext/test/object/is-natural-number.js create mode 100644 node_modules/es5-ext/test/object/is-number-value.js create mode 100644 node_modules/es5-ext/test/object/is-object.js create mode 100644 node_modules/es5-ext/test/object/is-plain-function.js create mode 100644 node_modules/es5-ext/test/object/is-plain-object.js create mode 100644 node_modules/es5-ext/test/object/is-promise.js create mode 100644 node_modules/es5-ext/test/object/is-thenable.js create mode 100644 node_modules/es5-ext/test/object/is-value.js create mode 100644 node_modules/es5-ext/test/object/is.js create mode 100644 node_modules/es5-ext/test/object/key-of.js create mode 100644 node_modules/es5-ext/test/object/keys/implement.js create mode 100644 node_modules/es5-ext/test/object/keys/index.js create mode 100644 node_modules/es5-ext/test/object/keys/is-implemented.js create mode 100644 node_modules/es5-ext/test/object/keys/shim.js create mode 100644 node_modules/es5-ext/test/object/map-keys.js create mode 100644 node_modules/es5-ext/test/object/map.js create mode 100644 node_modules/es5-ext/test/object/mixin-prototypes.js create mode 100644 node_modules/es5-ext/test/object/mixin.js create mode 100644 node_modules/es5-ext/test/object/normalize-options.js create mode 100644 node_modules/es5-ext/test/object/primitive-set.js create mode 100644 node_modules/es5-ext/test/object/safe-traverse.js create mode 100644 node_modules/es5-ext/test/object/serialize.js create mode 100644 node_modules/es5-ext/test/object/set-prototype-of/implement.js create mode 100644 node_modules/es5-ext/test/object/set-prototype-of/index.js create mode 100644 node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js create mode 100644 node_modules/es5-ext/test/object/set-prototype-of/shim.js create mode 100644 node_modules/es5-ext/test/object/some.js create mode 100644 node_modules/es5-ext/test/object/to-array.js create mode 100644 node_modules/es5-ext/test/object/unserialize.js create mode 100644 node_modules/es5-ext/test/object/valid-callable.js create mode 100644 node_modules/es5-ext/test/object/valid-object.js create mode 100644 node_modules/es5-ext/test/object/valid-value.js create mode 100644 node_modules/es5-ext/test/object/validate-array-like-object.js create mode 100644 node_modules/es5-ext/test/object/validate-array-like.js create mode 100644 node_modules/es5-ext/test/object/validate-stringifiable-value.js create mode 100644 node_modules/es5-ext/test/object/validate-stringifiable.js create mode 100644 node_modules/es5-ext/test/optional-chaining.js create mode 100644 node_modules/es5-ext/test/promise/#/as-callback.js create mode 100644 node_modules/es5-ext/test/promise/#/finally/implement.js create mode 100644 node_modules/es5-ext/test/promise/#/finally/index.js create mode 100644 node_modules/es5-ext/test/promise/#/finally/is-implemented.js create mode 100644 node_modules/es5-ext/test/promise/#/finally/shim.js create mode 100644 node_modules/es5-ext/test/promise/.eslintrc.json create mode 100644 node_modules/es5-ext/test/promise/lazy.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/is-sticky.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/is-unicode.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/match/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/match/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/match/shim.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/replace/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/replace/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/replace/shim.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/search/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/search/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/search/shim.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/split/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/split/index.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/split/shim.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/sticky/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/unicode/implement.js create mode 100644 node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js create mode 100644 node_modules/es5-ext/test/reg-exp/escape.js create mode 100644 node_modules/es5-ext/test/reg-exp/is-reg-exp.js create mode 100644 node_modules/es5-ext/test/reg-exp/valid-reg-exp.js create mode 100644 node_modules/es5-ext/test/safe-to-string.js create mode 100644 node_modules/es5-ext/test/string/#/@@iterator/implement.js create mode 100644 node_modules/es5-ext/test/string/#/@@iterator/index.js create mode 100644 node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/@@iterator/shim.js create mode 100644 node_modules/es5-ext/test/string/#/at.js create mode 100644 node_modules/es5-ext/test/string/#/camel-to-hyphen.js create mode 100644 node_modules/es5-ext/test/string/#/capitalize.js create mode 100644 node_modules/es5-ext/test/string/#/case-insensitive-compare.js create mode 100644 node_modules/es5-ext/test/string/#/code-point-at/implement.js create mode 100644 node_modules/es5-ext/test/string/#/code-point-at/index.js create mode 100644 node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/code-point-at/shim.js create mode 100644 node_modules/es5-ext/test/string/#/contains/implement.js create mode 100644 node_modules/es5-ext/test/string/#/contains/index.js create mode 100644 node_modules/es5-ext/test/string/#/contains/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/contains/shim.js create mode 100644 node_modules/es5-ext/test/string/#/count.js create mode 100644 node_modules/es5-ext/test/string/#/ends-with/implement.js create mode 100644 node_modules/es5-ext/test/string/#/ends-with/index.js create mode 100644 node_modules/es5-ext/test/string/#/ends-with/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/ends-with/shim.js create mode 100644 node_modules/es5-ext/test/string/#/hyphen-to-camel.js create mode 100644 node_modules/es5-ext/test/string/#/indent.js create mode 100644 node_modules/es5-ext/test/string/#/last.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/_data.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/implement.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/index.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/normalize/shim.js create mode 100644 node_modules/es5-ext/test/string/#/pad.js create mode 100644 node_modules/es5-ext/test/string/#/plain-replace-all.js create mode 100644 node_modules/es5-ext/test/string/#/plain-replace.js create mode 100644 node_modules/es5-ext/test/string/#/repeat/implement.js create mode 100644 node_modules/es5-ext/test/string/#/repeat/index.js create mode 100644 node_modules/es5-ext/test/string/#/repeat/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/repeat/shim.js create mode 100644 node_modules/es5-ext/test/string/#/starts-with/implement.js create mode 100644 node_modules/es5-ext/test/string/#/starts-with/index.js create mode 100644 node_modules/es5-ext/test/string/#/starts-with/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/#/starts-with/shim.js create mode 100644 node_modules/es5-ext/test/string/#/uncapitalize.js create mode 100644 node_modules/es5-ext/test/string/format-method.js create mode 100644 node_modules/es5-ext/test/string/from-code-point/implement.js create mode 100644 node_modules/es5-ext/test/string/from-code-point/index.js create mode 100644 node_modules/es5-ext/test/string/from-code-point/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/from-code-point/shim.js create mode 100644 node_modules/es5-ext/test/string/is-string.js create mode 100644 node_modules/es5-ext/test/string/random-uniq.js create mode 100644 node_modules/es5-ext/test/string/random.js create mode 100644 node_modules/es5-ext/test/string/raw/implement.js create mode 100644 node_modules/es5-ext/test/string/raw/index.js create mode 100644 node_modules/es5-ext/test/string/raw/is-implemented.js create mode 100644 node_modules/es5-ext/test/string/raw/shim.js create mode 100644 node_modules/es5-ext/test/to-short-string-representation.js create mode 100644 node_modules/es5-ext/to-short-string-representation.js create mode 100644 node_modules/es6-iterator/#/chain.js create mode 100644 node_modules/es6-iterator/.editorconfig create mode 100644 node_modules/es6-iterator/.npmignore create mode 100644 node_modules/es6-iterator/CHANGELOG.md create mode 100644 node_modules/es6-iterator/CHANGES create mode 100644 node_modules/es6-iterator/LICENSE create mode 100644 node_modules/es6-iterator/README.md create mode 100644 node_modules/es6-iterator/appveyor.yml create mode 100644 node_modules/es6-iterator/array.js create mode 100644 node_modules/es6-iterator/for-of.js create mode 100644 node_modules/es6-iterator/get.js create mode 100644 node_modules/es6-iterator/index.js create mode 100644 node_modules/es6-iterator/is-iterable.js create mode 100644 node_modules/es6-iterator/package.json create mode 100644 node_modules/es6-iterator/string.js create mode 100644 node_modules/es6-iterator/test/#/chain.js create mode 100644 node_modules/es6-iterator/test/.eslintrc.json create mode 100644 node_modules/es6-iterator/test/array.js create mode 100644 node_modules/es6-iterator/test/for-of.js create mode 100644 node_modules/es6-iterator/test/get.js create mode 100644 node_modules/es6-iterator/test/index.js create mode 100644 node_modules/es6-iterator/test/is-iterable.js create mode 100644 node_modules/es6-iterator/test/string.js create mode 100644 node_modules/es6-iterator/test/valid-iterable.js create mode 100644 node_modules/es6-iterator/valid-iterable.js create mode 100644 node_modules/es6-symbol/.lint create mode 100644 node_modules/es6-symbol/.npmignore create mode 100644 node_modules/es6-symbol/.travis.yml create mode 100644 node_modules/es6-symbol/CHANGES create mode 100644 node_modules/es6-symbol/LICENSE create mode 100644 node_modules/es6-symbol/README.md create mode 100644 node_modules/es6-symbol/implement.js create mode 100644 node_modules/es6-symbol/index.js create mode 100644 node_modules/es6-symbol/is-implemented.js create mode 100644 node_modules/es6-symbol/is-native-implemented.js create mode 100644 node_modules/es6-symbol/is-symbol.js create mode 100644 node_modules/es6-symbol/package.json create mode 100644 node_modules/es6-symbol/polyfill.js create mode 100644 node_modules/es6-symbol/test/implement.js create mode 100644 node_modules/es6-symbol/test/index.js create mode 100644 node_modules/es6-symbol/test/is-implemented.js create mode 100644 node_modules/es6-symbol/test/is-native-implemented.js create mode 100644 node_modules/es6-symbol/test/is-symbol.js create mode 100644 node_modules/es6-symbol/test/polyfill.js create mode 100644 node_modules/es6-symbol/test/validate-symbol.js create mode 100644 node_modules/es6-symbol/validate-symbol.js create mode 100644 node_modules/es6-weak-map/.editorconfig create mode 100644 node_modules/es6-weak-map/CHANGELOG.md create mode 100644 node_modules/es6-weak-map/CHANGES create mode 100644 node_modules/es6-weak-map/LICENSE create mode 100644 node_modules/es6-weak-map/README.md create mode 100644 node_modules/es6-weak-map/implement.js create mode 100644 node_modules/es6-weak-map/index.js create mode 100644 node_modules/es6-weak-map/is-implemented.js create mode 100644 node_modules/es6-weak-map/is-native-implemented.js create mode 100644 node_modules/es6-weak-map/is-weak-map.js create mode 100644 node_modules/es6-weak-map/package.json create mode 100644 node_modules/es6-weak-map/polyfill.js create mode 100644 node_modules/es6-weak-map/test/implement.js create mode 100644 node_modules/es6-weak-map/test/index.js create mode 100644 node_modules/es6-weak-map/test/is-implemented.js create mode 100644 node_modules/es6-weak-map/test/is-native-implemented.js create mode 100644 node_modules/es6-weak-map/test/is-weak-map.js create mode 100644 node_modules/es6-weak-map/test/polyfill.js create mode 100644 node_modules/es6-weak-map/test/valid-weak-map.js create mode 100644 node_modules/es6-weak-map/valid-weak-map.js create mode 100644 node_modules/event-emitter/.lint create mode 100644 node_modules/event-emitter/.npmignore create mode 100644 node_modules/event-emitter/.testignore create mode 100644 node_modules/event-emitter/.travis.yml create mode 100644 node_modules/event-emitter/CHANGES create mode 100644 node_modules/event-emitter/LICENSE create mode 100644 node_modules/event-emitter/README.md create mode 100644 node_modules/event-emitter/all-off.js create mode 100644 node_modules/event-emitter/benchmark/many-on.js create mode 100644 node_modules/event-emitter/benchmark/single-on.js create mode 100644 node_modules/event-emitter/emit-error.js create mode 100644 node_modules/event-emitter/has-listeners.js create mode 100644 node_modules/event-emitter/index.js create mode 100644 node_modules/event-emitter/package.json create mode 100644 node_modules/event-emitter/pipe.js create mode 100644 node_modules/event-emitter/test/all-off.js create mode 100644 node_modules/event-emitter/test/emit-error.js create mode 100644 node_modules/event-emitter/test/has-listeners.js create mode 100644 node_modules/event-emitter/test/index.js create mode 100644 node_modules/event-emitter/test/pipe.js create mode 100644 node_modules/event-emitter/test/unify.js create mode 100644 node_modules/event-emitter/unify.js create mode 100644 node_modules/fs-extra/CHANGELOG.md create mode 100644 node_modules/fs-extra/LICENSE create mode 100644 node_modules/fs-extra/README.md create mode 100644 node_modules/fs-extra/lib/copy-sync/copy-sync.js create mode 100644 node_modules/fs-extra/lib/copy-sync/index.js create mode 100644 node_modules/fs-extra/lib/copy/copy.js create mode 100644 node_modules/fs-extra/lib/copy/index.js create mode 100644 node_modules/fs-extra/lib/empty/index.js create mode 100644 node_modules/fs-extra/lib/ensure/file.js create mode 100644 node_modules/fs-extra/lib/ensure/index.js create mode 100644 node_modules/fs-extra/lib/ensure/link.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink-paths.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink-type.js create mode 100644 node_modules/fs-extra/lib/ensure/symlink.js create mode 100644 node_modules/fs-extra/lib/fs/index.js create mode 100644 node_modules/fs-extra/lib/index.js create mode 100644 node_modules/fs-extra/lib/json/index.js create mode 100644 node_modules/fs-extra/lib/json/jsonfile.js create mode 100644 node_modules/fs-extra/lib/json/output-json-sync.js create mode 100644 node_modules/fs-extra/lib/json/output-json.js create mode 100644 node_modules/fs-extra/lib/mkdirs/index.js create mode 100644 node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js create mode 100644 node_modules/fs-extra/lib/mkdirs/mkdirs.js create mode 100644 node_modules/fs-extra/lib/mkdirs/win32.js create mode 100644 node_modules/fs-extra/lib/move-sync/index.js create mode 100644 node_modules/fs-extra/lib/move/index.js create mode 100644 node_modules/fs-extra/lib/output/index.js create mode 100644 node_modules/fs-extra/lib/path-exists/index.js create mode 100644 node_modules/fs-extra/lib/remove/index.js create mode 100644 node_modules/fs-extra/lib/remove/rimraf.js create mode 100644 node_modules/fs-extra/lib/util/buffer.js create mode 100644 node_modules/fs-extra/lib/util/utimes.js create mode 100644 node_modules/fs-extra/package.json create mode 100644 node_modules/gauge/node_modules/strip-ansi/index.js create mode 100644 node_modules/gauge/node_modules/strip-ansi/license create mode 100644 node_modules/gauge/node_modules/strip-ansi/package.json create mode 100644 node_modules/gauge/node_modules/strip-ansi/readme.md create mode 100644 node_modules/get-caller-file/LICENSE.md create mode 100644 node_modules/get-caller-file/README.md create mode 100644 node_modules/get-caller-file/index.d.ts create mode 100644 node_modules/get-caller-file/index.js create mode 100644 node_modules/get-caller-file/index.js.map create mode 100644 node_modules/get-caller-file/package.json create mode 100644 node_modules/inflection/.npmignore create mode 100644 node_modules/inflection/History.md create mode 100644 node_modules/inflection/Readme.md create mode 100644 node_modules/inflection/bower.json create mode 100644 node_modules/inflection/component.json create mode 100644 node_modules/inflection/inflection.min.js create mode 100644 node_modules/inflection/lib/inflection.js create mode 100644 node_modules/inflection/package.json delete mode 100644 node_modules/inquirer/node_modules/strip-ansi/index.js delete mode 100644 node_modules/inquirer/node_modules/strip-ansi/package.json delete mode 100644 node_modules/inquirer/node_modules/strip-ansi/readme.md create mode 100644 node_modules/is-bluebird/License create mode 100644 node_modules/is-bluebird/README.md create mode 100644 node_modules/is-bluebird/changelog.md create mode 100644 node_modules/is-bluebird/lib/index.js create mode 100644 node_modules/is-bluebird/package.json create mode 100644 node_modules/js-beautify/CHANGELOG.md create mode 100644 node_modules/js-beautify/LICENSE create mode 100644 node_modules/js-beautify/README.md create mode 100755 node_modules/js-beautify/js/bin/css-beautify.js create mode 100755 node_modules/js-beautify/js/bin/html-beautify.js create mode 100755 node_modules/js-beautify/js/bin/js-beautify.js create mode 100644 node_modules/js-beautify/js/index.js create mode 100644 node_modules/js-beautify/js/lib/beautifier.js create mode 100644 node_modules/js-beautify/js/lib/beautifier.min.js create mode 100644 node_modules/js-beautify/js/lib/beautify-css.js create mode 100644 node_modules/js-beautify/js/lib/beautify-html.js create mode 100644 node_modules/js-beautify/js/lib/beautify.js create mode 100755 node_modules/js-beautify/js/lib/cli.js create mode 100644 node_modules/js-beautify/js/lib/unpackers/javascriptobfuscator_unpacker.js create mode 100644 node_modules/js-beautify/js/lib/unpackers/myobfuscate_unpacker.js create mode 100644 node_modules/js-beautify/js/lib/unpackers/p_a_c_k_e_r_unpacker.js create mode 100644 node_modules/js-beautify/js/lib/unpackers/urlencode_unpacker.js create mode 100755 node_modules/js-beautify/js/src/cli.js create mode 100644 node_modules/js-beautify/js/src/core/directives.js create mode 100644 node_modules/js-beautify/js/src/core/inputscanner.js create mode 100644 node_modules/js-beautify/js/src/core/options.js create mode 100644 node_modules/js-beautify/js/src/core/output.js create mode 100644 node_modules/js-beautify/js/src/core/pattern.js create mode 100644 node_modules/js-beautify/js/src/core/templatablepattern.js create mode 100644 node_modules/js-beautify/js/src/core/token.js create mode 100644 node_modules/js-beautify/js/src/core/tokenizer.js create mode 100644 node_modules/js-beautify/js/src/core/tokenstream.js create mode 100644 node_modules/js-beautify/js/src/core/whitespacepattern.js create mode 100644 node_modules/js-beautify/js/src/css/beautifier.js create mode 100644 node_modules/js-beautify/js/src/css/index.js create mode 100644 node_modules/js-beautify/js/src/css/options.js create mode 100644 node_modules/js-beautify/js/src/css/tokenizer.js create mode 100644 node_modules/js-beautify/js/src/html/beautifier.js create mode 100644 node_modules/js-beautify/js/src/html/index.js create mode 100644 node_modules/js-beautify/js/src/html/options.js create mode 100644 node_modules/js-beautify/js/src/html/tokenizer.js create mode 100644 node_modules/js-beautify/js/src/index.js create mode 100644 node_modules/js-beautify/js/src/javascript/acorn.js create mode 100644 node_modules/js-beautify/js/src/javascript/beautifier.js create mode 100644 node_modules/js-beautify/js/src/javascript/index.js create mode 100644 node_modules/js-beautify/js/src/javascript/options.js create mode 100644 node_modules/js-beautify/js/src/javascript/tokenizer.js create mode 100644 node_modules/js-beautify/js/src/unpackers/javascriptobfuscator_unpacker.js create mode 100644 node_modules/js-beautify/js/src/unpackers/myobfuscate_unpacker.js create mode 100644 node_modules/js-beautify/js/src/unpackers/p_a_c_k_e_r_unpacker.js create mode 100644 node_modules/js-beautify/js/src/unpackers/urlencode_unpacker.js create mode 120000 node_modules/js-beautify/node_modules/.bin/editorconfig create mode 120000 node_modules/js-beautify/node_modules/.bin/mkdirp create mode 120000 node_modules/js-beautify/node_modules/.bin/nopt create mode 100644 node_modules/js-beautify/package.json create mode 100644 node_modules/jsonfile/CHANGELOG.md create mode 100644 node_modules/jsonfile/LICENSE create mode 100644 node_modules/jsonfile/README.md create mode 100644 node_modules/jsonfile/index.js create mode 100644 node_modules/jsonfile/package.json create mode 100644 node_modules/lru-queue/.lint create mode 100644 node_modules/lru-queue/.npmignore create mode 100644 node_modules/lru-queue/.travis.yml create mode 100644 node_modules/lru-queue/CHANGES create mode 100644 node_modules/lru-queue/LICENCE create mode 100644 node_modules/lru-queue/README.md create mode 100644 node_modules/lru-queue/index.js create mode 100644 node_modules/lru-queue/package.json create mode 100644 node_modules/lru-queue/test/index.js create mode 100644 node_modules/memoizee/.editorconfig create mode 100644 node_modules/memoizee/.testignore create mode 100644 node_modules/memoizee/CHANGELOG.md create mode 100644 node_modules/memoizee/CHANGES create mode 100644 node_modules/memoizee/LICENSE create mode 100644 node_modules/memoizee/README.md create mode 100644 node_modules/memoizee/benchmark/fibonacci.js create mode 100644 node_modules/memoizee/ext/async.js create mode 100644 node_modules/memoizee/ext/dispose.js create mode 100644 node_modules/memoizee/ext/max-age.js create mode 100644 node_modules/memoizee/ext/max.js create mode 100644 node_modules/memoizee/ext/promise.js create mode 100644 node_modules/memoizee/ext/ref-counter.js create mode 100644 node_modules/memoizee/index.js create mode 100644 node_modules/memoizee/lib/configure-map.js create mode 100644 node_modules/memoizee/lib/methods.js create mode 100644 node_modules/memoizee/lib/registered-extensions.js create mode 100644 node_modules/memoizee/lib/resolve-length.js create mode 100644 node_modules/memoizee/lib/resolve-normalize.js create mode 100644 node_modules/memoizee/lib/resolve-resolve.js create mode 100644 node_modules/memoizee/lib/weak.js create mode 100644 node_modules/memoizee/methods-plain.js create mode 100644 node_modules/memoizee/methods.js create mode 100644 node_modules/memoizee/normalizers/get-1.js create mode 100644 node_modules/memoizee/normalizers/get-fixed.js create mode 100644 node_modules/memoizee/normalizers/get-primitive-fixed.js create mode 100644 node_modules/memoizee/normalizers/get.js create mode 100644 node_modules/memoizee/normalizers/primitive.js create mode 100644 node_modules/memoizee/package.json create mode 100644 node_modules/memoizee/plain.js create mode 100644 node_modules/memoizee/profile.js create mode 100644 node_modules/memoizee/test/ext/async.js create mode 100644 node_modules/memoizee/test/ext/dispose.js create mode 100644 node_modules/memoizee/test/ext/max-age.js create mode 100644 node_modules/memoizee/test/ext/max.js create mode 100644 node_modules/memoizee/test/ext/promise.js create mode 100644 node_modules/memoizee/test/ext/ref-counter.js create mode 100644 node_modules/memoizee/test/index.js create mode 100644 node_modules/memoizee/test/lib/configure-map.js create mode 100644 node_modules/memoizee/test/lib/methods.js create mode 100644 node_modules/memoizee/test/lib/registered-extensions.js create mode 100644 node_modules/memoizee/test/lib/resolve-length.js create mode 100644 node_modules/memoizee/test/lib/resolve-normalize.js create mode 100644 node_modules/memoizee/test/lib/resolve-resolve.js create mode 100644 node_modules/memoizee/test/lib/weak.js create mode 100644 node_modules/memoizee/test/methods-plain.js create mode 100644 node_modules/memoizee/test/methods.js create mode 100644 node_modules/memoizee/test/normalizers/get-1.js create mode 100644 node_modules/memoizee/test/normalizers/get-fixed.js create mode 100644 node_modules/memoizee/test/normalizers/get-primitive-fixed.js create mode 100644 node_modules/memoizee/test/normalizers/get.js create mode 100644 node_modules/memoizee/test/normalizers/primitive.js create mode 100644 node_modules/memoizee/test/plain.js create mode 100644 node_modules/memoizee/test/profile.js create mode 100644 node_modules/memoizee/test/weak-plain.js create mode 100644 node_modules/memoizee/test/weak.js create mode 100644 node_modules/memoizee/weak-plain.js create mode 100644 node_modules/memoizee/weak.js create mode 100644 node_modules/moment-timezone/LICENSE create mode 100644 node_modules/moment-timezone/README.md create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data-10-year-range.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data-10-year-range.min.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data-1970-2030.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data-1970-2030.min.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.min.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone-with-data.min.js create mode 100644 node_modules/moment-timezone/builds/moment-timezone.min.js create mode 100644 node_modules/moment-timezone/changelog.md create mode 100644 node_modules/moment-timezone/composer.json create mode 100644 node_modules/moment-timezone/data/meta/latest.json create mode 100644 node_modules/moment-timezone/data/packed/latest.json create mode 100644 node_modules/moment-timezone/index.js create mode 100644 node_modules/moment-timezone/moment-timezone-utils.js create mode 100644 node_modules/moment-timezone/moment-timezone.js create mode 100644 node_modules/moment-timezone/package.json create mode 100644 node_modules/moment/CHANGELOG.md create mode 100644 node_modules/moment/LICENSE create mode 100644 node_modules/moment/README.md create mode 100644 node_modules/moment/ender.js create mode 100644 node_modules/moment/locale/af.js create mode 100644 node_modules/moment/locale/ar-dz.js create mode 100644 node_modules/moment/locale/ar-kw.js create mode 100644 node_modules/moment/locale/ar-ly.js create mode 100644 node_modules/moment/locale/ar-ma.js create mode 100644 node_modules/moment/locale/ar-sa.js create mode 100644 node_modules/moment/locale/ar-tn.js create mode 100644 node_modules/moment/locale/ar.js create mode 100644 node_modules/moment/locale/az.js create mode 100644 node_modules/moment/locale/be.js create mode 100644 node_modules/moment/locale/bg.js create mode 100644 node_modules/moment/locale/bm.js create mode 100644 node_modules/moment/locale/bn.js create mode 100644 node_modules/moment/locale/bo.js create mode 100644 node_modules/moment/locale/br.js create mode 100644 node_modules/moment/locale/bs.js create mode 100644 node_modules/moment/locale/ca.js create mode 100644 node_modules/moment/locale/cs.js create mode 100644 node_modules/moment/locale/cv.js create mode 100644 node_modules/moment/locale/cy.js create mode 100644 node_modules/moment/locale/da.js create mode 100644 node_modules/moment/locale/de-at.js create mode 100644 node_modules/moment/locale/de-ch.js create mode 100644 node_modules/moment/locale/de.js create mode 100644 node_modules/moment/locale/dv.js create mode 100644 node_modules/moment/locale/el.js create mode 100644 node_modules/moment/locale/en-SG.js create mode 100644 node_modules/moment/locale/en-au.js create mode 100644 node_modules/moment/locale/en-ca.js create mode 100644 node_modules/moment/locale/en-gb.js create mode 100644 node_modules/moment/locale/en-ie.js create mode 100644 node_modules/moment/locale/en-il.js create mode 100644 node_modules/moment/locale/en-nz.js create mode 100644 node_modules/moment/locale/eo.js create mode 100644 node_modules/moment/locale/es-do.js create mode 100644 node_modules/moment/locale/es-us.js create mode 100644 node_modules/moment/locale/es.js create mode 100644 node_modules/moment/locale/et.js create mode 100644 node_modules/moment/locale/eu.js create mode 100644 node_modules/moment/locale/fa.js create mode 100644 node_modules/moment/locale/fi.js create mode 100644 node_modules/moment/locale/fo.js create mode 100644 node_modules/moment/locale/fr-ca.js create mode 100644 node_modules/moment/locale/fr-ch.js create mode 100644 node_modules/moment/locale/fr.js create mode 100644 node_modules/moment/locale/fy.js create mode 100644 node_modules/moment/locale/ga.js create mode 100644 node_modules/moment/locale/gd.js create mode 100644 node_modules/moment/locale/gl.js create mode 100644 node_modules/moment/locale/gom-latn.js create mode 100644 node_modules/moment/locale/gu.js create mode 100644 node_modules/moment/locale/he.js create mode 100644 node_modules/moment/locale/hi.js create mode 100644 node_modules/moment/locale/hr.js create mode 100644 node_modules/moment/locale/hu.js create mode 100644 node_modules/moment/locale/hy-am.js create mode 100644 node_modules/moment/locale/id.js create mode 100644 node_modules/moment/locale/is.js create mode 100644 node_modules/moment/locale/it-ch.js create mode 100644 node_modules/moment/locale/it.js create mode 100644 node_modules/moment/locale/ja.js create mode 100644 node_modules/moment/locale/jv.js create mode 100644 node_modules/moment/locale/ka.js create mode 100644 node_modules/moment/locale/kk.js create mode 100644 node_modules/moment/locale/km.js create mode 100644 node_modules/moment/locale/kn.js create mode 100644 node_modules/moment/locale/ko.js create mode 100644 node_modules/moment/locale/ku.js create mode 100644 node_modules/moment/locale/ky.js create mode 100644 node_modules/moment/locale/lb.js create mode 100644 node_modules/moment/locale/lo.js create mode 100644 node_modules/moment/locale/lt.js create mode 100644 node_modules/moment/locale/lv.js create mode 100644 node_modules/moment/locale/me.js create mode 100644 node_modules/moment/locale/mi.js create mode 100644 node_modules/moment/locale/mk.js create mode 100644 node_modules/moment/locale/ml.js create mode 100644 node_modules/moment/locale/mn.js create mode 100644 node_modules/moment/locale/mr.js create mode 100644 node_modules/moment/locale/ms-my.js create mode 100644 node_modules/moment/locale/ms.js create mode 100644 node_modules/moment/locale/mt.js create mode 100644 node_modules/moment/locale/my.js create mode 100644 node_modules/moment/locale/nb.js create mode 100644 node_modules/moment/locale/ne.js create mode 100644 node_modules/moment/locale/nl-be.js create mode 100644 node_modules/moment/locale/nl.js create mode 100644 node_modules/moment/locale/nn.js create mode 100644 node_modules/moment/locale/pa-in.js create mode 100644 node_modules/moment/locale/pl.js create mode 100644 node_modules/moment/locale/pt-br.js create mode 100644 node_modules/moment/locale/pt.js create mode 100644 node_modules/moment/locale/ro.js create mode 100644 node_modules/moment/locale/ru.js create mode 100644 node_modules/moment/locale/sd.js create mode 100644 node_modules/moment/locale/se.js create mode 100644 node_modules/moment/locale/si.js create mode 100644 node_modules/moment/locale/sk.js create mode 100644 node_modules/moment/locale/sl.js create mode 100644 node_modules/moment/locale/sq.js create mode 100644 node_modules/moment/locale/sr-cyrl.js create mode 100644 node_modules/moment/locale/sr.js create mode 100644 node_modules/moment/locale/ss.js create mode 100644 node_modules/moment/locale/sv.js create mode 100644 node_modules/moment/locale/sw.js create mode 100644 node_modules/moment/locale/ta.js create mode 100644 node_modules/moment/locale/te.js create mode 100644 node_modules/moment/locale/tet.js create mode 100644 node_modules/moment/locale/tg.js create mode 100644 node_modules/moment/locale/th.js create mode 100644 node_modules/moment/locale/tl-ph.js create mode 100644 node_modules/moment/locale/tlh.js create mode 100644 node_modules/moment/locale/tr.js create mode 100644 node_modules/moment/locale/tzl.js create mode 100644 node_modules/moment/locale/tzm-latn.js create mode 100644 node_modules/moment/locale/tzm.js create mode 100644 node_modules/moment/locale/ug-cn.js create mode 100644 node_modules/moment/locale/uk.js create mode 100644 node_modules/moment/locale/ur.js create mode 100644 node_modules/moment/locale/uz-latn.js create mode 100644 node_modules/moment/locale/uz.js create mode 100644 node_modules/moment/locale/vi.js create mode 100644 node_modules/moment/locale/x-pseudo.js create mode 100644 node_modules/moment/locale/yo.js create mode 100644 node_modules/moment/locale/zh-cn.js create mode 100644 node_modules/moment/locale/zh-hk.js create mode 100644 node_modules/moment/locale/zh-tw.js create mode 100644 node_modules/moment/min/locales.js create mode 100644 node_modules/moment/min/locales.min.js create mode 100644 node_modules/moment/min/moment-with-locales.js create mode 100644 node_modules/moment/min/moment-with-locales.min.js create mode 100644 node_modules/moment/min/moment.min.js create mode 100644 node_modules/moment/moment.d.ts create mode 100644 node_modules/moment/moment.js create mode 100644 node_modules/moment/package.js create mode 100644 node_modules/moment/package.json create mode 100644 node_modules/moment/src/lib/create/check-overflow.js create mode 100644 node_modules/moment/src/lib/create/date-from-array.js create mode 100644 node_modules/moment/src/lib/create/from-anything.js create mode 100644 node_modules/moment/src/lib/create/from-array.js create mode 100644 node_modules/moment/src/lib/create/from-object.js create mode 100644 node_modules/moment/src/lib/create/from-string-and-array.js create mode 100644 node_modules/moment/src/lib/create/from-string-and-format.js create mode 100644 node_modules/moment/src/lib/create/from-string.js create mode 100644 node_modules/moment/src/lib/create/local.js create mode 100644 node_modules/moment/src/lib/create/parsing-flags.js create mode 100644 node_modules/moment/src/lib/create/utc.js create mode 100644 node_modules/moment/src/lib/create/valid.js create mode 100644 node_modules/moment/src/lib/duration/abs.js create mode 100644 node_modules/moment/src/lib/duration/add-subtract.js create mode 100644 node_modules/moment/src/lib/duration/as.js create mode 100644 node_modules/moment/src/lib/duration/bubble.js create mode 100644 node_modules/moment/src/lib/duration/clone.js create mode 100644 node_modules/moment/src/lib/duration/constructor.js create mode 100644 node_modules/moment/src/lib/duration/create.js create mode 100644 node_modules/moment/src/lib/duration/duration.js create mode 100644 node_modules/moment/src/lib/duration/get.js create mode 100644 node_modules/moment/src/lib/duration/humanize.js create mode 100644 node_modules/moment/src/lib/duration/iso-string.js create mode 100644 node_modules/moment/src/lib/duration/prototype.js create mode 100644 node_modules/moment/src/lib/duration/valid.js create mode 100644 node_modules/moment/src/lib/format/format.js create mode 100644 node_modules/moment/src/lib/locale/base-config.js create mode 100644 node_modules/moment/src/lib/locale/calendar.js create mode 100644 node_modules/moment/src/lib/locale/constructor.js create mode 100644 node_modules/moment/src/lib/locale/en.js create mode 100644 node_modules/moment/src/lib/locale/formats.js create mode 100644 node_modules/moment/src/lib/locale/invalid.js create mode 100644 node_modules/moment/src/lib/locale/lists.js create mode 100644 node_modules/moment/src/lib/locale/locale.js create mode 100644 node_modules/moment/src/lib/locale/locales.js create mode 100644 node_modules/moment/src/lib/locale/ordinal.js create mode 100644 node_modules/moment/src/lib/locale/pre-post-format.js create mode 100644 node_modules/moment/src/lib/locale/prototype.js create mode 100644 node_modules/moment/src/lib/locale/relative.js create mode 100644 node_modules/moment/src/lib/locale/set.js create mode 100644 node_modules/moment/src/lib/moment/add-subtract.js create mode 100644 node_modules/moment/src/lib/moment/calendar.js create mode 100644 node_modules/moment/src/lib/moment/clone.js create mode 100644 node_modules/moment/src/lib/moment/compare.js create mode 100644 node_modules/moment/src/lib/moment/constructor.js create mode 100644 node_modules/moment/src/lib/moment/creation-data.js create mode 100644 node_modules/moment/src/lib/moment/diff.js create mode 100644 node_modules/moment/src/lib/moment/format.js create mode 100644 node_modules/moment/src/lib/moment/from.js create mode 100644 node_modules/moment/src/lib/moment/get-set.js create mode 100644 node_modules/moment/src/lib/moment/locale.js create mode 100644 node_modules/moment/src/lib/moment/min-max.js create mode 100644 node_modules/moment/src/lib/moment/moment.js create mode 100644 node_modules/moment/src/lib/moment/now.js create mode 100644 node_modules/moment/src/lib/moment/prototype.js create mode 100644 node_modules/moment/src/lib/moment/start-end-of.js create mode 100644 node_modules/moment/src/lib/moment/to-type.js create mode 100644 node_modules/moment/src/lib/moment/to.js create mode 100644 node_modules/moment/src/lib/moment/valid.js create mode 100644 node_modules/moment/src/lib/parse/regex.js create mode 100644 node_modules/moment/src/lib/parse/token.js create mode 100644 node_modules/moment/src/lib/units/aliases.js create mode 100644 node_modules/moment/src/lib/units/constants.js create mode 100644 node_modules/moment/src/lib/units/day-of-month.js create mode 100644 node_modules/moment/src/lib/units/day-of-week.js create mode 100644 node_modules/moment/src/lib/units/day-of-year.js create mode 100644 node_modules/moment/src/lib/units/hour.js create mode 100644 node_modules/moment/src/lib/units/millisecond.js create mode 100644 node_modules/moment/src/lib/units/minute.js create mode 100644 node_modules/moment/src/lib/units/month.js create mode 100644 node_modules/moment/src/lib/units/offset.js create mode 100644 node_modules/moment/src/lib/units/priorities.js create mode 100644 node_modules/moment/src/lib/units/quarter.js create mode 100644 node_modules/moment/src/lib/units/second.js create mode 100644 node_modules/moment/src/lib/units/timestamp.js create mode 100644 node_modules/moment/src/lib/units/timezone.js create mode 100644 node_modules/moment/src/lib/units/units.js create mode 100644 node_modules/moment/src/lib/units/week-calendar-utils.js create mode 100644 node_modules/moment/src/lib/units/week-year.js create mode 100644 node_modules/moment/src/lib/units/week.js create mode 100644 node_modules/moment/src/lib/units/year.js create mode 100644 node_modules/moment/src/lib/utils/abs-ceil.js create mode 100644 node_modules/moment/src/lib/utils/abs-floor.js create mode 100644 node_modules/moment/src/lib/utils/abs-round.js create mode 100644 node_modules/moment/src/lib/utils/compare-arrays.js create mode 100644 node_modules/moment/src/lib/utils/defaults.js create mode 100644 node_modules/moment/src/lib/utils/deprecate.js create mode 100644 node_modules/moment/src/lib/utils/extend.js create mode 100644 node_modules/moment/src/lib/utils/has-own-prop.js create mode 100644 node_modules/moment/src/lib/utils/hooks.js create mode 100644 node_modules/moment/src/lib/utils/index-of.js create mode 100644 node_modules/moment/src/lib/utils/is-array.js create mode 100644 node_modules/moment/src/lib/utils/is-date.js create mode 100644 node_modules/moment/src/lib/utils/is-function.js create mode 100644 node_modules/moment/src/lib/utils/is-number.js create mode 100644 node_modules/moment/src/lib/utils/is-object-empty.js create mode 100644 node_modules/moment/src/lib/utils/is-object.js create mode 100644 node_modules/moment/src/lib/utils/is-undefined.js create mode 100644 node_modules/moment/src/lib/utils/keys.js create mode 100644 node_modules/moment/src/lib/utils/map.js create mode 100644 node_modules/moment/src/lib/utils/mod.js create mode 100644 node_modules/moment/src/lib/utils/some.js create mode 100644 node_modules/moment/src/lib/utils/to-int.js create mode 100644 node_modules/moment/src/lib/utils/zero-fill.js create mode 100644 node_modules/moment/src/locale/af.js create mode 100644 node_modules/moment/src/locale/ar-dz.js create mode 100644 node_modules/moment/src/locale/ar-kw.js create mode 100644 node_modules/moment/src/locale/ar-ly.js create mode 100644 node_modules/moment/src/locale/ar-ma.js create mode 100644 node_modules/moment/src/locale/ar-sa.js create mode 100644 node_modules/moment/src/locale/ar-tn.js create mode 100644 node_modules/moment/src/locale/ar.js create mode 100644 node_modules/moment/src/locale/az.js create mode 100644 node_modules/moment/src/locale/be.js create mode 100644 node_modules/moment/src/locale/bg.js create mode 100644 node_modules/moment/src/locale/bm.js create mode 100644 node_modules/moment/src/locale/bn.js create mode 100644 node_modules/moment/src/locale/bo.js create mode 100644 node_modules/moment/src/locale/br.js create mode 100644 node_modules/moment/src/locale/bs.js create mode 100644 node_modules/moment/src/locale/ca.js create mode 100644 node_modules/moment/src/locale/cs.js create mode 100644 node_modules/moment/src/locale/cv.js create mode 100644 node_modules/moment/src/locale/cy.js create mode 100644 node_modules/moment/src/locale/da.js create mode 100644 node_modules/moment/src/locale/de-at.js create mode 100644 node_modules/moment/src/locale/de-ch.js create mode 100644 node_modules/moment/src/locale/de.js create mode 100644 node_modules/moment/src/locale/dv.js create mode 100644 node_modules/moment/src/locale/el.js create mode 100644 node_modules/moment/src/locale/en-SG.js create mode 100644 node_modules/moment/src/locale/en-au.js create mode 100644 node_modules/moment/src/locale/en-ca.js create mode 100644 node_modules/moment/src/locale/en-gb.js create mode 100644 node_modules/moment/src/locale/en-ie.js create mode 100644 node_modules/moment/src/locale/en-il.js create mode 100644 node_modules/moment/src/locale/en-nz.js create mode 100644 node_modules/moment/src/locale/eo.js create mode 100644 node_modules/moment/src/locale/es-do.js create mode 100644 node_modules/moment/src/locale/es-us.js create mode 100644 node_modules/moment/src/locale/es.js create mode 100644 node_modules/moment/src/locale/et.js create mode 100644 node_modules/moment/src/locale/eu.js create mode 100644 node_modules/moment/src/locale/fa.js create mode 100644 node_modules/moment/src/locale/fi.js create mode 100644 node_modules/moment/src/locale/fo.js create mode 100644 node_modules/moment/src/locale/fr-ca.js create mode 100644 node_modules/moment/src/locale/fr-ch.js create mode 100644 node_modules/moment/src/locale/fr.js create mode 100644 node_modules/moment/src/locale/fy.js create mode 100644 node_modules/moment/src/locale/ga.js create mode 100644 node_modules/moment/src/locale/gd.js create mode 100644 node_modules/moment/src/locale/gl.js create mode 100644 node_modules/moment/src/locale/gom-latn.js create mode 100644 node_modules/moment/src/locale/gu.js create mode 100644 node_modules/moment/src/locale/he.js create mode 100644 node_modules/moment/src/locale/hi.js create mode 100644 node_modules/moment/src/locale/hr.js create mode 100644 node_modules/moment/src/locale/hu.js create mode 100644 node_modules/moment/src/locale/hy-am.js create mode 100644 node_modules/moment/src/locale/id.js create mode 100644 node_modules/moment/src/locale/is.js create mode 100644 node_modules/moment/src/locale/it-ch.js create mode 100644 node_modules/moment/src/locale/it.js create mode 100644 node_modules/moment/src/locale/ja.js create mode 100644 node_modules/moment/src/locale/jv.js create mode 100644 node_modules/moment/src/locale/ka.js create mode 100644 node_modules/moment/src/locale/kk.js create mode 100644 node_modules/moment/src/locale/km.js create mode 100644 node_modules/moment/src/locale/kn.js create mode 100644 node_modules/moment/src/locale/ko.js create mode 100644 node_modules/moment/src/locale/ku.js create mode 100644 node_modules/moment/src/locale/ky.js create mode 100644 node_modules/moment/src/locale/lb.js create mode 100644 node_modules/moment/src/locale/lo.js create mode 100644 node_modules/moment/src/locale/lt.js create mode 100644 node_modules/moment/src/locale/lv.js create mode 100644 node_modules/moment/src/locale/me.js create mode 100644 node_modules/moment/src/locale/mi.js create mode 100644 node_modules/moment/src/locale/mk.js create mode 100644 node_modules/moment/src/locale/ml.js create mode 100644 node_modules/moment/src/locale/mn.js create mode 100644 node_modules/moment/src/locale/mr.js create mode 100644 node_modules/moment/src/locale/ms-my.js create mode 100644 node_modules/moment/src/locale/ms.js create mode 100644 node_modules/moment/src/locale/mt.js create mode 100644 node_modules/moment/src/locale/my.js create mode 100644 node_modules/moment/src/locale/nb.js create mode 100644 node_modules/moment/src/locale/ne.js create mode 100644 node_modules/moment/src/locale/nl-be.js create mode 100644 node_modules/moment/src/locale/nl.js create mode 100644 node_modules/moment/src/locale/nn.js create mode 100644 node_modules/moment/src/locale/pa-in.js create mode 100644 node_modules/moment/src/locale/pl.js create mode 100644 node_modules/moment/src/locale/pt-br.js create mode 100644 node_modules/moment/src/locale/pt.js create mode 100644 node_modules/moment/src/locale/ro.js create mode 100644 node_modules/moment/src/locale/ru.js create mode 100644 node_modules/moment/src/locale/sd.js create mode 100644 node_modules/moment/src/locale/se.js create mode 100644 node_modules/moment/src/locale/si.js create mode 100644 node_modules/moment/src/locale/sk.js create mode 100644 node_modules/moment/src/locale/sl.js create mode 100644 node_modules/moment/src/locale/sq.js create mode 100644 node_modules/moment/src/locale/sr-cyrl.js create mode 100644 node_modules/moment/src/locale/sr.js create mode 100644 node_modules/moment/src/locale/ss.js create mode 100644 node_modules/moment/src/locale/sv.js create mode 100644 node_modules/moment/src/locale/sw.js create mode 100644 node_modules/moment/src/locale/ta.js create mode 100644 node_modules/moment/src/locale/te.js create mode 100644 node_modules/moment/src/locale/tet.js create mode 100644 node_modules/moment/src/locale/tg.js create mode 100644 node_modules/moment/src/locale/th.js create mode 100644 node_modules/moment/src/locale/tl-ph.js create mode 100644 node_modules/moment/src/locale/tlh.js create mode 100644 node_modules/moment/src/locale/tr.js create mode 100644 node_modules/moment/src/locale/tzl.js create mode 100644 node_modules/moment/src/locale/tzm-latn.js create mode 100644 node_modules/moment/src/locale/tzm.js create mode 100644 node_modules/moment/src/locale/ug-cn.js create mode 100644 node_modules/moment/src/locale/uk.js create mode 100644 node_modules/moment/src/locale/ur.js create mode 100644 node_modules/moment/src/locale/uz-latn.js create mode 100644 node_modules/moment/src/locale/uz.js create mode 100644 node_modules/moment/src/locale/vi.js create mode 100644 node_modules/moment/src/locale/x-pseudo.js create mode 100644 node_modules/moment/src/locale/yo.js create mode 100644 node_modules/moment/src/locale/zh-cn.js create mode 100644 node_modules/moment/src/locale/zh-hk.js create mode 100644 node_modules/moment/src/locale/zh-tw.js create mode 100644 node_modules/moment/src/moment.js create mode 100644 node_modules/next-tick/.lint create mode 100644 node_modules/next-tick/.npmignore create mode 100644 node_modules/next-tick/.travis.yml create mode 100644 node_modules/next-tick/CHANGES create mode 100644 node_modules/next-tick/LICENSE create mode 100644 node_modules/next-tick/README.md create mode 100644 node_modules/next-tick/index.js create mode 100644 node_modules/next-tick/package.json create mode 100644 node_modules/next-tick/test/index.js delete mode 100644 node_modules/node-pre-gyp/node_modules/nopt/package.json rename node_modules/{node-pre-gyp/node_modules => }/nopt/.npmignore (100%) rename node_modules/{node-pre-gyp/node_modules => }/nopt/.travis.yml (100%) rename node_modules/{node-pre-gyp/node_modules => }/nopt/CHANGELOG.md (100%) rename node_modules/{node-pre-gyp/node_modules => }/nopt/test/basic.js (100%) rename node_modules/{node-pre-gyp/node_modules/nopt => proto-list}/LICENSE (100%) create mode 100644 node_modules/proto-list/README.md create mode 100644 node_modules/proto-list/package.json create mode 100644 node_modules/proto-list/proto-list.js create mode 100644 node_modules/proto-list/test/basic.js create mode 100644 node_modules/regenerator-runtime/README.md create mode 100644 node_modules/regenerator-runtime/package.json create mode 100644 node_modules/regenerator-runtime/path.js create mode 100644 node_modules/regenerator-runtime/runtime-module.js create mode 100644 node_modules/regenerator-runtime/runtime.js create mode 100644 node_modules/require-directory/.jshintrc create mode 100644 node_modules/require-directory/.npmignore create mode 100644 node_modules/require-directory/.travis.yml create mode 100644 node_modules/require-directory/LICENSE create mode 100644 node_modules/require-directory/README.markdown create mode 100644 node_modules/require-directory/index.js create mode 100644 node_modules/require-directory/package.json create mode 100644 node_modules/require-main-filename/CHANGELOG.md create mode 100644 node_modules/require-main-filename/LICENSE.txt create mode 100644 node_modules/require-main-filename/README.md create mode 100644 node_modules/require-main-filename/index.js create mode 100644 node_modules/require-main-filename/package.json create mode 100644 node_modules/retry-as-promised/LICENSE create mode 100644 node_modules/retry-as-promised/README.md create mode 100644 node_modules/retry-as-promised/index.js create mode 100644 node_modules/retry-as-promised/package.json create mode 100644 node_modules/sequelize-cli/.babelrc create mode 100644 node_modules/sequelize-cli/.editorconfig create mode 100644 node_modules/sequelize-cli/.eslintrc.json create mode 100644 node_modules/sequelize-cli/.github/ISSUE_TEMPLATE.md create mode 100644 node_modules/sequelize-cli/.travis.yml create mode 100644 node_modules/sequelize-cli/CHANGELOG.md create mode 100644 node_modules/sequelize-cli/CONTRIBUTING.md create mode 100644 node_modules/sequelize-cli/LICENSE create mode 100644 node_modules/sequelize-cli/README.md create mode 100644 node_modules/sequelize-cli/docker-compose.yml create mode 100644 node_modules/sequelize-cli/docs/FAQ.md create mode 100644 node_modules/sequelize-cli/docs/README.md create mode 100644 node_modules/sequelize-cli/lib/assets/migrations/create-table.js create mode 100644 node_modules/sequelize-cli/lib/assets/migrations/skeleton.js create mode 100644 node_modules/sequelize-cli/lib/assets/models/index.js create mode 100644 node_modules/sequelize-cli/lib/assets/models/model.js create mode 100644 node_modules/sequelize-cli/lib/assets/seeders/skeleton.js create mode 100644 node_modules/sequelize-cli/lib/commands/database.js create mode 100644 node_modules/sequelize-cli/lib/commands/init.js create mode 100644 node_modules/sequelize-cli/lib/commands/migrate.js create mode 100644 node_modules/sequelize-cli/lib/commands/migrate_undo.js create mode 100644 node_modules/sequelize-cli/lib/commands/migrate_undo_all.js create mode 100644 node_modules/sequelize-cli/lib/commands/migration_generate.js create mode 100644 node_modules/sequelize-cli/lib/commands/model_generate.js create mode 100644 node_modules/sequelize-cli/lib/commands/seed.js create mode 100644 node_modules/sequelize-cli/lib/commands/seed_generate.js create mode 100644 node_modules/sequelize-cli/lib/commands/seed_one.js create mode 100644 node_modules/sequelize-cli/lib/core/migrator.js create mode 100644 node_modules/sequelize-cli/lib/core/yargs.js create mode 100644 node_modules/sequelize-cli/lib/helpers/asset-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/config-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/generic-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/index.js create mode 100644 node_modules/sequelize-cli/lib/helpers/init-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/migration-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/model-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/path-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/template-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/umzug-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/version-helper.js create mode 100644 node_modules/sequelize-cli/lib/helpers/view-helper.js create mode 100755 node_modules/sequelize-cli/lib/sequelize create mode 120000 node_modules/sequelize-cli/node_modules/.bin/css-beautify create mode 120000 node_modules/sequelize-cli/node_modules/.bin/html-beautify create mode 120000 node_modules/sequelize-cli/node_modules/.bin/js-beautify create mode 100644 node_modules/sequelize-cli/package.json create mode 100644 node_modules/sequelize-cli/scripts/mocha-bootload.js create mode 100644 node_modules/sequelize-cli/src/assets/migrations/create-table.js create mode 100644 node_modules/sequelize-cli/src/assets/migrations/skeleton.js create mode 100644 node_modules/sequelize-cli/src/assets/models/index.js create mode 100644 node_modules/sequelize-cli/src/assets/models/model.js create mode 100644 node_modules/sequelize-cli/src/assets/seeders/skeleton.js create mode 100644 node_modules/sequelize-cli/src/commands/database.js create mode 100644 node_modules/sequelize-cli/src/commands/init.js create mode 100644 node_modules/sequelize-cli/src/commands/migrate.js create mode 100644 node_modules/sequelize-cli/src/commands/migrate_undo.js create mode 100644 node_modules/sequelize-cli/src/commands/migrate_undo_all.js create mode 100644 node_modules/sequelize-cli/src/commands/migration_generate.js create mode 100644 node_modules/sequelize-cli/src/commands/model_generate.js create mode 100644 node_modules/sequelize-cli/src/commands/seed.js create mode 100644 node_modules/sequelize-cli/src/commands/seed_generate.js create mode 100644 node_modules/sequelize-cli/src/commands/seed_one.js create mode 100644 node_modules/sequelize-cli/src/core/migrator.js create mode 100644 node_modules/sequelize-cli/src/core/yargs.js create mode 100644 node_modules/sequelize-cli/src/helpers/asset-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/config-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/generic-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/index.js create mode 100644 node_modules/sequelize-cli/src/helpers/init-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/migration-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/model-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/path-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/template-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/umzug-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/version-helper.js create mode 100644 node_modules/sequelize-cli/src/helpers/view-helper.js create mode 100644 node_modules/sequelize-cli/src/sequelize.js create mode 100644 node_modules/sequelize-cli/test/db/db-create.test.js create mode 100644 node_modules/sequelize-cli/test/db/db-drop.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate-json.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate/schema/add_timestamps.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate/status.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate/undo.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate/undo/all.test.js create mode 100644 node_modules/sequelize-cli/test/db/migrate/undo/all_to.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed-json.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed/all.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed/undo.test.js create mode 100644 node_modules/sequelize-cli/test/db/seed/undo/all.test.js create mode 100644 node_modules/sequelize-cli/test/environment-variable.test.js create mode 100644 node_modules/sequelize-cli/test/init.test.js create mode 100644 node_modules/sequelize-cli/test/migration/create.test.js create mode 100644 node_modules/sequelize-cli/test/model/create.test.js create mode 100644 node_modules/sequelize-cli/test/options.test.js create mode 100644 node_modules/sequelize-cli/test/seed/create.test.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111117063700-createPerson.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111130161100-emptyMigration.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111205064000-renamePersonToUser.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111205162700-addSignatureColumnToUser.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111205167000-addUniqueNameColumnToUser.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111206061400-removeShopIdColumnFromUser.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111206063000-changeSignatureColumnOfUserToMendatory.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20111206163300-renameSignatureColumnOfUserToSig.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909174103-createFunctionGetAnAnswer.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909174253-renameFunctionGetAnAnswerGetTheAnswer.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909175000-deleteFunctionGetTheAnswer.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909175939-createTestTableForTrigger.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909180846-createTriggerOnTriggerTestTable.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909181148-renameTriggerUpdatedAtToUpdateUpdatedAt.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20130909185621-deleteTriggerUpdateUpdatedAt.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/20170526153000-createPost.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/invalid/20141208213500-createPerson.js create mode 100644 node_modules/sequelize-cli/test/support/assets/migrations/new/20141208213500-createPerson.js create mode 100644 node_modules/sequelize-cli/test/support/assets/project.js create mode 100644 node_modules/sequelize-cli/test/support/assets/seeders/20111117063700-seedPerson.js create mode 100644 node_modules/sequelize-cli/test/support/assets/seeders/20111117063900-seedPerson2.js create mode 100644 node_modules/sequelize-cli/test/support/assets/seeders/new/20141208213500-seedPerson.js create mode 100644 node_modules/sequelize-cli/test/support/config/config.js create mode 100644 node_modules/sequelize-cli/test/support/config/options.js create mode 100644 node_modules/sequelize-cli/test/support/helpers.js create mode 100644 node_modules/sequelize-cli/test/support/index.js create mode 100644 node_modules/sequelize-cli/test/support/tmp/.gitkeep create mode 100644 node_modules/sequelize-cli/test/support/tmp/config/config.js create mode 100644 node_modules/sequelize-cli/test/support/tmp/migrations/20141208213500-createPerson.js create mode 100644 node_modules/sequelize-cli/test/support/tmp/models/index.js create mode 100644 node_modules/sequelize-cli/test/support/tmp/test.sqlite create mode 100644 node_modules/sequelize-cli/test/url.test.js create mode 100644 node_modules/sequelize-cli/test/version.test.js create mode 100644 node_modules/sequelize-pool/LICENSE create mode 100644 node_modules/sequelize-pool/README.md create mode 100644 node_modules/sequelize-pool/lib/Deferred.js create mode 100644 node_modules/sequelize-pool/lib/Pool.js create mode 100644 node_modules/sequelize-pool/lib/TimeoutError.js create mode 100644 node_modules/sequelize-pool/package.json create mode 100644 node_modules/sequelize/LICENSE create mode 100644 node_modules/sequelize/README.md create mode 100644 node_modules/sequelize/index.js create mode 100644 node_modules/sequelize/lib/associations/base.js create mode 100644 node_modules/sequelize/lib/associations/belongs-to-many.js create mode 100644 node_modules/sequelize/lib/associations/belongs-to.js create mode 100644 node_modules/sequelize/lib/associations/has-many.js create mode 100644 node_modules/sequelize/lib/associations/has-one.js create mode 100644 node_modules/sequelize/lib/associations/helpers.js create mode 100644 node_modules/sequelize/lib/associations/index.js create mode 100644 node_modules/sequelize/lib/associations/mixin.js create mode 100644 node_modules/sequelize/lib/data-types.js create mode 100644 node_modules/sequelize/lib/deferrable.js create mode 100644 node_modules/sequelize/lib/dialects/abstract/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/abstract/index.js create mode 100755 node_modules/sequelize/lib/dialects/abstract/query-generator.js create mode 100644 node_modules/sequelize/lib/dialects/abstract/query-generator/helpers/quote.js create mode 100644 node_modules/sequelize/lib/dialects/abstract/query-generator/operators.js create mode 100644 node_modules/sequelize/lib/dialects/abstract/query-generator/transaction.js create mode 100755 node_modules/sequelize/lib/dialects/abstract/query.js create mode 100644 node_modules/sequelize/lib/dialects/mariadb/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/mariadb/data-types.js create mode 100644 node_modules/sequelize/lib/dialects/mariadb/index.js create mode 100644 node_modules/sequelize/lib/dialects/mariadb/query-generator.js create mode 100644 node_modules/sequelize/lib/dialects/mariadb/query.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/data-types.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/index.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/query-generator.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/query-interface.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/query.js create mode 100644 node_modules/sequelize/lib/dialects/mssql/resource-lock.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/data-types.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/index.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/query-generator.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/query-interface.js create mode 100644 node_modules/sequelize/lib/dialects/mysql/query.js create mode 100644 node_modules/sequelize/lib/dialects/parserStore.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/data-types.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/hstore.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/index.js create mode 100755 node_modules/sequelize/lib/dialects/postgres/query-generator.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/query-interface.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/query.js create mode 100644 node_modules/sequelize/lib/dialects/postgres/range.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/connection-manager.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/data-types.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/index.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/query-generator.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/query-interface.js create mode 100644 node_modules/sequelize/lib/dialects/sqlite/query.js create mode 100644 node_modules/sequelize/lib/errors/association-error.js create mode 100644 node_modules/sequelize/lib/errors/base-error.js create mode 100644 node_modules/sequelize/lib/errors/bulk-record-error.js create mode 100644 node_modules/sequelize/lib/errors/connection-error.js create mode 100644 node_modules/sequelize/lib/errors/connection/access-denied-error.js create mode 100644 node_modules/sequelize/lib/errors/connection/connection-acquire-timeout-error.js create mode 100644 node_modules/sequelize/lib/errors/connection/connection-refused-error.js create mode 100644 node_modules/sequelize/lib/errors/connection/connection-timed-out-error.js create mode 100644 node_modules/sequelize/lib/errors/connection/host-not-found-error.js create mode 100644 node_modules/sequelize/lib/errors/connection/host-not-reachable-error.js create mode 100644 node_modules/sequelize/lib/errors/connection/invalid-connection-error.js create mode 100644 node_modules/sequelize/lib/errors/database-error.js create mode 100644 node_modules/sequelize/lib/errors/database/exclusion-constraint-error.js create mode 100644 node_modules/sequelize/lib/errors/database/foreign-key-constraint-error.js create mode 100644 node_modules/sequelize/lib/errors/database/timeout-error.js create mode 100644 node_modules/sequelize/lib/errors/database/unknown-constraint-error.js create mode 100644 node_modules/sequelize/lib/errors/eager-loading-error.js create mode 100644 node_modules/sequelize/lib/errors/empty-result-error.js create mode 100644 node_modules/sequelize/lib/errors/index.js create mode 100644 node_modules/sequelize/lib/errors/instance-error.js create mode 100644 node_modules/sequelize/lib/errors/optimistic-lock-error.js create mode 100644 node_modules/sequelize/lib/errors/query-error.js create mode 100644 node_modules/sequelize/lib/errors/sequelize-scope-error.js create mode 100644 node_modules/sequelize/lib/errors/validation-error.js create mode 100644 node_modules/sequelize/lib/errors/validation/unique-constraint-error.js create mode 100644 node_modules/sequelize/lib/hooks.js create mode 100644 node_modules/sequelize/lib/index-hints.js create mode 100644 node_modules/sequelize/lib/instance-validator.js create mode 100644 node_modules/sequelize/lib/model-manager.js create mode 100644 node_modules/sequelize/lib/model.js create mode 100644 node_modules/sequelize/lib/operators.js create mode 100644 node_modules/sequelize/lib/promise.js create mode 100644 node_modules/sequelize/lib/query-interface.js create mode 100644 node_modules/sequelize/lib/query-types.js create mode 100755 node_modules/sequelize/lib/sequelize.js create mode 100644 node_modules/sequelize/lib/sql-string.js create mode 100644 node_modules/sequelize/lib/table-hints.js create mode 100644 node_modules/sequelize/lib/transaction.js create mode 100644 node_modules/sequelize/lib/utils.js create mode 100644 node_modules/sequelize/lib/utils/classToInvokable.js create mode 100644 node_modules/sequelize/lib/utils/deprecations.js create mode 100644 node_modules/sequelize/lib/utils/logger.js create mode 100644 node_modules/sequelize/lib/utils/validator-extras.js create mode 120000 node_modules/sequelize/node_modules/.bin/semver create mode 120000 node_modules/sequelize/node_modules/.bin/uuid create mode 100644 node_modules/sequelize/node_modules/debug/CHANGELOG.md create mode 100644 node_modules/sequelize/node_modules/debug/LICENSE create mode 100644 node_modules/sequelize/node_modules/debug/README.md create mode 100644 node_modules/sequelize/node_modules/debug/dist/debug.js create mode 100644 node_modules/sequelize/node_modules/debug/package.json create mode 100644 node_modules/sequelize/node_modules/debug/src/browser.js create mode 100644 node_modules/sequelize/node_modules/debug/src/common.js create mode 100644 node_modules/sequelize/node_modules/debug/src/index.js create mode 100644 node_modules/sequelize/node_modules/debug/src/node.js create mode 100644 node_modules/sequelize/node_modules/semver/CHANGELOG.md create mode 100644 node_modules/sequelize/node_modules/semver/LICENSE create mode 100644 node_modules/sequelize/node_modules/semver/README.md create mode 100644 node_modules/sequelize/node_modules/semver/bin/.semver.js.swp create mode 100755 node_modules/sequelize/node_modules/semver/bin/semver.js create mode 100644 node_modules/sequelize/node_modules/semver/package.json create mode 100644 node_modules/sequelize/node_modules/semver/range.bnf create mode 100644 node_modules/sequelize/node_modules/semver/semver.js create mode 100644 node_modules/sequelize/package.json create mode 100644 node_modules/sequelize/types/index.d.ts create mode 100644 node_modules/sequelize/types/lib/associations/base.d.ts create mode 100644 node_modules/sequelize/types/lib/associations/belongs-to-many.d.ts create mode 100644 node_modules/sequelize/types/lib/associations/belongs-to.d.ts create mode 100644 node_modules/sequelize/types/lib/associations/has-many.d.ts create mode 100644 node_modules/sequelize/types/lib/associations/has-one.d.ts create mode 100644 node_modules/sequelize/types/lib/associations/index.d.ts create mode 100644 node_modules/sequelize/types/lib/connection-manager.d.ts create mode 100644 node_modules/sequelize/types/lib/data-types.d.ts create mode 100644 node_modules/sequelize/types/lib/deferrable.d.ts create mode 100644 node_modules/sequelize/types/lib/errors.d.ts create mode 100644 node_modules/sequelize/types/lib/hooks.d.ts create mode 100644 node_modules/sequelize/types/lib/index-hints.d.ts create mode 100644 node_modules/sequelize/types/lib/instance-validator.d.ts create mode 100644 node_modules/sequelize/types/lib/model-manager.d.ts create mode 100644 node_modules/sequelize/types/lib/model.d.ts create mode 100644 node_modules/sequelize/types/lib/operators.d.ts create mode 100644 node_modules/sequelize/types/lib/promise.d.ts create mode 100644 node_modules/sequelize/types/lib/query-interface.d.ts create mode 100644 node_modules/sequelize/types/lib/query-types.d.ts create mode 100644 node_modules/sequelize/types/lib/sequelize.d.ts create mode 100644 node_modules/sequelize/types/lib/sql-string.d.ts create mode 100644 node_modules/sequelize/types/lib/table-hints.d.ts create mode 100644 node_modules/sequelize/types/lib/transaction.d.ts create mode 100644 node_modules/sequelize/types/lib/utils.d.ts create mode 100644 node_modules/sequelize/types/lib/utils/logger.d.ts create mode 100644 node_modules/sequelize/types/lib/utils/validator-extras.d.ts create mode 100644 node_modules/shimmer/.travis.yml create mode 100644 node_modules/shimmer/LICENSE create mode 100644 node_modules/shimmer/README.md create mode 100644 node_modules/shimmer/index.js create mode 100644 node_modules/shimmer/package.json create mode 100644 node_modules/shimmer/test/init.tap.js create mode 100644 node_modules/shimmer/test/massUnwrap.tap.js create mode 100644 node_modules/shimmer/test/massWrap.tap.js create mode 100644 node_modules/shimmer/test/unwrap.tap.js create mode 100644 node_modules/shimmer/test/wrap.tap.js create mode 100644 node_modules/sigmund/LICENSE create mode 100644 node_modules/sigmund/README.md create mode 100644 node_modules/sigmund/bench.js create mode 100644 node_modules/sigmund/package.json create mode 100644 node_modules/sigmund/sigmund.js create mode 100644 node_modules/sigmund/test/basic.js rename node_modules/{inquirer/node_modules => }/strip-ansi/index.d.ts (100%) rename node_modules/{inquirer => strip-ansi}/node_modules/ansi-regex/index.js (100%) rename node_modules/{inquirer/node_modules/strip-ansi => strip-ansi/node_modules/ansi-regex}/license (100%) rename node_modules/{inquirer => strip-ansi}/node_modules/ansi-regex/package.json (100%) rename node_modules/{inquirer => strip-ansi}/node_modules/ansi-regex/readme.md (100%) delete mode 100644 node_modules/table/node_modules/ansi-regex/index.js delete mode 100644 node_modules/table/node_modules/ansi-regex/package.json delete mode 100644 node_modules/table/node_modules/ansi-regex/readme.md delete mode 100644 node_modules/table/node_modules/strip-ansi/index.d.ts delete mode 100644 node_modules/table/node_modules/strip-ansi/index.js delete mode 100644 node_modules/table/node_modules/strip-ansi/readme.md create mode 100644 node_modules/timers-ext/.editorconfig create mode 100644 node_modules/timers-ext/CHANGELOG.md create mode 100644 node_modules/timers-ext/CHANGES create mode 100644 node_modules/timers-ext/LICENSE create mode 100644 node_modules/timers-ext/README.md create mode 100644 node_modules/timers-ext/delay.js create mode 100644 node_modules/timers-ext/max-timeout.js create mode 100644 node_modules/timers-ext/once.js create mode 100644 node_modules/timers-ext/package.json create mode 100644 node_modules/timers-ext/promise/.eslintrc.json create mode 100644 node_modules/timers-ext/promise/sleep.js create mode 100644 node_modules/timers-ext/promise_/timeout.js create mode 100644 node_modules/timers-ext/test/.eslintrc.json create mode 100644 node_modules/timers-ext/test/delay.js create mode 100644 node_modules/timers-ext/test/max-timeout.js create mode 100644 node_modules/timers-ext/test/once.js create mode 100644 node_modules/timers-ext/test/promise/sleep.js create mode 100644 node_modules/timers-ext/test/promise_/.eslintrc.json create mode 100644 node_modules/timers-ext/test/promise_/timeout.js create mode 100644 node_modules/timers-ext/test/throttle.js create mode 100644 node_modules/timers-ext/test/valid-timeout.js create mode 100644 node_modules/timers-ext/throttle.js create mode 100644 node_modules/timers-ext/valid-timeout.js create mode 100644 node_modules/toposort-class/.eslintrc create mode 100644 node_modules/toposort-class/.gitattributes create mode 100644 node_modules/toposort-class/.npmignore create mode 100644 node_modules/toposort-class/LICENSE create mode 100644 node_modules/toposort-class/README.md create mode 100644 node_modules/toposort-class/benchmark/0.3.1/toposort.js create mode 100644 node_modules/toposort-class/benchmark/README.md create mode 100644 node_modules/toposort-class/benchmark/general.js create mode 100644 node_modules/toposort-class/benchmark/results.csv create mode 100644 node_modules/toposort-class/build/toposort.js create mode 100644 node_modules/toposort-class/build/toposort.min.js create mode 100644 node_modules/toposort-class/index.js create mode 100644 node_modules/toposort-class/package.json create mode 100644 node_modules/touch/node_modules/nopt/.gitignore create mode 100644 node_modules/touch/node_modules/nopt/LICENSE rename node_modules/{node-pre-gyp => touch}/node_modules/nopt/README.md (76%) rename node_modules/{node-pre-gyp => touch}/node_modules/nopt/bin/nopt.js (77%) rename node_modules/{node-pre-gyp => touch}/node_modules/nopt/examples/my-program.js (100%) rename node_modules/{node-pre-gyp => touch}/node_modules/nopt/lib/nopt.js (54%) create mode 100644 node_modules/touch/node_modules/nopt/package.json create mode 100644 node_modules/type/.editorconfig create mode 100644 node_modules/type/.prettierrc.js create mode 100644 node_modules/type/CHANGELOG.md create mode 100644 node_modules/type/README.md create mode 100644 node_modules/type/array-length/coerce.js create mode 100644 node_modules/type/array-length/ensure.js create mode 100644 node_modules/type/array-like/ensure.js create mode 100644 node_modules/type/array-like/is.js create mode 100644 node_modules/type/array/ensure.js create mode 100644 node_modules/type/array/is.js create mode 100644 node_modules/type/date/ensure.js create mode 100644 node_modules/type/date/is.js create mode 100644 node_modules/type/error/ensure.js create mode 100644 node_modules/type/error/is.js create mode 100644 node_modules/type/finite/coerce.js create mode 100644 node_modules/type/finite/ensure.js create mode 100644 node_modules/type/function/ensure.js create mode 100644 node_modules/type/function/is.js create mode 100644 node_modules/type/integer/coerce.js create mode 100644 node_modules/type/integer/ensure.js create mode 100644 node_modules/type/iterable/ensure.js create mode 100644 node_modules/type/iterable/is.js create mode 100644 node_modules/type/lib/is-to-string-tag-supported.js create mode 100644 node_modules/type/lib/resolve-exception.js create mode 100644 node_modules/type/lib/safe-to-string.js create mode 100644 node_modules/type/lib/to-short-string.js create mode 100644 node_modules/type/natural-number/coerce.js create mode 100644 node_modules/type/natural-number/ensure.js create mode 100644 node_modules/type/number/coerce.js create mode 100644 node_modules/type/number/ensure.js create mode 100644 node_modules/type/object/ensure.js create mode 100644 node_modules/type/object/is.js create mode 100644 node_modules/type/package.json create mode 100644 node_modules/type/plain-function/ensure.js create mode 100644 node_modules/type/plain-function/is.js create mode 100644 node_modules/type/plain-object/ensure.js create mode 100644 node_modules/type/plain-object/is.js create mode 100644 node_modules/type/promise/ensure.js create mode 100644 node_modules/type/promise/is.js create mode 100644 node_modules/type/prototype/is.js create mode 100644 node_modules/type/reg-exp/ensure.js create mode 100644 node_modules/type/reg-exp/is.js create mode 100644 node_modules/type/safe-integer/coerce.js create mode 100644 node_modules/type/safe-integer/ensure.js create mode 100644 node_modules/type/string/coerce.js create mode 100644 node_modules/type/string/ensure.js create mode 100644 node_modules/type/test/_lib/arrow-function-if-supported.js create mode 100644 node_modules/type/test/_lib/class-if-supported.js create mode 100644 node_modules/type/test/array-length/coerce.js create mode 100644 node_modules/type/test/array-length/ensure.js create mode 100644 node_modules/type/test/array-like/ensure.js create mode 100644 node_modules/type/test/array-like/is.js create mode 100644 node_modules/type/test/array/ensure.js create mode 100644 node_modules/type/test/array/is.js create mode 100644 node_modules/type/test/date/ensure.js create mode 100644 node_modules/type/test/date/is.js create mode 100644 node_modules/type/test/error/ensure.js create mode 100644 node_modules/type/test/error/is.js create mode 100644 node_modules/type/test/finite/coerce.js create mode 100644 node_modules/type/test/finite/ensure.js create mode 100644 node_modules/type/test/function/ensure.js create mode 100644 node_modules/type/test/function/is.js create mode 100644 node_modules/type/test/integer/coerce.js create mode 100644 node_modules/type/test/integer/ensure.js create mode 100644 node_modules/type/test/iterable/ensure.js create mode 100644 node_modules/type/test/iterable/is.js create mode 100644 node_modules/type/test/lib/is-to-string-tag-supported.js create mode 100644 node_modules/type/test/lib/resolve-exception.js create mode 100644 node_modules/type/test/lib/safe-to-string.js create mode 100644 node_modules/type/test/lib/to-short-string.js create mode 100644 node_modules/type/test/natural-number/coerce.js create mode 100644 node_modules/type/test/natural-number/ensure.js create mode 100644 node_modules/type/test/number/coerce.js create mode 100644 node_modules/type/test/number/ensure.js create mode 100644 node_modules/type/test/object/ensure.js create mode 100644 node_modules/type/test/object/is.js create mode 100644 node_modules/type/test/plain-function/ensure.js create mode 100644 node_modules/type/test/plain-function/is.js create mode 100644 node_modules/type/test/plain-object/ensure.js create mode 100644 node_modules/type/test/plain-object/is.js create mode 100644 node_modules/type/test/promise/ensure.js create mode 100644 node_modules/type/test/promise/is.js create mode 100644 node_modules/type/test/prototype/is.js create mode 100644 node_modules/type/test/reg-exp/ensure.js create mode 100644 node_modules/type/test/reg-exp/is.js create mode 100644 node_modules/type/test/safe-integer/coerce.js create mode 100644 node_modules/type/test/safe-integer/ensure.js create mode 100644 node_modules/type/test/string/coerce.js create mode 100644 node_modules/type/test/string/ensure.js create mode 100644 node_modules/type/test/thenable/ensure.js create mode 100644 node_modules/type/test/thenable/is.js create mode 100644 node_modules/type/test/time-value/coerce.js create mode 100644 node_modules/type/test/time-value/ensure.js create mode 100644 node_modules/type/test/value/ensure.js create mode 100644 node_modules/type/test/value/is.js create mode 100644 node_modules/type/thenable/ensure.js create mode 100644 node_modules/type/thenable/is.js create mode 100644 node_modules/type/time-value/coerce.js create mode 100644 node_modules/type/time-value/ensure.js create mode 100644 node_modules/type/value/ensure.js create mode 100644 node_modules/type/value/is.js create mode 100644 node_modules/umzug/.babelrc create mode 100644 node_modules/umzug/.eslintrc.json create mode 100644 node_modules/umzug/.travis.yml create mode 100644 node_modules/umzug/CHANGELOG.md create mode 100644 node_modules/umzug/Dockerfile create mode 100644 node_modules/umzug/LICENSE create mode 100644 node_modules/umzug/README.md create mode 100644 node_modules/umzug/docker-compose.yml create mode 100644 node_modules/umzug/lib/helper.js create mode 100644 node_modules/umzug/lib/index.js create mode 100644 node_modules/umzug/lib/migration.js create mode 100644 node_modules/umzug/lib/storages/JSONStorage.js create mode 100644 node_modules/umzug/lib/storages/MongoDBStorage.js create mode 100644 node_modules/umzug/lib/storages/SequelizeStorage.js create mode 100644 node_modules/umzug/lib/storages/Storage.js create mode 100644 node_modules/umzug/lib/storages/json.js create mode 100644 node_modules/umzug/lib/storages/none.js create mode 100644 node_modules/umzug/lib/storages/sequelize.js create mode 100644 node_modules/umzug/package.json create mode 100644 node_modules/universalify/LICENSE create mode 100644 node_modules/universalify/README.md create mode 100644 node_modules/universalify/index.js create mode 100644 node_modules/universalify/package.json create mode 100644 node_modules/uuid/.eslintrc.json create mode 100644 node_modules/uuid/AUTHORS create mode 100644 node_modules/uuid/CHANGELOG.md create mode 100644 node_modules/uuid/LICENSE.md create mode 100644 node_modules/uuid/README.md create mode 100644 node_modules/uuid/README_js.md create mode 100755 node_modules/uuid/bin/uuid create mode 100644 node_modules/uuid/index.js create mode 100644 node_modules/uuid/lib/bytesToUuid.js create mode 100644 node_modules/uuid/lib/md5-browser.js create mode 100644 node_modules/uuid/lib/md5.js create mode 100644 node_modules/uuid/lib/rng-browser.js create mode 100644 node_modules/uuid/lib/rng.js create mode 100644 node_modules/uuid/lib/sha1-browser.js create mode 100644 node_modules/uuid/lib/sha1.js create mode 100644 node_modules/uuid/lib/v35.js create mode 100644 node_modules/uuid/package.json create mode 100644 node_modules/uuid/v1.js create mode 100644 node_modules/uuid/v3.js create mode 100644 node_modules/uuid/v4.js create mode 100644 node_modules/uuid/v5.js create mode 100644 node_modules/validator/CHANGELOG.md create mode 100644 node_modules/validator/LICENSE create mode 100644 node_modules/validator/README.md create mode 100644 node_modules/validator/index.js create mode 100644 node_modules/validator/lib/alpha.js create mode 100644 node_modules/validator/lib/blacklist.js create mode 100644 node_modules/validator/lib/contains.js create mode 100644 node_modules/validator/lib/equals.js create mode 100644 node_modules/validator/lib/escape.js create mode 100644 node_modules/validator/lib/isAfter.js create mode 100644 node_modules/validator/lib/isAlpha.js create mode 100644 node_modules/validator/lib/isAlphanumeric.js create mode 100644 node_modules/validator/lib/isAscii.js create mode 100644 node_modules/validator/lib/isBase64.js create mode 100644 node_modules/validator/lib/isBefore.js create mode 100644 node_modules/validator/lib/isBoolean.js create mode 100644 node_modules/validator/lib/isByteLength.js create mode 100644 node_modules/validator/lib/isCreditCard.js create mode 100644 node_modules/validator/lib/isCurrency.js create mode 100644 node_modules/validator/lib/isDataURI.js create mode 100644 node_modules/validator/lib/isDecimal.js create mode 100644 node_modules/validator/lib/isDivisibleBy.js create mode 100644 node_modules/validator/lib/isEmail.js create mode 100644 node_modules/validator/lib/isEmpty.js create mode 100644 node_modules/validator/lib/isFQDN.js create mode 100644 node_modules/validator/lib/isFloat.js create mode 100644 node_modules/validator/lib/isFullWidth.js create mode 100644 node_modules/validator/lib/isHalfWidth.js create mode 100644 node_modules/validator/lib/isHash.js create mode 100644 node_modules/validator/lib/isHexColor.js create mode 100644 node_modules/validator/lib/isHexadecimal.js create mode 100644 node_modules/validator/lib/isIP.js create mode 100644 node_modules/validator/lib/isIPRange.js create mode 100644 node_modules/validator/lib/isISBN.js create mode 100644 node_modules/validator/lib/isISIN.js create mode 100644 node_modules/validator/lib/isISO31661Alpha2.js create mode 100644 node_modules/validator/lib/isISO31661Alpha3.js create mode 100644 node_modules/validator/lib/isISO8601.js create mode 100644 node_modules/validator/lib/isISRC.js create mode 100644 node_modules/validator/lib/isISSN.js create mode 100644 node_modules/validator/lib/isIdentityCard.js create mode 100644 node_modules/validator/lib/isIn.js create mode 100644 node_modules/validator/lib/isInt.js create mode 100644 node_modules/validator/lib/isJSON.js create mode 100644 node_modules/validator/lib/isJWT.js create mode 100644 node_modules/validator/lib/isLatLong.js create mode 100644 node_modules/validator/lib/isLength.js create mode 100644 node_modules/validator/lib/isLowercase.js create mode 100644 node_modules/validator/lib/isMACAddress.js create mode 100644 node_modules/validator/lib/isMD5.js create mode 100644 node_modules/validator/lib/isMagnetURI.js create mode 100644 node_modules/validator/lib/isMimeType.js create mode 100644 node_modules/validator/lib/isMobilePhone.js create mode 100644 node_modules/validator/lib/isMongoId.js create mode 100644 node_modules/validator/lib/isMultibyte.js create mode 100644 node_modules/validator/lib/isNumeric.js create mode 100644 node_modules/validator/lib/isPort.js create mode 100644 node_modules/validator/lib/isPostalCode.js create mode 100644 node_modules/validator/lib/isRFC3339.js create mode 100644 node_modules/validator/lib/isSurrogatePair.js create mode 100644 node_modules/validator/lib/isURL.js create mode 100644 node_modules/validator/lib/isUUID.js create mode 100644 node_modules/validator/lib/isUppercase.js create mode 100644 node_modules/validator/lib/isVariableWidth.js create mode 100644 node_modules/validator/lib/isWhitelisted.js create mode 100644 node_modules/validator/lib/ltrim.js create mode 100644 node_modules/validator/lib/matches.js create mode 100644 node_modules/validator/lib/normalizeEmail.js create mode 100644 node_modules/validator/lib/rtrim.js create mode 100644 node_modules/validator/lib/stripLow.js create mode 100644 node_modules/validator/lib/toBoolean.js create mode 100644 node_modules/validator/lib/toDate.js create mode 100644 node_modules/validator/lib/toFloat.js create mode 100644 node_modules/validator/lib/toInt.js create mode 100644 node_modules/validator/lib/trim.js create mode 100644 node_modules/validator/lib/unescape.js create mode 100644 node_modules/validator/lib/util/assertString.js create mode 100644 node_modules/validator/lib/util/includes.js create mode 100644 node_modules/validator/lib/util/merge.js create mode 100644 node_modules/validator/lib/util/toString.js create mode 100644 node_modules/validator/lib/whitelist.js create mode 100644 node_modules/validator/package.json create mode 100644 node_modules/validator/validator.js create mode 100644 node_modules/validator/validator.min.js create mode 100644 node_modules/which-module/CHANGELOG.md create mode 100644 node_modules/which-module/LICENSE create mode 100644 node_modules/which-module/README.md create mode 100644 node_modules/which-module/index.js create mode 100644 node_modules/which-module/package.json create mode 100644 node_modules/wkx/LICENSE.txt create mode 100644 node_modules/wkx/README.md create mode 100644 node_modules/wkx/dist/wkx.js create mode 100644 node_modules/wkx/dist/wkx.min.js create mode 100644 node_modules/wkx/lib/binaryreader.js create mode 100644 node_modules/wkx/lib/binarywriter.js create mode 100644 node_modules/wkx/lib/geometry.js create mode 100644 node_modules/wkx/lib/geometrycollection.js create mode 100644 node_modules/wkx/lib/linestring.js create mode 100644 node_modules/wkx/lib/multilinestring.js create mode 100644 node_modules/wkx/lib/multipoint.js create mode 100644 node_modules/wkx/lib/multipolygon.js create mode 100644 node_modules/wkx/lib/point.js create mode 100644 node_modules/wkx/lib/polygon.js create mode 100644 node_modules/wkx/lib/types.js create mode 100644 node_modules/wkx/lib/wktparser.js create mode 100644 node_modules/wkx/lib/wkx.d.ts create mode 100644 node_modules/wkx/lib/wkx.js create mode 100644 node_modules/wkx/lib/zigzag.js create mode 100644 node_modules/wkx/package.json create mode 100755 node_modules/wrap-ansi/index.js rename node_modules/{table/node_modules/ansi-regex => wrap-ansi}/license (100%) create mode 100644 node_modules/wrap-ansi/node_modules/string-width/index.js rename node_modules/{table/node_modules/strip-ansi => wrap-ansi/node_modules/string-width}/license (100%) create mode 100644 node_modules/wrap-ansi/node_modules/string-width/package.json create mode 100644 node_modules/wrap-ansi/node_modules/string-width/readme.md rename node_modules/{table/node_modules/strip-ansi => wrap-ansi}/package.json (53%) create mode 100644 node_modules/wrap-ansi/readme.md create mode 100644 node_modules/y18n/CHANGELOG.md create mode 100644 node_modules/y18n/LICENSE create mode 100644 node_modules/y18n/README.md create mode 100644 node_modules/y18n/index.js create mode 100644 node_modules/y18n/package.json create mode 100644 node_modules/yargs-parser/CHANGELOG.md create mode 100644 node_modules/yargs-parser/LICENSE.txt create mode 100644 node_modules/yargs-parser/README.md create mode 100644 node_modules/yargs-parser/index.js create mode 100644 node_modules/yargs-parser/lib/tokenize-arg-string.js create mode 100644 node_modules/yargs-parser/node_modules/camelcase/index.d.ts create mode 100644 node_modules/yargs-parser/node_modules/camelcase/index.js create mode 100644 node_modules/yargs-parser/node_modules/camelcase/license create mode 100644 node_modules/yargs-parser/node_modules/camelcase/package.json create mode 100644 node_modules/yargs-parser/node_modules/camelcase/readme.md create mode 100644 node_modules/yargs-parser/package.json create mode 100644 node_modules/yargs/CHANGELOG.md create mode 100644 node_modules/yargs/LICENSE create mode 100644 node_modules/yargs/README.md create mode 100644 node_modules/yargs/index.js create mode 100644 node_modules/yargs/lib/apply-extends.js create mode 100644 node_modules/yargs/lib/argsert.js create mode 100644 node_modules/yargs/lib/command.js create mode 100644 node_modules/yargs/lib/completion-templates.js create mode 100644 node_modules/yargs/lib/completion.js create mode 100644 node_modules/yargs/lib/decamelize.js create mode 100644 node_modules/yargs/lib/is-promise.js create mode 100644 node_modules/yargs/lib/levenshtein.js create mode 100644 node_modules/yargs/lib/middleware.js create mode 100644 node_modules/yargs/lib/obj-filter.js create mode 100644 node_modules/yargs/lib/usage.js create mode 100644 node_modules/yargs/lib/validation.js create mode 100644 node_modules/yargs/lib/yerror.js create mode 100644 node_modules/yargs/locales/be.json create mode 100644 node_modules/yargs/locales/de.json create mode 100644 node_modules/yargs/locales/en.json create mode 100644 node_modules/yargs/locales/es.json create mode 100644 node_modules/yargs/locales/fr.json create mode 100644 node_modules/yargs/locales/hi.json create mode 100644 node_modules/yargs/locales/hu.json create mode 100644 node_modules/yargs/locales/id.json create mode 100644 node_modules/yargs/locales/it.json create mode 100644 node_modules/yargs/locales/ja.json create mode 100644 node_modules/yargs/locales/ko.json create mode 100644 node_modules/yargs/locales/nb.json create mode 100644 node_modules/yargs/locales/nl.json create mode 100644 node_modules/yargs/locales/nn.json create mode 100644 node_modules/yargs/locales/pirate.json create mode 100644 node_modules/yargs/locales/pl.json create mode 100644 node_modules/yargs/locales/pt.json create mode 100644 node_modules/yargs/locales/pt_BR.json create mode 100644 node_modules/yargs/locales/ru.json create mode 100644 node_modules/yargs/locales/th.json create mode 100644 node_modules/yargs/locales/tr.json create mode 100644 node_modules/yargs/locales/zh_CN.json create mode 100644 node_modules/yargs/locales/zh_TW.json create mode 100644 node_modules/yargs/node_modules/find-up/index.js create mode 100644 node_modules/yargs/node_modules/find-up/license create mode 100644 node_modules/yargs/node_modules/find-up/package.json create mode 100644 node_modules/yargs/node_modules/find-up/readme.md create mode 100644 node_modules/yargs/node_modules/locate-path/index.js create mode 100644 node_modules/yargs/node_modules/locate-path/license create mode 100644 node_modules/yargs/node_modules/locate-path/package.json create mode 100644 node_modules/yargs/node_modules/locate-path/readme.md create mode 100644 node_modules/yargs/node_modules/p-limit/index.d.ts create mode 100644 node_modules/yargs/node_modules/p-limit/index.js create mode 100644 node_modules/yargs/node_modules/p-limit/license create mode 100644 node_modules/yargs/node_modules/p-limit/package.json create mode 100644 node_modules/yargs/node_modules/p-limit/readme.md create mode 100644 node_modules/yargs/node_modules/p-locate/index.js create mode 100644 node_modules/yargs/node_modules/p-locate/license create mode 100644 node_modules/yargs/node_modules/p-locate/package.json create mode 100644 node_modules/yargs/node_modules/p-locate/readme.md create mode 100644 node_modules/yargs/node_modules/p-try/index.d.ts create mode 100644 node_modules/yargs/node_modules/p-try/index.js create mode 100644 node_modules/yargs/node_modules/p-try/license create mode 100644 node_modules/yargs/node_modules/p-try/package.json create mode 100644 node_modules/yargs/node_modules/p-try/readme.md create mode 100644 node_modules/yargs/node_modules/string-width/index.js create mode 100644 node_modules/yargs/node_modules/string-width/license create mode 100644 node_modules/yargs/node_modules/string-width/package.json create mode 100644 node_modules/yargs/node_modules/string-width/readme.md create mode 100644 node_modules/yargs/package.json create mode 100644 node_modules/yargs/yargs.js create mode 100644 src/config/database.js diff --git a/.editorconfig b/.editorconfig index 3274ec36..1923d410 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,4 +5,4 @@ indent_style = space indent_size = 2 charset = utf-8 trim_trailing_whitespace = true -insert_final_newline = true \ No newline at end of file +insert_final_newline = true diff --git a/.sequelizerc b/.sequelizerc new file mode 100644 index 00000000..7143eb76 --- /dev/null +++ b/.sequelizerc @@ -0,0 +1,8 @@ +const { resolve } = require('path'); + +module.exports = { + config: resolve(__dirname, 'src', 'config', 'database.js'), + 'models-path': resolve(__dirname, 'src', 'app', 'models'), + 'migrations-path': resolve(__dirname, 'src', 'database', 'migrations'), + 'seeders-path': resolve(__dirname, 'src', 'database', 'seeds'), +}; diff --git a/node_modules/.bin/css-beautify b/node_modules/.bin/css-beautify new file mode 120000 index 00000000..d9b8ee28 --- /dev/null +++ b/node_modules/.bin/css-beautify @@ -0,0 +1 @@ +../js-beautify/js/bin/css-beautify.js \ No newline at end of file diff --git a/node_modules/.bin/editorconfig b/node_modules/.bin/editorconfig new file mode 120000 index 00000000..a151e0b8 --- /dev/null +++ b/node_modules/.bin/editorconfig @@ -0,0 +1 @@ +../editorconfig/bin/editorconfig \ No newline at end of file diff --git a/node_modules/.bin/html-beautify b/node_modules/.bin/html-beautify new file mode 120000 index 00000000..c17c69c3 --- /dev/null +++ b/node_modules/.bin/html-beautify @@ -0,0 +1 @@ +../js-beautify/js/bin/html-beautify.js \ No newline at end of file diff --git a/node_modules/.bin/js-beautify b/node_modules/.bin/js-beautify new file mode 120000 index 00000000..548ddf4b --- /dev/null +++ b/node_modules/.bin/js-beautify @@ -0,0 +1 @@ +../js-beautify/js/bin/js-beautify.js \ No newline at end of file diff --git a/node_modules/.bin/nopt b/node_modules/.bin/nopt index 94208576..6b6566ea 120000 --- a/node_modules/.bin/nopt +++ b/node_modules/.bin/nopt @@ -1 +1 @@ -../node-pre-gyp/node_modules/nopt/bin/nopt.js \ No newline at end of file +../nopt/bin/nopt.js \ No newline at end of file diff --git a/node_modules/.bin/sequelize b/node_modules/.bin/sequelize new file mode 120000 index 00000000..00a40c31 --- /dev/null +++ b/node_modules/.bin/sequelize @@ -0,0 +1 @@ +../sequelize-cli/lib/sequelize \ No newline at end of file diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid new file mode 120000 index 00000000..b3e45bc5 --- /dev/null +++ b/node_modules/.bin/uuid @@ -0,0 +1 @@ +../uuid/bin/uuid \ No newline at end of file diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity index 2a606812..75c307af 100644 --- a/node_modules/.yarn-integrity +++ b/node_modules/.yarn-integrity @@ -14,11 +14,14 @@ "express@^4.17.1", "nodemon@^1.19.1", "prettier@^1.18.2", + "sequelize-cli@^5.5.0", + "sequelize@^5.10.1", "sucrase@^3.10.1" ], "lockfileEntries": { "@babel/code-frame@^7.0.0": "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d", "@babel/highlight@^7.0.0": "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540", + "@types/node@*": "https://registry.yarnpkg.com/@types/node/-/node-12.6.8.tgz#e469b4bf9d1c9832aee4907ba8a051494357c12c", "abbrev@1": "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8", "accepts@~1.3.7": "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd", "acorn-jsx@^5.0.0": "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e", @@ -28,11 +31,13 @@ "ansi-align@^2.0.0": "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f", "ansi-escapes@^3.2.0": "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b", "ansi-regex@^2.0.0": "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df", + "ansi-regex@^2.1.1": "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df", "ansi-regex@^3.0.0": "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998", "ansi-regex@^4.1.0": "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997", "ansi-styles@^3.2.0": "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d", "ansi-styles@^3.2.1": "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d", "any-promise@^1.0.0": "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f", + "any-promise@^1.3.0": "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f", "anymatch@^2.0.0": "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb", "aproba@^1.0.3": "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a", "are-we-there-yet@~1.1.2": "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21", @@ -47,9 +52,12 @@ "astral-regex@^1.0.0": "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9", "async-each@^1.0.1": "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf", "atob@^2.1.1": "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9", + "babel-runtime@^6.23.0": "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe", "balanced-match@^1.0.0": "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767", "base@^0.11.1": "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f", "binary-extensions@^1.0.0": "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65", + "bluebird@^3.5.0": "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f", + "bluebird@^3.5.3": "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f", "body-parser@1.19.0": "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a", "boxen@^1.2.1": "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b", "brace-expansion@^1.1.7": "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd", @@ -59,6 +67,7 @@ "cache-base@^1.0.1": "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2", "callsites@^3.0.0": "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73", "camelcase@^4.0.0": "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd", + "camelcase@^5.0.0": "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320", "capture-stack-trace@^1.0.0": "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d", "chalk@^2.0.0": "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424", "chalk@^2.0.1": "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424", @@ -70,8 +79,11 @@ "ci-info@^1.5.0": "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497", "class-utils@^0.3.5": "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463", "cli-boxes@^1.0.0": "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143", + "cli-color@^1.4.0": "https://registry.yarnpkg.com/cli-color/-/cli-color-1.4.0.tgz#7d10738f48526824f8fe7da51857cb0f572fe01f", "cli-cursor@^2.1.0": "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5", "cli-width@^2.0.0": "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639", + "cliui@^5.0.0": "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5", + "cls-bluebird@^2.1.0": "https://registry.yarnpkg.com/cls-bluebird/-/cls-bluebird-2.1.0.tgz#37ef1e080a8ffb55c2f4164f536f1919e7968aee", "code-point-at@^1.0.0": "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77", "collection-visit@^1.0.0": "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0", "color-convert@^1.9.0": "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8", @@ -79,6 +91,7 @@ "commander@^2.19.0": "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422", "component-emitter@^1.2.1": "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0", "concat-map@0.0.1": "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "config-chain@^1.1.12": "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa", "configstore@^3.0.0": "https://registry.yarnpkg.com/configstore/-/configstore-3.1.2.tgz#c6f25defaeef26df12dd33414b001fe81a543f8f", "confusing-browser-globals@^1.0.5": "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.7.tgz#5ae852bd541a910e7ffb2dbb864a2d21a36ad29b", "console-control-strings@^1.0.0": "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e", @@ -89,11 +102,13 @@ "cookie-signature@1.0.6": "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c", "cookie@0.4.0": "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba", "copy-descriptor@^0.1.0": "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d", + "core-js@^2.4.0": "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2", "core-util-is@~1.0.0": "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7", "create-error-class@^3.0.0": "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6", "cross-spawn@^5.0.1": "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449", "cross-spawn@^6.0.5": "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4", "crypto-random-string@^1.0.0": "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e", + "d@1": "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a", "debug@2.6.9": "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f", "debug@^2.2.0": "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f", "debug@^2.3.3": "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f", @@ -102,6 +117,8 @@ "debug@^3.1.0": "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b", "debug@^3.2.6": "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b", "debug@^4.0.1": "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791", + "debug@^4.1.1": "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791", + "decamelize@^1.2.0": "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290", "decode-uri-component@^0.2.0": "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545", "deep-extend@^0.6.0": "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac", "deep-is@~0.1.3": "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34", @@ -117,7 +134,9 @@ "doctrine@1.5.0": "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa", "doctrine@^3.0.0": "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961", "dot-prop@^4.1.0": "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57", + "dottie@^2.0.0": "https://registry.yarnpkg.com/dottie/-/dottie-2.0.1.tgz#697ad9d72004db7574d21f892466a3c285893659", "duplexer3@^0.1.4": "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2", + "editorconfig@^0.15.3": "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.3.tgz#bef84c4e75fb8dcb0ce5cee8efd51c15999befc5", "ee-first@1.1.1": "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d", "emoji-regex@^7.0.1": "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156", "encodeurl@~1.0.2": "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59", @@ -125,6 +144,18 @@ "es-abstract@^1.12.0": "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9", "es-abstract@^1.7.0": "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9", "es-to-primitive@^1.2.0": "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377", + "es5-ext@^0.10.35": "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.50.tgz#6d0e23a0abdb27018e5ac4fd09b412bc5517a778", + "es5-ext@^0.10.45": "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.50.tgz#6d0e23a0abdb27018e5ac4fd09b412bc5517a778", + "es5-ext@^0.10.46": "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.50.tgz#6d0e23a0abdb27018e5ac4fd09b412bc5517a778", + "es5-ext@^0.10.50": "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.50.tgz#6d0e23a0abdb27018e5ac4fd09b412bc5517a778", + "es5-ext@~0.10.14": "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.50.tgz#6d0e23a0abdb27018e5ac4fd09b412bc5517a778", + "es5-ext@~0.10.2": "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.50.tgz#6d0e23a0abdb27018e5ac4fd09b412bc5517a778", + "es5-ext@~0.10.46": "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.50.tgz#6d0e23a0abdb27018e5ac4fd09b412bc5517a778", + "es6-iterator@^2.0.3": "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7", + "es6-iterator@~2.0.3": "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7", + "es6-symbol@^3.1.1": "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77", + "es6-symbol@~3.1.1": "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77", + "es6-weak-map@^2.0.2": "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53", "escape-html@~1.0.3": "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988", "escape-string-regexp@^1.0.5": "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4", "eslint-config-airbnb-base@^13.2.0": "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.2.0.tgz#f6ea81459ff4dec2dda200c35f1d8f7419d57943", @@ -146,6 +177,7 @@ "estraverse@^4.1.1": "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13", "esutils@^2.0.2": "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b", "etag@~1.8.1": "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887", + "event-emitter@^0.3.5": "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39", "execa@^0.7.0": "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777", "expand-brackets@^2.1.4": "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622", "express@^4.17.1": "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134", @@ -164,18 +196,21 @@ "finalhandler@~1.1.2": "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d", "find-up@^2.0.0": "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7", "find-up@^2.1.0": "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7", + "find-up@^3.0.0": "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73", "flat-cache@^2.0.1": "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0", "flatted@^2.0.0": "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08", "for-in@^1.0.2": "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80", "forwarded@~0.1.2": "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84", "fragment-cache@^0.2.1": "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19", "fresh@0.5.2": "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7", + "fs-extra@^7.0.1": "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9", "fs-minipass@^1.2.5": "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.6.tgz#2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07", "fs.realpath@^1.0.0": "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f", "fsevents@^1.2.7": "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f", "function-bind@^1.1.1": "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d", "functional-red-black-tree@^1.0.1": "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327", "gauge@~2.7.3": "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7", + "get-caller-file@^2.0.1": "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e", "get-stdin@^6.0.0": "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b", "get-stream@^3.0.0": "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14", "get-value@^2.0.3": "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28", @@ -188,6 +223,7 @@ "got@^6.7.1": "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0", "graceful-fs@^4.1.11": "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b", "graceful-fs@^4.1.2": "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b", + "graceful-fs@^4.1.6": "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b", "has-flag@^3.0.0": "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd", "has-symbols@^1.0.0": "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44", "has-unicode@^2.0.0": "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9", @@ -209,6 +245,7 @@ "import-fresh@^3.0.0": "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.1.0.tgz#6d33fa1dcef6df930fae003446f33415af905118", "import-lazy@^2.1.0": "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43", "imurmurhash@^0.1.4": "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea", + "inflection@1.12.0": "https://registry.yarnpkg.com/inflection/-/inflection-1.12.0.tgz#a200935656d6f5f6bc4dc7502e1aecb703228416", "inflight@^1.0.4": "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9", "inherits@2": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c", "inherits@2.0.3": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de", @@ -223,6 +260,7 @@ "is-accessor-descriptor@^1.0.0": "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656", "is-arrayish@^0.2.1": "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d", "is-binary-path@^1.0.0": "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898", + "is-bluebird@^1.0.2": "https://registry.yarnpkg.com/is-bluebird/-/is-bluebird-1.0.2.tgz#096439060f4aa411abee19143a84d6a55346d6e2", "is-buffer@^1.1.5": "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be", "is-callable@^1.1.4": "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75", "is-ci@^1.0.10": "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c", @@ -248,6 +286,7 @@ "is-path-inside@^1.0.0": "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036", "is-plain-object@^2.0.3": "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677", "is-plain-object@^2.0.4": "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677", + "is-promise@^2.1": "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa", "is-promise@^2.1.0": "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa", "is-redirect@^1.0.0": "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24", "is-regex@^1.0.4": "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491", @@ -263,10 +302,12 @@ "isobject@^2.0.0": "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89", "isobject@^3.0.0": "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df", "isobject@^3.0.1": "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df", + "js-beautify@^1.8.8": "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.10.1.tgz#bdfe738ddbcaa12e4fced5af2d7cfad59f60ac0a", "js-tokens@^4.0.0": "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499", "js-yaml@^3.13.0": "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847", "json-schema-traverse@^0.4.1": "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660", "json-stable-stringify-without-jsonify@^1.0.1": "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651", + "jsonfile@^4.0.0": "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb", "kind-of@^3.0.2": "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64", "kind-of@^3.0.3": "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64", "kind-of@^3.2.0": "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64", @@ -280,15 +321,20 @@ "lines-and-columns@^1.1.6": "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00", "load-json-file@^2.0.0": "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8", "locate-path@^2.0.0": "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e", + "locate-path@^3.0.0": "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e", "lodash@^4.17.11": "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548", "lodash@^4.17.12": "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548", "lodash@^4.17.14": "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548", + "lodash@^4.17.5": "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548", "lowercase-keys@^1.0.0": "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f", "lru-cache@^4.0.1": "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd", + "lru-cache@^4.1.5": "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd", + "lru-queue@0.1": "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3", "make-dir@^1.0.0": "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c", "map-cache@^0.2.2": "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf", "map-visit@^1.0.0": "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f", "media-typer@0.3.0": "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748", + "memoizee@^0.4.14": "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.14.tgz#07a00f204699f9a95c2d9e77218271c7cd610d57", "merge-descriptors@1.0.1": "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61", "methods@~1.1.2": "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee", "micromatch@^3.1.10": "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23", @@ -306,6 +352,10 @@ "mixin-deep@^1.2.0": "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566", "mkdirp@^0.5.0": "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903", "mkdirp@^0.5.1": "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903", + "mkdirp@~0.5.1": "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903", + "moment-timezone@^0.5.21": "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.26.tgz#c0267ca09ae84631aa3dc33f65bedbe6e8e0d772", + "moment@>= 2.9.0": "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b", + "moment@^2.24.0": "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b", "ms@2.0.0": "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8", "ms@2.1.1": "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a", "ms@^2.1.1": "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009", @@ -316,12 +366,15 @@ "natural-compare@^1.4.0": "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7", "needle@^2.2.1": "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c", "negotiator@0.6.2": "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb", + "next-tick@1": "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c", + "next-tick@^1.0.0": "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c", "nice-try@^1.0.4": "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366", "node-modules-regexp@^1.0.0": "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40", "node-pre-gyp@^0.12.0": "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149", "nodemon@^1.19.1": "https://registry.yarnpkg.com/nodemon/-/nodemon-1.19.1.tgz#576f0aad0f863aabf8c48517f6192ff987cd5071", "nopt@^4.0.1": "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d", "nopt@~1.0.10": "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee", + "nopt@~4.0.1": "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d", "normalize-package-data@^2.3.2": "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8", "normalize-path@^2.1.1": "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9", "normalize-path@^3.0.0": "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65", @@ -350,8 +403,11 @@ "osenv@^0.1.4": "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410", "p-finally@^1.0.0": "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae", "p-limit@^1.1.0": "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8", + "p-limit@^2.0.0": "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2", "p-locate@^2.0.0": "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43", + "p-locate@^3.0.0": "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4", "p-try@^1.0.0": "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3", + "p-try@^2.0.0": "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6", "package-json@^4.0.0": "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed", "parent-module@^1.0.0": "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2", "parse-json@^2.2.0": "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9", @@ -378,6 +434,7 @@ "prettier@^1.18.2": "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea", "process-nextick-args@~2.0.0": "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2", "progress@^2.0.0": "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8", + "proto-list@~1.2.1": "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849", "proxy-addr@~2.0.5": "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34", "pseudomap@^1.0.2": "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3", "pstree.remy@^1.1.6": "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.7.tgz#c76963a28047ed61542dc361aa26ee55a7fa15f3", @@ -393,6 +450,7 @@ "readable-stream@^2.0.2": "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf", "readable-stream@^2.0.6": "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf", "readdirp@^2.2.1": "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525", + "regenerator-runtime@^0.11.0": "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9", "regex-not@^1.0.0": "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c", "regex-not@^1.0.2": "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c", "regexpp@^2.0.1": "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f", @@ -401,6 +459,8 @@ "remove-trailing-separator@^1.0.1": "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef", "repeat-element@^1.1.2": "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce", "repeat-string@^1.6.1": "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637", + "require-directory@^2.1.1": "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42", + "require-main-filename@^2.0.0": "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b", "resolve-from@^4.0.0": "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6", "resolve-url@^0.2.1": "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a", "resolve@^1.10.0": "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e", @@ -408,6 +468,7 @@ "resolve@^1.5.0": "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e", "restore-cursor@^2.0.0": "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf", "ret@~0.1.10": "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc", + "retry-as-promised@^3.1.0": "https://registry.yarnpkg.com/retry-as-promised/-/retry-as-promised-3.2.0.tgz#769f63d536bec4783549db0777cb56dadd9d8543", "rimraf@2.6.3": "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab", "rimraf@^2.6.1": "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab", "run-async@^2.2.0": "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0", @@ -427,14 +488,22 @@ "semver@^5.3.0": "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b", "semver@^5.5.0": "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b", "semver@^5.5.1": "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b", + "semver@^5.6.0": "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b", + "semver@^6.1.1": "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db", "send@0.17.1": "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8", + "sequelize-cli@^5.5.0": "https://registry.yarnpkg.com/sequelize-cli/-/sequelize-cli-5.5.0.tgz#b0570352f70eaa489a25dccf55cf316675d6ff06", + "sequelize-pool@^2.3.0": "https://registry.yarnpkg.com/sequelize-pool/-/sequelize-pool-2.3.0.tgz#64f1fe8744228172c474f530604b6133be64993d", + "sequelize@^5.10.1": "https://registry.yarnpkg.com/sequelize/-/sequelize-5.10.1.tgz#ac12614fee2fd40417c4df585dcc28ba2ccf2c57", "serve-static@1.14.1": "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9", + "set-blocking@^2.0.0": "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7", "set-blocking@~2.0.0": "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7", "set-value@^2.0.0": "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b", "set-value@^2.0.1": "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b", "setprototypeof@1.1.1": "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683", "shebang-command@^1.2.0": "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea", "shebang-regex@^1.0.0": "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3", + "shimmer@^1.1.0": "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337", + "sigmund@^1.0.1": "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590", "signal-exit@^3.0.0": "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d", "signal-exit@^3.0.2": "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d", "slice-ansi@^2.1.0": "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636", @@ -460,11 +529,14 @@ "string-width@^2.1.0": "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e", "string-width@^2.1.1": "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e", "string-width@^3.0.0": "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961", + "string-width@^3.1.0": "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961", "string_decoder@~1.1.1": "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8", "strip-ansi@^3.0.0": "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", "strip-ansi@^3.0.1": "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", "strip-ansi@^4.0.0": "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f", + "strip-ansi@^5.0.0": "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae", "strip-ansi@^5.1.0": "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae", + "strip-ansi@^5.2.0": "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae", "strip-bom@^3.0.0": "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3", "strip-eof@^1.0.0": "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf", "strip-json-comments@^2.0.1": "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a", @@ -480,20 +552,25 @@ "thenify@>= 3.1.0 < 4": "https://registry.yarnpkg.com/thenify/-/thenify-3.3.0.tgz#e69e38a1babe969b0108207978b9f62b88604839", "through@^2.3.6": "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5", "timed-out@^4.0.0": "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f", + "timers-ext@^0.1.5": "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6", "tmp@^0.0.33": "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9", "to-object-path@^0.3.0": "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af", "to-regex-range@^2.1.0": "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38", "to-regex@^3.0.1": "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce", "to-regex@^3.0.2": "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce", "toidentifier@1.0.0": "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553", + "toposort-class@^1.0.1": "https://registry.yarnpkg.com/toposort-class/-/toposort-class-1.0.1.tgz#7ffd1f78c8be28c3ba45cd4e1a3f5ee193bd9988", "touch@^3.1.0": "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b", "tslib@^1.9.0": "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a", "type-check@~0.3.2": "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72", "type-is@~1.6.17": "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131", "type-is@~1.6.18": "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131", + "type@^1.0.1": "https://registry.yarnpkg.com/type/-/type-1.0.1.tgz#084c9a17fcc9151a2cdb1459905c2e45e4bb7d61", + "umzug@^2.1.0": "https://registry.yarnpkg.com/umzug/-/umzug-2.2.0.tgz#6160bdc1817e4a63a625946775063c638623e62e", "undefsafe@^2.0.2": "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.2.tgz#225f6b9e0337663e0d8e7cfd686fc2836ccace76", "union-value@^1.0.0": "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847", "unique-string@^1.0.0": "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a", + "universalify@^0.1.0": "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66", "unpipe@1.0.0": "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec", "unpipe@~1.0.0": "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec", "unset-value@^1.0.0": "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559", @@ -506,19 +583,27 @@ "use@^3.1.0": "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f", "util-deprecate@~1.0.1": "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf", "utils-merge@1.0.1": "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713", + "uuid@^3.2.1": "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131", "validate-npm-package-license@^3.0.1": "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a", + "validator@^10.11.0": "https://registry.yarnpkg.com/validator/-/validator-10.11.0.tgz#003108ea6e9a9874d31ccc9e5006856ccd76b228", "vary@~1.1.2": "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc", + "which-module@^2.0.0": "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a", "which@^1.2.9": "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a", "wide-align@^1.1.0": "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457", "widest-line@^2.0.0": "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.1.tgz#7438764730ec7ef4381ce4df82fb98a53142a3fc", + "wkx@^0.4.6": "https://registry.yarnpkg.com/wkx/-/wkx-0.4.7.tgz#ba0e4f9e785e95c9975856c1834f19a95c65cfb5", "wordwrap@~1.0.0": "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb", + "wrap-ansi@^5.1.0": "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09", "wrappy@1": "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", "write-file-atomic@^2.0.0": "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481", "write@1.0.3": "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3", "xdg-basedir@^3.0.0": "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4", + "y18n@^4.0.0": "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b", "yallist@^2.1.2": "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52", "yallist@^3.0.0": "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9", - "yallist@^3.0.3": "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" + "yallist@^3.0.3": "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9", + "yargs-parser@^13.1.1": "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0", + "yargs@^13.1.0": "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" }, "files": [], "artifacts": { diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/node_modules/@types/node/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + 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/@types/node/README.md b/node_modules/@types/node/README.md new file mode 100644 index 00000000..5f3e9e9a --- /dev/null +++ b/node_modules/@types/node/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/node` + +# Summary +This package contains type definitions for Node.js (http://nodejs.org/). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node + +Additional Details + * Last updated: Wed, 17 Jul 2019 19:14:44 GMT + * Dependencies: none + * Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, queueMicrotask, require, setImmediate, setInterval, setTimeout + +# Credits +These definitions were written by Microsoft TypeScript , DefinitelyTyped , Alberto Schiabel , Alexander T. , Alvis HT Tang , Andrew Makarov , Benjamin Toueg , Bruno Scheufler , Chigozirim C. , Christian Vaagland Tellnes , David Junger , Deividas Bakanas , Eugene Y. Q. Shen , Flarna , Hannes Magnusson , Hoàng Văn Khải , Huw , Kelvin Jin , Klaus Meinhardt , Lishude , Mariusz Wiktorczyk , Matthieu Sieben , Mohsen Azimi , Nicolas Even , Nicolas Voigt , Parambir Singh , Sebastian Silbermann , Simon Schick , Thomas den Hollander , Wilco Bakker , wwwy3y3 , Zane Hannan AU , Samuel Ainsworth , Kyle Uehlein , Jordi Oliveras Rovira , and Thanik Bhongbhibhat . diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts new file mode 100644 index 00000000..319e5b4d --- /dev/null +++ b/node_modules/@types/node/assert.d.ts @@ -0,0 +1,52 @@ +declare module "assert" { + function internal(value: any, message?: string | Error): void; + namespace internal { + class AssertionError implements Error { + name: string; + message: string; + actual: any; + expected: any; + operator: string; + generatedMessage: boolean; + code: 'ERR_ASSERTION'; + + constructor(options?: { + message?: string; actual?: any; expected?: any; + operator?: string; stackStartFn?: Function + }); + } + + function fail(message?: string | Error): never; + /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */ + function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never; + function ok(value: any, message?: string | Error): void; + /** @deprecated since v9.9.0 - use strictEqual() instead. */ + function equal(actual: any, expected: any, message?: string | Error): void; + /** @deprecated since v9.9.0 - use notStrictEqual() instead. */ + function notEqual(actual: any, expected: any, message?: string | Error): void; + /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */ + function deepEqual(actual: any, expected: any, message?: string | Error): void; + /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */ + function notDeepEqual(actual: any, expected: any, message?: string | Error): void; + function strictEqual(actual: any, expected: any, message?: string | Error): void; + function notStrictEqual(actual: any, expected: any, message?: string | Error): void; + function deepStrictEqual(actual: any, expected: any, message?: string | Error): void; + function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void; + + function throws(block: () => any, message?: string | Error): void; + function throws(block: () => any, error: RegExp | Function | Object | Error, message?: string | Error): void; + function doesNotThrow(block: () => any, message?: string | Error): void; + function doesNotThrow(block: () => any, error: RegExp | Function, message?: string | Error): void; + + function ifError(value: any): void; + + function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; + function rejects(block: (() => Promise) | Promise, error: RegExp | Function | Object | Error, message?: string | Error): Promise; + function doesNotReject(block: (() => Promise) | Promise, message?: string | Error): Promise; + function doesNotReject(block: (() => Promise) | Promise, error: RegExp | Function, message?: string | Error): Promise; + + const strict: typeof internal; + } + + export = internal; +} diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts new file mode 100644 index 00000000..cca992ec --- /dev/null +++ b/node_modules/@types/node/async_hooks.d.ts @@ -0,0 +1,132 @@ +/** + * Async Hooks module: https://nodejs.org/api/async_hooks.html + */ +declare module "async_hooks" { + /** + * Returns the asyncId of the current execution context. + */ + function executionAsyncId(): number; + + /** + * Returns the ID of the resource responsible for calling the callback that is currently being executed. + */ + function triggerAsyncId(): number; + + interface HookCallbacks { + /** + * Called when a class is constructed that has the possibility to emit an asynchronous event. + * @param asyncId a unique ID for the async resource + * @param type the type of the async resource + * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created + * @param resource reference to the resource representing the async operation, needs to be released during destroy + */ + init?(asyncId: number, type: string, triggerAsyncId: number, resource: Object): void; + + /** + * When an asynchronous operation is initiated or completes a callback is called to notify the user. + * The before callback is called just before said callback is executed. + * @param asyncId the unique identifier assigned to the resource about to execute the callback. + */ + before?(asyncId: number): void; + + /** + * Called immediately after the callback specified in before is completed. + * @param asyncId the unique identifier assigned to the resource which has executed the callback. + */ + after?(asyncId: number): void; + + /** + * Called when a promise has resolve() called. This may not be in the same execution id + * as the promise itself. + * @param asyncId the unique id for the promise that was resolve()d. + */ + promiseResolve?(asyncId: number): void; + + /** + * Called after the resource corresponding to asyncId is destroyed + * @param asyncId a unique ID for the async resource + */ + destroy?(asyncId: number): void; + } + + interface AsyncHook { + /** + * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. + */ + enable(): this; + + /** + * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. + */ + disable(): this; + } + + /** + * Registers functions to be called for different lifetime events of each async operation. + * @param options the callbacks to register + * @return an AsyncHooks instance used for disabling and enabling hooks + */ + function createHook(options: HookCallbacks): AsyncHook; + + interface AsyncResourceOptions { + /** + * The ID of the execution context that created this async event. + * Default: `executionAsyncId()` + */ + triggerAsyncId?: number; + + /** + * Disables automatic `emitDestroy` when the object is garbage collected. + * This usually does not need to be set (even if `emitDestroy` is called + * manually), unless the resource's `asyncId` is retrieved and the + * sensitive API's `emitDestroy` is called with it. + * Default: `false` + */ + requireManualDestroy?: boolean; + } + + /** + * The class AsyncResource was designed to be extended by the embedder's async resources. + * Using this users can easily trigger the lifetime events of their own resources. + */ + class AsyncResource { + /** + * AsyncResource() is meant to be extended. Instantiating a + * new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * async_hook.executionAsyncId() is used. + * @param type The type of async event. + * @param triggerAsyncId The ID of the execution context that created + * this async event (default: `executionAsyncId()`), or an + * AsyncResourceOptions object (since 9.3) + */ + constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions); + + /** + * Call the provided function with the provided arguments in the + * execution context of the async resource. This will establish the + * context, trigger the AsyncHooks before callbacks, call the function, + * trigger the AsyncHooks after callbacks, and then restore the original + * execution context. + * @param fn The function to call in the execution context of this + * async resource. + * @param thisArg The receiver to be used for the function call. + * @param args Optional arguments to pass to the function. + */ + runInAsyncScope(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result; + + /** + * Call AsyncHooks destroy callbacks. + */ + emitDestroy(): void; + + /** + * @return the unique ID assigned to this AsyncResource instance. + */ + asyncId(): number; + + /** + * @return the trigger ID for this AsyncResource instance. + */ + triggerAsyncId(): number; + } +} diff --git a/node_modules/@types/node/base.d.ts b/node_modules/@types/node/base.d.ts new file mode 100644 index 00000000..70983d95 --- /dev/null +++ b/node_modules/@types/node/base.d.ts @@ -0,0 +1,41 @@ +// base definnitions for all NodeJS modules that are not specific to any version of TypeScript +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts new file mode 100644 index 00000000..7eb1061b --- /dev/null +++ b/node_modules/@types/node/buffer.d.ts @@ -0,0 +1,22 @@ +declare module "buffer" { + export const INSPECT_MAX_BYTES: number; + export const kMaxLength: number; + export const kStringMaxLength: number; + export const constants: { + MAX_LENGTH: number; + MAX_STRING_LENGTH: number; + }; + const BuffType: typeof Buffer; + + export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary"; + + export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer; + + export const SlowBuffer: { + /** @deprecated since v6.0.0, use Buffer.allocUnsafeSlow() */ + new(size: number): Buffer; + prototype: Buffer; + }; + + export { BuffType as Buffer }; +} diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts new file mode 100644 index 00000000..412258d8 --- /dev/null +++ b/node_modules/@types/node/child_process.d.ts @@ -0,0 +1,370 @@ +declare module "child_process" { + import * as events from "events"; + import * as net from "net"; + import { Writable, Readable, Stream, Pipe } from "stream"; + + interface ChildProcess extends events.EventEmitter { + stdin: Writable | null; + stdout: Readable | null; + stderr: Readable | null; + readonly channel?: Pipe | null; + readonly stdio: [ + Writable | null, // stdin + Readable | null, // stdout + Readable | null, // stderr + Readable | Writable | null | undefined, // extra + Readable | Writable | null | undefined // extra + ]; + readonly killed: boolean; + readonly pid: number; + readonly connected: boolean; + kill(signal?: string): void; + send(message: any, callback?: (error: Error | null) => void): boolean; + send(message: any, sendHandle?: net.Socket | net.Server, callback?: (error: Error | null) => void): boolean; + send(message: any, sendHandle?: net.Socket | net.Server, options?: MessageOptions, callback?: (error: Error | null) => void): boolean; + disconnect(): void; + unref(): void; + ref(): void; + + /** + * events.EventEmitter + * 1. close + * 2. disconnect + * 3. error + * 4. exit + * 5. message + */ + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: (code: number, signal: string) => void): this; + addListener(event: "disconnect", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this; + addListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close", code: number, signal: string): boolean; + emit(event: "disconnect"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "exit", code: number | null, signal: string | null): boolean; + emit(event: "message", message: any, sendHandle: net.Socket | net.Server): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: (code: number, signal: string) => void): this; + on(event: "disconnect", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "exit", listener: (code: number | null, signal: string | null) => void): this; + on(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: (code: number, signal: string) => void): this; + once(event: "disconnect", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "exit", listener: (code: number | null, signal: string | null) => void): this; + once(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: (code: number, signal: string) => void): this; + prependListener(event: "disconnect", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this; + prependListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: (code: number, signal: string) => void): this; + prependOnceListener(event: "disconnect", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this; + prependOnceListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; + } + + // return this object when stdio option is undefined or not specified + interface ChildProcessWithoutNullStreams extends ChildProcess { + stdin: Writable; + stdout: Readable; + stderr: Readable; + readonly stdio: [ + Writable, // stdin + Readable, // stdout + Readable, // stderr + Readable | Writable | null | undefined, // extra, no modification + Readable | Writable | null | undefined // extra, no modification + ]; + } + + interface MessageOptions { + keepOpen?: boolean; + } + + type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>; + + interface ProcessEnvOptions { + uid?: number; + gid?: number; + cwd?: string; + env?: NodeJS.ProcessEnv; + } + + interface CommonOptions extends ProcessEnvOptions { + /** + * @default true + */ + windowsHide?: boolean; + /** + * @default 0 + */ + timeout?: number; + } + + interface SpawnOptions extends CommonOptions { + argv0?: string; + stdio?: StdioOptions; + detached?: boolean; + shell?: boolean | string; + windowsVerbatimArguments?: boolean; + } + + interface SpawnOptionsWithoutStdio extends SpawnOptions { + stdio?: 'pipe' | Array; + } + + function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; + function spawn(command: string, options: SpawnOptions): ChildProcess; + function spawn(command: string, args?: ReadonlyArray, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; + function spawn(command: string, args: ReadonlyArray, options: SpawnOptions): ChildProcess; + + interface ExecOptions extends CommonOptions { + shell?: string; + maxBuffer?: number; + killSignal?: string; + } + + interface ExecOptionsWithStringEncoding extends ExecOptions { + encoding: BufferEncoding; + } + + interface ExecOptionsWithBufferEncoding extends ExecOptions { + encoding: string | null; // specify `null`. + } + + interface ExecException extends Error { + cmd?: string; + killed?: boolean; + code?: number; + signal?: string; + } + + // no `options` definitely means stdout/stderr are `string`. + function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + + // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. + // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. + function exec(command: string, options: { encoding: string } & ExecOptions, callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess; + + // `options` without an `encoding` means stdout/stderr are definitely `string`. + function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; + + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function exec( + command: string, + options: ({ encoding?: string | null } & ExecOptions) | undefined | null, + callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void, + ): ChildProcess; + + interface PromiseWithChild extends Promise { + child: ChildProcess; + } + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace exec { + function __promisify__(command: string): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; + function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(command: string, options: ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(command: string, options?: ({ encoding?: string | null } & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + } + + interface ExecFileOptions extends CommonOptions { + maxBuffer?: number; + killSignal?: string; + windowsVerbatimArguments?: boolean; + shell?: boolean | string; + } + interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { + encoding: BufferEncoding; + } + interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { + encoding: 'buffer' | null; + } + interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions { + encoding: string; + } + + function execFile(file: string): ChildProcess; + function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess; + function execFile(file: string, args?: ReadonlyArray | null): ChildProcess; + function execFile(file: string, args: ReadonlyArray | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess; + + // no `options` definitely means stdout/stderr are `string`. + function execFile(file: string, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile(file: string, args: ReadonlyArray | undefined | null, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithBufferEncoding, + callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void, + ): ChildProcess; + + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithStringEncoding, + callback: (error: Error | null, stdout: string, stderr: string) => void, + ): ChildProcess; + + // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. + // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. + function execFile( + file: string, + options: ExecFileOptionsWithOtherEncoding, + callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void, + ): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ExecFileOptionsWithOtherEncoding, + callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void, + ): ChildProcess; + + // `options` without an `encoding` means stdout/stderr are definitely `string`. + function execFile(file: string, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + function execFile(file: string, args: ReadonlyArray | undefined | null, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; + + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function execFile( + file: string, + options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, + callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null, + ): ChildProcess; + function execFile( + file: string, + args: ReadonlyArray | undefined | null, + options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, + callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null, + ): ChildProcess; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace execFile { + function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, args: string[] | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; + function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; + function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>; + function __promisify__(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + function __promisify__( + file: string, + args: string[] | undefined | null, + options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, + ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; + } + + interface ForkOptions extends ProcessEnvOptions { + execPath?: string; + execArgv?: string[]; + silent?: boolean; + stdio?: StdioOptions; + detached?: boolean; + windowsVerbatimArguments?: boolean; + } + function fork(modulePath: string, args?: ReadonlyArray, options?: ForkOptions): ChildProcess; + + interface SpawnSyncOptions extends CommonOptions { + argv0?: string; // Not specified in the docs + input?: string | NodeJS.TypedArray | DataView; + stdio?: StdioOptions; + killSignal?: string | number; + maxBuffer?: number; + encoding?: string; + shell?: boolean | string; + windowsVerbatimArguments?: boolean; + } + interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { + encoding: BufferEncoding; + } + interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { + encoding: string; // specify `null`. + } + interface SpawnSyncReturns { + pid: number; + output: string[]; + stdout: T; + stderr: T; + status: number | null; + signal: string | null; + error?: Error; + } + function spawnSync(command: string): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; + function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptions): SpawnSyncReturns; + + interface ExecSyncOptions extends CommonOptions { + input?: string | Uint8Array; + stdio?: StdioOptions; + shell?: string; + killSignal?: string | number; + maxBuffer?: number; + encoding?: string; + } + interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { + encoding: BufferEncoding; + } + interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { + encoding: string; // specify `null`. + } + function execSync(command: string): Buffer; + function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string; + function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer; + function execSync(command: string, options?: ExecSyncOptions): Buffer; + + interface ExecFileSyncOptions extends CommonOptions { + input?: string | NodeJS.TypedArray | DataView; + stdio?: StdioOptions; + killSignal?: string | number; + maxBuffer?: number; + encoding?: string; + shell?: boolean | string; + } + interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { + encoding: BufferEncoding; + } + interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { + encoding: string; // specify `null`. + } + function execFileSync(command: string): Buffer; + function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer; + function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptions): Buffer; +} diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts new file mode 100644 index 00000000..43340ff8 --- /dev/null +++ b/node_modules/@types/node/cluster.d.ts @@ -0,0 +1,260 @@ +declare module "cluster" { + import * as child from "child_process"; + import * as events from "events"; + import * as net from "net"; + + // interfaces + interface ClusterSettings { + execArgv?: string[]; // default: process.execArgv + exec?: string; + args?: string[]; + silent?: boolean; + stdio?: any[]; + uid?: number; + gid?: number; + inspectPort?: number | (() => number); + } + + interface Address { + address: string; + port: number; + addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6" + } + + class Worker extends events.EventEmitter { + id: number; + process: child.ChildProcess; + send(message: any, sendHandle?: any, callback?: (error: Error | null) => void): boolean; + kill(signal?: string): void; + destroy(signal?: string): void; + disconnect(): void; + isConnected(): boolean; + isDead(): boolean; + exitedAfterDisconnect: boolean; + + /** + * events.EventEmitter + * 1. disconnect + * 2. error + * 3. exit + * 4. listening + * 5. message + * 6. online + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "disconnect", listener: () => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + addListener(event: "exit", listener: (code: number, signal: string) => void): this; + addListener(event: "listening", listener: (address: Address) => void): this; + addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: "online", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "disconnect"): boolean; + emit(event: "error", error: Error): boolean; + emit(event: "exit", code: number, signal: string): boolean; + emit(event: "listening", address: Address): boolean; + emit(event: "message", message: any, handle: net.Socket | net.Server): boolean; + emit(event: "online"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "disconnect", listener: () => void): this; + on(event: "error", listener: (error: Error) => void): this; + on(event: "exit", listener: (code: number, signal: string) => void): this; + on(event: "listening", listener: (address: Address) => void): this; + on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: "online", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "disconnect", listener: () => void): this; + once(event: "error", listener: (error: Error) => void): this; + once(event: "exit", listener: (code: number, signal: string) => void): this; + once(event: "listening", listener: (address: Address) => void): this; + once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: "online", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "disconnect", listener: () => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + prependListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependListener(event: "listening", listener: (address: Address) => void): this; + prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: "online", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "disconnect", listener: () => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependOnceListener(event: "listening", listener: (address: Address) => void): this; + prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: "online", listener: () => void): this; + } + + interface Cluster extends events.EventEmitter { + Worker: Worker; + disconnect(callback?: () => void): void; + fork(env?: any): Worker; + isMaster: boolean; + isWorker: boolean; + // TODO: cluster.schedulingPolicy + settings: ClusterSettings; + setupMaster(settings?: ClusterSettings): void; + worker?: Worker; + workers?: { + [index: string]: Worker | undefined + }; + + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "disconnect", listener: (worker: Worker) => void): this; + addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + addListener(event: "fork", listener: (worker: Worker) => void): this; + addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: "online", listener: (worker: Worker) => void): this; + addListener(event: "setup", listener: (settings: ClusterSettings) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "disconnect", worker: Worker): boolean; + emit(event: "exit", worker: Worker, code: number, signal: string): boolean; + emit(event: "fork", worker: Worker): boolean; + emit(event: "listening", worker: Worker, address: Address): boolean; + emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; + emit(event: "online", worker: Worker): boolean; + emit(event: "setup", settings: ClusterSettings): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "disconnect", listener: (worker: Worker) => void): this; + on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + on(event: "fork", listener: (worker: Worker) => void): this; + on(event: "listening", listener: (worker: Worker, address: Address) => void): this; + on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: "online", listener: (worker: Worker) => void): this; + on(event: "setup", listener: (settings: ClusterSettings) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "disconnect", listener: (worker: Worker) => void): this; + once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + once(event: "fork", listener: (worker: Worker) => void): this; + once(event: "listening", listener: (worker: Worker, address: Address) => void): this; + once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: "online", listener: (worker: Worker) => void): this; + once(event: "setup", listener: (settings: ClusterSettings) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "disconnect", listener: (worker: Worker) => void): this; + prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + prependListener(event: "fork", listener: (worker: Worker) => void): this; + prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: "online", listener: (worker: Worker) => void): this; + prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this; + prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + prependOnceListener(event: "fork", listener: (worker: Worker) => void): this; + prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; + prependOnceListener(event: "online", listener: (worker: Worker) => void): this; + prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this; + } + + function disconnect(callback?: () => void): void; + function fork(env?: any): Worker; + const isMaster: boolean; + const isWorker: boolean; + // TODO: cluster.schedulingPolicy + const settings: ClusterSettings; + function setupMaster(settings?: ClusterSettings): void; + const worker: Worker; + const workers: { + [index: string]: Worker | undefined + }; + + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + function addListener(event: string, listener: (...args: any[]) => void): Cluster; + function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function addListener(event: "fork", listener: (worker: Worker) => void): Cluster; + function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + // the handle is a net.Socket or net.Server object, or undefined. + function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; + function addListener(event: "online", listener: (worker: Worker) => void): Cluster; + function addListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function emit(event: string | symbol, ...args: any[]): boolean; + function emit(event: "disconnect", worker: Worker): boolean; + function emit(event: "exit", worker: Worker, code: number, signal: string): boolean; + function emit(event: "fork", worker: Worker): boolean; + function emit(event: "listening", worker: Worker, address: Address): boolean; + function emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; + function emit(event: "online", worker: Worker): boolean; + function emit(event: "setup", settings: ClusterSettings): boolean; + + function on(event: string, listener: (...args: any[]) => void): Cluster; + function on(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function on(event: "fork", listener: (worker: Worker) => void): Cluster; + function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + function on(event: "online", listener: (worker: Worker) => void): Cluster; + function on(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function once(event: string, listener: (...args: any[]) => void): Cluster; + function once(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function once(event: "fork", listener: (worker: Worker) => void): Cluster; + function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + function once(event: "online", listener: (worker: Worker) => void): Cluster; + function once(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function removeListener(event: string, listener: (...args: any[]) => void): Cluster; + function removeAllListeners(event?: string): Cluster; + function setMaxListeners(n: number): Cluster; + function getMaxListeners(): number; + function listeners(event: string): Function[]; + function listenerCount(type: string): number; + + function prependListener(event: string, listener: (...args: any[]) => void): Cluster; + function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster; + function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + // the handle is a net.Socket or net.Server object, or undefined. + function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; + function prependListener(event: "online", listener: (worker: Worker) => void): Cluster; + function prependListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function prependOnceListener(event: string, listener: (...args: any[]) => void): Cluster; + function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster; + function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + // the handle is a net.Socket or net.Server object, or undefined. + function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; + function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster; + function prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; + + function eventNames(): string[]; +} diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts new file mode 100644 index 00000000..d30d13f8 --- /dev/null +++ b/node_modules/@types/node/console.d.ts @@ -0,0 +1,3 @@ +declare module "console" { + export = console; +} diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts new file mode 100644 index 00000000..577860f3 --- /dev/null +++ b/node_modules/@types/node/constants.d.ts @@ -0,0 +1,278 @@ +declare module "constants" { + const E2BIG: number; + const EACCES: number; + const EADDRINUSE: number; + const EADDRNOTAVAIL: number; + const EAFNOSUPPORT: number; + const EAGAIN: number; + const EALREADY: number; + const EBADF: number; + const EBADMSG: number; + const EBUSY: number; + const ECANCELED: number; + const ECHILD: number; + const ECONNABORTED: number; + const ECONNREFUSED: number; + const ECONNRESET: number; + const EDEADLK: number; + const EDESTADDRREQ: number; + const EDOM: number; + const EEXIST: number; + const EFAULT: number; + const EFBIG: number; + const EHOSTUNREACH: number; + const EIDRM: number; + const EILSEQ: number; + const EINPROGRESS: number; + const EINTR: number; + const EINVAL: number; + const EIO: number; + const EISCONN: number; + const EISDIR: number; + const ELOOP: number; + const EMFILE: number; + const EMLINK: number; + const EMSGSIZE: number; + const ENAMETOOLONG: number; + const ENETDOWN: number; + const ENETRESET: number; + const ENETUNREACH: number; + const ENFILE: number; + const ENOBUFS: number; + const ENODATA: number; + const ENODEV: number; + const ENOENT: number; + const ENOEXEC: number; + const ENOLCK: number; + const ENOLINK: number; + const ENOMEM: number; + const ENOMSG: number; + const ENOPROTOOPT: number; + const ENOSPC: number; + const ENOSR: number; + const ENOSTR: number; + const ENOSYS: number; + const ENOTCONN: number; + const ENOTDIR: number; + const ENOTEMPTY: number; + const ENOTSOCK: number; + const ENOTSUP: number; + const ENOTTY: number; + const ENXIO: number; + const EOPNOTSUPP: number; + const EOVERFLOW: number; + const EPERM: number; + const EPIPE: number; + const EPROTO: number; + const EPROTONOSUPPORT: number; + const EPROTOTYPE: number; + const ERANGE: number; + const EROFS: number; + const ESPIPE: number; + const ESRCH: number; + const ETIME: number; + const ETIMEDOUT: number; + const ETXTBSY: number; + const EWOULDBLOCK: number; + const EXDEV: number; + const WSAEINTR: number; + const WSAEBADF: number; + const WSAEACCES: number; + const WSAEFAULT: number; + const WSAEINVAL: number; + const WSAEMFILE: number; + const WSAEWOULDBLOCK: number; + const WSAEINPROGRESS: number; + const WSAEALREADY: number; + const WSAENOTSOCK: number; + const WSAEDESTADDRREQ: number; + const WSAEMSGSIZE: number; + const WSAEPROTOTYPE: number; + const WSAENOPROTOOPT: number; + const WSAEPROTONOSUPPORT: number; + const WSAESOCKTNOSUPPORT: number; + const WSAEOPNOTSUPP: number; + const WSAEPFNOSUPPORT: number; + const WSAEAFNOSUPPORT: number; + const WSAEADDRINUSE: number; + const WSAEADDRNOTAVAIL: number; + const WSAENETDOWN: number; + const WSAENETUNREACH: number; + const WSAENETRESET: number; + const WSAECONNABORTED: number; + const WSAECONNRESET: number; + const WSAENOBUFS: number; + const WSAEISCONN: number; + const WSAENOTCONN: number; + const WSAESHUTDOWN: number; + const WSAETOOMANYREFS: number; + const WSAETIMEDOUT: number; + const WSAECONNREFUSED: number; + const WSAELOOP: number; + const WSAENAMETOOLONG: number; + const WSAEHOSTDOWN: number; + const WSAEHOSTUNREACH: number; + const WSAENOTEMPTY: number; + const WSAEPROCLIM: number; + const WSAEUSERS: number; + const WSAEDQUOT: number; + const WSAESTALE: number; + const WSAEREMOTE: number; + const WSASYSNOTREADY: number; + const WSAVERNOTSUPPORTED: number; + const WSANOTINITIALISED: number; + const WSAEDISCON: number; + const WSAENOMORE: number; + const WSAECANCELLED: number; + const WSAEINVALIDPROCTABLE: number; + const WSAEINVALIDPROVIDER: number; + const WSAEPROVIDERFAILEDINIT: number; + const WSASYSCALLFAILURE: number; + const WSASERVICE_NOT_FOUND: number; + const WSATYPE_NOT_FOUND: number; + const WSA_E_NO_MORE: number; + const WSA_E_CANCELLED: number; + const WSAEREFUSED: number; + const SIGHUP: number; + const SIGINT: number; + const SIGILL: number; + const SIGABRT: number; + const SIGFPE: number; + const SIGKILL: number; + const SIGSEGV: number; + const SIGTERM: number; + const SIGBREAK: number; + const SIGWINCH: number; + const SSL_OP_ALL: number; + const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; + const SSL_OP_CIPHER_SERVER_PREFERENCE: number; + const SSL_OP_CISCO_ANYCONNECT: number; + const SSL_OP_COOKIE_EXCHANGE: number; + const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; + const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; + const SSL_OP_EPHEMERAL_RSA: number; + const SSL_OP_LEGACY_SERVER_CONNECT: number; + const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; + const SSL_OP_MICROSOFT_SESS_ID_BUG: number; + const SSL_OP_MSIE_SSLV2_RSA_PADDING: number; + const SSL_OP_NETSCAPE_CA_DN_BUG: number; + const SSL_OP_NETSCAPE_CHALLENGE_BUG: number; + const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; + const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; + const SSL_OP_NO_COMPRESSION: number; + const SSL_OP_NO_QUERY_MTU: number; + const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; + const SSL_OP_NO_SSLv2: number; + const SSL_OP_NO_SSLv3: number; + const SSL_OP_NO_TICKET: number; + const SSL_OP_NO_TLSv1: number; + const SSL_OP_NO_TLSv1_1: number; + const SSL_OP_NO_TLSv1_2: number; + const SSL_OP_PKCS1_CHECK_1: number; + const SSL_OP_PKCS1_CHECK_2: number; + const SSL_OP_SINGLE_DH_USE: number; + const SSL_OP_SINGLE_ECDH_USE: number; + const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; + const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; + const SSL_OP_TLS_BLOCK_PADDING_BUG: number; + const SSL_OP_TLS_D5_BUG: number; + const SSL_OP_TLS_ROLLBACK_BUG: number; + const ENGINE_METHOD_DSA: number; + const ENGINE_METHOD_DH: number; + const ENGINE_METHOD_RAND: number; + const ENGINE_METHOD_ECDH: number; + const ENGINE_METHOD_ECDSA: number; + const ENGINE_METHOD_CIPHERS: number; + const ENGINE_METHOD_DIGESTS: number; + const ENGINE_METHOD_STORE: number; + const ENGINE_METHOD_PKEY_METHS: number; + const ENGINE_METHOD_PKEY_ASN1_METHS: number; + const ENGINE_METHOD_ALL: number; + const ENGINE_METHOD_NONE: number; + const DH_CHECK_P_NOT_SAFE_PRIME: number; + const DH_CHECK_P_NOT_PRIME: number; + const DH_UNABLE_TO_CHECK_GENERATOR: number; + const DH_NOT_SUITABLE_GENERATOR: number; + const RSA_PKCS1_PADDING: number; + const RSA_SSLV23_PADDING: number; + const RSA_NO_PADDING: number; + const RSA_PKCS1_OAEP_PADDING: number; + const RSA_X931_PADDING: number; + const RSA_PKCS1_PSS_PADDING: number; + const POINT_CONVERSION_COMPRESSED: number; + const POINT_CONVERSION_UNCOMPRESSED: number; + const POINT_CONVERSION_HYBRID: number; + const O_RDONLY: number; + const O_WRONLY: number; + const O_RDWR: number; + const S_IFMT: number; + const S_IFREG: number; + const S_IFDIR: number; + const S_IFCHR: number; + const S_IFBLK: number; + const S_IFIFO: number; + const S_IFSOCK: number; + const S_IRWXU: number; + const S_IRUSR: number; + const S_IWUSR: number; + const S_IXUSR: number; + const S_IRWXG: number; + const S_IRGRP: number; + const S_IWGRP: number; + const S_IXGRP: number; + const S_IRWXO: number; + const S_IROTH: number; + const S_IWOTH: number; + const S_IXOTH: number; + const S_IFLNK: number; + const O_CREAT: number; + const O_EXCL: number; + const O_NOCTTY: number; + const O_DIRECTORY: number; + const O_NOATIME: number; + const O_NOFOLLOW: number; + const O_SYNC: number; + const O_DSYNC: number; + const O_SYMLINK: number; + const O_DIRECT: number; + const O_NONBLOCK: number; + const O_TRUNC: number; + const O_APPEND: number; + const F_OK: number; + const R_OK: number; + const W_OK: number; + const X_OK: number; + const COPYFILE_EXCL: number; + const COPYFILE_FICLONE: number; + const COPYFILE_FICLONE_FORCE: number; + const UV_UDP_REUSEADDR: number; + const SIGQUIT: number; + const SIGTRAP: number; + const SIGIOT: number; + const SIGBUS: number; + const SIGUSR1: number; + const SIGUSR2: number; + const SIGPIPE: number; + const SIGALRM: number; + const SIGCHLD: number; + const SIGSTKFLT: number; + const SIGCONT: number; + const SIGSTOP: number; + const SIGTSTP: number; + const SIGTTIN: number; + const SIGTTOU: number; + const SIGURG: number; + const SIGXCPU: number; + const SIGXFSZ: number; + const SIGVTALRM: number; + const SIGPROF: number; + const SIGIO: number; + const SIGPOLL: number; + const SIGPWR: number; + const SIGSYS: number; + const SIGUNUSED: number; + const defaultCoreCipherList: string; + const defaultCipherList: string; + const ENGINE_METHOD_RSA: number; + const ALPN_ENABLED: number; +} diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts new file mode 100644 index 00000000..3394d43a --- /dev/null +++ b/node_modules/@types/node/crypto.d.ts @@ -0,0 +1,602 @@ +declare module "crypto" { + import * as stream from "stream"; + + interface Certificate { + exportChallenge(spkac: BinaryLike): Buffer; + exportPublicKey(spkac: BinaryLike): Buffer; + verifySpkac(spkac: Binary): boolean; + } + const Certificate: { + new(): Certificate; + (): Certificate; + }; + + namespace constants { // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants + const OPENSSL_VERSION_NUMBER: number; + + /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */ + const SSL_OP_ALL: number; + /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ + const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; + /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ + const SSL_OP_CIPHER_SERVER_PREFERENCE: number; + /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */ + const SSL_OP_CISCO_ANYCONNECT: number; + /** Instructs OpenSSL to turn on cookie exchange. */ + const SSL_OP_COOKIE_EXCHANGE: number; + /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */ + const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; + /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */ + const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; + /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */ + const SSL_OP_EPHEMERAL_RSA: number; + /** Allows initial connection to servers that do not support RI. */ + const SSL_OP_LEGACY_SERVER_CONNECT: number; + const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; + const SSL_OP_MICROSOFT_SESS_ID_BUG: number; + /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */ + const SSL_OP_MSIE_SSLV2_RSA_PADDING: number; + const SSL_OP_NETSCAPE_CA_DN_BUG: number; + const SSL_OP_NETSCAPE_CHALLENGE_BUG: number; + const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; + const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; + /** Instructs OpenSSL to disable support for SSL/TLS compression. */ + const SSL_OP_NO_COMPRESSION: number; + const SSL_OP_NO_QUERY_MTU: number; + /** Instructs OpenSSL to always start a new session when performing renegotiation. */ + const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; + const SSL_OP_NO_SSLv2: number; + const SSL_OP_NO_SSLv3: number; + const SSL_OP_NO_TICKET: number; + const SSL_OP_NO_TLSv1: number; + const SSL_OP_NO_TLSv1_1: number; + const SSL_OP_NO_TLSv1_2: number; + const SSL_OP_PKCS1_CHECK_1: number; + const SSL_OP_PKCS1_CHECK_2: number; + /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */ + const SSL_OP_SINGLE_DH_USE: number; + /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */ + const SSL_OP_SINGLE_ECDH_USE: number; + const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; + const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; + const SSL_OP_TLS_BLOCK_PADDING_BUG: number; + const SSL_OP_TLS_D5_BUG: number; + /** Instructs OpenSSL to disable version rollback attack detection. */ + const SSL_OP_TLS_ROLLBACK_BUG: number; + + const ENGINE_METHOD_RSA: number; + const ENGINE_METHOD_DSA: number; + const ENGINE_METHOD_DH: number; + const ENGINE_METHOD_RAND: number; + const ENGINE_METHOD_EC: number; + const ENGINE_METHOD_CIPHERS: number; + const ENGINE_METHOD_DIGESTS: number; + const ENGINE_METHOD_PKEY_METHS: number; + const ENGINE_METHOD_PKEY_ASN1_METHS: number; + const ENGINE_METHOD_ALL: number; + const ENGINE_METHOD_NONE: number; + + const DH_CHECK_P_NOT_SAFE_PRIME: number; + const DH_CHECK_P_NOT_PRIME: number; + const DH_UNABLE_TO_CHECK_GENERATOR: number; + const DH_NOT_SUITABLE_GENERATOR: number; + + const ALPN_ENABLED: number; + + const RSA_PKCS1_PADDING: number; + const RSA_SSLV23_PADDING: number; + const RSA_NO_PADDING: number; + const RSA_PKCS1_OAEP_PADDING: number; + const RSA_X931_PADDING: number; + const RSA_PKCS1_PSS_PADDING: number; + /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */ + const RSA_PSS_SALTLEN_DIGEST: number; + /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */ + const RSA_PSS_SALTLEN_MAX_SIGN: number; + /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */ + const RSA_PSS_SALTLEN_AUTO: number; + + const POINT_CONVERSION_COMPRESSED: number; + const POINT_CONVERSION_UNCOMPRESSED: number; + const POINT_CONVERSION_HYBRID: number; + + /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */ + const defaultCoreCipherList: string; + /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */ + const defaultCipherList: string; + } + + /** @deprecated since v10.0.0 */ + const fips: boolean; + + function createHash(algorithm: string, options?: stream.TransformOptions): Hash; + function createHmac(algorithm: string, key: BinaryLike, options?: stream.TransformOptions): Hmac; + + type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1"; + type HexBase64Latin1Encoding = "latin1" | "hex" | "base64"; + type Utf8AsciiBinaryEncoding = "utf8" | "ascii" | "binary"; + type HexBase64BinaryEncoding = "binary" | "base64" | "hex"; + type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; + + class Hash extends stream.Duplex { + private constructor(); + update(data: BinaryLike): Hash; + update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hash; + digest(): Buffer; + digest(encoding: HexBase64Latin1Encoding): string; + } + class Hmac extends stream.Duplex { + private constructor(); + update(data: BinaryLike): Hmac; + update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hmac; + digest(): Buffer; + digest(encoding: HexBase64Latin1Encoding): string; + } + + export type KeyObjectType = 'secret' | 'public' | 'private'; + + interface KeyExportOptions { + type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1'; + format: T; + cipher?: string; + passphrase?: string | Buffer; + } + + class KeyObject { + private constructor(); + asymmetricKeyType?: KeyType; + /** + * For asymmetric keys, this property represents the size of the embedded key in + * bytes. This property is `undefined` for symmetric keys. + */ + asymmetricKeySize?: number; + export(options: KeyExportOptions<'pem'>): string | Buffer; + export(options?: KeyExportOptions<'der'>): Buffer; + symmetricSize?: number; + type: KeyObjectType; + } + + type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm'; + type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm'; + + type Binary = NodeJS.TypedArray | DataView; + type BinaryLike = string | Binary; + + type CipherKey = BinaryLike | KeyObject; + + interface CipherCCMOptions extends stream.TransformOptions { + authTagLength: number; + } + interface CipherGCMOptions extends stream.TransformOptions { + authTagLength?: number; + } + /** @deprecated since v10.0.0 use createCipheriv() */ + function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM; + /** @deprecated since v10.0.0 use createCipheriv() */ + function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM; + /** @deprecated since v10.0.0 use createCipheriv() */ + function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher; + + function createCipheriv( + algorithm: CipherCCMTypes, + key: CipherKey, + iv: BinaryLike | null, + options: CipherCCMOptions + ): CipherCCM; + function createCipheriv( + algorithm: CipherGCMTypes, + key: CipherKey, + iv: BinaryLike | null, + options?: CipherGCMOptions + ): CipherGCM; + function createCipheriv( + algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions + ): Cipher; + + class Cipher extends stream.Duplex { + private constructor(); + update(data: BinaryLike): Buffer; + update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer; + update(data: Binary, input_encoding: undefined, output_encoding: HexBase64BinaryEncoding): string; + update(data: string, input_encoding: Utf8AsciiBinaryEncoding | undefined, output_encoding: HexBase64BinaryEncoding): string; + final(): Buffer; + final(output_encoding: string): string; + setAutoPadding(auto_padding?: boolean): this; + // getAuthTag(): Buffer; + // setAAD(buffer: Buffer): this; // docs only say buffer + } + interface CipherCCM extends Cipher { + setAAD(buffer: Buffer, options: { plaintextLength: number }): this; + getAuthTag(): Buffer; + } + interface CipherGCM extends Cipher { + setAAD(buffer: Buffer, options?: { plaintextLength: number }): this; + getAuthTag(): Buffer; + } + /** @deprecated since v10.0.0 use createCipheriv() */ + function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM; + /** @deprecated since v10.0.0 use createCipheriv() */ + function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM; + /** @deprecated since v10.0.0 use createCipheriv() */ + function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher; + + function createDecipheriv( + algorithm: CipherCCMTypes, + key: BinaryLike, + iv: BinaryLike | null, + options: CipherCCMOptions, + ): DecipherCCM; + function createDecipheriv( + algorithm: CipherGCMTypes, + key: BinaryLike, + iv: BinaryLike | null, + options?: CipherGCMOptions, + ): DecipherGCM; + function createDecipheriv(algorithm: string, key: BinaryLike, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher; + + class Decipher extends stream.Duplex { + private constructor(); + update(data: Binary): Buffer; + update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer; + update(data: Binary, input_encoding: undefined, output_encoding: Utf8AsciiBinaryEncoding): string; + update(data: string, input_encoding: HexBase64BinaryEncoding | undefined, output_encoding: Utf8AsciiBinaryEncoding): string; + final(): Buffer; + final(output_encoding: string): string; + setAutoPadding(auto_padding?: boolean): this; + // setAuthTag(tag: Binary): this; + // setAAD(buffer: Binary): this; + } + interface DecipherCCM extends Decipher { + setAuthTag(buffer: Binary): this; + setAAD(buffer: Binary, options: { plaintextLength: number }): this; + } + interface DecipherGCM extends Decipher { + setAuthTag(buffer: Binary): this; + setAAD(buffer: Binary, options?: { plaintextLength: number }): this; + } + + interface PrivateKeyInput { + key: string | Buffer; + format?: KeyFormat; + type?: 'pkcs1' | 'pkcs8' | 'sec1'; + passphrase?: string | Buffer; + } + + interface PublicKeyInput { + key: string | Buffer; + format?: KeyFormat; + type?: 'pkcs1' | 'spki'; + } + + function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject; + function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject): KeyObject; + function createSecretKey(key: Buffer): KeyObject; + + function createSign(algorithm: string, options?: stream.WritableOptions): Signer; + + interface SigningOptions { + /** + * @See crypto.constants.RSA_PKCS1_PADDING + */ + padding?: number; + saltLength?: number; + } + + interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions { + } + + type KeyLike = string | Buffer | KeyObject; + + class Signer extends stream.Writable { + private constructor(); + + update(data: BinaryLike): Signer; + update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer; + sign(private_key: SignPrivateKeyInput | KeyLike): Buffer; + sign(private_key: SignPrivateKeyInput | KeyLike, output_format: HexBase64Latin1Encoding): string; + } + + function createVerify(algorithm: string, options?: stream.WritableOptions): Verify; + class Verify extends stream.Writable { + private constructor(); + + update(data: BinaryLike): Verify; + update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Verify; + verify(object: Object | KeyLike, signature: Binary): boolean; + verify(object: Object | KeyLike, signature: string, signature_format?: HexBase64Latin1Encoding): boolean; + // https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format + // The signature field accepts a TypedArray type, but it is only available starting ES2017 + } + function createDiffieHellman(prime_length: number, generator?: number | Binary): DiffieHellman; + function createDiffieHellman(prime: Binary): DiffieHellman; + function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman; + function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Binary): DiffieHellman; + function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman; + class DiffieHellman { + private constructor(); + generateKeys(): Buffer; + generateKeys(encoding: HexBase64Latin1Encoding): string; + computeSecret(other_public_key: Binary): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; + computeSecret(other_public_key: Binary, output_encoding: HexBase64Latin1Encoding): string; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; + getPrime(): Buffer; + getPrime(encoding: HexBase64Latin1Encoding): string; + getGenerator(): Buffer; + getGenerator(encoding: HexBase64Latin1Encoding): string; + getPublicKey(): Buffer; + getPublicKey(encoding: HexBase64Latin1Encoding): string; + getPrivateKey(): Buffer; + getPrivateKey(encoding: HexBase64Latin1Encoding): string; + setPublicKey(public_key: Binary): void; + setPublicKey(public_key: string, encoding: string): void; + setPrivateKey(private_key: Binary): void; + setPrivateKey(private_key: string, encoding: string): void; + verifyError: number; + } + function getDiffieHellman(group_name: string): DiffieHellman; + function pbkdf2( + password: BinaryLike, + salt: BinaryLike, + iterations: number, + keylen: number, + digest: string, + callback: (err: Error | null, derivedKey: Buffer) => any, + ): void; + function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer; + + function randomBytes(size: number): Buffer; + function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; + function pseudoRandomBytes(size: number): Buffer; + function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; + + function randomFillSync(buffer: T, offset?: number, size?: number): T; + function randomFill(buffer: T, callback: (err: Error | null, buf: T) => void): void; + function randomFill(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void; + function randomFill(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void; + + interface ScryptOptions { + N?: number; + r?: number; + p?: number; + maxmem?: number; + } + function scrypt( + password: BinaryLike, + salt: BinaryLike, + keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void, + ): void; + function scrypt( + password: BinaryLike, + salt: BinaryLike, + keylen: number, + options: ScryptOptions, + callback: (err: Error | null, derivedKey: Buffer) => void, + ): void; + function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer; + + interface RsaPublicKey { + key: KeyLike; + padding?: number; + } + interface RsaPrivateKey { + key: KeyLike; + passphrase?: string; + padding?: number; + } + function publicEncrypt(public_key: RsaPublicKey | KeyLike, buffer: Binary): Buffer; + function privateDecrypt(private_key: RsaPrivateKey | KeyLike, buffer: Binary): Buffer; + function privateEncrypt(private_key: RsaPrivateKey | KeyLike, buffer: Binary): Buffer; + function publicDecrypt(public_key: RsaPublicKey | KeyLike, buffer: Binary): Buffer; + function getCiphers(): string[]; + function getCurves(): string[]; + function getHashes(): string[]; + class ECDH { + private constructor(); + static convertKey( + key: BinaryLike, + curve: string, + inputEncoding?: HexBase64Latin1Encoding, + outputEncoding?: "latin1" | "hex" | "base64", + format?: "uncompressed" | "compressed" | "hybrid", + ): Buffer | string; + generateKeys(): Buffer; + generateKeys(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string; + computeSecret(other_public_key: Binary): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; + computeSecret(other_public_key: Binary, output_encoding: HexBase64Latin1Encoding): string; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; + getPrivateKey(): Buffer; + getPrivateKey(encoding: HexBase64Latin1Encoding): string; + getPublicKey(): Buffer; + getPublicKey(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string; + setPrivateKey(private_key: Binary): void; + setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void; + } + function createECDH(curve_name: string): ECDH; + function timingSafeEqual(a: Binary, b: Binary): boolean; + /** @deprecated since v10.0.0 */ + const DEFAULT_ENCODING: string; + + export type KeyType = 'rsa' | 'dsa' | 'ec'; + export type KeyFormat = 'pem' | 'der'; + + interface BasePrivateKeyEncodingOptions { + format: T; + cipher?: string; + passphrase?: string; + } + + interface KeyPairKeyObjectResult { + publicKey: KeyObject; + privateKey: KeyObject; + } + + interface ECKeyPairKeyObjectOptions { + /** + * Name of the curve to use. + */ + namedCurve: string; + } + + interface RSAKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + + /** + * @default 0x10001 + */ + publicExponent?: number; + } + + interface DSAKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + + /** + * Size of q in bits + */ + divisorLength: number; + } + + interface RSAKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * @default 0x10001 + */ + publicExponent?: number; + + publicKeyEncoding: { + type: 'pkcs1' | 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs1' | 'pkcs8'; + }; + } + + interface DSAKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Size of q in bits + */ + divisorLength: number; + + publicKeyEncoding: { + type: 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'pkcs8'; + }; + } + + interface ECKeyPairOptions { + /** + * Name of the curve to use. + */ + namedCurve: string; + + publicKeyEncoding: { + type: 'pkcs1' | 'spki'; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: 'sec1' | 'pkcs8'; + }; + } + + interface KeyPairSyncResult { + publicKey: T1; + privateKey: T2; + } + + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult; + function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; + function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; + + namespace generateKeyPair { + function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>; + function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>; + function __promisify__(type: "rsa", options: RSAKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>; + function __promisify__(type: "rsa", options: RSAKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>; + function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise; + + function __promisify__(type: "dsa", options: DSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>; + function __promisify__(type: "dsa", options: DSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>; + function __promisify__(type: "dsa", options: DSAKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>; + function __promisify__(type: "dsa", options: DSAKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>; + function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise; + + function __promisify__(type: "ec", options: ECKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>; + function __promisify__(type: "ec", options: ECKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>; + function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>; + function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>; + function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise; + } + + /** + * Calculates and returns the signature for `data` using the given private key and + * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is + * dependent upon the key type (especially Ed25519 and Ed448). + * + * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been + * passed to [`crypto.createPrivateKey()`][]. + */ + function sign(algorithm: string | null | undefined, data: Binary, key: KeyLike | SignPrivateKeyInput): Buffer; + + interface VerifyKeyWithOptions extends KeyObject, SigningOptions { + } + + /** + * Calculates and returns the signature for `data` using the given private key and + * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is + * dependent upon the key type (especially Ed25519 and Ed448). + * + * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been + * passed to [`crypto.createPublicKey()`][]. + */ + function verify(algorithm: string | null | undefined, data: Binary, key: KeyLike | VerifyKeyWithOptions, signature: Binary): Buffer; +} diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts new file mode 100644 index 00000000..c42acdfa --- /dev/null +++ b/node_modules/@types/node/dgram.d.ts @@ -0,0 +1,102 @@ +declare module "dgram" { + import { AddressInfo } from "net"; + import * as dns from "dns"; + import * as events from "events"; + + interface RemoteInfo { + address: string; + family: 'IPv4' | 'IPv6'; + port: number; + size: number; + } + + interface BindOptions { + port: number; + address?: string; + exclusive?: boolean; + } + + type SocketType = "udp4" | "udp6"; + + interface SocketOptions { + type: SocketType; + reuseAddr?: boolean; + /** + * @default false + */ + ipv6Only?: boolean; + recvBufferSize?: number; + sendBufferSize?: number; + lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void; + } + + function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + + class Socket extends events.EventEmitter { + send(msg: string | Uint8Array | any[], port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; + send(msg: string | Uint8Array, offset: number, length: number, port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; + bind(port?: number, address?: string, callback?: () => void): void; + bind(port?: number, callback?: () => void): void; + bind(callback?: () => void): void; + bind(options: BindOptions, callback?: () => void): void; + close(callback?: () => void): void; + address(): AddressInfo | string; + setBroadcast(flag: boolean): void; + setTTL(ttl: number): void; + setMulticastTTL(ttl: number): void; + setMulticastInterface(multicastInterface: string): void; + setMulticastLoopback(flag: boolean): void; + addMembership(multicastAddress: string, multicastInterface?: string): void; + dropMembership(multicastAddress: string, multicastInterface?: string): void; + ref(): this; + unref(): this; + setRecvBufferSize(size: number): void; + setSendBufferSize(size: number): void; + getRecvBufferSize(): number; + getSendBufferSize(): number; + + /** + * events.EventEmitter + * 1. close + * 2. error + * 3. listening + * 4. message + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + } +} diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts new file mode 100644 index 00000000..879d6905 --- /dev/null +++ b/node_modules/@types/node/dns.d.ts @@ -0,0 +1,366 @@ +declare module "dns" { + // Supported getaddrinfo flags. + const ADDRCONFIG: number; + const V4MAPPED: number; + + interface LookupOptions { + family?: number; + hints?: number; + all?: boolean; + verbatim?: boolean; + } + + interface LookupOneOptions extends LookupOptions { + all?: false; + } + + interface LookupAllOptions extends LookupOptions { + all: true; + } + + interface LookupAddress { + address: string; + family: number; + } + + function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void; + function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void; + function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace lookup { + function __promisify__(hostname: string, options: LookupAllOptions): Promise<{ address: LookupAddress[] }>; + function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<{ address: string, family: number }>; + function __promisify__(hostname: string, options?: LookupOptions | number): Promise<{ address: string | LookupAddress[], family?: number }>; + } + + function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void; + + namespace lookupService { + function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>; + } + + interface ResolveOptions { + ttl: boolean; + } + + interface ResolveWithTtlOptions extends ResolveOptions { + ttl: true; + } + + interface RecordWithTtl { + address: string; + ttl: number; + } + + /** @deprecated Use AnyARecord or AnyAaaaRecord instead. */ + type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord; + + interface AnyARecord extends RecordWithTtl { + type: "A"; + } + + interface AnyAaaaRecord extends RecordWithTtl { + type: "AAAA"; + } + + interface MxRecord { + priority: number; + exchange: string; + } + + interface AnyMxRecord extends MxRecord { + type: "MX"; + } + + interface NaptrRecord { + flags: string; + service: string; + regexp: string; + replacement: string; + order: number; + preference: number; + } + + interface AnyNaptrRecord extends NaptrRecord { + type: "NAPTR"; + } + + interface SoaRecord { + nsname: string; + hostmaster: string; + serial: number; + refresh: number; + retry: number; + expire: number; + minttl: number; + } + + interface AnySoaRecord extends SoaRecord { + type: "SOA"; + } + + interface SrvRecord { + priority: number; + weight: number; + port: number; + name: string; + } + + interface AnySrvRecord extends SrvRecord { + type: "SRV"; + } + + interface AnyTxtRecord { + type: "TXT"; + entries: string[]; + } + + interface AnyNsRecord { + type: "NS"; + value: string; + } + + interface AnyPtrRecord { + type: "PTR"; + value: string; + } + + interface AnyCnameRecord { + type: "CNAME"; + value: string; + } + + type AnyRecord = AnyARecord | + AnyAaaaRecord | + AnyCnameRecord | + AnyMxRecord | + AnyNaptrRecord | + AnyNsRecord | + AnyPtrRecord | + AnySoaRecord | + AnySrvRecord | + AnyTxtRecord; + + function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; + function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; + function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; + function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void; + function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; + function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; + function resolve( + hostname: string, + rrtype: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void, + ): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace resolve { + function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; + function __promisify__(hostname: string, rrtype: "ANY"): Promise; + function __promisify__(hostname: string, rrtype: "MX"): Promise; + function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; + function __promisify__(hostname: string, rrtype: "SOA"): Promise; + function __promisify__(hostname: string, rrtype: "SRV"): Promise; + function __promisify__(hostname: string, rrtype: "TXT"): Promise; + function __promisify__(hostname: string, rrtype: string): Promise; + } + + function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; + function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace resolve4 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + + function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; + function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace resolve6 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + + function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + namespace resolveCname { + function __promisify__(hostname: string): Promise; + } + + function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; + namespace resolveMx { + function __promisify__(hostname: string): Promise; + } + + function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; + namespace resolveNaptr { + function __promisify__(hostname: string): Promise; + } + + function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + namespace resolveNs { + function __promisify__(hostname: string): Promise; + } + + function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; + namespace resolvePtr { + function __promisify__(hostname: string): Promise; + } + + function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void; + namespace resolveSoa { + function __promisify__(hostname: string): Promise; + } + + function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; + namespace resolveSrv { + function __promisify__(hostname: string): Promise; + } + + function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; + namespace resolveTxt { + function __promisify__(hostname: string): Promise; + } + + function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; + namespace resolveAny { + function __promisify__(hostname: string): Promise; + } + + function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void; + function setServers(servers: ReadonlyArray): void; + function getServers(): string[]; + + // Error codes + const NODATA: string; + const FORMERR: string; + const SERVFAIL: string; + const NOTFOUND: string; + const NOTIMP: string; + const REFUSED: string; + const BADQUERY: string; + const BADNAME: string; + const BADFAMILY: string; + const BADRESP: string; + const CONNREFUSED: string; + const TIMEOUT: string; + const EOF: string; + const FILE: string; + const NOMEM: string; + const DESTRUCTION: string; + const BADSTR: string; + const BADFLAGS: string; + const NONAME: string; + const BADHINTS: string; + const NOTINITIALIZED: string; + const LOADIPHLPAPI: string; + const ADDRGETNETWORKPARAMS: string; + const CANCELLED: string; + + class Resolver { + getServers: typeof getServers; + setServers: typeof setServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + cancel(): void; + } + + namespace promises { + function getServers(): string[]; + + function lookup(hostname: string, family: number): Promise; + function lookup(hostname: string, options: LookupOneOptions): Promise; + function lookup(hostname: string, options: LookupAllOptions): Promise; + function lookup(hostname: string, options: LookupOptions): Promise; + function lookup(hostname: string): Promise; + + function lookupService(address: string, port: number): Promise<{ hostname: string, service: string }>; + + function resolve(hostname: string): Promise; + function resolve(hostname: string, rrtype: "A"): Promise; + function resolve(hostname: string, rrtype: "AAAA"): Promise; + function resolve(hostname: string, rrtype: "ANY"): Promise; + function resolve(hostname: string, rrtype: "CNAME"): Promise; + function resolve(hostname: string, rrtype: "MX"): Promise; + function resolve(hostname: string, rrtype: "NAPTR"): Promise; + function resolve(hostname: string, rrtype: "NS"): Promise; + function resolve(hostname: string, rrtype: "PTR"): Promise; + function resolve(hostname: string, rrtype: "SOA"): Promise; + function resolve(hostname: string, rrtype: "SRV"): Promise; + function resolve(hostname: string, rrtype: "TXT"): Promise; + function resolve(hostname: string, rrtype: string): Promise; + + function resolve4(hostname: string): Promise; + function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve4(hostname: string, options: ResolveOptions): Promise; + + function resolve6(hostname: string): Promise; + function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve6(hostname: string, options: ResolveOptions): Promise; + + function resolveAny(hostname: string): Promise; + + function resolveCname(hostname: string): Promise; + + function resolveMx(hostname: string): Promise; + + function resolveNaptr(hostname: string): Promise; + + function resolveNs(hostname: string): Promise; + + function resolvePtr(hostname: string): Promise; + + function resolveSoa(hostname: string): Promise; + + function resolveSrv(hostname: string): Promise; + + function resolveTxt(hostname: string): Promise; + + function reverse(ip: string): Promise; + + function setServers(servers: ReadonlyArray): void; + + class Resolver { + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + setServers: typeof setServers; + } + } +} diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts new file mode 100644 index 00000000..45e388c4 --- /dev/null +++ b/node_modules/@types/node/domain.d.ts @@ -0,0 +1,16 @@ +declare module "domain" { + import * as events from "events"; + + class Domain extends events.EventEmitter implements NodeJS.Domain { + run(fn: (...args: any[]) => T, ...args: any[]): T; + add(emitter: events.EventEmitter | NodeJS.Timer): void; + remove(emitter: events.EventEmitter | NodeJS.Timer): void; + bind(cb: T): T; + intercept(cb: T): T; + members: Array; + enter(): void; + exit(): void; + } + + function create(): Domain; +} diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts new file mode 100644 index 00000000..f8610210 --- /dev/null +++ b/node_modules/@types/node/events.d.ts @@ -0,0 +1,30 @@ +declare module "events" { + class internal extends NodeJS.EventEmitter { } + + namespace internal { + function once(emitter: EventEmitter, event: string | symbol): Promise; + class EventEmitter extends internal { + /** @deprecated since v4.0.0 */ + static listenerCount(emitter: EventEmitter, event: string | symbol): number; + static defaultMaxListeners: number; + + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + rawListeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + eventNames(): Array; + listenerCount(type: string | symbol): number; + } + } + + export = internal; +} diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts new file mode 100644 index 00000000..bc015cec --- /dev/null +++ b/node_modules/@types/node/fs.d.ts @@ -0,0 +1,2297 @@ +declare module "fs" { + import * as stream from "stream"; + import * as events from "events"; + import { URL } from "url"; + + /** + * Valid types for path values in "fs". + */ + type PathLike = string | Buffer | URL; + + type BinaryData = DataView | NodeJS.TypedArray; + class Stats { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + dev: number; + ino: number; + mode: number; + nlink: number; + uid: number; + gid: number; + rdev: number; + size: number; + blksize: number; + blocks: number; + atimeMs: number; + mtimeMs: number; + ctimeMs: number; + birthtimeMs: number; + atime: Date; + mtime: Date; + ctime: Date; + birthtime: Date; + } + + class Dirent { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + name: string; + } + + interface FSWatcher extends events.EventEmitter { + close(): void; + + /** + * events.EventEmitter + * 1. change + * 2. error + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + on(event: "error", listener: (error: Error) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + once(event: "error", listener: (error: Error) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + } + + class ReadStream extends stream.Readable { + close(): void; + bytesRead: number; + path: string | Buffer; + + /** + * events.EventEmitter + * 1. open + * 2. close + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "open", listener: (fd: number) => void): this; + addListener(event: "close", listener: () => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "open", listener: (fd: number) => void): this; + on(event: "close", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "open", listener: (fd: number) => void): this; + once(event: "close", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "open", listener: (fd: number) => void): this; + prependListener(event: "close", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "open", listener: (fd: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + } + + class WriteStream extends stream.Writable { + close(): void; + bytesWritten: number; + path: string | Buffer; + + /** + * events.EventEmitter + * 1. open + * 2. close + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "open", listener: (fd: number) => void): this; + addListener(event: "close", listener: () => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "open", listener: (fd: number) => void): this; + on(event: "close", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "open", listener: (fd: number) => void): this; + once(event: "close", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "open", listener: (fd: number) => void): this; + prependListener(event: "close", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "open", listener: (fd: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + } + + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace rename { + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; + } + + /** + * Synchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function renameSync(oldPath: PathLike, newPath: PathLike): void; + + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void; + + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace truncate { + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(path: PathLike, len?: number | null): Promise; + } + + /** + * Synchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function truncateSync(path: PathLike, len?: number | null): void; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + */ + function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace ftruncate { + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(fd: number, len?: number | null): Promise; + } + + /** + * Synchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function ftruncateSync(fd: number, len?: number | null): void; + + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace chown { + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + + /** + * Synchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function chownSync(path: PathLike, uid: number, gid: number): void; + + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fchown { + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function __promisify__(fd: number, uid: number, gid: number): Promise; + } + + /** + * Synchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function fchownSync(fd: number, uid: number, gid: number): void; + + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace lchown { + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + + /** + * Synchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lchownSync(path: PathLike, uid: number, gid: number): void; + + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace chmod { + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: string | number): Promise; + } + + /** + * Synchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function chmodSync(path: PathLike, mode: string | number): void; + + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fchmod { + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(fd: number, mode: string | number): Promise; + } + + /** + * Synchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function fchmodSync(fd: number, mode: string | number): void; + + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace lchmod { + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: string | number): Promise; + } + + /** + * Synchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function lchmodSync(path: PathLike, mode: string | number): void; + + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace stat { + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function statSync(path: PathLike): Stats; + + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fstat { + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + + /** + * Synchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function fstatSync(fd: number): Stats; + + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace lstat { + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lstatSync(path: PathLike): Stats; + + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace link { + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function link(existingPath: PathLike, newPath: PathLike): Promise; + } + + /** + * Synchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function linkSync(existingPath: PathLike, newPath: PathLike): void; + + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void; + + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + */ + function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace symlink { + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; + + type Type = "dir" | "file" | "junction"; + } + + /** + * Synchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink( + path: PathLike, + options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, linkString: string) => void + ): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace readlink { + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + } + + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; + + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath( + path: PathLike, + options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void + ): void; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace realpath { + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + + function native( + path: PathLike, + options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void + ): void; + function native(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void; + function native(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; + function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; + } + + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; + + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; + + namespace realpathSync { + function native(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + function native(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; + function native(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; + } + + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace unlink { + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function unlinkSync(path: PathLike): void; + + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace rmdir { + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function rmdirSync(path: PathLike): void; + + export interface MakeDirectoryOptions { + /** + * Indicates whether parent folders should be created. + * @default false + */ + recursive?: boolean; + /** + * A file mode. If a string is passed, it is parsed as an octal integer. If not specified + * @default 0o777. + */ + mode?: number; + } + + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir(path: PathLike, options: number | string | MakeDirectoryOptions | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void; + + /** + * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace mkdir { + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__(path: PathLike, options?: number | string | MakeDirectoryOptions | null): Promise; + } + + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdirSync(path: PathLike, options?: number | string | MakeDirectoryOptions | null): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + */ + function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace mkdtemp { + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: { encoding?: string | null } | string | null): Promise; + } + + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; + + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options: { encoding: "buffer" } | "buffer"): Buffer; + + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options?: { encoding?: string | null } | string | null): string | Buffer; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, + ): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer", callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: { encoding?: string | null; withFileTypes?: false } | string | undefined | null, + callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void, + ): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace readdir { + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: "buffer" | { encoding: "buffer"; withFileTypes?: false }): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent + */ + function __promisify__(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise; + } + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): string[]; + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Buffer[]; + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): string[] | Buffer[]; + + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdirSync(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Dirent[]; + + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function close(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace close { + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + + /** + * Synchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function closeSync(fd: number): void; + + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace open { + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function __promisify__(path: PathLike, flags: string | number, mode?: string | number | null): Promise; + } + + /** + * Synchronous open(2) - open and possibly create a file, returning a file descriptor.. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function openSync(path: PathLike, flags: string | number, mode?: string | number | null): number; + + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace utimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; + } + + /** + * Synchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function utimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void; + + /** + * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace futimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(fd: number, atime: string | number | Date, mtime: string | number | Date): Promise; + } + + /** + * Synchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void; + + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function fsync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fsync { + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + + /** + * Synchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function fsyncSync(fd: number): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + position: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void + ): void; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + */ + function write(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function write( + fd: number, + string: any, + position: number | undefined | null, + encoding: string | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + */ + function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace write { + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function __promisify__( + fd: number, + buffer?: TBuffer, + offset?: number, + length?: number, + position?: number | null, + ): Promise<{ bytesWritten: number, buffer: TBuffer }>; + + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function __promisify__(fd: number, string: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>; + } + + /** + * Synchronously writes `buffer` to the file referenced by the supplied file descriptor, returning the number of bytes written. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function writeSync(fd: number, buffer: BinaryData, offset?: number | null, length?: number | null, position?: number | null): number; + + /** + * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. + * @param fd A file descriptor. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function writeSync(fd: number, string: any, position?: number | null, encoding?: string | null): number; + + /** + * Asynchronously reads data from the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function read( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: number | null, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace read { + /** + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function __promisify__(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>; + } + + /** + * Synchronously reads data from the file referenced by the supplied file descriptor, returning the number of bytes read. + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function readSync(fd: number, buffer: BinaryData, offset: number, length: number, position: number | null): number; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException | null, data: string) => void): void; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile( + path: PathLike | number, + options: { encoding?: string | null; flag?: string; } | string | undefined | null, + callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void, + ): void; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + */ + function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace readFile { + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__(path: PathLike | number, options: { encoding: string; flag?: string; } | string): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__(path: PathLike | number, options?: { encoding?: string | null; flag?: string; } | string | null): Promise; + } + + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. If a flag is not provided, it defaults to `'r'`. + */ + function readFileSync(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Buffer; + + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFileSync(path: PathLike | number, options: { encoding: string; flag?: string; } | string): string; + + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFileSync(path: PathLike | number, options?: { encoding?: string | null; flag?: string; } | string | null): string | Buffer; + + type WriteFileOptions = { encoding?: string | null; mode?: number | string; flag?: string; } | string | null; + + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function writeFile(path: PathLike | number, data: any, options: WriteFileOptions, callback: (err: NodeJS.ErrnoException | null) => void): void; + + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace writeFile { + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function __promisify__(path: PathLike | number, data: any, options?: WriteFileOptions): Promise; + } + + /** + * Synchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function writeFileSync(path: PathLike | number, data: any, options?: WriteFileOptions): void; + + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function appendFile(file: PathLike | number, data: any, options: WriteFileOptions, callback: (err: NodeJS.ErrnoException | null) => void): void; + + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace appendFile { + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function __promisify__(file: PathLike | number, data: any, options?: WriteFileOptions): Promise; + } + + /** + * Synchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function appendFileSync(file: PathLike | number, data: any, options?: WriteFileOptions): void; + + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + */ + function watchFile(filename: PathLike, options: { persistent?: boolean; interval?: number; } | undefined, listener: (curr: Stats, prev: Stats) => void): void; + + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): void; + + /** + * Stop watching for changes on `filename`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch( + filename: PathLike, + options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | BufferEncoding | undefined | null, + listener?: (event: string, filename: string) => void, + ): FSWatcher; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch(filename: PathLike, options: { encoding: "buffer", persistent?: boolean, recursive?: boolean } | "buffer", listener?: (event: string, filename: Buffer) => void): FSWatcher; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch( + filename: PathLike, + options: { encoding?: string | null, persistent?: boolean, recursive?: boolean } | string | null, + listener?: (event: string, filename: string | Buffer) => void, + ): FSWatcher; + + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function watch(filename: PathLike, listener?: (event: string, filename: string) => any): FSWatcher; + + /** + * Asynchronously tests whether or not the given path exists by checking with the file system. + * @deprecated + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function exists(path: PathLike, callback: (exists: boolean) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace exists { + /** + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike): Promise; + } + + /** + * Synchronously tests whether or not the given path exists by checking with the file system. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function existsSync(path: PathLike): boolean; + + namespace constants { + // File Access Constants + + /** Constant for fs.access(). File is visible to the calling process. */ + const F_OK: number; + + /** Constant for fs.access(). File can be read by the calling process. */ + const R_OK: number; + + /** Constant for fs.access(). File can be written by the calling process. */ + const W_OK: number; + + /** Constant for fs.access(). File can be executed by the calling process. */ + const X_OK: number; + + // File Copy Constants + + /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ + const COPYFILE_EXCL: number; + + /** + * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. + */ + const COPYFILE_FICLONE: number; + + /** + * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then the operation will fail with an error. + */ + const COPYFILE_FICLONE_FORCE: number; + + // File Open Constants + + /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ + const O_RDONLY: number; + + /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ + const O_WRONLY: number; + + /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ + const O_RDWR: number; + + /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ + const O_CREAT: number; + + /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ + const O_EXCL: number; + + /** + * Constant for fs.open(). Flag indicating that if path identifies a terminal device, + * opening the path shall not cause that terminal to become the controlling terminal for the process + * (if the process does not already have one). + */ + const O_NOCTTY: number; + + /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ + const O_TRUNC: number; + + /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ + const O_APPEND: number; + + /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ + const O_DIRECTORY: number; + + /** + * constant for fs.open(). + * Flag indicating reading accesses to the file system will no longer result in + * an update to the atime information associated with the file. + * This flag is available on Linux operating systems only. + */ + const O_NOATIME: number; + + /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ + const O_NOFOLLOW: number; + + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ + const O_SYNC: number; + + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ + const O_DSYNC: number; + + /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ + const O_SYMLINK: number; + + /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ + const O_DIRECT: number; + + /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ + const O_NONBLOCK: number; + + // File Type Constants + + /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ + const S_IFMT: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ + const S_IFREG: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ + const S_IFDIR: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ + const S_IFCHR: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ + const S_IFBLK: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ + const S_IFIFO: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ + const S_IFLNK: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ + const S_IFSOCK: number; + + // File Mode Constants + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ + const S_IRWXU: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ + const S_IRUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ + const S_IWUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ + const S_IXUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ + const S_IRWXG: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ + const S_IRGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ + const S_IWGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ + const S_IXGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ + const S_IRWXO: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ + const S_IROTH: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ + const S_IWOTH: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ + const S_IXOTH: number; + } + + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException | null) => void): void; + + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function access(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace access { + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike, mode?: number): Promise; + } + + /** + * Synchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function accessSync(path: PathLike, mode?: number): void; + + /** + * Returns a new `ReadStream` object. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function createReadStream(path: PathLike, options?: string | { + flags?: string; + encoding?: string; + fd?: number; + mode?: number; + autoClose?: boolean; + start?: number; + end?: number; + highWaterMark?: number; + }): ReadStream; + + /** + * Returns a new `WriteStream` object. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function createWriteStream(path: PathLike, options?: string | { + flags?: string; + encoding?: string; + fd?: number; + mode?: number; + autoClose?: boolean; + start?: number; + highWaterMark?: number; + }): WriteStream; + + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace fdatasync { + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + + /** + * Synchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function fdatasyncSync(fd: number): void; + + /** + * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. + * No arguments other than a possible exception are given to the callback function. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + */ + function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; + /** + * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. + * No arguments other than a possible exception are given to the callback function. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists. + */ + function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException | null) => void): void; + + // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. + namespace copyFile { + /** + * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. + * No arguments other than a possible exception are given to the callback function. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An optional integer that specifies the behavior of the copy operation. + * The only supported flag is fs.constants.COPYFILE_EXCL, + * which causes the copy operation to fail if dest already exists. + */ + function __promisify__(src: PathLike, dst: PathLike, flags?: number): Promise; + } + + /** + * Synchronously copies src to dest. By default, dest is overwritten if it already exists. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An optional integer that specifies the behavior of the copy operation. + * The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists. + */ + function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void; + + namespace promises { + interface FileHandle { + /** + * Gets the file descriptor for this file handle. + */ + readonly fd: number; + + /** + * Asynchronously append data to a file, creating the file if it does not exist. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for appending. + * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + appendFile(data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; + + /** + * Asynchronous fchown(2) - Change ownership of a file. + */ + chown(uid: number, gid: number): Promise; + + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + chmod(mode: string | number): Promise; + + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + */ + datasync(): Promise; + + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + */ + sync(): Promise; + + /** + * Asynchronously reads data from the file. + * The `FileHandle` must have been opened for reading. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + read(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>; + + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile(options?: { encoding?: null, flag?: string | number } | null): Promise; + + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile(options: { encoding: BufferEncoding, flag?: string | number } | BufferEncoding): Promise; + + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile(options?: { encoding?: string | null, flag?: string | number } | string | null): Promise; + + /** + * Asynchronous fstat(2) - Get file status. + */ + stat(): Promise; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param len If not specified, defaults to `0`. + */ + truncate(len?: number): Promise; + + /** + * Asynchronously change file timestamps of the file. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + utimes(atime: string | number | Date, mtime: string | number | Date): Promise; + + /** + * Asynchronously writes `buffer` to the file. + * The `FileHandle` must have been opened for writing. + * @param buffer The buffer that the data will be written to. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + write(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>; + + /** + * Asynchronously writes `string` to the file. + * The `FileHandle` must have been opened for writing. + * It is unsafe to call `write()` multiple times on the same file without waiting for the `Promise` + * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + write(data: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>; + + /** + * Asynchronously writes data to a file, replacing the file if it already exists. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for writing. + * It is unsafe to call `writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). + * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + writeFile(data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; + + /** + * Asynchronous close(2) - close a `FileHandle`. + */ + close(): Promise; + } + + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function access(path: PathLike, mode?: number): Promise; + + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it already exists. + * Node.js makes no guarantees about the atomicity of the copy operation. + * If an error occurs after the destination file has been opened for writing, Node.js will attempt + * to remove the destination. + * @param src A path to the source file. + * @param dest A path to the destination file. + * @param flags An optional integer that specifies the behavior of the copy operation. The only + * supported flag is `fs.constants.COPYFILE_EXCL`, which causes the copy operation to fail if + * `dest` already exists. + */ + function copyFile(src: PathLike, dest: PathLike, flags?: number): Promise; + + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not + * supplied, defaults to `0o666`. + */ + function open(path: PathLike, flags: string | number, mode?: string | number): Promise; + + /** + * Asynchronously reads data from the file referenced by the supplied `FileHandle`. + * @param handle A `FileHandle`. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If + * `null`, data will be read from the current position. + */ + function read( + handle: FileHandle, + buffer: TBuffer, + offset?: number | null, + length?: number | null, + position?: number | null, + ): Promise<{ bytesRead: number, buffer: TBuffer }>; + + /** + * Asynchronously writes `buffer` to the file referenced by the supplied `FileHandle`. + * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise` + * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. + * @param handle A `FileHandle`. + * @param buffer The buffer that the data will be written to. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write( + handle: FileHandle, + buffer: TBuffer, + offset?: number | null, + length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>; + + /** + * Asynchronously writes `string` to the file referenced by the supplied `FileHandle`. + * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise` + * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. + * @param handle A `FileHandle`. + * @param string A string to write. If something other than a string is supplied it will be coerced to a string. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function write(handle: FileHandle, string: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>; + + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function rename(oldPath: PathLike, newPath: PathLike): Promise; + + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function truncate(path: PathLike, len?: number): Promise; + + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param handle A `FileHandle`. + * @param len If not specified, defaults to `0`. + */ + function ftruncate(handle: FileHandle, len?: number): Promise; + + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function rmdir(path: PathLike): Promise; + + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param handle A `FileHandle`. + */ + function fdatasync(handle: FileHandle): Promise; + + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param handle A `FileHandle`. + */ + function fsync(handle: FileHandle): Promise; + + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir(path: PathLike, options?: number | string | MakeDirectoryOptions | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir(path: PathLike, options?: { encoding?: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): Promise; + + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; + + /** + * Asynchronous fstat(2) - Get file status. + * @param handle A `FileHandle`. + */ + function fstat(handle: FileHandle): Promise; + + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lstat(path: PathLike): Promise; + + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function stat(path: PathLike): Promise; + + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function link(existingPath: PathLike, newPath: PathLike): Promise; + + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function unlink(path: PathLike): Promise; + + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param handle A `FileHandle`. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function fchmod(handle: FileHandle, mode: string | number): Promise; + + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function chmod(path: PathLike, mode: string | number): Promise; + + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function lchmod(path: PathLike, mode: string | number): Promise; + + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lchown(path: PathLike, uid: number, gid: number): Promise; + + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param handle A `FileHandle`. + */ + function fchown(handle: FileHandle, uid: number, gid: number): Promise; + + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function chown(path: PathLike, uid: number, gid: number): Promise; + + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; + + /** + * Asynchronously change file timestamps of the file referenced by the supplied `FileHandle`. + * @param handle A `FileHandle`. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function futimes(handle: FileHandle, atime: string | number | Date, mtime: string | number | Date): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: { encoding: "buffer" } | "buffer"): Promise; + + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options?: { encoding?: string | null } | string | null): Promise; + + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * It is unsafe to call `fsPromises.writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function writeFile(path: PathLike | FileHandle, data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; + + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function appendFile(path: PathLike | FileHandle, data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | FileHandle, options?: { encoding?: null, flag?: string | number } | null): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | FileHandle, options: { encoding: BufferEncoding, flag?: string | number } | BufferEncoding): Promise; + + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile(path: PathLike | FileHandle, options?: { encoding?: string | null, flag?: string | number } | string | null): Promise; + } +} diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts new file mode 100644 index 00000000..5de9e98f --- /dev/null +++ b/node_modules/@types/node/globals.d.ts @@ -0,0 +1,1180 @@ +// This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build +interface Console { + Console: NodeJS.ConsoleConstructor; + /** + * A simple assertion test that verifies whether `value` is truthy. + * If it is not, an `AssertionError` is thrown. + * If provided, the error `message` is formatted using `util.format()` and used as the error message. + */ + assert(value: any, message?: string, ...optionalParams: any[]): void; + /** + * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the TTY. + * When `stdout` is not a TTY, this method does nothing. + */ + clear(): void; + /** + * Maintains an internal counter specific to `label` and outputs to `stdout` the number of times `console.count()` has been called with the given `label`. + */ + count(label?: string): void; + /** + * Resets the internal counter specific to `label`. + */ + countReset(label?: string): void; + /** + * The `console.debug()` function is an alias for {@link console.log()}. + */ + debug(message?: any, ...optionalParams: any[]): void; + /** + * Uses {@link util.inspect()} on `obj` and prints the resulting string to `stdout`. + * This function bypasses any custom `inspect()` function defined on `obj`. + */ + dir(obj: any, options?: NodeJS.InspectOptions): void; + /** + * This method calls {@link console.log()} passing it the arguments received. Please note that this method does not produce any XML formatting + */ + dirxml(...data: any[]): void; + /** + * Prints to `stderr` with newline. + */ + error(message?: any, ...optionalParams: any[]): void; + /** + * Increases indentation of subsequent lines by two spaces. + * If one or more `label`s are provided, those are printed first without the additional indentation. + */ + group(...label: any[]): void; + /** + * The `console.groupCollapsed()` function is an alias for {@link console.group()}. + */ + groupCollapsed(...label: any[]): void; + /** + * Decreases indentation of subsequent lines by two spaces. + */ + groupEnd(): void; + /** + * The {@link console.info()} function is an alias for {@link console.log()}. + */ + info(message?: any, ...optionalParams: any[]): void; + /** + * Prints to `stdout` with newline. + */ + log(message?: any, ...optionalParams: any[]): void; + /** + * This method does not display anything unless used in the inspector. + * Prints to `stdout` the array `array` formatted as a table. + */ + table(tabularData: any, properties?: string[]): void; + /** + * Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`. + */ + time(label?: string): void; + /** + * Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`. + */ + timeEnd(label?: string): void; + /** + * For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`. + */ + timeLog(label?: string, ...data: any[]): void; + /** + * Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code. + */ + trace(message?: any, ...optionalParams: any[]): void; + /** + * The {@link console.warn()} function is an alias for {@link console.error()}. + */ + warn(message?: any, ...optionalParams: any[]): void; + + // --- Inspector mode only --- + /** + * This method does not display anything unless used in the inspector. + * The console.markTimeline() method is the deprecated form of console.timeStamp(). + * + * @deprecated Use console.timeStamp() instead. + */ + markTimeline(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * Starts a JavaScript CPU profile with an optional label. + */ + profile(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector. + */ + profileEnd(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * Adds an event with the label `label` to the Timeline panel of the inspector. + */ + timeStamp(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * The console.timeline() method is the deprecated form of console.time(). + * + * @deprecated Use console.time() instead. + */ + timeline(label?: string): void; + /** + * This method does not display anything unless used in the inspector. + * The console.timelineEnd() method is the deprecated form of console.timeEnd(). + * + * @deprecated Use console.timeEnd() instead. + */ + timelineEnd(label?: string): void; +} + +interface Error { + stack?: string; +} + +// Declare "static" methods in Error +interface ErrorConstructor { + /** Create .stack property on a target object */ + captureStackTrace(targetObject: Object, constructorOpt?: Function): void; + + /** + * Optional override for formatting stack traces + * + * @see https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces + */ + prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any; + + stackTraceLimit: number; +} + +interface SymbolConstructor { + readonly observable: symbol; +} + +// Node.js ESNEXT support +interface String { + /** Removes whitespace from the left end of a string. */ + trimLeft(): string; + /** Removes whitespace from the right end of a string. */ + trimRight(): string; +} + +interface ImportMeta { + url: string; +} + +/*-----------------------------------------------* + * * + * GLOBAL * + * * + ------------------------------------------------*/ +declare var process: NodeJS.Process; +declare var global: NodeJS.Global; +declare var console: Console; + +declare var __filename: string; +declare var __dirname: string; + +declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; +declare namespace setTimeout { + function __promisify__(ms: number): Promise; + function __promisify__(ms: number, value: T): Promise; +} +declare function clearTimeout(timeoutId: NodeJS.Timeout): void; +declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; +declare function clearInterval(intervalId: NodeJS.Timeout): void; +declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate; +declare namespace setImmediate { + function __promisify__(): Promise; + function __promisify__(value: T): Promise; +} +declare function clearImmediate(immediateId: NodeJS.Immediate): void; + +/** + * @experimental + */ +declare function queueMicrotask(callback: () => void): void; + +// TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version. +interface NodeRequireFunction { + /* tslint:disable-next-line:callable-types */ + (id: string): any; +} + +interface NodeRequire extends NodeRequireFunction { + resolve: RequireResolve; + cache: any; + /** + * @deprecated + */ + extensions: NodeExtensions; + main: NodeModule | undefined; +} + +interface RequireResolve { + (id: string, options?: { paths?: string[]; }): string; + paths(request: string): string[] | null; +} + +interface NodeExtensions { + '.js': (m: NodeModule, filename: string) => any; + '.json': (m: NodeModule, filename: string) => any; + '.node': (m: NodeModule, filename: string) => any; + [ext: string]: (m: NodeModule, filename: string) => any; +} + +declare var require: NodeRequire; + +interface NodeModule { + exports: any; + require: NodeRequireFunction; + id: string; + filename: string; + loaded: boolean; + parent: NodeModule | null; + children: NodeModule[]; + paths: string[]; +} + +declare var module: NodeModule; + +// Same as module.exports +declare var exports: any; + +// Buffer class +type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex"; + +interface Buffer { + constructor: typeof Buffer; +} + +/** + * Raw data is stored in instances of the Buffer class. + * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. + * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + */ +declare class Buffer extends Uint8Array { + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. + */ + constructor(str: string, encoding?: BufferEncoding); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). + */ + constructor(size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + constructor(array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}/{SharedArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. + */ + constructor(arrayBuffer: ArrayBuffer | SharedArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + constructor(array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead. + */ + constructor(buffer: Buffer); + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer() + */ + static from(arrayBuffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param data data to create a new Buffer + */ + static from(data: number[]): Buffer; + static from(data: Uint8Array): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + */ + static from(str: string, encoding?: BufferEncoding): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param values to create a new Buffer + */ + static of(...items: number[]): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): encoding is BufferEncoding; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength( + string: string | NodeJS.TypedArray | DataView | ArrayBuffer | SharedArrayBuffer, + encoding?: BufferEncoding + ): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Uint8Array[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Uint8Array, buf2: Uint8Array): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initalizing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; + /** + * This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified. + */ + static poolSize: number; + + write(string: string, encoding?: BufferEncoding): number; + write(string: string, offset: number, encoding?: BufferEncoding): number; + write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer'; data: number[] }; + equals(otherBuffer: Uint8Array): boolean; + compare( + otherBuffer: Uint8Array, + targetStart?: number, + targetEnd?: number, + sourceStart?: number, + sourceEnd?: number + ): number; + copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + /** + * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices. + * + * This method is incompatible with `Uint8Array#slice()`, which returns a copy of the original memory. + * + * @param begin Where the new `Buffer` will start. Default: `0`. + * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`. + */ + slice(begin?: number, end?: number): Buffer; + /** + * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices. + * + * This method is compatible with `Uint8Array#subarray()`. + * + * @param begin Where the new `Buffer` will start. Default: `0`. + * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`. + */ + subarray(begin?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number): number; + writeUIntBE(value: number, offset: number, byteLength: number): number; + writeIntLE(value: number, offset: number, byteLength: number): number; + writeIntBE(value: number, offset: number, byteLength: number): number; + readUIntLE(offset: number, byteLength: number): number; + readUIntBE(offset: number, byteLength: number): number; + readIntLE(offset: number, byteLength: number): number; + readIntBE(offset: number, byteLength: number): number; + readUInt8(offset: number): number; + readUInt16LE(offset: number): number; + readUInt16BE(offset: number): number; + readUInt32LE(offset: number): number; + readUInt32BE(offset: number): number; + readInt8(offset: number): number; + readInt16LE(offset: number): number; + readInt16BE(offset: number): number; + readInt32LE(offset: number): number; + readInt32BE(offset: number): number; + readFloatLE(offset: number): number; + readFloatBE(offset: number): number; + readDoubleLE(offset: number): number; + readDoubleBE(offset: number): number; + reverse(): this; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number): number; + writeUInt16LE(value: number, offset: number): number; + writeUInt16BE(value: number, offset: number): number; + writeUInt32LE(value: number, offset: number): number; + writeUInt32BE(value: number, offset: number): number; + writeInt8(value: number, offset: number): number; + writeInt16LE(value: number, offset: number): number; + writeInt16BE(value: number, offset: number): number; + writeInt32LE(value: number, offset: number): number; + writeInt32BE(value: number, offset: number): number; + writeFloatLE(value: number, offset: number): number; + writeFloatBE(value: number, offset: number): number; + writeDoubleLE(value: number, offset: number): number; + writeDoubleBE(value: number, offset: number): number; + + fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; + + indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + entries(): IterableIterator<[number, number]>; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean; + keys(): IterableIterator; + values(): IterableIterator; +} + +/*----------------------------------------------* +* * +* GLOBAL INTERFACES * +* * +*-----------------------------------------------*/ +declare namespace NodeJS { + interface InspectOptions { + /** + * If set to `true`, getters are going to be + * inspected as well. If set to `'get'` only getters without setter are going + * to be inspected. If set to `'set'` only getters having a corresponding + * setter are going to be inspected. This might cause side effects depending on + * the getter function. + * @default `false` + */ + getters?: 'get' | 'set' | boolean; + showHidden?: boolean; + /** + * @default 2 + */ + depth?: number | null; + colors?: boolean; + customInspect?: boolean; + showProxy?: boolean; + maxArrayLength?: number | null; + breakLength?: number; + /** + * Setting this to `false` causes each object key + * to be displayed on a new line. It will also add new lines to text that is + * longer than `breakLength`. If set to a number, the most `n` inner elements + * are united on a single line as long as all properties fit into + * `breakLength`. Short array elements are also grouped together. Note that no + * text will be reduced below 16 characters, no matter the `breakLength` size. + * For more information, see the example below. + * @default `true` + */ + compact?: boolean | number; + sorted?: boolean | ((a: string, b: string) => number); + } + + interface ConsoleConstructorOptions { + stdout: WritableStream; + stderr?: WritableStream; + ignoreErrors?: boolean; + colorMode?: boolean | 'auto'; + inspectOptions?: InspectOptions; + } + + interface ConsoleConstructor { + prototype: Console; + new(stdout: WritableStream, stderr?: WritableStream, ignoreErrors?: boolean): Console; + new(options: ConsoleConstructorOptions): Console; + } + + interface CallSite { + /** + * Value of "this" + */ + getThis(): any; + + /** + * Type of "this" as a string. + * This is the name of the function stored in the constructor field of + * "this", if available. Otherwise the object's [[Class]] internal + * property. + */ + getTypeName(): string | null; + + /** + * Current function + */ + getFunction(): Function | undefined; + + /** + * Name of the current function, typically its name property. + * If a name property is not available an attempt will be made to try + * to infer a name from the function's context. + */ + getFunctionName(): string | null; + + /** + * Name of the property [of "this" or one of its prototypes] that holds + * the current function + */ + getMethodName(): string | null; + + /** + * Name of the script [if this function was defined in a script] + */ + getFileName(): string | null; + + /** + * Current line number [if this function was defined in a script] + */ + getLineNumber(): number | null; + + /** + * Current column number [if this function was defined in a script] + */ + getColumnNumber(): number | null; + + /** + * A call site object representing the location where eval was called + * [if this function was created using a call to eval] + */ + getEvalOrigin(): string | undefined; + + /** + * Is this a toplevel invocation, that is, is "this" the global object? + */ + isToplevel(): boolean; + + /** + * Does this call take place in code defined by a call to eval? + */ + isEval(): boolean; + + /** + * Is this call in native V8 code? + */ + isNative(): boolean; + + /** + * Is this a constructor call? + */ + isConstructor(): boolean; + } + + interface ErrnoException extends Error { + errno?: number; + code?: string; + path?: string; + syscall?: string; + stack?: string; + } + + class EventEmitter { + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + rawListeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + listenerCount(type: string | symbol): number; + // Added in Node 6... + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + eventNames(): Array; + } + + interface ReadableStream extends EventEmitter { + readable: boolean; + read(size?: number): string | Buffer; + setEncoding(encoding: string): this; + pause(): this; + resume(): this; + isPaused(): boolean; + pipe(destination: T, options?: { end?: boolean; }): T; + unpipe(destination?: WritableStream): this; + unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; + wrap(oldStream: ReadableStream): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + interface WritableStream extends EventEmitter { + writable: boolean; + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + write(str: string, encoding?: string, cb?: (err?: Error | null) => void): boolean; + end(cb?: () => void): void; + end(data: string | Uint8Array, cb?: () => void): void; + end(str: string, encoding?: string, cb?: () => void): void; + } + + interface ReadWriteStream extends ReadableStream, WritableStream { } + + interface Events extends EventEmitter { } + + interface Domain extends Events { + run(fn: (...args: any[]) => T, ...args: any[]): T; + add(emitter: EventEmitter | Timer): void; + remove(emitter: EventEmitter | Timer): void; + bind(cb: T): T; + intercept(cb: T): T; + + addListener(event: string, listener: (...args: any[]) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + removeListener(event: string, listener: (...args: any[]) => void): this; + removeAllListeners(event?: string): this; + } + + interface MemoryUsage { + rss: number; + heapTotal: number; + heapUsed: number; + external: number; + } + + interface CpuUsage { + user: number; + system: number; + } + + interface ProcessRelease { + name: string; + sourceUrl?: string; + headersUrl?: string; + libUrl?: string; + lts?: string; + } + + interface ProcessVersions { + http_parser: string; + node: string; + v8: string; + ares: string; + uv: string; + zlib: string; + modules: string; + openssl: string; + } + + type Platform = 'aix' + | 'android' + | 'darwin' + | 'freebsd' + | 'linux' + | 'openbsd' + | 'sunos' + | 'win32' + | 'cygwin'; + + type Signals = + "SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" | + "SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" | + "SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" | + "SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO"; + + type MultipleResolveType = 'resolve' | 'reject'; + + type BeforeExitListener = (code: number) => void; + type DisconnectListener = () => void; + type ExitListener = (code: number) => void; + type RejectionHandledListener = (promise: Promise) => void; + type UncaughtExceptionListener = (error: Error) => void; + type UnhandledRejectionListener = (reason: {} | null | undefined, promise: Promise) => void; + type WarningListener = (warning: Error) => void; + type MessageListener = (message: any, sendHandle: any) => void; + type SignalsListener = (signal: Signals) => void; + type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void; + type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void; + type MultipleResolveListener = (type: MultipleResolveType, promise: Promise, value: any) => void; + + interface Socket extends ReadWriteStream { + isTTY?: true; + } + + interface ProcessEnv { + [key: string]: string | undefined; + } + + interface WriteStream extends Socket { + readonly writableFinished: boolean; + readonly writableHighWaterMark: number; + readonly writableLength: number; + columns?: number; + rows?: number; + _write(chunk: any, encoding: string, callback: (err?: null | Error) => void): void; + _destroy(err: Error | null, callback: (err?: null | Error) => void): void; + _final(callback: (err?: null | Error) => void): void; + setDefaultEncoding(encoding: string): this; + cork(): void; + uncork(): void; + destroy(error?: Error): void; + } + interface ReadStream extends Socket { + readonly readableHighWaterMark: number; + readonly readableLength: number; + isRaw?: boolean; + setRawMode?(mode: boolean): void; + _read(size: number): void; + _destroy(err: Error | null, callback: (err?: null | Error) => void): void; + push(chunk: any, encoding?: string): boolean; + destroy(error?: Error): void; + } + + interface HRTime { + (time?: [number, number]): [number, number]; + } + + interface ProcessReport { + /** + * Directory where the report is written. + * working directory of the Node.js process. + * @default '' indicating that reports are written to the current + */ + directory: string; + + /** + * Filename where the report is written. + * The default value is the empty string. + * @default '' the output filename will be comprised of a timestamp, + * PID, and sequence number. + */ + filename: string; + + /** + * Returns a JSON-formatted diagnostic report for the running process. + * The report's JavaScript stack trace is taken from err, if present. + */ + getReport(err?: Error): string; + + /** + * If true, a diagnostic report is generated on fatal errors, + * such as out of memory errors or failed C++ assertions. + * @default false + */ + reportOnFatalError: boolean; + + /** + * If true, a diagnostic report is generated when the process + * receives the signal specified by process.report.signal. + * @defaul false + */ + reportOnSignal: boolean; + + /** + * If true, a diagnostic report is generated on uncaught exception. + * @default false + */ + reportOnUncaughtException: boolean; + + /** + * The signal used to trigger the creation of a diagnostic report. + * @default 'SIGUSR2' + */ + signal: Signals; + + /** + * Writes a diagnostic report to a file. If filename is not provided, the default filename + * includes the date, time, PID, and a sequence number. + * The report's JavaScript stack trace is taken from err, if present. + * + * @param fileName Name of the file where the report is written. + * This should be a relative path, that will be appended to the directory specified in + * `process.report.directory`, or the current working directory of the Node.js process, + * if unspecified. + * @param error A custom error used for reporting the JavaScript stack. + * @return Filename of the generated report. + */ + writeReport(fileName?: string): string; + writeReport(error?: Error): string; + writeReport(fileName?: string, err?: Error): string; + } + + interface ResourceUsage { + fsRead: number; + fsWrite: number; + involuntaryContextSwitches: number; + ipcReceived: number; + ipcSent: number; + majorPageFault: number; + maxRSS: number; + minorPageFault: number; + sharedMemorySize: number; + signalsCount: number; + swappedOut: number; + systemCPUTime: number; + unsharedDataSize: number; + unsharedStackSize: number; + userCPUTime: number; + voluntaryContextSwitches: number; + } + + interface Process extends EventEmitter { + /** + * Can also be a tty.WriteStream, not typed due to limitation.s + */ + stdout: WriteStream; + /** + * Can also be a tty.WriteStream, not typed due to limitation.s + */ + stderr: WriteStream; + stdin: ReadStream; + openStdin(): Socket; + argv: string[]; + argv0: string; + execArgv: string[]; + execPath: string; + abort(): void; + chdir(directory: string): void; + cwd(): string; + debugPort: number; + emitWarning(warning: string | Error, name?: string, ctor?: Function): void; + env: ProcessEnv; + exit(code?: number): never; + exitCode?: number; + getgid(): number; + setgid(id: number | string): void; + getuid(): number; + setuid(id: number | string): void; + geteuid(): number; + seteuid(id: number | string): void; + getegid(): number; + setegid(id: number | string): void; + getgroups(): number[]; + setgroups(groups: Array): void; + setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void; + hasUncaughtExceptionCaptureCallback(): boolean; + version: string; + versions: ProcessVersions; + config: { + target_defaults: { + cflags: any[]; + default_configuration: string; + defines: string[]; + include_dirs: string[]; + libraries: string[]; + }; + variables: { + clang: number; + host_arch: string; + node_install_npm: boolean; + node_install_waf: boolean; + node_prefix: string; + node_shared_openssl: boolean; + node_shared_v8: boolean; + node_shared_zlib: boolean; + node_use_dtrace: boolean; + node_use_etw: boolean; + node_use_openssl: boolean; + target_arch: string; + v8_no_strict_aliasing: number; + v8_use_snapshot: boolean; + visibility: string; + }; + }; + kill(pid: number, signal?: string | number): void; + pid: number; + ppid: number; + title: string; + arch: string; + platform: Platform; + mainModule?: NodeModule; + memoryUsage(): MemoryUsage; + cpuUsage(previousValue?: CpuUsage): CpuUsage; + nextTick(callback: Function, ...args: any[]): void; + release: ProcessRelease; + features: { + inspector: boolean; + debug: boolean; + uv: boolean; + ipv6: boolean; + tls_alpn: boolean; + tls_sni: boolean; + tls_ocsp: boolean; + tls: boolean; + }; + /** + * Can only be set if not in worker thread. + */ + umask(mask?: number): number; + uptime(): number; + hrtime: HRTime; + domain: Domain; + + // Worker + send?(message: any, sendHandle?: any, options?: { swallowErrors?: boolean}, callback?: (error: Error | null) => void): boolean; + disconnect(): void; + connected: boolean; + + /** + * The `process.allowedNodeEnvironmentFlags` property is a special, + * read-only `Set` of flags allowable within the [`NODE_OPTIONS`][] + * environment variable. + */ + allowedNodeEnvironmentFlags: ReadonlySet; + + /** + * Only available with `--experimental-report` + */ + report?: ProcessReport; + + resourceUsage(): ResourceUsage; + + /** + * EventEmitter + * 1. beforeExit + * 2. disconnect + * 3. exit + * 4. message + * 5. rejectionHandled + * 6. uncaughtException + * 7. unhandledRejection + * 8. warning + * 9. message + * 10. + * 11. newListener/removeListener inherited from EventEmitter + */ + addListener(event: "beforeExit", listener: BeforeExitListener): this; + addListener(event: "disconnect", listener: DisconnectListener): this; + addListener(event: "exit", listener: ExitListener): this; + addListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + addListener(event: "warning", listener: WarningListener): this; + addListener(event: "message", listener: MessageListener): this; + addListener(event: Signals, listener: SignalsListener): this; + addListener(event: "newListener", listener: NewListenerListener): this; + addListener(event: "removeListener", listener: RemoveListenerListener): this; + addListener(event: "multipleResolves", listener: MultipleResolveListener): this; + + emit(event: "beforeExit", code: number): boolean; + emit(event: "disconnect"): boolean; + emit(event: "exit", code: number): boolean; + emit(event: "rejectionHandled", promise: Promise): boolean; + emit(event: "uncaughtException", error: Error): boolean; + emit(event: "unhandledRejection", reason: any, promise: Promise): boolean; + emit(event: "warning", warning: Error): boolean; + emit(event: "message", message: any, sendHandle: any): this; + emit(event: Signals, signal: Signals): boolean; + emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): this; + emit(event: "multipleResolves", listener: MultipleResolveListener): this; + + on(event: "beforeExit", listener: BeforeExitListener): this; + on(event: "disconnect", listener: DisconnectListener): this; + on(event: "exit", listener: ExitListener): this; + on(event: "rejectionHandled", listener: RejectionHandledListener): this; + on(event: "uncaughtException", listener: UncaughtExceptionListener): this; + on(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + on(event: "warning", listener: WarningListener): this; + on(event: "message", listener: MessageListener): this; + on(event: Signals, listener: SignalsListener): this; + on(event: "newListener", listener: NewListenerListener): this; + on(event: "removeListener", listener: RemoveListenerListener): this; + on(event: "multipleResolves", listener: MultipleResolveListener): this; + + once(event: "beforeExit", listener: BeforeExitListener): this; + once(event: "disconnect", listener: DisconnectListener): this; + once(event: "exit", listener: ExitListener): this; + once(event: "rejectionHandled", listener: RejectionHandledListener): this; + once(event: "uncaughtException", listener: UncaughtExceptionListener): this; + once(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + once(event: "warning", listener: WarningListener): this; + once(event: "message", listener: MessageListener): this; + once(event: Signals, listener: SignalsListener): this; + once(event: "newListener", listener: NewListenerListener): this; + once(event: "removeListener", listener: RemoveListenerListener): this; + once(event: "multipleResolves", listener: MultipleResolveListener): this; + + prependListener(event: "beforeExit", listener: BeforeExitListener): this; + prependListener(event: "disconnect", listener: DisconnectListener): this; + prependListener(event: "exit", listener: ExitListener): this; + prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + prependListener(event: "warning", listener: WarningListener): this; + prependListener(event: "message", listener: MessageListener): this; + prependListener(event: Signals, listener: SignalsListener): this; + prependListener(event: "newListener", listener: NewListenerListener): this; + prependListener(event: "removeListener", listener: RemoveListenerListener): this; + prependListener(event: "multipleResolves", listener: MultipleResolveListener): this; + + prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this; + prependOnceListener(event: "disconnect", listener: DisconnectListener): this; + prependOnceListener(event: "exit", listener: ExitListener): this; + prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + prependOnceListener(event: "warning", listener: WarningListener): this; + prependOnceListener(event: "message", listener: MessageListener): this; + prependOnceListener(event: Signals, listener: SignalsListener): this; + prependOnceListener(event: "newListener", listener: NewListenerListener): this; + prependOnceListener(event: "removeListener", listener: RemoveListenerListener): this; + prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this; + + listeners(event: "beforeExit"): BeforeExitListener[]; + listeners(event: "disconnect"): DisconnectListener[]; + listeners(event: "exit"): ExitListener[]; + listeners(event: "rejectionHandled"): RejectionHandledListener[]; + listeners(event: "uncaughtException"): UncaughtExceptionListener[]; + listeners(event: "unhandledRejection"): UnhandledRejectionListener[]; + listeners(event: "warning"): WarningListener[]; + listeners(event: "message"): MessageListener[]; + listeners(event: Signals): SignalsListener[]; + listeners(event: "newListener"): NewListenerListener[]; + listeners(event: "removeListener"): RemoveListenerListener[]; + listeners(event: "multipleResolves"): MultipleResolveListener[]; + } + + interface Global { + Array: typeof Array; + ArrayBuffer: typeof ArrayBuffer; + Boolean: typeof Boolean; + Buffer: typeof Buffer; + DataView: typeof DataView; + Date: typeof Date; + Error: typeof Error; + EvalError: typeof EvalError; + Float32Array: typeof Float32Array; + Float64Array: typeof Float64Array; + Function: typeof Function; + GLOBAL: Global; + Infinity: typeof Infinity; + Int16Array: typeof Int16Array; + Int32Array: typeof Int32Array; + Int8Array: typeof Int8Array; + Intl: typeof Intl; + JSON: typeof JSON; + Map: MapConstructor; + Math: typeof Math; + NaN: typeof NaN; + Number: typeof Number; + Object: typeof Object; + Promise: Function; + RangeError: typeof RangeError; + ReferenceError: typeof ReferenceError; + RegExp: typeof RegExp; + Set: SetConstructor; + String: typeof String; + Symbol: Function; + SyntaxError: typeof SyntaxError; + TypeError: typeof TypeError; + URIError: typeof URIError; + Uint16Array: typeof Uint16Array; + Uint32Array: typeof Uint32Array; + Uint8Array: typeof Uint8Array; + Uint8ClampedArray: Function; + WeakMap: WeakMapConstructor; + WeakSet: WeakSetConstructor; + clearImmediate: (immediateId: Immediate) => void; + clearInterval: (intervalId: Timeout) => void; + clearTimeout: (timeoutId: Timeout) => void; + console: typeof console; + decodeURI: typeof decodeURI; + decodeURIComponent: typeof decodeURIComponent; + encodeURI: typeof encodeURI; + encodeURIComponent: typeof encodeURIComponent; + escape: (str: string) => string; + eval: typeof eval; + global: Global; + isFinite: typeof isFinite; + isNaN: typeof isNaN; + parseFloat: typeof parseFloat; + parseInt: typeof parseInt; + process: Process; + root: Global; + setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate; + setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout; + setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout; + queueMicrotask: typeof queueMicrotask; + undefined: typeof undefined; + unescape: (str: string) => string; + gc: () => void; + v8debug?: any; + } + + // compatibility with older typings + interface Timer { + hasRef(): boolean; + ref(): this; + refresh(): this; + unref(): this; + } + + class Immediate { + hasRef(): boolean; + ref(): this; + unref(): this; + _onImmediate: Function; // to distinguish it from the Timeout class + } + + class Timeout implements Timer { + hasRef(): boolean; + ref(): this; + refresh(): this; + unref(): this; + } + + class Module { + static runMain(): void; + static wrap(code: string): string; + static createRequireFromPath(path: string): (path: string) => any; + static builtinModules: string[]; + + static Module: typeof Module; + + exports: any; + require: NodeRequireFunction; + id: string; + filename: string; + loaded: boolean; + parent: Module | null; + children: Module[]; + paths: string[]; + + constructor(id: string, parent?: Module); + } + + type TypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array; +} diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts new file mode 100644 index 00000000..31175d76 --- /dev/null +++ b/node_modules/@types/node/http.d.ts @@ -0,0 +1,279 @@ +declare module "http" { + import * as events from "events"; + import * as stream from "stream"; + import { URL } from "url"; + import { Socket, Server as NetServer } from "net"; + + // incoming headers will never contain number + interface IncomingHttpHeaders { + 'accept'?: string; + 'accept-language'?: string; + 'accept-patch'?: string; + 'accept-ranges'?: string; + 'access-control-allow-credentials'?: string; + 'access-control-allow-headers'?: string; + 'access-control-allow-methods'?: string; + 'access-control-allow-origin'?: string; + 'access-control-expose-headers'?: string; + 'access-control-max-age'?: string; + 'age'?: string; + 'allow'?: string; + 'alt-svc'?: string; + 'authorization'?: string; + 'cache-control'?: string; + 'connection'?: string; + 'content-disposition'?: string; + 'content-encoding'?: string; + 'content-language'?: string; + 'content-length'?: string; + 'content-location'?: string; + 'content-range'?: string; + 'content-type'?: string; + 'cookie'?: string; + 'date'?: string; + 'expect'?: string; + 'expires'?: string; + 'forwarded'?: string; + 'from'?: string; + 'host'?: string; + 'if-match'?: string; + 'if-modified-since'?: string; + 'if-none-match'?: string; + 'if-unmodified-since'?: string; + 'last-modified'?: string; + 'location'?: string; + 'pragma'?: string; + 'proxy-authenticate'?: string; + 'proxy-authorization'?: string; + 'public-key-pins'?: string; + 'range'?: string; + 'referer'?: string; + 'retry-after'?: string; + 'set-cookie'?: string[]; + 'strict-transport-security'?: string; + 'tk'?: string; + 'trailer'?: string; + 'transfer-encoding'?: string; + 'upgrade'?: string; + 'user-agent'?: string; + 'vary'?: string; + 'via'?: string; + 'warning'?: string; + 'www-authenticate'?: string; + [header: string]: string | string[] | undefined; + } + + // outgoing headers allows numbers (as they are converted internally to strings) + interface OutgoingHttpHeaders { + [header: string]: number | string | string[] | undefined; + } + + interface ClientRequestArgs { + protocol?: string; + host?: string; + hostname?: string; + family?: number; + port?: number | string; + defaultPort?: number | string; + localAddress?: string; + socketPath?: string; + method?: string; + path?: string; + headers?: OutgoingHttpHeaders; + auth?: string; + agent?: Agent | boolean; + _defaultAgent?: Agent; + timeout?: number; + setHost?: boolean; + // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278 + createConnection?: (options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket; + } + + interface ServerOptions { + IncomingMessage?: typeof IncomingMessage; + ServerResponse?: typeof ServerResponse; + } + + type RequestListener = (req: IncomingMessage, res: ServerResponse) => void; + + class Server extends NetServer { + constructor(requestListener?: RequestListener); + constructor(options: ServerOptions, requestListener?: RequestListener); + + setTimeout(msecs?: number, callback?: () => void): this; + setTimeout(callback: () => void): this; + /** + * Limits maximum incoming headers count. If set to 0, no limit will be applied. + * @default 2000 + * {@link https://nodejs.org/api/http.html#http_server_maxheaderscount} + */ + maxHeadersCount: number | null; + timeout: number; + /** + * Limit the amount of time the parser will wait to receive the complete HTTP headers. + * @default 40000 + * {@link https://nodejs.org/api/http.html#http_server_headerstimeout} + */ + headersTimeout: number; + keepAliveTimeout: number; + } + + // https://github.com/nodejs/node/blob/master/lib/_http_outgoing.js + class OutgoingMessage extends stream.Writable { + upgrading: boolean; + chunkedEncoding: boolean; + shouldKeepAlive: boolean; + useChunkedEncodingByDefault: boolean; + sendDate: boolean; + finished: boolean; + headersSent: boolean; + connection: Socket; + + constructor(); + + setTimeout(msecs: number, callback?: () => void): this; + setHeader(name: string, value: number | string | string[]): void; + getHeader(name: string): number | string | string[] | undefined; + getHeaders(): OutgoingHttpHeaders; + getHeaderNames(): string[]; + hasHeader(name: string): boolean; + removeHeader(name: string): void; + addTrailers(headers: OutgoingHttpHeaders | Array<[string, string]>): void; + flushHeaders(): void; + } + + // https://github.com/nodejs/node/blob/master/lib/_http_server.js#L108-L256 + class ServerResponse extends OutgoingMessage { + statusCode: number; + statusMessage: string; + + constructor(req: IncomingMessage); + + assignSocket(socket: Socket): void; + detachSocket(socket: Socket): void; + // https://github.com/nodejs/node/blob/master/test/parallel/test-http-write-callbacks.js#L53 + // no args in writeContinue callback + writeContinue(callback?: () => void): void; + writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders): this; + writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this; + } + + // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77 + class ClientRequest extends OutgoingMessage { + connection: Socket; + socket: Socket; + aborted: number; + + constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + + readonly path: string; + abort(): void; + onSocket(socket: Socket): void; + setTimeout(timeout: number, callback?: () => void): this; + setNoDelay(noDelay?: boolean): void; + setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; + } + + class IncomingMessage extends stream.Readable { + constructor(socket: Socket); + + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + complete: boolean; + connection: Socket; + headers: IncomingHttpHeaders; + rawHeaders: string[]; + trailers: { [key: string]: string | undefined }; + rawTrailers: string[]; + setTimeout(msecs: number, callback: () => void): this; + /** + * Only valid for request obtained from http.Server. + */ + method?: string; + /** + * Only valid for request obtained from http.Server. + */ + url?: string; + /** + * Only valid for response obtained from http.ClientRequest. + */ + statusCode?: number; + /** + * Only valid for response obtained from http.ClientRequest. + */ + statusMessage?: string; + socket: Socket; + destroy(error?: Error): void; + } + + interface AgentOptions { + /** + * Keep sockets around in a pool to be used by other requests in the future. Default = false + */ + keepAlive?: boolean; + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + */ + keepAliveMsecs?: number; + /** + * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity + */ + maxSockets?: number; + /** + * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. + */ + maxFreeSockets?: number; + /** + * Socket timeout in milliseconds. This will set the timeout after the socket is connected. + */ + timeout?: number; + } + + class Agent { + maxFreeSockets: number; + maxSockets: number; + readonly sockets: { + readonly [key: string]: Socket[]; + }; + readonly requests: { + readonly [key: string]: IncomingMessage[]; + }; + + constructor(opts?: AgentOptions); + + /** + * Destroy any sockets that are currently in use by the agent. + * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, + * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, + * sockets may hang open for quite a long time before the server terminates them. + */ + destroy(): void; + } + + const METHODS: string[]; + + const STATUS_CODES: { + [errorCode: number]: string | undefined; + [errorCode: string]: string | undefined; + }; + + function createServer(requestListener?: RequestListener): Server; + function createServer(options: ServerOptions, requestListener?: RequestListener): Server; + + // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, + // create interface RequestOptions would make the naming more clear to developers + interface RequestOptions extends ClientRequestArgs { } + function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function request(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + let globalAgent: Agent; + + /** + * Read-only property specifying the maximum allowed size of HTTP headers in bytes. + * Defaults to 8KB. Configurable using the [`--max-http-header-size`][] CLI option. + */ + const maxHeaderSize: number; +} diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts new file mode 100644 index 00000000..9b474c55 --- /dev/null +++ b/node_modules/@types/node/http2.d.ts @@ -0,0 +1,960 @@ +declare module "http2" { + import * as events from "events"; + import * as fs from "fs"; + import * as net from "net"; + import * as stream from "stream"; + import * as tls from "tls"; + import * as url from "url"; + + import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders, IncomingMessage, ServerResponse } from "http"; + export { OutgoingHttpHeaders } from "http"; + + export interface IncomingHttpStatusHeader { + ":status"?: number; + } + + export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { + ":path"?: string; + ":method"?: string; + ":authority"?: string; + ":scheme"?: string; + } + + // Http2Stream + + export interface StreamPriorityOptions { + exclusive?: boolean; + parent?: number; + weight?: number; + silent?: boolean; + } + + export interface StreamState { + localWindowSize?: number; + state?: number; + localClose?: number; + remoteClose?: number; + sumDependencyWeight?: number; + weight?: number; + } + + export interface ServerStreamResponseOptions { + endStream?: boolean; + waitForTrailers?: boolean; + } + + export interface StatOptions { + offset: number; + length: number; + } + + export interface ServerStreamFileResponseOptions { + statCheck?: (stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void | boolean; + waitForTrailers?: boolean; + offset?: number; + length?: number; + } + + export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { + onError?: (err: NodeJS.ErrnoException) => void; + } + + export class Http2Stream extends stream.Duplex { + protected constructor(); + + readonly aborted: boolean; + readonly bufferSize: number; + readonly closed: boolean; + readonly destroyed: boolean; + /** + * Set the true if the END_STREAM flag was set in the request or response HEADERS frame received, + * indicating that no additional data should be received and the readable side of the Http2Stream will be closed. + */ + readonly endAfterHeaders: boolean; + readonly id?: number; + readonly pending: boolean; + readonly rstCode: number; + readonly sentHeaders: OutgoingHttpHeaders; + readonly sentInfoHeaders?: OutgoingHttpHeaders[]; + readonly sentTrailers?: OutgoingHttpHeaders; + readonly session: Http2Session; + readonly state: StreamState; + + close(code?: number, callback?: () => void): void; + priority(options: StreamPriorityOptions): void; + setTimeout(msecs: number, callback?: () => void): void; + sendTrailers(headers: OutgoingHttpHeaders): void; + + addListener(event: "aborted", listener: () => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: "streamClosed", listener: (code: number) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "wantTrailers", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "aborted"): boolean; + emit(event: "close"): boolean; + emit(event: "data", chunk: Buffer | string): boolean; + emit(event: "drain"): boolean; + emit(event: "end"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "frameError", frameType: number, errorCode: number): boolean; + emit(event: "pipe", src: stream.Readable): boolean; + emit(event: "unpipe", src: stream.Readable): boolean; + emit(event: "streamClosed", code: number): boolean; + emit(event: "timeout"): boolean; + emit(event: "trailers", trailers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "wantTrailers"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "aborted", listener: () => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "drain", listener: () => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: "streamClosed", listener: (code: number) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "wantTrailers", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "aborted", listener: () => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "drain", listener: () => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: "streamClosed", listener: (code: number) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "wantTrailers", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "aborted", listener: () => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "streamClosed", listener: (code: number) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "wantTrailers", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "aborted", listener: () => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "streamClosed", listener: (code: number) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "wantTrailers", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export class ClientHttp2Stream extends Http2Stream { + private constructor(); + + addListener(event: "continue", listener: () => {}): this; + addListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "continue"): boolean; + emit(event: "headers", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "response", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "continue", listener: () => {}): this; + on(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "continue", listener: () => {}): this; + once(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "continue", listener: () => {}): this; + prependListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "continue", listener: () => {}): this; + prependOnceListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export class ServerHttp2Stream extends Http2Stream { + private constructor(); + + additionalHeaders(headers: OutgoingHttpHeaders): void; + readonly headersSent: boolean; + readonly pushAllowed: boolean; + pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; + pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; + respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void; + respondWithFD(fd: number, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void; + respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void; + } + + // Http2Session + + export interface Settings { + headerTableSize?: number; + enablePush?: boolean; + initialWindowSize?: number; + maxFrameSize?: number; + maxConcurrentStreams?: number; + maxHeaderListSize?: number; + enableConnectProtocol?: boolean; + } + + export interface ClientSessionRequestOptions { + endStream?: boolean; + exclusive?: boolean; + parent?: number; + weight?: number; + waitForTrailers?: boolean; + } + + export interface SessionState { + effectiveLocalWindowSize?: number; + effectiveRecvDataLength?: number; + nextStreamID?: number; + localWindowSize?: number; + lastProcStreamID?: number; + remoteWindowSize?: number; + outboundQueueSize?: number; + deflateDynamicTableSize?: number; + inflateDynamicTableSize?: number; + } + + export class Http2Session extends events.EventEmitter { + protected constructor(); + + readonly alpnProtocol?: string; + close(callback?: () => void): void; + readonly closed: boolean; + readonly connecting: boolean; + destroy(error?: Error, code?: number): void; + readonly destroyed: boolean; + readonly encrypted?: boolean; + goaway(code?: number, lastStreamID?: number, opaqueData?: Buffer | DataView | NodeJS.TypedArray): void; + readonly localSettings: Settings; + readonly originSet?: string[]; + readonly pendingSettingsAck: boolean; + ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; + ping(payload: Buffer | DataView | NodeJS.TypedArray , callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; + ref(): void; + readonly remoteSettings: Settings; + setTimeout(msecs: number, callback?: () => void): void; + readonly socket: net.Socket | tls.TLSSocket; + readonly state: SessionState; + settings(settings: Settings): void; + readonly type: number; + unref(): void; + + addListener(event: "close", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + addListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + addListener(event: "localSettings", listener: (settings: Settings) => void): this; + addListener(event: "ping", listener: () => void): this; + addListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean; + emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean; + emit(event: "localSettings", settings: Settings): boolean; + emit(event: "ping"): boolean; + emit(event: "remoteSettings", settings: Settings): boolean; + emit(event: "timeout"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + on(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + on(event: "localSettings", listener: (settings: Settings) => void): this; + on(event: "ping", listener: () => void): this; + on(event: "remoteSettings", listener: (settings: Settings) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + once(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + once(event: "localSettings", listener: (settings: Settings) => void): this; + once(event: "ping", listener: () => void): this; + once(event: "remoteSettings", listener: (settings: Settings) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + prependListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + prependListener(event: "localSettings", listener: (settings: Settings) => void): this; + prependListener(event: "ping", listener: () => void): this; + prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + prependOnceListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; + prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this; + prependOnceListener(event: "ping", listener: () => void): this; + prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export class ClientHttp2Session extends Http2Session { + private constructor(); + + request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream; + + addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + addListener(event: "origin", listener: (origins: string[]) => void): this; + addListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "altsvc", alt: string, origin: string, stream: number): boolean; + emit(event: "origin", origins: string[]): boolean; + emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + on(event: "origin", listener: (origins: string[]) => void): this; + on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + once(event: "origin", listener: (origins: string[]) => void): this; + once(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + prependListener(event: "origin", listener: (origins: string[]) => void): this; + prependListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + prependOnceListener(event: "origin", listener: (origins: string[]) => void): this; + prependOnceListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export interface AlternativeServiceOptions { + origin: number | string | url.URL; + } + + export class ServerHttp2Session extends Http2Session { + private constructor(); + + altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; + origin(...args: Array): void; + readonly server: Http2Server | Http2SecureServer; + + addListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "connect", session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + // Http2Server + + export interface SessionOptions { + maxDeflateDynamicTableSize?: number; + maxSessionMemory?: number; + maxHeaderListPairs?: number; + maxOutstandingPings?: number; + maxSendHeaderBlockLength?: number; + paddingStrategy?: number; + peerMaxConcurrentStreams?: number; + selectPadding?: (frameLen: number, maxFrameLen: number) => number; + settings?: Settings; + createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex; + } + + export interface ClientSessionOptions extends SessionOptions { + maxReservedRemoteStreams?: number; + createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex; + } + + export interface ServerSessionOptions extends SessionOptions { + Http1IncomingMessage?: typeof IncomingMessage; + Http1ServerResponse?: typeof ServerResponse; + Http2ServerRequest?: typeof Http2ServerRequest; + Http2ServerResponse?: typeof Http2ServerResponse; + } + + export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { } + export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { } + + export interface ServerOptions extends ServerSessionOptions { } + + export interface SecureServerOptions extends SecureServerSessionOptions { + allowHTTP1?: boolean; + origins?: string[]; + } + + export class Http2Server extends net.Server { + private constructor(); + + addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + addListener(event: "sessionError", listener: (err: Error) => void): this; + addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "session", session: ServerHttp2Session): boolean; + emit(event: "sessionError", err: Error): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "timeout"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "session", listener: (session: ServerHttp2Session) => void): this; + on(event: "sessionError", listener: (err: Error) => void): this; + on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "session", listener: (session: ServerHttp2Session) => void): this; + once(event: "sessionError", listener: (err: Error) => void): this; + once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependListener(event: "sessionError", listener: (err: Error) => void): this; + prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; + prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + setTimeout(msec?: number, callback?: () => void): this; + } + + export class Http2SecureServer extends tls.Server { + private constructor(); + + addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + addListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + addListener(event: "sessionError", listener: (err: Error) => void): this; + addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "session", session: ServerHttp2Session): boolean; + emit(event: "sessionError", err: Error): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "timeout"): boolean; + emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "session", listener: (session: ServerHttp2Session) => void): this; + on(event: "sessionError", listener: (err: Error) => void): this; + on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "session", listener: (session: ServerHttp2Session) => void): this; + once(event: "sessionError", listener: (err: Error) => void): this; + once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependListener(event: "sessionError", listener: (err: Error) => void): this; + prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; + prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + setTimeout(msec?: number, callback?: () => void): this; + } + + export class Http2ServerRequest extends stream.Readable { + private constructor(); + + readonly aborted: boolean; + readonly authority: string; + readonly headers: IncomingHttpHeaders; + readonly httpVersion: string; + readonly method: string; + readonly rawHeaders: string[]; + readonly rawTrailers: string[]; + readonly scheme: string; + setTimeout(msecs: number, callback?: () => void): void; + readonly socket: net.Socket | tls.TLSSocket; + readonly stream: ServerHttp2Stream; + readonly trailers: IncomingHttpHeaders; + readonly url: string; + + read(size?: number): Buffer | string | null; + + addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "aborted", hadError: boolean, code: number): boolean; + emit(event: "close"): boolean; + emit(event: "data", chunk: Buffer | string): boolean; + emit(event: "end"): boolean; + emit(event: "readable"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + export class Http2ServerResponse extends stream.Stream { + private constructor(); + + addTrailers(trailers: OutgoingHttpHeaders): void; + readonly connection: net.Socket | tls.TLSSocket; + end(callback?: () => void): void; + end(data: string | Uint8Array, callback?: () => void): void; + end(data: string | Uint8Array, encoding: string, callback?: () => void): void; + readonly finished: boolean; + getHeader(name: string): string; + getHeaderNames(): string[]; + getHeaders(): OutgoingHttpHeaders; + hasHeader(name: string): boolean; + readonly headersSent: boolean; + removeHeader(name: string): void; + sendDate: boolean; + setHeader(name: string, value: number | string | string[]): void; + setTimeout(msecs: number, callback?: () => void): void; + readonly socket: net.Socket | tls.TLSSocket; + statusCode: number; + statusMessage: ''; + readonly stream: ServerHttp2Stream; + write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; + write(chunk: string | Uint8Array, encoding: string, callback?: (err: Error) => void): boolean; + writeContinue(): void; + writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this; + writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this; + createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void; + + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "drain"): boolean; + emit(event: "error", error: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "pipe", src: stream.Readable): boolean; + emit(event: "unpipe", src: stream.Readable): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (error: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (error: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + // Public API + + export namespace constants { + const NGHTTP2_SESSION_SERVER: number; + const NGHTTP2_SESSION_CLIENT: number; + const NGHTTP2_STREAM_STATE_IDLE: number; + const NGHTTP2_STREAM_STATE_OPEN: number; + const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; + const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; + const NGHTTP2_STREAM_STATE_CLOSED: number; + const NGHTTP2_NO_ERROR: number; + const NGHTTP2_PROTOCOL_ERROR: number; + const NGHTTP2_INTERNAL_ERROR: number; + const NGHTTP2_FLOW_CONTROL_ERROR: number; + const NGHTTP2_SETTINGS_TIMEOUT: number; + const NGHTTP2_STREAM_CLOSED: number; + const NGHTTP2_FRAME_SIZE_ERROR: number; + const NGHTTP2_REFUSED_STREAM: number; + const NGHTTP2_CANCEL: number; + const NGHTTP2_COMPRESSION_ERROR: number; + const NGHTTP2_CONNECT_ERROR: number; + const NGHTTP2_ENHANCE_YOUR_CALM: number; + const NGHTTP2_INADEQUATE_SECURITY: number; + const NGHTTP2_HTTP_1_1_REQUIRED: number; + const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; + const NGHTTP2_FLAG_NONE: number; + const NGHTTP2_FLAG_END_STREAM: number; + const NGHTTP2_FLAG_END_HEADERS: number; + const NGHTTP2_FLAG_ACK: number; + const NGHTTP2_FLAG_PADDED: number; + const NGHTTP2_FLAG_PRIORITY: number; + const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; + const DEFAULT_SETTINGS_ENABLE_PUSH: number; + const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; + const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; + const MAX_MAX_FRAME_SIZE: number; + const MIN_MAX_FRAME_SIZE: number; + const MAX_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_DEFAULT_WEIGHT: number; + const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; + const NGHTTP2_SETTINGS_ENABLE_PUSH: number; + const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; + const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; + const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; + const PADDING_STRATEGY_NONE: number; + const PADDING_STRATEGY_MAX: number; + const PADDING_STRATEGY_CALLBACK: number; + const HTTP2_HEADER_STATUS: string; + const HTTP2_HEADER_METHOD: string; + const HTTP2_HEADER_AUTHORITY: string; + const HTTP2_HEADER_SCHEME: string; + const HTTP2_HEADER_PATH: string; + const HTTP2_HEADER_ACCEPT_CHARSET: string; + const HTTP2_HEADER_ACCEPT_ENCODING: string; + const HTTP2_HEADER_ACCEPT_LANGUAGE: string; + const HTTP2_HEADER_ACCEPT_RANGES: string; + const HTTP2_HEADER_ACCEPT: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; + const HTTP2_HEADER_AGE: string; + const HTTP2_HEADER_ALLOW: string; + const HTTP2_HEADER_AUTHORIZATION: string; + const HTTP2_HEADER_CACHE_CONTROL: string; + const HTTP2_HEADER_CONNECTION: string; + const HTTP2_HEADER_CONTENT_DISPOSITION: string; + const HTTP2_HEADER_CONTENT_ENCODING: string; + const HTTP2_HEADER_CONTENT_LANGUAGE: string; + const HTTP2_HEADER_CONTENT_LENGTH: string; + const HTTP2_HEADER_CONTENT_LOCATION: string; + const HTTP2_HEADER_CONTENT_MD5: string; + const HTTP2_HEADER_CONTENT_RANGE: string; + const HTTP2_HEADER_CONTENT_TYPE: string; + const HTTP2_HEADER_COOKIE: string; + const HTTP2_HEADER_DATE: string; + const HTTP2_HEADER_ETAG: string; + const HTTP2_HEADER_EXPECT: string; + const HTTP2_HEADER_EXPIRES: string; + const HTTP2_HEADER_FROM: string; + const HTTP2_HEADER_HOST: string; + const HTTP2_HEADER_IF_MATCH: string; + const HTTP2_HEADER_IF_MODIFIED_SINCE: string; + const HTTP2_HEADER_IF_NONE_MATCH: string; + const HTTP2_HEADER_IF_RANGE: string; + const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; + const HTTP2_HEADER_LAST_MODIFIED: string; + const HTTP2_HEADER_LINK: string; + const HTTP2_HEADER_LOCATION: string; + const HTTP2_HEADER_MAX_FORWARDS: string; + const HTTP2_HEADER_PREFER: string; + const HTTP2_HEADER_PROXY_AUTHENTICATE: string; + const HTTP2_HEADER_PROXY_AUTHORIZATION: string; + const HTTP2_HEADER_RANGE: string; + const HTTP2_HEADER_REFERER: string; + const HTTP2_HEADER_REFRESH: string; + const HTTP2_HEADER_RETRY_AFTER: string; + const HTTP2_HEADER_SERVER: string; + const HTTP2_HEADER_SET_COOKIE: string; + const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; + const HTTP2_HEADER_TRANSFER_ENCODING: string; + const HTTP2_HEADER_TE: string; + const HTTP2_HEADER_UPGRADE: string; + const HTTP2_HEADER_USER_AGENT: string; + const HTTP2_HEADER_VARY: string; + const HTTP2_HEADER_VIA: string; + const HTTP2_HEADER_WWW_AUTHENTICATE: string; + const HTTP2_HEADER_HTTP2_SETTINGS: string; + const HTTP2_HEADER_KEEP_ALIVE: string; + const HTTP2_HEADER_PROXY_CONNECTION: string; + const HTTP2_METHOD_ACL: string; + const HTTP2_METHOD_BASELINE_CONTROL: string; + const HTTP2_METHOD_BIND: string; + const HTTP2_METHOD_CHECKIN: string; + const HTTP2_METHOD_CHECKOUT: string; + const HTTP2_METHOD_CONNECT: string; + const HTTP2_METHOD_COPY: string; + const HTTP2_METHOD_DELETE: string; + const HTTP2_METHOD_GET: string; + const HTTP2_METHOD_HEAD: string; + const HTTP2_METHOD_LABEL: string; + const HTTP2_METHOD_LINK: string; + const HTTP2_METHOD_LOCK: string; + const HTTP2_METHOD_MERGE: string; + const HTTP2_METHOD_MKACTIVITY: string; + const HTTP2_METHOD_MKCALENDAR: string; + const HTTP2_METHOD_MKCOL: string; + const HTTP2_METHOD_MKREDIRECTREF: string; + const HTTP2_METHOD_MKWORKSPACE: string; + const HTTP2_METHOD_MOVE: string; + const HTTP2_METHOD_OPTIONS: string; + const HTTP2_METHOD_ORDERPATCH: string; + const HTTP2_METHOD_PATCH: string; + const HTTP2_METHOD_POST: string; + const HTTP2_METHOD_PRI: string; + const HTTP2_METHOD_PROPFIND: string; + const HTTP2_METHOD_PROPPATCH: string; + const HTTP2_METHOD_PUT: string; + const HTTP2_METHOD_REBIND: string; + const HTTP2_METHOD_REPORT: string; + const HTTP2_METHOD_SEARCH: string; + const HTTP2_METHOD_TRACE: string; + const HTTP2_METHOD_UNBIND: string; + const HTTP2_METHOD_UNCHECKOUT: string; + const HTTP2_METHOD_UNLINK: string; + const HTTP2_METHOD_UNLOCK: string; + const HTTP2_METHOD_UPDATE: string; + const HTTP2_METHOD_UPDATEREDIRECTREF: string; + const HTTP2_METHOD_VERSION_CONTROL: string; + const HTTP_STATUS_CONTINUE: number; + const HTTP_STATUS_SWITCHING_PROTOCOLS: number; + const HTTP_STATUS_PROCESSING: number; + const HTTP_STATUS_OK: number; + const HTTP_STATUS_CREATED: number; + const HTTP_STATUS_ACCEPTED: number; + const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; + const HTTP_STATUS_NO_CONTENT: number; + const HTTP_STATUS_RESET_CONTENT: number; + const HTTP_STATUS_PARTIAL_CONTENT: number; + const HTTP_STATUS_MULTI_STATUS: number; + const HTTP_STATUS_ALREADY_REPORTED: number; + const HTTP_STATUS_IM_USED: number; + const HTTP_STATUS_MULTIPLE_CHOICES: number; + const HTTP_STATUS_MOVED_PERMANENTLY: number; + const HTTP_STATUS_FOUND: number; + const HTTP_STATUS_SEE_OTHER: number; + const HTTP_STATUS_NOT_MODIFIED: number; + const HTTP_STATUS_USE_PROXY: number; + const HTTP_STATUS_TEMPORARY_REDIRECT: number; + const HTTP_STATUS_PERMANENT_REDIRECT: number; + const HTTP_STATUS_BAD_REQUEST: number; + const HTTP_STATUS_UNAUTHORIZED: number; + const HTTP_STATUS_PAYMENT_REQUIRED: number; + const HTTP_STATUS_FORBIDDEN: number; + const HTTP_STATUS_NOT_FOUND: number; + const HTTP_STATUS_METHOD_NOT_ALLOWED: number; + const HTTP_STATUS_NOT_ACCEPTABLE: number; + const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; + const HTTP_STATUS_REQUEST_TIMEOUT: number; + const HTTP_STATUS_CONFLICT: number; + const HTTP_STATUS_GONE: number; + const HTTP_STATUS_LENGTH_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_FAILED: number; + const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; + const HTTP_STATUS_URI_TOO_LONG: number; + const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; + const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; + const HTTP_STATUS_EXPECTATION_FAILED: number; + const HTTP_STATUS_TEAPOT: number; + const HTTP_STATUS_MISDIRECTED_REQUEST: number; + const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; + const HTTP_STATUS_LOCKED: number; + const HTTP_STATUS_FAILED_DEPENDENCY: number; + const HTTP_STATUS_UNORDERED_COLLECTION: number; + const HTTP_STATUS_UPGRADE_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_REQUIRED: number; + const HTTP_STATUS_TOO_MANY_REQUESTS: number; + const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; + const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; + const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; + const HTTP_STATUS_NOT_IMPLEMENTED: number; + const HTTP_STATUS_BAD_GATEWAY: number; + const HTTP_STATUS_SERVICE_UNAVAILABLE: number; + const HTTP_STATUS_GATEWAY_TIMEOUT: number; + const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; + const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; + const HTTP_STATUS_INSUFFICIENT_STORAGE: number; + const HTTP_STATUS_LOOP_DETECTED: number; + const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; + const HTTP_STATUS_NOT_EXTENDED: number; + const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; + } + + export function getDefaultSettings(): Settings; + export function getPackedSettings(settings: Settings): Buffer; + export function getUnpackedSettings(buf: Uint8Array): Settings; + + export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; + export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; + + export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; + export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; + + export function connect(authority: string | url.URL, listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session; + export function connect( + authority: string | url.URL, + options?: ClientSessionOptions | SecureClientSessionOptions, + listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): ClientHttp2Session; +} diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts new file mode 100644 index 00000000..6f33dbd0 --- /dev/null +++ b/node_modules/@types/node/https.d.ts @@ -0,0 +1,53 @@ +declare module "https" { + import * as tls from "tls"; + import * as events from "events"; + import * as http from "http"; + import { URL } from "url"; + + type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions; + + type RequestOptions = http.RequestOptions & tls.SecureContextOptions & { + rejectUnauthorized?: boolean; // Defaults to true + servername?: string; // SNI TLS Extension + }; + + interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { + rejectUnauthorized?: boolean; + maxCachedSessions?: number; + } + + class Agent extends http.Agent { + constructor(options?: AgentOptions); + options: AgentOptions; + } + + class Server extends tls.Server { + constructor(requestListener?: http.RequestListener); + constructor(options: ServerOptions, requestListener?: http.RequestListener); + + setTimeout(callback: () => void): this; + setTimeout(msecs?: number, callback?: () => void): this; + /** + * Limits maximum incoming headers count. If set to 0, no limit will be applied. + * @default 2000 + * {@link https://nodejs.org/api/http.html#http_server_maxheaderscount} + */ + maxHeadersCount: number | null; + timeout: number; + /** + * Limit the amount of time the parser will wait to receive the complete HTTP headers. + * @default 40000 + * {@link https://nodejs.org/api/http.html#http_server_headerstimeout} + */ + headersTimeout: number; + keepAliveTimeout: number; + } + + function createServer(requestListener?: http.RequestListener): Server; + function createServer(options: ServerOptions, requestListener?: http.RequestListener): Server; + function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + let globalAgent: Agent; +} diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts new file mode 100644 index 00000000..58227411 --- /dev/null +++ b/node_modules/@types/node/index.d.ts @@ -0,0 +1,99 @@ +// Type definitions for non-npm package Node.js 12.6 +// Project: http://nodejs.org/ +// Definitions by: Microsoft TypeScript +// DefinitelyTyped +// Alberto Schiabel +// Alexander T. +// Alvis HT Tang +// Andrew Makarov +// Benjamin Toueg +// Bruno Scheufler +// Chigozirim C. +// Christian Vaagland Tellnes +// David Junger +// Deividas Bakanas +// Eugene Y. Q. Shen +// Flarna +// Hannes Magnusson +// Hoàng Văn Khải +// Huw +// Kelvin Jin +// Klaus Meinhardt +// Lishude +// Mariusz Wiktorczyk +// Matthieu Sieben +// Mohsen Azimi +// Nicolas Even +// Nicolas Voigt +// Parambir Singh +// Sebastian Silbermann +// Simon Schick +// Thomas den Hollander +// Wilco Bakker +// wwwy3y3 +// Zane Hannan AU +// Samuel Ainsworth +// Kyle Uehlein +// Jordi Oliveras Rovira +// Thanik Bhongbhibhat +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// NOTE: These definitions support NodeJS and TypeScript 3.2. + +// NOTE: TypeScript version-specific augmentations can be found in the following paths: +// - ~/base.d.ts - Shared definitions common to all TypeScript versions +// - ~/index.d.ts - Definitions specific to TypeScript 2.1 +// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 + +// NOTE: Augmentations for TypeScript 3.2 and later should use individual files for overrides +// within the respective ~/ts3.2 (or later) folder. However, this is disallowed for versions +// prior to TypeScript 3.2, so the older definitions will be found here. + +// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: +/// + +// TypeScript 2.1-specific augmentations: + +// Forward-declarations for needed types from es2015 and later (in case users are using `--lib es5`) +// Empty interfaces are used here which merge fine with the real declarations in the lib XXX files +// just to ensure the names are known and node typings can be sued without importing these libs. +// if someone really needs these types the libs need to be added via --lib or in tsconfig.json +interface MapConstructor { } +interface WeakMapConstructor { } +interface SetConstructor { } +interface WeakSetConstructor { } +interface Set {} +interface Map {} +interface ReadonlySet {} +interface IteratorResult { } +interface Iterable { } +interface AsyncIterable { } +interface Iterator { + next(value?: any): IteratorResult; +} +interface IterableIterator { } +interface AsyncIterableIterator {} +interface SymbolConstructor { + readonly iterator: symbol; + readonly asyncIterator: symbol; +} +declare var Symbol: SymbolConstructor; +// even this is just a forward declaration some properties are added otherwise +// it would be allowed to pass anything to e.g. Buffer.from() +interface SharedArrayBuffer { + readonly byteLength: number; + slice(begin?: number, end?: number): SharedArrayBuffer; +} + +declare module "util" { + namespace inspect { + const custom: symbol; + } + namespace promisify { + const custom: symbol; + } + namespace types { + function isBigInt64Array(value: any): boolean; + function isBigUint64Array(value: any): boolean; + } +} diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts new file mode 100644 index 00000000..8abee395 --- /dev/null +++ b/node_modules/@types/node/inspector.d.ts @@ -0,0 +1,3257 @@ +// tslint:disable-next-line:dt-header +// Type definitions for inspector + +// These definitions are auto-generated. +// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330 +// for more information. + +/** + * The inspector module provides an API for interacting with the V8 inspector. + */ +declare module "inspector" { + import { EventEmitter } from 'events'; + + interface InspectorNotification { + method: string; + params: T; + } + + namespace Console { + /** + * Console message. + */ + interface ConsoleMessage { + /** + * Message source. + */ + source: string; + /** + * Message severity. + */ + level: string; + /** + * Message text. + */ + text: string; + /** + * URL of the message origin. + */ + url?: string; + /** + * Line number in the resource that generated this message (1-based). + */ + line?: number; + /** + * Column number in the resource that generated this message (1-based). + */ + column?: number; + } + + interface MessageAddedEventDataType { + /** + * Console message that has been added. + */ + message: ConsoleMessage; + } + } + + namespace Debugger { + /** + * Breakpoint identifier. + */ + type BreakpointId = string; + + /** + * Call frame identifier. + */ + type CallFrameId = string; + + /** + * Location in the source code. + */ + interface Location { + /** + * Script identifier as reported in the `Debugger.scriptParsed`. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number; + } + + /** + * Location in the source code. + * @experimental + */ + interface ScriptPosition { + lineNumber: number; + columnNumber: number; + } + + /** + * JavaScript call frame. Array of call frames form the call stack. + */ + interface CallFrame { + /** + * Call frame identifier. This identifier is only valid while the virtual machine is paused. + */ + callFrameId: CallFrameId; + /** + * Name of the JavaScript function called on this call frame. + */ + functionName: string; + /** + * Location in the source code. + */ + functionLocation?: Location; + /** + * Location in the source code. + */ + location: Location; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Scope chain for this call frame. + */ + scopeChain: Scope[]; + /** + * `this` object for this call frame. + */ + this: Runtime.RemoteObject; + /** + * The value being returned, if the function is at return point. + */ + returnValue?: Runtime.RemoteObject; + } + + /** + * Scope description. + */ + interface Scope { + /** + * Scope type. + */ + type: string; + /** + * Object representing the scope. For `global` and `with` scopes it represents the actual + * object; for the rest of the scopes, it is artificial transient object enumerating scope + * variables as its properties. + */ + object: Runtime.RemoteObject; + name?: string; + /** + * Location in the source code where scope starts + */ + startLocation?: Location; + /** + * Location in the source code where scope ends + */ + endLocation?: Location; + } + + /** + * Search match for resource. + */ + interface SearchMatch { + /** + * Line number in resource content. + */ + lineNumber: number; + /** + * Line with match content. + */ + lineContent: string; + } + + interface BreakLocation { + /** + * Script identifier as reported in the `Debugger.scriptParsed`. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number; + type?: string; + } + + interface ContinueToLocationParameterType { + /** + * Location to continue to. + */ + location: Location; + targetCallFrames?: string; + } + + interface EvaluateOnCallFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + /** + * Expression to evaluate. + */ + expression: string; + /** + * String object group name to put result into (allows rapid releasing resulting object handles + * using `releaseObjectGroup`). + */ + objectGroup?: string; + /** + * Specifies whether command line API should be available to the evaluated expression, defaults + * to false. + */ + includeCommandLineAPI?: boolean; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause + * execution. Overrides `setPauseOnException` state. + */ + silent?: boolean; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether to throw an exception if side effect cannot be ruled out during evaluation. + */ + throwOnSideEffect?: boolean; + /** + * Terminate execution after timing out (number of milliseconds). + * @experimental + */ + timeout?: Runtime.TimeDelta; + } + + interface GetPossibleBreakpointsParameterType { + /** + * Start of range to search possible breakpoint locations in. + */ + start: Location; + /** + * End of range to search possible breakpoint locations in (excluding). When not specified, end + * of scripts is used as end of range. + */ + end?: Location; + /** + * Only consider locations which are in the same (non-nested) function as start. + */ + restrictToFunction?: boolean; + } + + interface GetScriptSourceParameterType { + /** + * Id of the script to get source for. + */ + scriptId: Runtime.ScriptId; + } + + interface GetStackTraceParameterType { + stackTraceId: Runtime.StackTraceId; + } + + interface PauseOnAsyncCallParameterType { + /** + * Debugger will pause when async call with given stack trace is started. + */ + parentStackTraceId: Runtime.StackTraceId; + } + + interface RemoveBreakpointParameterType { + breakpointId: BreakpointId; + } + + interface RestartFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + } + + interface SearchInContentParameterType { + /** + * Id of the script to search in. + */ + scriptId: Runtime.ScriptId; + /** + * String to search for. + */ + query: string; + /** + * If true, search is case sensitive. + */ + caseSensitive?: boolean; + /** + * If true, treats string parameter as regex. + */ + isRegex?: boolean; + } + + interface SetAsyncCallStackDepthParameterType { + /** + * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async + * call stacks (default). + */ + maxDepth: number; + } + + interface SetBlackboxPatternsParameterType { + /** + * Array of regexps that will be used to check script url for blackbox state. + */ + patterns: string[]; + } + + interface SetBlackboxedRangesParameterType { + /** + * Id of the script. + */ + scriptId: Runtime.ScriptId; + positions: ScriptPosition[]; + } + + interface SetBreakpointParameterType { + /** + * Location to set breakpoint in. + */ + location: Location; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the + * breakpoint if this expression evaluates to true. + */ + condition?: string; + } + + interface SetBreakpointByUrlParameterType { + /** + * Line number to set breakpoint at. + */ + lineNumber: number; + /** + * URL of the resources to set breakpoint on. + */ + url?: string; + /** + * Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or + * `urlRegex` must be specified. + */ + urlRegex?: string; + /** + * Script hash of the resources to set breakpoint on. + */ + scriptHash?: string; + /** + * Offset in the line to set breakpoint at. + */ + columnNumber?: number; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the + * breakpoint if this expression evaluates to true. + */ + condition?: string; + } + + interface SetBreakpointOnFunctionCallParameterType { + /** + * Function object id. + */ + objectId: Runtime.RemoteObjectId; + /** + * Expression to use as a breakpoint condition. When specified, debugger will + * stop on the breakpoint if this expression evaluates to true. + */ + condition?: string; + } + + interface SetBreakpointsActiveParameterType { + /** + * New value for breakpoints active state. + */ + active: boolean; + } + + interface SetPauseOnExceptionsParameterType { + /** + * Pause on exceptions mode. + */ + state: string; + } + + interface SetReturnValueParameterType { + /** + * New return value. + */ + newValue: Runtime.CallArgument; + } + + interface SetScriptSourceParameterType { + /** + * Id of the script to edit. + */ + scriptId: Runtime.ScriptId; + /** + * New content of the script. + */ + scriptSource: string; + /** + * If true the change will not actually be applied. Dry run may be used to get result + * description without actually modifying the code. + */ + dryRun?: boolean; + } + + interface SetSkipAllPausesParameterType { + /** + * New value for skip pauses state. + */ + skip: boolean; + } + + interface SetVariableValueParameterType { + /** + * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' + * scope types are allowed. Other scopes could be manipulated manually. + */ + scopeNumber: number; + /** + * Variable name. + */ + variableName: string; + /** + * New variable value. + */ + newValue: Runtime.CallArgument; + /** + * Id of callframe that holds variable. + */ + callFrameId: CallFrameId; + } + + interface StepIntoParameterType { + /** + * Debugger will issue additional Debugger.paused notification if any async task is scheduled + * before next pause. + * @experimental + */ + breakOnAsyncCall?: boolean; + } + + interface EnableReturnType { + /** + * Unique identifier of the debugger. + * @experimental + */ + debuggerId: Runtime.UniqueDebuggerId; + } + + interface EvaluateOnCallFrameReturnType { + /** + * Object wrapper for the evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + interface GetPossibleBreakpointsReturnType { + /** + * List of the possible breakpoint locations. + */ + locations: BreakLocation[]; + } + + interface GetScriptSourceReturnType { + /** + * Script source. + */ + scriptSource: string; + } + + interface GetStackTraceReturnType { + stackTrace: Runtime.StackTrace; + } + + interface RestartFrameReturnType { + /** + * New stack trace. + */ + callFrames: CallFrame[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId; + } + + interface SearchInContentReturnType { + /** + * List of search matches. + */ + result: SearchMatch[]; + } + + interface SetBreakpointReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * Location this breakpoint resolved into. + */ + actualLocation: Location; + } + + interface SetBreakpointByUrlReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * List of the locations this breakpoint resolved into upon addition. + */ + locations: Location[]; + } + + interface SetBreakpointOnFunctionCallReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + } + + interface SetScriptSourceReturnType { + /** + * New stack trace in case editing has happened while VM was stopped. + */ + callFrames?: CallFrame[]; + /** + * Whether current call stack was modified after applying the changes. + */ + stackChanged?: boolean; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId; + /** + * Exception details if any. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + interface BreakpointResolvedEventDataType { + /** + * Breakpoint unique identifier. + */ + breakpointId: BreakpointId; + /** + * Actual breakpoint location. + */ + location: Location; + } + + interface PausedEventDataType { + /** + * Call stack the virtual machine stopped on. + */ + callFrames: CallFrame[]; + /** + * Pause reason. + */ + reason: string; + /** + * Object containing break-specific auxiliary properties. + */ + data?: {}; + /** + * Hit breakpoints IDs + */ + hitBreakpoints?: string[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId; + /** + * Just scheduled async call will have this stack trace as parent stack during async execution. + * This field is available only after `Debugger.stepInto` call with `breakOnAsynCall` flag. + * @experimental + */ + asyncCallStackTraceId?: Runtime.StackTraceId; + } + + interface ScriptFailedToParseEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {}; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean; + /** + * This script length. + */ + length?: number; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace; + } + + interface ScriptParsedEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {}; + /** + * True, if this script is generated as a result of the live edit operation. + * @experimental + */ + isLiveEdit?: boolean; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean; + /** + * This script length. + */ + length?: number; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace; + } + } + + namespace HeapProfiler { + /** + * Heap snapshot object id. + */ + type HeapSnapshotObjectId = string; + + /** + * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. + */ + interface SamplingHeapProfileNode { + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Allocations size in bytes for the node excluding children. + */ + selfSize: number; + /** + * Child nodes. + */ + children: SamplingHeapProfileNode[]; + } + + /** + * Profile. + */ + interface SamplingHeapProfile { + head: SamplingHeapProfileNode; + } + + interface AddInspectedHeapObjectParameterType { + /** + * Heap snapshot object id to be accessible by means of $x command line API. + */ + heapObjectId: HeapSnapshotObjectId; + } + + interface GetHeapObjectIdParameterType { + /** + * Identifier of the object to get heap object id for. + */ + objectId: Runtime.RemoteObjectId; + } + + interface GetObjectByHeapObjectIdParameterType { + objectId: HeapSnapshotObjectId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + } + + interface StartSamplingParameterType { + /** + * Average sample interval in bytes. Poisson distribution is used for the intervals. The + * default value is 32768 bytes. + */ + samplingInterval?: number; + } + + interface StartTrackingHeapObjectsParameterType { + trackAllocations?: boolean; + } + + interface StopTrackingHeapObjectsParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken + * when the tracking is stopped. + */ + reportProgress?: boolean; + } + + interface TakeHeapSnapshotParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. + */ + reportProgress?: boolean; + } + + interface GetHeapObjectIdReturnType { + /** + * Id of the heap snapshot object corresponding to the passed remote object id. + */ + heapSnapshotObjectId: HeapSnapshotObjectId; + } + + interface GetObjectByHeapObjectIdReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + } + + interface GetSamplingProfileReturnType { + /** + * Return the sampling profile being collected. + */ + profile: SamplingHeapProfile; + } + + interface StopSamplingReturnType { + /** + * Recorded sampling heap profile. + */ + profile: SamplingHeapProfile; + } + + interface AddHeapSnapshotChunkEventDataType { + chunk: string; + } + + interface HeapStatsUpdateEventDataType { + /** + * An array of triplets. Each triplet describes a fragment. The first integer is the fragment + * index, the second integer is a total count of objects for the fragment, the third integer is + * a total size of the objects for the fragment. + */ + statsUpdate: number[]; + } + + interface LastSeenObjectIdEventDataType { + lastSeenObjectId: number; + timestamp: number; + } + + interface ReportHeapSnapshotProgressEventDataType { + done: number; + total: number; + finished?: boolean; + } + } + + namespace Profiler { + /** + * Profile node. Holds callsite information, execution statistics and child nodes. + */ + interface ProfileNode { + /** + * Unique id of the node. + */ + id: number; + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Number of samples where this node was on top of the call stack. + */ + hitCount?: number; + /** + * Child node ids. + */ + children?: number[]; + /** + * The reason of being not optimized. The function may be deoptimized or marked as don't + * optimize. + */ + deoptReason?: string; + /** + * An array of source position ticks. + */ + positionTicks?: PositionTickInfo[]; + } + + /** + * Profile. + */ + interface Profile { + /** + * The list of profile nodes. First item is the root node. + */ + nodes: ProfileNode[]; + /** + * Profiling start timestamp in microseconds. + */ + startTime: number; + /** + * Profiling end timestamp in microseconds. + */ + endTime: number; + /** + * Ids of samples top nodes. + */ + samples?: number[]; + /** + * Time intervals between adjacent samples in microseconds. The first delta is relative to the + * profile startTime. + */ + timeDeltas?: number[]; + } + + /** + * Specifies a number of samples attributed to a certain source position. + */ + interface PositionTickInfo { + /** + * Source line number (1-based). + */ + line: number; + /** + * Number of samples attributed to the source line. + */ + ticks: number; + } + + /** + * Coverage data for a source range. + */ + interface CoverageRange { + /** + * JavaScript script source offset for the range start. + */ + startOffset: number; + /** + * JavaScript script source offset for the range end. + */ + endOffset: number; + /** + * Collected execution count of the source range. + */ + count: number; + } + + /** + * Coverage data for a JavaScript function. + */ + interface FunctionCoverage { + /** + * JavaScript function name. + */ + functionName: string; + /** + * Source ranges inside the function with coverage data. + */ + ranges: CoverageRange[]; + /** + * Whether coverage data for this function has block granularity. + */ + isBlockCoverage: boolean; + } + + /** + * Coverage data for a JavaScript script. + */ + interface ScriptCoverage { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Functions contained in the script that has coverage data. + */ + functions: FunctionCoverage[]; + } + + /** + * Describes a type collected during runtime. + * @experimental + */ + interface TypeObject { + /** + * Name of a type collected with type profiling. + */ + name: string; + } + + /** + * Source offset and types for a parameter or return value. + * @experimental + */ + interface TypeProfileEntry { + /** + * Source offset of the parameter or end of function for return values. + */ + offset: number; + /** + * The types for this parameter or return value. + */ + types: TypeObject[]; + } + + /** + * Type profile data collected during runtime for a JavaScript script. + * @experimental + */ + interface ScriptTypeProfile { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Type profile entries for parameters and return values of the functions in the script. + */ + entries: TypeProfileEntry[]; + } + + interface SetSamplingIntervalParameterType { + /** + * New sampling interval in microseconds. + */ + interval: number; + } + + interface StartPreciseCoverageParameterType { + /** + * Collect accurate call counts beyond simple 'covered' or 'not covered'. + */ + callCount?: boolean; + /** + * Collect block-based coverage. + */ + detailed?: boolean; + } + + interface GetBestEffortCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + + interface StopReturnType { + /** + * Recorded profile. + */ + profile: Profile; + } + + interface TakePreciseCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + + interface TakeTypeProfileReturnType { + /** + * Type profile for all scripts since startTypeProfile() was turned on. + */ + result: ScriptTypeProfile[]; + } + + interface ConsoleProfileFinishedEventDataType { + id: string; + /** + * Location of console.profileEnd(). + */ + location: Debugger.Location; + profile: Profile; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string; + } + + interface ConsoleProfileStartedEventDataType { + id: string; + /** + * Location of console.profile(). + */ + location: Debugger.Location; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string; + } + } + + namespace Runtime { + /** + * Unique script identifier. + */ + type ScriptId = string; + + /** + * Unique object identifier. + */ + type RemoteObjectId = string; + + /** + * Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`, + * `-Infinity`, and bigint literals. + */ + type UnserializableValue = string; + + /** + * Mirror object referencing original JavaScript object. + */ + interface RemoteObject { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for `object` type values only. + */ + subtype?: string; + /** + * Object class (constructor) name. Specified for `object` type values only. + */ + className?: string; + /** + * Remote object value in case of primitive values or JSON values (if it was requested). + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified does not have `value`, but gets this + * property. + */ + unserializableValue?: UnserializableValue; + /** + * String representation of the object. + */ + description?: string; + /** + * Unique object identifier (for non-primitive values). + */ + objectId?: RemoteObjectId; + /** + * Preview containing abbreviated property values. Specified for `object` type values only. + * @experimental + */ + preview?: ObjectPreview; + /** + * @experimental + */ + customPreview?: CustomPreview; + } + + /** + * @experimental + */ + interface CustomPreview { + header: string; + hasBody: boolean; + formatterObjectId: RemoteObjectId; + bindRemoteObjectFunctionId: RemoteObjectId; + configObjectId?: RemoteObjectId; + } + + /** + * Object containing abbreviated remote object value. + * @experimental + */ + interface ObjectPreview { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for `object` type values only. + */ + subtype?: string; + /** + * String representation of the object. + */ + description?: string; + /** + * True iff some of the properties or entries of the original object did not fit. + */ + overflow: boolean; + /** + * List of the properties. + */ + properties: PropertyPreview[]; + /** + * List of the entries. Specified for `map` and `set` subtype values only. + */ + entries?: EntryPreview[]; + } + + /** + * @experimental + */ + interface PropertyPreview { + /** + * Property name. + */ + name: string; + /** + * Object type. Accessor means that the property itself is an accessor property. + */ + type: string; + /** + * User-friendly property value string. + */ + value?: string; + /** + * Nested value preview. + */ + valuePreview?: ObjectPreview; + /** + * Object subtype hint. Specified for `object` type values only. + */ + subtype?: string; + } + + /** + * @experimental + */ + interface EntryPreview { + /** + * Preview of the key. Specified for map-like collection entries. + */ + key?: ObjectPreview; + /** + * Preview of the value. + */ + value: ObjectPreview; + } + + /** + * Object property descriptor. + */ + interface PropertyDescriptor { + /** + * Property name or symbol description. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject; + /** + * True if the value associated with the property may be changed (data descriptors only). + */ + writable?: boolean; + /** + * A function which serves as a getter for the property, or `undefined` if there is no getter + * (accessor descriptors only). + */ + get?: RemoteObject; + /** + * A function which serves as a setter for the property, or `undefined` if there is no setter + * (accessor descriptors only). + */ + set?: RemoteObject; + /** + * True if the type of this property descriptor may be changed and if the property may be + * deleted from the corresponding object. + */ + configurable: boolean; + /** + * True if this property shows up during enumeration of the properties on the corresponding + * object. + */ + enumerable: boolean; + /** + * True if the result was thrown during the evaluation. + */ + wasThrown?: boolean; + /** + * True if the property is owned for the object. + */ + isOwn?: boolean; + /** + * Property symbol object, if the property is of the `symbol` type. + */ + symbol?: RemoteObject; + } + + /** + * Object internal property descriptor. This property isn't normally visible in JavaScript code. + */ + interface InternalPropertyDescriptor { + /** + * Conventional property name. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject; + } + + /** + * Represents function call argument. Either remote object id `objectId`, primitive `value`, + * unserializable primitive value or neither of (for undefined) them should be specified. + */ + interface CallArgument { + /** + * Primitive value or serializable javascript object. + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified. + */ + unserializableValue?: UnserializableValue; + /** + * Remote object handle. + */ + objectId?: RemoteObjectId; + } + + /** + * Id of an execution context. + */ + type ExecutionContextId = number; + + /** + * Description of an isolated world. + */ + interface ExecutionContextDescription { + /** + * Unique id of the execution context. It can be used to specify in which execution context + * script evaluation should be performed. + */ + id: ExecutionContextId; + /** + * Execution context origin. + */ + origin: string; + /** + * Human readable name describing given context. + */ + name: string; + /** + * Embedder-specific auxiliary data. + */ + auxData?: {}; + } + + /** + * Detailed information about exception (or error) that was thrown during script compilation or + * execution. + */ + interface ExceptionDetails { + /** + * Exception id. + */ + exceptionId: number; + /** + * Exception text, which should be used together with exception object when available. + */ + text: string; + /** + * Line number of the exception location (0-based). + */ + lineNumber: number; + /** + * Column number of the exception location (0-based). + */ + columnNumber: number; + /** + * Script ID of the exception location. + */ + scriptId?: ScriptId; + /** + * URL of the exception location, to be used when the script was not reported. + */ + url?: string; + /** + * JavaScript stack trace if available. + */ + stackTrace?: StackTrace; + /** + * Exception object if available. + */ + exception?: RemoteObject; + /** + * Identifier of the context where exception happened. + */ + executionContextId?: ExecutionContextId; + } + + /** + * Number of milliseconds since epoch. + */ + type Timestamp = number; + + /** + * Number of milliseconds. + */ + type TimeDelta = number; + + /** + * Stack entry for runtime errors and assertions. + */ + interface CallFrame { + /** + * JavaScript function name. + */ + functionName: string; + /** + * JavaScript script id. + */ + scriptId: ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * JavaScript script line number (0-based). + */ + lineNumber: number; + /** + * JavaScript script column number (0-based). + */ + columnNumber: number; + } + + /** + * Call frames for assertions or error messages. + */ + interface StackTrace { + /** + * String label of this stack trace. For async traces this may be a name of the function that + * initiated the async call. + */ + description?: string; + /** + * JavaScript function name. + */ + callFrames: CallFrame[]; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + */ + parent?: StackTrace; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + * @experimental + */ + parentId?: StackTraceId; + } + + /** + * Unique identifier of current debugger. + * @experimental + */ + type UniqueDebuggerId = string; + + /** + * If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This + * allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages. + * @experimental + */ + interface StackTraceId { + id: string; + debuggerId?: UniqueDebuggerId; + } + + interface AwaitPromiseParameterType { + /** + * Identifier of the promise. + */ + promiseObjectId: RemoteObjectId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean; + } + + interface CallFunctionOnParameterType { + /** + * Declaration of the function to call. + */ + functionDeclaration: string; + /** + * Identifier of the object to call function on. Either objectId or executionContextId should + * be specified. + */ + objectId?: RemoteObjectId; + /** + * Call arguments. All call arguments must belong to the same JavaScript world as the target + * object. + */ + arguments?: CallArgument[]; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause + * execution. Overrides `setPauseOnException` state. + */ + silent?: boolean; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean; + /** + * Whether execution should `await` for resulting value and return once awaited promise is + * resolved. + */ + awaitPromise?: boolean; + /** + * Specifies execution context which global object will be used to call function on. Either + * executionContextId or objectId should be specified. + */ + executionContextId?: ExecutionContextId; + /** + * Symbolic group name that can be used to release multiple objects. If objectGroup is not + * specified and objectId is, objectGroup will be inherited from object. + */ + objectGroup?: string; + } + + interface CompileScriptParameterType { + /** + * Expression to compile. + */ + expression: string; + /** + * Source url to be set for the script. + */ + sourceURL: string; + /** + * Specifies whether the compiled script should be persisted. + */ + persistScript: boolean; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the + * evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId; + } + + interface EvaluateParameterType { + /** + * Expression to evaluate. + */ + expression: string; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause + * execution. Overrides `setPauseOnException` state. + */ + silent?: boolean; + /** + * Specifies in which execution context to perform evaluation. If the parameter is omitted the + * evaluation will be performed in the context of the inspected page. + */ + contextId?: ExecutionContextId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean; + /** + * Whether execution should `await` for resulting value and return once awaited promise is + * resolved. + */ + awaitPromise?: boolean; + /** + * Whether to throw an exception if side effect cannot be ruled out during evaluation. + * @experimental + */ + throwOnSideEffect?: boolean; + /** + * Terminate execution after timing out (number of milliseconds). + * @experimental + */ + timeout?: TimeDelta; + } + + interface GetPropertiesParameterType { + /** + * Identifier of the object to return properties for. + */ + objectId: RemoteObjectId; + /** + * If true, returns properties belonging only to the element itself, not to its prototype + * chain. + */ + ownProperties?: boolean; + /** + * If true, returns accessor properties (with getter/setter) only; internal properties are not + * returned either. + * @experimental + */ + accessorPropertiesOnly?: boolean; + /** + * Whether preview should be generated for the results. + * @experimental + */ + generatePreview?: boolean; + } + + interface GlobalLexicalScopeNamesParameterType { + /** + * Specifies in which execution context to lookup global scope variables. + */ + executionContextId?: ExecutionContextId; + } + + interface QueryObjectsParameterType { + /** + * Identifier of the prototype to return objects for. + */ + prototypeObjectId: RemoteObjectId; + /** + * Symbolic group name that can be used to release the results. + */ + objectGroup?: string; + } + + interface ReleaseObjectParameterType { + /** + * Identifier of the object to release. + */ + objectId: RemoteObjectId; + } + + interface ReleaseObjectGroupParameterType { + /** + * Symbolic object group name. + */ + objectGroup: string; + } + + interface RunScriptParameterType { + /** + * Id of the script to run. + */ + scriptId: ScriptId; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the + * evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause + * execution. Overrides `setPauseOnException` state. + */ + silent?: boolean; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean; + /** + * Whether execution should `await` for resulting value and return once awaited promise is + * resolved. + */ + awaitPromise?: boolean; + } + + interface SetAsyncCallStackDepthParameterType { + /** + * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async + * call stacks (default). + */ + maxDepth: number; + } + + interface SetCustomObjectFormatterEnabledParameterType { + enabled: boolean; + } + + interface SetMaxCallStackSizeToCaptureParameterType { + size: number; + } + + interface AddBindingParameterType { + name: string; + executionContextId?: ExecutionContextId; + } + + interface RemoveBindingParameterType { + name: string; + } + + interface AwaitPromiseReturnType { + /** + * Promise result. Will contain rejected value if promise was rejected. + */ + result: RemoteObject; + /** + * Exception details if stack strace is available. + */ + exceptionDetails?: ExceptionDetails; + } + + interface CallFunctionOnReturnType { + /** + * Call result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface CompileScriptReturnType { + /** + * Id of the script. + */ + scriptId?: ScriptId; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface EvaluateReturnType { + /** + * Evaluation result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface GetIsolateIdReturnType { + /** + * The isolate id. + */ + id: string; + } + + interface GetHeapUsageReturnType { + /** + * Used heap size in bytes. + */ + usedSize: number; + /** + * Allocated heap size in bytes. + */ + totalSize: number; + } + + interface GetPropertiesReturnType { + /** + * Object properties. + */ + result: PropertyDescriptor[]; + /** + * Internal object properties (only of the element itself). + */ + internalProperties?: InternalPropertyDescriptor[]; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface GlobalLexicalScopeNamesReturnType { + names: string[]; + } + + interface QueryObjectsReturnType { + /** + * Array with objects. + */ + objects: RemoteObject; + } + + interface RunScriptReturnType { + /** + * Run result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails; + } + + interface BindingCalledEventDataType { + name: string; + payload: string; + /** + * Identifier of the context where the call was made. + */ + executionContextId: ExecutionContextId; + } + + interface ConsoleAPICalledEventDataType { + /** + * Type of the call. + */ + type: string; + /** + * Call arguments. + */ + args: RemoteObject[]; + /** + * Identifier of the context where the call was made. + */ + executionContextId: ExecutionContextId; + /** + * Call timestamp. + */ + timestamp: Timestamp; + /** + * Stack trace captured when the call was made. + */ + stackTrace?: StackTrace; + /** + * Console context descriptor for calls on non-default console context (not console.*): + * 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call + * on named context. + * @experimental + */ + context?: string; + } + + interface ExceptionRevokedEventDataType { + /** + * Reason describing why exception was revoked. + */ + reason: string; + /** + * The id of revoked exception, as reported in `exceptionThrown`. + */ + exceptionId: number; + } + + interface ExceptionThrownEventDataType { + /** + * Timestamp of the exception. + */ + timestamp: Timestamp; + exceptionDetails: ExceptionDetails; + } + + interface ExecutionContextCreatedEventDataType { + /** + * A newly created execution context. + */ + context: ExecutionContextDescription; + } + + interface ExecutionContextDestroyedEventDataType { + /** + * Id of the destroyed context + */ + executionContextId: ExecutionContextId; + } + + interface InspectRequestedEventDataType { + object: RemoteObject; + hints: {}; + } + } + + namespace Schema { + /** + * Description of the protocol domain. + */ + interface Domain { + /** + * Domain name. + */ + name: string; + /** + * Domain version. + */ + version: string; + } + + interface GetDomainsReturnType { + /** + * List of supported domains. + */ + domains: Domain[]; + } + } + + namespace NodeTracing { + interface TraceConfig { + /** + * Controls how the trace buffer stores data. + */ + recordMode?: string; + /** + * Included category filters. + */ + includedCategories: string[]; + } + + interface StartParameterType { + traceConfig: TraceConfig; + } + + interface GetCategoriesReturnType { + /** + * A list of supported tracing categories. + */ + categories: string[]; + } + + interface DataCollectedEventDataType { + value: Array<{}>; + } + } + + namespace NodeWorker { + type WorkerID = string; + + /** + * Unique identifier of attached debugging session. + */ + type SessionID = string; + + interface WorkerInfo { + workerId: WorkerID; + type: string; + title: string; + url: string; + } + + interface SendMessageToWorkerParameterType { + message: string; + /** + * Identifier of the session. + */ + sessionId: SessionID; + } + + interface EnableParameterType { + /** + * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` + * message to run them. + */ + waitForDebuggerOnStart: boolean; + } + + interface AttachedToWorkerEventDataType { + /** + * Identifier assigned to the session used to send/receive messages. + */ + sessionId: SessionID; + workerInfo: WorkerInfo; + waitingForDebugger: boolean; + } + + interface DetachedFromWorkerEventDataType { + /** + * Detached session identifier. + */ + sessionId: SessionID; + } + + interface ReceivedMessageFromWorkerEventDataType { + /** + * Identifier of a session which sends a message. + */ + sessionId: SessionID; + message: string; + } + } + + /** + * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications. + */ + class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. + * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend. + */ + constructor(); + + /** + * Connects a session to the inspector back-end. + * An exception will be thrown if there is already a connected session established either + * through the API or by a front-end connected to the Inspector WebSocket port. + */ + connect(): void; + + /** + * Immediately close the session. All pending message callbacks will be called with an error. + * session.connect() will need to be called to be able to send messages again. + * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. + */ + disconnect(): void; + + /** + * Posts a message to the inspector back-end. callback will be notified when a response is received. + * callback is a function that accepts two optional arguments - error and message-specific result. + */ + post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void; + post(method: string, callback?: (err: Error | null, params?: {}) => void): void; + + /** + * Does nothing. + */ + post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void; + + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: "Console.disable", callback?: (err: Error | null) => void): void; + + /** + * Enables console domain, sends the messages collected so far to the client by means of the + * `messageAdded` notification. + */ + post(method: "Console.enable", callback?: (err: Error | null) => void): void; + + /** + * Continues execution until specific location is reached. + */ + post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void; + + /** + * Disables debugger for given page. + */ + post(method: "Debugger.disable", callback?: (err: Error | null) => void): void; + + /** + * Enables debugger for the given page. Clients should not assume that the debugging has been + * enabled until the result for this command is received. + */ + post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; + + /** + * Evaluates expression on a given call frame. + */ + post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be + * the same. + */ + post( + method: "Debugger.getPossibleBreakpoints", + params?: Debugger.GetPossibleBreakpointsParameterType, + callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void + ): void; + post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + + /** + * Returns source for the script with given id. + */ + post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + + /** + * Returns stack trace with given `stackTraceId`. + * @experimental + */ + post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + + /** + * Stops on the next JavaScript statement. + */ + post(method: "Debugger.pause", callback?: (err: Error | null) => void): void; + + /** + * @experimental + */ + post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void; + + /** + * Removes JavaScript breakpoint. + */ + post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void; + + /** + * Restarts particular call frame from the beginning. + */ + post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + + /** + * Resumes JavaScript execution. + */ + post(method: "Debugger.resume", callback?: (err: Error | null) => void): void; + + /** + * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and + * Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled + * before next pause. Returns success when async task is actually scheduled, returns error if no + * task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void; + + /** + * Searches for given string in script content. + */ + post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + + /** + * Enables or disables async call stacks tracking. + */ + post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void; + + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in + * scripts with url matching one of the patterns. VM will try to leave blackboxed script by + * performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void; + + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted + * scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * Positions array contains positions where blackbox state is changed. First interval isn't + * blackboxed. Array should be sorted. + * @experimental + */ + post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void; + + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this + * command is issued, all existing parsed scripts will have breakpoints resolved and returned in + * `locations` property. Further matching script parsing will result in subsequent + * `breakpointResolved` events issued. This logical breakpoint will survive page reloads. + */ + post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + + /** + * Sets JavaScript breakpoint before each call to the given function. + * If another function was created from the same source as a given one, + * calling it will also trigger the breakpoint. + * @experimental + */ + post( + method: "Debugger.setBreakpointOnFunctionCall", + params?: Debugger.SetBreakpointOnFunctionCallParameterType, + callback?: (err: Error | null, params: Debugger.SetBreakpointOnFunctionCallReturnType) => void + ): void; + post(method: "Debugger.setBreakpointOnFunctionCall", callback?: (err: Error | null, params: Debugger.SetBreakpointOnFunctionCallReturnType) => void): void; + + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void; + + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or + * no exceptions. Initial pause on exceptions state is `none`. + */ + post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void; + + /** + * Changes return value in top frame. Available only at return break position. + * @experimental + */ + post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void; + + /** + * Edits JavaScript source live. + */ + post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void; + + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be + * mutated manually. + */ + post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void; + + /** + * Steps into the function call. + */ + post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void; + + /** + * Steps out of the function call. + */ + post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void; + + /** + * Steps over the statement. + */ + post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void; + + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details + * $x functions). + */ + post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + + post( + method: "HeapProfiler.getObjectByHeapObjectId", + params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, + callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void + ): void; + post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + + post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; + + post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; + + post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.disable", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.enable", callback?: (err: Error | null) => void): void; + + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to + * garbage collection. + */ + post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; + + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.start", callback?: (err: Error | null) => void): void; + + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code + * coverage may be incomplete. Enabling prevents running optimized code and resets execution + * counters. + */ + post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void; + + /** + * Enable type profile. + * @experimental + */ + post(method: "Profiler.startTypeProfile", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; + + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows + * executing optimized code. + */ + post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void; + + /** + * Disable type profile. Disabling releases type profile data collected so far. + * @experimental + */ + post(method: "Profiler.stopTypeProfile", callback?: (err: Error | null) => void): void; + + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code + * coverage needs to have started. + */ + post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; + + /** + * Collect type profile. + * @experimental + */ + post(method: "Profiler.takeTypeProfile", callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void; + + /** + * Add handler to promise with given promise object id. + */ + post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + + /** + * Calls function with given declaration on the given object. Object group of the result is + * inherited from the target object. + */ + post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + + /** + * Compiles expression. + */ + post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + + /** + * Disables reporting of execution contexts creation. + */ + post(method: "Runtime.disable", callback?: (err: Error | null) => void): void; + + /** + * Discards collected exceptions and console API calls. + */ + post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void; + + /** + * Enables reporting of execution contexts creation by means of `executionContextCreated` event. + * When the reporting gets enabled the event will be sent immediately for each existing execution + * context. + */ + post(method: "Runtime.enable", callback?: (err: Error | null) => void): void; + + /** + * Evaluates expression on global object. + */ + post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + + /** + * Returns the isolate id. + * @experimental + */ + post(method: "Runtime.getIsolateId", callback?: (err: Error | null, params: Runtime.GetIsolateIdReturnType) => void): void; + + /** + * Returns the JavaScript heap usage. + * It is the total usage of the corresponding isolate not scoped to a particular Runtime. + * @experimental + */ + post(method: "Runtime.getHeapUsage", callback?: (err: Error | null, params: Runtime.GetHeapUsageReturnType) => void): void; + + /** + * Returns properties of a given object. Object group of the result is inherited from the target + * object. + */ + post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + + /** + * Returns all let, const and class variables from global scope. + */ + post( + method: "Runtime.globalLexicalScopeNames", + params?: Runtime.GlobalLexicalScopeNamesParameterType, + callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void + ): void; + post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; + + post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + + /** + * Releases remote object with given id. + */ + post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void; + + /** + * Releases all remote objects that belong to a given group. + */ + post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void; + + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void; + + /** + * Runs script with given id in a given context. + */ + post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + + /** + * Enables or disables async call stacks tracking. + */ + post(method: "Runtime.setAsyncCallStackDepth", params?: Runtime.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void; + + /** + * @experimental + */ + post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void; + + /** + * @experimental + */ + post(method: "Runtime.setMaxCallStackSizeToCapture", params?: Runtime.SetMaxCallStackSizeToCaptureParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.setMaxCallStackSizeToCapture", callback?: (err: Error | null) => void): void; + + /** + * Terminate current or next JavaScript execution. + * Will cancel the termination when the outer-most script execution ends. + * @experimental + */ + post(method: "Runtime.terminateExecution", callback?: (err: Error | null) => void): void; + + /** + * If executionContextId is empty, adds binding with the given name on the + * global objects of all inspected contexts, including those created later, + * bindings survive reloads. + * If executionContextId is specified, adds binding only on global object of + * given execution context. + * Binding function takes exactly one argument, this argument should be string, + * in case of any other input, function throws an exception. + * Each binding function call produces Runtime.bindingCalled notification. + * @experimental + */ + post(method: "Runtime.addBinding", params?: Runtime.AddBindingParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.addBinding", callback?: (err: Error | null) => void): void; + + /** + * This method does not remove binding function from global object but + * unsubscribes current runtime agent from Runtime.bindingCalled notifications. + * @experimental + */ + post(method: "Runtime.removeBinding", params?: Runtime.RemoveBindingParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.removeBinding", callback?: (err: Error | null) => void): void; + + /** + * Returns supported domains. + */ + post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; + + /** + * Gets supported tracing categories. + */ + post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; + + /** + * Start trace events collection. + */ + post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void; + + /** + * Stop trace events collection. Remaining collected events will be sent as a sequence of + * dataCollected events followed by tracingComplete event. + */ + post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void; + + /** + * Sends protocol message over session with given id. + */ + post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void; + + /** + * Instructs the inspector to attach to running workers. Will also attach to new workers + * as they start + */ + post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void; + + /** + * Detaches from all running workers and disables attaching to new workers as they are started. + */ + post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void; + + // Events + + addListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new console message is added. + */ + addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected + * scripts upon enabling debugger. + */ + addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last + * seen object id and corresponding timestamp. If the were changes in the heap since last event + * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + /** + * Notification is issued every time when binding is called. + * @experimental + */ + addListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when new execution context is created. + */ + addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API + * call). + */ + addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean; + emit(event: "Console.messageAdded", message: InspectorNotification): boolean; + emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; + emit(event: "Debugger.paused", message: InspectorNotification): boolean; + emit(event: "Debugger.resumed"): boolean; + emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.resetProfiles"): boolean; + emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; + emit(event: "Runtime.bindingCalled", message: InspectorNotification): boolean; + emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; + emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; + emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextsCleared"): boolean; + emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; + emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; + emit(event: "NodeTracing.tracingComplete"): boolean; + emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new console message is added. + */ + on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + on(event: "Debugger.resumed", listener: () => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected + * scripts upon enabling debugger. + */ + on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last + * seen object id and corresponding timestamp. If the were changes in the heap since last event + * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.resetProfiles", listener: () => void): this; + on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + /** + * Notification is issued every time when binding is called. + * @experimental + */ + on(event: "Runtime.bindingCalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when new execution context is created. + */ + on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API + * call). + */ + on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + on(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new console message is added. + */ + once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + once(event: "Debugger.resumed", listener: () => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected + * scripts upon enabling debugger. + */ + once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last + * seen object id and corresponding timestamp. If the were changes in the heap since last event + * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.resetProfiles", listener: () => void): this; + once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + /** + * Notification is issued every time when binding is called. + * @experimental + */ + once(event: "Runtime.bindingCalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when new execution context is created. + */ + once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API + * call). + */ + once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + once(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new console message is added. + */ + prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected + * scripts upon enabling debugger. + */ + prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last + * seen object id and corresponding timestamp. If the were changes in the heap since last event + * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + /** + * Notification is issued every time when binding is called. + * @experimental + */ + prependListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when new execution context is created. + */ + prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API + * call). + */ + prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new console message is added. + */ + prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected + * scripts upon enabling debugger. + */ + prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last + * seen object id and corresponding timestamp. If the were changes in the heap since last event + * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + /** + * Notification is issued every time when binding is called. + * @experimental + */ + prependOnceListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API + * call). + */ + prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Contains an bucket of collected trace events. + */ + prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + + /** + * Issued when attached to a worker. + */ + prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when detached from the worker. + */ + prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + } + + // Top Level API + + /** + * Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programatically after node has started. + * If wait is true, will block until a client has connected to the inspect port and flow control has been passed to the debugger client. + * @param port Port to listen on for inspector connections. Optional, defaults to what was specified on the CLI. + * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI. + * @param wait Block until a client has connected. Optional, defaults to false. + */ + function open(port?: number, host?: string, wait?: boolean): void; + + /** + * Deactivate the inspector. Blocks until there are no active connections. + */ + function close(): void; + + /** + * Return the URL of the active inspector, or `undefined` if there is none. + */ + function url(): string | undefined; +} diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts new file mode 100644 index 00000000..f512be7e --- /dev/null +++ b/node_modules/@types/node/module.d.ts @@ -0,0 +1,3 @@ +declare module "module" { + export = NodeJS.Module; +} diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts new file mode 100644 index 00000000..c8bccb7b --- /dev/null +++ b/node_modules/@types/node/net.d.ts @@ -0,0 +1,249 @@ +declare module "net" { + import * as stream from "stream"; + import * as events from "events"; + import * as dns from "dns"; + + type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void; + + interface AddressInfo { + address: string; + family: string; + port: number; + } + + interface SocketConstructorOpts { + fd?: number; + allowHalfOpen?: boolean; + readable?: boolean; + writable?: boolean; + } + + interface TcpSocketConnectOpts { + port: number; + host?: string; + localAddress?: string; + localPort?: number; + hints?: number; + family?: number; + lookup?: LookupFunction; + } + + interface IpcSocketConnectOpts { + path: string; + } + + type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; + + class Socket extends stream.Duplex { + constructor(options?: SocketConstructorOpts); + + // Extended base methods + write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean; + write(str: Uint8Array | string, encoding?: string, cb?: (err?: Error) => void): boolean; + + connect(options: SocketConnectOpts, connectionListener?: () => void): this; + connect(port: number, host: string, connectionListener?: () => void): this; + connect(port: number, connectionListener?: () => void): this; + connect(path: string, connectionListener?: () => void): this; + + setEncoding(encoding?: string): this; + pause(): this; + resume(): this; + setTimeout(timeout: number, callback?: () => void): this; + setNoDelay(noDelay?: boolean): this; + setKeepAlive(enable?: boolean, initialDelay?: number): this; + address(): AddressInfo | string; + unref(): void; + ref(): void; + + readonly bufferSize: number; + readonly bytesRead: number; + readonly bytesWritten: number; + readonly connecting: boolean; + readonly destroyed: boolean; + readonly localAddress: string; + readonly localPort: number; + readonly remoteAddress?: string; + readonly remoteFamily?: string; + readonly remotePort?: number; + + // Extended base methods + end(cb?: () => void): void; + end(buffer: Uint8Array | string, cb?: () => void): void; + end(str: Uint8Array | string, encoding?: string, cb?: () => void): void; + + /** + * events.EventEmitter + * 1. close + * 2. connect + * 3. data + * 4. drain + * 5. end + * 6. error + * 7. lookup + * 8. timeout + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: (had_error: boolean) => void): this; + addListener(event: "connect", listener: () => void): this; + addListener(event: "data", listener: (data: Buffer) => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + addListener(event: "timeout", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close", had_error: boolean): boolean; + emit(event: "connect"): boolean; + emit(event: "data", data: Buffer): boolean; + emit(event: "drain"): boolean; + emit(event: "end"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean; + emit(event: "timeout"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: (had_error: boolean) => void): this; + on(event: "connect", listener: () => void): this; + on(event: "data", listener: (data: Buffer) => void): this; + on(event: "drain", listener: () => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + on(event: "timeout", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: (had_error: boolean) => void): this; + once(event: "connect", listener: () => void): this; + once(event: "data", listener: (data: Buffer) => void): this; + once(event: "drain", listener: () => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + once(event: "timeout", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: (had_error: boolean) => void): this; + prependListener(event: "connect", listener: () => void): this; + prependListener(event: "data", listener: (data: Buffer) => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependListener(event: "timeout", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: (had_error: boolean) => void): this; + prependOnceListener(event: "connect", listener: () => void): this; + prependOnceListener(event: "data", listener: (data: Buffer) => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + } + + interface ListenOptions { + port?: number; + host?: string; + backlog?: number; + path?: string; + exclusive?: boolean; + readableAll?: boolean; + writableAll?: boolean; + /** + * @default false + */ + ipv6Only?: boolean; + } + + // https://github.com/nodejs/node/blob/master/lib/net.js + class Server extends events.EventEmitter { + constructor(connectionListener?: (socket: Socket) => void); + constructor(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void); + + listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, hostname?: string, listeningListener?: () => void): this; + listen(port?: number, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, listeningListener?: () => void): this; + listen(path: string, backlog?: number, listeningListener?: () => void): this; + listen(path: string, listeningListener?: () => void): this; + listen(options: ListenOptions, listeningListener?: () => void): this; + listen(handle: any, backlog?: number, listeningListener?: () => void): this; + listen(handle: any, listeningListener?: () => void): this; + close(callback?: (err?: Error) => void): this; + address(): AddressInfo | string | null; + getConnections(cb: (error: Error | null, count: number) => void): void; + ref(): this; + unref(): this; + maxConnections: number; + connections: number; + listening: boolean; + + /** + * events.EventEmitter + * 1. close + * 2. connection + * 3. error + * 4. listening + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "connection", listener: (socket: Socket) => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "connection", socket: Socket): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "connection", listener: (socket: Socket) => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "connection", listener: (socket: Socket) => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "connection", listener: (socket: Socket) => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + } + + interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { + timeout?: number; + } + + interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { + timeout?: number; + } + + type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; + + function createServer(connectionListener?: (socket: Socket) => void): Server; + function createServer(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void): Server; + function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; + function connect(port: number, host?: string, connectionListener?: () => void): Socket; + function connect(path: string, connectionListener?: () => void): Socket; + function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; + function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; + function createConnection(path: string, connectionListener?: () => void): Socket; + function isIP(input: string): number; + function isIPv4(input: string): boolean; + function isIPv6(input: string): boolean; +} diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts new file mode 100644 index 00000000..4182e507 --- /dev/null +++ b/node_modules/@types/node/os.d.ts @@ -0,0 +1,201 @@ +declare module "os" { + interface CpuInfo { + model: string; + speed: number; + times: { + user: number; + nice: number; + sys: number; + idle: number; + irq: number; + }; + } + + interface NetworkInterfaceBase { + address: string; + netmask: string; + mac: string; + internal: boolean; + cidr: string | null; + } + + interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { + family: "IPv4"; + } + + interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { + family: "IPv6"; + scopeid: number; + } + + interface UserInfo { + username: T; + uid: number; + gid: number; + shell: T; + homedir: T; + } + + type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; + + function hostname(): string; + function loadavg(): number[]; + function uptime(): number; + function freemem(): number; + function totalmem(): number; + function cpus(): CpuInfo[]; + function type(): string; + function release(): string; + function networkInterfaces(): { [index: string]: NetworkInterfaceInfo[] }; + function homedir(): string; + function userInfo(options: { encoding: 'buffer' }): UserInfo; + function userInfo(options?: { encoding: string }): UserInfo; + const constants: { + UV_UDP_REUSEADDR: number; + signals: { + SIGHUP: number; + SIGINT: number; + SIGQUIT: number; + SIGILL: number; + SIGTRAP: number; + SIGABRT: number; + SIGIOT: number; + SIGBUS: number; + SIGFPE: number; + SIGKILL: number; + SIGUSR1: number; + SIGSEGV: number; + SIGUSR2: number; + SIGPIPE: number; + SIGALRM: number; + SIGTERM: number; + SIGCHLD: number; + SIGSTKFLT: number; + SIGCONT: number; + SIGSTOP: number; + SIGTSTP: number; + SIGTTIN: number; + SIGTTOU: number; + SIGURG: number; + SIGXCPU: number; + SIGXFSZ: number; + SIGVTALRM: number; + SIGPROF: number; + SIGWINCH: number; + SIGIO: number; + SIGPOLL: number; + SIGPWR: number; + SIGSYS: number; + SIGUNUSED: number; + }; + errno: { + E2BIG: number; + EACCES: number; + EADDRINUSE: number; + EADDRNOTAVAIL: number; + EAFNOSUPPORT: number; + EAGAIN: number; + EALREADY: number; + EBADF: number; + EBADMSG: number; + EBUSY: number; + ECANCELED: number; + ECHILD: number; + ECONNABORTED: number; + ECONNREFUSED: number; + ECONNRESET: number; + EDEADLK: number; + EDESTADDRREQ: number; + EDOM: number; + EDQUOT: number; + EEXIST: number; + EFAULT: number; + EFBIG: number; + EHOSTUNREACH: number; + EIDRM: number; + EILSEQ: number; + EINPROGRESS: number; + EINTR: number; + EINVAL: number; + EIO: number; + EISCONN: number; + EISDIR: number; + ELOOP: number; + EMFILE: number; + EMLINK: number; + EMSGSIZE: number; + EMULTIHOP: number; + ENAMETOOLONG: number; + ENETDOWN: number; + ENETRESET: number; + ENETUNREACH: number; + ENFILE: number; + ENOBUFS: number; + ENODATA: number; + ENODEV: number; + ENOENT: number; + ENOEXEC: number; + ENOLCK: number; + ENOLINK: number; + ENOMEM: number; + ENOMSG: number; + ENOPROTOOPT: number; + ENOSPC: number; + ENOSR: number; + ENOSTR: number; + ENOSYS: number; + ENOTCONN: number; + ENOTDIR: number; + ENOTEMPTY: number; + ENOTSOCK: number; + ENOTSUP: number; + ENOTTY: number; + ENXIO: number; + EOPNOTSUPP: number; + EOVERFLOW: number; + EPERM: number; + EPIPE: number; + EPROTO: number; + EPROTONOSUPPORT: number; + EPROTOTYPE: number; + ERANGE: number; + EROFS: number; + ESPIPE: number; + ESRCH: number; + ESTALE: number; + ETIME: number; + ETIMEDOUT: number; + ETXTBSY: number; + EWOULDBLOCK: number; + EXDEV: number; + }; + priority: { + PRIORITY_LOW: number; + PRIORITY_BELOW_NORMAL: number; + PRIORITY_NORMAL: number; + PRIORITY_ABOVE_NORMAL: number; + PRIORITY_HIGH: number; + PRIORITY_HIGHEST: number; + } + }; + function arch(): string; + function platform(): NodeJS.Platform; + function tmpdir(): string; + const EOL: string; + function endianness(): "BE" | "LE"; + /** + * Gets the priority of a process. + * Defaults to current process. + */ + function getPriority(pid?: number): number; + /** + * Sets the priority of the current process. + * @param priority Must be in range of -20 to 19 + */ + function setPriority(priority: number): void; + /** + * Sets the priority of the process specified process. + * @param priority Must be in range of -20 to 19 + */ + function setPriority(pid: number, priority: number): void; +} diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json new file mode 100644 index 00000000..ad2bcae1 --- /dev/null +++ b/node_modules/@types/node/package.json @@ -0,0 +1,206 @@ +{ + "name": "@types/node", + "version": "12.6.8", + "description": "TypeScript definitions for Node.js", + "license": "MIT", + "contributors": [ + { + "name": "Microsoft TypeScript", + "url": "https://github.com/Microsoft", + "githubUsername": "Microsoft" + }, + { + "name": "DefinitelyTyped", + "url": "https://github.com/DefinitelyTyped", + "githubUsername": "DefinitelyTyped" + }, + { + "name": "Alberto Schiabel", + "url": "https://github.com/jkomyno", + "githubUsername": "jkomyno" + }, + { + "name": "Alexander T.", + "url": "https://github.com/a-tarasyuk", + "githubUsername": "a-tarasyuk" + }, + { + "name": "Alvis HT Tang", + "url": "https://github.com/alvis", + "githubUsername": "alvis" + }, + { + "name": "Andrew Makarov", + "url": "https://github.com/r3nya", + "githubUsername": "r3nya" + }, + { + "name": "Benjamin Toueg", + "url": "https://github.com/btoueg", + "githubUsername": "btoueg" + }, + { + "name": "Bruno Scheufler", + "url": "https://github.com/brunoscheufler", + "githubUsername": "brunoscheufler" + }, + { + "name": "Chigozirim C.", + "url": "https://github.com/smac89", + "githubUsername": "smac89" + }, + { + "name": "Christian Vaagland Tellnes", + "url": "https://github.com/tellnes", + "githubUsername": "tellnes" + }, + { + "name": "David Junger", + "url": "https://github.com/touffy", + "githubUsername": "touffy" + }, + { + "name": "Deividas Bakanas", + "url": "https://github.com/DeividasBakanas", + "githubUsername": "DeividasBakanas" + }, + { + "name": "Eugene Y. Q. Shen", + "url": "https://github.com/eyqs", + "githubUsername": "eyqs" + }, + { + "name": "Flarna", + "url": "https://github.com/Flarna", + "githubUsername": "Flarna" + }, + { + "name": "Hannes Magnusson", + "url": "https://github.com/Hannes-Magnusson-CK", + "githubUsername": "Hannes-Magnusson-CK" + }, + { + "name": "Hoàng Văn Khải", + "url": "https://github.com/KSXGitHub", + "githubUsername": "KSXGitHub" + }, + { + "name": "Huw", + "url": "https://github.com/hoo29", + "githubUsername": "hoo29" + }, + { + "name": "Kelvin Jin", + "url": "https://github.com/kjin", + "githubUsername": "kjin" + }, + { + "name": "Klaus Meinhardt", + "url": "https://github.com/ajafff", + "githubUsername": "ajafff" + }, + { + "name": "Lishude", + "url": "https://github.com/islishude", + "githubUsername": "islishude" + }, + { + "name": "Mariusz Wiktorczyk", + "url": "https://github.com/mwiktorczyk", + "githubUsername": "mwiktorczyk" + }, + { + "name": "Matthieu Sieben", + "url": "https://github.com/matthieusieben", + "githubUsername": "matthieusieben" + }, + { + "name": "Mohsen Azimi", + "url": "https://github.com/mohsen1", + "githubUsername": "mohsen1" + }, + { + "name": "Nicolas Even", + "url": "https://github.com/n-e", + "githubUsername": "n-e" + }, + { + "name": "Nicolas Voigt", + "url": "https://github.com/octo-sniffle", + "githubUsername": "octo-sniffle" + }, + { + "name": "Parambir Singh", + "url": "https://github.com/parambirs", + "githubUsername": "parambirs" + }, + { + "name": "Sebastian Silbermann", + "url": "https://github.com/eps1lon", + "githubUsername": "eps1lon" + }, + { + "name": "Simon Schick", + "url": "https://github.com/SimonSchick", + "githubUsername": "SimonSchick" + }, + { + "name": "Thomas den Hollander", + "url": "https://github.com/ThomasdenH", + "githubUsername": "ThomasdenH" + }, + { + "name": "Wilco Bakker", + "url": "https://github.com/WilcoBakker", + "githubUsername": "WilcoBakker" + }, + { + "name": "wwwy3y3", + "url": "https://github.com/wwwy3y3", + "githubUsername": "wwwy3y3" + }, + { + "name": "Zane Hannan AU", + "url": "https://github.com/ZaneHannanAU", + "githubUsername": "ZaneHannanAU" + }, + { + "name": "Samuel Ainsworth", + "url": "https://github.com/samuela", + "githubUsername": "samuela" + }, + { + "name": "Kyle Uehlein", + "url": "https://github.com/kuehlein", + "githubUsername": "kuehlein" + }, + { + "name": "Jordi Oliveras Rovira", + "url": "https://github.com/j-oliveras", + "githubUsername": "j-oliveras" + }, + { + "name": "Thanik Bhongbhibhat", + "url": "https://github.com/bhongy", + "githubUsername": "bhongy" + } + ], + "main": "", + "types": "index", + "typesVersions": { + ">=3.2.0-0": { + "*": [ + "ts3.2/*" + ] + } + }, + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/node" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "8630266379794ffe5826422974749423e8d09e4d652e641cbf6ade81782c32af", + "typeScriptVersion": "2.0" +} \ No newline at end of file diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts new file mode 100644 index 00000000..2f4a5491 --- /dev/null +++ b/node_modules/@types/node/path.d.ts @@ -0,0 +1,159 @@ +declare module "path" { + /** + * A parsed path object generated by path.parse() or consumed by path.format(). + */ + interface ParsedPath { + /** + * The root of the path such as '/' or 'c:\' + */ + root: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base: string; + /** + * The file extension (if any) such as '.html' + */ + ext: string; + /** + * The file name without extension (if any) such as 'index' + */ + name: string; + } + interface FormatInputPathObject { + /** + * The root of the path such as '/' or 'c:\' + */ + root?: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir?: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base?: string; + /** + * The file extension (if any) such as '.html' + */ + ext?: string; + /** + * The file name without extension (if any) such as 'index' + */ + name?: string; + } + + /** + * Normalize a string path, reducing '..' and '.' parts. + * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. + * + * @param p string path to normalize. + */ + function normalize(p: string): string; + /** + * Join all arguments together and normalize the resulting path. + * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. + * + * @param paths paths to join. + */ + function join(...paths: string[]): string; + /** + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * + * Starting from leftmost {from} parameter, resolves {to} to an absolute path. + * + * If {to} isn't already absolute, {from} arguments are prepended in right to left order, + * until an absolute path is found. If after using all {from} paths still no absolute path is found, + * the current working directory is used as well. The resulting path is normalized, + * and trailing slashes are removed unless the path gets resolved to the root directory. + * + * @param pathSegments string paths to join. Non-string arguments are ignored. + */ + function resolve(...pathSegments: string[]): string; + /** + * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. + * + * @param path path to test. + */ + function isAbsolute(path: string): boolean; + /** + * Solve the relative path from {from} to {to}. + * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. + */ + function relative(from: string, to: string): string; + /** + * Return the directory name of a path. Similar to the Unix dirname command. + * + * @param p the path to evaluate. + */ + function dirname(p: string): string; + /** + * Return the last portion of a path. Similar to the Unix basename command. + * Often used to extract the file name from a fully qualified path. + * + * @param p the path to evaluate. + * @param ext optionally, an extension to remove from the result. + */ + function basename(p: string, ext?: string): string; + /** + * Return the extension of the path, from the last '.' to end of string in the last portion of the path. + * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string + * + * @param p the path to evaluate. + */ + function extname(p: string): string; + /** + * The platform-specific file separator. '\\' or '/'. + */ + const sep: '\\' | '/'; + /** + * The platform-specific file delimiter. ';' or ':'. + */ + const delimiter: ';' | ':'; + /** + * Returns an object from a path string - the opposite of format(). + * + * @param pathString path to evaluate. + */ + function parse(pathString: string): ParsedPath; + /** + * Returns a path string from an object - the opposite of parse(). + * + * @param pathString path to evaluate. + */ + function format(pathObject: FormatInputPathObject): string; + + namespace posix { + function normalize(p: string): string; + function join(...paths: string[]): string; + function resolve(...pathSegments: string[]): string; + function isAbsolute(p: string): boolean; + function relative(from: string, to: string): string; + function dirname(p: string): string; + function basename(p: string, ext?: string): string; + function extname(p: string): string; + const sep: string; + const delimiter: string; + function parse(p: string): ParsedPath; + function format(pP: FormatInputPathObject): string; + } + + namespace win32 { + function normalize(p: string): string; + function join(...paths: string[]): string; + function resolve(...pathSegments: string[]): string; + function isAbsolute(p: string): boolean; + function relative(from: string, to: string): string; + function dirname(p: string): string; + function basename(p: string, ext?: string): string; + function extname(p: string): string; + const sep: string; + const delimiter: string; + function parse(p: string): ParsedPath; + function format(pP: FormatInputPathObject): string; + } +} diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts new file mode 100644 index 00000000..bf44d446 --- /dev/null +++ b/node_modules/@types/node/perf_hooks.d.ts @@ -0,0 +1,304 @@ +declare module "perf_hooks" { + import { AsyncResource } from "async_hooks"; + + interface PerformanceEntry { + /** + * The total number of milliseconds elapsed for this entry. + * This value will not be meaningful for all Performance Entry types. + */ + readonly duration: number; + + /** + * The name of the performance entry. + */ + readonly name: string; + + /** + * The high resolution millisecond timestamp marking the starting time of the Performance Entry. + */ + readonly startTime: number; + + /** + * The type of the performance entry. + * Currently it may be one of: 'node', 'mark', 'measure', 'gc', or 'function'. + */ + readonly entryType: string; + + /** + * When performanceEntry.entryType is equal to 'gc', the performance.kind property identifies + * the type of garbage collection operation that occurred. + * The value may be one of perf_hooks.constants. + */ + readonly kind?: number; + } + + interface PerformanceNodeTiming extends PerformanceEntry { + /** + * The high resolution millisecond timestamp at which the Node.js process completed bootstrap. + */ + readonly bootstrapComplete: number; + + /** + * The high resolution millisecond timestamp at which cluster processing ended. + */ + readonly clusterSetupEnd: number; + + /** + * The high resolution millisecond timestamp at which cluster processing started. + */ + readonly clusterSetupStart: number; + + /** + * The high resolution millisecond timestamp at which the Node.js event loop exited. + */ + readonly loopExit: number; + + /** + * The high resolution millisecond timestamp at which the Node.js event loop started. + */ + readonly loopStart: number; + + /** + * The high resolution millisecond timestamp at which main module load ended. + */ + readonly moduleLoadEnd: number; + + /** + * The high resolution millisecond timestamp at which main module load started. + */ + readonly moduleLoadStart: number; + + /** + * The high resolution millisecond timestamp at which the Node.js process was initialized. + */ + readonly nodeStart: number; + + /** + * The high resolution millisecond timestamp at which preload module load ended. + */ + readonly preloadModuleLoadEnd: number; + + /** + * The high resolution millisecond timestamp at which preload module load started. + */ + readonly preloadModuleLoadStart: number; + + /** + * The high resolution millisecond timestamp at which third_party_main processing ended. + */ + readonly thirdPartyMainEnd: number; + + /** + * The high resolution millisecond timestamp at which third_party_main processing started. + */ + readonly thirdPartyMainStart: number; + + /** + * The high resolution millisecond timestamp at which the V8 platform was initialized. + */ + readonly v8Start: number; + } + + interface Performance { + /** + * If name is not provided, removes all PerformanceFunction objects from the Performance Timeline. + * If name is provided, removes entries with name. + * @param name + */ + clearFunctions(name?: string): void; + + /** + * If name is not provided, removes all PerformanceMark objects from the Performance Timeline. + * If name is provided, removes only the named mark. + * @param name + */ + clearMarks(name?: string): void; + + /** + * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline. + * If name is provided, removes only objects whose performanceEntry.name matches name. + */ + clearMeasures(name?: string): void; + + /** + * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime. + * @return list of all PerformanceEntry objects + */ + getEntries(): PerformanceEntry[]; + + /** + * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type. + * @param name + * @param type + * @return list of all PerformanceEntry objects + */ + getEntriesByName(name: string, type?: string): PerformanceEntry[]; + + /** + * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.entryType is equal to type. + * @param type + * @return list of all PerformanceEntry objects + */ + getEntriesByType(type: string): PerformanceEntry[]; + + /** + * Creates a new PerformanceMark entry in the Performance Timeline. + * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark', + * and whose performanceEntry.duration is always 0. + * Performance marks are used to mark specific significant moments in the Performance Timeline. + * @param name + */ + mark(name?: string): void; + + /** + * Creates a new PerformanceMeasure entry in the Performance Timeline. + * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure', + * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark. + * + * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify + * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist, + * then startMark is set to timeOrigin by default. + * + * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp + * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown. + * @param name + * @param startMark + * @param endMark + */ + measure(name: string, startMark: string, endMark: string): void; + + /** + * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones. + */ + readonly nodeTiming: PerformanceNodeTiming; + + /** + * @return the current high resolution millisecond timestamp + */ + now(): number; + + /** + * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured. + */ + readonly timeOrigin: number; + + /** + * Wraps a function within a new function that measures the running time of the wrapped function. + * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed. + * @param fn + */ + timerify any>(fn: T): T; + } + + interface PerformanceObserverEntryList { + /** + * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime. + */ + getEntries(): PerformanceEntry[]; + + /** + * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type. + */ + getEntriesByName(name: string, type?: string): PerformanceEntry[]; + + /** + * @return Returns a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime + * whose performanceEntry.entryType is equal to type. + */ + getEntriesByType(type: string): PerformanceEntry[]; + } + + type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void; + + class PerformanceObserver extends AsyncResource { + constructor(callback: PerformanceObserverCallback); + + /** + * Disconnects the PerformanceObserver instance from all notifications. + */ + disconnect(): void; + + /** + * Subscribes the PerformanceObserver instance to notifications of new PerformanceEntry instances identified by options.entryTypes. + * When options.buffered is false, the callback will be invoked once for every PerformanceEntry instance. + * Property buffered defaults to false. + * @param options + */ + observe(options: { entryTypes: string[], buffered?: boolean }): void; + } + + namespace constants { + const NODE_PERFORMANCE_GC_MAJOR: number; + const NODE_PERFORMANCE_GC_MINOR: number; + const NODE_PERFORMANCE_GC_INCREMENTAL: number; + const NODE_PERFORMANCE_GC_WEAKCB: number; + } + + const performance: Performance; + + interface EventLoopMonitorOptions { + /** + * The sampling rate in milliseconds. + * Must be greater than zero. + * @default 10 + */ + resolution?: number; + } + + interface EventLoopDelayMonitor { + /** + * Enables the event loop delay sample timer. Returns `true` if the timer was started, `false` if it was already started. + */ + enable(): boolean; + /** + * Disables the event loop delay sample timer. Returns `true` if the timer was stopped, `false` if it was already stopped. + */ + disable(): boolean; + + /** + * Resets the collected histogram data. + */ + reset(): void; + + /** + * Returns the value at the given percentile. + * @param percentile A percentile value between 1 and 100. + */ + percentile(percentile: number): number; + + /** + * A `Map` object detailing the accumulated percentile distribution. + */ + readonly percentiles: Map; + + /** + * The number of times the event loop delay exceeded the maximum 1 hour eventloop delay threshold. + */ + readonly exceeds: number; + + /** + * The minimum recorded event loop delay. + */ + readonly min: number; + + /** + * The maximum recorded event loop delay. + */ + readonly max: number; + + /** + * The mean of the recorded event loop delays. + */ + readonly mean: number; + + /** + * The standard deviation of the recorded event loop delays. + */ + readonly stddev: number; + } + + function monitorEventLoopDelay(options?: EventLoopMonitorOptions): EventLoopDelayMonitor; +} diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts new file mode 100644 index 00000000..ccd5c9c1 --- /dev/null +++ b/node_modules/@types/node/process.d.ts @@ -0,0 +1,3 @@ +declare module "process" { + export = process; +} diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts new file mode 100644 index 00000000..75d2811d --- /dev/null +++ b/node_modules/@types/node/punycode.d.ts @@ -0,0 +1,12 @@ +declare module "punycode" { + function decode(string: string): string; + function encode(string: string): string; + function toUnicode(domain: string): string; + function toASCII(domain: string): string; + const ucs2: ucs2; + interface ucs2 { + decode(string: string): number[]; + encode(codePoints: number[]): string; + } + const version: string; +} diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts new file mode 100644 index 00000000..23359d9d --- /dev/null +++ b/node_modules/@types/node/querystring.d.ts @@ -0,0 +1,32 @@ +declare module "querystring" { + interface StringifyOptions { + encodeURIComponent?: (str: string) => string; + } + + interface ParseOptions { + maxKeys?: number; + decodeURIComponent?: (str: string) => string; + } + + interface ParsedUrlQuery { [key: string]: string | string[]; } + + interface ParsedUrlQueryInput { + [key: string]: + // The value type here is a "poor man's `unknown`". When these types support TypeScript + // 3.0+, we can replace this with `unknown`. + {} | null | undefined; + } + + function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; + function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; + /** + * The querystring.encode() function is an alias for querystring.stringify(). + */ + const encode: typeof stringify; + /** + * The querystring.decode() function is an alias for querystring.parse(). + */ + const decode: typeof parse; + function escape(str: string): string; + function unescape(str: string): string; +} diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts new file mode 100644 index 00000000..c2518d8d --- /dev/null +++ b/node_modules/@types/node/readline.d.ts @@ -0,0 +1,136 @@ +declare module "readline" { + import * as events from "events"; + import * as stream from "stream"; + + interface Key { + sequence?: string; + name?: string; + ctrl?: boolean; + meta?: boolean; + shift?: boolean; + } + + class Interface extends events.EventEmitter { + readonly terminal: boolean; + + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface + */ + protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean); + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface + */ + protected constructor(options: ReadLineOptions); + + setPrompt(prompt: string): void; + prompt(preserveCursor?: boolean): void; + question(query: string, callback: (answer: string) => void): void; + pause(): this; + resume(): this; + close(): void; + write(data: string | Buffer, key?: Key): void; + + /** + * events.EventEmitter + * 1. close + * 2. line + * 3. pause + * 4. resume + * 5. SIGCONT + * 6. SIGINT + * 7. SIGTSTP + */ + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "line", listener: (input: string) => void): this; + addListener(event: "pause", listener: () => void): this; + addListener(event: "resume", listener: () => void): this; + addListener(event: "SIGCONT", listener: () => void): this; + addListener(event: "SIGINT", listener: () => void): this; + addListener(event: "SIGTSTP", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "line", input: string): boolean; + emit(event: "pause"): boolean; + emit(event: "resume"): boolean; + emit(event: "SIGCONT"): boolean; + emit(event: "SIGINT"): boolean; + emit(event: "SIGTSTP"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "line", listener: (input: string) => void): this; + on(event: "pause", listener: () => void): this; + on(event: "resume", listener: () => void): this; + on(event: "SIGCONT", listener: () => void): this; + on(event: "SIGINT", listener: () => void): this; + on(event: "SIGTSTP", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "line", listener: (input: string) => void): this; + once(event: "pause", listener: () => void): this; + once(event: "resume", listener: () => void): this; + once(event: "SIGCONT", listener: () => void): this; + once(event: "SIGINT", listener: () => void): this; + once(event: "SIGTSTP", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "line", listener: (input: string) => void): this; + prependListener(event: "pause", listener: () => void): this; + prependListener(event: "resume", listener: () => void): this; + prependListener(event: "SIGCONT", listener: () => void): this; + prependListener(event: "SIGINT", listener: () => void): this; + prependListener(event: "SIGTSTP", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "line", listener: (input: string) => void): this; + prependOnceListener(event: "pause", listener: () => void): this; + prependOnceListener(event: "resume", listener: () => void): this; + prependOnceListener(event: "SIGCONT", listener: () => void): this; + prependOnceListener(event: "SIGINT", listener: () => void): this; + prependOnceListener(event: "SIGTSTP", listener: () => void): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + type ReadLine = Interface; // type forwarded for backwards compatiblity + + type Completer = (line: string) => CompleterResult; + type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => any; + + type CompleterResult = [string[], string]; + + interface ReadLineOptions { + input: NodeJS.ReadableStream; + output?: NodeJS.WritableStream; + completer?: Completer | AsyncCompleter; + terminal?: boolean; + historySize?: number; + prompt?: string; + crlfDelay?: number; + removeHistoryDuplicates?: boolean; + } + + function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface; + function createInterface(options: ReadLineOptions): Interface; + + function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number): void; + function emitKeypressEvents(stream: NodeJS.ReadableStream, interface?: Interface): void; + function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void; + function clearLine(stream: NodeJS.WritableStream, dir: number): void; + function clearScreenDown(stream: NodeJS.WritableStream): void; +} diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts new file mode 100644 index 00000000..71f49044 --- /dev/null +++ b/node_modules/@types/node/repl.d.ts @@ -0,0 +1,382 @@ +declare module "repl" { + import { Interface, Completer, AsyncCompleter } from "readline"; + import { Context } from "vm"; + import { InspectOptions } from "util"; + + interface ReplOptions { + /** + * The input prompt to display. + * Default: `"> "` + */ + prompt?: string; + /** + * The `Readable` stream from which REPL input will be read. + * Default: `process.stdin` + */ + input?: NodeJS.ReadableStream; + /** + * The `Writable` stream to which REPL output will be written. + * Default: `process.stdout` + */ + output?: NodeJS.WritableStream; + /** + * If `true`, specifies that the output should be treated as a TTY terminal, and have + * ANSI/VT100 escape codes written to it. + * Default: checking the value of the `isTTY` property on the output stream upon + * instantiation. + */ + terminal?: boolean; + /** + * The function to be used when evaluating each given line of input. + * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can + * error with `repl.Recoverable` to indicate the input was incomplete and prompt for + * additional lines. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions + */ + eval?: REPLEval; + /** + * If `true`, specifies that the default `writer` function should include ANSI color + * styling to REPL output. If a custom `writer` function is provided then this has no + * effect. + * Default: the REPL instance's `terminal` value. + */ + useColors?: boolean; + /** + * If `true`, specifies that the default evaluation function will use the JavaScript + * `global` as the context as opposed to creating a new separate context for the REPL + * instance. The node CLI REPL sets this value to `true`. + * Default: `false`. + */ + useGlobal?: boolean; + /** + * If `true`, specifies that the default writer will not output the return value of a + * command if it evaluates to `undefined`. + * Default: `false`. + */ + ignoreUndefined?: boolean; + /** + * The function to invoke to format the output of each command before writing to `output`. + * Default: a wrapper for `util.inspect`. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output + */ + writer?: REPLWriter; + /** + * An optional function used for custom Tab auto completion. + * + * @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function + */ + completer?: Completer | AsyncCompleter; + /** + * A flag that specifies whether the default evaluator executes all JavaScript commands in + * strict mode or default (sloppy) mode. + * Accepted values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; + /** + * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is + * pressed. This cannot be used together with a custom `eval` function. + * Default: `false`. + */ + breakEvalOnSigint?: boolean; + } + + type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void; + type REPLWriter = (this: REPLServer, obj: any) => string; + + /** + * This is the default "writer" value, if none is passed in the REPL options, + * and it can be overridden by custom print functions. + */ + const writer: REPLWriter & { options: InspectOptions }; + + type REPLCommandAction = (this: REPLServer, text: string) => void; + + interface REPLCommand { + /** + * Help text to be displayed when `.help` is entered. + */ + help?: string; + /** + * The function to execute, optionally accepting a single string argument. + */ + action: REPLCommandAction; + } + + /** + * Provides a customizable Read-Eval-Print-Loop (REPL). + * + * Instances of `repl.REPLServer` will accept individual lines of user input, evaluate those + * according to a user-defined evaluation function, then output the result. Input and output + * may be from `stdin` and `stdout`, respectively, or may be connected to any Node.js `stream`. + * + * Instances of `repl.REPLServer` support automatic completion of inputs, simplistic Emacs-style + * line editing, multi-line inputs, ANSI-styled output, saving and restoring current REPL session + * state, error recovery, and customizable evaluation functions. + * + * Instances of `repl.REPLServer` are created using the `repl.start()` method and _should not_ + * be created directly using the JavaScript `new` keyword. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_repl + */ + class REPLServer extends Interface { + /** + * The `vm.Context` provided to the `eval` function to be used for JavaScript + * evaluation. + */ + readonly context: Context; + /** + * The `Readable` stream from which REPL input will be read. + */ + readonly inputStream: NodeJS.ReadableStream; + /** + * The `Writable` stream to which REPL output will be written. + */ + readonly outputStream: NodeJS.WritableStream; + /** + * The commands registered via `replServer.defineCommand()`. + */ + readonly commands: { readonly [name: string]: REPLCommand | undefined }; + /** + * A value indicating whether the REPL is currently in "editor mode". + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_commands_and_special_keys + */ + readonly editorMode: boolean; + /** + * A value indicating whether the `_` variable has been assigned. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreAssigned: boolean; + /** + * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly last: any; + /** + * A value indicating whether the `_error` variable has been assigned. + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreErrAssigned: boolean; + /** + * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly lastError: any; + /** + * Specified in the REPL options, this is the function to be used when evaluating each + * given line of input. If not specified in the REPL options, this is an async wrapper + * for the JavaScript `eval()` function. + */ + readonly eval: REPLEval; + /** + * Specified in the REPL options, this is a value indicating whether the default + * `writer` function should include ANSI color styling to REPL output. + */ + readonly useColors: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `eval` + * function will use the JavaScript `global` as the context as opposed to creating a new + * separate context for the REPL instance. + */ + readonly useGlobal: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `writer` + * function should output the result of a command if it evaluates to `undefined`. + */ + readonly ignoreUndefined: boolean; + /** + * Specified in the REPL options, this is the function to invoke to format the output of + * each command before writing to `outputStream`. If not specified in the REPL options, + * this will be a wrapper for `util.inspect`. + */ + readonly writer: REPLWriter; + /** + * Specified in the REPL options, this is the function to use for custom Tab auto-completion. + */ + readonly completer: Completer | AsyncCompleter; + /** + * Specified in the REPL options, this is a flag that specifies whether the default `eval` + * function should execute all JavaScript commands in strict mode or default (sloppy) mode. + * Possible values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; + + /** + * NOTE: According to the documentation: + * + * > Instances of `repl.REPLServer` are created using the `repl.start()` method and + * > _should not_ be created directly using the JavaScript `new` keyword. + * + * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_class_replserver + */ + private constructor(); + + /** + * Used to add new `.`-prefixed commands to the REPL instance. Such commands are invoked + * by typing a `.` followed by the `keyword`. + * + * @param keyword The command keyword (_without_ a leading `.` character). + * @param cmd The function to invoke when the command is processed. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_replserver_definecommand_keyword_cmd + */ + defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; + /** + * Readies the REPL instance for input from the user, printing the configured `prompt` to a + * new line in the `output` and resuming the `input` to accept new input. + * + * When multi-line input is being entered, an ellipsis is printed rather than the 'prompt'. + * + * This method is primarily intended to be called from within the action function for + * commands registered using the `replServer.defineCommand()` method. + * + * @param preserveCursor When `true`, the cursor placement will not be reset to `0`. + */ + displayPrompt(preserveCursor?: boolean): void; + /** + * Clears any command that has been buffered but not yet executed. + * + * This method is primarily intended to be called from within the action function for + * commands registered using the `replServer.defineCommand()` method. + * + * @since v9.0.0 + */ + clearBufferedCommand(): void; + + /** + * Initializes a history log file for the REPL instance. When executing the + * Node.js binary and using the command line REPL, a history file is initialized + * by default. However, this is not the case when creating a REPL + * programmatically. Use this method to initialize a history log file when working + * with REPL instances programmatically. + * @param path The path to the history file + */ + setupHistory(path: string, cb: (err: Error | null, repl: this) => void): void; + + /** + * events.EventEmitter + * 1. close - inherited from `readline.Interface` + * 2. line - inherited from `readline.Interface` + * 3. pause - inherited from `readline.Interface` + * 4. resume - inherited from `readline.Interface` + * 5. SIGCONT - inherited from `readline.Interface` + * 6. SIGINT - inherited from `readline.Interface` + * 7. SIGTSTP - inherited from `readline.Interface` + * 8. exit + * 9. reset + */ + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "line", listener: (input: string) => void): this; + addListener(event: "pause", listener: () => void): this; + addListener(event: "resume", listener: () => void): this; + addListener(event: "SIGCONT", listener: () => void): this; + addListener(event: "SIGINT", listener: () => void): this; + addListener(event: "SIGTSTP", listener: () => void): this; + addListener(event: "exit", listener: () => void): this; + addListener(event: "reset", listener: (context: Context) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "line", input: string): boolean; + emit(event: "pause"): boolean; + emit(event: "resume"): boolean; + emit(event: "SIGCONT"): boolean; + emit(event: "SIGINT"): boolean; + emit(event: "SIGTSTP"): boolean; + emit(event: "exit"): boolean; + emit(event: "reset", context: Context): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "line", listener: (input: string) => void): this; + on(event: "pause", listener: () => void): this; + on(event: "resume", listener: () => void): this; + on(event: "SIGCONT", listener: () => void): this; + on(event: "SIGINT", listener: () => void): this; + on(event: "SIGTSTP", listener: () => void): this; + on(event: "exit", listener: () => void): this; + on(event: "reset", listener: (context: Context) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "line", listener: (input: string) => void): this; + once(event: "pause", listener: () => void): this; + once(event: "resume", listener: () => void): this; + once(event: "SIGCONT", listener: () => void): this; + once(event: "SIGINT", listener: () => void): this; + once(event: "SIGTSTP", listener: () => void): this; + once(event: "exit", listener: () => void): this; + once(event: "reset", listener: (context: Context) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "line", listener: (input: string) => void): this; + prependListener(event: "pause", listener: () => void): this; + prependListener(event: "resume", listener: () => void): this; + prependListener(event: "SIGCONT", listener: () => void): this; + prependListener(event: "SIGINT", listener: () => void): this; + prependListener(event: "SIGTSTP", listener: () => void): this; + prependListener(event: "exit", listener: () => void): this; + prependListener(event: "reset", listener: (context: Context) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "line", listener: (input: string) => void): this; + prependOnceListener(event: "pause", listener: () => void): this; + prependOnceListener(event: "resume", listener: () => void): this; + prependOnceListener(event: "SIGCONT", listener: () => void): this; + prependOnceListener(event: "SIGINT", listener: () => void): this; + prependOnceListener(event: "SIGTSTP", listener: () => void): this; + prependOnceListener(event: "exit", listener: () => void): this; + prependOnceListener(event: "reset", listener: (context: Context) => void): this; + } + + /** + * A flag passed in the REPL options. Evaluates expressions in sloppy mode. + */ + export const REPL_MODE_SLOPPY: symbol; // TODO: unique symbol + + /** + * A flag passed in the REPL options. Evaluates expressions in strict mode. + * This is equivalent to prefacing every repl statement with `'use strict'`. + */ + export const REPL_MODE_STRICT: symbol; // TODO: unique symbol + + /** + * Creates and starts a `repl.REPLServer` instance. + * + * @param options The options for the `REPLServer`. If `options` is a string, then it specifies + * the input prompt. + */ + function start(options?: string | ReplOptions): REPLServer; + + /** + * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. + * + * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_recoverable_errors + */ + class Recoverable extends SyntaxError { + err: Error; + + constructor(err: Error); + } +} diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts new file mode 100644 index 00000000..f4424f8c --- /dev/null +++ b/node_modules/@types/node/stream.d.ts @@ -0,0 +1,307 @@ +declare module "stream" { + import * as events from "events"; + + class internal extends events.EventEmitter { + pipe(destination: T, options?: { end?: boolean; }): T; + } + + namespace internal { + class Stream extends internal { } + + interface ReadableOptions { + highWaterMark?: number; + encoding?: string; + objectMode?: boolean; + read?(this: Readable, size: number): void; + destroy?(this: Readable, error: Error | null, callback: (error: Error | null) => void): void; + autoDestroy?: boolean; + } + + class Readable extends Stream implements NodeJS.ReadableStream { + /** + * A utility method for creating Readable Streams out of iterators. + */ + static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; + + readable: boolean; + readonly readableHighWaterMark: number; + readonly readableLength: number; + constructor(opts?: ReadableOptions); + _read(size: number): void; + read(size?: number): any; + setEncoding(encoding: string): this; + pause(): this; + resume(): this; + isPaused(): boolean; + unpipe(destination?: NodeJS.WritableStream): this; + unshift(chunk: any, encoding?: BufferEncoding): void; + wrap(oldStream: NodeJS.ReadableStream): this; + push(chunk: any, encoding?: string): boolean; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + destroy(error?: Error): void; + + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. data + * 3. end + * 4. readable + * 5. error + */ + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: any) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "data", chunk: any): boolean; + emit(event: "end"): boolean; + emit(event: "readable"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: any) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: any) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: any) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: any) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: "close", listener: () => void): this; + removeListener(event: "data", listener: (chunk: any) => void): this; + removeListener(event: "end", listener: () => void): this; + removeListener(event: "readable", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + interface WritableOptions { + highWaterMark?: number; + decodeStrings?: boolean; + defaultEncoding?: string; + objectMode?: boolean; + emitClose?: boolean; + write?(this: Writable, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + writev?(this: Writable, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void; + final?(this: Writable, callback: (error?: Error | null) => void): void; + autoDestroy?: boolean; + } + + class Writable extends Stream implements NodeJS.WritableStream { + readonly writable: boolean; + readonly writableFinished: boolean; + readonly writableHighWaterMark: number; + readonly writableLength: number; + constructor(opts?: WritableOptions); + _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, encoding: string, cb?: (error: Error | null | undefined) => void): boolean; + setDefaultEncoding(encoding: string): this; + end(cb?: () => void): void; + end(chunk: any, cb?: () => void): void; + end(chunk: any, encoding: string, cb?: () => void): void; + cork(): void; + uncork(): void; + destroy(error?: Error): void; + + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. drain + * 3. error + * 4. finish + * 5. pipe + * 6. unpipe + */ + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "pipe", listener: (src: Readable) => void): this; + addListener(event: "unpipe", listener: (src: Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "drain"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "pipe", src: Readable): boolean; + emit(event: "unpipe", src: Readable): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "pipe", listener: (src: Readable) => void): this; + on(event: "unpipe", listener: (src: Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "pipe", listener: (src: Readable) => void): this; + once(event: "unpipe", listener: (src: Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "pipe", listener: (src: Readable) => void): this; + prependListener(event: "unpipe", listener: (src: Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: "close", listener: () => void): this; + removeListener(event: "drain", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "finish", listener: () => void): this; + removeListener(event: "pipe", listener: (src: Readable) => void): this; + removeListener(event: "unpipe", listener: (src: Readable) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + + interface DuplexOptions extends ReadableOptions, WritableOptions { + allowHalfOpen?: boolean; + readableObjectMode?: boolean; + writableObjectMode?: boolean; + read?(this: Duplex, size: number): void; + write?(this: Duplex, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + final?(this: Duplex, callback: (error?: Error | null) => void): void; + destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void; + } + + // Note: Duplex extends both Readable and Writable. + class Duplex extends Readable implements Writable { + readonly writable: boolean; + readonly writableFinished: boolean; + readonly writableHighWaterMark: number; + readonly writableLength: number; + constructor(opts?: DuplexOptions); + _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + _destroy(error: Error | null, callback: (error: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; + setDefaultEncoding(encoding: string): this; + end(cb?: () => void): void; + end(chunk: any, cb?: () => void): void; + end(chunk: any, encoding?: string, cb?: () => void): void; + cork(): void; + uncork(): void; + } + + type TransformCallback = (error?: Error | null, data?: any) => void; + + interface TransformOptions extends DuplexOptions { + read?(this: Transform, size: number): void; + write?(this: Transform, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; + writev?(this: Transform, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; + final?(this: Transform, callback: (error?: Error | null) => void): void; + destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void; + transform?(this: Transform, chunk: any, encoding: string, callback: TransformCallback): void; + flush?(this: Transform, callback: TransformCallback): void; + } + + class Transform extends Duplex { + constructor(opts?: TransformOptions); + _transform(chunk: any, encoding: string, callback: TransformCallback): void; + _flush(callback: TransformCallback): void; + } + + class PassThrough extends Transform { } + + function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void; + namespace finished { + function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream): Promise; + } + + function pipeline(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException | null) => void): T; + function pipeline(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: T, callback?: (err: NodeJS.ErrnoException | null) => void): T; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream, + stream3: NodeJS.ReadWriteStream, + stream4: T, + callback?: (err: NodeJS.ErrnoException | null) => void, + ): T; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream, + stream3: NodeJS.ReadWriteStream, + stream4: NodeJS.ReadWriteStream, + stream5: T, + callback?: (err: NodeJS.ErrnoException | null) => void, + ): T; + function pipeline(streams: Array, callback?: (err: NodeJS.ErrnoException | null) => void): NodeJS.WritableStream; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array void)>, + ): NodeJS.WritableStream; + namespace pipeline { + function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.WritableStream): Promise; + function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.WritableStream): Promise; + function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.ReadWriteStream, stream4: NodeJS.WritableStream): Promise; + function __promisify__( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream, + stream3: NodeJS.ReadWriteStream, + stream4: NodeJS.ReadWriteStream, + stream5: NodeJS.WritableStream, + ): Promise; + function __promisify__(streams: Array): Promise; + function __promisify__( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array, + ): Promise; + } + + interface Pipe { } + } + + export = internal; +} diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts new file mode 100644 index 00000000..fe0e0b4d --- /dev/null +++ b/node_modules/@types/node/string_decoder.d.ts @@ -0,0 +1,7 @@ +declare module "string_decoder" { + class StringDecoder { + constructor(encoding?: string); + write(buffer: Buffer): string; + end(buffer?: Buffer): string; + } +} diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts new file mode 100644 index 00000000..e64a6735 --- /dev/null +++ b/node_modules/@types/node/timers.d.ts @@ -0,0 +1,16 @@ +declare module "timers" { + function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; + namespace setTimeout { + function __promisify__(ms: number): Promise; + function __promisify__(ms: number, value: T): Promise; + } + function clearTimeout(timeoutId: NodeJS.Timeout): void; + function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; + function clearInterval(intervalId: NodeJS.Timeout): void; + function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate; + namespace setImmediate { + function __promisify__(): Promise; + function __promisify__(value: T): Promise; + } + function clearImmediate(immediateId: NodeJS.Immediate): void; +} diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts new file mode 100644 index 00000000..3446c097 --- /dev/null +++ b/node_modules/@types/node/tls.d.ts @@ -0,0 +1,418 @@ +declare module "tls" { + import * as crypto from "crypto"; + import * as dns from "dns"; + import * as net from "net"; + import * as stream from "stream"; + + const CLIENT_RENEG_LIMIT: number; + const CLIENT_RENEG_WINDOW: number; + + interface Certificate { + /** + * Country code. + */ + C: string; + /** + * Street. + */ + ST: string; + /** + * Locality. + */ + L: string; + /** + * Organization. + */ + O: string; + /** + * Organizational unit. + */ + OU: string; + /** + * Common name. + */ + CN: string; + } + + interface PeerCertificate { + subject: Certificate; + issuer: Certificate; + subjectaltname: string; + infoAccess: { [index: string]: string[] | undefined }; + modulus: string; + exponent: string; + valid_from: string; + valid_to: string; + fingerprint: string; + ext_key_usage: string[]; + serialNumber: string; + raw: Buffer; + } + + interface DetailedPeerCertificate extends PeerCertificate { + issuerCertificate: DetailedPeerCertificate; + } + + interface CipherNameAndProtocol { + /** + * The cipher name. + */ + name: string; + /** + * SSL/TLS protocol version. + */ + version: string; + } + + export interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { + /** + * If true the TLS socket will be instantiated in server-mode. + * Defaults to false. + */ + isServer?: boolean; + /** + * An optional net.Server instance. + */ + server?: net.Server; + + /** + * An optional Buffer instance containing a TLS session. + */ + session?: Buffer; + /** + * If true, specifies that the OCSP status request extension will be + * added to the client hello and an 'OCSPResponse' event will be + * emitted on the socket before establishing a secure communication + */ + requestOCSP?: boolean; + } + + class TLSSocket extends net.Socket { + /** + * Construct a new tls.TLSSocket object from an existing TCP socket. + */ + constructor(socket: net.Socket, options?: TLSSocketOptions); + + /** + * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false. + */ + authorized: boolean; + /** + * The reason why the peer's certificate has not been verified. + * This property becomes available only when tlsSocket.authorized === false. + */ + authorizationError: Error; + /** + * Static boolean value, always true. + * May be used to distinguish TLS sockets from regular ones. + */ + encrypted: boolean; + + /** + * String containing the selected ALPN protocol. + * When ALPN has no selected protocol, tlsSocket.alpnProtocol equals false. + */ + alpnProtocol?: string; + + /** + * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection. + * @returns Returns an object representing the cipher name + * and the SSL/TLS protocol version of the current connection. + */ + getCipher(): CipherNameAndProtocol; + /** + * Returns an object representing the peer's certificate. + * The returned object has some properties corresponding to the field of the certificate. + * If detailed argument is true the full chain with issuer property will be returned, + * if false only the top certificate without issuer property. + * If the peer does not provide a certificate, it returns null or an empty object. + * @param detailed - If true; the full chain with issuer property will be returned. + * @returns An object representing the peer's certificate. + */ + getPeerCertificate(detailed: true): DetailedPeerCertificate; + getPeerCertificate(detailed?: false): PeerCertificate; + getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; + /** + * Returns a string containing the negotiated SSL/TLS protocol version of the current connection. + * The value `'unknown'` will be returned for connected sockets that have not completed the handshaking process. + * The value `null` will be returned for server sockets or disconnected client sockets. + * See https://www.openssl.org/docs/man1.0.2/ssl/SSL_get_version.html for more information. + * @returns negotiated SSL/TLS protocol version of the current connection + */ + getProtocol(): string | null; + /** + * Could be used to speed up handshake establishment when reconnecting to the server. + * @returns ASN.1 encoded TLS session or undefined if none was negotiated. + */ + getSession(): Buffer | undefined; + /** + * NOTE: Works only with client TLS sockets. + * Useful only for debugging, for session reuse provide session option to tls.connect(). + * @returns TLS session ticket or undefined if none was negotiated. + */ + getTLSTicket(): Buffer | undefined; + /** + * Initiate TLS renegotiation process. + * + * NOTE: Can be used to request peer's certificate after the secure connection has been established. + * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout. + * @param options - The options may contain the following fields: rejectUnauthorized, + * requestCert (See tls.createServer() for details). + * @param callback - callback(err) will be executed with null as err, once the renegotiation + * is successfully completed. + * @return `undefined` when socket is destroy, `false` if negotiaion can't be initiated. + */ + renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): undefined | boolean; + /** + * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512). + * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by + * the TLS layer until the entire fragment is received and its integrity is verified; + * large fragments can span multiple roundtrips, and their processing can be delayed due to packet + * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead, + * which may decrease overall server throughput. + * @param size - TLS fragment size (default and maximum value is: 16384, minimum is: 512). + * @returns Returns true on success, false otherwise. + */ + setMaxSendFragment(size: number): boolean; + + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * + * Note: The format of the output is identical to the output of `openssl s_client + * -trace` or `openssl s_server -trace`. While it is produced by OpenSSL's + * `SSL_trace()` function, the format is undocumented, can change without notice, + * and should not be relied on. + */ + enableTrace(): void; + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + addListener(event: "secureConnect", listener: () => void): this; + addListener(event: "session", listener: (session: Buffer) => void): this; + addListener(event: "keylog", listener: (line: Buffer) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "OCSPResponse", response: Buffer): boolean; + emit(event: "secureConnect"): boolean; + emit(event: "session", session: Buffer): boolean; + emit(event: "keylog", line: Buffer): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "OCSPResponse", listener: (response: Buffer) => void): this; + on(event: "secureConnect", listener: () => void): this; + on(event: "session", listener: (session: Buffer) => void): this; + on(event: "keylog", listener: (line: Buffer) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "OCSPResponse", listener: (response: Buffer) => void): this; + once(event: "secureConnect", listener: () => void): this; + once(event: "session", listener: (session: Buffer) => void): this; + once(event: "keylog", listener: (line: Buffer) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + prependListener(event: "secureConnect", listener: () => void): this; + prependListener(event: "session", listener: (session: Buffer) => void): this; + prependListener(event: "keylog", listener: (line: Buffer) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + prependOnceListener(event: "secureConnect", listener: () => void): this; + prependOnceListener(event: "session", listener: (session: Buffer) => void): this; + prependOnceListener(event: "keylog", listener: (line: Buffer) => void): this; + } + + interface CommonConnectionOptions { + /** + * An optional TLS context object from tls.createSecureContext() + */ + secureContext?: SecureContext; + + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * @default false + */ + enableTrace?: boolean; + /** + * If true the server will request a certificate from clients that + * connect and attempt to verify that certificate. Defaults to + * false. + */ + requestCert?: boolean; + /** + * An array of strings or a Buffer naming possible ALPN protocols. + * (Protocols should be ordered by their priority.) + */ + ALPNProtocols?: string[] | Uint8Array[] | Uint8Array; + /** + * SNICallback(servername, cb) A function that will be + * called if the client supports SNI TLS extension. Two arguments + * will be passed when called: servername and cb. SNICallback should + * invoke cb(null, ctx), where ctx is a SecureContext instance. + * (tls.createSecureContext(...) can be used to get a proper + * SecureContext.) If SNICallback wasn't provided the default callback + * with high-level API will be used (see below). + */ + SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void; + /** + * If true the server will reject any connection which is not + * authorized with the list of supplied CAs. This option only has an + * effect if requestCert is true. + * @default true + */ + rejectUnauthorized?: boolean; + } + + interface TlsOptions extends SecureContextOptions, CommonConnectionOptions { + handshakeTimeout?: number; + sessionTimeout?: number; + ticketKeys?: Buffer; + } + + interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { + host?: string; + port?: number; + path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. + socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket + checkServerIdentity?: typeof checkServerIdentity; + servername?: string; // SNI TLS Extension + session?: Buffer; + minDHSize?: number; + lookup?: net.LookupFunction; + timeout?: number; + } + + class Server extends net.Server { + addContext(hostName: string, credentials: SecureContextOptions): void; + + /** + * events.EventEmitter + * 1. tlsClientError + * 2. newSession + * 3. OCSPRequest + * 4. resumeSession + * 5. secureConnection + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + addListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + addListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + addListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; + emit(event: "newSession", sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean; + emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean; + emit(event: "resumeSession", sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean; + emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; + emit(event: "keylog", line: Buffer, tlsSocket: TLSSocket): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + on(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + on(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + on(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + once(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + once(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + once(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + prependListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; + prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; + prependOnceListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; + prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + } + + interface SecurePair { + encrypted: TLSSocket; + cleartext: TLSSocket; + } + + type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1'; + + interface SecureContextOptions { + pfx?: string | Buffer | Array; + key?: string | Buffer | Array; + passphrase?: string; + cert?: string | Buffer | Array; + ca?: string | Buffer | Array; + ciphers?: string; + honorCipherOrder?: boolean; + ecdhCurve?: string; + clientCertEngine?: string; + crl?: string | Buffer | Array; + dhparam?: string | Buffer; + secureOptions?: number; // Value is a numeric bitmask of the `SSL_OP_*` options + secureProtocol?: string; // SSL Method, e.g. SSLv23_method + sessionIdContext?: string; + /** + * Optionally set the maximum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. + * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using + * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to + * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. + */ + maxVersion?: SecureVersion; + /** + * Optionally set the minimum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. It is not recommended to use + * less than TLSv1.2, but it may be required for interoperability. + * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using + * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to + * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to + * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. + */ + minVersion?: SecureVersion; + } + + interface SecureContext { + context: any; + } + + /* + * Verifies the certificate `cert` is issued to host `host`. + * @host The hostname to verify the certificate against + * @cert PeerCertificate representing the peer's certificate + * + * Returns Error object, populating it with the reason, host and cert on failure. On success, returns undefined. + */ + function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined; + function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; + function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; + function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + /** + * @deprecated + */ + function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; + function createSecureContext(details: SecureContextOptions): SecureContext; + function getCiphers(): string[]; + + const DEFAULT_ECDH_CURVE: string; + + const rootCertificates: ReadonlyArray; +} diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts new file mode 100644 index 00000000..9d1a59bd --- /dev/null +++ b/node_modules/@types/node/trace_events.d.ts @@ -0,0 +1,61 @@ +declare module "trace_events" { + /** + * The `Tracing` object is used to enable or disable tracing for sets of + * categories. Instances are created using the + * `trace_events.createTracing()` method. + * + * When created, the `Tracing` object is disabled. Calling the + * `tracing.enable()` method adds the categories to the set of enabled trace + * event categories. Calling `tracing.disable()` will remove the categories + * from the set of enabled trace event categories. + */ + export interface Tracing { + /** + * A comma-separated list of the trace event categories covered by this + * `Tracing` object. + */ + readonly categories: string; + + /** + * Disables this `Tracing` object. + * + * Only trace event categories _not_ covered by other enabled `Tracing` + * objects and _not_ specified by the `--trace-event-categories` flag + * will be disabled. + */ + disable(): void; + + /** + * Enables this `Tracing` object for the set of categories covered by + * the `Tracing` object. + */ + enable(): void; + + /** + * `true` only if the `Tracing` object has been enabled. + */ + readonly enabled: boolean; + } + + interface CreateTracingOptions { + /** + * An array of trace category names. Values included in the array are + * coerced to a string when possible. An error will be thrown if the + * value cannot be coerced. + */ + categories: string[]; + } + + /** + * Creates and returns a Tracing object for the given set of categories. + */ + export function createTracing(options: CreateTracingOptions): Tracing; + + /** + * Returns a comma-separated list of all currently-enabled trace event + * categories. The current set of enabled trace event categories is + * determined by the union of all currently-enabled `Tracing` objects and + * any categories enabled using the `--trace-event-categories` flag. + */ + export function getEnabledCategories(): string; +} diff --git a/node_modules/@types/node/ts3.2/globals.d.ts b/node_modules/@types/node/ts3.2/globals.d.ts new file mode 100644 index 00000000..70892bca --- /dev/null +++ b/node_modules/@types/node/ts3.2/globals.d.ts @@ -0,0 +1,19 @@ +// tslint:disable-next-line:no-bad-reference +/// + +declare namespace NodeJS { + interface HRTime { + bigint(): bigint; + } +} + +interface Buffer extends Uint8Array { + readBigUInt64BE(offset?: number): bigint; + readBigUInt64LE(offset?: number): bigint; + readBigInt64BE(offset?: number): bigint; + readBigInt64LE(offset?: number): bigint; + writeBigInt64BE(value: bigint, offset?: number): number; + writeBigInt64LE(value: bigint, offset?: number): number; + writeBigUInt64BE(value: bigint, offset?: number): number; + writeBigUInt64LE(value: bigint, offset?: number): number; +} diff --git a/node_modules/@types/node/ts3.2/index.d.ts b/node_modules/@types/node/ts3.2/index.d.ts new file mode 100644 index 00000000..ce7709bc --- /dev/null +++ b/node_modules/@types/node/ts3.2/index.d.ts @@ -0,0 +1,20 @@ +// NOTE: These definitions support NodeJS and TypeScript 3.2. + +// NOTE: TypeScript version-specific augmentations can be found in the following paths: +// - ~/base.d.ts - Shared definitions common to all TypeScript versions +// - ~/index.d.ts - Definitions specific to TypeScript 2.1 +// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 + +// Reference required types from the default lib: +/// +/// +/// +/// + +// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: +// tslint:disable-next-line:no-bad-reference +/// + +// TypeScript 3.2-specific augmentations: +/// +/// diff --git a/node_modules/@types/node/ts3.2/util.d.ts b/node_modules/@types/node/ts3.2/util.d.ts new file mode 100644 index 00000000..a8b2487e --- /dev/null +++ b/node_modules/@types/node/ts3.2/util.d.ts @@ -0,0 +1,15 @@ +// tslint:disable-next-line:no-bad-reference +/// + +declare module "util" { + namespace inspect { + const custom: unique symbol; + } + namespace promisify { + const custom: unique symbol; + } + namespace types { + function isBigInt64Array(value: any): value is BigInt64Array; + function isBigUint64Array(value: any): value is BigUint64Array; + } +} diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts new file mode 100644 index 00000000..d7fc1864 --- /dev/null +++ b/node_modules/@types/node/tty.d.ts @@ -0,0 +1,50 @@ +declare module "tty" { + import * as net from "net"; + + function isatty(fd: number): boolean; + class ReadStream extends net.Socket { + isRaw: boolean; + setRawMode(mode: boolean): void; + isTTY: boolean; + } + /** + * -1 - to the left from cursor + * 0 - the entire line + * 1 - to the right from cursor + */ + type Direction = -1 | 0 | 1; + class WriteStream extends net.Socket { + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "resize", listener: () => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "resize"): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "resize", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "resize", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "resize", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "resize", listener: () => void): this; + + clearLine(dir: Direction): void; + clearScreenDown(): void; + cursorTo(x: number, y: number): void; + /** + * @default `process.env` + */ + getColorDepth(env?: {}): number; + hasColors(depth?: number): boolean; + hasColors(env?: {}): boolean; + hasColors(depth: number, env?: {}): boolean; + getWindowSize(): [number, number]; + columns: number; + rows: number; + isTTY: boolean; + } +} diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts new file mode 100644 index 00000000..51dcd69a --- /dev/null +++ b/node_modules/@types/node/url.d.ts @@ -0,0 +1,104 @@ +declare module "url" { + import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring'; + + interface UrlObjectCommon { + auth?: string; + hash?: string; + host?: string; + hostname?: string; + href?: string; + path?: string; + pathname?: string; + protocol?: string; + search?: string; + slashes?: boolean; + } + + // Input to `url.format` + interface UrlObject extends UrlObjectCommon { + port?: string | number; + query?: string | null | ParsedUrlQueryInput; + } + + // Output of `url.parse` + interface Url extends UrlObjectCommon { + port?: string; + query?: string | null | ParsedUrlQuery; + } + + interface UrlWithParsedQuery extends Url { + query: ParsedUrlQuery; + } + + interface UrlWithStringQuery extends Url { + query: string | null; + } + + function parse(urlStr: string): UrlWithStringQuery; + function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery; + function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; + function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; + + function format(URL: URL, options?: URLFormatOptions): string; + function format(urlObject: UrlObject | string): string; + function resolve(from: string, to: string): string; + + function domainToASCII(domain: string): string; + function domainToUnicode(domain: string): string; + + /** + * This function ensures the correct decodings of percent-encoded characters as + * well as ensuring a cross-platform valid absolute path string. + * @param url The file URL string or URL object to convert to a path. + */ + function fileURLToPath(url: string | URL): string; + + /** + * This function ensures that path is resolved absolutely, and that the URL + * control characters are correctly encoded when converting into a File URL. + * @param url The path to convert to a File URL. + */ + function pathToFileURL(url: string): URL; + + interface URLFormatOptions { + auth?: boolean; + fragment?: boolean; + search?: boolean; + unicode?: boolean; + } + + class URL { + constructor(input: string, base?: string | URL); + hash: string; + host: string; + hostname: string; + href: string; + readonly origin: string; + password: string; + pathname: string; + port: string; + protocol: string; + search: string; + readonly searchParams: URLSearchParams; + username: string; + toString(): string; + toJSON(): string; + } + + class URLSearchParams implements Iterable<[string, string]> { + constructor(init?: URLSearchParams | string | { [key: string]: string | string[] | undefined } | Iterable<[string, string]> | Array<[string, string]>); + append(name: string, value: string): void; + delete(name: string): void; + entries(): IterableIterator<[string, string]>; + forEach(callback: (value: string, name: string, searchParams: this) => void): void; + get(name: string): string | null; + getAll(name: string): string[]; + has(name: string): boolean; + keys(): IterableIterator; + set(name: string, value: string): void; + sort(): void; + toString(): string; + values(): IterableIterator; + [Symbol.iterator](): IterableIterator<[string, string]>; + } +} diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts new file mode 100644 index 00000000..0e7a1c6e --- /dev/null +++ b/node_modules/@types/node/util.d.ts @@ -0,0 +1,165 @@ +declare module "util" { + interface InspectOptions extends NodeJS.InspectOptions { } + function format(format: any, ...param: any[]): string; + function formatWithOptions(inspectOptions: InspectOptions, format: string, ...param: any[]): string; + /** @deprecated since v0.11.3 - use a third party module instead. */ + function log(string: string): void; + function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; + function inspect(object: any, options: InspectOptions): string; + namespace inspect { + let colors: { + [color: string]: [number, number] | undefined + }; + let styles: { + [style: string]: string | undefined + }; + let defaultOptions: InspectOptions; + /** + * Allows changing inspect settings from the repl. + */ + let replDefaults: InspectOptions; + } + /** @deprecated since v4.0.0 - use `Array.isArray()` instead. */ + function isArray(object: any): object is any[]; + /** @deprecated since v4.0.0 - use `util.types.isRegExp()` instead. */ + function isRegExp(object: any): object is RegExp; + /** @deprecated since v4.0.0 - use `util.types.isDate()` instead. */ + function isDate(object: any): object is Date; + /** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */ + function isError(object: any): object is Error; + function inherits(constructor: any, superConstructor: any): void; + function debuglog(key: string): (msg: string, ...param: any[]) => void; + /** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */ + function isBoolean(object: any): object is boolean; + /** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */ + function isBuffer(object: any): object is Buffer; + /** @deprecated since v4.0.0 - use `typeof value === 'function'` instead. */ + function isFunction(object: any): boolean; + /** @deprecated since v4.0.0 - use `value === null` instead. */ + function isNull(object: any): object is null; + /** @deprecated since v4.0.0 - use `value === null || value === undefined` instead. */ + function isNullOrUndefined(object: any): object is null | undefined; + /** @deprecated since v4.0.0 - use `typeof value === 'number'` instead. */ + function isNumber(object: any): object is number; + /** @deprecated since v4.0.0 - use `value !== null && typeof value === 'object'` instead. */ + function isObject(object: any): boolean; + /** @deprecated since v4.0.0 - use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. */ + function isPrimitive(object: any): boolean; + /** @deprecated since v4.0.0 - use `typeof value === 'string'` instead. */ + function isString(object: any): object is string; + /** @deprecated since v4.0.0 - use `typeof value === 'symbol'` instead. */ + function isSymbol(object: any): object is symbol; + /** @deprecated since v4.0.0 - use `value === undefined` instead. */ + function isUndefined(object: any): object is undefined; + function deprecate(fn: T, message: string): T; + function isDeepStrictEqual(val1: any, val2: any): boolean; + + interface CustomPromisify extends Function { + __promisify__: TCustom; + } + + function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3) => Promise): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void; + function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + + function promisify(fn: CustomPromisify): TCustom; + function promisify(fn: (callback: (err: Error | null, result: TResult) => void) => void): () => Promise; + function promisify(fn: (callback: (err?: Error | null) => void) => void): () => Promise; + function promisify(fn: (arg1: T1, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1) => Promise; + function promisify(fn: (arg1: T1, callback: (err?: Error | null) => void) => void): (arg1: T1) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; + function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error | null) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + function promisify(fn: Function): Function; + + namespace types { + function isAnyArrayBuffer(object: any): boolean; + function isArgumentsObject(object: any): object is IArguments; + function isArrayBuffer(object: any): object is ArrayBuffer; + function isAsyncFunction(object: any): boolean; + function isBooleanObject(object: any): object is Boolean; + function isBoxedPrimitive(object: any): object is (Number | Boolean | String | Symbol /* | Object(BigInt) | Object(Symbol) */); + function isDataView(object: any): object is DataView; + function isDate(object: any): object is Date; + function isExternal(object: any): boolean; + function isFloat32Array(object: any): object is Float32Array; + function isFloat64Array(object: any): object is Float64Array; + function isGeneratorFunction(object: any): boolean; + function isGeneratorObject(object: any): boolean; + function isInt8Array(object: any): object is Int8Array; + function isInt16Array(object: any): object is Int16Array; + function isInt32Array(object: any): object is Int32Array; + function isMap(object: any): boolean; + function isMapIterator(object: any): boolean; + function isModuleNamespaceObject(value: any): boolean; + function isNativeError(object: any): object is Error; + function isNumberObject(object: any): object is Number; + function isPromise(object: any): boolean; + function isProxy(object: any): boolean; + function isRegExp(object: any): object is RegExp; + function isSet(object: any): boolean; + function isSetIterator(object: any): boolean; + function isSharedArrayBuffer(object: any): boolean; + function isStringObject(object: any): boolean; + function isSymbolObject(object: any): boolean; + function isTypedArray(object: any): object is NodeJS.TypedArray; + function isUint8Array(object: any): object is Uint8Array; + function isUint8ClampedArray(object: any): object is Uint8ClampedArray; + function isUint16Array(object: any): object is Uint16Array; + function isUint32Array(object: any): object is Uint32Array; + function isWeakMap(object: any): boolean; + function isWeakSet(object: any): boolean; + function isWebAssemblyCompiledModule(object: any): boolean; + } + + class TextDecoder { + readonly encoding: string; + readonly fatal: boolean; + readonly ignoreBOM: boolean; + constructor( + encoding?: string, + options?: { fatal?: boolean; ignoreBOM?: boolean } + ); + decode( + input?: NodeJS.TypedArray | DataView | ArrayBuffer | null, + options?: { stream?: boolean } + ): string; + } + + class TextEncoder { + readonly encoding: string; + encode(input?: string): Uint8Array; + } +} diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts new file mode 100644 index 00000000..fdecdb62 --- /dev/null +++ b/node_modules/@types/node/v8.d.ts @@ -0,0 +1,52 @@ +declare module "v8" { + import { Readable } from "stream"; + + interface HeapSpaceInfo { + space_name: string; + space_size: number; + space_used_size: number; + space_available_size: number; + physical_space_size: number; + } + + // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ + type DoesZapCodeSpaceFlag = 0 | 1; + + interface HeapInfo { + total_heap_size: number; + total_heap_size_executable: number; + total_physical_size: number; + total_available_size: number; + used_heap_size: number; + heap_size_limit: number; + malloced_memory: number; + peak_malloced_memory: number; + does_zap_garbage: DoesZapCodeSpaceFlag; + number_of_native_contexts: number; + number_of_detached_contexts: number; + } + + function getHeapStatistics(): HeapInfo; + function getHeapSpaceStatistics(): HeapSpaceInfo[]; + function setFlagsFromString(flags: string): void; + /** + * Generates a snapshot of the current V8 heap and returns a Readable + * Stream that may be used to read the JSON serialized representation. + * This conversation was marked as resolved by joyeecheung + * This JSON stream format is intended to be used with tools such as + * Chrome DevTools. The JSON schema is undocumented and specific to the + * V8 engine, and may change from one version of V8 to the next. + */ + function getHeapSnapshot(): Readable; + + /** + * + * @param fileName The file path where the V8 heap snapshot is to be + * saved. If not specified, a file name with the pattern + * `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be + * generated, where `{pid}` will be the PID of the Node.js process, + * `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from + * the main Node.js thread or the id of a worker thread. + */ + function writeHeapSnapshot(fileName?: string): string; +} diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts new file mode 100644 index 00000000..0eefafd2 --- /dev/null +++ b/node_modules/@types/node/vm.d.ts @@ -0,0 +1,95 @@ +declare module "vm" { + interface Context { + [key: string]: any; + } + interface BaseOptions { + /** + * Specifies the filename used in stack traces produced by this script. + * Default: `''`. + */ + filename?: string; + /** + * Specifies the line number offset that is displayed in stack traces produced by this script. + * Default: `0`. + */ + lineOffset?: number; + /** + * Specifies the column number offset that is displayed in stack traces produced by this script. + * Default: `0` + */ + columnOffset?: number; + } + interface ScriptOptions extends BaseOptions { + displayErrors?: boolean; + timeout?: number; + cachedData?: Buffer; + produceCachedData?: boolean; + } + interface RunningScriptOptions extends BaseOptions { + displayErrors?: boolean; + timeout?: number; + } + interface CompileFunctionOptions extends BaseOptions { + /** + * Provides an optional data with V8's code cache data for the supplied source. + */ + cachedData?: Buffer; + /** + * Specifies whether to produce new cache data. + * Default: `false`, + */ + produceCachedData?: boolean; + /** + * The sandbox/context in which the said function should be compiled in. + */ + parsingContext?: Context; + + /** + * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling + */ + contextExtensions?: Object[]; + } + + interface CreateContextOptions { + /** + * Human-readable name of the newly created context. + * @default 'VM Context i' Where i is an ascending numerical index of the created context. + */ + name?: string; + /** + * Corresponds to the newly created context for display purposes. + * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary), + * like the value of the `url.origin` property of a URL object. + * Most notably, this string should omit the trailing slash, as that denotes a path. + * @default '' + */ + origin?: string; + codeGeneration?: { + /** + * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc) + * will throw an EvalError. + * @default true + */ + strings?: boolean; + /** + * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError. + * @default true + */ + wasm?: boolean; + }; + } + + class Script { + constructor(code: string, options?: ScriptOptions); + runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any; + runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; + runInThisContext(options?: RunningScriptOptions): any; + createCachedData(): Buffer; + } + function createContext(sandbox?: Context, options?: CreateContextOptions): Context; + function isContext(sandbox: Context): boolean; + function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any; + function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any; + function runInThisContext(code: string, options?: RunningScriptOptions | string): any; + function compileFunction(code: string, params: string[], options: CompileFunctionOptions): Function; +} diff --git a/node_modules/@types/node/worker_threads.d.ts b/node_modules/@types/node/worker_threads.d.ts new file mode 100644 index 00000000..45ea85e0 --- /dev/null +++ b/node_modules/@types/node/worker_threads.d.ts @@ -0,0 +1,153 @@ +declare module "worker_threads" { + import { Context } from "vm"; + import { EventEmitter } from "events"; + import { Readable, Writable } from "stream"; + + const isMainThread: boolean; + const parentPort: null | MessagePort; + const threadId: number; + const workerData: any; + + class MessageChannel { + readonly port1: MessagePort; + readonly port2: MessagePort; + } + + class MessagePort extends EventEmitter { + close(): void; + postMessage(value: any, transferList?: Array): void; + ref(): void; + unref(): void; + start(): void; + + addListener(event: "close", listener: () => void): this; + addListener(event: "message", listener: (value: any) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "close"): boolean; + emit(event: "message", value: any): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "close", listener: () => void): this; + on(event: "message", listener: (value: any) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "close", listener: () => void): this; + once(event: "message", listener: (value: any) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "close", listener: () => void): this; + prependListener(event: "message", listener: (value: any) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "message", listener: (value: any) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: "close", listener: () => void): this; + removeListener(event: "message", listener: (value: any) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + off(event: "close", listener: () => void): this; + off(event: "message", listener: (value: any) => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; + } + + interface WorkerOptions { + eval?: boolean; + workerData?: any; + stdin?: boolean; + stdout?: boolean; + stderr?: boolean; + execArgv?: string[]; + } + + class Worker extends EventEmitter { + readonly stdin: Writable | null; + readonly stdout: Readable; + readonly stderr: Readable; + readonly threadId: number; + + constructor(filename: string, options?: WorkerOptions); + + postMessage(value: any, transferList?: Array): void; + ref(): void; + unref(): void; + /** + * Stop all JavaScript execution in the worker thread as soon as possible. + * Returns a Promise for the exit code that is fulfilled when the `exit` event is emitted. + */ + terminate(): Promise; + /** + * Transfer a `MessagePort` to a different `vm` Context. The original `port` + * object will be rendered unusable, and the returned `MessagePort` instance will + * take its place. + * + * The returned `MessagePort` will be an object in the target context, and will + * inherit from its global `Object` class. Objects passed to the + * `port.onmessage()` listener will also be created in the target context + * and inherit from its global `Object` class. + * + * However, the created `MessagePort` will no longer inherit from + * `EventEmitter`, and only `port.onmessage()` can be used to receive + * events using it. + */ + moveMessagePortToContext(port: MessagePort, context: Context): MessagePort; + + /** + * Receive a single message from a given `MessagePort`. If no message is available, + * `undefined` is returned, otherwise an object with a single `message` property + * that contains the message payload, corresponding to the oldest message in the + * `MessagePort`’s queue. + */ + receiveMessageOnPort(port: MessagePort): {} | undefined; + + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "exit", listener: (exitCode: number) => void): this; + addListener(event: "message", listener: (value: any) => void): this; + addListener(event: "online", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + emit(event: "error", err: Error): boolean; + emit(event: "exit", exitCode: number): boolean; + emit(event: "message", value: any): boolean; + emit(event: "online"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + + on(event: "error", listener: (err: Error) => void): this; + on(event: "exit", listener: (exitCode: number) => void): this; + on(event: "message", listener: (value: any) => void): this; + on(event: "online", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: "error", listener: (err: Error) => void): this; + once(event: "exit", listener: (exitCode: number) => void): this; + once(event: "message", listener: (value: any) => void): this; + once(event: "online", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "exit", listener: (exitCode: number) => void): this; + prependListener(event: "message", listener: (value: any) => void): this; + prependListener(event: "online", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "exit", listener: (exitCode: number) => void): this; + prependOnceListener(event: "message", listener: (value: any) => void): this; + prependOnceListener(event: "online", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "exit", listener: (exitCode: number) => void): this; + removeListener(event: "message", listener: (value: any) => void): this; + removeListener(event: "online", listener: () => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + off(event: "error", listener: (err: Error) => void): this; + off(event: "exit", listener: (exitCode: number) => void): this; + off(event: "message", listener: (value: any) => void): this; + off(event: "online", listener: () => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; + } +} diff --git a/node_modules/@types/node/zlib.d.ts b/node_modules/@types/node/zlib.d.ts new file mode 100644 index 00000000..b45721a1 --- /dev/null +++ b/node_modules/@types/node/zlib.d.ts @@ -0,0 +1,352 @@ +declare module "zlib" { + import * as stream from "stream"; + + interface ZlibOptions { + /** + * @default constants.Z_NO_FLUSH + */ + flush?: number; + /** + * @default constants.Z_FINISH + */ + finishFlush?: number; + /** + * @default 16*1024 + */ + chunkSize?: number; + windowBits?: number; + level?: number; // compression only + memLevel?: number; // compression only + strategy?: number; // compression only + dictionary?: NodeJS.TypedArray | DataView | ArrayBuffer; // deflate/inflate only, empty dictionary by default + } + + interface BrotliOptions { + /** + * @default constants.BROTLI_OPERATION_PROCESS + */ + flush?: number; + /** + * @default constants.BROTLI_OPERATION_FINISH + */ + finishFlush?: number; + /** + * @default 16*1024 + */ + chunkSize?: number; + params?: { + /** + * Each key is a `constants.BROTLI_*` constant. + */ + [key: number]: boolean | number; + }; + } + + interface Zlib { + /** @deprecated Use bytesWritten instead. */ + readonly bytesRead: number; + readonly bytesWritten: number; + shell?: boolean | string; + close(callback?: () => void): void; + flush(kind?: number | (() => void), callback?: () => void): void; + } + + interface ZlibParams { + params(level: number, strategy: number, callback: () => void): void; + } + + interface ZlibReset { + reset(): void; + } + + interface BrotliCompress extends stream.Transform, Zlib { } + interface BrotliDecompress extends stream.Transform, Zlib { } + interface Gzip extends stream.Transform, Zlib { } + interface Gunzip extends stream.Transform, Zlib { } + interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams { } + interface Inflate extends stream.Transform, Zlib, ZlibReset { } + interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams { } + interface InflateRaw extends stream.Transform, Zlib, ZlibReset { } + interface Unzip extends stream.Transform, Zlib { } + + function createBrotliCompress(options?: BrotliOptions): BrotliCompress; + function createBrotliDecompress(options?: BrotliOptions): BrotliDecompress; + function createGzip(options?: ZlibOptions): Gzip; + function createGunzip(options?: ZlibOptions): Gunzip; + function createDeflate(options?: ZlibOptions): Deflate; + function createInflate(options?: ZlibOptions): Inflate; + function createDeflateRaw(options?: ZlibOptions): DeflateRaw; + function createInflateRaw(options?: ZlibOptions): InflateRaw; + function createUnzip(options?: ZlibOptions): Unzip; + + type InputType = string | DataView | ArrayBuffer | NodeJS.TypedArray; + + type CompressCallback = (error: Error | null, result: Buffer) => void; + + function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void; + function brotliCompress(buf: InputType, callback: CompressCallback): void; + function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer; + function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void; + function brotliDecompress(buf: InputType, callback: CompressCallback): void; + function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer; + function deflate(buf: InputType, callback: CompressCallback): void; + function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function deflateSync(buf: InputType, options?: ZlibOptions): Buffer; + function deflateRaw(buf: InputType, callback: CompressCallback): void; + function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer; + function gzip(buf: InputType, callback: CompressCallback): void; + function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function gzipSync(buf: InputType, options?: ZlibOptions): Buffer; + function gunzip(buf: InputType, callback: CompressCallback): void; + function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer; + function inflate(buf: InputType, callback: CompressCallback): void; + function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function inflateSync(buf: InputType, options?: ZlibOptions): Buffer; + function inflateRaw(buf: InputType, callback: CompressCallback): void; + function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer; + function unzip(buf: InputType, callback: CompressCallback): void; + function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; + function unzipSync(buf: InputType, options?: ZlibOptions): Buffer; + + namespace constants { + const BROTLI_DECODE: number; + const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number; + const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: number; + const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: number; + const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: number; + const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: number; + const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: number; + const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: number; + const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: number; + const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: number; + const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: number; + const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: number; + const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: number; + const BROTLI_DECODER_ERROR_FORMAT_DISTANCE: number; + const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: number; + const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: number; + const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: number; + const BROTLI_DECODER_ERROR_FORMAT_PADDING_1: number; + const BROTLI_DECODER_ERROR_FORMAT_PADDING_2: number; + const BROTLI_DECODER_ERROR_FORMAT_RESERVED: number; + const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: number; + const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: number; + const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: number; + const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: number; + const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: number; + const BROTLI_DECODER_ERROR_UNREACHABLE: number; + const BROTLI_DECODER_NEEDS_MORE_INPUT: number; + const BROTLI_DECODER_NEEDS_MORE_OUTPUT: number; + const BROTLI_DECODER_NO_ERROR: number; + const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: number; + const BROTLI_DECODER_PARAM_LARGE_WINDOW: number; + const BROTLI_DECODER_RESULT_ERROR: number; + const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: number; + const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: number; + const BROTLI_DECODER_RESULT_SUCCESS: number; + const BROTLI_DECODER_SUCCESS: number; + + const BROTLI_DEFAULT_MODE: number; + const BROTLI_DEFAULT_QUALITY: number; + const BROTLI_DEFAULT_WINDOW: number; + const BROTLI_ENCODE: number; + const BROTLI_LARGE_MAX_WINDOW_BITS: number; + const BROTLI_MAX_INPUT_BLOCK_BITS: number; + const BROTLI_MAX_QUALITY: number; + const BROTLI_MAX_WINDOW_BITS: number; + const BROTLI_MIN_INPUT_BLOCK_BITS: number; + const BROTLI_MIN_QUALITY: number; + const BROTLI_MIN_WINDOW_BITS: number; + + const BROTLI_MODE_FONT: number; + const BROTLI_MODE_GENERIC: number; + const BROTLI_MODE_TEXT: number; + + const BROTLI_OPERATION_EMIT_METADATA: number; + const BROTLI_OPERATION_FINISH: number; + const BROTLI_OPERATION_FLUSH: number; + const BROTLI_OPERATION_PROCESS: number; + + const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: number; + const BROTLI_PARAM_LARGE_WINDOW: number; + const BROTLI_PARAM_LGBLOCK: number; + const BROTLI_PARAM_LGWIN: number; + const BROTLI_PARAM_MODE: number; + const BROTLI_PARAM_NDIRECT: number; + const BROTLI_PARAM_NPOSTFIX: number; + const BROTLI_PARAM_QUALITY: number; + const BROTLI_PARAM_SIZE_HINT: number; + + const DEFLATE: number; + const DEFLATERAW: number; + const GUNZIP: number; + const GZIP: number; + const INFLATE: number; + const INFLATERAW: number; + const UNZIP: number; + + const Z_BEST_COMPRESSION: number; + const Z_BEST_SPEED: number; + const Z_BLOCK: number; + const Z_BUF_ERROR: number; + const Z_DATA_ERROR: number; + + const Z_DEFAULT_CHUNK: number; + const Z_DEFAULT_COMPRESSION: number; + const Z_DEFAULT_LEVEL: number; + const Z_DEFAULT_MEMLEVEL: number; + const Z_DEFAULT_STRATEGY: number; + const Z_DEFAULT_WINDOWBITS: number; + + const Z_ERRNO: number; + const Z_FILTERED: number; + const Z_FINISH: number; + const Z_FIXED: number; + const Z_FULL_FLUSH: number; + const Z_HUFFMAN_ONLY: number; + const Z_MAX_CHUNK: number; + const Z_MAX_LEVEL: number; + const Z_MAX_MEMLEVEL: number; + const Z_MAX_WINDOWBITS: number; + const Z_MEM_ERROR: number; + const Z_MIN_CHUNK: number; + const Z_MIN_LEVEL: number; + const Z_MIN_MEMLEVEL: number; + const Z_MIN_WINDOWBITS: number; + const Z_NEED_DICT: number; + const Z_NO_COMPRESSION: number; + const Z_NO_FLUSH: number; + const Z_OK: number; + const Z_PARTIAL_FLUSH: number; + const Z_RLE: number; + const Z_STREAM_END: number; + const Z_STREAM_ERROR: number; + const Z_SYNC_FLUSH: number; + const Z_VERSION_ERROR: number; + const ZLIB_VERNUM: number; + } + + /** + * @deprecated + */ + const Z_NO_FLUSH: number; + /** + * @deprecated + */ + const Z_PARTIAL_FLUSH: number; + /** + * @deprecated + */ + const Z_SYNC_FLUSH: number; + /** + * @deprecated + */ + const Z_FULL_FLUSH: number; + /** + * @deprecated + */ + const Z_FINISH: number; + /** + * @deprecated + */ + const Z_BLOCK: number; + /** + * @deprecated + */ + const Z_TREES: number; + /** + * @deprecated + */ + const Z_OK: number; + /** + * @deprecated + */ + const Z_STREAM_END: number; + /** + * @deprecated + */ + const Z_NEED_DICT: number; + /** + * @deprecated + */ + const Z_ERRNO: number; + /** + * @deprecated + */ + const Z_STREAM_ERROR: number; + /** + * @deprecated + */ + const Z_DATA_ERROR: number; + /** + * @deprecated + */ + const Z_MEM_ERROR: number; + /** + * @deprecated + */ + const Z_BUF_ERROR: number; + /** + * @deprecated + */ + const Z_VERSION_ERROR: number; + /** + * @deprecated + */ + const Z_NO_COMPRESSION: number; + /** + * @deprecated + */ + const Z_BEST_SPEED: number; + /** + * @deprecated + */ + const Z_BEST_COMPRESSION: number; + /** + * @deprecated + */ + const Z_DEFAULT_COMPRESSION: number; + /** + * @deprecated + */ + const Z_FILTERED: number; + /** + * @deprecated + */ + const Z_HUFFMAN_ONLY: number; + /** + * @deprecated + */ + const Z_RLE: number; + /** + * @deprecated + */ + const Z_FIXED: number; + /** + * @deprecated + */ + const Z_DEFAULT_STRATEGY: number; + /** + * @deprecated + */ + const Z_BINARY: number; + /** + * @deprecated + */ + const Z_TEXT: number; + /** + * @deprecated + */ + const Z_ASCII: number; + /** + * @deprecated + */ + const Z_UNKNOWN: number; + /** + * @deprecated + */ + const Z_DEFLATED: number; +} diff --git a/node_modules/babel-runtime/.npmignore b/node_modules/babel-runtime/.npmignore new file mode 100644 index 00000000..3efd5b92 --- /dev/null +++ b/node_modules/babel-runtime/.npmignore @@ -0,0 +1,2 @@ +scripts +node_modules diff --git a/node_modules/babel-runtime/README.md b/node_modules/babel-runtime/README.md new file mode 100644 index 00000000..8aa85936 --- /dev/null +++ b/node_modules/babel-runtime/README.md @@ -0,0 +1,2 @@ +# babel-runtime + diff --git a/node_modules/babel-runtime/core-js.js b/node_modules/babel-runtime/core-js.js new file mode 100644 index 00000000..7d566438 --- /dev/null +++ b/node_modules/babel-runtime/core-js.js @@ -0,0 +1,4 @@ +module.exports = { + "default": require("core-js/library"), + __esModule: true +}; diff --git a/node_modules/babel-runtime/core-js/array/concat.js b/node_modules/babel-runtime/core-js/array/concat.js new file mode 100644 index 00000000..f0a5ec77 --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/concat.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/concat"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/copy-within.js b/node_modules/babel-runtime/core-js/array/copy-within.js new file mode 100644 index 00000000..e9352ed5 --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/copy-within.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/copy-within"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/entries.js b/node_modules/babel-runtime/core-js/array/entries.js new file mode 100644 index 00000000..ee8b9e9c --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/entries.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/entries"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/every.js b/node_modules/babel-runtime/core-js/array/every.js new file mode 100644 index 00000000..adc93197 --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/every.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/every"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/fill.js b/node_modules/babel-runtime/core-js/array/fill.js new file mode 100644 index 00000000..3cc2fe1e --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/fill.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/fill"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/filter.js b/node_modules/babel-runtime/core-js/array/filter.js new file mode 100644 index 00000000..f73a5dbd --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/filter.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/filter"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/find-index.js b/node_modules/babel-runtime/core-js/array/find-index.js new file mode 100644 index 00000000..560caa80 --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/find-index.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/find-index"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/find.js b/node_modules/babel-runtime/core-js/array/find.js new file mode 100644 index 00000000..77639937 --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/find.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/find"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/for-each.js b/node_modules/babel-runtime/core-js/array/for-each.js new file mode 100644 index 00000000..4808c96e --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/for-each.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/for-each"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/from.js b/node_modules/babel-runtime/core-js/array/from.js new file mode 100644 index 00000000..8c92e817 --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/from.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/from"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/includes.js b/node_modules/babel-runtime/core-js/array/includes.js new file mode 100644 index 00000000..602d0d8a --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/includes.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/includes"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/index-of.js b/node_modules/babel-runtime/core-js/array/index-of.js new file mode 100644 index 00000000..eb4a6ac5 --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/index-of.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/index-of"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/join.js b/node_modules/babel-runtime/core-js/array/join.js new file mode 100644 index 00000000..7dc300bb --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/join.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/join"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/keys.js b/node_modules/babel-runtime/core-js/array/keys.js new file mode 100644 index 00000000..5008ccbc --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/keys.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/keys"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/last-index-of.js b/node_modules/babel-runtime/core-js/array/last-index-of.js new file mode 100644 index 00000000..ed92a55f --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/last-index-of.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/last-index-of"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/map.js b/node_modules/babel-runtime/core-js/array/map.js new file mode 100644 index 00000000..0f58810c --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/map.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/map"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/of.js b/node_modules/babel-runtime/core-js/array/of.js new file mode 100644 index 00000000..d03ab62b --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/of.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/of"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/pop.js b/node_modules/babel-runtime/core-js/array/pop.js new file mode 100644 index 00000000..9114d2f5 --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/pop.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/pop"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/push.js b/node_modules/babel-runtime/core-js/array/push.js new file mode 100644 index 00000000..0cd42be9 --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/push.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/push"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/reduce-right.js b/node_modules/babel-runtime/core-js/array/reduce-right.js new file mode 100644 index 00000000..f56176cd --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/reduce-right.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/reduce-right"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/reduce.js b/node_modules/babel-runtime/core-js/array/reduce.js new file mode 100644 index 00000000..c0a20068 --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/reduce.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/reduce"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/reverse.js b/node_modules/babel-runtime/core-js/array/reverse.js new file mode 100644 index 00000000..8892c26b --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/reverse.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/reverse"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/shift.js b/node_modules/babel-runtime/core-js/array/shift.js new file mode 100644 index 00000000..49e66cd9 --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/shift.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/shift"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/slice.js b/node_modules/babel-runtime/core-js/array/slice.js new file mode 100644 index 00000000..5f5fe166 --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/slice.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/slice"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/some.js b/node_modules/babel-runtime/core-js/array/some.js new file mode 100644 index 00000000..72ca911d --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/some.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/some"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/sort.js b/node_modules/babel-runtime/core-js/array/sort.js new file mode 100644 index 00000000..32dece8d --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/sort.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/sort"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/splice.js b/node_modules/babel-runtime/core-js/array/splice.js new file mode 100644 index 00000000..6fdebb05 --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/splice.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/splice"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/unshift.js b/node_modules/babel-runtime/core-js/array/unshift.js new file mode 100644 index 00000000..3c237a4d --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/unshift.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/unshift"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/array/values.js b/node_modules/babel-runtime/core-js/array/values.js new file mode 100644 index 00000000..6cc67aae --- /dev/null +++ b/node_modules/babel-runtime/core-js/array/values.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/array/values"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/asap.js b/node_modules/babel-runtime/core-js/asap.js new file mode 100644 index 00000000..a59e4d0d --- /dev/null +++ b/node_modules/babel-runtime/core-js/asap.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/asap"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/clear-immediate.js b/node_modules/babel-runtime/core-js/clear-immediate.js new file mode 100644 index 00000000..f2090b70 --- /dev/null +++ b/node_modules/babel-runtime/core-js/clear-immediate.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/clear-immediate"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/error/is-error.js b/node_modules/babel-runtime/core-js/error/is-error.js new file mode 100644 index 00000000..26375468 --- /dev/null +++ b/node_modules/babel-runtime/core-js/error/is-error.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/error/is-error"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/get-iterator.js b/node_modules/babel-runtime/core-js/get-iterator.js new file mode 100644 index 00000000..8f9943af --- /dev/null +++ b/node_modules/babel-runtime/core-js/get-iterator.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/get-iterator"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/is-iterable.js b/node_modules/babel-runtime/core-js/is-iterable.js new file mode 100644 index 00000000..d690ac86 --- /dev/null +++ b/node_modules/babel-runtime/core-js/is-iterable.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/is-iterable"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/json/stringify.js b/node_modules/babel-runtime/core-js/json/stringify.js new file mode 100644 index 00000000..f09e2f93 --- /dev/null +++ b/node_modules/babel-runtime/core-js/json/stringify.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/json/stringify"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/map.js b/node_modules/babel-runtime/core-js/map.js new file mode 100644 index 00000000..ed02186f --- /dev/null +++ b/node_modules/babel-runtime/core-js/map.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/map"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/acosh.js b/node_modules/babel-runtime/core-js/math/acosh.js new file mode 100644 index 00000000..37e2202d --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/acosh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/acosh"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/asinh.js b/node_modules/babel-runtime/core-js/math/asinh.js new file mode 100644 index 00000000..b5147b3d --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/asinh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/asinh"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/atanh.js b/node_modules/babel-runtime/core-js/math/atanh.js new file mode 100644 index 00000000..ad09bb7f --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/atanh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/atanh"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/cbrt.js b/node_modules/babel-runtime/core-js/math/cbrt.js new file mode 100644 index 00000000..24a69748 --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/cbrt.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/cbrt"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/clz32.js b/node_modules/babel-runtime/core-js/math/clz32.js new file mode 100644 index 00000000..d2218b48 --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/clz32.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/clz32"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/cosh.js b/node_modules/babel-runtime/core-js/math/cosh.js new file mode 100644 index 00000000..fa9d0794 --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/cosh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/cosh"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/expm1.js b/node_modules/babel-runtime/core-js/math/expm1.js new file mode 100644 index 00000000..860921ed --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/expm1.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/expm1"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/fround.js b/node_modules/babel-runtime/core-js/math/fround.js new file mode 100644 index 00000000..b62e43ab --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/fround.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/fround"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/hypot.js b/node_modules/babel-runtime/core-js/math/hypot.js new file mode 100644 index 00000000..b07335bf --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/hypot.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/hypot"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/iaddh.js b/node_modules/babel-runtime/core-js/math/iaddh.js new file mode 100644 index 00000000..016eb07f --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/iaddh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/iaddh"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/imul.js b/node_modules/babel-runtime/core-js/math/imul.js new file mode 100644 index 00000000..3bf89e84 --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/imul.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/imul"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/imulh.js b/node_modules/babel-runtime/core-js/math/imulh.js new file mode 100644 index 00000000..3fc7d744 --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/imulh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/imulh"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/isubh.js b/node_modules/babel-runtime/core-js/math/isubh.js new file mode 100644 index 00000000..6b6ea4f1 --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/isubh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/isubh"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/log10.js b/node_modules/babel-runtime/core-js/math/log10.js new file mode 100644 index 00000000..f384512d --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/log10.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/log10"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/log1p.js b/node_modules/babel-runtime/core-js/math/log1p.js new file mode 100644 index 00000000..358fc452 --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/log1p.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/log1p"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/log2.js b/node_modules/babel-runtime/core-js/math/log2.js new file mode 100644 index 00000000..1cbca00b --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/log2.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/log2"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/sign.js b/node_modules/babel-runtime/core-js/math/sign.js new file mode 100644 index 00000000..8d0cfa32 --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/sign.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/sign"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/sinh.js b/node_modules/babel-runtime/core-js/math/sinh.js new file mode 100644 index 00000000..81afaddc --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/sinh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/sinh"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/tanh.js b/node_modules/babel-runtime/core-js/math/tanh.js new file mode 100644 index 00000000..76fad88a --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/tanh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/tanh"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/trunc.js b/node_modules/babel-runtime/core-js/math/trunc.js new file mode 100644 index 00000000..443a9581 --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/trunc.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/trunc"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/math/umulh.js b/node_modules/babel-runtime/core-js/math/umulh.js new file mode 100644 index 00000000..357f389c --- /dev/null +++ b/node_modules/babel-runtime/core-js/math/umulh.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/math/umulh"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/number/epsilon.js b/node_modules/babel-runtime/core-js/number/epsilon.js new file mode 100644 index 00000000..b5c78626 --- /dev/null +++ b/node_modules/babel-runtime/core-js/number/epsilon.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/epsilon"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/number/is-finite.js b/node_modules/babel-runtime/core-js/number/is-finite.js new file mode 100644 index 00000000..7366242e --- /dev/null +++ b/node_modules/babel-runtime/core-js/number/is-finite.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/is-finite"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/number/is-integer.js b/node_modules/babel-runtime/core-js/number/is-integer.js new file mode 100644 index 00000000..69b9bb71 --- /dev/null +++ b/node_modules/babel-runtime/core-js/number/is-integer.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/is-integer"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/number/is-nan.js b/node_modules/babel-runtime/core-js/number/is-nan.js new file mode 100644 index 00000000..5402a71a --- /dev/null +++ b/node_modules/babel-runtime/core-js/number/is-nan.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/is-nan"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/number/is-safe-integer.js b/node_modules/babel-runtime/core-js/number/is-safe-integer.js new file mode 100644 index 00000000..2d72dd45 --- /dev/null +++ b/node_modules/babel-runtime/core-js/number/is-safe-integer.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/is-safe-integer"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/number/max-safe-integer.js b/node_modules/babel-runtime/core-js/number/max-safe-integer.js new file mode 100644 index 00000000..9b55c84e --- /dev/null +++ b/node_modules/babel-runtime/core-js/number/max-safe-integer.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/max-safe-integer"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/number/min-safe-integer.js b/node_modules/babel-runtime/core-js/number/min-safe-integer.js new file mode 100644 index 00000000..b5e9785a --- /dev/null +++ b/node_modules/babel-runtime/core-js/number/min-safe-integer.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/min-safe-integer"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/number/parse-float.js b/node_modules/babel-runtime/core-js/number/parse-float.js new file mode 100644 index 00000000..0e0f0bce --- /dev/null +++ b/node_modules/babel-runtime/core-js/number/parse-float.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/parse-float"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/number/parse-int.js b/node_modules/babel-runtime/core-js/number/parse-int.js new file mode 100644 index 00000000..6d454ea9 --- /dev/null +++ b/node_modules/babel-runtime/core-js/number/parse-int.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/number/parse-int"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/assign.js b/node_modules/babel-runtime/core-js/object/assign.js new file mode 100644 index 00000000..ca48f0c8 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/assign.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/assign"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/create.js b/node_modules/babel-runtime/core-js/object/create.js new file mode 100644 index 00000000..130165c9 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/create.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/create"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/define-properties.js b/node_modules/babel-runtime/core-js/object/define-properties.js new file mode 100644 index 00000000..d39e1532 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/define-properties.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/define-properties"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/define-property.js b/node_modules/babel-runtime/core-js/object/define-property.js new file mode 100644 index 00000000..f41735b6 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/define-property.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/define-property"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/entries.js b/node_modules/babel-runtime/core-js/object/entries.js new file mode 100644 index 00000000..32ed7a56 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/entries.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/entries"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/freeze.js b/node_modules/babel-runtime/core-js/object/freeze.js new file mode 100644 index 00000000..8cc278b6 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/freeze.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/freeze"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js b/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js new file mode 100644 index 00000000..8e9296e4 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/get-own-property-descriptor"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/get-own-property-descriptors.js b/node_modules/babel-runtime/core-js/object/get-own-property-descriptors.js new file mode 100644 index 00000000..23200d28 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/get-own-property-descriptors.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/get-own-property-descriptors"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/get-own-property-names.js b/node_modules/babel-runtime/core-js/object/get-own-property-names.js new file mode 100644 index 00000000..7b954455 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/get-own-property-names.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/get-own-property-names"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js b/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js new file mode 100644 index 00000000..c2fc78f8 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/get-own-property-symbols"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/get-prototype-of.js b/node_modules/babel-runtime/core-js/object/get-prototype-of.js new file mode 100644 index 00000000..47d3f727 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/get-prototype-of.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/get-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/is-extensible.js b/node_modules/babel-runtime/core-js/object/is-extensible.js new file mode 100644 index 00000000..51175ad5 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/is-extensible.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/is-extensible"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/is-frozen.js b/node_modules/babel-runtime/core-js/object/is-frozen.js new file mode 100644 index 00000000..e8ab5f15 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/is-frozen.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/is-frozen"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/is-sealed.js b/node_modules/babel-runtime/core-js/object/is-sealed.js new file mode 100644 index 00000000..77beda44 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/is-sealed.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/is-sealed"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/is.js b/node_modules/babel-runtime/core-js/object/is.js new file mode 100644 index 00000000..65247043 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/is.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/is"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/keys.js b/node_modules/babel-runtime/core-js/object/keys.js new file mode 100644 index 00000000..04a3f017 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/keys.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/keys"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/prevent-extensions.js b/node_modules/babel-runtime/core-js/object/prevent-extensions.js new file mode 100644 index 00000000..3d4305fe --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/prevent-extensions.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/prevent-extensions"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/seal.js b/node_modules/babel-runtime/core-js/object/seal.js new file mode 100644 index 00000000..c969cab9 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/seal.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/seal"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/set-prototype-of.js b/node_modules/babel-runtime/core-js/object/set-prototype-of.js new file mode 100644 index 00000000..63b1435e --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/set-prototype-of.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/set-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/object/values.js b/node_modules/babel-runtime/core-js/object/values.js new file mode 100644 index 00000000..c5870971 --- /dev/null +++ b/node_modules/babel-runtime/core-js/object/values.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/object/values"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/observable.js b/node_modules/babel-runtime/core-js/observable.js new file mode 100644 index 00000000..04ca51e6 --- /dev/null +++ b/node_modules/babel-runtime/core-js/observable.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/observable"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/promise.js b/node_modules/babel-runtime/core-js/promise.js new file mode 100644 index 00000000..0cb9a23e --- /dev/null +++ b/node_modules/babel-runtime/core-js/promise.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/promise"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/apply.js b/node_modules/babel-runtime/core-js/reflect/apply.js new file mode 100644 index 00000000..cc578d4d --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/apply.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/apply"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/construct.js b/node_modules/babel-runtime/core-js/reflect/construct.js new file mode 100644 index 00000000..a2d991a2 --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/construct.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/construct"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/define-metadata.js b/node_modules/babel-runtime/core-js/reflect/define-metadata.js new file mode 100644 index 00000000..1ba7d4a1 --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/define-metadata.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/define-metadata"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/define-property.js b/node_modules/babel-runtime/core-js/reflect/define-property.js new file mode 100644 index 00000000..aee1c3a1 --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/define-property.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/define-property"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/delete-metadata.js b/node_modules/babel-runtime/core-js/reflect/delete-metadata.js new file mode 100644 index 00000000..3396c42b --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/delete-metadata.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/delete-metadata"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/delete-property.js b/node_modules/babel-runtime/core-js/reflect/delete-property.js new file mode 100644 index 00000000..efa76abc --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/delete-property.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/delete-property"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/enumerate.js b/node_modules/babel-runtime/core-js/reflect/enumerate.js new file mode 100644 index 00000000..041484ba --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/enumerate.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/enumerate"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/get-metadata-keys.js b/node_modules/babel-runtime/core-js/reflect/get-metadata-keys.js new file mode 100644 index 00000000..722e0996 --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/get-metadata-keys.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/get-metadata-keys"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/get-metadata.js b/node_modules/babel-runtime/core-js/reflect/get-metadata.js new file mode 100644 index 00000000..d725525b --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/get-metadata.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/get-metadata"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/get-own-metadata-keys.js b/node_modules/babel-runtime/core-js/reflect/get-own-metadata-keys.js new file mode 100644 index 00000000..feff3a6e --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/get-own-metadata-keys.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/get-own-metadata-keys"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/get-own-metadata.js b/node_modules/babel-runtime/core-js/reflect/get-own-metadata.js new file mode 100644 index 00000000..1f8bd566 --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/get-own-metadata.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/get-own-metadata"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/get-own-property-descriptor.js b/node_modules/babel-runtime/core-js/reflect/get-own-property-descriptor.js new file mode 100644 index 00000000..67a50f5a --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/get-own-property-descriptor.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/get-own-property-descriptor"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/get-prototype-of.js b/node_modules/babel-runtime/core-js/reflect/get-prototype-of.js new file mode 100644 index 00000000..d3c8d4e3 --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/get-prototype-of.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/get-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/get.js b/node_modules/babel-runtime/core-js/reflect/get.js new file mode 100644 index 00000000..a42e4fba --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/get.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/get"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/has-metadata.js b/node_modules/babel-runtime/core-js/reflect/has-metadata.js new file mode 100644 index 00000000..c1051a38 --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/has-metadata.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/has-metadata"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/has-own-metadata.js b/node_modules/babel-runtime/core-js/reflect/has-own-metadata.js new file mode 100644 index 00000000..1cefbf79 --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/has-own-metadata.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/has-own-metadata"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/has.js b/node_modules/babel-runtime/core-js/reflect/has.js new file mode 100644 index 00000000..e2a96656 --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/has.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/has"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/is-extensible.js b/node_modules/babel-runtime/core-js/reflect/is-extensible.js new file mode 100644 index 00000000..b0de7bff --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/is-extensible.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/is-extensible"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/metadata.js b/node_modules/babel-runtime/core-js/reflect/metadata.js new file mode 100644 index 00000000..cb85fdee --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/metadata.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/metadata"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/own-keys.js b/node_modules/babel-runtime/core-js/reflect/own-keys.js new file mode 100644 index 00000000..d98fed2b --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/own-keys.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/own-keys"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/prevent-extensions.js b/node_modules/babel-runtime/core-js/reflect/prevent-extensions.js new file mode 100644 index 00000000..5408d890 --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/prevent-extensions.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/prevent-extensions"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/set-prototype-of.js b/node_modules/babel-runtime/core-js/reflect/set-prototype-of.js new file mode 100644 index 00000000..5433e2e3 --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/set-prototype-of.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/set-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/reflect/set.js b/node_modules/babel-runtime/core-js/reflect/set.js new file mode 100644 index 00000000..657bddc2 --- /dev/null +++ b/node_modules/babel-runtime/core-js/reflect/set.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/reflect/set"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/regexp/escape.js b/node_modules/babel-runtime/core-js/regexp/escape.js new file mode 100644 index 00000000..12a25c3b --- /dev/null +++ b/node_modules/babel-runtime/core-js/regexp/escape.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/regexp/escape"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/set-immediate.js b/node_modules/babel-runtime/core-js/set-immediate.js new file mode 100644 index 00000000..fc42eb4a --- /dev/null +++ b/node_modules/babel-runtime/core-js/set-immediate.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/set-immediate"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/set.js b/node_modules/babel-runtime/core-js/set.js new file mode 100644 index 00000000..22c14d46 --- /dev/null +++ b/node_modules/babel-runtime/core-js/set.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/set"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/at.js b/node_modules/babel-runtime/core-js/string/at.js new file mode 100644 index 00000000..1c4b5952 --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/at.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/at"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/code-point-at.js b/node_modules/babel-runtime/core-js/string/code-point-at.js new file mode 100644 index 00000000..4332bdb6 --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/code-point-at.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/code-point-at"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/ends-with.js b/node_modules/babel-runtime/core-js/string/ends-with.js new file mode 100644 index 00000000..ad3b55a2 --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/ends-with.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/ends-with"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/from-code-point.js b/node_modules/babel-runtime/core-js/string/from-code-point.js new file mode 100644 index 00000000..8c10782a --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/from-code-point.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/from-code-point"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/includes.js b/node_modules/babel-runtime/core-js/string/includes.js new file mode 100644 index 00000000..f7de2707 --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/includes.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/includes"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/match-all.js b/node_modules/babel-runtime/core-js/string/match-all.js new file mode 100644 index 00000000..813855c0 --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/match-all.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/match-all"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/pad-end.js b/node_modules/babel-runtime/core-js/string/pad-end.js new file mode 100644 index 00000000..5ff98146 --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/pad-end.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/pad-end"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/pad-left.js b/node_modules/babel-runtime/core-js/string/pad-left.js new file mode 100644 index 00000000..ee67e704 --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/pad-left.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/pad-start"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/pad-right.js b/node_modules/babel-runtime/core-js/string/pad-right.js new file mode 100644 index 00000000..5ff98146 --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/pad-right.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/pad-end"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/pad-start.js b/node_modules/babel-runtime/core-js/string/pad-start.js new file mode 100644 index 00000000..ee67e704 --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/pad-start.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/pad-start"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/raw.js b/node_modules/babel-runtime/core-js/string/raw.js new file mode 100644 index 00000000..05c92dc1 --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/raw.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/raw"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/repeat.js b/node_modules/babel-runtime/core-js/string/repeat.js new file mode 100644 index 00000000..816ef2ee --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/repeat.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/repeat"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/starts-with.js b/node_modules/babel-runtime/core-js/string/starts-with.js new file mode 100644 index 00000000..5d74716c --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/starts-with.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/starts-with"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/trim-end.js b/node_modules/babel-runtime/core-js/string/trim-end.js new file mode 100644 index 00000000..7c426f5d --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/trim-end.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/trim-end"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/trim-left.js b/node_modules/babel-runtime/core-js/string/trim-left.js new file mode 100644 index 00000000..b8a7e1e5 --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/trim-left.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/trim-left"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/trim-right.js b/node_modules/babel-runtime/core-js/string/trim-right.js new file mode 100644 index 00000000..ba3ca745 --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/trim-right.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/trim-right"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/trim-start.js b/node_modules/babel-runtime/core-js/string/trim-start.js new file mode 100644 index 00000000..f1f035aa --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/trim-start.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/trim-start"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/string/trim.js b/node_modules/babel-runtime/core-js/string/trim.js new file mode 100644 index 00000000..7d51cf07 --- /dev/null +++ b/node_modules/babel-runtime/core-js/string/trim.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/string/trim"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol.js b/node_modules/babel-runtime/core-js/symbol.js new file mode 100644 index 00000000..9aa95a02 --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/async-iterator.js b/node_modules/babel-runtime/core-js/symbol/async-iterator.js new file mode 100644 index 00000000..9dd3a570 --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/async-iterator.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/async-iterator"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/for.js b/node_modules/babel-runtime/core-js/symbol/for.js new file mode 100644 index 00000000..de7424fb --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/for.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/for"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/has-instance.js b/node_modules/babel-runtime/core-js/symbol/has-instance.js new file mode 100644 index 00000000..f7711804 --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/has-instance.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/has-instance"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/is-concat-spreadable.js b/node_modules/babel-runtime/core-js/symbol/is-concat-spreadable.js new file mode 100644 index 00000000..0bc7f03d --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/is-concat-spreadable.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/is-concat-spreadable"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/iterator.js b/node_modules/babel-runtime/core-js/symbol/iterator.js new file mode 100644 index 00000000..3f9a0fbd --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/iterator.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/iterator"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/key-for.js b/node_modules/babel-runtime/core-js/symbol/key-for.js new file mode 100644 index 00000000..15a6cfba --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/key-for.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/key-for"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/match.js b/node_modules/babel-runtime/core-js/symbol/match.js new file mode 100644 index 00000000..ed64810c --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/match.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/match"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/observable.js b/node_modules/babel-runtime/core-js/symbol/observable.js new file mode 100644 index 00000000..876f9c02 --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/observable.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/observable"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/replace.js b/node_modules/babel-runtime/core-js/symbol/replace.js new file mode 100644 index 00000000..35f900bd --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/replace.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/replace"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/search.js b/node_modules/babel-runtime/core-js/symbol/search.js new file mode 100644 index 00000000..4b81d319 --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/search.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/search"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/species.js b/node_modules/babel-runtime/core-js/symbol/species.js new file mode 100644 index 00000000..4481321d --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/species.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/species"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/split.js b/node_modules/babel-runtime/core-js/symbol/split.js new file mode 100644 index 00000000..1f5795c0 --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/split.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/split"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/to-primitive.js b/node_modules/babel-runtime/core-js/symbol/to-primitive.js new file mode 100644 index 00000000..b7f9e044 --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/to-primitive.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/to-primitive"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/to-string-tag.js b/node_modules/babel-runtime/core-js/symbol/to-string-tag.js new file mode 100644 index 00000000..d9e4e4d6 --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/to-string-tag.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/to-string-tag"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/symbol/unscopables.js b/node_modules/babel-runtime/core-js/symbol/unscopables.js new file mode 100644 index 00000000..cd3dac01 --- /dev/null +++ b/node_modules/babel-runtime/core-js/symbol/unscopables.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/symbol/unscopables"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/system/global.js b/node_modules/babel-runtime/core-js/system/global.js new file mode 100644 index 00000000..c442f179 --- /dev/null +++ b/node_modules/babel-runtime/core-js/system/global.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/system/global"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/weak-map.js b/node_modules/babel-runtime/core-js/weak-map.js new file mode 100644 index 00000000..de130d48 --- /dev/null +++ b/node_modules/babel-runtime/core-js/weak-map.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/weak-map"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/core-js/weak-set.js b/node_modules/babel-runtime/core-js/weak-set.js new file mode 100644 index 00000000..b96cb974 --- /dev/null +++ b/node_modules/babel-runtime/core-js/weak-set.js @@ -0,0 +1 @@ +module.exports = { "default": require("core-js/library/fn/weak-set"), __esModule: true }; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_async-generator-delegate.js b/node_modules/babel-runtime/helpers/_async-generator-delegate.js new file mode 100644 index 00000000..c1debb4a --- /dev/null +++ b/node_modules/babel-runtime/helpers/_async-generator-delegate.js @@ -0,0 +1 @@ +module.exports = require("./asyncGeneratorDelegate.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_async-generator.js b/node_modules/babel-runtime/helpers/_async-generator.js new file mode 100644 index 00000000..ee87351f --- /dev/null +++ b/node_modules/babel-runtime/helpers/_async-generator.js @@ -0,0 +1 @@ +module.exports = require("./asyncGenerator.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_async-iterator.js b/node_modules/babel-runtime/helpers/_async-iterator.js new file mode 100644 index 00000000..c014bbb7 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_async-iterator.js @@ -0,0 +1 @@ +module.exports = require("./asyncIterator.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_async-to-generator.js b/node_modules/babel-runtime/helpers/_async-to-generator.js new file mode 100644 index 00000000..5f81e900 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_async-to-generator.js @@ -0,0 +1 @@ +module.exports = require("./asyncToGenerator.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_class-call-check.js b/node_modules/babel-runtime/helpers/_class-call-check.js new file mode 100644 index 00000000..d4514f0a --- /dev/null +++ b/node_modules/babel-runtime/helpers/_class-call-check.js @@ -0,0 +1 @@ +module.exports = require("./classCallCheck.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_create-class.js b/node_modules/babel-runtime/helpers/_create-class.js new file mode 100644 index 00000000..2699d23f --- /dev/null +++ b/node_modules/babel-runtime/helpers/_create-class.js @@ -0,0 +1 @@ +module.exports = require("./createClass.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_defaults.js b/node_modules/babel-runtime/helpers/_defaults.js new file mode 100644 index 00000000..a4274f5e --- /dev/null +++ b/node_modules/babel-runtime/helpers/_defaults.js @@ -0,0 +1 @@ +module.exports = require("./defaults.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_define-enumerable-properties.js b/node_modules/babel-runtime/helpers/_define-enumerable-properties.js new file mode 100644 index 00000000..c60bbfc3 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_define-enumerable-properties.js @@ -0,0 +1 @@ +module.exports = require("./defineEnumerableProperties.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_define-property.js b/node_modules/babel-runtime/helpers/_define-property.js new file mode 100644 index 00000000..a265eab9 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_define-property.js @@ -0,0 +1 @@ +module.exports = require("./defineProperty.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_extends.js b/node_modules/babel-runtime/helpers/_extends.js new file mode 100644 index 00000000..2ecdb0ed --- /dev/null +++ b/node_modules/babel-runtime/helpers/_extends.js @@ -0,0 +1 @@ +module.exports = require("./extends.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_get.js b/node_modules/babel-runtime/helpers/_get.js new file mode 100644 index 00000000..39aa3873 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_get.js @@ -0,0 +1 @@ +module.exports = require("./get.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_inherits.js b/node_modules/babel-runtime/helpers/_inherits.js new file mode 100644 index 00000000..29deff3f --- /dev/null +++ b/node_modules/babel-runtime/helpers/_inherits.js @@ -0,0 +1 @@ +module.exports = require("./inherits.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_instanceof.js b/node_modules/babel-runtime/helpers/_instanceof.js new file mode 100644 index 00000000..4c612133 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_instanceof.js @@ -0,0 +1 @@ +module.exports = require("./instanceof.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_interop-require-default.js b/node_modules/babel-runtime/helpers/_interop-require-default.js new file mode 100644 index 00000000..10edad2c --- /dev/null +++ b/node_modules/babel-runtime/helpers/_interop-require-default.js @@ -0,0 +1 @@ +module.exports = require("./interopRequireDefault.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_interop-require-wildcard.js b/node_modules/babel-runtime/helpers/_interop-require-wildcard.js new file mode 100644 index 00000000..ae19e01e --- /dev/null +++ b/node_modules/babel-runtime/helpers/_interop-require-wildcard.js @@ -0,0 +1 @@ +module.exports = require("./interopRequireWildcard.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_jsx.js b/node_modules/babel-runtime/helpers/_jsx.js new file mode 100644 index 00000000..f21ab916 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_jsx.js @@ -0,0 +1 @@ +module.exports = require("./jsx.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_new-arrow-check.js b/node_modules/babel-runtime/helpers/_new-arrow-check.js new file mode 100644 index 00000000..6325419c --- /dev/null +++ b/node_modules/babel-runtime/helpers/_new-arrow-check.js @@ -0,0 +1 @@ +module.exports = require("./newArrowCheck.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_object-destructuring-empty.js b/node_modules/babel-runtime/helpers/_object-destructuring-empty.js new file mode 100644 index 00000000..9c6ffef5 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_object-destructuring-empty.js @@ -0,0 +1 @@ +module.exports = require("./objectDestructuringEmpty.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_object-without-properties.js b/node_modules/babel-runtime/helpers/_object-without-properties.js new file mode 100644 index 00000000..052b2078 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_object-without-properties.js @@ -0,0 +1 @@ +module.exports = require("./objectWithoutProperties.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_possible-constructor-return.js b/node_modules/babel-runtime/helpers/_possible-constructor-return.js new file mode 100644 index 00000000..09018d77 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_possible-constructor-return.js @@ -0,0 +1 @@ +module.exports = require("./possibleConstructorReturn.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_self-global.js b/node_modules/babel-runtime/helpers/_self-global.js new file mode 100644 index 00000000..c3d45f33 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_self-global.js @@ -0,0 +1 @@ +module.exports = require("./selfGlobal.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_set.js b/node_modules/babel-runtime/helpers/_set.js new file mode 100644 index 00000000..e4dd5eaf --- /dev/null +++ b/node_modules/babel-runtime/helpers/_set.js @@ -0,0 +1 @@ +module.exports = require("./set.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_sliced-to-array-loose.js b/node_modules/babel-runtime/helpers/_sliced-to-array-loose.js new file mode 100644 index 00000000..8bb56d33 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_sliced-to-array-loose.js @@ -0,0 +1 @@ +module.exports = require("./slicedToArrayLoose.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_sliced-to-array.js b/node_modules/babel-runtime/helpers/_sliced-to-array.js new file mode 100644 index 00000000..28d7fd82 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_sliced-to-array.js @@ -0,0 +1 @@ +module.exports = require("./slicedToArray.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_tagged-template-literal-loose.js b/node_modules/babel-runtime/helpers/_tagged-template-literal-loose.js new file mode 100644 index 00000000..8ffa3f71 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_tagged-template-literal-loose.js @@ -0,0 +1 @@ +module.exports = require("./taggedTemplateLiteralLoose.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_tagged-template-literal.js b/node_modules/babel-runtime/helpers/_tagged-template-literal.js new file mode 100644 index 00000000..160a9178 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_tagged-template-literal.js @@ -0,0 +1 @@ +module.exports = require("./taggedTemplateLiteral.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_temporal-ref.js b/node_modules/babel-runtime/helpers/_temporal-ref.js new file mode 100644 index 00000000..cf2e4e45 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_temporal-ref.js @@ -0,0 +1 @@ +module.exports = require("./temporalRef.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_temporal-undefined.js b/node_modules/babel-runtime/helpers/_temporal-undefined.js new file mode 100644 index 00000000..234fc339 --- /dev/null +++ b/node_modules/babel-runtime/helpers/_temporal-undefined.js @@ -0,0 +1 @@ +module.exports = require("./temporalUndefined.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_to-array.js b/node_modules/babel-runtime/helpers/_to-array.js new file mode 100644 index 00000000..d89ee39a --- /dev/null +++ b/node_modules/babel-runtime/helpers/_to-array.js @@ -0,0 +1 @@ +module.exports = require("./toArray.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_to-consumable-array.js b/node_modules/babel-runtime/helpers/_to-consumable-array.js new file mode 100644 index 00000000..0aad718d --- /dev/null +++ b/node_modules/babel-runtime/helpers/_to-consumable-array.js @@ -0,0 +1 @@ +module.exports = require("./toConsumableArray.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/_typeof.js b/node_modules/babel-runtime/helpers/_typeof.js new file mode 100644 index 00000000..14fd11cd --- /dev/null +++ b/node_modules/babel-runtime/helpers/_typeof.js @@ -0,0 +1 @@ +module.exports = require("./typeof.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/async-generator-delegate.js b/node_modules/babel-runtime/helpers/async-generator-delegate.js new file mode 100644 index 00000000..c1debb4a --- /dev/null +++ b/node_modules/babel-runtime/helpers/async-generator-delegate.js @@ -0,0 +1 @@ +module.exports = require("./asyncGeneratorDelegate.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/async-generator.js b/node_modules/babel-runtime/helpers/async-generator.js new file mode 100644 index 00000000..ee87351f --- /dev/null +++ b/node_modules/babel-runtime/helpers/async-generator.js @@ -0,0 +1 @@ +module.exports = require("./asyncGenerator.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/async-iterator.js b/node_modules/babel-runtime/helpers/async-iterator.js new file mode 100644 index 00000000..c014bbb7 --- /dev/null +++ b/node_modules/babel-runtime/helpers/async-iterator.js @@ -0,0 +1 @@ +module.exports = require("./asyncIterator.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/async-to-generator.js b/node_modules/babel-runtime/helpers/async-to-generator.js new file mode 100644 index 00000000..5f81e900 --- /dev/null +++ b/node_modules/babel-runtime/helpers/async-to-generator.js @@ -0,0 +1 @@ +module.exports = require("./asyncToGenerator.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/asyncGenerator.js b/node_modules/babel-runtime/helpers/asyncGenerator.js new file mode 100644 index 00000000..d3032e77 --- /dev/null +++ b/node_modules/babel-runtime/helpers/asyncGenerator.js @@ -0,0 +1,126 @@ +"use strict"; + +exports.__esModule = true; + +var _symbol = require("../core-js/symbol"); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _promise = require("../core-js/promise"); + +var _promise2 = _interopRequireDefault(_promise); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function AwaitValue(value) { + this.value = value; + } + + function AsyncGenerator(gen) { + var front, back; + + function send(key, arg) { + return new _promise2.default(function (resolve, reject) { + var request = { + key: key, + arg: arg, + resolve: resolve, + reject: reject, + next: null + }; + + if (back) { + back = back.next = request; + } else { + front = back = request; + resume(key, arg); + } + }); + } + + function resume(key, arg) { + try { + var result = gen[key](arg); + var value = result.value; + + if (value instanceof AwaitValue) { + _promise2.default.resolve(value.value).then(function (arg) { + resume("next", arg); + }, function (arg) { + resume("throw", arg); + }); + } else { + settle(result.done ? "return" : "normal", result.value); + } + } catch (err) { + settle("throw", err); + } + } + + function settle(type, value) { + switch (type) { + case "return": + front.resolve({ + value: value, + done: true + }); + break; + + case "throw": + front.reject(value); + break; + + default: + front.resolve({ + value: value, + done: false + }); + break; + } + + front = front.next; + + if (front) { + resume(front.key, front.arg); + } else { + back = null; + } + } + + this._invoke = send; + + if (typeof gen.return !== "function") { + this.return = undefined; + } + } + + if (typeof _symbol2.default === "function" && _symbol2.default.asyncIterator) { + AsyncGenerator.prototype[_symbol2.default.asyncIterator] = function () { + return this; + }; + } + + AsyncGenerator.prototype.next = function (arg) { + return this._invoke("next", arg); + }; + + AsyncGenerator.prototype.throw = function (arg) { + return this._invoke("throw", arg); + }; + + AsyncGenerator.prototype.return = function (arg) { + return this._invoke("return", arg); + }; + + return { + wrap: function wrap(fn) { + return function () { + return new AsyncGenerator(fn.apply(this, arguments)); + }; + }, + await: function _await(value) { + return new AwaitValue(value); + } + }; +}(); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/asyncGeneratorDelegate.js b/node_modules/babel-runtime/helpers/asyncGeneratorDelegate.js new file mode 100644 index 00000000..5fcc123e --- /dev/null +++ b/node_modules/babel-runtime/helpers/asyncGeneratorDelegate.js @@ -0,0 +1,69 @@ +"use strict"; + +exports.__esModule = true; + +var _iterator = require("../core-js/symbol/iterator"); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = require("../core-js/symbol"); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _promise = require("../core-js/promise"); + +var _promise2 = _interopRequireDefault(_promise); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (inner, awaitWrap) { + var iter = {}, + waiting = false; + + function pump(key, value) { + waiting = true; + value = new _promise2.default(function (resolve) { + resolve(inner[key](value)); + }); + return { + done: false, + value: awaitWrap(value) + }; + } + + ; + + if (typeof _symbol2.default === "function" && _iterator2.default) { + iter[_iterator2.default] = function () { + return this; + }; + } + + iter.next = function (value) { + if (waiting) { + waiting = false; + return value; + } + + return pump("next", value); + }; + + if (typeof inner.throw === "function") { + iter.throw = function (value) { + if (waiting) { + waiting = false; + throw value; + } + + return pump("throw", value); + }; + } + + if (typeof inner.return === "function") { + iter.return = function (value) { + return pump("return", value); + }; + } + + return iter; +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/asyncIterator.js b/node_modules/babel-runtime/helpers/asyncIterator.js new file mode 100644 index 00000000..b542b6c7 --- /dev/null +++ b/node_modules/babel-runtime/helpers/asyncIterator.js @@ -0,0 +1,32 @@ +"use strict"; + +exports.__esModule = true; + +var _getIterator2 = require("../core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _iterator = require("../core-js/symbol/iterator"); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = require("../core-js/symbol"); + +var _symbol2 = _interopRequireDefault(_symbol); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (iterable) { + if (typeof _symbol2.default === "function") { + if (_symbol2.default.asyncIterator) { + var method = iterable[_symbol2.default.asyncIterator]; + if (method != null) return method.call(iterable); + } + + if (_iterator2.default) { + return (0, _getIterator3.default)(iterable); + } + } + + throw new TypeError("Object is not async iterable"); +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/asyncToGenerator.js b/node_modules/babel-runtime/helpers/asyncToGenerator.js new file mode 100644 index 00000000..50be669e --- /dev/null +++ b/node_modules/babel-runtime/helpers/asyncToGenerator.js @@ -0,0 +1,38 @@ +"use strict"; + +exports.__esModule = true; + +var _promise = require("../core-js/promise"); + +var _promise2 = _interopRequireDefault(_promise); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (fn) { + return function () { + var gen = fn.apply(this, arguments); + return new _promise2.default(function (resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + return _promise2.default.resolve(value).then(function (value) { + step("next", value); + }, function (err) { + step("throw", err); + }); + } + } + + return step("next"); + }); + }; +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/class-call-check.js b/node_modules/babel-runtime/helpers/class-call-check.js new file mode 100644 index 00000000..d4514f0a --- /dev/null +++ b/node_modules/babel-runtime/helpers/class-call-check.js @@ -0,0 +1 @@ +module.exports = require("./classCallCheck.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/classCallCheck.js b/node_modules/babel-runtime/helpers/classCallCheck.js new file mode 100644 index 00000000..63d6d8f3 --- /dev/null +++ b/node_modules/babel-runtime/helpers/classCallCheck.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/create-class.js b/node_modules/babel-runtime/helpers/create-class.js new file mode 100644 index 00000000..2699d23f --- /dev/null +++ b/node_modules/babel-runtime/helpers/create-class.js @@ -0,0 +1 @@ +module.exports = require("./createClass.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/createClass.js b/node_modules/babel-runtime/helpers/createClass.js new file mode 100644 index 00000000..bee484d6 --- /dev/null +++ b/node_modules/babel-runtime/helpers/createClass.js @@ -0,0 +1,27 @@ +"use strict"; + +exports.__esModule = true; + +var _defineProperty = require("../core-js/object/define-property"); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + 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; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/defaults.js b/node_modules/babel-runtime/helpers/defaults.js new file mode 100644 index 00000000..9a721cec --- /dev/null +++ b/node_modules/babel-runtime/helpers/defaults.js @@ -0,0 +1,32 @@ +"use strict"; + +exports.__esModule = true; + +var _defineProperty = require("../core-js/object/define-property"); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor"); + +var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); + +var _getOwnPropertyNames = require("../core-js/object/get-own-property-names"); + +var _getOwnPropertyNames2 = _interopRequireDefault(_getOwnPropertyNames); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (obj, defaults) { + var keys = (0, _getOwnPropertyNames2.default)(defaults); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = (0, _getOwnPropertyDescriptor2.default)(defaults, key); + + if (value && value.configurable && obj[key] === undefined) { + (0, _defineProperty2.default)(obj, key, value); + } + } + + return obj; +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/define-enumerable-properties.js b/node_modules/babel-runtime/helpers/define-enumerable-properties.js new file mode 100644 index 00000000..c60bbfc3 --- /dev/null +++ b/node_modules/babel-runtime/helpers/define-enumerable-properties.js @@ -0,0 +1 @@ +module.exports = require("./defineEnumerableProperties.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/define-property.js b/node_modules/babel-runtime/helpers/define-property.js new file mode 100644 index 00000000..a265eab9 --- /dev/null +++ b/node_modules/babel-runtime/helpers/define-property.js @@ -0,0 +1 @@ +module.exports = require("./defineProperty.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/defineEnumerableProperties.js b/node_modules/babel-runtime/helpers/defineEnumerableProperties.js new file mode 100644 index 00000000..503a1ab2 --- /dev/null +++ b/node_modules/babel-runtime/helpers/defineEnumerableProperties.js @@ -0,0 +1,20 @@ +"use strict"; + +exports.__esModule = true; + +var _defineProperty = require("../core-js/object/define-property"); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (obj, descs) { + for (var key in descs) { + var desc = descs[key]; + desc.configurable = desc.enumerable = true; + if ("value" in desc) desc.writable = true; + (0, _defineProperty2.default)(obj, key, desc); + } + + return obj; +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/defineProperty.js b/node_modules/babel-runtime/helpers/defineProperty.js new file mode 100644 index 00000000..b0f46d80 --- /dev/null +++ b/node_modules/babel-runtime/helpers/defineProperty.js @@ -0,0 +1,24 @@ +"use strict"; + +exports.__esModule = true; + +var _defineProperty = require("../core-js/object/define-property"); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (obj, key, value) { + if (key in obj) { + (0, _defineProperty2.default)(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/extends.js b/node_modules/babel-runtime/helpers/extends.js new file mode 100644 index 00000000..976aef1d --- /dev/null +++ b/node_modules/babel-runtime/helpers/extends.js @@ -0,0 +1,23 @@ +"use strict"; + +exports.__esModule = true; + +var _assign = require("../core-js/object/assign"); + +var _assign2 = _interopRequireDefault(_assign); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _assign2.default || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/get.js b/node_modules/babel-runtime/helpers/get.js new file mode 100644 index 00000000..38b79b76 --- /dev/null +++ b/node_modules/babel-runtime/helpers/get.js @@ -0,0 +1,38 @@ +"use strict"; + +exports.__esModule = true; + +var _getPrototypeOf = require("../core-js/object/get-prototype-of"); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor"); + +var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = (0, _getOwnPropertyDescriptor2.default)(object, property); + + if (desc === undefined) { + var parent = (0, _getPrototypeOf2.default)(object); + + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ("value" in desc) { + return desc.value; + } else { + var getter = desc.get; + + if (getter === undefined) { + return undefined; + } + + return getter.call(receiver); + } +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/inherits.js b/node_modules/babel-runtime/helpers/inherits.js new file mode 100644 index 00000000..ae8a92db --- /dev/null +++ b/node_modules/babel-runtime/helpers/inherits.js @@ -0,0 +1,33 @@ +"use strict"; + +exports.__esModule = true; + +var _setPrototypeOf = require("../core-js/object/set-prototype-of"); + +var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); + +var _create = require("../core-js/object/create"); + +var _create2 = _interopRequireDefault(_create); + +var _typeof2 = require("../helpers/typeof"); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); + } + + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/instanceof.js b/node_modules/babel-runtime/helpers/instanceof.js new file mode 100644 index 00000000..f2d90ecf --- /dev/null +++ b/node_modules/babel-runtime/helpers/instanceof.js @@ -0,0 +1,21 @@ +"use strict"; + +exports.__esModule = true; + +var _hasInstance = require("../core-js/symbol/has-instance"); + +var _hasInstance2 = _interopRequireDefault(_hasInstance); + +var _symbol = require("../core-js/symbol"); + +var _symbol2 = _interopRequireDefault(_symbol); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (left, right) { + if (right != null && typeof _symbol2.default !== "undefined" && right[_hasInstance2.default]) { + return right[_hasInstance2.default](left); + } else { + return left instanceof right; + } +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/interop-require-default.js b/node_modules/babel-runtime/helpers/interop-require-default.js new file mode 100644 index 00000000..10edad2c --- /dev/null +++ b/node_modules/babel-runtime/helpers/interop-require-default.js @@ -0,0 +1 @@ +module.exports = require("./interopRequireDefault.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/interop-require-wildcard.js b/node_modules/babel-runtime/helpers/interop-require-wildcard.js new file mode 100644 index 00000000..ae19e01e --- /dev/null +++ b/node_modules/babel-runtime/helpers/interop-require-wildcard.js @@ -0,0 +1 @@ +module.exports = require("./interopRequireWildcard.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/interopRequireDefault.js b/node_modules/babel-runtime/helpers/interopRequireDefault.js new file mode 100644 index 00000000..df808f60 --- /dev/null +++ b/node_modules/babel-runtime/helpers/interopRequireDefault.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/interopRequireWildcard.js b/node_modules/babel-runtime/helpers/interopRequireWildcard.js new file mode 100644 index 00000000..d95b6ac7 --- /dev/null +++ b/node_modules/babel-runtime/helpers/interopRequireWildcard.js @@ -0,0 +1,20 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + + newObj.default = obj; + return newObj; + } +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/jsx.js b/node_modules/babel-runtime/helpers/jsx.js new file mode 100644 index 00000000..b2164d05 --- /dev/null +++ b/node_modules/babel-runtime/helpers/jsx.js @@ -0,0 +1,56 @@ +"use strict"; + +exports.__esModule = true; + +var _for = require("../core-js/symbol/for"); + +var _for2 = _interopRequireDefault(_for); + +var _symbol = require("../core-js/symbol"); + +var _symbol2 = _interopRequireDefault(_symbol); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + var REACT_ELEMENT_TYPE = typeof _symbol2.default === "function" && _for2.default && (0, _for2.default)("react.element") || 0xeac7; + return function createRawReactElement(type, props, key, children) { + var defaultProps = type && type.defaultProps; + var childrenLength = arguments.length - 3; + + if (!props && childrenLength !== 0) { + props = {}; + } + + if (props && defaultProps) { + for (var propName in defaultProps) { + if (props[propName] === void 0) { + props[propName] = defaultProps[propName]; + } + } + } else if (!props) { + props = defaultProps || {}; + } + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 3]; + } + + props.children = childArray; + } + + return { + $$typeof: REACT_ELEMENT_TYPE, + type: type, + key: key === undefined ? null : '' + key, + ref: null, + props: props, + _owner: null + }; + }; +}(); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/new-arrow-check.js b/node_modules/babel-runtime/helpers/new-arrow-check.js new file mode 100644 index 00000000..6325419c --- /dev/null +++ b/node_modules/babel-runtime/helpers/new-arrow-check.js @@ -0,0 +1 @@ +module.exports = require("./newArrowCheck.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/newArrowCheck.js b/node_modules/babel-runtime/helpers/newArrowCheck.js new file mode 100644 index 00000000..c15ee5c3 --- /dev/null +++ b/node_modules/babel-runtime/helpers/newArrowCheck.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (innerThis, boundThis) { + if (innerThis !== boundThis) { + throw new TypeError("Cannot instantiate an arrow function"); + } +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/object-destructuring-empty.js b/node_modules/babel-runtime/helpers/object-destructuring-empty.js new file mode 100644 index 00000000..9c6ffef5 --- /dev/null +++ b/node_modules/babel-runtime/helpers/object-destructuring-empty.js @@ -0,0 +1 @@ +module.exports = require("./objectDestructuringEmpty.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/object-without-properties.js b/node_modules/babel-runtime/helpers/object-without-properties.js new file mode 100644 index 00000000..052b2078 --- /dev/null +++ b/node_modules/babel-runtime/helpers/object-without-properties.js @@ -0,0 +1 @@ +module.exports = require("./objectWithoutProperties.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/objectDestructuringEmpty.js b/node_modules/babel-runtime/helpers/objectDestructuringEmpty.js new file mode 100644 index 00000000..e2651c13 --- /dev/null +++ b/node_modules/babel-runtime/helpers/objectDestructuringEmpty.js @@ -0,0 +1,7 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (obj) { + if (obj == null) throw new TypeError("Cannot destructure undefined"); +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/objectWithoutProperties.js b/node_modules/babel-runtime/helpers/objectWithoutProperties.js new file mode 100644 index 00000000..e9f07e68 --- /dev/null +++ b/node_modules/babel-runtime/helpers/objectWithoutProperties.js @@ -0,0 +1,15 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (obj, keys) { + var target = {}; + + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + + return target; +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/possible-constructor-return.js b/node_modules/babel-runtime/helpers/possible-constructor-return.js new file mode 100644 index 00000000..09018d77 --- /dev/null +++ b/node_modules/babel-runtime/helpers/possible-constructor-return.js @@ -0,0 +1 @@ +module.exports = require("./possibleConstructorReturn.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/possibleConstructorReturn.js b/node_modules/babel-runtime/helpers/possibleConstructorReturn.js new file mode 100644 index 00000000..957f425d --- /dev/null +++ b/node_modules/babel-runtime/helpers/possibleConstructorReturn.js @@ -0,0 +1,17 @@ +"use strict"; + +exports.__esModule = true; + +var _typeof2 = require("../helpers/typeof"); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/self-global.js b/node_modules/babel-runtime/helpers/self-global.js new file mode 100644 index 00000000..c3d45f33 --- /dev/null +++ b/node_modules/babel-runtime/helpers/self-global.js @@ -0,0 +1 @@ +module.exports = require("./selfGlobal.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/selfGlobal.js b/node_modules/babel-runtime/helpers/selfGlobal.js new file mode 100644 index 00000000..378beb8e --- /dev/null +++ b/node_modules/babel-runtime/helpers/selfGlobal.js @@ -0,0 +1,4 @@ +"use strict"; + +exports.__esModule = true; +exports.default = typeof global === "undefined" ? self : global; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/set.js b/node_modules/babel-runtime/helpers/set.js new file mode 100644 index 00000000..8780efb6 --- /dev/null +++ b/node_modules/babel-runtime/helpers/set.js @@ -0,0 +1,35 @@ +"use strict"; + +exports.__esModule = true; + +var _getPrototypeOf = require("../core-js/object/get-prototype-of"); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor"); + +var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function set(object, property, value, receiver) { + var desc = (0, _getOwnPropertyDescriptor2.default)(object, property); + + if (desc === undefined) { + var parent = (0, _getPrototypeOf2.default)(object); + + if (parent !== null) { + set(parent, property, value, receiver); + } + } else if ("value" in desc && desc.writable) { + desc.value = value; + } else { + var setter = desc.set; + + if (setter !== undefined) { + setter.call(receiver, value); + } + } + + return value; +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/sliced-to-array-loose.js b/node_modules/babel-runtime/helpers/sliced-to-array-loose.js new file mode 100644 index 00000000..8bb56d33 --- /dev/null +++ b/node_modules/babel-runtime/helpers/sliced-to-array-loose.js @@ -0,0 +1 @@ +module.exports = require("./slicedToArrayLoose.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/sliced-to-array.js b/node_modules/babel-runtime/helpers/sliced-to-array.js new file mode 100644 index 00000000..28d7fd82 --- /dev/null +++ b/node_modules/babel-runtime/helpers/sliced-to-array.js @@ -0,0 +1 @@ +module.exports = require("./slicedToArray.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/slicedToArray.js b/node_modules/babel-runtime/helpers/slicedToArray.js new file mode 100644 index 00000000..de115124 --- /dev/null +++ b/node_modules/babel-runtime/helpers/slicedToArray.js @@ -0,0 +1,51 @@ +"use strict"; + +exports.__esModule = true; + +var _isIterable2 = require("../core-js/is-iterable"); + +var _isIterable3 = _interopRequireDefault(_isIterable2); + +var _getIterator2 = require("../core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if ((0, _isIterable3.default)(Object(arr))) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/slicedToArrayLoose.js b/node_modules/babel-runtime/helpers/slicedToArrayLoose.js new file mode 100644 index 00000000..012bbd85 --- /dev/null +++ b/node_modules/babel-runtime/helpers/slicedToArrayLoose.js @@ -0,0 +1,31 @@ +"use strict"; + +exports.__esModule = true; + +var _getIterator2 = require("../core-js/get-iterator"); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _isIterable2 = require("../core-js/is-iterable"); + +var _isIterable3 = _interopRequireDefault(_isIterable2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if ((0, _isIterable3.default)(Object(arr))) { + var _arr = []; + + for (var _iterator = (0, _getIterator3.default)(arr), _step; !(_step = _iterator.next()).done;) { + _arr.push(_step.value); + + if (i && _arr.length === i) break; + } + + return _arr; + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/tagged-template-literal-loose.js b/node_modules/babel-runtime/helpers/tagged-template-literal-loose.js new file mode 100644 index 00000000..8ffa3f71 --- /dev/null +++ b/node_modules/babel-runtime/helpers/tagged-template-literal-loose.js @@ -0,0 +1 @@ +module.exports = require("./taggedTemplateLiteralLoose.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/tagged-template-literal.js b/node_modules/babel-runtime/helpers/tagged-template-literal.js new file mode 100644 index 00000000..160a9178 --- /dev/null +++ b/node_modules/babel-runtime/helpers/tagged-template-literal.js @@ -0,0 +1 @@ +module.exports = require("./taggedTemplateLiteral.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/taggedTemplateLiteral.js b/node_modules/babel-runtime/helpers/taggedTemplateLiteral.js new file mode 100644 index 00000000..060dcf9c --- /dev/null +++ b/node_modules/babel-runtime/helpers/taggedTemplateLiteral.js @@ -0,0 +1,21 @@ +"use strict"; + +exports.__esModule = true; + +var _defineProperties = require("../core-js/object/define-properties"); + +var _defineProperties2 = _interopRequireDefault(_defineProperties); + +var _freeze = require("../core-js/object/freeze"); + +var _freeze2 = _interopRequireDefault(_freeze); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (strings, raw) { + return (0, _freeze2.default)((0, _defineProperties2.default)(strings, { + raw: { + value: (0, _freeze2.default)(raw) + } + })); +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/taggedTemplateLiteralLoose.js b/node_modules/babel-runtime/helpers/taggedTemplateLiteralLoose.js new file mode 100644 index 00000000..76c49309 --- /dev/null +++ b/node_modules/babel-runtime/helpers/taggedTemplateLiteralLoose.js @@ -0,0 +1,8 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (strings, raw) { + strings.raw = raw; + return strings; +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/temporal-ref.js b/node_modules/babel-runtime/helpers/temporal-ref.js new file mode 100644 index 00000000..cf2e4e45 --- /dev/null +++ b/node_modules/babel-runtime/helpers/temporal-ref.js @@ -0,0 +1 @@ +module.exports = require("./temporalRef.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/temporal-undefined.js b/node_modules/babel-runtime/helpers/temporal-undefined.js new file mode 100644 index 00000000..234fc339 --- /dev/null +++ b/node_modules/babel-runtime/helpers/temporal-undefined.js @@ -0,0 +1 @@ +module.exports = require("./temporalUndefined.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/temporalRef.js b/node_modules/babel-runtime/helpers/temporalRef.js new file mode 100644 index 00000000..49b8b247 --- /dev/null +++ b/node_modules/babel-runtime/helpers/temporalRef.js @@ -0,0 +1,11 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (val, name, undef) { + if (val === undef) { + throw new ReferenceError(name + " is not defined - temporal dead zone"); + } else { + return val; + } +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/temporalUndefined.js b/node_modules/babel-runtime/helpers/temporalUndefined.js new file mode 100644 index 00000000..4066de1d --- /dev/null +++ b/node_modules/babel-runtime/helpers/temporalUndefined.js @@ -0,0 +1,4 @@ +"use strict"; + +exports.__esModule = true; +exports.default = {}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/to-array.js b/node_modules/babel-runtime/helpers/to-array.js new file mode 100644 index 00000000..d89ee39a --- /dev/null +++ b/node_modules/babel-runtime/helpers/to-array.js @@ -0,0 +1 @@ +module.exports = require("./toArray.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/to-consumable-array.js b/node_modules/babel-runtime/helpers/to-consumable-array.js new file mode 100644 index 00000000..0aad718d --- /dev/null +++ b/node_modules/babel-runtime/helpers/to-consumable-array.js @@ -0,0 +1 @@ +module.exports = require("./toConsumableArray.js"); \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/toArray.js b/node_modules/babel-runtime/helpers/toArray.js new file mode 100644 index 00000000..8601a44e --- /dev/null +++ b/node_modules/babel-runtime/helpers/toArray.js @@ -0,0 +1,13 @@ +"use strict"; + +exports.__esModule = true; + +var _from = require("../core-js/array/from"); + +var _from2 = _interopRequireDefault(_from); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr) { + return Array.isArray(arr) ? arr : (0, _from2.default)(arr); +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/toConsumableArray.js b/node_modules/babel-runtime/helpers/toConsumableArray.js new file mode 100644 index 00000000..c4e34f51 --- /dev/null +++ b/node_modules/babel-runtime/helpers/toConsumableArray.js @@ -0,0 +1,21 @@ +"use strict"; + +exports.__esModule = true; + +var _from = require("../core-js/array/from"); + +var _from2 = _interopRequireDefault(_from); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } else { + return (0, _from2.default)(arr); + } +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/helpers/typeof.js b/node_modules/babel-runtime/helpers/typeof.js new file mode 100644 index 00000000..d22add80 --- /dev/null +++ b/node_modules/babel-runtime/helpers/typeof.js @@ -0,0 +1,21 @@ +"use strict"; + +exports.__esModule = true; + +var _iterator = require("../core-js/symbol/iterator"); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = require("../core-js/symbol"); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); +} : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; \ No newline at end of file diff --git a/node_modules/babel-runtime/package-lock.json b/node_modules/babel-runtime/package-lock.json new file mode 100644 index 00000000..78600f94 --- /dev/null +++ b/node_modules/babel-runtime/package-lock.json @@ -0,0 +1,232 @@ +{ + "name": "babel-runtime", + "version": "6.23.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "babel-code-frame": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz", + "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "6.25.0", + "babel-template": "6.25.0" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "6.25.0" + } + }, + "babel-plugin-transform-runtime": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz", + "integrity": "sha1-iEkNRGUC6puOfvsP4J7E2ZR5se4=", + "dev": true, + "requires": { + "babel-runtime": "6.25.0" + } + }, + "babel-runtime": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.25.0.tgz", + "integrity": "sha1-M7mOql1IK7AajRqmtDetKwGuxBw=", + "dev": true, + "requires": { + "core-js": "2.5.0" + } + }, + "babel-template": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.25.0.tgz", + "integrity": "sha1-ZlJBFmt8KqTGGdceGSlpVSsQwHE=", + "dev": true, + "requires": { + "babel-runtime": "6.25.0", + "babel-traverse": "6.25.0", + "babel-types": "6.25.0", + "babylon": "6.18.0", + "lodash": "4.17.4" + } + }, + "babel-traverse": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.25.0.tgz", + "integrity": "sha1-IldJfi/NGbie3BPEyROB+VEklvE=", + "dev": true, + "requires": { + "babel-code-frame": "6.22.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.25.0", + "babel-types": "6.25.0", + "babylon": "6.18.0", + "debug": "2.6.8", + "globals": "9.18.0", + "invariant": "2.2.2", + "lodash": "4.17.4" + } + }, + "babel-types": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.25.0.tgz", + "integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=", + "dev": true, + "requires": { + "babel-runtime": "6.25.0", + "esutils": "2.0.2", + "lodash": "4.17.4", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "core-js": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz", + "integrity": "sha1-VpwFCRi+ZIazg3VSAorgRmtxcIY=" + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "invariant": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "dev": true, + "requires": { + "loose-envify": "1.3.1" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, + "requires": { + "js-tokens": "3.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", + "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + } + } +} diff --git a/node_modules/babel-runtime/package.json b/node_modules/babel-runtime/package.json new file mode 100644 index 00000000..c17eb9a3 --- /dev/null +++ b/node_modules/babel-runtime/package.json @@ -0,0 +1,16 @@ +{ + "name": "babel-runtime", + "version": "6.26.0", + "description": "babel selfContained runtime", + "license": "MIT", + "repository": "https://github.com/babel/babel/tree/master/packages/babel-runtime", + "author": "Sebastian McKenzie ", + "dependencies": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + }, + "devDependencies": { + "babel-helpers": "^6.22.0", + "babel-plugin-transform-runtime": "^6.23.0" + } +} diff --git a/node_modules/babel-runtime/regenerator/index.js b/node_modules/babel-runtime/regenerator/index.js new file mode 100644 index 00000000..9fd4158a --- /dev/null +++ b/node_modules/babel-runtime/regenerator/index.js @@ -0,0 +1 @@ +module.exports = require("regenerator-runtime"); diff --git a/node_modules/bluebird/LICENSE b/node_modules/bluebird/LICENSE new file mode 100644 index 00000000..b24e6350 --- /dev/null +++ b/node_modules/bluebird/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-2018 Petka Antonov + +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/bluebird/README.md b/node_modules/bluebird/README.md new file mode 100644 index 00000000..0eb5b74a --- /dev/null +++ b/node_modules/bluebird/README.md @@ -0,0 +1,57 @@ + + Promises/A+ logo + + + +[![Build Status](https://travis-ci.org/petkaantonov/bluebird.svg?branch=master)](https://travis-ci.org/petkaantonov/bluebird) +[![coverage-98%](https://img.shields.io/badge/coverage-98%25-brightgreen.svg?style=flat)](http://petkaantonov.github.io/bluebird/coverage/debug/index.html) + +**Got a question?** Join us on [stackoverflow](http://stackoverflow.com/questions/tagged/bluebird), the [mailing list](https://groups.google.com/forum/#!forum/bluebird-js) or chat on [IRC](https://webchat.freenode.net/?channels=#promises) + +# Introduction + +Bluebird is a fully featured promise library with focus on innovative features and performance + +See the [**bluebird website**](http://bluebirdjs.com/docs/getting-started.html) for further documentation, references and instructions. See the [**API reference**](http://bluebirdjs.com/docs/api-reference.html) here. + +For bluebird 2.x documentation and files, see the [2.x tree](https://github.com/petkaantonov/bluebird/tree/2.x). + +### Note + +Promises in Node.js 10 are significantly faster than before. Bluebird still includes a lot of features like cancellation, iteration methods and warnings that native promises don't. If you are using Bluebird for performance rather than for those - please consider giving native promises a shot and running the benchmarks yourself. + +# Questions and issues + +The [github issue tracker](https://github.com/petkaantonov/bluebird/issues) is **_only_** for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`. + + + +## Thanks + +Thanks to BrowserStack for providing us with a free account which lets us support old browsers like IE8. + +# License + +The MIT License (MIT) + +Copyright (c) 2013-2017 Petka Antonov + +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/bluebird/changelog.md b/node_modules/bluebird/changelog.md new file mode 100644 index 00000000..73b2eb6c --- /dev/null +++ b/node_modules/bluebird/changelog.md @@ -0,0 +1 @@ +[http://bluebirdjs.com/docs/changelog.html](http://bluebirdjs.com/docs/changelog.html) diff --git a/node_modules/bluebird/js/browser/bluebird.core.js b/node_modules/bluebird/js/browser/bluebird.core.js new file mode 100644 index 00000000..bae7583d --- /dev/null +++ b/node_modules/bluebird/js/browser/bluebird.core.js @@ -0,0 +1,3824 @@ +/* @preserve + * The MIT License (MIT) + * + * Copyright (c) 2013-2018 Petka Antonov + * + * 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. + * + */ +/** + * bluebird build version 3.5.5 + * Features enabled: core + * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each +*/ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o 0) { + _drainQueueStep(queue); + } +} + +function _drainQueueStep(queue) { + var fn = queue.shift(); + if (typeof fn !== "function") { + fn._settlePromises(); + } else { + var receiver = queue.shift(); + var arg = queue.shift(); + fn.call(receiver, arg); + } +} + +Async.prototype._drainQueues = function () { + _drainQueue(this._normalQueue); + this._reset(); + this._haveDrainedQueues = true; + _drainQueue(this._lateQueue); +}; + +Async.prototype._queueTick = function () { + if (!this._isTickUsed) { + this._isTickUsed = true; + this._schedule(this.drainQueues); + } +}; + +Async.prototype._reset = function () { + this._isTickUsed = false; +}; + +module.exports = Async; +module.exports.firstLineError = firstLineError; + +},{"./queue":17,"./schedule":18,"./util":21}],2:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) { +var calledBind = false; +var rejectThis = function(_, e) { + this._reject(e); +}; + +var targetRejected = function(e, context) { + context.promiseRejectionQueued = true; + context.bindingPromise._then(rejectThis, rejectThis, null, this, e); +}; + +var bindingResolved = function(thisArg, context) { + if (((this._bitField & 50397184) === 0)) { + this._resolveCallback(context.target); + } +}; + +var bindingRejected = function(e, context) { + if (!context.promiseRejectionQueued) this._reject(e); +}; + +Promise.prototype.bind = function (thisArg) { + if (!calledBind) { + calledBind = true; + Promise.prototype._propagateFrom = debug.propagateFromFunction(); + Promise.prototype._boundValue = debug.boundValueFunction(); + } + var maybePromise = tryConvertToPromise(thisArg); + var ret = new Promise(INTERNAL); + ret._propagateFrom(this, 1); + var target = this._target(); + ret._setBoundTo(maybePromise); + if (maybePromise instanceof Promise) { + var context = { + promiseRejectionQueued: false, + promise: ret, + target: target, + bindingPromise: maybePromise + }; + target._then(INTERNAL, targetRejected, undefined, ret, context); + maybePromise._then( + bindingResolved, bindingRejected, undefined, ret, context); + ret._setOnCancel(maybePromise); + } else { + ret._resolveCallback(target); + } + return ret; +}; + +Promise.prototype._setBoundTo = function (obj) { + if (obj !== undefined) { + this._bitField = this._bitField | 2097152; + this._boundTo = obj; + } else { + this._bitField = this._bitField & (~2097152); + } +}; + +Promise.prototype._isBound = function () { + return (this._bitField & 2097152) === 2097152; +}; + +Promise.bind = function (thisArg, value) { + return Promise.resolve(value).bind(thisArg); +}; +}; + +},{}],3:[function(_dereq_,module,exports){ +"use strict"; +var old; +if (typeof Promise !== "undefined") old = Promise; +function noConflict() { + try { if (Promise === bluebird) Promise = old; } + catch (e) {} + return bluebird; +} +var bluebird = _dereq_("./promise")(); +bluebird.noConflict = noConflict; +module.exports = bluebird; + +},{"./promise":15}],4:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, PromiseArray, apiRejection, debug) { +var util = _dereq_("./util"); +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var async = Promise._async; + +Promise.prototype["break"] = Promise.prototype.cancel = function() { + if (!debug.cancellation()) return this._warn("cancellation is disabled"); + + var promise = this; + var child = promise; + while (promise._isCancellable()) { + if (!promise._cancelBy(child)) { + if (child._isFollowing()) { + child._followee().cancel(); + } else { + child._cancelBranched(); + } + break; + } + + var parent = promise._cancellationParent; + if (parent == null || !parent._isCancellable()) { + if (promise._isFollowing()) { + promise._followee().cancel(); + } else { + promise._cancelBranched(); + } + break; + } else { + if (promise._isFollowing()) promise._followee().cancel(); + promise._setWillBeCancelled(); + child = promise; + promise = parent; + } + } +}; + +Promise.prototype._branchHasCancelled = function() { + this._branchesRemainingToCancel--; +}; + +Promise.prototype._enoughBranchesHaveCancelled = function() { + return this._branchesRemainingToCancel === undefined || + this._branchesRemainingToCancel <= 0; +}; + +Promise.prototype._cancelBy = function(canceller) { + if (canceller === this) { + this._branchesRemainingToCancel = 0; + this._invokeOnCancel(); + return true; + } else { + this._branchHasCancelled(); + if (this._enoughBranchesHaveCancelled()) { + this._invokeOnCancel(); + return true; + } + } + return false; +}; + +Promise.prototype._cancelBranched = function() { + if (this._enoughBranchesHaveCancelled()) { + this._cancel(); + } +}; + +Promise.prototype._cancel = function() { + if (!this._isCancellable()) return; + this._setCancelled(); + async.invoke(this._cancelPromises, this, undefined); +}; + +Promise.prototype._cancelPromises = function() { + if (this._length() > 0) this._settlePromises(); +}; + +Promise.prototype._unsetOnCancel = function() { + this._onCancelField = undefined; +}; + +Promise.prototype._isCancellable = function() { + return this.isPending() && !this._isCancelled(); +}; + +Promise.prototype.isCancellable = function() { + return this.isPending() && !this.isCancelled(); +}; + +Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) { + if (util.isArray(onCancelCallback)) { + for (var i = 0; i < onCancelCallback.length; ++i) { + this._doInvokeOnCancel(onCancelCallback[i], internalOnly); + } + } else if (onCancelCallback !== undefined) { + if (typeof onCancelCallback === "function") { + if (!internalOnly) { + var e = tryCatch(onCancelCallback).call(this._boundValue()); + if (e === errorObj) { + this._attachExtraTrace(e.e); + async.throwLater(e.e); + } + } + } else { + onCancelCallback._resultCancelled(this); + } + } +}; + +Promise.prototype._invokeOnCancel = function() { + var onCancelCallback = this._onCancel(); + this._unsetOnCancel(); + async.invoke(this._doInvokeOnCancel, this, onCancelCallback); +}; + +Promise.prototype._invokeInternalOnCancel = function() { + if (this._isCancellable()) { + this._doInvokeOnCancel(this._onCancel(), true); + this._unsetOnCancel(); + } +}; + +Promise.prototype._resultCancelled = function() { + this.cancel(); +}; + +}; + +},{"./util":21}],5:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(NEXT_FILTER) { +var util = _dereq_("./util"); +var getKeys = _dereq_("./es5").keys; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; + +function catchFilter(instances, cb, promise) { + return function(e) { + var boundTo = promise._boundValue(); + predicateLoop: for (var i = 0; i < instances.length; ++i) { + var item = instances[i]; + + if (item === Error || + (item != null && item.prototype instanceof Error)) { + if (e instanceof item) { + return tryCatch(cb).call(boundTo, e); + } + } else if (typeof item === "function") { + var matchesPredicate = tryCatch(item).call(boundTo, e); + if (matchesPredicate === errorObj) { + return matchesPredicate; + } else if (matchesPredicate) { + return tryCatch(cb).call(boundTo, e); + } + } else if (util.isObject(e)) { + var keys = getKeys(item); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + if (item[key] != e[key]) { + continue predicateLoop; + } + } + return tryCatch(cb).call(boundTo, e); + } + } + return NEXT_FILTER; + }; +} + +return catchFilter; +}; + +},{"./es5":10,"./util":21}],6:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise) { +var longStackTraces = false; +var contextStack = []; + +Promise.prototype._promiseCreated = function() {}; +Promise.prototype._pushContext = function() {}; +Promise.prototype._popContext = function() {return null;}; +Promise._peekContext = Promise.prototype._peekContext = function() {}; + +function Context() { + this._trace = new Context.CapturedTrace(peekContext()); +} +Context.prototype._pushContext = function () { + if (this._trace !== undefined) { + this._trace._promiseCreated = null; + contextStack.push(this._trace); + } +}; + +Context.prototype._popContext = function () { + if (this._trace !== undefined) { + var trace = contextStack.pop(); + var ret = trace._promiseCreated; + trace._promiseCreated = null; + return ret; + } + return null; +}; + +function createContext() { + if (longStackTraces) return new Context(); +} + +function peekContext() { + var lastIndex = contextStack.length - 1; + if (lastIndex >= 0) { + return contextStack[lastIndex]; + } + return undefined; +} +Context.CapturedTrace = null; +Context.create = createContext; +Context.deactivateLongStackTraces = function() {}; +Context.activateLongStackTraces = function() { + var Promise_pushContext = Promise.prototype._pushContext; + var Promise_popContext = Promise.prototype._popContext; + var Promise_PeekContext = Promise._peekContext; + var Promise_peekContext = Promise.prototype._peekContext; + var Promise_promiseCreated = Promise.prototype._promiseCreated; + Context.deactivateLongStackTraces = function() { + Promise.prototype._pushContext = Promise_pushContext; + Promise.prototype._popContext = Promise_popContext; + Promise._peekContext = Promise_PeekContext; + Promise.prototype._peekContext = Promise_peekContext; + Promise.prototype._promiseCreated = Promise_promiseCreated; + longStackTraces = false; + }; + longStackTraces = true; + Promise.prototype._pushContext = Context.prototype._pushContext; + Promise.prototype._popContext = Context.prototype._popContext; + Promise._peekContext = Promise.prototype._peekContext = peekContext; + Promise.prototype._promiseCreated = function() { + var ctx = this._peekContext(); + if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this; + }; +}; +return Context; +}; + +},{}],7:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, Context) { +var getDomain = Promise._getDomain; +var async = Promise._async; +var Warning = _dereq_("./errors").Warning; +var util = _dereq_("./util"); +var es5 = _dereq_("./es5"); +var canAttachTrace = util.canAttachTrace; +var unhandledRejectionHandled; +var possiblyUnhandledRejection; +var bluebirdFramePattern = + /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/; +var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/; +var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/; +var stackFramePattern = null; +var formatStack = null; +var indentStackFrames = false; +var printWarning; +var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 && + (true || + util.env("BLUEBIRD_DEBUG") || + util.env("NODE_ENV") === "development")); + +var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 && + (debugging || util.env("BLUEBIRD_WARNINGS"))); + +var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 && + (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES"))); + +var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 && + (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN")); + +Promise.prototype.suppressUnhandledRejections = function() { + var target = this._target(); + target._bitField = ((target._bitField & (~1048576)) | + 524288); +}; + +Promise.prototype._ensurePossibleRejectionHandled = function () { + if ((this._bitField & 524288) !== 0) return; + this._setRejectionIsUnhandled(); + var self = this; + setTimeout(function() { + self._notifyUnhandledRejection(); + }, 1); +}; + +Promise.prototype._notifyUnhandledRejectionIsHandled = function () { + fireRejectionEvent("rejectionHandled", + unhandledRejectionHandled, undefined, this); +}; + +Promise.prototype._setReturnedNonUndefined = function() { + this._bitField = this._bitField | 268435456; +}; + +Promise.prototype._returnedNonUndefined = function() { + return (this._bitField & 268435456) !== 0; +}; + +Promise.prototype._notifyUnhandledRejection = function () { + if (this._isRejectionUnhandled()) { + var reason = this._settledValue(); + this._setUnhandledRejectionIsNotified(); + fireRejectionEvent("unhandledRejection", + possiblyUnhandledRejection, reason, this); + } +}; + +Promise.prototype._setUnhandledRejectionIsNotified = function () { + this._bitField = this._bitField | 262144; +}; + +Promise.prototype._unsetUnhandledRejectionIsNotified = function () { + this._bitField = this._bitField & (~262144); +}; + +Promise.prototype._isUnhandledRejectionNotified = function () { + return (this._bitField & 262144) > 0; +}; + +Promise.prototype._setRejectionIsUnhandled = function () { + this._bitField = this._bitField | 1048576; +}; + +Promise.prototype._unsetRejectionIsUnhandled = function () { + this._bitField = this._bitField & (~1048576); + if (this._isUnhandledRejectionNotified()) { + this._unsetUnhandledRejectionIsNotified(); + this._notifyUnhandledRejectionIsHandled(); + } +}; + +Promise.prototype._isRejectionUnhandled = function () { + return (this._bitField & 1048576) > 0; +}; + +Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) { + return warn(message, shouldUseOwnTrace, promise || this); +}; + +Promise.onPossiblyUnhandledRejection = function (fn) { + var domain = getDomain(); + possiblyUnhandledRejection = + typeof fn === "function" ? (domain === null ? + fn : util.domainBind(domain, fn)) + : undefined; +}; + +Promise.onUnhandledRejectionHandled = function (fn) { + var domain = getDomain(); + unhandledRejectionHandled = + typeof fn === "function" ? (domain === null ? + fn : util.domainBind(domain, fn)) + : undefined; +}; + +var disableLongStackTraces = function() {}; +Promise.longStackTraces = function () { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + if (!config.longStackTraces && longStackTracesIsSupported()) { + var Promise_captureStackTrace = Promise.prototype._captureStackTrace; + var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace; + var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace; + config.longStackTraces = true; + disableLongStackTraces = function() { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + Promise.prototype._captureStackTrace = Promise_captureStackTrace; + Promise.prototype._attachExtraTrace = Promise_attachExtraTrace; + Promise.prototype._dereferenceTrace = Promise_dereferenceTrace; + Context.deactivateLongStackTraces(); + async.enableTrampoline(); + config.longStackTraces = false; + }; + Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace; + Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace; + Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace; + Context.activateLongStackTraces(); + async.disableTrampolineIfNecessary(); + } +}; + +Promise.hasLongStackTraces = function () { + return config.longStackTraces && longStackTracesIsSupported(); +}; + +var fireDomEvent = (function() { + try { + if (typeof CustomEvent === "function") { + var event = new CustomEvent("CustomEvent"); + util.global.dispatchEvent(event); + return function(name, event) { + var eventData = { + detail: event, + cancelable: true + }; + es5.defineProperty( + eventData, "promise", {value: event.promise}); + es5.defineProperty(eventData, "reason", {value: event.reason}); + var domEvent = new CustomEvent(name.toLowerCase(), eventData); + return !util.global.dispatchEvent(domEvent); + }; + } else if (typeof Event === "function") { + var event = new Event("CustomEvent"); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = new Event(name.toLowerCase(), { + cancelable: true + }); + domEvent.detail = event; + es5.defineProperty(domEvent, "promise", {value: event.promise}); + es5.defineProperty(domEvent, "reason", {value: event.reason}); + return !util.global.dispatchEvent(domEvent); + }; + } else { + var event = document.createEvent("CustomEvent"); + event.initCustomEvent("testingtheevent", false, true, {}); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = document.createEvent("CustomEvent"); + domEvent.initCustomEvent(name.toLowerCase(), false, true, + event); + return !util.global.dispatchEvent(domEvent); + }; + } + } catch (e) {} + return function() { + return false; + }; +})(); + +var fireGlobalEvent = (function() { + if (util.isNode) { + return function() { + return process.emit.apply(process, arguments); + }; + } else { + if (!util.global) { + return function() { + return false; + }; + } + return function(name) { + var methodName = "on" + name.toLowerCase(); + var method = util.global[methodName]; + if (!method) return false; + method.apply(util.global, [].slice.call(arguments, 1)); + return true; + }; + } +})(); + +function generatePromiseLifecycleEventObject(name, promise) { + return {promise: promise}; +} + +var eventToObjectGenerator = { + promiseCreated: generatePromiseLifecycleEventObject, + promiseFulfilled: generatePromiseLifecycleEventObject, + promiseRejected: generatePromiseLifecycleEventObject, + promiseResolved: generatePromiseLifecycleEventObject, + promiseCancelled: generatePromiseLifecycleEventObject, + promiseChained: function(name, promise, child) { + return {promise: promise, child: child}; + }, + warning: function(name, warning) { + return {warning: warning}; + }, + unhandledRejection: function (name, reason, promise) { + return {reason: reason, promise: promise}; + }, + rejectionHandled: generatePromiseLifecycleEventObject +}; + +var activeFireEvent = function (name) { + var globalEventFired = false; + try { + globalEventFired = fireGlobalEvent.apply(null, arguments); + } catch (e) { + async.throwLater(e); + globalEventFired = true; + } + + var domEventFired = false; + try { + domEventFired = fireDomEvent(name, + eventToObjectGenerator[name].apply(null, arguments)); + } catch (e) { + async.throwLater(e); + domEventFired = true; + } + + return domEventFired || globalEventFired; +}; + +Promise.config = function(opts) { + opts = Object(opts); + if ("longStackTraces" in opts) { + if (opts.longStackTraces) { + Promise.longStackTraces(); + } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) { + disableLongStackTraces(); + } + } + if ("warnings" in opts) { + var warningsOption = opts.warnings; + config.warnings = !!warningsOption; + wForgottenReturn = config.warnings; + + if (util.isObject(warningsOption)) { + if ("wForgottenReturn" in warningsOption) { + wForgottenReturn = !!warningsOption.wForgottenReturn; + } + } + } + if ("cancellation" in opts && opts.cancellation && !config.cancellation) { + if (async.haveItemsQueued()) { + throw new Error( + "cannot enable cancellation after promises are in use"); + } + Promise.prototype._clearCancellationData = + cancellationClearCancellationData; + Promise.prototype._propagateFrom = cancellationPropagateFrom; + Promise.prototype._onCancel = cancellationOnCancel; + Promise.prototype._setOnCancel = cancellationSetOnCancel; + Promise.prototype._attachCancellationCallback = + cancellationAttachCancellationCallback; + Promise.prototype._execute = cancellationExecute; + propagateFromFunction = cancellationPropagateFrom; + config.cancellation = true; + } + if ("monitoring" in opts) { + if (opts.monitoring && !config.monitoring) { + config.monitoring = true; + Promise.prototype._fireEvent = activeFireEvent; + } else if (!opts.monitoring && config.monitoring) { + config.monitoring = false; + Promise.prototype._fireEvent = defaultFireEvent; + } + } + return Promise; +}; + +function defaultFireEvent() { return false; } + +Promise.prototype._fireEvent = defaultFireEvent; +Promise.prototype._execute = function(executor, resolve, reject) { + try { + executor(resolve, reject); + } catch (e) { + return e; + } +}; +Promise.prototype._onCancel = function () {}; +Promise.prototype._setOnCancel = function (handler) { ; }; +Promise.prototype._attachCancellationCallback = function(onCancel) { + ; +}; +Promise.prototype._captureStackTrace = function () {}; +Promise.prototype._attachExtraTrace = function () {}; +Promise.prototype._dereferenceTrace = function () {}; +Promise.prototype._clearCancellationData = function() {}; +Promise.prototype._propagateFrom = function (parent, flags) { + ; + ; +}; + +function cancellationExecute(executor, resolve, reject) { + var promise = this; + try { + executor(resolve, reject, function(onCancel) { + if (typeof onCancel !== "function") { + throw new TypeError("onCancel must be a function, got: " + + util.toString(onCancel)); + } + promise._attachCancellationCallback(onCancel); + }); + } catch (e) { + return e; + } +} + +function cancellationAttachCancellationCallback(onCancel) { + if (!this._isCancellable()) return this; + + var previousOnCancel = this._onCancel(); + if (previousOnCancel !== undefined) { + if (util.isArray(previousOnCancel)) { + previousOnCancel.push(onCancel); + } else { + this._setOnCancel([previousOnCancel, onCancel]); + } + } else { + this._setOnCancel(onCancel); + } +} + +function cancellationOnCancel() { + return this._onCancelField; +} + +function cancellationSetOnCancel(onCancel) { + this._onCancelField = onCancel; +} + +function cancellationClearCancellationData() { + this._cancellationParent = undefined; + this._onCancelField = undefined; +} + +function cancellationPropagateFrom(parent, flags) { + if ((flags & 1) !== 0) { + this._cancellationParent = parent; + var branchesRemainingToCancel = parent._branchesRemainingToCancel; + if (branchesRemainingToCancel === undefined) { + branchesRemainingToCancel = 0; + } + parent._branchesRemainingToCancel = branchesRemainingToCancel + 1; + } + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } +} + +function bindingPropagateFrom(parent, flags) { + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } +} +var propagateFromFunction = bindingPropagateFrom; + +function boundValueFunction() { + var ret = this._boundTo; + if (ret !== undefined) { + if (ret instanceof Promise) { + if (ret.isFulfilled()) { + return ret.value(); + } else { + return undefined; + } + } + } + return ret; +} + +function longStackTracesCaptureStackTrace() { + this._trace = new CapturedTrace(this._peekContext()); +} + +function longStackTracesAttachExtraTrace(error, ignoreSelf) { + if (canAttachTrace(error)) { + var trace = this._trace; + if (trace !== undefined) { + if (ignoreSelf) trace = trace._parent; + } + if (trace !== undefined) { + trace.attachExtraTrace(error); + } else if (!error.__stackCleaned__) { + var parsed = parseStackAndMessage(error); + util.notEnumerableProp(error, "stack", + parsed.message + "\n" + parsed.stack.join("\n")); + util.notEnumerableProp(error, "__stackCleaned__", true); + } + } +} + +function longStackTracesDereferenceTrace() { + this._trace = undefined; +} + +function checkForgottenReturns(returnValue, promiseCreated, name, promise, + parent) { + if (returnValue === undefined && promiseCreated !== null && + wForgottenReturn) { + if (parent !== undefined && parent._returnedNonUndefined()) return; + if ((promise._bitField & 65535) === 0) return; + + if (name) name = name + " "; + var handlerLine = ""; + var creatorLine = ""; + if (promiseCreated._trace) { + var traceLines = promiseCreated._trace.stack.split("\n"); + var stack = cleanStack(traceLines); + for (var i = stack.length - 1; i >= 0; --i) { + var line = stack[i]; + if (!nodeFramePattern.test(line)) { + var lineMatches = line.match(parseLinePattern); + if (lineMatches) { + handlerLine = "at " + lineMatches[1] + + ":" + lineMatches[2] + ":" + lineMatches[3] + " "; + } + break; + } + } + + if (stack.length > 0) { + var firstUserLine = stack[0]; + for (var i = 0; i < traceLines.length; ++i) { + + if (traceLines[i] === firstUserLine) { + if (i > 0) { + creatorLine = "\n" + traceLines[i - 1]; + } + break; + } + } + + } + } + var msg = "a promise was created in a " + name + + "handler " + handlerLine + "but was not returned from it, " + + "see http://goo.gl/rRqMUw" + + creatorLine; + promise._warn(msg, true, promiseCreated); + } +} + +function deprecated(name, replacement) { + var message = name + + " is deprecated and will be removed in a future version."; + if (replacement) message += " Use " + replacement + " instead."; + return warn(message); +} + +function warn(message, shouldUseOwnTrace, promise) { + if (!config.warnings) return; + var warning = new Warning(message); + var ctx; + if (shouldUseOwnTrace) { + promise._attachExtraTrace(warning); + } else if (config.longStackTraces && (ctx = Promise._peekContext())) { + ctx.attachExtraTrace(warning); + } else { + var parsed = parseStackAndMessage(warning); + warning.stack = parsed.message + "\n" + parsed.stack.join("\n"); + } + + if (!activeFireEvent("warning", warning)) { + formatAndLogError(warning, "", true); + } +} + +function reconstructStack(message, stacks) { + for (var i = 0; i < stacks.length - 1; ++i) { + stacks[i].push("From previous event:"); + stacks[i] = stacks[i].join("\n"); + } + if (i < stacks.length) { + stacks[i] = stacks[i].join("\n"); + } + return message + "\n" + stacks.join("\n"); +} + +function removeDuplicateOrEmptyJumps(stacks) { + for (var i = 0; i < stacks.length; ++i) { + if (stacks[i].length === 0 || + ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) { + stacks.splice(i, 1); + i--; + } + } +} + +function removeCommonRoots(stacks) { + var current = stacks[0]; + for (var i = 1; i < stacks.length; ++i) { + var prev = stacks[i]; + var currentLastIndex = current.length - 1; + var currentLastLine = current[currentLastIndex]; + var commonRootMeetPoint = -1; + + for (var j = prev.length - 1; j >= 0; --j) { + if (prev[j] === currentLastLine) { + commonRootMeetPoint = j; + break; + } + } + + for (var j = commonRootMeetPoint; j >= 0; --j) { + var line = prev[j]; + if (current[currentLastIndex] === line) { + current.pop(); + currentLastIndex--; + } else { + break; + } + } + current = prev; + } +} + +function cleanStack(stack) { + var ret = []; + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + var isTraceLine = " (No stack trace)" === line || + stackFramePattern.test(line); + var isInternalFrame = isTraceLine && shouldIgnore(line); + if (isTraceLine && !isInternalFrame) { + if (indentStackFrames && line.charAt(0) !== " ") { + line = " " + line; + } + ret.push(line); + } + } + return ret; +} + +function stackFramesAsArray(error) { + var stack = error.stack.replace(/\s+$/g, "").split("\n"); + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + if (" (No stack trace)" === line || stackFramePattern.test(line)) { + break; + } + } + if (i > 0 && error.name != "SyntaxError") { + stack = stack.slice(i); + } + return stack; +} + +function parseStackAndMessage(error) { + var stack = error.stack; + var message = error.toString(); + stack = typeof stack === "string" && stack.length > 0 + ? stackFramesAsArray(error) : [" (No stack trace)"]; + return { + message: message, + stack: error.name == "SyntaxError" ? stack : cleanStack(stack) + }; +} + +function formatAndLogError(error, title, isSoft) { + if (typeof console !== "undefined") { + var message; + if (util.isObject(error)) { + var stack = error.stack; + message = title + formatStack(stack, error); + } else { + message = title + String(error); + } + if (typeof printWarning === "function") { + printWarning(message, isSoft); + } else if (typeof console.log === "function" || + typeof console.log === "object") { + console.log(message); + } + } +} + +function fireRejectionEvent(name, localHandler, reason, promise) { + var localEventFired = false; + try { + if (typeof localHandler === "function") { + localEventFired = true; + if (name === "rejectionHandled") { + localHandler(promise); + } else { + localHandler(reason, promise); + } + } + } catch (e) { + async.throwLater(e); + } + + if (name === "unhandledRejection") { + if (!activeFireEvent(name, reason, promise) && !localEventFired) { + formatAndLogError(reason, "Unhandled rejection "); + } + } else { + activeFireEvent(name, promise); + } +} + +function formatNonError(obj) { + var str; + if (typeof obj === "function") { + str = "[function " + + (obj.name || "anonymous") + + "]"; + } else { + str = obj && typeof obj.toString === "function" + ? obj.toString() : util.toString(obj); + var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/; + if (ruselessToString.test(str)) { + try { + var newStr = JSON.stringify(obj); + str = newStr; + } + catch(e) { + + } + } + if (str.length === 0) { + str = "(empty array)"; + } + } + return ("(<" + snip(str) + ">, no stack trace)"); +} + +function snip(str) { + var maxChars = 41; + if (str.length < maxChars) { + return str; + } + return str.substr(0, maxChars - 3) + "..."; +} + +function longStackTracesIsSupported() { + return typeof captureStackTrace === "function"; +} + +var shouldIgnore = function() { return false; }; +var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/; +function parseLineInfo(line) { + var matches = line.match(parseLineInfoRegex); + if (matches) { + return { + fileName: matches[1], + line: parseInt(matches[2], 10) + }; + } +} + +function setBounds(firstLineError, lastLineError) { + if (!longStackTracesIsSupported()) return; + var firstStackLines = (firstLineError.stack || "").split("\n"); + var lastStackLines = (lastLineError.stack || "").split("\n"); + var firstIndex = -1; + var lastIndex = -1; + var firstFileName; + var lastFileName; + for (var i = 0; i < firstStackLines.length; ++i) { + var result = parseLineInfo(firstStackLines[i]); + if (result) { + firstFileName = result.fileName; + firstIndex = result.line; + break; + } + } + for (var i = 0; i < lastStackLines.length; ++i) { + var result = parseLineInfo(lastStackLines[i]); + if (result) { + lastFileName = result.fileName; + lastIndex = result.line; + break; + } + } + if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName || + firstFileName !== lastFileName || firstIndex >= lastIndex) { + return; + } + + shouldIgnore = function(line) { + if (bluebirdFramePattern.test(line)) return true; + var info = parseLineInfo(line); + if (info) { + if (info.fileName === firstFileName && + (firstIndex <= info.line && info.line <= lastIndex)) { + return true; + } + } + return false; + }; +} + +function CapturedTrace(parent) { + this._parent = parent; + this._promisesCreated = 0; + var length = this._length = 1 + (parent === undefined ? 0 : parent._length); + captureStackTrace(this, CapturedTrace); + if (length > 32) this.uncycle(); +} +util.inherits(CapturedTrace, Error); +Context.CapturedTrace = CapturedTrace; + +CapturedTrace.prototype.uncycle = function() { + var length = this._length; + if (length < 2) return; + var nodes = []; + var stackToIndex = {}; + + for (var i = 0, node = this; node !== undefined; ++i) { + nodes.push(node); + node = node._parent; + } + length = this._length = i; + for (var i = length - 1; i >= 0; --i) { + var stack = nodes[i].stack; + if (stackToIndex[stack] === undefined) { + stackToIndex[stack] = i; + } + } + for (var i = 0; i < length; ++i) { + var currentStack = nodes[i].stack; + var index = stackToIndex[currentStack]; + if (index !== undefined && index !== i) { + if (index > 0) { + nodes[index - 1]._parent = undefined; + nodes[index - 1]._length = 1; + } + nodes[i]._parent = undefined; + nodes[i]._length = 1; + var cycleEdgeNode = i > 0 ? nodes[i - 1] : this; + + if (index < length - 1) { + cycleEdgeNode._parent = nodes[index + 1]; + cycleEdgeNode._parent.uncycle(); + cycleEdgeNode._length = + cycleEdgeNode._parent._length + 1; + } else { + cycleEdgeNode._parent = undefined; + cycleEdgeNode._length = 1; + } + var currentChildLength = cycleEdgeNode._length + 1; + for (var j = i - 2; j >= 0; --j) { + nodes[j]._length = currentChildLength; + currentChildLength++; + } + return; + } + } +}; + +CapturedTrace.prototype.attachExtraTrace = function(error) { + if (error.__stackCleaned__) return; + this.uncycle(); + var parsed = parseStackAndMessage(error); + var message = parsed.message; + var stacks = [parsed.stack]; + + var trace = this; + while (trace !== undefined) { + stacks.push(cleanStack(trace.stack.split("\n"))); + trace = trace._parent; + } + removeCommonRoots(stacks); + removeDuplicateOrEmptyJumps(stacks); + util.notEnumerableProp(error, "stack", reconstructStack(message, stacks)); + util.notEnumerableProp(error, "__stackCleaned__", true); +}; + +var captureStackTrace = (function stackDetection() { + var v8stackFramePattern = /^\s*at\s*/; + var v8stackFormatter = function(stack, error) { + if (typeof stack === "string") return stack; + + if (error.name !== undefined && + error.message !== undefined) { + return error.toString(); + } + return formatNonError(error); + }; + + if (typeof Error.stackTraceLimit === "number" && + typeof Error.captureStackTrace === "function") { + Error.stackTraceLimit += 6; + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + var captureStackTrace = Error.captureStackTrace; + + shouldIgnore = function(line) { + return bluebirdFramePattern.test(line); + }; + return function(receiver, ignoreUntil) { + Error.stackTraceLimit += 6; + captureStackTrace(receiver, ignoreUntil); + Error.stackTraceLimit -= 6; + }; + } + var err = new Error(); + + if (typeof err.stack === "string" && + err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) { + stackFramePattern = /@/; + formatStack = v8stackFormatter; + indentStackFrames = true; + return function captureStackTrace(o) { + o.stack = new Error().stack; + }; + } + + var hasStackAfterThrow; + try { throw new Error(); } + catch(e) { + hasStackAfterThrow = ("stack" in e); + } + if (!("stack" in err) && hasStackAfterThrow && + typeof Error.stackTraceLimit === "number") { + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + return function captureStackTrace(o) { + Error.stackTraceLimit += 6; + try { throw new Error(); } + catch(e) { o.stack = e.stack; } + Error.stackTraceLimit -= 6; + }; + } + + formatStack = function(stack, error) { + if (typeof stack === "string") return stack; + + if ((typeof error === "object" || + typeof error === "function") && + error.name !== undefined && + error.message !== undefined) { + return error.toString(); + } + return formatNonError(error); + }; + + return null; + +})([]); + +if (typeof console !== "undefined" && typeof console.warn !== "undefined") { + printWarning = function (message) { + console.warn(message); + }; + if (util.isNode && process.stderr.isTTY) { + printWarning = function(message, isSoft) { + var color = isSoft ? "\u001b[33m" : "\u001b[31m"; + console.warn(color + message + "\u001b[0m\n"); + }; + } else if (!util.isNode && typeof (new Error().stack) === "string") { + printWarning = function(message, isSoft) { + console.warn("%c" + message, + isSoft ? "color: darkorange" : "color: red"); + }; + } +} + +var config = { + warnings: warnings, + longStackTraces: false, + cancellation: false, + monitoring: false +}; + +if (longStackTraces) Promise.longStackTraces(); + +return { + longStackTraces: function() { + return config.longStackTraces; + }, + warnings: function() { + return config.warnings; + }, + cancellation: function() { + return config.cancellation; + }, + monitoring: function() { + return config.monitoring; + }, + propagateFromFunction: function() { + return propagateFromFunction; + }, + boundValueFunction: function() { + return boundValueFunction; + }, + checkForgottenReturns: checkForgottenReturns, + setBounds: setBounds, + warn: warn, + deprecated: deprecated, + CapturedTrace: CapturedTrace, + fireDomEvent: fireDomEvent, + fireGlobalEvent: fireGlobalEvent +}; +}; + +},{"./errors":9,"./es5":10,"./util":21}],8:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise) { +function returner() { + return this.value; +} +function thrower() { + throw this.reason; +} + +Promise.prototype["return"] = +Promise.prototype.thenReturn = function (value) { + if (value instanceof Promise) value.suppressUnhandledRejections(); + return this._then( + returner, undefined, undefined, {value: value}, undefined); +}; + +Promise.prototype["throw"] = +Promise.prototype.thenThrow = function (reason) { + return this._then( + thrower, undefined, undefined, {reason: reason}, undefined); +}; + +Promise.prototype.catchThrow = function (reason) { + if (arguments.length <= 1) { + return this._then( + undefined, thrower, undefined, {reason: reason}, undefined); + } else { + var _reason = arguments[1]; + var handler = function() {throw _reason;}; + return this.caught(reason, handler); + } +}; + +Promise.prototype.catchReturn = function (value) { + if (arguments.length <= 1) { + if (value instanceof Promise) value.suppressUnhandledRejections(); + return this._then( + undefined, returner, undefined, {value: value}, undefined); + } else { + var _value = arguments[1]; + if (_value instanceof Promise) _value.suppressUnhandledRejections(); + var handler = function() {return _value;}; + return this.caught(value, handler); + } +}; +}; + +},{}],9:[function(_dereq_,module,exports){ +"use strict"; +var es5 = _dereq_("./es5"); +var Objectfreeze = es5.freeze; +var util = _dereq_("./util"); +var inherits = util.inherits; +var notEnumerableProp = util.notEnumerableProp; + +function subError(nameProperty, defaultMessage) { + function SubError(message) { + if (!(this instanceof SubError)) return new SubError(message); + notEnumerableProp(this, "message", + typeof message === "string" ? message : defaultMessage); + notEnumerableProp(this, "name", nameProperty); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + Error.call(this); + } + } + inherits(SubError, Error); + return SubError; +} + +var _TypeError, _RangeError; +var Warning = subError("Warning", "warning"); +var CancellationError = subError("CancellationError", "cancellation error"); +var TimeoutError = subError("TimeoutError", "timeout error"); +var AggregateError = subError("AggregateError", "aggregate error"); +try { + _TypeError = TypeError; + _RangeError = RangeError; +} catch(e) { + _TypeError = subError("TypeError", "type error"); + _RangeError = subError("RangeError", "range error"); +} + +var methods = ("join pop push shift unshift slice filter forEach some " + + "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" "); + +for (var i = 0; i < methods.length; ++i) { + if (typeof Array.prototype[methods[i]] === "function") { + AggregateError.prototype[methods[i]] = Array.prototype[methods[i]]; + } +} + +es5.defineProperty(AggregateError.prototype, "length", { + value: 0, + configurable: false, + writable: true, + enumerable: true +}); +AggregateError.prototype["isOperational"] = true; +var level = 0; +AggregateError.prototype.toString = function() { + var indent = Array(level * 4 + 1).join(" "); + var ret = "\n" + indent + "AggregateError of:" + "\n"; + level++; + indent = Array(level * 4 + 1).join(" "); + for (var i = 0; i < this.length; ++i) { + var str = this[i] === this ? "[Circular AggregateError]" : this[i] + ""; + var lines = str.split("\n"); + for (var j = 0; j < lines.length; ++j) { + lines[j] = indent + lines[j]; + } + str = lines.join("\n"); + ret += str + "\n"; + } + level--; + return ret; +}; + +function OperationalError(message) { + if (!(this instanceof OperationalError)) + return new OperationalError(message); + notEnumerableProp(this, "name", "OperationalError"); + notEnumerableProp(this, "message", message); + this.cause = message; + this["isOperational"] = true; + + if (message instanceof Error) { + notEnumerableProp(this, "message", message.message); + notEnumerableProp(this, "stack", message.stack); + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + +} +inherits(OperationalError, Error); + +var errorTypes = Error["__BluebirdErrorTypes__"]; +if (!errorTypes) { + errorTypes = Objectfreeze({ + CancellationError: CancellationError, + TimeoutError: TimeoutError, + OperationalError: OperationalError, + RejectionError: OperationalError, + AggregateError: AggregateError + }); + es5.defineProperty(Error, "__BluebirdErrorTypes__", { + value: errorTypes, + writable: false, + enumerable: false, + configurable: false + }); +} + +module.exports = { + Error: Error, + TypeError: _TypeError, + RangeError: _RangeError, + CancellationError: errorTypes.CancellationError, + OperationalError: errorTypes.OperationalError, + TimeoutError: errorTypes.TimeoutError, + AggregateError: errorTypes.AggregateError, + Warning: Warning +}; + +},{"./es5":10,"./util":21}],10:[function(_dereq_,module,exports){ +var isES5 = (function(){ + "use strict"; + return this === undefined; +})(); + +if (isES5) { + module.exports = { + freeze: Object.freeze, + defineProperty: Object.defineProperty, + getDescriptor: Object.getOwnPropertyDescriptor, + keys: Object.keys, + names: Object.getOwnPropertyNames, + getPrototypeOf: Object.getPrototypeOf, + isArray: Array.isArray, + isES5: isES5, + propertyIsWritable: function(obj, prop) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + return !!(!descriptor || descriptor.writable || descriptor.set); + } + }; +} else { + var has = {}.hasOwnProperty; + var str = {}.toString; + var proto = {}.constructor.prototype; + + var ObjectKeys = function (o) { + var ret = []; + for (var key in o) { + if (has.call(o, key)) { + ret.push(key); + } + } + return ret; + }; + + var ObjectGetDescriptor = function(o, key) { + return {value: o[key]}; + }; + + var ObjectDefineProperty = function (o, key, desc) { + o[key] = desc.value; + return o; + }; + + var ObjectFreeze = function (obj) { + return obj; + }; + + var ObjectGetPrototypeOf = function (obj) { + try { + return Object(obj).constructor.prototype; + } + catch (e) { + return proto; + } + }; + + var ArrayIsArray = function (obj) { + try { + return str.call(obj) === "[object Array]"; + } + catch(e) { + return false; + } + }; + + module.exports = { + isArray: ArrayIsArray, + keys: ObjectKeys, + names: ObjectKeys, + defineProperty: ObjectDefineProperty, + getDescriptor: ObjectGetDescriptor, + freeze: ObjectFreeze, + getPrototypeOf: ObjectGetPrototypeOf, + isES5: isES5, + propertyIsWritable: function() { + return true; + } + }; +} + +},{}],11:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) { +var util = _dereq_("./util"); +var CancellationError = Promise.CancellationError; +var errorObj = util.errorObj; +var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER); + +function PassThroughHandlerContext(promise, type, handler) { + this.promise = promise; + this.type = type; + this.handler = handler; + this.called = false; + this.cancelPromise = null; +} + +PassThroughHandlerContext.prototype.isFinallyHandler = function() { + return this.type === 0; +}; + +function FinallyHandlerCancelReaction(finallyHandler) { + this.finallyHandler = finallyHandler; +} + +FinallyHandlerCancelReaction.prototype._resultCancelled = function() { + checkCancel(this.finallyHandler); +}; + +function checkCancel(ctx, reason) { + if (ctx.cancelPromise != null) { + if (arguments.length > 1) { + ctx.cancelPromise._reject(reason); + } else { + ctx.cancelPromise._cancel(); + } + ctx.cancelPromise = null; + return true; + } + return false; +} + +function succeed() { + return finallyHandler.call(this, this.promise._target()._settledValue()); +} +function fail(reason) { + if (checkCancel(this, reason)) return; + errorObj.e = reason; + return errorObj; +} +function finallyHandler(reasonOrValue) { + var promise = this.promise; + var handler = this.handler; + + if (!this.called) { + this.called = true; + var ret = this.isFinallyHandler() + ? handler.call(promise._boundValue()) + : handler.call(promise._boundValue(), reasonOrValue); + if (ret === NEXT_FILTER) { + return ret; + } else if (ret !== undefined) { + promise._setReturnedNonUndefined(); + var maybePromise = tryConvertToPromise(ret, promise); + if (maybePromise instanceof Promise) { + if (this.cancelPromise != null) { + if (maybePromise._isCancelled()) { + var reason = + new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + errorObj.e = reason; + return errorObj; + } else if (maybePromise.isPending()) { + maybePromise._attachCancellationCallback( + new FinallyHandlerCancelReaction(this)); + } + } + return maybePromise._then( + succeed, fail, undefined, this, undefined); + } + } + } + + if (promise.isRejected()) { + checkCancel(this); + errorObj.e = reasonOrValue; + return errorObj; + } else { + checkCancel(this); + return reasonOrValue; + } +} + +Promise.prototype._passThrough = function(handler, type, success, fail) { + if (typeof handler !== "function") return this.then(); + return this._then(success, + fail, + undefined, + new PassThroughHandlerContext(this, type, handler), + undefined); +}; + +Promise.prototype.lastly = +Promise.prototype["finally"] = function (handler) { + return this._passThrough(handler, + 0, + finallyHandler, + finallyHandler); +}; + + +Promise.prototype.tap = function (handler) { + return this._passThrough(handler, 1, finallyHandler); +}; + +Promise.prototype.tapCatch = function (handlerOrPredicate) { + var len = arguments.length; + if(len === 1) { + return this._passThrough(handlerOrPredicate, + 1, + undefined, + finallyHandler); + } else { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util.isObject(item)) { + catchInstances[j++] = item; + } else { + return Promise.reject(new TypeError( + "tapCatch statement predicate: " + + "expecting an object but got " + util.classString(item) + )); + } + } + catchInstances.length = j; + var handler = arguments[i]; + return this._passThrough(catchFilter(catchInstances, handler, this), + 1, + undefined, + finallyHandler); + } + +}; + +return PassThroughHandlerContext; +}; + +},{"./catch_filter":5,"./util":21}],12:[function(_dereq_,module,exports){ +"use strict"; +module.exports = +function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, + getDomain) { +var util = _dereq_("./util"); +var canEvaluate = util.canEvaluate; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var reject; + +if (!true) { +if (canEvaluate) { + var thenCallback = function(i) { + return new Function("value", "holder", " \n\ + 'use strict'; \n\ + holder.pIndex = value; \n\ + holder.checkFulfillment(this); \n\ + ".replace(/Index/g, i)); + }; + + var promiseSetter = function(i) { + return new Function("promise", "holder", " \n\ + 'use strict'; \n\ + holder.pIndex = promise; \n\ + ".replace(/Index/g, i)); + }; + + var generateHolderClass = function(total) { + var props = new Array(total); + for (var i = 0; i < props.length; ++i) { + props[i] = "this.p" + (i+1); + } + var assignment = props.join(" = ") + " = null;"; + var cancellationCode= "var promise;\n" + props.map(function(prop) { + return " \n\ + promise = " + prop + "; \n\ + if (promise instanceof Promise) { \n\ + promise.cancel(); \n\ + } \n\ + "; + }).join("\n"); + var passedArguments = props.join(", "); + var name = "Holder$" + total; + + + var code = "return function(tryCatch, errorObj, Promise, async) { \n\ + 'use strict'; \n\ + function [TheName](fn) { \n\ + [TheProperties] \n\ + this.fn = fn; \n\ + this.asyncNeeded = true; \n\ + this.now = 0; \n\ + } \n\ + \n\ + [TheName].prototype._callFunction = function(promise) { \n\ + promise._pushContext(); \n\ + var ret = tryCatch(this.fn)([ThePassedArguments]); \n\ + promise._popContext(); \n\ + if (ret === errorObj) { \n\ + promise._rejectCallback(ret.e, false); \n\ + } else { \n\ + promise._resolveCallback(ret); \n\ + } \n\ + }; \n\ + \n\ + [TheName].prototype.checkFulfillment = function(promise) { \n\ + var now = ++this.now; \n\ + if (now === [TheTotal]) { \n\ + if (this.asyncNeeded) { \n\ + async.invoke(this._callFunction, this, promise); \n\ + } else { \n\ + this._callFunction(promise); \n\ + } \n\ + \n\ + } \n\ + }; \n\ + \n\ + [TheName].prototype._resultCancelled = function() { \n\ + [CancellationCode] \n\ + }; \n\ + \n\ + return [TheName]; \n\ + }(tryCatch, errorObj, Promise, async); \n\ + "; + + code = code.replace(/\[TheName\]/g, name) + .replace(/\[TheTotal\]/g, total) + .replace(/\[ThePassedArguments\]/g, passedArguments) + .replace(/\[TheProperties\]/g, assignment) + .replace(/\[CancellationCode\]/g, cancellationCode); + + return new Function("tryCatch", "errorObj", "Promise", "async", code) + (tryCatch, errorObj, Promise, async); + }; + + var holderClasses = []; + var thenCallbacks = []; + var promiseSetters = []; + + for (var i = 0; i < 8; ++i) { + holderClasses.push(generateHolderClass(i + 1)); + thenCallbacks.push(thenCallback(i + 1)); + promiseSetters.push(promiseSetter(i + 1)); + } + + reject = function (reason) { + this._reject(reason); + }; +}} + +Promise.join = function () { + var last = arguments.length - 1; + var fn; + if (last > 0 && typeof arguments[last] === "function") { + fn = arguments[last]; + if (!true) { + if (last <= 8 && canEvaluate) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + var HolderClass = holderClasses[last - 1]; + var holder = new HolderClass(fn); + var callbacks = thenCallbacks; + + for (var i = 0; i < last; ++i) { + var maybePromise = tryConvertToPromise(arguments[i], ret); + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + maybePromise._then(callbacks[i], reject, + undefined, ret, holder); + promiseSetters[i](maybePromise, holder); + holder.asyncNeeded = false; + } else if (((bitField & 33554432) !== 0)) { + callbacks[i].call(ret, + maybePromise._value(), holder); + } else if (((bitField & 16777216) !== 0)) { + ret._reject(maybePromise._reason()); + } else { + ret._cancel(); + } + } else { + callbacks[i].call(ret, maybePromise, holder); + } + } + + if (!ret._isFateSealed()) { + if (holder.asyncNeeded) { + var domain = getDomain(); + if (domain !== null) { + holder.fn = util.domainBind(domain, holder.fn); + } + } + ret._setAsyncGuaranteed(); + ret._setOnCancel(holder); + } + return ret; + } + } + } + var args = [].slice.call(arguments);; + if (fn) args.pop(); + var ret = new PromiseArray(args).promise(); + return fn !== undefined ? ret.spread(fn) : ret; +}; + +}; + +},{"./util":21}],13:[function(_dereq_,module,exports){ +"use strict"; +module.exports = +function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) { +var util = _dereq_("./util"); +var tryCatch = util.tryCatch; + +Promise.method = function (fn) { + if (typeof fn !== "function") { + throw new Promise.TypeError("expecting a function but got " + util.classString(fn)); + } + return function () { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._pushContext(); + var value = tryCatch(fn).apply(this, arguments); + var promiseCreated = ret._popContext(); + debug.checkForgottenReturns( + value, promiseCreated, "Promise.method", ret); + ret._resolveFromSyncValue(value); + return ret; + }; +}; + +Promise.attempt = Promise["try"] = function (fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._pushContext(); + var value; + if (arguments.length > 1) { + debug.deprecated("calling Promise.try with more than 1 argument"); + var arg = arguments[1]; + var ctx = arguments[2]; + value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg) + : tryCatch(fn).call(ctx, arg); + } else { + value = tryCatch(fn)(); + } + var promiseCreated = ret._popContext(); + debug.checkForgottenReturns( + value, promiseCreated, "Promise.try", ret); + ret._resolveFromSyncValue(value); + return ret; +}; + +Promise.prototype._resolveFromSyncValue = function (value) { + if (value === util.errorObj) { + this._rejectCallback(value.e, false); + } else { + this._resolveCallback(value, true); + } +}; +}; + +},{"./util":21}],14:[function(_dereq_,module,exports){ +"use strict"; +var util = _dereq_("./util"); +var maybeWrapAsError = util.maybeWrapAsError; +var errors = _dereq_("./errors"); +var OperationalError = errors.OperationalError; +var es5 = _dereq_("./es5"); + +function isUntypedError(obj) { + return obj instanceof Error && + es5.getPrototypeOf(obj) === Error.prototype; +} + +var rErrorKey = /^(?:name|message|stack|cause)$/; +function wrapAsOperationalError(obj) { + var ret; + if (isUntypedError(obj)) { + ret = new OperationalError(obj); + ret.name = obj.name; + ret.message = obj.message; + ret.stack = obj.stack; + var keys = es5.keys(obj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (!rErrorKey.test(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + util.markAsOriginatingFromRejection(obj); + return obj; +} + +function nodebackForPromise(promise, multiArgs) { + return function(err, value) { + if (promise === null) return; + if (err) { + var wrapped = wrapAsOperationalError(maybeWrapAsError(err)); + promise._attachExtraTrace(wrapped); + promise._reject(wrapped); + } else if (!multiArgs) { + promise._fulfill(value); + } else { + var args = [].slice.call(arguments, 1);; + promise._fulfill(args); + } + promise = null; + }; +} + +module.exports = nodebackForPromise; + +},{"./errors":9,"./es5":10,"./util":21}],15:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function() { +var makeSelfResolutionError = function () { + return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a"); +}; +var reflectHandler = function() { + return new Promise.PromiseInspection(this._target()); +}; +var apiRejection = function(msg) { + return Promise.reject(new TypeError(msg)); +}; +function Proxyable() {} +var UNDEFINED_BINDING = {}; +var util = _dereq_("./util"); + +var getDomain; +if (util.isNode) { + getDomain = function() { + var ret = process.domain; + if (ret === undefined) ret = null; + return ret; + }; +} else { + getDomain = function() { + return null; + }; +} +util.notEnumerableProp(Promise, "_getDomain", getDomain); + +var es5 = _dereq_("./es5"); +var Async = _dereq_("./async"); +var async = new Async(); +es5.defineProperty(Promise, "_async", {value: async}); +var errors = _dereq_("./errors"); +var TypeError = Promise.TypeError = errors.TypeError; +Promise.RangeError = errors.RangeError; +var CancellationError = Promise.CancellationError = errors.CancellationError; +Promise.TimeoutError = errors.TimeoutError; +Promise.OperationalError = errors.OperationalError; +Promise.RejectionError = errors.OperationalError; +Promise.AggregateError = errors.AggregateError; +var INTERNAL = function(){}; +var APPLY = {}; +var NEXT_FILTER = {}; +var tryConvertToPromise = _dereq_("./thenables")(Promise, INTERNAL); +var PromiseArray = + _dereq_("./promise_array")(Promise, INTERNAL, + tryConvertToPromise, apiRejection, Proxyable); +var Context = _dereq_("./context")(Promise); + /*jshint unused:false*/ +var createContext = Context.create; +var debug = _dereq_("./debuggability")(Promise, Context); +var CapturedTrace = debug.CapturedTrace; +var PassThroughHandlerContext = + _dereq_("./finally")(Promise, tryConvertToPromise, NEXT_FILTER); +var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER); +var nodebackForPromise = _dereq_("./nodeback"); +var errorObj = util.errorObj; +var tryCatch = util.tryCatch; +function check(self, executor) { + if (self == null || self.constructor !== Promise) { + throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + if (typeof executor !== "function") { + throw new TypeError("expecting a function but got " + util.classString(executor)); + } + +} + +function Promise(executor) { + if (executor !== INTERNAL) { + check(this, executor); + } + this._bitField = 0; + this._fulfillmentHandler0 = undefined; + this._rejectionHandler0 = undefined; + this._promise0 = undefined; + this._receiver0 = undefined; + this._resolveFromExecutor(executor); + this._promiseCreated(); + this._fireEvent("promiseCreated", this); +} + +Promise.prototype.toString = function () { + return "[object Promise]"; +}; + +Promise.prototype.caught = Promise.prototype["catch"] = function (fn) { + var len = arguments.length; + if (len > 1) { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util.isObject(item)) { + catchInstances[j++] = item; + } else { + return apiRejection("Catch statement predicate: " + + "expecting an object but got " + util.classString(item)); + } + } + catchInstances.length = j; + fn = arguments[i]; + + if (typeof fn !== "function") { + throw new TypeError("The last argument to .catch() " + + "must be a function, got " + util.toString(fn)); + } + return this.then(undefined, catchFilter(catchInstances, fn, this)); + } + return this.then(undefined, fn); +}; + +Promise.prototype.reflect = function () { + return this._then(reflectHandler, + reflectHandler, undefined, this, undefined); +}; + +Promise.prototype.then = function (didFulfill, didReject) { + if (debug.warnings() && arguments.length > 0 && + typeof didFulfill !== "function" && + typeof didReject !== "function") { + var msg = ".then() only accepts functions but was passed: " + + util.classString(didFulfill); + if (arguments.length > 1) { + msg += ", " + util.classString(didReject); + } + this._warn(msg); + } + return this._then(didFulfill, didReject, undefined, undefined, undefined); +}; + +Promise.prototype.done = function (didFulfill, didReject) { + var promise = + this._then(didFulfill, didReject, undefined, undefined, undefined); + promise._setIsFinal(); +}; + +Promise.prototype.spread = function (fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + return this.all()._then(fn, undefined, undefined, APPLY, undefined); +}; + +Promise.prototype.toJSON = function () { + var ret = { + isFulfilled: false, + isRejected: false, + fulfillmentValue: undefined, + rejectionReason: undefined + }; + if (this.isFulfilled()) { + ret.fulfillmentValue = this.value(); + ret.isFulfilled = true; + } else if (this.isRejected()) { + ret.rejectionReason = this.reason(); + ret.isRejected = true; + } + return ret; +}; + +Promise.prototype.all = function () { + if (arguments.length > 0) { + this._warn(".all() was passed arguments but it does not take any"); + } + return new PromiseArray(this).promise(); +}; + +Promise.prototype.error = function (fn) { + return this.caught(util.originatesFromRejection, fn); +}; + +Promise.getNewLibraryCopy = module.exports; + +Promise.is = function (val) { + return val instanceof Promise; +}; + +Promise.fromNode = Promise.fromCallback = function(fn) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs + : false; + var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs)); + if (result === errorObj) { + ret._rejectCallback(result.e, true); + } + if (!ret._isFateSealed()) ret._setAsyncGuaranteed(); + return ret; +}; + +Promise.all = function (promises) { + return new PromiseArray(promises).promise(); +}; + +Promise.cast = function (obj) { + var ret = tryConvertToPromise(obj); + if (!(ret instanceof Promise)) { + ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._setFulfilled(); + ret._rejectionHandler0 = obj; + } + return ret; +}; + +Promise.resolve = Promise.fulfilled = Promise.cast; + +Promise.reject = Promise.rejected = function (reason) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._rejectCallback(reason, true); + return ret; +}; + +Promise.setScheduler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + return async.setScheduler(fn); +}; + +Promise.prototype._then = function ( + didFulfill, + didReject, + _, receiver, + internalData +) { + var haveInternalData = internalData !== undefined; + var promise = haveInternalData ? internalData : new Promise(INTERNAL); + var target = this._target(); + var bitField = target._bitField; + + if (!haveInternalData) { + promise._propagateFrom(this, 3); + promise._captureStackTrace(); + if (receiver === undefined && + ((this._bitField & 2097152) !== 0)) { + if (!((bitField & 50397184) === 0)) { + receiver = this._boundValue(); + } else { + receiver = target === this ? undefined : this._boundTo; + } + } + this._fireEvent("promiseChained", this, promise); + } + + var domain = getDomain(); + if (!((bitField & 50397184) === 0)) { + var handler, value, settler = target._settlePromiseCtx; + if (((bitField & 33554432) !== 0)) { + value = target._rejectionHandler0; + handler = didFulfill; + } else if (((bitField & 16777216) !== 0)) { + value = target._fulfillmentHandler0; + handler = didReject; + target._unsetRejectionIsUnhandled(); + } else { + settler = target._settlePromiseLateCancellationObserver; + value = new CancellationError("late cancellation observer"); + target._attachExtraTrace(value); + handler = didReject; + } + + async.invoke(settler, target, { + handler: domain === null ? handler + : (typeof handler === "function" && + util.domainBind(domain, handler)), + promise: promise, + receiver: receiver, + value: value + }); + } else { + target._addCallbacks(didFulfill, didReject, promise, receiver, domain); + } + + return promise; +}; + +Promise.prototype._length = function () { + return this._bitField & 65535; +}; + +Promise.prototype._isFateSealed = function () { + return (this._bitField & 117506048) !== 0; +}; + +Promise.prototype._isFollowing = function () { + return (this._bitField & 67108864) === 67108864; +}; + +Promise.prototype._setLength = function (len) { + this._bitField = (this._bitField & -65536) | + (len & 65535); +}; + +Promise.prototype._setFulfilled = function () { + this._bitField = this._bitField | 33554432; + this._fireEvent("promiseFulfilled", this); +}; + +Promise.prototype._setRejected = function () { + this._bitField = this._bitField | 16777216; + this._fireEvent("promiseRejected", this); +}; + +Promise.prototype._setFollowing = function () { + this._bitField = this._bitField | 67108864; + this._fireEvent("promiseResolved", this); +}; + +Promise.prototype._setIsFinal = function () { + this._bitField = this._bitField | 4194304; +}; + +Promise.prototype._isFinal = function () { + return (this._bitField & 4194304) > 0; +}; + +Promise.prototype._unsetCancelled = function() { + this._bitField = this._bitField & (~65536); +}; + +Promise.prototype._setCancelled = function() { + this._bitField = this._bitField | 65536; + this._fireEvent("promiseCancelled", this); +}; + +Promise.prototype._setWillBeCancelled = function() { + this._bitField = this._bitField | 8388608; +}; + +Promise.prototype._setAsyncGuaranteed = function() { + if (async.hasCustomScheduler()) return; + this._bitField = this._bitField | 134217728; +}; + +Promise.prototype._receiverAt = function (index) { + var ret = index === 0 ? this._receiver0 : this[ + index * 4 - 4 + 3]; + if (ret === UNDEFINED_BINDING) { + return undefined; + } else if (ret === undefined && this._isBound()) { + return this._boundValue(); + } + return ret; +}; + +Promise.prototype._promiseAt = function (index) { + return this[ + index * 4 - 4 + 2]; +}; + +Promise.prototype._fulfillmentHandlerAt = function (index) { + return this[ + index * 4 - 4 + 0]; +}; + +Promise.prototype._rejectionHandlerAt = function (index) { + return this[ + index * 4 - 4 + 1]; +}; + +Promise.prototype._boundValue = function() {}; + +Promise.prototype._migrateCallback0 = function (follower) { + var bitField = follower._bitField; + var fulfill = follower._fulfillmentHandler0; + var reject = follower._rejectionHandler0; + var promise = follower._promise0; + var receiver = follower._receiverAt(0); + if (receiver === undefined) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); +}; + +Promise.prototype._migrateCallbackAt = function (follower, index) { + var fulfill = follower._fulfillmentHandlerAt(index); + var reject = follower._rejectionHandlerAt(index); + var promise = follower._promiseAt(index); + var receiver = follower._receiverAt(index); + if (receiver === undefined) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); +}; + +Promise.prototype._addCallbacks = function ( + fulfill, + reject, + promise, + receiver, + domain +) { + var index = this._length(); + + if (index >= 65535 - 4) { + index = 0; + this._setLength(0); + } + + if (index === 0) { + this._promise0 = promise; + this._receiver0 = receiver; + if (typeof fulfill === "function") { + this._fulfillmentHandler0 = + domain === null ? fulfill : util.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this._rejectionHandler0 = + domain === null ? reject : util.domainBind(domain, reject); + } + } else { + var base = index * 4 - 4; + this[base + 2] = promise; + this[base + 3] = receiver; + if (typeof fulfill === "function") { + this[base + 0] = + domain === null ? fulfill : util.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this[base + 1] = + domain === null ? reject : util.domainBind(domain, reject); + } + } + this._setLength(index + 1); + return index; +}; + +Promise.prototype._proxy = function (proxyable, arg) { + this._addCallbacks(undefined, undefined, arg, proxyable, null); +}; + +Promise.prototype._resolveCallback = function(value, shouldBind) { + if (((this._bitField & 117506048) !== 0)) return; + if (value === this) + return this._rejectCallback(makeSelfResolutionError(), false); + var maybePromise = tryConvertToPromise(value, this); + if (!(maybePromise instanceof Promise)) return this._fulfill(value); + + if (shouldBind) this._propagateFrom(maybePromise, 2); + + var promise = maybePromise._target(); + + if (promise === this) { + this._reject(makeSelfResolutionError()); + return; + } + + var bitField = promise._bitField; + if (((bitField & 50397184) === 0)) { + var len = this._length(); + if (len > 0) promise._migrateCallback0(this); + for (var i = 1; i < len; ++i) { + promise._migrateCallbackAt(this, i); + } + this._setFollowing(); + this._setLength(0); + this._setFollowee(promise); + } else if (((bitField & 33554432) !== 0)) { + this._fulfill(promise._value()); + } else if (((bitField & 16777216) !== 0)) { + this._reject(promise._reason()); + } else { + var reason = new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + this._reject(reason); + } +}; + +Promise.prototype._rejectCallback = +function(reason, synchronous, ignoreNonErrorWarnings) { + var trace = util.ensureErrorObject(reason); + var hasStack = trace === reason; + if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) { + var message = "a promise was rejected with a non-error: " + + util.classString(reason); + this._warn(message, true); + } + this._attachExtraTrace(trace, synchronous ? hasStack : false); + this._reject(reason); +}; + +Promise.prototype._resolveFromExecutor = function (executor) { + if (executor === INTERNAL) return; + var promise = this; + this._captureStackTrace(); + this._pushContext(); + var synchronous = true; + var r = this._execute(executor, function(value) { + promise._resolveCallback(value); + }, function (reason) { + promise._rejectCallback(reason, synchronous); + }); + synchronous = false; + this._popContext(); + + if (r !== undefined) { + promise._rejectCallback(r, true); + } +}; + +Promise.prototype._settlePromiseFromHandler = function ( + handler, receiver, value, promise +) { + var bitField = promise._bitField; + if (((bitField & 65536) !== 0)) return; + promise._pushContext(); + var x; + if (receiver === APPLY) { + if (!value || typeof value.length !== "number") { + x = errorObj; + x.e = new TypeError("cannot .spread() a non-array: " + + util.classString(value)); + } else { + x = tryCatch(handler).apply(this._boundValue(), value); + } + } else { + x = tryCatch(handler).call(receiver, value); + } + var promiseCreated = promise._popContext(); + bitField = promise._bitField; + if (((bitField & 65536) !== 0)) return; + + if (x === NEXT_FILTER) { + promise._reject(value); + } else if (x === errorObj) { + promise._rejectCallback(x.e, false); + } else { + debug.checkForgottenReturns(x, promiseCreated, "", promise, this); + promise._resolveCallback(x); + } +}; + +Promise.prototype._target = function() { + var ret = this; + while (ret._isFollowing()) ret = ret._followee(); + return ret; +}; + +Promise.prototype._followee = function() { + return this._rejectionHandler0; +}; + +Promise.prototype._setFollowee = function(promise) { + this._rejectionHandler0 = promise; +}; + +Promise.prototype._settlePromise = function(promise, handler, receiver, value) { + var isPromise = promise instanceof Promise; + var bitField = this._bitField; + var asyncGuaranteed = ((bitField & 134217728) !== 0); + if (((bitField & 65536) !== 0)) { + if (isPromise) promise._invokeInternalOnCancel(); + + if (receiver instanceof PassThroughHandlerContext && + receiver.isFinallyHandler()) { + receiver.cancelPromise = promise; + if (tryCatch(handler).call(receiver, value) === errorObj) { + promise._reject(errorObj.e); + } + } else if (handler === reflectHandler) { + promise._fulfill(reflectHandler.call(receiver)); + } else if (receiver instanceof Proxyable) { + receiver._promiseCancelled(promise); + } else if (isPromise || promise instanceof PromiseArray) { + promise._cancel(); + } else { + receiver.cancel(); + } + } else if (typeof handler === "function") { + if (!isPromise) { + handler.call(receiver, value, promise); + } else { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (receiver instanceof Proxyable) { + if (!receiver._isResolved()) { + if (((bitField & 33554432) !== 0)) { + receiver._promiseFulfilled(value, promise); + } else { + receiver._promiseRejected(value, promise); + } + } + } else if (isPromise) { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + if (((bitField & 33554432) !== 0)) { + promise._fulfill(value); + } else { + promise._reject(value); + } + } +}; + +Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) { + var handler = ctx.handler; + var promise = ctx.promise; + var receiver = ctx.receiver; + var value = ctx.value; + if (typeof handler === "function") { + if (!(promise instanceof Promise)) { + handler.call(receiver, value, promise); + } else { + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (promise instanceof Promise) { + promise._reject(value); + } +}; + +Promise.prototype._settlePromiseCtx = function(ctx) { + this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value); +}; + +Promise.prototype._settlePromise0 = function(handler, value, bitField) { + var promise = this._promise0; + var receiver = this._receiverAt(0); + this._promise0 = undefined; + this._receiver0 = undefined; + this._settlePromise(promise, handler, receiver, value); +}; + +Promise.prototype._clearCallbackDataAtIndex = function(index) { + var base = index * 4 - 4; + this[base + 2] = + this[base + 3] = + this[base + 0] = + this[base + 1] = undefined; +}; + +Promise.prototype._fulfill = function (value) { + var bitField = this._bitField; + if (((bitField & 117506048) >>> 16)) return; + if (value === this) { + var err = makeSelfResolutionError(); + this._attachExtraTrace(err); + return this._reject(err); + } + this._setFulfilled(); + this._rejectionHandler0 = value; + + if ((bitField & 65535) > 0) { + if (((bitField & 134217728) !== 0)) { + this._settlePromises(); + } else { + async.settlePromises(this); + } + this._dereferenceTrace(); + } +}; + +Promise.prototype._reject = function (reason) { + var bitField = this._bitField; + if (((bitField & 117506048) >>> 16)) return; + this._setRejected(); + this._fulfillmentHandler0 = reason; + + if (this._isFinal()) { + return async.fatalError(reason, util.isNode); + } + + if ((bitField & 65535) > 0) { + async.settlePromises(this); + } else { + this._ensurePossibleRejectionHandled(); + } +}; + +Promise.prototype._fulfillPromises = function (len, value) { + for (var i = 1; i < len; i++) { + var handler = this._fulfillmentHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, value); + } +}; + +Promise.prototype._rejectPromises = function (len, reason) { + for (var i = 1; i < len; i++) { + var handler = this._rejectionHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, reason); + } +}; + +Promise.prototype._settlePromises = function () { + var bitField = this._bitField; + var len = (bitField & 65535); + + if (len > 0) { + if (((bitField & 16842752) !== 0)) { + var reason = this._fulfillmentHandler0; + this._settlePromise0(this._rejectionHandler0, reason, bitField); + this._rejectPromises(len, reason); + } else { + var value = this._rejectionHandler0; + this._settlePromise0(this._fulfillmentHandler0, value, bitField); + this._fulfillPromises(len, value); + } + this._setLength(0); + } + this._clearCancellationData(); +}; + +Promise.prototype._settledValue = function() { + var bitField = this._bitField; + if (((bitField & 33554432) !== 0)) { + return this._rejectionHandler0; + } else if (((bitField & 16777216) !== 0)) { + return this._fulfillmentHandler0; + } +}; + +if (typeof Symbol !== "undefined" && Symbol.toStringTag) { + es5.defineProperty(Promise.prototype, Symbol.toStringTag, { + get: function () { + return "Object"; + } + }); +} + +function deferResolve(v) {this.promise._resolveCallback(v);} +function deferReject(v) {this.promise._rejectCallback(v, false);} + +Promise.defer = Promise.pending = function() { + debug.deprecated("Promise.defer", "new Promise"); + var promise = new Promise(INTERNAL); + return { + promise: promise, + resolve: deferResolve, + reject: deferReject + }; +}; + +util.notEnumerableProp(Promise, + "_makeSelfResolutionError", + makeSelfResolutionError); + +_dereq_("./method")(Promise, INTERNAL, tryConvertToPromise, apiRejection, + debug); +_dereq_("./bind")(Promise, INTERNAL, tryConvertToPromise, debug); +_dereq_("./cancel")(Promise, PromiseArray, apiRejection, debug); +_dereq_("./direct_resolve")(Promise); +_dereq_("./synchronous_inspection")(Promise); +_dereq_("./join")( + Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain); +Promise.Promise = Promise; +Promise.version = "3.5.5"; + + util.toFastProperties(Promise); + util.toFastProperties(Promise.prototype); + function fillTypes(value) { + var p = new Promise(INTERNAL); + p._fulfillmentHandler0 = value; + p._rejectionHandler0 = value; + p._promise0 = value; + p._receiver0 = value; + } + // Complete slack tracking, opt out of field-type tracking and + // stabilize map + fillTypes({a: 1}); + fillTypes({b: 2}); + fillTypes({c: 3}); + fillTypes(1); + fillTypes(function(){}); + fillTypes(undefined); + fillTypes(false); + fillTypes(new Promise(INTERNAL)); + debug.setBounds(Async.firstLineError, util.lastLineError); + return Promise; + +}; + +},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21}],16:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL, tryConvertToPromise, + apiRejection, Proxyable) { +var util = _dereq_("./util"); +var isArray = util.isArray; + +function toResolutionValue(val) { + switch(val) { + case -2: return []; + case -3: return {}; + case -6: return new Map(); + } +} + +function PromiseArray(values) { + var promise = this._promise = new Promise(INTERNAL); + if (values instanceof Promise) { + promise._propagateFrom(values, 3); + } + promise._setOnCancel(this); + this._values = values; + this._length = 0; + this._totalResolved = 0; + this._init(undefined, -2); +} +util.inherits(PromiseArray, Proxyable); + +PromiseArray.prototype.length = function () { + return this._length; +}; + +PromiseArray.prototype.promise = function () { + return this._promise; +}; + +PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) { + var values = tryConvertToPromise(this._values, this._promise); + if (values instanceof Promise) { + values = values._target(); + var bitField = values._bitField; + ; + this._values = values; + + if (((bitField & 50397184) === 0)) { + this._promise._setAsyncGuaranteed(); + return values._then( + init, + this._reject, + undefined, + this, + resolveValueIfEmpty + ); + } else if (((bitField & 33554432) !== 0)) { + values = values._value(); + } else if (((bitField & 16777216) !== 0)) { + return this._reject(values._reason()); + } else { + return this._cancel(); + } + } + values = util.asArray(values); + if (values === null) { + var err = apiRejection( + "expecting an array or an iterable object but got " + util.classString(values)).reason(); + this._promise._rejectCallback(err, false); + return; + } + + if (values.length === 0) { + if (resolveValueIfEmpty === -5) { + this._resolveEmptyArray(); + } + else { + this._resolve(toResolutionValue(resolveValueIfEmpty)); + } + return; + } + this._iterate(values); +}; + +PromiseArray.prototype._iterate = function(values) { + var len = this.getActualLength(values.length); + this._length = len; + this._values = this.shouldCopyValues() ? new Array(len) : this._values; + var result = this._promise; + var isResolved = false; + var bitField = null; + for (var i = 0; i < len; ++i) { + var maybePromise = tryConvertToPromise(values[i], result); + + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + bitField = maybePromise._bitField; + } else { + bitField = null; + } + + if (isResolved) { + if (bitField !== null) { + maybePromise.suppressUnhandledRejections(); + } + } else if (bitField !== null) { + if (((bitField & 50397184) === 0)) { + maybePromise._proxy(this, i); + this._values[i] = maybePromise; + } else if (((bitField & 33554432) !== 0)) { + isResolved = this._promiseFulfilled(maybePromise._value(), i); + } else if (((bitField & 16777216) !== 0)) { + isResolved = this._promiseRejected(maybePromise._reason(), i); + } else { + isResolved = this._promiseCancelled(i); + } + } else { + isResolved = this._promiseFulfilled(maybePromise, i); + } + } + if (!isResolved) result._setAsyncGuaranteed(); +}; + +PromiseArray.prototype._isResolved = function () { + return this._values === null; +}; + +PromiseArray.prototype._resolve = function (value) { + this._values = null; + this._promise._fulfill(value); +}; + +PromiseArray.prototype._cancel = function() { + if (this._isResolved() || !this._promise._isCancellable()) return; + this._values = null; + this._promise._cancel(); +}; + +PromiseArray.prototype._reject = function (reason) { + this._values = null; + this._promise._rejectCallback(reason, false); +}; + +PromiseArray.prototype._promiseFulfilled = function (value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; +}; + +PromiseArray.prototype._promiseCancelled = function() { + this._cancel(); + return true; +}; + +PromiseArray.prototype._promiseRejected = function (reason) { + this._totalResolved++; + this._reject(reason); + return true; +}; + +PromiseArray.prototype._resultCancelled = function() { + if (this._isResolved()) return; + var values = this._values; + this._cancel(); + if (values instanceof Promise) { + values.cancel(); + } else { + for (var i = 0; i < values.length; ++i) { + if (values[i] instanceof Promise) { + values[i].cancel(); + } + } + } +}; + +PromiseArray.prototype.shouldCopyValues = function () { + return true; +}; + +PromiseArray.prototype.getActualLength = function (len) { + return len; +}; + +return PromiseArray; +}; + +},{"./util":21}],17:[function(_dereq_,module,exports){ +"use strict"; +function arrayMove(src, srcIndex, dst, dstIndex, len) { + for (var j = 0; j < len; ++j) { + dst[j + dstIndex] = src[j + srcIndex]; + src[j + srcIndex] = void 0; + } +} + +function Queue(capacity) { + this._capacity = capacity; + this._length = 0; + this._front = 0; +} + +Queue.prototype._willBeOverCapacity = function (size) { + return this._capacity < size; +}; + +Queue.prototype._pushOne = function (arg) { + var length = this.length(); + this._checkCapacity(length + 1); + var i = (this._front + length) & (this._capacity - 1); + this[i] = arg; + this._length = length + 1; +}; + +Queue.prototype.push = function (fn, receiver, arg) { + var length = this.length() + 3; + if (this._willBeOverCapacity(length)) { + this._pushOne(fn); + this._pushOne(receiver); + this._pushOne(arg); + return; + } + var j = this._front + length - 3; + this._checkCapacity(length); + var wrapMask = this._capacity - 1; + this[(j + 0) & wrapMask] = fn; + this[(j + 1) & wrapMask] = receiver; + this[(j + 2) & wrapMask] = arg; + this._length = length; +}; + +Queue.prototype.shift = function () { + var front = this._front, + ret = this[front]; + + this[front] = undefined; + this._front = (front + 1) & (this._capacity - 1); + this._length--; + return ret; +}; + +Queue.prototype.length = function () { + return this._length; +}; + +Queue.prototype._checkCapacity = function (size) { + if (this._capacity < size) { + this._resizeTo(this._capacity << 1); + } +}; + +Queue.prototype._resizeTo = function (capacity) { + var oldCapacity = this._capacity; + this._capacity = capacity; + var front = this._front; + var length = this._length; + var moveItemsCount = (front + length) & (oldCapacity - 1); + arrayMove(this, 0, this, oldCapacity, moveItemsCount); +}; + +module.exports = Queue; + +},{}],18:[function(_dereq_,module,exports){ +"use strict"; +var util = _dereq_("./util"); +var schedule; +var noAsyncScheduler = function() { + throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a"); +}; +var NativePromise = util.getNativePromise(); +if (util.isNode && typeof MutationObserver === "undefined") { + var GlobalSetImmediate = global.setImmediate; + var ProcessNextTick = process.nextTick; + schedule = util.isRecentNode + ? function(fn) { GlobalSetImmediate.call(global, fn); } + : function(fn) { ProcessNextTick.call(process, fn); }; +} else if (typeof NativePromise === "function" && + typeof NativePromise.resolve === "function") { + var nativePromise = NativePromise.resolve(); + schedule = function(fn) { + nativePromise.then(fn); + }; +} else if ((typeof MutationObserver !== "undefined") && + !(typeof window !== "undefined" && + window.navigator && + (window.navigator.standalone || window.cordova)) && + ("classList" in document.documentElement)) { + schedule = (function() { + var div = document.createElement("div"); + var opts = {attributes: true}; + var toggleScheduled = false; + var div2 = document.createElement("div"); + var o2 = new MutationObserver(function() { + div.classList.toggle("foo"); + toggleScheduled = false; + }); + o2.observe(div2, opts); + + var scheduleToggle = function() { + if (toggleScheduled) return; + toggleScheduled = true; + div2.classList.toggle("foo"); + }; + + return function schedule(fn) { + var o = new MutationObserver(function() { + o.disconnect(); + fn(); + }); + o.observe(div, opts); + scheduleToggle(); + }; + })(); +} else if (typeof setImmediate !== "undefined") { + schedule = function (fn) { + setImmediate(fn); + }; +} else if (typeof setTimeout !== "undefined") { + schedule = function (fn) { + setTimeout(fn, 0); + }; +} else { + schedule = noAsyncScheduler; +} +module.exports = schedule; + +},{"./util":21}],19:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise) { +function PromiseInspection(promise) { + if (promise !== undefined) { + promise = promise._target(); + this._bitField = promise._bitField; + this._settledValueField = promise._isFateSealed() + ? promise._settledValue() : undefined; + } + else { + this._bitField = 0; + this._settledValueField = undefined; + } +} + +PromiseInspection.prototype._settledValue = function() { + return this._settledValueField; +}; + +var value = PromiseInspection.prototype.value = function () { + if (!this.isFulfilled()) { + throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + return this._settledValue(); +}; + +var reason = PromiseInspection.prototype.error = +PromiseInspection.prototype.reason = function () { + if (!this.isRejected()) { + throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + return this._settledValue(); +}; + +var isFulfilled = PromiseInspection.prototype.isFulfilled = function() { + return (this._bitField & 33554432) !== 0; +}; + +var isRejected = PromiseInspection.prototype.isRejected = function () { + return (this._bitField & 16777216) !== 0; +}; + +var isPending = PromiseInspection.prototype.isPending = function () { + return (this._bitField & 50397184) === 0; +}; + +var isResolved = PromiseInspection.prototype.isResolved = function () { + return (this._bitField & 50331648) !== 0; +}; + +PromiseInspection.prototype.isCancelled = function() { + return (this._bitField & 8454144) !== 0; +}; + +Promise.prototype.__isCancelled = function() { + return (this._bitField & 65536) === 65536; +}; + +Promise.prototype._isCancelled = function() { + return this._target().__isCancelled(); +}; + +Promise.prototype.isCancelled = function() { + return (this._target()._bitField & 8454144) !== 0; +}; + +Promise.prototype.isPending = function() { + return isPending.call(this._target()); +}; + +Promise.prototype.isRejected = function() { + return isRejected.call(this._target()); +}; + +Promise.prototype.isFulfilled = function() { + return isFulfilled.call(this._target()); +}; + +Promise.prototype.isResolved = function() { + return isResolved.call(this._target()); +}; + +Promise.prototype.value = function() { + return value.call(this._target()); +}; + +Promise.prototype.reason = function() { + var target = this._target(); + target._unsetRejectionIsUnhandled(); + return reason.call(target); +}; + +Promise.prototype._value = function() { + return this._settledValue(); +}; + +Promise.prototype._reason = function() { + this._unsetRejectionIsUnhandled(); + return this._settledValue(); +}; + +Promise.PromiseInspection = PromiseInspection; +}; + +},{}],20:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var util = _dereq_("./util"); +var errorObj = util.errorObj; +var isObject = util.isObject; + +function tryConvertToPromise(obj, context) { + if (isObject(obj)) { + if (obj instanceof Promise) return obj; + var then = getThen(obj); + if (then === errorObj) { + if (context) context._pushContext(); + var ret = Promise.reject(then.e); + if (context) context._popContext(); + return ret; + } else if (typeof then === "function") { + if (isAnyBluebirdPromise(obj)) { + var ret = new Promise(INTERNAL); + obj._then( + ret._fulfill, + ret._reject, + undefined, + ret, + null + ); + return ret; + } + return doThenable(obj, then, context); + } + } + return obj; +} + +function doGetThen(obj) { + return obj.then; +} + +function getThen(obj) { + try { + return doGetThen(obj); + } catch (e) { + errorObj.e = e; + return errorObj; + } +} + +var hasProp = {}.hasOwnProperty; +function isAnyBluebirdPromise(obj) { + try { + return hasProp.call(obj, "_promise0"); + } catch (e) { + return false; + } +} + +function doThenable(x, then, context) { + var promise = new Promise(INTERNAL); + var ret = promise; + if (context) context._pushContext(); + promise._captureStackTrace(); + if (context) context._popContext(); + var synchronous = true; + var result = util.tryCatch(then).call(x, resolve, reject); + synchronous = false; + + if (promise && result === errorObj) { + promise._rejectCallback(result.e, true, true); + promise = null; + } + + function resolve(value) { + if (!promise) return; + promise._resolveCallback(value); + promise = null; + } + + function reject(reason) { + if (!promise) return; + promise._rejectCallback(reason, synchronous, true); + promise = null; + } + return ret; +} + +return tryConvertToPromise; +}; + +},{"./util":21}],21:[function(_dereq_,module,exports){ +"use strict"; +var es5 = _dereq_("./es5"); +var canEvaluate = typeof navigator == "undefined"; + +var errorObj = {e: {}}; +var tryCatchTarget; +var globalObject = typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + typeof global !== "undefined" ? global : + this !== undefined ? this : null; + +function tryCatcher() { + try { + var target = tryCatchTarget; + tryCatchTarget = null; + return target.apply(this, arguments); + } catch (e) { + errorObj.e = e; + return errorObj; + } +} +function tryCatch(fn) { + tryCatchTarget = fn; + return tryCatcher; +} + +var inherits = function(Child, Parent) { + var hasProp = {}.hasOwnProperty; + + function T() { + this.constructor = Child; + this.constructor$ = Parent; + for (var propertyName in Parent.prototype) { + if (hasProp.call(Parent.prototype, propertyName) && + propertyName.charAt(propertyName.length-1) !== "$" + ) { + this[propertyName + "$"] = Parent.prototype[propertyName]; + } + } + } + T.prototype = Parent.prototype; + Child.prototype = new T(); + return Child.prototype; +}; + + +function isPrimitive(val) { + return val == null || val === true || val === false || + typeof val === "string" || typeof val === "number"; + +} + +function isObject(value) { + return typeof value === "function" || + typeof value === "object" && value !== null; +} + +function maybeWrapAsError(maybeError) { + if (!isPrimitive(maybeError)) return maybeError; + + return new Error(safeToString(maybeError)); +} + +function withAppended(target, appendee) { + var len = target.length; + var ret = new Array(len + 1); + var i; + for (i = 0; i < len; ++i) { + ret[i] = target[i]; + } + ret[i] = appendee; + return ret; +} + +function getDataPropertyOrDefault(obj, key, defaultValue) { + if (es5.isES5) { + var desc = Object.getOwnPropertyDescriptor(obj, key); + + if (desc != null) { + return desc.get == null && desc.set == null + ? desc.value + : defaultValue; + } + } else { + return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined; + } +} + +function notEnumerableProp(obj, name, value) { + if (isPrimitive(obj)) return obj; + var descriptor = { + value: value, + configurable: true, + enumerable: false, + writable: true + }; + es5.defineProperty(obj, name, descriptor); + return obj; +} + +function thrower(r) { + throw r; +} + +var inheritedDataKeys = (function() { + var excludedPrototypes = [ + Array.prototype, + Object.prototype, + Function.prototype + ]; + + var isExcludedProto = function(val) { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (excludedPrototypes[i] === val) { + return true; + } + } + return false; + }; + + if (es5.isES5) { + var getKeys = Object.getOwnPropertyNames; + return function(obj) { + var ret = []; + var visitedKeys = Object.create(null); + while (obj != null && !isExcludedProto(obj)) { + var keys; + try { + keys = getKeys(obj); + } catch (e) { + return ret; + } + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (visitedKeys[key]) continue; + visitedKeys[key] = true; + var desc = Object.getOwnPropertyDescriptor(obj, key); + if (desc != null && desc.get == null && desc.set == null) { + ret.push(key); + } + } + obj = es5.getPrototypeOf(obj); + } + return ret; + }; + } else { + var hasProp = {}.hasOwnProperty; + return function(obj) { + if (isExcludedProto(obj)) return []; + var ret = []; + + /*jshint forin:false */ + enumeration: for (var key in obj) { + if (hasProp.call(obj, key)) { + ret.push(key); + } else { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (hasProp.call(excludedPrototypes[i], key)) { + continue enumeration; + } + } + ret.push(key); + } + } + return ret; + }; + } + +})(); + +var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/; +function isClass(fn) { + try { + if (typeof fn === "function") { + var keys = es5.names(fn.prototype); + + var hasMethods = es5.isES5 && keys.length > 1; + var hasMethodsOtherThanConstructor = keys.length > 0 && + !(keys.length === 1 && keys[0] === "constructor"); + var hasThisAssignmentAndStaticMethods = + thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0; + + if (hasMethods || hasMethodsOtherThanConstructor || + hasThisAssignmentAndStaticMethods) { + return true; + } + } + return false; + } catch (e) { + return false; + } +} + +function toFastProperties(obj) { + /*jshint -W027,-W055,-W031*/ + function FakeConstructor() {} + FakeConstructor.prototype = obj; + var receiver = new FakeConstructor(); + function ic() { + return typeof receiver.foo; + } + ic(); + ic(); + return obj; + eval(obj); +} + +var rident = /^[a-z$_][a-z$_0-9]*$/i; +function isIdentifier(str) { + return rident.test(str); +} + +function filledRange(count, prefix, suffix) { + var ret = new Array(count); + for(var i = 0; i < count; ++i) { + ret[i] = prefix + i + suffix; + } + return ret; +} + +function safeToString(obj) { + try { + return obj + ""; + } catch (e) { + return "[no string representation]"; + } +} + +function isError(obj) { + return obj instanceof Error || + (obj !== null && + typeof obj === "object" && + typeof obj.message === "string" && + typeof obj.name === "string"); +} + +function markAsOriginatingFromRejection(e) { + try { + notEnumerableProp(e, "isOperational", true); + } + catch(ignore) {} +} + +function originatesFromRejection(e) { + if (e == null) return false; + return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) || + e["isOperational"] === true); +} + +function canAttachTrace(obj) { + return isError(obj) && es5.propertyIsWritable(obj, "stack"); +} + +var ensureErrorObject = (function() { + if (!("stack" in new Error())) { + return function(value) { + if (canAttachTrace(value)) return value; + try {throw new Error(safeToString(value));} + catch(err) {return err;} + }; + } else { + return function(value) { + if (canAttachTrace(value)) return value; + return new Error(safeToString(value)); + }; + } +})(); + +function classString(obj) { + return {}.toString.call(obj); +} + +function copyDescriptors(from, to, filter) { + var keys = es5.names(from); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (filter(key)) { + try { + es5.defineProperty(to, key, es5.getDescriptor(from, key)); + } catch (ignore) {} + } + } +} + +var asArray = function(v) { + if (es5.isArray(v)) { + return v; + } + return null; +}; + +if (typeof Symbol !== "undefined" && Symbol.iterator) { + var ArrayFrom = typeof Array.from === "function" ? function(v) { + return Array.from(v); + } : function(v) { + var ret = []; + var it = v[Symbol.iterator](); + var itResult; + while (!((itResult = it.next()).done)) { + ret.push(itResult.value); + } + return ret; + }; + + asArray = function(v) { + if (es5.isArray(v)) { + return v; + } else if (v != null && typeof v[Symbol.iterator] === "function") { + return ArrayFrom(v); + } + return null; + }; +} + +var isNode = typeof process !== "undefined" && + classString(process).toLowerCase() === "[object process]"; + +var hasEnvVariables = typeof process !== "undefined" && + typeof process.env !== "undefined"; + +function env(key) { + return hasEnvVariables ? process.env[key] : undefined; +} + +function getNativePromise() { + if (typeof Promise === "function") { + try { + var promise = new Promise(function(){}); + if ({}.toString.call(promise) === "[object Promise]") { + return Promise; + } + } catch (e) {} + } +} + +function domainBind(self, cb) { + return self.bind(cb); +} + +var ret = { + isClass: isClass, + isIdentifier: isIdentifier, + inheritedDataKeys: inheritedDataKeys, + getDataPropertyOrDefault: getDataPropertyOrDefault, + thrower: thrower, + isArray: es5.isArray, + asArray: asArray, + notEnumerableProp: notEnumerableProp, + isPrimitive: isPrimitive, + isObject: isObject, + isError: isError, + canEvaluate: canEvaluate, + errorObj: errorObj, + tryCatch: tryCatch, + inherits: inherits, + withAppended: withAppended, + maybeWrapAsError: maybeWrapAsError, + toFastProperties: toFastProperties, + filledRange: filledRange, + toString: safeToString, + canAttachTrace: canAttachTrace, + ensureErrorObject: ensureErrorObject, + originatesFromRejection: originatesFromRejection, + markAsOriginatingFromRejection: markAsOriginatingFromRejection, + classString: classString, + copyDescriptors: copyDescriptors, + hasDevTools: typeof chrome !== "undefined" && chrome && + typeof chrome.loadTimes === "function", + isNode: isNode, + hasEnvVariables: hasEnvVariables, + env: env, + global: globalObject, + getNativePromise: getNativePromise, + domainBind: domainBind +}; +ret.isRecentNode = ret.isNode && (function() { + var version; + if (process.versions && process.versions.node) { + version = process.versions.node.split(".").map(Number); + } else if (process.version) { + version = process.version.split(".").map(Number); + } + return (version[0] === 0 && version[1] > 10) || (version[0] > 0); +})(); + +if (ret.isNode) ret.toFastProperties(process); + +try {throw new Error(); } catch (e) {ret.lastLineError = e;} +module.exports = ret; + +},{"./es5":10}]},{},[3])(3) +}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file diff --git a/node_modules/bluebird/js/browser/bluebird.core.min.js b/node_modules/bluebird/js/browser/bluebird.core.min.js new file mode 100644 index 00000000..7091d9fa --- /dev/null +++ b/node_modules/bluebird/js/browser/bluebird.core.min.js @@ -0,0 +1,31 @@ +/* @preserve + * The MIT License (MIT) + * + * Copyright (c) 2013-2018 Petka Antonov + * + * 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. + * + */ +/** + * bluebird build version 3.5.5 + * Features enabled: core + * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each +*/ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(a,s){if(!e[a]){if(!t[a]){var c="function"==typeof _dereq_&&_dereq_;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a0;)c(t)}function c(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}var l;try{throw new Error}catch(u){l=u}var p=t("./schedule"),f=t("./queue"),h=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){h.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},h.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?a.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=a),r.prototype._drainQueues=function(){s(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,s(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=l},{"./queue":17,"./schedule":18,"./util":21}],2:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var f={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,a,void 0,u,f),l._then(s,c,void 0,u,f),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],3:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":15}],4:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],7:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+H.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function a(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?H.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function s(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function f(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function h(){this._trace=new x(this._peekContext())}function d(t,e){if(V(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=k(t);H.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),H.notEnumerableProp(t,"__stackCleaned__",!0)}}}function _(){this._trace=void 0}function v(t,e,n,r,i){if(void 0===t&&null!==e&&J){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),c=w(s),l=c.length-1;l>=0;--l){var u=c[l];if(!q.test(u)){var p=u.match(G);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var f=c[0],l=0;l0&&(a="\n"+s[l-1]);break}}var h="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,e)}}function y(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),g(n)}function g(t,n,r){if(st.warnings){var i,o=new I(t);if(n)r._attachExtraTrace(o);else if(st.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var a=k(o);o.stack=a.message+"\n"+a.stack.join("\n")}nt("warning",o)||j(o,"",!0)}}function m(t,e){for(var n=0;n=0;--s)if(r[s]===o){a=s;break}for(var s=a;s>=0;--s){var c=r[s];if(e[i]!==c)break;e.pop(),i--}e=r}}function w(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function k(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?E(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:w(e)}}function j(t,e,n){if("undefined"!=typeof console){var r;if(H.isObject(t)){var i=t.stack;r=e+W(i,t)}else r=e+String(t);"function"==typeof L?L(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function F(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){U.throwLater(o)}"unhandledRejection"===t?nt(t,n,r)||i||j(n,"Unhandled rejection "):nt(t,r)}function T(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():H.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+P(e)+">, no stack trace)"}function P(t){var e=41;return t.lengtha||0>s||!n||!r||n!==r||a>=s||(it=function(t){if(Q.test(t))return!0;var e=O(t);return e&&e.fileName===n&&a<=e.line&&e.line<=s?!0:!1})}}function x(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);at(this,x),e>32&&this.uncycle()}var A,N,L,B=e._getDomain,U=e._async,I=t("./errors").Warning,H=t("./util"),D=t("./es5"),V=H.canAttachTrace,Q=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,q=/\((?:timers\.js):\d+:\d+\)/,G=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,M=null,W=null,$=!1,z=!(0==H.env("BLUEBIRD_DEBUG")||!H.env("BLUEBIRD_DEBUG")&&"development"!==H.env("NODE_ENV")),X=!(0==H.env("BLUEBIRD_WARNINGS")||!z&&!H.env("BLUEBIRD_WARNINGS")),K=!(0==H.env("BLUEBIRD_LONG_STACK_TRACES")||!z&&!H.env("BLUEBIRD_LONG_STACK_TRACES")),J=0!=H.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(X||!!H.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){if(0===(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},e.prototype._notifyUnhandledRejectionIsHandled=function(){F("rejectionHandled",A,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),F("unhandledRejection",N,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return g(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=B();N="function"==typeof t?null===e?t:H.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=B();A="function"==typeof t?null===e?t:H.domainBind(e,t):void 0};var Y=function(){};e.longStackTraces=function(){if(U.haveItemsQueued()&&!st.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!st.longStackTraces&&S()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace,i=e.prototype._dereferenceTrace;st.longStackTraces=!0,Y=function(){if(U.haveItemsQueued()&&!st.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,e.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),U.enableTrampoline(),st.longStackTraces=!1},e.prototype._captureStackTrace=h,e.prototype._attachExtraTrace=d,e.prototype._dereferenceTrace=_,n.activateLongStackTraces(),U.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return st.longStackTraces&&S()};var Z=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n={detail:e,cancelable:!0};D.defineProperty(n,"promise",{value:e.promise}),D.defineProperty(n,"reason",{value:e.reason});var r=new CustomEvent(t.toLowerCase(),n);return!H.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,D.defineProperty(n,"promise",{value:e.promise}),D.defineProperty(n,"reason",{value:e.reason}),!H.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),H.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!H.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),tt=function(){return H.isNode?function(){return process.emit.apply(process,arguments)}:H.global?function(t){var e="on"+t.toLowerCase(),n=H.global[e];return n?(n.apply(H.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),et={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},nt=function(t){var e=!1;try{e=tt.apply(null,arguments)}catch(n){U.throwLater(n),e=!0}var r=!1;try{r=Z(t,et[t].apply(null,arguments))}catch(n){U.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&Y()),"warnings"in t){var n=t.warnings;st.warnings=!!n,J=st.warnings,H.isObject(n)&&"wForgottenReturn"in n&&(J=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!st.cancellation){if(U.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=s,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=a,e.prototype._execute=o,rt=u,st.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!st.monitoring?(st.monitoring=!0,e.prototype._fireEvent=nt):!t.monitoring&&st.monitoring&&(st.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var rt=p,it=function(){return!1},ot=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;H.inherits(x,Error),n.CapturedTrace=x,x.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var a=e[r].stack,s=n[a];if(void 0!==s&&s!==r){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>s?(c._parent=e[s+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},x.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=k(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(w(i.stack.split("\n"))),i=i._parent;C(r),b(r),H.notEnumerableProp(t,"stack",m(n,r)),H.notEnumerableProp(t,"__stackCleaned__",!0)}};var at=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():T(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,M=t,W=e;var n=Error.captureStackTrace;return it=function(t){return Q.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return M=/@/,W=e,$=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(W=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?T(e):e.toString()},null):(M=t,W=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(L=function(t){console.warn(t)},H.isNode&&process.stderr.isTTY?L=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:H.isNode||"string"!=typeof(new Error).stack||(L=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var st={warnings:X,longStackTraces:!1,cancellation:!1,monitoring:!1};return K&&e.longStackTraces(),{longStackTraces:function(){return st.longStackTraces},warnings:function(){return st.warnings},cancellation:function(){return st.cancellation},monitoring:function(){return st.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return f},checkForgottenReturns:v,setBounds:R,warn:g,deprecated:y,CapturedTrace:x,fireDomEvent:Z,fireGlobalEvent:tt}}},{"./errors":9,"./es5":10,"./util":21}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],9:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,a,s=t("./es5"),c=s.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,f=r("Warning","warning"),h=r("CancellationError","cancellation error"),d=r("TimeoutError","timeout error"),_=r("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(v){o=r("TypeError","type error"),a=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function s(){return l.call(this,this.promise._target()._settledValue())}function c(t){return a(this,t)?void 0:(f.e=t,f)}function l(t){var i=this.promise,l=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?l.call(i._boundValue()):l.call(i._boundValue(),t);if(u===r)return u;if(void 0!==u){i._setReturnedNonUndefined();var h=n(u,i);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var d=new p("late cancellation observer");return i._attachExtraTrace(d),f.e=d,f}h.isPending()&&h._attachCancellationCallback(new o(this))}return h._then(s,c,void 0,this,void 0)}}}return i.isRejected()?(a(this),f.e=t,f):(a(this),t)}var u=t("./util"),p=e.CancellationError,f=u.errorObj,h=t("./catch_filter")(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){a(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new i(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,l,l)},e.prototype.tap=function(t){return this._passThrough(t,1,l)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,l);var r,i=new Array(n-1),o=0;for(r=0;n-1>r;++r){var a=arguments[r];if(!u.isObject(a))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+u.classString(a)));i[o++]=a}i.length=o;var s=arguments[r];return this._passThrough(h(i,s,this),1,void 0,l)},i}},{"./catch_filter":5,"./util":21}],12:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":21}],13:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=s(t).apply(this,arguments),a=r._popContext();return o.checkForgottenReturns(i,a,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+a.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=a.isArray(l)?s(t).apply(u,l):s(t).call(u,l)}else c=s(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":21}],14:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!h.isObject(o))return p("Catch statement predicate: expecting an object but got "+h.classString(o));r[i++]=o}if(r.length=i,t=arguments[n],"function"!=typeof t)throw new g("The last argument to .catch() must be a function, got "+h.toString(t));return this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0); +},i.prototype.then=function(t,e){if(F.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+h.classString(t);arguments.length>1&&(n+=", "+h.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+h.classString(t)):this.all()._then(t,void 0,void 0,C,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new k(this).promise()},i.prototype.error=function(t){return this.caught(h.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=R(t)(S(e,n));return r===O&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new k(t).promise()},i.cast=function(t){var e=E(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+h.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var a=void 0!==o,s=a?o:new i(b),l=this._target(),u=l._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var p=c();if(0!==(50397184&u)){var f,d,_=l._settlePromiseCtx;0!==(33554432&u)?(d=l._rejectionHandler0,f=t):0!==(16777216&u)?(d=l._fulfillmentHandler0,f=e,l._unsetRejectionIsUnhandled()):(_=l._settlePromiseLateCancellationObserver,d=new m("late cancellation observer"),l._attachExtraTrace(d),f=e),v.invoke(_,l,{handler:null===p?f:"function"==typeof f&&h.domainBind(p,f),promise:s,receiver:r,value:d})}else l._addCallbacks(t,e,s,r,p);return s},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===f?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=f),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=f),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:h.domainBind(i,e));else{var a=4*o-4;this[a+2]=n,this[a+3]=r,"function"==typeof t&&(this[a+0]=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this[a+1]=null===i?e:h.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=E(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;a>s;++s)r._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new m("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=h.ensureErrorObject(t),i=r===t;if(!i&&!n&&F.warnings()){var o="a promise was rejected with a non-error: "+h.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){if(t!==b){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)}},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===C?n&&"number"==typeof n.length?o=R(t).apply(this._boundValue(),n):(o=O,o.e=new g("cannot .spread() a non-array: "+h.classString(n))):o=R(t).call(e,n);var a=r._popContext();i=r._bitField,0===(65536&i)&&(o===w?r._reject(n):o===O?r._rejectCallback(o.e,!1):(F.checkForgottenReturns(o,a,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var a=t instanceof i,s=this._bitField,c=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,R(e).call(r,o)===O&&t._reject(O.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof k?t._cancel():r.cancel()):"function"==typeof e?a?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):a&&(c&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this),this._dereferenceTrace())}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,h.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&d.defineProperty(i.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),i.defer=i.pending=function(){F.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:a}},h.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,E,p,F),t("./bind")(i,b,E,F),t("./cancel")(i,k,p,F),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,k,E,b,v,c),i.Promise=i,i.version="3.5.5",h.toFastProperties(i),h.toFastProperties(i.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new i(b)),F.setBounds(_.firstLineError,h.lastLineError),i}},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function a(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function s(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var s=o._bitField;if(this._values=o,0===(50397184&s))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&s))return 0!==(16777216&s)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(a(n))):void this._iterate(o)},s.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,a=null,s=0;n>s;++s){var c=r(t[s],i);c instanceof e?(c=c._target(),a=c._bitField):a=null,o?null!==a&&c.suppressUnhandledRejections():null!==a?0===(50397184&a)?(c._proxy(this,s),this._values[s]=c):o=0!==(33554432&a)?this._promiseFulfilled(c._value(),s):0!==(16777216&a)?this._promiseRejected(c._reason(),s):this._promiseCancelled(s):o=this._promiseFulfilled(c,s)}o||i._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;no;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityn;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function f(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function h(t){function e(){}function n(){return typeof r.foo}e.prototype=t;var r=new e;return n(),n(),t}function d(t){return N.test(t)}function _(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{u(t,"isOperational",!0)}catch(e){}}function m(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function C(t){return{}.toString.call(t)}function w(t,e,n){for(var r=F.names(t),i=0;i10||t[0]>0}(),D.isNode&&D.toFastProperties(process);try{throw new Error}catch(V){D.lastLineError=V}e.exports=D},{"./es5":10}]},{},[3])(3)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file diff --git a/node_modules/bluebird/js/browser/bluebird.js b/node_modules/bluebird/js/browser/bluebird.js new file mode 100644 index 00000000..35d0912b --- /dev/null +++ b/node_modules/bluebird/js/browser/bluebird.js @@ -0,0 +1,5666 @@ +/* @preserve + * The MIT License (MIT) + * + * Copyright (c) 2013-2018 Petka Antonov + * + * 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. + * + */ +/** + * bluebird build version 3.5.5 + * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each +*/ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o 0) { + _drainQueueStep(queue); + } +} + +function _drainQueueStep(queue) { + var fn = queue.shift(); + if (typeof fn !== "function") { + fn._settlePromises(); + } else { + var receiver = queue.shift(); + var arg = queue.shift(); + fn.call(receiver, arg); + } +} + +Async.prototype._drainQueues = function () { + _drainQueue(this._normalQueue); + this._reset(); + this._haveDrainedQueues = true; + _drainQueue(this._lateQueue); +}; + +Async.prototype._queueTick = function () { + if (!this._isTickUsed) { + this._isTickUsed = true; + this._schedule(this.drainQueues); + } +}; + +Async.prototype._reset = function () { + this._isTickUsed = false; +}; + +module.exports = Async; +module.exports.firstLineError = firstLineError; + +},{"./queue":26,"./schedule":29,"./util":36}],3:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) { +var calledBind = false; +var rejectThis = function(_, e) { + this._reject(e); +}; + +var targetRejected = function(e, context) { + context.promiseRejectionQueued = true; + context.bindingPromise._then(rejectThis, rejectThis, null, this, e); +}; + +var bindingResolved = function(thisArg, context) { + if (((this._bitField & 50397184) === 0)) { + this._resolveCallback(context.target); + } +}; + +var bindingRejected = function(e, context) { + if (!context.promiseRejectionQueued) this._reject(e); +}; + +Promise.prototype.bind = function (thisArg) { + if (!calledBind) { + calledBind = true; + Promise.prototype._propagateFrom = debug.propagateFromFunction(); + Promise.prototype._boundValue = debug.boundValueFunction(); + } + var maybePromise = tryConvertToPromise(thisArg); + var ret = new Promise(INTERNAL); + ret._propagateFrom(this, 1); + var target = this._target(); + ret._setBoundTo(maybePromise); + if (maybePromise instanceof Promise) { + var context = { + promiseRejectionQueued: false, + promise: ret, + target: target, + bindingPromise: maybePromise + }; + target._then(INTERNAL, targetRejected, undefined, ret, context); + maybePromise._then( + bindingResolved, bindingRejected, undefined, ret, context); + ret._setOnCancel(maybePromise); + } else { + ret._resolveCallback(target); + } + return ret; +}; + +Promise.prototype._setBoundTo = function (obj) { + if (obj !== undefined) { + this._bitField = this._bitField | 2097152; + this._boundTo = obj; + } else { + this._bitField = this._bitField & (~2097152); + } +}; + +Promise.prototype._isBound = function () { + return (this._bitField & 2097152) === 2097152; +}; + +Promise.bind = function (thisArg, value) { + return Promise.resolve(value).bind(thisArg); +}; +}; + +},{}],4:[function(_dereq_,module,exports){ +"use strict"; +var old; +if (typeof Promise !== "undefined") old = Promise; +function noConflict() { + try { if (Promise === bluebird) Promise = old; } + catch (e) {} + return bluebird; +} +var bluebird = _dereq_("./promise")(); +bluebird.noConflict = noConflict; +module.exports = bluebird; + +},{"./promise":22}],5:[function(_dereq_,module,exports){ +"use strict"; +var cr = Object.create; +if (cr) { + var callerCache = cr(null); + var getterCache = cr(null); + callerCache[" size"] = getterCache[" size"] = 0; +} + +module.exports = function(Promise) { +var util = _dereq_("./util"); +var canEvaluate = util.canEvaluate; +var isIdentifier = util.isIdentifier; + +var getMethodCaller; +var getGetter; +if (!true) { +var makeMethodCaller = function (methodName) { + return new Function("ensureMethod", " \n\ + return function(obj) { \n\ + 'use strict' \n\ + var len = this.length; \n\ + ensureMethod(obj, 'methodName'); \n\ + switch(len) { \n\ + case 1: return obj.methodName(this[0]); \n\ + case 2: return obj.methodName(this[0], this[1]); \n\ + case 3: return obj.methodName(this[0], this[1], this[2]); \n\ + case 0: return obj.methodName(); \n\ + default: \n\ + return obj.methodName.apply(obj, this); \n\ + } \n\ + }; \n\ + ".replace(/methodName/g, methodName))(ensureMethod); +}; + +var makeGetter = function (propertyName) { + return new Function("obj", " \n\ + 'use strict'; \n\ + return obj.propertyName; \n\ + ".replace("propertyName", propertyName)); +}; + +var getCompiled = function(name, compiler, cache) { + var ret = cache[name]; + if (typeof ret !== "function") { + if (!isIdentifier(name)) { + return null; + } + ret = compiler(name); + cache[name] = ret; + cache[" size"]++; + if (cache[" size"] > 512) { + var keys = Object.keys(cache); + for (var i = 0; i < 256; ++i) delete cache[keys[i]]; + cache[" size"] = keys.length - 256; + } + } + return ret; +}; + +getMethodCaller = function(name) { + return getCompiled(name, makeMethodCaller, callerCache); +}; + +getGetter = function(name) { + return getCompiled(name, makeGetter, getterCache); +}; +} + +function ensureMethod(obj, methodName) { + var fn; + if (obj != null) fn = obj[methodName]; + if (typeof fn !== "function") { + var message = "Object " + util.classString(obj) + " has no method '" + + util.toString(methodName) + "'"; + throw new Promise.TypeError(message); + } + return fn; +} + +function caller(obj) { + var methodName = this.pop(); + var fn = ensureMethod(obj, methodName); + return fn.apply(obj, this); +} +Promise.prototype.call = function (methodName) { + var args = [].slice.call(arguments, 1);; + if (!true) { + if (canEvaluate) { + var maybeCaller = getMethodCaller(methodName); + if (maybeCaller !== null) { + return this._then( + maybeCaller, undefined, undefined, args, undefined); + } + } + } + args.push(methodName); + return this._then(caller, undefined, undefined, args, undefined); +}; + +function namedGetter(obj) { + return obj[this]; +} +function indexedGetter(obj) { + var index = +this; + if (index < 0) index = Math.max(0, index + obj.length); + return obj[index]; +} +Promise.prototype.get = function (propertyName) { + var isIndex = (typeof propertyName === "number"); + var getter; + if (!isIndex) { + if (canEvaluate) { + var maybeGetter = getGetter(propertyName); + getter = maybeGetter !== null ? maybeGetter : namedGetter; + } else { + getter = namedGetter; + } + } else { + getter = indexedGetter; + } + return this._then(getter, undefined, undefined, propertyName, undefined); +}; +}; + +},{"./util":36}],6:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, PromiseArray, apiRejection, debug) { +var util = _dereq_("./util"); +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var async = Promise._async; + +Promise.prototype["break"] = Promise.prototype.cancel = function() { + if (!debug.cancellation()) return this._warn("cancellation is disabled"); + + var promise = this; + var child = promise; + while (promise._isCancellable()) { + if (!promise._cancelBy(child)) { + if (child._isFollowing()) { + child._followee().cancel(); + } else { + child._cancelBranched(); + } + break; + } + + var parent = promise._cancellationParent; + if (parent == null || !parent._isCancellable()) { + if (promise._isFollowing()) { + promise._followee().cancel(); + } else { + promise._cancelBranched(); + } + break; + } else { + if (promise._isFollowing()) promise._followee().cancel(); + promise._setWillBeCancelled(); + child = promise; + promise = parent; + } + } +}; + +Promise.prototype._branchHasCancelled = function() { + this._branchesRemainingToCancel--; +}; + +Promise.prototype._enoughBranchesHaveCancelled = function() { + return this._branchesRemainingToCancel === undefined || + this._branchesRemainingToCancel <= 0; +}; + +Promise.prototype._cancelBy = function(canceller) { + if (canceller === this) { + this._branchesRemainingToCancel = 0; + this._invokeOnCancel(); + return true; + } else { + this._branchHasCancelled(); + if (this._enoughBranchesHaveCancelled()) { + this._invokeOnCancel(); + return true; + } + } + return false; +}; + +Promise.prototype._cancelBranched = function() { + if (this._enoughBranchesHaveCancelled()) { + this._cancel(); + } +}; + +Promise.prototype._cancel = function() { + if (!this._isCancellable()) return; + this._setCancelled(); + async.invoke(this._cancelPromises, this, undefined); +}; + +Promise.prototype._cancelPromises = function() { + if (this._length() > 0) this._settlePromises(); +}; + +Promise.prototype._unsetOnCancel = function() { + this._onCancelField = undefined; +}; + +Promise.prototype._isCancellable = function() { + return this.isPending() && !this._isCancelled(); +}; + +Promise.prototype.isCancellable = function() { + return this.isPending() && !this.isCancelled(); +}; + +Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) { + if (util.isArray(onCancelCallback)) { + for (var i = 0; i < onCancelCallback.length; ++i) { + this._doInvokeOnCancel(onCancelCallback[i], internalOnly); + } + } else if (onCancelCallback !== undefined) { + if (typeof onCancelCallback === "function") { + if (!internalOnly) { + var e = tryCatch(onCancelCallback).call(this._boundValue()); + if (e === errorObj) { + this._attachExtraTrace(e.e); + async.throwLater(e.e); + } + } + } else { + onCancelCallback._resultCancelled(this); + } + } +}; + +Promise.prototype._invokeOnCancel = function() { + var onCancelCallback = this._onCancel(); + this._unsetOnCancel(); + async.invoke(this._doInvokeOnCancel, this, onCancelCallback); +}; + +Promise.prototype._invokeInternalOnCancel = function() { + if (this._isCancellable()) { + this._doInvokeOnCancel(this._onCancel(), true); + this._unsetOnCancel(); + } +}; + +Promise.prototype._resultCancelled = function() { + this.cancel(); +}; + +}; + +},{"./util":36}],7:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(NEXT_FILTER) { +var util = _dereq_("./util"); +var getKeys = _dereq_("./es5").keys; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; + +function catchFilter(instances, cb, promise) { + return function(e) { + var boundTo = promise._boundValue(); + predicateLoop: for (var i = 0; i < instances.length; ++i) { + var item = instances[i]; + + if (item === Error || + (item != null && item.prototype instanceof Error)) { + if (e instanceof item) { + return tryCatch(cb).call(boundTo, e); + } + } else if (typeof item === "function") { + var matchesPredicate = tryCatch(item).call(boundTo, e); + if (matchesPredicate === errorObj) { + return matchesPredicate; + } else if (matchesPredicate) { + return tryCatch(cb).call(boundTo, e); + } + } else if (util.isObject(e)) { + var keys = getKeys(item); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + if (item[key] != e[key]) { + continue predicateLoop; + } + } + return tryCatch(cb).call(boundTo, e); + } + } + return NEXT_FILTER; + }; +} + +return catchFilter; +}; + +},{"./es5":13,"./util":36}],8:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise) { +var longStackTraces = false; +var contextStack = []; + +Promise.prototype._promiseCreated = function() {}; +Promise.prototype._pushContext = function() {}; +Promise.prototype._popContext = function() {return null;}; +Promise._peekContext = Promise.prototype._peekContext = function() {}; + +function Context() { + this._trace = new Context.CapturedTrace(peekContext()); +} +Context.prototype._pushContext = function () { + if (this._trace !== undefined) { + this._trace._promiseCreated = null; + contextStack.push(this._trace); + } +}; + +Context.prototype._popContext = function () { + if (this._trace !== undefined) { + var trace = contextStack.pop(); + var ret = trace._promiseCreated; + trace._promiseCreated = null; + return ret; + } + return null; +}; + +function createContext() { + if (longStackTraces) return new Context(); +} + +function peekContext() { + var lastIndex = contextStack.length - 1; + if (lastIndex >= 0) { + return contextStack[lastIndex]; + } + return undefined; +} +Context.CapturedTrace = null; +Context.create = createContext; +Context.deactivateLongStackTraces = function() {}; +Context.activateLongStackTraces = function() { + var Promise_pushContext = Promise.prototype._pushContext; + var Promise_popContext = Promise.prototype._popContext; + var Promise_PeekContext = Promise._peekContext; + var Promise_peekContext = Promise.prototype._peekContext; + var Promise_promiseCreated = Promise.prototype._promiseCreated; + Context.deactivateLongStackTraces = function() { + Promise.prototype._pushContext = Promise_pushContext; + Promise.prototype._popContext = Promise_popContext; + Promise._peekContext = Promise_PeekContext; + Promise.prototype._peekContext = Promise_peekContext; + Promise.prototype._promiseCreated = Promise_promiseCreated; + longStackTraces = false; + }; + longStackTraces = true; + Promise.prototype._pushContext = Context.prototype._pushContext; + Promise.prototype._popContext = Context.prototype._popContext; + Promise._peekContext = Promise.prototype._peekContext = peekContext; + Promise.prototype._promiseCreated = function() { + var ctx = this._peekContext(); + if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this; + }; +}; +return Context; +}; + +},{}],9:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, Context) { +var getDomain = Promise._getDomain; +var async = Promise._async; +var Warning = _dereq_("./errors").Warning; +var util = _dereq_("./util"); +var es5 = _dereq_("./es5"); +var canAttachTrace = util.canAttachTrace; +var unhandledRejectionHandled; +var possiblyUnhandledRejection; +var bluebirdFramePattern = + /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/; +var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/; +var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/; +var stackFramePattern = null; +var formatStack = null; +var indentStackFrames = false; +var printWarning; +var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 && + (true || + util.env("BLUEBIRD_DEBUG") || + util.env("NODE_ENV") === "development")); + +var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 && + (debugging || util.env("BLUEBIRD_WARNINGS"))); + +var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 && + (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES"))); + +var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 && + (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN")); + +Promise.prototype.suppressUnhandledRejections = function() { + var target = this._target(); + target._bitField = ((target._bitField & (~1048576)) | + 524288); +}; + +Promise.prototype._ensurePossibleRejectionHandled = function () { + if ((this._bitField & 524288) !== 0) return; + this._setRejectionIsUnhandled(); + var self = this; + setTimeout(function() { + self._notifyUnhandledRejection(); + }, 1); +}; + +Promise.prototype._notifyUnhandledRejectionIsHandled = function () { + fireRejectionEvent("rejectionHandled", + unhandledRejectionHandled, undefined, this); +}; + +Promise.prototype._setReturnedNonUndefined = function() { + this._bitField = this._bitField | 268435456; +}; + +Promise.prototype._returnedNonUndefined = function() { + return (this._bitField & 268435456) !== 0; +}; + +Promise.prototype._notifyUnhandledRejection = function () { + if (this._isRejectionUnhandled()) { + var reason = this._settledValue(); + this._setUnhandledRejectionIsNotified(); + fireRejectionEvent("unhandledRejection", + possiblyUnhandledRejection, reason, this); + } +}; + +Promise.prototype._setUnhandledRejectionIsNotified = function () { + this._bitField = this._bitField | 262144; +}; + +Promise.prototype._unsetUnhandledRejectionIsNotified = function () { + this._bitField = this._bitField & (~262144); +}; + +Promise.prototype._isUnhandledRejectionNotified = function () { + return (this._bitField & 262144) > 0; +}; + +Promise.prototype._setRejectionIsUnhandled = function () { + this._bitField = this._bitField | 1048576; +}; + +Promise.prototype._unsetRejectionIsUnhandled = function () { + this._bitField = this._bitField & (~1048576); + if (this._isUnhandledRejectionNotified()) { + this._unsetUnhandledRejectionIsNotified(); + this._notifyUnhandledRejectionIsHandled(); + } +}; + +Promise.prototype._isRejectionUnhandled = function () { + return (this._bitField & 1048576) > 0; +}; + +Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) { + return warn(message, shouldUseOwnTrace, promise || this); +}; + +Promise.onPossiblyUnhandledRejection = function (fn) { + var domain = getDomain(); + possiblyUnhandledRejection = + typeof fn === "function" ? (domain === null ? + fn : util.domainBind(domain, fn)) + : undefined; +}; + +Promise.onUnhandledRejectionHandled = function (fn) { + var domain = getDomain(); + unhandledRejectionHandled = + typeof fn === "function" ? (domain === null ? + fn : util.domainBind(domain, fn)) + : undefined; +}; + +var disableLongStackTraces = function() {}; +Promise.longStackTraces = function () { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + if (!config.longStackTraces && longStackTracesIsSupported()) { + var Promise_captureStackTrace = Promise.prototype._captureStackTrace; + var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace; + var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace; + config.longStackTraces = true; + disableLongStackTraces = function() { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + Promise.prototype._captureStackTrace = Promise_captureStackTrace; + Promise.prototype._attachExtraTrace = Promise_attachExtraTrace; + Promise.prototype._dereferenceTrace = Promise_dereferenceTrace; + Context.deactivateLongStackTraces(); + async.enableTrampoline(); + config.longStackTraces = false; + }; + Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace; + Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace; + Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace; + Context.activateLongStackTraces(); + async.disableTrampolineIfNecessary(); + } +}; + +Promise.hasLongStackTraces = function () { + return config.longStackTraces && longStackTracesIsSupported(); +}; + +var fireDomEvent = (function() { + try { + if (typeof CustomEvent === "function") { + var event = new CustomEvent("CustomEvent"); + util.global.dispatchEvent(event); + return function(name, event) { + var eventData = { + detail: event, + cancelable: true + }; + es5.defineProperty( + eventData, "promise", {value: event.promise}); + es5.defineProperty(eventData, "reason", {value: event.reason}); + var domEvent = new CustomEvent(name.toLowerCase(), eventData); + return !util.global.dispatchEvent(domEvent); + }; + } else if (typeof Event === "function") { + var event = new Event("CustomEvent"); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = new Event(name.toLowerCase(), { + cancelable: true + }); + domEvent.detail = event; + es5.defineProperty(domEvent, "promise", {value: event.promise}); + es5.defineProperty(domEvent, "reason", {value: event.reason}); + return !util.global.dispatchEvent(domEvent); + }; + } else { + var event = document.createEvent("CustomEvent"); + event.initCustomEvent("testingtheevent", false, true, {}); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = document.createEvent("CustomEvent"); + domEvent.initCustomEvent(name.toLowerCase(), false, true, + event); + return !util.global.dispatchEvent(domEvent); + }; + } + } catch (e) {} + return function() { + return false; + }; +})(); + +var fireGlobalEvent = (function() { + if (util.isNode) { + return function() { + return process.emit.apply(process, arguments); + }; + } else { + if (!util.global) { + return function() { + return false; + }; + } + return function(name) { + var methodName = "on" + name.toLowerCase(); + var method = util.global[methodName]; + if (!method) return false; + method.apply(util.global, [].slice.call(arguments, 1)); + return true; + }; + } +})(); + +function generatePromiseLifecycleEventObject(name, promise) { + return {promise: promise}; +} + +var eventToObjectGenerator = { + promiseCreated: generatePromiseLifecycleEventObject, + promiseFulfilled: generatePromiseLifecycleEventObject, + promiseRejected: generatePromiseLifecycleEventObject, + promiseResolved: generatePromiseLifecycleEventObject, + promiseCancelled: generatePromiseLifecycleEventObject, + promiseChained: function(name, promise, child) { + return {promise: promise, child: child}; + }, + warning: function(name, warning) { + return {warning: warning}; + }, + unhandledRejection: function (name, reason, promise) { + return {reason: reason, promise: promise}; + }, + rejectionHandled: generatePromiseLifecycleEventObject +}; + +var activeFireEvent = function (name) { + var globalEventFired = false; + try { + globalEventFired = fireGlobalEvent.apply(null, arguments); + } catch (e) { + async.throwLater(e); + globalEventFired = true; + } + + var domEventFired = false; + try { + domEventFired = fireDomEvent(name, + eventToObjectGenerator[name].apply(null, arguments)); + } catch (e) { + async.throwLater(e); + domEventFired = true; + } + + return domEventFired || globalEventFired; +}; + +Promise.config = function(opts) { + opts = Object(opts); + if ("longStackTraces" in opts) { + if (opts.longStackTraces) { + Promise.longStackTraces(); + } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) { + disableLongStackTraces(); + } + } + if ("warnings" in opts) { + var warningsOption = opts.warnings; + config.warnings = !!warningsOption; + wForgottenReturn = config.warnings; + + if (util.isObject(warningsOption)) { + if ("wForgottenReturn" in warningsOption) { + wForgottenReturn = !!warningsOption.wForgottenReturn; + } + } + } + if ("cancellation" in opts && opts.cancellation && !config.cancellation) { + if (async.haveItemsQueued()) { + throw new Error( + "cannot enable cancellation after promises are in use"); + } + Promise.prototype._clearCancellationData = + cancellationClearCancellationData; + Promise.prototype._propagateFrom = cancellationPropagateFrom; + Promise.prototype._onCancel = cancellationOnCancel; + Promise.prototype._setOnCancel = cancellationSetOnCancel; + Promise.prototype._attachCancellationCallback = + cancellationAttachCancellationCallback; + Promise.prototype._execute = cancellationExecute; + propagateFromFunction = cancellationPropagateFrom; + config.cancellation = true; + } + if ("monitoring" in opts) { + if (opts.monitoring && !config.monitoring) { + config.monitoring = true; + Promise.prototype._fireEvent = activeFireEvent; + } else if (!opts.monitoring && config.monitoring) { + config.monitoring = false; + Promise.prototype._fireEvent = defaultFireEvent; + } + } + return Promise; +}; + +function defaultFireEvent() { return false; } + +Promise.prototype._fireEvent = defaultFireEvent; +Promise.prototype._execute = function(executor, resolve, reject) { + try { + executor(resolve, reject); + } catch (e) { + return e; + } +}; +Promise.prototype._onCancel = function () {}; +Promise.prototype._setOnCancel = function (handler) { ; }; +Promise.prototype._attachCancellationCallback = function(onCancel) { + ; +}; +Promise.prototype._captureStackTrace = function () {}; +Promise.prototype._attachExtraTrace = function () {}; +Promise.prototype._dereferenceTrace = function () {}; +Promise.prototype._clearCancellationData = function() {}; +Promise.prototype._propagateFrom = function (parent, flags) { + ; + ; +}; + +function cancellationExecute(executor, resolve, reject) { + var promise = this; + try { + executor(resolve, reject, function(onCancel) { + if (typeof onCancel !== "function") { + throw new TypeError("onCancel must be a function, got: " + + util.toString(onCancel)); + } + promise._attachCancellationCallback(onCancel); + }); + } catch (e) { + return e; + } +} + +function cancellationAttachCancellationCallback(onCancel) { + if (!this._isCancellable()) return this; + + var previousOnCancel = this._onCancel(); + if (previousOnCancel !== undefined) { + if (util.isArray(previousOnCancel)) { + previousOnCancel.push(onCancel); + } else { + this._setOnCancel([previousOnCancel, onCancel]); + } + } else { + this._setOnCancel(onCancel); + } +} + +function cancellationOnCancel() { + return this._onCancelField; +} + +function cancellationSetOnCancel(onCancel) { + this._onCancelField = onCancel; +} + +function cancellationClearCancellationData() { + this._cancellationParent = undefined; + this._onCancelField = undefined; +} + +function cancellationPropagateFrom(parent, flags) { + if ((flags & 1) !== 0) { + this._cancellationParent = parent; + var branchesRemainingToCancel = parent._branchesRemainingToCancel; + if (branchesRemainingToCancel === undefined) { + branchesRemainingToCancel = 0; + } + parent._branchesRemainingToCancel = branchesRemainingToCancel + 1; + } + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } +} + +function bindingPropagateFrom(parent, flags) { + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } +} +var propagateFromFunction = bindingPropagateFrom; + +function boundValueFunction() { + var ret = this._boundTo; + if (ret !== undefined) { + if (ret instanceof Promise) { + if (ret.isFulfilled()) { + return ret.value(); + } else { + return undefined; + } + } + } + return ret; +} + +function longStackTracesCaptureStackTrace() { + this._trace = new CapturedTrace(this._peekContext()); +} + +function longStackTracesAttachExtraTrace(error, ignoreSelf) { + if (canAttachTrace(error)) { + var trace = this._trace; + if (trace !== undefined) { + if (ignoreSelf) trace = trace._parent; + } + if (trace !== undefined) { + trace.attachExtraTrace(error); + } else if (!error.__stackCleaned__) { + var parsed = parseStackAndMessage(error); + util.notEnumerableProp(error, "stack", + parsed.message + "\n" + parsed.stack.join("\n")); + util.notEnumerableProp(error, "__stackCleaned__", true); + } + } +} + +function longStackTracesDereferenceTrace() { + this._trace = undefined; +} + +function checkForgottenReturns(returnValue, promiseCreated, name, promise, + parent) { + if (returnValue === undefined && promiseCreated !== null && + wForgottenReturn) { + if (parent !== undefined && parent._returnedNonUndefined()) return; + if ((promise._bitField & 65535) === 0) return; + + if (name) name = name + " "; + var handlerLine = ""; + var creatorLine = ""; + if (promiseCreated._trace) { + var traceLines = promiseCreated._trace.stack.split("\n"); + var stack = cleanStack(traceLines); + for (var i = stack.length - 1; i >= 0; --i) { + var line = stack[i]; + if (!nodeFramePattern.test(line)) { + var lineMatches = line.match(parseLinePattern); + if (lineMatches) { + handlerLine = "at " + lineMatches[1] + + ":" + lineMatches[2] + ":" + lineMatches[3] + " "; + } + break; + } + } + + if (stack.length > 0) { + var firstUserLine = stack[0]; + for (var i = 0; i < traceLines.length; ++i) { + + if (traceLines[i] === firstUserLine) { + if (i > 0) { + creatorLine = "\n" + traceLines[i - 1]; + } + break; + } + } + + } + } + var msg = "a promise was created in a " + name + + "handler " + handlerLine + "but was not returned from it, " + + "see http://goo.gl/rRqMUw" + + creatorLine; + promise._warn(msg, true, promiseCreated); + } +} + +function deprecated(name, replacement) { + var message = name + + " is deprecated and will be removed in a future version."; + if (replacement) message += " Use " + replacement + " instead."; + return warn(message); +} + +function warn(message, shouldUseOwnTrace, promise) { + if (!config.warnings) return; + var warning = new Warning(message); + var ctx; + if (shouldUseOwnTrace) { + promise._attachExtraTrace(warning); + } else if (config.longStackTraces && (ctx = Promise._peekContext())) { + ctx.attachExtraTrace(warning); + } else { + var parsed = parseStackAndMessage(warning); + warning.stack = parsed.message + "\n" + parsed.stack.join("\n"); + } + + if (!activeFireEvent("warning", warning)) { + formatAndLogError(warning, "", true); + } +} + +function reconstructStack(message, stacks) { + for (var i = 0; i < stacks.length - 1; ++i) { + stacks[i].push("From previous event:"); + stacks[i] = stacks[i].join("\n"); + } + if (i < stacks.length) { + stacks[i] = stacks[i].join("\n"); + } + return message + "\n" + stacks.join("\n"); +} + +function removeDuplicateOrEmptyJumps(stacks) { + for (var i = 0; i < stacks.length; ++i) { + if (stacks[i].length === 0 || + ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) { + stacks.splice(i, 1); + i--; + } + } +} + +function removeCommonRoots(stacks) { + var current = stacks[0]; + for (var i = 1; i < stacks.length; ++i) { + var prev = stacks[i]; + var currentLastIndex = current.length - 1; + var currentLastLine = current[currentLastIndex]; + var commonRootMeetPoint = -1; + + for (var j = prev.length - 1; j >= 0; --j) { + if (prev[j] === currentLastLine) { + commonRootMeetPoint = j; + break; + } + } + + for (var j = commonRootMeetPoint; j >= 0; --j) { + var line = prev[j]; + if (current[currentLastIndex] === line) { + current.pop(); + currentLastIndex--; + } else { + break; + } + } + current = prev; + } +} + +function cleanStack(stack) { + var ret = []; + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + var isTraceLine = " (No stack trace)" === line || + stackFramePattern.test(line); + var isInternalFrame = isTraceLine && shouldIgnore(line); + if (isTraceLine && !isInternalFrame) { + if (indentStackFrames && line.charAt(0) !== " ") { + line = " " + line; + } + ret.push(line); + } + } + return ret; +} + +function stackFramesAsArray(error) { + var stack = error.stack.replace(/\s+$/g, "").split("\n"); + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + if (" (No stack trace)" === line || stackFramePattern.test(line)) { + break; + } + } + if (i > 0 && error.name != "SyntaxError") { + stack = stack.slice(i); + } + return stack; +} + +function parseStackAndMessage(error) { + var stack = error.stack; + var message = error.toString(); + stack = typeof stack === "string" && stack.length > 0 + ? stackFramesAsArray(error) : [" (No stack trace)"]; + return { + message: message, + stack: error.name == "SyntaxError" ? stack : cleanStack(stack) + }; +} + +function formatAndLogError(error, title, isSoft) { + if (typeof console !== "undefined") { + var message; + if (util.isObject(error)) { + var stack = error.stack; + message = title + formatStack(stack, error); + } else { + message = title + String(error); + } + if (typeof printWarning === "function") { + printWarning(message, isSoft); + } else if (typeof console.log === "function" || + typeof console.log === "object") { + console.log(message); + } + } +} + +function fireRejectionEvent(name, localHandler, reason, promise) { + var localEventFired = false; + try { + if (typeof localHandler === "function") { + localEventFired = true; + if (name === "rejectionHandled") { + localHandler(promise); + } else { + localHandler(reason, promise); + } + } + } catch (e) { + async.throwLater(e); + } + + if (name === "unhandledRejection") { + if (!activeFireEvent(name, reason, promise) && !localEventFired) { + formatAndLogError(reason, "Unhandled rejection "); + } + } else { + activeFireEvent(name, promise); + } +} + +function formatNonError(obj) { + var str; + if (typeof obj === "function") { + str = "[function " + + (obj.name || "anonymous") + + "]"; + } else { + str = obj && typeof obj.toString === "function" + ? obj.toString() : util.toString(obj); + var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/; + if (ruselessToString.test(str)) { + try { + var newStr = JSON.stringify(obj); + str = newStr; + } + catch(e) { + + } + } + if (str.length === 0) { + str = "(empty array)"; + } + } + return ("(<" + snip(str) + ">, no stack trace)"); +} + +function snip(str) { + var maxChars = 41; + if (str.length < maxChars) { + return str; + } + return str.substr(0, maxChars - 3) + "..."; +} + +function longStackTracesIsSupported() { + return typeof captureStackTrace === "function"; +} + +var shouldIgnore = function() { return false; }; +var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/; +function parseLineInfo(line) { + var matches = line.match(parseLineInfoRegex); + if (matches) { + return { + fileName: matches[1], + line: parseInt(matches[2], 10) + }; + } +} + +function setBounds(firstLineError, lastLineError) { + if (!longStackTracesIsSupported()) return; + var firstStackLines = (firstLineError.stack || "").split("\n"); + var lastStackLines = (lastLineError.stack || "").split("\n"); + var firstIndex = -1; + var lastIndex = -1; + var firstFileName; + var lastFileName; + for (var i = 0; i < firstStackLines.length; ++i) { + var result = parseLineInfo(firstStackLines[i]); + if (result) { + firstFileName = result.fileName; + firstIndex = result.line; + break; + } + } + for (var i = 0; i < lastStackLines.length; ++i) { + var result = parseLineInfo(lastStackLines[i]); + if (result) { + lastFileName = result.fileName; + lastIndex = result.line; + break; + } + } + if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName || + firstFileName !== lastFileName || firstIndex >= lastIndex) { + return; + } + + shouldIgnore = function(line) { + if (bluebirdFramePattern.test(line)) return true; + var info = parseLineInfo(line); + if (info) { + if (info.fileName === firstFileName && + (firstIndex <= info.line && info.line <= lastIndex)) { + return true; + } + } + return false; + }; +} + +function CapturedTrace(parent) { + this._parent = parent; + this._promisesCreated = 0; + var length = this._length = 1 + (parent === undefined ? 0 : parent._length); + captureStackTrace(this, CapturedTrace); + if (length > 32) this.uncycle(); +} +util.inherits(CapturedTrace, Error); +Context.CapturedTrace = CapturedTrace; + +CapturedTrace.prototype.uncycle = function() { + var length = this._length; + if (length < 2) return; + var nodes = []; + var stackToIndex = {}; + + for (var i = 0, node = this; node !== undefined; ++i) { + nodes.push(node); + node = node._parent; + } + length = this._length = i; + for (var i = length - 1; i >= 0; --i) { + var stack = nodes[i].stack; + if (stackToIndex[stack] === undefined) { + stackToIndex[stack] = i; + } + } + for (var i = 0; i < length; ++i) { + var currentStack = nodes[i].stack; + var index = stackToIndex[currentStack]; + if (index !== undefined && index !== i) { + if (index > 0) { + nodes[index - 1]._parent = undefined; + nodes[index - 1]._length = 1; + } + nodes[i]._parent = undefined; + nodes[i]._length = 1; + var cycleEdgeNode = i > 0 ? nodes[i - 1] : this; + + if (index < length - 1) { + cycleEdgeNode._parent = nodes[index + 1]; + cycleEdgeNode._parent.uncycle(); + cycleEdgeNode._length = + cycleEdgeNode._parent._length + 1; + } else { + cycleEdgeNode._parent = undefined; + cycleEdgeNode._length = 1; + } + var currentChildLength = cycleEdgeNode._length + 1; + for (var j = i - 2; j >= 0; --j) { + nodes[j]._length = currentChildLength; + currentChildLength++; + } + return; + } + } +}; + +CapturedTrace.prototype.attachExtraTrace = function(error) { + if (error.__stackCleaned__) return; + this.uncycle(); + var parsed = parseStackAndMessage(error); + var message = parsed.message; + var stacks = [parsed.stack]; + + var trace = this; + while (trace !== undefined) { + stacks.push(cleanStack(trace.stack.split("\n"))); + trace = trace._parent; + } + removeCommonRoots(stacks); + removeDuplicateOrEmptyJumps(stacks); + util.notEnumerableProp(error, "stack", reconstructStack(message, stacks)); + util.notEnumerableProp(error, "__stackCleaned__", true); +}; + +var captureStackTrace = (function stackDetection() { + var v8stackFramePattern = /^\s*at\s*/; + var v8stackFormatter = function(stack, error) { + if (typeof stack === "string") return stack; + + if (error.name !== undefined && + error.message !== undefined) { + return error.toString(); + } + return formatNonError(error); + }; + + if (typeof Error.stackTraceLimit === "number" && + typeof Error.captureStackTrace === "function") { + Error.stackTraceLimit += 6; + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + var captureStackTrace = Error.captureStackTrace; + + shouldIgnore = function(line) { + return bluebirdFramePattern.test(line); + }; + return function(receiver, ignoreUntil) { + Error.stackTraceLimit += 6; + captureStackTrace(receiver, ignoreUntil); + Error.stackTraceLimit -= 6; + }; + } + var err = new Error(); + + if (typeof err.stack === "string" && + err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) { + stackFramePattern = /@/; + formatStack = v8stackFormatter; + indentStackFrames = true; + return function captureStackTrace(o) { + o.stack = new Error().stack; + }; + } + + var hasStackAfterThrow; + try { throw new Error(); } + catch(e) { + hasStackAfterThrow = ("stack" in e); + } + if (!("stack" in err) && hasStackAfterThrow && + typeof Error.stackTraceLimit === "number") { + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + return function captureStackTrace(o) { + Error.stackTraceLimit += 6; + try { throw new Error(); } + catch(e) { o.stack = e.stack; } + Error.stackTraceLimit -= 6; + }; + } + + formatStack = function(stack, error) { + if (typeof stack === "string") return stack; + + if ((typeof error === "object" || + typeof error === "function") && + error.name !== undefined && + error.message !== undefined) { + return error.toString(); + } + return formatNonError(error); + }; + + return null; + +})([]); + +if (typeof console !== "undefined" && typeof console.warn !== "undefined") { + printWarning = function (message) { + console.warn(message); + }; + if (util.isNode && process.stderr.isTTY) { + printWarning = function(message, isSoft) { + var color = isSoft ? "\u001b[33m" : "\u001b[31m"; + console.warn(color + message + "\u001b[0m\n"); + }; + } else if (!util.isNode && typeof (new Error().stack) === "string") { + printWarning = function(message, isSoft) { + console.warn("%c" + message, + isSoft ? "color: darkorange" : "color: red"); + }; + } +} + +var config = { + warnings: warnings, + longStackTraces: false, + cancellation: false, + monitoring: false +}; + +if (longStackTraces) Promise.longStackTraces(); + +return { + longStackTraces: function() { + return config.longStackTraces; + }, + warnings: function() { + return config.warnings; + }, + cancellation: function() { + return config.cancellation; + }, + monitoring: function() { + return config.monitoring; + }, + propagateFromFunction: function() { + return propagateFromFunction; + }, + boundValueFunction: function() { + return boundValueFunction; + }, + checkForgottenReturns: checkForgottenReturns, + setBounds: setBounds, + warn: warn, + deprecated: deprecated, + CapturedTrace: CapturedTrace, + fireDomEvent: fireDomEvent, + fireGlobalEvent: fireGlobalEvent +}; +}; + +},{"./errors":12,"./es5":13,"./util":36}],10:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise) { +function returner() { + return this.value; +} +function thrower() { + throw this.reason; +} + +Promise.prototype["return"] = +Promise.prototype.thenReturn = function (value) { + if (value instanceof Promise) value.suppressUnhandledRejections(); + return this._then( + returner, undefined, undefined, {value: value}, undefined); +}; + +Promise.prototype["throw"] = +Promise.prototype.thenThrow = function (reason) { + return this._then( + thrower, undefined, undefined, {reason: reason}, undefined); +}; + +Promise.prototype.catchThrow = function (reason) { + if (arguments.length <= 1) { + return this._then( + undefined, thrower, undefined, {reason: reason}, undefined); + } else { + var _reason = arguments[1]; + var handler = function() {throw _reason;}; + return this.caught(reason, handler); + } +}; + +Promise.prototype.catchReturn = function (value) { + if (arguments.length <= 1) { + if (value instanceof Promise) value.suppressUnhandledRejections(); + return this._then( + undefined, returner, undefined, {value: value}, undefined); + } else { + var _value = arguments[1]; + if (_value instanceof Promise) _value.suppressUnhandledRejections(); + var handler = function() {return _value;}; + return this.caught(value, handler); + } +}; +}; + +},{}],11:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var PromiseReduce = Promise.reduce; +var PromiseAll = Promise.all; + +function promiseAllThis() { + return PromiseAll(this); +} + +function PromiseMapSeries(promises, fn) { + return PromiseReduce(promises, fn, INTERNAL, INTERNAL); +} + +Promise.prototype.each = function (fn) { + return PromiseReduce(this, fn, INTERNAL, 0) + ._then(promiseAllThis, undefined, undefined, this, undefined); +}; + +Promise.prototype.mapSeries = function (fn) { + return PromiseReduce(this, fn, INTERNAL, INTERNAL); +}; + +Promise.each = function (promises, fn) { + return PromiseReduce(promises, fn, INTERNAL, 0) + ._then(promiseAllThis, undefined, undefined, promises, undefined); +}; + +Promise.mapSeries = PromiseMapSeries; +}; + + +},{}],12:[function(_dereq_,module,exports){ +"use strict"; +var es5 = _dereq_("./es5"); +var Objectfreeze = es5.freeze; +var util = _dereq_("./util"); +var inherits = util.inherits; +var notEnumerableProp = util.notEnumerableProp; + +function subError(nameProperty, defaultMessage) { + function SubError(message) { + if (!(this instanceof SubError)) return new SubError(message); + notEnumerableProp(this, "message", + typeof message === "string" ? message : defaultMessage); + notEnumerableProp(this, "name", nameProperty); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + Error.call(this); + } + } + inherits(SubError, Error); + return SubError; +} + +var _TypeError, _RangeError; +var Warning = subError("Warning", "warning"); +var CancellationError = subError("CancellationError", "cancellation error"); +var TimeoutError = subError("TimeoutError", "timeout error"); +var AggregateError = subError("AggregateError", "aggregate error"); +try { + _TypeError = TypeError; + _RangeError = RangeError; +} catch(e) { + _TypeError = subError("TypeError", "type error"); + _RangeError = subError("RangeError", "range error"); +} + +var methods = ("join pop push shift unshift slice filter forEach some " + + "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" "); + +for (var i = 0; i < methods.length; ++i) { + if (typeof Array.prototype[methods[i]] === "function") { + AggregateError.prototype[methods[i]] = Array.prototype[methods[i]]; + } +} + +es5.defineProperty(AggregateError.prototype, "length", { + value: 0, + configurable: false, + writable: true, + enumerable: true +}); +AggregateError.prototype["isOperational"] = true; +var level = 0; +AggregateError.prototype.toString = function() { + var indent = Array(level * 4 + 1).join(" "); + var ret = "\n" + indent + "AggregateError of:" + "\n"; + level++; + indent = Array(level * 4 + 1).join(" "); + for (var i = 0; i < this.length; ++i) { + var str = this[i] === this ? "[Circular AggregateError]" : this[i] + ""; + var lines = str.split("\n"); + for (var j = 0; j < lines.length; ++j) { + lines[j] = indent + lines[j]; + } + str = lines.join("\n"); + ret += str + "\n"; + } + level--; + return ret; +}; + +function OperationalError(message) { + if (!(this instanceof OperationalError)) + return new OperationalError(message); + notEnumerableProp(this, "name", "OperationalError"); + notEnumerableProp(this, "message", message); + this.cause = message; + this["isOperational"] = true; + + if (message instanceof Error) { + notEnumerableProp(this, "message", message.message); + notEnumerableProp(this, "stack", message.stack); + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + +} +inherits(OperationalError, Error); + +var errorTypes = Error["__BluebirdErrorTypes__"]; +if (!errorTypes) { + errorTypes = Objectfreeze({ + CancellationError: CancellationError, + TimeoutError: TimeoutError, + OperationalError: OperationalError, + RejectionError: OperationalError, + AggregateError: AggregateError + }); + es5.defineProperty(Error, "__BluebirdErrorTypes__", { + value: errorTypes, + writable: false, + enumerable: false, + configurable: false + }); +} + +module.exports = { + Error: Error, + TypeError: _TypeError, + RangeError: _RangeError, + CancellationError: errorTypes.CancellationError, + OperationalError: errorTypes.OperationalError, + TimeoutError: errorTypes.TimeoutError, + AggregateError: errorTypes.AggregateError, + Warning: Warning +}; + +},{"./es5":13,"./util":36}],13:[function(_dereq_,module,exports){ +var isES5 = (function(){ + "use strict"; + return this === undefined; +})(); + +if (isES5) { + module.exports = { + freeze: Object.freeze, + defineProperty: Object.defineProperty, + getDescriptor: Object.getOwnPropertyDescriptor, + keys: Object.keys, + names: Object.getOwnPropertyNames, + getPrototypeOf: Object.getPrototypeOf, + isArray: Array.isArray, + isES5: isES5, + propertyIsWritable: function(obj, prop) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + return !!(!descriptor || descriptor.writable || descriptor.set); + } + }; +} else { + var has = {}.hasOwnProperty; + var str = {}.toString; + var proto = {}.constructor.prototype; + + var ObjectKeys = function (o) { + var ret = []; + for (var key in o) { + if (has.call(o, key)) { + ret.push(key); + } + } + return ret; + }; + + var ObjectGetDescriptor = function(o, key) { + return {value: o[key]}; + }; + + var ObjectDefineProperty = function (o, key, desc) { + o[key] = desc.value; + return o; + }; + + var ObjectFreeze = function (obj) { + return obj; + }; + + var ObjectGetPrototypeOf = function (obj) { + try { + return Object(obj).constructor.prototype; + } + catch (e) { + return proto; + } + }; + + var ArrayIsArray = function (obj) { + try { + return str.call(obj) === "[object Array]"; + } + catch(e) { + return false; + } + }; + + module.exports = { + isArray: ArrayIsArray, + keys: ObjectKeys, + names: ObjectKeys, + defineProperty: ObjectDefineProperty, + getDescriptor: ObjectGetDescriptor, + freeze: ObjectFreeze, + getPrototypeOf: ObjectGetPrototypeOf, + isES5: isES5, + propertyIsWritable: function() { + return true; + } + }; +} + +},{}],14:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var PromiseMap = Promise.map; + +Promise.prototype.filter = function (fn, options) { + return PromiseMap(this, fn, options, INTERNAL); +}; + +Promise.filter = function (promises, fn, options) { + return PromiseMap(promises, fn, options, INTERNAL); +}; +}; + +},{}],15:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) { +var util = _dereq_("./util"); +var CancellationError = Promise.CancellationError; +var errorObj = util.errorObj; +var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER); + +function PassThroughHandlerContext(promise, type, handler) { + this.promise = promise; + this.type = type; + this.handler = handler; + this.called = false; + this.cancelPromise = null; +} + +PassThroughHandlerContext.prototype.isFinallyHandler = function() { + return this.type === 0; +}; + +function FinallyHandlerCancelReaction(finallyHandler) { + this.finallyHandler = finallyHandler; +} + +FinallyHandlerCancelReaction.prototype._resultCancelled = function() { + checkCancel(this.finallyHandler); +}; + +function checkCancel(ctx, reason) { + if (ctx.cancelPromise != null) { + if (arguments.length > 1) { + ctx.cancelPromise._reject(reason); + } else { + ctx.cancelPromise._cancel(); + } + ctx.cancelPromise = null; + return true; + } + return false; +} + +function succeed() { + return finallyHandler.call(this, this.promise._target()._settledValue()); +} +function fail(reason) { + if (checkCancel(this, reason)) return; + errorObj.e = reason; + return errorObj; +} +function finallyHandler(reasonOrValue) { + var promise = this.promise; + var handler = this.handler; + + if (!this.called) { + this.called = true; + var ret = this.isFinallyHandler() + ? handler.call(promise._boundValue()) + : handler.call(promise._boundValue(), reasonOrValue); + if (ret === NEXT_FILTER) { + return ret; + } else if (ret !== undefined) { + promise._setReturnedNonUndefined(); + var maybePromise = tryConvertToPromise(ret, promise); + if (maybePromise instanceof Promise) { + if (this.cancelPromise != null) { + if (maybePromise._isCancelled()) { + var reason = + new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + errorObj.e = reason; + return errorObj; + } else if (maybePromise.isPending()) { + maybePromise._attachCancellationCallback( + new FinallyHandlerCancelReaction(this)); + } + } + return maybePromise._then( + succeed, fail, undefined, this, undefined); + } + } + } + + if (promise.isRejected()) { + checkCancel(this); + errorObj.e = reasonOrValue; + return errorObj; + } else { + checkCancel(this); + return reasonOrValue; + } +} + +Promise.prototype._passThrough = function(handler, type, success, fail) { + if (typeof handler !== "function") return this.then(); + return this._then(success, + fail, + undefined, + new PassThroughHandlerContext(this, type, handler), + undefined); +}; + +Promise.prototype.lastly = +Promise.prototype["finally"] = function (handler) { + return this._passThrough(handler, + 0, + finallyHandler, + finallyHandler); +}; + + +Promise.prototype.tap = function (handler) { + return this._passThrough(handler, 1, finallyHandler); +}; + +Promise.prototype.tapCatch = function (handlerOrPredicate) { + var len = arguments.length; + if(len === 1) { + return this._passThrough(handlerOrPredicate, + 1, + undefined, + finallyHandler); + } else { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util.isObject(item)) { + catchInstances[j++] = item; + } else { + return Promise.reject(new TypeError( + "tapCatch statement predicate: " + + "expecting an object but got " + util.classString(item) + )); + } + } + catchInstances.length = j; + var handler = arguments[i]; + return this._passThrough(catchFilter(catchInstances, handler, this), + 1, + undefined, + finallyHandler); + } + +}; + +return PassThroughHandlerContext; +}; + +},{"./catch_filter":7,"./util":36}],16:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, + apiRejection, + INTERNAL, + tryConvertToPromise, + Proxyable, + debug) { +var errors = _dereq_("./errors"); +var TypeError = errors.TypeError; +var util = _dereq_("./util"); +var errorObj = util.errorObj; +var tryCatch = util.tryCatch; +var yieldHandlers = []; + +function promiseFromYieldHandler(value, yieldHandlers, traceParent) { + for (var i = 0; i < yieldHandlers.length; ++i) { + traceParent._pushContext(); + var result = tryCatch(yieldHandlers[i])(value); + traceParent._popContext(); + if (result === errorObj) { + traceParent._pushContext(); + var ret = Promise.reject(errorObj.e); + traceParent._popContext(); + return ret; + } + var maybePromise = tryConvertToPromise(result, traceParent); + if (maybePromise instanceof Promise) return maybePromise; + } + return null; +} + +function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) { + if (debug.cancellation()) { + var internal = new Promise(INTERNAL); + var _finallyPromise = this._finallyPromise = new Promise(INTERNAL); + this._promise = internal.lastly(function() { + return _finallyPromise; + }); + internal._captureStackTrace(); + internal._setOnCancel(this); + } else { + var promise = this._promise = new Promise(INTERNAL); + promise._captureStackTrace(); + } + this._stack = stack; + this._generatorFunction = generatorFunction; + this._receiver = receiver; + this._generator = undefined; + this._yieldHandlers = typeof yieldHandler === "function" + ? [yieldHandler].concat(yieldHandlers) + : yieldHandlers; + this._yieldedPromise = null; + this._cancellationPhase = false; +} +util.inherits(PromiseSpawn, Proxyable); + +PromiseSpawn.prototype._isResolved = function() { + return this._promise === null; +}; + +PromiseSpawn.prototype._cleanup = function() { + this._promise = this._generator = null; + if (debug.cancellation() && this._finallyPromise !== null) { + this._finallyPromise._fulfill(); + this._finallyPromise = null; + } +}; + +PromiseSpawn.prototype._promiseCancelled = function() { + if (this._isResolved()) return; + var implementsReturn = typeof this._generator["return"] !== "undefined"; + + var result; + if (!implementsReturn) { + var reason = new Promise.CancellationError( + "generator .return() sentinel"); + Promise.coroutine.returnSentinel = reason; + this._promise._attachExtraTrace(reason); + this._promise._pushContext(); + result = tryCatch(this._generator["throw"]).call(this._generator, + reason); + this._promise._popContext(); + } else { + this._promise._pushContext(); + result = tryCatch(this._generator["return"]).call(this._generator, + undefined); + this._promise._popContext(); + } + this._cancellationPhase = true; + this._yieldedPromise = null; + this._continue(result); +}; + +PromiseSpawn.prototype._promiseFulfilled = function(value) { + this._yieldedPromise = null; + this._promise._pushContext(); + var result = tryCatch(this._generator.next).call(this._generator, value); + this._promise._popContext(); + this._continue(result); +}; + +PromiseSpawn.prototype._promiseRejected = function(reason) { + this._yieldedPromise = null; + this._promise._attachExtraTrace(reason); + this._promise._pushContext(); + var result = tryCatch(this._generator["throw"]) + .call(this._generator, reason); + this._promise._popContext(); + this._continue(result); +}; + +PromiseSpawn.prototype._resultCancelled = function() { + if (this._yieldedPromise instanceof Promise) { + var promise = this._yieldedPromise; + this._yieldedPromise = null; + promise.cancel(); + } +}; + +PromiseSpawn.prototype.promise = function () { + return this._promise; +}; + +PromiseSpawn.prototype._run = function () { + this._generator = this._generatorFunction.call(this._receiver); + this._receiver = + this._generatorFunction = undefined; + this._promiseFulfilled(undefined); +}; + +PromiseSpawn.prototype._continue = function (result) { + var promise = this._promise; + if (result === errorObj) { + this._cleanup(); + if (this._cancellationPhase) { + return promise.cancel(); + } else { + return promise._rejectCallback(result.e, false); + } + } + + var value = result.value; + if (result.done === true) { + this._cleanup(); + if (this._cancellationPhase) { + return promise.cancel(); + } else { + return promise._resolveCallback(value); + } + } else { + var maybePromise = tryConvertToPromise(value, this._promise); + if (!(maybePromise instanceof Promise)) { + maybePromise = + promiseFromYieldHandler(maybePromise, + this._yieldHandlers, + this._promise); + if (maybePromise === null) { + this._promiseRejected( + new TypeError( + "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", String(value)) + + "From coroutine:\u000a" + + this._stack.split("\n").slice(1, -7).join("\n") + ) + ); + return; + } + } + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + this._yieldedPromise = maybePromise; + maybePromise._proxy(this, null); + } else if (((bitField & 33554432) !== 0)) { + Promise._async.invoke( + this._promiseFulfilled, this, maybePromise._value() + ); + } else if (((bitField & 16777216) !== 0)) { + Promise._async.invoke( + this._promiseRejected, this, maybePromise._reason() + ); + } else { + this._promiseCancelled(); + } + } +}; + +Promise.coroutine = function (generatorFunction, options) { + if (typeof generatorFunction !== "function") { + throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var yieldHandler = Object(options).yieldHandler; + var PromiseSpawn$ = PromiseSpawn; + var stack = new Error().stack; + return function () { + var generator = generatorFunction.apply(this, arguments); + var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler, + stack); + var ret = spawn.promise(); + spawn._generator = generator; + spawn._promiseFulfilled(undefined); + return ret; + }; +}; + +Promise.coroutine.addYieldHandler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + yieldHandlers.push(fn); +}; + +Promise.spawn = function (generatorFunction) { + debug.deprecated("Promise.spawn()", "Promise.coroutine()"); + if (typeof generatorFunction !== "function") { + return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var spawn = new PromiseSpawn(generatorFunction, this); + var ret = spawn.promise(); + spawn._run(Promise.spawn); + return ret; +}; +}; + +},{"./errors":12,"./util":36}],17:[function(_dereq_,module,exports){ +"use strict"; +module.exports = +function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, + getDomain) { +var util = _dereq_("./util"); +var canEvaluate = util.canEvaluate; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var reject; + +if (!true) { +if (canEvaluate) { + var thenCallback = function(i) { + return new Function("value", "holder", " \n\ + 'use strict'; \n\ + holder.pIndex = value; \n\ + holder.checkFulfillment(this); \n\ + ".replace(/Index/g, i)); + }; + + var promiseSetter = function(i) { + return new Function("promise", "holder", " \n\ + 'use strict'; \n\ + holder.pIndex = promise; \n\ + ".replace(/Index/g, i)); + }; + + var generateHolderClass = function(total) { + var props = new Array(total); + for (var i = 0; i < props.length; ++i) { + props[i] = "this.p" + (i+1); + } + var assignment = props.join(" = ") + " = null;"; + var cancellationCode= "var promise;\n" + props.map(function(prop) { + return " \n\ + promise = " + prop + "; \n\ + if (promise instanceof Promise) { \n\ + promise.cancel(); \n\ + } \n\ + "; + }).join("\n"); + var passedArguments = props.join(", "); + var name = "Holder$" + total; + + + var code = "return function(tryCatch, errorObj, Promise, async) { \n\ + 'use strict'; \n\ + function [TheName](fn) { \n\ + [TheProperties] \n\ + this.fn = fn; \n\ + this.asyncNeeded = true; \n\ + this.now = 0; \n\ + } \n\ + \n\ + [TheName].prototype._callFunction = function(promise) { \n\ + promise._pushContext(); \n\ + var ret = tryCatch(this.fn)([ThePassedArguments]); \n\ + promise._popContext(); \n\ + if (ret === errorObj) { \n\ + promise._rejectCallback(ret.e, false); \n\ + } else { \n\ + promise._resolveCallback(ret); \n\ + } \n\ + }; \n\ + \n\ + [TheName].prototype.checkFulfillment = function(promise) { \n\ + var now = ++this.now; \n\ + if (now === [TheTotal]) { \n\ + if (this.asyncNeeded) { \n\ + async.invoke(this._callFunction, this, promise); \n\ + } else { \n\ + this._callFunction(promise); \n\ + } \n\ + \n\ + } \n\ + }; \n\ + \n\ + [TheName].prototype._resultCancelled = function() { \n\ + [CancellationCode] \n\ + }; \n\ + \n\ + return [TheName]; \n\ + }(tryCatch, errorObj, Promise, async); \n\ + "; + + code = code.replace(/\[TheName\]/g, name) + .replace(/\[TheTotal\]/g, total) + .replace(/\[ThePassedArguments\]/g, passedArguments) + .replace(/\[TheProperties\]/g, assignment) + .replace(/\[CancellationCode\]/g, cancellationCode); + + return new Function("tryCatch", "errorObj", "Promise", "async", code) + (tryCatch, errorObj, Promise, async); + }; + + var holderClasses = []; + var thenCallbacks = []; + var promiseSetters = []; + + for (var i = 0; i < 8; ++i) { + holderClasses.push(generateHolderClass(i + 1)); + thenCallbacks.push(thenCallback(i + 1)); + promiseSetters.push(promiseSetter(i + 1)); + } + + reject = function (reason) { + this._reject(reason); + }; +}} + +Promise.join = function () { + var last = arguments.length - 1; + var fn; + if (last > 0 && typeof arguments[last] === "function") { + fn = arguments[last]; + if (!true) { + if (last <= 8 && canEvaluate) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + var HolderClass = holderClasses[last - 1]; + var holder = new HolderClass(fn); + var callbacks = thenCallbacks; + + for (var i = 0; i < last; ++i) { + var maybePromise = tryConvertToPromise(arguments[i], ret); + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + maybePromise._then(callbacks[i], reject, + undefined, ret, holder); + promiseSetters[i](maybePromise, holder); + holder.asyncNeeded = false; + } else if (((bitField & 33554432) !== 0)) { + callbacks[i].call(ret, + maybePromise._value(), holder); + } else if (((bitField & 16777216) !== 0)) { + ret._reject(maybePromise._reason()); + } else { + ret._cancel(); + } + } else { + callbacks[i].call(ret, maybePromise, holder); + } + } + + if (!ret._isFateSealed()) { + if (holder.asyncNeeded) { + var domain = getDomain(); + if (domain !== null) { + holder.fn = util.domainBind(domain, holder.fn); + } + } + ret._setAsyncGuaranteed(); + ret._setOnCancel(holder); + } + return ret; + } + } + } + var args = [].slice.call(arguments);; + if (fn) args.pop(); + var ret = new PromiseArray(args).promise(); + return fn !== undefined ? ret.spread(fn) : ret; +}; + +}; + +},{"./util":36}],18:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, + PromiseArray, + apiRejection, + tryConvertToPromise, + INTERNAL, + debug) { +var getDomain = Promise._getDomain; +var util = _dereq_("./util"); +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var async = Promise._async; + +function MappingPromiseArray(promises, fn, limit, _filter) { + this.constructor$(promises); + this._promise._captureStackTrace(); + var domain = getDomain(); + this._callback = domain === null ? fn : util.domainBind(domain, fn); + this._preservedValues = _filter === INTERNAL + ? new Array(this.length()) + : null; + this._limit = limit; + this._inFlight = 0; + this._queue = []; + async.invoke(this._asyncInit, this, undefined); +} +util.inherits(MappingPromiseArray, PromiseArray); + +MappingPromiseArray.prototype._asyncInit = function() { + this._init$(undefined, -2); +}; + +MappingPromiseArray.prototype._init = function () {}; + +MappingPromiseArray.prototype._promiseFulfilled = function (value, index) { + var values = this._values; + var length = this.length(); + var preservedValues = this._preservedValues; + var limit = this._limit; + + if (index < 0) { + index = (index * -1) - 1; + values[index] = value; + if (limit >= 1) { + this._inFlight--; + this._drainQueue(); + if (this._isResolved()) return true; + } + } else { + if (limit >= 1 && this._inFlight >= limit) { + values[index] = value; + this._queue.push(index); + return false; + } + if (preservedValues !== null) preservedValues[index] = value; + + var promise = this._promise; + var callback = this._callback; + var receiver = promise._boundValue(); + promise._pushContext(); + var ret = tryCatch(callback).call(receiver, value, index, length); + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, + promiseCreated, + preservedValues !== null ? "Promise.filter" : "Promise.map", + promise + ); + if (ret === errorObj) { + this._reject(ret.e); + return true; + } + + var maybePromise = tryConvertToPromise(ret, this._promise); + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + if (limit >= 1) this._inFlight++; + values[index] = maybePromise; + maybePromise._proxy(this, (index + 1) * -1); + return false; + } else if (((bitField & 33554432) !== 0)) { + ret = maybePromise._value(); + } else if (((bitField & 16777216) !== 0)) { + this._reject(maybePromise._reason()); + return true; + } else { + this._cancel(); + return true; + } + } + values[index] = ret; + } + var totalResolved = ++this._totalResolved; + if (totalResolved >= length) { + if (preservedValues !== null) { + this._filter(values, preservedValues); + } else { + this._resolve(values); + } + return true; + } + return false; +}; + +MappingPromiseArray.prototype._drainQueue = function () { + var queue = this._queue; + var limit = this._limit; + var values = this._values; + while (queue.length > 0 && this._inFlight < limit) { + if (this._isResolved()) return; + var index = queue.pop(); + this._promiseFulfilled(values[index], index); + } +}; + +MappingPromiseArray.prototype._filter = function (booleans, values) { + var len = values.length; + var ret = new Array(len); + var j = 0; + for (var i = 0; i < len; ++i) { + if (booleans[i]) ret[j++] = values[i]; + } + ret.length = j; + this._resolve(ret); +}; + +MappingPromiseArray.prototype.preservedValues = function () { + return this._preservedValues; +}; + +function map(promises, fn, options, _filter) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + + var limit = 0; + if (options !== undefined) { + if (typeof options === "object" && options !== null) { + if (typeof options.concurrency !== "number") { + return Promise.reject( + new TypeError("'concurrency' must be a number but it is " + + util.classString(options.concurrency))); + } + limit = options.concurrency; + } else { + return Promise.reject(new TypeError( + "options argument must be an object but it is " + + util.classString(options))); + } + } + limit = typeof limit === "number" && + isFinite(limit) && limit >= 1 ? limit : 0; + return new MappingPromiseArray(promises, fn, limit, _filter).promise(); +} + +Promise.prototype.map = function (fn, options) { + return map(this, fn, options, null); +}; + +Promise.map = function (promises, fn, options, _filter) { + return map(promises, fn, options, _filter); +}; + + +}; + +},{"./util":36}],19:[function(_dereq_,module,exports){ +"use strict"; +module.exports = +function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) { +var util = _dereq_("./util"); +var tryCatch = util.tryCatch; + +Promise.method = function (fn) { + if (typeof fn !== "function") { + throw new Promise.TypeError("expecting a function but got " + util.classString(fn)); + } + return function () { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._pushContext(); + var value = tryCatch(fn).apply(this, arguments); + var promiseCreated = ret._popContext(); + debug.checkForgottenReturns( + value, promiseCreated, "Promise.method", ret); + ret._resolveFromSyncValue(value); + return ret; + }; +}; + +Promise.attempt = Promise["try"] = function (fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._pushContext(); + var value; + if (arguments.length > 1) { + debug.deprecated("calling Promise.try with more than 1 argument"); + var arg = arguments[1]; + var ctx = arguments[2]; + value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg) + : tryCatch(fn).call(ctx, arg); + } else { + value = tryCatch(fn)(); + } + var promiseCreated = ret._popContext(); + debug.checkForgottenReturns( + value, promiseCreated, "Promise.try", ret); + ret._resolveFromSyncValue(value); + return ret; +}; + +Promise.prototype._resolveFromSyncValue = function (value) { + if (value === util.errorObj) { + this._rejectCallback(value.e, false); + } else { + this._resolveCallback(value, true); + } +}; +}; + +},{"./util":36}],20:[function(_dereq_,module,exports){ +"use strict"; +var util = _dereq_("./util"); +var maybeWrapAsError = util.maybeWrapAsError; +var errors = _dereq_("./errors"); +var OperationalError = errors.OperationalError; +var es5 = _dereq_("./es5"); + +function isUntypedError(obj) { + return obj instanceof Error && + es5.getPrototypeOf(obj) === Error.prototype; +} + +var rErrorKey = /^(?:name|message|stack|cause)$/; +function wrapAsOperationalError(obj) { + var ret; + if (isUntypedError(obj)) { + ret = new OperationalError(obj); + ret.name = obj.name; + ret.message = obj.message; + ret.stack = obj.stack; + var keys = es5.keys(obj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (!rErrorKey.test(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + util.markAsOriginatingFromRejection(obj); + return obj; +} + +function nodebackForPromise(promise, multiArgs) { + return function(err, value) { + if (promise === null) return; + if (err) { + var wrapped = wrapAsOperationalError(maybeWrapAsError(err)); + promise._attachExtraTrace(wrapped); + promise._reject(wrapped); + } else if (!multiArgs) { + promise._fulfill(value); + } else { + var args = [].slice.call(arguments, 1);; + promise._fulfill(args); + } + promise = null; + }; +} + +module.exports = nodebackForPromise; + +},{"./errors":12,"./es5":13,"./util":36}],21:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise) { +var util = _dereq_("./util"); +var async = Promise._async; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; + +function spreadAdapter(val, nodeback) { + var promise = this; + if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback); + var ret = + tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val)); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} + +function successAdapter(val, nodeback) { + var promise = this; + var receiver = promise._boundValue(); + var ret = val === undefined + ? tryCatch(nodeback).call(receiver, null) + : tryCatch(nodeback).call(receiver, null, val); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} +function errorAdapter(reason, nodeback) { + var promise = this; + if (!reason) { + var newReason = new Error(reason + ""); + newReason.cause = reason; + reason = newReason; + } + var ret = tryCatch(nodeback).call(promise._boundValue(), reason); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} + +Promise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback, + options) { + if (typeof nodeback == "function") { + var adapter = successAdapter; + if (options !== undefined && Object(options).spread) { + adapter = spreadAdapter; + } + this._then( + adapter, + errorAdapter, + undefined, + this, + nodeback + ); + } + return this; +}; +}; + +},{"./util":36}],22:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function() { +var makeSelfResolutionError = function () { + return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a"); +}; +var reflectHandler = function() { + return new Promise.PromiseInspection(this._target()); +}; +var apiRejection = function(msg) { + return Promise.reject(new TypeError(msg)); +}; +function Proxyable() {} +var UNDEFINED_BINDING = {}; +var util = _dereq_("./util"); + +var getDomain; +if (util.isNode) { + getDomain = function() { + var ret = process.domain; + if (ret === undefined) ret = null; + return ret; + }; +} else { + getDomain = function() { + return null; + }; +} +util.notEnumerableProp(Promise, "_getDomain", getDomain); + +var es5 = _dereq_("./es5"); +var Async = _dereq_("./async"); +var async = new Async(); +es5.defineProperty(Promise, "_async", {value: async}); +var errors = _dereq_("./errors"); +var TypeError = Promise.TypeError = errors.TypeError; +Promise.RangeError = errors.RangeError; +var CancellationError = Promise.CancellationError = errors.CancellationError; +Promise.TimeoutError = errors.TimeoutError; +Promise.OperationalError = errors.OperationalError; +Promise.RejectionError = errors.OperationalError; +Promise.AggregateError = errors.AggregateError; +var INTERNAL = function(){}; +var APPLY = {}; +var NEXT_FILTER = {}; +var tryConvertToPromise = _dereq_("./thenables")(Promise, INTERNAL); +var PromiseArray = + _dereq_("./promise_array")(Promise, INTERNAL, + tryConvertToPromise, apiRejection, Proxyable); +var Context = _dereq_("./context")(Promise); + /*jshint unused:false*/ +var createContext = Context.create; +var debug = _dereq_("./debuggability")(Promise, Context); +var CapturedTrace = debug.CapturedTrace; +var PassThroughHandlerContext = + _dereq_("./finally")(Promise, tryConvertToPromise, NEXT_FILTER); +var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER); +var nodebackForPromise = _dereq_("./nodeback"); +var errorObj = util.errorObj; +var tryCatch = util.tryCatch; +function check(self, executor) { + if (self == null || self.constructor !== Promise) { + throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + if (typeof executor !== "function") { + throw new TypeError("expecting a function but got " + util.classString(executor)); + } + +} + +function Promise(executor) { + if (executor !== INTERNAL) { + check(this, executor); + } + this._bitField = 0; + this._fulfillmentHandler0 = undefined; + this._rejectionHandler0 = undefined; + this._promise0 = undefined; + this._receiver0 = undefined; + this._resolveFromExecutor(executor); + this._promiseCreated(); + this._fireEvent("promiseCreated", this); +} + +Promise.prototype.toString = function () { + return "[object Promise]"; +}; + +Promise.prototype.caught = Promise.prototype["catch"] = function (fn) { + var len = arguments.length; + if (len > 1) { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util.isObject(item)) { + catchInstances[j++] = item; + } else { + return apiRejection("Catch statement predicate: " + + "expecting an object but got " + util.classString(item)); + } + } + catchInstances.length = j; + fn = arguments[i]; + + if (typeof fn !== "function") { + throw new TypeError("The last argument to .catch() " + + "must be a function, got " + util.toString(fn)); + } + return this.then(undefined, catchFilter(catchInstances, fn, this)); + } + return this.then(undefined, fn); +}; + +Promise.prototype.reflect = function () { + return this._then(reflectHandler, + reflectHandler, undefined, this, undefined); +}; + +Promise.prototype.then = function (didFulfill, didReject) { + if (debug.warnings() && arguments.length > 0 && + typeof didFulfill !== "function" && + typeof didReject !== "function") { + var msg = ".then() only accepts functions but was passed: " + + util.classString(didFulfill); + if (arguments.length > 1) { + msg += ", " + util.classString(didReject); + } + this._warn(msg); + } + return this._then(didFulfill, didReject, undefined, undefined, undefined); +}; + +Promise.prototype.done = function (didFulfill, didReject) { + var promise = + this._then(didFulfill, didReject, undefined, undefined, undefined); + promise._setIsFinal(); +}; + +Promise.prototype.spread = function (fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + return this.all()._then(fn, undefined, undefined, APPLY, undefined); +}; + +Promise.prototype.toJSON = function () { + var ret = { + isFulfilled: false, + isRejected: false, + fulfillmentValue: undefined, + rejectionReason: undefined + }; + if (this.isFulfilled()) { + ret.fulfillmentValue = this.value(); + ret.isFulfilled = true; + } else if (this.isRejected()) { + ret.rejectionReason = this.reason(); + ret.isRejected = true; + } + return ret; +}; + +Promise.prototype.all = function () { + if (arguments.length > 0) { + this._warn(".all() was passed arguments but it does not take any"); + } + return new PromiseArray(this).promise(); +}; + +Promise.prototype.error = function (fn) { + return this.caught(util.originatesFromRejection, fn); +}; + +Promise.getNewLibraryCopy = module.exports; + +Promise.is = function (val) { + return val instanceof Promise; +}; + +Promise.fromNode = Promise.fromCallback = function(fn) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs + : false; + var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs)); + if (result === errorObj) { + ret._rejectCallback(result.e, true); + } + if (!ret._isFateSealed()) ret._setAsyncGuaranteed(); + return ret; +}; + +Promise.all = function (promises) { + return new PromiseArray(promises).promise(); +}; + +Promise.cast = function (obj) { + var ret = tryConvertToPromise(obj); + if (!(ret instanceof Promise)) { + ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._setFulfilled(); + ret._rejectionHandler0 = obj; + } + return ret; +}; + +Promise.resolve = Promise.fulfilled = Promise.cast; + +Promise.reject = Promise.rejected = function (reason) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._rejectCallback(reason, true); + return ret; +}; + +Promise.setScheduler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + return async.setScheduler(fn); +}; + +Promise.prototype._then = function ( + didFulfill, + didReject, + _, receiver, + internalData +) { + var haveInternalData = internalData !== undefined; + var promise = haveInternalData ? internalData : new Promise(INTERNAL); + var target = this._target(); + var bitField = target._bitField; + + if (!haveInternalData) { + promise._propagateFrom(this, 3); + promise._captureStackTrace(); + if (receiver === undefined && + ((this._bitField & 2097152) !== 0)) { + if (!((bitField & 50397184) === 0)) { + receiver = this._boundValue(); + } else { + receiver = target === this ? undefined : this._boundTo; + } + } + this._fireEvent("promiseChained", this, promise); + } + + var domain = getDomain(); + if (!((bitField & 50397184) === 0)) { + var handler, value, settler = target._settlePromiseCtx; + if (((bitField & 33554432) !== 0)) { + value = target._rejectionHandler0; + handler = didFulfill; + } else if (((bitField & 16777216) !== 0)) { + value = target._fulfillmentHandler0; + handler = didReject; + target._unsetRejectionIsUnhandled(); + } else { + settler = target._settlePromiseLateCancellationObserver; + value = new CancellationError("late cancellation observer"); + target._attachExtraTrace(value); + handler = didReject; + } + + async.invoke(settler, target, { + handler: domain === null ? handler + : (typeof handler === "function" && + util.domainBind(domain, handler)), + promise: promise, + receiver: receiver, + value: value + }); + } else { + target._addCallbacks(didFulfill, didReject, promise, receiver, domain); + } + + return promise; +}; + +Promise.prototype._length = function () { + return this._bitField & 65535; +}; + +Promise.prototype._isFateSealed = function () { + return (this._bitField & 117506048) !== 0; +}; + +Promise.prototype._isFollowing = function () { + return (this._bitField & 67108864) === 67108864; +}; + +Promise.prototype._setLength = function (len) { + this._bitField = (this._bitField & -65536) | + (len & 65535); +}; + +Promise.prototype._setFulfilled = function () { + this._bitField = this._bitField | 33554432; + this._fireEvent("promiseFulfilled", this); +}; + +Promise.prototype._setRejected = function () { + this._bitField = this._bitField | 16777216; + this._fireEvent("promiseRejected", this); +}; + +Promise.prototype._setFollowing = function () { + this._bitField = this._bitField | 67108864; + this._fireEvent("promiseResolved", this); +}; + +Promise.prototype._setIsFinal = function () { + this._bitField = this._bitField | 4194304; +}; + +Promise.prototype._isFinal = function () { + return (this._bitField & 4194304) > 0; +}; + +Promise.prototype._unsetCancelled = function() { + this._bitField = this._bitField & (~65536); +}; + +Promise.prototype._setCancelled = function() { + this._bitField = this._bitField | 65536; + this._fireEvent("promiseCancelled", this); +}; + +Promise.prototype._setWillBeCancelled = function() { + this._bitField = this._bitField | 8388608; +}; + +Promise.prototype._setAsyncGuaranteed = function() { + if (async.hasCustomScheduler()) return; + this._bitField = this._bitField | 134217728; +}; + +Promise.prototype._receiverAt = function (index) { + var ret = index === 0 ? this._receiver0 : this[ + index * 4 - 4 + 3]; + if (ret === UNDEFINED_BINDING) { + return undefined; + } else if (ret === undefined && this._isBound()) { + return this._boundValue(); + } + return ret; +}; + +Promise.prototype._promiseAt = function (index) { + return this[ + index * 4 - 4 + 2]; +}; + +Promise.prototype._fulfillmentHandlerAt = function (index) { + return this[ + index * 4 - 4 + 0]; +}; + +Promise.prototype._rejectionHandlerAt = function (index) { + return this[ + index * 4 - 4 + 1]; +}; + +Promise.prototype._boundValue = function() {}; + +Promise.prototype._migrateCallback0 = function (follower) { + var bitField = follower._bitField; + var fulfill = follower._fulfillmentHandler0; + var reject = follower._rejectionHandler0; + var promise = follower._promise0; + var receiver = follower._receiverAt(0); + if (receiver === undefined) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); +}; + +Promise.prototype._migrateCallbackAt = function (follower, index) { + var fulfill = follower._fulfillmentHandlerAt(index); + var reject = follower._rejectionHandlerAt(index); + var promise = follower._promiseAt(index); + var receiver = follower._receiverAt(index); + if (receiver === undefined) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); +}; + +Promise.prototype._addCallbacks = function ( + fulfill, + reject, + promise, + receiver, + domain +) { + var index = this._length(); + + if (index >= 65535 - 4) { + index = 0; + this._setLength(0); + } + + if (index === 0) { + this._promise0 = promise; + this._receiver0 = receiver; + if (typeof fulfill === "function") { + this._fulfillmentHandler0 = + domain === null ? fulfill : util.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this._rejectionHandler0 = + domain === null ? reject : util.domainBind(domain, reject); + } + } else { + var base = index * 4 - 4; + this[base + 2] = promise; + this[base + 3] = receiver; + if (typeof fulfill === "function") { + this[base + 0] = + domain === null ? fulfill : util.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this[base + 1] = + domain === null ? reject : util.domainBind(domain, reject); + } + } + this._setLength(index + 1); + return index; +}; + +Promise.prototype._proxy = function (proxyable, arg) { + this._addCallbacks(undefined, undefined, arg, proxyable, null); +}; + +Promise.prototype._resolveCallback = function(value, shouldBind) { + if (((this._bitField & 117506048) !== 0)) return; + if (value === this) + return this._rejectCallback(makeSelfResolutionError(), false); + var maybePromise = tryConvertToPromise(value, this); + if (!(maybePromise instanceof Promise)) return this._fulfill(value); + + if (shouldBind) this._propagateFrom(maybePromise, 2); + + var promise = maybePromise._target(); + + if (promise === this) { + this._reject(makeSelfResolutionError()); + return; + } + + var bitField = promise._bitField; + if (((bitField & 50397184) === 0)) { + var len = this._length(); + if (len > 0) promise._migrateCallback0(this); + for (var i = 1; i < len; ++i) { + promise._migrateCallbackAt(this, i); + } + this._setFollowing(); + this._setLength(0); + this._setFollowee(promise); + } else if (((bitField & 33554432) !== 0)) { + this._fulfill(promise._value()); + } else if (((bitField & 16777216) !== 0)) { + this._reject(promise._reason()); + } else { + var reason = new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + this._reject(reason); + } +}; + +Promise.prototype._rejectCallback = +function(reason, synchronous, ignoreNonErrorWarnings) { + var trace = util.ensureErrorObject(reason); + var hasStack = trace === reason; + if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) { + var message = "a promise was rejected with a non-error: " + + util.classString(reason); + this._warn(message, true); + } + this._attachExtraTrace(trace, synchronous ? hasStack : false); + this._reject(reason); +}; + +Promise.prototype._resolveFromExecutor = function (executor) { + if (executor === INTERNAL) return; + var promise = this; + this._captureStackTrace(); + this._pushContext(); + var synchronous = true; + var r = this._execute(executor, function(value) { + promise._resolveCallback(value); + }, function (reason) { + promise._rejectCallback(reason, synchronous); + }); + synchronous = false; + this._popContext(); + + if (r !== undefined) { + promise._rejectCallback(r, true); + } +}; + +Promise.prototype._settlePromiseFromHandler = function ( + handler, receiver, value, promise +) { + var bitField = promise._bitField; + if (((bitField & 65536) !== 0)) return; + promise._pushContext(); + var x; + if (receiver === APPLY) { + if (!value || typeof value.length !== "number") { + x = errorObj; + x.e = new TypeError("cannot .spread() a non-array: " + + util.classString(value)); + } else { + x = tryCatch(handler).apply(this._boundValue(), value); + } + } else { + x = tryCatch(handler).call(receiver, value); + } + var promiseCreated = promise._popContext(); + bitField = promise._bitField; + if (((bitField & 65536) !== 0)) return; + + if (x === NEXT_FILTER) { + promise._reject(value); + } else if (x === errorObj) { + promise._rejectCallback(x.e, false); + } else { + debug.checkForgottenReturns(x, promiseCreated, "", promise, this); + promise._resolveCallback(x); + } +}; + +Promise.prototype._target = function() { + var ret = this; + while (ret._isFollowing()) ret = ret._followee(); + return ret; +}; + +Promise.prototype._followee = function() { + return this._rejectionHandler0; +}; + +Promise.prototype._setFollowee = function(promise) { + this._rejectionHandler0 = promise; +}; + +Promise.prototype._settlePromise = function(promise, handler, receiver, value) { + var isPromise = promise instanceof Promise; + var bitField = this._bitField; + var asyncGuaranteed = ((bitField & 134217728) !== 0); + if (((bitField & 65536) !== 0)) { + if (isPromise) promise._invokeInternalOnCancel(); + + if (receiver instanceof PassThroughHandlerContext && + receiver.isFinallyHandler()) { + receiver.cancelPromise = promise; + if (tryCatch(handler).call(receiver, value) === errorObj) { + promise._reject(errorObj.e); + } + } else if (handler === reflectHandler) { + promise._fulfill(reflectHandler.call(receiver)); + } else if (receiver instanceof Proxyable) { + receiver._promiseCancelled(promise); + } else if (isPromise || promise instanceof PromiseArray) { + promise._cancel(); + } else { + receiver.cancel(); + } + } else if (typeof handler === "function") { + if (!isPromise) { + handler.call(receiver, value, promise); + } else { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (receiver instanceof Proxyable) { + if (!receiver._isResolved()) { + if (((bitField & 33554432) !== 0)) { + receiver._promiseFulfilled(value, promise); + } else { + receiver._promiseRejected(value, promise); + } + } + } else if (isPromise) { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + if (((bitField & 33554432) !== 0)) { + promise._fulfill(value); + } else { + promise._reject(value); + } + } +}; + +Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) { + var handler = ctx.handler; + var promise = ctx.promise; + var receiver = ctx.receiver; + var value = ctx.value; + if (typeof handler === "function") { + if (!(promise instanceof Promise)) { + handler.call(receiver, value, promise); + } else { + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (promise instanceof Promise) { + promise._reject(value); + } +}; + +Promise.prototype._settlePromiseCtx = function(ctx) { + this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value); +}; + +Promise.prototype._settlePromise0 = function(handler, value, bitField) { + var promise = this._promise0; + var receiver = this._receiverAt(0); + this._promise0 = undefined; + this._receiver0 = undefined; + this._settlePromise(promise, handler, receiver, value); +}; + +Promise.prototype._clearCallbackDataAtIndex = function(index) { + var base = index * 4 - 4; + this[base + 2] = + this[base + 3] = + this[base + 0] = + this[base + 1] = undefined; +}; + +Promise.prototype._fulfill = function (value) { + var bitField = this._bitField; + if (((bitField & 117506048) >>> 16)) return; + if (value === this) { + var err = makeSelfResolutionError(); + this._attachExtraTrace(err); + return this._reject(err); + } + this._setFulfilled(); + this._rejectionHandler0 = value; + + if ((bitField & 65535) > 0) { + if (((bitField & 134217728) !== 0)) { + this._settlePromises(); + } else { + async.settlePromises(this); + } + this._dereferenceTrace(); + } +}; + +Promise.prototype._reject = function (reason) { + var bitField = this._bitField; + if (((bitField & 117506048) >>> 16)) return; + this._setRejected(); + this._fulfillmentHandler0 = reason; + + if (this._isFinal()) { + return async.fatalError(reason, util.isNode); + } + + if ((bitField & 65535) > 0) { + async.settlePromises(this); + } else { + this._ensurePossibleRejectionHandled(); + } +}; + +Promise.prototype._fulfillPromises = function (len, value) { + for (var i = 1; i < len; i++) { + var handler = this._fulfillmentHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, value); + } +}; + +Promise.prototype._rejectPromises = function (len, reason) { + for (var i = 1; i < len; i++) { + var handler = this._rejectionHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, reason); + } +}; + +Promise.prototype._settlePromises = function () { + var bitField = this._bitField; + var len = (bitField & 65535); + + if (len > 0) { + if (((bitField & 16842752) !== 0)) { + var reason = this._fulfillmentHandler0; + this._settlePromise0(this._rejectionHandler0, reason, bitField); + this._rejectPromises(len, reason); + } else { + var value = this._rejectionHandler0; + this._settlePromise0(this._fulfillmentHandler0, value, bitField); + this._fulfillPromises(len, value); + } + this._setLength(0); + } + this._clearCancellationData(); +}; + +Promise.prototype._settledValue = function() { + var bitField = this._bitField; + if (((bitField & 33554432) !== 0)) { + return this._rejectionHandler0; + } else if (((bitField & 16777216) !== 0)) { + return this._fulfillmentHandler0; + } +}; + +if (typeof Symbol !== "undefined" && Symbol.toStringTag) { + es5.defineProperty(Promise.prototype, Symbol.toStringTag, { + get: function () { + return "Object"; + } + }); +} + +function deferResolve(v) {this.promise._resolveCallback(v);} +function deferReject(v) {this.promise._rejectCallback(v, false);} + +Promise.defer = Promise.pending = function() { + debug.deprecated("Promise.defer", "new Promise"); + var promise = new Promise(INTERNAL); + return { + promise: promise, + resolve: deferResolve, + reject: deferReject + }; +}; + +util.notEnumerableProp(Promise, + "_makeSelfResolutionError", + makeSelfResolutionError); + +_dereq_("./method")(Promise, INTERNAL, tryConvertToPromise, apiRejection, + debug); +_dereq_("./bind")(Promise, INTERNAL, tryConvertToPromise, debug); +_dereq_("./cancel")(Promise, PromiseArray, apiRejection, debug); +_dereq_("./direct_resolve")(Promise); +_dereq_("./synchronous_inspection")(Promise); +_dereq_("./join")( + Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain); +Promise.Promise = Promise; +Promise.version = "3.5.5"; +_dereq_('./call_get.js')(Promise); +_dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug); +_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); +_dereq_('./nodeify.js')(Promise); +_dereq_('./promisify.js')(Promise, INTERNAL); +_dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection); +_dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection); +_dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); +_dereq_('./settle.js')(Promise, PromiseArray, debug); +_dereq_('./some.js')(Promise, PromiseArray, apiRejection); +_dereq_('./timers.js')(Promise, INTERNAL, debug); +_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug); +_dereq_('./any.js')(Promise); +_dereq_('./each.js')(Promise, INTERNAL); +_dereq_('./filter.js')(Promise, INTERNAL); + + util.toFastProperties(Promise); + util.toFastProperties(Promise.prototype); + function fillTypes(value) { + var p = new Promise(INTERNAL); + p._fulfillmentHandler0 = value; + p._rejectionHandler0 = value; + p._promise0 = value; + p._receiver0 = value; + } + // Complete slack tracking, opt out of field-type tracking and + // stabilize map + fillTypes({a: 1}); + fillTypes({b: 2}); + fillTypes({c: 3}); + fillTypes(1); + fillTypes(function(){}); + fillTypes(undefined); + fillTypes(false); + fillTypes(new Promise(INTERNAL)); + debug.setBounds(Async.firstLineError, util.lastLineError); + return Promise; + +}; + +},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL, tryConvertToPromise, + apiRejection, Proxyable) { +var util = _dereq_("./util"); +var isArray = util.isArray; + +function toResolutionValue(val) { + switch(val) { + case -2: return []; + case -3: return {}; + case -6: return new Map(); + } +} + +function PromiseArray(values) { + var promise = this._promise = new Promise(INTERNAL); + if (values instanceof Promise) { + promise._propagateFrom(values, 3); + } + promise._setOnCancel(this); + this._values = values; + this._length = 0; + this._totalResolved = 0; + this._init(undefined, -2); +} +util.inherits(PromiseArray, Proxyable); + +PromiseArray.prototype.length = function () { + return this._length; +}; + +PromiseArray.prototype.promise = function () { + return this._promise; +}; + +PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) { + var values = tryConvertToPromise(this._values, this._promise); + if (values instanceof Promise) { + values = values._target(); + var bitField = values._bitField; + ; + this._values = values; + + if (((bitField & 50397184) === 0)) { + this._promise._setAsyncGuaranteed(); + return values._then( + init, + this._reject, + undefined, + this, + resolveValueIfEmpty + ); + } else if (((bitField & 33554432) !== 0)) { + values = values._value(); + } else if (((bitField & 16777216) !== 0)) { + return this._reject(values._reason()); + } else { + return this._cancel(); + } + } + values = util.asArray(values); + if (values === null) { + var err = apiRejection( + "expecting an array or an iterable object but got " + util.classString(values)).reason(); + this._promise._rejectCallback(err, false); + return; + } + + if (values.length === 0) { + if (resolveValueIfEmpty === -5) { + this._resolveEmptyArray(); + } + else { + this._resolve(toResolutionValue(resolveValueIfEmpty)); + } + return; + } + this._iterate(values); +}; + +PromiseArray.prototype._iterate = function(values) { + var len = this.getActualLength(values.length); + this._length = len; + this._values = this.shouldCopyValues() ? new Array(len) : this._values; + var result = this._promise; + var isResolved = false; + var bitField = null; + for (var i = 0; i < len; ++i) { + var maybePromise = tryConvertToPromise(values[i], result); + + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + bitField = maybePromise._bitField; + } else { + bitField = null; + } + + if (isResolved) { + if (bitField !== null) { + maybePromise.suppressUnhandledRejections(); + } + } else if (bitField !== null) { + if (((bitField & 50397184) === 0)) { + maybePromise._proxy(this, i); + this._values[i] = maybePromise; + } else if (((bitField & 33554432) !== 0)) { + isResolved = this._promiseFulfilled(maybePromise._value(), i); + } else if (((bitField & 16777216) !== 0)) { + isResolved = this._promiseRejected(maybePromise._reason(), i); + } else { + isResolved = this._promiseCancelled(i); + } + } else { + isResolved = this._promiseFulfilled(maybePromise, i); + } + } + if (!isResolved) result._setAsyncGuaranteed(); +}; + +PromiseArray.prototype._isResolved = function () { + return this._values === null; +}; + +PromiseArray.prototype._resolve = function (value) { + this._values = null; + this._promise._fulfill(value); +}; + +PromiseArray.prototype._cancel = function() { + if (this._isResolved() || !this._promise._isCancellable()) return; + this._values = null; + this._promise._cancel(); +}; + +PromiseArray.prototype._reject = function (reason) { + this._values = null; + this._promise._rejectCallback(reason, false); +}; + +PromiseArray.prototype._promiseFulfilled = function (value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; +}; + +PromiseArray.prototype._promiseCancelled = function() { + this._cancel(); + return true; +}; + +PromiseArray.prototype._promiseRejected = function (reason) { + this._totalResolved++; + this._reject(reason); + return true; +}; + +PromiseArray.prototype._resultCancelled = function() { + if (this._isResolved()) return; + var values = this._values; + this._cancel(); + if (values instanceof Promise) { + values.cancel(); + } else { + for (var i = 0; i < values.length; ++i) { + if (values[i] instanceof Promise) { + values[i].cancel(); + } + } + } +}; + +PromiseArray.prototype.shouldCopyValues = function () { + return true; +}; + +PromiseArray.prototype.getActualLength = function (len) { + return len; +}; + +return PromiseArray; +}; + +},{"./util":36}],24:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var THIS = {}; +var util = _dereq_("./util"); +var nodebackForPromise = _dereq_("./nodeback"); +var withAppended = util.withAppended; +var maybeWrapAsError = util.maybeWrapAsError; +var canEvaluate = util.canEvaluate; +var TypeError = _dereq_("./errors").TypeError; +var defaultSuffix = "Async"; +var defaultPromisified = {__isPromisified__: true}; +var noCopyProps = [ + "arity", "length", + "name", + "arguments", + "caller", + "callee", + "prototype", + "__isPromisified__" +]; +var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$"); + +var defaultFilter = function(name) { + return util.isIdentifier(name) && + name.charAt(0) !== "_" && + name !== "constructor"; +}; + +function propsFilter(key) { + return !noCopyPropsPattern.test(key); +} + +function isPromisified(fn) { + try { + return fn.__isPromisified__ === true; + } + catch (e) { + return false; + } +} + +function hasPromisified(obj, key, suffix) { + var val = util.getDataPropertyOrDefault(obj, key + suffix, + defaultPromisified); + return val ? isPromisified(val) : false; +} +function checkValid(ret, suffix, suffixRegexp) { + for (var i = 0; i < ret.length; i += 2) { + var key = ret[i]; + if (suffixRegexp.test(key)) { + var keyWithoutAsyncSuffix = key.replace(suffixRegexp, ""); + for (var j = 0; j < ret.length; j += 2) { + if (ret[j] === keyWithoutAsyncSuffix) { + throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/MqrFmX\u000a" + .replace("%s", suffix)); + } + } + } + } +} + +function promisifiableMethods(obj, suffix, suffixRegexp, filter) { + var keys = util.inheritedDataKeys(obj); + var ret = []; + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var value = obj[key]; + var passesDefaultFilter = filter === defaultFilter + ? true : defaultFilter(key, value, obj); + if (typeof value === "function" && + !isPromisified(value) && + !hasPromisified(obj, key, suffix) && + filter(key, value, obj, passesDefaultFilter)) { + ret.push(key, value); + } + } + checkValid(ret, suffix, suffixRegexp); + return ret; +} + +var escapeIdentRegex = function(str) { + return str.replace(/([$])/, "\\$"); +}; + +var makeNodePromisifiedEval; +if (!true) { +var switchCaseArgumentOrder = function(likelyArgumentCount) { + var ret = [likelyArgumentCount]; + var min = Math.max(0, likelyArgumentCount - 1 - 3); + for(var i = likelyArgumentCount - 1; i >= min; --i) { + ret.push(i); + } + for(var i = likelyArgumentCount + 1; i <= 3; ++i) { + ret.push(i); + } + return ret; +}; + +var argumentSequence = function(argumentCount) { + return util.filledRange(argumentCount, "_arg", ""); +}; + +var parameterDeclaration = function(parameterCount) { + return util.filledRange( + Math.max(parameterCount, 3), "_arg", ""); +}; + +var parameterCount = function(fn) { + if (typeof fn.length === "number") { + return Math.max(Math.min(fn.length, 1023 + 1), 0); + } + return 0; +}; + +makeNodePromisifiedEval = +function(callback, receiver, originalName, fn, _, multiArgs) { + var newParameterCount = Math.max(0, parameterCount(fn) - 1); + var argumentOrder = switchCaseArgumentOrder(newParameterCount); + var shouldProxyThis = typeof callback === "string" || receiver === THIS; + + function generateCallForArgumentCount(count) { + var args = argumentSequence(count).join(", "); + var comma = count > 0 ? ", " : ""; + var ret; + if (shouldProxyThis) { + ret = "ret = callback.call(this, {{args}}, nodeback); break;\n"; + } else { + ret = receiver === undefined + ? "ret = callback({{args}}, nodeback); break;\n" + : "ret = callback.call(receiver, {{args}}, nodeback); break;\n"; + } + return ret.replace("{{args}}", args).replace(", ", comma); + } + + function generateArgumentSwitchCase() { + var ret = ""; + for (var i = 0; i < argumentOrder.length; ++i) { + ret += "case " + argumentOrder[i] +":" + + generateCallForArgumentCount(argumentOrder[i]); + } + + ret += " \n\ + default: \n\ + var args = new Array(len + 1); \n\ + var i = 0; \n\ + for (var i = 0; i < len; ++i) { \n\ + args[i] = arguments[i]; \n\ + } \n\ + args[i] = nodeback; \n\ + [CodeForCall] \n\ + break; \n\ + ".replace("[CodeForCall]", (shouldProxyThis + ? "ret = callback.apply(this, args);\n" + : "ret = callback.apply(receiver, args);\n")); + return ret; + } + + var getFunctionCode = typeof callback === "string" + ? ("this != null ? this['"+callback+"'] : fn") + : "fn"; + var body = "'use strict'; \n\ + var ret = function (Parameters) { \n\ + 'use strict'; \n\ + var len = arguments.length; \n\ + var promise = new Promise(INTERNAL); \n\ + promise._captureStackTrace(); \n\ + var nodeback = nodebackForPromise(promise, " + multiArgs + "); \n\ + var ret; \n\ + var callback = tryCatch([GetFunctionCode]); \n\ + switch(len) { \n\ + [CodeForSwitchCase] \n\ + } \n\ + if (ret === errorObj) { \n\ + promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\ + } \n\ + if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n\ + return promise; \n\ + }; \n\ + notEnumerableProp(ret, '__isPromisified__', true); \n\ + return ret; \n\ + ".replace("[CodeForSwitchCase]", generateArgumentSwitchCase()) + .replace("[GetFunctionCode]", getFunctionCode); + body = body.replace("Parameters", parameterDeclaration(newParameterCount)); + return new Function("Promise", + "fn", + "receiver", + "withAppended", + "maybeWrapAsError", + "nodebackForPromise", + "tryCatch", + "errorObj", + "notEnumerableProp", + "INTERNAL", + body)( + Promise, + fn, + receiver, + withAppended, + maybeWrapAsError, + nodebackForPromise, + util.tryCatch, + util.errorObj, + util.notEnumerableProp, + INTERNAL); +}; +} + +function makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) { + var defaultThis = (function() {return this;})(); + var method = callback; + if (typeof method === "string") { + callback = fn; + } + function promisified() { + var _receiver = receiver; + if (receiver === THIS) _receiver = this; + var promise = new Promise(INTERNAL); + promise._captureStackTrace(); + var cb = typeof method === "string" && this !== defaultThis + ? this[method] : callback; + var fn = nodebackForPromise(promise, multiArgs); + try { + cb.apply(_receiver, withAppended(arguments, fn)); + } catch(e) { + promise._rejectCallback(maybeWrapAsError(e), true, true); + } + if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); + return promise; + } + util.notEnumerableProp(promisified, "__isPromisified__", true); + return promisified; +} + +var makeNodePromisified = canEvaluate + ? makeNodePromisifiedEval + : makeNodePromisifiedClosure; + +function promisifyAll(obj, suffix, filter, promisifier, multiArgs) { + var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$"); + var methods = + promisifiableMethods(obj, suffix, suffixRegexp, filter); + + for (var i = 0, len = methods.length; i < len; i+= 2) { + var key = methods[i]; + var fn = methods[i+1]; + var promisifiedKey = key + suffix; + if (promisifier === makeNodePromisified) { + obj[promisifiedKey] = + makeNodePromisified(key, THIS, key, fn, suffix, multiArgs); + } else { + var promisified = promisifier(fn, function() { + return makeNodePromisified(key, THIS, key, + fn, suffix, multiArgs); + }); + util.notEnumerableProp(promisified, "__isPromisified__", true); + obj[promisifiedKey] = promisified; + } + } + util.toFastProperties(obj); + return obj; +} + +function promisify(callback, receiver, multiArgs) { + return makeNodePromisified(callback, receiver, undefined, + callback, null, multiArgs); +} + +Promise.promisify = function (fn, options) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + if (isPromisified(fn)) { + return fn; + } + options = Object(options); + var receiver = options.context === undefined ? THIS : options.context; + var multiArgs = !!options.multiArgs; + var ret = promisify(fn, receiver, multiArgs); + util.copyDescriptors(fn, ret, propsFilter); + return ret; +}; + +Promise.promisifyAll = function (target, options) { + if (typeof target !== "function" && typeof target !== "object") { + throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + options = Object(options); + var multiArgs = !!options.multiArgs; + var suffix = options.suffix; + if (typeof suffix !== "string") suffix = defaultSuffix; + var filter = options.filter; + if (typeof filter !== "function") filter = defaultFilter; + var promisifier = options.promisifier; + if (typeof promisifier !== "function") promisifier = makeNodePromisified; + + if (!util.isIdentifier(suffix)) { + throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + + var keys = util.inheritedDataKeys(target); + for (var i = 0; i < keys.length; ++i) { + var value = target[keys[i]]; + if (keys[i] !== "constructor" && + util.isClass(value)) { + promisifyAll(value.prototype, suffix, filter, promisifier, + multiArgs); + promisifyAll(value, suffix, filter, promisifier, multiArgs); + } + } + + return promisifyAll(target, suffix, filter, promisifier, multiArgs); +}; +}; + + +},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function( + Promise, PromiseArray, tryConvertToPromise, apiRejection) { +var util = _dereq_("./util"); +var isObject = util.isObject; +var es5 = _dereq_("./es5"); +var Es6Map; +if (typeof Map === "function") Es6Map = Map; + +var mapToEntries = (function() { + var index = 0; + var size = 0; + + function extractEntry(value, key) { + this[index] = value; + this[index + size] = key; + index++; + } + + return function mapToEntries(map) { + size = map.size; + index = 0; + var ret = new Array(map.size * 2); + map.forEach(extractEntry, ret); + return ret; + }; +})(); + +var entriesToMap = function(entries) { + var ret = new Es6Map(); + var length = entries.length / 2 | 0; + for (var i = 0; i < length; ++i) { + var key = entries[length + i]; + var value = entries[i]; + ret.set(key, value); + } + return ret; +}; + +function PropertiesPromiseArray(obj) { + var isMap = false; + var entries; + if (Es6Map !== undefined && obj instanceof Es6Map) { + entries = mapToEntries(obj); + isMap = true; + } else { + var keys = es5.keys(obj); + var len = keys.length; + entries = new Array(len * 2); + for (var i = 0; i < len; ++i) { + var key = keys[i]; + entries[i] = obj[key]; + entries[i + len] = key; + } + } + this.constructor$(entries); + this._isMap = isMap; + this._init$(undefined, isMap ? -6 : -3); +} +util.inherits(PropertiesPromiseArray, PromiseArray); + +PropertiesPromiseArray.prototype._init = function () {}; + +PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + var val; + if (this._isMap) { + val = entriesToMap(this._values); + } else { + val = {}; + var keyOffset = this.length(); + for (var i = 0, len = this.length(); i < len; ++i) { + val[this._values[i + keyOffset]] = this._values[i]; + } + } + this._resolve(val); + return true; + } + return false; +}; + +PropertiesPromiseArray.prototype.shouldCopyValues = function () { + return false; +}; + +PropertiesPromiseArray.prototype.getActualLength = function (len) { + return len >> 1; +}; + +function props(promises) { + var ret; + var castValue = tryConvertToPromise(promises); + + if (!isObject(castValue)) { + return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } else if (castValue instanceof Promise) { + ret = castValue._then( + Promise.props, undefined, undefined, undefined, undefined); + } else { + ret = new PropertiesPromiseArray(castValue).promise(); + } + + if (castValue instanceof Promise) { + ret._propagateFrom(castValue, 2); + } + return ret; +} + +Promise.prototype.props = function () { + return props(this); +}; + +Promise.props = function (promises) { + return props(promises); +}; +}; + +},{"./es5":13,"./util":36}],26:[function(_dereq_,module,exports){ +"use strict"; +function arrayMove(src, srcIndex, dst, dstIndex, len) { + for (var j = 0; j < len; ++j) { + dst[j + dstIndex] = src[j + srcIndex]; + src[j + srcIndex] = void 0; + } +} + +function Queue(capacity) { + this._capacity = capacity; + this._length = 0; + this._front = 0; +} + +Queue.prototype._willBeOverCapacity = function (size) { + return this._capacity < size; +}; + +Queue.prototype._pushOne = function (arg) { + var length = this.length(); + this._checkCapacity(length + 1); + var i = (this._front + length) & (this._capacity - 1); + this[i] = arg; + this._length = length + 1; +}; + +Queue.prototype.push = function (fn, receiver, arg) { + var length = this.length() + 3; + if (this._willBeOverCapacity(length)) { + this._pushOne(fn); + this._pushOne(receiver); + this._pushOne(arg); + return; + } + var j = this._front + length - 3; + this._checkCapacity(length); + var wrapMask = this._capacity - 1; + this[(j + 0) & wrapMask] = fn; + this[(j + 1) & wrapMask] = receiver; + this[(j + 2) & wrapMask] = arg; + this._length = length; +}; + +Queue.prototype.shift = function () { + var front = this._front, + ret = this[front]; + + this[front] = undefined; + this._front = (front + 1) & (this._capacity - 1); + this._length--; + return ret; +}; + +Queue.prototype.length = function () { + return this._length; +}; + +Queue.prototype._checkCapacity = function (size) { + if (this._capacity < size) { + this._resizeTo(this._capacity << 1); + } +}; + +Queue.prototype._resizeTo = function (capacity) { + var oldCapacity = this._capacity; + this._capacity = capacity; + var front = this._front; + var length = this._length; + var moveItemsCount = (front + length) & (oldCapacity - 1); + arrayMove(this, 0, this, oldCapacity, moveItemsCount); +}; + +module.exports = Queue; + +},{}],27:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function( + Promise, INTERNAL, tryConvertToPromise, apiRejection) { +var util = _dereq_("./util"); + +var raceLater = function (promise) { + return promise.then(function(array) { + return race(array, promise); + }); +}; + +function race(promises, parent) { + var maybePromise = tryConvertToPromise(promises); + + if (maybePromise instanceof Promise) { + return raceLater(maybePromise); + } else { + promises = util.asArray(promises); + if (promises === null) + return apiRejection("expecting an array or an iterable object but got " + util.classString(promises)); + } + + var ret = new Promise(INTERNAL); + if (parent !== undefined) { + ret._propagateFrom(parent, 3); + } + var fulfill = ret._fulfill; + var reject = ret._reject; + for (var i = 0, len = promises.length; i < len; ++i) { + var val = promises[i]; + + if (val === undefined && !(i in promises)) { + continue; + } + + Promise.cast(val)._then(fulfill, reject, undefined, ret, null); + } + return ret; +} + +Promise.race = function (promises) { + return race(promises, undefined); +}; + +Promise.prototype.race = function () { + return race(this, undefined); +}; + +}; + +},{"./util":36}],28:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, + PromiseArray, + apiRejection, + tryConvertToPromise, + INTERNAL, + debug) { +var getDomain = Promise._getDomain; +var util = _dereq_("./util"); +var tryCatch = util.tryCatch; + +function ReductionPromiseArray(promises, fn, initialValue, _each) { + this.constructor$(promises); + var domain = getDomain(); + this._fn = domain === null ? fn : util.domainBind(domain, fn); + if (initialValue !== undefined) { + initialValue = Promise.resolve(initialValue); + initialValue._attachCancellationCallback(this); + } + this._initialValue = initialValue; + this._currentCancellable = null; + if(_each === INTERNAL) { + this._eachValues = Array(this._length); + } else if (_each === 0) { + this._eachValues = null; + } else { + this._eachValues = undefined; + } + this._promise._captureStackTrace(); + this._init$(undefined, -5); +} +util.inherits(ReductionPromiseArray, PromiseArray); + +ReductionPromiseArray.prototype._gotAccum = function(accum) { + if (this._eachValues !== undefined && + this._eachValues !== null && + accum !== INTERNAL) { + this._eachValues.push(accum); + } +}; + +ReductionPromiseArray.prototype._eachComplete = function(value) { + if (this._eachValues !== null) { + this._eachValues.push(value); + } + return this._eachValues; +}; + +ReductionPromiseArray.prototype._init = function() {}; + +ReductionPromiseArray.prototype._resolveEmptyArray = function() { + this._resolve(this._eachValues !== undefined ? this._eachValues + : this._initialValue); +}; + +ReductionPromiseArray.prototype.shouldCopyValues = function () { + return false; +}; + +ReductionPromiseArray.prototype._resolve = function(value) { + this._promise._resolveCallback(value); + this._values = null; +}; + +ReductionPromiseArray.prototype._resultCancelled = function(sender) { + if (sender === this._initialValue) return this._cancel(); + if (this._isResolved()) return; + this._resultCancelled$(); + if (this._currentCancellable instanceof Promise) { + this._currentCancellable.cancel(); + } + if (this._initialValue instanceof Promise) { + this._initialValue.cancel(); + } +}; + +ReductionPromiseArray.prototype._iterate = function (values) { + this._values = values; + var value; + var i; + var length = values.length; + if (this._initialValue !== undefined) { + value = this._initialValue; + i = 0; + } else { + value = Promise.resolve(values[0]); + i = 1; + } + + this._currentCancellable = value; + + if (!value.isRejected()) { + for (; i < length; ++i) { + var ctx = { + accum: null, + value: values[i], + index: i, + length: length, + array: this + }; + value = value._then(gotAccum, undefined, undefined, ctx, undefined); + } + } + + if (this._eachValues !== undefined) { + value = value + ._then(this._eachComplete, undefined, undefined, this, undefined); + } + value._then(completed, completed, undefined, value, this); +}; + +Promise.prototype.reduce = function (fn, initialValue) { + return reduce(this, fn, initialValue, null); +}; + +Promise.reduce = function (promises, fn, initialValue, _each) { + return reduce(promises, fn, initialValue, _each); +}; + +function completed(valueOrReason, array) { + if (this.isFulfilled()) { + array._resolve(valueOrReason); + } else { + array._reject(valueOrReason); + } +} + +function reduce(promises, fn, initialValue, _each) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var array = new ReductionPromiseArray(promises, fn, initialValue, _each); + return array.promise(); +} + +function gotAccum(accum) { + this.accum = accum; + this.array._gotAccum(accum); + var value = tryConvertToPromise(this.value, this.array._promise); + if (value instanceof Promise) { + this.array._currentCancellable = value; + return value._then(gotValue, undefined, undefined, this, undefined); + } else { + return gotValue.call(this, value); + } +} + +function gotValue(value) { + var array = this.array; + var promise = array._promise; + var fn = tryCatch(array._fn); + promise._pushContext(); + var ret; + if (array._eachValues !== undefined) { + ret = fn.call(promise._boundValue(), value, this.index, this.length); + } else { + ret = fn.call(promise._boundValue(), + this.accum, value, this.index, this.length); + } + if (ret instanceof Promise) { + array._currentCancellable = ret; + } + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, + promiseCreated, + array._eachValues !== undefined ? "Promise.each" : "Promise.reduce", + promise + ); + return ret; +} +}; + +},{"./util":36}],29:[function(_dereq_,module,exports){ +"use strict"; +var util = _dereq_("./util"); +var schedule; +var noAsyncScheduler = function() { + throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a"); +}; +var NativePromise = util.getNativePromise(); +if (util.isNode && typeof MutationObserver === "undefined") { + var GlobalSetImmediate = global.setImmediate; + var ProcessNextTick = process.nextTick; + schedule = util.isRecentNode + ? function(fn) { GlobalSetImmediate.call(global, fn); } + : function(fn) { ProcessNextTick.call(process, fn); }; +} else if (typeof NativePromise === "function" && + typeof NativePromise.resolve === "function") { + var nativePromise = NativePromise.resolve(); + schedule = function(fn) { + nativePromise.then(fn); + }; +} else if ((typeof MutationObserver !== "undefined") && + !(typeof window !== "undefined" && + window.navigator && + (window.navigator.standalone || window.cordova)) && + ("classList" in document.documentElement)) { + schedule = (function() { + var div = document.createElement("div"); + var opts = {attributes: true}; + var toggleScheduled = false; + var div2 = document.createElement("div"); + var o2 = new MutationObserver(function() { + div.classList.toggle("foo"); + toggleScheduled = false; + }); + o2.observe(div2, opts); + + var scheduleToggle = function() { + if (toggleScheduled) return; + toggleScheduled = true; + div2.classList.toggle("foo"); + }; + + return function schedule(fn) { + var o = new MutationObserver(function() { + o.disconnect(); + fn(); + }); + o.observe(div, opts); + scheduleToggle(); + }; + })(); +} else if (typeof setImmediate !== "undefined") { + schedule = function (fn) { + setImmediate(fn); + }; +} else if (typeof setTimeout !== "undefined") { + schedule = function (fn) { + setTimeout(fn, 0); + }; +} else { + schedule = noAsyncScheduler; +} +module.exports = schedule; + +},{"./util":36}],30:[function(_dereq_,module,exports){ +"use strict"; +module.exports = + function(Promise, PromiseArray, debug) { +var PromiseInspection = Promise.PromiseInspection; +var util = _dereq_("./util"); + +function SettledPromiseArray(values) { + this.constructor$(values); +} +util.inherits(SettledPromiseArray, PromiseArray); + +SettledPromiseArray.prototype._promiseResolved = function (index, inspection) { + this._values[index] = inspection; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; +}; + +SettledPromiseArray.prototype._promiseFulfilled = function (value, index) { + var ret = new PromiseInspection(); + ret._bitField = 33554432; + ret._settledValueField = value; + return this._promiseResolved(index, ret); +}; +SettledPromiseArray.prototype._promiseRejected = function (reason, index) { + var ret = new PromiseInspection(); + ret._bitField = 16777216; + ret._settledValueField = reason; + return this._promiseResolved(index, ret); +}; + +Promise.settle = function (promises) { + debug.deprecated(".settle()", ".reflect()"); + return new SettledPromiseArray(promises).promise(); +}; + +Promise.prototype.settle = function () { + return Promise.settle(this); +}; +}; + +},{"./util":36}],31:[function(_dereq_,module,exports){ +"use strict"; +module.exports = +function(Promise, PromiseArray, apiRejection) { +var util = _dereq_("./util"); +var RangeError = _dereq_("./errors").RangeError; +var AggregateError = _dereq_("./errors").AggregateError; +var isArray = util.isArray; +var CANCELLATION = {}; + + +function SomePromiseArray(values) { + this.constructor$(values); + this._howMany = 0; + this._unwrap = false; + this._initialized = false; +} +util.inherits(SomePromiseArray, PromiseArray); + +SomePromiseArray.prototype._init = function () { + if (!this._initialized) { + return; + } + if (this._howMany === 0) { + this._resolve([]); + return; + } + this._init$(undefined, -5); + var isArrayResolved = isArray(this._values); + if (!this._isResolved() && + isArrayResolved && + this._howMany > this._canPossiblyFulfill()) { + this._reject(this._getRangeError(this.length())); + } +}; + +SomePromiseArray.prototype.init = function () { + this._initialized = true; + this._init(); +}; + +SomePromiseArray.prototype.setUnwrap = function () { + this._unwrap = true; +}; + +SomePromiseArray.prototype.howMany = function () { + return this._howMany; +}; + +SomePromiseArray.prototype.setHowMany = function (count) { + this._howMany = count; +}; + +SomePromiseArray.prototype._promiseFulfilled = function (value) { + this._addFulfilled(value); + if (this._fulfilled() === this.howMany()) { + this._values.length = this.howMany(); + if (this.howMany() === 1 && this._unwrap) { + this._resolve(this._values[0]); + } else { + this._resolve(this._values); + } + return true; + } + return false; + +}; +SomePromiseArray.prototype._promiseRejected = function (reason) { + this._addRejected(reason); + return this._checkOutcome(); +}; + +SomePromiseArray.prototype._promiseCancelled = function () { + if (this._values instanceof Promise || this._values == null) { + return this._cancel(); + } + this._addRejected(CANCELLATION); + return this._checkOutcome(); +}; + +SomePromiseArray.prototype._checkOutcome = function() { + if (this.howMany() > this._canPossiblyFulfill()) { + var e = new AggregateError(); + for (var i = this.length(); i < this._values.length; ++i) { + if (this._values[i] !== CANCELLATION) { + e.push(this._values[i]); + } + } + if (e.length > 0) { + this._reject(e); + } else { + this._cancel(); + } + return true; + } + return false; +}; + +SomePromiseArray.prototype._fulfilled = function () { + return this._totalResolved; +}; + +SomePromiseArray.prototype._rejected = function () { + return this._values.length - this.length(); +}; + +SomePromiseArray.prototype._addRejected = function (reason) { + this._values.push(reason); +}; + +SomePromiseArray.prototype._addFulfilled = function (value) { + this._values[this._totalResolved++] = value; +}; + +SomePromiseArray.prototype._canPossiblyFulfill = function () { + return this.length() - this._rejected(); +}; + +SomePromiseArray.prototype._getRangeError = function (count) { + var message = "Input array must contain at least " + + this._howMany + " items but contains only " + count + " items"; + return new RangeError(message); +}; + +SomePromiseArray.prototype._resolveEmptyArray = function () { + this._reject(this._getRangeError(0)); +}; + +function some(promises, howMany) { + if ((howMany | 0) !== howMany || howMany < 0) { + return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var ret = new SomePromiseArray(promises); + var promise = ret.promise(); + ret.setHowMany(howMany); + ret.init(); + return promise; +} + +Promise.some = function (promises, howMany) { + return some(promises, howMany); +}; + +Promise.prototype.some = function (howMany) { + return some(this, howMany); +}; + +Promise._SomePromiseArray = SomePromiseArray; +}; + +},{"./errors":12,"./util":36}],32:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise) { +function PromiseInspection(promise) { + if (promise !== undefined) { + promise = promise._target(); + this._bitField = promise._bitField; + this._settledValueField = promise._isFateSealed() + ? promise._settledValue() : undefined; + } + else { + this._bitField = 0; + this._settledValueField = undefined; + } +} + +PromiseInspection.prototype._settledValue = function() { + return this._settledValueField; +}; + +var value = PromiseInspection.prototype.value = function () { + if (!this.isFulfilled()) { + throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + return this._settledValue(); +}; + +var reason = PromiseInspection.prototype.error = +PromiseInspection.prototype.reason = function () { + if (!this.isRejected()) { + throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + return this._settledValue(); +}; + +var isFulfilled = PromiseInspection.prototype.isFulfilled = function() { + return (this._bitField & 33554432) !== 0; +}; + +var isRejected = PromiseInspection.prototype.isRejected = function () { + return (this._bitField & 16777216) !== 0; +}; + +var isPending = PromiseInspection.prototype.isPending = function () { + return (this._bitField & 50397184) === 0; +}; + +var isResolved = PromiseInspection.prototype.isResolved = function () { + return (this._bitField & 50331648) !== 0; +}; + +PromiseInspection.prototype.isCancelled = function() { + return (this._bitField & 8454144) !== 0; +}; + +Promise.prototype.__isCancelled = function() { + return (this._bitField & 65536) === 65536; +}; + +Promise.prototype._isCancelled = function() { + return this._target().__isCancelled(); +}; + +Promise.prototype.isCancelled = function() { + return (this._target()._bitField & 8454144) !== 0; +}; + +Promise.prototype.isPending = function() { + return isPending.call(this._target()); +}; + +Promise.prototype.isRejected = function() { + return isRejected.call(this._target()); +}; + +Promise.prototype.isFulfilled = function() { + return isFulfilled.call(this._target()); +}; + +Promise.prototype.isResolved = function() { + return isResolved.call(this._target()); +}; + +Promise.prototype.value = function() { + return value.call(this._target()); +}; + +Promise.prototype.reason = function() { + var target = this._target(); + target._unsetRejectionIsUnhandled(); + return reason.call(target); +}; + +Promise.prototype._value = function() { + return this._settledValue(); +}; + +Promise.prototype._reason = function() { + this._unsetRejectionIsUnhandled(); + return this._settledValue(); +}; + +Promise.PromiseInspection = PromiseInspection; +}; + +},{}],33:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var util = _dereq_("./util"); +var errorObj = util.errorObj; +var isObject = util.isObject; + +function tryConvertToPromise(obj, context) { + if (isObject(obj)) { + if (obj instanceof Promise) return obj; + var then = getThen(obj); + if (then === errorObj) { + if (context) context._pushContext(); + var ret = Promise.reject(then.e); + if (context) context._popContext(); + return ret; + } else if (typeof then === "function") { + if (isAnyBluebirdPromise(obj)) { + var ret = new Promise(INTERNAL); + obj._then( + ret._fulfill, + ret._reject, + undefined, + ret, + null + ); + return ret; + } + return doThenable(obj, then, context); + } + } + return obj; +} + +function doGetThen(obj) { + return obj.then; +} + +function getThen(obj) { + try { + return doGetThen(obj); + } catch (e) { + errorObj.e = e; + return errorObj; + } +} + +var hasProp = {}.hasOwnProperty; +function isAnyBluebirdPromise(obj) { + try { + return hasProp.call(obj, "_promise0"); + } catch (e) { + return false; + } +} + +function doThenable(x, then, context) { + var promise = new Promise(INTERNAL); + var ret = promise; + if (context) context._pushContext(); + promise._captureStackTrace(); + if (context) context._popContext(); + var synchronous = true; + var result = util.tryCatch(then).call(x, resolve, reject); + synchronous = false; + + if (promise && result === errorObj) { + promise._rejectCallback(result.e, true, true); + promise = null; + } + + function resolve(value) { + if (!promise) return; + promise._resolveCallback(value); + promise = null; + } + + function reject(reason) { + if (!promise) return; + promise._rejectCallback(reason, synchronous, true); + promise = null; + } + return ret; +} + +return tryConvertToPromise; +}; + +},{"./util":36}],34:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function(Promise, INTERNAL, debug) { +var util = _dereq_("./util"); +var TimeoutError = Promise.TimeoutError; + +function HandleWrapper(handle) { + this.handle = handle; +} + +HandleWrapper.prototype._resultCancelled = function() { + clearTimeout(this.handle); +}; + +var afterValue = function(value) { return delay(+this).thenReturn(value); }; +var delay = Promise.delay = function (ms, value) { + var ret; + var handle; + if (value !== undefined) { + ret = Promise.resolve(value) + ._then(afterValue, null, null, ms, undefined); + if (debug.cancellation() && value instanceof Promise) { + ret._setOnCancel(value); + } + } else { + ret = new Promise(INTERNAL); + handle = setTimeout(function() { ret._fulfill(); }, +ms); + if (debug.cancellation()) { + ret._setOnCancel(new HandleWrapper(handle)); + } + ret._captureStackTrace(); + } + ret._setAsyncGuaranteed(); + return ret; +}; + +Promise.prototype.delay = function (ms) { + return delay(ms, this); +}; + +var afterTimeout = function (promise, message, parent) { + var err; + if (typeof message !== "string") { + if (message instanceof Error) { + err = message; + } else { + err = new TimeoutError("operation timed out"); + } + } else { + err = new TimeoutError(message); + } + util.markAsOriginatingFromRejection(err); + promise._attachExtraTrace(err); + promise._reject(err); + + if (parent != null) { + parent.cancel(); + } +}; + +function successClear(value) { + clearTimeout(this.handle); + return value; +} + +function failureClear(reason) { + clearTimeout(this.handle); + throw reason; +} + +Promise.prototype.timeout = function (ms, message) { + ms = +ms; + var ret, parent; + + var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() { + if (ret.isPending()) { + afterTimeout(ret, message, parent); + } + }, ms)); + + if (debug.cancellation()) { + parent = this.then(); + ret = parent._then(successClear, failureClear, + undefined, handleWrapper, undefined); + ret._setOnCancel(handleWrapper); + } else { + ret = this._then(successClear, failureClear, + undefined, handleWrapper, undefined); + } + + return ret; +}; + +}; + +},{"./util":36}],35:[function(_dereq_,module,exports){ +"use strict"; +module.exports = function (Promise, apiRejection, tryConvertToPromise, + createContext, INTERNAL, debug) { + var util = _dereq_("./util"); + var TypeError = _dereq_("./errors").TypeError; + var inherits = _dereq_("./util").inherits; + var errorObj = util.errorObj; + var tryCatch = util.tryCatch; + var NULL = {}; + + function thrower(e) { + setTimeout(function(){throw e;}, 0); + } + + function castPreservingDisposable(thenable) { + var maybePromise = tryConvertToPromise(thenable); + if (maybePromise !== thenable && + typeof thenable._isDisposable === "function" && + typeof thenable._getDisposer === "function" && + thenable._isDisposable()) { + maybePromise._setDisposable(thenable._getDisposer()); + } + return maybePromise; + } + function dispose(resources, inspection) { + var i = 0; + var len = resources.length; + var ret = new Promise(INTERNAL); + function iterator() { + if (i >= len) return ret._fulfill(); + var maybePromise = castPreservingDisposable(resources[i++]); + if (maybePromise instanceof Promise && + maybePromise._isDisposable()) { + try { + maybePromise = tryConvertToPromise( + maybePromise._getDisposer().tryDispose(inspection), + resources.promise); + } catch (e) { + return thrower(e); + } + if (maybePromise instanceof Promise) { + return maybePromise._then(iterator, thrower, + null, null, null); + } + } + iterator(); + } + iterator(); + return ret; + } + + function Disposer(data, promise, context) { + this._data = data; + this._promise = promise; + this._context = context; + } + + Disposer.prototype.data = function () { + return this._data; + }; + + Disposer.prototype.promise = function () { + return this._promise; + }; + + Disposer.prototype.resource = function () { + if (this.promise().isFulfilled()) { + return this.promise().value(); + } + return NULL; + }; + + Disposer.prototype.tryDispose = function(inspection) { + var resource = this.resource(); + var context = this._context; + if (context !== undefined) context._pushContext(); + var ret = resource !== NULL + ? this.doDispose(resource, inspection) : null; + if (context !== undefined) context._popContext(); + this._promise._unsetDisposable(); + this._data = null; + return ret; + }; + + Disposer.isDisposer = function (d) { + return (d != null && + typeof d.resource === "function" && + typeof d.tryDispose === "function"); + }; + + function FunctionDisposer(fn, promise, context) { + this.constructor$(fn, promise, context); + } + inherits(FunctionDisposer, Disposer); + + FunctionDisposer.prototype.doDispose = function (resource, inspection) { + var fn = this.data(); + return fn.call(resource, resource, inspection); + }; + + function maybeUnwrapDisposer(value) { + if (Disposer.isDisposer(value)) { + this.resources[this.index]._setDisposable(value); + return value.promise(); + } + return value; + } + + function ResourceList(length) { + this.length = length; + this.promise = null; + this[length-1] = null; + } + + ResourceList.prototype._resultCancelled = function() { + var len = this.length; + for (var i = 0; i < len; ++i) { + var item = this[i]; + if (item instanceof Promise) { + item.cancel(); + } + } + }; + + Promise.using = function () { + var len = arguments.length; + if (len < 2) return apiRejection( + "you must pass at least 2 arguments to Promise.using"); + var fn = arguments[len - 1]; + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var input; + var spreadArgs = true; + if (len === 2 && Array.isArray(arguments[0])) { + input = arguments[0]; + len = input.length; + spreadArgs = false; + } else { + input = arguments; + len--; + } + var resources = new ResourceList(len); + for (var i = 0; i < len; ++i) { + var resource = input[i]; + if (Disposer.isDisposer(resource)) { + var disposer = resource; + resource = resource.promise(); + resource._setDisposable(disposer); + } else { + var maybePromise = tryConvertToPromise(resource); + if (maybePromise instanceof Promise) { + resource = + maybePromise._then(maybeUnwrapDisposer, null, null, { + resources: resources, + index: i + }, undefined); + } + } + resources[i] = resource; + } + + var reflectedResources = new Array(resources.length); + for (var i = 0; i < reflectedResources.length; ++i) { + reflectedResources[i] = Promise.resolve(resources[i]).reflect(); + } + + var resultPromise = Promise.all(reflectedResources) + .then(function(inspections) { + for (var i = 0; i < inspections.length; ++i) { + var inspection = inspections[i]; + if (inspection.isRejected()) { + errorObj.e = inspection.error(); + return errorObj; + } else if (!inspection.isFulfilled()) { + resultPromise.cancel(); + return; + } + inspections[i] = inspection.value(); + } + promise._pushContext(); + + fn = tryCatch(fn); + var ret = spreadArgs + ? fn.apply(undefined, inspections) : fn(inspections); + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, promiseCreated, "Promise.using", promise); + return ret; + }); + + var promise = resultPromise.lastly(function() { + var inspection = new Promise.PromiseInspection(resultPromise); + return dispose(resources, inspection); + }); + resources.promise = promise; + promise._setOnCancel(resources); + return promise; + }; + + Promise.prototype._setDisposable = function (disposer) { + this._bitField = this._bitField | 131072; + this._disposer = disposer; + }; + + Promise.prototype._isDisposable = function () { + return (this._bitField & 131072) > 0; + }; + + Promise.prototype._getDisposer = function () { + return this._disposer; + }; + + Promise.prototype._unsetDisposable = function () { + this._bitField = this._bitField & (~131072); + this._disposer = undefined; + }; + + Promise.prototype.disposer = function (fn) { + if (typeof fn === "function") { + return new FunctionDisposer(fn, this, createContext()); + } + throw new TypeError(); + }; + +}; + +},{"./errors":12,"./util":36}],36:[function(_dereq_,module,exports){ +"use strict"; +var es5 = _dereq_("./es5"); +var canEvaluate = typeof navigator == "undefined"; + +var errorObj = {e: {}}; +var tryCatchTarget; +var globalObject = typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + typeof global !== "undefined" ? global : + this !== undefined ? this : null; + +function tryCatcher() { + try { + var target = tryCatchTarget; + tryCatchTarget = null; + return target.apply(this, arguments); + } catch (e) { + errorObj.e = e; + return errorObj; + } +} +function tryCatch(fn) { + tryCatchTarget = fn; + return tryCatcher; +} + +var inherits = function(Child, Parent) { + var hasProp = {}.hasOwnProperty; + + function T() { + this.constructor = Child; + this.constructor$ = Parent; + for (var propertyName in Parent.prototype) { + if (hasProp.call(Parent.prototype, propertyName) && + propertyName.charAt(propertyName.length-1) !== "$" + ) { + this[propertyName + "$"] = Parent.prototype[propertyName]; + } + } + } + T.prototype = Parent.prototype; + Child.prototype = new T(); + return Child.prototype; +}; + + +function isPrimitive(val) { + return val == null || val === true || val === false || + typeof val === "string" || typeof val === "number"; + +} + +function isObject(value) { + return typeof value === "function" || + typeof value === "object" && value !== null; +} + +function maybeWrapAsError(maybeError) { + if (!isPrimitive(maybeError)) return maybeError; + + return new Error(safeToString(maybeError)); +} + +function withAppended(target, appendee) { + var len = target.length; + var ret = new Array(len + 1); + var i; + for (i = 0; i < len; ++i) { + ret[i] = target[i]; + } + ret[i] = appendee; + return ret; +} + +function getDataPropertyOrDefault(obj, key, defaultValue) { + if (es5.isES5) { + var desc = Object.getOwnPropertyDescriptor(obj, key); + + if (desc != null) { + return desc.get == null && desc.set == null + ? desc.value + : defaultValue; + } + } else { + return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined; + } +} + +function notEnumerableProp(obj, name, value) { + if (isPrimitive(obj)) return obj; + var descriptor = { + value: value, + configurable: true, + enumerable: false, + writable: true + }; + es5.defineProperty(obj, name, descriptor); + return obj; +} + +function thrower(r) { + throw r; +} + +var inheritedDataKeys = (function() { + var excludedPrototypes = [ + Array.prototype, + Object.prototype, + Function.prototype + ]; + + var isExcludedProto = function(val) { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (excludedPrototypes[i] === val) { + return true; + } + } + return false; + }; + + if (es5.isES5) { + var getKeys = Object.getOwnPropertyNames; + return function(obj) { + var ret = []; + var visitedKeys = Object.create(null); + while (obj != null && !isExcludedProto(obj)) { + var keys; + try { + keys = getKeys(obj); + } catch (e) { + return ret; + } + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (visitedKeys[key]) continue; + visitedKeys[key] = true; + var desc = Object.getOwnPropertyDescriptor(obj, key); + if (desc != null && desc.get == null && desc.set == null) { + ret.push(key); + } + } + obj = es5.getPrototypeOf(obj); + } + return ret; + }; + } else { + var hasProp = {}.hasOwnProperty; + return function(obj) { + if (isExcludedProto(obj)) return []; + var ret = []; + + /*jshint forin:false */ + enumeration: for (var key in obj) { + if (hasProp.call(obj, key)) { + ret.push(key); + } else { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (hasProp.call(excludedPrototypes[i], key)) { + continue enumeration; + } + } + ret.push(key); + } + } + return ret; + }; + } + +})(); + +var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/; +function isClass(fn) { + try { + if (typeof fn === "function") { + var keys = es5.names(fn.prototype); + + var hasMethods = es5.isES5 && keys.length > 1; + var hasMethodsOtherThanConstructor = keys.length > 0 && + !(keys.length === 1 && keys[0] === "constructor"); + var hasThisAssignmentAndStaticMethods = + thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0; + + if (hasMethods || hasMethodsOtherThanConstructor || + hasThisAssignmentAndStaticMethods) { + return true; + } + } + return false; + } catch (e) { + return false; + } +} + +function toFastProperties(obj) { + /*jshint -W027,-W055,-W031*/ + function FakeConstructor() {} + FakeConstructor.prototype = obj; + var receiver = new FakeConstructor(); + function ic() { + return typeof receiver.foo; + } + ic(); + ic(); + return obj; + eval(obj); +} + +var rident = /^[a-z$_][a-z$_0-9]*$/i; +function isIdentifier(str) { + return rident.test(str); +} + +function filledRange(count, prefix, suffix) { + var ret = new Array(count); + for(var i = 0; i < count; ++i) { + ret[i] = prefix + i + suffix; + } + return ret; +} + +function safeToString(obj) { + try { + return obj + ""; + } catch (e) { + return "[no string representation]"; + } +} + +function isError(obj) { + return obj instanceof Error || + (obj !== null && + typeof obj === "object" && + typeof obj.message === "string" && + typeof obj.name === "string"); +} + +function markAsOriginatingFromRejection(e) { + try { + notEnumerableProp(e, "isOperational", true); + } + catch(ignore) {} +} + +function originatesFromRejection(e) { + if (e == null) return false; + return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) || + e["isOperational"] === true); +} + +function canAttachTrace(obj) { + return isError(obj) && es5.propertyIsWritable(obj, "stack"); +} + +var ensureErrorObject = (function() { + if (!("stack" in new Error())) { + return function(value) { + if (canAttachTrace(value)) return value; + try {throw new Error(safeToString(value));} + catch(err) {return err;} + }; + } else { + return function(value) { + if (canAttachTrace(value)) return value; + return new Error(safeToString(value)); + }; + } +})(); + +function classString(obj) { + return {}.toString.call(obj); +} + +function copyDescriptors(from, to, filter) { + var keys = es5.names(from); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (filter(key)) { + try { + es5.defineProperty(to, key, es5.getDescriptor(from, key)); + } catch (ignore) {} + } + } +} + +var asArray = function(v) { + if (es5.isArray(v)) { + return v; + } + return null; +}; + +if (typeof Symbol !== "undefined" && Symbol.iterator) { + var ArrayFrom = typeof Array.from === "function" ? function(v) { + return Array.from(v); + } : function(v) { + var ret = []; + var it = v[Symbol.iterator](); + var itResult; + while (!((itResult = it.next()).done)) { + ret.push(itResult.value); + } + return ret; + }; + + asArray = function(v) { + if (es5.isArray(v)) { + return v; + } else if (v != null && typeof v[Symbol.iterator] === "function") { + return ArrayFrom(v); + } + return null; + }; +} + +var isNode = typeof process !== "undefined" && + classString(process).toLowerCase() === "[object process]"; + +var hasEnvVariables = typeof process !== "undefined" && + typeof process.env !== "undefined"; + +function env(key) { + return hasEnvVariables ? process.env[key] : undefined; +} + +function getNativePromise() { + if (typeof Promise === "function") { + try { + var promise = new Promise(function(){}); + if ({}.toString.call(promise) === "[object Promise]") { + return Promise; + } + } catch (e) {} + } +} + +function domainBind(self, cb) { + return self.bind(cb); +} + +var ret = { + isClass: isClass, + isIdentifier: isIdentifier, + inheritedDataKeys: inheritedDataKeys, + getDataPropertyOrDefault: getDataPropertyOrDefault, + thrower: thrower, + isArray: es5.isArray, + asArray: asArray, + notEnumerableProp: notEnumerableProp, + isPrimitive: isPrimitive, + isObject: isObject, + isError: isError, + canEvaluate: canEvaluate, + errorObj: errorObj, + tryCatch: tryCatch, + inherits: inherits, + withAppended: withAppended, + maybeWrapAsError: maybeWrapAsError, + toFastProperties: toFastProperties, + filledRange: filledRange, + toString: safeToString, + canAttachTrace: canAttachTrace, + ensureErrorObject: ensureErrorObject, + originatesFromRejection: originatesFromRejection, + markAsOriginatingFromRejection: markAsOriginatingFromRejection, + classString: classString, + copyDescriptors: copyDescriptors, + hasDevTools: typeof chrome !== "undefined" && chrome && + typeof chrome.loadTimes === "function", + isNode: isNode, + hasEnvVariables: hasEnvVariables, + env: env, + global: globalObject, + getNativePromise: getNativePromise, + domainBind: domainBind +}; +ret.isRecentNode = ret.isNode && (function() { + var version; + if (process.versions && process.versions.node) { + version = process.versions.node.split(".").map(Number); + } else if (process.version) { + version = process.version.split(".").map(Number); + } + return (version[0] === 0 && version[1] > 10) || (version[0] > 0); +})(); + +if (ret.isNode) ret.toFastProperties(process); + +try {throw new Error(); } catch (e) {ret.lastLineError = e;} +module.exports = ret; + +},{"./es5":13}]},{},[4])(4) +}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file diff --git a/node_modules/bluebird/js/browser/bluebird.min.js b/node_modules/bluebird/js/browser/bluebird.min.js new file mode 100644 index 00000000..ef4fb4ae --- /dev/null +++ b/node_modules/bluebird/js/browser/bluebird.min.js @@ -0,0 +1,31 @@ +/* @preserve + * The MIT License (MIT) + * + * Copyright (c) 2013-2018 Petka Antonov + * + * 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. + * + */ +/** + * bluebird build version 3.5.5 + * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each +*/ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(s,a){if(!e[s]){if(!t[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s0;)c(t)}function c(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}var l;try{throw new Error}catch(u){l=u}var p=t("./schedule"),h=t("./queue"),f=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){f.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},f.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=s),r.prototype._drainQueues=function(){a(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,a(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=l},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,s,void 0,u,h),l._then(a,c,void 0,u,h),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){var e=this.pop(),r=n(t,e);return r.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),c=a.canEvaluate;a.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(c){var r=s(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+H.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?H.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function a(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function f(){this._trace=new O(this._peekContext())}function _(t,e){if(U(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=E(t);H.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),H.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(){this._trace=void 0}function v(t,e,n,r,i){if(void 0===t&&null!==e&&J){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=C(a),l=c.length-1;l>=0;--l){var u=c[l];if(!q.test(u)){var p=u.match($);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var h=c[0],l=0;l0&&(s="\n"+a[l-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(f,!0,e)}}function y(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),m(n)}function m(t,n,r){if(at.warnings){var i,o=new N(t);if(n)r._attachExtraTrace(o);else if(at.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=E(o);o.stack=s.message+"\n"+s.stack.join("\n")}nt("warning",o)||k(o,"",!0)}}function g(t,e){for(var n=0;n=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}function C(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function E(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?j(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:C(e)}}function k(t,e,n){if("undefined"!=typeof console){var r;if(H.isObject(t)){var i=t.stack;r=e+G(i,t)}else r=e+String(t);"function"==typeof V?V(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function F(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){L.throwLater(o)}"unhandledRejection"===t?nt(t,n,r)||i||k(n,"Unhandled rejection "):nt(t,r)}function T(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():H.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+x(e)+">, no stack trace)"}function x(t){var e=41;return t.lengths||0>a||!n||!r||n!==r||s>=a||(it=function(t){if(M.test(t))return!0;var e=S(t);return e&&e.fileName===n&&s<=e.line&&e.line<=a?!0:!1})}}function O(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);st(this,O),e>32&&this.uncycle()}var A,D,V,I=e._getDomain,L=e._async,N=t("./errors").Warning,H=t("./util"),B=t("./es5"),U=H.canAttachTrace,M=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,q=/\((?:timers\.js):\d+:\d+\)/,$=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,Q=null,G=null,z=!1,X=!(0==H.env("BLUEBIRD_DEBUG")||!H.env("BLUEBIRD_DEBUG")&&"development"!==H.env("NODE_ENV")),W=!(0==H.env("BLUEBIRD_WARNINGS")||!X&&!H.env("BLUEBIRD_WARNINGS")),K=!(0==H.env("BLUEBIRD_LONG_STACK_TRACES")||!X&&!H.env("BLUEBIRD_LONG_STACK_TRACES")),J=0!=H.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(W||!!H.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){if(0===(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},e.prototype._notifyUnhandledRejectionIsHandled=function(){F("rejectionHandled",A,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),F("unhandledRejection",D,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return m(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=I();D="function"==typeof t?null===e?t:H.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=I();A="function"==typeof t?null===e?t:H.domainBind(e,t):void 0};var Y=function(){};e.longStackTraces=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!at.longStackTraces&&P()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace,i=e.prototype._dereferenceTrace;at.longStackTraces=!0,Y=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,e.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),L.enableTrampoline(),at.longStackTraces=!1},e.prototype._captureStackTrace=f,e.prototype._attachExtraTrace=_,e.prototype._dereferenceTrace=d,n.activateLongStackTraces(),L.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return at.longStackTraces&&P()};var Z=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n={detail:e,cancelable:!0};B.defineProperty(n,"promise",{value:e.promise}),B.defineProperty(n,"reason",{value:e.reason});var r=new CustomEvent(t.toLowerCase(),n);return!H.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,B.defineProperty(n,"promise",{value:e.promise}),B.defineProperty(n,"reason",{value:e.reason}),!H.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),H.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!H.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),tt=function(){return H.isNode?function(){return process.emit.apply(process,arguments)}:H.global?function(t){var e="on"+t.toLowerCase(),n=H.global[e];return n?(n.apply(H.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),et={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},nt=function(t){var e=!1;try{e=tt.apply(null,arguments)}catch(n){L.throwLater(n),e=!0}var r=!1;try{r=Z(t,et[t].apply(null,arguments))}catch(n){L.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&Y()),"warnings"in t){var n=t.warnings;at.warnings=!!n,J=at.warnings,H.isObject(n)&&"wForgottenReturn"in n&&(J=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!at.cancellation){if(L.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=a,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=s,e.prototype._execute=o,rt=u,at.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!at.monitoring?(at.monitoring=!0,e.prototype._fireEvent=nt):!t.monitoring&&at.monitoring&&(at.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var rt=p,it=function(){return!1},ot=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;H.inherits(O,Error),n.CapturedTrace=O,O.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var s=e[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>a?(c._parent=e[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},O.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=E(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(C(i.stack.split("\n"))),i=i._parent;w(r),b(r),H.notEnumerableProp(t,"stack",g(n,r)),H.notEnumerableProp(t,"__stackCleaned__",!0)}};var st=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():T(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,Q=t,G=e;var n=Error.captureStackTrace;return it=function(t){return M.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return Q=/@/,G=e,z=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(G=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?T(e):e.toString()},null):(Q=t,G=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(V=function(t){console.warn(t)},H.isNode&&process.stderr.isTTY?V=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:H.isNode||"string"!=typeof(new Error).stack||(V=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var at={warnings:W,longStackTraces:!1,cancellation:!1,monitoring:!1};return K&&e.longStackTraces(),{longStackTraces:function(){return at.longStackTraces},warnings:function(){return at.warnings},cancellation:function(){return at.cancellation},monitoring:function(){return at.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return h},checkForgottenReturns:v,setBounds:R,warn:m,deprecated:y,CapturedTrace:O,fireDomEvent:Z,fireGlobalEvent:tt}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5"),c=a.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,h=r("Warning","warning"),f=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(v){o=r("TypeError","type error"),s=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function a(){return l.call(this,this.promise._target()._settledValue())}function c(t){return s(this,t)?void 0:(h.e=t,h)}function l(t){var i=this.promise,l=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?l.call(i._boundValue()):l.call(i._boundValue(),t);if(u===r)return u;if(void 0!==u){i._setReturnedNonUndefined();var f=n(u,i);if(f instanceof e){if(null!=this.cancelPromise){if(f._isCancelled()){var _=new p("late cancellation observer");return i._attachExtraTrace(_),h.e=_,h}f.isPending()&&f._attachCancellationCallback(new o(this))}return f._then(a,c,void 0,this,void 0)}}}return i.isRejected()?(s(this),h.e=t,h):(s(this),t)}var u=t("./util"),p=e.CancellationError,h=u.errorObj,f=t("./catch_filter")(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){s(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new i(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,l,l)},e.prototype.tap=function(t){return this._passThrough(t,1,l)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,l);var r,i=new Array(n-1),o=0;for(r=0;n-1>r;++r){var s=arguments[r];if(!u.isObject(s))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+u.classString(s)));i[o++]=s}i.length=o;var a=arguments[r];return this._passThrough(f(i,a,this),1,void 0,l)},i}},{"./catch_filter":7,"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r){for(var o=0;o0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=l();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function c(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+u.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new a(t,n,s,o).promise()}var l=e._getDomain,u=t("./util"),p=u.tryCatch,h=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(0>n){if(n=-1*n-1,r[n]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var l=this._promise,u=this._callback,f=l._boundValue();l._pushContext();var _=p(u).call(f,t,n,o),d=l._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",l),_===h)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0===(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}var m=++this._totalResolved;return m>=o?(null!==a?this._filter(r,a):this._resolve(r),!0):!1},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlighto;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return c(this,t,e,null)},e.map=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=s.isArray(l)?a(t).apply(u,l):a(t).call(u,l)}else c=a(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return p("Catch statement predicate: expecting an object but got "+f.classString(o));r[i++]=o}if(r.length=i,t=arguments[n],"function"!=typeof t)throw new m("The last argument to .catch() must be a function, got "+f.toString(t));return this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(T.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},i.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=O(t)(S(e,n));return r===R&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new E(t).promise()},i.cast=function(t){var e=j(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(b),l=this._target(),u=l._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var p=c();if(0!==(50397184&u)){var h,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,h=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,h=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new g("late cancellation observer"),l._attachExtraTrace(_),h=e),v.invoke(d,l,{handler:null===p?h:"function"==typeof h&&f.domainBind(p,h),promise:a,receiver:r,value:_})}else l._addCallbacks(t,e,a,r,p);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===h?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:f.domainBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:f.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=j(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;s>a;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new g("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),i=r===t;if(!i&&!n&&T.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){if(t!==b){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)}},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===w?n&&"number"==typeof n.length?o=O(t).apply(this._boundValue(),n):(o=R,o.e=new m("cannot .spread() a non-array: "+f.classString(n))):o=O(t).call(e,n);var s=r._popContext();i=r._bitField,0===(65536&i)&&(o===C?r._reject(n):o===R?r._rejectCallback(o.e,!1):(T.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var s=t instanceof i,a=this._bitField,c=0!==(134217728&a);0!==(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof x&&r.isFinallyHandler()?(r.cancelPromise=t,O(e).call(r,o)===R&&t._reject(R.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?s?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&a)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):s&&(c&&t._setAsyncGuaranteed(),0!==(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this),this._dereferenceTrace())}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,f.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&_.defineProperty(i.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),i.defer=i.pending=function(){T.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:s}},f.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,j,p,T),t("./bind")(i,b,j,T),t("./cancel")(i,E,p,T),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,E,j,b,v,c),i.Promise=i,i.version="3.5.5",t("./call_get.js")(i),t("./generators.js")(i,p,b,j,n,T),t("./map.js")(i,E,p,j,b,T),t("./nodeify.js")(i),t("./promisify.js")(i,b),t("./props.js")(i,E,j,p),t("./race.js")(i,b,j,p),t("./reduce.js")(i,E,p,j,b,T),t("./settle.js")(i,E,T),t("./some.js")(i,E,p),t("./timers.js")(i,b,T),t("./using.js")(i,p,j,F,b,T),t("./any.js")(i),t("./each.js")(i,b),t("./filter.js")(i,b),f.toFastProperties(i),f.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(b)),T.setBounds(d.firstLineError,f.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function a(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var a=o._bitField;if(this._values=o,0===(50397184&a))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&a))return 0!==(16777216&a)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(s(n))):void this._iterate(o)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;n>a;++a){var c=r(t[a],i);c instanceof e?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0===(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!==(33554432&s)?this._promiseFulfilled(c._value(),a):0!==(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;nc;c+=2){var u=s[c],p=s[c+1],_=u+e;if(r===k)t[_]=k(u,h,u,p,e,i);else{var d=r(p,function(){return k(u,h,u,p,e,i)});f.notEnumerableProp(d,"__isPromisified__",!0),t[_]=d}}return f.toFastProperties(t),t}function u(t,e,n){return k(t,e,void 0,t,null,n)}var p,h={},f=t("./util"),_=t("./nodeback"),d=f.withAppended,v=f.maybeWrapAsError,y=f.canEvaluate,m=t("./errors").TypeError,g="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],C=new RegExp("^(?:"+w.join("|")+")$"),j=function(t){return f.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},E=function(t){return t.replace(/([$])/,"\\$")},k=y?p:c;e.promisify=function(t,e){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?h:e.context,o=!!e.multiArgs,s=u(t,n,o);return f.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new m("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r=g);var i=e.filter;"function"!=typeof i&&(i=j);var o=e.promisifier;if("function"!=typeof o&&(o=k),!f.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=f.inheritedDataKeys(t),a=0;ao;++o){var s=r[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,n?-6:-3)}function s(t){var n,s=r(t);return l(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,c=t("./util"),l=c.isObject,u=t("./es5");"function"==typeof Map&&(a=Map);var p=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),h=function(t){for(var e=new a,n=t.length/2|0,r=0;n>r;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};c.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=h(this._values);else{r={};for(var i=this.length(),o=0,s=this.length();s>o;++o)r[this._values[o+i]]=this._values[o]}return this._resolve(r),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityh;++h){var _=t[h];(void 0!==_||h in t)&&e.cast(_)._then(u,p,void 0,l,null)}return l}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t);var s=h();this._fn=null===s?n:f.domainBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,n,i){if("function"!=typeof e)return r("expecting a function but got "+f.classString(e));var o=new a(t,e,n,i);return o.promise()}function u(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(t){var n=this.array,r=n._promise,i=_(n._fn);r._pushContext();var o;o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var h=e._getDomain,f=t("./util"),_=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;i>r;++r){var o={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(u,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(c,c,void 0,n,this)},e.prototype.reduce=function(t,e){return l(this,t,e,null)},e.reduce=function(t,e,n,r){return l(t,e,n,r)}}},{"./util":36}],29:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var l=s.resolve();r=function(t){l.then(t)}}else r="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});i.observe(r,e);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),o()}}():"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o;e.exports=r},{"./util":36 +}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection,s=t("./util");s.inherits(i,n),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,c=t("./errors").AggregateError,l=s.isArray,u={};s.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=l(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new c,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var i=o(t);if(i===l){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(s(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return a(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(e){return l.e=e,l}}function s(t){try{return p.call(t,"_promise0")}catch(e){return!1}}function a(t,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new e(n),u=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,h=c.tryCatch(r).call(t,o,s);return p=!1,a&&h===l&&(a._rejectCallback(h.e,!0,!0),a=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var l=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(l,null,null,t,void 0),r.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return u(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new c("operation timed out"):new c(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,c=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,c,void 0),n._setOnCancel(c)):n=this._then(o,s,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function c(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function l(t,n){function i(){if(s>=l)return u._fulfill();var o=c(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(p){return a(p)}if(o instanceof e)return o._then(i,a,null,null,null)}i()}var s=0,l=t.length,u=new e(o);return i(),u}function u(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function h(t){return u.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function f(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,m=_.tryCatch,g={};u.prototype.data=function(){return this._data},u.prototype.promise=function(){return this._promise},u.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():g},u.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==g?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},u.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(p,u),p.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},f.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+_.classString(i));var o,a=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,a=!1):(o=arguments,t--);for(var c=new f(t),p=0;t>p;++p){var d=o[p];if(u.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var g=r(d);g instanceof e&&(d=g._then(h,null,null,{resources:c,index:p},void 0))}c[p]=d}for(var b=new Array(c.length),p=0;p0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function r(){try{var t=P;return P=null,t.apply(this,arguments)}catch(e){return x.e=e,x}}function i(t){return P=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function h(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function f(t){function e(){}function n(){return typeof r.foo}e.prototype=t;var r=new e;return n(),n(),t}function _(t){return D.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function m(t){try{u(t,"isOperational",!0)}catch(e){}}function g(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function w(t){return{}.toString.call(t)}function C(t,e,n){for(var r=F.names(t),i=0;i10||t[0]>0}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(U){B.lastLineError=U}e.exports=B},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file diff --git a/node_modules/bluebird/js/release/any.js b/node_modules/bluebird/js/release/any.js new file mode 100644 index 00000000..05a6228e --- /dev/null +++ b/node_modules/bluebird/js/release/any.js @@ -0,0 +1,21 @@ +"use strict"; +module.exports = function(Promise) { +var SomePromiseArray = Promise._SomePromiseArray; +function any(promises) { + var ret = new SomePromiseArray(promises); + var promise = ret.promise(); + ret.setHowMany(1); + ret.setUnwrap(); + ret.init(); + return promise; +} + +Promise.any = function (promises) { + return any(promises); +}; + +Promise.prototype.any = function () { + return any(this); +}; + +}; diff --git a/node_modules/bluebird/js/release/assert.js b/node_modules/bluebird/js/release/assert.js new file mode 100644 index 00000000..4518231a --- /dev/null +++ b/node_modules/bluebird/js/release/assert.js @@ -0,0 +1,55 @@ +"use strict"; +module.exports = (function(){ +var AssertionError = (function() { + function AssertionError(a) { + this.constructor$(a); + this.message = a; + this.name = "AssertionError"; + } + AssertionError.prototype = new Error(); + AssertionError.prototype.constructor = AssertionError; + AssertionError.prototype.constructor$ = Error; + return AssertionError; +})(); + +function getParams(args) { + var params = []; + for (var i = 0; i < args.length; ++i) params.push("arg" + i); + return params; +} + +function nativeAssert(callName, args, expect) { + try { + var params = getParams(args); + var constructorArgs = params; + constructorArgs.push("return " + + callName + "("+ params.join(",") + ");"); + var fn = Function.apply(null, constructorArgs); + return fn.apply(null, args); + } catch (e) { + if (!(e instanceof SyntaxError)) { + throw e; + } else { + return expect; + } + } +} + +return function assert(boolExpr, message) { + if (boolExpr === true) return; + + if (typeof boolExpr === "string" && + boolExpr.charAt(0) === "%") { + var nativeCallName = boolExpr; + var $_len = arguments.length;var args = new Array(Math.max($_len - 2, 0)); for(var $_i = 2; $_i < $_len; ++$_i) {args[$_i - 2] = arguments[$_i];}; + if (nativeAssert(nativeCallName, args, message) === message) return; + message = (nativeCallName + " !== " + message); + } + + var ret = new AssertionError(message); + if (Error.captureStackTrace) { + Error.captureStackTrace(ret, assert); + } + throw ret; +}; +})(); diff --git a/node_modules/bluebird/js/release/async.js b/node_modules/bluebird/js/release/async.js new file mode 100644 index 00000000..73cdc611 --- /dev/null +++ b/node_modules/bluebird/js/release/async.js @@ -0,0 +1,165 @@ +"use strict"; +var firstLineError; +try {throw new Error(); } catch (e) {firstLineError = e;} +var schedule = require("./schedule"); +var Queue = require("./queue"); +var util = require("./util"); + +function Async() { + this._customScheduler = false; + this._isTickUsed = false; + this._lateQueue = new Queue(16); + this._normalQueue = new Queue(16); + this._haveDrainedQueues = false; + this._trampolineEnabled = true; + var self = this; + this.drainQueues = function () { + self._drainQueues(); + }; + this._schedule = schedule; +} + +Async.prototype.setScheduler = function(fn) { + var prev = this._schedule; + this._schedule = fn; + this._customScheduler = true; + return prev; +}; + +Async.prototype.hasCustomScheduler = function() { + return this._customScheduler; +}; + +Async.prototype.enableTrampoline = function() { + this._trampolineEnabled = true; +}; + +Async.prototype.disableTrampolineIfNecessary = function() { + if (util.hasDevTools) { + this._trampolineEnabled = false; + } +}; + +Async.prototype.haveItemsQueued = function () { + return this._isTickUsed || this._haveDrainedQueues; +}; + + +Async.prototype.fatalError = function(e, isNode) { + if (isNode) { + process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) + + "\n"); + process.exit(2); + } else { + this.throwLater(e); + } +}; + +Async.prototype.throwLater = function(fn, arg) { + if (arguments.length === 1) { + arg = fn; + fn = function () { throw arg; }; + } + if (typeof setTimeout !== "undefined") { + setTimeout(function() { + fn(arg); + }, 0); + } else try { + this._schedule(function() { + fn(arg); + }); + } catch (e) { + throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } +}; + +function AsyncInvokeLater(fn, receiver, arg) { + this._lateQueue.push(fn, receiver, arg); + this._queueTick(); +} + +function AsyncInvoke(fn, receiver, arg) { + this._normalQueue.push(fn, receiver, arg); + this._queueTick(); +} + +function AsyncSettlePromises(promise) { + this._normalQueue._pushOne(promise); + this._queueTick(); +} + +if (!util.hasDevTools) { + Async.prototype.invokeLater = AsyncInvokeLater; + Async.prototype.invoke = AsyncInvoke; + Async.prototype.settlePromises = AsyncSettlePromises; +} else { + Async.prototype.invokeLater = function (fn, receiver, arg) { + if (this._trampolineEnabled) { + AsyncInvokeLater.call(this, fn, receiver, arg); + } else { + this._schedule(function() { + setTimeout(function() { + fn.call(receiver, arg); + }, 100); + }); + } + }; + + Async.prototype.invoke = function (fn, receiver, arg) { + if (this._trampolineEnabled) { + AsyncInvoke.call(this, fn, receiver, arg); + } else { + this._schedule(function() { + fn.call(receiver, arg); + }); + } + }; + + Async.prototype.settlePromises = function(promise) { + if (this._trampolineEnabled) { + AsyncSettlePromises.call(this, promise); + } else { + this._schedule(function() { + promise._settlePromises(); + }); + } + }; +} + +function _drainQueue(queue) { + while (queue.length() > 0) { + _drainQueueStep(queue); + } +} + +function _drainQueueStep(queue) { + var fn = queue.shift(); + if (typeof fn !== "function") { + fn._settlePromises(); + } else { + var receiver = queue.shift(); + var arg = queue.shift(); + fn.call(receiver, arg); + } +} + +Async.prototype._drainQueues = function () { + _drainQueue(this._normalQueue); + this._reset(); + this._haveDrainedQueues = true; + _drainQueue(this._lateQueue); +}; + +Async.prototype._queueTick = function () { + if (!this._isTickUsed) { + this._isTickUsed = true; + this._schedule(this.drainQueues); + } +}; + +Async.prototype._reset = function () { + this._isTickUsed = false; +}; + +module.exports = Async; +module.exports.firstLineError = firstLineError; diff --git a/node_modules/bluebird/js/release/bind.js b/node_modules/bluebird/js/release/bind.js new file mode 100644 index 00000000..fc3379db --- /dev/null +++ b/node_modules/bluebird/js/release/bind.js @@ -0,0 +1,67 @@ +"use strict"; +module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) { +var calledBind = false; +var rejectThis = function(_, e) { + this._reject(e); +}; + +var targetRejected = function(e, context) { + context.promiseRejectionQueued = true; + context.bindingPromise._then(rejectThis, rejectThis, null, this, e); +}; + +var bindingResolved = function(thisArg, context) { + if (((this._bitField & 50397184) === 0)) { + this._resolveCallback(context.target); + } +}; + +var bindingRejected = function(e, context) { + if (!context.promiseRejectionQueued) this._reject(e); +}; + +Promise.prototype.bind = function (thisArg) { + if (!calledBind) { + calledBind = true; + Promise.prototype._propagateFrom = debug.propagateFromFunction(); + Promise.prototype._boundValue = debug.boundValueFunction(); + } + var maybePromise = tryConvertToPromise(thisArg); + var ret = new Promise(INTERNAL); + ret._propagateFrom(this, 1); + var target = this._target(); + ret._setBoundTo(maybePromise); + if (maybePromise instanceof Promise) { + var context = { + promiseRejectionQueued: false, + promise: ret, + target: target, + bindingPromise: maybePromise + }; + target._then(INTERNAL, targetRejected, undefined, ret, context); + maybePromise._then( + bindingResolved, bindingRejected, undefined, ret, context); + ret._setOnCancel(maybePromise); + } else { + ret._resolveCallback(target); + } + return ret; +}; + +Promise.prototype._setBoundTo = function (obj) { + if (obj !== undefined) { + this._bitField = this._bitField | 2097152; + this._boundTo = obj; + } else { + this._bitField = this._bitField & (~2097152); + } +}; + +Promise.prototype._isBound = function () { + return (this._bitField & 2097152) === 2097152; +}; + +Promise.bind = function (thisArg, value) { + return Promise.resolve(value).bind(thisArg); +}; +}; diff --git a/node_modules/bluebird/js/release/bluebird.js b/node_modules/bluebird/js/release/bluebird.js new file mode 100644 index 00000000..1c36cf36 --- /dev/null +++ b/node_modules/bluebird/js/release/bluebird.js @@ -0,0 +1,11 @@ +"use strict"; +var old; +if (typeof Promise !== "undefined") old = Promise; +function noConflict() { + try { if (Promise === bluebird) Promise = old; } + catch (e) {} + return bluebird; +} +var bluebird = require("./promise")(); +bluebird.noConflict = noConflict; +module.exports = bluebird; diff --git a/node_modules/bluebird/js/release/call_get.js b/node_modules/bluebird/js/release/call_get.js new file mode 100644 index 00000000..0ed7714a --- /dev/null +++ b/node_modules/bluebird/js/release/call_get.js @@ -0,0 +1,123 @@ +"use strict"; +var cr = Object.create; +if (cr) { + var callerCache = cr(null); + var getterCache = cr(null); + callerCache[" size"] = getterCache[" size"] = 0; +} + +module.exports = function(Promise) { +var util = require("./util"); +var canEvaluate = util.canEvaluate; +var isIdentifier = util.isIdentifier; + +var getMethodCaller; +var getGetter; +if (!false) { +var makeMethodCaller = function (methodName) { + return new Function("ensureMethod", " \n\ + return function(obj) { \n\ + 'use strict' \n\ + var len = this.length; \n\ + ensureMethod(obj, 'methodName'); \n\ + switch(len) { \n\ + case 1: return obj.methodName(this[0]); \n\ + case 2: return obj.methodName(this[0], this[1]); \n\ + case 3: return obj.methodName(this[0], this[1], this[2]); \n\ + case 0: return obj.methodName(); \n\ + default: \n\ + return obj.methodName.apply(obj, this); \n\ + } \n\ + }; \n\ + ".replace(/methodName/g, methodName))(ensureMethod); +}; + +var makeGetter = function (propertyName) { + return new Function("obj", " \n\ + 'use strict'; \n\ + return obj.propertyName; \n\ + ".replace("propertyName", propertyName)); +}; + +var getCompiled = function(name, compiler, cache) { + var ret = cache[name]; + if (typeof ret !== "function") { + if (!isIdentifier(name)) { + return null; + } + ret = compiler(name); + cache[name] = ret; + cache[" size"]++; + if (cache[" size"] > 512) { + var keys = Object.keys(cache); + for (var i = 0; i < 256; ++i) delete cache[keys[i]]; + cache[" size"] = keys.length - 256; + } + } + return ret; +}; + +getMethodCaller = function(name) { + return getCompiled(name, makeMethodCaller, callerCache); +}; + +getGetter = function(name) { + return getCompiled(name, makeGetter, getterCache); +}; +} + +function ensureMethod(obj, methodName) { + var fn; + if (obj != null) fn = obj[methodName]; + if (typeof fn !== "function") { + var message = "Object " + util.classString(obj) + " has no method '" + + util.toString(methodName) + "'"; + throw new Promise.TypeError(message); + } + return fn; +} + +function caller(obj) { + var methodName = this.pop(); + var fn = ensureMethod(obj, methodName); + return fn.apply(obj, this); +} +Promise.prototype.call = function (methodName) { + var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}; + if (!false) { + if (canEvaluate) { + var maybeCaller = getMethodCaller(methodName); + if (maybeCaller !== null) { + return this._then( + maybeCaller, undefined, undefined, args, undefined); + } + } + } + args.push(methodName); + return this._then(caller, undefined, undefined, args, undefined); +}; + +function namedGetter(obj) { + return obj[this]; +} +function indexedGetter(obj) { + var index = +this; + if (index < 0) index = Math.max(0, index + obj.length); + return obj[index]; +} +Promise.prototype.get = function (propertyName) { + var isIndex = (typeof propertyName === "number"); + var getter; + if (!isIndex) { + if (canEvaluate) { + var maybeGetter = getGetter(propertyName); + getter = maybeGetter !== null ? maybeGetter : namedGetter; + } else { + getter = namedGetter; + } + } else { + getter = indexedGetter; + } + return this._then(getter, undefined, undefined, propertyName, undefined); +}; +}; diff --git a/node_modules/bluebird/js/release/cancel.js b/node_modules/bluebird/js/release/cancel.js new file mode 100644 index 00000000..7a12415e --- /dev/null +++ b/node_modules/bluebird/js/release/cancel.js @@ -0,0 +1,129 @@ +"use strict"; +module.exports = function(Promise, PromiseArray, apiRejection, debug) { +var util = require("./util"); +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var async = Promise._async; + +Promise.prototype["break"] = Promise.prototype.cancel = function() { + if (!debug.cancellation()) return this._warn("cancellation is disabled"); + + var promise = this; + var child = promise; + while (promise._isCancellable()) { + if (!promise._cancelBy(child)) { + if (child._isFollowing()) { + child._followee().cancel(); + } else { + child._cancelBranched(); + } + break; + } + + var parent = promise._cancellationParent; + if (parent == null || !parent._isCancellable()) { + if (promise._isFollowing()) { + promise._followee().cancel(); + } else { + promise._cancelBranched(); + } + break; + } else { + if (promise._isFollowing()) promise._followee().cancel(); + promise._setWillBeCancelled(); + child = promise; + promise = parent; + } + } +}; + +Promise.prototype._branchHasCancelled = function() { + this._branchesRemainingToCancel--; +}; + +Promise.prototype._enoughBranchesHaveCancelled = function() { + return this._branchesRemainingToCancel === undefined || + this._branchesRemainingToCancel <= 0; +}; + +Promise.prototype._cancelBy = function(canceller) { + if (canceller === this) { + this._branchesRemainingToCancel = 0; + this._invokeOnCancel(); + return true; + } else { + this._branchHasCancelled(); + if (this._enoughBranchesHaveCancelled()) { + this._invokeOnCancel(); + return true; + } + } + return false; +}; + +Promise.prototype._cancelBranched = function() { + if (this._enoughBranchesHaveCancelled()) { + this._cancel(); + } +}; + +Promise.prototype._cancel = function() { + if (!this._isCancellable()) return; + this._setCancelled(); + async.invoke(this._cancelPromises, this, undefined); +}; + +Promise.prototype._cancelPromises = function() { + if (this._length() > 0) this._settlePromises(); +}; + +Promise.prototype._unsetOnCancel = function() { + this._onCancelField = undefined; +}; + +Promise.prototype._isCancellable = function() { + return this.isPending() && !this._isCancelled(); +}; + +Promise.prototype.isCancellable = function() { + return this.isPending() && !this.isCancelled(); +}; + +Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) { + if (util.isArray(onCancelCallback)) { + for (var i = 0; i < onCancelCallback.length; ++i) { + this._doInvokeOnCancel(onCancelCallback[i], internalOnly); + } + } else if (onCancelCallback !== undefined) { + if (typeof onCancelCallback === "function") { + if (!internalOnly) { + var e = tryCatch(onCancelCallback).call(this._boundValue()); + if (e === errorObj) { + this._attachExtraTrace(e.e); + async.throwLater(e.e); + } + } + } else { + onCancelCallback._resultCancelled(this); + } + } +}; + +Promise.prototype._invokeOnCancel = function() { + var onCancelCallback = this._onCancel(); + this._unsetOnCancel(); + async.invoke(this._doInvokeOnCancel, this, onCancelCallback); +}; + +Promise.prototype._invokeInternalOnCancel = function() { + if (this._isCancellable()) { + this._doInvokeOnCancel(this._onCancel(), true); + this._unsetOnCancel(); + } +}; + +Promise.prototype._resultCancelled = function() { + this.cancel(); +}; + +}; diff --git a/node_modules/bluebird/js/release/catch_filter.js b/node_modules/bluebird/js/release/catch_filter.js new file mode 100644 index 00000000..0f24ce23 --- /dev/null +++ b/node_modules/bluebird/js/release/catch_filter.js @@ -0,0 +1,42 @@ +"use strict"; +module.exports = function(NEXT_FILTER) { +var util = require("./util"); +var getKeys = require("./es5").keys; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; + +function catchFilter(instances, cb, promise) { + return function(e) { + var boundTo = promise._boundValue(); + predicateLoop: for (var i = 0; i < instances.length; ++i) { + var item = instances[i]; + + if (item === Error || + (item != null && item.prototype instanceof Error)) { + if (e instanceof item) { + return tryCatch(cb).call(boundTo, e); + } + } else if (typeof item === "function") { + var matchesPredicate = tryCatch(item).call(boundTo, e); + if (matchesPredicate === errorObj) { + return matchesPredicate; + } else if (matchesPredicate) { + return tryCatch(cb).call(boundTo, e); + } + } else if (util.isObject(e)) { + var keys = getKeys(item); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + if (item[key] != e[key]) { + continue predicateLoop; + } + } + return tryCatch(cb).call(boundTo, e); + } + } + return NEXT_FILTER; + }; +} + +return catchFilter; +}; diff --git a/node_modules/bluebird/js/release/context.js b/node_modules/bluebird/js/release/context.js new file mode 100644 index 00000000..c307414f --- /dev/null +++ b/node_modules/bluebird/js/release/context.js @@ -0,0 +1,69 @@ +"use strict"; +module.exports = function(Promise) { +var longStackTraces = false; +var contextStack = []; + +Promise.prototype._promiseCreated = function() {}; +Promise.prototype._pushContext = function() {}; +Promise.prototype._popContext = function() {return null;}; +Promise._peekContext = Promise.prototype._peekContext = function() {}; + +function Context() { + this._trace = new Context.CapturedTrace(peekContext()); +} +Context.prototype._pushContext = function () { + if (this._trace !== undefined) { + this._trace._promiseCreated = null; + contextStack.push(this._trace); + } +}; + +Context.prototype._popContext = function () { + if (this._trace !== undefined) { + var trace = contextStack.pop(); + var ret = trace._promiseCreated; + trace._promiseCreated = null; + return ret; + } + return null; +}; + +function createContext() { + if (longStackTraces) return new Context(); +} + +function peekContext() { + var lastIndex = contextStack.length - 1; + if (lastIndex >= 0) { + return contextStack[lastIndex]; + } + return undefined; +} +Context.CapturedTrace = null; +Context.create = createContext; +Context.deactivateLongStackTraces = function() {}; +Context.activateLongStackTraces = function() { + var Promise_pushContext = Promise.prototype._pushContext; + var Promise_popContext = Promise.prototype._popContext; + var Promise_PeekContext = Promise._peekContext; + var Promise_peekContext = Promise.prototype._peekContext; + var Promise_promiseCreated = Promise.prototype._promiseCreated; + Context.deactivateLongStackTraces = function() { + Promise.prototype._pushContext = Promise_pushContext; + Promise.prototype._popContext = Promise_popContext; + Promise._peekContext = Promise_PeekContext; + Promise.prototype._peekContext = Promise_peekContext; + Promise.prototype._promiseCreated = Promise_promiseCreated; + longStackTraces = false; + }; + longStackTraces = true; + Promise.prototype._pushContext = Context.prototype._pushContext; + Promise.prototype._popContext = Context.prototype._popContext; + Promise._peekContext = Promise.prototype._peekContext = peekContext; + Promise.prototype._promiseCreated = function() { + var ctx = this._peekContext(); + if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this; + }; +}; +return Context; +}; diff --git a/node_modules/bluebird/js/release/debuggability.js b/node_modules/bluebird/js/release/debuggability.js new file mode 100644 index 00000000..9a64c99c --- /dev/null +++ b/node_modules/bluebird/js/release/debuggability.js @@ -0,0 +1,934 @@ +"use strict"; +module.exports = function(Promise, Context) { +var getDomain = Promise._getDomain; +var async = Promise._async; +var Warning = require("./errors").Warning; +var util = require("./util"); +var es5 = require("./es5"); +var canAttachTrace = util.canAttachTrace; +var unhandledRejectionHandled; +var possiblyUnhandledRejection; +var bluebirdFramePattern = + /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/; +var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/; +var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/; +var stackFramePattern = null; +var formatStack = null; +var indentStackFrames = false; +var printWarning; +var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 && + (false || + util.env("BLUEBIRD_DEBUG") || + util.env("NODE_ENV") === "development")); + +var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 && + (debugging || util.env("BLUEBIRD_WARNINGS"))); + +var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 && + (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES"))); + +var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 && + (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN")); + +Promise.prototype.suppressUnhandledRejections = function() { + var target = this._target(); + target._bitField = ((target._bitField & (~1048576)) | + 524288); +}; + +Promise.prototype._ensurePossibleRejectionHandled = function () { + if ((this._bitField & 524288) !== 0) return; + this._setRejectionIsUnhandled(); + var self = this; + setTimeout(function() { + self._notifyUnhandledRejection(); + }, 1); +}; + +Promise.prototype._notifyUnhandledRejectionIsHandled = function () { + fireRejectionEvent("rejectionHandled", + unhandledRejectionHandled, undefined, this); +}; + +Promise.prototype._setReturnedNonUndefined = function() { + this._bitField = this._bitField | 268435456; +}; + +Promise.prototype._returnedNonUndefined = function() { + return (this._bitField & 268435456) !== 0; +}; + +Promise.prototype._notifyUnhandledRejection = function () { + if (this._isRejectionUnhandled()) { + var reason = this._settledValue(); + this._setUnhandledRejectionIsNotified(); + fireRejectionEvent("unhandledRejection", + possiblyUnhandledRejection, reason, this); + } +}; + +Promise.prototype._setUnhandledRejectionIsNotified = function () { + this._bitField = this._bitField | 262144; +}; + +Promise.prototype._unsetUnhandledRejectionIsNotified = function () { + this._bitField = this._bitField & (~262144); +}; + +Promise.prototype._isUnhandledRejectionNotified = function () { + return (this._bitField & 262144) > 0; +}; + +Promise.prototype._setRejectionIsUnhandled = function () { + this._bitField = this._bitField | 1048576; +}; + +Promise.prototype._unsetRejectionIsUnhandled = function () { + this._bitField = this._bitField & (~1048576); + if (this._isUnhandledRejectionNotified()) { + this._unsetUnhandledRejectionIsNotified(); + this._notifyUnhandledRejectionIsHandled(); + } +}; + +Promise.prototype._isRejectionUnhandled = function () { + return (this._bitField & 1048576) > 0; +}; + +Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) { + return warn(message, shouldUseOwnTrace, promise || this); +}; + +Promise.onPossiblyUnhandledRejection = function (fn) { + var domain = getDomain(); + possiblyUnhandledRejection = + typeof fn === "function" ? (domain === null ? + fn : util.domainBind(domain, fn)) + : undefined; +}; + +Promise.onUnhandledRejectionHandled = function (fn) { + var domain = getDomain(); + unhandledRejectionHandled = + typeof fn === "function" ? (domain === null ? + fn : util.domainBind(domain, fn)) + : undefined; +}; + +var disableLongStackTraces = function() {}; +Promise.longStackTraces = function () { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + if (!config.longStackTraces && longStackTracesIsSupported()) { + var Promise_captureStackTrace = Promise.prototype._captureStackTrace; + var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace; + var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace; + config.longStackTraces = true; + disableLongStackTraces = function() { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + Promise.prototype._captureStackTrace = Promise_captureStackTrace; + Promise.prototype._attachExtraTrace = Promise_attachExtraTrace; + Promise.prototype._dereferenceTrace = Promise_dereferenceTrace; + Context.deactivateLongStackTraces(); + async.enableTrampoline(); + config.longStackTraces = false; + }; + Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace; + Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace; + Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace; + Context.activateLongStackTraces(); + async.disableTrampolineIfNecessary(); + } +}; + +Promise.hasLongStackTraces = function () { + return config.longStackTraces && longStackTracesIsSupported(); +}; + +var fireDomEvent = (function() { + try { + if (typeof CustomEvent === "function") { + var event = new CustomEvent("CustomEvent"); + util.global.dispatchEvent(event); + return function(name, event) { + var eventData = { + detail: event, + cancelable: true + }; + es5.defineProperty( + eventData, "promise", {value: event.promise}); + es5.defineProperty(eventData, "reason", {value: event.reason}); + var domEvent = new CustomEvent(name.toLowerCase(), eventData); + return !util.global.dispatchEvent(domEvent); + }; + } else if (typeof Event === "function") { + var event = new Event("CustomEvent"); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = new Event(name.toLowerCase(), { + cancelable: true + }); + domEvent.detail = event; + es5.defineProperty(domEvent, "promise", {value: event.promise}); + es5.defineProperty(domEvent, "reason", {value: event.reason}); + return !util.global.dispatchEvent(domEvent); + }; + } else { + var event = document.createEvent("CustomEvent"); + event.initCustomEvent("testingtheevent", false, true, {}); + util.global.dispatchEvent(event); + return function(name, event) { + var domEvent = document.createEvent("CustomEvent"); + domEvent.initCustomEvent(name.toLowerCase(), false, true, + event); + return !util.global.dispatchEvent(domEvent); + }; + } + } catch (e) {} + return function() { + return false; + }; +})(); + +var fireGlobalEvent = (function() { + if (util.isNode) { + return function() { + return process.emit.apply(process, arguments); + }; + } else { + if (!util.global) { + return function() { + return false; + }; + } + return function(name) { + var methodName = "on" + name.toLowerCase(); + var method = util.global[methodName]; + if (!method) return false; + method.apply(util.global, [].slice.call(arguments, 1)); + return true; + }; + } +})(); + +function generatePromiseLifecycleEventObject(name, promise) { + return {promise: promise}; +} + +var eventToObjectGenerator = { + promiseCreated: generatePromiseLifecycleEventObject, + promiseFulfilled: generatePromiseLifecycleEventObject, + promiseRejected: generatePromiseLifecycleEventObject, + promiseResolved: generatePromiseLifecycleEventObject, + promiseCancelled: generatePromiseLifecycleEventObject, + promiseChained: function(name, promise, child) { + return {promise: promise, child: child}; + }, + warning: function(name, warning) { + return {warning: warning}; + }, + unhandledRejection: function (name, reason, promise) { + return {reason: reason, promise: promise}; + }, + rejectionHandled: generatePromiseLifecycleEventObject +}; + +var activeFireEvent = function (name) { + var globalEventFired = false; + try { + globalEventFired = fireGlobalEvent.apply(null, arguments); + } catch (e) { + async.throwLater(e); + globalEventFired = true; + } + + var domEventFired = false; + try { + domEventFired = fireDomEvent(name, + eventToObjectGenerator[name].apply(null, arguments)); + } catch (e) { + async.throwLater(e); + domEventFired = true; + } + + return domEventFired || globalEventFired; +}; + +Promise.config = function(opts) { + opts = Object(opts); + if ("longStackTraces" in opts) { + if (opts.longStackTraces) { + Promise.longStackTraces(); + } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) { + disableLongStackTraces(); + } + } + if ("warnings" in opts) { + var warningsOption = opts.warnings; + config.warnings = !!warningsOption; + wForgottenReturn = config.warnings; + + if (util.isObject(warningsOption)) { + if ("wForgottenReturn" in warningsOption) { + wForgottenReturn = !!warningsOption.wForgottenReturn; + } + } + } + if ("cancellation" in opts && opts.cancellation && !config.cancellation) { + if (async.haveItemsQueued()) { + throw new Error( + "cannot enable cancellation after promises are in use"); + } + Promise.prototype._clearCancellationData = + cancellationClearCancellationData; + Promise.prototype._propagateFrom = cancellationPropagateFrom; + Promise.prototype._onCancel = cancellationOnCancel; + Promise.prototype._setOnCancel = cancellationSetOnCancel; + Promise.prototype._attachCancellationCallback = + cancellationAttachCancellationCallback; + Promise.prototype._execute = cancellationExecute; + propagateFromFunction = cancellationPropagateFrom; + config.cancellation = true; + } + if ("monitoring" in opts) { + if (opts.monitoring && !config.monitoring) { + config.monitoring = true; + Promise.prototype._fireEvent = activeFireEvent; + } else if (!opts.monitoring && config.monitoring) { + config.monitoring = false; + Promise.prototype._fireEvent = defaultFireEvent; + } + } + return Promise; +}; + +function defaultFireEvent() { return false; } + +Promise.prototype._fireEvent = defaultFireEvent; +Promise.prototype._execute = function(executor, resolve, reject) { + try { + executor(resolve, reject); + } catch (e) { + return e; + } +}; +Promise.prototype._onCancel = function () {}; +Promise.prototype._setOnCancel = function (handler) { ; }; +Promise.prototype._attachCancellationCallback = function(onCancel) { + ; +}; +Promise.prototype._captureStackTrace = function () {}; +Promise.prototype._attachExtraTrace = function () {}; +Promise.prototype._dereferenceTrace = function () {}; +Promise.prototype._clearCancellationData = function() {}; +Promise.prototype._propagateFrom = function (parent, flags) { + ; + ; +}; + +function cancellationExecute(executor, resolve, reject) { + var promise = this; + try { + executor(resolve, reject, function(onCancel) { + if (typeof onCancel !== "function") { + throw new TypeError("onCancel must be a function, got: " + + util.toString(onCancel)); + } + promise._attachCancellationCallback(onCancel); + }); + } catch (e) { + return e; + } +} + +function cancellationAttachCancellationCallback(onCancel) { + if (!this._isCancellable()) return this; + + var previousOnCancel = this._onCancel(); + if (previousOnCancel !== undefined) { + if (util.isArray(previousOnCancel)) { + previousOnCancel.push(onCancel); + } else { + this._setOnCancel([previousOnCancel, onCancel]); + } + } else { + this._setOnCancel(onCancel); + } +} + +function cancellationOnCancel() { + return this._onCancelField; +} + +function cancellationSetOnCancel(onCancel) { + this._onCancelField = onCancel; +} + +function cancellationClearCancellationData() { + this._cancellationParent = undefined; + this._onCancelField = undefined; +} + +function cancellationPropagateFrom(parent, flags) { + if ((flags & 1) !== 0) { + this._cancellationParent = parent; + var branchesRemainingToCancel = parent._branchesRemainingToCancel; + if (branchesRemainingToCancel === undefined) { + branchesRemainingToCancel = 0; + } + parent._branchesRemainingToCancel = branchesRemainingToCancel + 1; + } + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } +} + +function bindingPropagateFrom(parent, flags) { + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } +} +var propagateFromFunction = bindingPropagateFrom; + +function boundValueFunction() { + var ret = this._boundTo; + if (ret !== undefined) { + if (ret instanceof Promise) { + if (ret.isFulfilled()) { + return ret.value(); + } else { + return undefined; + } + } + } + return ret; +} + +function longStackTracesCaptureStackTrace() { + this._trace = new CapturedTrace(this._peekContext()); +} + +function longStackTracesAttachExtraTrace(error, ignoreSelf) { + if (canAttachTrace(error)) { + var trace = this._trace; + if (trace !== undefined) { + if (ignoreSelf) trace = trace._parent; + } + if (trace !== undefined) { + trace.attachExtraTrace(error); + } else if (!error.__stackCleaned__) { + var parsed = parseStackAndMessage(error); + util.notEnumerableProp(error, "stack", + parsed.message + "\n" + parsed.stack.join("\n")); + util.notEnumerableProp(error, "__stackCleaned__", true); + } + } +} + +function longStackTracesDereferenceTrace() { + this._trace = undefined; +} + +function checkForgottenReturns(returnValue, promiseCreated, name, promise, + parent) { + if (returnValue === undefined && promiseCreated !== null && + wForgottenReturn) { + if (parent !== undefined && parent._returnedNonUndefined()) return; + if ((promise._bitField & 65535) === 0) return; + + if (name) name = name + " "; + var handlerLine = ""; + var creatorLine = ""; + if (promiseCreated._trace) { + var traceLines = promiseCreated._trace.stack.split("\n"); + var stack = cleanStack(traceLines); + for (var i = stack.length - 1; i >= 0; --i) { + var line = stack[i]; + if (!nodeFramePattern.test(line)) { + var lineMatches = line.match(parseLinePattern); + if (lineMatches) { + handlerLine = "at " + lineMatches[1] + + ":" + lineMatches[2] + ":" + lineMatches[3] + " "; + } + break; + } + } + + if (stack.length > 0) { + var firstUserLine = stack[0]; + for (var i = 0; i < traceLines.length; ++i) { + + if (traceLines[i] === firstUserLine) { + if (i > 0) { + creatorLine = "\n" + traceLines[i - 1]; + } + break; + } + } + + } + } + var msg = "a promise was created in a " + name + + "handler " + handlerLine + "but was not returned from it, " + + "see http://goo.gl/rRqMUw" + + creatorLine; + promise._warn(msg, true, promiseCreated); + } +} + +function deprecated(name, replacement) { + var message = name + + " is deprecated and will be removed in a future version."; + if (replacement) message += " Use " + replacement + " instead."; + return warn(message); +} + +function warn(message, shouldUseOwnTrace, promise) { + if (!config.warnings) return; + var warning = new Warning(message); + var ctx; + if (shouldUseOwnTrace) { + promise._attachExtraTrace(warning); + } else if (config.longStackTraces && (ctx = Promise._peekContext())) { + ctx.attachExtraTrace(warning); + } else { + var parsed = parseStackAndMessage(warning); + warning.stack = parsed.message + "\n" + parsed.stack.join("\n"); + } + + if (!activeFireEvent("warning", warning)) { + formatAndLogError(warning, "", true); + } +} + +function reconstructStack(message, stacks) { + for (var i = 0; i < stacks.length - 1; ++i) { + stacks[i].push("From previous event:"); + stacks[i] = stacks[i].join("\n"); + } + if (i < stacks.length) { + stacks[i] = stacks[i].join("\n"); + } + return message + "\n" + stacks.join("\n"); +} + +function removeDuplicateOrEmptyJumps(stacks) { + for (var i = 0; i < stacks.length; ++i) { + if (stacks[i].length === 0 || + ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) { + stacks.splice(i, 1); + i--; + } + } +} + +function removeCommonRoots(stacks) { + var current = stacks[0]; + for (var i = 1; i < stacks.length; ++i) { + var prev = stacks[i]; + var currentLastIndex = current.length - 1; + var currentLastLine = current[currentLastIndex]; + var commonRootMeetPoint = -1; + + for (var j = prev.length - 1; j >= 0; --j) { + if (prev[j] === currentLastLine) { + commonRootMeetPoint = j; + break; + } + } + + for (var j = commonRootMeetPoint; j >= 0; --j) { + var line = prev[j]; + if (current[currentLastIndex] === line) { + current.pop(); + currentLastIndex--; + } else { + break; + } + } + current = prev; + } +} + +function cleanStack(stack) { + var ret = []; + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + var isTraceLine = " (No stack trace)" === line || + stackFramePattern.test(line); + var isInternalFrame = isTraceLine && shouldIgnore(line); + if (isTraceLine && !isInternalFrame) { + if (indentStackFrames && line.charAt(0) !== " ") { + line = " " + line; + } + ret.push(line); + } + } + return ret; +} + +function stackFramesAsArray(error) { + var stack = error.stack.replace(/\s+$/g, "").split("\n"); + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + if (" (No stack trace)" === line || stackFramePattern.test(line)) { + break; + } + } + if (i > 0 && error.name != "SyntaxError") { + stack = stack.slice(i); + } + return stack; +} + +function parseStackAndMessage(error) { + var stack = error.stack; + var message = error.toString(); + stack = typeof stack === "string" && stack.length > 0 + ? stackFramesAsArray(error) : [" (No stack trace)"]; + return { + message: message, + stack: error.name == "SyntaxError" ? stack : cleanStack(stack) + }; +} + +function formatAndLogError(error, title, isSoft) { + if (typeof console !== "undefined") { + var message; + if (util.isObject(error)) { + var stack = error.stack; + message = title + formatStack(stack, error); + } else { + message = title + String(error); + } + if (typeof printWarning === "function") { + printWarning(message, isSoft); + } else if (typeof console.log === "function" || + typeof console.log === "object") { + console.log(message); + } + } +} + +function fireRejectionEvent(name, localHandler, reason, promise) { + var localEventFired = false; + try { + if (typeof localHandler === "function") { + localEventFired = true; + if (name === "rejectionHandled") { + localHandler(promise); + } else { + localHandler(reason, promise); + } + } + } catch (e) { + async.throwLater(e); + } + + if (name === "unhandledRejection") { + if (!activeFireEvent(name, reason, promise) && !localEventFired) { + formatAndLogError(reason, "Unhandled rejection "); + } + } else { + activeFireEvent(name, promise); + } +} + +function formatNonError(obj) { + var str; + if (typeof obj === "function") { + str = "[function " + + (obj.name || "anonymous") + + "]"; + } else { + str = obj && typeof obj.toString === "function" + ? obj.toString() : util.toString(obj); + var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/; + if (ruselessToString.test(str)) { + try { + var newStr = JSON.stringify(obj); + str = newStr; + } + catch(e) { + + } + } + if (str.length === 0) { + str = "(empty array)"; + } + } + return ("(<" + snip(str) + ">, no stack trace)"); +} + +function snip(str) { + var maxChars = 41; + if (str.length < maxChars) { + return str; + } + return str.substr(0, maxChars - 3) + "..."; +} + +function longStackTracesIsSupported() { + return typeof captureStackTrace === "function"; +} + +var shouldIgnore = function() { return false; }; +var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/; +function parseLineInfo(line) { + var matches = line.match(parseLineInfoRegex); + if (matches) { + return { + fileName: matches[1], + line: parseInt(matches[2], 10) + }; + } +} + +function setBounds(firstLineError, lastLineError) { + if (!longStackTracesIsSupported()) return; + var firstStackLines = (firstLineError.stack || "").split("\n"); + var lastStackLines = (lastLineError.stack || "").split("\n"); + var firstIndex = -1; + var lastIndex = -1; + var firstFileName; + var lastFileName; + for (var i = 0; i < firstStackLines.length; ++i) { + var result = parseLineInfo(firstStackLines[i]); + if (result) { + firstFileName = result.fileName; + firstIndex = result.line; + break; + } + } + for (var i = 0; i < lastStackLines.length; ++i) { + var result = parseLineInfo(lastStackLines[i]); + if (result) { + lastFileName = result.fileName; + lastIndex = result.line; + break; + } + } + if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName || + firstFileName !== lastFileName || firstIndex >= lastIndex) { + return; + } + + shouldIgnore = function(line) { + if (bluebirdFramePattern.test(line)) return true; + var info = parseLineInfo(line); + if (info) { + if (info.fileName === firstFileName && + (firstIndex <= info.line && info.line <= lastIndex)) { + return true; + } + } + return false; + }; +} + +function CapturedTrace(parent) { + this._parent = parent; + this._promisesCreated = 0; + var length = this._length = 1 + (parent === undefined ? 0 : parent._length); + captureStackTrace(this, CapturedTrace); + if (length > 32) this.uncycle(); +} +util.inherits(CapturedTrace, Error); +Context.CapturedTrace = CapturedTrace; + +CapturedTrace.prototype.uncycle = function() { + var length = this._length; + if (length < 2) return; + var nodes = []; + var stackToIndex = {}; + + for (var i = 0, node = this; node !== undefined; ++i) { + nodes.push(node); + node = node._parent; + } + length = this._length = i; + for (var i = length - 1; i >= 0; --i) { + var stack = nodes[i].stack; + if (stackToIndex[stack] === undefined) { + stackToIndex[stack] = i; + } + } + for (var i = 0; i < length; ++i) { + var currentStack = nodes[i].stack; + var index = stackToIndex[currentStack]; + if (index !== undefined && index !== i) { + if (index > 0) { + nodes[index - 1]._parent = undefined; + nodes[index - 1]._length = 1; + } + nodes[i]._parent = undefined; + nodes[i]._length = 1; + var cycleEdgeNode = i > 0 ? nodes[i - 1] : this; + + if (index < length - 1) { + cycleEdgeNode._parent = nodes[index + 1]; + cycleEdgeNode._parent.uncycle(); + cycleEdgeNode._length = + cycleEdgeNode._parent._length + 1; + } else { + cycleEdgeNode._parent = undefined; + cycleEdgeNode._length = 1; + } + var currentChildLength = cycleEdgeNode._length + 1; + for (var j = i - 2; j >= 0; --j) { + nodes[j]._length = currentChildLength; + currentChildLength++; + } + return; + } + } +}; + +CapturedTrace.prototype.attachExtraTrace = function(error) { + if (error.__stackCleaned__) return; + this.uncycle(); + var parsed = parseStackAndMessage(error); + var message = parsed.message; + var stacks = [parsed.stack]; + + var trace = this; + while (trace !== undefined) { + stacks.push(cleanStack(trace.stack.split("\n"))); + trace = trace._parent; + } + removeCommonRoots(stacks); + removeDuplicateOrEmptyJumps(stacks); + util.notEnumerableProp(error, "stack", reconstructStack(message, stacks)); + util.notEnumerableProp(error, "__stackCleaned__", true); +}; + +var captureStackTrace = (function stackDetection() { + var v8stackFramePattern = /^\s*at\s*/; + var v8stackFormatter = function(stack, error) { + if (typeof stack === "string") return stack; + + if (error.name !== undefined && + error.message !== undefined) { + return error.toString(); + } + return formatNonError(error); + }; + + if (typeof Error.stackTraceLimit === "number" && + typeof Error.captureStackTrace === "function") { + Error.stackTraceLimit += 6; + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + var captureStackTrace = Error.captureStackTrace; + + shouldIgnore = function(line) { + return bluebirdFramePattern.test(line); + }; + return function(receiver, ignoreUntil) { + Error.stackTraceLimit += 6; + captureStackTrace(receiver, ignoreUntil); + Error.stackTraceLimit -= 6; + }; + } + var err = new Error(); + + if (typeof err.stack === "string" && + err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) { + stackFramePattern = /@/; + formatStack = v8stackFormatter; + indentStackFrames = true; + return function captureStackTrace(o) { + o.stack = new Error().stack; + }; + } + + var hasStackAfterThrow; + try { throw new Error(); } + catch(e) { + hasStackAfterThrow = ("stack" in e); + } + if (!("stack" in err) && hasStackAfterThrow && + typeof Error.stackTraceLimit === "number") { + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + return function captureStackTrace(o) { + Error.stackTraceLimit += 6; + try { throw new Error(); } + catch(e) { o.stack = e.stack; } + Error.stackTraceLimit -= 6; + }; + } + + formatStack = function(stack, error) { + if (typeof stack === "string") return stack; + + if ((typeof error === "object" || + typeof error === "function") && + error.name !== undefined && + error.message !== undefined) { + return error.toString(); + } + return formatNonError(error); + }; + + return null; + +})([]); + +if (typeof console !== "undefined" && typeof console.warn !== "undefined") { + printWarning = function (message) { + console.warn(message); + }; + if (util.isNode && process.stderr.isTTY) { + printWarning = function(message, isSoft) { + var color = isSoft ? "\u001b[33m" : "\u001b[31m"; + console.warn(color + message + "\u001b[0m\n"); + }; + } else if (!util.isNode && typeof (new Error().stack) === "string") { + printWarning = function(message, isSoft) { + console.warn("%c" + message, + isSoft ? "color: darkorange" : "color: red"); + }; + } +} + +var config = { + warnings: warnings, + longStackTraces: false, + cancellation: false, + monitoring: false +}; + +if (longStackTraces) Promise.longStackTraces(); + +return { + longStackTraces: function() { + return config.longStackTraces; + }, + warnings: function() { + return config.warnings; + }, + cancellation: function() { + return config.cancellation; + }, + monitoring: function() { + return config.monitoring; + }, + propagateFromFunction: function() { + return propagateFromFunction; + }, + boundValueFunction: function() { + return boundValueFunction; + }, + checkForgottenReturns: checkForgottenReturns, + setBounds: setBounds, + warn: warn, + deprecated: deprecated, + CapturedTrace: CapturedTrace, + fireDomEvent: fireDomEvent, + fireGlobalEvent: fireGlobalEvent +}; +}; diff --git a/node_modules/bluebird/js/release/direct_resolve.js b/node_modules/bluebird/js/release/direct_resolve.js new file mode 100644 index 00000000..a8902982 --- /dev/null +++ b/node_modules/bluebird/js/release/direct_resolve.js @@ -0,0 +1,46 @@ +"use strict"; +module.exports = function(Promise) { +function returner() { + return this.value; +} +function thrower() { + throw this.reason; +} + +Promise.prototype["return"] = +Promise.prototype.thenReturn = function (value) { + if (value instanceof Promise) value.suppressUnhandledRejections(); + return this._then( + returner, undefined, undefined, {value: value}, undefined); +}; + +Promise.prototype["throw"] = +Promise.prototype.thenThrow = function (reason) { + return this._then( + thrower, undefined, undefined, {reason: reason}, undefined); +}; + +Promise.prototype.catchThrow = function (reason) { + if (arguments.length <= 1) { + return this._then( + undefined, thrower, undefined, {reason: reason}, undefined); + } else { + var _reason = arguments[1]; + var handler = function() {throw _reason;}; + return this.caught(reason, handler); + } +}; + +Promise.prototype.catchReturn = function (value) { + if (arguments.length <= 1) { + if (value instanceof Promise) value.suppressUnhandledRejections(); + return this._then( + undefined, returner, undefined, {value: value}, undefined); + } else { + var _value = arguments[1]; + if (_value instanceof Promise) _value.suppressUnhandledRejections(); + var handler = function() {return _value;}; + return this.caught(value, handler); + } +}; +}; diff --git a/node_modules/bluebird/js/release/each.js b/node_modules/bluebird/js/release/each.js new file mode 100644 index 00000000..e4f3d05b --- /dev/null +++ b/node_modules/bluebird/js/release/each.js @@ -0,0 +1,30 @@ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var PromiseReduce = Promise.reduce; +var PromiseAll = Promise.all; + +function promiseAllThis() { + return PromiseAll(this); +} + +function PromiseMapSeries(promises, fn) { + return PromiseReduce(promises, fn, INTERNAL, INTERNAL); +} + +Promise.prototype.each = function (fn) { + return PromiseReduce(this, fn, INTERNAL, 0) + ._then(promiseAllThis, undefined, undefined, this, undefined); +}; + +Promise.prototype.mapSeries = function (fn) { + return PromiseReduce(this, fn, INTERNAL, INTERNAL); +}; + +Promise.each = function (promises, fn) { + return PromiseReduce(promises, fn, INTERNAL, 0) + ._then(promiseAllThis, undefined, undefined, promises, undefined); +}; + +Promise.mapSeries = PromiseMapSeries; +}; + diff --git a/node_modules/bluebird/js/release/errors.js b/node_modules/bluebird/js/release/errors.js new file mode 100644 index 00000000..f62f323e --- /dev/null +++ b/node_modules/bluebird/js/release/errors.js @@ -0,0 +1,116 @@ +"use strict"; +var es5 = require("./es5"); +var Objectfreeze = es5.freeze; +var util = require("./util"); +var inherits = util.inherits; +var notEnumerableProp = util.notEnumerableProp; + +function subError(nameProperty, defaultMessage) { + function SubError(message) { + if (!(this instanceof SubError)) return new SubError(message); + notEnumerableProp(this, "message", + typeof message === "string" ? message : defaultMessage); + notEnumerableProp(this, "name", nameProperty); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + Error.call(this); + } + } + inherits(SubError, Error); + return SubError; +} + +var _TypeError, _RangeError; +var Warning = subError("Warning", "warning"); +var CancellationError = subError("CancellationError", "cancellation error"); +var TimeoutError = subError("TimeoutError", "timeout error"); +var AggregateError = subError("AggregateError", "aggregate error"); +try { + _TypeError = TypeError; + _RangeError = RangeError; +} catch(e) { + _TypeError = subError("TypeError", "type error"); + _RangeError = subError("RangeError", "range error"); +} + +var methods = ("join pop push shift unshift slice filter forEach some " + + "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" "); + +for (var i = 0; i < methods.length; ++i) { + if (typeof Array.prototype[methods[i]] === "function") { + AggregateError.prototype[methods[i]] = Array.prototype[methods[i]]; + } +} + +es5.defineProperty(AggregateError.prototype, "length", { + value: 0, + configurable: false, + writable: true, + enumerable: true +}); +AggregateError.prototype["isOperational"] = true; +var level = 0; +AggregateError.prototype.toString = function() { + var indent = Array(level * 4 + 1).join(" "); + var ret = "\n" + indent + "AggregateError of:" + "\n"; + level++; + indent = Array(level * 4 + 1).join(" "); + for (var i = 0; i < this.length; ++i) { + var str = this[i] === this ? "[Circular AggregateError]" : this[i] + ""; + var lines = str.split("\n"); + for (var j = 0; j < lines.length; ++j) { + lines[j] = indent + lines[j]; + } + str = lines.join("\n"); + ret += str + "\n"; + } + level--; + return ret; +}; + +function OperationalError(message) { + if (!(this instanceof OperationalError)) + return new OperationalError(message); + notEnumerableProp(this, "name", "OperationalError"); + notEnumerableProp(this, "message", message); + this.cause = message; + this["isOperational"] = true; + + if (message instanceof Error) { + notEnumerableProp(this, "message", message.message); + notEnumerableProp(this, "stack", message.stack); + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + +} +inherits(OperationalError, Error); + +var errorTypes = Error["__BluebirdErrorTypes__"]; +if (!errorTypes) { + errorTypes = Objectfreeze({ + CancellationError: CancellationError, + TimeoutError: TimeoutError, + OperationalError: OperationalError, + RejectionError: OperationalError, + AggregateError: AggregateError + }); + es5.defineProperty(Error, "__BluebirdErrorTypes__", { + value: errorTypes, + writable: false, + enumerable: false, + configurable: false + }); +} + +module.exports = { + Error: Error, + TypeError: _TypeError, + RangeError: _RangeError, + CancellationError: errorTypes.CancellationError, + OperationalError: errorTypes.OperationalError, + TimeoutError: errorTypes.TimeoutError, + AggregateError: errorTypes.AggregateError, + Warning: Warning +}; diff --git a/node_modules/bluebird/js/release/es5.js b/node_modules/bluebird/js/release/es5.js new file mode 100644 index 00000000..ea41d5a5 --- /dev/null +++ b/node_modules/bluebird/js/release/es5.js @@ -0,0 +1,80 @@ +var isES5 = (function(){ + "use strict"; + return this === undefined; +})(); + +if (isES5) { + module.exports = { + freeze: Object.freeze, + defineProperty: Object.defineProperty, + getDescriptor: Object.getOwnPropertyDescriptor, + keys: Object.keys, + names: Object.getOwnPropertyNames, + getPrototypeOf: Object.getPrototypeOf, + isArray: Array.isArray, + isES5: isES5, + propertyIsWritable: function(obj, prop) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + return !!(!descriptor || descriptor.writable || descriptor.set); + } + }; +} else { + var has = {}.hasOwnProperty; + var str = {}.toString; + var proto = {}.constructor.prototype; + + var ObjectKeys = function (o) { + var ret = []; + for (var key in o) { + if (has.call(o, key)) { + ret.push(key); + } + } + return ret; + }; + + var ObjectGetDescriptor = function(o, key) { + return {value: o[key]}; + }; + + var ObjectDefineProperty = function (o, key, desc) { + o[key] = desc.value; + return o; + }; + + var ObjectFreeze = function (obj) { + return obj; + }; + + var ObjectGetPrototypeOf = function (obj) { + try { + return Object(obj).constructor.prototype; + } + catch (e) { + return proto; + } + }; + + var ArrayIsArray = function (obj) { + try { + return str.call(obj) === "[object Array]"; + } + catch(e) { + return false; + } + }; + + module.exports = { + isArray: ArrayIsArray, + keys: ObjectKeys, + names: ObjectKeys, + defineProperty: ObjectDefineProperty, + getDescriptor: ObjectGetDescriptor, + freeze: ObjectFreeze, + getPrototypeOf: ObjectGetPrototypeOf, + isES5: isES5, + propertyIsWritable: function() { + return true; + } + }; +} diff --git a/node_modules/bluebird/js/release/filter.js b/node_modules/bluebird/js/release/filter.js new file mode 100644 index 00000000..ed57bf01 --- /dev/null +++ b/node_modules/bluebird/js/release/filter.js @@ -0,0 +1,12 @@ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var PromiseMap = Promise.map; + +Promise.prototype.filter = function (fn, options) { + return PromiseMap(this, fn, options, INTERNAL); +}; + +Promise.filter = function (promises, fn, options) { + return PromiseMap(promises, fn, options, INTERNAL); +}; +}; diff --git a/node_modules/bluebird/js/release/finally.js b/node_modules/bluebird/js/release/finally.js new file mode 100644 index 00000000..d57444be --- /dev/null +++ b/node_modules/bluebird/js/release/finally.js @@ -0,0 +1,146 @@ +"use strict"; +module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) { +var util = require("./util"); +var CancellationError = Promise.CancellationError; +var errorObj = util.errorObj; +var catchFilter = require("./catch_filter")(NEXT_FILTER); + +function PassThroughHandlerContext(promise, type, handler) { + this.promise = promise; + this.type = type; + this.handler = handler; + this.called = false; + this.cancelPromise = null; +} + +PassThroughHandlerContext.prototype.isFinallyHandler = function() { + return this.type === 0; +}; + +function FinallyHandlerCancelReaction(finallyHandler) { + this.finallyHandler = finallyHandler; +} + +FinallyHandlerCancelReaction.prototype._resultCancelled = function() { + checkCancel(this.finallyHandler); +}; + +function checkCancel(ctx, reason) { + if (ctx.cancelPromise != null) { + if (arguments.length > 1) { + ctx.cancelPromise._reject(reason); + } else { + ctx.cancelPromise._cancel(); + } + ctx.cancelPromise = null; + return true; + } + return false; +} + +function succeed() { + return finallyHandler.call(this, this.promise._target()._settledValue()); +} +function fail(reason) { + if (checkCancel(this, reason)) return; + errorObj.e = reason; + return errorObj; +} +function finallyHandler(reasonOrValue) { + var promise = this.promise; + var handler = this.handler; + + if (!this.called) { + this.called = true; + var ret = this.isFinallyHandler() + ? handler.call(promise._boundValue()) + : handler.call(promise._boundValue(), reasonOrValue); + if (ret === NEXT_FILTER) { + return ret; + } else if (ret !== undefined) { + promise._setReturnedNonUndefined(); + var maybePromise = tryConvertToPromise(ret, promise); + if (maybePromise instanceof Promise) { + if (this.cancelPromise != null) { + if (maybePromise._isCancelled()) { + var reason = + new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + errorObj.e = reason; + return errorObj; + } else if (maybePromise.isPending()) { + maybePromise._attachCancellationCallback( + new FinallyHandlerCancelReaction(this)); + } + } + return maybePromise._then( + succeed, fail, undefined, this, undefined); + } + } + } + + if (promise.isRejected()) { + checkCancel(this); + errorObj.e = reasonOrValue; + return errorObj; + } else { + checkCancel(this); + return reasonOrValue; + } +} + +Promise.prototype._passThrough = function(handler, type, success, fail) { + if (typeof handler !== "function") return this.then(); + return this._then(success, + fail, + undefined, + new PassThroughHandlerContext(this, type, handler), + undefined); +}; + +Promise.prototype.lastly = +Promise.prototype["finally"] = function (handler) { + return this._passThrough(handler, + 0, + finallyHandler, + finallyHandler); +}; + + +Promise.prototype.tap = function (handler) { + return this._passThrough(handler, 1, finallyHandler); +}; + +Promise.prototype.tapCatch = function (handlerOrPredicate) { + var len = arguments.length; + if(len === 1) { + return this._passThrough(handlerOrPredicate, + 1, + undefined, + finallyHandler); + } else { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util.isObject(item)) { + catchInstances[j++] = item; + } else { + return Promise.reject(new TypeError( + "tapCatch statement predicate: " + + "expecting an object but got " + util.classString(item) + )); + } + } + catchInstances.length = j; + var handler = arguments[i]; + return this._passThrough(catchFilter(catchInstances, handler, this), + 1, + undefined, + finallyHandler); + } + +}; + +return PassThroughHandlerContext; +}; diff --git a/node_modules/bluebird/js/release/generators.js b/node_modules/bluebird/js/release/generators.js new file mode 100644 index 00000000..500c280c --- /dev/null +++ b/node_modules/bluebird/js/release/generators.js @@ -0,0 +1,223 @@ +"use strict"; +module.exports = function(Promise, + apiRejection, + INTERNAL, + tryConvertToPromise, + Proxyable, + debug) { +var errors = require("./errors"); +var TypeError = errors.TypeError; +var util = require("./util"); +var errorObj = util.errorObj; +var tryCatch = util.tryCatch; +var yieldHandlers = []; + +function promiseFromYieldHandler(value, yieldHandlers, traceParent) { + for (var i = 0; i < yieldHandlers.length; ++i) { + traceParent._pushContext(); + var result = tryCatch(yieldHandlers[i])(value); + traceParent._popContext(); + if (result === errorObj) { + traceParent._pushContext(); + var ret = Promise.reject(errorObj.e); + traceParent._popContext(); + return ret; + } + var maybePromise = tryConvertToPromise(result, traceParent); + if (maybePromise instanceof Promise) return maybePromise; + } + return null; +} + +function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) { + if (debug.cancellation()) { + var internal = new Promise(INTERNAL); + var _finallyPromise = this._finallyPromise = new Promise(INTERNAL); + this._promise = internal.lastly(function() { + return _finallyPromise; + }); + internal._captureStackTrace(); + internal._setOnCancel(this); + } else { + var promise = this._promise = new Promise(INTERNAL); + promise._captureStackTrace(); + } + this._stack = stack; + this._generatorFunction = generatorFunction; + this._receiver = receiver; + this._generator = undefined; + this._yieldHandlers = typeof yieldHandler === "function" + ? [yieldHandler].concat(yieldHandlers) + : yieldHandlers; + this._yieldedPromise = null; + this._cancellationPhase = false; +} +util.inherits(PromiseSpawn, Proxyable); + +PromiseSpawn.prototype._isResolved = function() { + return this._promise === null; +}; + +PromiseSpawn.prototype._cleanup = function() { + this._promise = this._generator = null; + if (debug.cancellation() && this._finallyPromise !== null) { + this._finallyPromise._fulfill(); + this._finallyPromise = null; + } +}; + +PromiseSpawn.prototype._promiseCancelled = function() { + if (this._isResolved()) return; + var implementsReturn = typeof this._generator["return"] !== "undefined"; + + var result; + if (!implementsReturn) { + var reason = new Promise.CancellationError( + "generator .return() sentinel"); + Promise.coroutine.returnSentinel = reason; + this._promise._attachExtraTrace(reason); + this._promise._pushContext(); + result = tryCatch(this._generator["throw"]).call(this._generator, + reason); + this._promise._popContext(); + } else { + this._promise._pushContext(); + result = tryCatch(this._generator["return"]).call(this._generator, + undefined); + this._promise._popContext(); + } + this._cancellationPhase = true; + this._yieldedPromise = null; + this._continue(result); +}; + +PromiseSpawn.prototype._promiseFulfilled = function(value) { + this._yieldedPromise = null; + this._promise._pushContext(); + var result = tryCatch(this._generator.next).call(this._generator, value); + this._promise._popContext(); + this._continue(result); +}; + +PromiseSpawn.prototype._promiseRejected = function(reason) { + this._yieldedPromise = null; + this._promise._attachExtraTrace(reason); + this._promise._pushContext(); + var result = tryCatch(this._generator["throw"]) + .call(this._generator, reason); + this._promise._popContext(); + this._continue(result); +}; + +PromiseSpawn.prototype._resultCancelled = function() { + if (this._yieldedPromise instanceof Promise) { + var promise = this._yieldedPromise; + this._yieldedPromise = null; + promise.cancel(); + } +}; + +PromiseSpawn.prototype.promise = function () { + return this._promise; +}; + +PromiseSpawn.prototype._run = function () { + this._generator = this._generatorFunction.call(this._receiver); + this._receiver = + this._generatorFunction = undefined; + this._promiseFulfilled(undefined); +}; + +PromiseSpawn.prototype._continue = function (result) { + var promise = this._promise; + if (result === errorObj) { + this._cleanup(); + if (this._cancellationPhase) { + return promise.cancel(); + } else { + return promise._rejectCallback(result.e, false); + } + } + + var value = result.value; + if (result.done === true) { + this._cleanup(); + if (this._cancellationPhase) { + return promise.cancel(); + } else { + return promise._resolveCallback(value); + } + } else { + var maybePromise = tryConvertToPromise(value, this._promise); + if (!(maybePromise instanceof Promise)) { + maybePromise = + promiseFromYieldHandler(maybePromise, + this._yieldHandlers, + this._promise); + if (maybePromise === null) { + this._promiseRejected( + new TypeError( + "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", String(value)) + + "From coroutine:\u000a" + + this._stack.split("\n").slice(1, -7).join("\n") + ) + ); + return; + } + } + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + this._yieldedPromise = maybePromise; + maybePromise._proxy(this, null); + } else if (((bitField & 33554432) !== 0)) { + Promise._async.invoke( + this._promiseFulfilled, this, maybePromise._value() + ); + } else if (((bitField & 16777216) !== 0)) { + Promise._async.invoke( + this._promiseRejected, this, maybePromise._reason() + ); + } else { + this._promiseCancelled(); + } + } +}; + +Promise.coroutine = function (generatorFunction, options) { + if (typeof generatorFunction !== "function") { + throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var yieldHandler = Object(options).yieldHandler; + var PromiseSpawn$ = PromiseSpawn; + var stack = new Error().stack; + return function () { + var generator = generatorFunction.apply(this, arguments); + var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler, + stack); + var ret = spawn.promise(); + spawn._generator = generator; + spawn._promiseFulfilled(undefined); + return ret; + }; +}; + +Promise.coroutine.addYieldHandler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + yieldHandlers.push(fn); +}; + +Promise.spawn = function (generatorFunction) { + debug.deprecated("Promise.spawn()", "Promise.coroutine()"); + if (typeof generatorFunction !== "function") { + return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var spawn = new PromiseSpawn(generatorFunction, this); + var ret = spawn.promise(); + spawn._run(Promise.spawn); + return ret; +}; +}; diff --git a/node_modules/bluebird/js/release/join.js b/node_modules/bluebird/js/release/join.js new file mode 100644 index 00000000..4945e3f7 --- /dev/null +++ b/node_modules/bluebird/js/release/join.js @@ -0,0 +1,168 @@ +"use strict"; +module.exports = +function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, + getDomain) { +var util = require("./util"); +var canEvaluate = util.canEvaluate; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var reject; + +if (!false) { +if (canEvaluate) { + var thenCallback = function(i) { + return new Function("value", "holder", " \n\ + 'use strict'; \n\ + holder.pIndex = value; \n\ + holder.checkFulfillment(this); \n\ + ".replace(/Index/g, i)); + }; + + var promiseSetter = function(i) { + return new Function("promise", "holder", " \n\ + 'use strict'; \n\ + holder.pIndex = promise; \n\ + ".replace(/Index/g, i)); + }; + + var generateHolderClass = function(total) { + var props = new Array(total); + for (var i = 0; i < props.length; ++i) { + props[i] = "this.p" + (i+1); + } + var assignment = props.join(" = ") + " = null;"; + var cancellationCode= "var promise;\n" + props.map(function(prop) { + return " \n\ + promise = " + prop + "; \n\ + if (promise instanceof Promise) { \n\ + promise.cancel(); \n\ + } \n\ + "; + }).join("\n"); + var passedArguments = props.join(", "); + var name = "Holder$" + total; + + + var code = "return function(tryCatch, errorObj, Promise, async) { \n\ + 'use strict'; \n\ + function [TheName](fn) { \n\ + [TheProperties] \n\ + this.fn = fn; \n\ + this.asyncNeeded = true; \n\ + this.now = 0; \n\ + } \n\ + \n\ + [TheName].prototype._callFunction = function(promise) { \n\ + promise._pushContext(); \n\ + var ret = tryCatch(this.fn)([ThePassedArguments]); \n\ + promise._popContext(); \n\ + if (ret === errorObj) { \n\ + promise._rejectCallback(ret.e, false); \n\ + } else { \n\ + promise._resolveCallback(ret); \n\ + } \n\ + }; \n\ + \n\ + [TheName].prototype.checkFulfillment = function(promise) { \n\ + var now = ++this.now; \n\ + if (now === [TheTotal]) { \n\ + if (this.asyncNeeded) { \n\ + async.invoke(this._callFunction, this, promise); \n\ + } else { \n\ + this._callFunction(promise); \n\ + } \n\ + \n\ + } \n\ + }; \n\ + \n\ + [TheName].prototype._resultCancelled = function() { \n\ + [CancellationCode] \n\ + }; \n\ + \n\ + return [TheName]; \n\ + }(tryCatch, errorObj, Promise, async); \n\ + "; + + code = code.replace(/\[TheName\]/g, name) + .replace(/\[TheTotal\]/g, total) + .replace(/\[ThePassedArguments\]/g, passedArguments) + .replace(/\[TheProperties\]/g, assignment) + .replace(/\[CancellationCode\]/g, cancellationCode); + + return new Function("tryCatch", "errorObj", "Promise", "async", code) + (tryCatch, errorObj, Promise, async); + }; + + var holderClasses = []; + var thenCallbacks = []; + var promiseSetters = []; + + for (var i = 0; i < 8; ++i) { + holderClasses.push(generateHolderClass(i + 1)); + thenCallbacks.push(thenCallback(i + 1)); + promiseSetters.push(promiseSetter(i + 1)); + } + + reject = function (reason) { + this._reject(reason); + }; +}} + +Promise.join = function () { + var last = arguments.length - 1; + var fn; + if (last > 0 && typeof arguments[last] === "function") { + fn = arguments[last]; + if (!false) { + if (last <= 8 && canEvaluate) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + var HolderClass = holderClasses[last - 1]; + var holder = new HolderClass(fn); + var callbacks = thenCallbacks; + + for (var i = 0; i < last; ++i) { + var maybePromise = tryConvertToPromise(arguments[i], ret); + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + maybePromise._then(callbacks[i], reject, + undefined, ret, holder); + promiseSetters[i](maybePromise, holder); + holder.asyncNeeded = false; + } else if (((bitField & 33554432) !== 0)) { + callbacks[i].call(ret, + maybePromise._value(), holder); + } else if (((bitField & 16777216) !== 0)) { + ret._reject(maybePromise._reason()); + } else { + ret._cancel(); + } + } else { + callbacks[i].call(ret, maybePromise, holder); + } + } + + if (!ret._isFateSealed()) { + if (holder.asyncNeeded) { + var domain = getDomain(); + if (domain !== null) { + holder.fn = util.domainBind(domain, holder.fn); + } + } + ret._setAsyncGuaranteed(); + ret._setOnCancel(holder); + } + return ret; + } + } + } + var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];}; + if (fn) args.pop(); + var ret = new PromiseArray(args).promise(); + return fn !== undefined ? ret.spread(fn) : ret; +}; + +}; diff --git a/node_modules/bluebird/js/release/map.js b/node_modules/bluebird/js/release/map.js new file mode 100644 index 00000000..976f15ef --- /dev/null +++ b/node_modules/bluebird/js/release/map.js @@ -0,0 +1,168 @@ +"use strict"; +module.exports = function(Promise, + PromiseArray, + apiRejection, + tryConvertToPromise, + INTERNAL, + debug) { +var getDomain = Promise._getDomain; +var util = require("./util"); +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; +var async = Promise._async; + +function MappingPromiseArray(promises, fn, limit, _filter) { + this.constructor$(promises); + this._promise._captureStackTrace(); + var domain = getDomain(); + this._callback = domain === null ? fn : util.domainBind(domain, fn); + this._preservedValues = _filter === INTERNAL + ? new Array(this.length()) + : null; + this._limit = limit; + this._inFlight = 0; + this._queue = []; + async.invoke(this._asyncInit, this, undefined); +} +util.inherits(MappingPromiseArray, PromiseArray); + +MappingPromiseArray.prototype._asyncInit = function() { + this._init$(undefined, -2); +}; + +MappingPromiseArray.prototype._init = function () {}; + +MappingPromiseArray.prototype._promiseFulfilled = function (value, index) { + var values = this._values; + var length = this.length(); + var preservedValues = this._preservedValues; + var limit = this._limit; + + if (index < 0) { + index = (index * -1) - 1; + values[index] = value; + if (limit >= 1) { + this._inFlight--; + this._drainQueue(); + if (this._isResolved()) return true; + } + } else { + if (limit >= 1 && this._inFlight >= limit) { + values[index] = value; + this._queue.push(index); + return false; + } + if (preservedValues !== null) preservedValues[index] = value; + + var promise = this._promise; + var callback = this._callback; + var receiver = promise._boundValue(); + promise._pushContext(); + var ret = tryCatch(callback).call(receiver, value, index, length); + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, + promiseCreated, + preservedValues !== null ? "Promise.filter" : "Promise.map", + promise + ); + if (ret === errorObj) { + this._reject(ret.e); + return true; + } + + var maybePromise = tryConvertToPromise(ret, this._promise); + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if (((bitField & 50397184) === 0)) { + if (limit >= 1) this._inFlight++; + values[index] = maybePromise; + maybePromise._proxy(this, (index + 1) * -1); + return false; + } else if (((bitField & 33554432) !== 0)) { + ret = maybePromise._value(); + } else if (((bitField & 16777216) !== 0)) { + this._reject(maybePromise._reason()); + return true; + } else { + this._cancel(); + return true; + } + } + values[index] = ret; + } + var totalResolved = ++this._totalResolved; + if (totalResolved >= length) { + if (preservedValues !== null) { + this._filter(values, preservedValues); + } else { + this._resolve(values); + } + return true; + } + return false; +}; + +MappingPromiseArray.prototype._drainQueue = function () { + var queue = this._queue; + var limit = this._limit; + var values = this._values; + while (queue.length > 0 && this._inFlight < limit) { + if (this._isResolved()) return; + var index = queue.pop(); + this._promiseFulfilled(values[index], index); + } +}; + +MappingPromiseArray.prototype._filter = function (booleans, values) { + var len = values.length; + var ret = new Array(len); + var j = 0; + for (var i = 0; i < len; ++i) { + if (booleans[i]) ret[j++] = values[i]; + } + ret.length = j; + this._resolve(ret); +}; + +MappingPromiseArray.prototype.preservedValues = function () { + return this._preservedValues; +}; + +function map(promises, fn, options, _filter) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + + var limit = 0; + if (options !== undefined) { + if (typeof options === "object" && options !== null) { + if (typeof options.concurrency !== "number") { + return Promise.reject( + new TypeError("'concurrency' must be a number but it is " + + util.classString(options.concurrency))); + } + limit = options.concurrency; + } else { + return Promise.reject(new TypeError( + "options argument must be an object but it is " + + util.classString(options))); + } + } + limit = typeof limit === "number" && + isFinite(limit) && limit >= 1 ? limit : 0; + return new MappingPromiseArray(promises, fn, limit, _filter).promise(); +} + +Promise.prototype.map = function (fn, options) { + return map(this, fn, options, null); +}; + +Promise.map = function (promises, fn, options, _filter) { + return map(promises, fn, options, _filter); +}; + + +}; diff --git a/node_modules/bluebird/js/release/method.js b/node_modules/bluebird/js/release/method.js new file mode 100644 index 00000000..ce9e4db7 --- /dev/null +++ b/node_modules/bluebird/js/release/method.js @@ -0,0 +1,55 @@ +"use strict"; +module.exports = +function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) { +var util = require("./util"); +var tryCatch = util.tryCatch; + +Promise.method = function (fn) { + if (typeof fn !== "function") { + throw new Promise.TypeError("expecting a function but got " + util.classString(fn)); + } + return function () { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._pushContext(); + var value = tryCatch(fn).apply(this, arguments); + var promiseCreated = ret._popContext(); + debug.checkForgottenReturns( + value, promiseCreated, "Promise.method", ret); + ret._resolveFromSyncValue(value); + return ret; + }; +}; + +Promise.attempt = Promise["try"] = function (fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._pushContext(); + var value; + if (arguments.length > 1) { + debug.deprecated("calling Promise.try with more than 1 argument"); + var arg = arguments[1]; + var ctx = arguments[2]; + value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg) + : tryCatch(fn).call(ctx, arg); + } else { + value = tryCatch(fn)(); + } + var promiseCreated = ret._popContext(); + debug.checkForgottenReturns( + value, promiseCreated, "Promise.try", ret); + ret._resolveFromSyncValue(value); + return ret; +}; + +Promise.prototype._resolveFromSyncValue = function (value) { + if (value === util.errorObj) { + this._rejectCallback(value.e, false); + } else { + this._resolveCallback(value, true); + } +}; +}; diff --git a/node_modules/bluebird/js/release/nodeback.js b/node_modules/bluebird/js/release/nodeback.js new file mode 100644 index 00000000..71e69ebd --- /dev/null +++ b/node_modules/bluebird/js/release/nodeback.js @@ -0,0 +1,51 @@ +"use strict"; +var util = require("./util"); +var maybeWrapAsError = util.maybeWrapAsError; +var errors = require("./errors"); +var OperationalError = errors.OperationalError; +var es5 = require("./es5"); + +function isUntypedError(obj) { + return obj instanceof Error && + es5.getPrototypeOf(obj) === Error.prototype; +} + +var rErrorKey = /^(?:name|message|stack|cause)$/; +function wrapAsOperationalError(obj) { + var ret; + if (isUntypedError(obj)) { + ret = new OperationalError(obj); + ret.name = obj.name; + ret.message = obj.message; + ret.stack = obj.stack; + var keys = es5.keys(obj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (!rErrorKey.test(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + util.markAsOriginatingFromRejection(obj); + return obj; +} + +function nodebackForPromise(promise, multiArgs) { + return function(err, value) { + if (promise === null) return; + if (err) { + var wrapped = wrapAsOperationalError(maybeWrapAsError(err)); + promise._attachExtraTrace(wrapped); + promise._reject(wrapped); + } else if (!multiArgs) { + promise._fulfill(value); + } else { + var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}; + promise._fulfill(args); + } + promise = null; + }; +} + +module.exports = nodebackForPromise; diff --git a/node_modules/bluebird/js/release/nodeify.js b/node_modules/bluebird/js/release/nodeify.js new file mode 100644 index 00000000..ce2b1900 --- /dev/null +++ b/node_modules/bluebird/js/release/nodeify.js @@ -0,0 +1,58 @@ +"use strict"; +module.exports = function(Promise) { +var util = require("./util"); +var async = Promise._async; +var tryCatch = util.tryCatch; +var errorObj = util.errorObj; + +function spreadAdapter(val, nodeback) { + var promise = this; + if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback); + var ret = + tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val)); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} + +function successAdapter(val, nodeback) { + var promise = this; + var receiver = promise._boundValue(); + var ret = val === undefined + ? tryCatch(nodeback).call(receiver, null) + : tryCatch(nodeback).call(receiver, null, val); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} +function errorAdapter(reason, nodeback) { + var promise = this; + if (!reason) { + var newReason = new Error(reason + ""); + newReason.cause = reason; + reason = newReason; + } + var ret = tryCatch(nodeback).call(promise._boundValue(), reason); + if (ret === errorObj) { + async.throwLater(ret.e); + } +} + +Promise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback, + options) { + if (typeof nodeback == "function") { + var adapter = successAdapter; + if (options !== undefined && Object(options).spread) { + adapter = spreadAdapter; + } + this._then( + adapter, + errorAdapter, + undefined, + this, + nodeback + ); + } + return this; +}; +}; diff --git a/node_modules/bluebird/js/release/promise.js b/node_modules/bluebird/js/release/promise.js new file mode 100644 index 00000000..d80b44da --- /dev/null +++ b/node_modules/bluebird/js/release/promise.js @@ -0,0 +1,789 @@ +"use strict"; +module.exports = function() { +var makeSelfResolutionError = function () { + return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a"); +}; +var reflectHandler = function() { + return new Promise.PromiseInspection(this._target()); +}; +var apiRejection = function(msg) { + return Promise.reject(new TypeError(msg)); +}; +function Proxyable() {} +var UNDEFINED_BINDING = {}; +var util = require("./util"); + +var getDomain; +if (util.isNode) { + getDomain = function() { + var ret = process.domain; + if (ret === undefined) ret = null; + return ret; + }; +} else { + getDomain = function() { + return null; + }; +} +util.notEnumerableProp(Promise, "_getDomain", getDomain); + +var es5 = require("./es5"); +var Async = require("./async"); +var async = new Async(); +es5.defineProperty(Promise, "_async", {value: async}); +var errors = require("./errors"); +var TypeError = Promise.TypeError = errors.TypeError; +Promise.RangeError = errors.RangeError; +var CancellationError = Promise.CancellationError = errors.CancellationError; +Promise.TimeoutError = errors.TimeoutError; +Promise.OperationalError = errors.OperationalError; +Promise.RejectionError = errors.OperationalError; +Promise.AggregateError = errors.AggregateError; +var INTERNAL = function(){}; +var APPLY = {}; +var NEXT_FILTER = {}; +var tryConvertToPromise = require("./thenables")(Promise, INTERNAL); +var PromiseArray = + require("./promise_array")(Promise, INTERNAL, + tryConvertToPromise, apiRejection, Proxyable); +var Context = require("./context")(Promise); + /*jshint unused:false*/ +var createContext = Context.create; +var debug = require("./debuggability")(Promise, Context); +var CapturedTrace = debug.CapturedTrace; +var PassThroughHandlerContext = + require("./finally")(Promise, tryConvertToPromise, NEXT_FILTER); +var catchFilter = require("./catch_filter")(NEXT_FILTER); +var nodebackForPromise = require("./nodeback"); +var errorObj = util.errorObj; +var tryCatch = util.tryCatch; +function check(self, executor) { + if (self == null || self.constructor !== Promise) { + throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + if (typeof executor !== "function") { + throw new TypeError("expecting a function but got " + util.classString(executor)); + } + +} + +function Promise(executor) { + if (executor !== INTERNAL) { + check(this, executor); + } + this._bitField = 0; + this._fulfillmentHandler0 = undefined; + this._rejectionHandler0 = undefined; + this._promise0 = undefined; + this._receiver0 = undefined; + this._resolveFromExecutor(executor); + this._promiseCreated(); + this._fireEvent("promiseCreated", this); +} + +Promise.prototype.toString = function () { + return "[object Promise]"; +}; + +Promise.prototype.caught = Promise.prototype["catch"] = function (fn) { + var len = arguments.length; + if (len > 1) { + var catchInstances = new Array(len - 1), + j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util.isObject(item)) { + catchInstances[j++] = item; + } else { + return apiRejection("Catch statement predicate: " + + "expecting an object but got " + util.classString(item)); + } + } + catchInstances.length = j; + fn = arguments[i]; + + if (typeof fn !== "function") { + throw new TypeError("The last argument to .catch() " + + "must be a function, got " + util.toString(fn)); + } + return this.then(undefined, catchFilter(catchInstances, fn, this)); + } + return this.then(undefined, fn); +}; + +Promise.prototype.reflect = function () { + return this._then(reflectHandler, + reflectHandler, undefined, this, undefined); +}; + +Promise.prototype.then = function (didFulfill, didReject) { + if (debug.warnings() && arguments.length > 0 && + typeof didFulfill !== "function" && + typeof didReject !== "function") { + var msg = ".then() only accepts functions but was passed: " + + util.classString(didFulfill); + if (arguments.length > 1) { + msg += ", " + util.classString(didReject); + } + this._warn(msg); + } + return this._then(didFulfill, didReject, undefined, undefined, undefined); +}; + +Promise.prototype.done = function (didFulfill, didReject) { + var promise = + this._then(didFulfill, didReject, undefined, undefined, undefined); + promise._setIsFinal(); +}; + +Promise.prototype.spread = function (fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + return this.all()._then(fn, undefined, undefined, APPLY, undefined); +}; + +Promise.prototype.toJSON = function () { + var ret = { + isFulfilled: false, + isRejected: false, + fulfillmentValue: undefined, + rejectionReason: undefined + }; + if (this.isFulfilled()) { + ret.fulfillmentValue = this.value(); + ret.isFulfilled = true; + } else if (this.isRejected()) { + ret.rejectionReason = this.reason(); + ret.isRejected = true; + } + return ret; +}; + +Promise.prototype.all = function () { + if (arguments.length > 0) { + this._warn(".all() was passed arguments but it does not take any"); + } + return new PromiseArray(this).promise(); +}; + +Promise.prototype.error = function (fn) { + return this.caught(util.originatesFromRejection, fn); +}; + +Promise.getNewLibraryCopy = module.exports; + +Promise.is = function (val) { + return val instanceof Promise; +}; + +Promise.fromNode = Promise.fromCallback = function(fn) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs + : false; + var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs)); + if (result === errorObj) { + ret._rejectCallback(result.e, true); + } + if (!ret._isFateSealed()) ret._setAsyncGuaranteed(); + return ret; +}; + +Promise.all = function (promises) { + return new PromiseArray(promises).promise(); +}; + +Promise.cast = function (obj) { + var ret = tryConvertToPromise(obj); + if (!(ret instanceof Promise)) { + ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._setFulfilled(); + ret._rejectionHandler0 = obj; + } + return ret; +}; + +Promise.resolve = Promise.fulfilled = Promise.cast; + +Promise.reject = Promise.rejected = function (reason) { + var ret = new Promise(INTERNAL); + ret._captureStackTrace(); + ret._rejectCallback(reason, true); + return ret; +}; + +Promise.setScheduler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + return async.setScheduler(fn); +}; + +Promise.prototype._then = function ( + didFulfill, + didReject, + _, receiver, + internalData +) { + var haveInternalData = internalData !== undefined; + var promise = haveInternalData ? internalData : new Promise(INTERNAL); + var target = this._target(); + var bitField = target._bitField; + + if (!haveInternalData) { + promise._propagateFrom(this, 3); + promise._captureStackTrace(); + if (receiver === undefined && + ((this._bitField & 2097152) !== 0)) { + if (!((bitField & 50397184) === 0)) { + receiver = this._boundValue(); + } else { + receiver = target === this ? undefined : this._boundTo; + } + } + this._fireEvent("promiseChained", this, promise); + } + + var domain = getDomain(); + if (!((bitField & 50397184) === 0)) { + var handler, value, settler = target._settlePromiseCtx; + if (((bitField & 33554432) !== 0)) { + value = target._rejectionHandler0; + handler = didFulfill; + } else if (((bitField & 16777216) !== 0)) { + value = target._fulfillmentHandler0; + handler = didReject; + target._unsetRejectionIsUnhandled(); + } else { + settler = target._settlePromiseLateCancellationObserver; + value = new CancellationError("late cancellation observer"); + target._attachExtraTrace(value); + handler = didReject; + } + + async.invoke(settler, target, { + handler: domain === null ? handler + : (typeof handler === "function" && + util.domainBind(domain, handler)), + promise: promise, + receiver: receiver, + value: value + }); + } else { + target._addCallbacks(didFulfill, didReject, promise, receiver, domain); + } + + return promise; +}; + +Promise.prototype._length = function () { + return this._bitField & 65535; +}; + +Promise.prototype._isFateSealed = function () { + return (this._bitField & 117506048) !== 0; +}; + +Promise.prototype._isFollowing = function () { + return (this._bitField & 67108864) === 67108864; +}; + +Promise.prototype._setLength = function (len) { + this._bitField = (this._bitField & -65536) | + (len & 65535); +}; + +Promise.prototype._setFulfilled = function () { + this._bitField = this._bitField | 33554432; + this._fireEvent("promiseFulfilled", this); +}; + +Promise.prototype._setRejected = function () { + this._bitField = this._bitField | 16777216; + this._fireEvent("promiseRejected", this); +}; + +Promise.prototype._setFollowing = function () { + this._bitField = this._bitField | 67108864; + this._fireEvent("promiseResolved", this); +}; + +Promise.prototype._setIsFinal = function () { + this._bitField = this._bitField | 4194304; +}; + +Promise.prototype._isFinal = function () { + return (this._bitField & 4194304) > 0; +}; + +Promise.prototype._unsetCancelled = function() { + this._bitField = this._bitField & (~65536); +}; + +Promise.prototype._setCancelled = function() { + this._bitField = this._bitField | 65536; + this._fireEvent("promiseCancelled", this); +}; + +Promise.prototype._setWillBeCancelled = function() { + this._bitField = this._bitField | 8388608; +}; + +Promise.prototype._setAsyncGuaranteed = function() { + if (async.hasCustomScheduler()) return; + this._bitField = this._bitField | 134217728; +}; + +Promise.prototype._receiverAt = function (index) { + var ret = index === 0 ? this._receiver0 : this[ + index * 4 - 4 + 3]; + if (ret === UNDEFINED_BINDING) { + return undefined; + } else if (ret === undefined && this._isBound()) { + return this._boundValue(); + } + return ret; +}; + +Promise.prototype._promiseAt = function (index) { + return this[ + index * 4 - 4 + 2]; +}; + +Promise.prototype._fulfillmentHandlerAt = function (index) { + return this[ + index * 4 - 4 + 0]; +}; + +Promise.prototype._rejectionHandlerAt = function (index) { + return this[ + index * 4 - 4 + 1]; +}; + +Promise.prototype._boundValue = function() {}; + +Promise.prototype._migrateCallback0 = function (follower) { + var bitField = follower._bitField; + var fulfill = follower._fulfillmentHandler0; + var reject = follower._rejectionHandler0; + var promise = follower._promise0; + var receiver = follower._receiverAt(0); + if (receiver === undefined) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); +}; + +Promise.prototype._migrateCallbackAt = function (follower, index) { + var fulfill = follower._fulfillmentHandlerAt(index); + var reject = follower._rejectionHandlerAt(index); + var promise = follower._promiseAt(index); + var receiver = follower._receiverAt(index); + if (receiver === undefined) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); +}; + +Promise.prototype._addCallbacks = function ( + fulfill, + reject, + promise, + receiver, + domain +) { + var index = this._length(); + + if (index >= 65535 - 4) { + index = 0; + this._setLength(0); + } + + if (index === 0) { + this._promise0 = promise; + this._receiver0 = receiver; + if (typeof fulfill === "function") { + this._fulfillmentHandler0 = + domain === null ? fulfill : util.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this._rejectionHandler0 = + domain === null ? reject : util.domainBind(domain, reject); + } + } else { + var base = index * 4 - 4; + this[base + 2] = promise; + this[base + 3] = receiver; + if (typeof fulfill === "function") { + this[base + 0] = + domain === null ? fulfill : util.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this[base + 1] = + domain === null ? reject : util.domainBind(domain, reject); + } + } + this._setLength(index + 1); + return index; +}; + +Promise.prototype._proxy = function (proxyable, arg) { + this._addCallbacks(undefined, undefined, arg, proxyable, null); +}; + +Promise.prototype._resolveCallback = function(value, shouldBind) { + if (((this._bitField & 117506048) !== 0)) return; + if (value === this) + return this._rejectCallback(makeSelfResolutionError(), false); + var maybePromise = tryConvertToPromise(value, this); + if (!(maybePromise instanceof Promise)) return this._fulfill(value); + + if (shouldBind) this._propagateFrom(maybePromise, 2); + + var promise = maybePromise._target(); + + if (promise === this) { + this._reject(makeSelfResolutionError()); + return; + } + + var bitField = promise._bitField; + if (((bitField & 50397184) === 0)) { + var len = this._length(); + if (len > 0) promise._migrateCallback0(this); + for (var i = 1; i < len; ++i) { + promise._migrateCallbackAt(this, i); + } + this._setFollowing(); + this._setLength(0); + this._setFollowee(promise); + } else if (((bitField & 33554432) !== 0)) { + this._fulfill(promise._value()); + } else if (((bitField & 16777216) !== 0)) { + this._reject(promise._reason()); + } else { + var reason = new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + this._reject(reason); + } +}; + +Promise.prototype._rejectCallback = +function(reason, synchronous, ignoreNonErrorWarnings) { + var trace = util.ensureErrorObject(reason); + var hasStack = trace === reason; + if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) { + var message = "a promise was rejected with a non-error: " + + util.classString(reason); + this._warn(message, true); + } + this._attachExtraTrace(trace, synchronous ? hasStack : false); + this._reject(reason); +}; + +Promise.prototype._resolveFromExecutor = function (executor) { + if (executor === INTERNAL) return; + var promise = this; + this._captureStackTrace(); + this._pushContext(); + var synchronous = true; + var r = this._execute(executor, function(value) { + promise._resolveCallback(value); + }, function (reason) { + promise._rejectCallback(reason, synchronous); + }); + synchronous = false; + this._popContext(); + + if (r !== undefined) { + promise._rejectCallback(r, true); + } +}; + +Promise.prototype._settlePromiseFromHandler = function ( + handler, receiver, value, promise +) { + var bitField = promise._bitField; + if (((bitField & 65536) !== 0)) return; + promise._pushContext(); + var x; + if (receiver === APPLY) { + if (!value || typeof value.length !== "number") { + x = errorObj; + x.e = new TypeError("cannot .spread() a non-array: " + + util.classString(value)); + } else { + x = tryCatch(handler).apply(this._boundValue(), value); + } + } else { + x = tryCatch(handler).call(receiver, value); + } + var promiseCreated = promise._popContext(); + bitField = promise._bitField; + if (((bitField & 65536) !== 0)) return; + + if (x === NEXT_FILTER) { + promise._reject(value); + } else if (x === errorObj) { + promise._rejectCallback(x.e, false); + } else { + debug.checkForgottenReturns(x, promiseCreated, "", promise, this); + promise._resolveCallback(x); + } +}; + +Promise.prototype._target = function() { + var ret = this; + while (ret._isFollowing()) ret = ret._followee(); + return ret; +}; + +Promise.prototype._followee = function() { + return this._rejectionHandler0; +}; + +Promise.prototype._setFollowee = function(promise) { + this._rejectionHandler0 = promise; +}; + +Promise.prototype._settlePromise = function(promise, handler, receiver, value) { + var isPromise = promise instanceof Promise; + var bitField = this._bitField; + var asyncGuaranteed = ((bitField & 134217728) !== 0); + if (((bitField & 65536) !== 0)) { + if (isPromise) promise._invokeInternalOnCancel(); + + if (receiver instanceof PassThroughHandlerContext && + receiver.isFinallyHandler()) { + receiver.cancelPromise = promise; + if (tryCatch(handler).call(receiver, value) === errorObj) { + promise._reject(errorObj.e); + } + } else if (handler === reflectHandler) { + promise._fulfill(reflectHandler.call(receiver)); + } else if (receiver instanceof Proxyable) { + receiver._promiseCancelled(promise); + } else if (isPromise || promise instanceof PromiseArray) { + promise._cancel(); + } else { + receiver.cancel(); + } + } else if (typeof handler === "function") { + if (!isPromise) { + handler.call(receiver, value, promise); + } else { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (receiver instanceof Proxyable) { + if (!receiver._isResolved()) { + if (((bitField & 33554432) !== 0)) { + receiver._promiseFulfilled(value, promise); + } else { + receiver._promiseRejected(value, promise); + } + } + } else if (isPromise) { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + if (((bitField & 33554432) !== 0)) { + promise._fulfill(value); + } else { + promise._reject(value); + } + } +}; + +Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) { + var handler = ctx.handler; + var promise = ctx.promise; + var receiver = ctx.receiver; + var value = ctx.value; + if (typeof handler === "function") { + if (!(promise instanceof Promise)) { + handler.call(receiver, value, promise); + } else { + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (promise instanceof Promise) { + promise._reject(value); + } +}; + +Promise.prototype._settlePromiseCtx = function(ctx) { + this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value); +}; + +Promise.prototype._settlePromise0 = function(handler, value, bitField) { + var promise = this._promise0; + var receiver = this._receiverAt(0); + this._promise0 = undefined; + this._receiver0 = undefined; + this._settlePromise(promise, handler, receiver, value); +}; + +Promise.prototype._clearCallbackDataAtIndex = function(index) { + var base = index * 4 - 4; + this[base + 2] = + this[base + 3] = + this[base + 0] = + this[base + 1] = undefined; +}; + +Promise.prototype._fulfill = function (value) { + var bitField = this._bitField; + if (((bitField & 117506048) >>> 16)) return; + if (value === this) { + var err = makeSelfResolutionError(); + this._attachExtraTrace(err); + return this._reject(err); + } + this._setFulfilled(); + this._rejectionHandler0 = value; + + if ((bitField & 65535) > 0) { + if (((bitField & 134217728) !== 0)) { + this._settlePromises(); + } else { + async.settlePromises(this); + } + this._dereferenceTrace(); + } +}; + +Promise.prototype._reject = function (reason) { + var bitField = this._bitField; + if (((bitField & 117506048) >>> 16)) return; + this._setRejected(); + this._fulfillmentHandler0 = reason; + + if (this._isFinal()) { + return async.fatalError(reason, util.isNode); + } + + if ((bitField & 65535) > 0) { + async.settlePromises(this); + } else { + this._ensurePossibleRejectionHandled(); + } +}; + +Promise.prototype._fulfillPromises = function (len, value) { + for (var i = 1; i < len; i++) { + var handler = this._fulfillmentHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, value); + } +}; + +Promise.prototype._rejectPromises = function (len, reason) { + for (var i = 1; i < len; i++) { + var handler = this._rejectionHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, reason); + } +}; + +Promise.prototype._settlePromises = function () { + var bitField = this._bitField; + var len = (bitField & 65535); + + if (len > 0) { + if (((bitField & 16842752) !== 0)) { + var reason = this._fulfillmentHandler0; + this._settlePromise0(this._rejectionHandler0, reason, bitField); + this._rejectPromises(len, reason); + } else { + var value = this._rejectionHandler0; + this._settlePromise0(this._fulfillmentHandler0, value, bitField); + this._fulfillPromises(len, value); + } + this._setLength(0); + } + this._clearCancellationData(); +}; + +Promise.prototype._settledValue = function() { + var bitField = this._bitField; + if (((bitField & 33554432) !== 0)) { + return this._rejectionHandler0; + } else if (((bitField & 16777216) !== 0)) { + return this._fulfillmentHandler0; + } +}; + +if (typeof Symbol !== "undefined" && Symbol.toStringTag) { + es5.defineProperty(Promise.prototype, Symbol.toStringTag, { + get: function () { + return "Object"; + } + }); +} + +function deferResolve(v) {this.promise._resolveCallback(v);} +function deferReject(v) {this.promise._rejectCallback(v, false);} + +Promise.defer = Promise.pending = function() { + debug.deprecated("Promise.defer", "new Promise"); + var promise = new Promise(INTERNAL); + return { + promise: promise, + resolve: deferResolve, + reject: deferReject + }; +}; + +util.notEnumerableProp(Promise, + "_makeSelfResolutionError", + makeSelfResolutionError); + +require("./method")(Promise, INTERNAL, tryConvertToPromise, apiRejection, + debug); +require("./bind")(Promise, INTERNAL, tryConvertToPromise, debug); +require("./cancel")(Promise, PromiseArray, apiRejection, debug); +require("./direct_resolve")(Promise); +require("./synchronous_inspection")(Promise); +require("./join")( + Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain); +Promise.Promise = Promise; +Promise.version = "3.5.5"; +require('./call_get.js')(Promise); +require('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug); +require('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); +require('./nodeify.js')(Promise); +require('./promisify.js')(Promise, INTERNAL); +require('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection); +require('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection); +require('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); +require('./settle.js')(Promise, PromiseArray, debug); +require('./some.js')(Promise, PromiseArray, apiRejection); +require('./timers.js')(Promise, INTERNAL, debug); +require('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug); +require('./any.js')(Promise); +require('./each.js')(Promise, INTERNAL); +require('./filter.js')(Promise, INTERNAL); + + util.toFastProperties(Promise); + util.toFastProperties(Promise.prototype); + function fillTypes(value) { + var p = new Promise(INTERNAL); + p._fulfillmentHandler0 = value; + p._rejectionHandler0 = value; + p._promise0 = value; + p._receiver0 = value; + } + // Complete slack tracking, opt out of field-type tracking and + // stabilize map + fillTypes({a: 1}); + fillTypes({b: 2}); + fillTypes({c: 3}); + fillTypes(1); + fillTypes(function(){}); + fillTypes(undefined); + fillTypes(false); + fillTypes(new Promise(INTERNAL)); + debug.setBounds(Async.firstLineError, util.lastLineError); + return Promise; + +}; diff --git a/node_modules/bluebird/js/release/promise_array.js b/node_modules/bluebird/js/release/promise_array.js new file mode 100644 index 00000000..0fb303eb --- /dev/null +++ b/node_modules/bluebird/js/release/promise_array.js @@ -0,0 +1,185 @@ +"use strict"; +module.exports = function(Promise, INTERNAL, tryConvertToPromise, + apiRejection, Proxyable) { +var util = require("./util"); +var isArray = util.isArray; + +function toResolutionValue(val) { + switch(val) { + case -2: return []; + case -3: return {}; + case -6: return new Map(); + } +} + +function PromiseArray(values) { + var promise = this._promise = new Promise(INTERNAL); + if (values instanceof Promise) { + promise._propagateFrom(values, 3); + } + promise._setOnCancel(this); + this._values = values; + this._length = 0; + this._totalResolved = 0; + this._init(undefined, -2); +} +util.inherits(PromiseArray, Proxyable); + +PromiseArray.prototype.length = function () { + return this._length; +}; + +PromiseArray.prototype.promise = function () { + return this._promise; +}; + +PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) { + var values = tryConvertToPromise(this._values, this._promise); + if (values instanceof Promise) { + values = values._target(); + var bitField = values._bitField; + ; + this._values = values; + + if (((bitField & 50397184) === 0)) { + this._promise._setAsyncGuaranteed(); + return values._then( + init, + this._reject, + undefined, + this, + resolveValueIfEmpty + ); + } else if (((bitField & 33554432) !== 0)) { + values = values._value(); + } else if (((bitField & 16777216) !== 0)) { + return this._reject(values._reason()); + } else { + return this._cancel(); + } + } + values = util.asArray(values); + if (values === null) { + var err = apiRejection( + "expecting an array or an iterable object but got " + util.classString(values)).reason(); + this._promise._rejectCallback(err, false); + return; + } + + if (values.length === 0) { + if (resolveValueIfEmpty === -5) { + this._resolveEmptyArray(); + } + else { + this._resolve(toResolutionValue(resolveValueIfEmpty)); + } + return; + } + this._iterate(values); +}; + +PromiseArray.prototype._iterate = function(values) { + var len = this.getActualLength(values.length); + this._length = len; + this._values = this.shouldCopyValues() ? new Array(len) : this._values; + var result = this._promise; + var isResolved = false; + var bitField = null; + for (var i = 0; i < len; ++i) { + var maybePromise = tryConvertToPromise(values[i], result); + + if (maybePromise instanceof Promise) { + maybePromise = maybePromise._target(); + bitField = maybePromise._bitField; + } else { + bitField = null; + } + + if (isResolved) { + if (bitField !== null) { + maybePromise.suppressUnhandledRejections(); + } + } else if (bitField !== null) { + if (((bitField & 50397184) === 0)) { + maybePromise._proxy(this, i); + this._values[i] = maybePromise; + } else if (((bitField & 33554432) !== 0)) { + isResolved = this._promiseFulfilled(maybePromise._value(), i); + } else if (((bitField & 16777216) !== 0)) { + isResolved = this._promiseRejected(maybePromise._reason(), i); + } else { + isResolved = this._promiseCancelled(i); + } + } else { + isResolved = this._promiseFulfilled(maybePromise, i); + } + } + if (!isResolved) result._setAsyncGuaranteed(); +}; + +PromiseArray.prototype._isResolved = function () { + return this._values === null; +}; + +PromiseArray.prototype._resolve = function (value) { + this._values = null; + this._promise._fulfill(value); +}; + +PromiseArray.prototype._cancel = function() { + if (this._isResolved() || !this._promise._isCancellable()) return; + this._values = null; + this._promise._cancel(); +}; + +PromiseArray.prototype._reject = function (reason) { + this._values = null; + this._promise._rejectCallback(reason, false); +}; + +PromiseArray.prototype._promiseFulfilled = function (value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; +}; + +PromiseArray.prototype._promiseCancelled = function() { + this._cancel(); + return true; +}; + +PromiseArray.prototype._promiseRejected = function (reason) { + this._totalResolved++; + this._reject(reason); + return true; +}; + +PromiseArray.prototype._resultCancelled = function() { + if (this._isResolved()) return; + var values = this._values; + this._cancel(); + if (values instanceof Promise) { + values.cancel(); + } else { + for (var i = 0; i < values.length; ++i) { + if (values[i] instanceof Promise) { + values[i].cancel(); + } + } + } +}; + +PromiseArray.prototype.shouldCopyValues = function () { + return true; +}; + +PromiseArray.prototype.getActualLength = function (len) { + return len; +}; + +return PromiseArray; +}; diff --git a/node_modules/bluebird/js/release/promisify.js b/node_modules/bluebird/js/release/promisify.js new file mode 100644 index 00000000..aa98e5bd --- /dev/null +++ b/node_modules/bluebird/js/release/promisify.js @@ -0,0 +1,314 @@ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var THIS = {}; +var util = require("./util"); +var nodebackForPromise = require("./nodeback"); +var withAppended = util.withAppended; +var maybeWrapAsError = util.maybeWrapAsError; +var canEvaluate = util.canEvaluate; +var TypeError = require("./errors").TypeError; +var defaultSuffix = "Async"; +var defaultPromisified = {__isPromisified__: true}; +var noCopyProps = [ + "arity", "length", + "name", + "arguments", + "caller", + "callee", + "prototype", + "__isPromisified__" +]; +var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$"); + +var defaultFilter = function(name) { + return util.isIdentifier(name) && + name.charAt(0) !== "_" && + name !== "constructor"; +}; + +function propsFilter(key) { + return !noCopyPropsPattern.test(key); +} + +function isPromisified(fn) { + try { + return fn.__isPromisified__ === true; + } + catch (e) { + return false; + } +} + +function hasPromisified(obj, key, suffix) { + var val = util.getDataPropertyOrDefault(obj, key + suffix, + defaultPromisified); + return val ? isPromisified(val) : false; +} +function checkValid(ret, suffix, suffixRegexp) { + for (var i = 0; i < ret.length; i += 2) { + var key = ret[i]; + if (suffixRegexp.test(key)) { + var keyWithoutAsyncSuffix = key.replace(suffixRegexp, ""); + for (var j = 0; j < ret.length; j += 2) { + if (ret[j] === keyWithoutAsyncSuffix) { + throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/MqrFmX\u000a" + .replace("%s", suffix)); + } + } + } + } +} + +function promisifiableMethods(obj, suffix, suffixRegexp, filter) { + var keys = util.inheritedDataKeys(obj); + var ret = []; + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var value = obj[key]; + var passesDefaultFilter = filter === defaultFilter + ? true : defaultFilter(key, value, obj); + if (typeof value === "function" && + !isPromisified(value) && + !hasPromisified(obj, key, suffix) && + filter(key, value, obj, passesDefaultFilter)) { + ret.push(key, value); + } + } + checkValid(ret, suffix, suffixRegexp); + return ret; +} + +var escapeIdentRegex = function(str) { + return str.replace(/([$])/, "\\$"); +}; + +var makeNodePromisifiedEval; +if (!false) { +var switchCaseArgumentOrder = function(likelyArgumentCount) { + var ret = [likelyArgumentCount]; + var min = Math.max(0, likelyArgumentCount - 1 - 3); + for(var i = likelyArgumentCount - 1; i >= min; --i) { + ret.push(i); + } + for(var i = likelyArgumentCount + 1; i <= 3; ++i) { + ret.push(i); + } + return ret; +}; + +var argumentSequence = function(argumentCount) { + return util.filledRange(argumentCount, "_arg", ""); +}; + +var parameterDeclaration = function(parameterCount) { + return util.filledRange( + Math.max(parameterCount, 3), "_arg", ""); +}; + +var parameterCount = function(fn) { + if (typeof fn.length === "number") { + return Math.max(Math.min(fn.length, 1023 + 1), 0); + } + return 0; +}; + +makeNodePromisifiedEval = +function(callback, receiver, originalName, fn, _, multiArgs) { + var newParameterCount = Math.max(0, parameterCount(fn) - 1); + var argumentOrder = switchCaseArgumentOrder(newParameterCount); + var shouldProxyThis = typeof callback === "string" || receiver === THIS; + + function generateCallForArgumentCount(count) { + var args = argumentSequence(count).join(", "); + var comma = count > 0 ? ", " : ""; + var ret; + if (shouldProxyThis) { + ret = "ret = callback.call(this, {{args}}, nodeback); break;\n"; + } else { + ret = receiver === undefined + ? "ret = callback({{args}}, nodeback); break;\n" + : "ret = callback.call(receiver, {{args}}, nodeback); break;\n"; + } + return ret.replace("{{args}}", args).replace(", ", comma); + } + + function generateArgumentSwitchCase() { + var ret = ""; + for (var i = 0; i < argumentOrder.length; ++i) { + ret += "case " + argumentOrder[i] +":" + + generateCallForArgumentCount(argumentOrder[i]); + } + + ret += " \n\ + default: \n\ + var args = new Array(len + 1); \n\ + var i = 0; \n\ + for (var i = 0; i < len; ++i) { \n\ + args[i] = arguments[i]; \n\ + } \n\ + args[i] = nodeback; \n\ + [CodeForCall] \n\ + break; \n\ + ".replace("[CodeForCall]", (shouldProxyThis + ? "ret = callback.apply(this, args);\n" + : "ret = callback.apply(receiver, args);\n")); + return ret; + } + + var getFunctionCode = typeof callback === "string" + ? ("this != null ? this['"+callback+"'] : fn") + : "fn"; + var body = "'use strict'; \n\ + var ret = function (Parameters) { \n\ + 'use strict'; \n\ + var len = arguments.length; \n\ + var promise = new Promise(INTERNAL); \n\ + promise._captureStackTrace(); \n\ + var nodeback = nodebackForPromise(promise, " + multiArgs + "); \n\ + var ret; \n\ + var callback = tryCatch([GetFunctionCode]); \n\ + switch(len) { \n\ + [CodeForSwitchCase] \n\ + } \n\ + if (ret === errorObj) { \n\ + promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\ + } \n\ + if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n\ + return promise; \n\ + }; \n\ + notEnumerableProp(ret, '__isPromisified__', true); \n\ + return ret; \n\ + ".replace("[CodeForSwitchCase]", generateArgumentSwitchCase()) + .replace("[GetFunctionCode]", getFunctionCode); + body = body.replace("Parameters", parameterDeclaration(newParameterCount)); + return new Function("Promise", + "fn", + "receiver", + "withAppended", + "maybeWrapAsError", + "nodebackForPromise", + "tryCatch", + "errorObj", + "notEnumerableProp", + "INTERNAL", + body)( + Promise, + fn, + receiver, + withAppended, + maybeWrapAsError, + nodebackForPromise, + util.tryCatch, + util.errorObj, + util.notEnumerableProp, + INTERNAL); +}; +} + +function makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) { + var defaultThis = (function() {return this;})(); + var method = callback; + if (typeof method === "string") { + callback = fn; + } + function promisified() { + var _receiver = receiver; + if (receiver === THIS) _receiver = this; + var promise = new Promise(INTERNAL); + promise._captureStackTrace(); + var cb = typeof method === "string" && this !== defaultThis + ? this[method] : callback; + var fn = nodebackForPromise(promise, multiArgs); + try { + cb.apply(_receiver, withAppended(arguments, fn)); + } catch(e) { + promise._rejectCallback(maybeWrapAsError(e), true, true); + } + if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); + return promise; + } + util.notEnumerableProp(promisified, "__isPromisified__", true); + return promisified; +} + +var makeNodePromisified = canEvaluate + ? makeNodePromisifiedEval + : makeNodePromisifiedClosure; + +function promisifyAll(obj, suffix, filter, promisifier, multiArgs) { + var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$"); + var methods = + promisifiableMethods(obj, suffix, suffixRegexp, filter); + + for (var i = 0, len = methods.length; i < len; i+= 2) { + var key = methods[i]; + var fn = methods[i+1]; + var promisifiedKey = key + suffix; + if (promisifier === makeNodePromisified) { + obj[promisifiedKey] = + makeNodePromisified(key, THIS, key, fn, suffix, multiArgs); + } else { + var promisified = promisifier(fn, function() { + return makeNodePromisified(key, THIS, key, + fn, suffix, multiArgs); + }); + util.notEnumerableProp(promisified, "__isPromisified__", true); + obj[promisifiedKey] = promisified; + } + } + util.toFastProperties(obj); + return obj; +} + +function promisify(callback, receiver, multiArgs) { + return makeNodePromisified(callback, receiver, undefined, + callback, null, multiArgs); +} + +Promise.promisify = function (fn, options) { + if (typeof fn !== "function") { + throw new TypeError("expecting a function but got " + util.classString(fn)); + } + if (isPromisified(fn)) { + return fn; + } + options = Object(options); + var receiver = options.context === undefined ? THIS : options.context; + var multiArgs = !!options.multiArgs; + var ret = promisify(fn, receiver, multiArgs); + util.copyDescriptors(fn, ret, propsFilter); + return ret; +}; + +Promise.promisifyAll = function (target, options) { + if (typeof target !== "function" && typeof target !== "object") { + throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + options = Object(options); + var multiArgs = !!options.multiArgs; + var suffix = options.suffix; + if (typeof suffix !== "string") suffix = defaultSuffix; + var filter = options.filter; + if (typeof filter !== "function") filter = defaultFilter; + var promisifier = options.promisifier; + if (typeof promisifier !== "function") promisifier = makeNodePromisified; + + if (!util.isIdentifier(suffix)) { + throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + + var keys = util.inheritedDataKeys(target); + for (var i = 0; i < keys.length; ++i) { + var value = target[keys[i]]; + if (keys[i] !== "constructor" && + util.isClass(value)) { + promisifyAll(value.prototype, suffix, filter, promisifier, + multiArgs); + promisifyAll(value, suffix, filter, promisifier, multiArgs); + } + } + + return promisifyAll(target, suffix, filter, promisifier, multiArgs); +}; +}; + diff --git a/node_modules/bluebird/js/release/props.js b/node_modules/bluebird/js/release/props.js new file mode 100644 index 00000000..6a34aaf5 --- /dev/null +++ b/node_modules/bluebird/js/release/props.js @@ -0,0 +1,118 @@ +"use strict"; +module.exports = function( + Promise, PromiseArray, tryConvertToPromise, apiRejection) { +var util = require("./util"); +var isObject = util.isObject; +var es5 = require("./es5"); +var Es6Map; +if (typeof Map === "function") Es6Map = Map; + +var mapToEntries = (function() { + var index = 0; + var size = 0; + + function extractEntry(value, key) { + this[index] = value; + this[index + size] = key; + index++; + } + + return function mapToEntries(map) { + size = map.size; + index = 0; + var ret = new Array(map.size * 2); + map.forEach(extractEntry, ret); + return ret; + }; +})(); + +var entriesToMap = function(entries) { + var ret = new Es6Map(); + var length = entries.length / 2 | 0; + for (var i = 0; i < length; ++i) { + var key = entries[length + i]; + var value = entries[i]; + ret.set(key, value); + } + return ret; +}; + +function PropertiesPromiseArray(obj) { + var isMap = false; + var entries; + if (Es6Map !== undefined && obj instanceof Es6Map) { + entries = mapToEntries(obj); + isMap = true; + } else { + var keys = es5.keys(obj); + var len = keys.length; + entries = new Array(len * 2); + for (var i = 0; i < len; ++i) { + var key = keys[i]; + entries[i] = obj[key]; + entries[i + len] = key; + } + } + this.constructor$(entries); + this._isMap = isMap; + this._init$(undefined, isMap ? -6 : -3); +} +util.inherits(PropertiesPromiseArray, PromiseArray); + +PropertiesPromiseArray.prototype._init = function () {}; + +PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + var val; + if (this._isMap) { + val = entriesToMap(this._values); + } else { + val = {}; + var keyOffset = this.length(); + for (var i = 0, len = this.length(); i < len; ++i) { + val[this._values[i + keyOffset]] = this._values[i]; + } + } + this._resolve(val); + return true; + } + return false; +}; + +PropertiesPromiseArray.prototype.shouldCopyValues = function () { + return false; +}; + +PropertiesPromiseArray.prototype.getActualLength = function (len) { + return len >> 1; +}; + +function props(promises) { + var ret; + var castValue = tryConvertToPromise(promises); + + if (!isObject(castValue)) { + return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } else if (castValue instanceof Promise) { + ret = castValue._then( + Promise.props, undefined, undefined, undefined, undefined); + } else { + ret = new PropertiesPromiseArray(castValue).promise(); + } + + if (castValue instanceof Promise) { + ret._propagateFrom(castValue, 2); + } + return ret; +} + +Promise.prototype.props = function () { + return props(this); +}; + +Promise.props = function (promises) { + return props(promises); +}; +}; diff --git a/node_modules/bluebird/js/release/queue.js b/node_modules/bluebird/js/release/queue.js new file mode 100644 index 00000000..ffd36fda --- /dev/null +++ b/node_modules/bluebird/js/release/queue.js @@ -0,0 +1,73 @@ +"use strict"; +function arrayMove(src, srcIndex, dst, dstIndex, len) { + for (var j = 0; j < len; ++j) { + dst[j + dstIndex] = src[j + srcIndex]; + src[j + srcIndex] = void 0; + } +} + +function Queue(capacity) { + this._capacity = capacity; + this._length = 0; + this._front = 0; +} + +Queue.prototype._willBeOverCapacity = function (size) { + return this._capacity < size; +}; + +Queue.prototype._pushOne = function (arg) { + var length = this.length(); + this._checkCapacity(length + 1); + var i = (this._front + length) & (this._capacity - 1); + this[i] = arg; + this._length = length + 1; +}; + +Queue.prototype.push = function (fn, receiver, arg) { + var length = this.length() + 3; + if (this._willBeOverCapacity(length)) { + this._pushOne(fn); + this._pushOne(receiver); + this._pushOne(arg); + return; + } + var j = this._front + length - 3; + this._checkCapacity(length); + var wrapMask = this._capacity - 1; + this[(j + 0) & wrapMask] = fn; + this[(j + 1) & wrapMask] = receiver; + this[(j + 2) & wrapMask] = arg; + this._length = length; +}; + +Queue.prototype.shift = function () { + var front = this._front, + ret = this[front]; + + this[front] = undefined; + this._front = (front + 1) & (this._capacity - 1); + this._length--; + return ret; +}; + +Queue.prototype.length = function () { + return this._length; +}; + +Queue.prototype._checkCapacity = function (size) { + if (this._capacity < size) { + this._resizeTo(this._capacity << 1); + } +}; + +Queue.prototype._resizeTo = function (capacity) { + var oldCapacity = this._capacity; + this._capacity = capacity; + var front = this._front; + var length = this._length; + var moveItemsCount = (front + length) & (oldCapacity - 1); + arrayMove(this, 0, this, oldCapacity, moveItemsCount); +}; + +module.exports = Queue; diff --git a/node_modules/bluebird/js/release/race.js b/node_modules/bluebird/js/release/race.js new file mode 100644 index 00000000..b862f46d --- /dev/null +++ b/node_modules/bluebird/js/release/race.js @@ -0,0 +1,49 @@ +"use strict"; +module.exports = function( + Promise, INTERNAL, tryConvertToPromise, apiRejection) { +var util = require("./util"); + +var raceLater = function (promise) { + return promise.then(function(array) { + return race(array, promise); + }); +}; + +function race(promises, parent) { + var maybePromise = tryConvertToPromise(promises); + + if (maybePromise instanceof Promise) { + return raceLater(maybePromise); + } else { + promises = util.asArray(promises); + if (promises === null) + return apiRejection("expecting an array or an iterable object but got " + util.classString(promises)); + } + + var ret = new Promise(INTERNAL); + if (parent !== undefined) { + ret._propagateFrom(parent, 3); + } + var fulfill = ret._fulfill; + var reject = ret._reject; + for (var i = 0, len = promises.length; i < len; ++i) { + var val = promises[i]; + + if (val === undefined && !(i in promises)) { + continue; + } + + Promise.cast(val)._then(fulfill, reject, undefined, ret, null); + } + return ret; +} + +Promise.race = function (promises) { + return race(promises, undefined); +}; + +Promise.prototype.race = function () { + return race(this, undefined); +}; + +}; diff --git a/node_modules/bluebird/js/release/reduce.js b/node_modules/bluebird/js/release/reduce.js new file mode 100644 index 00000000..26e2b1a9 --- /dev/null +++ b/node_modules/bluebird/js/release/reduce.js @@ -0,0 +1,172 @@ +"use strict"; +module.exports = function(Promise, + PromiseArray, + apiRejection, + tryConvertToPromise, + INTERNAL, + debug) { +var getDomain = Promise._getDomain; +var util = require("./util"); +var tryCatch = util.tryCatch; + +function ReductionPromiseArray(promises, fn, initialValue, _each) { + this.constructor$(promises); + var domain = getDomain(); + this._fn = domain === null ? fn : util.domainBind(domain, fn); + if (initialValue !== undefined) { + initialValue = Promise.resolve(initialValue); + initialValue._attachCancellationCallback(this); + } + this._initialValue = initialValue; + this._currentCancellable = null; + if(_each === INTERNAL) { + this._eachValues = Array(this._length); + } else if (_each === 0) { + this._eachValues = null; + } else { + this._eachValues = undefined; + } + this._promise._captureStackTrace(); + this._init$(undefined, -5); +} +util.inherits(ReductionPromiseArray, PromiseArray); + +ReductionPromiseArray.prototype._gotAccum = function(accum) { + if (this._eachValues !== undefined && + this._eachValues !== null && + accum !== INTERNAL) { + this._eachValues.push(accum); + } +}; + +ReductionPromiseArray.prototype._eachComplete = function(value) { + if (this._eachValues !== null) { + this._eachValues.push(value); + } + return this._eachValues; +}; + +ReductionPromiseArray.prototype._init = function() {}; + +ReductionPromiseArray.prototype._resolveEmptyArray = function() { + this._resolve(this._eachValues !== undefined ? this._eachValues + : this._initialValue); +}; + +ReductionPromiseArray.prototype.shouldCopyValues = function () { + return false; +}; + +ReductionPromiseArray.prototype._resolve = function(value) { + this._promise._resolveCallback(value); + this._values = null; +}; + +ReductionPromiseArray.prototype._resultCancelled = function(sender) { + if (sender === this._initialValue) return this._cancel(); + if (this._isResolved()) return; + this._resultCancelled$(); + if (this._currentCancellable instanceof Promise) { + this._currentCancellable.cancel(); + } + if (this._initialValue instanceof Promise) { + this._initialValue.cancel(); + } +}; + +ReductionPromiseArray.prototype._iterate = function (values) { + this._values = values; + var value; + var i; + var length = values.length; + if (this._initialValue !== undefined) { + value = this._initialValue; + i = 0; + } else { + value = Promise.resolve(values[0]); + i = 1; + } + + this._currentCancellable = value; + + if (!value.isRejected()) { + for (; i < length; ++i) { + var ctx = { + accum: null, + value: values[i], + index: i, + length: length, + array: this + }; + value = value._then(gotAccum, undefined, undefined, ctx, undefined); + } + } + + if (this._eachValues !== undefined) { + value = value + ._then(this._eachComplete, undefined, undefined, this, undefined); + } + value._then(completed, completed, undefined, value, this); +}; + +Promise.prototype.reduce = function (fn, initialValue) { + return reduce(this, fn, initialValue, null); +}; + +Promise.reduce = function (promises, fn, initialValue, _each) { + return reduce(promises, fn, initialValue, _each); +}; + +function completed(valueOrReason, array) { + if (this.isFulfilled()) { + array._resolve(valueOrReason); + } else { + array._reject(valueOrReason); + } +} + +function reduce(promises, fn, initialValue, _each) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var array = new ReductionPromiseArray(promises, fn, initialValue, _each); + return array.promise(); +} + +function gotAccum(accum) { + this.accum = accum; + this.array._gotAccum(accum); + var value = tryConvertToPromise(this.value, this.array._promise); + if (value instanceof Promise) { + this.array._currentCancellable = value; + return value._then(gotValue, undefined, undefined, this, undefined); + } else { + return gotValue.call(this, value); + } +} + +function gotValue(value) { + var array = this.array; + var promise = array._promise; + var fn = tryCatch(array._fn); + promise._pushContext(); + var ret; + if (array._eachValues !== undefined) { + ret = fn.call(promise._boundValue(), value, this.index, this.length); + } else { + ret = fn.call(promise._boundValue(), + this.accum, value, this.index, this.length); + } + if (ret instanceof Promise) { + array._currentCancellable = ret; + } + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, + promiseCreated, + array._eachValues !== undefined ? "Promise.each" : "Promise.reduce", + promise + ); + return ret; +} +}; diff --git a/node_modules/bluebird/js/release/schedule.js b/node_modules/bluebird/js/release/schedule.js new file mode 100644 index 00000000..15197d14 --- /dev/null +++ b/node_modules/bluebird/js/release/schedule.js @@ -0,0 +1,62 @@ +"use strict"; +var util = require("./util"); +var schedule; +var noAsyncScheduler = function() { + throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a"); +}; +var NativePromise = util.getNativePromise(); +if (util.isNode && typeof MutationObserver === "undefined") { + var GlobalSetImmediate = global.setImmediate; + var ProcessNextTick = process.nextTick; + schedule = util.isRecentNode + ? function(fn) { GlobalSetImmediate.call(global, fn); } + : function(fn) { ProcessNextTick.call(process, fn); }; +} else if (typeof NativePromise === "function" && + typeof NativePromise.resolve === "function") { + var nativePromise = NativePromise.resolve(); + schedule = function(fn) { + nativePromise.then(fn); + }; +} else if ((typeof MutationObserver !== "undefined") && + !(typeof window !== "undefined" && + window.navigator && + (window.navigator.standalone || window.cordova)) && + ("classList" in document.documentElement)) { + schedule = (function() { + var div = document.createElement("div"); + var opts = {attributes: true}; + var toggleScheduled = false; + var div2 = document.createElement("div"); + var o2 = new MutationObserver(function() { + div.classList.toggle("foo"); + toggleScheduled = false; + }); + o2.observe(div2, opts); + + var scheduleToggle = function() { + if (toggleScheduled) return; + toggleScheduled = true; + div2.classList.toggle("foo"); + }; + + return function schedule(fn) { + var o = new MutationObserver(function() { + o.disconnect(); + fn(); + }); + o.observe(div, opts); + scheduleToggle(); + }; + })(); +} else if (typeof setImmediate !== "undefined") { + schedule = function (fn) { + setImmediate(fn); + }; +} else if (typeof setTimeout !== "undefined") { + schedule = function (fn) { + setTimeout(fn, 0); + }; +} else { + schedule = noAsyncScheduler; +} +module.exports = schedule; diff --git a/node_modules/bluebird/js/release/settle.js b/node_modules/bluebird/js/release/settle.js new file mode 100644 index 00000000..fade3a17 --- /dev/null +++ b/node_modules/bluebird/js/release/settle.js @@ -0,0 +1,43 @@ +"use strict"; +module.exports = + function(Promise, PromiseArray, debug) { +var PromiseInspection = Promise.PromiseInspection; +var util = require("./util"); + +function SettledPromiseArray(values) { + this.constructor$(values); +} +util.inherits(SettledPromiseArray, PromiseArray); + +SettledPromiseArray.prototype._promiseResolved = function (index, inspection) { + this._values[index] = inspection; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; +}; + +SettledPromiseArray.prototype._promiseFulfilled = function (value, index) { + var ret = new PromiseInspection(); + ret._bitField = 33554432; + ret._settledValueField = value; + return this._promiseResolved(index, ret); +}; +SettledPromiseArray.prototype._promiseRejected = function (reason, index) { + var ret = new PromiseInspection(); + ret._bitField = 16777216; + ret._settledValueField = reason; + return this._promiseResolved(index, ret); +}; + +Promise.settle = function (promises) { + debug.deprecated(".settle()", ".reflect()"); + return new SettledPromiseArray(promises).promise(); +}; + +Promise.prototype.settle = function () { + return Promise.settle(this); +}; +}; diff --git a/node_modules/bluebird/js/release/some.js b/node_modules/bluebird/js/release/some.js new file mode 100644 index 00000000..400d8520 --- /dev/null +++ b/node_modules/bluebird/js/release/some.js @@ -0,0 +1,148 @@ +"use strict"; +module.exports = +function(Promise, PromiseArray, apiRejection) { +var util = require("./util"); +var RangeError = require("./errors").RangeError; +var AggregateError = require("./errors").AggregateError; +var isArray = util.isArray; +var CANCELLATION = {}; + + +function SomePromiseArray(values) { + this.constructor$(values); + this._howMany = 0; + this._unwrap = false; + this._initialized = false; +} +util.inherits(SomePromiseArray, PromiseArray); + +SomePromiseArray.prototype._init = function () { + if (!this._initialized) { + return; + } + if (this._howMany === 0) { + this._resolve([]); + return; + } + this._init$(undefined, -5); + var isArrayResolved = isArray(this._values); + if (!this._isResolved() && + isArrayResolved && + this._howMany > this._canPossiblyFulfill()) { + this._reject(this._getRangeError(this.length())); + } +}; + +SomePromiseArray.prototype.init = function () { + this._initialized = true; + this._init(); +}; + +SomePromiseArray.prototype.setUnwrap = function () { + this._unwrap = true; +}; + +SomePromiseArray.prototype.howMany = function () { + return this._howMany; +}; + +SomePromiseArray.prototype.setHowMany = function (count) { + this._howMany = count; +}; + +SomePromiseArray.prototype._promiseFulfilled = function (value) { + this._addFulfilled(value); + if (this._fulfilled() === this.howMany()) { + this._values.length = this.howMany(); + if (this.howMany() === 1 && this._unwrap) { + this._resolve(this._values[0]); + } else { + this._resolve(this._values); + } + return true; + } + return false; + +}; +SomePromiseArray.prototype._promiseRejected = function (reason) { + this._addRejected(reason); + return this._checkOutcome(); +}; + +SomePromiseArray.prototype._promiseCancelled = function () { + if (this._values instanceof Promise || this._values == null) { + return this._cancel(); + } + this._addRejected(CANCELLATION); + return this._checkOutcome(); +}; + +SomePromiseArray.prototype._checkOutcome = function() { + if (this.howMany() > this._canPossiblyFulfill()) { + var e = new AggregateError(); + for (var i = this.length(); i < this._values.length; ++i) { + if (this._values[i] !== CANCELLATION) { + e.push(this._values[i]); + } + } + if (e.length > 0) { + this._reject(e); + } else { + this._cancel(); + } + return true; + } + return false; +}; + +SomePromiseArray.prototype._fulfilled = function () { + return this._totalResolved; +}; + +SomePromiseArray.prototype._rejected = function () { + return this._values.length - this.length(); +}; + +SomePromiseArray.prototype._addRejected = function (reason) { + this._values.push(reason); +}; + +SomePromiseArray.prototype._addFulfilled = function (value) { + this._values[this._totalResolved++] = value; +}; + +SomePromiseArray.prototype._canPossiblyFulfill = function () { + return this.length() - this._rejected(); +}; + +SomePromiseArray.prototype._getRangeError = function (count) { + var message = "Input array must contain at least " + + this._howMany + " items but contains only " + count + " items"; + return new RangeError(message); +}; + +SomePromiseArray.prototype._resolveEmptyArray = function () { + this._reject(this._getRangeError(0)); +}; + +function some(promises, howMany) { + if ((howMany | 0) !== howMany || howMany < 0) { + return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + var ret = new SomePromiseArray(promises); + var promise = ret.promise(); + ret.setHowMany(howMany); + ret.init(); + return promise; +} + +Promise.some = function (promises, howMany) { + return some(promises, howMany); +}; + +Promise.prototype.some = function (howMany) { + return some(this, howMany); +}; + +Promise._SomePromiseArray = SomePromiseArray; +}; diff --git a/node_modules/bluebird/js/release/synchronous_inspection.js b/node_modules/bluebird/js/release/synchronous_inspection.js new file mode 100644 index 00000000..9c49d2e6 --- /dev/null +++ b/node_modules/bluebird/js/release/synchronous_inspection.js @@ -0,0 +1,103 @@ +"use strict"; +module.exports = function(Promise) { +function PromiseInspection(promise) { + if (promise !== undefined) { + promise = promise._target(); + this._bitField = promise._bitField; + this._settledValueField = promise._isFateSealed() + ? promise._settledValue() : undefined; + } + else { + this._bitField = 0; + this._settledValueField = undefined; + } +} + +PromiseInspection.prototype._settledValue = function() { + return this._settledValueField; +}; + +var value = PromiseInspection.prototype.value = function () { + if (!this.isFulfilled()) { + throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + return this._settledValue(); +}; + +var reason = PromiseInspection.prototype.error = +PromiseInspection.prototype.reason = function () { + if (!this.isRejected()) { + throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a"); + } + return this._settledValue(); +}; + +var isFulfilled = PromiseInspection.prototype.isFulfilled = function() { + return (this._bitField & 33554432) !== 0; +}; + +var isRejected = PromiseInspection.prototype.isRejected = function () { + return (this._bitField & 16777216) !== 0; +}; + +var isPending = PromiseInspection.prototype.isPending = function () { + return (this._bitField & 50397184) === 0; +}; + +var isResolved = PromiseInspection.prototype.isResolved = function () { + return (this._bitField & 50331648) !== 0; +}; + +PromiseInspection.prototype.isCancelled = function() { + return (this._bitField & 8454144) !== 0; +}; + +Promise.prototype.__isCancelled = function() { + return (this._bitField & 65536) === 65536; +}; + +Promise.prototype._isCancelled = function() { + return this._target().__isCancelled(); +}; + +Promise.prototype.isCancelled = function() { + return (this._target()._bitField & 8454144) !== 0; +}; + +Promise.prototype.isPending = function() { + return isPending.call(this._target()); +}; + +Promise.prototype.isRejected = function() { + return isRejected.call(this._target()); +}; + +Promise.prototype.isFulfilled = function() { + return isFulfilled.call(this._target()); +}; + +Promise.prototype.isResolved = function() { + return isResolved.call(this._target()); +}; + +Promise.prototype.value = function() { + return value.call(this._target()); +}; + +Promise.prototype.reason = function() { + var target = this._target(); + target._unsetRejectionIsUnhandled(); + return reason.call(target); +}; + +Promise.prototype._value = function() { + return this._settledValue(); +}; + +Promise.prototype._reason = function() { + this._unsetRejectionIsUnhandled(); + return this._settledValue(); +}; + +Promise.PromiseInspection = PromiseInspection; +}; diff --git a/node_modules/bluebird/js/release/thenables.js b/node_modules/bluebird/js/release/thenables.js new file mode 100644 index 00000000..d6ab9aa2 --- /dev/null +++ b/node_modules/bluebird/js/release/thenables.js @@ -0,0 +1,86 @@ +"use strict"; +module.exports = function(Promise, INTERNAL) { +var util = require("./util"); +var errorObj = util.errorObj; +var isObject = util.isObject; + +function tryConvertToPromise(obj, context) { + if (isObject(obj)) { + if (obj instanceof Promise) return obj; + var then = getThen(obj); + if (then === errorObj) { + if (context) context._pushContext(); + var ret = Promise.reject(then.e); + if (context) context._popContext(); + return ret; + } else if (typeof then === "function") { + if (isAnyBluebirdPromise(obj)) { + var ret = new Promise(INTERNAL); + obj._then( + ret._fulfill, + ret._reject, + undefined, + ret, + null + ); + return ret; + } + return doThenable(obj, then, context); + } + } + return obj; +} + +function doGetThen(obj) { + return obj.then; +} + +function getThen(obj) { + try { + return doGetThen(obj); + } catch (e) { + errorObj.e = e; + return errorObj; + } +} + +var hasProp = {}.hasOwnProperty; +function isAnyBluebirdPromise(obj) { + try { + return hasProp.call(obj, "_promise0"); + } catch (e) { + return false; + } +} + +function doThenable(x, then, context) { + var promise = new Promise(INTERNAL); + var ret = promise; + if (context) context._pushContext(); + promise._captureStackTrace(); + if (context) context._popContext(); + var synchronous = true; + var result = util.tryCatch(then).call(x, resolve, reject); + synchronous = false; + + if (promise && result === errorObj) { + promise._rejectCallback(result.e, true, true); + promise = null; + } + + function resolve(value) { + if (!promise) return; + promise._resolveCallback(value); + promise = null; + } + + function reject(reason) { + if (!promise) return; + promise._rejectCallback(reason, synchronous, true); + promise = null; + } + return ret; +} + +return tryConvertToPromise; +}; diff --git a/node_modules/bluebird/js/release/timers.js b/node_modules/bluebird/js/release/timers.js new file mode 100644 index 00000000..cb8f1f42 --- /dev/null +++ b/node_modules/bluebird/js/release/timers.js @@ -0,0 +1,93 @@ +"use strict"; +module.exports = function(Promise, INTERNAL, debug) { +var util = require("./util"); +var TimeoutError = Promise.TimeoutError; + +function HandleWrapper(handle) { + this.handle = handle; +} + +HandleWrapper.prototype._resultCancelled = function() { + clearTimeout(this.handle); +}; + +var afterValue = function(value) { return delay(+this).thenReturn(value); }; +var delay = Promise.delay = function (ms, value) { + var ret; + var handle; + if (value !== undefined) { + ret = Promise.resolve(value) + ._then(afterValue, null, null, ms, undefined); + if (debug.cancellation() && value instanceof Promise) { + ret._setOnCancel(value); + } + } else { + ret = new Promise(INTERNAL); + handle = setTimeout(function() { ret._fulfill(); }, +ms); + if (debug.cancellation()) { + ret._setOnCancel(new HandleWrapper(handle)); + } + ret._captureStackTrace(); + } + ret._setAsyncGuaranteed(); + return ret; +}; + +Promise.prototype.delay = function (ms) { + return delay(ms, this); +}; + +var afterTimeout = function (promise, message, parent) { + var err; + if (typeof message !== "string") { + if (message instanceof Error) { + err = message; + } else { + err = new TimeoutError("operation timed out"); + } + } else { + err = new TimeoutError(message); + } + util.markAsOriginatingFromRejection(err); + promise._attachExtraTrace(err); + promise._reject(err); + + if (parent != null) { + parent.cancel(); + } +}; + +function successClear(value) { + clearTimeout(this.handle); + return value; +} + +function failureClear(reason) { + clearTimeout(this.handle); + throw reason; +} + +Promise.prototype.timeout = function (ms, message) { + ms = +ms; + var ret, parent; + + var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() { + if (ret.isPending()) { + afterTimeout(ret, message, parent); + } + }, ms)); + + if (debug.cancellation()) { + parent = this.then(); + ret = parent._then(successClear, failureClear, + undefined, handleWrapper, undefined); + ret._setOnCancel(handleWrapper); + } else { + ret = this._then(successClear, failureClear, + undefined, handleWrapper, undefined); + } + + return ret; +}; + +}; diff --git a/node_modules/bluebird/js/release/using.js b/node_modules/bluebird/js/release/using.js new file mode 100644 index 00000000..65de531c --- /dev/null +++ b/node_modules/bluebird/js/release/using.js @@ -0,0 +1,226 @@ +"use strict"; +module.exports = function (Promise, apiRejection, tryConvertToPromise, + createContext, INTERNAL, debug) { + var util = require("./util"); + var TypeError = require("./errors").TypeError; + var inherits = require("./util").inherits; + var errorObj = util.errorObj; + var tryCatch = util.tryCatch; + var NULL = {}; + + function thrower(e) { + setTimeout(function(){throw e;}, 0); + } + + function castPreservingDisposable(thenable) { + var maybePromise = tryConvertToPromise(thenable); + if (maybePromise !== thenable && + typeof thenable._isDisposable === "function" && + typeof thenable._getDisposer === "function" && + thenable._isDisposable()) { + maybePromise._setDisposable(thenable._getDisposer()); + } + return maybePromise; + } + function dispose(resources, inspection) { + var i = 0; + var len = resources.length; + var ret = new Promise(INTERNAL); + function iterator() { + if (i >= len) return ret._fulfill(); + var maybePromise = castPreservingDisposable(resources[i++]); + if (maybePromise instanceof Promise && + maybePromise._isDisposable()) { + try { + maybePromise = tryConvertToPromise( + maybePromise._getDisposer().tryDispose(inspection), + resources.promise); + } catch (e) { + return thrower(e); + } + if (maybePromise instanceof Promise) { + return maybePromise._then(iterator, thrower, + null, null, null); + } + } + iterator(); + } + iterator(); + return ret; + } + + function Disposer(data, promise, context) { + this._data = data; + this._promise = promise; + this._context = context; + } + + Disposer.prototype.data = function () { + return this._data; + }; + + Disposer.prototype.promise = function () { + return this._promise; + }; + + Disposer.prototype.resource = function () { + if (this.promise().isFulfilled()) { + return this.promise().value(); + } + return NULL; + }; + + Disposer.prototype.tryDispose = function(inspection) { + var resource = this.resource(); + var context = this._context; + if (context !== undefined) context._pushContext(); + var ret = resource !== NULL + ? this.doDispose(resource, inspection) : null; + if (context !== undefined) context._popContext(); + this._promise._unsetDisposable(); + this._data = null; + return ret; + }; + + Disposer.isDisposer = function (d) { + return (d != null && + typeof d.resource === "function" && + typeof d.tryDispose === "function"); + }; + + function FunctionDisposer(fn, promise, context) { + this.constructor$(fn, promise, context); + } + inherits(FunctionDisposer, Disposer); + + FunctionDisposer.prototype.doDispose = function (resource, inspection) { + var fn = this.data(); + return fn.call(resource, resource, inspection); + }; + + function maybeUnwrapDisposer(value) { + if (Disposer.isDisposer(value)) { + this.resources[this.index]._setDisposable(value); + return value.promise(); + } + return value; + } + + function ResourceList(length) { + this.length = length; + this.promise = null; + this[length-1] = null; + } + + ResourceList.prototype._resultCancelled = function() { + var len = this.length; + for (var i = 0; i < len; ++i) { + var item = this[i]; + if (item instanceof Promise) { + item.cancel(); + } + } + }; + + Promise.using = function () { + var len = arguments.length; + if (len < 2) return apiRejection( + "you must pass at least 2 arguments to Promise.using"); + var fn = arguments[len - 1]; + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util.classString(fn)); + } + var input; + var spreadArgs = true; + if (len === 2 && Array.isArray(arguments[0])) { + input = arguments[0]; + len = input.length; + spreadArgs = false; + } else { + input = arguments; + len--; + } + var resources = new ResourceList(len); + for (var i = 0; i < len; ++i) { + var resource = input[i]; + if (Disposer.isDisposer(resource)) { + var disposer = resource; + resource = resource.promise(); + resource._setDisposable(disposer); + } else { + var maybePromise = tryConvertToPromise(resource); + if (maybePromise instanceof Promise) { + resource = + maybePromise._then(maybeUnwrapDisposer, null, null, { + resources: resources, + index: i + }, undefined); + } + } + resources[i] = resource; + } + + var reflectedResources = new Array(resources.length); + for (var i = 0; i < reflectedResources.length; ++i) { + reflectedResources[i] = Promise.resolve(resources[i]).reflect(); + } + + var resultPromise = Promise.all(reflectedResources) + .then(function(inspections) { + for (var i = 0; i < inspections.length; ++i) { + var inspection = inspections[i]; + if (inspection.isRejected()) { + errorObj.e = inspection.error(); + return errorObj; + } else if (!inspection.isFulfilled()) { + resultPromise.cancel(); + return; + } + inspections[i] = inspection.value(); + } + promise._pushContext(); + + fn = tryCatch(fn); + var ret = spreadArgs + ? fn.apply(undefined, inspections) : fn(inspections); + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret, promiseCreated, "Promise.using", promise); + return ret; + }); + + var promise = resultPromise.lastly(function() { + var inspection = new Promise.PromiseInspection(resultPromise); + return dispose(resources, inspection); + }); + resources.promise = promise; + promise._setOnCancel(resources); + return promise; + }; + + Promise.prototype._setDisposable = function (disposer) { + this._bitField = this._bitField | 131072; + this._disposer = disposer; + }; + + Promise.prototype._isDisposable = function () { + return (this._bitField & 131072) > 0; + }; + + Promise.prototype._getDisposer = function () { + return this._disposer; + }; + + Promise.prototype._unsetDisposable = function () { + this._bitField = this._bitField & (~131072); + this._disposer = undefined; + }; + + Promise.prototype.disposer = function (fn) { + if (typeof fn === "function") { + return new FunctionDisposer(fn, this, createContext()); + } + throw new TypeError(); + }; + +}; diff --git a/node_modules/bluebird/js/release/util.js b/node_modules/bluebird/js/release/util.js new file mode 100644 index 00000000..74a24fa6 --- /dev/null +++ b/node_modules/bluebird/js/release/util.js @@ -0,0 +1,389 @@ +"use strict"; +var es5 = require("./es5"); +var canEvaluate = typeof navigator == "undefined"; + +var errorObj = {e: {}}; +var tryCatchTarget; +var globalObject = typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + typeof global !== "undefined" ? global : + this !== undefined ? this : null; + +function tryCatcher() { + try { + var target = tryCatchTarget; + tryCatchTarget = null; + return target.apply(this, arguments); + } catch (e) { + errorObj.e = e; + return errorObj; + } +} +function tryCatch(fn) { + tryCatchTarget = fn; + return tryCatcher; +} + +var inherits = function(Child, Parent) { + var hasProp = {}.hasOwnProperty; + + function T() { + this.constructor = Child; + this.constructor$ = Parent; + for (var propertyName in Parent.prototype) { + if (hasProp.call(Parent.prototype, propertyName) && + propertyName.charAt(propertyName.length-1) !== "$" + ) { + this[propertyName + "$"] = Parent.prototype[propertyName]; + } + } + } + T.prototype = Parent.prototype; + Child.prototype = new T(); + return Child.prototype; +}; + + +function isPrimitive(val) { + return val == null || val === true || val === false || + typeof val === "string" || typeof val === "number"; + +} + +function isObject(value) { + return typeof value === "function" || + typeof value === "object" && value !== null; +} + +function maybeWrapAsError(maybeError) { + if (!isPrimitive(maybeError)) return maybeError; + + return new Error(safeToString(maybeError)); +} + +function withAppended(target, appendee) { + var len = target.length; + var ret = new Array(len + 1); + var i; + for (i = 0; i < len; ++i) { + ret[i] = target[i]; + } + ret[i] = appendee; + return ret; +} + +function getDataPropertyOrDefault(obj, key, defaultValue) { + if (es5.isES5) { + var desc = Object.getOwnPropertyDescriptor(obj, key); + + if (desc != null) { + return desc.get == null && desc.set == null + ? desc.value + : defaultValue; + } + } else { + return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined; + } +} + +function notEnumerableProp(obj, name, value) { + if (isPrimitive(obj)) return obj; + var descriptor = { + value: value, + configurable: true, + enumerable: false, + writable: true + }; + es5.defineProperty(obj, name, descriptor); + return obj; +} + +function thrower(r) { + throw r; +} + +var inheritedDataKeys = (function() { + var excludedPrototypes = [ + Array.prototype, + Object.prototype, + Function.prototype + ]; + + var isExcludedProto = function(val) { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (excludedPrototypes[i] === val) { + return true; + } + } + return false; + }; + + if (es5.isES5) { + var getKeys = Object.getOwnPropertyNames; + return function(obj) { + var ret = []; + var visitedKeys = Object.create(null); + while (obj != null && !isExcludedProto(obj)) { + var keys; + try { + keys = getKeys(obj); + } catch (e) { + return ret; + } + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (visitedKeys[key]) continue; + visitedKeys[key] = true; + var desc = Object.getOwnPropertyDescriptor(obj, key); + if (desc != null && desc.get == null && desc.set == null) { + ret.push(key); + } + } + obj = es5.getPrototypeOf(obj); + } + return ret; + }; + } else { + var hasProp = {}.hasOwnProperty; + return function(obj) { + if (isExcludedProto(obj)) return []; + var ret = []; + + /*jshint forin:false */ + enumeration: for (var key in obj) { + if (hasProp.call(obj, key)) { + ret.push(key); + } else { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (hasProp.call(excludedPrototypes[i], key)) { + continue enumeration; + } + } + ret.push(key); + } + } + return ret; + }; + } + +})(); + +var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/; +function isClass(fn) { + try { + if (typeof fn === "function") { + var keys = es5.names(fn.prototype); + + var hasMethods = es5.isES5 && keys.length > 1; + var hasMethodsOtherThanConstructor = keys.length > 0 && + !(keys.length === 1 && keys[0] === "constructor"); + var hasThisAssignmentAndStaticMethods = + thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0; + + if (hasMethods || hasMethodsOtherThanConstructor || + hasThisAssignmentAndStaticMethods) { + return true; + } + } + return false; + } catch (e) { + return false; + } +} + +function toFastProperties(obj) { + /*jshint -W027,-W055,-W031*/ + function FakeConstructor() {} + FakeConstructor.prototype = obj; + var receiver = new FakeConstructor(); + function ic() { + return typeof receiver.foo; + } + ic(); + ic(); + return obj; + eval(obj); +} + +var rident = /^[a-z$_][a-z$_0-9]*$/i; +function isIdentifier(str) { + return rident.test(str); +} + +function filledRange(count, prefix, suffix) { + var ret = new Array(count); + for(var i = 0; i < count; ++i) { + ret[i] = prefix + i + suffix; + } + return ret; +} + +function safeToString(obj) { + try { + return obj + ""; + } catch (e) { + return "[no string representation]"; + } +} + +function isError(obj) { + return obj instanceof Error || + (obj !== null && + typeof obj === "object" && + typeof obj.message === "string" && + typeof obj.name === "string"); +} + +function markAsOriginatingFromRejection(e) { + try { + notEnumerableProp(e, "isOperational", true); + } + catch(ignore) {} +} + +function originatesFromRejection(e) { + if (e == null) return false; + return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) || + e["isOperational"] === true); +} + +function canAttachTrace(obj) { + return isError(obj) && es5.propertyIsWritable(obj, "stack"); +} + +var ensureErrorObject = (function() { + if (!("stack" in new Error())) { + return function(value) { + if (canAttachTrace(value)) return value; + try {throw new Error(safeToString(value));} + catch(err) {return err;} + }; + } else { + return function(value) { + if (canAttachTrace(value)) return value; + return new Error(safeToString(value)); + }; + } +})(); + +function classString(obj) { + return {}.toString.call(obj); +} + +function copyDescriptors(from, to, filter) { + var keys = es5.names(from); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (filter(key)) { + try { + es5.defineProperty(to, key, es5.getDescriptor(from, key)); + } catch (ignore) {} + } + } +} + +var asArray = function(v) { + if (es5.isArray(v)) { + return v; + } + return null; +}; + +if (typeof Symbol !== "undefined" && Symbol.iterator) { + var ArrayFrom = typeof Array.from === "function" ? function(v) { + return Array.from(v); + } : function(v) { + var ret = []; + var it = v[Symbol.iterator](); + var itResult; + while (!((itResult = it.next()).done)) { + ret.push(itResult.value); + } + return ret; + }; + + asArray = function(v) { + if (es5.isArray(v)) { + return v; + } else if (v != null && typeof v[Symbol.iterator] === "function") { + return ArrayFrom(v); + } + return null; + }; +} + +var isNode = typeof process !== "undefined" && + classString(process).toLowerCase() === "[object process]"; + +var hasEnvVariables = typeof process !== "undefined" && + typeof process.env !== "undefined"; + +function env(key) { + return hasEnvVariables ? process.env[key] : undefined; +} + +function getNativePromise() { + if (typeof Promise === "function") { + try { + var promise = new Promise(function(){}); + if ({}.toString.call(promise) === "[object Promise]") { + return Promise; + } + } catch (e) {} + } +} + +function domainBind(self, cb) { + return self.bind(cb); +} + +var ret = { + isClass: isClass, + isIdentifier: isIdentifier, + inheritedDataKeys: inheritedDataKeys, + getDataPropertyOrDefault: getDataPropertyOrDefault, + thrower: thrower, + isArray: es5.isArray, + asArray: asArray, + notEnumerableProp: notEnumerableProp, + isPrimitive: isPrimitive, + isObject: isObject, + isError: isError, + canEvaluate: canEvaluate, + errorObj: errorObj, + tryCatch: tryCatch, + inherits: inherits, + withAppended: withAppended, + maybeWrapAsError: maybeWrapAsError, + toFastProperties: toFastProperties, + filledRange: filledRange, + toString: safeToString, + canAttachTrace: canAttachTrace, + ensureErrorObject: ensureErrorObject, + originatesFromRejection: originatesFromRejection, + markAsOriginatingFromRejection: markAsOriginatingFromRejection, + classString: classString, + copyDescriptors: copyDescriptors, + hasDevTools: typeof chrome !== "undefined" && chrome && + typeof chrome.loadTimes === "function", + isNode: isNode, + hasEnvVariables: hasEnvVariables, + env: env, + global: globalObject, + getNativePromise: getNativePromise, + domainBind: domainBind +}; +ret.isRecentNode = ret.isNode && (function() { + var version; + if (process.versions && process.versions.node) { + version = process.versions.node.split(".").map(Number); + } else if (process.version) { + version = process.version.split(".").map(Number); + } + return (version[0] === 0 && version[1] > 10) || (version[0] > 0); +})(); + +if (ret.isNode) ret.toFastProperties(process); + +try {throw new Error(); } catch (e) {ret.lastLineError = e;} +module.exports = ret; diff --git a/node_modules/bluebird/package.json b/node_modules/bluebird/package.json new file mode 100644 index 00000000..37a41ff7 --- /dev/null +++ b/node_modules/bluebird/package.json @@ -0,0 +1,78 @@ +{ + "name": "bluebird", + "description": "Full featured Promises/A+ implementation with exceptionally good performance", + "version": "3.5.5", + "keywords": [ + "promise", + "performance", + "promises", + "promises-a", + "promises-aplus", + "async", + "await", + "deferred", + "deferreds", + "future", + "flow control", + "dsl", + "fluent interface" + ], + "scripts": { + "lint": "node scripts/jshint.js", + "test": "node --expose-gc tools/test.js", + "istanbul": "istanbul", + "prepublish": "npm run generate-browser-core && npm run generate-browser-full", + "generate-browser-full": "node tools/build.js --no-clean --no-debug --release --browser --minify", + "generate-browser-core": "node tools/build.js --features=core --no-debug --release --zalgo --browser --minify && mv js/browser/bluebird.js js/browser/bluebird.core.js && mv js/browser/bluebird.min.js js/browser/bluebird.core.min.js" + }, + "homepage": "https://github.com/petkaantonov/bluebird", + "repository": { + "type": "git", + "url": "git://github.com/petkaantonov/bluebird.git" + }, + "bugs": { + "url": "http://github.com/petkaantonov/bluebird/issues" + }, + "license": "MIT", + "author": { + "name": "Petka Antonov", + "email": "petka_antonov@hotmail.com", + "url": "http://github.com/petkaantonov/" + }, + "devDependencies": { + "acorn": "^6.0.2", + "acorn-walk": "^6.1.0", + "baconjs": "^0.7.43", + "bluebird": "^2.9.2", + "body-parser": "^1.10.2", + "browserify": "^8.1.1", + "cli-table": "~0.3.1", + "co": "^4.2.0", + "cross-spawn": "^0.2.3", + "glob": "^4.3.2", + "grunt-saucelabs": "~8.4.1", + "highland": "^2.3.0", + "istanbul": "^0.3.5", + "jshint": "^2.6.0", + "jshint-stylish": "~0.2.0", + "kefir": "^2.4.1", + "mkdirp": "~0.5.0", + "mocha": "~2.1", + "open": "~0.0.5", + "optimist": "~0.6.1", + "rimraf": "~2.2.6", + "rx": "^2.3.25", + "serve-static": "^1.7.1", + "sinon": "~1.7.3", + "uglify-js": "~2.4.16" + }, + "readmeFilename": "README.md", + "main": "./js/release/bluebird.js", + "webpack": "./js/release/bluebird.js", + "browser": "./js/browser/bluebird.js", + "files": [ + "js/browser", + "js/release", + "LICENSE" + ] +} diff --git a/node_modules/cli-color/.editorconfig b/node_modules/cli-color/.editorconfig new file mode 100644 index 00000000..c24a6cd1 --- /dev/null +++ b/node_modules/cli-color/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = tab + +[{*.json,*.yml}] +indent_style = space +indent_size = 2 diff --git a/node_modules/cli-color/.lint b/node_modules/cli-color/.lint new file mode 100644 index 00000000..949bb158 --- /dev/null +++ b/node_modules/cli-color/.lint @@ -0,0 +1,13 @@ +@root + +module +node + +indent 2 +maxlen 100 +tabs + +ass +nomen +plusplus +vars diff --git a/node_modules/cli-color/CHANGELOG.md b/node_modules/cli-color/CHANGELOG.md new file mode 100644 index 00000000..58da3739 --- /dev/null +++ b/node_modules/cli-color/CHANGELOG.md @@ -0,0 +1,29 @@ +# Change Log + +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. + + +# [1.4.0](https://github.com/medikoo/cli-color/compare/v1.3.0...v1.4.0) (2018-10-23) + + +### Features + +* introduce move top, bottom, lineBegin and lineEnd instructions ([ad53db1](https://github.com/medikoo/cli-color/commit/ad53db1)) + + + + + +# [1.3.0](https://github.com/medikoo/cli-color/compare/v1.2.0...v1.3.0) (2018-08-20) + +### Bug Fixes + +- downgrade ansi-regex to not break support for old Node.js versions ([c4f765f](https://github.com/medikoo/cli-color/commit/c4f765f)) + +### Features + +- **colums:** support multine cells ([585fc59](https://github.com/medikoo/cli-color/commit/585fc59)) + +## Old changelog + +See `CHANGES` diff --git a/node_modules/cli-color/CHANGES b/node_modules/cli-color/CHANGES new file mode 100644 index 00000000..dc89d62d --- /dev/null +++ b/node_modules/cli-color/CHANGES @@ -0,0 +1,107 @@ +-- For new changelog see CHANGELOG.md + +v1.2.0 -- 2017.02.22 +* Improve `columns`: + * ANSI formatting instructions are not counted in calculation of column width + * Support custom 'align' per column +* Improve documentation, document `colums` utility + +v1.1.0 -- 2015.10.13 +* Add clc.slice and clc.getStrippedLength (thanks @StreetStrider) +* Add examples folder (thanks @ralphtheninja) + +v1.0.0 -- 2015.04.22 +* General modularization and files reorganization. From now on each utility is placed in individual + module, and can be required directly without others. Alternatively all modules are provided on + index module +* Support style nesting (thanks @rentalhost) +* Rename `trim` to `strip` +* Improve `strip` (previously `trim`) regex by relying on ansi-regex package +* Improve resolution of window size +* Add `columns` utility +* Add `art` utility (thanks @rentalhost) +* Add visual test (thanks @rentalhost) +* Drop support for v0.8 node +* Update lint configuration + +v0.3.3 -- 2015.03.20 +* Fix throbber tests +* Fix spelling of LICENSE +* Improve documentation +* Configure lint scripts + +v0.3.2 -- 2014.04.27 +* Fix errorneous dependency version in package.json + +v0.3.1 -- 2014.04.27 +* Update package.json to use latest 'tad' engine (fixes tests evaluation) + +v0.3.0 -- 2014.04.27 +* Move out all main modules from lib folder +* Improve `throbber` utility, so it no longer relies on `clock/lib/interval` interface + and it's easier to use on its own +* Update internals to use latest versions of dependencies +* Remove Makefile (it's cross environement package) + +v0.2.3 -- 2013.09.16 +Add `blink` + +v0.2.2 -- 2013.02.20 +* Fix trim, so it trims all kind of ANSI sequence codes correctly +* Do not rely on getWindowSize (it may not be available at all) +* Fix some xterm colors references in documentation +* Add Missing MIT licence + +v0.2.1 -- 2012.10.05 +Maintanance (Use v0.2 of memoizee) + +v0.2.0 -- 2012.09.19 +Major refactor of internal algorithm, addition of new functionalities + +Changes: +* Bright variants are now set as individual colors (not as additional + characteristics as it was in 0.1.x). We should do: clc.redBright instead of + clc.red.bright +* Removed 'gray' color, clc.blackBright has same effect and should be used + instead + +New functionalities: +* Already prepared configurations can now be extended directly, e.g.: + var error = clc.red; + var majorError = error.bold; +* 256 xTerm color support via xterm(n) and bgXterm(n) functions +* Move around functions: clc.move, clc.moveTo, clc.bol, clc.up, clc.down, clc.right and clc.left +* clc.reset - Outputs string that clears the terminal +* clc.beep +* clc.width & clc.height - Terminal characteristics properties + +v0.1.7 -- 2012.06.13 +* Update up to v0.8 branch of es5-extre +* package.json now in npm friendly format + +v0.1.6 -- 2012.01.22 +* Update dependencies to latest versions +* Travis CI support +* More reliable tests for throbber + +v0.1.5 -- 2011.12.12 +* Cleared npm warning for misnamed property in package.json + +v0.1.4 -- 2011.10.05 +* Added bright color variants + +v0.1.3 -- 2011.08.08 +* Added TAD test suite to devDependencies, configured test commands. + Tests can be run with 'make test' or 'npm test' + +v0.1.2 -- 2011.08.08 +* trim - for removing ANSI formatting from string +* throbber - displays throbber with preconfigured interval +* Compatibility with es5-ext v0.6 +* Test with TAD + +v0.1.1 -- 2011.07.12 +* Better documentation + +v0.1.0 -- 2011.07.11 +* Initial version diff --git a/node_modules/cli-color/LICENSE b/node_modules/cli-color/LICENSE new file mode 100644 index 00000000..381b09ef --- /dev/null +++ b/node_modules/cli-color/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2012-2018, Mariusz Nowak, @medikoo, medikoo.com + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/cli-color/README.md b/node_modules/cli-color/README.md new file mode 100644 index 00000000..d93406b6 --- /dev/null +++ b/node_modules/cli-color/README.md @@ -0,0 +1,738 @@ +[![*nix build status][nix-build-image]][nix-build-url] +[![Windows build status][win-build-image]][win-build-url] +![Transpilation status][transpilation-image] +[![npm version][npm-image]][npm-url] + +# cli-color + +## Yet another colors and formatting for the console solution + +Colors, formatting and other goodies for the console. This package won't mess with built-ins and provides neat way to predefine formatting patterns, see below. + +## Installation + + $ npm install cli-color + +## Usage + +Usage: + +```javascript +var clc = require("cli-color"); +``` + +Output colored text: + +```javascript +console.log(clc.red("Text in red")); +``` + +Styles can be mixed: + +```javascript +console.log(clc.red.bgWhite.underline("Underlined red text on white background.")); +``` + +Styled text can be mixed with unstyled: + +```javascript +console.log(clc.red("red") + " plain " + clc.blue("blue")); +``` + +Styled text can be nested: + +```javascript +console.log(clc.red("red " + clc.blue("blue") + " red")); +``` + +**Best way is to predefine needed stylings and then use it**: + +```javascript +var error = clc.red.bold; +var warn = clc.yellow; +var notice = clc.blue; + +console.log(error("Error!")); +console.log(warn("Warning")); +console.log(notice("Notice")); +``` + +Supported are all ANSI colors and styles: + +#### Styles + +Styles will display correctly if font used in your console supports them. + +- bold +- italic +- underline +- blink +- inverse +- strike + +#### Colors + + + + + + + + + + + + + +
ForegroundBackground
blackbgBlack
redbgRed
greenbgGreen
yellowbgYellow
bluebgBlue
magentabgMagenta
cyanbgCyan
whitebgWhite
+ +##### Bright variants + + + + + + + + + + + + + +
ForegroundBackground
blackBrightbgBlackBright
redBrightbgRedBright
greenBrightbgGreenBright
yellowBrightbgYellowBright
blueBrightbgBlueBright
magentaBrightbgMagentaBright
cyanBrightbgCyanBright
whiteBrightbgWhiteBright
+ +##### xTerm colors (256 colors table) + +**Not supported on Windows and some terminals**. However if used in not supported environment, the closest color from basic (16 colors) palette is chosen. + +Usage: + +```javascript +var msg = clc.xterm(202).bgXterm(236); +console.log(msg("Orange text on dark gray background")); +``` + +Color table: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
01234567
89101112131415
161718192021
222324252627
282930313233
343536373839
404142434445
464748495051
525354555657
585960616263
646566676869
707172737475
767778798081
828384858687
888990919293
949596979899
100101102103104105
106107108109110111
112113114115116117
118119120121122123
124125126127128129
130131132133134135
136137138139140141
142143144145146147
148149150151152153
154155156157158159
160161162163164165
166167168169170171
172173174175176177
178179180181182183
184185186187188189
190191192193194195
196197198199200201
202203204205206207
208209210211212213
214215216217218219
220221222223224225
226227228229230231
232233234235236237
238239240241242243
244245246247248249
250251252253254255
+ +#### Reset + +Terminal can be cleared with `clc.reset` + +```javascript +process.stdout.write(clc.reset); +``` + +#### Erase + +##### clc.erase.screen + +Entire screen + +```javascript +process.stdout.write(clc.erase.screen); +``` + +##### clc.erase.screenLeft + +Left portion of a screen + +```javascript +process.stdout.write(clc.erase.screenLeft); +``` + +##### clc.erase.screenRight + +Right portion of a screen + +```javascript +process.stdout.write(clc.erase.screenRight); +``` + +##### clc.erase.line + +Current line + +```javascript +process.stdout.write(clc.erase.line); +``` + +##### clc.erase.lineRight + +Right portion of current line + +```javascript +process.stdout.write(clc.erase.lineRight); +``` + +##### clc.erase.lineLeft + +Left portion of current line + +```javascript +process.stdout.write(clc.erase.lineLeft); +``` + +#### Move around functions + +##### clc.move(x, y) + +Move cursor _x_ columns and _y_ rows away. Values can be positive or negative, e.g.: + +```javascript +process.stdout.write(clc.move(-2, -2)); // Move cursors two columns and two rows back +``` + +##### clc.move.to(x, y) + +Absolute move. Sets cursor position at _x_ column and _y_ row + +```javascript +process.stdout.write(clc.move.to(0, 0)); // Move cursor to first row and first column in terminal window +``` + +##### clc.move.up(n) + +Move cursor up _n_ rows + +```javascript +process.stdout.write(clc.move.up(2)); +``` + +##### clc.move.down(n) + +Move cursor down _n_ rows + +```javascript +process.stdout.write(clc.move.down(2)); +``` + +##### clc.move.right(n) + +Move cursor right _n_ columns + +```javascript +process.stdout.write(clc.move.right(2)); +``` + +##### clc.move.left(n) + +Move cursor left _n_ columns + +```javascript +process.stdout.write(clc.move.left(2)); +``` + +##### clc.move.lines(n) + +Move cursor `n` lines forward if `n` is positive, otherwise `n` lines backward, and place it at line beginning + +```javascript +process.stdout.write(clc.move.lines(2)); +``` + +##### clc.move.top + +Move cursor to top of a screen + +```javascript +process.stdout.write(clc.move.top); +``` + +##### clc.move.bottom + +Move cursor to bottom of a screen + +```javascript +process.stdout.write(clc.move.bottom); +``` + +##### clc.move.lineBegin + +Move cursor to begin of a line + +```javascript +process.stdout.write(clc.move.lineBegin); +``` + +##### clc.move.lineEnd + +Move cursor to end of a line + +```javascript +process.stdout.write(clc.move.lineEnd); +``` + +#### Terminal characteristics + +##### clc.windowSize.width + +Returns terminal width + +##### clc.windowSize.height + +Returns terminal height + +### Additional functionalities + +#### clc.slice(str[, begin[, end]]) + +Slice provided string with preservation of eventual ANSI formatting + +```javascript +var clc = require("cli-color"); + +var str = clc.bold("foo") + "bar" + clc.red("elo"); +var sliced = clc.slice(str, 1, 7); // Same as: clc.bold('oo') + 'bar' + clc.red('e') +``` + +#### clc.strip(formatedText) + +Strips ANSI formatted string to plain text + +```javascript +var ansiStrip = require("cli-color/strip"); + +var plain = ansiStrip(formatted); +``` + +#### clc.getStrippedLength(str) + +Get actual length of ANSI-formatted string + +```javascript +var clc = require("cli-color"); + +var str = clc.bold("foo") + "bar" + clc.red("elo"); +clc.getStrippedLength(str); // 9 +``` + +#### clc.art(text, styleConf) + +Create a text-graphical art. Within `styleConf`, string replacements needs to be defined, which are then used to convert `text` to styled graphical text. + +```javascript +var text = ".........\n" + ". Hello .\n" + ".........\n"; +var style = { ".": clc.yellowBright("X") }; + +process.stdout.write(clc.art(text, style)); +``` + +#### clc.columns(data[, options]) + +Outputs aligned table of columns. + +`data` is expected to be an array (or other iterable structure) of rows, where each row is also an array (or other iterable structure) of content to display. + +Supported `options`: + +- `sep`: Custom colums separator (defaults to `|`) +- `columns`: Per column customizations, as e.g. `[{ align: 'right' }, null, { align: 'left' }]`: + - `align`: Possible options: `'left'`, `'right` (efaults to `'left'`) + +```javascript +var clc = require("cli-color"); + +process.stdout.write( + clc.columns([ + [clc.bold("First Name"), clc.bold("Last Name"), clc.bold("Age")], + ["John", "Doe", 34], + ["Martha", "Smith", 20], + ["Jan", "Kowalski", 30] + ]) +); + +/* Outputs: + +First Name | Last Name | Age +John | Doe | 34 +Martha | Smith | 20 +Jan | Kowalski | 30 +*/ +``` + +##### throbber(write, interval[, format]) + +Writes throbber string to _write_ function at given _interval_. Optionally throbber output can be formatted with given _format_ function + +```javascript +var setupThrobber = require("cli-color/throbber"); + +var throbber = setupThrobber(function(str) { + process.stdout.write(str); +}, 200); + +throbber.start(); + +// at any time you can stop/start throbber +throbber.stop(); +``` + +## Tests + + $ npm test + +## Contributors + +- [@rentalhost](https://github.com/rentalhost) (David Rodrigues) + - Help with support for nested styles. Introduction of `clc.art` module, and significant improvements to tests coverage +- [@StreetStrider](https://github.com/StreetStrider) + - Implementation of sophistcated `clc.slice` functionality, and introduction of `clc.getStrippedLength` utility + +[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/cli-color/branches/master/shields_badge.svg +[nix-build-url]: https://semaphoreci.com/medikoo-org/cli-color +[win-build-image]: https://ci.appveyor.com/api/projects/status/mnd4catkeu181ll5?svg=true +[win-build-url]: https://ci.appveyor.com/project/medikoo/cli-color +[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg +[npm-image]: https://img.shields.io/npm/v/cli-color.svg +[npm-url]: https://www.npmjs.com/package/cli-color diff --git a/node_modules/cli-color/art.js b/node_modules/cli-color/art.js new file mode 100644 index 00000000..adfac3c7 --- /dev/null +++ b/node_modules/cli-color/art.js @@ -0,0 +1,13 @@ +"use strict"; + +var object = require("es5-ext/object/valid-object") + , stringifiable = require("es5-ext/object/validate-stringifiable-value") + , forOf = require("es6-iterator/for-of"); + +module.exports = function (text, style) { + var result = ""; + text = stringifiable(text); + object(style); + forOf(text, function (char) { result += style[char] || char; }); + return result; +}; diff --git a/node_modules/cli-color/bare.js b/node_modules/cli-color/bare.js new file mode 100644 index 00000000..8b64fec1 --- /dev/null +++ b/node_modules/cli-color/bare.js @@ -0,0 +1,71 @@ +"use strict"; + +var d = require("d") + , assign = require("es5-ext/object/assign") + , forEach = require("es5-ext/object/for-each") + , map = require("es5-ext/object/map") + , primitiveSet = require("es5-ext/object/primitive-set") + , setPrototypeOf = require("es5-ext/object/set-prototype-of") + , memoize = require("memoizee") + , memoizeMethods = require("memoizee/methods") + + , sgr = require("./lib/sgr") + , mods = sgr.mods + + , join = Array.prototype.join, defineProperty = Object.defineProperty + , max = Math.max, min = Math.min + , variantModes = primitiveSet("_fg", "_bg") + , xtermMatch, getFn; + +// Some use cli-color as: console.log(clc.red('Error!')); +// Which is inefficient as on each call it configures new clc object +// with memoization we reuse once created object +var memoized = memoize(function (scope, mod) { + return defineProperty(getFn(), "_cliColorData", d(assign({}, scope._cliColorData, mod))); +}); + +var proto = Object.create(Function.prototype, assign(map(mods, function (mod) { + return d.gs(function () { return memoized(this, mod); }); +}), memoizeMethods({ + // xterm (255) color + xterm: d(function (code) { + code = isNaN(code) ? 255 : min(max(code, 0), 255); + return defineProperty(getFn(), "_cliColorData", + d(assign({}, this._cliColorData, { + _fg: [xtermMatch ? xtermMatch[code] : "38;5;" + code, 39] + }))); + }), + bgXterm: d(function (code) { + code = isNaN(code) ? 255 : min(max(code, 0), 255); + return defineProperty(getFn(), "_cliColorData", + d(assign({}, this._cliColorData, { + _bg: [xtermMatch ? xtermMatch[code] + 10 : "48;5;" + code, 49] + }))); + }) +}))); + +var getEndRe = memoize(function (code) { + return new RegExp("\x1b\\[" + code + "m", "g"); +}, { primitive: true }); + +if (process.platform === "win32") xtermMatch = require("./lib/xterm-match"); + +getFn = function () { + return setPrototypeOf(function self(/* …msg*/) { + var start = "", end = "", msg = join.call(arguments, " "), conf = self._cliColorData + , hasAnsi = sgr.hasCSI(msg); + forEach(conf, function (mod, key) { + end = sgr(mod[1]) + end; + start += sgr(mod[0]); + if (hasAnsi) { + msg = msg.replace(getEndRe(mod[1]), variantModes[key] ? sgr(mod[0]) : ""); + } + }, null, true); + return start + msg + end; + }, proto); +}; + +module.exports = Object.defineProperties(getFn(), { + xtermSupported: d(!xtermMatch), + _cliColorData: d("", {}) +}); diff --git a/node_modules/cli-color/beep.js b/node_modules/cli-color/beep.js new file mode 100644 index 00000000..403d0ea8 --- /dev/null +++ b/node_modules/cli-color/beep.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = "\x07"; diff --git a/node_modules/cli-color/bin/generate-color-images b/node_modules/cli-color/bin/generate-color-images new file mode 100755 index 00000000..c5c71973 --- /dev/null +++ b/node_modules/cli-color/bin/generate-color-images @@ -0,0 +1,18 @@ +#!/usr/bin/env node + +'use strict'; + +var uniq = require('es5-ext/array/#/uniq') + , deferred = require('deferred') + , resolve = require('path').resolve + , gm = require('gm') + , colors = require('../lib/_xterm-colors'); + +gm.prototype.pThumb = deferred.gate(deferred.promisify(gm.prototype.thumb), 50); + +deferred.map(uniq.call(colors), function (color) { + return gm('ROSE:').fill('#' + color).drawRectangle(0, 0, 100, 100) + .pThumb(1, 1, resolve(__dirname, color + '.png'), 80).aside(function () { + console.log('Done: ' + color); + }); +}).done(); diff --git a/node_modules/cli-color/columns.js b/node_modules/cli-color/columns.js new file mode 100644 index 00000000..d1f020c1 --- /dev/null +++ b/node_modules/cli-color/columns.js @@ -0,0 +1,56 @@ +"use strict"; + +var generate = require("es5-ext/array/generate") + , from = require("es5-ext/array/from") + , iterable = require("es5-ext/iterable/validate-object") + , isValue = require("es5-ext/object/is-value") + , stringifiable = require("es5-ext/object/validate-stringifiable") + , repeat = require("es5-ext/string/#/repeat") + , getStrippedLength = require("./get-stripped-length"); + +var push = Array.prototype.push; + +module.exports = function (inputRows/*, options*/) { + var options = Object(arguments[1]) + , colsMeta = [] + , colsOptions = options.columns || [] + , rows = []; + + from(iterable(inputRows), function (row) { + var rowRows = [[]]; + from(iterable(row), function (cellStr, columnIndex) { + var cellRows = stringifiable(cellStr).split("\n"); + while (cellRows.length > rowRows.length) rowRows.push(generate(columnIndex, "")); + cellRows.forEach(function (cellRow, rowRowIndex) { + rowRows[rowRowIndex][columnIndex] = cellRow; + }); + }); + push.apply(rows, rowRows); + }); + + return ( + rows + .map(function (row) { + return from(iterable(row), function (str, index) { + var col = colsMeta[index], strLength; + if (!col) col = colsMeta[index] = { width: 0 }; + str = stringifiable(str); + strLength = getStrippedLength(str); + if (strLength > col.width) col.width = strLength; + return { str: str, length: strLength }; + }); + }) + .map(function (row) { + return row + .map(function (item, index) { + var pad, align = "left", colOptions = colsOptions && colsOptions[index]; + align = colOptions && colOptions.align === "right" ? "right" : "left"; + pad = repeat.call(" ", colsMeta[index].width - item.length); + if (align === "left") return item.str + pad; + return pad + item.str; + }) + .join(isValue(options.sep) ? options.sep : " | "); + }) + .join("\n") + "\n" + ); +}; diff --git a/node_modules/cli-color/erase.js b/node_modules/cli-color/erase.js new file mode 100644 index 00000000..0808b625 --- /dev/null +++ b/node_modules/cli-color/erase.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = { + screen: "\x1b[2J", + screenLeft: "\x1b[1J", + screenRight: "\x1b[J", + line: "\x1b[2K", + lineLeft: "\x1b[1K", + lineRight: "\x1b[K" +}; diff --git a/node_modules/cli-color/examples/art.js b/node_modules/cli-color/examples/art.js new file mode 100644 index 00000000..da94aa09 --- /dev/null +++ b/node_modules/cli-color/examples/art.js @@ -0,0 +1,8 @@ +"use strict"; + +var clc = require("../"); + +var text = ".........\n. Hello .\n.........\n"; +var style = { ".": clc.yellowBright("X") }; + +process.stdout.write(clc.art(text, style)); diff --git a/node_modules/cli-color/examples/basic.js b/node_modules/cli-color/examples/basic.js new file mode 100644 index 00000000..bc469226 --- /dev/null +++ b/node_modules/cli-color/examples/basic.js @@ -0,0 +1,25 @@ +"use strict"; + +var clc = require("../"); + +console.log("Output colored text:"); +console.log(clc.red("Text in red")); + +console.log("Styles can be mixed:"); +console.log(clc.red.bgWhite.underline("Underlined red text on white background.")); + +console.log("Styled text can be mixed with unstyled:"); +console.log(clc.red("red") + " plain " + clc.blue("blue")); + +console.log("Styled text can be nested:"); +console.log(clc.red("red " + clc.blue("blue") + " red")); + +console.log("Best way is to predefine needed stylings and then use it:"); + +var error = clc.red.bold; +var warn = clc.yellow; +var notice = clc.blue; + +console.log(error("Error!")); +console.log(warn("Warning")); +console.log(notice("Notice")); diff --git a/node_modules/cli-color/examples/erase.js b/node_modules/cli-color/examples/erase.js new file mode 100644 index 00000000..a13d8306 --- /dev/null +++ b/node_modules/cli-color/examples/erase.js @@ -0,0 +1,22 @@ +"use strict"; + +var clc = require("../"); + +console.log("Erasing screen .."); + +setTimeout(function () { + process.stdout.write(clc.erase.screen); + + console.log("This a line of text that should not be cleared"); + process.stdout.write("This line will be cleared but cursor will be here ->"); + + setTimeout(function () { + process.stdout.write(clc.erase.line); + process.stdout.write("\nMoving cursor backwards and deleting (from here): to the right"); + + setTimeout(function () { + process.stdout.write(clc.move(-13, 0)); + process.stdout.write(clc.erase.lineRight); + }, 2000); + }, 2000); +}, 2000); diff --git a/node_modules/cli-color/examples/styles.js b/node_modules/cli-color/examples/styles.js new file mode 100644 index 00000000..007b8e63 --- /dev/null +++ b/node_modules/cli-color/examples/styles.js @@ -0,0 +1,10 @@ +"use strict"; + +var clc = require("../"); + +console.log(clc.bold("Bold text")); +console.log(clc.italic("Italic text")); +console.log(clc.underline("Underlined text")); +console.log(clc.blink("Blinking text (might not work for your font)")); +console.log(clc.inverse("Inverse text")); +console.log(clc.strike("Strikethrough text")); diff --git a/node_modules/cli-color/examples/throbber.js b/node_modules/cli-color/examples/throbber.js new file mode 100644 index 00000000..03a8dd55 --- /dev/null +++ b/node_modules/cli-color/examples/throbber.js @@ -0,0 +1,15 @@ +"use strict"; + +var setupThrobber = require("../throbber"); + +var throbber = setupThrobber(function (str) { + process.stdout.write(str); +}, 200); + +process.stdout.write("Throbbing for 3 seconds here -> "); +throbber.start(); + +setTimeout(function () { + console.log(); + throbber.stop(); +}, 3000); diff --git a/node_modules/cli-color/examples/xterm.js b/node_modules/cli-color/examples/xterm.js new file mode 100644 index 00000000..83eed26d --- /dev/null +++ b/node_modules/cli-color/examples/xterm.js @@ -0,0 +1,6 @@ +"use strict"; + +var clc = require("../"); + +var msg = clc.xterm(202).bgXterm(236); +console.log(msg("Orange text on dark gray background")); diff --git a/node_modules/cli-color/get-stripped-length.js b/node_modules/cli-color/get-stripped-length.js new file mode 100644 index 00000000..5d7af34a --- /dev/null +++ b/node_modules/cli-color/get-stripped-length.js @@ -0,0 +1,11 @@ +"use strict"; + +/* + * get actual length of ANSI-formatted string + */ + +var strip = require("./strip"); + +module.exports = function (str) { + return strip(str).length; +}; diff --git a/node_modules/cli-color/index.js b/node_modules/cli-color/index.js new file mode 100644 index 00000000..9943fbb5 --- /dev/null +++ b/node_modules/cli-color/index.js @@ -0,0 +1,17 @@ +"use strict"; + +var d = require("d"); + +module.exports = Object.defineProperties(require("./bare"), { + windowSize: d(require("./window-size")), + erase: d(require("./erase")), + move: d(require("./move")), + beep: d(require("./beep")), + columns: d(require("./columns")), + strip: d(require("./strip")), + getStrippedLength: d(require("./get-stripped-length")), + slice: d(require("./slice")), + throbber: d(require("./throbber")), + reset: d(require("./reset")), + art: d(require("./art")) +}); diff --git a/node_modules/cli-color/lib/sgr.js b/node_modules/cli-color/lib/sgr.js new file mode 100644 index 00000000..048c58a1 --- /dev/null +++ b/node_modules/cli-color/lib/sgr.js @@ -0,0 +1,102 @@ +"use strict"; + +/* CSI - control sequence introducer */ +/* SGR - set graphic rendition */ + +var assign = require("es5-ext/object/assign") + , includes = require("es5-ext/string/#/contains") + , forOwn = require("es5-ext/object/for-each") + , onlyKey = require("es5-ext/object/first-key") + , forEachRight = require("es5-ext/array/#/for-each-right") + , uniq = require("es5-ext/array/#/uniq.js"); + +var CSI = "\x1b["; + +var sgr = function (code) { return CSI + code + "m"; }; + +sgr.CSI = CSI; + +var mods = assign( + { + // Style + bold: { _bold: [1, 22] }, + italic: { _italic: [3, 23] }, + underline: { _underline: [4, 24] }, + blink: { _blink: [5, 25] }, + inverse: { _inverse: [7, 27] }, + strike: { _strike: [9, 29] } + + // Color + }, + ["black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"].reduce(function ( + obj, + color, + index + ) { + // foreground + obj[color] = { _fg: [30 + index, 39] }; + obj[color + "Bright"] = { _fg: [90 + index, 39] }; + + // background + obj["bg" + color[0].toUpperCase() + color.slice(1)] = { _bg: [40 + index, 49] }; + obj["bg" + color[0].toUpperCase() + color.slice(1) + "Bright"] = { _bg: [100 + index, 49] }; + + return obj; + }, {}) +); + +sgr.mods = mods; + +sgr.openers = {}; +sgr.closers = {}; + +forOwn(mods, function (mod) { + var modPair = mod[onlyKey(mod)]; + + sgr.openers[modPair[0]] = modPair; + sgr.closers[modPair[1]] = modPair; +}); + +sgr.openStyle = function (openedMods, code) { openedMods.push(sgr.openers[code]); }; + +sgr.closeStyle = function (openedMods, code) { + forEachRight.call(openedMods, function (modPair, index) { + if (modPair[1] === code) { + openedMods.splice(index, 1); + } + }); +}; + +/* prepend openers */ +sgr.prepend = function (currentMods) { + return currentMods.map(function (modPair) { return sgr(modPair[0]); }); +}; + +/* complete non-closed openers with corresponding closers */ +sgr.complete = function (openedMods, closerCodes) { + closerCodes.forEach(function (code) { sgr.closeStyle(openedMods, code); }); + + // mods must be closed from the last opened to first opened + openedMods = openedMods.reverse(); + + openedMods = openedMods.map(function (modPair) { return modPair[1]; }); + + // one closer can close many openers (31, 32 -> 39) + openedMods = uniq.call(openedMods); + + return openedMods.map(sgr); +}; + +var hasCSI = function (str) { return includes.call(str, CSI); }; + +sgr.hasCSI = hasCSI; + +var extractCode = function (csi) { + var code = csi.slice(2, -1); + code = Number(code); + return code; +}; + +sgr.extractCode = extractCode; + +module.exports = sgr; diff --git a/node_modules/cli-color/lib/xterm-colors.js b/node_modules/cli-color/lib/xterm-colors.js new file mode 100644 index 00000000..9a1b6032 --- /dev/null +++ b/node_modules/cli-color/lib/xterm-colors.js @@ -0,0 +1,53 @@ +"use strict"; + +module.exports = [ + "000000", "800000", "008000", "808000", "000080", "800080", "008080", "c0c0c0", + "808080", "ff0000", "00ff00", "ffff00", "0000ff", "ff00ff", "00ffff", "ffffff", + + "000000", "00005f", "000087", "0000af", "0000d7", "0000ff", + "005f00", "005f5f", "005f87", "005faf", "005fd7", "005fff", + "008700", "00875f", "008787", "0087af", "0087d7", "0087ff", + "00af00", "00af5f", "00af87", "00afaf", "00afd7", "00afff", + "00d700", "00d75f", "00d787", "00d7af", "00d7d7", "00d7ff", + "00ff00", "00ff5f", "00ff87", "00ffaf", "00ffd7", "00ffff", + + "5f0000", "5f005f", "5f0087", "5f00af", "5f00d7", "5f00ff", + "5f5f00", "5f5f5f", "5f5f87", "5f5faf", "5f5fd7", "5f5fff", + "5f8700", "5f875f", "5f8787", "5f87af", "5f87d7", "5f87ff", + "5faf00", "5faf5f", "5faf87", "5fafaf", "5fafd7", "5fafff", + "5fd700", "5fd75f", "5fd787", "5fd7af", "5fd7d7", "5fd7ff", + "5fff00", "5fff5f", "5fff87", "5fffaf", "5fffd7", "5fffff", + + "870000", "87005f", "870087", "8700af", "8700d7", "8700ff", + "875f00", "875f5f", "875f87", "875faf", "875fd7", "875fff", + "878700", "87875f", "878787", "8787af", "8787d7", "8787ff", + "87af00", "87af5f", "87af87", "87afaf", "87afd7", "87afff", + "87d700", "87d75f", "87d787", "87d7af", "87d7d7", "87d7ff", + "87ff00", "87ff5f", "87ff87", "87ffaf", "87ffd7", "87ffff", + + "af0000", "af005f", "af0087", "af00af", "af00d7", "af00ff", + "af5f00", "af5f5f", "af5f87", "af5faf", "af5fd7", "af5fff", + "af8700", "af875f", "af8787", "af87af", "af87d7", "af87ff", + "afaf00", "afaf5f", "afaf87", "afafaf", "afafd7", "afafff", + "afd700", "afd75f", "afd787", "afd7af", "afd7d7", "afd7ff", + "afff00", "afff5f", "afff87", "afffaf", "afffd7", "afffff", + + "d70000", "d7005f", "d70087", "d700af", "d700d7", "d700ff", + "d75f00", "d75f5f", "d75f87", "d75faf", "d75fd7", "d75fff", + "d78700", "d7875f", "d78787", "d787af", "d787d7", "d787ff", + "d7af00", "d7af5f", "d7af87", "d7afaf", "d7afd7", "d7afff", + "d7d700", "d7d75f", "d7d787", "d7d7af", "d7d7d7", "d7d7ff", + "d7ff00", "d7ff5f", "d7ff87", "d7ffaf", "d7ffd7", "d7ffff", + + "ff0000", "ff005f", "ff0087", "ff00af", "ff00d7", "ff00ff", + "ff5f00", "ff5f5f", "ff5f87", "ff5faf", "ff5fd7", "ff5fff", + "ff8700", "ff875f", "ff8787", "ff87af", "ff87d7", "ff87ff", + "ffaf00", "ffaf5f", "ffaf87", "ffafaf", "ffafd7", "ffafff", + "ffd700", "ffd75f", "ffd787", "ffd7af", "ffd7d7", "ffd7ff", + "ffff00", "ffff5f", "ffff87", "ffffaf", "ffffd7", "ffffff", + + "080808", "121212", "1c1c1c", "262626", "303030", "3a3a3a", + "444444", "4e4e4e", "585858", "626262", "6c6c6c", "767676", + "808080", "8a8a8a", "949494", "9e9e9e", "a8a8a8", "b2b2b2", + "bcbcbc", "c6c6c6", "d0d0d0", "dadada", "e4e4e4", "eeeeee" +]; diff --git a/node_modules/cli-color/lib/xterm-match.js b/node_modules/cli-color/lib/xterm-match.js new file mode 100644 index 00000000..a6daa441 --- /dev/null +++ b/node_modules/cli-color/lib/xterm-match.js @@ -0,0 +1,52 @@ +"use strict"; + +var push = Array.prototype.push + , reduce = Array.prototype.reduce + , abs = Math.abs + , colors + , match + , result + , i; + +colors = require("./xterm-colors").map(function (color) { + return { + r: parseInt(color.slice(0, 2), 16), + g: parseInt(color.slice(2, 4), 16), + b: parseInt(color.slice(4), 16) + }; +}); + +match = colors.slice(0, 16); + +module.exports = result = []; + +i = 0; +while (i < 8) { + result.push(30 + i++); +} +i = 0; +while (i < 8) { + result.push(90 + i++); +} +push.apply( + result, + colors.slice(16).map(function (data) { + var index, diff = Infinity; + match.every(function (innerMatch, currentIndex) { + var ndiff = reduce.call( + "rgb", + function (currentDiff, channel) { + currentDiff += abs(innerMatch[channel] - data[channel]); + return currentDiff; + }, + 0 + ); + if (ndiff < diff) { + index = currentIndex; + diff = ndiff; + } + return ndiff; + }); + return result[index]; + }) +); diff --git a/node_modules/cli-color/move.js b/node_modules/cli-color/move.js new file mode 100644 index 00000000..d0621b64 --- /dev/null +++ b/node_modules/cli-color/move.js @@ -0,0 +1,43 @@ +"use strict"; + +var d = require("d") + , trunc = require("es5-ext/math/trunc"); + +var up, down, right, left, abs = Math.abs, floor = Math.floor, max = Math.max; + +var getMove = function (control) { + return function (num) { + num = isNaN(num) ? 0 : max(floor(num), 0); + return num ? "\x1b[" + num + control : ""; + }; +}; + +module.exports = Object.defineProperties( + function (x, y) { + x = isNaN(x) ? 0 : floor(x); + y = isNaN(y) ? 0 : floor(y); + return (x > 0 ? right(x) : left(-x)) + (y > 0 ? down(y) : up(-y)); + }, + { + up: d((up = getMove("A"))), + down: d((down = getMove("B"))), + right: d((right = getMove("C"))), + left: d((left = getMove("D"))), + to: d(function (x, y) { + x = isNaN(x) ? 1 : max(floor(x), 0) + 1; + y = isNaN(y) ? 1 : max(floor(y), 0) + 1; + return "\x1b[" + y + ";" + x + "H"; + }), + lines: d(function (n) { + var dir; + n = trunc(n) || 0; + dir = n >= 0 ? "E" : "F"; + n = floor(abs(n)); + return "\x1b[" + n + dir; + }), + top: d("\x1b[5000F"), + bottom: d("\x1b[5000B"), + lineBegin: d("\x1b[5000D"), + lineEnd: d("\x1b[5000C") + } +); diff --git a/node_modules/cli-color/package.json b/node_modules/cli-color/package.json new file mode 100644 index 00000000..5b21c2d2 --- /dev/null +++ b/node_modules/cli-color/package.json @@ -0,0 +1,57 @@ +{ + "name": "cli-color", + "version": "1.4.0", + "description": "Colors, formatting and other tools for the console", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "ansi", + "color", + "console", + "terminal", + "cli", + "shell", + "log", + "logging", + "xterm" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/cli-color.git" + }, + "dependencies": { + "ansi-regex": "^2.1.1", + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.14", + "timers-ext": "^0.1.5" + }, + "devDependencies": { + "eslint": "^5.4", + "eslint-config-medikoo-es5": "^1.6.1", + "tad": "^0.2.7" + }, + "eslintConfig": { + "extends": "medikoo-es5", + "root": true, + "env": { + "node": true + }, + "rules": { + "id-length": "off" + }, + "overrides": [ + { + "files": "examples/**", + "rules": { + "no-console": "off" + } + } + ] + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "test": "node ./node_modules/tad/bin/tad" + }, + "license": "ISC" +} diff --git a/node_modules/cli-color/reset.js b/node_modules/cli-color/reset.js new file mode 100644 index 00000000..0b8b7014 --- /dev/null +++ b/node_modules/cli-color/reset.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = "\x1b[2J\x1b[0;0H"; diff --git a/node_modules/cli-color/slice.js b/node_modules/cli-color/slice.js new file mode 100644 index 00000000..93c02d0b --- /dev/null +++ b/node_modules/cli-color/slice.js @@ -0,0 +1,141 @@ +"use strict"; + +var reAnsi = require("ansi-regex") + , stringifiable = require("es5-ext/object/validate-stringifiable-value") + , length = require("./get-stripped-length") + , sgr = require("./lib/sgr") + , max = Math.max; + +var Token = function (token) { this.token = token; }; + +var tokenize = function (str) { + var match = reAnsi().exec(str); + + if (!match) { + return [str]; + } + + var index = match.index, head, prehead, tail; + + if (index === 0) { + head = match[0]; + tail = str.slice(head.length); + + return [new Token(head)].concat(tokenize(tail)); + } + + prehead = str.slice(0, index); + head = match[0]; + tail = str.slice(index + head.length); + + return [prehead, new Token(head)].concat(tokenize(tail)); +}; + +var isChunkInSlice = function (chunk, index, begin, end) { + var endIndex = chunk.length + index; + + if (begin > endIndex) return false; + if (end < index) return false; + return true; +}; + +// eslint-disable-next-line max-lines-per-function +var sliceSeq = function (seq, begin, end) { + var sliced = seq.reduce( + function (state, chunk) { + var index = state.index; + + if (chunk instanceof Token) { + var code = sgr.extractCode(chunk.token); + + if (index <= begin) { + if (code in sgr.openers) { + sgr.openStyle(state.preOpeners, code); + } + if (code in sgr.closers) { + sgr.closeStyle(state.preOpeners, code); + } + } else if (index < end) { + if (code in sgr.openers) { + sgr.openStyle(state.inOpeners, code); + state.seq.push(chunk); + } else if (code in sgr.closers) { + state.inClosers.push(code); + state.seq.push(chunk); + } + } + } else { + var nextChunk = ""; + + if (isChunkInSlice(chunk, index, begin, end)) { + var relBegin = Math.max(begin - index, 0) + , relEnd = Math.min(end - index, chunk.length); + + nextChunk = chunk.slice(relBegin, relEnd); + } + + state.seq.push(nextChunk); + state.index = index + chunk.length; + } + + return state; + }, + { + index: 0, + seq: [], + + // preOpeners -> [ mod ] + // preOpeners must be prepended to the slice if they wasn't closed til the end of it + // preOpeners must be closed if they wasn't closed til the end of the slice + preOpeners: [], + + // inOpeners -> [ mod ] + // inOpeners already in the slice and must not be prepended to the slice + // inOpeners must be closed if they wasn't closed til the end of the slice + inOpeners: [], // opener CSI inside slice + + // inClosers -> [ code ] + // closer CSIs for determining which pre/in-Openers must be closed + inClosers: [] + } + ); + + sliced.seq = [].concat( + sgr.prepend(sliced.preOpeners), sliced.seq, + sgr.complete([].concat(sliced.preOpeners, sliced.inOpeners), sliced.inClosers) + ); + + return sliced.seq; +}; + +module.exports = function (str/*, begin, end*/) { + var seq, begin = Number(arguments[1]), end = Number(arguments[2]), len; + + str = stringifiable(str); + len = length(str); + + if (isNaN(begin)) { + begin = 0; + } + if (isNaN(end)) { + end = len; + } + if (begin < 0) { + begin = max(len + begin, 0); + } + if (end < 0) { + end = max(len + end, 0); + } + + seq = tokenize(str); + seq = sliceSeq(seq, begin, end); + return seq + .map(function (chunk) { + if (chunk instanceof Token) { + return chunk.token; + } + + return chunk; + }) + .join(""); +}; diff --git a/node_modules/cli-color/strip.js b/node_modules/cli-color/strip.js new file mode 100644 index 00000000..a4294722 --- /dev/null +++ b/node_modules/cli-color/strip.js @@ -0,0 +1,8 @@ +// Strip ANSI formatting from string + +"use strict"; + +var stringifiable = require("es5-ext/object/validate-stringifiable") + , r = require("ansi-regex")(); + +module.exports = function (str) { return stringifiable(str).replace(r, ""); }; diff --git a/node_modules/cli-color/test/__playground/throbber.formatted.js b/node_modules/cli-color/test/__playground/throbber.formatted.js new file mode 100755 index 00000000..1e2d5f25 --- /dev/null +++ b/node_modules/cli-color/test/__playground/throbber.formatted.js @@ -0,0 +1,12 @@ +#!/usr/bin/env node + +"use strict"; + +var setupThrobber = require("../../throbber") + , format = require("../../index").red + + , throbber = setupThrobber(process.stdout.write.bind(process.stdout), 200, format); + +process.stdout.write("START"); +throbber.start(); +setTimeout(throbber.stop, 1100); diff --git a/node_modules/cli-color/test/__playground/throbber.js b/node_modules/cli-color/test/__playground/throbber.js new file mode 100755 index 00000000..5c74602b --- /dev/null +++ b/node_modules/cli-color/test/__playground/throbber.js @@ -0,0 +1,11 @@ +#!/usr/bin/env node + +"use strict"; + +var setupThrobber = require("../../throbber") + + , throbber = setupThrobber(process.stdout.write.bind(process.stdout), 200); + +process.stdout.write("START"); +throbber.start(); +setTimeout(throbber.stop, 1100); diff --git a/node_modules/cli-color/test/art.js b/node_modules/cli-color/test/art.js new file mode 100644 index 00000000..2046f9e5 --- /dev/null +++ b/node_modules/cli-color/test/art.js @@ -0,0 +1,28 @@ +"use strict"; + +var clc = require("../"); + +module.exports = function (t, a) { + a(t("ooo", { o: clc.yellow("x") }), + "\x1b[33mx\x1b[39m\x1b[33mx\x1b[39m\x1b[33mx\x1b[39m", + "Basic art"); + + a(t("oyo", { o: clc.yellow("x") }), + "\x1b[33mx\x1b[39my\x1b[33mx\x1b[39m", + "Free text art"); + a(t("o o", { o: clc.yellow("x") }), + "\x1b[33mx\x1b[39m \x1b[33mx\x1b[39m", + "Spaced art"); + + a(t("<=>", { "<": clc.yellow("<"), ">": clc.yellow(">") }), + "\x1b[33m<\x1b[39m=\x1b[33m>\x1b[39m", + "Symbol art"); + + a(t("o\no", { o: clc.yellow("x") }), + "\x1b[33mx\x1b[39m\n\x1b[33mx\x1b[39m", + "Multiline art"); + + a(t("ooo", {}), + "ooo", + "Only text art"); +}; diff --git a/node_modules/cli-color/test/bare.js b/node_modules/cli-color/test/bare.js new file mode 100644 index 00000000..febb60bf --- /dev/null +++ b/node_modules/cli-color/test/bare.js @@ -0,0 +1,284 @@ +"use strict"; + +module.exports = function (t, a) { + var x, y; + + a(t("test"), "test", "Plain"); + a(t("test", "foo", 3, { toString: function () { return "bar"; } }), + "test foo 3 bar", "Plain: Many args"); + + a(t.red("foo"), "\x1b[31mfoo\x1b[39m", "Foreground"); + a(t.red("foo", "bar", 3), "\x1b[31mfoo bar 3\x1b[39m", + "Foreground: Many args"); + a(t.red.yellow("foo", "bar", 3), "\x1b[33mfoo bar 3\x1b[39m", + "Foreground: Overriden"); + a(t.bgRed("foo", "bar"), "\x1b[41mfoo bar\x1b[49m", "Background"); + a(t.bgRed.bgYellow("foo", "bar", 3), "\x1b[43mfoo bar 3\x1b[49m", + "Background: Overriden"); + + a(t.blue.bgYellow("foo", "bar"), "\x1b[43m\x1b[34mfoo bar\x1b[39m\x1b[49m", + "Foreground & Background"); + a(t.blue.bgYellow.red.bgMagenta("foo", "bar"), + "\x1b[45m\x1b[31mfoo bar\x1b[39m\x1b[49m", + "Foreground & Background: Overriden"); + + a(t.bold("foo", "bar"), "\x1b[1mfoo bar\x1b[22m", "Format"); + a(t.blink("foobar"), "\x1b[5mfoobar\x1b[25m", "Format: blink"); + a(t.bold.blue("foo", "bar", 3), "\x1b[1m\x1b[34mfoo bar 3\x1b[39m\x1b[22m", + "Foreground & Format"); + + a(t.redBright("foo", "bar"), "\x1b[91mfoo bar\x1b[39m", "Bright"); + a(t.bgRedBright("foo", 3), "\x1b[101mfoo 3\x1b[49m", "Bright background"); + + a(t.blueBright.bgYellowBright.red.bgMagenta("foo", "bar"), + "\x1b[45m\x1b[31mfoo bar\x1b[39m\x1b[49m", + "Foreground & Background: Bright: Overriden"); + + a(t.red.blue("foo"), "\x1b[34mfoo\x1b[39m", "Prioritize the Last Color: Blue"); + a(t.blue.red("foo"), "\x1b[31mfoo\x1b[39m", "Prioritize the Last Color: Red"); + a(t.bgRed.bgBlue("foo"), "\x1b[44mfoo\x1b[49m", "Prioritize the Last Background Color: Blue"); + a(t.bgBlue.bgRed("foo"), "\x1b[41mfoo\x1b[49m", "Prioritize the Last Background Color: Red"); + a(t.bgRed.red.bgBlue.blue("foo"), + "\x1b[44m\x1b[34mfoo\x1b[39m\x1b[49m", + "Prioritize the Last Mixed Style: Blue"); + a(t.bgBlue.blue.bgRed.red("foo"), + "\x1b[41m\x1b[31mfoo\x1b[39m\x1b[49m", + "Prioritize the Last Mixed Style: Red"); + a(t.bgRed.blue.bgBlue.red("foo"), + "\x1b[44m\x1b[31mfoo\x1b[39m\x1b[49m", + "Prioritize the Last Mixed Style: BG Blue and Red"); + a(t.bgBlue.red.bgRed.blue("foo"), + "\x1b[41m\x1b[34mfoo\x1b[39m\x1b[49m", + "Prioritize the Last Mixed Style: BG Red and Blue"); + + a(t.bold("bold " + t.whiteBright("whiteBright ") + "bold"), + "\x1b[1mbold \x1b[97mwhiteBright \x1b[39mbold\x1b[22m", + "Nested Format: Bold Type 1"); + a(t.white("white " + t.bold("bold ") + "white"), + "\x1b[37mwhite \x1b[1mbold \x1b[22mwhite\x1b[39m", + "Nested Format: Bold Type 2"); + + a(t.italic("italic " + t.whiteBright("whiteBright ") + "italic"), + "\x1b[3mitalic \x1b[97mwhiteBright \x1b[39mitalic\x1b[23m", + "Nested Format: Italic"); + a(t.white("white " + t.italic("italic ") + "white"), + "\x1b[37mwhite \x1b[3mitalic \x1b[23mwhite\x1b[39m", + "Nested Format: Italic Type 2"); + + a(t.underline("underline " + t.whiteBright("whiteBright ") + "underline"), + "\x1b[4munderline \x1b[97mwhiteBright \x1b[39munderline\x1b[24m", + "Nested Format: Underline"); + a(t.white("white " + t.underline("underline ") + "white"), + "\x1b[37mwhite \x1b[4munderline \x1b[24mwhite\x1b[39m", + "Nested Format: Underline Type 2"); + + a(t.blink("blink " + t.whiteBright("whiteBright ") + "blink"), + "\x1b[5mblink \x1b[97mwhiteBright \x1b[39mblink\x1b[25m", + "Nested Format: Blink"); + a(t.white("white " + t.blink("blink ") + "white"), + "\x1b[37mwhite \x1b[5mblink \x1b[25mwhite\x1b[39m", + "Nested Format: Blink Type 2"); + + a(t.inverse("inverse " + t.whiteBright("whiteBright ") + "inverse"), + "\x1b[7minverse \x1b[97mwhiteBright \x1b[39minverse\x1b[27m", + "Nested Format: Inverse"); + a(t.white("white " + t.inverse("inverse ") + "white"), + "\x1b[37mwhite \x1b[7minverse \x1b[27mwhite\x1b[39m", + "Nested Format: Inverse Type 2"); + + a(t.strike("strike " + t.whiteBright("whiteBright ") + "strike"), + "\x1b[9mstrike \x1b[97mwhiteBright \x1b[39mstrike\x1b[29m", + "Nested Format: Strike"); + a(t.white("white " + t.strike("strike ") + "white"), + "\x1b[37mwhite \x1b[9mstrike \x1b[29mwhite\x1b[39m", + "Nested Format: Strike Type 2"); + + a(t.red("red " + t.blue("blue ")), + "\x1b[31mred \x1b[34mblue \x1b[31m\x1b[39m", + "Nested Foreground: Two Levels Type 1"); + a(t.red(t.blue("blue ") + "red"), + "\x1b[31m\x1b[34mblue \x1b[31mred\x1b[39m", + "Nested Foreground: Two Levels Type 2"); + a(t.red("red " + t.blue("blue ") + "red"), + "\x1b[31mred \x1b[34mblue \x1b[31mred\x1b[39m", + "Nested Foreground: Two Levels Type 3"); + + a(t.red("red " + t.blue("blue " + t.green("green ")) + "red"), + "\x1b[31mred \x1b[34mblue \x1b[32mgreen \x1b[34m\x1b[31mred\x1b[39m", + "Nested Foreground: Three Levels Type 1"); + a(t.red("red " + t.blue("blue " + t.green("green ") + "blue ") + "red"), + "\x1b[31mred \x1b[34mblue \x1b[32mgreen \x1b[34mblue \x1b[31mred\x1b[39m", + "Nested Foreground: Three Levels Type 2"); + a(t.red("red " + t.blue("blue " + t.green("green ")) + t.green("green ") + "red"), + "\x1b[31mred \x1b[34mblue \x1b[32mgreen \x1b[34m" + + "\x1b[31m\x1b[32mgreen \x1b[31mred\x1b[39m", + "Nested Foreground: Three Levels Type 3"); + a(t.red("red " + t.blue("blue " + t.green("green ") + t.yellow("yellow ")) + "red"), + "\x1b[31mred \x1b[34mblue \x1b[32mgreen \x1b[34m" + + "\x1b[33myellow \x1b[34m\x1b[31mred\x1b[39m", + "Nested Foreground: Three Levels Type 4"); + a(t.red("red " + t.blue("blue " + t.green("green ") + "blue " + t.yellow("yellow ")) + "red"), + "\x1b[31mred \x1b[34mblue \x1b[32mgreen \x1b[34mblue \x1b[33myellow " + + "\x1b[34m\x1b[31mred\x1b[39m", "Nested Foreground: Three Levels Type 5"); + + a(t.red("red " + t.blue("blue " + t.green("green " + t.yellow("yellow ") + "green ")) + "red"), + "\x1b[31mred \x1b[34mblue \x1b[32mgreen \x1b[33myellow \x1b[32mgreen " + + "\x1b[34m\x1b[31mred\x1b[39m", "Nested Foreground: Four Levels"); + + a(t.red("\x1bAred"), + "\x1b[31m\x1bAred\x1b[39m", + "Nested Foreground: Trap Type 1 - Not a Style Before"); + a(t.red("red\x1bA"), + "\x1b[31mred\x1bA\x1b[39m", + "Nested Foreground: Trap Type 2 - Not a Style After"); + a(t.red("\x1bAred\x1bA"), + "\x1b[31m\x1bAred\x1bA\x1b[39m", + "Nested Foreground: Trap Type 3 - Not a Style Around"); + a(t.red("\x1b34m\x1b39m"), + "\x1b[31m\x1b34m\x1b39m\x1b[39m", + "Nested Foreground: Trap Type 4 - Not a Valid Style"); + a(t.red("\x1b[34m\x1b[39m"), + "\x1b[31m\x1b[34m\x1b[31m\x1b[39m", + "Nested Foreground: Trap Type 5 - No Message Style"); + a(t.red("\x1b[34m\x1b[39m\x1b[34mblue\x1b[39m"), + "\x1b[31m\x1b[34m\x1b[31m\x1b[34mblue\x1b[31m\x1b[39m", + "Nested Foreground: Trap Type 6 - No Message Style Before"); + a(t.red("\x1b[34mblue\x1b[39m\x1b[34m\x1b[39m"), + "\x1b[31m\x1b[34mblue\x1b[31m\x1b[34m\x1b[31m\x1b[39m", + "Nested Foreground: Trap Type 7 - No Message Style After"); + a(t.red("\x1b[34m\x1b[39m\x1b[34mblue\x1b[39m\x1b[34m\x1b[39m"), + "\x1b[31m\x1b[34m\x1b[31m\x1b[34mblue\x1b[31m\x1b[34m\x1b[31m\x1b[39m", + "Nested Foreground: Trap Type 8 - No Message Style Around"); + + a(t.bgRed("red " + t.bgBlue("blue ")), + "\x1b[41mred \x1b[44mblue \x1b[41m\x1b[49m", + "Nested Background: Two Levels Type 1"); + a(t.bgRed(t.bgBlue("blue ") + "red"), + "\x1b[41m\x1b[44mblue \x1b[41mred\x1b[49m", + "Nested Background: Two Levels Type 2"); + a(t.bgRed("red " + t.bgBlue("blue ") + "red"), + "\x1b[41mred \x1b[44mblue \x1b[41mred\x1b[49m", + "Nested Background: Two Levels Type 3"); + + a(t.bgRed("red " + t.bgBlue("blue " + t.bgGreen("green ")) + "red"), + "\x1b[41mred \x1b[44mblue \x1b[42mgreen \x1b[44m\x1b[41mred\x1b[49m", + "Nested Background: Three Levels Type 1"); + a(t.bgRed("red " + t.bgBlue("blue " + t.bgGreen("green ") + "blue ") + "red"), + "\x1b[41mred \x1b[44mblue \x1b[42mgreen \x1b[44mblue \x1b[41mred\x1b[49m", + "Nested Background: Three Levels Type 2"); + a(t.bgRed("red " + t.bgBlue("blue " + t.bgGreen("green ")) + t.bgGreen("green ") + "red"), + "\x1b[41mred \x1b[44mblue \x1b[42mgreen \x1b[44m" + + "\x1b[41m\x1b[42mgreen \x1b[41mred\x1b[49m", + "Nested Background: Three Levels Type 3"); + a(t.bgRed("red " + t.bgBlue("blue " + t.bgGreen("green ") + t.bgYellow("yellow ")) + "red"), + "\x1b[41mred \x1b[44mblue \x1b[42mgreen \x1b[44m" + + "\x1b[43myellow \x1b[44m\x1b[41mred\x1b[49m", + "Nested Background: Three Levels Type 4"); + a(t.bgRed("red " + t.bgBlue("blue " + t.bgGreen("green ") + "blue " + + t.bgYellow("yellow ")) + "red"), + "\x1b[41mred \x1b[44mblue \x1b[42mgreen \x1b[44mblue \x1b[43myellow " + + "\x1b[44m\x1b[41mred\x1b[49m", "Nested Background: Three Levels Type 5"); + + a(t.bgRed("red " + t.bgBlue("blue " + t.bgGreen("green " + + t.bgYellow("yellow ") + "green ")) + "red"), + "\x1b[41mred \x1b[44mblue \x1b[42mgreen \x1b[43myellow \x1b[42mgreen " + + "\x1b[44m\x1b[41mred\x1b[49m", "Nested Background: Four Levels"); + + a(t.bgRed("\x1bAred"), + "\x1b[41m\x1bAred\x1b[49m", + "Nested Background: Trap Type 1 - Not a Style Before"); + a(t.bgRed("red\x1bA"), + "\x1b[41mred\x1bA\x1b[49m", + "Nested Background: Trap Type 2 - Not a Style After"); + a(t.bgRed("\x1bAred\x1bA"), + "\x1b[41m\x1bAred\x1bA\x1b[49m", + "Nested Background: Trap Type 3 - Not a Style Around"); + a(t.bgRed("\x1b44m\x1b39m"), + "\x1b[41m\x1b44m\x1b39m\x1b[49m", + "Nested Background: Trap Type 4 - Not a Valid Style"); + a(t.bgRed("\x1b[44m\x1b[49m"), + "\x1b[41m\x1b[44m\x1b[41m\x1b[49m", + "Nested Background: Trap Type 5 - No Message Style"); + a(t.bgRed("\x1b[44m\x1b[49m\x1b[44mblue\x1b[49m"), + "\x1b[41m\x1b[44m\x1b[41m\x1b[44mblue\x1b[41m\x1b[49m", + "Nested Background: Trap Type 6 - No Message Style Before"); + a(t.bgRed("\x1b[44mblue\x1b[49m\x1b[44m\x1b[49m"), + "\x1b[41m\x1b[44mblue\x1b[41m\x1b[44m\x1b[41m\x1b[49m", + "Nested Background: Trap Type 7 - No Message Style After"); + a(t.bgRed("\x1b[44m\x1b[49m\x1b[44mblue\x1b[49m\x1b[44m\x1b[49m"), + "\x1b[41m\x1b[44m\x1b[41m\x1b[44mblue\x1b[41m\x1b[44m\x1b[41m\x1b[49m", + "Nested Background: Trap Type 8 - No Message Style Around"); + + a(t.red("red " + t.bgBlue("blue ")), + "\x1b[31mred \x1b[44mblue \x1b[49m\x1b[39m", + "Nested Foreground and Background: Two Levels Type 1"); + a(t.red("red " + t.bgBlue("blue ") + t.white("white")), + "\x1b[31mred \x1b[44mblue \x1b[49m\x1b[37mwhite\x1b[31m\x1b[39m", + "Nested Foreground and Background: Two Levels Type 2"); + a(t.red("red " + t.bgBlue("blue ") + "red"), + "\x1b[31mred \x1b[44mblue \x1b[49mred\x1b[39m", + "Nested Foreground and Background: Two Levels Type 3"); + a(t.bgBlue("blue " + t.bgRed("red " + t.whiteBright("white ") + "red ") + "blue"), + "\x1b[44mblue \x1b[41mred \x1b[97mwhite \x1b[39mred \x1b[44mblue\x1b[49m", + "Nested Foreground and Background: Two Levels Type 3"); + + a(t.red.bgWhite("white " + t.bgBlue("blue")), + "\x1b[47m\x1b[31mwhite \x1b[44mblue\x1b[47m\x1b[39m\x1b[49m", + "Nested Foreground and Background: Mixed Type 1"); + a(t.red.bgWhite("white " + t.blue("blue")), + "\x1b[47m\x1b[31mwhite \x1b[34mblue\x1b[31m\x1b[39m\x1b[49m", + "Nested Foreground and Background: Mixed Type 2"); + a(t.red.bgWhite("white " + t.blue("blue ") + "white"), + "\x1b[47m\x1b[31mwhite \x1b[34mblue \x1b[31mwhite\x1b[39m\x1b[49m", + "Nested Foreground and Background: Mixed Type 3"); + + a(t.red.bgWhite("\x1bAred"), + "\x1b[47m\x1b[31m\x1bAred\x1b[39m\x1b[49m", + "Nested Foreground and Background: Trap Type 1 - Not a Style Before"); + a(t.red.bgWhite("red\x1bA"), + "\x1b[47m\x1b[31mred\x1bA\x1b[39m\x1b[49m", + "Nested Foreground and Background: Trap Type 2 - Not a Style After"); + a(t.red.bgWhite("\x1bAred\x1bA"), + "\x1b[47m\x1b[31m\x1bAred\x1bA\x1b[39m\x1b[49m", + "Nested Foreground and Background: Trap Type 3 - Not a Style Around"); + a(t.red.bgWhite("\x1b34m\x1b39m"), + "\x1b[47m\x1b[31m\x1b34m\x1b39m\x1b[39m\x1b[49m", + "Nested Foreground and Background: Trap Type 4 - Not a Valid Style"); + a(t.red.bgWhite("\x1b[34m\x1b[39m"), + "\x1b[47m\x1b[31m\x1b[34m\x1b[31m\x1b[39m\x1b[49m", + "Nested Foreground and Background: Trap Type 5 - No Message Style"); + a(t.red.bgWhite("\x1b[44m\x1b[49m"), + "\x1b[47m\x1b[31m\x1b[44m\x1b[47m\x1b[39m\x1b[49m", + "Nested Foreground and Background: Trap Type 6 - No Message Style"); + a(t.red.bgWhite("\x1b[44m\x1b[49m\x1b[44mblue\x1b[49m"), + "\x1b[47m\x1b[31m\x1b[44m\x1b[47m\x1b[44mblue\x1b[47m\x1b[39m\x1b[49m", + "Nested Foreground and Background: Trap Type 7 - No Message Style Before"); + a(t.red.bgWhite("\x1b[44mblue\x1b[49m\x1b[44m\x1b[49m"), + "\x1b[47m\x1b[31m\x1b[44mblue\x1b[47m\x1b[44m\x1b[47m\x1b[39m\x1b[49m", + "Nested Foreground and Background: Trap Type 8 - No Message Style After"); + a(t.red.bgWhite("\x1b[44m\x1b[49m\x1b[44mblue\x1b[49m\x1b[44m\x1b[49m"), + "\x1b[47m\x1b[31m\x1b[44m\x1b[47m\x1b[44mblue\x1b[47m\x1b[44m\x1b[47m\x1b[39m\x1b[49m", + "Nested Foreground and Background: Trap Type 9 - No Message Style Around"); + + x = t.red; + y = x.bold; + + a(x("foo", "red") + " " + y("foo", "boldred"), + "\x1b[31mfoo red\x1b[39m \x1b[1m\x1b[31mfoo boldred\x1b[39m\x1b[22m", + "Detached extension"); + + if (t.xtermSupported) { + a(t.xterm(12).bgXterm(67)("foo", "xterm"), + "\x1b[48;5;67m\x1b[38;5;12mfoo xterm\x1b[39m\x1b[49m", "Xterm"); + + a(t.redBright.bgBlueBright.xterm(12).bgXterm(67)("foo", "xterm"), + "\x1b[48;5;67m\x1b[38;5;12mfoo xterm\x1b[39m\x1b[49m", + "Xterm: Override & Bright"); + a(t.xterm(12).bgXterm(67).redBright.bgMagentaBright("foo", "xterm"), + "\x1b[105m\x1b[91mfoo xterm\x1b[39m\x1b[49m", + "Xterm: Override & Bright #2"); + } else { + a(t.xterm(12).bgXterm(67)("foo", "xterm"), + "\x1b[100m\x1b[94mfoo xterm\x1b[39m\x1b[49m", "Xterm"); + } +}; diff --git a/node_modules/cli-color/test/beep.js b/node_modules/cli-color/test/beep.js new file mode 100644 index 00000000..779f3a68 --- /dev/null +++ b/node_modules/cli-color/test/beep.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function (t, a) { a(t, "\x07"); }; diff --git a/node_modules/cli-color/test/columns.js b/node_modules/cli-color/test/columns.js new file mode 100644 index 00000000..a28a9b42 --- /dev/null +++ b/node_modules/cli-color/test/columns.js @@ -0,0 +1,31 @@ +"use strict"; + +module.exports = function (t, a) { + a(t([]), "\n", "Empty #1"); + a(t([[], [], []]), "\n\n\n", "Empty #2"); + + a(t([["A", "BC", "DEF"]]), "A | BC | DEF\n", "Header Only"); + + a(t([["A", "BC", "DEF"], [1, 23, 456]]), "A | BC | DEF\n1 | 23 | 456\n", "Small items"); + a( + t([["A", "BC", "DEF"], [12, 234, 4567]]), "A | BC | DEF \n12 | 234 | 4567\n", + "Large items" + ); + a( + t([["A", "BC", "DEF"], [1234, 23456, 456789]]), + "A | BC | DEF \n1234 | 23456 | 456789\n", "Very large items" + ); + + a(t([["A"], [1], [23], [456]]), "A \n1 \n23 \n456\n", "Single column"); + + a(t([["ID"], [1], [1, 23], [1, 23, 456]]), "ID\n1 \n1 | 23\n1 | 23 | 456\n", "Force columns"); + + a( + t([["ONE", "TWO", "THREE"], ["ON", "DWA\nTRZY", "DWA\nTRZY\nCZTERY"], ["HOPLA", "B", "C"]]), + "ONE | TWO | THREE \nON | DWA | DWA \n | TRZY | TRZY \n" + + " | | CZTERY\nHOPLA | B | C \n", + "Rows" + ); + + a(t([["ID"], ["", ""], [123, 123]]), "ID \n | \n123 | 123\n", "Empty cells"); +}; diff --git a/node_modules/cli-color/test/erase.js b/node_modules/cli-color/test/erase.js new file mode 100644 index 00000000..d2a0ee38 --- /dev/null +++ b/node_modules/cli-color/test/erase.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.screen, "\x1b[2J"); + a(t.line, "\x1b[2K"); +}; diff --git a/node_modules/cli-color/test/get-stripped-length.js b/node_modules/cli-color/test/get-stripped-length.js new file mode 100644 index 00000000..6e2a312b --- /dev/null +++ b/node_modules/cli-color/test/get-stripped-length.js @@ -0,0 +1,16 @@ +"use strict"; + +module.exports = function (t, a) { + var length = t; + + a(typeof length, "function"); + + a(length("ABC"), 3, "Works on plain string"); + a(length("\x1b[31mABC\x1b[39m"), 3, "Works on formatted string"); + a(length("\x1b[31mABC\x1b[39mDE"), 5, "Works on partially formatted string"); + a(length("\x1b[31mABC\x1b[39mDE"), 5, "Works on formatted string by couple of styles"); + + a(length("\x1b[31mABC\x1b[3mDE\x1b[23m\x1b[39m"), 5, "Works on nested formatted string"); + a(length("\x1b[31mAAA\x1b[32mBBB\x1b[31mAAA\x1b[39m"), 9, + "Works on nested formatted string with overlapping styles"); +}; diff --git a/node_modules/cli-color/test/index.js b/node_modules/cli-color/test/index.js new file mode 100644 index 00000000..066dad3c --- /dev/null +++ b/node_modules/cli-color/test/index.js @@ -0,0 +1,16 @@ +"use strict"; + +var bareTests = require("./bare"); + +module.exports = function (t, a) { + bareTests(t, a); + + a(typeof t.windowSize.width, "number", "Width"); + + a(t.move.up(34), "\x1b[34A", "Up: Positive"); + a(t.move(2, 35), "\x1b[2C\x1b[35B", "Move: two positives"); + + a(t.erase.screen, "\x1b[2J", "Erase"); + + a(t.beep, "\x07", "Beep"); +}; diff --git a/node_modules/cli-color/test/lib/sgr.js b/node_modules/cli-color/test/lib/sgr.js new file mode 100644 index 00000000..ebb6328b --- /dev/null +++ b/node_modules/cli-color/test/lib/sgr.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (sgr, a) { + a(sgr(31), "\x1b[31m", "sgr creates set graphic rendition CSIs #1"); + a(sgr(39), "\x1b[39m", "sgr creates set graphic rendition CSIs #2"); + + a(sgr.hasCSI("\x1b[31mA\x1b[39m"), true, "sgr.hasCSI detecs CSIs in string #1"); + a(sgr.hasCSI("\x1b[31m"), true, "sgr.hasCSI detecs CSIs in string #2"); + a(sgr.hasCSI("[31m"), false, "sgr.hasCSI detecs CSIs in string #3"); + a(sgr.hasCSI("A"), false, "sgr.hasCSI detecs CSIs in string #4"); + + a(sgr.extractCode("\x1b[31m"), 31, "sgr.extractCode extract numeric code of CSI"); + a(sgr.extractCode("\x1b[39m"), 39, "sgr.extractCode extract numeric code of CSI"); +}; diff --git a/node_modules/cli-color/test/lib/xterm-colors.js b/node_modules/cli-color/test/lib/xterm-colors.js new file mode 100644 index 00000000..0b3186b8 --- /dev/null +++ b/node_modules/cli-color/test/lib/xterm-colors.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + var re = /^[0-9a-f]{6}$/; + + a(t.length, 256, "Length"); + t.forEach(function (data, index) { + a(re.test(data), true, "In range #" + index); + }); +}; diff --git a/node_modules/cli-color/test/lib/xterm-match.js b/node_modules/cli-color/test/lib/xterm-match.js new file mode 100644 index 00000000..a2d750bc --- /dev/null +++ b/node_modules/cli-color/test/lib/xterm-match.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.length, 256, "Length"); + t.forEach(function (data, index) { + a(((data >= 30) && (data <= 37)) || ((data >= 90) && (data <= 97)), true, + "In range #" + index); + }); +}; diff --git a/node_modules/cli-color/test/move.js b/node_modules/cli-color/test/move.js new file mode 100644 index 00000000..d072b538 --- /dev/null +++ b/node_modules/cli-color/test/move.js @@ -0,0 +1,37 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.up(), "", "Up: No argument"); + a(t.up({}), "", "Up: Not a number"); + a(t.up(-34), "", "Up: Negative"); + a(t.up(34), "\x1b[34A", "Up: Positive"); + + a(t.down(), "", "Down: No argument"); + a(t.down({}), "", "Down: Not a number"); + a(t.down(-34), "", "Down: Negative"); + a(t.down(34), "\x1b[34B", "Down: Positive"); + + a(t.right(), "", "Right: No argument"); + a(t.right({}), "", "Right: Not a number"); + a(t.right(-34), "", "Right: Negative"); + a(t.right(34), "\x1b[34C", "Right: Positive"); + + a(t.left(), "", "Left: No argument"); + a(t.left({}), "", "Left: Not a number"); + a(t.left(-34), "", "Left: Negative"); + a(t.left(34), "\x1b[34D", "Left: Positive"); + + a(t(), "", "Move: No arguments"); + a(t({}, {}), "", "Move: Bad arguments"); + a(t({}, 12), "\x1b[12B", "Move: One direction"); + a(t(0, -12), "\x1b[12A", "Move: One negative direction"); + a(t(-42, -2), "\x1b[42D\x1b[2A", "Move: two negatives"); + a(t(2, 35), "\x1b[2C\x1b[35B", "Move: two positives"); + + a(t.to(), "\x1b[1;1H", "MoveTo: No arguments"); + a(t.to({}, {}), "\x1b[1;1H", "MoveTo: Bad arguments"); + a(t.to({}, 12), "\x1b[13;1H", "MoveTo: One direction"); + a(t.to(2, -12), "\x1b[1;3H", "MoveTo: One negative direction"); + a(t.to(-42, -2), "\x1b[1;1H", "MoveTo: two negatives"); + a(t.to(2, 35), "\x1b[36;3H", "MoveTo: two positives"); +}; diff --git a/node_modules/cli-color/test/reset.js b/node_modules/cli-color/test/reset.js new file mode 100644 index 00000000..57e750bf --- /dev/null +++ b/node_modules/cli-color/test/reset.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t, "string"); +}; diff --git a/node_modules/cli-color/test/slice.js b/node_modules/cli-color/test/slice.js new file mode 100644 index 00000000..9746f368 --- /dev/null +++ b/node_modules/cli-color/test/slice.js @@ -0,0 +1,144 @@ +"use strict"; + +module.exports = function (t, a) { + var slice = t; + + a(typeof slice, "function"); + + a(slice("ABCDE", 1), "BCDE", "Works on plain string"); + a(slice("ABCDE", -1), "E", "Works on plain string"); + a(slice("ABCDE", 1, 3), "BC", "Works on plain string"); + a(slice("ABCDE", -3, -1), "CD", "Works on plain string"); + + a( + slice("\x1b[31mABCDE\x1b[39m", 1), "\x1b[31mBCDE\x1b[39m", + "Works on whole single forecolor-styled string" + ); + a( + slice("\x1b[31mABCDE\x1b[39m", -1), "\x1b[31mE\x1b[39m", + "Works on whole single forecolor-styled string" + ); + a( + slice("\x1b[31mABCDE\x1b[39m", 1, 3), "\x1b[31mBC\x1b[39m", + "Works on whole single forecolor-styled string" + ); + a( + slice("\x1b[31mABCDE\x1b[39m", -3, -1), "\x1b[31mCD\x1b[39m", + "Works on whole single forecolor-styled string" + ); + + a( + slice("\x1b[41mABCDE\x1b[49m", 1), "\x1b[41mBCDE\x1b[49m", + "Works on whole single backcolor-styled string" + ); + a( + slice("\x1b[41mABCDE\x1b[49m", -1), "\x1b[41mE\x1b[49m", + "Works on whole single backcolor-styled string" + ); + a( + slice("\x1b[41mABCDE\x1b[49m", 1, 3), "\x1b[41mBC\x1b[49m", + "Works on whole single backcolor-styled string" + ); + a( + slice("\x1b[41mABCDE\x1b[49m", -3, -1), "\x1b[41mCD\x1b[49m", + "Works on whole single backcolor-styled string" + ); + + a( + slice("ABC\x1b[31mDEF\x1b[39m", 0, 5), "ABC\x1b[31mDE\x1b[39m", + "Save styles when chopping part of the forecolor-styled string" + ); + a( + slice("ABC\x1b[31mDEF\x1b[39m", 1, 4), "BC\x1b[31mD\x1b[39m", + "Save styles when chopping part of the forecolor-styled string" + ); + a( + slice("ABC\x1b[31mDEF\x1b[39m", 1, 6), "BC\x1b[31mDEF\x1b[39m", + "Save styles when chopping part of the forecolor-styled string" + ); + a( + slice("ABC\x1b[31mDEF\x1b[39m", -5, -1), "BC\x1b[31mDE\x1b[39m", + "Save styles when chopping part of the forecolor-styled string" + ); + + a( + slice("ABC\x1b[41mDEF\x1b[49m", 0, 5), "ABC\x1b[41mDE\x1b[49m", + "Save styles when chopping part of the backcolor-styled string" + ); + a( + slice("ABC\x1b[41mDEF\x1b[49m", 1, 4), "BC\x1b[41mD\x1b[49m", + "Save styles when chopping part of the backcolor-styled string" + ); + a( + slice("ABC\x1b[41mDEF\x1b[49m", 1, 6), "BC\x1b[41mDEF\x1b[49m", + "Save styles when chopping part of the backcolor-styled string" + ); + a( + slice("ABC\x1b[41mDEF\x1b[49m", -5, -1), "BC\x1b[41mDE\x1b[49m", + "Save styles when chopping part of the backcolor-styled string" + ); + + a( + slice("\x1b[1mAAA\x1b[31mBBB\x1b[39mAAA\x1b[22m", 0, 5), + "\x1b[1mAAA\x1b[31mBB\x1b[39m\x1b[22m", "Works with nested styles #1" + ); + a( + slice("\x1b[1mAAA\x1b[31mBBB\x1b[39mAAA\x1b[22m", 2, 7), + "\x1b[1mA\x1b[31mBBB\x1b[39mA\x1b[22m", "Works with nested styles #2" + ); + a( + slice("\x1b[3mAAA\x1b[41mBBB\x1b[49mAAA\x1b[23m", 0, 5), + "\x1b[3mAAA\x1b[41mBB\x1b[49m\x1b[23m", "Works with nested styles #3" + ); + a( + slice("\x1b[3mAAA\x1b[41mBBB\x1b[49mAAA\x1b[23m", 2, 7), + "\x1b[3mA\x1b[41mBBB\x1b[49mA\x1b[23m", "Works with nested styles #4" + ); + a( + slice("\x1b[3mAAA\x1b[41mBBB\x1b[49mAAA\x1b[23m", -8, -1), + "\x1b[3mAA\x1b[41mBBB\x1b[49mAA\x1b[23m", "Works with nested styles #5" + ); + + a( + slice("\x1b[31mAAA\x1b[32mBBB\x1b[31mAAA\x1b[39m", 0, 5), "\x1b[31mAAA\x1b[32mBB\x1b[39m", + "Works with nested overlapping styles #1" + ); + a( + slice("\x1b[31mAAA\x1b[32mBBB\x1b[31mAAA\x1b[39m", 2, 7), + "\x1b[31mA\x1b[32mBBB\x1b[31mA\x1b[39m", "Works with nested overlapping styles #2" + ); + a( + slice("\x1b[31mAAA\x1b[32mBBB\x1b[31mAAA\x1b[39m", -8, -1), + "\x1b[31mAA\x1b[32mBBB\x1b[31mAA\x1b[39m", "Works with nested overlapping styles #3" + ); + + /* CSI at the edge of slice */ + a(slice("ABC\x1b[31mDEF\x1b[39m", 3), "\x1b[31mDEF\x1b[39m", "Does not corrupt start CSI"); + a(slice("\x1b[41mABC\x1b[49mDEF", 0, 3), "\x1b[41mABC\x1b[49m", "Does not corrupt end CSI"); + + /* CSI-reducing tests */ + a(slice("ABC\x1b[31mDEF\x1b[39m", 0, 3), "ABC", "Does not mixin CSI to plain string"); + a(slice("ABCD\x1b[31mEF\x1b[39m", 0, 3), "ABC", "Does not mixin CSI to plain string"); + a(slice("\x1b[41mABC\x1b[49mDEF", 3), "DEF", "Does not mixin CSI to plain string"); + a(slice("\x1b[41mAB\x1b[49mCDEF", 3), "DEF", "Does not mixin CSI to plain string"); + + a( + slice("A\x1b[31mBBB\x1b[39mD\x1b[32mE\x1b[39m", 2, 3), "\x1b[31mB\x1b[39m", + "Does slice with surrounding styles" + ); + a( + slice("A\x1b[31mBBB\x1b[39mD\x1b[32mE\x1b[39m", 0, 5), "A\x1b[31mBBB\x1b[39mD", + "Does slice with inner styles" + ); + + a( + slice("A\x1b[31mBBB\x1b[39m\x1b[2J\x1b[0;0H", 0, 4), "A\x1b[31mBBB\x1b[39m", + "Remove reset CSI" + ); + + // 'A' + clc.red('BBB') + clc.erase.screen + clc.move.to(0, 0) + a( + slice("A\u001b[31mBBB\u001b[39m\u001b[2J\u001b[1;1H", 0, 4), "A\x1b[31mBBB\x1b[39m", + "Remove control CSIs" + ); +}; diff --git a/node_modules/cli-color/test/strip.js b/node_modules/cli-color/test/strip.js new file mode 100644 index 00000000..d70080d5 --- /dev/null +++ b/node_modules/cli-color/test/strip.js @@ -0,0 +1,98 @@ +"use strict"; + +var clc = require("../"); + +module.exports = function (t, a) { + var x = clc.red + , y = x.bold; + + a(t("test"), "test", "Plain"); + + a(t("\x1bA"), "", "Simple Command Type 1"); + a(t("\x9bA"), "", "Simple Command Type 2"); + + a(t("\x1b[0A"), "", "Single Command"); + a(t("\x1b[0;A"), "", "Single Separated Command"); + a(t("\x1b[0;0A"), "", "Two Commands"); + a(t("\x1b[0;0;A"), "", "Two Separated Commands"); + + // Base on index tests. + a(t(clc.red("foo")), "foo", "Foreground"); + a(t(clc.red("foo", "bar", 3)), "foo bar 3", "Foreground: Many args"); + a(t(clc.red.yellow("foo", "bar", 3)), "foo bar 3", "Foreground: Overriden"); + a(t(clc.bgRed("foo", "bar")), "foo bar", "Background"); + a(t(clc.bgRed.bgYellow("foo", "bar", 3)), "foo bar 3", "Background: Overriden"); + + a(t(clc.blue.bgYellow("foo", "bar")), "foo bar", "Foreground & Background"); + a(t(clc.blue.bgYellow.red.bgMagenta("foo", "bar")), + "foo bar", + "Foreground & Background: Overriden"); + + a(t(clc.bold("foo", "bar")), "foo bar", "Format"); + a(t(clc.blink("foobar")), "foobar", "Format: blink"); + a(t(clc.bold.blue("foo", "bar", 3)), "foo bar 3", "Foreground & Format"); + + a(t(clc.redBright("foo", "bar")), "foo bar", "Bright"); + a(t(clc.bgRedBright("foo", 3)), "foo 3", "Bright background"); + + a(t(clc.blueBright.bgYellowBright.red.bgMagenta("foo", "bar")), + "foo bar", + "Foreground & Background: Bright: Overriden"); + + a(t(clc.red.blue("foo")), "foo", "Prioritize the Last Color: Blue"); + a(t(clc.blue.red("foo")), "foo", "Prioritize the Last Color: Red"); + a(t(clc.bgRed.bgBlue("foo")), "foo", "Prioritize the Last Background Color: Blue"); + a(t(clc.bgBlue.bgRed("foo")), "foo", "Prioritize the Last Background Color: Red"); + a(t(clc.bgRed.red.bgBlue.blue("foo")), "foo", "Prioritize the Last Mixed Style: Blue"); + a(t(clc.bgBlue.blue.bgRed.red("foo")), "foo", "Prioritize the Last Mixed Style: Red"); + a(t(clc.bgRed.blue.bgBlue.red("foo")), + "foo", + "Prioritize the Last Mixed Style: BG Blue and Red"); + a(t(clc.bgBlue.red.bgRed.blue("foo")), + "foo", + "Prioritize the Last Mixed Style: BG Red and Blue"); + + a(t(x("foo", "red") + " " + y("foo", "boldred")), + "foo red foo boldred", + "Detached extension"); + + a(t(clc.erase.screen).replace(/\n/g, ""), "", "Reset"); + + a(t(clc.move.up()), "", "Up: No argument"); + a(t(clc.move.up({})), "", "Up: Not a number"); + a(t(clc.move.up(-34)), "", "Up: Negative"); + a(t(clc.move.up(34)), "", "Up: Positive"); + + a(t(clc.move.down()), "", "Down: No argument"); + a(t(clc.move.down({})), "", "Down: Not a number"); + a(t(clc.move.down(-34)), "", "Down: Negative"); + a(t(clc.move.down(34)), "", "Down: Positive"); + + a(t(clc.move.right()), "", "Right: No argument"); + a(t(clc.move.right({})), "", "Right: Not a number"); + a(t(clc.move.right(-34)), "", "Right: Negative"); + a(t(clc.move.right(34)), "", "Right: Positive"); + + a(t(clc.move.left()), "", "Left: No argument"); + a(t(clc.move.left({})), "", "Left: Not a number"); + a(t(clc.move.left(-34)), "", "Left: Negative"); + a(t(clc.move.left(34)), "", "Left: Positive"); + + a(t(clc.move()), "", "Move: No arguments"); + a(t(clc.move({}, {})), "", "Move: Bad arguments"); + a(t(clc.move({}, 12)), "", "Move: One direction"); + a(t(clc.move(0, -12)), "", "Move: One negative direction"); + a(t(clc.move(-42, -2)), "", "Move: two negatives"); + a(t(clc.move(2, 35)), "", "Move: two positives"); + + a(t(clc.move.to()), "", "MoveTo: No arguments"); + a(t(clc.move.to({}, {})), "", "MoveTo: Bad arguments"); + a(t(clc.move.to({}, 12)), "", "MoveTo: One direction"); + a(t(clc.move.to(2, -12)), "", "MoveTo: One negative direction"); + a(t(clc.move.to(-42, -2)), "", "MoveTo: two negatives"); + a(t(clc.move.to(2, 35)), "", "MoveTo: two positives"); + + a(t(clc.beep), clc.beep, "Beep"); + + a(t("test"), "test", "Plain"); +}; diff --git a/node_modules/cli-color/test/throbber.js b/node_modules/cli-color/test/throbber.js new file mode 100644 index 00000000..62de58d0 --- /dev/null +++ b/node_modules/cli-color/test/throbber.js @@ -0,0 +1,41 @@ +"use strict"; + +var startsWith = require("es5-ext/string/#/starts-with") + , spawn = require("child_process").spawn + , resolve = require("path").resolve; + +var pg = resolve(__dirname, "__playground"); + +module.exports = { + "": function (a, d) { + var t = spawn("node", [resolve(pg, "throbber.js")]), out = [], err = ""; + + t.stdout.on("data", function (data) { out.push(data); }); + t.stderr.on("data", function (data) { err += data; }); + t.on("exit", function () { + a.ok(out.length > 4, "Interval"); + a(startsWith.call(out.join(""), "START-\b\\\b|\b/\b-\b"), true, "Output"); + a(err, "", "No stderr output"); + d(); + }); + }, + "Formatted": function (a, d) { + var t = spawn("node", [resolve(pg, "throbber.formatted.js")]), out = [], err = ""; + + t.stdout.on("data", function (data) { out.push(data); }); + t.stderr.on("data", function (data) { err += data; }); + t.on("exit", function () { + a.ok(out.length > 4, "Interval"); + a( + startsWith.call( + out.join(""), + "START\x1b[31m-\x1b[39m\x1b[31m\b\\\x1b" + + "[39m\x1b[31m\b|\x1b[39m\x1b[31m\b/\x1b[39m\x1b[31m\b-\x1b[39m" + ), + true, "Output" + ); + a(err, "", "No stderr output"); + d(); + }); + } +}; diff --git a/node_modules/cli-color/test/visual.js b/node_modules/cli-color/test/visual.js new file mode 100644 index 00000000..76e8c9ed --- /dev/null +++ b/node_modules/cli-color/test/visual.js @@ -0,0 +1,117 @@ +"use strict"; + +var clc = require("./"); + +var colors = ["black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"]; + +// Write some message. +var w = function (message) { process.stdout.write(message); }; + +// Print colors. +var printColors = function (title, style) { + var j = colors.length, color, colorText, tint, i; + + w(" > " + clc.whiteBright(title) + " "); + for (i = 0; i < j; i++) { + tint = clc; + color = colors[i]; + colorText = color.toUpperCase(); + + if (style === "foreground") { + tint = tint[color]; + + if (color === "black") { + tint = tint.bgBlackBright; + } + } + + if (style === "foregroundBright") { + tint = tint[color + "Bright"]; + } + + if (style === "background") { + tint = tint["bg" + color.slice(0, 1).toUpperCase() + color.slice(1)]; + + if (color === "white") { + tint = tint.whiteBright; + } + } + + if (style === "backgroundBright") { + tint = tint["bg" + color.slice(0, 1).toUpperCase() + color.slice(1) + "Bright"]; + } + + w(tint(colorText) + " "); + } + w("\n"); +}; + +// Smile test. +w(clc.reset); + +w("\n SMILE TEST\n\n"); + +// Yellow face. +w(clc(" ")); +w(clc.bgYellowBright(" ")); +w(clc("\n")); +w(clc(" ")); +w(clc.bgYellowBright(" ")); +w(clc("\n")); +w(clc(" ")); +w(clc.bgYellowBright(" ")); +w(clc("\n")); +w(clc(" ")); +w(clc.bgYellowBright(" ")); +w(clc("\n")); +w(clc(" ")); +w(clc.bgYellowBright(" ")); +w(clc("\n")); +w(clc(" ")); +w(clc.bgYellowBright(" ")); +w(clc("\n")); + +// Move blue eyes. +w(clc.move(7, -5)); +w(clc.blueBright.bgYellowBright("O")); +w(clc.move(1, 0)); +w(clc.blueBright.bgYellowBright("O")); + +// Red nose. +w(clc.move.to(8, 5)); +w(clc.redBright.bgYellowBright("\u25A0")); + +// Red mouth. +w(clc.move.down(2)); +w(clc.move.left(2)); +w(clc.red.bgYellowBright("\u2588\u2584\u2588")); + +// Move back. +w(clc.move.to(0, 9)); + +// Colors test. +w("\n COLORS TESTS\n"); +printColors("FOREGROUNDS (DEFAULT)", "foreground"); +printColors("FOREGROUNDS (BRIGHT) ", "foregroundBright"); +printColors("BACKGROUNDS (DEFAULT)", "background"); +printColors("BACKGROUNDS (BRIGHT) ", "backgroundBright"); + +// // Art test. +w("\n ART TESTS\n\n"); +w( + clc.art("\t.01111111112.\n\t.3.........3.\n\t.3.........3.\n\t.41111111115.\n", { + "0": clc.bgBlue.yellowBright("\u2554"), + "1": clc.bgBlue.yellowBright("\u2550"), + "2": clc.bgBlue.yellowBright("\u2557"), + "3": clc.bgBlue.yellowBright("\u2551"), + "4": clc.bgBlue.yellowBright("\u255A"), + "5": clc.bgBlue.yellowBright("\u255D"), + ".": clc.bgBlue(" ") + }) +); +w(clc.move(11, -3)); +w(clc.bgBlue.whiteBright("Hello")); +w(clc.move(-3, 1)); +w(clc.bgBlue.whiteBright("World")); +w(clc.move(0, 2)); +w("\n"); diff --git a/node_modules/cli-color/test/window-size.js b/node_modules/cli-color/test/window-size.js new file mode 100644 index 00000000..4c6a9ae6 --- /dev/null +++ b/node_modules/cli-color/test/window-size.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t.width, "number", "Width"); + a(typeof t.height, "number", "Height"); + a(t.width >= 0, true); + a(t.height >= 0, true); +}; diff --git a/node_modules/cli-color/throbber.js b/node_modules/cli-color/throbber.js new file mode 100644 index 00000000..0786cf11 --- /dev/null +++ b/node_modules/cli-color/throbber.js @@ -0,0 +1,52 @@ +"use strict"; + +var compose = require("es5-ext/function/#/compose") + , callable = require("es5-ext/object/valid-callable") + , d = require("d") + , validTimeout = require("timers-ext/valid-timeout"); + +var chars = "-\\|/", l = chars.length, ThrobberIterator; + +ThrobberIterator = function () { + // no setup needed +}; +Object.defineProperties(ThrobberIterator.prototype, { + index: d(-1), + running: d(false), + next: d(function () { + var str = this.running ? "\u0008" : ""; + if (!this.running) this.running = true; + return str + chars[this.index = (this.index + 1) % l]; + }), + reset: d(function () { + if (!this.running) return ""; + this.index = -1; + this.running = false; + return "\u0008"; + }) +}); + +module.exports = exports = function (write, interval/*, format*/) { + var format = arguments[2], token, iterator = new ThrobberIterator(); + callable(write); + interval = validTimeout(interval); + if (format !== undefined) write = compose.call(write, callable(format)); + return { + start: function () { + if (token) return; + token = setInterval(function () { write(iterator.next()); }, interval); + }, + restart: function () { + this.stop(); + this.start(); + }, + stop: function () { + if (!token) return; + clearInterval(token); + token = null; + write(iterator.reset()); + } + }; +}; + +Object.defineProperty(exports, "Iterator", d(ThrobberIterator)); diff --git a/node_modules/cli-color/window-size.js b/node_modules/cli-color/window-size.js new file mode 100644 index 00000000..e767b3b5 --- /dev/null +++ b/node_modules/cli-color/window-size.js @@ -0,0 +1,8 @@ +"use strict"; + +var d = require("d"); + +Object.defineProperties(exports, { + width: d.gs("ce", function () { return process.stdout.columns || 0; }), + height: d.gs("ce", function () { return process.stdout.rows || 0; }) +}); diff --git a/node_modules/cliui/CHANGELOG.md b/node_modules/cliui/CHANGELOG.md new file mode 100644 index 00000000..37f259a5 --- /dev/null +++ b/node_modules/cliui/CHANGELOG.md @@ -0,0 +1,65 @@ +# Change Log + +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. + +# [5.0.0](https://github.com/yargs/cliui/compare/v4.1.0...v5.0.0) (2019-04-10) + + +### Bug Fixes + +* Update wrap-ansi to fix compatibility with latest versions of chalk. ([#60](https://github.com/yargs/cliui/issues/60)) ([7bf79ae](https://github.com/yargs/cliui/commit/7bf79ae)) + + +### BREAKING CHANGES + +* Drop support for node < 6. + + + + +# [4.1.0](https://github.com/yargs/cliui/compare/v4.0.0...v4.1.0) (2018-04-23) + + +### Features + +* add resetOutput method ([#57](https://github.com/yargs/cliui/issues/57)) ([7246902](https://github.com/yargs/cliui/commit/7246902)) + + + + +# [4.0.0](https://github.com/yargs/cliui/compare/v3.2.0...v4.0.0) (2017-12-18) + + +### Bug Fixes + +* downgrades strip-ansi to version 3.0.1 ([#54](https://github.com/yargs/cliui/issues/54)) ([5764c46](https://github.com/yargs/cliui/commit/5764c46)) +* set env variable FORCE_COLOR. ([#56](https://github.com/yargs/cliui/issues/56)) ([7350e36](https://github.com/yargs/cliui/commit/7350e36)) + + +### Chores + +* drop support for node < 4 ([#53](https://github.com/yargs/cliui/issues/53)) ([b105376](https://github.com/yargs/cliui/commit/b105376)) + + +### Features + +* add fallback for window width ([#45](https://github.com/yargs/cliui/issues/45)) ([d064922](https://github.com/yargs/cliui/commit/d064922)) + + +### BREAKING CHANGES + +* officially drop support for Node < 4 + + + + +# [3.2.0](https://github.com/yargs/cliui/compare/v3.1.2...v3.2.0) (2016-04-11) + + +### Bug Fixes + +* reduces tarball size ([acc6c33](https://github.com/yargs/cliui/commit/acc6c33)) + +### Features + +* adds standard-version for release management ([ff84e32](https://github.com/yargs/cliui/commit/ff84e32)) diff --git a/node_modules/cliui/LICENSE.txt b/node_modules/cliui/LICENSE.txt new file mode 100644 index 00000000..c7e27478 --- /dev/null +++ b/node_modules/cliui/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/cliui/README.md b/node_modules/cliui/README.md new file mode 100644 index 00000000..deacfa0d --- /dev/null +++ b/node_modules/cliui/README.md @@ -0,0 +1,115 @@ +# cliui + +[![Build Status](https://travis-ci.org/yargs/cliui.svg)](https://travis-ci.org/yargs/cliui) +[![Coverage Status](https://coveralls.io/repos/yargs/cliui/badge.svg?branch=)](https://coveralls.io/r/yargs/cliui?branch=) +[![NPM version](https://img.shields.io/npm/v/cliui.svg)](https://www.npmjs.com/package/cliui) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +easily create complex multi-column command-line-interfaces. + +## Example + +```js +var ui = require('cliui')() + +ui.div('Usage: $0 [command] [options]') + +ui.div({ + text: 'Options:', + padding: [2, 0, 2, 0] +}) + +ui.div( + { + text: "-f, --file", + width: 20, + padding: [0, 4, 0, 4] + }, + { + text: "the file to load." + + chalk.green("(if this description is long it wraps).") + , + width: 20 + }, + { + text: chalk.red("[required]"), + align: 'right' + } +) + +console.log(ui.toString()) +``` + + + +## Layout DSL + +cliui exposes a simple layout DSL: + +If you create a single `ui.div`, passing a string rather than an +object: + +* `\n`: characters will be interpreted as new rows. +* `\t`: characters will be interpreted as new columns. +* `\s`: characters will be interpreted as padding. + +**as an example...** + +```js +var ui = require('./')({ + width: 60 +}) + +ui.div( + 'Usage: node ./bin/foo.js\n' + + ' \t provide a regex\n' + + ' \t provide a glob\t [required]' +) + +console.log(ui.toString()) +``` + +**will output:** + +```shell +Usage: node ./bin/foo.js + provide a regex + provide a glob [required] +``` + +## Methods + +```js +cliui = require('cliui') +``` + +### cliui({width: integer}) + +Specify the maximum width of the UI being generated. +If no width is provided, cliui will try to get the current window's width and use it, and if that doesn't work, width will be set to `80`. + +### cliui({wrap: boolean}) + +Enable or disable the wrapping of text in a column. + +### cliui.div(column, column, column) + +Create a row with any number of columns, a column +can either be a string, or an object with the following +options: + +* **text:** some text to place in the column. +* **width:** the width of a column. +* **align:** alignment, `right` or `center`. +* **padding:** `[top, right, bottom, left]`. +* **border:** should a border be placed around the div? + +### cliui.span(column, column, column) + +Similar to `div`, except the next row will be appended without +a new line being created. + +### cliui.resetOutput() + +Resets the UI elements of the current cliui instance, maintaining the values +set for `width` and `wrap`. diff --git a/node_modules/cliui/index.js b/node_modules/cliui/index.js new file mode 100644 index 00000000..b42d9824 --- /dev/null +++ b/node_modules/cliui/index.js @@ -0,0 +1,324 @@ +var stringWidth = require('string-width') +var stripAnsi = require('strip-ansi') +var wrap = require('wrap-ansi') +var align = { + right: alignRight, + center: alignCenter +} +var top = 0 +var right = 1 +var bottom = 2 +var left = 3 + +function UI (opts) { + this.width = opts.width + this.wrap = opts.wrap + this.rows = [] +} + +UI.prototype.span = function () { + var cols = this.div.apply(this, arguments) + cols.span = true +} + +UI.prototype.resetOutput = function () { + this.rows = [] +} + +UI.prototype.div = function () { + if (arguments.length === 0) this.div('') + if (this.wrap && this._shouldApplyLayoutDSL.apply(this, arguments)) { + return this._applyLayoutDSL(arguments[0]) + } + + var cols = [] + + for (var i = 0, arg; (arg = arguments[i]) !== undefined; i++) { + if (typeof arg === 'string') cols.push(this._colFromString(arg)) + else cols.push(arg) + } + + this.rows.push(cols) + return cols +} + +UI.prototype._shouldApplyLayoutDSL = function () { + return arguments.length === 1 && typeof arguments[0] === 'string' && + /[\t\n]/.test(arguments[0]) +} + +UI.prototype._applyLayoutDSL = function (str) { + var _this = this + var rows = str.split('\n') + var leftColumnWidth = 0 + + // simple heuristic for layout, make sure the + // second column lines up along the left-hand. + // don't allow the first column to take up more + // than 50% of the screen. + rows.forEach(function (row) { + var columns = row.split('\t') + if (columns.length > 1 && stringWidth(columns[0]) > leftColumnWidth) { + leftColumnWidth = Math.min( + Math.floor(_this.width * 0.5), + stringWidth(columns[0]) + ) + } + }) + + // generate a table: + // replacing ' ' with padding calculations. + // using the algorithmically generated width. + rows.forEach(function (row) { + var columns = row.split('\t') + _this.div.apply(_this, columns.map(function (r, i) { + return { + text: r.trim(), + padding: _this._measurePadding(r), + width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined + } + })) + }) + + return this.rows[this.rows.length - 1] +} + +UI.prototype._colFromString = function (str) { + return { + text: str, + padding: this._measurePadding(str) + } +} + +UI.prototype._measurePadding = function (str) { + // measure padding without ansi escape codes + var noAnsi = stripAnsi(str) + return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length] +} + +UI.prototype.toString = function () { + var _this = this + var lines = [] + + _this.rows.forEach(function (row, i) { + _this.rowToString(row, lines) + }) + + // don't display any lines with the + // hidden flag set. + lines = lines.filter(function (line) { + return !line.hidden + }) + + return lines.map(function (line) { + return line.text + }).join('\n') +} + +UI.prototype.rowToString = function (row, lines) { + var _this = this + var padding + var rrows = this._rasterize(row) + var str = '' + var ts + var width + var wrapWidth + + rrows.forEach(function (rrow, r) { + str = '' + rrow.forEach(function (col, c) { + ts = '' // temporary string used during alignment/padding. + width = row[c].width // the width with padding. + wrapWidth = _this._negatePadding(row[c]) // the width without padding. + + ts += col + + for (var i = 0; i < wrapWidth - stringWidth(col); i++) { + ts += ' ' + } + + // align the string within its column. + if (row[c].align && row[c].align !== 'left' && _this.wrap) { + ts = align[row[c].align](ts, wrapWidth) + if (stringWidth(ts) < wrapWidth) ts += new Array(width - stringWidth(ts)).join(' ') + } + + // apply border and padding to string. + padding = row[c].padding || [0, 0, 0, 0] + if (padding[left]) str += new Array(padding[left] + 1).join(' ') + str += addBorder(row[c], ts, '| ') + str += ts + str += addBorder(row[c], ts, ' |') + if (padding[right]) str += new Array(padding[right] + 1).join(' ') + + // if prior row is span, try to render the + // current row on the prior line. + if (r === 0 && lines.length > 0) { + str = _this._renderInline(str, lines[lines.length - 1]) + } + }) + + // remove trailing whitespace. + lines.push({ + text: str.replace(/ +$/, ''), + span: row.span + }) + }) + + return lines +} + +function addBorder (col, ts, style) { + if (col.border) { + if (/[.']-+[.']/.test(ts)) return '' + else if (ts.trim().length) return style + else return ' ' + } + return '' +} + +// if the full 'source' can render in +// the target line, do so. +UI.prototype._renderInline = function (source, previousLine) { + var leadingWhitespace = source.match(/^ */)[0].length + var target = previousLine.text + var targetTextWidth = stringWidth(target.trimRight()) + + if (!previousLine.span) return source + + // if we're not applying wrapping logic, + // just always append to the span. + if (!this.wrap) { + previousLine.hidden = true + return target + source + } + + if (leadingWhitespace < targetTextWidth) return source + + previousLine.hidden = true + + return target.trimRight() + new Array(leadingWhitespace - targetTextWidth + 1).join(' ') + source.trimLeft() +} + +UI.prototype._rasterize = function (row) { + var _this = this + var i + var rrow + var rrows = [] + var widths = this._columnWidths(row) + var wrapped + + // word wrap all columns, and create + // a data-structure that is easy to rasterize. + row.forEach(function (col, c) { + // leave room for left and right padding. + col.width = widths[c] + if (_this.wrap) wrapped = wrap(col.text, _this._negatePadding(col), { hard: true }).split('\n') + else wrapped = col.text.split('\n') + + if (col.border) { + wrapped.unshift('.' + new Array(_this._negatePadding(col) + 3).join('-') + '.') + wrapped.push("'" + new Array(_this._negatePadding(col) + 3).join('-') + "'") + } + + // add top and bottom padding. + if (col.padding) { + for (i = 0; i < (col.padding[top] || 0); i++) wrapped.unshift('') + for (i = 0; i < (col.padding[bottom] || 0); i++) wrapped.push('') + } + + wrapped.forEach(function (str, r) { + if (!rrows[r]) rrows.push([]) + + rrow = rrows[r] + + for (var i = 0; i < c; i++) { + if (rrow[i] === undefined) rrow.push('') + } + rrow.push(str) + }) + }) + + return rrows +} + +UI.prototype._negatePadding = function (col) { + var wrapWidth = col.width + if (col.padding) wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0) + if (col.border) wrapWidth -= 4 + return wrapWidth +} + +UI.prototype._columnWidths = function (row) { + var _this = this + var widths = [] + var unset = row.length + var unsetWidth + var remainingWidth = this.width + + // column widths can be set in config. + row.forEach(function (col, i) { + if (col.width) { + unset-- + widths[i] = col.width + remainingWidth -= col.width + } else { + widths[i] = undefined + } + }) + + // any unset widths should be calculated. + if (unset) unsetWidth = Math.floor(remainingWidth / unset) + widths.forEach(function (w, i) { + if (!_this.wrap) widths[i] = row[i].width || stringWidth(row[i].text) + else if (w === undefined) widths[i] = Math.max(unsetWidth, _minWidth(row[i])) + }) + + return widths +} + +// calculates the minimum width of +// a column, based on padding preferences. +function _minWidth (col) { + var padding = col.padding || [] + var minWidth = 1 + (padding[left] || 0) + (padding[right] || 0) + if (col.border) minWidth += 4 + return minWidth +} + +function getWindowWidth () { + if (typeof process === 'object' && process.stdout && process.stdout.columns) return process.stdout.columns +} + +function alignRight (str, width) { + str = str.trim() + var padding = '' + var strWidth = stringWidth(str) + + if (strWidth < width) { + padding = new Array(width - strWidth + 1).join(' ') + } + + return padding + str +} + +function alignCenter (str, width) { + str = str.trim() + var padding = '' + var strWidth = stringWidth(str.trim()) + + if (strWidth < width) { + padding = new Array(parseInt((width - strWidth) / 2, 10) + 1).join(' ') + } + + return padding + str +} + +module.exports = function (opts) { + opts = opts || {} + + return new UI({ + width: (opts || {}).width || getWindowWidth() || 80, + wrap: typeof opts.wrap === 'boolean' ? opts.wrap : true + }) +} diff --git a/node_modules/cliui/node_modules/string-width/index.js b/node_modules/cliui/node_modules/string-width/index.js new file mode 100644 index 00000000..33c9d6c0 --- /dev/null +++ b/node_modules/cliui/node_modules/string-width/index.js @@ -0,0 +1,39 @@ +'use strict'; +const stripAnsi = require('strip-ansi'); +const isFullwidthCodePoint = require('is-fullwidth-code-point'); +const emojiRegex = require('emoji-regex')(); + +module.exports = input => { + input = input.replace(emojiRegex, ' '); + + if (typeof input !== 'string' || input.length === 0) { + return 0; + } + + input = stripAnsi(input); + + let width = 0; + + for (let i = 0; i < input.length; i++) { + const code = input.codePointAt(i); + + // Ignore control characters + if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { + continue; + } + + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; + } + + // Surrogates + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint(code) ? 2 : 1; + } + + return width; +}; diff --git a/node_modules/inquirer/node_modules/ansi-regex/license b/node_modules/cliui/node_modules/string-width/license similarity index 100% rename from node_modules/inquirer/node_modules/ansi-regex/license rename to node_modules/cliui/node_modules/string-width/license diff --git a/node_modules/cliui/node_modules/string-width/package.json b/node_modules/cliui/node_modules/string-width/package.json new file mode 100644 index 00000000..e040183e --- /dev/null +++ b/node_modules/cliui/node_modules/string-width/package.json @@ -0,0 +1,56 @@ +{ + "name": "string-width", + "version": "3.1.0", + "description": "Get the visual width of a string - the number of columns required to display it", + "license": "MIT", + "repository": "sindresorhus/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "string", + "str", + "character", + "char", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width" + ], + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "devDependencies": { + "ava": "^1.0.1", + "xo": "^0.23.0" + } +} diff --git a/node_modules/cliui/node_modules/string-width/readme.md b/node_modules/cliui/node_modules/string-width/readme.md new file mode 100644 index 00000000..d39d95f5 --- /dev/null +++ b/node_modules/cliui/node_modules/string-width/readme.md @@ -0,0 +1,45 @@ +# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +Useful to be able to measure the actual width of command-line output. + + +## Install + +``` +$ npm install string-width +``` + + +## Usage + +```js +const stringWidth = require('string-width'); + +stringWidth('古'); +//=> 2 + +stringWidth('\u001b[1m古\u001b[22m'); +//=> 2 + +stringWidth('a'); +//=> 1 + +stringWidth('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +// => 5 +``` + + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/cliui/package.json b/node_modules/cliui/package.json new file mode 100644 index 00000000..64936f71 --- /dev/null +++ b/node_modules/cliui/package.json @@ -0,0 +1,67 @@ +{ + "name": "cliui", + "version": "5.0.0", + "description": "easily create complex multi-column command-line-interfaces", + "main": "index.js", + "scripts": { + "pretest": "standard", + "test": "nyc mocha", + "coverage": "nyc --reporter=text-lcov mocha | coveralls", + "release": "standard-version" + }, + "repository": { + "type": "git", + "url": "http://github.com/yargs/cliui.git" + }, + "config": { + "blanket": { + "pattern": [ + "index.js" + ], + "data-cover-never": [ + "node_modules", + "test" + ], + "output-reporter": "spec" + } + }, + "standard": { + "ignore": [ + "**/example/**" + ], + "globals": [ + "it" + ] + }, + "keywords": [ + "cli", + "command-line", + "layout", + "design", + "console", + "wrap", + "table" + ], + "author": "Ben Coe ", + "license": "ISC", + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "devDependencies": { + "chai": "^4.2.0", + "chalk": "^2.4.2", + "coveralls": "^3.0.3", + "mocha": "^6.0.2", + "nyc": "^13.3.0", + "standard": "^12.0.1", + "standard-version": "^5.0.2" + }, + "files": [ + "index.js" + ], + "engine": { + "node": ">=6" + } +} diff --git a/node_modules/cls-bluebird/README.md b/node_modules/cls-bluebird/README.md new file mode 100644 index 00000000..a1bc5d20 --- /dev/null +++ b/node_modules/cls-bluebird/README.md @@ -0,0 +1,142 @@ +# continuation-local-storage support for bluebird promises + +[![NPM version](https://img.shields.io/npm/v/cls-bluebird.svg)](https://www.npmjs.com/package/cls-bluebird) +[![Build Status](https://img.shields.io/travis/TimBeyer/cls-bluebird/master.svg)](http://travis-ci.org/TimBeyer/cls-bluebird) +[![Dependency Status](https://img.shields.io/david/TimBeyer/cls-bluebird.svg)](https://david-dm.org/TimBeyer/cls-bluebird) +[![Dev dependency Status](https://img.shields.io/david/dev/TimBeyer/cls-bluebird.svg)](https://david-dm.org/TimBeyer/cls-bluebird) +[![Coverage Status](https://img.shields.io/coveralls/TimBeyer/cls-bluebird/master.svg)](https://coveralls.io/r/TimBeyer/cls-bluebird) + +Patch [bluebird](https://www.npmjs.com/package/bluebird) for [continuation-local-storage](https://www.npmjs.com/package/continuation-local-storage) support. + +## Current Status + +Version 2.x of cls-bluebird is a complete re-write aiming to make it 100% reliable and robust. Features comprehensive test coverage (over 100,000 tests) which cover pretty much all conceivable cases. + +Compatible with [bluebird](https://www.npmjs.com/package/bluebird) v2.x and v3.x. Tests cover both versions. + +Please use with latest version of [bluebird](https://www.npmjs.com/package/bluebird) in either v2.x or v3.x branches. Older versions are not guaranteed to work. + +## Usage + +### `clsBluebird( ns [, Promise] )` + +```js +var cls = require('continuation-local-storage'); +var ns = cls.createNamespace('myNamespace'); + +var Promise = require('bluebird'); +var clsBluebird = require('cls-bluebird'); + +clsBluebird( ns ); +// Promise is now patched to maintain CLS context +``` + +The above patches the "global" instance of bluebird. So anywhere else in the same app that calls `require('bluebird')` will get the patched version (assuming npm resolves to the same file). + +### Patching a particular instance of Bluebird + +So as not to alter the "global" instance of bluebird, it's recommended to first create a independent instance of the Bluebird constructor before patching, and pass it to cls-bluebird. + +This is a more robust approach. + +```js +var Promise = require('bluebird').getNewLibraryCopy(); +var clsBluebird = require('cls-bluebird'); + +clsBluebird( ns, Promise ); +``` + +(see [Promise.getNewLibraryCopy()](http://bluebirdjs.com/docs/api/promise.getnewlibrarycopy.html) docs on Bluebird website) + +### Nature of patching + +Combining CLS and promises is a slightly tricky business. There are 3 different conventions one could use (see [this issue](https://github.com/othiym23/node-continuation-local-storage/issues/64) for more detail). + +`cls-bluebird` follows the convention of binding `.then()` callbacks **to the context in which `.then()` is called**. + +```js +var promise; +ns.run(function() { + ns.set('foo', 123); + promise = Promise.resolve(); +}); + +ns.run(function() { + ns.set('foo', 456); + promise.then(print); +}); + +function print() { + console.log(ns.get('foo')); +} + +// this outputs '456' (the value of `foo` at the time `.then()` was called) +``` + +### Notes + +#### Coroutines + +The patch ensures that when execution in a coroutine continues after a `yield` statement, it always does so in the CLS context *in which the coroutine started running*. + +```js +var fn = Promise.coroutine(function* () { + console.log('Context 1:', ns.get('foo')); + yield Promise.resolve(); + console.log('Context 2:', ns.get('foo')); +}); + +ns.run(function(ctx) { + ns.set('foo', 123); + fn(); +}); +``` + +outputs: + +``` +Context 1: 123 +Context 2: 123 +``` + +This means: + +1. If the `yield`-ed expression loses CLS context, the original CLS context will be restored after the `yield`. +2. Any code before the `yield` which changes CLS context will only be effective until the next `yield`. + +#### Global error handlers + +`Promise.onPossiblyUnhandledRejection()` and `Promise.onUnhandledRejectionHandled()` allow you to attach global handlers to intercept unhandled rejections. + +The CLS context in which callbacks are called is unknown. It's probably unwise to rely on the CLS context in the callback being that when the rejection occurred - use `.catch()` on the end of the promise chain that's created within `namespace.run()` instead. + +#### Progression + +Bluebird v2.x contains a deprecated API for handling progression (`.progressed()`) etc. These methods are patched and *should* work fine but they're not covered by the tests. + +## Tests + +The tests cover every possible combination of input promises and callbacks that the Bluebird API allows. There's around 100,000 tests in total and the aim is to ensure cls-bluebird is as robust and reliable as possible. + +Use `npm test` to run the tests. Use `npm run cover` to check coverage. + +For more info on test tests, see [tests/README.md](https://github.com/TimBeyer/cls-bluebird/blob/master/test/README.md) + +## Changelog + +See [changelog.md](https://github.com/TimBeyer/cls-bluebird/blob/master/changelog.md) + +## Issues/bugs + +If you discover a bug, please raise an issue on Github. https://github.com/TimBeyer/cls-bluebird/issues + +We are very keen to ensure cls-bluebird is completely bug-free and any bugs discovered will be fixed as soon as possible. + +## Contribution + +Pull requests are very welcome. Please: + +* ensure all tests pass before submitting PR +* add an entry to changelog +* add tests for new features +* document new functionality/API additions in README diff --git a/node_modules/cls-bluebird/changelog.md b/node_modules/cls-bluebird/changelog.md new file mode 100644 index 00000000..68deaf17 --- /dev/null +++ b/node_modules/cls-bluebird/changelog.md @@ -0,0 +1,48 @@ +# Changelog + +## 2.1.0 + +* Fix: `Promise.coroutine.addYieldHandler()` is maintained +* Patch `.tapCatch()` prototype method +* Tests: Workaround for uncaught rejections bug in Bluebird v3.5.1 +* Travis CI run tests on Node versions 8 + 9 +* Travis CI does not run tests on Node versions before v4 +* Skip Travis CI runs on release tags +* Test against latest Bluebird v3 +* Update dev dependencies +* Code style: Fix spacing in tests + +## 2.0.1 + +* Correct typos in README + +## 2.0.0 + +* Complete re-write +* New test suite + +## 1.1.3 + +* Improved validation that `ns` argument is a namespace +* Add npm keywords + +## 1.1.2 + +* README + +## 1.1.1 + +* Use `is-bluebird` module for checking `Promise` argument + +## 1.1.0 + +* Remove peer dependencies +* Update `shimmer` dependency + +## 1.0.1 + +* Fix: `domain` argument for `_addCallbacks` + +## 1.0.0 + +* Initial release diff --git a/node_modules/cls-bluebird/lib/index.js b/node_modules/cls-bluebird/lib/index.js new file mode 100644 index 00000000..c75b5ece --- /dev/null +++ b/node_modules/cls-bluebird/lib/index.js @@ -0,0 +1,265 @@ +'use strict'; + +/* + * cls-bluebird + * Module entry point + */ + +// Modules +var isBluebird = require('is-bluebird'); + +// Require Bluebird library +// Ignore errors if cannot be required +var Bluebird; +try { + Bluebird = require('bluebird'); +} catch (err) {} + +// Imports +var shimMethod = require('./shimMethod'), + shimOnCancel = require('./shimOnCancel'), + shimCall = require('./shimCall'), + shimUsing = require('./shimUsing'), + shimCoroutine = require('./shimCoroutine'); + +// Exports + +/** + * Patch bluebird to run maintain CLS context for a specific namespace. + * If a Bluebird Promise constructor is provided, it is patched. + * If not provided, the version returned by `require('bluebird')` is used. + * + * @param {Object} ns - CLS namespace object + * @param {Function} [Promise] - Bluebird Promise constructor to patch (optional) + * @returns {Function} - Bluebird Promise constructor + * @throws {TypeError} - If `ns` or `Promise` are not of correct type + * @throws {Error} - If `Promise` not provided and cannot require `bluebird` module + */ +module.exports = function patchBluebird(ns, Promise) { + // Check namespace is valid + if (!ns || typeof ns !== 'object' || typeof ns.bind !== 'function' || typeof ns.run !== 'function') throw new TypeError('Must provide CLS namespace to patch Bluebird against'); + + // Check Promise implementation is some variation of Bluebird + // If none provided, use default Bluebird + if (!Promise) { + Promise = Bluebird; + if (!Promise) throw new Error('Could not require Bluebird'); + } else if (!isBluebird.ctor(Promise)) { + throw new TypeError('Promise implementation provided must be Bluebird'); + } + + // Patch all methods to carry CLS context + var v3 = isBluebird.ctor.v3(Promise); + + /* + * Core + * + * Not patched as always run callback synchronously: + * new Promise() + * Promise.try() / Promise.attempt() + * + * Not patched as do not take a callback: + * Promise.bind() / .bind() + * Promise.resolve() / Promise.fulfilled() / Promise.cast() + * Promise.reject() / Promise.rejected() + * + * Not patched as call another patched method synchronously + * .error() - calls .catch() + * + * Not patched as are wrappers: + * Promise.method() + * + * NB Due to bug in bluebird v2 https://github.com/petkaantonov/bluebird/issues/1153 + * `Promise.join()` calls the callback synchronously if input is only values or + * resolved promises, but async if any promises are pending. + * So handler is sometimes bound to CLS context unnecessarily, but this does no harm + * beyond the very slight performance overhead of an extra `ns.bind()` call. + */ + + shimProto('then', v3 ? [0, 1] : [0, 1, 2]); + shimProto('spread', v3 ? [0] : [0, 1]); + shimProto('finally', [0]); + Promise.prototype.lastly = Promise.prototype.finally; + shimStatic('join', [-1]); + + if (!v3) { + // Only patched in bluebird v2. + // In bluebird v3 `.catch()` calls `.then()` immediately which binds callback. + shimProto('catch', [-1]); + Promise.prototype.caught = Promise.prototype.catch; + } + + /* + * Synchronous inspection + * + * Not patched as do not take a callback: + * .isFulfilled() + * .isRejected() + * .isPending() + * .isCancelled() + * .isResolved() + * .value() + * .reason() + * .reflect() + */ + + /* + * Collections + * + * Not patched as do not take a callback: + * Promise.all() / .all() + * Promise.props() / .props() + * Promise.any() / .any() + * Promise.some() / .some() + * Promise.race() / .race() + */ + + shimBoth('map', [0]); + shimBoth('filter', [0]); + shimBoth('reduce', [0]); + shimBoth('each', [0]); + + // In bluebird v2, there is no `Promise.mapSeries()`/`.mapSeries()` method + if (v3) shimBoth('mapSeries', [0]); + + /* + * Resource management + * + * NB disposer callbacks are bound to context at time disposer created, not when utilized in `using()` + */ + + shimUsing(Promise, ns, v3); // shims `Promise.using()` + shimProto('disposer', [0]); + + /* + * Promisification + * + * Not patched as always run callback synchronously: + * Promise.fromCallback() + * Promise.fromNode() + * + * Not patched as they are wrappers: + * Promise.promisify() + * Promise.promisifyAll() + */ + + shimProto('asCallback', [0]); + Promise.prototype.nodeify = Promise.prototype.asCallback; + + /* + * Timers + * + * Not patched as do not take a callback: + * Promise.delay() / .delay() + * .timeout() + */ + + /* + * Cancellation + * + * Not patched as does not take a callback: + * .cancel() / .break() + * .isCancellable() + * .cancellable() (bluebird v2 only) + * .uncancellable() (bluebird v2 only) + * + * NB In bluebird v3 `onCancel` handler will be called + * in CLS context of call to `onCancel()`. + */ + + // Patch `Promise.prototype._resolveFromExecutor` + // in order to patch `onCancel` handler in `new Promise()`. + if (v3) shimOnCancel(Promise, ns); + + /* + * Generators + * + * Not patched as does not take a callback: + * Promise.coroutine.addYieldHandler() + * + * NB `options.yieldHandler` will run in whatever CLS context is active at time of `yield` + */ + + var addYieldHandler = Promise.coroutine.addYieldHandler; + shimCoroutine('coroutine', Promise, ns, v3); // shims `Promise.coroutine()` + Promise.coroutine.addYieldHandler = addYieldHandler; + + /* + * Utility + * + * Not patched as do not take a callback: + * .get() + * .return() / .thenReturn() + * .throw() / .thenThrow() + * .catchReturn() + * .catchThrow() + * Promise.getNewLibraryCopy() + * Promise.noConflict() + * Promise.setScheduler() + */ + + shimProto('tap', [0]); + if (v3) shimProto('tapCatch', [-1]); + shimCall(Promise, ns); // shims `.call()` + + /* + * Configuration + * + * Not patched as do not take a callback: + * Promise.config() + * .suppressUnhandledRejections() + * Promise.longStackTraces() + * Promise.hasLongStackTraces() + * + * Not patched as meaningless to do so: + * Promise.onPossiblyUnhandledRejection() + * Promise.onUnhandledRejectionHandled() + * + * NB Error handlers will run with unknown CLS context. + * CLS context should not be relied upon to be the context at the time error was thrown. + * Catch errors with `.catch()` instead! + */ + + shimProto('done', v3 ? [0, 1] : [0, 1, 2]); + + /* + * Progression (bluebird v2 only) + */ + + if (!v3) shimProto('progressed', [0]); + + /* + * Undocumented + * + * Not patched as do not take a callback: + * Promise.is() + * Promise.settle() / .settle() + * Promise.defer() / Promise.pending() + * .toString() + * .toJSON() + */ + + // `.fork()` does not exist in bluebird v3 + if (!v3) shimProto('fork', [0, 1, 2]); + + shimCoroutine('spawn', Promise, ns, v3); // shims `Promise.spawn()` + + // Return patched Bluebird constructor + return Promise; + + /* + * Patching functions + */ + function shimStatic(methodName, args) { + shimMethod(Promise, methodName, args, ns); + } + + function shimProto(methodName, args) { + shimMethod(Promise.prototype, methodName, args, ns); + } + + function shimBoth(methodName, args) { + shimProto(methodName, args); + shimStatic(methodName, args.map(function(arg) { return arg < 0 ? arg : arg + 1; })); + } +}; diff --git a/node_modules/cls-bluebird/lib/shimCall.js b/node_modules/cls-bluebird/lib/shimCall.js new file mode 100644 index 00000000..4510448b --- /dev/null +++ b/node_modules/cls-bluebird/lib/shimCall.js @@ -0,0 +1,50 @@ +'use strict'; + +/* + * cls-bluebird + * Function to shim `Promise.prototype.call` + */ + +// Modules +var shimmer = require('shimmer'); + +// Exports + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * Patch `call` method to run callbacks in current CLS context. + * + * @param {Function} Promise - Bluebird Promise constructor to patch + * @param {Object} ns - CLS namespace to bind callbacks to + * @returns {undefined} + */ +module.exports = function(Promise, ns) { + // Patch method + shimmer.wrap(Promise.prototype, 'call', function(callOriginal) { + return function() { + // Temporarily wrap `this._then` to bind the object method to current CLS context + // (`this.call()` will call `this._then()` synchronously) + var _thenOriginal = this._then, + ownProperty = hasOwnProperty.call(this, '_then'); + + this._then = function() { + // Unwrap `this._then` + if (ownProperty) { + this._then = _thenOriginal; + } else { + delete this._then; + } + + // Bind function that will be called to call object method to CLS context + arguments[0] = ns.bind(arguments[0]); + + // Run original `this._then` method + return _thenOriginal.apply(this, arguments); + }; + + // Call original `call` method + return callOriginal.apply(this, arguments); + }; + }); +}; diff --git a/node_modules/cls-bluebird/lib/shimCoroutine.js b/node_modules/cls-bluebird/lib/shimCoroutine.js new file mode 100644 index 00000000..9ba61cb6 --- /dev/null +++ b/node_modules/cls-bluebird/lib/shimCoroutine.js @@ -0,0 +1,85 @@ +'use strict'; + +/* + * cls-bluebird + * Function to shim `Promise.coroutine` + * + * Works by binding the `.next()` and `.throw()` methods of generator to CLS context + * at time when coroutine is executed. + * + * In bluebird v3.x, running the coroutine internally calls `.lastly()` if cancellation is enabled. + * To prevent unnecessary binding of the `.lastly()` callback to CLS context, this patch + * temporarily disables the patch on `Promise.prototype.lastly`. + * NB This patch could break if bluebird internals change, but this is covered by the tests. + */ + +// Modules +var shimmer = require('shimmer'); + +// Exports + +/** + * Patch `Promise.coroutine` or `Promise.spawn` to maintain current CLS context after all `yield` statements. + * + * @param {string} methodName - method name (either 'coroutine' or 'spawn') + * @param {Function} Promise - Bluebird Promise constructor to patch + * @param {Object} ns - CLS namespace to bind callbacks to + * @returns {undefined} + */ +module.exports = function(methodName, Promise, ns, v3) { + var lastlyPatched = Promise.prototype.lastly, + lastlyOriginal = Promise.prototype.lastly.__original; + + // Patch method + shimmer.wrap(Promise, methodName, function(original) { + return function(generatorFunction, options) { + // NB If `generatorFunction` is not a function, do not alter it. + // Pass value directly to bluebird which will throw an error. + if (typeof generatorFunction === 'function') { + // Create proxy generator function + var generatorFunctionOriginal = generatorFunction; + generatorFunction = function() { + // Create generator from generator function + var generator = generatorFunctionOriginal.apply(this, arguments); + + // Bind `.next()`, '.throw()' and `.return()` to current CLS context. + // NB CLS context is from when coroutine is called, not when created. + ['next', 'throw', 'return'].forEach(function(name) { + if (typeof generator[name] === 'function') generator[name] = ns.bind(generator[name]); + }); + + return generator; + }; + } + + // Temporarily remove patch from `Promise.prototype.lastly` in bluebird v3 + // to avoid unnecessary binding to CLS context. + var self = this; + if (methodName === 'spawn' && v3) { + return tempPatchLastly(function() { + return original.call(self, generatorFunction, options); + }); + } + + var fn = original.call(this, generatorFunction, options); + + if (methodName === 'coroutine' && v3) { + return function() { + var self = this, args = arguments; + return tempPatchLastly(function() { + return fn.apply(self, args); + }); + }; + } + + return fn; + }; + }); + + function tempPatchLastly(fn) { + Promise.prototype.lastly = lastlyOriginal; + var res = fn(); + Promise.prototype.lastly = lastlyPatched; + return res; + } +}; diff --git a/node_modules/cls-bluebird/lib/shimMethod.js b/node_modules/cls-bluebird/lib/shimMethod.js new file mode 100644 index 00000000..b8345f4c --- /dev/null +++ b/node_modules/cls-bluebird/lib/shimMethod.js @@ -0,0 +1,41 @@ +'use strict'; + +/* + * cls-bluebird + * Function to shim an object method to retain CLS context + */ + +// Modules +var shimmer = require('shimmer'); + +// Exports + +/** + * Patch method to run callbacks in current CLS context. + * + * @param {Object} obj - Object on which to find method + * @param {string} methodName - method name + * @param {Array} args - Array of indexes of arguments which are callbacks + * (negative numbers count from end e.g. -1 is last argument, -2 is penultimate) + * @param {Object} ns - CLS namespace to bind callbacks to + * @returns {undefined} + */ +module.exports = function(obj, methodName, args, ns) { + // Skip non-existent methods + if (!obj[methodName]) return; + + // Patch method + shimmer.wrap(obj, methodName, function(original) { + return function() { + for (var i = 0; i < args.length; i++) { + var argIndex = args[i]; + if (argIndex < 0) argIndex += arguments.length; + + var callback = arguments[argIndex]; + if (typeof callback === 'function') arguments[argIndex] = ns.bind(callback); + } + + return original.apply(this, arguments); + }; + }); +}; diff --git a/node_modules/cls-bluebird/lib/shimOnCancel.js b/node_modules/cls-bluebird/lib/shimOnCancel.js new file mode 100644 index 00000000..c4b26c40 --- /dev/null +++ b/node_modules/cls-bluebird/lib/shimOnCancel.js @@ -0,0 +1,44 @@ +'use strict'; + +/* + * cls-bluebird + * Function to shim `Promise.prototype._resolveFromExecutor` + * in order to patch `onCancel` handler in `new Promise()`. + */ + +// Modules +var shimmer = require('shimmer'); + +// Exports + +/** + * Patch `_resolveFromExecutor` proto method to run `onCancel` callbacks in current CLS context. + * + * @param {Function} Promise - Bluebird Promise constructor to patch + * @param {Object} ns - CLS namespace to bind callbacks to + * @returns {undefined} + */ +module.exports = function(Promise, ns) { + // Patch method + shimmer.wrap(Promise.prototype, '_resolveFromExecutor', function(_resolveFromExecutorOriginal) { + return function(executor) { + // Patch executor + var executorPatched = function() { + var onCancel = arguments[2]; + if (onCancel) { + // Patch onCancel function + arguments[2] = function(fn) { + // Bind onCancel handler to current CLS context + if (typeof fn === 'function') fn = ns.bind(fn); + return onCancel.call(this, fn); + }; + } + + return executor.apply(this, arguments); + }; + + // Call original method + return _resolveFromExecutorOriginal.call(this, executorPatched); + }; + }); +}; diff --git a/node_modules/cls-bluebird/lib/shimUsing.js b/node_modules/cls-bluebird/lib/shimUsing.js new file mode 100644 index 00000000..28ffcb64 --- /dev/null +++ b/node_modules/cls-bluebird/lib/shimUsing.js @@ -0,0 +1,114 @@ +'use strict'; + +/* + * cls-bluebird + * Function to shim `Promise.using` + * + * `Promise.using()` calls `.then()` and `.lastly` internally which leads to + * unnecessary CLS context binding with a naive patch. + * + * This custom patch intercepts calls to `Promise.all()` (v3) or `Promise.settle()` (v2) + * within `Promise.using()` and patches the resulting promise's `.then`/`.lastly` methods + * so they do not bind callbacks to CLS context. + * + * NB This patch could break if bluebird internals change, but this is covered by the tests. + */ + +// Modules +var shimmer = require('shimmer'); + +// Exports + +/** + * Patch `Promise.using` method to run callbacks in current CLS context. + * + * @param {Function} Promise - Bluebird Promise constructor to patch + * @param {Object} ns - CLS namespace to bind callbacks to + * @param {boolean} v3 - `true` if bluebird being patched is v3.x + * @returns {undefined} + */ +module.exports = function(Promise, ns, v3) { + (v3 ? patchV3 : patchV2)(Promise, ns); +}; + +// Patch for `Promise.using()` in bluebird v3 +function patchV3(Promise, ns) { + var thenOriginal = Promise.prototype.then.__original, + lastlyOriginal = Promise.prototype.lastly.__original; + + // Patch method + shimmer.wrap(Promise, 'using', function(usingOriginal) { + return function() { + // Bind `using` callback (last arg) + var argIndex = arguments.length - 1, + callback = arguments[argIndex]; + if (typeof callback === 'function') arguments[argIndex] = ns.bind(callback); + + // Temporarily patch `Promise.all()` + shimmer.wrap(Promise, 'all', function(allOriginal) { + return function(promises) { + // Remove temporary patch on `Promise.all()` + Promise.all = allOriginal; + + // Call original `Promise.all()` + var p = allOriginal.call(this, promises); + + // Patch `.then()` method on this promise to not bind callbacks + p.then = function() { + var p = thenOriginal.apply(this, arguments); + + // Patch `.lastly()` method on this promise to not bind callbacks + p.lastly = lastlyOriginal; + + return p; + }; + + return p; + }; + }); + + // Call original `Promise.using()` method + return usingOriginal.apply(this, arguments); + }; + }); +} + +// Patch for `Promise.using()` in bluebird v2 +function patchV2(Promise, ns) { + var thenOriginal = Promise.prototype.then.__original; + + // Patch method + shimmer.wrap(Promise, 'using', function(usingOriginal) { + return function() { + // Bind `using` callback (last arg) + var argIndex = arguments.length - 1, + callback = arguments[argIndex]; + if (typeof callback === 'function') arguments[argIndex] = ns.bind(callback); + + // Temporarily patch `Promise.settle()` + shimmer.wrap(Promise, 'settle', function(settleOriginal) { + return function(resources) { + // Remove temporary patch on `Promise.settle()` + Promise.settle = settleOriginal; + + // Call original `Promise.settle()` + var p = settleOriginal.call(this, resources); + + // Patch `.then()` method on this promise to not bind callbacks + p.then = function() { + var p = thenOriginal.apply(this, arguments); + + // Patch `.then()` method on this promise to not bind callbacks + p.then = thenOriginal; + return p; + }; + + return p; + }; + }); + + // Call original `Promise.using()` method + return usingOriginal.apply(this, arguments); + }; + }); +} diff --git a/node_modules/cls-bluebird/package.json b/node_modules/cls-bluebird/package.json new file mode 100644 index 00000000..f54e814d --- /dev/null +++ b/node_modules/cls-bluebird/package.json @@ -0,0 +1,58 @@ +{ + "name": "cls-bluebird", + "version": "2.1.0", + "description": "Make bluebird work with the continuation-local-storage module.", + "main": "lib/index.js", + "scripts": { + "test": "npm run jshint && npm run test-all", + "test-all": "npm run test-bluebird2 && npm run test-bluebird3", + "test-bluebird2": "BLUEBIRD_VERSION=2 npm run test-main", + "test-bluebird3": "BLUEBIRD_VERSION=3 npm run test-main", + "test-main": "mocha 'test/**/*.test.js'", + "jshint": "jshint lib test", + "cover": "npm run cover-main && rm -rf coverage", + "coveralls": "npm run cover-main && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", + "cover-main": "COVERAGE=true BLUEBIRD_VERSION=3 istanbul cover _mocha --report lcovonly -- -R spec 'test/**/*.test.js'", + "travis": "bin/travis.sh" + }, + "repository": { + "type": "git", + "url": "https://github.com/TimBeyer/cls-bluebird.git" + }, + "keywords": [ + "continuation-local-storage", + "cls", + "bluebird", + "continuation", + "local", + "storage", + "promise", + "promises", + "async", + "thread", + "glue", + "baling-wire", + "patch" + ], + "author": "Tim Beyer ", + "license": "BSD-2-Clause", + "bugs": { + "url": "https://github.com/TimBeyer/cls-bluebird/issues" + }, + "dependencies": { + "shimmer": "^1.1.0", + "is-bluebird": "^1.0.2" + }, + "devDependencies": { + "mocha": "^4.0.1", + "chai": "^4.1.2", + "jshint": "^2.9.5", + "istanbul": "^0.4.5", + "coveralls": "^3.0.0", + "continuation-local-storage": "^3.2.1", + "bluebird": "^2.10.2", + "bluebird2": "^3.0.0", + "bluebird3": "^3.1.1", + "lodash": "^4.17.4" + } +} diff --git a/node_modules/config-chain/LICENCE b/node_modules/config-chain/LICENCE new file mode 100644 index 00000000..171dd970 --- /dev/null +++ b/node_modules/config-chain/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2011 Dominic Tarr + +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/config-chain/index.js b/node_modules/config-chain/index.js new file mode 100755 index 00000000..0ef3a91f --- /dev/null +++ b/node_modules/config-chain/index.js @@ -0,0 +1,282 @@ +var ProtoList = require('proto-list') + , path = require('path') + , fs = require('fs') + , ini = require('ini') + , EE = require('events').EventEmitter + , url = require('url') + , http = require('http') + +var exports = module.exports = function () { + var args = [].slice.call(arguments) + , conf = new ConfigChain() + + while(args.length) { + var a = args.shift() + if(a) conf.push + ( 'string' === typeof a + ? json(a) + : a ) + } + + return conf +} + +//recursively find a file... + +var find = exports.find = function () { + var rel = path.join.apply(null, [].slice.call(arguments)) + + function find(start, rel) { + var file = path.join(start, rel) + try { + fs.statSync(file) + return file + } catch (err) { + if(path.dirname(start) !== start) // root + return find(path.dirname(start), rel) + } + } + return find(__dirname, rel) +} + +var parse = exports.parse = function (content, file, type) { + content = '' + content + // if we don't know what it is, try json and fall back to ini + // if we know what it is, then it must be that. + if (!type) { + try { return JSON.parse(content) } + catch (er) { return ini.parse(content) } + } else if (type === 'json') { + if (this.emit) { + try { return JSON.parse(content) } + catch (er) { this.emit('error', er) } + } else { + return JSON.parse(content) + } + } else { + return ini.parse(content) + } +} + +var json = exports.json = function () { + var args = [].slice.call(arguments).filter(function (arg) { return arg != null }) + var file = path.join.apply(null, args) + var content + try { + content = fs.readFileSync(file,'utf-8') + } catch (err) { + return + } + return parse(content, file, 'json') +} + +var env = exports.env = function (prefix, env) { + env = env || process.env + var obj = {} + var l = prefix.length + for(var k in env) { + if(k.indexOf(prefix) === 0) + obj[k.substring(l)] = env[k] + } + + return obj +} + +exports.ConfigChain = ConfigChain +function ConfigChain () { + EE.apply(this) + ProtoList.apply(this, arguments) + this._awaiting = 0 + this._saving = 0 + this.sources = {} +} + +// multi-inheritance-ish +var extras = { + constructor: { value: ConfigChain } +} +Object.keys(EE.prototype).forEach(function (k) { + extras[k] = Object.getOwnPropertyDescriptor(EE.prototype, k) +}) +ConfigChain.prototype = Object.create(ProtoList.prototype, extras) + +ConfigChain.prototype.del = function (key, where) { + // if not specified where, then delete from the whole chain, scorched + // earth style + if (where) { + var target = this.sources[where] + target = target && target.data + if (!target) { + return this.emit('error', new Error('not found '+where)) + } + delete target[key] + } else { + for (var i = 0, l = this.list.length; i < l; i ++) { + delete this.list[i][key] + } + } + return this +} + +ConfigChain.prototype.set = function (key, value, where) { + var target + + if (where) { + target = this.sources[where] + target = target && target.data + if (!target) { + return this.emit('error', new Error('not found '+where)) + } + } else { + target = this.list[0] + if (!target) { + return this.emit('error', new Error('cannot set, no confs!')) + } + } + target[key] = value + return this +} + +ConfigChain.prototype.get = function (key, where) { + if (where) { + where = this.sources[where] + if (where) where = where.data + if (where && Object.hasOwnProperty.call(where, key)) return where[key] + return undefined + } + return this.list[0][key] +} + +ConfigChain.prototype.save = function (where, type, cb) { + if (typeof type === 'function') cb = type, type = null + var target = this.sources[where] + if (!target || !(target.path || target.source) || !target.data) { + // TODO: maybe save() to a url target could be a PUT or something? + // would be easy to swap out with a reddis type thing, too + return this.emit('error', new Error('bad save target: '+where)) + } + + if (target.source) { + var pref = target.prefix || '' + Object.keys(target.data).forEach(function (k) { + target.source[pref + k] = target.data[k] + }) + return this + } + + var type = type || target.type + var data = target.data + if (target.type === 'json') { + data = JSON.stringify(data) + } else { + data = ini.stringify(data) + } + + this._saving ++ + fs.writeFile(target.path, data, 'utf8', function (er) { + this._saving -- + if (er) { + if (cb) return cb(er) + else return this.emit('error', er) + } + if (this._saving === 0) { + if (cb) cb() + this.emit('save') + } + }.bind(this)) + return this +} + +ConfigChain.prototype.addFile = function (file, type, name) { + name = name || file + var marker = {__source__:name} + this.sources[name] = { path: file, type: type } + this.push(marker) + this._await() + fs.readFile(file, 'utf8', function (er, data) { + if (er) this.emit('error', er) + this.addString(data, file, type, marker) + }.bind(this)) + return this +} + +ConfigChain.prototype.addEnv = function (prefix, env, name) { + name = name || 'env' + var data = exports.env(prefix, env) + this.sources[name] = { data: data, source: env, prefix: prefix } + return this.add(data, name) +} + +ConfigChain.prototype.addUrl = function (req, type, name) { + this._await() + var href = url.format(req) + name = name || href + var marker = {__source__:name} + this.sources[name] = { href: href, type: type } + this.push(marker) + http.request(req, function (res) { + var c = [] + var ct = res.headers['content-type'] + if (!type) { + type = ct.indexOf('json') !== -1 ? 'json' + : ct.indexOf('ini') !== -1 ? 'ini' + : href.match(/\.json$/) ? 'json' + : href.match(/\.ini$/) ? 'ini' + : null + marker.type = type + } + + res.on('data', c.push.bind(c)) + .on('end', function () { + this.addString(Buffer.concat(c), href, type, marker) + }.bind(this)) + .on('error', this.emit.bind(this, 'error')) + + }.bind(this)) + .on('error', this.emit.bind(this, 'error')) + .end() + + return this +} + +ConfigChain.prototype.addString = function (data, file, type, marker) { + data = this.parse(data, file, type) + this.add(data, marker) + return this +} + +ConfigChain.prototype.add = function (data, marker) { + if (marker && typeof marker === 'object') { + var i = this.list.indexOf(marker) + if (i === -1) { + return this.emit('error', new Error('bad marker')) + } + this.splice(i, 1, data) + marker = marker.__source__ + this.sources[marker] = this.sources[marker] || {} + this.sources[marker].data = data + // we were waiting for this. maybe emit 'load' + this._resolve() + } else { + if (typeof marker === 'string') { + this.sources[marker] = this.sources[marker] || {} + this.sources[marker].data = data + } + // trigger the load event if nothing was already going to do so. + this._await() + this.push(data) + process.nextTick(this._resolve.bind(this)) + } + return this +} + +ConfigChain.prototype.parse = exports.parse + +ConfigChain.prototype._await = function () { + this._awaiting++ +} + +ConfigChain.prototype._resolve = function () { + this._awaiting-- + if (this._awaiting === 0) this.emit('load', this) +} diff --git a/node_modules/config-chain/package.json b/node_modules/config-chain/package.json new file mode 100644 index 00000000..e6a1a70b --- /dev/null +++ b/node_modules/config-chain/package.json @@ -0,0 +1,30 @@ +{ + "name": "config-chain", + "version": "1.1.12", + "licenses": [ + { + "type": "MIT", + "url": "https://raw.githubusercontent.com/dominictarr/config-chain/master/LICENCE" + } + ], + "description": "HANDLE CONFIGURATION ONCE AND FOR ALL", + "homepage": "http://github.com/dominictarr/config-chain", + "repository": { + "type": "git", + "url": "https://github.com/dominictarr/config-chain.git" + }, + "files": [ + "index.js" + ], + "dependencies": { + "proto-list": "~1.2.1", + "ini": "^1.3.4" + }, + "devDependencies": { + "tap": "0.3.0" + }, + "author": "Dominic Tarr (http://dominictarr.com)", + "scripts": { + "test": "tap test/*" + } +} diff --git a/node_modules/config-chain/readme.markdown b/node_modules/config-chain/readme.markdown new file mode 100644 index 00000000..47f894c7 --- /dev/null +++ b/node_modules/config-chain/readme.markdown @@ -0,0 +1,257 @@ +# config-chain + +A module for loading custom configurations + +## NOTE: Feature Freeze + +[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) + +This module is frozen. + +In general, we recommend using [rc](https://github.com/dominictarr/rc) instead, +but as [npm](https://github.com/npmjs/npm) depends on this, it cannot be changed. + + +## Install + +```sh +yarn add config-chain + +# npm users +npm install --save config-chain +``` + +## Usage + +```js +const cc = require('config-chain'); + +console.log(cc.env('TERM_', process.env)); +/* +{ SESSION_ID: 'w1:5F38', + PROGRAM_VERSION: '3.1.2', + PROGRAM: 'iTerm.app' } +*/ +``` + +The `.env` function gets all the keys on the provided object which are +prefixed by the specified prefix, removes the prefix, and puts the values on a new object. + +
+ +## Full Usage + +``` js + + // npm install config-chain + + var cc = require('config-chain') + , opts = require('optimist').argv //ALWAYS USE OPTIMIST FOR COMMAND LINE OPTIONS. + , env = opts.env || process.env.YOUR_APP_ENV || 'dev' //SET YOUR ENV LIKE THIS. + + // EACH ARG TO CONFIGURATOR IS LOADED INTO CONFIGURATION CHAIN + // EARLIER ITEMS OVERIDE LATER ITEMS + // PUTS COMMAND LINE OPTS FIRST, AND DEFAULTS LAST! + + //strings are interpereted as filenames. + //will be loaded synchronously + + var conf = + cc( + //OVERRIDE SETTINGS WITH COMMAND LINE OPTS + opts, + + //ENV VARS IF PREFIXED WITH 'myApp_' + + cc.env('myApp_'), //myApp_foo = 'like this' + + //FILE NAMED BY ENV + path.join(__dirname, 'config.' + env + '.json'), + + //IF `env` is PRODUCTION + env === 'prod' + ? path.join(__dirname, 'special.json') //load a special file + : null //NULL IS IGNORED! + + //SUBDIR FOR ENV CONFIG + path.join(__dirname, 'config', env, 'config.json'), + + //SEARCH PARENT DIRECTORIES FROM CURRENT DIR FOR FILE + cc.find('config.json'), + + //PUT DEFAULTS LAST + { + host: 'localhost' + port: 8000 + }) + + var host = conf.get('host') + + // or + + var host = conf.store.host + +``` + +Finally, flexible configurations! 👌 + +## Custom Configuations + +```javascript +var cc = require('config-chain') + +// all the stuff you did before +var config = cc({ + some: 'object' + }, + cc.find('config.json'), + cc.env('myApp_') + ) + // CONFIGS AS A SERVICE, aka "CaaS", aka EVERY DEVOPS DREAM OMG! + .addUrl('http://configurator:1234/my-configs') + // ASYNC FTW! + .addFile('/path/to/file.json') + + // OBJECTS ARE OK TOO, they're SYNC but they still ORDER RIGHT + // BECAUSE PROMISES ARE USED BUT NO, NOT *THOSE* PROMISES, JUST + // ACTUAL PROMISES LIKE YOU MAKE TO YOUR MOM, KEPT OUT OF LOVE + .add({ another: 'object' }) + + // DIE A THOUSAND DEATHS IF THIS EVER HAPPENS!! + .on('error', function (er) { + // IF ONLY THERE WAS SOMETHIGN HARDER THAN THROW + // MY SORROW COULD BE ADEQUATELY EXPRESSED. /o\ + throw er + }) + + // THROW A PARTY IN YOUR FACE WHEN ITS ALL LOADED!! + .on('load', function (config) { + console.awesome('HOLY SHIT!') + }) +``` + +# API Docs + +## cc(...args) + +MAKE A CHAIN AND ADD ALL THE ARGS. + +If the arg is a STRING, then it shall be a JSON FILENAME. + +RETURN THE CHAIN! + +## cc.json(...args) + +Join the args into a JSON filename! + +SYNC I/O! + +## cc.find(relativePath) + +SEEK the RELATIVE PATH by climbing the TREE OF DIRECTORIES. + +RETURN THE FOUND PATH! + +SYNC I/O! + +## cc.parse(content, file, type) + +Parse the content string, and guess the type from either the +specified type or the filename. + +RETURN THE RESULTING OBJECT! + +NO I/O! + +## cc.env(prefix, env=process.env) + +Get all the keys on the provided object which are +prefixed by the specified prefix, removes the prefix, and puts the values on a new object. + +RETURN THE RESULTING OBJECT! + +NO I/O! + +## cc.ConfigChain() + +The ConfigChain class for CRAY CRAY JQUERY STYLE METHOD CHAINING! + +One of these is returned by the main exported function, as well. + +It inherits (prototypically) from +[ProtoList](https://github.com/isaacs/proto-list/), and also inherits +(parasitically) from +[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter) + +It has all the methods from both, and except where noted, they are +unchanged. + +### LET IT BE KNOWN THAT chain IS AN INSTANCE OF ConfigChain. + +## chain.sources + +A list of all the places where it got stuff. The keys are the names +passed to addFile or addUrl etc, and the value is an object with some +info about the data source. + +## chain.addFile(filename, type, [name=filename]) + +Filename is the name of the file. Name is an arbitrary string to be +used later if you desire. Type is either 'ini' or 'json', and will +try to guess intelligently if omitted. + +Loaded files can be saved later. + +## chain.addUrl(url, type, [name=url]) + +Same as the filename thing, but with a url. + +Can't be saved later. + +## chain.addEnv(prefix, env, [name='env']) + +Add all the keys from the env object that start with the prefix. + +## chain.addString(data, file, type, [name]) + +Parse the string and add it to the set. (Mainly used internally.) + +## chain.add(object, [name]) + +Add the object to the set. + +## chain.root {Object} + +The root from which all the other config objects in the set descend +prototypically. + +Put your defaults here. + +## chain.set(key, value, name) + +Set the key to the value on the named config object. If name is +unset, then set it on the first config object in the set. (That is, +the one with the highest priority, which was added first.) + +## chain.get(key, [name]) + +Get the key from the named config object explicitly, or from the +resolved configs if not specified. + +## chain.save(name, type) + +Write the named config object back to its origin. + +Currently only supported for env and file config types. + +For files, encode the data according to the type. + +## chain.on('save', function () {}) + +When one or more files are saved, emits `save` event when they're all +saved. + +## chain.on('load', function (chain) {}) + +When the config chain has loaded all the specified files and urls and +such, the 'load' event fires. diff --git a/node_modules/core-js/CHANGELOG.md b/node_modules/core-js/CHANGELOG.md new file mode 100644 index 00000000..a46f4624 --- /dev/null +++ b/node_modules/core-js/CHANGELOG.md @@ -0,0 +1,699 @@ +## Changelog +##### 2.6.9 [LEGACY] - 2019.05.27 +- Some fixes and improvements of the `postinstall` script like support `npm` color config ([#556](https://github.com/zloirock/core-js/issues/556)) or adding support of `ADBLOCK` env variable + +##### 2.6.8 [LEGACY] - 2019.05.22 +- Added a workaround of a strange `npx` bug on `postinstall`, [#551](https://github.com/zloirock/core-js/issues/551) + +##### 2.6.7 [LEGACY] - 2019.05.21 +- Added one more workaround of alternative not completely correct `Symbol` polyfills, [#550](https://github.com/zloirock/core-js/issues/550), [#554](https://github.com/zloirock/core-js/issues/554) + +##### 2.6.6 [LEGACY] - 2019.05.20 +- Fixed IE8- non-enumerable properties support in `Object.{ assign, entries, values }`, [#541](https://github.com/zloirock/core-js/issues/541) +- Fixed support of primitives in `Object.getOwnPropertySymbols` in Chrome 38 / 39, [#539](https://github.com/zloirock/core-js/issues/539) +- Show a message on `postinstall` + +##### 2.6.5 - 2019.02.15 +- Fixed buggy `String#padStart` and `String#padEnd` mobile Safari implementations, [#414](https://github.com/zloirock/core-js/issues/414). + +##### 2.6.4 - 2019.02.07 +- Added a workaround against crushing an old IE11.0.9600.16384 build, [#485](https://github.com/zloirock/core-js/issues/485). + +##### 2.6.3 - 2019.01.22 +- Added a workaround for `babel-minify` bug, [#479](https://github.com/zloirock/core-js/issues/479) + +##### 2.6.2 - 2019.01.10 +- Fixed handling of `$` in `String#replace`, [#471](https://github.com/zloirock/core-js/issues/471) + +##### 2.6.1 - 2018.12.18 +- Fixed an issue with minified version, [#463](https://github.com/zloirock/core-js/issues/463) + +##### 2.6.0 - 2018.12.05 +- Add direct .exec calling to `RegExp#{@@replace, @@split, @@match, @@search}`. Also, added fixes for `RegExp#exec` method. [#411](https://github.com/zloirock/core-js/issues/411), [#428](https://github.com/zloirock/core-js/issues/428), [#434](https://github.com/zloirock/core-js/issues/434), [#435](https://github.com/zloirock/core-js/issues/435), [#453](https://github.com/zloirock/core-js/issues/453), [#458](https://github.com/zloirock/core-js/issues/458), thanks [**@nicolo-ribaudo**](https://github.com/nicolo-ribaudo). + +##### 2.5.7 - 2018.05.26 +- Get rid of reserved variable name `final`, related [#400](https://github.com/zloirock/core-js/issues/400) + +##### 2.5.6 - 2018.05.07 +- Forced replace native `Promise` in V8 6.6 (Node 10 and Chrome 66) because of [a bug with resolving custom thenables](https://bugs.chromium.org/p/chromium/issues/detail?id=830565) +- Added a workaround for usage buggy native LG WebOS 2 `Promise` in microtask implementation, [#396](https://github.com/zloirock/core-js/issues/396) +- Added modern version internal debugging information about used versions + +##### 2.5.5 - 2018.04.08 +- Fix some edge cases of `Reflect.set`, [#392](https://github.com/zloirock/core-js/issues/392) and [#393](https://github.com/zloirock/core-js/issues/393) + +##### 2.5.4 - 2018.03.27 +- Fixed one case of deoptimization built-in iterators in V8, related [#377](https://github.com/zloirock/core-js/issues/377) +- Fixed some cases of iterators feature detection, [#368](https://github.com/zloirock/core-js/issues/368) +- Fixed manually entered NodeJS domains issue in `Promise`, [#367](https://github.com/zloirock/core-js/issues/367) +- Fixed `Number.{parseInt, parseFloat}` entry points +- Fixed `__(define|lookup)[GS]etter__` import in the `library` version + +##### 2.5.3 - 2017.12.12 +- Fixed calling `onunhandledrejectionhandler` multiple times for one `Promise` chain, [#318](https://github.com/zloirock/core-js/issues/318) +- Forced replacement of `String#{padStart, padEnd}` in Safari 10 because of [a bug](https://bugs.webkit.org/show_bug.cgi?id=161944), [#280](https://github.com/zloirock/core-js/issues/280) +- Fixed `Array#@@iterator` in a very rare version of `WebKit`, [#236](https://github.com/zloirock/core-js/issues/236) and [#237](https://github.com/zloirock/core-js/issues/237) +- One more [#345](https://github.com/zloirock/core-js/issues/345)-related fix + +##### 2.5.2 - 2017.12.09 +- `MutationObserver` no longer used for microtask implementation in iOS Safari because of bug with scrolling, [#339](https://github.com/zloirock/core-js/issues/339) +- Fixed `JSON.stringify(undefined, replacer)` case in the wrapper from the `Symbol` polyfill, [#345](https://github.com/zloirock/core-js/issues/345) +- `Array()` calls changed to `new Array()` for V8 optimisation + +##### 2.5.1 - 2017.09.01 +- Updated `Promise#finally` per [tc39/proposal-promise-finally#37](https://github.com/tc39/proposal-promise-finally/issues/37) +- Optimized usage of some internal helpers for reducing size of `shim` version +- Fixed some entry points for virtual methods + +##### 2.5.0 - 2017.08.05 +- Added `Promise#finally` [stage 3 proposal](https://github.com/tc39/proposal-promise-finally), [#225](https://github.com/zloirock/core-js/issues/225) +- Added `Promise.try` [stage 1 proposal](https://github.com/tc39/proposal-promise-try) +- Added `Array#flatten` and `Array#flatMap` [stage 1 proposal](https://tc39.github.io/proposal-flatMap) +- Added `.of` and `.from` methods on collection constructors [stage 1 proposal](https://github.com/tc39/proposal-setmap-offrom): + - `Map.of` + - `Set.of` + - `WeakSet.of` + - `WeakMap.of` + - `Map.from` + - `Set.from` + - `WeakSet.from` + - `WeakMap.from` +- Added `Math` extensions [stage 1 proposal](https://github.com/rwaldron/proposal-math-extensions), [#226](https://github.com/zloirock/core-js/issues/226): + - `Math.clamp` + - `Math.DEG_PER_RAD` + - `Math.degrees` + - `Math.fscale` + - `Math.RAD_PER_DEG` + - `Math.radians` + - `Math.scale` +- Added `Math.signbit` [stage 1 proposal](http://jfbastien.github.io/papers/Math.signbit.html) +- Updated `global` [stage 3 proposal](https://github.com/tc39/proposal-global) - added `global` global object, `System.global` deprecated +- Updated `Object.getOwnPropertyDescriptors` to the [final version](https://tc39.github.io/ecma262/2017/#sec-object.getownpropertydescriptors) - it should not create properties if descriptors are `undefined` +- Updated the list of iterable DOM collections, [#249](https://github.com/zloirock/core-js/issues/249), added: + - `CSSStyleDeclaration#@@iterator` + - `CSSValueList#@@iterator` + - `ClientRectList#@@iterator` + - `DOMRectList#@@iterator` + - `DOMStringList#@@iterator` + - `DataTransferItemList#@@iterator` + - `FileList#@@iterator` + - `HTMLAllCollection#@@iterator` + - `HTMLCollection#@@iterator` + - `HTMLFormElement#@@iterator` + - `HTMLSelectElement#@@iterator` + - `MimeTypeArray#@@iterator` + - `NamedNodeMap#@@iterator` + - `PaintRequestList#@@iterator` + - `Plugin#@@iterator` + - `PluginArray#@@iterator` + - `SVGLengthList#@@iterator` + - `SVGNumberList#@@iterator` + - `SVGPathSegList#@@iterator` + - `SVGPointList#@@iterator` + - `SVGStringList#@@iterator` + - `SVGTransformList#@@iterator` + - `SourceBufferList#@@iterator` + - `TextTrackCueList#@@iterator` + - `TextTrackList#@@iterator` + - `TouchList#@@iterator` +- Updated stages of proposals: + - [`Object.getOwnPropertyDescriptors`](https://github.com/tc39/proposal-object-getownpropertydescriptors) to [stage 4 (ES2017)](https://tc39.github.io/ecma262/2017/#sec-object.getownpropertydescriptors) + - [String padding](https://github.com/tc39/proposal-string-pad-start-end) to [stage 4 (ES2017)](https://tc39.github.io/ecma262/2017/#sec-string.prototype.padend) + - [`global`](https://github.com/tc39/proposal-global) to [stage 3](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#revisit-systemglobal--global) + - [String trimming](https://github.com/tc39/proposal-string-left-right-trim) to [stage 2](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-07/jul-27.md#10iic-trimstarttrimend) +- Updated typed arrays to the modern (ES2016+) arguments validation, +[#293](https://github.com/zloirock/core-js/pull/293) +- Fixed `%TypedArray%.from` Safari bug, [#285](https://github.com/zloirock/core-js/issues/285) +- Fixed compatibility with old version of Prototype.js, [#278](https://github.com/zloirock/core-js/issues/278), [#289](https://github.com/zloirock/core-js/issues/289) +- `Function#name` no longer cache the result for correct behaviour with inherited constructors, [#296](https://github.com/zloirock/core-js/issues/296) +- Added errors on incorrect context of collection methods, [#272](https://github.com/zloirock/core-js/issues/272) +- Fixed conversion typed array constructors to string, fix [#300](https://github.com/zloirock/core-js/issues/300) +- Fixed `Set#size` with debugger ReactNative for Android, [#297](https://github.com/zloirock/core-js/issues/297) +- Fixed an issue with Electron-based debugger, [#230](https://github.com/zloirock/core-js/issues/230) +- Fixed compatibility with incomplete third-party `WeakMap` polyfills, [#252](https://github.com/zloirock/core-js/pull/252) +- Added a fallback for `Date#toJSON` in engines without native `Date#toISOString`, [#220](https://github.com/zloirock/core-js/issues/220) +- Added support for Sphere Dispatch API, [#286](https://github.com/zloirock/core-js/pull/286) +- Seriously changed the coding style and the [ESLint config](https://github.com/zloirock/core-js/blob/master/.eslintrc.js) +- Updated many dev dependencies (`webpack`, `uglify`, etc) +- Some other minor fixes and optimizations + +##### 2.4.1 - 2016.07.18 +- Fixed `script` tag for some parsers, [#204](https://github.com/zloirock/core-js/issues/204), [#216](https://github.com/zloirock/core-js/issues/216) +- Removed some unused variables, [#217](https://github.com/zloirock/core-js/issues/217), [#218](https://github.com/zloirock/core-js/issues/218) +- Fixed MS Edge `Reflect.construct` and `Reflect.apply` - they should not allow primitive as `argumentsList` argument + +##### 1.2.7 [LEGACY] - 2016.07.18 +- Some fixes for issues like [#159](https://github.com/zloirock/core-js/issues/159), [#186](https://github.com/zloirock/core-js/issues/186), [#194](https://github.com/zloirock/core-js/issues/194), [#207](https://github.com/zloirock/core-js/issues/207) + +##### 2.4.0 - 2016.05.08 +- Added `Observable`, [stage 1 proposal](https://github.com/zenparsing/es-observable) +- Fixed behavior `Object.{getOwnPropertySymbols, getOwnPropertyDescriptor}` and `Object#propertyIsEnumerable` on `Object.prototype` +- `Reflect.construct` and `Reflect.apply` should throw an error if `argumentsList` argument is not an object, [#194](https://github.com/zloirock/core-js/issues/194) + +##### 2.3.0 - 2016.04.24 +- Added `asap` for enqueuing microtasks, [stage 0 proposal](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask) +- Added well-known symbol `Symbol.asyncIterator` for [stage 2 async iteration proposal](https://github.com/tc39/proposal-async-iteration) +- Added well-known symbol `Symbol.observable` for [stage 1 observables proposal](https://github.com/zenparsing/es-observable) +- `String#{padStart, padEnd}` returns original string if filler is empty string, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#stringprototypepadstartpadend) +- `Object.values` and `Object.entries` moved to stage 4 from 3, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#objectvalues--objectentries) +- `System.global` moved to stage 2 from 1, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#systemglobal) +- `Map#toJSON` and `Set#toJSON` rejected and will be removed from the next major release, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-31.md#mapprototypetojsonsetprototypetojson) +- `Error.isError` withdrawn and will be removed from the next major release, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#erroriserror) +- Added fallback for `Function#name` on non-extensible functions and functions with broken `toString` conversion, [#193](https://github.com/zloirock/core-js/issues/193) + +##### 2.2.2 - 2016.04.06 +- Added conversion `-0` to `+0` to `Array#{indexOf, lastIndexOf}`, [ES2016 fix](https://github.com/tc39/ecma262/pull/316) +- Added fixes for some `Math` methods in Tor Browser +- `Array.{from, of}` no longer calls prototype setters +- Added workaround over Chrome DevTools strange behavior, [#186](https://github.com/zloirock/core-js/issues/186) + +##### 2.2.1 - 2016.03.19 +- Fixed `Object.getOwnPropertyNames(window)` `2.1+` versions bug, [#181](https://github.com/zloirock/core-js/issues/181) + +##### 2.2.0 - 2016.03.15 +- Added `String#matchAll`, [proposal](https://github.com/tc39/String.prototype.matchAll) +- Added `Object#__(define|lookup)[GS]etter__`, [annex B ES2017](https://github.com/tc39/ecma262/pull/381) +- Added `@@toPrimitive` methods to `Date` and `Symbol` +- Fixed `%TypedArray%#slice` in Edge ~ 13 (throws with `@@species` and wrapped / inherited constructor) +- Some other minor fixes + +##### 2.1.5 - 2016.03.12 +- Improved support NodeJS domains in `Promise#then`, [#180](https://github.com/zloirock/core-js/issues/180) +- Added fallback for `Date#toJSON` bug in Qt Script, [#173](https://github.com/zloirock/core-js/issues/173#issuecomment-193972502) + +##### 2.1.4 - 2016.03.08 +- Added fallback for `Symbol` polyfill in Qt Script, [#173](https://github.com/zloirock/core-js/issues/173) +- Added one more fallback for IE11 `Script Access Denied` error with iframes, [#165](https://github.com/zloirock/core-js/issues/165) + +##### 2.1.3 - 2016.02.29 +- Added fallback for [`es6-promise` package bug](https://github.com/stefanpenner/es6-promise/issues/169), [#176](https://github.com/zloirock/core-js/issues/176) + +##### 2.1.2 - 2016.02.29 +- Some minor `Promise` fixes: + - Browsers `rejectionhandled` event better HTML spec complaint + - Errors in unhandled rejection handlers should not cause any problems + - Fixed typo in feature detection + +##### 2.1.1 - 2016.02.22 +- Some `Promise` improvements: + - Feature detection: + - **Added detection unhandled rejection tracking support - now it's available everywhere**, [#140](https://github.com/zloirock/core-js/issues/140) + - Added detection `@@species` pattern support for completely correct subclassing + - Removed usage `Object.setPrototypeOf` from feature detection and noisy console message about it in FF + - `Promise.all` fixed for some very specific cases + +##### 2.1.0 - 2016.02.09 +- **API**: + - ES5 polyfills are split and logic, used in other polyfills, moved to internal modules + - **All entry point works in ES3 environment like IE8- without `core-js/(library/)es5`** + - **Added all missed single entry points for ES5 polyfills** + - Separated ES5 polyfills moved to the ES6 namespace. Why? + - Mainly, for prevent duplication features in different namespaces - logic of most required ES5 polyfills changed in ES6+: + - Already added changes for: `Object` statics - should accept primitives, new whitespaces lists in `String#trim`, `parse(Int|float)`, `RegExp#toString` logic, `String#split`, etc + - Should be changed in the future: `@@species` and `ToLength` logic in `Array` methods, `Date` parsing, `Function#bind`, etc + - Should not be changed only several features like `Array.isArray` and `Date.now` + - Some ES5 polyfills required for modern engines + - All old entry points should work fine, but in the next major release API can be changed + - `Object.getOwnPropertyDescriptors` moved to the stage 3, [January TC39 meeting](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-01/2016-01-28.md#objectgetownpropertydescriptors-to-stage-3-jordan-harband-low-priority-but-super-quick) + - Added `umd` option for [custom build process](https://github.com/zloirock/core-js#custom-build-from-external-scripts), [#169](https://github.com/zloirock/core-js/issues/169) + - Returned entry points for `Array` statics, removed in `2.0`, for compatibility with `babel` `6` and for future fixes +- **Deprecated**: + - `Reflect.enumerate` deprecated and will be removed from the next major release, [January TC39 meeting](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-01/2016-01-28.md#5xix-revisit-proxy-enumerate---revisit-decision-to-exhaust-iterator) +- **New Features**: + - Added [`Reflect` metadata API](https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md) as a pre-strawman feature, [#152](https://github.com/zloirock/core-js/issues/152): + - `Reflect.defineMetadata` + - `Reflect.deleteMetadata` + - `Reflect.getMetadata` + - `Reflect.getMetadataKeys` + - `Reflect.getOwnMetadata` + - `Reflect.getOwnMetadataKeys` + - `Reflect.hasMetadata` + - `Reflect.hasOwnMetadata` + - `Reflect.metadata` + - Implementation / fixes `Date#toJSON` + - Fixes for `parseInt` and `Number.parseInt` + - Fixes for `parseFloat` and `Number.parseFloat` + - Fixes for `RegExp#toString` + - Fixes for `Array#sort` + - Fixes for `Number#toFixed` + - Fixes for `Number#toPrecision` + - Additional fixes for `String#split` (`RegExp#@@split`) +- **Improvements**: + - Correct subclassing wrapped collections, `Number` and `RegExp` constructors with native class syntax + - Correct support `SharedArrayBuffer` and buffers from other realms in typed arrays wrappers + - Additional validations for `Object.{defineProperty, getOwnPropertyDescriptor}` and `Reflect.defineProperty` +- **Bug Fixes**: + - Fixed some cases `Array#lastIndexOf` with negative second argument + +##### 2.0.3 - 2016.01.11 +- Added fallback for V8 ~ Chrome 49 `Promise` subclassing bug causes unhandled rejection on feature detection, [#159](https://github.com/zloirock/core-js/issues/159) +- Added fix for very specific environments with global `window === null` + +##### 2.0.2 - 2016.01.04 +- Temporarily removed `length` validation from `Uint8Array` constructor wrapper. Reason - [bug in `ws` module](https://github.com/websockets/ws/pull/645) (-> `socket.io`) which passes to `Buffer` constructor -> `Uint8Array` float and uses [the `V8` bug](https://code.google.com/p/v8/issues/detail?id=4552) for conversion to int (by the spec should be thrown an error). [It creates problems for many people.](https://github.com/karma-runner/karma/issues/1768) I hope, it will be returned after fixing this bug in `V8`. + +##### 2.0.1 - 2015.12.31 +- Forced usage `Promise.resolve` polyfill in the `library` version for correct work with wrapper +- `Object.assign` should be defined in the strict mode -> throw an error on extension non-extensible objects, [#154](https://github.com/zloirock/core-js/issues/154) + +##### 2.0.0 - 2015.12.24 +- Added implementations and fixes [Typed Arrays](https://github.com/zloirock/core-js#ecmascript-6-typed-arrays)-related features + - `ArrayBuffer`, `ArrayBuffer.isView`, `ArrayBuffer#slice` + - `DataView` with all getter / setter methods + - `Int8Array`, `Uint8Array`, `Uint8ClampedArray`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `Float32Array` and `Float64Array` constructors + - `%TypedArray%.{for, of}`, `%TypedArray%#{copyWithin, every, fill, filter, find, findIndex, forEach, indexOf, includes, join, lastIndexOf, map, reduce, reduceRight, reverse, set, slice, some, sort, subarray, values, keys, entries, @@iterator, ...}` +- Added [`System.global`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/tc39/proposal-global), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-19.md#systemglobal-jhd) +- Added [`Error.isError`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/ljharb/proposal-is-error), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-19.md#jhd-erroriserror) +- Added [`Math.{iaddh, isubh, imulh, umulh}`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703) +- `RegExp.escape` moved from the `es7` to the non-standard `core` namespace, [July TC39 meeting](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-28.md#62-regexpescape) - too slow, but it's condition of stability, [#116](https://github.com/zloirock/core-js/issues/116) +- [`Promise`](https://github.com/zloirock/core-js#ecmascript-6-promise) + - Some performance optimisations + - Added basic support [`rejectionHandled` event / `onrejectionhandled` handler](https://github.com/zloirock/core-js#unhandled-rejection-tracking) to the polyfill + - Removed usage `@@species` from `Promise.{all, race}`, [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-18.md#conclusionresolution-2) +- Some improvements [collections polyfills](https://github.com/zloirock/core-js#ecmascript-6-collections) + - `O(1)` and preventing possible leaks with frozen keys, [#134](https://github.com/zloirock/core-js/issues/134) + - Correct observable state object keys +- Renamed `String#{padLeft, padRight}` -> [`String#{padStart, padEnd}`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/tc39/proposal-string-pad-start-end), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-17.md#conclusionresolution-2) (they want to rename it on each meeting?O_o), [#132](https://github.com/zloirock/core-js/issues/132) +- Added [`String#{trimStart, trimEnd}` as aliases for `String#{trimLeft, trimRight}`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-17.md#conclusionresolution-2) +- Added [annex B HTML methods](https://github.com/zloirock/core-js#ecmascript-6-string) - ugly, but also [the part of the spec](http://www.ecma-international.org/ecma-262/6.0/#sec-string.prototype.anchor) +- Added little fix for [`Date#toString`](https://github.com/zloirock/core-js#ecmascript-6-date) - `new Date(NaN).toString()` [should be `'Invalid Date'`](http://www.ecma-international.org/ecma-262/6.0/#sec-todatestring) +- Added [`{keys, values, entries, @@iterator}` methods to DOM collections](https://github.com/zloirock/core-js#iterable-dom-collections) which should have [iterable interface](https://heycam.github.io/webidl/#idl-iterable) or should be [inherited from `Array`](https://heycam.github.io/webidl/#LegacyArrayClass) - `NodeList`, `DOMTokenList`, `MediaList`, `StyleSheetList`, `CSSRuleList`. +- Removed Mozilla `Array` generics - [deprecated and will be removed from FF](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array#Array_generic_methods), [looks like strawman is dead](http://wiki.ecmascript.org/doku.php?id=strawman:array_statics), available [alternative shim](https://github.com/plusdude/array-generics) +- Removed `core.log` module +- CommonJS API + - Added entry points for [virtual methods](https://github.com/zloirock/core-js#commonjs-and-prototype-methods-without-global-namespace-pollution) + - Added entry points for [stages proposals](https://github.com/zloirock/core-js#ecmascript-7-proposals) + - Some other minor changes +- [Custom build from external scripts](https://github.com/zloirock/core-js#custom-build-from-external-scripts) moved to the separate package for preventing problems with dependencies +- Changed `$` prefix for internal modules file names because Team Foundation Server does not support it, [#129](https://github.com/zloirock/core-js/issues/129) +- Additional fix for `SameValueZero` in V8 ~ Chromium 39-42 collections +- Additional fix for FF27 `Array` iterator +- Removed usage shortcuts for `arguments` object - old WebKit bug, [#150](https://github.com/zloirock/core-js/issues/150) +- `{Map, Set}#forEach` non-generic, [#144](https://github.com/zloirock/core-js/issues/144) +- Many other improvements + +##### 1.2.6 - 2015.11.09 +* Reject with `TypeError` on attempt resolve promise itself +* Correct behavior with broken `Promise` subclass constructors / methods +* Added `Promise`-based fallback for microtask +* Fixed V8 and FF `Array#{values, @@iterator}.name` +* Fixed IE7- `[1, 2].join(undefined) -> '1,2'` +* Some other fixes / improvements / optimizations + +##### 1.2.5 - 2015.11.02 +* Some more `Number` constructor fixes: + * Fixed V8 ~ Node 0.8 bug: `Number('+0x1')` should be `NaN` + * Fixed `Number(' 0b1\n')` case, should be `1` + * Fixed `Number()` case, should be `0` + +##### 1.2.4 - 2015.11.01 +* Fixed `Number('0b12') -> NaN` case in the shim +* Fixed V8 ~ Chromium 40- bug - `Weak(Map|Set)#{delete, get, has}` should not throw errors [#124](https://github.com/zloirock/core-js/issues/124) +* Some other fixes and optimizations + +##### 1.2.3 - 2015.10.23 +* Fixed some problems related old V8 bug `Object('a').propertyIsEnumerable(0) // => false`, for example, `Object.assign({}, 'qwe')` from the last release +* Fixed `.name` property and `Function#toString` conversion some polyfilled methods +* Fixed `Math.imul` arity in Safari 8- + +##### 1.2.2 - 2015.10.18 +* Improved optimisations for V8 +* Fixed build process from external packages, [#120](https://github.com/zloirock/core-js/pull/120) +* One more `Object.{assign, values, entries}` fix for [**very** specific case](https://github.com/ljharb/proposal-object-values-entries/issues/5) + +##### 1.2.1 - 2015.10.02 +* Replaced fix `JSON.stringify` + `Symbol` behavior from `.toJSON` method to wrapping `JSON.stringify` - little more correct, [compat-table/642](https://github.com/kangax/compat-table/pull/642) +* Fixed typo which broke tasks scheduler in WebWorkers in old FF, [#114](https://github.com/zloirock/core-js/pull/114) + +##### 1.2.0 - 2015.09.27 +* Added browser [`Promise` rejection hook](#unhandled-rejection-tracking), [#106](https://github.com/zloirock/core-js/issues/106) +* Added correct [`IsRegExp`](http://www.ecma-international.org/ecma-262/6.0/#sec-isregexp) logic to [`String#{includes, startsWith, endsWith}`](https://github.com/zloirock/core-js/#ecmascript-6-string) and [`RegExp` constructor](https://github.com/zloirock/core-js/#ecmascript-6-regexp), `@@match` case, [example](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/match#Disabling_the_isRegExp_check) +* Updated [`String#leftPad`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) [with proposal](https://github.com/ljharb/proposal-string-pad-left-right/issues/6): string filler truncated from the right side +* Replaced V8 [`Object.assign`](https://github.com/zloirock/core-js/#ecmascript-6-object) - its properties order not only [incorrect](https://github.com/sindresorhus/object-assign/issues/22), it is non-deterministic and it causes some problems +* Fixed behavior with deleted in getters properties for `Object.{`[`assign`](https://github.com/zloirock/core-js/#ecmascript-6-object)`, `[`entries, values`](https://github.com/zloirock/core-js/#ecmascript-7-proposals)`}`, [example](http://goo.gl/iQE01c) +* Fixed [`Math.sinh`](https://github.com/zloirock/core-js/#ecmascript-6-math) with very small numbers in V8 near Chromium 38 +* Some other fixes and optimizations + +##### 1.1.4 - 2015.09.05 +* Fixed support symbols in FF34-35 [`Object.assign`](https://github.com/zloirock/core-js/#ecmascript-6-object) +* Fixed [collections iterators](https://github.com/zloirock/core-js/#ecmascript-6-iterators) in FF25-26 +* Fixed non-generic WebKit [`Array.of`](https://github.com/zloirock/core-js/#ecmascript-6-array) +* Some other fixes and optimizations + +##### 1.1.3 - 2015.08.29 +* Fixed support Node.js domains in [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise), [#103](https://github.com/zloirock/core-js/issues/103) + +##### 1.1.2 - 2015.08.28 +* Added `toJSON` method to [`Symbol`](https://github.com/zloirock/core-js/#ecmascript-6-symbol) polyfill and to MS Edge implementation for expected `JSON.stringify` result w/o patching this method +* Replaced [`Reflect.construct`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) implementations w/o correct support third argument +* Fixed `global` detection with changed `document.domain` in ~IE8, [#100](https://github.com/zloirock/core-js/issues/100) + +##### 1.1.1 - 2015.08.20 +* Added more correct microtask implementation for [`Promise`](#ecmascript-6-promise) + +##### 1.1.0 - 2015.08.17 +* Updated [string padding](https://github.com/zloirock/core-js/#ecmascript-7-proposals) to [actual proposal](https://github.com/ljharb/proposal-string-pad-left-right) - renamed, minor internal changes: + * `String#lpad` -> `String#padLeft` + * `String#rpad` -> `String#padRight` +* Added [string trim functions](#ecmascript-7-proposals) - [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim), defacto standard - required only for IE11- and fixed for some old engines: + * `String#trimLeft` + * `String#trimRight` +* [`String#trim`](https://github.com/zloirock/core-js/#ecmascript-6-string) fixed for some engines by es6 spec and moved from `es5` to single `es6` module +* Splitted [`es6.object.statics-accept-primitives`](https://github.com/zloirock/core-js/#ecmascript-6-object) +* Caps for `freeze`-family `Object` methods moved from `es5` to `es6` namespace and joined with [es6 wrappers](https://github.com/zloirock/core-js/#ecmascript-6-object) +* `es5` [namespace](https://github.com/zloirock/core-js/#commonjs) also includes modules, moved to `es6` namespace - you can use it as before +* Increased `MessageChannel` priority in `$.task`, [#95](https://github.com/zloirock/core-js/issues/95) +* Does not get `global.Symbol` on each getting iterator, if you wanna use alternative `Symbol` shim - add it before `core-js` +* [`Reflect.construct`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) optimized and fixed for some cases +* Simplified [`Reflect.enumerate`](https://github.com/zloirock/core-js/#ecmascript-6-reflect), see [this question](https://esdiscuss.org/topic/question-about-enumerate-and-property-decision-timing) +* Some corrections in [`Math.acosh`](https://github.com/zloirock/core-js/#ecmascript-6-math) +* Fixed [`Math.imul`](https://github.com/zloirock/core-js/#ecmascript-6-math) for old WebKit +* Some fixes in string / RegExp [well-known symbols](https://github.com/zloirock/core-js/#ecmascript-6-regexp) logic +* Some other fixes and optimizations + +##### 1.0.1 - 2015.07.31 +* Some fixes for final MS Edge, replaced broken native `Reflect.defineProperty` +* Some minor fixes and optimizations +* Changed compression `client/*.min.js` options for safe `Function#name` and `Function#length`, should be fixed [#92](https://github.com/zloirock/core-js/issues/92) + +##### 1.0.0 - 2015.07.22 +* Added logic for [well-known symbols](https://github.com/zloirock/core-js/#ecmascript-6-regexp): + * `Symbol.match` + * `Symbol.replace` + * `Symbol.split` + * `Symbol.search` +* Actualized and optimized work with iterables: + * Optimized [`Map`, `Set`, `WeakMap`, `WeakSet` constructors](https://github.com/zloirock/core-js/#ecmascript-6-collections), [`Promise.all`, `Promise.race`](https://github.com/zloirock/core-js/#ecmascript-6-promise) for default `Array Iterator` + * Optimized [`Array.from`](https://github.com/zloirock/core-js/#ecmascript-6-array) for default `Array Iterator` + * Added [`core.getIteratorMethod`](https://github.com/zloirock/core-js/#ecmascript-6-iterators) helper +* Uses enumerable properties in shimmed instances - collections, iterators, etc for optimize performance +* Added support native constructors to [`Reflect.construct`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) with 2 arguments +* Added support native constructors to [`Function#bind`](https://github.com/zloirock/core-js/#ecmascript-5) shim with `new` +* Removed obsolete `.clear` methods native [`Weak`-collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) +* Maximum modularity, reduced minimal custom build size, separated into submodules: + * [`es6.reflect`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) + * [`es6.regexp`](https://github.com/zloirock/core-js/#ecmascript-6-regexp) + * [`es6.math`](https://github.com/zloirock/core-js/#ecmascript-6-math) + * [`es6.number`](https://github.com/zloirock/core-js/#ecmascript-6-number) + * [`es7.object.to-array`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) + * [`core.object`](https://github.com/zloirock/core-js/#object) + * [`core.string`](https://github.com/zloirock/core-js/#escaping-strings) + * [`core.iter-helpers`](https://github.com/zloirock/core-js/#ecmascript-6-iterators) + * Internal modules (`$`, `$.iter`, etc) +* Many other optimizations +* Final cleaning non-standard features + * Moved `$for` to [separate library](https://github.com/zloirock/forof). This work for syntax - `for-of` loop and comprehensions + * Moved `Date#{format, formatUTC}` to [separate library](https://github.com/zloirock/dtf). Standard way for this - `ECMA-402` + * Removed `Math` methods from `Number.prototype`. Slight sugar for simple `Math` methods calling + * Removed `{Array#, Array, Dict}.turn` + * Removed `core.global` +* Uses `ToNumber` instead of `ToLength` in [`Number Iterator`](https://github.com/zloirock/core-js/#number-iterator), `Array.from(2.5)` will be `[0, 1, 2]` instead of `[0, 1]` +* Fixed [#85](https://github.com/zloirock/core-js/issues/85) - invalid `Promise` unhandled rejection message in nested `setTimeout` +* Fixed [#86](https://github.com/zloirock/core-js/issues/86) - support FF extensions +* Fixed [#89](https://github.com/zloirock/core-js/issues/89) - behavior `Number` constructor in strange case + +##### 0.9.18 - 2015.06.17 +* Removed `/` from [`RegExp.escape`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) escaped characters + +##### 0.9.17 - 2015.06.14 +* Updated [`RegExp.escape`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) to the [latest proposal](https://github.com/benjamingr/RexExp.escape) +* Fixed conflict with webpack dev server + IE buggy behavior + +##### 0.9.16 - 2015.06.11 +* More correct order resolving thenable in [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise) polyfill +* Uses polyfill instead of [buggy V8 `Promise`](https://github.com/zloirock/core-js/issues/78) + +##### 0.9.15 - 2015.06.09 +* [Collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) from `library` version return wrapped native instances +* Fixed collections prototype methods in `library` version +* Optimized [`Math.hypot`](https://github.com/zloirock/core-js/#ecmascript-6-math) + +##### 0.9.14 - 2015.06.04 +* Updated [`Promise.resolve` behavior](https://esdiscuss.org/topic/fixing-promise-resolve) +* Added fallback for IE11 buggy `Object.getOwnPropertyNames` + iframe +* Some other fixes + +##### 0.9.13 - 2015.05.25 +* Added fallback for [`Symbol` polyfill](https://github.com/zloirock/core-js/#ecmascript-6-symbol) for old Android +* Some other fixes + +##### 0.9.12 - 2015.05.24 +* Different instances `core-js` should use / recognize the same symbols +* Some fixes + +##### 0.9.11 - 2015.05.18 +* Simplified [custom build](https://github.com/zloirock/core-js/#custom-build) + * Added custom build js api + * Added `grunt-cli` to `devDependencies` for `npm run grunt` +* Some fixes + +##### 0.9.10 - 2015.05.16 +* Wrapped `Function#toString` for correct work wrapped methods / constructors with methods similar to the [`lodash` `isNative`](https://github.com/lodash/lodash/issues/1197) +* Added proto versions of methods to export object in `default` version for consistency with `library` version + +##### 0.9.9 - 2015.05.14 +* Wrapped `Object#propertyIsEnumerable` for [`Symbol` polyfill](https://github.com/zloirock/core-js/#ecmascript-6-symbol) +* [Added proto versions of methods to `library` for ES7 bind syntax](https://github.com/zloirock/core-js/issues/65) +* Some other fixes + +##### 0.9.8 - 2015.05.12 +* Fixed [`Math.hypot`](https://github.com/zloirock/core-js/#ecmascript-6-math) with negative arguments +* Added `Object#toString.toString` as fallback for [`lodash` `isNative`](https://github.com/lodash/lodash/issues/1197) + +##### 0.9.7 - 2015.05.07 +* Added [support DOM collections](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice#Streamlining_cross-browser_behavior) to IE8- `Array#slice` + +##### 0.9.6 - 2015.05.01 +* Added [`String#lpad`, `String#rpad`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) + +##### 0.9.5 - 2015.04.30 +* Added cap for `Function#@@hasInstance` +* Some fixes and optimizations + +##### 0.9.4 - 2015.04.27 +* Fixed `RegExp` constructor + +##### 0.9.3 - 2015.04.26 +* Some fixes and optimizations + +##### 0.9.2 - 2015.04.25 +* More correct [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise) unhandled rejection tracking and resolving / rejection priority + +##### 0.9.1 - 2015.04.25 +* Fixed `__proto__`-based [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise) subclassing in some environments + +##### 0.9.0 - 2015.04.24 +* Added correct [symbols](https://github.com/zloirock/core-js/#ecmascript-6-symbol) descriptors + * Fixed behavior `Object.{assign, create, defineProperty, defineProperties, getOwnPropertyDescriptor, getOwnPropertyDescriptors}` with symbols + * Added [single entry points](https://github.com/zloirock/core-js/#commonjs) for `Object.{create, defineProperty, defineProperties}` +* Added [`Map#toJSON`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) +* Removed non-standard methods `Object#[_]` and `Function#only` - they solves syntax problems, but now in compilers available arrows and ~~in near future will be available~~ [available](http://babeljs.io/blog/2015/05/14/function-bind/) [bind syntax](https://github.com/zenparsing/es-function-bind) +* Removed non-standard undocumented methods `Symbol.{pure, set}` +* Some fixes and internal changes + +##### 0.8.4 - 2015.04.18 +* Uses `webpack` instead of `browserify` for browser builds - more compression-friendly result + +##### 0.8.3 - 2015.04.14 +* Fixed `Array` statics with single entry points + +##### 0.8.2 - 2015.04.13 +* [`Math.fround`](https://github.com/zloirock/core-js/#ecmascript-6-math) now also works in IE9- +* Added [`Set#toJSON`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) +* Some optimizations and fixes + +##### 0.8.1 - 2015.04.03 +* Fixed `Symbol.keyFor` + +##### 0.8.0 - 2015.04.02 +* Changed [CommonJS API](https://github.com/zloirock/core-js/#commonjs) +* Splitted and renamed some modules +* Added support ES3 environment (ES5 polyfill) to **all** default versions - size increases slightly (+ ~4kb w/o gzip), many issues disappear, if you don't need it - [simply include only required namespaces / features / modules](https://github.com/zloirock/core-js/#commonjs) +* Removed [abstract references](https://github.com/zenparsing/es-abstract-refs) support - proposal has been superseded =\ +* [`$for.isIterable` -> `core.isIterable`, `$for.getIterator` -> `core.getIterator`](https://github.com/zloirock/core-js/#ecmascript-6-iterators), temporary available in old namespace +* Fixed iterators support in v8 `Promise.all` and `Promise.race` +* Many other fixes + +##### 0.7.2 - 2015.03.09 +* Some fixes + +##### 0.7.1 - 2015.03.07 +* Some fixes + +##### 0.7.0 - 2015.03.06 +* Rewritten and splitted into [CommonJS modules](https://github.com/zloirock/core-js/#commonjs) + +##### 0.6.1 - 2015.02.24 +* Fixed support [`Object.defineProperty`](https://github.com/zloirock/core-js/#ecmascript-5) with accessors on DOM elements on IE8 + +##### 0.6.0 - 2015.02.23 +* Added support safe closing iteration - calling `iterator.return` on abort iteration, if it exists +* Added basic support [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise) unhandled rejection tracking in shim +* Added [`Object.getOwnPropertyDescriptors`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) +* Removed `console` cap - creates too many problems +* Restructuring [namespaces](https://github.com/zloirock/core-js/#custom-build) +* Some fixes + +##### 0.5.4 - 2015.02.15 +* Some fixes + +##### 0.5.3 - 2015.02.14 +* Added [support binary and octal literals](https://github.com/zloirock/core-js/#ecmascript-6-number) to `Number` constructor +* Added [`Date#toISOString`](https://github.com/zloirock/core-js/#ecmascript-5) + +##### 0.5.2 - 2015.02.10 +* Some fixes + +##### 0.5.1 - 2015.02.09 +* Some fixes + +##### 0.5.0 - 2015.02.08 +* Systematization of modules +* Splitted [`es6` module](https://github.com/zloirock/core-js/#ecmascript-6) +* Splitted `console` module: `web.console` - only cap for missing methods, `core.log` - bound methods & additional features +* Added [`delay` method](https://github.com/zloirock/core-js/#delay) +* Some fixes + +##### 0.4.10 - 2015.01.28 +* [`Object.getOwnPropertySymbols`](https://github.com/zloirock/core-js/#ecmascript-6-symbol) polyfill returns array of wrapped keys + +##### 0.4.9 - 2015.01.27 +* FF20-24 fix + +##### 0.4.8 - 2015.01.25 +* Some [collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) fixes + +##### 0.4.7 - 2015.01.25 +* Added support frozen objects as [collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) keys + +##### 0.4.6 - 2015.01.21 +* Added [`Object.getOwnPropertySymbols`](https://github.com/zloirock/core-js/#ecmascript-6-symbol) +* Added [`NodeList.prototype[@@iterator]`](https://github.com/zloirock/core-js/#ecmascript-6-iterators) +* Added basic `@@species` logic - getter in native constructors +* Removed `Function#by` +* Some fixes + +##### 0.4.5 - 2015.01.16 +* Some fixes + +##### 0.4.4 - 2015.01.11 +* Enabled CSP support + +##### 0.4.3 - 2015.01.10 +* Added `Function` instances `name` property for IE9+ + +##### 0.4.2 - 2015.01.10 +* `Object` static methods accept primitives +* `RegExp` constructor can alter flags (IE9+) +* Added `Array.prototype[Symbol.unscopables]` + +##### 0.4.1 - 2015.01.05 +* Some fixes + +##### 0.4.0 - 2015.01.03 +* Added [`es6.reflect`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) module: + * Added `Reflect.apply` + * Added `Reflect.construct` + * Added `Reflect.defineProperty` + * Added `Reflect.deleteProperty` + * Added `Reflect.enumerate` + * Added `Reflect.get` + * Added `Reflect.getOwnPropertyDescriptor` + * Added `Reflect.getPrototypeOf` + * Added `Reflect.has` + * Added `Reflect.isExtensible` + * Added `Reflect.preventExtensions` + * Added `Reflect.set` + * Added `Reflect.setPrototypeOf` +* `core-js` methods now can use external `Symbol.iterator` polyfill +* Some fixes + +##### 0.3.3 - 2014.12.28 +* [Console cap](https://github.com/zloirock/core-js/#console) excluded from node.js default builds + +##### 0.3.2 - 2014.12.25 +* Added cap for [ES5](https://github.com/zloirock/core-js/#ecmascript-5) freeze-family methods +* Fixed `console` bug + +##### 0.3.1 - 2014.12.23 +* Some fixes + +##### 0.3.0 - 2014.12.23 +* Optimize [`Map` & `Set`](https://github.com/zloirock/core-js/#ecmascript-6-collections): + * Use entries chain on hash table + * Fast & correct iteration + * Iterators moved to [`es6`](https://github.com/zloirock/core-js/#ecmascript-6) and [`es6.collections`](https://github.com/zloirock/core-js/#ecmascript-6-collections) modules + +##### 0.2.5 - 2014.12.20 +* `console` no longer shortcut for `console.log` (compatibility problems) +* Some fixes + +##### 0.2.4 - 2014.12.17 +* Better compliance of ES6 +* Added [`Math.fround`](https://github.com/zloirock/core-js/#ecmascript-6-math) (IE10+) +* Some fixes + +##### 0.2.3 - 2014.12.15 +* [Symbols](https://github.com/zloirock/core-js/#ecmascript-6-symbol): + * Added option to disable addition setter to `Object.prototype` for Symbol polyfill: + * Added `Symbol.useSimple` + * Added `Symbol.useSetter` + * Added cap for well-known Symbols: + * Added `Symbol.hasInstance` + * Added `Symbol.isConcatSpreadable` + * Added `Symbol.match` + * Added `Symbol.replace` + * Added `Symbol.search` + * Added `Symbol.species` + * Added `Symbol.split` + * Added `Symbol.toPrimitive` + * Added `Symbol.unscopables` + +##### 0.2.2 - 2014.12.13 +* Added [`RegExp#flags`](https://github.com/zloirock/core-js/#ecmascript-6-regexp) ([December 2014 Draft Rev 29](http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#december_6_2014_draft_rev_29)) +* Added [`String.raw`](https://github.com/zloirock/core-js/#ecmascript-6-string) + +##### 0.2.1 - 2014.12.12 +* Repair converting -0 to +0 in [native collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) + +##### 0.2.0 - 2014.12.06 +* Added [`es7.proposals`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) and [`es7.abstract-refs`](https://github.com/zenparsing/es-abstract-refs) modules +* Added [`String#at`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) +* Added real [`String Iterator`](https://github.com/zloirock/core-js/#ecmascript-6-iterators), older versions used Array Iterator +* Added abstract references support: + * Added `Symbol.referenceGet` + * Added `Symbol.referenceSet` + * Added `Symbol.referenceDelete` + * Added `Function#@@referenceGet` + * Added `Map#@@referenceGet` + * Added `Map#@@referenceSet` + * Added `Map#@@referenceDelete` + * Added `WeakMap#@@referenceGet` + * Added `WeakMap#@@referenceSet` + * Added `WeakMap#@@referenceDelete` + * Added `Dict.{...methods}[@@referenceGet]` +* Removed deprecated `.contains` methods +* Some fixes + +##### 0.1.5 - 2014.12.01 +* Added [`Array#copyWithin`](https://github.com/zloirock/core-js/#ecmascript-6-array) +* Added [`String#codePointAt`](https://github.com/zloirock/core-js/#ecmascript-6-string) +* Added [`String.fromCodePoint`](https://github.com/zloirock/core-js/#ecmascript-6-string) + +##### 0.1.4 - 2014.11.27 +* Added [`Dict.mapPairs`](https://github.com/zloirock/core-js/#dict) + +##### 0.1.3 - 2014.11.20 +* [TC39 November meeting](https://github.com/rwaldron/tc39-notes/tree/master/es6/2014-11): + * [`.contains` -> `.includes`](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-18.md#51--44-arrayprototypecontains-and-stringprototypecontains) + * `String#contains` -> [`String#includes`](https://github.com/zloirock/core-js/#ecmascript-6-string) + * `Array#contains` -> [`Array#includes`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) + * `Dict.contains` -> [`Dict.includes`](https://github.com/zloirock/core-js/#dict) + * [Removed `WeakMap#clear`](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-19.md#412-should-weakmapweakset-have-a-clear-method-markm) + * [Removed `WeakSet#clear`](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-19.md#412-should-weakmapweakset-have-a-clear-method-markm) + +##### 0.1.2 - 2014.11.19 +* `Map` & `Set` bug fix + +##### 0.1.1 - 2014.11.18 +* Public release \ No newline at end of file diff --git a/node_modules/core-js/Gruntfile.js b/node_modules/core-js/Gruntfile.js new file mode 100644 index 00000000..02b832c7 --- /dev/null +++ b/node_modules/core-js/Gruntfile.js @@ -0,0 +1,3 @@ +require('LiveScript'); +// eslint-disable-next-line import/no-unresolved +module.exports = require('./build/Gruntfile'); diff --git a/node_modules/core-js/LICENSE b/node_modules/core-js/LICENSE new file mode 100644 index 00000000..834b267d --- /dev/null +++ b/node_modules/core-js/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-2019 Denis Pushkarev + +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/core-js/README.md b/node_modules/core-js/README.md new file mode 100644 index 00000000..079ae615 --- /dev/null +++ b/node_modules/core-js/README.md @@ -0,0 +1,2307 @@ +# core-js + +[![Sponsors on Open Collective](https://opencollective.com/core-js/sponsors/badge.svg)](#raising-funds) [![Backers on Open Collective](https://opencollective.com/core-js/backers/badge.svg)](#raising-funds) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/zloirock/core-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![version](https://img.shields.io/npm/v/core-js.svg)](https://www.npmjs.com/package/core-js) [![npm downloads](https://img.shields.io/npm/dm/core-js.svg)](http://npm-stat.com/charts.html?package=core-js&author=&from=2014-11-18) [![Build Status](https://travis-ci.org/zloirock/core-js.svg)](https://travis-ci.org/zloirock/core-js) [![devDependency status](https://david-dm.org/zloirock/core-js/dev-status.svg)](https://david-dm.org/zloirock/core-js?type=dev) +## As advertising: the author is looking for a good job :) + +## [core-js@3, babel and a look into the future](https://github.com/zloirock/core-js/tree/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md) + +## Raising funds + +`core-js` isn't backed by a company, so the future of this project depends on you. Become a sponsor or a backer [**on Open Collective**](https://opencollective.com/core-js) or [**on Patreon**](https://www.patreon.com/zloirock) if you are interested in `core-js`. + +--- + + + +--- + + + +--- + +**It's documentation for obsolete `core-js@2`. If you looking documentation for actual `core-js` version, please, check [this branch](https://github.com/zloirock/core-js/tree/master).** + +Modular standard library for JavaScript. Includes polyfills for [ECMAScript 5](#ecmascript-5), [ECMAScript 6](#ecmascript-6): [promises](#ecmascript-6-promise), [symbols](#ecmascript-6-symbol), [collections](#ecmascript-6-collections), iterators, [typed arrays](#ecmascript-6-typed-arrays), [ECMAScript 7+ proposals](#ecmascript-7-proposals), [setImmediate](#setimmediate), etc. Some additional features such as [dictionaries](#dict) or [extended partial application](#partial-application). You can require only needed features or use it without global namespace pollution. + +[*Example*](http://goo.gl/a2xexl): +```js +Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] +'*'.repeat(10); // => '**********' +Promise.resolve(32).then(x => console.log(x)); // => 32 +setImmediate(x => console.log(x), 42); // => 42 +``` + +[*Without global namespace pollution*](http://goo.gl/paOHb0): +```js +var core = require('core-js/library'); // With a modular system, otherwise use global `core` +core.Array.from(new core.Set([1, 2, 3, 2, 1])); // => [1, 2, 3] +core.String.repeat('*', 10); // => '**********' +core.Promise.resolve(32).then(x => console.log(x)); // => 32 +core.setImmediate(x => console.log(x), 42); // => 42 +``` + +### Index +- [Usage](#usage) + - [Basic](#basic) + - [CommonJS](#commonjs) + - [Custom build](#custom-build-from-the-command-line) +- [Supported engines](#supported-engines) +- [Features](#features) + - [ECMAScript 5](#ecmascript-5) + - [ECMAScript 6](#ecmascript-6) + - [ECMAScript 6: Object](#ecmascript-6-object) + - [ECMAScript 6: Function](#ecmascript-6-function) + - [ECMAScript 6: Array](#ecmascript-6-array) + - [ECMAScript 6: String](#ecmascript-6-string) + - [ECMAScript 6: RegExp](#ecmascript-6-regexp) + - [ECMAScript 6: Number](#ecmascript-6-number) + - [ECMAScript 6: Math](#ecmascript-6-math) + - [ECMAScript 6: Date](#ecmascript-6-date) + - [ECMAScript 6: Promise](#ecmascript-6-promise) + - [ECMAScript 6: Symbol](#ecmascript-6-symbol) + - [ECMAScript 6: Collections](#ecmascript-6-collections) + - [ECMAScript 6: Typed Arrays](#ecmascript-6-typed-arrays) + - [ECMAScript 6: Reflect](#ecmascript-6-reflect) + - [ECMAScript 7+ proposals](#ecmascript-7-proposals) + - [stage 4 proposals](#stage-4-proposals) + - [stage 3 proposals](#stage-3-proposals) + - [stage 2 proposals](#stage-2-proposals) + - [stage 1 proposals](#stage-1-proposals) + - [stage 0 proposals](#stage-0-proposals) + - [pre-stage 0 proposals](#pre-stage-0-proposals) + - [Web standards](#web-standards) + - [setTimeout / setInterval](#settimeout--setinterval) + - [setImmediate](#setimmediate) + - [iterable DOM collections](#iterable-dom-collections) + - [Non-standard](#non-standard) + - [Object](#object) + - [Dict](#dict) + - [partial application](#partial-application) + - [Number Iterator](#number-iterator) + - [escaping strings](#escaping-strings) + - [delay](#delay) + - [helpers for iterators](#helpers-for-iterators) +- [Missing polyfills](#missing-polyfills) +- [Changelog](./CHANGELOG.md) + +## Usage +### Basic +``` +npm i core-js +bower install core.js +``` + +```js +// Default +require('core-js'); +// Without global namespace pollution +var core = require('core-js/library'); +// Shim only +require('core-js/shim'); +``` +If you need complete build for browser, use builds from `core-js/client` path: + +* [default](https://raw.githack.com/zloirock/core-js/v2.6.9/client/core.min.js): Includes all features, standard and non-standard. +* [as a library](https://raw.githack.com/zloirock/core-js/v2.6.9/client/library.min.js): Like "default", but does not pollute the global namespace (see [2nd example at the top](#core-js)). +* [shim only](https://raw.githack.com/zloirock/core-js/v2.6.9/client/shim.min.js): Only includes the standard methods. + +Warning: if you use `core-js` with the extension of native objects, require all needed `core-js` modules at the beginning of entry point of your application, otherwise, conflicts may occur. + +### CommonJS +You can require only needed modules. + +```js +require('core-js/fn/set'); +require('core-js/fn/array/from'); +require('core-js/fn/array/find-index'); +Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] +[1, 2, NaN, 3, 4].findIndex(isNaN); // => 2 + +// or, w/o global namespace pollution: + +var Set = require('core-js/library/fn/set'); +var from = require('core-js/library/fn/array/from'); +var findIndex = require('core-js/library/fn/array/find-index'); +from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] +findIndex([1, 2, NaN, 3, 4], isNaN); // => 2 +``` +Available entry points for methods / constructors, as above examples, and namespaces: for example, `core-js/es6/array` (`core-js/library/es6/array`) contains all [ES6 `Array` features](#ecmascript-6-array), `core-js/es6` (`core-js/library/es6`) contains all ES6 features. + +##### Caveats when using CommonJS API: + +* `modules` path is internal API, does not inject all required dependencies and can be changed in minor or patch releases. Use it only for a custom build and / or if you know what are you doing. +* `core-js` is extremely modular and uses a lot of very tiny modules, because of that for usage in browsers bundle up `core-js` instead of usage loader for each file, otherwise, you will have hundreds of requests. + +#### CommonJS and prototype methods without global namespace pollution +In the `library` version, we can't pollute prototypes of native constructors. Because of that, prototype methods transformed to static methods like in examples above. `babel` `runtime` transformer also can't transform them. But with transpilers we can use one more trick - [bind operator and virtual methods](https://github.com/zenparsing/es-function-bind). Special for that, available `/virtual/` entry points. Example: +```js +import fill from 'core-js/library/fn/array/virtual/fill'; +import findIndex from 'core-js/library/fn/array/virtual/find-index'; + +Array(10)::fill(0).map((a, b) => b * b)::findIndex(it => it && !(it % 8)); // => 4 + +// or + +import {fill, findIndex} from 'core-js/library/fn/array/virtual'; + +Array(10)::fill(0).map((a, b) => b * b)::findIndex(it => it && !(it % 8)); // => 4 + +``` + +### Custom build (from the command-line) +``` +npm i core-js && cd node_modules/core-js && npm i +npm run grunt build:core.dict,es6 -- --blacklist=es6.promise,es6.math --library=on --path=custom uglify +``` +Where `core.dict` and `es6` are modules (namespaces) names, which will be added to the build, `es6.promise` and `es6.math` are modules (namespaces) names, which will be excluded from the build, `--library=on` is flag for build without global namespace pollution and `custom` is target file name. + +Available namespaces: for example, `es6.array` contains [ES6 `Array` features](#ecmascript-6-array), `es6` contains all modules whose names start with `es6`. + +### Custom build (from external scripts) + +[`core-js-builder`](https://www.npmjs.com/package/core-js-builder) package exports a function that takes the same parameters as the `build` target from the previous section. This will conditionally include or exclude certain parts of `core-js`: + +```js +require('core-js-builder')({ + modules: ['es6', 'core.dict'], // modules / namespaces + blacklist: ['es6.reflect'], // blacklist of modules / namespaces, by default - empty list + library: false, // flag for build without global namespace pollution, by default - false + umd: true // use UMD wrapper for export `core` object, by default - true +}).then(code => { + // ... +}).catch(error => { + // ... +}); +``` +## Supported engines +**Tested in:** +- Chrome 26+ +- Firefox 4+ +- Safari 5+ +- Opera 12+ +- Internet Explorer 6+ (sure, IE8- with ES3 limitations) +- Edge +- Android Browser 2.3+ +- iOS Safari 5.1+ +- PhantomJS 1.9 / 2.1 +- NodeJS 0.8+ + +...and it doesn't mean `core-js` will not work in other engines, they just have not been tested. + +## Features: +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library) <- all features +core-js(/library)/shim <- only polyfills +``` +### ECMAScript 5 +All features moved to the [`es6` namespace](#ecmascript-6), here just a list of features: +```js +Object + .create(proto | null, descriptors?) -> object + .getPrototypeOf(object) -> proto | null + .defineProperty(target, key, desc) -> target, cap for ie8- + .defineProperties(target, descriptors) -> target, cap for ie8- + .getOwnPropertyDescriptor(object, key) -> desc + .getOwnPropertyNames(object) -> array + .keys(object) -> array + .seal(object) -> object, cap for ie8- + .freeze(object) -> object, cap for ie8- + .preventExtensions(object) -> object, cap for ie8- + .isSealed(object) -> bool, cap for ie8- + .isFrozen(object) -> bool, cap for ie8- + .isExtensible(object) -> bool, cap for ie8- +Array + .isArray(var) -> bool + #slice(start?, end?) -> array, fix for ie7- + #join(string = ',') -> string, fix for ie7- + #indexOf(var, from?) -> int + #lastIndexOf(var, from?) -> int + #every(fn(val, index, @), that) -> bool + #some(fn(val, index, @), that) -> bool + #forEach(fn(val, index, @), that) -> void + #map(fn(val, index, @), that) -> array + #filter(fn(val, index, @), that) -> array + #reduce(fn(memo, val, index, @), memo?) -> var + #reduceRight(fn(memo, val, index, @), memo?) -> var + #sort(fn?) -> @, fixes for some engines +Function + #bind(object, ...args) -> boundFn(...args) +String + #split(separator, limit) -> array + #trim() -> str +RegExp + #toString() -> str +Number + #toFixed(digits) -> string + #toPrecision(precision) -> string +parseInt(str, radix) -> int +parseFloat(str) -> num +Date + .now() -> int + #toISOString() -> string + #toJSON() -> string +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es5 +``` + +### ECMAScript 6 +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es6 +``` +#### ECMAScript 6: Object +Modules [`es6.object.assign`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.assign.js), [`es6.object.is`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.is.js), [`es6.object.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.set-prototype-of.js) and [`es6.object.to-string`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.to-string.js). + +In ES6 most `Object` static methods should work with primitives. Modules [`es6.object.freeze`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.freeze.js), [`es6.object.seal`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.seal.js), [`es6.object.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.prevent-extensions.js), [`es6.object.is-frozen`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.is-frozen.js), [`es6.object.is-sealed`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.is-sealed.js), [`es6.object.is-extensible`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.is-extensible.js), [`es6.object.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.get-own-property-descriptor.js), [`es6.object.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.get-prototype-of.js), [`es6.object.keys`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.keys.js) and [`es6.object.get-own-property-names`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.get-own-property-names.js). + +Just ES5 features: [`es6.object.create`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.create.js), [`es6.object.define-property`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.define-property.js) and [`es6.object.define-properties`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.object.es6.object.define-properties.js). +```js +Object + .assign(target, ...src) -> target + .is(a, b) -> bool + .setPrototypeOf(target, proto | null) -> target (required __proto__ - IE11+) + .create(object | null, descriptors?) -> object + .getPrototypeOf(var) -> object | null + .defineProperty(object, key, desc) -> target + .defineProperties(object, descriptors) -> target + .getOwnPropertyDescriptor(var, key) -> desc | undefined + .keys(var) -> array + .getOwnPropertyNames(var) -> array + .freeze(var) -> var + .seal(var) -> var + .preventExtensions(var) -> var + .isFrozen(var) -> bool + .isSealed(var) -> bool + .isExtensible(var) -> bool + #toString() -> string, ES6 fix: @@toStringTag support +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es6/object +core-js(/library)/fn/object/assign +core-js(/library)/fn/object/is +core-js(/library)/fn/object/set-prototype-of +core-js(/library)/fn/object/get-prototype-of +core-js(/library)/fn/object/create +core-js(/library)/fn/object/define-property +core-js(/library)/fn/object/define-properties +core-js(/library)/fn/object/get-own-property-descriptor +core-js(/library)/fn/object/keys +core-js(/library)/fn/object/get-own-property-names +core-js(/library)/fn/object/freeze +core-js(/library)/fn/object/seal +core-js(/library)/fn/object/prevent-extensions +core-js(/library)/fn/object/is-frozen +core-js(/library)/fn/object/is-sealed +core-js(/library)/fn/object/is-extensible +core-js/fn/object/to-string +``` +[*Examples*](http://goo.gl/ywdwPz): +```js +var foo = {q: 1, w: 2} + , bar = {e: 3, r: 4} + , baz = {t: 5, y: 6}; +Object.assign(foo, bar, baz); // => foo = {q: 1, w: 2, e: 3, r: 4, t: 5, y: 6} + +Object.is(NaN, NaN); // => true +Object.is(0, -0); // => false +Object.is(42, 42); // => true +Object.is(42, '42'); // => false + +function Parent(){} +function Child(){} +Object.setPrototypeOf(Child.prototype, Parent.prototype); +new Child instanceof Child; // => true +new Child instanceof Parent; // => true + +var O = {}; +O[Symbol.toStringTag] = 'Foo'; +'' + O; // => '[object Foo]' + +Object.keys('qwe'); // => ['0', '1', '2'] +Object.getPrototypeOf('qwe') === String.prototype; // => true +``` +#### ECMAScript 6: Function +Modules [`es6.function.name`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.function.name.js), [`es6.function.has-instance`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.function.has-instance.js). Just ES5: [`es6.function.bind`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.function.bind.js). +```js +Function + #bind(object, ...args) -> boundFn(...args) + #name -> string (IE9+) + #@@hasInstance(var) -> bool +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js/es6/function +core-js/fn/function/name +core-js/fn/function/has-instance +core-js/fn/function/bind +core-js/fn/function/virtual/bind +``` +[*Example*](http://goo.gl/zqu3Wp): +```js +(function foo(){}).name // => 'foo' + +console.log.bind(console, 42)(43); // => 42 43 +``` +#### ECMAScript 6: Array +Modules [`es6.array.from`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.from.js), [`es6.array.of`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.of.js), [`es6.array.copy-within`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.copy-within.js), [`es6.array.fill`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.fill.js), [`es6.array.find`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.find.js), [`es6.array.find-index`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.find-index.js), [`es6.array.iterator`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.iterator.js). ES5 features with fixes: [`es6.array.is-array`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.is-array.js), [`es6.array.slice`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.slice.js), [`es6.array.join`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.join.js), [`es6.array.index-of`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.index-of.js), [`es6.array.last-index-of`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.last-index-of.js), [`es6.array.every`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.every.js), [`es6.array.some`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.some.js), [`es6.array.for-each`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.for-each.js), [`es6.array.map`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.map.js), [`es6.array.filter`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.filter.js), [`es6.array.reduce`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.reduce.js), [`es6.array.reduce-right`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.reduce-right.js), [`es6.array.sort`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.array.sort.js). +```js +Array + .from(iterable | array-like, mapFn(val, index)?, that) -> array + .of(...args) -> array + .isArray(var) -> bool + #copyWithin(target = 0, start = 0, end = @length) -> @ + #fill(val, start = 0, end = @length) -> @ + #find(fn(val, index, @), that) -> val + #findIndex(fn(val, index, @), that) -> index | -1 + #values() -> iterator + #keys() -> iterator + #entries() -> iterator + #join(string = ',') -> string, fix for ie7- + #slice(start?, end?) -> array, fix for ie7- + #indexOf(var, from?) -> index | -1 + #lastIndexOf(var, from?) -> index | -1 + #every(fn(val, index, @), that) -> bool + #some(fn(val, index, @), that) -> bool + #forEach(fn(val, index, @), that) -> void + #map(fn(val, index, @), that) -> array + #filter(fn(val, index, @), that) -> array + #reduce(fn(memo, val, index, @), memo?) -> var + #reduceRight(fn(memo, val, index, @), memo?) -> var + #sort(fn?) -> @, invalid arguments fix + #@@iterator() -> iterator (values) + #@@unscopables -> object (cap) +Arguments + #@@iterator() -> iterator (values, available only in core-js methods) +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es6/array +core-js(/library)/fn/array/from +core-js(/library)/fn/array/of +core-js(/library)/fn/array/is-array +core-js(/library)/fn/array/iterator +core-js(/library)/fn/array/copy-within +core-js(/library)/fn/array/fill +core-js(/library)/fn/array/find +core-js(/library)/fn/array/find-index +core-js(/library)/fn/array/values +core-js(/library)/fn/array/keys +core-js(/library)/fn/array/entries +core-js(/library)/fn/array/slice +core-js(/library)/fn/array/join +core-js(/library)/fn/array/index-of +core-js(/library)/fn/array/last-index-of +core-js(/library)/fn/array/every +core-js(/library)/fn/array/some +core-js(/library)/fn/array/for-each +core-js(/library)/fn/array/map +core-js(/library)/fn/array/filter +core-js(/library)/fn/array/reduce +core-js(/library)/fn/array/reduce-right +core-js(/library)/fn/array/sort +core-js(/library)/fn/array/virtual/iterator +core-js(/library)/fn/array/virtual/copy-within +core-js(/library)/fn/array/virtual/fill +core-js(/library)/fn/array/virtual/find +core-js(/library)/fn/array/virtual/find-index +core-js(/library)/fn/array/virtual/values +core-js(/library)/fn/array/virtual/keys +core-js(/library)/fn/array/virtual/entries +core-js(/library)/fn/array/virtual/slice +core-js(/library)/fn/array/virtual/join +core-js(/library)/fn/array/virtual/index-of +core-js(/library)/fn/array/virtual/last-index-of +core-js(/library)/fn/array/virtual/every +core-js(/library)/fn/array/virtual/some +core-js(/library)/fn/array/virtual/for-each +core-js(/library)/fn/array/virtual/map +core-js(/library)/fn/array/virtual/filter +core-js(/library)/fn/array/virtual/reduce +core-js(/library)/fn/array/virtual/reduce-right +core-js(/library)/fn/array/virtual/sort +``` +[*Examples*](http://goo.gl/oaUFUf): +```js +Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] +Array.from({0: 1, 1: 2, 2: 3, length: 3}); // => [1, 2, 3] +Array.from('123', Number); // => [1, 2, 3] +Array.from('123', function(it){ + return it * it; +}); // => [1, 4, 9] + +Array.of(1); // => [1] +Array.of(1, 2, 3); // => [1, 2, 3] + +var array = ['a', 'b', 'c']; + +for(var val of array)console.log(val); // => 'a', 'b', 'c' +for(var val of array.values())console.log(val); // => 'a', 'b', 'c' +for(var key of array.keys())console.log(key); // => 0, 1, 2 +for(var [key, val] of array.entries()){ + console.log(key); // => 0, 1, 2 + console.log(val); // => 'a', 'b', 'c' +} + +function isOdd(val){ + return val % 2; +} +[4, 8, 15, 16, 23, 42].find(isOdd); // => 15 +[4, 8, 15, 16, 23, 42].findIndex(isOdd); // => 2 +[4, 8, 15, 16, 23, 42].find(isNaN); // => undefined +[4, 8, 15, 16, 23, 42].findIndex(isNaN); // => -1 + +Array(5).fill(42); // => [42, 42, 42, 42, 42] + +[1, 2, 3, 4, 5].copyWithin(0, 3); // => [4, 5, 3, 4, 5] +``` +#### ECMAScript 6: String +Modules [`es6.string.from-code-point`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.from-code-point.js), [`es6.string.raw`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.raw.js), [`es6.string.iterator`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.iterator.js), [`es6.string.code-point-at`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.code-point-at.js), [`es6.string.ends-with`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.ends-with.js), [`es6.string.includes`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.includes.js), [`es6.string.repeat`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.repeat.js), [`es6.string.starts-with`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.starts-with.js) and [`es6.string.trim`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.trim.js). + +Annex B HTML methods. Ugly, but it's also the part of the spec. Modules [`es6.string.anchor`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.anchor.js), [`es6.string.big`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.big.js), [`es6.string.blink`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.blink.js), [`es6.string.bold`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.bold.js), [`es6.string.fixed`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.fixed.js), [`es6.string.fontcolor`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.fontcolor.js), [`es6.string.fontsize`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.fontsize.js), [`es6.string.italics`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.italics.js), [`es6.string.link`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.link.js), [`es6.string.small`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.small.js), [`es6.string.strike`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.strike.js), [`es6.string.sub`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.sub.js) and [`es6.string.sup`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.string.sup.js). +```js +String + .fromCodePoint(...codePoints) -> str + .raw({raw}, ...substitutions) -> str + #includes(str, from?) -> bool + #startsWith(str, from?) -> bool + #endsWith(str, from?) -> bool + #repeat(num) -> str + #codePointAt(pos) -> uint + #trim() -> str, ES6 fix + #anchor(name) -> str + #big() -> str + #blink() -> str + #bold() -> str + #fixed() -> str + #fontcolor(color) -> str + #fontsize(size) -> str + #italics() -> str + #link(url) -> str + #small() -> str + #strike() -> str + #sub() -> str + #sup() -> str + #@@iterator() -> iterator (code points) +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es6/string +core-js(/library)/fn/string/from-code-point +core-js(/library)/fn/string/raw +core-js(/library)/fn/string/includes +core-js(/library)/fn/string/starts-with +core-js(/library)/fn/string/ends-with +core-js(/library)/fn/string/repeat +core-js(/library)/fn/string/code-point-at +core-js(/library)/fn/string/trim +core-js(/library)/fn/string/anchor +core-js(/library)/fn/string/big +core-js(/library)/fn/string/blink +core-js(/library)/fn/string/bold +core-js(/library)/fn/string/fixed +core-js(/library)/fn/string/fontcolor +core-js(/library)/fn/string/fontsize +core-js(/library)/fn/string/italics +core-js(/library)/fn/string/link +core-js(/library)/fn/string/small +core-js(/library)/fn/string/strike +core-js(/library)/fn/string/sub +core-js(/library)/fn/string/sup +core-js(/library)/fn/string/iterator +core-js(/library)/fn/string/virtual/includes +core-js(/library)/fn/string/virtual/starts-with +core-js(/library)/fn/string/virtual/ends-with +core-js(/library)/fn/string/virtual/repeat +core-js(/library)/fn/string/virtual/code-point-at +core-js(/library)/fn/string/virtual/trim +core-js(/library)/fn/string/virtual/anchor +core-js(/library)/fn/string/virtual/big +core-js(/library)/fn/string/virtual/blink +core-js(/library)/fn/string/virtual/bold +core-js(/library)/fn/string/virtual/fixed +core-js(/library)/fn/string/virtual/fontcolor +core-js(/library)/fn/string/virtual/fontsize +core-js(/library)/fn/string/virtual/italics +core-js(/library)/fn/string/virtual/link +core-js(/library)/fn/string/virtual/small +core-js(/library)/fn/string/virtual/strike +core-js(/library)/fn/string/virtual/sub +core-js(/library)/fn/string/virtual/sup +core-js(/library)/fn/string/virtual/iterator +``` +[*Examples*](http://goo.gl/3UaQ93): +```js +for(var val of 'a𠮷b'){ + console.log(val); // => 'a', '𠮷', 'b' +} + +'foobarbaz'.includes('bar'); // => true +'foobarbaz'.includes('bar', 4); // => false +'foobarbaz'.startsWith('foo'); // => true +'foobarbaz'.startsWith('bar', 3); // => true +'foobarbaz'.endsWith('baz'); // => true +'foobarbaz'.endsWith('bar', 6); // => true + +'string'.repeat(3); // => 'stringstringstring' + +'𠮷'.codePointAt(0); // => 134071 +String.fromCodePoint(97, 134071, 98); // => 'a𠮷b' + +var name = 'Bob'; +String.raw`Hi\n${name}!`; // => 'Hi\\nBob!' (ES6 template string syntax) +String.raw({raw: 'test'}, 0, 1, 2); // => 't0e1s2t' + +'foo'.bold(); // => 'foo' +'bar'.anchor('a"b'); // => 'bar' +'baz'.link('http://example.com'); // => 'baz' +``` +#### ECMAScript 6: RegExp +Modules [`es6.regexp.constructor`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.regexp.constructor.js) and [`es6.regexp.flags`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.regexp.flags.js). + +Support well-known [symbols](#ecmascript-6-symbol) `@@match`, `@@replace`, `@@search` and `@@split`, modules [`es6.regexp.match`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.regexp.match.js), [`es6.regexp.replace`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.regexp.replace.js), [`es6.regexp.search`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.regexp.search.js) and [`es6.regexp.split`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.regexp.split.js). +``` +[new] RegExp(pattern, flags?) -> regexp, ES6 fix: can alter flags (IE9+) + #flags -> str (IE9+) + #toString() -> str, ES6 fixes + #@@match(str) -> array | null + #@@replace(str, replacer) -> string + #@@search(str) -> index + #@@split(str, limit) -> array +String + #match(tpl) -> var, ES6 fix for support @@match + #replace(tpl, replacer) -> var, ES6 fix for support @@replace + #search(tpl) -> var, ES6 fix for support @@search + #split(tpl, limit) -> var, ES6 fix for support @@split, some fixes for old engines +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js/es6/regexp +core-js/fn/regexp/constructor +core-js(/library)/fn/regexp/flags +core-js/fn/regexp/to-string +core-js/fn/regexp/match +core-js/fn/regexp/replace +core-js/fn/regexp/search +core-js/fn/regexp/split +``` +[*Examples*](http://goo.gl/PiJxBD): +```js +RegExp(/./g, 'm'); // => /./m + +/foo/.flags; // => '' +/foo/gim.flags; // => 'gim' + +'foo'.match({[Symbol.match]: _ => 1}); // => 1 +'foo'.replace({[Symbol.replace]: _ => 2}); // => 2 +'foo'.search({[Symbol.search]: _ => 3}); // => 3 +'foo'.split({[Symbol.split]: _ => 4}); // => 4 + +RegExp.prototype.toString.call({source: 'foo', flags: 'bar'}); // => '/foo/bar' +``` +#### ECMAScript 6: Number +Module [`es6.number.constructor`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.number.constructor.js). `Number` constructor support binary and octal literals, [*example*](http://goo.gl/jRd6b3): +```js +Number('0b1010101'); // => 85 +Number('0o7654321'); // => 2054353 +``` +Modules [`es6.number.epsilon`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.number.epsilon.js), [`es6.number.is-finite`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.number.is-finite.js), [`es6.number.is-integer`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.number.is-integer.js), [`es6.number.is-nan`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.number.is-nan.js), [`es6.number.is-safe-integer`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.number.is-safe-integer.js), [`es6.number.max-safe-integer`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.number.max-safe-integer.js), [`es6.number.min-safe-integer`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.number.min-safe-integer.js), [`es6.number.parse-float`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.number.parse-float.js), [`es6.number.parse-int`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.number.parse-int.js), [`es6.number.to-fixed`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.number.to-fixed.js), [`es6.number.to-precision`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.number.to-precision.js), [`es6.parse-int`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.parse-int.js), [`es6.parse-float`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.parse-float.js). +```js +[new] Number(var) -> number | number object + .isFinite(num) -> bool + .isNaN(num) -> bool + .isInteger(num) -> bool + .isSafeInteger(num) -> bool + .parseFloat(str) -> num + .parseInt(str) -> int + .EPSILON -> num + .MAX_SAFE_INTEGER -> int + .MIN_SAFE_INTEGER -> int + #toFixed(digits) -> string, fixes + #toPrecision(precision) -> string, fixes +parseFloat(str) -> num, fixes +parseInt(str) -> int, fixes +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es6/number +core-js/es6/number/constructor +core-js(/library)/fn/number/is-finite +core-js(/library)/fn/number/is-nan +core-js(/library)/fn/number/is-integer +core-js(/library)/fn/number/is-safe-integer +core-js(/library)/fn/number/parse-float +core-js(/library)/fn/number/parse-int +core-js(/library)/fn/number/epsilon +core-js(/library)/fn/number/max-safe-integer +core-js(/library)/fn/number/min-safe-integer +core-js(/library)/fn/number/to-fixed +core-js(/library)/fn/number/to-precision +core-js(/library)/fn/parse-float +core-js(/library)/fn/parse-int +``` +#### ECMAScript 6: Math +Modules [`es6.math.acosh`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.acosh.js), [`es6.math.asinh`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.asinh.js), [`es6.math.atanh`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.atanh.js), [`es6.math.cbrt`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.cbrt.js), [`es6.math.clz32`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.clz32.js), [`es6.math.cosh`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.cosh.js), [`es6.math.expm1`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.expm1.js), [`es6.math.fround`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.fround.js), [`es6.math.hypot`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.hypot.js), [`es6.math.imul`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.imul.js), [`es6.math.log10`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.log10.js), [`es6.math.log1p`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.log1p.js), [`es6.math.log2`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.log2.js), [`es6.math.sign`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.sign.js), [`es6.math.sinh`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.sinh.js), [`es6.math.tanh`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.tanh.js), [`es6.math.trunc`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.math.trunc.js). +```js +Math + .acosh(num) -> num + .asinh(num) -> num + .atanh(num) -> num + .cbrt(num) -> num + .clz32(num) -> uint + .cosh(num) -> num + .expm1(num) -> num + .fround(num) -> num + .hypot(...args) -> num + .imul(num, num) -> int + .log1p(num) -> num + .log10(num) -> num + .log2(num) -> num + .sign(num) -> 1 | -1 | 0 | -0 | NaN + .sinh(num) -> num + .tanh(num) -> num + .trunc(num) -> num +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es6/math +core-js(/library)/fn/math/acosh +core-js(/library)/fn/math/asinh +core-js(/library)/fn/math/atanh +core-js(/library)/fn/math/cbrt +core-js(/library)/fn/math/clz32 +core-js(/library)/fn/math/cosh +core-js(/library)/fn/math/expm1 +core-js(/library)/fn/math/fround +core-js(/library)/fn/math/hypot +core-js(/library)/fn/math/imul +core-js(/library)/fn/math/log1p +core-js(/library)/fn/math/log10 +core-js(/library)/fn/math/log2 +core-js(/library)/fn/math/sign +core-js(/library)/fn/math/sinh +core-js(/library)/fn/math/tanh +core-js(/library)/fn/math/trunc +``` +#### ECMAScript 6: Date +Modules [`es6.date.to-string`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.date.to-string.js), ES5 features with fixes: [`es6.date.now`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.date.now.js), [`es6.date.to-iso-string`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.date.to-iso-string.js), [`es6.date.to-json`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.date.to-json.js) and [`es6.date.to-primitive`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.date.to-primitive.js). +```js +Date + .now() -> int + #toISOString() -> string + #toJSON() -> string + #toString() -> string + #@@toPrimitive(hint) -> primitive +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js/es6/date +core-js/fn/date/to-string +core-js(/library)/fn/date/now +core-js(/library)/fn/date/to-iso-string +core-js(/library)/fn/date/to-json +core-js(/library)/fn/date/to-primitive +``` +[*Example*](http://goo.gl/haeHLR): +```js +new Date(NaN).toString(); // => 'Invalid Date' +``` + +#### ECMAScript 6: Promise +Module [`es6.promise`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.promise.js). +```js +new Promise(executor(resolve(var), reject(var))) -> promise + #then(resolved(var), rejected(var)) -> promise + #catch(rejected(var)) -> promise + .resolve(promise | var) -> promise + .reject(var) -> promise + .all(iterable) -> promise + .race(iterable) -> promise +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es6/promise +core-js(/library)/fn/promise +``` +Basic [*example*](http://goo.gl/vGrtUC): +```js +function sleepRandom(time){ + return new Promise(function(resolve, reject){ + setTimeout(resolve, time * 1e3, 0 | Math.random() * 1e3); + }); +} + +console.log('Run'); // => Run +sleepRandom(5).then(function(result){ + console.log(result); // => 869, after 5 sec. + return sleepRandom(10); +}).then(function(result){ + console.log(result); // => 202, after 10 sec. +}).then(function(){ + console.log('immediately after'); // => immediately after + throw Error('Irror!'); +}).then(function(){ + console.log('will not be displayed'); +}).catch(x => console.log(x)); // => => Error: Irror! +``` +`Promise.resolve` and `Promise.reject` [*example*](http://goo.gl/vr8TN3): +```js +Promise.resolve(42).then(x => console.log(x)); // => 42 +Promise.reject(42).catch(x => console.log(x)); // => 42 + +Promise.resolve($.getJSON('/data.json')); // => ES6 promise +``` +`Promise.all` [*example*](http://goo.gl/RdoDBZ): +```js +Promise.all([ + 'foo', + sleepRandom(5), + sleepRandom(15), + sleepRandom(10) // after 15 sec: +]).then(x => console.log(x)); // => ['foo', 956, 85, 382] +``` +`Promise.race` [*example*](http://goo.gl/L8ovkJ): +```js +function timeLimit(promise, time){ + return Promise.race([promise, new Promise(function(resolve, reject){ + setTimeout(reject, time * 1e3, Error('Await > ' + time + ' sec')); + })]); +} + +timeLimit(sleepRandom(5), 10).then(x => console.log(x)); // => 853, after 5 sec. +timeLimit(sleepRandom(15), 10).catch(x => console.log(x)); // Error: Await > 10 sec +``` +ECMAScript 7 [async functions](https://tc39.github.io/ecmascript-asyncawait) [example](http://goo.gl/wnQS4j): +```js +var delay = time => new Promise(resolve => setTimeout(resolve, time)) + +async function sleepRandom(time){ + await delay(time * 1e3); + return 0 | Math.random() * 1e3; +}; +async function sleepError(time, msg){ + await delay(time * 1e3); + throw Error(msg); +}; + +(async () => { + try { + console.log('Run'); // => Run + console.log(await sleepRandom(5)); // => 936, after 5 sec. + var [a, b, c] = await Promise.all([ + sleepRandom(5), + sleepRandom(15), + sleepRandom(10) + ]); + console.log(a, b, c); // => 210 445 71, after 15 sec. + await sleepError(5, 'Irror!'); + console.log('Will not be displayed'); + } catch(e){ + console.log(e); // => Error: 'Irror!', after 5 sec. + } +})(); +``` + +##### Unhandled rejection tracking + +In Node.js, like in native implementation, available events [`unhandledRejection`](https://nodejs.org/api/process.html#process_event_unhandledrejection) and [`rejectionHandled`](https://nodejs.org/api/process.html#process_event_rejectionhandled): +```js +process.on('unhandledRejection', (reason, promise) => console.log('unhandled', reason, promise)); +process.on('rejectionHandled', (promise) => console.log('handled', promise)); + +var p = Promise.reject(42); +// unhandled 42 [object Promise] + +setTimeout(() => p.catch(_ => _), 1e3); +// handled [object Promise] +``` +In a browser on rejection, by default, you will see notify in the console, or you can add a custom handler and a handler on handling unhandled, [*example*](http://goo.gl/Wozskl): +```js +window.onunhandledrejection = e => console.log('unhandled', e.reason, e.promise); +window.onrejectionhandled = e => console.log('handled', e.reason, e.promise); + +var p = Promise.reject(42); +// unhandled 42 [object Promise] + +setTimeout(() => p.catch(_ => _), 1e3); +// handled 42 [object Promise] +``` + +#### ECMAScript 6: Symbol +Module [`es6.symbol`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.symbol.js). +```js +Symbol(description?) -> symbol + .hasInstance -> @@hasInstance + .isConcatSpreadable -> @@isConcatSpreadable + .iterator -> @@iterator + .match -> @@match + .replace -> @@replace + .search -> @@search + .species -> @@species + .split -> @@split + .toPrimitive -> @@toPrimitive + .toStringTag -> @@toStringTag + .unscopables -> @@unscopables + .for(key) -> symbol + .keyFor(symbol) -> key + .useSimple() -> void + .useSetter() -> void +Object + .getOwnPropertySymbols(object) -> array +``` +Also wrapped some methods for correct work with `Symbol` polyfill. +```js +Object + .create(proto | null, descriptors?) -> object + .defineProperty(target, key, desc) -> target + .defineProperties(target, descriptors) -> target + .getOwnPropertyDescriptor(var, key) -> desc | undefined + .getOwnPropertyNames(var) -> array + #propertyIsEnumerable(key) -> bool +JSON + .stringify(target, replacer?, space?) -> string | undefined +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es6/symbol +core-js(/library)/fn/symbol +core-js(/library)/fn/symbol/has-instance +core-js(/library)/fn/symbol/is-concat-spreadable +core-js(/library)/fn/symbol/iterator +core-js(/library)/fn/symbol/match +core-js(/library)/fn/symbol/replace +core-js(/library)/fn/symbol/search +core-js(/library)/fn/symbol/species +core-js(/library)/fn/symbol/split +core-js(/library)/fn/symbol/to-primitive +core-js(/library)/fn/symbol/to-string-tag +core-js(/library)/fn/symbol/unscopables +core-js(/library)/fn/symbol/for +core-js(/library)/fn/symbol/key-for +``` +[*Basic example*](http://goo.gl/BbvWFc): +```js +var Person = (function(){ + var NAME = Symbol('name'); + function Person(name){ + this[NAME] = name; + } + Person.prototype.getName = function(){ + return this[NAME]; + }; + return Person; +})(); + +var person = new Person('Vasya'); +console.log(person.getName()); // => 'Vasya' +console.log(person['name']); // => undefined +console.log(person[Symbol('name')]); // => undefined, symbols are uniq +for(var key in person)console.log(key); // => only 'getName', symbols are not enumerable +``` +`Symbol.for` & `Symbol.keyFor` [*example*](http://goo.gl/0pdJjX): +```js +var symbol = Symbol.for('key'); +symbol === Symbol.for('key'); // true +Symbol.keyFor(symbol); // 'key' +``` +[*Example*](http://goo.gl/mKVOQJ) with methods for getting own object keys: +```js +var O = {a: 1}; +Object.defineProperty(O, 'b', {value: 2}); +O[Symbol('c')] = 3; +Object.keys(O); // => ['a'] +Object.getOwnPropertyNames(O); // => ['a', 'b'] +Object.getOwnPropertySymbols(O); // => [Symbol(c)] +Reflect.ownKeys(O); // => ['a', 'b', Symbol(c)] +``` +##### Caveats when using `Symbol` polyfill: + +* We can't add new primitive type, `Symbol` returns object. +* `Symbol.for` and `Symbol.keyFor` can't be shimmed cross-realm. +* By default, to hide the keys, `Symbol` polyfill defines setter in `Object.prototype`. For this reason, uncontrolled creation of symbols can cause memory leak and the `in` operator is not working correctly with `Symbol` polyfill: `Symbol() in {} // => true`. + +You can disable defining setters in `Object.prototype`. [Example](http://goo.gl/N5UD7J): +```js +Symbol.useSimple(); +var s1 = Symbol('s1') + , o1 = {}; +o1[s1] = true; +for(var key in o1)console.log(key); // => 'Symbol(s1)_t.qamkg9f3q', w/o native Symbol + +Symbol.useSetter(); +var s2 = Symbol('s2') + , o2 = {}; +o2[s2] = true; +for(var key in o2)console.log(key); // nothing +``` +* Currently, `core-js` not adds setters to `Object.prototype` for well-known symbols for correct work something like `Symbol.iterator in foo`. It can cause problems with their enumerability. +* Some problems possible with environment exotic objects (for example, IE `localStorage`). + +#### ECMAScript 6: Collections +`core-js` uses native collections in most case, just fixes methods / constructor, if it's required, and in old environment uses fast polyfill (O(1) lookup). +#### Map +Module [`es6.map`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.map.js). +```js +new Map(iterable (entries) ?) -> map + #clear() -> void + #delete(key) -> bool + #forEach(fn(val, key, @), that) -> void + #get(key) -> val + #has(key) -> bool + #set(key, val) -> @ + #size -> uint + #values() -> iterator + #keys() -> iterator + #entries() -> iterator + #@@iterator() -> iterator (entries) +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es6/map +core-js(/library)/fn/map +``` +[*Examples*](http://goo.gl/GWR7NI): +```js +var a = [1]; + +var map = new Map([['a', 1], [42, 2]]); +map.set(a, 3).set(true, 4); + +console.log(map.size); // => 4 +console.log(map.has(a)); // => true +console.log(map.has([1])); // => false +console.log(map.get(a)); // => 3 +map.forEach(function(val, key){ + console.log(val); // => 1, 2, 3, 4 + console.log(key); // => 'a', 42, [1], true +}); +map.delete(a); +console.log(map.size); // => 3 +console.log(map.get(a)); // => undefined +console.log(Array.from(map)); // => [['a', 1], [42, 2], [true, 4]] + +var map = new Map([['a', 1], ['b', 2], ['c', 3]]); + +for(var [key, val] of map){ + console.log(key); // => 'a', 'b', 'c' + console.log(val); // => 1, 2, 3 +} +for(var val of map.values())console.log(val); // => 1, 2, 3 +for(var key of map.keys())console.log(key); // => 'a', 'b', 'c' +for(var [key, val] of map.entries()){ + console.log(key); // => 'a', 'b', 'c' + console.log(val); // => 1, 2, 3 +} +``` +#### Set +Module [`es6.set`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.set.js). +```js +new Set(iterable?) -> set + #add(key) -> @ + #clear() -> void + #delete(key) -> bool + #forEach(fn(el, el, @), that) -> void + #has(key) -> bool + #size -> uint + #values() -> iterator + #keys() -> iterator + #entries() -> iterator + #@@iterator() -> iterator (values) +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es6/set +core-js(/library)/fn/set +``` +[*Examples*](http://goo.gl/bmhLwg): +```js +var set = new Set(['a', 'b', 'a', 'c']); +set.add('d').add('b').add('e'); +console.log(set.size); // => 5 +console.log(set.has('b')); // => true +set.forEach(function(it){ + console.log(it); // => 'a', 'b', 'c', 'd', 'e' +}); +set.delete('b'); +console.log(set.size); // => 4 +console.log(set.has('b')); // => false +console.log(Array.from(set)); // => ['a', 'c', 'd', 'e'] + +var set = new Set([1, 2, 3, 2, 1]); + +for(var val of set)console.log(val); // => 1, 2, 3 +for(var val of set.values())console.log(val); // => 1, 2, 3 +for(var key of set.keys())console.log(key); // => 1, 2, 3 +for(var [key, val] of set.entries()){ + console.log(key); // => 1, 2, 3 + console.log(val); // => 1, 2, 3 +} +``` +#### WeakMap +Module [`es6.weak-map`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.weak-map.js). +```js +new WeakMap(iterable (entries) ?) -> weakmap + #delete(key) -> bool + #get(key) -> val + #has(key) -> bool + #set(key, val) -> @ +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es6/weak-map +core-js(/library)/fn/weak-map +``` +[*Examples*](http://goo.gl/SILXyw): +```js +var a = [1] + , b = [2] + , c = [3]; + +var wmap = new WeakMap([[a, 1], [b, 2]]); +wmap.set(c, 3).set(b, 4); +console.log(wmap.has(a)); // => true +console.log(wmap.has([1])); // => false +console.log(wmap.get(a)); // => 1 +wmap.delete(a); +console.log(wmap.get(a)); // => undefined + +// Private properties store: +var Person = (function(){ + var names = new WeakMap; + function Person(name){ + names.set(this, name); + } + Person.prototype.getName = function(){ + return names.get(this); + }; + return Person; +})(); + +var person = new Person('Vasya'); +console.log(person.getName()); // => 'Vasya' +for(var key in person)console.log(key); // => only 'getName' +``` +#### WeakSet +Module [`es6.weak-set`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.weak-set.js). +```js +new WeakSet(iterable?) -> weakset + #add(key) -> @ + #delete(key) -> bool + #has(key) -> bool +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es6/weak-set +core-js(/library)/fn/weak-set +``` +[*Examples*](http://goo.gl/TdFbEx): +```js +var a = [1] + , b = [2] + , c = [3]; + +var wset = new WeakSet([a, b, a]); +wset.add(c).add(b).add(c); +console.log(wset.has(b)); // => true +console.log(wset.has([2])); // => false +wset.delete(b); +console.log(wset.has(b)); // => false +``` +##### Caveats when using collections polyfill: + +* Weak-collections polyfill stores values as hidden properties of keys. It works correct and not leak in most cases. However, it is desirable to store a collection longer than its keys. + +#### ECMAScript 6: Typed Arrays +Implementations and fixes `ArrayBuffer`, `DataView`, typed arrays constructors, static and prototype methods. Typed Arrays work only in environments with support descriptors (IE9+), `ArrayBuffer` and `DataView` should work anywhere. + +Modules [`es6.typed.array-buffer`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.typed.array-buffer.js), [`es6.typed.data-view`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.typed.data-view.js), [`es6.typed.int8-array`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.typed.int8-array.js), [`es6.typed.uint8-array`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.typed.uint8-array.js), [`es6.typed.uint8-clamped-array`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.typed.uint8-clamped-array.js), [`es6.typed.int16-array`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.typed.int16-array.js), [`es6.typed.uint16-array`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.typed.uint16-array.js), [`es6.typed.int32-array`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.typed.int32-array.js), [`es6.typed.uint32-array`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.typed.uint32-array.js), [`es6.typed.float32-array`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.typed.float32-array.js) and [`es6.typed.float64-array`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.typed.float64-array.js). +```js +new ArrayBuffer(length) -> buffer + .isView(var) -> bool + #slice(start = 0, end = @length) -> buffer + #byteLength -> uint + +new DataView(buffer, byteOffset = 0, byteLength = buffer.byteLength - byteOffset) -> view + #getInt8(offset) -> int8 + #getUint8(offset) -> uint8 + #getInt16(offset, littleEndian = false) -> int16 + #getUint16(offset, littleEndian = false) -> uint16 + #getInt32(offset, littleEndian = false) -> int32 + #getUint32(offset, littleEndian = false) -> uint32 + #getFloat32(offset, littleEndian = false) -> float32 + #getFloat64(offset, littleEndian = false) -> float64 + #setInt8(offset, value) -> void + #setUint8(offset, value) -> void + #setInt16(offset, value, littleEndian = false) -> void + #setUint16(offset, value, littleEndian = false) -> void + #setInt32(offset, value, littleEndian = false) -> void + #setUint32(offset, value, littleEndian = false) -> void + #setFloat32(offset, value, littleEndian = false) -> void + #setFloat64(offset, value, littleEndian = false) -> void + #buffer -> buffer + #byteLength -> uint + #byteOffset -> uint + +{ + Int8Array, + Uint8Array, + Uint8ClampedArray, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array +} + new %TypedArray%(length) -> typed + new %TypedArray%(typed) -> typed + new %TypedArray%(arrayLike) -> typed + new %TypedArray%(iterable) -> typed + new %TypedArray%(buffer, byteOffset = 0, length = (buffer.byteLength - byteOffset) / @BYTES_PER_ELEMENT) -> typed + .BYTES_PER_ELEMENT -> uint + .from(arrayLike | iterable, mapFn(val, index)?, that) -> typed + .of(...args) -> typed + #BYTES_PER_ELEMENT -> uint + #copyWithin(target = 0, start = 0, end = @length) -> @ + #every(fn(val, index, @), that) -> bool + #fill(val, start = 0, end = @length) -> @ + #filter(fn(val, index, @), that) -> typed + #find(fn(val, index, @), that) -> val + #findIndex(fn(val, index, @), that) -> index + #forEach(fn(val, index, @), that) -> void + #indexOf(var, from?) -> int + #join(string = ',') -> string + #lastIndexOf(var, from?) -> int + #map(fn(val, index, @), that) -> typed + #reduce(fn(memo, val, index, @), memo?) -> var + #reduceRight(fn(memo, val, index, @), memo?) -> var + #reverse() -> @ + #set(arrayLike, offset = 0) -> void + #slice(start = 0, end = @length) -> typed + #some(fn(val, index, @), that) -> bool + #sort(fn(a, b)?) -> @ + #subarray(start = 0, end = @length) -> typed + #toString() -> string + #toLocaleString() -> string + #values() -> iterator + #keys() -> iterator + #entries() -> iterator + #@@iterator() -> iterator (values) + #buffer -> buffer + #byteLength -> uint + #byteOffset -> uint + #length -> uint +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es6/typed +core-js(/library)/fn/typed +core-js(/library)/fn/typed/array-buffer +core-js(/library)/fn/typed/data-view +core-js(/library)/fn/typed/int8-array +core-js(/library)/fn/typed/uint8-array +core-js(/library)/fn/typed/uint8-clamped-array +core-js(/library)/fn/typed/int16-array +core-js(/library)/fn/typed/uint16-array +core-js(/library)/fn/typed/int32-array +core-js(/library)/fn/typed/uint32-array +core-js(/library)/fn/typed/float32-array +core-js(/library)/fn/typed/float64-array +``` +[*Examples*](http://goo.gl/yla75z): +```js +new Int32Array(4); // => [0, 0, 0, 0] +new Uint8ClampedArray([1, 2, 3, 666]); // => [1, 2, 3, 255] +new Float32Array(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] + +var buffer = new ArrayBuffer(8); +var view = new DataView(buffer); +view.setFloat64(0, 123.456, true); +new Uint8Array(buffer.slice(4)); // => [47, 221, 94, 64] + +Int8Array.of(1, 1.5, 5.7, 745); // => [1, 1, 5, -23] +Uint8Array.from([1, 1.5, 5.7, 745]); // => [1, 1, 5, 233] + +var typed = new Uint8Array([1, 2, 3]); + +var a = typed.slice(1); // => [2, 3] +typed.buffer === a.buffer; // => false +var b = typed.subarray(1); // => [2, 3] +typed.buffer === b.buffer; // => true + +typed.filter(it => it % 2); // => [1, 3] +typed.map(it => it * 1.5); // => [1, 3, 4] + +for(var val of typed)console.log(val); // => 1, 2, 3 +for(var val of typed.values())console.log(val); // => 1, 2, 3 +for(var key of typed.keys())console.log(key); // => 0, 1, 2 +for(var [key, val] of typed.entries()){ + console.log(key); // => 0, 1, 2 + console.log(val); // => 1, 2, 3 +} +``` +##### Caveats when using typed arrays: + +* Typed Arrays polyfills works completely how should work by the spec, but because of internal use getter / setters on each instance, is slow and consumes significant memory. However, typed arrays polyfills required mainly for IE9 (and for `Uint8ClampedArray` in IE10 and early IE11), all modern engines have native typed arrays and requires only constructors fixes and methods. +* The current version hasn't special entry points for methods, they can be added only with constructors. It can be added in the future. +* In the `library` version we can't pollute native prototypes, so prototype methods available as constructors static. + +#### ECMAScript 6: Reflect +Modules [`es6.reflect.apply`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.reflect.apply.js), [`es6.reflect.construct`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.reflect.construct.js), [`es6.reflect.define-property`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.reflect.define-property.js), [`es6.reflect.delete-property`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.reflect.delete-property.js), [`es6.reflect.enumerate`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.reflect.enumerate.js), [`es6.reflect.get`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.reflect.get.js), [`es6.reflect.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.reflect.get-own-property-descriptor.js), [`es6.reflect.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.reflect.get-prototype-of.js), [`es6.reflect.has`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.reflect.has.js), [`es6.reflect.is-extensible`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.reflect.is-extensible.js), [`es6.reflect.own-keys`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.reflect.own-keys.js), [`es6.reflect.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.reflect.prevent-extensions.js), [`es6.reflect.set`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.reflect.set.js), [`es6.reflect.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es6.reflect.set-prototype-of.js). +```js +Reflect + .apply(target, thisArgument, argumentsList) -> var + .construct(target, argumentsList, newTarget?) -> object + .defineProperty(target, propertyKey, attributes) -> bool + .deleteProperty(target, propertyKey) -> bool + .enumerate(target) -> iterator (removed from the spec and will be removed from core-js@3) + .get(target, propertyKey, receiver?) -> var + .getOwnPropertyDescriptor(target, propertyKey) -> desc + .getPrototypeOf(target) -> object | null + .has(target, propertyKey) -> bool + .isExtensible(target) -> bool + .ownKeys(target) -> array + .preventExtensions(target) -> bool + .set(target, propertyKey, V, receiver?) -> bool + .setPrototypeOf(target, proto) -> bool (required __proto__ - IE11+) +``` +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es6/reflect +core-js(/library)/fn/reflect +core-js(/library)/fn/reflect/apply +core-js(/library)/fn/reflect/construct +core-js(/library)/fn/reflect/define-property +core-js(/library)/fn/reflect/delete-property +core-js(/library)/fn/reflect/enumerate (deprecated and will be removed from the next major release) +core-js(/library)/fn/reflect/get +core-js(/library)/fn/reflect/get-own-property-descriptor +core-js(/library)/fn/reflect/get-prototype-of +core-js(/library)/fn/reflect/has +core-js(/library)/fn/reflect/is-extensible +core-js(/library)/fn/reflect/own-keys +core-js(/library)/fn/reflect/prevent-extensions +core-js(/library)/fn/reflect/set +core-js(/library)/fn/reflect/set-prototype-of +``` +[*Examples*](http://goo.gl/gVT0cH): +```js +var O = {a: 1}; +Object.defineProperty(O, 'b', {value: 2}); +O[Symbol('c')] = 3; +Reflect.ownKeys(O); // => ['a', 'b', Symbol(c)] + +function C(a, b){ + this.c = a + b; +} + +var instance = Reflect.construct(C, [20, 22]); +instance.c; // => 42 +``` + +### ECMAScript 7+ proposals +[The TC39 process.](https://tc39.github.io/process-document/) + +[*CommonJS entry points:*](#commonjs) +``` +core-js(/library)/es7 +core-js(/library)/es7/array +core-js(/library)/es7/global +core-js(/library)/es7/string +core-js(/library)/es7/map +core-js(/library)/es7/set +core-js(/library)/es7/error +core-js(/library)/es7/math +core-js(/library)/es7/system +core-js(/library)/es7/symbol +core-js(/library)/es7/reflect +core-js(/library)/es7/observable +``` +`core-js/stage/4` entry point contains only stage 4 proposals, `core-js/stage/3` - stage 3 and stage 4, etc. +#### Stage 4 proposals + +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/stage/4 +``` +* `{Array, %TypedArray%}#includes` [proposal](https://github.com/tc39/Array.prototype.includes) - module [`es7.array.includes`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.array.includes.js), `%TypedArray%` version in modules from [this section](#ecmascript-6-typed-arrays). +```js +Array + #includes(var, from?) -> bool +{ + Int8Array, + Uint8Array, + Uint8ClampedArray, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array +} + #includes(var, from?) -> bool +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/array/includes +``` +[*Examples*](http://goo.gl/2Gq4ma): +```js +[1, 2, 3].includes(2); // => true +[1, 2, 3].includes(4); // => false +[1, 2, 3].includes(2, 2); // => false + +[NaN].indexOf(NaN); // => -1 +[NaN].includes(NaN); // => true +Array(1).indexOf(undefined); // => -1 +Array(1).includes(undefined); // => true +``` +* `Object.values`, `Object.entries` [proposal](https://github.com/tc39/proposal-object-values-entries) - modules [`es7.object.values`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.object.values.js), [`es7.object.entries`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.object.entries.js) +```js +Object + .values(object) -> array + .entries(object) -> array +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/object/values +core-js(/library)/fn/object/entries +``` +[*Examples*](http://goo.gl/6kuGOn): +```js +Object.values({a: 1, b: 2, c: 3}); // => [1, 2, 3] +Object.entries({a: 1, b: 2, c: 3}); // => [['a', 1], ['b', 2], ['c', 3]] + +for(let [key, value] of Object.entries({a: 1, b: 2, c: 3})){ + console.log(key); // => 'a', 'b', 'c' + console.log(value); // => 1, 2, 3 +} +``` +* `Object.getOwnPropertyDescriptors` [proposal](https://github.com/tc39/proposal-object-getownpropertydescriptors) - module [`es7.object.get-own-property-descriptors`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.object.get-own-property-descriptors.js) +```js +Object + .getOwnPropertyDescriptors(object) -> object +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/object/get-own-property-descriptors +``` +*Examples*: +```js +// Shallow object cloning with prototype and descriptors: +var copy = Object.create(Object.getPrototypeOf(O), Object.getOwnPropertyDescriptors(O)); +// Mixin: +Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); +``` +* `String#padStart`, `String#padEnd` [proposal](https://github.com/tc39/proposal-string-pad-start-end) - modules [`es7.string.pad-start`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.string.pad-start.js), [`es7.string.pad-end`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.string.pad-end.js) +```js +String + #padStart(length, fillStr = ' ') -> string + #padEnd(length, fillStr = ' ') -> string +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/string/pad-start +core-js(/library)/fn/string/pad-end +core-js(/library)/fn/string/virtual/pad-start +core-js(/library)/fn/string/virtual/pad-end +``` +[*Examples*](http://goo.gl/hK5ccv): +```js +'hello'.padStart(10); // => ' hello' +'hello'.padStart(10, '1234'); // => '12341hello' +'hello'.padEnd(10); // => 'hello ' +'hello'.padEnd(10, '1234'); // => 'hello12341' +``` +* `Object#__(define|lookup)[GS]etter__`, [annex B ES2017](https://github.com/tc39/ecma262/pull/381), but we haven't special namespace for that - modules [`es7.object.define-setter`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.object.define-setter.js), [`es7.object.define-getter`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.object.define-getter.js), [`es7.object.lookup-setter`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.object.lookup-setter.js) and [`es7.object.lookup-getter`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.object.lookup-getter.js). +```js +Object + #__defineSetter__(key, fn) -> void + #__defineGetter__(key, fn) -> void + #__lookupSetter__(key) -> fn | void + #__lookupGetter__(key) -> fn | void +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/object/define-getter +core-js(/library)/fn/object/define-setter +core-js(/library)/fn/object/lookup-getter +core-js(/library)/fn/object/lookup-setter +``` + +#### Stage 3 proposals +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/stage/3 +``` +* `global` [proposal](https://github.com/tc39/proposal-global) - modules [`es7.global`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.global.js) and [`es7.system.global`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.system.global.js) (obsolete) +```js +global -> object +System + .global -> object (obsolete) +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/global +core-js(/library)/fn/system/global (obsolete) +``` +[*Examples*](http://goo.gl/gEqMl7): +```js +global.Array === Array; // => true +``` +* `Promise#finally` [proposal](https://github.com/tc39/proposal-promise-finally) - module [`es7.promise.finally`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.promise.finally.js) +```js +Promise + #finally(onFinally()) -> promise +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/promise/finally +``` +[*Examples*](https://goo.gl/AhyBbJ): +```js +Promise.resolve(42).finally(() => console.log('You will see it anyway')); + +Promise.reject(42).finally(() => console.log('You will see it anyway')); + +#### Stage 2 proposals +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/stage/2 +``` +* `String#trimLeft`, `String#trimRight` / `String#trimStart`, `String#trimEnd` [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim) - modules [`es7.string.trim-left`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.string.trim-right.js), [`es7.string.trim-right`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.string.trim-right.js) +```js +String + #trimLeft() -> string + #trimRight() -> string + #trimStart() -> string + #trimEnd() -> string +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/string/trim-start +core-js(/library)/fn/string/trim-end +core-js(/library)/fn/string/trim-left +core-js(/library)/fn/string/trim-right +core-js(/library)/fn/string/virtual/trim-start +core-js(/library)/fn/string/virtual/trim-end +core-js(/library)/fn/string/virtual/trim-left +core-js(/library)/fn/string/virtual/trim-right +``` +[*Examples*](http://goo.gl/Er5lMJ): +```js +' hello '.trimLeft(); // => 'hello ' +' hello '.trimRight(); // => ' hello' +``` +``` +* `Symbol.asyncIterator` for [async iteration proposal](https://github.com/tc39/proposal-async-iteration) - module [`es7.symbol.async-iterator`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.symbol.async-iterator.js) +```js +Symbol + .asyncIterator -> @@asyncIterator +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/symbol/async-iterator +``` + +#### Stage 1 proposals +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/stage/1 +``` +* `Promise.try` [proposal](https://github.com/tc39/proposal-promise-try) - module [`es7.promise.try`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.promise.try.js) +```js +Promise + .try(function()) -> promise +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/promise/try +``` +[*Examples*](https://goo.gl/k5GGRo): +```js +Promise.try(() => 42).then(it => console.log(`Promise, resolved as ${it}`)); + +Promise.try(() => { throw 42; }).catch(it => console.log(`Promise, rejected as ${it}`)); +``` +* `Array#flatten` and `Array#flatMap` [proposal](https://tc39.github.io/proposal-flatMap) - modules [`es7.array.flatten`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.array.flatten.js) and [`es7.array.flat-map`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.array.flat-map.js) +```js +Array + #flatten(depthArg = 1) -> array + #flatMap(fn(val, key, @), that) -> array +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/array/flatten +core-js(/library)/fn/array/flat-map +core-js(/library)/fn/array/virtual/flatten +core-js(/library)/fn/array/virtual/flat-map +``` +[*Examples*](https://goo.gl/jTXsZi): +```js +[1, [2, 3], [4, 5]].flatten(); // => [1, 2, 3, 4, 5] +[1, [2, [3, [4]]], 5].flatten(); // => [1, 2, [3, [4]], 5] +[1, [2, [3, [4]]], 5].flatten(3); // => [1, 2, 3, 4, 5] + +[{a: 1, b: 2}, {a: 3, b: 4}, {a: 5, b: 6}].flatMap(it => [it.a, it.b]); // => [1, 2, 3, 4, 5, 6] +``` +* `.of` and `.from` methods on collection constructors [proposal](https://github.com/tc39/proposal-setmap-offrom) - modules [`es7.set.of`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.set.of.js), [`es7.set.from`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.set.from.js), [`es7.map.of`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.map.of.js), [`es7.map.from`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.map.from.js), [`es7.weak-set.of`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.weak-set.of.js), [`es7.weak-set.from`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.weak-set.from.js), [`es7.weak-map.of`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.weak-map.of.js), [`es7.weak-map.from`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.weak-map.from.js) +```js +Set + .of(...args) -> set + .from(iterable, mapFn(val, index)?, that?) -> set +Map + .of(...args) -> map + .from(iterable, mapFn(val, index)?, that?) -> map +WeakSet + .of(...args) -> weakset + .from(iterable, mapFn(val, index)?, that?) -> weakset +WeakMap + .of(...args) -> weakmap + .from(iterable, mapFn(val, index)?, that?) -> weakmap +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/set/of +core-js(/library)/fn/set/from +core-js(/library)/fn/map/of +core-js(/library)/fn/map/from +core-js(/library)/fn/weak-set/of +core-js(/library)/fn/weak-set/from +core-js(/library)/fn/weak-map/of +core-js(/library)/fn/weak-map/from +``` +[*Examples*](https://goo.gl/mSC7eU): +```js +Set.of(1, 2, 3, 2, 1); // => Set {1, 2, 3} + +Map.from([[1, 2], [3, 4]], ([key, val]) => [key ** 2, val ** 2]); // => Map {1: 4, 9: 16} +``` +* `String#matchAll` [proposal](https://github.com/tc39/String.prototype.matchAll) - module [`es7.string.match-all`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.string.match-all.js) +```js +String + #matchAll(regexp) -> iterator +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/string/match-all +core-js(/library)/fn/string/virtual/match-all +``` +[*Examples*](http://goo.gl/6kp9EB): +```js +for(let [_, d, D] of '1111a2b3cccc'.matchAll(/(\d)(\D)/)){ + console.log(d, D); // => 1 a, 2 b, 3 c +} +``` +* `Observable` [proposal](https://github.com/zenparsing/es-observable) - modules [`es7.observable`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.observable.js) and [`es7.symbol.observable`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.symbol.observable.js) +```js +new Observable(fn) -> observable + #subscribe(observer) -> subscription + #forEach(fn) -> promise + #@@observable() -> @ + .of(...items) -> observable + .from(observable | iterable) -> observable + .@@species -> @ +Symbol + .observable -> @@observable +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/observable +core-js(/library)/fn/symbol/observable +``` +[*Examples*](http://goo.gl/1LDywi): +```js +new Observable(observer => { + observer.next('hello'); + observer.next('world'); + observer.complete(); +}).forEach(it => console.log(it)) + .then(_ => console.log('!')); +``` +* `Math.{clamp, DEG_PER_RAD, degrees, fscale, rad-per-deg, radians, scale}` + [proposal](https://github.com/rwaldron/proposal-math-extensions) - modules + [`es7.math.clamp`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.math.clamp.js), + [`es7.math.DEG_PER_RAD`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.math.DEG_PER_RAD.js), + [`es7.math.degrees`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.math.degrees.js), + [`es7.math.fscale`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.math.fscale.js), + [`es7.math.RAD_PER_DEG`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.math.RAD_PER_DEG.js), + [`es7.math.radians`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.math.radians.js) and + [`es7.math.scale`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.math.scale.js) +```js +Math + .DEG_PER_RAD -> number + .RAD_PER_DEG -> number + .clamp(x, lower, upper) -> number + .degrees(radians) -> number + .fscale(x, inLow, inHigh, outLow, outHigh) -> number + .radians(degrees) -> number + .scale(x, inLow, inHigh, outLow, outHigh) -> number +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/math/clamp +core-js(/library)/fn/math/deg-per-rad +core-js(/library)/fn/math/degrees +core-js(/library)/fn/math/fscale +core-js(/library)/fn/math/rad-per-deg +core-js(/library)/fn/math/radians +core-js(/library)/fn/math/scale +``` +* `Math.signbit` [proposal](http://jfbastien.github.io/papers/Math.signbit.html) - module [`es7.math.signbit`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.math.signbit.js) +```js +Math + .signbit(x) -> bool +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/math/signbit +``` +[*Examples*](http://es6.zloirock.ru/): +```js +Math.signbit(NaN); // => NaN +Math.signbit(1); // => true +Math.signbit(-1); // => false +Math.signbit(0); // => true +Math.signbit(-0); // => false +``` + +#### Stage 0 proposals +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/stage/0 +``` +* `String#at` [proposal](https://github.com/mathiasbynens/String.prototype.at) - module [`es7.string.at`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.string.at.js) +```js +String + #at(index) -> string +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/string/at +core-js(/library)/fn/string/virtual/at +``` +[*Examples*](http://goo.gl/XluXI8): +```js +'a𠮷b'.at(1); // => '𠮷' +'a𠮷b'.at(1).length; // => 2 +``` +* `Map#toJSON`, `Set#toJSON` [proposal](https://github.com/DavidBruant/Map-Set.prototype.toJSON) - modules [`es7.map.to-json`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.map.to-json.js), [`es7.set.to-json`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.set.to-json.js) (rejected and will be removed from `core-js@3`) +```js +Map + #toJSON() -> array (rejected and will be removed from core-js@3) +Set + #toJSON() -> array (rejected and will be removed from core-js@3) +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/map +core-js(/library)/fn/set +``` +* `Error.isError` [proposal](https://github.com/ljharb/proposal-is-error) - module [`es7.error.is-error`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.error.is-error.js) (withdrawn and will be removed from `core-js@3`) +```js +Error + .isError(it) -> bool (withdrawn and will be removed from core-js@3) +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/error/is-error +``` +* `Math.{iaddh, isubh, imulh, umulh}` [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703) - modules [`es7.math.iaddh`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.math.iaddh.js), [`es7.math.isubh`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.math.isubh.js), [`es7.math.imulh`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.math.imulh.js) and [`es7.math.umulh`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.math.umulh.js) +```js +Math + .iaddh(lo0, hi0, lo1, hi1) -> int32 + .isubh(lo0, hi0, lo1, hi1) -> int32 + .imulh(a, b) -> int32 + .umulh(a, b) -> uint32 +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/math/iaddh +core-js(/library)/fn/math/isubh +core-js(/library)/fn/math/imulh +core-js(/library)/fn/math/umulh +``` +* `global.asap`, [TC39 discussion](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask), module [`es7.asap`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.asap.js) +```js +asap(fn) -> void +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/asap +``` +[*Examples*](http://goo.gl/tx3SRK): +```js +asap(() => console.log('called as microtask')); +``` + +#### Pre-stage 0 proposals +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/stage/pre +``` +* `Reflect` metadata [proposal](https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md) - modules [`es7.reflect.define-metadata`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.reflect.define-metadata.js), [`es7.reflect.delete-metadata`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.reflect.delete-metadata.js), [`es7.reflect.get-metadata`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.reflect.get-metadata.js), [`es7.reflect.get-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.reflect.get-metadata-keys.js), [`es7.reflect.get-own-metadata`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.reflect.get-own-metadata.js), [`es7.reflect.get-own-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.reflect.get-own-metadata-keys.js), [`es7.reflect.has-metadata`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.reflect.has-metadata.js), [`es7.reflect.has-own-metadata`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.reflect.has-own-metadata.js) and [`es7.reflect.metadata`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/es7.reflect.metadata.js). +```js +Reflect + .defineMetadata(metadataKey, metadataValue, target, propertyKey?) -> void + .getMetadata(metadataKey, target, propertyKey?) -> var + .getOwnMetadata(metadataKey, target, propertyKey?) -> var + .hasMetadata(metadataKey, target, propertyKey?) -> bool + .hasOwnMetadata(metadataKey, target, propertyKey?) -> bool + .deleteMetadata(metadataKey, target, propertyKey?) -> bool + .getMetadataKeys(target, propertyKey?) -> array + .getOwnMetadataKeys(target, propertyKey?) -> array + .metadata(metadataKey, metadataValue) -> decorator(target, targetKey?) -> void +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/reflect/define-metadata +core-js(/library)/fn/reflect/delete-metadata +core-js(/library)/fn/reflect/get-metadata +core-js(/library)/fn/reflect/get-metadata-keys +core-js(/library)/fn/reflect/get-own-metadata +core-js(/library)/fn/reflect/get-own-metadata-keys +core-js(/library)/fn/reflect/has-metadata +core-js(/library)/fn/reflect/has-own-metadata +core-js(/library)/fn/reflect/metadata +``` +[*Examples*](http://goo.gl/KCo3PS): +```js +var O = {}; +Reflect.defineMetadata('foo', 'bar', O); +Reflect.ownKeys(O); // => [] +Reflect.getOwnMetadataKeys(O); // => ['foo'] +Reflect.getOwnMetadata('foo', O); // => 'bar' +``` + +### Web standards +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/web +``` +#### setTimeout / setInterval +Module [`web.timers`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/web.timers.js). Additional arguments fix for IE9-. +```js +setTimeout(fn(...args), time, ...args) -> id +setInterval(fn(...args), time, ...args) -> id +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/web/timers +core-js(/library)/fn/set-timeout +core-js(/library)/fn/set-interval +``` +```js +// Before: +setTimeout(log.bind(null, 42), 1000); +// After: +setTimeout(log, 1000, 42); +``` +#### setImmediate +Module [`web.immediate`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/web.immediate.js). [`setImmediate` proposal](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) polyfill. +```js +setImmediate(fn(...args), ...args) -> id +clearImmediate(id) -> void +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/web/immediate +core-js(/library)/fn/set-immediate +core-js(/library)/fn/clear-immediate +``` +[*Examples*](http://goo.gl/6nXGrx): +```js +setImmediate(function(arg1, arg2){ + console.log(arg1, arg2); // => Message will be displayed with minimum delay +}, 'Message will be displayed', 'with minimum delay'); + +clearImmediate(setImmediate(function(){ + console.log('Message will not be displayed'); +})); +``` +#### Iterable DOM collections +Some DOM collections should have [iterable interface](https://heycam.github.io/webidl/#idl-iterable) or should be [inherited from `Array`](https://heycam.github.io/webidl/#LegacyArrayClass). That mean they should have `keys`, `values`, `entries` and `@@iterator` methods for iteration. So add them. Module [`web.dom.iterable`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/web.dom.iterable.js): +```js +{ + CSSRuleList, + CSSStyleDeclaration, + CSSValueList, + ClientRectList, + DOMRectList, + DOMStringList, + DOMTokenList, + DataTransferItemList, + FileList, + HTMLAllCollection, + HTMLCollection, + HTMLFormElement, + HTMLSelectElement, + MediaList, + MimeTypeArray, + NamedNodeMap, + NodeList, + PaintRequestList, + Plugin, + PluginArray, + SVGLengthList, + SVGNumberList, + SVGPathSegList, + SVGPointList, + SVGStringList, + SVGTransformList, + SourceBufferList, + StyleSheetList, + TextTrackCueList, + TextTrackList, + TouchList +} + #@@iterator() -> iterator (values) + +{ + DOMTokenList, + NodeList +} + #values() -> iterator + #keys() -> iterator + #entries() -> iterator +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/web/dom-collections +core-js(/library)/fn/dom-collections/iterator +``` +[*Examples*](http://goo.gl/lfXVFl): +```js +for(var {id} of document.querySelectorAll('*')){ + if(id)console.log(id); +} + +for(var [index, {id}] of document.querySelectorAll('*').entries()){ + if(id)console.log(index, id); +} +``` +### Non-standard +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/core +``` +#### Object +Modules [`core.object.is-object`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/core.object.is-object.js), [`core.object.classof`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/core.object.classof.js), [`core.object.define`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/core.object.define.js), [`core.object.make`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/core.object.make.js). +```js +Object + .isObject(var) -> bool + .classof(var) -> string + .define(target, mixin) -> target + .make(proto | null, mixin?) -> object +``` + +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/core/object +core-js(/library)/fn/object/is-object +core-js(/library)/fn/object/define +core-js(/library)/fn/object/make +``` +Object classify [*examples*](http://goo.gl/YZQmGo): +```js +Object.isObject({}); // => true +Object.isObject(isNaN); // => true +Object.isObject(null); // => false + +var classof = Object.classof; + +classof(null); // => 'Null' +classof(undefined); // => 'Undefined' +classof(1); // => 'Number' +classof(true); // => 'Boolean' +classof('string'); // => 'String' +classof(Symbol()); // => 'Symbol' + +classof(new Number(1)); // => 'Number' +classof(new Boolean(true)); // => 'Boolean' +classof(new String('string')); // => 'String' + +var fn = function(){} + , list = (function(){return arguments})(1, 2, 3); + +classof({}); // => 'Object' +classof(fn); // => 'Function' +classof([]); // => 'Array' +classof(list); // => 'Arguments' +classof(/./); // => 'RegExp' +classof(new TypeError); // => 'Error' + +classof(new Set); // => 'Set' +classof(new Map); // => 'Map' +classof(new WeakSet); // => 'WeakSet' +classof(new WeakMap); // => 'WeakMap' +classof(new Promise(fn)); // => 'Promise' + +classof([].values()); // => 'Array Iterator' +classof(new Set().values()); // => 'Set Iterator' +classof(new Map().values()); // => 'Map Iterator' + +classof(Math); // => 'Math' +classof(JSON); // => 'JSON' + +function Example(){} +Example.prototype[Symbol.toStringTag] = 'Example'; + +classof(new Example); // => 'Example' +``` +`Object.define` and `Object.make` [*examples*](http://goo.gl/rtpD5Z): +```js +// Before: +Object.defineProperty(target, 'c', { + enumerable: true, + configurable: true, + get: function(){ + return this.a + this.b; + } +}); + +// After: +Object.define(target, { + get c(){ + return this.a + this.b; + } +}); + +// Shallow object cloning with prototype and descriptors: +var copy = Object.make(Object.getPrototypeOf(src), src); + +// Simple inheritance: +function Vector2D(x, y){ + this.x = x; + this.y = y; +} +Object.define(Vector2D.prototype, { + get xy(){ + return Math.hypot(this.x, this.y); + } +}); +function Vector3D(x, y, z){ + Vector2D.apply(this, arguments); + this.z = z; +} +Vector3D.prototype = Object.make(Vector2D.prototype, { + constructor: Vector3D, + get xyz(){ + return Math.hypot(this.x, this.y, this.z); + } +}); + +var vector = new Vector3D(9, 12, 20); +console.log(vector.xy); // => 15 +console.log(vector.xyz); // => 25 +vector.y++; +console.log(vector.xy); // => 15.811388300841896 +console.log(vector.xyz); // => 25.495097567963924 +``` +#### Dict +Module [`core.dict`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/core.dict.js). Based on [TC39 discuss](https://github.com/rwaldron/tc39-notes/blob/master/es6/2012-11/nov-29.md#collection-apis-review) / [strawman](http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard#dictionaries). +```js +[new] Dict(iterable (entries) | object ?) -> dict + .isDict(var) -> bool + .values(object) -> iterator + .keys(object) -> iterator + .entries(object) -> iterator (entries) + .has(object, key) -> bool + .get(object, key) -> val + .set(object, key, value) -> object + .forEach(object, fn(val, key, @), that) -> void + .map(object, fn(val, key, @), that) -> new @ + .mapPairs(object, fn(val, key, @), that) -> new @ + .filter(object, fn(val, key, @), that) -> new @ + .some(object, fn(val, key, @), that) -> bool + .every(object, fn(val, key, @), that) -> bool + .find(object, fn(val, key, @), that) -> val + .findKey(object, fn(val, key, @), that) -> key + .keyOf(object, var) -> key + .includes(object, var) -> bool + .reduce(object, fn(memo, val, key, @), memo?) -> var +``` + +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/core/dict +core-js(/library)/fn/dict +``` +`Dict` create object without prototype from iterable or simple object. + +[*Examples*](http://goo.gl/pnp8Vr): +```js +var map = new Map([['a', 1], ['b', 2], ['c', 3]]); + +Dict(); // => {__proto__: null} +Dict({a: 1, b: 2, c: 3}); // => {__proto__: null, a: 1, b: 2, c: 3} +Dict(map); // => {__proto__: null, a: 1, b: 2, c: 3} +Dict([1, 2, 3].entries()); // => {__proto__: null, 0: 1, 1: 2, 2: 3} + +var dict = Dict({a: 42}); +dict instanceof Object; // => false +dict.a; // => 42 +dict.toString; // => undefined +'a' in dict; // => true +'hasOwnProperty' in dict; // => false + +Dict.isDict({}); // => false +Dict.isDict(Dict()); // => true +``` +`Dict.keys`, `Dict.values` and `Dict.entries` returns iterators for objects. + +[*Examples*](http://goo.gl/xAvECH): +```js +var dict = {a: 1, b: 2, c: 3}; + +for(var key of Dict.keys(dict))console.log(key); // => 'a', 'b', 'c' + +for(var val of Dict.values(dict))console.log(val); // => 1, 2, 3 + +for(var [key, val] of Dict.entries(dict)){ + console.log(key); // => 'a', 'b', 'c' + console.log(val); // => 1, 2, 3 +} + +new Map(Dict.entries(dict)); // => Map {a: 1, b: 2, c: 3} +``` +Basic dict operations for objects with prototype [*examples*](http://goo.gl/B28UnG): +```js +'q' in {q: 1}; // => true +'toString' in {}; // => true + +Dict.has({q: 1}, 'q'); // => true +Dict.has({}, 'toString'); // => false + +({q: 1})['q']; // => 1 +({}).toString; // => function toString(){ [native code] } + +Dict.get({q: 1}, 'q'); // => 1 +Dict.get({}, 'toString'); // => undefined + +var O = {}; +O['q'] = 1; +O['q']; // => 1 +O['__proto__'] = {w: 2}; +O['__proto__']; // => {w: 2} +O['w']; // => 2 + +var O = {}; +Dict.set(O, 'q', 1); +O['q']; // => 1 +Dict.set(O, '__proto__', {w: 2}); +O['__proto__']; // => {w: 2} +O['w']; // => undefined +``` +Other methods of `Dict` module are static equivalents of `Array.prototype` methods for dictionaries. + +[*Examples*](http://goo.gl/xFi1RH): +```js +var dict = {a: 1, b: 2, c: 3}; + +Dict.forEach(dict, console.log, console); +// => 1, 'a', {a: 1, b: 2, c: 3} +// => 2, 'b', {a: 1, b: 2, c: 3} +// => 3, 'c', {a: 1, b: 2, c: 3} + +Dict.map(dict, function(it){ + return it * it; +}); // => {a: 1, b: 4, c: 9} + +Dict.mapPairs(dict, function(val, key){ + if(key != 'b')return [key + key, val * val]; +}); // => {aa: 1, cc: 9} + +Dict.filter(dict, function(it){ + return it % 2; +}); // => {a: 1, c: 3} + +Dict.some(dict, function(it){ + return it === 2; +}); // => true + +Dict.every(dict, function(it){ + return it === 2; +}); // => false + +Dict.find(dict, function(it){ + return it > 2; +}); // => 3 +Dict.find(dict, function(it){ + return it > 4; +}); // => undefined + +Dict.findKey(dict, function(it){ + return it > 2; +}); // => 'c' +Dict.findKey(dict, function(it){ + return it > 4; +}); // => undefined + +Dict.keyOf(dict, 2); // => 'b' +Dict.keyOf(dict, 4); // => undefined + +Dict.includes(dict, 2); // => true +Dict.includes(dict, 4); // => false + +Dict.reduce(dict, function(memo, it){ + return memo + it; +}); // => 6 +Dict.reduce(dict, function(memo, it){ + return memo + it; +}, ''); // => '123' +``` +#### Partial application +Module [`core.function.part`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/core.function.part.js). +```js +Function + #part(...args | _) -> fn(...args) +``` + +[*CommonJS entry points:*](#commonjs) +```js +core-js/core/function +core-js(/library)/fn/function/part +core-js(/library)/fn/function/virtual/part +core-js(/library)/fn/_ +``` +`Function#part` partial apply function without `this` binding. Uses global variable `_` (`core._` for builds without global namespace pollution) as placeholder and not conflict with `Underscore` / `LoDash`. + +[*Examples*](http://goo.gl/p9ZJ8K): +```js +var fn1 = log.part(1, 2); +fn1(3, 4); // => 1, 2, 3, 4 + +var fn2 = log.part(_, 2, _, 4); +fn2(1, 3); // => 1, 2, 3, 4 + +var fn3 = log.part(1, _, _, 4); +fn3(2, 3); // => 1, 2, 3, 4 + +fn2(1, 3, 5); // => 1, 2, 3, 4, 5 +fn2(1); // => 1, 2, undefined, 4 +``` +#### Number Iterator +Module [`core.number.iterator`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/core.number.iterator.js). +```js +Number + #@@iterator() -> iterator +``` + +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/core/number +core-js(/library)/fn/number/iterator +core-js(/library)/fn/number/virtual/iterator +``` +[*Examples*](http://goo.gl/o45pCN): +```js +for(var i of 3)console.log(i); // => 0, 1, 2 + +[...10]; // => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + +Array.from(10, Math.random); // => [0.9817775336559862, 0.02720663254149258, ...] + +Array.from(10, function(it){ + return this + it * it; +}, .42); // => [0.42, 1.42, 4.42, 9.42, 16.42, 25.42, 36.42, 49.42, 64.42, 81.42] +``` +#### Escaping strings +Modules [`core.regexp.escape`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/core.regexp.escape.js), [`core.string.escape-html`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/core.string.escape-html.js) and [`core.string.unescape-html`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/core.string.unescape-html.js). +```js +RegExp + .escape(str) -> str +String + #escapeHTML() -> str + #unescapeHTML() -> str +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/core/regexp +core-js(/library)/core/string +core-js(/library)/fn/regexp/escape +core-js(/library)/fn/string/escape-html +core-js(/library)/fn/string/unescape-html +core-js(/library)/fn/string/virtual/escape-html +core-js(/library)/fn/string/virtual/unescape-html +``` +[*Examples*](http://goo.gl/6bOvsQ): +```js +RegExp.escape('Hello, []{}()*+?.\\^$|!'); // => 'Hello, \[\]\{\}\(\)\*\+\?\.\\\^\$\|!' + +''.escapeHTML(); // => '<script>doSomething();</script>' +'<script>doSomething();</script>'.unescapeHTML(); // => '' +``` +#### delay +Module [`core.delay`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/core.delay.js). [Promise](#ecmascript-6-promise)-returning delay function, [esdiscuss](https://esdiscuss.org/topic/promise-returning-delay-function). +```js +delay(ms) -> promise +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/core/delay +core-js(/library)/fn/delay +``` +[*Examples*](http://goo.gl/lbucba): +```js +delay(1e3).then(() => console.log('after 1 sec')); + +(async () => { + await delay(3e3); + console.log('after 3 sec'); + + while(await delay(3e3))console.log('each 3 sec'); +})(); +``` +#### Helpers for iterators +Modules [`core.is-iterable`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/core.is-iterable.js), [`core.get-iterator`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/core.get-iterator.js), [`core.get-iterator-method`](https://github.com/zloirock/core-js/blob/v2.6.9/modules/core.get-iterator-method.js) - helpers for check iterability / get iterator in the `library` version or, for example, for `arguments` object: +```js +core + .isIterable(var) -> bool + .getIterator(iterable) -> iterator + .getIteratorMethod(var) -> function | undefined +``` +[*CommonJS entry points:*](#commonjs) +```js +core-js(/library)/fn/is-iterable +core-js(/library)/fn/get-iterator +core-js(/library)/fn/get-iterator-method +``` +[*Examples*](http://goo.gl/SXsM6D): +```js +var list = (function(){ + return arguments; +})(1, 2, 3); + +console.log(core.isIterable(list)); // true; + +var iter = core.getIterator(list); +console.log(iter.next().value); // 1 +console.log(iter.next().value); // 2 +console.log(iter.next().value); // 3 +console.log(iter.next().value); // undefined + +core.getIterator({}); // TypeError: [object Object] is not iterable! + +var iterFn = core.getIteratorMethod(list); +console.log(typeof iterFn); // 'function' +var iter = iterFn.call(list); +console.log(iter.next().value); // 1 +console.log(iter.next().value); // 2 +console.log(iter.next().value); // 3 +console.log(iter.next().value); // undefined + +console.log(core.getIteratorMethod({})); // undefined +``` + +## Missing polyfills +- ES5 `JSON` is missing now only in IE7- and never will it be added to `core-js`, if you need it in these old browsers, many implementations are available, for example, [json3](https://github.com/bestiejs/json3). +- ES6 `String#normalize` is not a very useful feature, but this polyfill will be very large. If you need it, you can use [unorm](https://github.com/walling/unorm/). +- ES6 `Proxy` can't be polyfilled, but for Node.js / Chromium with additional flags you can try [harmony-reflect](https://github.com/tvcutsem/harmony-reflect) for adapt old style `Proxy` API to final ES6 version. +- ES6 logic for `@@isConcatSpreadable` and `@@species` (in most places) can be polyfilled without problems, but it will cause a serious slowdown in popular cases in some engines. It will be polyfilled when it will be implemented in modern engines. +- ES7 `SIMD`. `core-js` doesn't add polyfill of this feature because of large size and some other reasons. You can use [this polyfill](https://github.com/tc39/ecmascript_simd/blob/master/src/ecmascript_simd.js). +- `window.fetch` is not a cross-platform feature, in some environments it makes no sense. For this reason, I don't think it should be in `core-js`. Looking at a large number of requests it *may be* added in the future. Now you can use, for example, [this polyfill](https://github.com/github/fetch). +- ECMA-402 `Intl` is missed because of size. You can use [this polyfill](https://github.com/andyearnshaw/Intl.js/). diff --git a/node_modules/core-js/bower.json b/node_modules/core-js/bower.json new file mode 100644 index 00000000..4c054572 --- /dev/null +++ b/node_modules/core-js/bower.json @@ -0,0 +1,49 @@ +{ + "name": "core.js", + "main": "client/core.js", + "version": "2.6.9", + "description": "Standard Library", + "keywords": [ + "ES3", + "ES5", + "ES6", + "ES7", + "ES2015", + "ES2016", + "ES2017", + "ECMAScript 3", + "ECMAScript 5", + "ECMAScript 6", + "ECMAScript 7", + "ECMAScript 2015", + "ECMAScript 2016", + "ECMAScript 2017", + "Harmony", + "Strawman", + "Map", + "Set", + "WeakMap", + "WeakSet", + "Promise", + "Symbol", + "TypedArray", + "setImmediate", + "Dict", + "polyfill", + "shim" + ], + "authors": [ + "Denis Pushkarev (http://zloirock.ru/)" + ], + "license": "MIT", + "homepage": "https://github.com/zloirock/core-js", + "repository": { + "type": "git", + "url": "https://github.com/zloirock/core-js.git" + }, + "ignore": [ + "build", + "node_modules", + "tests" + ] +} diff --git a/node_modules/core-js/build/Gruntfile.ls b/node_modules/core-js/build/Gruntfile.ls new file mode 100644 index 00000000..7b8e4656 --- /dev/null +++ b/node_modules/core-js/build/Gruntfile.ls @@ -0,0 +1,86 @@ +require! <[./build fs ./config]> +module.exports = (grunt)-> + grunt.loadNpmTasks \grunt-contrib-clean + grunt.loadNpmTasks \grunt-contrib-copy + grunt.loadNpmTasks \grunt-contrib-uglify + grunt.loadNpmTasks \grunt-contrib-watch + grunt.loadNpmTasks \grunt-livescript + grunt.loadNpmTasks \grunt-karma + grunt.initConfig do + pkg: grunt.file.readJSON './package.json' + uglify: build: + files: '<%=grunt.option("path")%>.min.js': '<%=grunt.option("path")%>.js' + options: + mangle: {+keep_fnames} + compress: {+keep_fnames, +pure_getters} + output: {max_line_len: 32000} + ie8: on + sourceMap: on + banner: config.banner + livescript: src: files: + './tests/helpers.js': './tests/helpers/*' + './tests/tests.js': './tests/tests/*' + './tests/library.js': './tests/library/*' + './tests/es.js': './tests/tests/es*' + './tests/experimental.js': './tests/experimental/*' + './build/index.js': './build/build.ls*' + clean: <[./library]> + copy: lib: files: + * expand: on + cwd: './' + src: <[es5/** es6/** es7/** stage/** web/** core/** fn/** index.js shim.js]> + dest: './library/' + * expand: on + cwd: './' + src: <[modules/*]> + dest: './library/' + filter: \isFile + * expand: on + cwd: './modules/library/' + src: '*' + dest: './library/modules/' + watch: + core: + files: './modules/*' + tasks: \default + tests: + files: './tests/tests/*' + tasks: \livescript + karma: + 'options': + configFile: './tests/karma.conf.js' + browsers: <[PhantomJS]> + singleRun: on + 'default': {} + 'library': files: <[client/library.js tests/helpers.js tests/library.js]>map -> src: it + grunt.registerTask \build (options)-> + done = @async! + build { + modules: (options || 'es5,es6,es7,js,web,core')split \, + blacklist: (grunt.option(\blacklist) || '')split \, + library: grunt.option(\library) in <[yes on true]> + umd: grunt.option(\umd) not in <[no off false]> + } + .then !-> + grunt.option(\path) || grunt.option(\path, './custom') + fs.writeFile grunt.option(\path) + '.js', it, done + .catch !-> + console.error it + process.exit 1 + grunt.registerTask \client -> + grunt.option \library '' + grunt.option \path './client/core' + grunt.task.run <[build:es5,es6,es7,js,web,core uglify]> + grunt.registerTask \library -> + grunt.option \library 'true' + grunt.option \path './client/library' + grunt.task.run <[build:es5,es6,es7,js,web,core uglify]> + grunt.registerTask \shim -> + grunt.option \library '' + grunt.option \path './client/shim' + grunt.task.run <[build:es5,es6,es7,js,web uglify]> + grunt.registerTask \e -> + grunt.option \library ''> + grunt.option \path './client/core' + grunt.task.run <[build:es5,es6,es7,js,web,core,exp uglify]> + grunt.registerTask \default <[clean copy client library shim]> \ No newline at end of file diff --git a/node_modules/core-js/build/build.ls b/node_modules/core-js/build/build.ls new file mode 100644 index 00000000..6dbfa582 --- /dev/null +++ b/node_modules/core-js/build/build.ls @@ -0,0 +1,62 @@ +require! { + '../library/fn/promise': Promise + './config': {list, experimental, libraryBlacklist, es5SpecialCase, banner} + fs: {readFile, writeFile, unlink} + path: {basename, dirname, join} + webpack, temp +} + +module.exports = ({modules = [], blacklist = [], library = no, umd = on})-> + resolve, reject <~! new Promise _ + let @ = modules.reduce ((memo, it)-> memo[it] = on; memo), {} + if @exp => for experimental => @[..] = on + if @es5 => for es5SpecialCase => @[..] = on + for ns of @ + if @[ns] + for name in list + if name.indexOf("#ns.") is 0 and name not in experimental + @[name] = on + + if library => blacklist ++= libraryBlacklist + for ns in blacklist + for name in list + if name is ns or name.indexOf("#ns.") is 0 + @[name] = no + + TARGET = temp.path {suffix: '.js'} + + err, info <~! webpack do + entry: list.filter(~> @[it]).map ~> + if library => join __dirname, '..', 'library', 'modules', it + else join __dirname, '..', 'modules', it + output: + path: dirname TARGET + filename: basename "./#TARGET" + if err => return reject err + + err, script <~! readFile TARGET + if err => return reject err + + err <~! unlink TARGET + if err => return reject err + + if umd + exportScript = """ + // CommonJS export + if (typeof module != 'undefined' && module.exports) module.exports = __e; + // RequireJS export + else if (typeof define == 'function' && define.amd) define(function () { return __e; }); + // Export to global object + else __g.core = __e; + """ + else + exportScript = "" + + resolve """ + #banner + !function(__e, __g, undefined){ + 'use strict'; + #script + #exportScript + }(1, 1); + """ \ No newline at end of file diff --git a/node_modules/core-js/build/config.js b/node_modules/core-js/build/config.js new file mode 100644 index 00000000..0d1b234c --- /dev/null +++ b/node_modules/core-js/build/config.js @@ -0,0 +1,275 @@ +module.exports = { + list: [ + 'es6.symbol', + 'es6.object.define-property', + 'es6.object.define-properties', + 'es6.object.get-own-property-descriptor', + 'es6.object.create', + 'es6.object.get-prototype-of', + 'es6.object.keys', + 'es6.object.get-own-property-names', + 'es6.object.freeze', + 'es6.object.seal', + 'es6.object.prevent-extensions', + 'es6.object.is-frozen', + 'es6.object.is-sealed', + 'es6.object.is-extensible', + 'es6.object.assign', + 'es6.object.is', + 'es6.object.set-prototype-of', + 'es6.object.to-string', + 'es6.function.bind', + 'es6.function.name', + 'es6.function.has-instance', + 'es6.number.constructor', + 'es6.number.to-fixed', + 'es6.number.to-precision', + 'es6.number.epsilon', + 'es6.number.is-finite', + 'es6.number.is-integer', + 'es6.number.is-nan', + 'es6.number.is-safe-integer', + 'es6.number.max-safe-integer', + 'es6.number.min-safe-integer', + 'es6.number.parse-float', + 'es6.number.parse-int', + 'es6.parse-int', + 'es6.parse-float', + 'es6.math.acosh', + 'es6.math.asinh', + 'es6.math.atanh', + 'es6.math.cbrt', + 'es6.math.clz32', + 'es6.math.cosh', + 'es6.math.expm1', + 'es6.math.fround', + 'es6.math.hypot', + 'es6.math.imul', + 'es6.math.log10', + 'es6.math.log1p', + 'es6.math.log2', + 'es6.math.sign', + 'es6.math.sinh', + 'es6.math.tanh', + 'es6.math.trunc', + 'es6.string.from-code-point', + 'es6.string.raw', + 'es6.string.trim', + 'es6.string.code-point-at', + 'es6.string.ends-with', + 'es6.string.includes', + 'es6.string.repeat', + 'es6.string.starts-with', + 'es6.string.iterator', + 'es6.string.anchor', + 'es6.string.big', + 'es6.string.blink', + 'es6.string.bold', + 'es6.string.fixed', + 'es6.string.fontcolor', + 'es6.string.fontsize', + 'es6.string.italics', + 'es6.string.link', + 'es6.string.small', + 'es6.string.strike', + 'es6.string.sub', + 'es6.string.sup', + 'es6.array.is-array', + 'es6.array.from', + 'es6.array.of', + 'es6.array.join', + 'es6.array.slice', + 'es6.array.sort', + 'es6.array.for-each', + 'es6.array.map', + 'es6.array.filter', + 'es6.array.some', + 'es6.array.every', + 'es6.array.reduce', + 'es6.array.reduce-right', + 'es6.array.index-of', + 'es6.array.last-index-of', + 'es6.array.copy-within', + 'es6.array.fill', + 'es6.array.find', + 'es6.array.find-index', + 'es6.array.iterator', + 'es6.array.species', + 'es6.regexp.constructor', + 'es6.regexp.exec', + 'es6.regexp.to-string', + 'es6.regexp.flags', + 'es6.regexp.match', + 'es6.regexp.replace', + 'es6.regexp.search', + 'es6.regexp.split', + 'es6.promise', + 'es6.map', + 'es6.set', + 'es6.weak-map', + 'es6.weak-set', + 'es6.reflect.apply', + 'es6.reflect.construct', + 'es6.reflect.define-property', + 'es6.reflect.delete-property', + 'es6.reflect.enumerate', + 'es6.reflect.get', + 'es6.reflect.get-own-property-descriptor', + 'es6.reflect.get-prototype-of', + 'es6.reflect.has', + 'es6.reflect.is-extensible', + 'es6.reflect.own-keys', + 'es6.reflect.prevent-extensions', + 'es6.reflect.set', + 'es6.reflect.set-prototype-of', + 'es6.date.now', + 'es6.date.to-json', + 'es6.date.to-iso-string', + 'es6.date.to-string', + 'es6.date.to-primitive', + 'es6.typed.array-buffer', + 'es6.typed.data-view', + 'es6.typed.int8-array', + 'es6.typed.uint8-array', + 'es6.typed.uint8-clamped-array', + 'es6.typed.int16-array', + 'es6.typed.uint16-array', + 'es6.typed.int32-array', + 'es6.typed.uint32-array', + 'es6.typed.float32-array', + 'es6.typed.float64-array', + 'es7.array.includes', + 'es7.array.flat-map', + 'es7.array.flatten', + 'es7.string.at', + 'es7.string.pad-start', + 'es7.string.pad-end', + 'es7.string.trim-left', + 'es7.string.trim-right', + 'es7.string.match-all', + 'es7.symbol.async-iterator', + 'es7.symbol.observable', + 'es7.object.get-own-property-descriptors', + 'es7.object.values', + 'es7.object.entries', + 'es7.object.define-getter', + 'es7.object.define-setter', + 'es7.object.lookup-getter', + 'es7.object.lookup-setter', + 'es7.map.to-json', + 'es7.set.to-json', + 'es7.map.of', + 'es7.set.of', + 'es7.weak-map.of', + 'es7.weak-set.of', + 'es7.map.from', + 'es7.set.from', + 'es7.weak-map.from', + 'es7.weak-set.from', + 'es7.global', + 'es7.system.global', + 'es7.error.is-error', + 'es7.math.clamp', + 'es7.math.deg-per-rad', + 'es7.math.degrees', + 'es7.math.fscale', + 'es7.math.iaddh', + 'es7.math.isubh', + 'es7.math.imulh', + 'es7.math.rad-per-deg', + 'es7.math.radians', + 'es7.math.scale', + 'es7.math.umulh', + 'es7.math.signbit', + 'es7.promise.finally', + 'es7.promise.try', + 'es7.reflect.define-metadata', + 'es7.reflect.delete-metadata', + 'es7.reflect.get-metadata', + 'es7.reflect.get-metadata-keys', + 'es7.reflect.get-own-metadata', + 'es7.reflect.get-own-metadata-keys', + 'es7.reflect.has-metadata', + 'es7.reflect.has-own-metadata', + 'es7.reflect.metadata', + 'es7.asap', + 'es7.observable', + 'web.immediate', + 'web.dom.iterable', + 'web.timers', + 'core.dict', + 'core.get-iterator-method', + 'core.get-iterator', + 'core.is-iterable', + 'core.delay', + 'core.function.part', + 'core.object.is-object', + 'core.object.classof', + 'core.object.define', + 'core.object.make', + 'core.number.iterator', + 'core.regexp.escape', + 'core.string.escape-html', + 'core.string.unescape-html', + ], + experimental: [ + ], + libraryBlacklist: [ + 'es6.object.to-string', + 'es6.function.name', + 'es6.regexp.constructor', + 'es6.regexp.to-string', + 'es6.regexp.flags', + 'es6.regexp.match', + 'es6.regexp.replace', + 'es6.regexp.search', + 'es6.regexp.split', + 'es6.number.constructor', + 'es6.date.to-string', + 'es6.date.to-primitive', + ], + es5SpecialCase: [ + 'es6.object.create', + 'es6.object.define-property', + 'es6.object.define-properties', + 'es6.object.get-own-property-descriptor', + 'es6.object.get-prototype-of', + 'es6.object.keys', + 'es6.object.get-own-property-names', + 'es6.object.freeze', + 'es6.object.seal', + 'es6.object.prevent-extensions', + 'es6.object.is-frozen', + 'es6.object.is-sealed', + 'es6.object.is-extensible', + 'es6.function.bind', + 'es6.array.is-array', + 'es6.array.join', + 'es6.array.slice', + 'es6.array.sort', + 'es6.array.for-each', + 'es6.array.map', + 'es6.array.filter', + 'es6.array.some', + 'es6.array.every', + 'es6.array.reduce', + 'es6.array.reduce-right', + 'es6.array.index-of', + 'es6.array.last-index-of', + 'es6.number.to-fixed', + 'es6.number.to-precision', + 'es6.date.now', + 'es6.date.to-iso-string', + 'es6.date.to-json', + 'es6.string.trim', + 'es6.regexp.to-string', + 'es6.parse-int', + 'es6.parse-float', + ], + banner: '/**\n' + + ' * core-js ' + require('../package').version + '\n' + + ' * https://github.com/zloirock/core-js\n' + + ' * License: http://rock.mit-license.org\n' + + ' * © ' + new Date().getFullYear() + ' Denis Pushkarev\n' + + ' */', +}; diff --git a/node_modules/core-js/build/index.js b/node_modules/core-js/build/index.js new file mode 100644 index 00000000..1df7f10c --- /dev/null +++ b/node_modules/core-js/build/index.js @@ -0,0 +1,104 @@ +// Generated by LiveScript 1.4.0 +(function(){ + var Promise, ref$, list, experimental, libraryBlacklist, es5SpecialCase, banner, readFile, writeFile, unlink, basename, dirname, join, webpack, temp; + Promise = require('../library/fn/promise'); + ref$ = require('./config'), list = ref$.list, experimental = ref$.experimental, libraryBlacklist = ref$.libraryBlacklist, es5SpecialCase = ref$.es5SpecialCase, banner = ref$.banner; + ref$ = require('fs'), readFile = ref$.readFile, writeFile = ref$.writeFile, unlink = ref$.unlink; + ref$ = require('path'), basename = ref$.basename, dirname = ref$.dirname, join = ref$.join; + webpack = require('webpack'); + temp = require('temp'); + module.exports = function(arg$){ + var modules, ref$, blacklist, library, umd, this$ = this; + modules = (ref$ = arg$.modules) != null + ? ref$ + : [], blacklist = (ref$ = arg$.blacklist) != null + ? ref$ + : [], library = (ref$ = arg$.library) != null ? ref$ : false, umd = (ref$ = arg$.umd) != null ? ref$ : true; + return new Promise(function(resolve, reject){ + (function(){ + var i$, x$, ref$, len$, y$, ns, name, j$, len1$, TARGET, this$ = this; + if (this.exp) { + for (i$ = 0, len$ = (ref$ = experimental).length; i$ < len$; ++i$) { + x$ = ref$[i$]; + this[x$] = true; + } + } + if (this.es5) { + for (i$ = 0, len$ = (ref$ = es5SpecialCase).length; i$ < len$; ++i$) { + y$ = ref$[i$]; + this[y$] = true; + } + } + for (ns in this) { + if (this[ns]) { + for (i$ = 0, len$ = (ref$ = list).length; i$ < len$; ++i$) { + name = ref$[i$]; + if (name.indexOf(ns + ".") === 0 && !in$(name, experimental)) { + this[name] = true; + } + } + } + } + if (library) { + blacklist = blacklist.concat(libraryBlacklist); + } + for (i$ = 0, len$ = blacklist.length; i$ < len$; ++i$) { + ns = blacklist[i$]; + for (j$ = 0, len1$ = (ref$ = list).length; j$ < len1$; ++j$) { + name = ref$[j$]; + if (name === ns || name.indexOf(ns + ".") === 0) { + this[name] = false; + } + } + } + TARGET = temp.path({ + suffix: '.js' + }); + webpack({ + entry: list.filter(function(it){ + return this$[it]; + }).map(function(it){ + if (library) { + return join(__dirname, '..', 'library', 'modules', it); + } else { + return join(__dirname, '..', 'modules', it); + } + }), + output: { + path: dirname(TARGET), + filename: basename("./" + TARGET) + } + }, function(err, info){ + if (err) { + return reject(err); + } + readFile(TARGET, function(err, script){ + if (err) { + return reject(err); + } + unlink(TARGET, function(err){ + var exportScript; + if (err) { + return reject(err); + } + if (umd) { + exportScript = "// CommonJS export\nif (typeof module != 'undefined' && module.exports) module.exports = __e;\n// RequireJS export\nelse if (typeof define == 'function' && define.amd) define(function () { return __e; });\n// Export to global object\nelse __g.core = __e;"; + } else { + exportScript = ""; + } + resolve("" + banner + "\n!function(__e, __g, undefined){\n'use strict';\n" + script + "\n" + exportScript + "\n}(1, 1);"); + }); + }); + }); + }.call(modules.reduce(function(memo, it){ + memo[it] = true; + return memo; + }, {}))); + }); + }; + function in$(x, xs){ + var i = -1, l = xs.length >>> 0; + while (++i < l) if (x === xs[i]) return true; + return false; + } +}).call(this); diff --git a/node_modules/core-js/client/core.js b/node_modules/core-js/client/core.js new file mode 100644 index 00000000..be86c194 --- /dev/null +++ b/node_modules/core-js/client/core.js @@ -0,0 +1,9095 @@ +/** + * core-js 2.6.9 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2019 Denis Pushkarev + */ +!function(__e, __g, undefined){ +'use strict'; +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 134); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(13); +var hide = __webpack_require__(14); +var redefine = __webpack_require__(15); +var ctx = __webpack_require__(19); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // extend global + if (target) redefine(target, key, out, type & $export.U); + // export + if (exports[key] != out) hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } +}; +global.core = core; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(47)('wks'); +var uid = __webpack_require__(37); +var Symbol = __webpack_require__(2).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(4)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(21); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var IE8_DOM_DEFINE = __webpack_require__(98); +var toPrimitive = __webpack_require__(23); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(6) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(24); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(48); +var defined = __webpack_require__(24); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.6.9' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var createDesc = __webpack_require__(31); +module.exports = __webpack_require__(6) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var hide = __webpack_require__(14); +var has = __webpack_require__(12); +var SRC = __webpack_require__(37)('src'); +var $toString = __webpack_require__(136); +var TO_STRING = 'toString'; +var TPL = ('' + $toString).split(TO_STRING); + +__webpack_require__(13).inspectSource = function (it) { + return $toString.call(it); +}; + +(module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) has(val, 'name') || hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if (O === global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + hide(O, key, val); + } +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative +})(Function.prototype, TO_STRING, function toString() { + return typeof this == 'function' && this[SRC] || $toString.call(this); +}); + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(49); +var createDesc = __webpack_require__(31); +var toIObject = __webpack_require__(11); +var toPrimitive = __webpack_require__(23); +var has = __webpack_require__(12); +var IE8_DOM_DEFINE = __webpack_require__(98); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__(6) ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return gOPD(O, P); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +}; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(12); +var toObject = __webpack_require__(9); +var IE_PROTO = __webpack_require__(71)('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var fails = __webpack_require__(4); +var defined = __webpack_require__(24); +var quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; +}; +module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export($export.P + $export.F * fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), 'String', O); +}; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(10); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var fails = __webpack_require__(4); + +module.exports = function (method, arg) { + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call + arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); + }); +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(3); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(0); +var core = __webpack_require__(13); +var fails = __webpack_require__(4); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = __webpack_require__(19); +var IObject = __webpack_require__(48); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(7); +var asc = __webpack_require__(86); +module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (;length > index; index++) if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) result[index] = res; // map + else if (res) switch (TYPE) { + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; +}; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(100); +var enumBugKeys = __webpack_require__(72); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(1); +var dPs = __webpack_require__(101); +var enumBugKeys = __webpack_require__(72); +var IE_PROTO = __webpack_require__(71)('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(69)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(73).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +if (__webpack_require__(6)) { + var LIBRARY = __webpack_require__(32); + var global = __webpack_require__(2); + var fails = __webpack_require__(4); + var $export = __webpack_require__(0); + var $typed = __webpack_require__(65); + var $buffer = __webpack_require__(96); + var ctx = __webpack_require__(19); + var anInstance = __webpack_require__(42); + var propertyDesc = __webpack_require__(31); + var hide = __webpack_require__(14); + var redefineAll = __webpack_require__(43); + var toInteger = __webpack_require__(21); + var toLength = __webpack_require__(7); + var toIndex = __webpack_require__(123); + var toAbsoluteIndex = __webpack_require__(38); + var toPrimitive = __webpack_require__(23); + var has = __webpack_require__(12); + var classof = __webpack_require__(34); + var isObject = __webpack_require__(3); + var toObject = __webpack_require__(9); + var isArrayIter = __webpack_require__(84); + var create = __webpack_require__(28); + var getPrototypeOf = __webpack_require__(17); + var gOPN = __webpack_require__(39).f; + var getIterFn = __webpack_require__(50); + var uid = __webpack_require__(37); + var wks = __webpack_require__(5); + var createArrayMethod = __webpack_require__(26); + var createArrayIncludes = __webpack_require__(53); + var speciesConstructor = __webpack_require__(52); + var ArrayIterators = __webpack_require__(88); + var Iterators = __webpack_require__(40); + var $iterDetect = __webpack_require__(60); + var setSpecies = __webpack_require__(41); + var arrayFill = __webpack_require__(87); + var arrayCopyWithin = __webpack_require__(113); + var $DP = __webpack_require__(8); + var $GOPD = __webpack_require__(16); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { + new Uint8Array(1).set({}); + }); + + var toOffset = function (it, BYTES) { + var offset = toInteger(it); + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!'); + } return new C(length); + }; + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function (C, list) { + var index = 0; + var length = list.length; + var result = allocate(C, length); + while (length > index) result[index] = list[index++]; + return result; + }; + + var addGetter = function (it, key, internal) { + dP(it, key, { get: function () { return this._d[internal]; } }); + }; + + var $from = function from(source /* , mapfn, thisArg */) { + var O = toObject(source); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var i, length, values, result, step, iterator; + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value); + } O = values; + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/* ...items */) { + var index = 0; + var length = arguments.length; + var result = allocate(this, length); + while (length > index) result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); + + var $toLocaleString = function toLocaleString() { + return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); + }; + + var proto = { + copyWithin: function copyWithin(target, start /* , end */) { + return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); + }, + every: function every(callbackfn /* , thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /* , thisArg */) { + return speciesFromList(this, arrayFilter(validate(this), callbackfn, + arguments.length > 1 ? arguments[1] : undefined)); + }, + find: function find(predicate /* , thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /* , thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /* , thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /* , fromIndex */) { + return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + includes: function includes(searchElement /* , fromIndex */) { + return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + join: function join(separator) { // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /* , thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse() { + var that = this; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + some: function some(callbackfn /* , thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn) { + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end) { + var O = validate(this); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var index = 0; + if (len + offset > length) throw RangeError(WRONG_LENGTH); + while (index < len) this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries() { + return arrayEntries.call(validate(this)); + }, + keys: function keys() { + return arrayKeys.call(validate(this)); + }, + values: function values() { + return arrayValues.call(validate(this)); + } + }; + + var isTAIndex = function (target, key) { + return isObject(target) + && target[TYPED_ARRAY] + && typeof key != 'symbol' + && key in target + && String(+key) == String(key); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key) { + return isTAIndex(target, key = toPrimitive(key, true)) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc) { + if (isTAIndex(target, key = toPrimitive(key, true)) + && isObject(desc) + && has(desc, 'value') + && !has(desc, 'get') + && !has(desc, 'set') + // TODO: add validation descriptor w/o calling accessors + && !desc.configurable + && (!has(desc, 'writable') || desc.writable) + && (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value; + return target; + } return dP(target, key, desc); + }; + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc + }); + + if (fails(function () { arrayToString.call({}); })) { + arrayToString = arrayToLocaleString = function toString() { + return arrayJoin.call(this); + }; + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { /* noop */ }, + toString: arrayToString, + toLocaleString: $toLocaleString + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function () { return this[TYPED_ARRAY]; } + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function (that, index) { + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function (that, index, value) { + var data = that._d; + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true + }); + }; + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d'); + var index = 0; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer) + }); + while (index < length) addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if (!fails(function () { + TypedArray(1); + }) || !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true)) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(toIndex(data)); + if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); + }); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR]; + var CORRECT_ITER_NAME = !!$nativeIterator + && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { return NAME; } + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES + }); + + $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { + from: $from, + of: $of + }); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; + + $export($export.P + $export.F * fails(function () { + new TypedArray(1).slice(); + }), NAME, { slice: $slice }); + + $export($export.P + $export.F * (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + }) || !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), NAME, { toLocaleString: $toLocaleString }); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); + }; +} else module.exports = function () { /* empty */ }; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +var Map = __webpack_require__(118); +var $export = __webpack_require__(0); +var shared = __webpack_require__(47)('metadata'); +var store = shared.store || (shared.store = new (__webpack_require__(121))()); + +var getOrCreateMetadataMap = function (target, targetKey, create) { + var targetMetadata = store.get(target); + if (!targetMetadata) { + if (!create) return undefined; + store.set(target, targetMetadata = new Map()); + } + var keyMetadata = targetMetadata.get(targetKey); + if (!keyMetadata) { + if (!create) return undefined; + targetMetadata.set(targetKey, keyMetadata = new Map()); + } return keyMetadata; +}; +var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); +}; +var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); +}; +var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); +}; +var ordinaryOwnMetadataKeys = function (target, targetKey) { + var metadataMap = getOrCreateMetadataMap(target, targetKey, false); + var keys = []; + if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); }); + return keys; +}; +var toMetaKey = function (it) { + return it === undefined || typeof it == 'symbol' ? it : String(it); +}; +var exp = function (O) { + $export($export.S, 'Reflect', O); +}; + +module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp +}; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + +module.exports = false; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(37)('meta'); +var isObject = __webpack_require__(3); +var has = __webpack_require__(12); +var setDesc = __webpack_require__(8).f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__(4)(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(20); +var TAG = __webpack_require__(5)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.31 Array.prototype[@@unscopables] +var UNSCOPABLES = __webpack_require__(5)('unscopables'); +var ArrayProto = Array.prototype; +if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(14)(ArrayProto, UNSCOPABLES, {}); +module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(19); +var call = __webpack_require__(111); +var isArrayIter = __webpack_require__(84); +var anObject = __webpack_require__(1); +var toLength = __webpack_require__(7); +var getIterFn = __webpack_require__(50); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(21); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(100); +var hiddenKeys = __webpack_require__(72).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var dP = __webpack_require__(8); +var DESCRIPTORS = __webpack_require__(6); +var SPECIES = __webpack_require__(5)('species'); + +module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports) { + +module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +var redefine = __webpack_require__(15); +module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; +}; + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(8).f; +var has = __webpack_require__(12); +var TAG = __webpack_require__(5)('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var defined = __webpack_require__(24); +var fails = __webpack_require__(4); +var spaces = __webpack_require__(78); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var rtrim = RegExp(space + space + '*$'); + +var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); +}; + +// 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim +var trim = exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; +}; + +module.exports = exporter; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(13); +var global = __webpack_require__(2); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __webpack_require__(32) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' +}); + + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(20); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(34); +var ITERATOR = __webpack_require__(5)('iterator'); +var Iterators = __webpack_require__(40); +module.exports = __webpack_require__(13).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.2.5.3 get RegExp.prototype.flags +var anObject = __webpack_require__(1); +module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; +}; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(1); +var aFunction = __webpack_require__(10); +var SPECIES = __webpack_require__(5)('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(11); +var toLength = __webpack_require__(7); +var toAbsoluteIndex = __webpack_require__(38); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(20); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(21); +var defined = __webpack_require__(24); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.8 IsRegExp(argument) +var isObject = __webpack_require__(3); +var cof = __webpack_require__(20); +var MATCH = __webpack_require__(5)('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(32); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(15); +var hide = __webpack_require__(14); +var Iterators = __webpack_require__(40); +var $iterCreate = __webpack_require__(59); +var setToStringTag = __webpack_require__(45); +var getPrototypeOf = __webpack_require__(17); +var ITERATOR = __webpack_require__(5)('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(28); +var descriptor = __webpack_require__(31); +var setToStringTag = __webpack_require__(45); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(14)(IteratorPrototype, __webpack_require__(5)('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(5)('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } + +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var classof = __webpack_require__(34); +var builtinExec = RegExp.prototype.exec; + + // `RegExpExec` abstract operation +// https://tc39.github.io/ecma262/#sec-regexpexec +module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + if (classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver'); + } + return builtinExec.call(R, S); +}; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(114); +var redefine = __webpack_require__(15); +var hide = __webpack_require__(14); +var fails = __webpack_require__(4); +var defined = __webpack_require__(24); +var wks = __webpack_require__(5); +var regexpExec = __webpack_require__(90); + +var SPECIES = wks('species'); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; +}); + +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; +})(); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { execCalled = true; return null; }; + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + } + re[SYMBOL](''); + return !execCalled; + }) : undefined; + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + } + ); + var strfn = fns[0]; + var rxfn = fns[1]; + + redefine(String.prototype, KEY, strfn); + hide(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return rxfn.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return rxfn.call(string, this); } + ); + } +}; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; + + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(15); +var redefineAll = __webpack_require__(43); +var meta = __webpack_require__(33); +var forOf = __webpack_require__(36); +var anInstance = __webpack_require__(42); +var isObject = __webpack_require__(3); +var fails = __webpack_require__(4); +var $iterDetect = __webpack_require__(60); +var setToStringTag = __webpack_require__(45); +var inheritIfRequired = __webpack_require__(77); + +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + var fixMethod = function (KEY) { + var fn = proto[KEY]; + redefine(proto, KEY, + KEY == 'delete' ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'has' ? function has(a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'get' ? function get(a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } + : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } + ); + }; + if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base(), target, C); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; +}; + + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var hide = __webpack_require__(14); +var uid = __webpack_require__(37); +var TYPED = uid('typed_array'); +var VIEW = uid('view'); +var ABV = !!(global.ArrayBuffer && global.DataView); +var CONSTR = ABV; +var i = 0; +var l = 9; +var Typed; + +var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' +).split(','); + +while (i < l) { + if (Typed = global[TypedArrayConstructors[i++]]) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; +} + +module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW +}; + + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// Forced replacement prototype accessors methods +module.exports = __webpack_require__(32) || !__webpack_require__(4)(function () { + var K = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, K, function () { /* empty */ }); + delete __webpack_require__(2)[K]; +}); + + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = __webpack_require__(0); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); +}; + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = __webpack_require__(0); +var aFunction = __webpack_require__(10); +var ctx = __webpack_require__(19); +var forOf = __webpack_require__(36); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + } }); +}; + + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +var document = __webpack_require__(2).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(13); +var LIBRARY = __webpack_require__(32); +var wksExt = __webpack_require__(99); +var defineProperty = __webpack_require__(8).f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(47)('keys'); +var uid = __webpack_require__(37); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), +/* 72 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(2).document; +module.exports = document && document.documentElement; + + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var DESCRIPTORS = __webpack_require__(6); +var getKeys = __webpack_require__(27); +var gOPS = __webpack_require__(54); +var pIE = __webpack_require__(49); +var toObject = __webpack_require__(9); +var IObject = __webpack_require__(48); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(4)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } return T; +} : $assign; + + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(3); +var anObject = __webpack_require__(1); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = __webpack_require__(19)(Function.call, __webpack_require__(16).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; + + +/***/ }), +/* 76 */ +/***/ (function(module, exports) { + +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; + + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +var setPrototypeOf = __webpack_require__(75).set; +module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P); + } return that; +}; + + +/***/ }), +/* 78 */ +/***/ (function(module, exports) { + +module.exports = '\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'; + + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toInteger = __webpack_require__(21); +var defined = __webpack_require__(24); + +module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; +}; + + +/***/ }), +/* 80 */ +/***/ (function(module, exports) { + +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; + + +/***/ }), +/* 81 */ +/***/ (function(module, exports) { + +// 20.2.2.14 Math.expm1(x) +var $expm1 = Math.expm1; +module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 +) ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; +} : $expm1; + + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +// helper for String#{startsWith, endsWith, includes} +var isRegExp = __webpack_require__(57); +var defined = __webpack_require__(24); + +module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; + + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +var MATCH = __webpack_require__(5)('match'); +module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { /* empty */ } + } return true; +}; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(40); +var ITERATOR = __webpack_require__(5)('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__(8); +var createDesc = __webpack_require__(31); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = __webpack_require__(218); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; + + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + +var toObject = __webpack_require__(9); +var toAbsoluteIndex = __webpack_require__(38); +var toLength = __webpack_require__(7); +module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(35); +var step = __webpack_require__(89); +var Iterators = __webpack_require__(40); +var toIObject = __webpack_require__(11); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(58)(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + + +/***/ }), +/* 89 */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var regexpFlags = __webpack_require__(51); + +var nativeExec = RegExp.prototype.exec; +// This always refers to the native implementation, because the +// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, +// which loads this file before patching the method. +var nativeReplace = String.prototype.replace; + +var patchedExec = nativeExec; + +var LAST_INDEX = 'lastIndex'; + +var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/, + re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; +})(); + +// nonparticipating capturing group, copied from es5-shim's String#split patch. +var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + +var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + +if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; + + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; +} + +module.exports = patchedExec; + + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var at = __webpack_require__(56)(true); + + // `AdvanceStringIndex` abstract operation +// https://tc39.github.io/ecma262/#sec-advancestringindex +module.exports = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); +}; + + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(19); +var invoke = __webpack_require__(76); +var html = __webpack_require__(73); +var cel = __webpack_require__(69); +var global = __webpack_require__(2); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(20)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; + + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var macrotask = __webpack_require__(92).set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = __webpack_require__(20)(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; + + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = __webpack_require__(10); + +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +// all object keys, includes non-enumerable and symbols +var gOPN = __webpack_require__(39); +var gOPS = __webpack_require__(54); +var anObject = __webpack_require__(1); +var Reflect = __webpack_require__(2).Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; + + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var DESCRIPTORS = __webpack_require__(6); +var LIBRARY = __webpack_require__(32); +var $typed = __webpack_require__(65); +var hide = __webpack_require__(14); +var redefineAll = __webpack_require__(43); +var fails = __webpack_require__(4); +var anInstance = __webpack_require__(42); +var toInteger = __webpack_require__(21); +var toLength = __webpack_require__(7); +var toIndex = __webpack_require__(123); +var gOPN = __webpack_require__(39).f; +var dP = __webpack_require__(8).f; +var arrayFill = __webpack_require__(87); +var setToStringTag = __webpack_require__(45); +var ARRAY_BUFFER = 'ArrayBuffer'; +var DATA_VIEW = 'DataView'; +var PROTOTYPE = 'prototype'; +var WRONG_LENGTH = 'Wrong length!'; +var WRONG_INDEX = 'Wrong index!'; +var $ArrayBuffer = global[ARRAY_BUFFER]; +var $DataView = global[DATA_VIEW]; +var Math = global.Math; +var RangeError = global.RangeError; +// eslint-disable-next-line no-shadow-restricted-names +var Infinity = global.Infinity; +var BaseBuffer = $ArrayBuffer; +var abs = Math.abs; +var pow = Math.pow; +var floor = Math.floor; +var log = Math.log; +var LN2 = Math.LN2; +var BUFFER = 'buffer'; +var BYTE_LENGTH = 'byteLength'; +var BYTE_OFFSET = 'byteOffset'; +var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; +var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; +var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + +// IEEE754 conversions based on https://github.com/feross/ieee754 +function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; +} +function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } return (s ? -1 : 1) * m * pow(2, e - mLen); +} + +function unpackI32(bytes) { + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; +} +function packI8(it) { + return [it & 0xff]; +} +function packI16(it) { + return [it & 0xff, it >> 8 & 0xff]; +} +function packI32(it) { + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; +} +function packF64(it) { + return packIEEE754(it, 52, 8); +} +function packF32(it) { + return packIEEE754(it, 23, 4); +} + +function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); +} + +function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); +} +function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; +} + +if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH]; + var offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return get(this, 1, byteOffset)[0] << 24 >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8 | bytes[0]) << 16 >> 16; + }, + getUint16: function getUint16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return bytes[1] << 8 | bytes[0]; + }, + getInt32: function getInt32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + } + }); +} else { + if (!fails(function () { + $ArrayBuffer(1); + }) || !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + })) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(length)); + }; + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)); + var $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + } + }, true); +} +setToStringTag($ArrayBuffer, ARRAY_BUFFER); +setToStringTag($DataView, DATA_VIEW); +hide($DataView[PROTOTYPE], $typed.VIEW, true); +exports[ARRAY_BUFFER] = $ArrayBuffer; +exports[DATA_VIEW] = $DataView; + + +/***/ }), +/* 97 */ +/***/ (function(module, exports) { + +module.exports = function (regExp, replace) { + var replacer = replace === Object(replace) ? function (part) { + return replace[part]; + } : replace; + return function (it) { + return String(it).replace(regExp, replacer); + }; +}; + + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(6) && !__webpack_require__(4)(function () { + return Object.defineProperty(__webpack_require__(69)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(5); + + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(12); +var toIObject = __webpack_require__(11); +var arrayIndexOf = __webpack_require__(53)(false); +var IE_PROTO = __webpack_require__(71)('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + + +/***/ }), +/* 101 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var anObject = __webpack_require__(1); +var getKeys = __webpack_require__(27); + +module.exports = __webpack_require__(6) ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(11); +var gOPN = __webpack_require__(39).f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), +/* 103 */ +/***/ (function(module, exports) { + +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; + + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var aFunction = __webpack_require__(10); +var isObject = __webpack_require__(3); +var invoke = __webpack_require__(76); +var arraySlice = [].slice; +var factories = {}; + +var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); +}; + +module.exports = Function.bind || function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; +}; + + +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { + +var cof = __webpack_require__(20); +module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; +}; + + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var isObject = __webpack_require__(3); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; + + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseFloat = __webpack_require__(2).parseFloat; +var $trim = __webpack_require__(46).trim; + +module.exports = 1 / $parseFloat(__webpack_require__(78) + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; + + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseInt = __webpack_require__(2).parseInt; +var $trim = __webpack_require__(46).trim; +var ws = __webpack_require__(78); +var hex = /^[-+]?0[xX]/; + +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : $parseInt; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports) { + +// 20.2.2.20 Math.log1p(x) +module.exports = Math.log1p || function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); +}; + + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var sign = __webpack_require__(80); +var pow = Math.pow; +var EPSILON = pow(2, -52); +var EPSILON32 = pow(2, -23); +var MAX32 = pow(2, 127) * (2 - EPSILON32); +var MIN32 = pow(2, -126); + +var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; +}; + +module.exports = Math.fround || function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; +}; + + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(1); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; + + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +var aFunction = __webpack_require__(10); +var toObject = __webpack_require__(9); +var IObject = __webpack_require__(48); +var toLength = __webpack_require__(7); + +module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var i = isRight ? -1 : 1; + if (aLen < 2) for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; +}; + + +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + +var toObject = __webpack_require__(9); +var toAbsoluteIndex = __webpack_require__(38); +var toLength = __webpack_require__(7); + +module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; +}; + + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var regexpExec = __webpack_require__(90); +__webpack_require__(0)({ + target: 'RegExp', + proto: true, + forced: regexpExec !== /./.exec +}, { + exec: regexpExec +}); + + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +// 21.2.5.3 get RegExp.prototype.flags() +if (__webpack_require__(6) && /./g.flags != 'g') __webpack_require__(8).f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(51) +}); + + +/***/ }), +/* 116 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var newPromiseCapability = __webpack_require__(94); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(119); +var validate = __webpack_require__(44); +var MAP = 'Map'; + +// 23.1 Map Objects +module.exports = __webpack_require__(64)(MAP, function (get) { + return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + } +}, strong, true); + + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var dP = __webpack_require__(8).f; +var create = __webpack_require__(28); +var redefineAll = __webpack_require__(43); +var ctx = __webpack_require__(19); +var anInstance = __webpack_require__(42); +var forOf = __webpack_require__(36); +var $iterDefine = __webpack_require__(58); +var step = __webpack_require__(89); +var setSpecies = __webpack_require__(41); +var DESCRIPTORS = __webpack_require__(6); +var fastKey = __webpack_require__(33).fastKey; +var validate = __webpack_require__(44); +var SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + } + }); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; + + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(119); +var validate = __webpack_require__(44); +var SET = 'Set'; + +// 23.2 Set Objects +module.exports = __webpack_require__(64)(SET, function (get) { + return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); + } +}, strong); + + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var each = __webpack_require__(26)(0); +var redefine = __webpack_require__(15); +var meta = __webpack_require__(33); +var assign = __webpack_require__(74); +var weak = __webpack_require__(122); +var isObject = __webpack_require__(3); +var validate = __webpack_require__(44); +var NATIVE_WEAK_MAP = __webpack_require__(44); +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +var InternalMap; + +var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; +}; + +var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = __webpack_require__(64)(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); +} + + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var redefineAll = __webpack_require__(43); +var getWeak = __webpack_require__(33).getWeak; +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var anInstance = __webpack_require__(42); +var forOf = __webpack_require__(36); +var createArrayMethod = __webpack_require__(26); +var $has = __webpack_require__(12); +var validate = __webpack_require__(44); +var arrayFind = createArrayMethod(5); +var arrayFindIndex = createArrayMethod(6); +var id = 0; + +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); +}; +var UncaughtFrozenStore = function () { + this.a = []; +}; +var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); +}; +UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore +}; + + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = __webpack_require__(21); +var toLength = __webpack_require__(7); +module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; +}; + + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = __webpack_require__(55); +var isObject = __webpack_require__(3); +var toLength = __webpack_require__(7); +var ctx = __webpack_require__(19); +var IS_CONCAT_SPREADABLE = __webpack_require__(5)('isConcatSpreadable'); + +function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; +} + +module.exports = flattenIntoArray; + + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = __webpack_require__(7); +var repeat = __webpack_require__(79); +var defined = __webpack_require__(24); + +module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; +}; + + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(6); +var getKeys = __webpack_require__(27); +var toIObject = __webpack_require__(11); +var isEnum = __webpack_require__(49).f; +module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; + + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = __webpack_require__(34); +var from = __webpack_require__(128); +module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; + + +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { + +var forOf = __webpack_require__(36); + +module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; + + +/***/ }), +/* 129 */ +/***/ (function(module, exports) { + +// https://rwaldron.github.io/proposal-math-extensions/ +module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { + if ( + arguments.length === 0 + // eslint-disable-next-line no-self-compare + || x != x + // eslint-disable-next-line no-self-compare + || inLow != inLow + // eslint-disable-next-line no-self-compare + || inHigh != inHigh + // eslint-disable-next-line no-self-compare + || outLow != outLow + // eslint-disable-next-line no-self-compare + || outHigh != outHigh + ) return NaN; + if (x === Infinity || x === -Infinity) return x; + return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; +}; + + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(34); +var ITERATOR = __webpack_require__(5)('iterator'); +var Iterators = __webpack_require__(40); +module.exports = __webpack_require__(13).isIterable = function (it) { + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + // eslint-disable-next-line no-prototype-builtins + || Iterators.hasOwnProperty(classof(O)); +}; + + +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var path = __webpack_require__(132); +var invoke = __webpack_require__(76); +var aFunction = __webpack_require__(10); +module.exports = function (/* ...pargs */) { + var fn = aFunction(this); + var length = arguments.length; + var pargs = new Array(length); + var i = 0; + var _ = path._; + var holder = false; + while (length > i) if ((pargs[i] = arguments[i++]) === _) holder = true; + return function (/* ...args */) { + var that = this; + var aLen = arguments.length; + var j = 0; + var k = 0; + var args; + if (!holder && !aLen) return invoke(fn, pargs, that); + args = pargs.slice(); + if (holder) for (;length > j; j++) if (args[j] === _) args[j] = arguments[k++]; + while (aLen > k) args.push(arguments[k++]); + return invoke(fn, args, that); + }; +}; + + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(2); + + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var gOPD = __webpack_require__(16); +var ownKeys = __webpack_require__(95); +var toIObject = __webpack_require__(11); + +module.exports = function define(target, mixin) { + var keys = ownKeys(toIObject(mixin)); + var length = keys.length; + var i = 0; + var key; + while (length > i) dP.f(target, key = keys[i++], gOPD.f(mixin, key)); + return target; +}; + + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(135); +__webpack_require__(138); +__webpack_require__(139); +__webpack_require__(140); +__webpack_require__(141); +__webpack_require__(142); +__webpack_require__(143); +__webpack_require__(144); +__webpack_require__(145); +__webpack_require__(146); +__webpack_require__(147); +__webpack_require__(148); +__webpack_require__(149); +__webpack_require__(150); +__webpack_require__(151); +__webpack_require__(152); +__webpack_require__(153); +__webpack_require__(154); +__webpack_require__(155); +__webpack_require__(156); +__webpack_require__(157); +__webpack_require__(158); +__webpack_require__(159); +__webpack_require__(160); +__webpack_require__(161); +__webpack_require__(162); +__webpack_require__(163); +__webpack_require__(164); +__webpack_require__(165); +__webpack_require__(166); +__webpack_require__(167); +__webpack_require__(168); +__webpack_require__(169); +__webpack_require__(170); +__webpack_require__(171); +__webpack_require__(172); +__webpack_require__(173); +__webpack_require__(174); +__webpack_require__(175); +__webpack_require__(176); +__webpack_require__(177); +__webpack_require__(178); +__webpack_require__(179); +__webpack_require__(180); +__webpack_require__(181); +__webpack_require__(182); +__webpack_require__(183); +__webpack_require__(184); +__webpack_require__(185); +__webpack_require__(186); +__webpack_require__(187); +__webpack_require__(188); +__webpack_require__(189); +__webpack_require__(190); +__webpack_require__(191); +__webpack_require__(192); +__webpack_require__(193); +__webpack_require__(194); +__webpack_require__(195); +__webpack_require__(196); +__webpack_require__(197); +__webpack_require__(198); +__webpack_require__(199); +__webpack_require__(200); +__webpack_require__(201); +__webpack_require__(202); +__webpack_require__(203); +__webpack_require__(204); +__webpack_require__(205); +__webpack_require__(206); +__webpack_require__(207); +__webpack_require__(208); +__webpack_require__(209); +__webpack_require__(210); +__webpack_require__(211); +__webpack_require__(212); +__webpack_require__(213); +__webpack_require__(214); +__webpack_require__(215); +__webpack_require__(216); +__webpack_require__(217); +__webpack_require__(219); +__webpack_require__(220); +__webpack_require__(221); +__webpack_require__(222); +__webpack_require__(223); +__webpack_require__(224); +__webpack_require__(225); +__webpack_require__(226); +__webpack_require__(227); +__webpack_require__(228); +__webpack_require__(229); +__webpack_require__(230); +__webpack_require__(88); +__webpack_require__(231); +__webpack_require__(232); +__webpack_require__(114); +__webpack_require__(233); +__webpack_require__(115); +__webpack_require__(234); +__webpack_require__(235); +__webpack_require__(236); +__webpack_require__(237); +__webpack_require__(238); +__webpack_require__(118); +__webpack_require__(120); +__webpack_require__(121); +__webpack_require__(239); +__webpack_require__(240); +__webpack_require__(241); +__webpack_require__(242); +__webpack_require__(243); +__webpack_require__(244); +__webpack_require__(245); +__webpack_require__(246); +__webpack_require__(247); +__webpack_require__(248); +__webpack_require__(249); +__webpack_require__(250); +__webpack_require__(251); +__webpack_require__(252); +__webpack_require__(253); +__webpack_require__(254); +__webpack_require__(255); +__webpack_require__(256); +__webpack_require__(258); +__webpack_require__(259); +__webpack_require__(261); +__webpack_require__(262); +__webpack_require__(263); +__webpack_require__(264); +__webpack_require__(265); +__webpack_require__(266); +__webpack_require__(267); +__webpack_require__(268); +__webpack_require__(269); +__webpack_require__(270); +__webpack_require__(271); +__webpack_require__(272); +__webpack_require__(273); +__webpack_require__(274); +__webpack_require__(275); +__webpack_require__(276); +__webpack_require__(277); +__webpack_require__(278); +__webpack_require__(279); +__webpack_require__(280); +__webpack_require__(281); +__webpack_require__(282); +__webpack_require__(283); +__webpack_require__(284); +__webpack_require__(285); +__webpack_require__(286); +__webpack_require__(287); +__webpack_require__(288); +__webpack_require__(289); +__webpack_require__(290); +__webpack_require__(291); +__webpack_require__(292); +__webpack_require__(293); +__webpack_require__(294); +__webpack_require__(295); +__webpack_require__(296); +__webpack_require__(297); +__webpack_require__(298); +__webpack_require__(299); +__webpack_require__(300); +__webpack_require__(301); +__webpack_require__(302); +__webpack_require__(303); +__webpack_require__(304); +__webpack_require__(305); +__webpack_require__(306); +__webpack_require__(307); +__webpack_require__(308); +__webpack_require__(309); +__webpack_require__(310); +__webpack_require__(311); +__webpack_require__(312); +__webpack_require__(313); +__webpack_require__(314); +__webpack_require__(315); +__webpack_require__(316); +__webpack_require__(317); +__webpack_require__(318); +__webpack_require__(319); +__webpack_require__(320); +__webpack_require__(321); +__webpack_require__(322); +__webpack_require__(323); +__webpack_require__(324); +__webpack_require__(325); +__webpack_require__(326); +__webpack_require__(327); +__webpack_require__(328); +__webpack_require__(329); +__webpack_require__(330); +__webpack_require__(331); +__webpack_require__(50); +__webpack_require__(333); +__webpack_require__(130); +__webpack_require__(334); +__webpack_require__(335); +__webpack_require__(336); +__webpack_require__(337); +__webpack_require__(338); +__webpack_require__(339); +__webpack_require__(340); +__webpack_require__(341); +__webpack_require__(342); +module.exports = __webpack_require__(343); + + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(2); +var has = __webpack_require__(12); +var DESCRIPTORS = __webpack_require__(6); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(15); +var META = __webpack_require__(33).KEY; +var $fails = __webpack_require__(4); +var shared = __webpack_require__(47); +var setToStringTag = __webpack_require__(45); +var uid = __webpack_require__(37); +var wks = __webpack_require__(5); +var wksExt = __webpack_require__(99); +var wksDefine = __webpack_require__(70); +var enumKeys = __webpack_require__(137); +var isArray = __webpack_require__(55); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var toObject = __webpack_require__(9); +var toIObject = __webpack_require__(11); +var toPrimitive = __webpack_require__(23); +var createDesc = __webpack_require__(31); +var _create = __webpack_require__(28); +var gOPNExt = __webpack_require__(102); +var $GOPD = __webpack_require__(16); +var $GOPS = __webpack_require__(54); +var $DP = __webpack_require__(8); +var $keys = __webpack_require__(27); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(39).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(49).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(32)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); + +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + } +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(14)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(47)('native-function-to-string', Function.toString); + + +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(27); +var gOPS = __webpack_require__(54); +var pIE = __webpack_require__(49); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(6), 'Object', { defineProperty: __webpack_require__(8).f }); + + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) +$export($export.S + $export.F * !__webpack_require__(6), 'Object', { defineProperties: __webpack_require__(101) }); + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = __webpack_require__(11); +var $getOwnPropertyDescriptor = __webpack_require__(16).f; + +__webpack_require__(25)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); + + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: __webpack_require__(28) }); + + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(9); +var $getPrototypeOf = __webpack_require__(17); + +__webpack_require__(25)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + + +/***/ }), +/* 143 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(9); +var $keys = __webpack_require__(27); + +__webpack_require__(25)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + + +/***/ }), +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 Object.getOwnPropertyNames(O) +__webpack_require__(25)('getOwnPropertyNames', function () { + return __webpack_require__(102).f; +}); + + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.5 Object.freeze(O) +var isObject = __webpack_require__(3); +var meta = __webpack_require__(33).onFreeze; + +__webpack_require__(25)('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); + + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.17 Object.seal(O) +var isObject = __webpack_require__(3); +var meta = __webpack_require__(33).onFreeze; + +__webpack_require__(25)('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); + + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.15 Object.preventExtensions(O) +var isObject = __webpack_require__(3); +var meta = __webpack_require__(33).onFreeze; + +__webpack_require__(25)('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); + + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.12 Object.isFrozen(O) +var isObject = __webpack_require__(3); + +__webpack_require__(25)('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); + + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.13 Object.isSealed(O) +var isObject = __webpack_require__(3); + +__webpack_require__(25)('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); + + +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.11 Object.isExtensible(O) +var isObject = __webpack_require__(3); + +__webpack_require__(25)('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); + + +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(0); + +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(74) }); + + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.10 Object.is(value1, value2) +var $export = __webpack_require__(0); +$export($export.S, 'Object', { is: __webpack_require__(103) }); + + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(0); +$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(75).set }); + + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.3.6 Object.prototype.toString() +var classof = __webpack_require__(34); +var test = {}; +test[__webpack_require__(5)('toStringTag')] = 'z'; +if (test + '' != '[object z]') { + __webpack_require__(15)(Object.prototype, 'toString', function toString() { + return '[object ' + classof(this) + ']'; + }, true); +} + + +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) +var $export = __webpack_require__(0); + +$export($export.P, 'Function', { bind: __webpack_require__(104) }); + + +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8).f; +var FProto = Function.prototype; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; + +// 19.2.4.2 name +NAME in FProto || __webpack_require__(6) && dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + } +}); + + +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var isObject = __webpack_require__(3); +var getPrototypeOf = __webpack_require__(17); +var HAS_INSTANCE = __webpack_require__(5)('hasInstance'); +var FunctionProto = Function.prototype; +// 19.2.3.6 Function.prototype[@@hasInstance](V) +if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(8).f(FunctionProto, HAS_INSTANCE, { value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while (O = getPrototypeOf(O)) if (this.prototype === O) return true; + return false; +} }); + + +/***/ }), +/* 158 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var has = __webpack_require__(12); +var cof = __webpack_require__(20); +var inheritIfRequired = __webpack_require__(77); +var toPrimitive = __webpack_require__(23); +var fails = __webpack_require__(4); +var gOPN = __webpack_require__(39).f; +var gOPD = __webpack_require__(16).f; +var dP = __webpack_require__(8).f; +var $trim = __webpack_require__(46).trim; +var NUMBER = 'Number'; +var $Number = global[NUMBER]; +var Base = $Number; +var proto = $Number.prototype; +// Opera ~12 has broken Object#toString +var BROKEN_COF = cof(__webpack_require__(28)(proto)) == NUMBER; +var TRIM = 'trim' in String.prototype; + +// 7.1.3 ToNumber(argument) +var toNumber = function (argument) { + var it = toPrimitive(argument, false); + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0); + var third, radix, maxCode; + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i + case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i + default: return +it; + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } return parseInt(digits, radix); + } + } return +it; +}; + +if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var that = this; + return that instanceof $Number + // check on 1..constructor(foo) case + && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); + }; + for (var keys = __webpack_require__(6) ? gOPN(Base) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), j = 0, key; keys.length > j; j++) { + if (has(Base, key = keys[j]) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + __webpack_require__(15)(global, NUMBER, $Number); +} + + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toInteger = __webpack_require__(21); +var aNumberValue = __webpack_require__(105); +var repeat = __webpack_require__(79); +var $toFixed = 1.0.toFixed; +var floor = Math.floor; +var data = [0, 0, 0, 0, 0, 0]; +var ERROR = 'Number.toFixed: incorrect invocation!'; +var ZERO = '0'; + +var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; +var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } +}; +var numToString = function () { + var i = 6; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } return s; +}; +var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); +}; +var log = function (x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } return n; +}; + +$export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || + 0.9.toFixed(0) !== '1' || + 1.255.toFixed(2) !== '1.25' || + 1000000000000000128.0.toFixed(0) !== '1000000000000000128' +) || !__webpack_require__(4)(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); +})), 'Number', { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } return m; + } +}); + + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $fails = __webpack_require__(4); +var aNumberValue = __webpack_require__(105); +var $toPrecision = 1.0.toPrecision; + +$export($export.P + $export.F * ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; +}) || !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); +})), 'Number', { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + } +}); + + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.1 Number.EPSILON +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + + +/***/ }), +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.2 Number.isFinite(number) +var $export = __webpack_require__(0); +var _isFinite = __webpack_require__(2).isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + } +}); + + +/***/ }), +/* 163 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { isInteger: __webpack_require__(106) }); + + +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.4 Number.isNaN(number) +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + } +}); + + +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.5 Number.isSafeInteger(number) +var $export = __webpack_require__(0); +var isInteger = __webpack_require__(106); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); + + +/***/ }), +/* 166 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.6 Number.MAX_SAFE_INTEGER +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); + + +/***/ }), +/* 167 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.10 Number.MIN_SAFE_INTEGER +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); + + +/***/ }), +/* 168 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseFloat = __webpack_require__(107); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); + + +/***/ }), +/* 169 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseInt = __webpack_require__(108); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + + +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseInt = __webpack_require__(108); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + + +/***/ }), +/* 171 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseFloat = __webpack_require__(107); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + + +/***/ }), +/* 172 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.3 Math.acosh(x) +var $export = __webpack_require__(0); +var log1p = __webpack_require__(109); +var sqrt = Math.sqrt; +var $acosh = Math.acosh; + +$export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity +), 'Math', { + acosh: function acosh(x) { + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + } +}); + + +/***/ }), +/* 173 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.5 Math.asinh(x) +var $export = __webpack_require__(0); +var $asinh = Math.asinh; + +function asinh(x) { + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); +} + +// Tor Browser bug: Math.asinh(0) -> -0 +$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + + +/***/ }), +/* 174 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.7 Math.atanh(x) +var $export = __webpack_require__(0); +var $atanh = Math.atanh; + +// Tor Browser bug: Math.atanh(-0) -> 0 +$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } +}); + + +/***/ }), +/* 175 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.9 Math.cbrt(x) +var $export = __webpack_require__(0); +var sign = __webpack_require__(80); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); + + +/***/ }), +/* 176 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.11 Math.clz32(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } +}); + + +/***/ }), +/* 177 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.12 Math.cosh(x) +var $export = __webpack_require__(0); +var exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp(x = +x) + exp(-x)) / 2; + } +}); + + +/***/ }), +/* 178 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.14 Math.expm1(x) +var $export = __webpack_require__(0); +var $expm1 = __webpack_require__(81); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { fround: __webpack_require__(110) }); + + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = __webpack_require__(0); +var abs = Math.abs; + +$export($export.S, 'Math', { + hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var arg, div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + } +}); + + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.18 Math.imul(x, y) +var $export = __webpack_require__(0); +var $imul = Math.imul; + +// some WebKit versions fails with big numbers, some has wrong arity +$export($export.S + $export.F * __webpack_require__(4)(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; +}), 'Math', { + imul: function imul(x, y) { + var UINT16 = 0xffff; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); + + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.21 Math.log10(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + } +}); + + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.20 Math.log1p(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { log1p: __webpack_require__(109) }); + + +/***/ }), +/* 184 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.22 Math.log2(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + } +}); + + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.28 Math.sign(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { sign: __webpack_require__(80) }); + + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.30 Math.sinh(x) +var $export = __webpack_require__(0); +var expm1 = __webpack_require__(81); +var exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * __webpack_require__(4)(function () { + return !Math.sinh(-2e-17) != -2e-17; +}), 'Math', { + sinh: function sinh(x) { + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + } +}); + + +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.33 Math.tanh(x) +var $export = __webpack_require__(0); +var expm1 = __webpack_require__(81); +var exp = Math.exp; + +$export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1(x = +x); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } +}); + + +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.34 Math.trunc(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + } +}); + + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var toAbsoluteIndex = __webpack_require__(38); +var fromCharCode = String.fromCharCode; +var $fromCodePoint = String.fromCodePoint; + +// length should be 1, old FF problem +$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } +}); + + +/***/ }), +/* 190 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(11); +var toLength = __webpack_require__(7); + +$export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } return res.join(''); + } +}); + + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.1.3.25 String.prototype.trim() +__webpack_require__(46)('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; +}); + + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $at = __webpack_require__(56)(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } +}); + + +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + +var $export = __webpack_require__(0); +var toLength = __webpack_require__(7); +var context = __webpack_require__(82); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * __webpack_require__(83)(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); + + +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.7 String.prototype.includes(searchString, position = 0) + +var $export = __webpack_require__(0); +var context = __webpack_require__(82); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * __webpack_require__(83)(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); + +$export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(79) +}); + + +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + +var $export = __webpack_require__(0); +var toLength = __webpack_require__(7); +var context = __webpack_require__(82); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * __webpack_require__(83)(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); + + +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(56)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(58)(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.2 String.prototype.anchor(name) +__webpack_require__(18)('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; +}); + + +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.3 String.prototype.big() +__webpack_require__(18)('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; +}); + + +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.4 String.prototype.blink() +__webpack_require__(18)('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; +}); + + +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.5 String.prototype.bold() +__webpack_require__(18)('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; +}); + + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.6 String.prototype.fixed() +__webpack_require__(18)('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; +}); + + +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.7 String.prototype.fontcolor(color) +__webpack_require__(18)('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; +}); + + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.8 String.prototype.fontsize(size) +__webpack_require__(18)('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; +}); + + +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.9 String.prototype.italics() +__webpack_require__(18)('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; +}); + + +/***/ }), +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.10 String.prototype.link(url) +__webpack_require__(18)('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; +}); + + +/***/ }), +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.11 String.prototype.small() +__webpack_require__(18)('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; +}); + + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.12 String.prototype.strike() +__webpack_require__(18)('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; +}); + + +/***/ }), +/* 209 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.13 String.prototype.sub() +__webpack_require__(18)('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; +}); + + +/***/ }), +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.14 String.prototype.sup() +__webpack_require__(18)('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; +}); + + +/***/ }), +/* 211 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = __webpack_require__(0); + +$export($export.S, 'Array', { isArray: __webpack_require__(55) }); + + +/***/ }), +/* 212 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(19); +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var call = __webpack_require__(111); +var isArrayIter = __webpack_require__(84); +var toLength = __webpack_require__(7); +var createProperty = __webpack_require__(85); +var getIterFn = __webpack_require__(50); + +$export($export.S + $export.F * !__webpack_require__(60)(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var createProperty = __webpack_require__(85); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * __webpack_require__(4)(function () { + function F() { /* empty */ } + return !(Array.of.call(F) instanceof F); +}), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } +}); + + +/***/ }), +/* 214 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.13 Array.prototype.join(separator) +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(11); +var arrayJoin = [].join; + +// fallback for not array-like strings +$export($export.P + $export.F * (__webpack_require__(48) != Object || !__webpack_require__(22)(arrayJoin)), 'Array', { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); + + +/***/ }), +/* 215 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var html = __webpack_require__(73); +var cof = __webpack_require__(20); +var toAbsoluteIndex = __webpack_require__(38); +var toLength = __webpack_require__(7); +var arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * __webpack_require__(4)(function () { + if (html) arraySlice.call(html); +}), 'Array', { + slice: function slice(begin, end) { + var len = toLength(this.length); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } +}); + + +/***/ }), +/* 216 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var aFunction = __webpack_require__(10); +var toObject = __webpack_require__(9); +var fails = __webpack_require__(4); +var $sort = [].sort; +var test = [1, 2, 3]; + +$export($export.P + $export.F * (fails(function () { + // IE8- + test.sort(undefined); +}) || !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit +}) || !__webpack_require__(22)($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + } +}); + + +/***/ }), +/* 217 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $forEach = __webpack_require__(26)(0); +var STRICT = __webpack_require__(22)([].forEach, true); + +$export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +var isArray = __webpack_require__(55); +var SPECIES = __webpack_require__(5)('species'); + +module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } return C === undefined ? Array : C; +}; + + +/***/ }), +/* 219 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $map = __webpack_require__(26)(1); + +$export($export.P + $export.F * !__webpack_require__(22)([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $filter = __webpack_require__(26)(2); + +$export($export.P + $export.F * !__webpack_require__(22)([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 221 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $some = __webpack_require__(26)(3); + +$export($export.P + $export.F * !__webpack_require__(22)([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $every = __webpack_require__(26)(4); + +$export($export.P + $export.F * !__webpack_require__(22)([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $reduce = __webpack_require__(112); + +$export($export.P + $export.F * !__webpack_require__(22)([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } +}); + + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $reduce = __webpack_require__(112); + +$export($export.P + $export.F * !__webpack_require__(22)([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + } +}); + + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $indexOf = __webpack_require__(53)(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(22)($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); + + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(11); +var toInteger = __webpack_require__(21); +var toLength = __webpack_require__(7); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(22)($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + } +}); + + +/***/ }), +/* 227 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +var $export = __webpack_require__(0); + +$export($export.P, 'Array', { copyWithin: __webpack_require__(113) }); + +__webpack_require__(35)('copyWithin'); + + +/***/ }), +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +var $export = __webpack_require__(0); + +$export($export.P, 'Array', { fill: __webpack_require__(87) }); + +__webpack_require__(35)('fill'); + + +/***/ }), +/* 229 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = __webpack_require__(0); +var $find = __webpack_require__(26)(5); +var KEY = 'find'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +__webpack_require__(35)(KEY); + + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = __webpack_require__(0); +var $find = __webpack_require__(26)(6); +var KEY = 'findIndex'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +__webpack_require__(35)(KEY); + + +/***/ }), +/* 231 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(41)('Array'); + + +/***/ }), +/* 232 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var inheritIfRequired = __webpack_require__(77); +var dP = __webpack_require__(8).f; +var gOPN = __webpack_require__(39).f; +var isRegExp = __webpack_require__(57); +var $flags = __webpack_require__(51); +var $RegExp = global.RegExp; +var Base = $RegExp; +var proto = $RegExp.prototype; +var re1 = /a/g; +var re2 = /a/g; +// "new" creates a new object, old webkit buggy here +var CORRECT_NEW = new $RegExp(re1) !== re1; + +if (__webpack_require__(6) && (!CORRECT_NEW || __webpack_require__(4)(function () { + re2[__webpack_require__(5)('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; +}))) { + $RegExp = function RegExp(p, f) { + var tiRE = this instanceof $RegExp; + var piRE = isRegExp(p); + var fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU ? p + : inheritIfRequired(CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) + , tiRE ? this : proto, $RegExp); + }; + var proxy = function (key) { + key in $RegExp || dP($RegExp, key, { + configurable: true, + get: function () { return Base[key]; }, + set: function (it) { Base[key] = it; } + }); + }; + for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + __webpack_require__(15)(global, 'RegExp', $RegExp); +} + +__webpack_require__(41)('RegExp'); + + +/***/ }), +/* 233 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(115); +var anObject = __webpack_require__(1); +var $flags = __webpack_require__(51); +var DESCRIPTORS = __webpack_require__(6); +var TO_STRING = 'toString'; +var $toString = /./[TO_STRING]; + +var define = function (fn) { + __webpack_require__(15)(RegExp.prototype, TO_STRING, fn, true); +}; + +// 21.2.5.14 RegExp.prototype.toString() +if (__webpack_require__(4)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { + define(function toString() { + var R = anObject(this); + return '/'.concat(R.source, '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); + }); +// FF44- RegExp#toString has a wrong name +} else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); +} + + +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var anObject = __webpack_require__(1); +var toLength = __webpack_require__(7); +var advanceStringIndex = __webpack_require__(91); +var regExpExec = __webpack_require__(61); + +// @@match logic +__webpack_require__(62)('match', 1, function (defined, MATCH, $match, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.github.io/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative($match, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + if (!rx.global) return regExpExec(rx, S); + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = String(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + } + ]; +}); + + +/***/ }), +/* 235 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var anObject = __webpack_require__(1); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(7); +var toInteger = __webpack_require__(21); +var advanceStringIndex = __webpack_require__(91); +var regExpExec = __webpack_require__(61); +var max = Math.max; +var min = Math.min; +var floor = Math.floor; +var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; +var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + +var maybeToString = function (it) { + return it === undefined ? it : String(it); +}; + +// @@replace logic +__webpack_require__(62)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = defined(this); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regExpExec(rx, S); + if (result === null) break; + results.push(result); + if (!global) break; + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + var matched = String(result[0]); + var position = max(min(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + } + ]; + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return $replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': return '$'; + case '&': return matched; + case '`': return str.slice(0, position); + case "'": return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + } +}); + + +/***/ }), +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var anObject = __webpack_require__(1); +var sameValue = __webpack_require__(103); +var regExpExec = __webpack_require__(61); + +// @@search logic +__webpack_require__(62)('search', 1, function (defined, SEARCH, $search, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.github.io/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative($search, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regExpExec(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + } + ]; +}); + + +/***/ }), +/* 237 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var isRegExp = __webpack_require__(57); +var anObject = __webpack_require__(1); +var speciesConstructor = __webpack_require__(52); +var advanceStringIndex = __webpack_require__(91); +var toLength = __webpack_require__(7); +var callRegExpExec = __webpack_require__(61); +var regexpExec = __webpack_require__(90); +var fails = __webpack_require__(4); +var $min = Math.min; +var $push = [].push; +var $SPLIT = 'split'; +var LENGTH = 'length'; +var LAST_INDEX = 'lastIndex'; +var MAX_UINT32 = 0xffffffff; + +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError +var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); }); + +// @@split logic +__webpack_require__(62)('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return $split.call(string, separator, limit); + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while (match = regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy[LAST_INDEX]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); + }; + } else { + internalSplit = $split; + } + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = defined(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + } + ]; +}); + + +/***/ }), +/* 238 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(32); +var global = __webpack_require__(2); +var ctx = __webpack_require__(19); +var classof = __webpack_require__(34); +var $export = __webpack_require__(0); +var isObject = __webpack_require__(3); +var aFunction = __webpack_require__(10); +var anInstance = __webpack_require__(42); +var forOf = __webpack_require__(36); +var speciesConstructor = __webpack_require__(52); +var task = __webpack_require__(92).set; +var microtask = __webpack_require__(93)(); +var newPromiseCapabilityModule = __webpack_require__(94); +var perform = __webpack_require__(116); +var userAgent = __webpack_require__(63); +var promiseResolve = __webpack_require__(117); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[__webpack_require__(5)('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') + && promise.then(empty) instanceof FakePromise + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; + +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(43)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +__webpack_require__(45)($Promise, PROMISE); +__webpack_require__(41)(PROMISE); +Wrapper = __webpack_require__(13)[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(60)(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); + + +/***/ }), +/* 239 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var weak = __webpack_require__(122); +var validate = __webpack_require__(44); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +__webpack_require__(64)(WEAK_SET, function (get) { + return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(validate(this, WEAK_SET), value, true); + } +}, weak, false, true); + + +/***/ }), +/* 240 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = __webpack_require__(0); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var rApply = (__webpack_require__(2).Reflect || {}).apply; +var fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !__webpack_require__(4)(function () { + rApply(function () { /* empty */ }); +}), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } +}); + + +/***/ }), +/* 241 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = __webpack_require__(0); +var create = __webpack_require__(28); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var fails = __webpack_require__(4); +var bind = __webpack_require__(104); +var rConstruct = (__webpack_require__(2).Reflect || {}).construct; + +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function () { + function F() { /* empty */ } + return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function () { + rConstruct(function () { /* empty */ }); +}); + +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: return new Target(); + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); + + +/***/ }), +/* 242 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = __webpack_require__(8); +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var toPrimitive = __webpack_require__(23); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * __webpack_require__(4)(function () { + // eslint-disable-next-line no-undef + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); +}), 'Reflect', { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), +/* 243 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = __webpack_require__(0); +var gOPD = __webpack_require__(16).f; +var anObject = __webpack_require__(1); + +$export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } +}); + + +/***/ }), +/* 244 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 26.1.5 Reflect.enumerate(target) +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = []; // keys + var key; + for (key in iterated) keys.push(key); +}; +__webpack_require__(59)(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; +}); + +$export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + } +}); + + +/***/ }), +/* 245 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = __webpack_require__(16); +var getPrototypeOf = __webpack_require__(17); +var has = __webpack_require__(12); +var $export = __webpack_require__(0); +var isObject = __webpack_require__(3); +var anObject = __webpack_require__(1); + +function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var desc, proto; + if (anObject(target) === receiver) return target[propertyKey]; + if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); +} + +$export($export.S, 'Reflect', { get: get }); + + +/***/ }), +/* 246 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = __webpack_require__(16); +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + } +}); + + +/***/ }), +/* 247 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = __webpack_require__(0); +var getProto = __webpack_require__(17); +var anObject = __webpack_require__(1); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); + + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.9 Reflect.has(target, propertyKey) +var $export = __webpack_require__(0); + +$export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + } +}); + + +/***/ }), +/* 249 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.10 Reflect.isExtensible(target) +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); + + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.11 Reflect.ownKeys(target) +var $export = __webpack_require__(0); + +$export($export.S, 'Reflect', { ownKeys: __webpack_require__(95) }); + + +/***/ }), +/* 251 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.12 Reflect.preventExtensions(target) +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var $preventExtensions = Object.preventExtensions; + +$export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), +/* 252 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = __webpack_require__(8); +var gOPD = __webpack_require__(16); +var getPrototypeOf = __webpack_require__(17); +var has = __webpack_require__(12); +var $export = __webpack_require__(0); +var createDesc = __webpack_require__(31); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); + +function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var existingDescriptor, proto; + if (!ownDesc) { + if (isObject(proto = getPrototypeOf(target))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); + + +/***/ }), +/* 253 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = __webpack_require__(0); +var setProto = __webpack_require__(75); + +if (setProto) $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), +/* 254 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.3.3.1 / 15.9.4.4 Date.now() +var $export = __webpack_require__(0); + +$export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); + + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(23); + +$export($export.P + $export.F * __webpack_require__(4)(function () { + return new Date(NaN).toJSON() !== null + || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1; +}), 'Date', { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } +}); + + +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = __webpack_require__(0); +var toISOString = __webpack_require__(257); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); + + +/***/ }), +/* 257 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = __webpack_require__(4); +var getTime = Date.prototype.getTime; +var $toISOString = Date.prototype.toISOString; + +var lz = function (num) { + return num > 9 ? num : '0' + num; +}; + +// PhantomJS / old WebKit has a broken implementations +module.exports = (fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; +}) || !fails(function () { + $toISOString.call(new Date(NaN)); +})) ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; +} : $toISOString; + + +/***/ }), +/* 258 */ +/***/ (function(module, exports, __webpack_require__) { + +var DateProto = Date.prototype; +var INVALID_DATE = 'Invalid Date'; +var TO_STRING = 'toString'; +var $toString = DateProto[TO_STRING]; +var getTime = DateProto.getTime; +if (new Date(NaN) + '' != INVALID_DATE) { + __webpack_require__(15)(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE; + }); +} + + +/***/ }), +/* 259 */ +/***/ (function(module, exports, __webpack_require__) { + +var TO_PRIMITIVE = __webpack_require__(5)('toPrimitive'); +var proto = Date.prototype; + +if (!(TO_PRIMITIVE in proto)) __webpack_require__(14)(proto, TO_PRIMITIVE, __webpack_require__(260)); + + +/***/ }), +/* 260 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var anObject = __webpack_require__(1); +var toPrimitive = __webpack_require__(23); +var NUMBER = 'number'; + +module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; + + +/***/ }), +/* 261 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $typed = __webpack_require__(65); +var buffer = __webpack_require__(96); +var anObject = __webpack_require__(1); +var toAbsoluteIndex = __webpack_require__(38); +var toLength = __webpack_require__(7); +var isObject = __webpack_require__(3); +var ArrayBuffer = __webpack_require__(2).ArrayBuffer; +var speciesConstructor = __webpack_require__(52); +var $ArrayBuffer = buffer.ArrayBuffer; +var $DataView = buffer.DataView; +var $isView = $typed.ABV && ArrayBuffer.isView; +var $slice = $ArrayBuffer.prototype.slice; +var VIEW = $typed.VIEW; +var ARRAY_BUFFER = 'ArrayBuffer'; + +$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); + +$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return $isView && $isView(it) || isObject(it) && VIEW in it; + } +}); + +$export($export.P + $export.U + $export.F * __webpack_require__(4)(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; +}), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +__webpack_require__(41)(ARRAY_BUFFER); + + +/***/ }), +/* 262 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +$export($export.G + $export.W + $export.F * !__webpack_require__(65).ABV, { + DataView: __webpack_require__(96).DataView +}); + + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Uint8', 1, function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}, true); + + +/***/ }), +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 268 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 269 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 270 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 271 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(29)('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 272 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/Array.prototype.includes +var $export = __webpack_require__(0); +var $includes = __webpack_require__(53)(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +__webpack_require__(35)('includes'); + + +/***/ }), +/* 273 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap +var $export = __webpack_require__(0); +var flattenIntoArray = __webpack_require__(124); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(7); +var aFunction = __webpack_require__(10); +var arraySpeciesCreate = __webpack_require__(86); + +$export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + } +}); + +__webpack_require__(35)('flatMap'); + + +/***/ }), +/* 274 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten +var $export = __webpack_require__(0); +var flattenIntoArray = __webpack_require__(124); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(7); +var toInteger = __webpack_require__(21); +var arraySpeciesCreate = __webpack_require__(86); + +$export($export.P, 'Array', { + flatten: function flatten(/* depthArg = 1 */) { + var depthArg = arguments[0]; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + } +}); + +__webpack_require__(35)('flatten'); + + +/***/ }), +/* 275 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/mathiasbynens/String.prototype.at +var $export = __webpack_require__(0); +var $at = __webpack_require__(56)(true); + +$export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + } +}); + + +/***/ }), +/* 276 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-string-pad-start-end +var $export = __webpack_require__(0); +var $pad = __webpack_require__(125); +var userAgent = __webpack_require__(63); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); + + +/***/ }), +/* 277 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-string-pad-start-end +var $export = __webpack_require__(0); +var $pad = __webpack_require__(125); +var userAgent = __webpack_require__(63); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); + + +/***/ }), +/* 278 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +__webpack_require__(46)('trimLeft', function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; +}, 'trimStart'); + + +/***/ }), +/* 279 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +__webpack_require__(46)('trimRight', function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; +}, 'trimEnd'); + + +/***/ }), +/* 280 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/String.prototype.matchAll/ +var $export = __webpack_require__(0); +var defined = __webpack_require__(24); +var toLength = __webpack_require__(7); +var isRegExp = __webpack_require__(57); +var getFlags = __webpack_require__(51); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +__webpack_require__(59)($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; +}); + +$export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this); + var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); + var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } +}); + + +/***/ }), +/* 281 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(70)('asyncIterator'); + + +/***/ }), +/* 282 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(70)('observable'); + + +/***/ }), +/* 283 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = __webpack_require__(0); +var ownKeys = __webpack_require__(95); +var toIObject = __webpack_require__(11); +var gOPD = __webpack_require__(16); +var createProperty = __webpack_require__(85); + +$export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, key = keys[i++]); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + } +}); + + +/***/ }), +/* 284 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(0); +var $values = __webpack_require__(126)(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); + + +/***/ }), +/* 285 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(0); +var $entries = __webpack_require__(126)(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); + + +/***/ }), +/* 286 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var aFunction = __webpack_require__(10); +var $defineProperty = __webpack_require__(8); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +__webpack_require__(6) && $export($export.P + __webpack_require__(66), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } +}); + + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var aFunction = __webpack_require__(10); +var $defineProperty = __webpack_require__(8); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +__webpack_require__(6) && $export($export.P + __webpack_require__(66), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } +}); + + +/***/ }), +/* 288 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(23); +var getPrototypeOf = __webpack_require__(17); +var getOwnPropertyDescriptor = __webpack_require__(16).f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +__webpack_require__(6) && $export($export.P + __webpack_require__(66), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.get; + } while (O = getPrototypeOf(O)); + } +}); + + +/***/ }), +/* 289 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(23); +var getPrototypeOf = __webpack_require__(17); +var getOwnPropertyDescriptor = __webpack_require__(16).f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +__webpack_require__(6) && $export($export.P + __webpack_require__(66), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.set; + } while (O = getPrototypeOf(O)); + } +}); + + +/***/ }), +/* 290 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = __webpack_require__(0); + +$export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(127)('Map') }); + + +/***/ }), +/* 291 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = __webpack_require__(0); + +$export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(127)('Set') }); + + +/***/ }), +/* 292 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +__webpack_require__(67)('Map'); + + +/***/ }), +/* 293 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +__webpack_require__(67)('Set'); + + +/***/ }), +/* 294 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of +__webpack_require__(67)('WeakMap'); + + +/***/ }), +/* 295 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +__webpack_require__(67)('WeakSet'); + + +/***/ }), +/* 296 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from +__webpack_require__(68)('Map'); + + +/***/ }), +/* 297 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +__webpack_require__(68)('Set'); + + +/***/ }), +/* 298 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +__webpack_require__(68)('WeakMap'); + + +/***/ }), +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from +__webpack_require__(68)('WeakSet'); + + +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-global +var $export = __webpack_require__(0); + +$export($export.G, { global: __webpack_require__(2) }); + + +/***/ }), +/* 301 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-global +var $export = __webpack_require__(0); + +$export($export.S, 'System', { global: __webpack_require__(2) }); + + +/***/ }), +/* 302 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/ljharb/proposal-is-error +var $export = __webpack_require__(0); +var cof = __webpack_require__(20); + +$export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + } +}); + + +/***/ }), +/* 303 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + } +}); + + +/***/ }), +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); + + +/***/ }), +/* 305 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); +var RAD_PER_DEG = 180 / Math.PI; + +$export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + } +}); + + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); +var scale = __webpack_require__(129); +var fround = __webpack_require__(110); + +$export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + } +}); + + +/***/ }), +/* 307 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } +}); + + +/***/ }), +/* 308 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } +}); + + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + imulh: function imulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >> 16; + var v1 = $v >> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } +}); + + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); + + +/***/ }), +/* 311 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); +var DEG_PER_RAD = Math.PI / 180; + +$export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + } +}); + + +/***/ }), +/* 312 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { scale: __webpack_require__(129) }); + + +/***/ }), +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + umulh: function umulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >>> 16; + var v1 = $v >>> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } +}); + + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +// http://jfbastien.github.io/papers/Math.signbit.html +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { signbit: function signbit(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; +} }); + + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// https://github.com/tc39/proposal-promise-finally + +var $export = __webpack_require__(0); +var core = __webpack_require__(13); +var global = __webpack_require__(2); +var speciesConstructor = __webpack_require__(52); +var promiseResolve = __webpack_require__(117); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); + + +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-promise-try +var $export = __webpack_require__(0); +var newPromiseCapability = __webpack_require__(94); +var perform = __webpack_require__(116); + +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); + + +/***/ }), +/* 317 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var toMetaKey = metadata.key; +var ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); +} }); + + +/***/ }), +/* 318 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var toMetaKey = metadata.key; +var getOrCreateMetadataMap = metadata.map; +var store = metadata.store; + +metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); + var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; + if (metadataMap.size) return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); +} }); + + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(17); +var ordinaryHasOwnMetadata = metadata.has; +var ordinaryGetOwnMetadata = metadata.get; +var toMetaKey = metadata.key; + +var ordinaryGetMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; +}; + +metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +var Set = __webpack_require__(120); +var from = __webpack_require__(128); +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(17); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var parent = getPrototypeOf(O); + if (parent === null) return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; +}; + +metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { + return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); + + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var ordinaryGetOwnMetadata = metadata.get; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); + + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(17); +var ordinaryHasOwnMetadata = metadata.has; +var toMetaKey = metadata.key; + +var ordinaryHasMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; +}; + +metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var ordinaryHasOwnMetadata = metadata.has; +var toMetaKey = metadata.key; + +metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 325 */ +/***/ (function(module, exports, __webpack_require__) { + +var $metadata = __webpack_require__(30); +var anObject = __webpack_require__(1); +var aFunction = __webpack_require__(10); +var toMetaKey = $metadata.key; +var ordinaryDefineOwnMetadata = $metadata.set; + +$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) { + return function decorator(target, targetKey) { + ordinaryDefineOwnMetadata( + metadataKey, metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey) + ); + }; +} }); + + +/***/ }), +/* 326 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask +var $export = __webpack_require__(0); +var microtask = __webpack_require__(93)(); +var process = __webpack_require__(2).process; +var isNode = __webpack_require__(20)(process) == 'process'; + +$export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); + + +/***/ }), +/* 327 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/zenparsing/es-observable +var $export = __webpack_require__(0); +var global = __webpack_require__(2); +var core = __webpack_require__(13); +var microtask = __webpack_require__(93)(); +var OBSERVABLE = __webpack_require__(5)('observable'); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var anInstance = __webpack_require__(42); +var redefineAll = __webpack_require__(43); +var hide = __webpack_require__(14); +var forOf = __webpack_require__(36); +var RETURN = forOf.RETURN; + +var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); +}; + +var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } +}; + +var subscriptionClosed = function (subscription) { + return subscription._o === undefined; +}; + +var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } +}; + +var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer); + var subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } if (subscriptionClosed(this)) cleanupSubscription(this); +}; + +Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe() { closeSubscription(this); } +}); + +var SubscriptionObserver = function (subscription) { + this._s = subscription; +}; + +SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } +}); + +var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); +}; + +redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } +}); + +redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if (forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN) return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var j = 0; j < items.length; ++j) { + observer.next(items[j]); + if (done) return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + } +}); + +hide($Observable.prototype, OBSERVABLE, function () { return this; }); + +$export($export.G, { Observable: $Observable }); + +__webpack_require__(41)('Observable'); + + +/***/ }), +/* 328 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $task = __webpack_require__(92); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); + + +/***/ }), +/* 329 */ +/***/ (function(module, exports, __webpack_require__) { + +var $iterators = __webpack_require__(88); +var getKeys = __webpack_require__(27); +var redefine = __webpack_require__(15); +var global = __webpack_require__(2); +var hide = __webpack_require__(14); +var Iterators = __webpack_require__(40); +var wks = __webpack_require__(5); +var ITERATOR = wks('iterator'); +var TO_STRING_TAG = wks('toStringTag'); +var ArrayValues = Iterators.Array; + +var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false +}; + +for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } +} + + +/***/ }), +/* 330 */ +/***/ (function(module, exports, __webpack_require__) { + +// ie9- setTimeout & setInterval additional parameters fix +var global = __webpack_require__(2); +var $export = __webpack_require__(0); +var userAgent = __webpack_require__(63); +var slice = [].slice; +var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check +var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set(boundArgs ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } : fn, time); + }; +}; +$export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) +}); + + +/***/ }), +/* 331 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(19); +var $export = __webpack_require__(0); +var createDesc = __webpack_require__(31); +var assign = __webpack_require__(74); +var create = __webpack_require__(28); +var getPrototypeOf = __webpack_require__(17); +var getKeys = __webpack_require__(27); +var dP = __webpack_require__(8); +var keyOf = __webpack_require__(332); +var aFunction = __webpack_require__(10); +var forOf = __webpack_require__(36); +var isIterable = __webpack_require__(130); +var $iterCreate = __webpack_require__(59); +var step = __webpack_require__(89); +var isObject = __webpack_require__(3); +var toIObject = __webpack_require__(11); +var DESCRIPTORS = __webpack_require__(6); +var has = __webpack_require__(12); + +// 0 -> Dict.forEach +// 1 -> Dict.map +// 2 -> Dict.filter +// 3 -> Dict.some +// 4 -> Dict.every +// 5 -> Dict.find +// 6 -> Dict.findKey +// 7 -> Dict.mapPairs +var createDictMethod = function (TYPE) { + var IS_MAP = TYPE == 1; + var IS_EVERY = TYPE == 4; + return function (object, callbackfn, that /* = undefined */) { + var f = ctx(callbackfn, that, 3); + var O = toIObject(object); + var result = IS_MAP || TYPE == 7 || TYPE == 2 + ? new (typeof this == 'function' ? this : Dict)() : undefined; + var key, val, res; + for (key in O) if (has(O, key)) { + val = O[key]; + res = f(val, key, object); + if (TYPE) { + if (IS_MAP) result[key] = res; // map + else if (res) switch (TYPE) { + case 2: result[key] = val; break; // filter + case 3: return true; // some + case 5: return val; // find + case 6: return key; // findKey + case 7: result[res[0]] = res[1]; // mapPairs + } else if (IS_EVERY) return false; // every + } + } + return TYPE == 3 || IS_EVERY ? IS_EVERY : result; + }; +}; +var findKey = createDictMethod(6); + +var createDictIter = function (kind) { + return function (it) { + return new DictIterator(it, kind); + }; +}; +var DictIterator = function (iterated, kind) { + this._t = toIObject(iterated); // target + this._a = getKeys(iterated); // keys + this._i = 0; // next index + this._k = kind; // kind +}; +$iterCreate(DictIterator, 'Dict', function () { + var that = this; + var O = that._t; + var keys = that._a; + var kind = that._k; + var key; + do { + if (that._i >= keys.length) { + that._t = undefined; + return step(1); + } + } while (!has(O, key = keys[that._i++])); + if (kind == 'keys') return step(0, key); + if (kind == 'values') return step(0, O[key]); + return step(0, [key, O[key]]); +}); + +function Dict(iterable) { + var dict = create(null); + if (iterable != undefined) { + if (isIterable(iterable)) { + forOf(iterable, true, function (key, value) { + dict[key] = value; + }); + } else assign(dict, iterable); + } + return dict; +} +Dict.prototype = null; + +function reduce(object, mapfn, init) { + aFunction(mapfn); + var O = toIObject(object); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var memo, key; + if (arguments.length < 3) { + if (!length) throw TypeError('Reduce of empty object with no initial value'); + memo = O[keys[i++]]; + } else memo = Object(init); + while (length > i) if (has(O, key = keys[i++])) { + memo = mapfn(memo, O[key], key, object); + } + return memo; +} + +function includes(object, el) { + // eslint-disable-next-line no-self-compare + return (el == el ? keyOf(object, el) : findKey(object, function (it) { + // eslint-disable-next-line no-self-compare + return it != it; + })) !== undefined; +} + +function get(object, key) { + if (has(object, key)) return object[key]; +} +function set(object, key, value) { + if (DESCRIPTORS && key in Object) dP.f(object, key, createDesc(0, value)); + else object[key] = value; + return object; +} + +function isDict(it) { + return isObject(it) && getPrototypeOf(it) === Dict.prototype; +} + +$export($export.G + $export.F, { Dict: Dict }); + +$export($export.S, 'Dict', { + keys: createDictIter('keys'), + values: createDictIter('values'), + entries: createDictIter('entries'), + forEach: createDictMethod(0), + map: createDictMethod(1), + filter: createDictMethod(2), + some: createDictMethod(3), + every: createDictMethod(4), + find: createDictMethod(5), + findKey: findKey, + mapPairs: createDictMethod(7), + reduce: reduce, + keyOf: keyOf, + includes: includes, + has: has, + get: get, + set: set, + isDict: isDict +}); + + +/***/ }), +/* 332 */ +/***/ (function(module, exports, __webpack_require__) { + +var getKeys = __webpack_require__(27); +var toIObject = __webpack_require__(11); +module.exports = function (object, el) { + var O = toIObject(object); + var keys = getKeys(O); + var length = keys.length; + var index = 0; + var key; + while (length > index) if (O[key = keys[index++]] === el) return key; +}; + + +/***/ }), +/* 333 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var get = __webpack_require__(50); +module.exports = __webpack_require__(13).getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; + + +/***/ }), +/* 334 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(13); +var $export = __webpack_require__(0); +var partial = __webpack_require__(131); +// https://esdiscuss.org/topic/promise-returning-delay-function +$export($export.G + $export.F, { + delay: function delay(time) { + return new (core.Promise || global.Promise)(function (resolve) { + setTimeout(partial.call(resolve, true), time); + }); + } +}); + + +/***/ }), +/* 335 */ +/***/ (function(module, exports, __webpack_require__) { + +var path = __webpack_require__(132); +var $export = __webpack_require__(0); + +// Placeholder +__webpack_require__(13)._ = path._ = path._ || {}; + +$export($export.P + $export.F, 'Function', { part: __webpack_require__(131) }); + + +/***/ }), +/* 336 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); + +$export($export.S + $export.F, 'Object', { isObject: __webpack_require__(3) }); + + +/***/ }), +/* 337 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); + +$export($export.S + $export.F, 'Object', { classof: __webpack_require__(34) }); + + +/***/ }), +/* 338 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var define = __webpack_require__(133); + +$export($export.S + $export.F, 'Object', { define: define }); + + +/***/ }), +/* 339 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var define = __webpack_require__(133); +var create = __webpack_require__(28); + +$export($export.S + $export.F, 'Object', { + make: function (proto, mixin) { + return define(create(proto), mixin); + } +}); + + +/***/ }), +/* 340 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(58)(Number, 'Number', function (iterated) { + this._l = +iterated; + this._i = 0; +}, function () { + var i = this._i++; + var done = !(i < this._l); + return { done: done, value: done ? undefined : i }; +}); + + +/***/ }), +/* 341 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/benjamingr/RexExp.escape +var $export = __webpack_require__(0); +var $re = __webpack_require__(97)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); + + +/***/ }), +/* 342 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $re = __webpack_require__(97)(/[&<>"']/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}); + +$export($export.P + $export.F, 'String', { escapeHTML: function escapeHTML() { return $re(this); } }); + + +/***/ }), +/* 343 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $re = __webpack_require__(97)(/&(?:amp|lt|gt|quot|apos);/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}); + +$export($export.P + $export.F, 'String', { unescapeHTML: function unescapeHTML() { return $re(this); } }); + + +/***/ }) +/******/ ]); +// CommonJS export +if (typeof module != 'undefined' && module.exports) module.exports = __e; +// RequireJS export +else if (typeof define == 'function' && define.amd) define(function () { return __e; }); +// Export to global object +else __g.core = __e; +}(1, 1); \ No newline at end of file diff --git a/node_modules/core-js/client/core.min.js b/node_modules/core-js/client/core.min.js new file mode 100644 index 00000000..a231c670 --- /dev/null +++ b/node_modules/core-js/client/core.min.js @@ -0,0 +1,10 @@ +/** + * core-js 2.6.9 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2019 Denis Pushkarev + */ +!function(e,i,Jt){"use strict";!function(r){var e={};function __webpack_require__(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return r[t].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}__webpack_require__.m=r,__webpack_require__.c=e,__webpack_require__.d=function(t,n,r){__webpack_require__.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},__webpack_require__.n=function(t){var n=t&&t.__esModule?function getDefault(){return t["default"]}:function getModuleExports(){return t};return __webpack_require__.d(n,"a",n),n},__webpack_require__.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=134)}([function(t,n,r){var v=r(2),g=r(13),y=r(14),d=r(15),b=r(19),_="prototype",S=function(t,n,r){var e,i,o,u,c=t&S.F,f=t&S.G,a=t&S.P,s=t&S.B,l=f?v:t&S.S?v[n]||(v[n]={}):(v[n]||{})[_],h=f?g:g[n]||(g[n]={}),p=h[_]||(h[_]={});for(e in f&&(r=n),r)o=((i=!c&&l&&l[e]!==Jt)?l:r)[e],u=s&&i?b(o,v):a&&"function"==typeof o?b(Function.call,o):o,l&&d(l,e,o,t&S.U),h[e]!=o&&y(h,e,u),a&&p[e]!=o&&(p[e]=o)};v.core=g,S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128,t.exports=S},function(t,n,r){var e=r(3);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof i&&(i=r)},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n,r){var e=r(47)("wks"),i=r(37),o=r(2).Symbol,u="function"==typeof o;(t.exports=function(t){return e[t]||(e[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=e},function(t,n,r){t.exports=!r(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(21),i=Math.min;t.exports=function(t){return 0"+i+""};t.exports=function(n,t){var r={};r[n]=t(o),e(e.P+e.F*i(function(){var t=""[n]('"');return t!==t.toLowerCase()||3document.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s[a][u[r]];return s()};t.exports=Object.create||function create(t,n){var r;return null!==t?(f[a]=i(t),r=new f,f[a]=null,r[c]=t):r=s(),n===Jt?r:o(r,n)}},function(t,n,r){if(r(6)){var y=r(32),d=r(2),b=r(4),_=r(0),S=r(65),e=r(96),h=r(19),x=r(42),i=r(31),m=r(14),o=r(43),u=r(21),w=r(7),E=r(123),c=r(38),f=r(23),a=r(12),O=r(34),M=r(3),p=r(9),v=r(84),P=r(28),I=r(17),F=r(39).f,g=r(50),s=r(37),l=r(5),A=r(26),k=r(53),j=r(52),N=r(88),R=r(40),T=r(60),D=r(41),L=r(87),C=r(113),U=r(8),W=r(16),G=U.f,V=W.f,B=d.RangeError,q=d.TypeError,z=d.Uint8Array,K="ArrayBuffer",J="Shared"+K,$="BYTES_PER_ELEMENT",H="prototype",Y=Array[H],X=e.ArrayBuffer,Z=e.DataView,Q=A(0),tt=A(2),nt=A(3),rt=A(4),et=A(5),it=A(6),ot=k(!0),ut=k(!1),ct=N.values,ft=N.keys,at=N.entries,st=Y.lastIndexOf,lt=Y.reduce,ht=Y.reduceRight,pt=Y.join,vt=Y.sort,gt=Y.slice,yt=Y.toString,dt=Y.toLocaleString,bt=l("iterator"),_t=l("toStringTag"),St=s("typed_constructor"),xt=s("def_constructor"),mt=S.CONSTR,wt=S.TYPED,Et=S.VIEW,Ot="Wrong length!",Mt=A(1,function(t,n){return kt(j(t,t[xt]),n)}),Pt=b(function(){return 1===new z(new Uint16Array([1]).buffer)[0]}),It=!!z&&!!z[H].set&&b(function(){new z(1).set({})}),Ft=function(t,n){var r=u(t);if(r<0||r%n)throw B("Wrong offset!");return r},At=function(t){if(M(t)&&wt in t)return t;throw q(t+" is not a typed array!")},kt=function(t,n){if(!(M(t)&&St in t))throw q("It is not a typed array constructor!");return new t(n)},jt=function(t,n){return Nt(j(t,t[xt]),n)},Nt=function(t,n){for(var r=0,e=n.length,i=kt(t,e);r")}),d=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var r="ab".split(t);return 2===r.length&&"a"===r[0]&&"b"===r[1]}();t.exports=function(r,t,n){var e=p(r),o=!l(function(){var t={};return t[e]=function(){return 7},7!=""[r](t)}),i=o?!l(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===r&&(n.constructor={},n.constructor[g]=function(){return n}),n[e](""),!t}):Jt;if(!o||!i||"replace"===r&&!y||"split"===r&&!d){var u=/./[e],c=n(h,e,""[r],function maybeCallNative(t,n,r,e,i){return n.exec===v?o&&!i?{done:!0,value:u.call(n,r,e)}:{done:!0,value:t.call(r,n,e)}:{done:!1}}),f=c[1];a(String.prototype,r,c[0]),s(RegExp.prototype,e,2==t?function(t,n){return f.call(t,this,n)}:function(t){return f.call(t,this)})}}},function(t,n,r){var e=r(2).navigator;t.exports=e&&e.userAgent||""},function(t,n,r){var d=r(2),b=r(0),_=r(15),S=r(43),x=r(33),m=r(36),w=r(42),E=r(3),O=r(4),M=r(60),P=r(45),I=r(77);t.exports=function(e,t,n,r,i,o){var u=d[e],c=u,f=i?"set":"add",a=c&&c.prototype,s={},l=function(t){var r=a[t];_(a,t,"delete"==t?function(t){return!(o&&!E(t))&&r.call(this,0===t?0:t)}:"has"==t?function has(t){return!(o&&!E(t))&&r.call(this,0===t?0:t)}:"get"==t?function get(t){return o&&!E(t)?Jt:r.call(this,0===t?0:t)}:"add"==t?function add(t){return r.call(this,0===t?0:t),this}:function set(t,n){return r.call(this,0===t?0:t,n),this})};if("function"==typeof c&&(o||a.forEach&&!O(function(){(new c).entries().next()}))){var h=new c,p=h[f](o?{}:-0,1)!=h,v=O(function(){h.has(1)}),g=M(function(t){new c(t)}),y=!o&&O(function(){for(var t=new c,n=5;n--;)t[f](n,n);return!t.has(-0)});g||(((c=t(function(t,n){w(t,c,e);var r=I(new u,t,c);return n!=Jt&&m(n,i,r[f],r),r})).prototype=a).constructor=c),(v||y)&&(l("delete"),l("has"),i&&l("get")),(y||p)&&l(f),o&&a.clear&&delete a.clear}else c=r.getConstructor(t,e,i,f),S(c.prototype,n),x.NEED=!0;return P(c,e),b(b.G+b.W+b.F*((s[e]=c)!=u),s),o||r.setStrong(c,e,i),c}},function(t,n,r){for(var e,i=r(2),o=r(14),u=r(37),c=u("typed_array"),f=u("view"),a=!(!i.ArrayBuffer||!i.DataView),s=a,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(e=i[h[l++]])?(o(e.prototype,c,!0),o(e.prototype,f,!0)):s=!1;t.exports={ABV:a,CONSTR:s,TYPED:c,VIEW:f}},function(t,n,r){t.exports=r(32)||!r(4)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete r(2)[t]})},function(t,n,r){var e=r(0);t.exports=function(t){e(e.S,t,{of:function of(){for(var t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return new this(n)}})}},function(t,n,r){var e=r(0),u=r(10),c=r(19),f=r(36);t.exports=function(t){e(e.S,t,{from:function from(t){var n,r,e,i,o=arguments[1];return u(this),(n=o!==Jt)&&u(o),t==Jt?new this:(r=[],n?(e=0,i=c(o,arguments[2],2),f(t,!1,function(t){r.push(i(t,e++))})):f(t,!1,r.push,r),new this(r))}})}},function(t,n,r){var e=r(3),i=r(2).document,o=e(i)&&e(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,r){var e=r(2),i=r(13),o=r(32),u=r(99),c=r(8).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:e.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n,r){var e=r(47)("keys"),i=r(37);t.exports=function(t){return e[t]||(e[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,r){var e=r(2).document;t.exports=e&&e.documentElement},function(t,n,r){var h=r(6),p=r(27),v=r(54),g=r(49),y=r(9),d=r(48),i=Object.assign;t.exports=!i||r(4)(function(){var t={},n={},r=Symbol(),e="abcdefghijklmnopqrst";return t[r]=7,e.split("").forEach(function(t){n[t]=t}),7!=i({},t)[r]||Object.keys(i({},n)).join("")!=e})?function assign(t,n){for(var r=y(t),e=arguments.length,i=1,o=v.f,u=g.f;i>>=1)&&(n+=n))1&e&&(r+=n);return r}},function(t,n){t.exports=Math.sign||function sign(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n){var r=Math.expm1;t.exports=!r||22025.465794806718>1,s=23===n?F(2,-24)-F(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=I(t))!=t||t===M?(i=t!=t?1:0,e=f):(e=A(k(t)/j),t*(o=F(2,-e))<1&&(e--,o*=2),2<=(t+=1<=e+a?s/o:s*F(2,1-a))*o&&(e++,o/=2),f<=e+a?(i=0,e=f):1<=e+a?(i=(t*o-1)*F(2,n),e+=a):(i=t*F(2,a-1)*F(2,n),e=0));8<=n;u[l++]=255&i,i/=256,n-=8);for(e=e<>1,c=i-7,f=r-1,a=t[f--],s=127&a;for(a>>=7;0>=-c,c+=n;0>8&255]}function packI32(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function packF64(t){return packIEEE754(t,52,8)}function packF32(t){return packIEEE754(t,23,4)}function addGetter(t,n,r){g(t[S],n,{get:function(){return this[r]}})}function get(t,n,r,e){var i=p(+r);if(t[D]>24)},setUint8:function setUint8(t,n){B.call(this,t,n<<24>>24)}},!0)}else m=function ArrayBuffer(t){s(this,m,b);var n=p(t);this._b=y.call(new Array(n),0),this[D]=n},w=function DataView(t,n,r){s(this,w,_),s(t,m,_);var e=t[D],i=l(n);if(i<0||e>24},getUint8:function getUint8(t){ +return get(this,1,t)[0]},getInt16:function getInt16(t){var n=get(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function getUint16(t){var n=get(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function getInt32(t){return unpackI32(get(this,4,t,arguments[1]))},getUint32:function getUint32(t){return unpackI32(get(this,4,t,arguments[1]))>>>0},getFloat32:function getFloat32(t){return unpackIEEE754(get(this,4,t,arguments[1]),23,4)},getFloat64:function getFloat64(t){return unpackIEEE754(get(this,8,t,arguments[1]),52,8)},setInt8:function setInt8(t,n){set(this,1,t,packI8,n)},setUint8:function setUint8(t,n){set(this,1,t,packI8,n)},setInt16:function setInt16(t,n){set(this,2,t,packI16,n,arguments[2])},setUint16:function setUint16(t,n){set(this,2,t,packI16,n,arguments[2])},setInt32:function setInt32(t,n){set(this,4,t,packI32,n,arguments[2])},setUint32:function setUint32(t,n){set(this,4,t,packI32,n,arguments[2])},setFloat32:function setFloat32(t,n){set(this,4,t,packF32,n,arguments[2])},setFloat64:function setFloat64(t,n){set(this,8,t,packF64,n,arguments[2])}});d(m,b),d(w,_),c(w[S],u.VIEW,!0),n[b]=m,n[_]=w},function(t,n){t.exports=function(n,r){var e=r===Object(r)?function(t){return r[t]}:r;return function(t){return String(t).replace(n,e)}}},function(t,n,r){t.exports=!r(6)&&!r(4)(function(){return 7!=Object.defineProperty(r(69)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){n.f=r(5)},function(t,n,r){var u=r(12),c=r(11),f=r(53)(!1),a=r(71)("IE_PROTO");t.exports=function(t,n){var r,e=c(t),i=0,o=[];for(r in e)r!=a&&u(e,r)&&o.push(r);for(;i>>0||(u.test(r)?16:10))}:e},function(t,n){t.exports=Math.log1p||function log1p(t){return-1e-8<(t=+t)&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,r){var o=r(80),e=Math.pow,u=e(2,-52),c=e(2,-23),f=e(2,127)*(2-c),a=e(2,-126);t.exports=Math.fround||function fround(t){var n,r,e=Math.abs(t),i=o(t);return e>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,r){var e=r(0),i=Math.exp;e(e.S,"Math",{cosh:function cosh(t){return(i(t=+t)+i(-t))/2}})},function(t,n,r){var e=r(0),i=r(81);e(e.S+e.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,r){var e=r(0);e(e.S,"Math",{fround:r(110)})},function(t,n,r){var e=r(0),f=Math.abs;e(e.S,"Math",{hypot:function hypot(t,n){for(var r,e,i=0,o=0,u=arguments.length,c=0;o>>16)*u+o*(r&i>>>16)<<16>>>0)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log10:function log10(t){return Math.log(t)*Math.LOG10E}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log1p:r(109)})},function(t,n,r){var e=r(0);e(e.S,"Math",{log2:function log2(t){return Math.log(t)/Math.LN2}})},function(t,n,r){var e=r(0);e(e.S,"Math",{sign:r(80)})},function(t,n,r){var e=r(0),i=r(81),o=Math.exp;e(e.S+e.F*r(4)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function sinh(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,r){var e=r(0),i=r(81),o=Math.exp;e(e.S,"Math",{tanh:function tanh(t){var n=i(t=+t),r=i(-t);return n==Infinity?1:r==Infinity?-1:(n-r)/(o(t)+o(-t))}})},function(t,n,r){var e=r(0);e(e.S,"Math",{trunc:function trunc(t){return(0>10),n%1024+56320))}return r.join("")}})},function(t,n,r){var e=r(0),u=r(11),c=r(7);e(e.S,"String",{raw:function raw(t){for(var n=u(t.raw),r=c(n.length),e=arguments.length,i=[],o=0;o]*>)/g,v=/\$([$&`']|\d\d?)/g;r(62)("replace",2,function(i,o,x,m){return[function replace(t,n){var r=i(this),e=t==Jt?Jt:t[o];return e!==Jt?e.call(t,r,n):x.call(String(r),t,n)},function(t,n){var r=m(x,t,this,n);if(r.done)return r.value;var e=w(t),i=String(this),o="function"==typeof n;o||(n=String(n));var u=e.global;if(u){var c=e.unicode;e.lastIndex=0}for(var f=[];;){var a=P(e,i);if(null===a)break;if(f.push(a),!u)break;""===String(a[0])&&(e.lastIndex=M(i,E(e.lastIndex),c))}for(var s,l="",h=0,p=0;p>>0,a=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(e=l.call(a,r))&&!(c<(i=a[v])&&(u.push(r.slice(c,e.index)),1>>0;if(0===f)return[];if(0===i.length)return null===m(c,i)?[i]:[];for(var a=0,s=0,l=[];s>>0,o=r>>>0;return(n>>>0)+(e>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,n,r){var e=r(0);e(e.S,"Math",{isubh:function isubh(t,n,r,e){var i=t>>>0,o=r>>>0;return(n>>>0)-(e>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,n,r){var e=r(0);e(e.S,"Math",{imulh:function imulh(t,n){var r=+t,e=+n,i=65535&r,o=65535&e,u=r>>16,c=e>>16,f=(u*o>>>0)+(i*o>>>16);return u*c+(f>>16)+((i*c>>>0)+(65535&f)>>16)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,n,r){var e=r(0),i=Math.PI/180;e(e.S,"Math",{radians:function radians(t){return t*i}})},function(t,n,r){var e=r(0);e(e.S,"Math",{scale:r(129)})},function(t,n,r){var e=r(0);e(e.S,"Math",{umulh:function umulh(t,n){var r=+t,e=+n,i=65535&r,o=65535&e,u=r>>>16,c=e>>>16,f=(u*o>>>0)+(i*o>>>16);return u*c+(f>>>16)+((i*c>>>0)+(65535&f)>>>16)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{signbit:function signbit(t){return(t=+t)!=t?t:0==t?1/t==Infinity:0"']/g,{"&":"&","<":"<",">":">",'"':""","'":"'"});e(e.P+e.F,"String",{escapeHTML:function escapeHTML(){return i(this)}})},function(t,n,r){var e=r(0),i=r(97)(/&(?:amp|lt|gt|quot|apos);/g,{"&":"&","<":"<",">":">",""":'"',"'":"'"});e(e.P+e.F,"String",{unescapeHTML:function unescapeHTML(){return i(this)}})}]),"undefined"!=typeof module&&module.exports?module.exports=e:"function"==typeof define&&define.amd?define(function(){return e}):i.core=e}(1,1); +//# sourceMappingURL=core.min.js.map \ No newline at end of file diff --git a/node_modules/core-js/client/core.min.js.map b/node_modules/core-js/client/core.min.js.map new file mode 100644 index 00000000..db7785dc --- /dev/null +++ b/node_modules/core-js/client/core.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["core.js"],"names":["__e","__g","undefined","modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","getDefault","getModuleExports","object","property","prototype","hasOwnProperty","p","s","global","core","hide","redefine","ctx","PROTOTYPE","$export","type","source","key","own","out","exp","IS_FORCED","F","IS_GLOBAL","G","IS_PROTO","P","IS_BIND","B","target","S","expProto","Function","U","W","R","isObject","it","TypeError","window","Math","self","exec","e","store","uid","Symbol","USE_SYMBOL","a","toInteger","min","anObject","IE8_DOM_DEFINE","toPrimitive","dP","f","O","Attributes","value","defined","IObject","version","createDesc","has","SRC","$toString","TO_STRING","TPL","split","inspectSource","val","safe","isFunction","join","String","toString","this","pIE","toIObject","gOPD","getOwnPropertyDescriptor","toObject","IE_PROTO","ObjectProto","getPrototypeOf","constructor","fails","quot","createHTML","string","tag","attribute","p1","replace","NAME","test","toLowerCase","length","aFunction","fn","that","b","apply","arguments","slice","ceil","floor","isNaN","method","arg","valueOf","KEY","toLength","asc","TYPE","$create","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","create","$this","callbackfn","res","index","result","push","$keys","enumBugKeys","keys","dPs","Empty","createDict","iframeDocument","iframe","style","display","appendChild","src","contentWindow","document","open","write","lt","close","Properties","LIBRARY","$typed","$buffer","anInstance","propertyDesc","redefineAll","toIndex","toAbsoluteIndex","classof","isArrayIter","gOPN","getIterFn","wks","createArrayMethod","createArrayIncludes","speciesConstructor","ArrayIterators","Iterators","$iterDetect","setSpecies","arrayFill","arrayCopyWithin","$DP","$GOPD","RangeError","Uint8Array","ARRAY_BUFFER","SHARED_BUFFER","BYTES_PER_ELEMENT","ArrayProto","Array","$ArrayBuffer","ArrayBuffer","$DataView","DataView","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayFind","arrayFindIndex","arrayIncludes","arrayIndexOf","arrayValues","values","arrayKeys","arrayEntries","entries","arrayLastIndexOf","lastIndexOf","arrayReduce","reduce","arrayReduceRight","reduceRight","arrayJoin","arraySort","sort","arraySlice","arrayToString","arrayToLocaleString","toLocaleString","ITERATOR","TAG","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","CONSTR","TYPED_ARRAY","TYPED","VIEW","WRONG_LENGTH","$map","allocate","LITTLE_ENDIAN","Uint16Array","buffer","FORCED_SET","set","toOffset","BYTES","offset","validate","C","speciesFromList","list","fromList","addGetter","internal","_d","$from","from","step","iterator","aLen","mapfn","mapping","iterFn","next","done","$of","of","TO_LOCALE_BUG","$toLocaleString","proto","copyWithin","start","every","fill","filter","find","predicate","findIndex","forEach","indexOf","searchElement","includes","separator","map","reverse","middle","some","comparefn","subarray","begin","end","$begin","byteOffset","$slice","$set","arrayLike","len","$iterators","isTAIndex","$getDesc","$setDesc","desc","writable","$TypedArrayPrototype$","wrapper","CLAMPED","GETTER","SETTER","TypedArray","Base","TAC","TypedArrayPrototype","addElement","data","v","round","ABV","$offset","$length","byteLength","klass","$len","iter","concat","$nativeIterator","CORRECT_ITER_NAME","$iterator","Map","shared","getOrCreateMetadataMap","targetKey","targetMetadata","keyMetadata","MetadataKey","metadataMap","MetadataValue","_","bitmap","META","setDesc","id","isExtensible","FREEZE","preventExtensions","setMeta","w","meta","NEED","fastKey","getWeak","onFreeze","cof","ARG","T","tryGet","callee","UNSCOPABLES","BREAK","RETURN","iterable","px","random","max","hiddenKeys","getOwnPropertyNames","DESCRIPTORS","SPECIES","Constructor","forbiddenField","_t","def","stat","spaces","space","ltrim","RegExp","rtrim","exporter","ALIAS","FORCE","trim","SHARED","mode","copyright","propertyIsEnumerable","getIteratorMethod","ignoreCase","multiline","unicode","sticky","D","IS_INCLUDES","el","fromIndex","getOwnPropertySymbols","isArray","pos","charCodeAt","charAt","MATCH","isRegExp","$iterCreate","setToStringTag","BUGGY","VALUES","returnThis","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","descriptor","SAFE_CLOSING","riter","skipClosing","arr","builtinExec","regexpExec","REPLACE_SUPPORTS_NAMED_GROUPS","re","groups","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","originalExec","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","fns","maybeCallNative","nativeMethod","regexp","str","arg2","forceStringMethod","rxfn","navigator","userAgent","forOf","inheritIfRequired","common","IS_WEAK","ADDER","fixMethod","add","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","clear","getConstructor","setStrong","Typed","TypedArrayConstructors","K","__defineSetter__","COLLECTION","A","cb","mapFn","nextItem","is","createElement","wksExt","$Symbol","documentElement","getKeys","gOPS","$assign","assign","k","getSymbols","isEnum","j","check","setPrototypeOf","buggy","__proto__","args","un","repeat","count","Infinity","sign","x","$expm1","expm1","searchString","$defineProperty","original","endPos","addToUnscopables","iterated","_i","_k","Arguments","re1","re2","regexpFlags","nativeExec","nativeReplace","patchedExec","LAST_INDEX","UPDATES_LAST_INDEX_WRONG","NPCG_INCLUDED","lastIndex","reCopy","match","at","defer","channel","port","invoke","html","cel","process","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","Dispatch","counter","queue","ONREADYSTATECHANGE","run","listener","event","nextTick","now","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","macrotask","Observer","MutationObserver","WebKitMutationObserver","Promise","isNode","head","last","notify","flush","parent","domain","exit","enter","standalone","resolve","promise","then","toggle","node","createTextNode","observe","characterData","task","PromiseCapability","reject","$$resolve","$$reject","Reflect","ownKeys","DATA_VIEW","WRONG_INDEX","BaseBuffer","abs","pow","log","LN2","BYTE_LENGTH","BYTE_OFFSET","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","NaN","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","view","isLittleEndian","intIndex","pack","_b","conversion","ArrayBufferProto","$setInt8","setInt8","getInt8","setUint8","bufferLength","getUint8","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","regExp","replacer","part","names","defineProperties","windowNames","getWindowNames","y","factories","bind","partArgs","bound","construct","msg","isInteger","isFinite","$parseFloat","parseFloat","$trim","$parseInt","parseInt","ws","hex","radix","log1p","EPSILON","EPSILON32","MAX32","MIN32","fround","$abs","$sign","ret","memo","isRight","to","inc","forced","flags","newPromiseCapability","promiseCapability","strong","entry","getEntry","$iterDefine","SIZE","_f","_l","r","delete","prev","Set","InternalMap","each","weak","NATIVE_WEAK_MAP","IS_IE11","ActiveXObject","WEAK_MAP","uncaughtFrozenStore","ufstore","WeakMap","$WeakMap","$has","UncaughtFrozenStore","findUncaughtFrozen","splice","number","IS_CONCAT_SPREADABLE","flattenIntoArray","sourceLen","depth","mapper","thisArg","element","spreadable","targetIndex","sourceIndex","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","isEntries","toJSON","scale","inLow","inHigh","outLow","outHigh","isIterable","path","pargs","holder","define","mixin","$fails","wksDefine","enumKeys","_create","gOPNExt","$GOPS","$JSON","JSON","_stringify","stringify","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","protoDesc","wrap","sym","isSymbol","$defineProperties","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","es6Symbols","wellKnownSymbols","for","keyFor","useSetter","useSimple","FAILS_ON_PRIMITIVES","$replacer","symbols","$getPrototypeOf","$freeze","freeze","$seal","seal","$preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","FProto","nameRE","HAS_INSTANCE","FunctionProto","NUMBER","$Number","BROKEN_COF","TRIM","toNumber","argument","third","maxCode","first","code","digits","Number","aNumberValue","$toFixed","toFixed","ERROR","multiply","c2","divide","numToString","t","acc","fractionDigits","z","x2","$toPrecision","toPrecision","precision","_isFinite","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","sqrt","$acosh","acosh","MAX_VALUE","$asinh","asinh","$atanh","atanh","cbrt","clz32","LOG2E","cosh","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LOG10E","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","raw","callSite","tpl","$at","codePointAt","context","ENDS_WITH","$endsWith","endsWith","endPosition","search","INCLUDES","STARTS_WITH","$startsWith","startsWith","point","anchor","big","blink","bold","fixed","fontcolor","color","fontsize","size","italics","link","url","small","strike","sub","sup","createProperty","upTo","cloned","$sort","$forEach","STRICT","$filter","$some","$every","$reduce","$indexOf","NEGATIVE_ZERO","$find","$flags","$RegExp","CORRECT_NEW","tiRE","piRE","fiU","proxy","advanceStringIndex","regExpExec","$match","rx","fullUnicode","matchStr","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","REPLACE","$replace","searchValue","replaceValue","functionalReplace","results","accumulatedResult","nextSourcePosition","matched","position","captures","namedCaptures","replacerArgs","replacement","getSubstitution","tailPos","ch","capture","sameValue","SEARCH","$search","previousLastIndex","callRegExpExec","$min","$push","$SPLIT","LENGTH","MAX_UINT32","SUPPORTS_Y","SPLIT","$split","internalSplit","limit","lastLength","output","lastLastIndex","splitLimit","separatorCopy","splitter","unicodeMatching","lim","q","Internal","newGenericPromiseCapability","OwnPromiseCapability","Wrapper","microtask","newPromiseCapabilityModule","perform","promiseResolve","PROMISE","versions","v8","$Promise","empty","FakePromise","PromiseRejectionEvent","isThenable","isReject","_n","chain","_c","_v","ok","_s","reaction","exited","handler","fail","_h","onHandleUnhandled","onUnhandled","console","unhandled","isUnhandled","emit","onunhandledrejection","reason","error","_a","onrejectionhandled","$reject","_w","$resolve","executor","err","onFulfilled","onRejected","catch","capability","all","remaining","$index","alreadyCalled","race","WEAK_SET","WeakSet","rApply","fApply","thisArgument","argumentsList","L","rConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","propertyKey","attributes","deleteProperty","Enumerate","enumerate","receiver","getProto","V","existingDescriptor","ownDesc","setProto","Date","getTime","toISOString","pv","$toISOString","lz","num","getUTCFullYear","getUTCMilliseconds","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","DateProto","INVALID_DATE","hint","$isView","isView","fin","viewS","viewT","init","Int8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint32Array","Float32Array","Float64Array","$includes","arraySpeciesCreate","flatMap","flatten","depthArg","$pad","WEBKIT_BUG","padStart","padEnd","trimLeft","trimRight","getFlags","RegExpProto","$RegExpStringIterator","_r","matchAll","getOwnPropertyDescriptors","getDesc","$values","__defineGetter__","__lookupGetter__","__lookupSetter__","isError","clamp","lower","upper","DEG_PER_RAD","PI","RAD_PER_DEG","degrees","radians","fscale","iaddh","x0","x1","y0","y1","$x0","$y0","isubh","imulh","u","$u","$v","u0","v0","u1","v1","umulh","signbit","finally","onFinally","try","metadata","toMetaKey","ordinaryDefineOwnMetadata","defineMetadata","metadataKey","metadataValue","deleteMetadata","ordinaryHasOwnMetadata","ordinaryGetOwnMetadata","ordinaryGetMetadata","getMetadata","ordinaryOwnMetadataKeys","ordinaryMetadataKeys","oKeys","pKeys","getMetadataKeys","getOwnMetadata","getOwnMetadataKeys","ordinaryHasMetadata","hasMetadata","hasOwnMetadata","$metadata","decorator","asap","OBSERVABLE","cleanupSubscription","subscription","cleanup","subscriptionClosed","_o","closeSubscription","Subscription","observer","subscriber","SubscriptionObserver","unsubscribe","complete","$Observable","Observable","subscribe","observable","items","$task","TO_STRING_TAG","ArrayValues","DOMIterables","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","collections","explicit","Collection","MSIE","time","boundArgs","setInterval","keyOf","createDictMethod","Dict","findKey","createDictIter","DictIterator","dict","mapPairs","isDict","getIterator","partial","delay","make","$re","escape","&","<",">","\"","'","escapeHTML","&","<",">",""","'","unescapeHTML","amd"],"mappings":";;;;;;CAMC,SAASA,EAAKC,EAAKC,IACpB,cACS,SAAUC,GAET,IAAIC,EAAmB,GAGvB,SAASC,oBAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAJ,EAAQG,GAAUK,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASF,qBAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,oBAAoBO,EAAIT,EAGxBE,oBAAoBQ,EAAIT,EAGxBC,oBAAoBS,EAAI,SAASP,EAASQ,EAAMC,GAC3CX,oBAAoBY,EAAEV,EAASQ,IAClCG,OAAOC,eAAeZ,EAASQ,EAAM,CACpCK,cAAc,EACdC,YAAY,EACZC,IAAKN,KAMRX,oBAAoBkB,EAAI,SAASf,GAChC,IAAIQ,EAASR,GAAUA,EAAOgB,WAC7B,SAASC,aAAe,OAAOjB,EAAgB,YAC/C,SAASkB,mBAAqB,OAAOlB,GAEtC,OADAH,oBAAoBS,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRX,oBAAoBY,EAAI,SAASU,EAAQC,GAAY,OAAOV,OAAOW,UAAUC,eAAenB,KAAKgB,EAAQC,IAGzGvB,oBAAoB0B,EAAI,GAGjB1B,oBAAoBA,oBAAoB2B,EAAI,KA9DpD,CAiEC,CAEJ,SAAUxB,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3B8B,EAAO9B,EAAoB,IAC3B+B,EAAW/B,EAAoB,IAC/BgC,EAAMhC,EAAoB,IAC1BiC,EAAY,YAEZC,EAAU,SAAUC,EAAMzB,EAAM0B,GAClC,IAQIC,EAAKC,EAAKC,EAAKC,EARfC,EAAYN,EAAOD,EAAQQ,EAC3BC,EAAYR,EAAOD,EAAQU,EAE3BC,EAAWV,EAAOD,EAAQY,EAC1BC,EAAUZ,EAAOD,EAAQc,EACzBC,EAASN,EAAYf,EAHTO,EAAOD,EAAQgB,EAGetB,EAAOlB,KAAUkB,EAAOlB,GAAQ,KAAOkB,EAAOlB,IAAS,IAAIuB,GACrG/B,EAAUyC,EAAYd,EAAOA,EAAKnB,KAAUmB,EAAKnB,GAAQ,IACzDyC,EAAWjD,EAAQ+B,KAAe/B,EAAQ+B,GAAa,IAG3D,IAAKI,KADDM,IAAWP,EAAS1B,GACZ0B,EAIVG,IAFAD,GAAOG,GAAaQ,GAAUA,EAAOZ,KAASxC,IAEjCoD,EAASb,GAAQC,GAE9BG,EAAMO,GAAWT,EAAMN,EAAIO,EAAKX,GAAUiB,GAA0B,mBAAPN,EAAoBP,EAAIoB,SAAS9C,KAAMiC,GAAOA,EAEvGU,GAAQlB,EAASkB,EAAQZ,EAAKE,EAAKJ,EAAOD,EAAQmB,GAElDnD,EAAQmC,IAAQE,GAAKT,EAAK5B,EAASmC,EAAKG,GACxCK,GAAYM,EAASd,IAAQE,IAAKY,EAASd,GAAOE,IAG1DX,EAAOC,KAAOA,EAEdK,EAAQQ,EAAI,EACZR,EAAQU,EAAI,EACZV,EAAQgB,EAAI,EACZhB,EAAQY,EAAI,EACZZ,EAAQc,EAAI,GACZd,EAAQoB,EAAI,GACZpB,EAAQmB,EAAI,GACZnB,EAAQqB,EAAI,IACZpD,EAAOD,QAAUgC,GAKX,SAAU/B,EAAQD,EAASF,GAEjC,IAAIwD,EAAWxD,EAAoB,GACnCG,EAAOD,QAAU,SAAUuD,GACzB,IAAKD,EAASC,GAAK,MAAMC,UAAUD,EAAK,sBACxC,OAAOA,IAMH,SAAUtD,EAAQD,GAGxB,IAAI0B,EAASzB,EAAOD,QAA2B,oBAAVyD,QAAyBA,OAAOC,MAAQA,KACzED,OAAwB,oBAARE,MAAuBA,KAAKD,MAAQA,KAAOC,KAE3DT,SAAS,cAATA,GACc,iBAAPxD,IAAiBA,EAAMgC,IAK5B,SAAUzB,EAAQD,GAExBC,EAAOD,QAAU,SAAUuD,GACzB,MAAqB,iBAAPA,EAAyB,OAAPA,EAA4B,mBAAPA,IAMjD,SAAUtD,EAAQD,GAExBC,EAAOD,QAAU,SAAU4D,GACzB,IACE,QAASA,IACT,MAAOC,GACP,OAAO,KAOL,SAAU5D,EAAQD,EAASF,GAEjC,IAAIgE,EAAQhE,EAAoB,GAApBA,CAAwB,OAChCiE,EAAMjE,EAAoB,IAC1BkE,EAASlE,EAAoB,GAAGkE,OAChCC,EAA8B,mBAAVD,GAET/D,EAAOD,QAAU,SAAUQ,GACxC,OAAOsD,EAAMtD,KAAUsD,EAAMtD,GAC3ByD,GAAcD,EAAOxD,KAAUyD,EAAaD,EAASD,GAAK,UAAYvD,MAGjEsD,MAAQA,GAKX,SAAU7D,EAAQD,EAASF,GAGjCG,EAAOD,SAAWF,EAAoB,EAApBA,CAAuB,WACvC,OAA+E,GAAxEa,OAAOC,eAAe,GAAI,IAAK,CAAEG,IAAK,WAAc,OAAO,KAAQmD,KAMtE,SAAUjE,EAAQD,EAASF,GAGjC,IAAIqE,EAAYrE,EAAoB,IAChCsE,EAAMV,KAAKU,IACfnE,EAAOD,QAAU,SAAUuD,GACzB,OAAY,EAALA,EAASa,EAAID,EAAUZ,GAAK,kBAAoB,IAMnD,SAAUtD,EAAQD,EAASF,GAEjC,IAAIuE,EAAWvE,EAAoB,GAC/BwE,EAAiBxE,EAAoB,IACrCyE,EAAczE,EAAoB,IAClC0E,EAAK7D,OAAOC,eAEhBZ,EAAQyE,EAAI3E,EAAoB,GAAKa,OAAOC,eAAiB,SAASA,eAAe8D,EAAG9B,EAAG+B,GAIzF,GAHAN,EAASK,GACT9B,EAAI2B,EAAY3B,GAAG,GACnByB,EAASM,GACLL,EAAgB,IAClB,OAAOE,EAAGE,EAAG9B,EAAG+B,GAChB,MAAOd,IACT,GAAI,QAASc,GAAc,QAASA,EAAY,MAAMnB,UAAU,4BAEhE,MADI,UAAWmB,IAAYD,EAAE9B,GAAK+B,EAAWC,OACtCF,IAMH,SAAUzE,EAAQD,EAASF,GAGjC,IAAI+E,EAAU/E,EAAoB,IAClCG,EAAOD,QAAU,SAAUuD,GACzB,OAAO5C,OAAOkE,EAAQtB,MAMlB,SAAUtD,EAAQD,GAExBC,EAAOD,QAAU,SAAUuD,GACzB,GAAiB,mBAANA,EAAkB,MAAMC,UAAUD,EAAK,uBAClD,OAAOA,IAMH,SAAUtD,EAAQD,EAASF,GAGjC,IAAIgF,EAAUhF,EAAoB,IAC9B+E,EAAU/E,EAAoB,IAClCG,EAAOD,QAAU,SAAUuD,GACzB,OAAOuB,EAAQD,EAAQtB,MAMnB,SAAUtD,EAAQD,GAExB,IAAIuB,EAAiB,GAAGA,eACxBtB,EAAOD,QAAU,SAAUuD,EAAIpB,GAC7B,OAAOZ,EAAenB,KAAKmD,EAAIpB,KAM3B,SAAUlC,EAAQD,GAExB,IAAI2B,EAAO1B,EAAOD,QAAU,CAAE+E,QAAS,SACrB,iBAAPtF,IAAiBA,EAAMkC,IAK5B,SAAU1B,EAAQD,EAASF,GAEjC,IAAI0E,EAAK1E,EAAoB,GACzBkF,EAAalF,EAAoB,IACrCG,EAAOD,QAAUF,EAAoB,GAAK,SAAUsB,EAAQe,EAAKyC,GAC/D,OAAOJ,EAAGC,EAAErD,EAAQe,EAAK6C,EAAW,EAAGJ,KACrC,SAAUxD,EAAQe,EAAKyC,GAEzB,OADAxD,EAAOe,GAAOyC,EACPxD,IAMH,SAAUnB,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7B8B,EAAO9B,EAAoB,IAC3BmF,EAAMnF,EAAoB,IAC1BoF,EAAMpF,EAAoB,GAApBA,CAAwB,OAC9BqF,EAAYrF,EAAoB,KAChCsF,EAAY,WACZC,GAAO,GAAKF,GAAWG,MAAMF,GAEjCtF,EAAoB,IAAIyF,cAAgB,SAAUhC,GAChD,OAAO4B,EAAU/E,KAAKmD,KAGvBtD,EAAOD,QAAU,SAAU0E,EAAGvC,EAAKqD,EAAKC,GACvC,IAAIC,EAA2B,mBAAPF,EACpBE,IAAYT,EAAIO,EAAK,SAAW5D,EAAK4D,EAAK,OAAQrD,IAClDuC,EAAEvC,KAASqD,IACXE,IAAYT,EAAIO,EAAKN,IAAQtD,EAAK4D,EAAKN,EAAKR,EAAEvC,GAAO,GAAKuC,EAAEvC,GAAOkD,EAAIM,KAAKC,OAAOzD,MACnFuC,IAAMhD,EACRgD,EAAEvC,GAAOqD,EACCC,EAGDf,EAAEvC,GACXuC,EAAEvC,GAAOqD,EAET5D,EAAK8C,EAAGvC,EAAKqD,WALNd,EAAEvC,GACTP,EAAK8C,EAAGvC,EAAKqD,OAOdtC,SAAS5B,UAAW8D,EAAW,SAASS,WACzC,MAAsB,mBAARC,MAAsBA,KAAKZ,IAAQC,EAAU/E,KAAK0F,SAM5D,SAAU7F,EAAQD,EAASF,GAEjC,IAAIiG,EAAMjG,EAAoB,IAC1BkF,EAAalF,EAAoB,IACjCkG,EAAYlG,EAAoB,IAChCyE,EAAczE,EAAoB,IAClCmF,EAAMnF,EAAoB,IAC1BwE,EAAiBxE,EAAoB,IACrCmG,EAAOtF,OAAOuF,yBAElBlG,EAAQyE,EAAI3E,EAAoB,GAAKmG,EAAO,SAASC,yBAAyBxB,EAAG9B,GAG/E,GAFA8B,EAAIsB,EAAUtB,GACd9B,EAAI2B,EAAY3B,GAAG,GACf0B,EAAgB,IAClB,OAAO2B,EAAKvB,EAAG9B,GACf,MAAOiB,IACT,GAAIoB,EAAIP,EAAG9B,GAAI,OAAOoC,GAAYe,EAAItB,EAAErE,KAAKsE,EAAG9B,GAAI8B,EAAE9B,MAMlD,SAAU3C,EAAQD,EAASF,GAGjC,IAAImF,EAAMnF,EAAoB,IAC1BqG,EAAWrG,EAAoB,GAC/BsG,EAAWtG,EAAoB,GAApBA,CAAwB,YACnCuG,EAAc1F,OAAOW,UAEzBrB,EAAOD,QAAUW,OAAO2F,gBAAkB,SAAU5B,GAElD,OADAA,EAAIyB,EAASzB,GACTO,EAAIP,EAAG0B,GAAkB1B,EAAE0B,GACH,mBAAjB1B,EAAE6B,aAA6B7B,aAAaA,EAAE6B,YAChD7B,EAAE6B,YAAYjF,UACdoD,aAAa/D,OAAS0F,EAAc,OAMzC,SAAUpG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B0G,EAAQ1G,EAAoB,GAC5B+E,EAAU/E,EAAoB,IAC9B2G,EAAO,KAEPC,EAAa,SAAUC,EAAQC,EAAKC,EAAWjC,GACjD,IAAI5B,EAAI4C,OAAOf,EAAQ8B,IACnBG,EAAK,IAAMF,EAEf,MADkB,KAAdC,IAAkBC,GAAM,IAAMD,EAAY,KAAOjB,OAAOhB,GAAOmC,QAAQN,EAAM,UAAY,KACtFK,EAAK,IAAM9D,EAAI,KAAO4D,EAAM,KAErC3G,EAAOD,QAAU,SAAUgH,EAAMpD,GAC/B,IAAIc,EAAI,GACRA,EAAEsC,GAAQpD,EAAK8C,GACf1E,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAIgE,EAAM,WACpC,IAAIS,EAAO,GAAGD,GAAM,KACpB,OAAOC,IAASA,EAAKC,eAA0C,EAAzBD,EAAK3B,MAAM,KAAK6B,SACpD,SAAUzC,KAMV,SAAUzE,EAAQD,EAASF,GAGjC,IAAIsH,EAAYtH,EAAoB,IACpCG,EAAOD,QAAU,SAAUqH,EAAIC,EAAMH,GAEnC,GADAC,EAAUC,GACNC,IAAS3H,GAAW,OAAO0H,EAC/B,OAAQF,GACN,KAAK,EAAG,OAAO,SAAUjD,GACvB,OAAOmD,EAAGjH,KAAKkH,EAAMpD,IAEvB,KAAK,EAAG,OAAO,SAAUA,EAAGqD,GAC1B,OAAOF,EAAGjH,KAAKkH,EAAMpD,EAAGqD,IAE1B,KAAK,EAAG,OAAO,SAAUrD,EAAGqD,EAAGjH,GAC7B,OAAO+G,EAAGjH,KAAKkH,EAAMpD,EAAGqD,EAAGjH,IAG/B,OAAO,WACL,OAAO+G,EAAGG,MAAMF,EAAMG,cAOpB,SAAUxH,EAAQD,GAExB,IAAI6F,EAAW,GAAGA,SAElB5F,EAAOD,QAAU,SAAUuD,GACzB,OAAOsC,EAASzF,KAAKmD,GAAImE,MAAM,GAAI,KAM/B,SAAUzH,EAAQD,GAGxB,IAAI2H,EAAOjE,KAAKiE,KACZC,EAAQlE,KAAKkE,MACjB3H,EAAOD,QAAU,SAAUuD,GACzB,OAAOsE,MAAMtE,GAAMA,GAAM,GAAU,EAALA,EAASqE,EAAQD,GAAMpE,KAMjD,SAAUtD,EAAQD,EAASF,GAIjC,IAAI0G,EAAQ1G,EAAoB,GAEhCG,EAAOD,QAAU,SAAU8H,EAAQC,GACjC,QAASD,GAAUtB,EAAM,WAEvBuB,EAAMD,EAAO1H,KAAK,KAAM,aAA6B,GAAK0H,EAAO1H,KAAK,UAOpE,SAAUH,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAGnCG,EAAOD,QAAU,SAAUuD,EAAIP,GAC7B,IAAKM,EAASC,GAAK,OAAOA,EAC1B,IAAI8D,EAAI7B,EACR,GAAIxC,GAAkC,mBAArBqE,EAAK9D,EAAGsC,YAA4BvC,EAASkC,EAAM6B,EAAGjH,KAAKmD,IAAM,OAAOiC,EACzF,GAAgC,mBAApB6B,EAAK9D,EAAGyE,WAA2B1E,EAASkC,EAAM6B,EAAGjH,KAAKmD,IAAM,OAAOiC,EACnF,IAAKxC,GAAkC,mBAArBqE,EAAK9D,EAAGsC,YAA4BvC,EAASkC,EAAM6B,EAAGjH,KAAKmD,IAAM,OAAOiC,EAC1F,MAAMhC,UAAU,6CAMZ,SAAUvD,EAAQD,GAGxBC,EAAOD,QAAU,SAAUuD,GACzB,GAAIA,GAAM5D,GAAW,MAAM6D,UAAU,yBAA2BD,GAChE,OAAOA,IAMH,SAAUtD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B6B,EAAO7B,EAAoB,IAC3B0G,EAAQ1G,EAAoB,GAChCG,EAAOD,QAAU,SAAUiI,EAAKrE,GAC9B,IAAIyD,GAAM1F,EAAKhB,QAAU,IAAIsH,IAAQtH,OAAOsH,GACxC3F,EAAM,GACVA,EAAI2F,GAAOrE,EAAKyD,GAChBrF,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAIgE,EAAM,WAAca,EAAG,KAAQ,SAAU/E,KAMrE,SAAUrC,EAAQD,EAASF,GASjC,IAAIgC,EAAMhC,EAAoB,IAC1BgF,EAAUhF,EAAoB,IAC9BqG,EAAWrG,EAAoB,GAC/BoI,EAAWpI,EAAoB,GAC/BqI,EAAMrI,EAAoB,IAC9BG,EAAOD,QAAU,SAAUoI,EAAMC,GAC/B,IAAIC,EAAiB,GAARF,EACTG,EAAoB,GAARH,EACZI,EAAkB,GAARJ,EACVK,EAAmB,GAARL,EACXM,EAAwB,GAARN,EAChBO,EAAmB,GAARP,GAAaM,EACxBE,EAASP,GAAWF,EACxB,OAAO,SAAUU,EAAOC,EAAYxB,GAQlC,IAPA,IAMI9B,EAAKuD,EANLrE,EAAIyB,EAAS0C,GACblF,EAAOmB,EAAQJ,GACfD,EAAI3C,EAAIgH,EAAYxB,EAAM,GAC1BH,EAASe,EAASvE,EAAKwD,QACvB6B,EAAQ,EACRC,EAASX,EAASM,EAAOC,EAAO1B,GAAUoB,EAAYK,EAAOC,EAAO,GAAKlJ,GAE9DqJ,EAAT7B,EAAgB6B,IAAS,IAAIL,GAAYK,KAASrF,KAEtDoF,EAAMtE,EADNe,EAAM7B,EAAKqF,GACEA,EAAOtE,GAChB0D,GACF,GAAIE,EAAQW,EAAOD,GAASD,OACvB,GAAIA,EAAK,OAAQX,GACpB,KAAK,EAAG,OAAO,EACf,KAAK,EAAG,OAAO5C,EACf,KAAK,EAAG,OAAOwD,EACf,KAAK,EAAGC,EAAOC,KAAK1D,QACf,GAAIiD,EAAU,OAAO,EAGhC,OAAOC,GAAiB,EAAIF,GAAWC,EAAWA,EAAWQ,KAO3D,SAAUhJ,EAAQD,EAASF,GAGjC,IAAIqJ,EAAQrJ,EAAoB,KAC5BsJ,EAActJ,EAAoB,IAEtCG,EAAOD,QAAUW,OAAO0I,MAAQ,SAASA,KAAK3E,GAC5C,OAAOyE,EAAMzE,EAAG0E,KAMZ,SAAUnJ,EAAQD,EAASF,GAGjC,IAAIuE,EAAWvE,EAAoB,GAC/BwJ,EAAMxJ,EAAoB,KAC1BsJ,EAActJ,EAAoB,IAClCsG,EAAWtG,EAAoB,GAApBA,CAAwB,YACnCyJ,EAAQ,aACRxH,EAAY,YAGZyH,EAAa,WAEf,IAIIC,EAJAC,EAAS5J,EAAoB,GAApBA,CAAwB,UACjCI,EAAIkJ,EAAYjC,OAcpB,IAVAuC,EAAOC,MAAMC,QAAU,OACvB9J,EAAoB,IAAI+J,YAAYH,GACpCA,EAAOI,IAAM,eAGbL,EAAiBC,EAAOK,cAAcC,UACvBC,OACfR,EAAeS,MAAMC,uCACrBV,EAAeW,QACfZ,EAAaC,EAAejH,EACrBtC,YAAYsJ,EAAWzH,GAAWqH,EAAYlJ,IACrD,OAAOsJ,KAGTvJ,EAAOD,QAAUW,OAAOiI,QAAU,SAASA,OAAOlE,EAAG2F,GACnD,IAAIpB,EAQJ,OAPU,OAANvE,GACF6E,EAAMxH,GAAasC,EAASK,GAC5BuE,EAAS,IAAIM,EACbA,EAAMxH,GAAa,KAEnBkH,EAAO7C,GAAY1B,GACduE,EAASO,IACTa,IAAe1K,GAAYsJ,EAASK,EAAIL,EAAQoB,KAMnD,SAAUpK,EAAQD,EAASF,GAIjC,GAAIA,EAAoB,GAAI,CAC1B,IAAIwK,EAAUxK,EAAoB,IAC9B4B,EAAS5B,EAAoB,GAC7B0G,EAAQ1G,EAAoB,GAC5BkC,EAAUlC,EAAoB,GAC9ByK,EAASzK,EAAoB,IAC7B0K,EAAU1K,EAAoB,IAC9BgC,EAAMhC,EAAoB,IAC1B2K,EAAa3K,EAAoB,IACjC4K,EAAe5K,EAAoB,IACnC8B,EAAO9B,EAAoB,IAC3B6K,EAAc7K,EAAoB,IAClCqE,EAAYrE,EAAoB,IAChCoI,EAAWpI,EAAoB,GAC/B8K,EAAU9K,EAAoB,KAC9B+K,EAAkB/K,EAAoB,IACtCyE,EAAczE,EAAoB,IAClCmF,EAAMnF,EAAoB,IAC1BgL,EAAUhL,EAAoB,IAC9BwD,EAAWxD,EAAoB,GAC/BqG,EAAWrG,EAAoB,GAC/BiL,EAAcjL,EAAoB,IAClC8I,EAAS9I,EAAoB,IAC7BwG,EAAiBxG,EAAoB,IACrCkL,EAAOlL,EAAoB,IAAI2E,EAC/BwG,EAAYnL,EAAoB,IAChCiE,EAAMjE,EAAoB,IAC1BoL,EAAMpL,EAAoB,GAC1BqL,EAAoBrL,EAAoB,IACxCsL,EAAsBtL,EAAoB,IAC1CuL,EAAqBvL,EAAoB,IACzCwL,EAAiBxL,EAAoB,IACrCyL,EAAYzL,EAAoB,IAChC0L,EAAc1L,EAAoB,IAClC2L,EAAa3L,EAAoB,IACjC4L,EAAY5L,EAAoB,IAChC6L,EAAkB7L,EAAoB,KACtC8L,EAAM9L,EAAoB,GAC1B+L,EAAQ/L,EAAoB,IAC5B0E,EAAKoH,EAAInH,EACTwB,EAAO4F,EAAMpH,EACbqH,EAAapK,EAAOoK,WACpBtI,EAAY9B,EAAO8B,UACnBuI,EAAarK,EAAOqK,WACpBC,EAAe,cACfC,EAAgB,SAAWD,EAC3BE,EAAoB,oBACpBnK,EAAY,YACZoK,EAAaC,MAAMrK,GACnBsK,EAAe7B,EAAQ8B,YACvBC,EAAY/B,EAAQgC,SACpBC,EAAetB,EAAkB,GACjCuB,GAAcvB,EAAkB,GAChCwB,GAAYxB,EAAkB,GAC9ByB,GAAazB,EAAkB,GAC/B0B,GAAY1B,EAAkB,GAC9B2B,GAAiB3B,EAAkB,GACnC4B,GAAgB3B,GAAoB,GACpC4B,GAAe5B,GAAoB,GACnC6B,GAAc3B,EAAe4B,OAC7BC,GAAY7B,EAAejC,KAC3B+D,GAAe9B,EAAe+B,QAC9BC,GAAmBnB,EAAWoB,YAC9BC,GAAcrB,EAAWsB,OACzBC,GAAmBvB,EAAWwB,YAC9BC,GAAYzB,EAAWxG,KACvBkI,GAAY1B,EAAW2B,KACvBC,GAAa5B,EAAWzE,MACxBsG,GAAgB7B,EAAWtG,SAC3BoI,GAAsB9B,EAAW+B,eACjCC,GAAWjD,EAAI,YACfkD,GAAMlD,EAAI,eACVmD,GAAoBtK,EAAI,qBACxBuK,GAAkBvK,EAAI,mBACtBwK,GAAmBhE,EAAOiE,OAC1BC,GAAclE,EAAOmE,MACrBC,GAAOpE,EAAOoE,KACdC,GAAe,gBAEfC,GAAO1D,EAAkB,EAAG,SAAUzG,EAAGyC,GAC3C,OAAO2H,GAASzD,EAAmB3G,EAAGA,EAAE4J,KAAmBnH,KAGzD4H,GAAgBvI,EAAM,WAExB,OAA0D,IAAnD,IAAIuF,EAAW,IAAIiD,YAAY,CAAC,IAAIC,QAAQ,KAGjDC,KAAenD,KAAgBA,EAAWhK,GAAWoN,KAAO3I,EAAM,WACpE,IAAIuF,EAAW,GAAGoD,IAAI,MAGpBC,GAAW,SAAU7L,EAAI8L,GAC3B,IAAIC,EAASnL,EAAUZ,GACvB,GAAI+L,EAAS,GAAKA,EAASD,EAAO,MAAMvD,EAAW,iBACnD,OAAOwD,GAGLC,GAAW,SAAUhM,GACvB,GAAID,EAASC,IAAOkL,MAAelL,EAAI,OAAOA,EAC9C,MAAMC,EAAUD,EAAK,2BAGnBuL,GAAW,SAAUU,EAAGrI,GAC1B,KAAM7D,EAASkM,IAAMnB,MAAqBmB,GACxC,MAAMhM,EAAU,wCAChB,OAAO,IAAIgM,EAAErI,IAGbsI,GAAkB,SAAU/K,EAAGgL,GACjC,OAAOC,GAAStE,EAAmB3G,EAAGA,EAAE4J,KAAmBoB,IAGzDC,GAAW,SAAUH,EAAGE,GAI1B,IAHA,IAAI1G,EAAQ,EACR7B,EAASuI,EAAKvI,OACd8B,EAAS6F,GAASU,EAAGrI,GACT6B,EAAT7B,GAAgB8B,EAAOD,GAAS0G,EAAK1G,KAC5C,OAAOC,GAGL2G,GAAY,SAAUrM,EAAIpB,EAAK0N,GACjCrL,EAAGjB,EAAIpB,EAAK,CAAEpB,IAAK,WAAc,OAAO+E,KAAKgK,GAAGD,OAG9CE,GAAQ,SAASC,KAAK9N,GACxB,IAKIhC,EAAGiH,EAAQ+F,EAAQjE,EAAQgH,EAAMC,EALjCxL,EAAIyB,EAASjE,GACbiO,EAAO1I,UAAUN,OACjBiJ,EAAe,EAAPD,EAAW1I,UAAU,GAAK9H,GAClC0Q,EAAUD,IAAUzQ,GACpB2Q,EAASrF,EAAUvG,GAEvB,GAAI4L,GAAU3Q,KAAcoL,EAAYuF,GAAS,CAC/C,IAAKJ,EAAWI,EAAOlQ,KAAKsE,GAAIwI,EAAS,GAAIhN,EAAI,IAAK+P,EAAOC,EAASK,QAAQC,KAAMtQ,IAClFgN,EAAOhE,KAAK+G,EAAKrL,OACjBF,EAAIwI,EAGR,IADImD,GAAkB,EAAPF,IAAUC,EAAQtO,EAAIsO,EAAO3I,UAAU,GAAI,IACrDvH,EAAI,EAAGiH,EAASe,EAASxD,EAAEyC,QAAS8B,EAAS6F,GAAShJ,KAAMqB,GAAkBjH,EAATiH,EAAYjH,IACpF+I,EAAO/I,GAAKmQ,EAAUD,EAAM1L,EAAExE,GAAIA,GAAKwE,EAAExE,GAE3C,OAAO+I,GAGLwH,GAAM,SAASC,KAIjB,IAHA,IAAI1H,EAAQ,EACR7B,EAASM,UAAUN,OACnB8B,EAAS6F,GAAShJ,KAAMqB,GACZ6B,EAAT7B,GAAgB8B,EAAOD,GAASvB,UAAUuB,KACjD,OAAOC,GAIL0H,KAAkB5E,GAAcvF,EAAM,WAAcyH,GAAoB7N,KAAK,IAAI2L,EAAW,MAE5F6E,GAAkB,SAAS1C,iBAC7B,OAAOD,GAAoBzG,MAAMmJ,GAAgB5C,GAAW3N,KAAKmP,GAASzJ,OAASyJ,GAASzJ,MAAO2B,YAGjGoJ,GAAQ,CACVC,WAAY,SAASA,WAAW/N,EAAQgO,GACtC,OAAOpF,EAAgBvL,KAAKmP,GAASzJ,MAAO/C,EAAQgO,EAA0B,EAAnBtJ,UAAUN,OAAaM,UAAU,GAAK9H,KAEnGqR,MAAO,SAASA,MAAMlI,GACpB,OAAO8D,GAAW2C,GAASzJ,MAAOgD,EAA+B,EAAnBrB,UAAUN,OAAaM,UAAU,GAAK9H,KAEtFsR,KAAM,SAASA,KAAKrM,GAClB,OAAO8G,EAAUlE,MAAM+H,GAASzJ,MAAO2B,YAEzCyJ,OAAQ,SAASA,OAAOpI,GACtB,OAAO2G,GAAgB3J,KAAM4G,GAAY6C,GAASzJ,MAAOgD,EACpC,EAAnBrB,UAAUN,OAAaM,UAAU,GAAK9H,MAE1CwR,KAAM,SAASA,KAAKC,GAClB,OAAOvE,GAAU0C,GAASzJ,MAAOsL,EAA8B,EAAnB3J,UAAUN,OAAaM,UAAU,GAAK9H,KAEpF0R,UAAW,SAASA,UAAUD,GAC5B,OAAOtE,GAAeyC,GAASzJ,MAAOsL,EAA8B,EAAnB3J,UAAUN,OAAaM,UAAU,GAAK9H,KAEzF2R,QAAS,SAASA,QAAQxI,GACxB2D,EAAa8C,GAASzJ,MAAOgD,EAA+B,EAAnBrB,UAAUN,OAAaM,UAAU,GAAK9H,KAEjF4R,QAAS,SAASA,QAAQC,GACxB,OAAOxE,GAAauC,GAASzJ,MAAO0L,EAAkC,EAAnB/J,UAAUN,OAAaM,UAAU,GAAK9H,KAE3F8R,SAAU,SAASA,SAASD,GAC1B,OAAOzE,GAAcwC,GAASzJ,MAAO0L,EAAkC,EAAnB/J,UAAUN,OAAaM,UAAU,GAAK9H,KAE5FgG,KAAM,SAASA,KAAK+L,GAClB,OAAO9D,GAAUpG,MAAM+H,GAASzJ,MAAO2B,YAEzC8F,YAAa,SAASA,YAAYiE,GAChC,OAAOlE,GAAiB9F,MAAM+H,GAASzJ,MAAO2B,YAEhDkK,IAAK,SAASA,IAAIvB,GAChB,OAAOvB,GAAKU,GAASzJ,MAAOsK,EAA0B,EAAnB3I,UAAUN,OAAaM,UAAU,GAAK9H,KAE3E8N,OAAQ,SAASA,OAAO3E,GACtB,OAAO0E,GAAYhG,MAAM+H,GAASzJ,MAAO2B,YAE3CkG,YAAa,SAASA,YAAY7E,GAChC,OAAO4E,GAAiBlG,MAAM+H,GAASzJ,MAAO2B,YAEhDmK,QAAS,SAASA,UAMhB,IALA,IAIIhN,EAJA0C,EAAOxB,KACPqB,EAASoI,GAASjI,GAAMH,OACxB0K,EAASnO,KAAKkE,MAAMT,EAAS,GAC7B6B,EAAQ,EAELA,EAAQ6I,GACbjN,EAAQ0C,EAAK0B,GACb1B,EAAK0B,KAAW1B,IAAOH,GACvBG,EAAKH,GAAUvC,EACf,OAAO0C,GAEXwK,KAAM,SAASA,KAAKhJ,GAClB,OAAO6D,GAAU4C,GAASzJ,MAAOgD,EAA+B,EAAnBrB,UAAUN,OAAaM,UAAU,GAAK9H,KAErFmO,KAAM,SAASA,KAAKiE,GAClB,OAAOlE,GAAUzN,KAAKmP,GAASzJ,MAAOiM,IAExCC,SAAU,SAASA,SAASC,EAAOC,GACjC,IAAIxN,EAAI6K,GAASzJ,MACbqB,EAASzC,EAAEyC,OACXgL,EAAStH,EAAgBoH,EAAO9K,GACpC,OAAO,IAAKkE,EAAmB3G,EAAGA,EAAE4J,KAA7B,CACL5J,EAAEuK,OACFvK,EAAE0N,WAAaD,EAASzN,EAAEwH,kBAC1BhE,GAAUgK,IAAQvS,GAAYwH,EAAS0D,EAAgBqH,EAAK/K,IAAWgL,MAKzEE,GAAS,SAAS3K,MAAMqJ,EAAOmB,GACjC,OAAOzC,GAAgB3J,KAAMiI,GAAW3N,KAAKmP,GAASzJ,MAAOiL,EAAOmB,KAGlEI,GAAO,SAASnD,IAAIoD,GACtBhD,GAASzJ,MACT,IAAIwJ,EAASF,GAAS3H,UAAU,GAAI,GAChCN,EAASrB,KAAKqB,OACd2C,EAAM3D,EAASoM,GACfC,EAAMtK,EAAS4B,EAAI3C,QACnB6B,EAAQ,EACZ,GAAmB7B,EAAfqL,EAAMlD,EAAiB,MAAMxD,EAAW8C,IAC5C,KAAO5F,EAAQwJ,GAAK1M,KAAKwJ,EAAStG,GAASc,EAAId,MAG7CyJ,GAAa,CACfpF,QAAS,SAASA,UAChB,OAAOD,GAAahN,KAAKmP,GAASzJ,QAEpCuD,KAAM,SAASA,OACb,OAAO8D,GAAU/M,KAAKmP,GAASzJ,QAEjCoH,OAAQ,SAASA,SACf,OAAOD,GAAY7M,KAAKmP,GAASzJ,SAIjC4M,GAAY,SAAU3P,EAAQZ,GAChC,OAAOmB,EAASP,IACXA,EAAO0L,KACO,iBAAPtM,GACPA,KAAOY,GACP6C,QAAQzD,IAAQyD,OAAOzD,IAE1BwQ,GAAW,SAASzM,yBAAyBnD,EAAQZ,GACvD,OAAOuQ,GAAU3P,EAAQZ,EAAMoC,EAAYpC,GAAK,IAC5CuI,EAAa,EAAG3H,EAAOZ,IACvB8D,EAAKlD,EAAQZ,IAEfyQ,GAAW,SAAShS,eAAemC,EAAQZ,EAAK0Q,GAClD,QAAIH,GAAU3P,EAAQZ,EAAMoC,EAAYpC,GAAK,KACxCmB,EAASuP,IACT5N,EAAI4N,EAAM,WACT5N,EAAI4N,EAAM,QACV5N,EAAI4N,EAAM,QAEVA,EAAKhS,cACJoE,EAAI4N,EAAM,cAAeA,EAAKC,UAC9B7N,EAAI4N,EAAM,gBAAiBA,EAAK/R,WAI9B0D,EAAGzB,EAAQZ,EAAK0Q,IAFvB9P,EAAOZ,GAAO0Q,EAAKjO,MACZ7B,IAINwL,KACH1C,EAAMpH,EAAIkO,GACV/G,EAAInH,EAAImO,IAGV5Q,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK+L,GAAkB,SAAU,CAC3DrI,yBAA0ByM,GAC1B/R,eAAgBgS,KAGdpM,EAAM,WAAcwH,GAAc5N,KAAK,QACzC4N,GAAgBC,GAAsB,SAASpI,WAC7C,OAAO+H,GAAUxN,KAAK0F,QAI1B,IAAIiN,GAAwBpI,EAAY,GAAIkG,IAC5ClG,EAAYoI,GAAuBN,IACnC7Q,EAAKmR,GAAuB5E,GAAUsE,GAAWvF,QACjDvC,EAAYoI,GAAuB,CACjCrL,MAAO2K,GACPlD,IAAKmD,GACL/L,YAAa,aACbV,SAAUmI,GACVE,eAAgB0C,KAElBhB,GAAUmD,GAAuB,SAAU,KAC3CnD,GAAUmD,GAAuB,aAAc,KAC/CnD,GAAUmD,GAAuB,aAAc,KAC/CnD,GAAUmD,GAAuB,SAAU,KAC3CvO,EAAGuO,GAAuB3E,GAAK,CAC7BrN,IAAK,WAAc,OAAO+E,KAAK2I,OAIjCxO,EAAOD,QAAU,SAAUiI,EAAKoH,EAAO2D,EAASC,GAE9C,IAAIjM,EAAOiB,IADXgL,IAAYA,GACgB,UAAY,IAAM,QAC1CC,EAAS,MAAQjL,EACjBkL,EAAS,MAAQlL,EACjBmL,EAAa1R,EAAOsF,GACpBqM,EAAOD,GAAc,GACrBE,EAAMF,GAAc9M,EAAe8M,GAEnC1O,EAAI,GACJ6O,EAAsBH,GAAcA,EAAWrR,GAU/CyR,EAAa,SAAUlM,EAAM0B,GAC/BxE,EAAG8C,EAAM0B,EAAO,CACdjI,IAAK,WACH,OAXA0S,EAWc3N,KAXFgK,IACJ4D,EAAER,GAUUlK,EAVMqG,EAAQoE,EAAK/S,EAAGqO,IAFnC,IACP0E,GAaFtE,IAAK,SAAUvK,GACb,OAXuBoE,EAWHA,EAXUpE,EAWHA,EAV3B6O,EAUc3N,KAVFgK,GACZmD,IAASrO,GAASA,EAAQlB,KAAKiQ,MAAM/O,IAAU,EAAI,EAAY,IAARA,EAAe,IAAe,IAARA,QACjF6O,EAAKC,EAAEP,GAAQnK,EAAQqG,EAAQoE,EAAK/S,EAAGkE,EAAOmK,IAHnC,IAAgB/F,EAAOpE,EAC9B6O,GAYF3S,YAAY,MApBFsS,IAAe7I,EAAOqJ,KAwBlCR,EAAaJ,EAAQ,SAAU1L,EAAMmM,EAAMI,EAASC,GAClDrJ,EAAWnD,EAAM8L,EAAYpM,EAAM,MACnC,IAEIiI,EAAQ8E,EAAY5M,EAAQ6M,EAF5BhL,EAAQ,EACRsG,EAAS,EAEb,GAAKhM,EAASmQ,GAIP,CAAA,KAAIA,aAAgBpH,IAAiB2H,EAAQlJ,EAAQ2I,KAAUzH,GAAgBgI,GAAS/H,GAaxF,OAAIwC,MAAegF,EACjB9D,GAASyD,EAAYK,GAErB1D,GAAM3P,KAAKgT,EAAYK,GAf9BxE,EAASwE,EACTnE,EAASF,GAASyE,EAASxE,GAC3B,IAAI4E,EAAOR,EAAKM,WAChB,GAAID,IAAYnU,GAAW,CACzB,GAAIsU,EAAO5E,EAAO,MAAMvD,EAAW8C,IAEnC,IADAmF,EAAaE,EAAO3E,GACH,EAAG,MAAMxD,EAAW8C,SAGrC,GAA0BqF,GAD1BF,EAAa7L,EAAS4L,GAAWzE,GAChBC,EAAe,MAAMxD,EAAW8C,IAEnDzH,EAAS4M,EAAa1E,OAftBlI,EAASyD,EAAQ6I,GAEjBxE,EAAS,IAAI5C,EADb0H,EAAa5M,EAASkI,GA2BxB,IAPAzN,EAAK0F,EAAM,KAAM,CACfC,EAAG0H,EACHvO,EAAG4O,EACHnP,EAAG4T,EACHlQ,EAAGsD,EACHuM,EAAG,IAAInH,EAAU0C,KAEZjG,EAAQ7B,GAAQqM,EAAWlM,EAAM0B,OAE1CuK,EAAsBH,EAAWrR,GAAa6G,EAAOmK,IACrDnR,EAAK2R,EAAqB,cAAeH,IAC/B5M,EAAM,WAChB4M,EAAW,MACN5M,EAAM,WACX,IAAI4M,GAAY,MACX5H,EAAY,SAAU0I,GAC3B,IAAId,EACJ,IAAIA,EAAW,MACf,IAAIA,EAAW,KACf,IAAIA,EAAWc,KACd,KACDd,EAAaJ,EAAQ,SAAU1L,EAAMmM,EAAMI,EAASC,GAElD,IAAIE,EAGJ,OAJAvJ,EAAWnD,EAAM8L,EAAYpM,GAIxB1D,EAASmQ,GACVA,aAAgBpH,IAAiB2H,EAAQlJ,EAAQ2I,KAAUzH,GAAgBgI,GAAS/H,EAC/E6H,IAAYnU,GACf,IAAI0T,EAAKI,EAAMrE,GAASyE,EAASxE,GAAQyE,GACzCD,IAAYlU,GACV,IAAI0T,EAAKI,EAAMrE,GAASyE,EAASxE,IACjC,IAAIgE,EAAKI,GAEbhF,MAAegF,EAAa9D,GAASyD,EAAYK,GAC9C1D,GAAM3P,KAAKgT,EAAYK,GATF,IAAIJ,EAAKzI,EAAQ6I,MAW/ChH,EAAa6G,IAAQpQ,SAAS5B,UAAY0J,EAAKqI,GAAMc,OAAOnJ,EAAKsI,IAAQtI,EAAKqI,GAAO,SAAUlR,GACvFA,KAAOiR,GAAaxR,EAAKwR,EAAYjR,EAAKkR,EAAKlR,MAEvDiR,EAAWrR,GAAawR,EACnBjJ,IAASiJ,EAAoBhN,YAAc6M,IAElD,IAAIgB,EAAkBb,EAAoBpF,IACtCkG,IAAsBD,IACI,UAAxBA,EAAgB5T,MAAoB4T,EAAgB5T,MAAQb,IAC9D2U,EAAY7B,GAAWvF,OAC3BtL,EAAKwR,EAAY/E,IAAmB,GACpCzM,EAAK2R,EAAqB9E,GAAazH,GACvCpF,EAAK2R,EAAqB5E,IAAM,GAChC/M,EAAK2R,EAAqBjF,GAAiB8E,IAEvCH,EAAU,IAAIG,EAAW,GAAGhF,KAAQpH,EAASoH,MAAOmF,IACtD/O,EAAG+O,EAAqBnF,GAAK,CAC3BrN,IAAK,WAAc,OAAOiG,KAM9BhF,EAAQA,EAAQU,EAAIV,EAAQoB,EAAIpB,EAAQQ,IAFxCkC,EAAEsC,GAAQoM,IAEiDC,GAAO3O,GAElE1C,EAAQA,EAAQgB,EAAGgE,EAAM,CACvBkF,kBAAmBmD,IAGrBrN,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAIgE,EAAM,WAAc6M,EAAK3C,GAAGtQ,KAAKgT,EAAY,KAAQpM,EAAM,CACzFgJ,KAAMD,GACNW,GAAID,KAGAvE,KAAqBqH,GAAsB3R,EAAK2R,EAAqBrH,EAAmBmD,GAE9FrN,EAAQA,EAAQY,EAAGoE,EAAM6J,IAEzBpF,EAAWzE,GAEXhF,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAI0M,GAAYlI,EAAM,CAAEmI,IAAKmD,KAEzDtQ,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK6R,EAAmBrN,EAAMyL,IAErDnI,GAAWiJ,EAAoB1N,UAAYmI,KAAeuF,EAAoB1N,SAAWmI,IAE9FhM,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAIgE,EAAM,WACpC,IAAI4M,EAAW,GAAG1L,UAChBV,EAAM,CAAEU,MAAO2K,KAEnBrQ,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAKgE,EAAM,WACrC,MAAO,CAAC,EAAG,GAAG0H,kBAAoB,IAAIkF,EAAW,CAAC,EAAG,IAAIlF,qBACpD1H,EAAM,WACX+M,EAAoBrF,eAAe9N,KAAK,CAAC,EAAG,OACzC4G,EAAM,CAAEkH,eAAgB0C,KAE7BrF,EAAUvE,GAAQqN,EAAoBD,EAAkBE,EACnDhK,GAAY+J,GAAmBzS,EAAK2R,EAAqBpF,GAAUmG,SAErErU,EAAOD,QAAU,cAKlB,SAAUC,EAAQD,EAASF,GAEjC,IAAIyU,EAAMzU,EAAoB,KAC1BkC,EAAUlC,EAAoB,GAC9B0U,EAAS1U,EAAoB,GAApBA,CAAwB,YACjCgE,EAAQ0Q,EAAO1Q,QAAU0Q,EAAO1Q,MAAQ,IAAKhE,EAAoB,OAEjE2U,EAAyB,SAAU1R,EAAQ2R,EAAW9L,GACxD,IAAI+L,EAAiB7Q,EAAM/C,IAAIgC,GAC/B,IAAK4R,EAAgB,CACnB,IAAK/L,EAAQ,OAAOjJ,GACpBmE,EAAMqL,IAAIpM,EAAQ4R,EAAiB,IAAIJ,GAEzC,IAAIK,EAAcD,EAAe5T,IAAI2T,GACrC,IAAKE,EAAa,CAChB,IAAKhM,EAAQ,OAAOjJ,GACpBgV,EAAexF,IAAIuF,EAAWE,EAAc,IAAIL,GAChD,OAAOK,GA0BX3U,EAAOD,QAAU,CACf8D,MAAOA,EACP6N,IAAK8C,EACLxP,IA3B2B,SAAU4P,EAAanQ,EAAG9B,GACrD,IAAIkS,EAAcL,EAAuB/P,EAAG9B,GAAG,GAC/C,OAAOkS,IAAgBnV,IAAoBmV,EAAY7P,IAAI4P,IA0B3D9T,IAxB2B,SAAU8T,EAAanQ,EAAG9B,GACrD,IAAIkS,EAAcL,EAAuB/P,EAAG9B,GAAG,GAC/C,OAAOkS,IAAgBnV,GAAYA,GAAYmV,EAAY/T,IAAI8T,IAuB/D1F,IArB8B,SAAU0F,EAAaE,EAAerQ,EAAG9B,GACvE6R,EAAuB/P,EAAG9B,GAAG,GAAMuM,IAAI0F,EAAaE,IAqBpD1L,KAnB4B,SAAUtG,EAAQ2R,GAC9C,IAAII,EAAcL,EAAuB1R,EAAQ2R,GAAW,GACxDrL,EAAO,GAEX,OADIyL,GAAaA,EAAYxD,QAAQ,SAAU0D,EAAG7S,GAAOkH,EAAKH,KAAK/G,KAC5DkH,GAgBPlH,IAdc,SAAUoB,GACxB,OAAOA,IAAO5D,IAA0B,iBAAN4D,EAAiBA,EAAKqC,OAAOrC,IAc/DjB,IAZQ,SAAUoC,GAClB1C,EAAQA,EAAQgB,EAAG,UAAW0B,MAiB1B,SAAUzE,EAAQD,GAExBC,EAAOD,QAAU,SAAUiV,EAAQrQ,GACjC,MAAO,CACL9D,aAAuB,EAATmU,GACdpU,eAAyB,EAAToU,GAChBnC,WAAqB,EAATmC,GACZrQ,MAAOA,KAOL,SAAU3E,EAAQD,GAExBC,EAAOD,SAAU,GAKX,SAAUC,EAAQD,EAASF,GAEjC,IAAIoV,EAAOpV,EAAoB,GAApBA,CAAwB,QAC/BwD,EAAWxD,EAAoB,GAC/BmF,EAAMnF,EAAoB,IAC1BqV,EAAUrV,EAAoB,GAAG2E,EACjC2Q,EAAK,EACLC,EAAe1U,OAAO0U,cAAgB,WACxC,OAAO,GAELC,GAAUxV,EAAoB,EAApBA,CAAuB,WACnC,OAAOuV,EAAa1U,OAAO4U,kBAAkB,OAE3CC,EAAU,SAAUjS,GACtB4R,EAAQ5R,EAAI2R,EAAM,CAAEtQ,MAAO,CACzB1E,EAAG,OAAQkV,EACXK,EAAG,OAgCHC,EAAOzV,EAAOD,QAAU,CAC1BiI,IAAKiN,EACLS,MAAM,EACNC,QAhCY,SAAUrS,EAAIqF,GAE1B,IAAKtF,EAASC,GAAK,MAAoB,iBAANA,EAAiBA,GAAmB,iBAANA,EAAiB,IAAM,KAAOA,EAC7F,IAAK0B,EAAI1B,EAAI2R,GAAO,CAElB,IAAKG,EAAa9R,GAAK,MAAO,IAE9B,IAAKqF,EAAQ,MAAO,IAEpB4M,EAAQjS,GAER,OAAOA,EAAG2R,GAAMhV,GAsBlB2V,QApBY,SAAUtS,EAAIqF,GAC1B,IAAK3D,EAAI1B,EAAI2R,GAAO,CAElB,IAAKG,EAAa9R,GAAK,OAAO,EAE9B,IAAKqF,EAAQ,OAAO,EAEpB4M,EAAQjS,GAER,OAAOA,EAAG2R,GAAMO,GAYlBK,SATa,SAAUvS,GAEvB,OADI+R,GAAUI,EAAKC,MAAQN,EAAa9R,KAAQ0B,EAAI1B,EAAI2R,IAAOM,EAAQjS,GAChEA,KAaH,SAAUtD,EAAQD,EAASF,GAGjC,IAAIiW,EAAMjW,EAAoB,IAC1BsO,EAAMtO,EAAoB,EAApBA,CAAuB,eAE7BkW,EAAkD,aAA5CD,EAAI,WAAc,OAAOtO,UAArB,IASdxH,EAAOD,QAAU,SAAUuD,GACzB,IAAImB,EAAGuR,EAAGnT,EACV,OAAOS,IAAO5D,GAAY,YAAqB,OAAP4D,EAAc,OAEN,iBAApC0S,EAVD,SAAU1S,EAAIpB,GACzB,IACE,OAAOoB,EAAGpB,GACV,MAAO0B,KAOOqS,CAAOxR,EAAI/D,OAAO4C,GAAK6K,IAAoB6H,EAEvDD,EAAMD,EAAIrR,GAEM,WAAf5B,EAAIiT,EAAIrR,KAAsC,mBAAZA,EAAEyR,OAAuB,YAAcrT,IAM1E,SAAU7C,EAAQD,EAASF,GAGjC,IAAIsW,EAActW,EAAoB,EAApBA,CAAuB,eACrCqM,EAAaC,MAAM9K,UACnB6K,EAAWiK,IAAgBzW,IAAWG,EAAoB,GAApBA,CAAwBqM,EAAYiK,EAAa,IAC3FnW,EAAOD,QAAU,SAAUmC,GACzBgK,EAAWiK,GAAajU,IAAO,IAM3B,SAAUlC,EAAQD,EAASF,GAEjC,IAAIgC,EAAMhC,EAAoB,IAC1BM,EAAON,EAAoB,KAC3BiL,EAAcjL,EAAoB,IAClCuE,EAAWvE,EAAoB,GAC/BoI,EAAWpI,EAAoB,GAC/BmL,EAAYnL,EAAoB,IAChCuW,EAAQ,GACRC,EAAS,IACTtW,EAAUC,EAAOD,QAAU,SAAUuW,EAAUlJ,EAAShG,EAAIC,EAAM6G,GACpE,IAGIhH,EAAQ8I,EAAMC,EAAUjH,EAHxBqH,EAASnC,EAAW,WAAc,OAAOoI,GAActL,EAAUsL,GACjE9R,EAAI3C,EAAIuF,EAAIC,EAAM+F,EAAU,EAAI,GAChCrE,EAAQ,EAEZ,GAAqB,mBAAVsH,EAAsB,MAAM9M,UAAU+S,EAAW,qBAE5D,GAAIxL,EAAYuF,IAAS,IAAKnJ,EAASe,EAASqO,EAASpP,QAAkB6B,EAAT7B,EAAgB6B,IAEhF,IADAC,EAASoE,EAAU5I,EAAEJ,EAAS4L,EAAOsG,EAASvN,IAAQ,GAAIiH,EAAK,IAAMxL,EAAE8R,EAASvN,OACjEqN,GAASpN,IAAWqN,EAAQ,OAAOrN,OAC7C,IAAKiH,EAAWI,EAAOlQ,KAAKmW,KAAatG,EAAOC,EAASK,QAAQC,MAEtE,IADAvH,EAAS7I,EAAK8P,EAAUzL,EAAGwL,EAAKrL,MAAOyI,MACxBgJ,GAASpN,IAAWqN,EAAQ,OAAOrN,IAG9CoN,MAAQA,EAChBrW,EAAQsW,OAASA,GAKX,SAAUrW,EAAQD,GAExB,IAAIoV,EAAK,EACLoB,EAAK9S,KAAK+S,SACdxW,EAAOD,QAAU,SAAUmC,GACzB,MAAO,UAAUgS,OAAOhS,IAAQxC,GAAY,GAAKwC,EAAK,QAASiT,EAAKoB,GAAI3Q,SAAS,OAM7E,SAAU5F,EAAQD,EAASF,GAEjC,IAAIqE,EAAYrE,EAAoB,IAChC4W,EAAMhT,KAAKgT,IACXtS,EAAMV,KAAKU,IACfnE,EAAOD,QAAU,SAAUgJ,EAAO7B,GAEhC,OADA6B,EAAQ7E,EAAU6E,IACH,EAAI0N,EAAI1N,EAAQ7B,EAAQ,GAAK/C,EAAI4E,EAAO7B,KAMnD,SAAUlH,EAAQD,EAASF,GAGjC,IAAIqJ,EAAQrJ,EAAoB,KAC5B6W,EAAa7W,EAAoB,IAAIqU,OAAO,SAAU,aAE1DnU,EAAQyE,EAAI9D,OAAOiW,qBAAuB,SAASA,oBAAoBlS,GACrE,OAAOyE,EAAMzE,EAAGiS,KAMZ,SAAU1W,EAAQD,GAExBC,EAAOD,QAAU,IAKX,SAAUC,EAAQD,EAASF,GAIjC,IAAI4B,EAAS5B,EAAoB,GAC7B0E,EAAK1E,EAAoB,GACzB+W,EAAc/W,EAAoB,GAClCgX,EAAUhX,EAAoB,EAApBA,CAAuB,WAErCG,EAAOD,QAAU,SAAUiI,GACzB,IAAIuH,EAAI9N,EAAOuG,GACX4O,GAAerH,IAAMA,EAAEsH,IAAUtS,EAAGC,EAAE+K,EAAGsH,EAAS,CACpDjW,cAAc,EACdE,IAAK,WAAc,OAAO+E,UAOxB,SAAU7F,EAAQD,GAExBC,EAAOD,QAAU,SAAUuD,EAAIwT,EAAavW,EAAMwW,GAChD,KAAMzT,aAAcwT,IAAiBC,IAAmBrX,IAAaqX,KAAkBzT,EACrF,MAAMC,UAAUhD,EAAO,2BACvB,OAAO+C,IAML,SAAUtD,EAAQD,EAASF,GAEjC,IAAI+B,EAAW/B,EAAoB,IACnCG,EAAOD,QAAU,SAAU+C,EAAQ+G,EAAKrE,GACtC,IAAK,IAAItD,KAAO2H,EAAKjI,EAASkB,EAAQZ,EAAK2H,EAAI3H,GAAMsD,GACrD,OAAO1C,IAMH,SAAU9C,EAAQD,EAASF,GAEjC,IAAIwD,EAAWxD,EAAoB,GACnCG,EAAOD,QAAU,SAAUuD,EAAI6E,GAC7B,IAAK9E,EAASC,IAAOA,EAAG0T,KAAO7O,EAAM,MAAM5E,UAAU,0BAA4B4E,EAAO,cACxF,OAAO7E,IAMH,SAAUtD,EAAQD,EAASF,GAEjC,IAAIoX,EAAMpX,EAAoB,GAAG2E,EAC7BQ,EAAMnF,EAAoB,IAC1BsO,EAAMtO,EAAoB,EAApBA,CAAuB,eAEjCG,EAAOD,QAAU,SAAUuD,EAAIqD,EAAKuQ,GAC9B5T,IAAO0B,EAAI1B,EAAK4T,EAAO5T,EAAKA,EAAGjC,UAAW8M,IAAM8I,EAAI3T,EAAI6K,EAAK,CAAEvN,cAAc,EAAM+D,MAAOgC,MAM1F,SAAU3G,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B+E,EAAU/E,EAAoB,IAC9B0G,EAAQ1G,EAAoB,GAC5BsX,EAAStX,EAAoB,IAC7BuX,EAAQ,IAAMD,EAAS,IAEvBE,EAAQC,OAAO,IAAMF,EAAQA,EAAQ,KACrCG,EAAQD,OAAOF,EAAQA,EAAQ,MAE/BI,EAAW,SAAUxP,EAAKrE,EAAM8T,GAClC,IAAIpV,EAAM,GACNqV,EAAQnR,EAAM,WAChB,QAAS4Q,EAAOnP,MAPV,MAAA,KAOwBA,OAE5BZ,EAAK/E,EAAI2F,GAAO0P,EAAQ/T,EAAKgU,GAAQR,EAAOnP,GAC5CyP,IAAOpV,EAAIoV,GAASrQ,GACxBrF,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAImV,EAAO,SAAUrV,IAM/CsV,EAAOH,EAASG,KAAO,SAAUjR,EAAQyB,GAI3C,OAHAzB,EAASf,OAAOf,EAAQ8B,IACb,EAAPyB,IAAUzB,EAASA,EAAOI,QAAQuQ,EAAO,KAClC,EAAPlP,IAAUzB,EAASA,EAAOI,QAAQyQ,EAAO,KACtC7Q,GAGT1G,EAAOD,QAAUyX,GAKX,SAAUxX,EAAQD,EAASF,GAEjC,IAAI6B,EAAO7B,EAAoB,IAC3B4B,EAAS5B,EAAoB,GAC7B+X,EAAS,qBACT/T,EAAQpC,EAAOmW,KAAYnW,EAAOmW,GAAU,KAE/C5X,EAAOD,QAAU,SAAUmC,EAAKyC,GAC/B,OAAOd,EAAM3B,KAAS2B,EAAM3B,GAAOyC,IAAUjF,GAAYiF,EAAQ,MAChE,WAAY,IAAIsE,KAAK,CACtBnE,QAASpD,EAAKoD,QACd+S,KAAMhY,EAAoB,IAAM,OAAS,SACzCiY,UAAW,0CAMP,SAAU9X,EAAQD,EAASF,GAGjC,IAAIiW,EAAMjW,EAAoB,IAE9BG,EAAOD,QAAUW,OAAO,KAAKqX,qBAAqB,GAAKrX,OAAS,SAAU4C,GACxE,MAAkB,UAAXwS,EAAIxS,GAAkBA,EAAG+B,MAAM,IAAM3E,OAAO4C,KAM/C,SAAUtD,EAAQD,GAExBA,EAAQyE,EAAI,GAAGuT,sBAKT,SAAU/X,EAAQD,EAASF,GAEjC,IAAIgL,EAAUhL,EAAoB,IAC9BqO,EAAWrO,EAAoB,EAApBA,CAAuB,YAClCyL,EAAYzL,EAAoB,IACpCG,EAAOD,QAAUF,EAAoB,IAAImY,kBAAoB,SAAU1U,GACrE,GAAIA,GAAM5D,GAAW,OAAO4D,EAAG4K,IAC1B5K,EAAG,eACHgI,EAAUT,EAAQvH,MAMnB,SAAUtD,EAAQD,EAASF,GAKjC,IAAIuE,EAAWvE,EAAoB,GACnCG,EAAOD,QAAU,WACf,IAAIsH,EAAOjD,EAASyB,MAChBmD,EAAS,GAMb,OALI3B,EAAK5F,SAAQuH,GAAU,KACvB3B,EAAK4Q,aAAYjP,GAAU,KAC3B3B,EAAK6Q,YAAWlP,GAAU,KAC1B3B,EAAK8Q,UAASnP,GAAU,KACxB3B,EAAK+Q,SAAQpP,GAAU,KACpBA,IAMH,SAAUhJ,EAAQD,EAASF,GAGjC,IAAIuE,EAAWvE,EAAoB,GAC/BsH,EAAYtH,EAAoB,IAChCgX,EAAUhX,EAAoB,EAApBA,CAAuB,WACrCG,EAAOD,QAAU,SAAU0E,EAAG4T,GAC5B,IACItV,EADAwM,EAAInL,EAASK,GAAG6B,YAEpB,OAAOiJ,IAAM7P,KAAcqD,EAAIqB,EAASmL,GAAGsH,KAAanX,GAAY2Y,EAAIlR,EAAUpE,KAM9E,SAAU/C,EAAQD,EAASF,GAIjC,IAAIkG,EAAYlG,EAAoB,IAChCoI,EAAWpI,EAAoB,GAC/B+K,EAAkB/K,EAAoB,IAC1CG,EAAOD,QAAU,SAAUuY,GACzB,OAAO,SAAU1P,EAAO2P,EAAIC,GAC1B,IAGI7T,EAHAF,EAAIsB,EAAU6C,GACd1B,EAASe,EAASxD,EAAEyC,QACpB6B,EAAQ6B,EAAgB4N,EAAWtR,GAIvC,GAAIoR,GAAeC,GAAMA,GAAI,KAAgBxP,EAAT7B,GAGlC,IAFAvC,EAAQF,EAAEsE,OAEGpE,EAAO,OAAO,OAEtB,KAAeoE,EAAT7B,EAAgB6B,IAAS,IAAIuP,GAAevP,KAAStE,IAC5DA,EAAEsE,KAAWwP,EAAI,OAAOD,GAAevP,GAAS,EACpD,OAAQuP,IAAgB,KAOxB,SAAUtY,EAAQD,GAExBA,EAAQyE,EAAI9D,OAAO+X,uBAKb,SAAUzY,EAAQD,EAASF,GAGjC,IAAIiW,EAAMjW,EAAoB,IAC9BG,EAAOD,QAAUoM,MAAMuM,SAAW,SAASA,QAAQ5Q,GACjD,MAAmB,SAAZgO,EAAIhO,KAMP,SAAU9H,EAAQD,EAASF,GAEjC,IAAIqE,EAAYrE,EAAoB,IAChC+E,EAAU/E,EAAoB,IAGlCG,EAAOD,QAAU,SAAUoF,GACzB,OAAO,SAAUkC,EAAMsR,GACrB,IAGI1U,EAAGqD,EAHH9F,EAAImE,OAAOf,EAAQyC,IACnBpH,EAAIiE,EAAUyU,GACdzY,EAAIsB,EAAE0F,OAEV,OAAIjH,EAAI,GAAUC,GAALD,EAAekF,EAAY,GAAKzF,IAC7CuE,EAAIzC,EAAEoX,WAAW3Y,IACN,OAAc,MAAJgE,GAAchE,EAAI,IAAMC,IAAMoH,EAAI9F,EAAEoX,WAAW3Y,EAAI,IAAM,OAAc,MAAJqH,EACpFnC,EAAY3D,EAAEqX,OAAO5Y,GAAKgE,EAC1BkB,EAAY3D,EAAEiG,MAAMxH,EAAGA,EAAI,GAA2BqH,EAAI,OAAzBrD,EAAI,OAAU,IAAqB,SAOtE,SAAUjE,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAC/BiW,EAAMjW,EAAoB,IAC1BiZ,EAAQjZ,EAAoB,EAApBA,CAAuB,SACnCG,EAAOD,QAAU,SAAUuD,GACzB,IAAIyV,EACJ,OAAO1V,EAASC,MAASyV,EAAWzV,EAAGwV,MAAYpZ,KAAcqZ,EAAsB,UAAXjD,EAAIxS,MAM5E,SAAUtD,EAAQD,EAASF,GAIjC,IAAIwK,EAAUxK,EAAoB,IAC9BkC,EAAUlC,EAAoB,GAC9B+B,EAAW/B,EAAoB,IAC/B8B,EAAO9B,EAAoB,IAC3ByL,EAAYzL,EAAoB,IAChCmZ,EAAcnZ,EAAoB,IAClCoZ,EAAiBpZ,EAAoB,IACrCwG,EAAiBxG,EAAoB,IACrCqO,EAAWrO,EAAoB,EAApBA,CAAuB,YAClCqZ,IAAU,GAAG9P,MAAQ,QAAU,GAAGA,QAGlC+P,EAAS,SAETC,EAAa,WAAc,OAAOvT,MAEtC7F,EAAOD,QAAU,SAAUqT,EAAMrM,EAAM+P,EAAaxG,EAAM+I,EAASC,EAAQC,GACzEP,EAAYlC,EAAa/P,EAAMuJ,GAC/B,IAeIkJ,EAAStX,EAAKuX,EAfdC,EAAY,SAAUC,GACxB,IAAKT,GAASS,KAAQ/I,EAAO,OAAOA,EAAM+I,GAC1C,OAAQA,GACN,IAVK,OAUM,OAAO,SAASvQ,OAAS,OAAO,IAAI0N,EAAYjR,KAAM8T,IACjE,KAAKR,EAAQ,OAAO,SAASlM,SAAW,OAAO,IAAI6J,EAAYjR,KAAM8T,IACrE,OAAO,SAASvM,UAAY,OAAO,IAAI0J,EAAYjR,KAAM8T,KAEzDxL,EAAMpH,EAAO,YACb6S,EAAaP,GAAWF,EACxBU,GAAa,EACbjJ,EAAQwC,EAAK/R,UACbyY,EAAUlJ,EAAM1C,IAAa0C,EAnBjB,eAmBuCyI,GAAWzI,EAAMyI,GACpEU,EAAWD,GAAWJ,EAAUL,GAChCW,EAAWX,EAAWO,EAAwBF,EAAU,WAArBK,EAAkCra,GACrEua,EAAqB,SAARlT,GAAkB6J,EAAMxD,SAAqB0M,EAwB9D,GArBIG,IACFR,EAAoBpT,EAAe4T,EAAW9Z,KAAK,IAAIiT,OAC7B1S,OAAOW,WAAaoY,EAAkBnJ,OAE9D2I,EAAeQ,EAAmBtL,GAAK,GAElC9D,GAAiD,mBAA/BoP,EAAkBvL,IAAyBvM,EAAK8X,EAAmBvL,EAAUkL,IAIpGQ,GAAcE,GAAWA,EAAQvZ,OAAS4Y,IAC5CU,GAAa,EACbE,EAAW,SAAS9M,SAAW,OAAO6M,EAAQ3Z,KAAK0F,QAG/CwE,IAAWkP,IAAYL,IAASW,GAAejJ,EAAM1C,IACzDvM,EAAKiP,EAAO1C,EAAU6L,GAGxBzO,EAAUvE,GAAQgT,EAClBzO,EAAU6C,GAAOiL,EACbC,EAMF,GALAG,EAAU,CACRvM,OAAQ2M,EAAaG,EAAWL,EAAUP,GAC1C/P,KAAMkQ,EAASS,EAAWL,EAhDrB,QAiDLtM,QAAS4M,GAEPT,EAAQ,IAAKrX,KAAOsX,EAChBtX,KAAO0O,GAAQhP,EAASgP,EAAO1O,EAAKsX,EAAQtX,SAC7CH,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK2W,GAASW,GAAa9S,EAAMyS,GAEtE,OAAOA,IAMH,SAAUxZ,EAAQD,EAASF,GAIjC,IAAI8I,EAAS9I,EAAoB,IAC7Bqa,EAAara,EAAoB,IACjCoZ,EAAiBpZ,EAAoB,IACrC4Z,EAAoB,GAGxB5Z,EAAoB,GAApBA,CAAwB4Z,EAAmB5Z,EAAoB,EAApBA,CAAuB,YAAa,WAAc,OAAOgG,OAEpG7F,EAAOD,QAAU,SAAU+W,EAAa/P,EAAMuJ,GAC5CwG,EAAYzV,UAAYsH,EAAO8Q,EAAmB,CAAEnJ,KAAM4J,EAAW,EAAG5J,KACxE2I,EAAenC,EAAa/P,EAAO,eAM/B,SAAU/G,EAAQD,EAASF,GAEjC,IAAIqO,EAAWrO,EAAoB,EAApBA,CAAuB,YAClCsa,GAAe,EAEnB,IACE,IAAIC,EAAQ,CAAC,GAAGlM,KAChBkM,EAAc,UAAI,WAAcD,GAAe,GAE/ChO,MAAM4D,KAAKqK,EAAO,WAAc,MAAM,IACtC,MAAOxW,IAET5D,EAAOD,QAAU,SAAU4D,EAAM0W,GAC/B,IAAKA,IAAgBF,EAAc,OAAO,EAC1C,IAAI3U,GAAO,EACX,IACE,IAAI8U,EAAM,CAAC,GACPrG,EAAOqG,EAAIpM,KACf+F,EAAK3D,KAAO,WAAc,MAAO,CAAEC,KAAM/K,GAAO,IAChD8U,EAAIpM,GAAY,WAAc,OAAO+F,GACrCtQ,EAAK2W,GACL,MAAO1W,IACT,OAAO4B,IAMH,SAAUxF,EAAQD,EAASF,GAKjC,IAAIgL,EAAUhL,EAAoB,IAC9B0a,EAAcjD,OAAOjW,UAAUsC,KAInC3D,EAAOD,QAAU,SAAUqD,EAAGL,GAC5B,IAAIY,EAAOP,EAAEO,KACb,GAAoB,mBAATA,EAAqB,CAC9B,IAAIqF,EAASrF,EAAKxD,KAAKiD,EAAGL,GAC1B,GAAsB,iBAAXiG,EACT,MAAM,IAAIzF,UAAU,sEAEtB,OAAOyF,EAET,GAAmB,WAAf6B,EAAQzH,GACV,MAAM,IAAIG,UAAU,+CAEtB,OAAOgX,EAAYpa,KAAKiD,EAAGL,KAMvB,SAAU/C,EAAQD,EAASF,GAIjCA,EAAoB,KACpB,IAAI+B,EAAW/B,EAAoB,IAC/B8B,EAAO9B,EAAoB,IAC3B0G,EAAQ1G,EAAoB,GAC5B+E,EAAU/E,EAAoB,IAC9BoL,EAAMpL,EAAoB,GAC1B2a,EAAa3a,EAAoB,IAEjCgX,EAAU5L,EAAI,WAEdwP,GAAiClU,EAAM,WAIzC,IAAImU,EAAK,IAMT,OALAA,EAAG/W,KAAO,WACR,IAAIqF,EAAS,GAEb,OADAA,EAAO2R,OAAS,CAAE1W,EAAG,KACd+E,GAEyB,MAA3B,GAAGlC,QAAQ4T,EAAI,UAGpBE,EAAoC,WAEtC,IAAIF,EAAK,OACLG,EAAeH,EAAG/W,KACtB+W,EAAG/W,KAAO,WAAc,OAAOkX,EAAatT,MAAM1B,KAAM2B,YACxD,IAAIwB,EAAS,KAAK3D,MAAMqV,GACxB,OAAyB,IAAlB1R,EAAO9B,QAA8B,MAAd8B,EAAO,IAA4B,MAAdA,EAAO,GANpB,GASxChJ,EAAOD,QAAU,SAAUiI,EAAKd,EAAQvD,GACtC,IAAImX,EAAS7P,EAAIjD,GAEb+S,GAAuBxU,EAAM,WAE/B,IAAI9B,EAAI,GAER,OADAA,EAAEqW,GAAU,WAAc,OAAO,GACZ,GAAd,GAAG9S,GAAKvD,KAGbuW,EAAoBD,GAAuBxU,EAAM,WAEnD,IAAI0U,GAAa,EACbP,EAAK,IAST,OARAA,EAAG/W,KAAO,WAAiC,OAAnBsX,GAAa,EAAa,MACtC,UAARjT,IAGF0S,EAAGpU,YAAc,GACjBoU,EAAGpU,YAAYuQ,GAAW,WAAc,OAAO6D,IAEjDA,EAAGI,GAAQ,KACHG,IACLvb,GAEL,IACGqb,IACAC,GACQ,YAARhT,IAAsByS,GACd,UAARzS,IAAoB4S,EACrB,CACA,IAAIM,EAAqB,IAAIJ,GACzBK,EAAMxX,EACRiB,EACAkW,EACA,GAAG9S,GACH,SAASoT,gBAAgBC,EAAcC,EAAQC,EAAKC,EAAMC,GACxD,OAAIH,EAAO3X,OAAS6W,EACdO,IAAwBU,EAInB,CAAElL,MAAM,EAAM5L,MAAOuW,EAAmB/a,KAAKmb,EAAQC,EAAKC,IAE5D,CAAEjL,MAAM,EAAM5L,MAAO0W,EAAalb,KAAKob,EAAKD,EAAQE,IAEtD,CAAEjL,MAAM,KAIfmL,EAAOP,EAAI,GAEfvZ,EAAS+D,OAAOtE,UAAW2G,EAHfmT,EAAI,IAIhBxZ,EAAK2V,OAAOjW,UAAWyZ,EAAkB,GAAV5T,EAG3B,SAAUR,EAAQoB,GAAO,OAAO4T,EAAKvb,KAAKuG,EAAQb,KAAMiC,IAGxD,SAAUpB,GAAU,OAAOgV,EAAKvb,KAAKuG,EAAQb,WAQ/C,SAAU7F,EAAQD,EAASF,GAEjC,IACI8b,EADS9b,EAAoB,GACV8b,UAEvB3b,EAAOD,QAAU4b,GAAaA,EAAUC,WAAa,IAK/C,SAAU5b,EAAQD,EAASF,GAIjC,IAAI4B,EAAS5B,EAAoB,GAC7BkC,EAAUlC,EAAoB,GAC9B+B,EAAW/B,EAAoB,IAC/B6K,EAAc7K,EAAoB,IAClC4V,EAAO5V,EAAoB,IAC3Bgc,EAAQhc,EAAoB,IAC5B2K,EAAa3K,EAAoB,IACjCwD,EAAWxD,EAAoB,GAC/B0G,EAAQ1G,EAAoB,GAC5B0L,EAAc1L,EAAoB,IAClCoZ,EAAiBpZ,EAAoB,IACrCic,EAAoBjc,EAAoB,IAE5CG,EAAOD,QAAU,SAAUgH,EAAMgM,EAASyG,EAASuC,EAAQ1T,EAAQ2T,GACjE,IAAI5I,EAAO3R,EAAOsF,GACdwI,EAAI6D,EACJ6I,EAAQ5T,EAAS,MAAQ,MACzBuI,EAAQrB,GAAKA,EAAElO,UACfoD,EAAI,GACJyX,EAAY,SAAUlU,GACxB,IAAIZ,EAAKwJ,EAAM5I,GACfpG,EAASgP,EAAO5I,EACP,UAAPA,EAAkB,SAAU/D,GAC1B,QAAO+X,IAAY3Y,EAASY,KAAamD,EAAGjH,KAAK0F,KAAY,IAAN5B,EAAU,EAAIA,IAC5D,OAAP+D,EAAe,SAAShD,IAAIf,GAC9B,QAAO+X,IAAY3Y,EAASY,KAAamD,EAAGjH,KAAK0F,KAAY,IAAN5B,EAAU,EAAIA,IAC5D,OAAP+D,EAAe,SAASlH,IAAImD,GAC9B,OAAO+X,IAAY3Y,EAASY,GAAKvE,GAAY0H,EAAGjH,KAAK0F,KAAY,IAAN5B,EAAU,EAAIA,IAChE,OAAP+D,EAAe,SAASmU,IAAIlY,GAAqC,OAAhCmD,EAAGjH,KAAK0F,KAAY,IAAN5B,EAAU,EAAIA,GAAW4B,MACxE,SAASqJ,IAAIjL,EAAGqD,GAAwC,OAAnCF,EAAGjH,KAAK0F,KAAY,IAAN5B,EAAU,EAAIA,EAAGqD,GAAWzB,QAGvE,GAAgB,mBAAL0J,IAAqByM,GAAWpL,EAAMS,UAAY9K,EAAM,YACjE,IAAIgJ,GAAInC,UAAUkD,UAMb,CACL,IAAI8L,EAAW,IAAI7M,EAEf8M,EAAiBD,EAASH,GAAOD,EAAU,IAAM,EAAG,IAAMI,EAE1DE,EAAuB/V,EAAM,WAAc6V,EAASpX,IAAI,KAExDuX,EAAmBhR,EAAY,SAAU0I,GAAQ,IAAI1E,EAAE0E,KAEvDuI,GAAcR,GAAWzV,EAAM,WAIjC,IAFA,IAAIkW,EAAY,IAAIlN,EAChBxG,EAAQ,EACLA,KAAS0T,EAAUR,GAAOlT,EAAOA,GACxC,OAAQ0T,EAAUzX,KAAK,KAEpBuX,MACHhN,EAAIwD,EAAQ,SAAUjQ,EAAQwT,GAC5B9L,EAAW1H,EAAQyM,EAAGxI,GACtB,IAAIM,EAAOyU,EAAkB,IAAI1I,EAAQtQ,EAAQyM,GAEjD,OADI+G,GAAY5W,IAAWmc,EAAMvF,EAAUjO,EAAQhB,EAAK4U,GAAQ5U,GACzDA,KAEPhG,UAAYuP,GACRtK,YAAciJ,IAElB+M,GAAwBE,KAC1BN,EAAU,UACVA,EAAU,OACV7T,GAAU6T,EAAU,SAElBM,GAAcH,IAAgBH,EAAUD,GAExCD,GAAWpL,EAAM8L,cAAc9L,EAAM8L,WApCzCnN,EAAIwM,EAAOY,eAAe5J,EAAShM,EAAMsB,EAAQ4T,GACjDvR,EAAY6E,EAAElO,UAAWmY,GACzB/D,EAAKC,MAAO,EA4Cd,OAPAuD,EAAe1J,EAAGxI,GAGlBhF,EAAQA,EAAQU,EAAIV,EAAQoB,EAAIpB,EAAQQ,IADxCkC,EAAEsC,GAAQwI,IACwC6D,GAAO3O,GAEpDuX,GAASD,EAAOa,UAAUrN,EAAGxI,EAAMsB,GAEjCkH,IAMH,SAAUvP,EAAQD,EAASF,GAiBjC,IAfA,IASIgd,EATApb,EAAS5B,EAAoB,GAC7B8B,EAAO9B,EAAoB,IAC3BiE,EAAMjE,EAAoB,IAC1B4O,EAAQ3K,EAAI,eACZ4K,EAAO5K,EAAI,QACX6P,KAASlS,EAAO4K,cAAe5K,EAAO8K,UACtCgC,EAASoF,EACT1T,EAAI,EAIJ6c,EAAyB,iHAE3BzX,MAAM,KAEDpF,EAPC,IAQF4c,EAAQpb,EAAOqb,EAAuB7c,QACxC0B,EAAKkb,EAAMxb,UAAWoN,GAAO,GAC7B9M,EAAKkb,EAAMxb,UAAWqN,GAAM,IACvBH,GAAS,EAGlBvO,EAAOD,QAAU,CACf4T,IAAKA,EACLpF,OAAQA,EACRE,MAAOA,EACPC,KAAMA,IAMF,SAAU1O,EAAQD,EAASF,GAKjCG,EAAOD,QAAUF,EAAoB,MAAQA,EAAoB,EAApBA,CAAuB,WAClE,IAAIkd,EAAItZ,KAAK+S,SAGbwG,iBAAiB7c,KAAK,KAAM4c,EAAG,qBACxBld,EAAoB,GAAGkd,MAM1B,SAAU/c,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAElCG,EAAOD,QAAU,SAAUkd,GACzBlb,EAAQA,EAAQgB,EAAGka,EAAY,CAAExM,GAAI,SAASA,KAG5C,IAFA,IAAIvJ,EAASM,UAAUN,OACnBgW,EAAI,IAAI/Q,MAAMjF,GACXA,KAAUgW,EAAEhW,GAAUM,UAAUN,GACvC,OAAO,IAAIrB,KAAKqX,QAOd,SAAUld,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BsH,EAAYtH,EAAoB,IAChCgC,EAAMhC,EAAoB,IAC1Bgc,EAAQhc,EAAoB,IAEhCG,EAAOD,QAAU,SAAUkd,GACzBlb,EAAQA,EAAQgB,EAAGka,EAAY,CAAElN,KAAM,SAASA,KAAK9N,GACnD,IACImO,EAAS8M,EAAGnc,EAAGoc,EADfC,EAAQ5V,UAAU,GAKtB,OAHAL,EAAUtB,OACVuK,EAAUgN,IAAU1d,KACPyH,EAAUiW,GACnBnb,GAAUvC,GAAkB,IAAImG,MACpCqX,EAAI,GACA9M,GACFrP,EAAI,EACJoc,EAAKtb,EAAIub,EAAO5V,UAAU,GAAI,GAC9BqU,EAAM5Z,GAAQ,EAAO,SAAUob,GAC7BH,EAAEjU,KAAKkU,EAAGE,EAAUtc,SAGtB8a,EAAM5Z,GAAQ,EAAOib,EAAEjU,KAAMiU,GAExB,IAAIrX,KAAKqX,SAOd,SAAUld,EAAQD,EAASF,GAEjC,IAAIwD,EAAWxD,EAAoB,GAC/BkK,EAAWlK,EAAoB,GAAGkK,SAElCuT,EAAKja,EAAS0G,IAAa1G,EAAS0G,EAASwT,eACjDvd,EAAOD,QAAU,SAAUuD,GACzB,OAAOga,EAAKvT,EAASwT,cAAcja,GAAM,KAMrC,SAAUtD,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3BwK,EAAUxK,EAAoB,IAC9B2d,EAAS3d,EAAoB,IAC7Bc,EAAiBd,EAAoB,GAAG2E,EAC5CxE,EAAOD,QAAU,SAAUQ,GACzB,IAAIkd,EAAU/b,EAAKqC,SAAWrC,EAAKqC,OAASsG,EAAU,GAAK5I,EAAOsC,QAAU,IACtD,KAAlBxD,EAAKsY,OAAO,IAAetY,KAAQkd,GAAU9c,EAAe8c,EAASld,EAAM,CAAEoE,MAAO6Y,EAAOhZ,EAAEjE,OAM7F,SAAUP,EAAQD,EAASF,GAEjC,IAAI0U,EAAS1U,EAAoB,GAApBA,CAAwB,QACjCiE,EAAMjE,EAAoB,IAC9BG,EAAOD,QAAU,SAAUmC,GACzB,OAAOqS,EAAOrS,KAASqS,EAAOrS,GAAO4B,EAAI5B,MAMrC,SAAUlC,EAAQD,GAGxBC,EAAOD,QAAU,gGAEfsF,MAAM,MAKF,SAAUrF,EAAQD,EAASF,GAEjC,IAAIkK,EAAWlK,EAAoB,GAAGkK,SACtC/J,EAAOD,QAAUgK,GAAYA,EAAS2T,iBAKhC,SAAU1d,EAAQD,EAASF,GAKjC,IAAI+W,EAAc/W,EAAoB,GAClC8d,EAAU9d,EAAoB,IAC9B+d,EAAO/d,EAAoB,IAC3BiG,EAAMjG,EAAoB,IAC1BqG,EAAWrG,EAAoB,GAC/BgF,EAAUhF,EAAoB,IAC9Bge,EAAUnd,OAAOod,OAGrB9d,EAAOD,SAAW8d,GAAWhe,EAAoB,EAApBA,CAAuB,WAClD,IAAIqd,EAAI,GACJra,EAAI,GAEJE,EAAIgB,SACJgZ,EAAI,uBAGR,OAFAG,EAAEna,GAAK,EACPga,EAAE1X,MAAM,IAAIgM,QAAQ,SAAU0M,GAAKlb,EAAEkb,GAAKA,IACd,GAArBF,EAAQ,GAAIX,GAAGna,IAAWrC,OAAO0I,KAAKyU,EAAQ,GAAIhb,IAAI6C,KAAK,KAAOqX,IACtE,SAASe,OAAOhb,EAAQb,GAM3B,IALA,IAAI+T,EAAI9P,EAASpD,GACboN,EAAO1I,UAAUN,OACjB6B,EAAQ,EACRiV,EAAaJ,EAAKpZ,EAClByZ,EAASnY,EAAItB,EACHuE,EAAPmH,GAML,IALA,IAIIhO,EAJAa,EAAI8B,EAAQ2C,UAAUuB,MACtBK,EAAO4U,EAAaL,EAAQ5a,GAAGmR,OAAO8J,EAAWjb,IAAM4a,EAAQ5a,GAC/DmE,EAASkC,EAAKlC,OACdgX,EAAI,EAEQA,EAAThX,GACLhF,EAAMkH,EAAK8U,KACNtH,IAAeqH,EAAO9d,KAAK4C,EAAGb,KAAM8T,EAAE9T,GAAOa,EAAEb,IAEtD,OAAO8T,GACP6H,GAKE,SAAU7d,EAAQD,EAASF,GAIjC,IAAIwD,EAAWxD,EAAoB,GAC/BuE,EAAWvE,EAAoB,GAC/Bse,EAAQ,SAAU1Z,EAAGmM,GAEvB,GADAxM,EAASK,IACJpB,EAASuN,IAAoB,OAAVA,EAAgB,MAAMrN,UAAUqN,EAAQ,8BAElE5Q,EAAOD,QAAU,CACfmP,IAAKxO,OAAO0d,iBAAmB,aAAe,GAC5C,SAAUpX,EAAMqX,EAAOnP,GACrB,KACEA,EAAMrP,EAAoB,GAApBA,CAAwBoD,SAAS9C,KAAMN,EAAoB,IAAI2E,EAAE9D,OAAOW,UAAW,aAAa6N,IAAK,IACvGlI,EAAM,IACVqX,IAAUrX,aAAgBmF,OAC1B,MAAOvI,GAAKya,GAAQ,EACtB,OAAO,SAASD,eAAe3Z,EAAGmM,GAIhC,OAHAuN,EAAM1Z,EAAGmM,GACLyN,EAAO5Z,EAAE6Z,UAAY1N,EACpB1B,EAAIzK,EAAGmM,GACLnM,GAVX,CAYE,IAAI,GAAS/E,IACjBye,MAAOA,IAMH,SAAUne,EAAQD,GAGxBC,EAAOD,QAAU,SAAUqH,EAAImX,EAAMlX,GACnC,IAAImX,EAAKnX,IAAS3H,GAClB,OAAQ6e,EAAKrX,QACX,KAAK,EAAG,OAAOsX,EAAKpX,IACAA,EAAGjH,KAAKkH,GAC5B,KAAK,EAAG,OAAOmX,EAAKpX,EAAGmX,EAAK,IACRnX,EAAGjH,KAAKkH,EAAMkX,EAAK,IACvC,KAAK,EAAG,OAAOC,EAAKpX,EAAGmX,EAAK,GAAIA,EAAK,IACjBnX,EAAGjH,KAAKkH,EAAMkX,EAAK,GAAIA,EAAK,IAChD,KAAK,EAAG,OAAOC,EAAKpX,EAAGmX,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAC1BnX,EAAGjH,KAAKkH,EAAMkX,EAAK,GAAIA,EAAK,GAAIA,EAAK,IACzD,KAAK,EAAG,OAAOC,EAAKpX,EAAGmX,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IACnCnX,EAAGjH,KAAKkH,EAAMkX,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAClE,OAAOnX,EAAGG,MAAMF,EAAMkX,KAMpB,SAAUve,EAAQD,EAASF,GAEjC,IAAIwD,EAAWxD,EAAoB,GAC/Bue,EAAiBve,EAAoB,IAAIqP,IAC7ClP,EAAOD,QAAU,SAAUsH,EAAMvE,EAAQyM,GACvC,IACI5M,EADAI,EAAID,EAAOwD,YAIb,OAFEvD,IAAMwM,GAAiB,mBAALxM,IAAoBJ,EAAII,EAAE1B,aAAekO,EAAElO,WAAagC,EAASV,IAAMyb,GAC3FA,EAAe/W,EAAM1E,GACd0E,IAML,SAAUrH,EAAQD,GAExBC,EAAOD,QAAU,oDAMX,SAAUC,EAAQD,EAASF,GAIjC,IAAIqE,EAAYrE,EAAoB,IAChC+E,EAAU/E,EAAoB,IAElCG,EAAOD,QAAU,SAAS0e,OAAOC,GAC/B,IAAInD,EAAM5V,OAAOf,EAAQiB,OACrBiD,EAAM,GACN/H,EAAImD,EAAUwa,GAClB,GAAI3d,EAAI,GAAKA,GAAK4d,SAAU,MAAM9S,WAAW,2BAC7C,KAAU,EAAJ9K,GAAQA,KAAO,KAAOwa,GAAOA,GAAc,EAAJxa,IAAO+H,GAAOyS,GAC3D,OAAOzS,IAMH,SAAU9I,EAAQD,GAGxBC,EAAOD,QAAU0D,KAAKmb,MAAQ,SAASA,KAAKC,GAE1C,OAAmB,IAAXA,GAAKA,IAAWA,GAAKA,EAAIA,EAAIA,EAAI,GAAK,EAAI,IAM9C,SAAU7e,EAAQD,GAGxB,IAAI+e,EAASrb,KAAKsb,MAClB/e,EAAOD,SAAY+e,GAED,mBAAbA,EAAO,KAA4BA,EAAO,IAAM,qBAE7B,OAAnBA,GAAQ,OACT,SAASC,MAAMF,GACjB,OAAmB,IAAXA,GAAKA,GAAUA,GAAS,KAALA,GAAaA,EAAI,KAAOA,EAAIA,EAAIA,EAAI,EAAIpb,KAAKpB,IAAIwc,GAAK,GAC/EC,GAKE,SAAU9e,EAAQD,EAASF,GAGjC,IAAIkZ,EAAWlZ,EAAoB,IAC/B+E,EAAU/E,EAAoB,IAElCG,EAAOD,QAAU,SAAUsH,EAAM2X,EAAcjY,GAC7C,GAAIgS,EAASiG,GAAe,MAAMzb,UAAU,UAAYwD,EAAO,0BAC/D,OAAOpB,OAAOf,EAAQyC,MAMlB,SAAUrH,EAAQD,EAASF,GAEjC,IAAIiZ,EAAQjZ,EAAoB,EAApBA,CAAuB,SACnCG,EAAOD,QAAU,SAAUiI,GACzB,IAAI0S,EAAK,IACT,IACE,MAAM1S,GAAK0S,GACX,MAAO9W,GACP,IAEE,OADA8W,EAAG5B,IAAS,GACJ,MAAM9Q,GAAK0S,GACnB,MAAOlW,KACT,OAAO,IAML,SAAUxE,EAAQD,EAASF,GAGjC,IAAIyL,EAAYzL,EAAoB,IAChCqO,EAAWrO,EAAoB,EAApBA,CAAuB,YAClCqM,EAAaC,MAAM9K,UAEvBrB,EAAOD,QAAU,SAAUuD,GACzB,OAAOA,IAAO5D,KAAc4L,EAAUa,QAAU7I,GAAM4I,EAAWgC,KAAc5K,KAM3E,SAAUtD,EAAQD,EAASF,GAIjC,IAAIof,EAAkBpf,EAAoB,GACtCkF,EAAalF,EAAoB,IAErCG,EAAOD,QAAU,SAAUoB,EAAQ4H,EAAOpE,GACpCoE,KAAS5H,EAAQ8d,EAAgBza,EAAErD,EAAQ4H,EAAOhE,EAAW,EAAGJ,IAC/DxD,EAAO4H,GAASpE,IAMjB,SAAU3E,EAAQD,EAASF,GAGjC,IAAIuL,EAAqBvL,EAAoB,KAE7CG,EAAOD,QAAU,SAAUmf,EAAUhY,GACnC,OAAO,IAAKkE,EAAmB8T,GAAxB,CAAmChY,KAMtC,SAAUlH,EAAQD,EAASF,GAKjC,IAAIqG,EAAWrG,EAAoB,GAC/B+K,EAAkB/K,EAAoB,IACtCoI,EAAWpI,EAAoB,GACnCG,EAAOD,QAAU,SAASiR,KAAKrM,GAO7B,IANA,IAAIF,EAAIyB,EAASL,MACbqB,EAASe,EAASxD,EAAEyC,QACpBgJ,EAAO1I,UAAUN,OACjB6B,EAAQ6B,EAAuB,EAAPsF,EAAW1I,UAAU,GAAK9H,GAAWwH,GAC7D+K,EAAa,EAAP/B,EAAW1I,UAAU,GAAK9H,GAChCyf,EAASlN,IAAQvS,GAAYwH,EAAS0D,EAAgBqH,EAAK/K,GAC/C6B,EAAToW,GAAgB1a,EAAEsE,KAAWpE,EACpC,OAAOF,IAMH,SAAUzE,EAAQD,EAASF,GAIjC,IAAIuf,EAAmBvf,EAAoB,IACvCmQ,EAAOnQ,EAAoB,IAC3ByL,EAAYzL,EAAoB,IAChCkG,EAAYlG,EAAoB,IAMpCG,EAAOD,QAAUF,EAAoB,GAApBA,CAAwBsM,MAAO,QAAS,SAAUkT,EAAU1F,GAC3E9T,KAAKmR,GAAKjR,EAAUsZ,GACpBxZ,KAAKyZ,GAAK,EACVzZ,KAAK0Z,GAAK5F,GAET,WACD,IAAIlV,EAAIoB,KAAKmR,GACT2C,EAAO9T,KAAK0Z,GACZxW,EAAQlD,KAAKyZ,KACjB,OAAK7a,GAAcA,EAAEyC,QAAX6B,GACRlD,KAAKmR,GAAKtX,GACHsQ,EAAK,IAEaA,EAAK,EAApB,QAAR2J,EAA+B5Q,EACvB,UAAR4Q,EAAiClV,EAAEsE,GACxB,CAACA,EAAOtE,EAAEsE,MACxB,UAGHuC,EAAUkU,UAAYlU,EAAUa,MAEhCiT,EAAiB,QACjBA,EAAiB,UACjBA,EAAiB,YAKX,SAAUpf,EAAQD,GAExBC,EAAOD,QAAU,SAAUwQ,EAAM5L,GAC/B,MAAO,CAAEA,MAAOA,EAAO4L,OAAQA,KAM3B,SAAUvQ,EAAQD,EAASF,GAKjC,IAaM4f,EACAC,EAdFC,EAAc9f,EAAoB,IAElC+f,EAAatI,OAAOjW,UAAUsC,KAI9Bkc,EAAgBla,OAAOtE,UAAUyF,QAEjCgZ,EAAcF,EAEdG,EAAa,YAEbC,GAEEN,EAAM,MACVE,EAAWzf,KAFPsf,EAAM,IAEW,KACrBG,EAAWzf,KAAKuf,EAAK,KACM,IAApBD,EAAIM,IAAyC,IAApBL,EAAIK,IAIlCE,EAAgB,OAAOtc,KAAK,IAAI,KAAOjE,IAE/BsgB,GAA4BC,KAGtCH,EAAc,SAASnc,KAAK4X,GAC1B,IACI2E,EAAWC,EAAQC,EAAOngB,EAD1Bya,EAAK7U,KAwBT,OArBIoa,IACFE,EAAS,IAAI7I,OAAO,IAAMoD,EAAGzY,OAAS,WAAY0d,EAAYxf,KAAKua,KAEjEsF,IAA0BE,EAAYxF,EAAGqF,IAE7CK,EAAQR,EAAWzf,KAAKua,EAAIa,GAExByE,GAA4BI,IAC9B1F,EAAGqF,GAAcrF,EAAGjZ,OAAS2e,EAAMrX,MAAQqX,EAAM,GAAGlZ,OAASgZ,GAE3DD,GAAiBG,GAAwB,EAAfA,EAAMlZ,QAIlC2Y,EAAc1f,KAAKigB,EAAM,GAAID,EAAQ,WACnC,IAAKlgB,EAAI,EAAGA,EAAIuH,UAAUN,OAAS,EAAGjH,IAChCuH,UAAUvH,KAAOP,KAAW0gB,EAAMngB,GAAKP,MAK1C0gB,IAIXpgB,EAAOD,QAAU+f,GAKX,SAAU9f,EAAQD,EAASF,GAIjC,IAAIwgB,EAAKxgB,EAAoB,GAApBA,EAAwB,GAIjCG,EAAOD,QAAU,SAAUgD,EAAGgG,EAAOoP,GACnC,OAAOpP,GAASoP,EAAUkI,EAAGtd,EAAGgG,GAAO7B,OAAS,KAM5C,SAAUlH,EAAQD,EAASF,GAEjC,IAaIygB,EAAOC,EAASC,EAbhB3e,EAAMhC,EAAoB,IAC1B4gB,EAAS5gB,EAAoB,IAC7B6gB,EAAO7gB,EAAoB,IAC3B8gB,EAAM9gB,EAAoB,IAC1B4B,EAAS5B,EAAoB,GAC7B+gB,EAAUnf,EAAOmf,QACjBC,EAAUpf,EAAOqf,aACjBC,EAAYtf,EAAOuf,eACnBC,EAAiBxf,EAAOwf,eACxBC,EAAWzf,EAAOyf,SAClBC,EAAU,EACVC,EAAQ,GACRC,EAAqB,qBAErBC,EAAM,WACR,IAAInM,GAAMtP,KAEV,GAAIub,EAAM9f,eAAe6T,GAAK,CAC5B,IAAI/N,EAAKga,EAAMjM,UACRiM,EAAMjM,GACb/N,MAGAma,EAAW,SAAUC,GACvBF,EAAInhB,KAAKqhB,EAAMhO,OAGZqN,GAAYE,IACfF,EAAU,SAASC,aAAa1Z,GAG9B,IAFA,IAAImX,EAAO,GACPte,EAAI,EACkBA,EAAnBuH,UAAUN,QAAYqX,EAAKtV,KAAKzB,UAAUvH,MAMjD,OALAmhB,IAAQD,GAAW,WAEjBV,EAAoB,mBAANrZ,EAAmBA,EAAKnE,SAASmE,GAAKmX,IAEtD+B,EAAMa,GACCA,GAETJ,EAAY,SAASC,eAAe7L,UAC3BiM,EAAMjM,IAGyB,WAApCtV,EAAoB,GAApBA,CAAwB+gB,GAC1BN,EAAQ,SAAUnL,GAChByL,EAAQa,SAAS5f,EAAIyf,EAAKnM,EAAI,KAGvB+L,GAAYA,EAASQ,IAC9BpB,EAAQ,SAAUnL,GAChB+L,EAASQ,IAAI7f,EAAIyf,EAAKnM,EAAI,KAGnB8L,GAETT,GADAD,EAAU,IAAIU,GACCU,MACfpB,EAAQqB,MAAMC,UAAYN,EAC1BjB,EAAQze,EAAI2e,EAAKsB,YAAatB,EAAM,IAG3B/e,EAAOsgB,kBAA0C,mBAAfD,cAA8BrgB,EAAOugB,eAChF1B,EAAQ,SAAUnL,GAChB1T,EAAOqgB,YAAY3M,EAAK,GAAI,MAE9B1T,EAAOsgB,iBAAiB,UAAWR,GAAU,IAG7CjB,EADSe,KAAsBV,EAAI,UAC3B,SAAUxL,GAChBuL,EAAK9W,YAAY+W,EAAI,WAAWU,GAAsB,WACpDX,EAAKuB,YAAYpc,MACjByb,EAAInhB,KAAKgV,KAKL,SAAUA,GAChB+M,WAAWrgB,EAAIyf,EAAKnM,EAAI,GAAI,KAIlCnV,EAAOD,QAAU,CACfmP,IAAK2R,EACLnE,MAAOqE,IAMH,SAAU/gB,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7BsiB,EAAYtiB,EAAoB,IAAIqP,IACpCkT,EAAW3gB,EAAO4gB,kBAAoB5gB,EAAO6gB,uBAC7C1B,EAAUnf,EAAOmf,QACjB2B,EAAU9gB,EAAO8gB,QACjBC,EAA6C,WAApC3iB,EAAoB,GAApBA,CAAwB+gB,GAErC5gB,EAAOD,QAAU,WACf,IAAI0iB,EAAMC,EAAMC,EAEZC,EAAQ,WACV,IAAIC,EAAQzb,EAEZ,IADIob,IAAWK,EAASjC,EAAQkC,SAASD,EAAOE,OACzCN,GAAM,CACXrb,EAAKqb,EAAKrb,GACVqb,EAAOA,EAAKnS,KACZ,IACElJ,IACA,MAAOxD,GAGP,MAFI6e,EAAME,IACLD,EAAOhjB,GACNkE,GAER8e,EAAOhjB,GACLmjB,GAAQA,EAAOG,SAIrB,GAAIR,EACFG,EAAS,WACP/B,EAAQa,SAASmB,SAGd,IAAIR,GAAc3gB,EAAOka,WAAala,EAAOka,UAAUsH,WAQvD,GAAIV,GAAWA,EAAQW,QAAS,CAErC,IAAIC,EAAUZ,EAAQW,QAAQxjB,IAC9BijB,EAAS,WACPQ,EAAQC,KAAKR,SASfD,EAAS,WAEPR,EAAUhiB,KAAKsB,EAAQmhB,QAvBgD,CACzE,IAAIS,GAAS,EACTC,EAAOvZ,SAASwZ,eAAe,IACnC,IAAInB,EAASQ,GAAOY,QAAQF,EAAM,CAAEG,eAAe,IACnDd,EAAS,WACPW,EAAK9P,KAAO6P,GAAUA,GAsB1B,OAAO,SAAUjc,GACf,IAAIsc,EAAO,CAAEtc,GAAIA,EAAIkJ,KAAM5Q,IACvBgjB,IAAMA,EAAKpS,KAAOoT,GACjBjB,IACHA,EAAOiB,EACPf,KACAD,EAAOgB,KAOP,SAAU1jB,EAAQD,EAASF,GAKjC,IAAIsH,EAAYtH,EAAoB,IAEpC,SAAS8jB,kBAAkBpU,GACzB,IAAI2T,EAASU,EACb/d,KAAKsd,QAAU,IAAI5T,EAAE,SAAUsU,EAAWC,GACxC,GAAIZ,IAAYxjB,IAAakkB,IAAWlkB,GAAW,MAAM6D,UAAU,2BACnE2f,EAAUW,EACVD,EAASE,IAEXje,KAAKqd,QAAU/b,EAAU+b,GACzBrd,KAAK+d,OAASzc,EAAUyc,GAG1B5jB,EAAOD,QAAQyE,EAAI,SAAU+K,GAC3B,OAAO,IAAIoU,kBAAkBpU,KAMzB,SAAUvP,EAAQD,EAASF,GAGjC,IAAIkL,EAAOlL,EAAoB,IAC3B+d,EAAO/d,EAAoB,IAC3BuE,EAAWvE,EAAoB,GAC/BkkB,EAAUlkB,EAAoB,GAAGkkB,QACrC/jB,EAAOD,QAAUgkB,GAAWA,EAAQC,SAAW,SAASA,QAAQ1gB,GAC9D,IAAI8F,EAAO2B,EAAKvG,EAAEJ,EAASd,IACvB0a,EAAaJ,EAAKpZ,EACtB,OAAOwZ,EAAa5U,EAAK8K,OAAO8J,EAAW1a,IAAO8F,IAM9C,SAAUpJ,EAAQD,EAASF,GAIjC,IAAI4B,EAAS5B,EAAoB,GAC7B+W,EAAc/W,EAAoB,GAClCwK,EAAUxK,EAAoB,IAC9ByK,EAASzK,EAAoB,IAC7B8B,EAAO9B,EAAoB,IAC3B6K,EAAc7K,EAAoB,IAClC0G,EAAQ1G,EAAoB,GAC5B2K,EAAa3K,EAAoB,IACjCqE,EAAYrE,EAAoB,IAChCoI,EAAWpI,EAAoB,GAC/B8K,EAAU9K,EAAoB,KAC9BkL,EAAOlL,EAAoB,IAAI2E,EAC/BD,EAAK1E,EAAoB,GAAG2E,EAC5BiH,EAAY5L,EAAoB,IAChCoZ,EAAiBpZ,EAAoB,IACrCkM,EAAe,cACfkY,EAAY,WACZniB,EAAY,YAEZoiB,EAAc,eACd9X,EAAe3K,EAAOsK,GACtBO,EAAY7K,EAAOwiB,GACnBxgB,EAAOhC,EAAOgC,KACdoI,EAAapK,EAAOoK,WAEpB8S,EAAWld,EAAOkd,SAClBwF,EAAa/X,EACbgY,EAAM3gB,EAAK2gB,IACXC,EAAM5gB,EAAK4gB,IACX1c,EAAQlE,EAAKkE,MACb2c,EAAM7gB,EAAK6gB,IACXC,EAAM9gB,EAAK8gB,IAEXC,EAAc,aACdC,EAAc,aACdC,EAAU9N,EAAc,KAHf,SAIT+N,EAAU/N,EAAc,KAAO4N,EAC/BI,EAAUhO,EAAc,KAAO6N,EAGnC,SAASI,YAAYlgB,EAAOmgB,EAAMC,GAChC,IAOInhB,EAAGxD,EAAGC,EAPN2O,EAAS,IAAI7C,MAAM4Y,GACnBC,EAAgB,EAATD,EAAaD,EAAO,EAC3BG,GAAQ,GAAKD,GAAQ,EACrBE,EAAQD,GAAQ,EAChBE,EAAc,KAATL,EAAcT,EAAI,GAAI,IAAMA,EAAI,GAAI,IAAM,EAC/CpkB,EAAI,EACJuB,EAAImD,EAAQ,GAAe,IAAVA,GAAe,EAAIA,EAAQ,EAAI,EAAI,EAkCxD,KAhCAA,EAAQyf,EAAIzf,KAECA,GAASA,IAAUga,GAE9Bve,EAAIuE,GAASA,EAAQ,EAAI,EACzBf,EAAIqhB,IAEJrhB,EAAI+D,EAAM2c,EAAI3f,GAAS4f,GACnB5f,GAAStE,EAAIgkB,EAAI,GAAIzgB,IAAM,IAC7BA,IACAvD,GAAK,GAOU,IAJfsE,GADe,GAAbf,EAAIshB,EACGC,EAAK9kB,EAEL8kB,EAAKd,EAAI,EAAG,EAAIa,IAEf7kB,IACVuD,IACAvD,GAAK,GAEU4kB,GAAbrhB,EAAIshB,GACN9kB,EAAI,EACJwD,EAAIqhB,GACkB,GAAbrhB,EAAIshB,GACb9kB,GAAKuE,EAAQtE,EAAI,GAAKgkB,EAAI,EAAGS,GAC7BlhB,GAAQshB,IAER9kB,EAAIuE,EAAQ0f,EAAI,EAAGa,EAAQ,GAAKb,EAAI,EAAGS,GACvClhB,EAAI,IAGO,GAARkhB,EAAW9V,EAAO/O,KAAW,IAAJG,EAASA,GAAK,IAAK0kB,GAAQ,GAG3D,IAFAlhB,EAAIA,GAAKkhB,EAAO1kB,EAChB4kB,GAAQF,EACM,EAAPE,EAAUhW,EAAO/O,KAAW,IAAJ2D,EAASA,GAAK,IAAKohB,GAAQ,GAE1D,OADAhW,IAAS/O,IAAU,IAAJuB,EACRwN,EAET,SAASoW,cAAcpW,EAAQ8V,EAAMC,GACnC,IAOI3kB,EAPA4kB,EAAgB,EAATD,EAAaD,EAAO,EAC3BG,GAAQ,GAAKD,GAAQ,EACrBE,EAAQD,GAAQ,EAChBI,EAAQL,EAAO,EACf/kB,EAAI8kB,EAAS,EACbvjB,EAAIwN,EAAO/O,KACX2D,EAAQ,IAAJpC,EAGR,IADAA,IAAM,EACS,EAAR6jB,EAAWzhB,EAAQ,IAAJA,EAAUoL,EAAO/O,GAAIA,IAAKolB,GAAS,GAIzD,IAHAjlB,EAAIwD,GAAK,IAAMyhB,GAAS,EACxBzhB,KAAOyhB,EACPA,GAASP,EACM,EAARO,EAAWjlB,EAAQ,IAAJA,EAAU4O,EAAO/O,GAAIA,IAAKolB,GAAS,GACzD,GAAU,IAANzhB,EACFA,EAAI,EAAIshB,MACH,CAAA,GAAIthB,IAAMqhB,EACf,OAAO7kB,EAAIklB,IAAM9jB,GAAKmd,EAAWA,EAEjCve,GAAQikB,EAAI,EAAGS,GACflhB,GAAQshB,EACR,OAAQ1jB,GAAK,EAAI,GAAKpB,EAAIikB,EAAI,EAAGzgB,EAAIkhB,GAGzC,SAASS,UAAUC,GACjB,OAAOA,EAAM,IAAM,GAAKA,EAAM,IAAM,GAAKA,EAAM,IAAM,EAAIA,EAAM,GAEjE,SAASC,OAAOniB,GACd,MAAO,CAAM,IAALA,GAEV,SAASoiB,QAAQpiB,GACf,MAAO,CAAM,IAALA,EAAWA,GAAM,EAAI,KAE/B,SAASqiB,QAAQriB,GACf,MAAO,CAAM,IAALA,EAAWA,GAAM,EAAI,IAAMA,GAAM,GAAK,IAAMA,GAAM,GAAK,KAEjE,SAASsiB,QAAQtiB,GACf,OAAOuhB,YAAYvhB,EAAI,GAAI,GAE7B,SAASuiB,QAAQviB,GACf,OAAOuhB,YAAYvhB,EAAI,GAAI,GAG7B,SAASqM,UAAUJ,EAAGrN,EAAK0N,GACzBrL,EAAGgL,EAAEzN,GAAYI,EAAK,CAAEpB,IAAK,WAAc,OAAO+E,KAAK+J,MAGzD,SAAS9O,IAAIglB,EAAMN,EAAOzc,EAAOgd,GAC/B,IACIC,EAAWrb,GADC5B,GAEhB,GAAuB+c,EAAKnB,GAAxBqB,EAAWR,EAAuB,MAAM3Z,EAAWqY,GACvD,IACIpT,EAAQkV,EAAWF,EAAKlB,GACxBqB,EAFQH,EAAKpB,GAASwB,GAETze,MAAMqJ,EAAOA,EAAQ0U,GACtC,OAAOO,EAAiBE,EAAOA,EAAKtU,UAEtC,SAASzC,IAAI4W,EAAMN,EAAOzc,EAAOod,EAAYxhB,EAAOohB,GAClD,IACIC,EAAWrb,GADC5B,GAEhB,GAAuB+c,EAAKnB,GAAxBqB,EAAWR,EAAuB,MAAM3Z,EAAWqY,GAIvD,IAHA,IAAIrgB,EAAQiiB,EAAKpB,GAASwB,GACtBpV,EAAQkV,EAAWF,EAAKlB,GACxBqB,EAAOE,GAAYxhB,GACd1E,EAAI,EAAGA,EAAIulB,EAAOvlB,IAAK4D,EAAMiN,EAAQ7Q,GAAKgmB,EAAKF,EAAiB9lB,EAAIulB,EAAQvlB,EAAI,GAG3F,GAAKqK,EAAOqJ,IAgFL,CACL,IAAKpN,EAAM,WACT6F,EAAa,OACR7F,EAAM,WACX,IAAI6F,GAAc,MACd7F,EAAM,WAIV,OAHA,IAAI6F,EACJ,IAAIA,EAAa,KACjB,IAAIA,EAAakZ,KACVlZ,EAAa7L,MAAQwL,IAC1B,CAMF,IADA,IACyC7J,EADrCkkB,GAJJha,EAAe,SAASC,YAAYnF,GAElC,OADAsD,EAAW3E,KAAMuG,GACV,IAAI+X,EAAWxZ,EAAQzD,MAEIpF,GAAaqiB,EAAWriB,GACnDsH,EAAO2B,EAAKoZ,GAAajG,EAAI,EAAsBA,EAAd9U,EAAKlC,SAC1ChF,EAAMkH,EAAK8U,QAAS9R,GAAezK,EAAKyK,EAAclK,EAAKiiB,EAAWjiB,IAE1EmI,IAAS+b,EAAiB9f,YAAc8F,GAG/C,IAAI0Z,EAAO,IAAIxZ,EAAU,IAAIF,EAAa,IACtCia,EAAW/Z,EAAUxK,GAAWwkB,QACpCR,EAAKQ,QAAQ,EAAG,YAChBR,EAAKQ,QAAQ,EAAG,aACZR,EAAKS,QAAQ,IAAOT,EAAKS,QAAQ,IAAI7b,EAAY4B,EAAUxK,GAAY,CACzEwkB,QAAS,SAASA,QAAQnU,EAAYxN,GACpC0hB,EAASlmB,KAAK0F,KAAMsM,EAAYxN,GAAS,IAAM,KAEjD6hB,SAAU,SAASA,SAASrU,EAAYxN,GACtC0hB,EAASlmB,KAAK0F,KAAMsM,EAAYxN,GAAS,IAAM,OAEhD,QAhHHyH,EAAe,SAASC,YAAYnF,GAClCsD,EAAW3E,KAAMuG,EAAcL,GAC/B,IAAI+H,EAAanJ,EAAQzD,GACzBrB,KAAKqgB,GAAKza,EAAUtL,KAAK,IAAIgM,MAAM2H,GAAa,GAChDjO,KAAK8e,GAAW7Q,GAGlBxH,EAAY,SAASC,SAASyC,EAAQmD,EAAY2B,GAChDtJ,EAAW3E,KAAMyG,EAAW2X,GAC5BzZ,EAAWwE,EAAQ5C,EAAc6X,GACjC,IAAIwC,EAAezX,EAAO2V,GACtBtV,EAASnL,EAAUiO,GACvB,GAAI9C,EAAS,GAAcoX,EAATpX,EAAuB,MAAMxD,EAAW,iBAE1D,GAA0B4a,EAAtBpX,GADJyE,EAAaA,IAAepU,GAAY+mB,EAAepX,EAASpH,EAAS6L,IACjC,MAAMjI,EAxJ/B,iBAyJfhG,KAAK6e,GAAW1V,EAChBnJ,KAAK+e,GAAWvV,EAChBxJ,KAAK8e,GAAW7Q,GAGd8C,IACFjH,UAAUvD,EAAcoY,EAAa,MACrC7U,UAAUrD,EAlJD,SAkJoB,MAC7BqD,UAAUrD,EAAWkY,EAAa,MAClC7U,UAAUrD,EAAWmY,EAAa,OAGpC/Z,EAAY4B,EAAUxK,GAAY,CAChCykB,QAAS,SAASA,QAAQpU,GACxB,OAAOrR,IAAI+E,KAAM,EAAGsM,GAAY,IAAM,IAAM,IAE9CuU,SAAU,SAASA,SAASvU;AAC1B,OAAOrR,IAAI+E,KAAM,EAAGsM,GAAY,IAElCwU,SAAU,SAASA,SAASxU,GAC1B,IAAIqT,EAAQ1kB,IAAI+E,KAAM,EAAGsM,EAAY3K,UAAU,IAC/C,OAAQge,EAAM,IAAM,EAAIA,EAAM,KAAO,IAAM,IAE7CoB,UAAW,SAASA,UAAUzU,GAC5B,IAAIqT,EAAQ1kB,IAAI+E,KAAM,EAAGsM,EAAY3K,UAAU,IAC/C,OAAOge,EAAM,IAAM,EAAIA,EAAM,IAE/BqB,SAAU,SAASA,SAAS1U,GAC1B,OAAOoT,UAAUzkB,IAAI+E,KAAM,EAAGsM,EAAY3K,UAAU,MAEtDsf,UAAW,SAASA,UAAU3U,GAC5B,OAAOoT,UAAUzkB,IAAI+E,KAAM,EAAGsM,EAAY3K,UAAU,OAAS,GAE/Duf,WAAY,SAASA,WAAW5U,GAC9B,OAAOiT,cAActkB,IAAI+E,KAAM,EAAGsM,EAAY3K,UAAU,IAAK,GAAI,IAEnEwf,WAAY,SAASA,WAAW7U,GAC9B,OAAOiT,cAActkB,IAAI+E,KAAM,EAAGsM,EAAY3K,UAAU,IAAK,GAAI,IAEnE8e,QAAS,SAASA,QAAQnU,EAAYxN,GACpCuK,IAAIrJ,KAAM,EAAGsM,EAAYsT,OAAQ9gB,IAEnC6hB,SAAU,SAASA,SAASrU,EAAYxN,GACtCuK,IAAIrJ,KAAM,EAAGsM,EAAYsT,OAAQ9gB,IAEnCsiB,SAAU,SAASA,SAAS9U,EAAYxN,GACtCuK,IAAIrJ,KAAM,EAAGsM,EAAYuT,QAAS/gB,EAAO6C,UAAU,KAErD0f,UAAW,SAASA,UAAU/U,EAAYxN,GACxCuK,IAAIrJ,KAAM,EAAGsM,EAAYuT,QAAS/gB,EAAO6C,UAAU,KAErD2f,SAAU,SAASA,SAAShV,EAAYxN,GACtCuK,IAAIrJ,KAAM,EAAGsM,EAAYwT,QAAShhB,EAAO6C,UAAU,KAErD4f,UAAW,SAASA,UAAUjV,EAAYxN,GACxCuK,IAAIrJ,KAAM,EAAGsM,EAAYwT,QAAShhB,EAAO6C,UAAU,KAErD6f,WAAY,SAASA,WAAWlV,EAAYxN,GAC1CuK,IAAIrJ,KAAM,EAAGsM,EAAY0T,QAASlhB,EAAO6C,UAAU,KAErD8f,WAAY,SAASA,WAAWnV,EAAYxN,GAC1CuK,IAAIrJ,KAAM,EAAGsM,EAAYyT,QAASjhB,EAAO6C,UAAU,OAsCzDyR,EAAe7M,EAAcL,GAC7BkN,EAAe3M,EAAW2X,GAC1BtiB,EAAK2K,EAAUxK,GAAYwI,EAAOoE,MAAM,GACxC3O,EAAQgM,GAAgBK,EACxBrM,EAAQkkB,GAAa3X,GAKf,SAAUtM,EAAQD,GAExBC,EAAOD,QAAU,SAAUwnB,EAAQzgB,GACjC,IAAI0gB,EAAW1gB,IAAYpG,OAAOoG,GAAW,SAAU2gB,GACrD,OAAO3gB,EAAQ2gB,IACb3gB,EACJ,OAAO,SAAUxD,GACf,OAAOqC,OAAOrC,GAAIwD,QAAQygB,EAAQC,MAOhC,SAAUxnB,EAAQD,EAASF,GAEjCG,EAAOD,SAAWF,EAAoB,KAAOA,EAAoB,EAApBA,CAAuB,WAClE,OAA2G,GAApGa,OAAOC,eAAed,EAAoB,GAApBA,CAAwB,OAAQ,IAAK,CAAEiB,IAAK,WAAc,OAAO,KAAQmD,KAMlG,SAAUjE,EAAQD,EAASF,GAEjCE,EAAQyE,EAAI3E,EAAoB,IAK1B,SAAUG,EAAQD,EAASF,GAEjC,IAAImF,EAAMnF,EAAoB,IAC1BkG,EAAYlG,EAAoB,IAChCkN,EAAelN,EAAoB,GAApBA,EAAwB,GACvCsG,EAAWtG,EAAoB,GAApBA,CAAwB,YAEvCG,EAAOD,QAAU,SAAUoB,EAAQumB,GACjC,IAGIxlB,EAHAuC,EAAIsB,EAAU5E,GACdlB,EAAI,EACJ+I,EAAS,GAEb,IAAK9G,KAAOuC,EAAOvC,GAAOiE,GAAUnB,EAAIP,EAAGvC,IAAQ8G,EAAOC,KAAK/G,GAE/D,KAAsBjC,EAAfynB,EAAMxgB,QAAgBlC,EAAIP,EAAGvC,EAAMwlB,EAAMznB,SAC7C8M,EAAa/D,EAAQ9G,IAAQ8G,EAAOC,KAAK/G,IAE5C,OAAO8G,IAMH,SAAUhJ,EAAQD,EAASF,GAEjC,IAAI0E,EAAK1E,EAAoB,GACzBuE,EAAWvE,EAAoB,GAC/B8d,EAAU9d,EAAoB,IAElCG,EAAOD,QAAUF,EAAoB,GAAKa,OAAOinB,iBAAmB,SAASA,iBAAiBljB,EAAG2F,GAC/FhG,EAASK,GAKT,IAJA,IAGI9B,EAHAyG,EAAOuU,EAAQvT,GACflD,EAASkC,EAAKlC,OACdjH,EAAI,EAEQA,EAATiH,GAAY3C,EAAGC,EAAEC,EAAG9B,EAAIyG,EAAKnJ,KAAMmK,EAAWzH,IACrD,OAAO8B,IAMH,SAAUzE,EAAQD,EAASF,GAGjC,IAAIkG,EAAYlG,EAAoB,IAChCkL,EAAOlL,EAAoB,IAAI2E,EAC/BoB,EAAW,GAAGA,SAEdgiB,EAA+B,iBAAVpkB,QAAsBA,QAAU9C,OAAOiW,oBAC5DjW,OAAOiW,oBAAoBnT,QAAU,GAUzCxD,EAAOD,QAAQyE,EAAI,SAASmS,oBAAoBrT,GAC9C,OAAOskB,GAAoC,mBAArBhiB,EAASzF,KAAKmD,GATjB,SAAUA,GAC7B,IACE,OAAOyH,EAAKzH,GACZ,MAAOM,GACP,OAAOgkB,EAAYngB,SAK0CogB,CAAevkB,GAAMyH,EAAKhF,EAAUzC,MAM/F,SAAUtD,EAAQD,GAGxBC,EAAOD,QAAUW,OAAO4c,IAAM,SAASA,GAAGuB,EAAGiJ,GAE3C,OAAOjJ,IAAMiJ,EAAU,IAANjJ,GAAW,EAAIA,GAAM,EAAIiJ,EAAIjJ,GAAKA,GAAKiJ,GAAKA,IAMzD,SAAU9nB,EAAQD,EAASF,GAIjC,IAAIsH,EAAYtH,EAAoB,IAChCwD,EAAWxD,EAAoB,GAC/B4gB,EAAS5gB,EAAoB,IAC7BiO,EAAa,GAAGrG,MAChBsgB,EAAY,GAUhB/nB,EAAOD,QAAUkD,SAAS+kB,MAAQ,SAASA,KAAK3gB,GAC9C,IAAID,EAAKD,EAAUtB,MACfoiB,EAAWna,EAAW3N,KAAKqH,UAAW,GACtC0gB,EAAQ,WACV,IAAI3J,EAAO0J,EAAS/T,OAAOpG,EAAW3N,KAAKqH,YAC3C,OAAO3B,gBAAgBqiB,EAbX,SAAU3lB,EAAGgQ,EAAKgM,GAChC,KAAMhM,KAAOwV,GAAY,CACvB,IAAK,IAAIhnB,EAAI,GAAId,EAAI,EAAGA,EAAIsS,EAAKtS,IAAKc,EAAEd,GAAK,KAAOA,EAAI,IAExD8nB,EAAUxV,GAAOtP,SAAS,MAAO,gBAAkBlC,EAAE2E,KAAK,KAAO,KACjE,OAAOqiB,EAAUxV,GAAKhQ,EAAGgc,GAQM4J,CAAU/gB,EAAImX,EAAKrX,OAAQqX,GAAQkC,EAAOrZ,EAAImX,EAAMlX,IAGrF,OADIhE,EAAS+D,EAAG/F,aAAY6mB,EAAM7mB,UAAY+F,EAAG/F,WAC1C6mB,IAMH,SAAUloB,EAAQD,EAASF,GAEjC,IAAIiW,EAAMjW,EAAoB,IAC9BG,EAAOD,QAAU,SAAUuD,EAAI8kB,GAC7B,GAAiB,iBAAN9kB,GAA6B,UAAXwS,EAAIxS,GAAiB,MAAMC,UAAU6kB,GAClE,OAAQ9kB,IAMJ,SAAUtD,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAC/B8H,EAAQlE,KAAKkE,MACjB3H,EAAOD,QAAU,SAASsoB,UAAU/kB,GAClC,OAAQD,EAASC,IAAOglB,SAAShlB,IAAOqE,EAAMrE,KAAQA,IAMlD,SAAUtD,EAAQD,EAASF,GAEjC,IAAI0oB,EAAc1oB,EAAoB,GAAG2oB,WACrCC,EAAQ5oB,EAAoB,IAAI8X,KAEpC3X,EAAOD,QAAU,EAAIwoB,EAAY1oB,EAAoB,IAAM,QAAW8e,SAAW,SAAS6J,WAAWjN,GACnG,IAAI7U,EAAS+hB,EAAM9iB,OAAO4V,GAAM,GAC5BvS,EAASuf,EAAY7hB,GACzB,OAAkB,IAAXsC,GAAoC,KAApBtC,EAAOmS,OAAO,IAAa,EAAI7P,GACpDuf,GAKE,SAAUvoB,EAAQD,EAASF,GAEjC,IAAI6oB,EAAY7oB,EAAoB,GAAG8oB,SACnCF,EAAQ5oB,EAAoB,IAAI8X,KAChCiR,EAAK/oB,EAAoB,IACzBgpB,EAAM,cAEV7oB,EAAOD,QAAmC,IAAzB2oB,EAAUE,EAAK,OAA0C,KAA3BF,EAAUE,EAAK,QAAiB,SAASD,SAASpN,EAAKuN,GACpG,IAAIpiB,EAAS+hB,EAAM9iB,OAAO4V,GAAM,GAChC,OAAOmN,EAAUhiB,EAASoiB,IAAU,IAAOD,EAAI7hB,KAAKN,GAAU,GAAK,MACjEgiB,GAKE,SAAU1oB,EAAQD,GAGxBC,EAAOD,QAAU0D,KAAKslB,OAAS,SAASA,MAAMlK,GAC5C,OAAmB,MAAXA,GAAKA,IAAcA,EAAI,KAAOA,EAAIA,EAAIA,EAAI,EAAIpb,KAAK6gB,IAAI,EAAIzF,KAM/D,SAAU7e,EAAQD,EAASF,GAGjC,IAAI+e,EAAO/e,EAAoB,IAC3BwkB,EAAM5gB,KAAK4gB,IACX2E,EAAU3E,EAAI,GAAI,IAClB4E,EAAY5E,EAAI,GAAI,IACpB6E,EAAQ7E,EAAI,EAAG,MAAQ,EAAI4E,GAC3BE,EAAQ9E,EAAI,GAAI,KAMpBrkB,EAAOD,QAAU0D,KAAK2lB,QAAU,SAASA,OAAOvK,GAC9C,IAEI5a,EAAG+E,EAFHqgB,EAAO5lB,KAAK2gB,IAAIvF,GAChByK,EAAQ1K,EAAKC,GAEjB,OAAIwK,EAAOF,EAAcG,GAAwBD,EAAOF,EAAQF,EAPrD,EAAID,EAAU,EAAIA,GAOgDG,EAAQF,EAIxEC,GAFblgB,GADA/E,GAAK,EAAIglB,EAAYD,GAAWK,IAClBplB,EAAIolB,KAEIrgB,GAAUA,EAAesgB,EAAQ3K,SAChD2K,EAAQtgB,IAMX,SAAUhJ,EAAQD,EAASF,GAGjC,IAAIuE,EAAWvE,EAAoB,GACnCG,EAAOD,QAAU,SAAUkQ,EAAU7I,EAAIzC,EAAOyI,GAC9C,IACE,OAAOA,EAAUhG,EAAGhD,EAASO,GAAO,GAAIA,EAAM,IAAMyC,EAAGzC,GAEvD,MAAOf,GACP,IAAI2lB,EAAMtZ,EAAiB,UAE3B,MADIsZ,IAAQ7pB,IAAW0E,EAASmlB,EAAIppB,KAAK8P,IACnCrM,KAOJ,SAAU5D,EAAQD,EAASF,GAEjC,IAAIsH,EAAYtH,EAAoB,IAChCqG,EAAWrG,EAAoB,GAC/BgF,EAAUhF,EAAoB,IAC9BoI,EAAWpI,EAAoB,GAEnCG,EAAOD,QAAU,SAAUsH,EAAMwB,EAAYqH,EAAMsZ,EAAMC,GACvDtiB,EAAU0B,GACV,IAAIpE,EAAIyB,EAASmB,GACb3D,EAAOmB,EAAQJ,GACfyC,EAASe,EAASxD,EAAEyC,QACpB6B,EAAQ0gB,EAAUviB,EAAS,EAAI,EAC/BjH,EAAIwpB,GAAW,EAAI,EACvB,GAAIvZ,EAAO,EAAG,OAAS,CACrB,GAAInH,KAASrF,EAAM,CACjB8lB,EAAO9lB,EAAKqF,GACZA,GAAS9I,EACT,MAGF,GADA8I,GAAS9I,EACLwpB,EAAU1gB,EAAQ,EAAI7B,GAAU6B,EAClC,MAAMxF,UAAU,+CAGpB,KAAMkmB,EAAmB,GAAT1gB,EAAsBA,EAAT7B,EAAgB6B,GAAS9I,EAAO8I,KAASrF,IACpE8lB,EAAO3gB,EAAW2gB,EAAM9lB,EAAKqF,GAAQA,EAAOtE,IAE9C,OAAO+kB,IAMH,SAAUxpB,EAAQD,EAASF,GAKjC,IAAIqG,EAAWrG,EAAoB,GAC/B+K,EAAkB/K,EAAoB,IACtCoI,EAAWpI,EAAoB,GAEnCG,EAAOD,QAAU,GAAG8Q,YAAc,SAASA,WAAW/N,EAAkBgO,GACtE,IAAIrM,EAAIyB,EAASL,MACb0M,EAAMtK,EAASxD,EAAEyC,QACjBwiB,EAAK9e,EAAgB9H,EAAQyP,GAC7BxC,EAAOnF,EAAgBkG,EAAOyB,GAC9BN,EAAyB,EAAnBzK,UAAUN,OAAaM,UAAU,GAAK9H,GAC5Cgf,EAAQjb,KAAKU,KAAK8N,IAAQvS,GAAY6S,EAAM3H,EAAgBqH,EAAKM,IAAQxC,EAAMwC,EAAMmX,GACrFC,EAAM,EAMV,IALI5Z,EAAO2Z,GAAMA,EAAK3Z,EAAO2O,IAC3BiL,GAAO,EACP5Z,GAAQ2O,EAAQ,EAChBgL,GAAMhL,EAAQ,GAEC,EAAVA,KACD3O,KAAQtL,EAAGA,EAAEilB,GAAMjlB,EAAEsL,UACbtL,EAAEilB,GACdA,GAAMC,EACN5Z,GAAQ4Z,EACR,OAAOllB,IAML,SAAUzE,EAAQD,EAASF,GAIjC,IAAI2a,EAAa3a,EAAoB,IACrCA,EAAoB,EAApBA,CAAuB,CACrBiD,OAAQ,SACR8N,OAAO,EACPgZ,OAAQpP,IAAe,IAAI7W,MAC1B,CACDA,KAAM6W,KAMF,SAAUxa,EAAQD,EAASF,GAG7BA,EAAoB,IAAoB,KAAd,KAAKgqB,OAAchqB,EAAoB,GAAG2E,EAAE8S,OAAOjW,UAAW,QAAS,CACnGT,cAAc,EACdE,IAAKjB,EAAoB,OAMrB,SAAUG,EAAQD,GAExBC,EAAOD,QAAU,SAAU4D,GACzB,IACE,MAAO,CAAEC,GAAG,EAAO6P,EAAG9P,KACtB,MAAOC,GACP,MAAO,CAAEA,GAAG,EAAM6P,EAAG7P,MAOnB,SAAU5D,EAAQD,EAASF,GAEjC,IAAIuE,EAAWvE,EAAoB,GAC/BwD,EAAWxD,EAAoB,GAC/BiqB,EAAuBjqB,EAAoB,IAE/CG,EAAOD,QAAU,SAAUwP,EAAGsP,GAE5B,GADAza,EAASmL,GACLlM,EAASwb,IAAMA,EAAEvY,cAAgBiJ,EAAG,OAAOsP,EAC/C,IAAIkL,EAAoBD,EAAqBtlB,EAAE+K,GAG/C,OADA2T,EADc6G,EAAkB7G,SACxBrE,GACDkL,EAAkB5G,UAMrB,SAAUnjB,EAAQD,EAASF,GAIjC,IAAImqB,EAASnqB,EAAoB,KAC7ByP,EAAWzP,EAAoB,IAInCG,EAAOD,QAAUF,EAAoB,GAApBA,CAHP,MAGoC,SAAUiB,GACtD,OAAO,SAASwT,MAAQ,OAAOxT,EAAI+E,KAAyB,EAAnB2B,UAAUN,OAAaM,UAAU,GAAK9H,MAC9E,CAEDoB,IAAK,SAASA,IAAIoB,GAChB,IAAI+nB,EAAQD,EAAOE,SAAS5a,EAASzJ,KAR/B,OAQ2C3D,GACjD,OAAO+nB,GAASA,EAAMxW,GAGxBvE,IAAK,SAASA,IAAIhN,EAAKyC,GACrB,OAAOqlB,EAAO/S,IAAI3H,EAASzJ,KAbrB,OAayC,IAAR3D,EAAY,EAAIA,EAAKyC,KAE7DqlB,GAAQ,IAKL,SAAUhqB,EAAQD,EAASF,GAIjC,IAAI0E,EAAK1E,EAAoB,GAAG2E,EAC5BmE,EAAS9I,EAAoB,IAC7B6K,EAAc7K,EAAoB,IAClCgC,EAAMhC,EAAoB,IAC1B2K,EAAa3K,EAAoB,IACjCgc,EAAQhc,EAAoB,IAC5BsqB,EAActqB,EAAoB,IAClCmQ,EAAOnQ,EAAoB,IAC3B2L,EAAa3L,EAAoB,IACjC+W,EAAc/W,EAAoB,GAClC8V,EAAU9V,EAAoB,IAAI8V,QAClCrG,EAAWzP,EAAoB,IAC/BuqB,EAAOxT,EAAc,KAAO,OAE5BsT,EAAW,SAAU7iB,EAAMnF,GAE7B,IACI+nB,EADAlhB,EAAQ4M,EAAQzT,GAEpB,GAAc,MAAV6G,EAAe,OAAO1B,EAAKiY,GAAGvW,GAElC,IAAKkhB,EAAQ5iB,EAAKgjB,GAAIJ,EAAOA,EAAQA,EAAMlpB,EACzC,GAAIkpB,EAAMlM,GAAK7b,EAAK,OAAO+nB,GAI/BjqB,EAAOD,QAAU,CACf4c,eAAgB,SAAU5J,EAAShM,EAAMsB,EAAQ4T,GAC/C,IAAI1M,EAAIwD,EAAQ,SAAU1L,EAAMiP,GAC9B9L,EAAWnD,EAAMkI,EAAGxI,EAAM,MAC1BM,EAAK2P,GAAKjQ,EACVM,EAAKiY,GAAK3W,EAAO,MACjBtB,EAAKgjB,GAAK3qB,GACV2H,EAAKijB,GAAK5qB,GACV2H,EAAK+iB,GAAQ,EACT9T,GAAY5W,IAAWmc,EAAMvF,EAAUjO,EAAQhB,EAAK4U,GAAQ5U,KAsDlE,OApDAqD,EAAY6E,EAAElO,UAAW,CAGvBqb,MAAO,SAASA,QACd,IAAK,IAAIrV,EAAOiI,EAASzJ,KAAMkB,GAAOyM,EAAOnM,EAAKiY,GAAI2K,EAAQ5iB,EAAKgjB,GAAIJ,EAAOA,EAAQA,EAAMlpB,EAC1FkpB,EAAMM,GAAI,EACNN,EAAM1oB,IAAG0oB,EAAM1oB,EAAI0oB,EAAM1oB,EAAER,EAAIrB,WAC5B8T,EAAKyW,EAAMhqB,GAEpBoH,EAAKgjB,GAAKhjB,EAAKijB,GAAK5qB,GACpB2H,EAAK+iB,GAAQ,GAIfI,SAAU,SAAUtoB,GAClB,IAAImF,EAAOiI,EAASzJ,KAAMkB,GACtBkjB,EAAQC,EAAS7iB,EAAMnF,GAC3B,GAAI+nB,EAAO,CACT,IAAI3Z,EAAO2Z,EAAMlpB,EACb0pB,EAAOR,EAAM1oB,SACV8F,EAAKiY,GAAG2K,EAAMhqB,GACrBgqB,EAAMM,GAAI,EACNE,IAAMA,EAAK1pB,EAAIuP,GACfA,IAAMA,EAAK/O,EAAIkpB,GACfpjB,EAAKgjB,IAAMJ,IAAO5iB,EAAKgjB,GAAK/Z,GAC5BjJ,EAAKijB,IAAML,IAAO5iB,EAAKijB,GAAKG,GAChCpjB,EAAK+iB,KACL,QAASH,GAIb5Y,QAAS,SAASA,QAAQxI,GACxByG,EAASzJ,KAAMkB,GAGf,IAFA,IACIkjB,EADAzlB,EAAI3C,EAAIgH,EAA+B,EAAnBrB,UAAUN,OAAaM,UAAU,GAAK9H,GAAW,GAElEuqB,EAAQA,EAAQA,EAAMlpB,EAAI8E,KAAKwkB,IAGpC,IAFA7lB,EAAEylB,EAAMxW,EAAGwW,EAAMlM,EAAGlY,MAEbokB,GAASA,EAAMM,GAAGN,EAAQA,EAAM1oB,GAK3CyD,IAAK,SAASA,IAAI9C,GAChB,QAASgoB,EAAS5a,EAASzJ,KAAMkB,GAAO7E,MAGxC0U,GAAarS,EAAGgL,EAAElO,UAAW,OAAQ,CACvCP,IAAK,WACH,OAAOwO,EAASzJ,KAAMkB,GAAMqjB,MAGzB7a,GAET0H,IAAK,SAAU5P,EAAMnF,EAAKyC,GACxB,IACI8lB,EAAM1hB,EADNkhB,EAAQC,EAAS7iB,EAAMnF,GAoBzB,OAjBE+nB,EACFA,EAAMxW,EAAI9O,GAGV0C,EAAKijB,GAAKL,EAAQ,CAChBhqB,EAAG8I,EAAQ4M,EAAQzT,GAAK,GACxB6b,EAAG7b,EACHuR,EAAG9O,EACHpD,EAAGkpB,EAAOpjB,EAAKijB,GACfvpB,EAAGrB,GACH6qB,GAAG,GAEAljB,EAAKgjB,KAAIhjB,EAAKgjB,GAAKJ,GACpBQ,IAAMA,EAAK1pB,EAAIkpB,GACnB5iB,EAAK+iB,KAES,MAAVrhB,IAAe1B,EAAKiY,GAAGvW,GAASkhB,IAC7B5iB,GAEX6iB,SAAUA,EACVtN,UAAW,SAAUrN,EAAGxI,EAAMsB,GAG5B8hB,EAAY5a,EAAGxI,EAAM,SAAUsY,EAAU1F,GACvC9T,KAAKmR,GAAK1H,EAAS+P,EAAUtY,GAC7BlB,KAAK0Z,GAAK5F,EACV9T,KAAKykB,GAAK5qB,IACT,WAKD,IAJA,IAAI2H,EAAOxB,KACP8T,EAAOtS,EAAKkY,GACZ0K,EAAQ5iB,EAAKijB,GAEVL,GAASA,EAAMM,GAAGN,EAAQA,EAAM1oB,EAEvC,OAAK8F,EAAK2P,KAAQ3P,EAAKijB,GAAKL,EAAQA,EAAQA,EAAMlpB,EAAIsG,EAAK2P,GAAGqT,IAMnCra,EAAK,EAApB,QAAR2J,EAA+BsQ,EAAMlM,EAC7B,UAARpE,EAAiCsQ,EAAMxW,EAC5B,CAACwW,EAAMlM,EAAGkM,EAAMxW,KAN7BpM,EAAK2P,GAAKtX,GACHsQ,EAAK,KAMb3H,EAAS,UAAY,UAAWA,GAAQ,GAG3CmD,EAAWzE,MAOT,SAAU/G,EAAQD,EAASF,GAIjC,IAAImqB,EAASnqB,EAAoB,KAC7ByP,EAAWzP,EAAoB,IAInCG,EAAOD,QAAUF,EAAoB,GAApBA,CAHP,MAGoC,SAAUiB,GACtD,OAAO,SAAS4pB,MAAQ,OAAO5pB,EAAI+E,KAAyB,EAAnB2B,UAAUN,OAAaM,UAAU,GAAK9H,MAC9E,CAEDyc,IAAK,SAASA,IAAIxX,GAChB,OAAOqlB,EAAO/S,IAAI3H,EAASzJ,KARrB,OAQiClB,EAAkB,IAAVA,EAAc,EAAIA,EAAOA,KAEzEqlB,IAKG,SAAUhqB,EAAQD,EAASF,GAIjC,IAcI8qB,EAdAlpB,EAAS5B,EAAoB,GAC7B+qB,EAAO/qB,EAAoB,GAApBA,CAAwB,GAC/B+B,EAAW/B,EAAoB,IAC/B4V,EAAO5V,EAAoB,IAC3Bie,EAASje,EAAoB,IAC7BgrB,EAAOhrB,EAAoB,KAC3BwD,EAAWxD,EAAoB,GAC/ByP,EAAWzP,EAAoB,IAC/BirB,EAAkBjrB,EAAoB,IACtCkrB,GAAWtpB,EAAOupB,eAAiB,kBAAmBvpB,EACtDwpB,EAAW,UACXrV,EAAUH,EAAKG,QACfR,EAAe1U,OAAO0U,aACtB8V,EAAsBL,EAAKM,QAG3BpY,EAAU,SAAUjS,GACtB,OAAO,SAASsqB,UACd,OAAOtqB,EAAI+E,KAAyB,EAAnB2B,UAAUN,OAAaM,UAAU,GAAK9H,MAIvD8Z,EAAU,CAEZ1Y,IAAK,SAASA,IAAIoB,GAChB,GAAImB,EAASnB,GAAM,CACjB,IAAIsR,EAAOoC,EAAQ1T,GACnB,OAAa,IAATsR,EAAsB0X,EAAoB5b,EAASzJ,KAAMolB,IAAWnqB,IAAIoB,GACrEsR,EAAOA,EAAK3N,KAAKyZ,IAAM5f,KAIlCwP,IAAK,SAASA,IAAIhN,EAAKyC,GACrB,OAAOkmB,EAAK5T,IAAI3H,EAASzJ,KAAMolB,GAAW/oB,EAAKyC,KAK/C0mB,EAAWrrB,EAAOD,QAAUF,EAAoB,GAApBA,CAAwBorB,EAAUlY,EAASyG,EAASqR,GAAM,GAAM,GAG5FC,GAAmBC,IAErBjN,GADA6M,EAAcE,EAAKlO,eAAe5J,EAASkY,IACxB5pB,UAAWmY,GAC9B/D,EAAKC,MAAO,EACZkV,EAAK,CAAC,SAAU,MAAO,MAAO,OAAQ,SAAU1oB,GAC9C,IAAI0O,EAAQya,EAAShqB,UACjBwG,EAAS+I,EAAM1O,GACnBN,EAASgP,EAAO1O,EAAK,SAAU+B,EAAGqD,GAEhC,GAAIjE,EAASY,KAAOmR,EAAanR,GAAI,CAC9B4B,KAAKwkB,KAAIxkB,KAAKwkB,GAAK,IAAIM,GAC5B,IAAI3hB,EAASnD,KAAKwkB,GAAGnoB,GAAK+B,EAAGqD,GAC7B,MAAc,OAAPpF,EAAe2D,KAAOmD,EAE7B,OAAOnB,EAAO1H,KAAK0F,KAAM5B,EAAGqD,SAQ9B,SAAUtH,EAAQD,EAASF,GAIjC,IAAI6K,EAAc7K,EAAoB,IAClC+V,EAAU/V,EAAoB,IAAI+V,QAClCxR,EAAWvE,EAAoB,GAC/BwD,EAAWxD,EAAoB,GAC/B2K,EAAa3K,EAAoB,IACjCgc,EAAQhc,EAAoB,IAC5BqL,EAAoBrL,EAAoB,IACxCyrB,EAAOzrB,EAAoB,IAC3ByP,EAAWzP,EAAoB,IAC/B+M,EAAY1B,EAAkB,GAC9B2B,EAAiB3B,EAAkB,GACnCiK,EAAK,EAGL+V,EAAsB,SAAU7jB,GAClC,OAAOA,EAAKijB,KAAOjjB,EAAKijB,GAAK,IAAIiB,IAE/BA,EAAsB,WACxB1lB,KAAK5B,EAAI,IAEPunB,EAAqB,SAAU3nB,EAAO3B,GACxC,OAAO0K,EAAU/I,EAAMI,EAAG,SAAUX,GAClC,OAAOA,EAAG,KAAOpB,KAGrBqpB,EAAoBlqB,UAAY,CAC9BP,IAAK,SAAUoB,GACb,IAAI+nB,EAAQuB,EAAmB3lB,KAAM3D,GACrC,GAAI+nB,EAAO,OAAOA,EAAM,IAE1BjlB,IAAK,SAAU9C,GACb,QAASspB,EAAmB3lB,KAAM3D,IAEpCgN,IAAK,SAAUhN,EAAKyC,GAClB,IAAIslB,EAAQuB,EAAmB3lB,KAAM3D,GACjC+nB,EAAOA,EAAM,GAAKtlB,EACjBkB,KAAK5B,EAAEgF,KAAK,CAAC/G,EAAKyC,KAEzB6lB,SAAU,SAAUtoB,GAClB,IAAI6G,EAAQ8D,EAAehH,KAAK5B,EAAG,SAAUX,GAC3C,OAAOA,EAAG,KAAOpB,IAGnB,OADK6G,GAAOlD,KAAK5B,EAAEwnB,OAAO1iB,EAAO,MACvBA,IAId/I,EAAOD,QAAU,CACf4c,eAAgB,SAAU5J,EAAShM,EAAMsB,EAAQ4T,GAC/C,IAAI1M,EAAIwD,EAAQ,SAAU1L,EAAMiP,GAC9B9L,EAAWnD,EAAMkI,EAAGxI,EAAM,MAC1BM,EAAK2P,GAAKjQ,EACVM,EAAKiY,GAAKnK,IAENmB,IADJjP,EAAKijB,GAAK5qB,KACiBmc,EAAMvF,EAAUjO,EAAQhB,EAAK4U,GAAQ5U,KAoBlE,OAlBAqD,EAAY6E,EAAElO,UAAW,CAGvBmpB,SAAU,SAAUtoB,GAClB,IAAKmB,EAASnB,GAAM,OAAO,EAC3B,IAAIsR,EAAOoC,EAAQ1T,GACnB,OAAa,IAATsR,EAAsB0X,EAAoB5b,EAASzJ,KAAMkB,IAAe,UAAE7E,GACvEsR,GAAQ8X,EAAK9X,EAAM3N,KAAKyZ,YAAc9L,EAAK3N,KAAKyZ,KAIzDta,IAAK,SAASA,IAAI9C,GAChB,IAAKmB,EAASnB,GAAM,OAAO,EAC3B,IAAIsR,EAAOoC,EAAQ1T,GACnB,OAAa,IAATsR,EAAsB0X,EAAoB5b,EAASzJ,KAAMkB,IAAO/B,IAAI9C,GACjEsR,GAAQ8X,EAAK9X,EAAM3N,KAAKyZ,OAG5B/P,GAET0H,IAAK,SAAU5P,EAAMnF,EAAKyC,GACxB,IAAI6O,EAAOoC,EAAQxR,EAASlC,IAAM,GAGlC,OAFa,IAATsR,EAAe0X,EAAoB7jB,GAAM6H,IAAIhN,EAAKyC,GACjD6O,EAAKnM,EAAKiY,IAAM3a,EACd0C,GAET8jB,QAASD,IAML,SAAUlrB,EAAQD,EAASF,GAGjC,IAAIqE,EAAYrE,EAAoB,IAChCoI,EAAWpI,EAAoB,GACnCG,EAAOD,QAAU,SAAUuD,GACzB,GAAIA,IAAO5D,GAAW,OAAO,EAC7B,IAAIgsB,EAASxnB,EAAUZ,GACnB4D,EAASe,EAASyjB,GACtB,GAAIA,IAAWxkB,EAAQ,MAAM2E,WAAW,iBACxC,OAAO3E,IAMH,SAAUlH,EAAQD,EAASF,GAKjC,IAAI6Y,EAAU7Y,EAAoB,IAC9BwD,EAAWxD,EAAoB,GAC/BoI,EAAWpI,EAAoB,GAC/BgC,EAAMhC,EAAoB,IAC1B8rB,EAAuB9rB,EAAoB,EAApBA,CAAuB,sBAgClDG,EAAOD,QA9BP,SAAS6rB,iBAAiB9oB,EAAQoc,EAAUjd,EAAQ4pB,EAAW/a,EAAOgb,EAAOC,EAAQC,GAMnF,IALA,IAGIC,EAASC,EAHTC,EAAcrb,EACdsb,EAAc,EACdhP,IAAQ2O,GAASlqB,EAAIkqB,EAAQC,EAAS,GAGnCI,EAAcP,GAAW,CAC9B,GAAIO,KAAenqB,EAAQ,CASzB,GARAgqB,EAAU7O,EAAQA,EAAMnb,EAAOmqB,GAAcA,EAAalN,GAAYjd,EAAOmqB,GAE7EF,GAAa,EACT7oB,EAAS4oB,KAEXC,GADAA,EAAaD,EAAQN,MACOjsB,KAAcwsB,EAAaxT,EAAQuT,IAG7DC,GAAsB,EAARJ,EAChBK,EAAcP,iBAAiB9oB,EAAQoc,EAAU+M,EAAShkB,EAASgkB,EAAQ/kB,QAASilB,EAAaL,EAAQ,GAAK,MACzG,CACL,GAAmB,kBAAfK,EAAiC,MAAM5oB,YAC3CT,EAAOqpB,GAAeF,EAGxBE,IAEFC,IAEF,OAAOD,IAQH,SAAUnsB,EAAQD,EAASF,GAGjC,IAAIoI,EAAWpI,EAAoB,GAC/B4e,EAAS5e,EAAoB,IAC7B+E,EAAU/E,EAAoB,IAElCG,EAAOD,QAAU,SAAUsH,EAAMglB,EAAWC,EAAYC,GACtD,IAAIxpB,EAAI4C,OAAOf,EAAQyC,IACnBmlB,EAAezpB,EAAEmE,OACjBulB,EAAUH,IAAe5sB,GAAY,IAAMiG,OAAO2mB,GAClDI,EAAezkB,EAASokB,GAC5B,GAAIK,GAAgBF,GAA2B,IAAXC,EAAe,OAAO1pB,EAC1D,IAAI4pB,EAAUD,EAAeF,EACzBI,EAAenO,EAAOte,KAAKssB,EAAShpB,KAAKiE,KAAKilB,EAAUF,EAAQvlB,SAEpE,OAD0BylB,EAAtBC,EAAa1lB,SAAkB0lB,EAAeA,EAAanlB,MAAM,EAAGklB,IACjEJ,EAAOK,EAAe7pB,EAAIA,EAAI6pB,IAMjC,SAAU5sB,EAAQD,EAASF,GAEjC,IAAI+W,EAAc/W,EAAoB,GAClC8d,EAAU9d,EAAoB,IAC9BkG,EAAYlG,EAAoB,IAChCoe,EAASpe,EAAoB,IAAI2E,EACrCxE,EAAOD,QAAU,SAAU8sB,GACzB,OAAO,SAAUvpB,GAOf,IANA,IAKIpB,EALAuC,EAAIsB,EAAUzC,GACd8F,EAAOuU,EAAQlZ,GACfyC,EAASkC,EAAKlC,OACdjH,EAAI,EACJ+I,EAAS,GAEG/I,EAATiH,GACLhF,EAAMkH,EAAKnJ,KACN2W,IAAeqH,EAAO9d,KAAKsE,EAAGvC,IACjC8G,EAAOC,KAAK4jB,EAAY,CAAC3qB,EAAKuC,EAAEvC,IAAQuC,EAAEvC,IAG9C,OAAO8G,KAOL,SAAUhJ,EAAQD,EAASF,GAGjC,IAAIgL,EAAUhL,EAAoB,IAC9BkQ,EAAOlQ,EAAoB,KAC/BG,EAAOD,QAAU,SAAUgH,GACzB,OAAO,SAAS+lB,SACd,GAAIjiB,EAAQhF,OAASkB,EAAM,MAAMxD,UAAUwD,EAAO,yBAClD,OAAOgJ,EAAKlK,SAOV,SAAU7F,EAAQD,EAASF,GAEjC,IAAIgc,EAAQhc,EAAoB,IAEhCG,EAAOD,QAAU,SAAUkU,EAAM/F,GAC/B,IAAIlF,EAAS,GAEb,OADA6S,EAAM5H,GAAM,EAAOjL,EAAOC,KAAMD,EAAQkF,GACjClF,IAMH,SAAUhJ,EAAQD,GAGxBC,EAAOD,QAAU0D,KAAKspB,OAAS,SAASA,MAAMlO,EAAGmO,EAAOC,EAAQC,EAAQC,GACtE,OACuB,IAArB3lB,UAAUN,QAEL2X,GAAKA,GAELmO,GAASA,GAETC,GAAUA,GAEVC,GAAUA,GAEVC,GAAWA,EACT7H,IACLzG,IAAMF,UAAYE,KAAOF,SAAiBE,GACtCA,EAAImO,IAAUG,EAAUD,IAAWD,EAASD,GAASE,IAMzD,SAAUltB,EAAQD,EAASF,GAEjC,IAAIgL,EAAUhL,EAAoB,IAC9BqO,EAAWrO,EAAoB,EAApBA,CAAuB,YAClCyL,EAAYzL,EAAoB,IACpCG,EAAOD,QAAUF,EAAoB,IAAIutB,WAAa,SAAU9pB,GAC9D,IAAImB,EAAI/D,OAAO4C,GACf,OAAOmB,EAAEyJ,KAAcxO,IAClB,eAAgB+E,GAEhB6G,EAAUhK,eAAeuJ,EAAQpG,MAMlC,SAAUzE,EAAQD,EAASF,GAIjC,IAAIwtB,EAAOxtB,EAAoB,KAC3B4gB,EAAS5gB,EAAoB,IAC7BsH,EAAYtH,EAAoB,IACpCG,EAAOD,QAAU,WAOf,IANA,IAAIqH,EAAKD,EAAUtB,MACfqB,EAASM,UAAUN,OACnBomB,EAAQ,IAAInhB,MAAMjF,GAClBjH,EAAI,EACJ8U,EAAIsY,EAAKtY,EACTwY,GAAS,EACGttB,EAATiH,IAAiBomB,EAAMrtB,GAAKuH,UAAUvH,QAAU8U,IAAGwY,GAAS,GACnE,OAAO,WACL,IAIIhP,EAHArO,EAAO1I,UAAUN,OACjBgX,EAAI,EACJH,EAAI,EAER,IAAKwP,IAAWrd,EAAM,OAAOuQ,EAAOrZ,EAAIkmB,EAL7BznB,MAOX,GADA0Y,EAAO+O,EAAM7lB,QACT8lB,EAAQ,KAAerP,EAAThX,EAAYgX,IAASK,EAAKL,KAAOnJ,IAAGwJ,EAAKL,GAAK1W,UAAUuW,MAC1E,KAAcA,EAAP7N,GAAUqO,EAAKtV,KAAKzB,UAAUuW,MACrC,OAAO0C,EAAOrZ,EAAImX,EATP1Y,SAgBT,SAAU7F,EAAQD,EAASF,GAEjCG,EAAOD,QAAUF,EAAoB,IAK/B,SAAUG,EAAQD,EAASF,GAEjC,IAAI0E,EAAK1E,EAAoB,GACzBmG,EAAOnG,EAAoB,IAC3BmkB,EAAUnkB,EAAoB,IAC9BkG,EAAYlG,EAAoB,IAEpCG,EAAOD,QAAU,SAASytB,OAAO1qB,EAAQ2qB,GAKvC,IAJA,IAGIvrB,EAHAkH,EAAO4a,EAAQje,EAAU0nB,IACzBvmB,EAASkC,EAAKlC,OACdjH,EAAI,EAEQA,EAATiH,GAAY3C,EAAGC,EAAE1B,EAAQZ,EAAMkH,EAAKnJ,KAAM+F,EAAKxB,EAAEipB,EAAOvrB,IAC/D,OAAOY,IAMH,SAAU9C,EAAQD,EAASF,GAEjCA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBG,EAAOD,QAAUF,EAAoB,MAK/B,SAAUG,EAAQD,EAASF,GAKjC,IAAI4B,EAAS5B,EAAoB,GAC7BmF,EAAMnF,EAAoB,IAC1B+W,EAAc/W,EAAoB,GAClCkC,EAAUlC,EAAoB,GAC9B+B,EAAW/B,EAAoB,IAC/BoV,EAAOpV,EAAoB,IAAImI,IAC/B0lB,EAAS7tB,EAAoB,GAC7B0U,EAAS1U,EAAoB,IAC7BoZ,EAAiBpZ,EAAoB,IACrCiE,EAAMjE,EAAoB,IAC1BoL,EAAMpL,EAAoB,GAC1B2d,EAAS3d,EAAoB,IAC7B8tB,EAAY9tB,EAAoB,IAChC+tB,EAAW/tB,EAAoB,KAC/B6Y,EAAU7Y,EAAoB,IAC9BuE,EAAWvE,EAAoB,GAC/BwD,EAAWxD,EAAoB,GAC/BqG,EAAWrG,EAAoB,GAC/BkG,EAAYlG,EAAoB,IAChCyE,EAAczE,EAAoB,IAClCkF,EAAalF,EAAoB,IACjCguB,EAAUhuB,EAAoB,IAC9BiuB,EAAUjuB,EAAoB,KAC9B+L,EAAQ/L,EAAoB,IAC5BkuB,EAAQluB,EAAoB,IAC5B8L,EAAM9L,EAAoB,GAC1BqJ,EAAQrJ,EAAoB,IAC5BmG,EAAO4F,EAAMpH,EACbD,EAAKoH,EAAInH,EACTuG,EAAO+iB,EAAQtpB,EACfiZ,EAAUhc,EAAOsC,OACjBiqB,EAAQvsB,EAAOwsB,KACfC,EAAaF,GAASA,EAAMG,UAC5BrsB,EAAY,YACZssB,EAASnjB,EAAI,WACbojB,EAAepjB,EAAI,eACnBgT,EAAS,GAAGlG,qBACZuW,EAAiB/Z,EAAO,mBACxBga,EAAaha,EAAO,WACpBia,EAAYja,EAAO,cACnBnO,EAAc1F,OAAOoB,GACrB2sB,EAA+B,mBAAXhR,KAA2BsQ,EAAMvpB,EACrDkqB,EAAUjtB,EAAOitB,QAEjBC,GAAUD,IAAYA,EAAQ5sB,KAAe4sB,EAAQ5sB,GAAW8sB,UAGhEC,EAAgBjY,GAAe8W,EAAO,WACxC,OAES,GAFFG,EAAQtpB,EAAG,GAAI,IAAK,CACzBzD,IAAK,WAAc,OAAOyD,EAAGsB,KAAM,IAAK,CAAElB,MAAO,IAAKV,MACpDA,IACD,SAAUX,EAAIpB,EAAKmW,GACtB,IAAIyW,EAAY9oB,EAAKI,EAAalE,GAC9B4sB,UAAkB1oB,EAAYlE,GAClCqC,EAAGjB,EAAIpB,EAAKmW,GACRyW,GAAaxrB,IAAO8C,GAAa7B,EAAG6B,EAAalE,EAAK4sB,IACxDvqB,EAEAwqB,EAAO,SAAUpoB,GACnB,IAAIqoB,EAAMT,EAAW5nB,GAAOknB,EAAQpQ,EAAQ3b,IAE5C,OADAktB,EAAIzP,GAAK5Y,EACFqoB,GAGLC,EAAWR,GAAyC,iBAApBhR,EAAQxN,SAAuB,SAAU3M,GAC3E,MAAoB,iBAANA,GACZ,SAAUA,GACZ,OAAOA,aAAcma,GAGnBwB,EAAkB,SAASte,eAAe2C,EAAIpB,EAAKmW,GAKrD,OAJI/U,IAAO8C,GAAa6Y,EAAgBuP,EAAWtsB,EAAKmW,GACxDjU,EAASd,GACTpB,EAAMoC,EAAYpC,GAAK,GACvBkC,EAASiU,GACLrT,EAAIupB,EAAYrsB,IACbmW,EAAExX,YAIDmE,EAAI1B,EAAI8qB,IAAW9qB,EAAG8qB,GAAQlsB,KAAMoB,EAAG8qB,GAAQlsB,IAAO,GAC1DmW,EAAIwV,EAAQxV,EAAG,CAAExX,WAAYkE,EAAW,GAAG,OAJtCC,EAAI1B,EAAI8qB,IAAS7pB,EAAGjB,EAAI8qB,EAAQrpB,EAAW,EAAG,KACnDzB,EAAG8qB,GAAQlsB,IAAO,GAIX2sB,EAAcvrB,EAAIpB,EAAKmW,IACzB9T,EAAGjB,EAAIpB,EAAKmW,IAEnB6W,EAAoB,SAASvH,iBAAiBrkB,EAAIX,GACpDyB,EAASd,GAKT,IAJA,IAGIpB,EAHAkH,EAAOwkB,EAASjrB,EAAIoD,EAAUpD,IAC9B1C,EAAI,EACJC,EAAIkJ,EAAKlC,OAEFjH,EAAJC,GAAO+e,EAAgB3b,EAAIpB,EAAMkH,EAAKnJ,KAAM0C,EAAET,IACrD,OAAOoB,GAKL6rB,EAAwB,SAASpX,qBAAqB7V,GACxD,IAAIktB,EAAInR,EAAO9d,KAAK0F,KAAM3D,EAAMoC,EAAYpC,GAAK,IACjD,QAAI2D,OAASO,GAAepB,EAAIupB,EAAYrsB,KAAS8C,EAAIwpB,EAAWtsB,QAC7DktB,IAAMpqB,EAAIa,KAAM3D,KAAS8C,EAAIupB,EAAYrsB,IAAQ8C,EAAIa,KAAMuoB,IAAWvoB,KAAKuoB,GAAQlsB,KAAOktB,IAE/FC,EAA4B,SAASppB,yBAAyB3C,EAAIpB,GAGpE,GAFAoB,EAAKyC,EAAUzC,GACfpB,EAAMoC,EAAYpC,GAAK,GACnBoB,IAAO8C,IAAepB,EAAIupB,EAAYrsB,IAAS8C,EAAIwpB,EAAWtsB,GAAlE,CACA,IAAImW,EAAIrS,EAAK1C,EAAIpB,GAEjB,OADImW,IAAKrT,EAAIupB,EAAYrsB,IAAU8C,EAAI1B,EAAI8qB,IAAW9qB,EAAG8qB,GAAQlsB,KAAOmW,EAAExX,YAAa,GAChFwX,IAELiX,GAAuB,SAAS3Y,oBAAoBrT,GAKtD,IAJA,IAGIpB,EAHAwlB,EAAQ3c,EAAKhF,EAAUzC,IACvB0F,EAAS,GACT/I,EAAI,EAEcA,EAAfynB,EAAMxgB,QACNlC,EAAIupB,EAAYrsB,EAAMwlB,EAAMznB,OAASiC,GAAOksB,GAAUlsB,GAAO+S,GAAMjM,EAAOC,KAAK/G,GACpF,OAAO8G,GAEPumB,GAAyB,SAAS9W,sBAAsBnV,GAM1D,IALA,IAIIpB,EAJAstB,EAAQlsB,IAAO8C,EACfshB,EAAQ3c,EAAKykB,EAAQhB,EAAYzoB,EAAUzC,IAC3C0F,EAAS,GACT/I,EAAI,EAEcA,EAAfynB,EAAMxgB,SACPlC,EAAIupB,EAAYrsB,EAAMwlB,EAAMznB,OAAUuvB,IAAQxqB,EAAIoB,EAAalE,IAAc8G,EAAOC,KAAKslB,EAAWrsB,IACxG,OAAO8G,GAINylB,IAYH7sB,GAXA6b,EAAU,SAAS1Z,SACjB,GAAI8B,gBAAgB4X,EAAS,MAAMla,UAAU,gCAC7C,IAAIoD,EAAM7C,EAAuB,EAAnB0D,UAAUN,OAAaM,UAAU,GAAK9H,IAChD2S,EAAO,SAAU1N,GACfkB,OAASO,GAAaiM,EAAKlS,KAAKquB,EAAW7pB,GAC3CK,EAAIa,KAAMuoB,IAAWppB,EAAIa,KAAKuoB,GAASznB,KAAMd,KAAKuoB,GAAQznB,IAAO,GACrEkoB,EAAchpB,KAAMc,EAAK5B,EAAW,EAAGJ,KAGzC,OADIiS,GAAe+X,GAAQE,EAAczoB,EAAaO,EAAK,CAAE/F,cAAc,EAAMsO,IAAKmD,IAC/E0c,EAAKpoB,KAEG7E,GAAY,WAAY,SAAS8D,WAChD,OAAOC,KAAK0Z,KAGd3T,EAAMpH,EAAI6qB,EACV1jB,EAAInH,EAAIya,EACRpf,EAAoB,IAAI2E,EAAIspB,EAAQtpB,EAAI8qB,GACxCzvB,EAAoB,IAAI2E,EAAI2qB,EAC5BpB,EAAMvpB,EAAI+qB,GAEN3Y,IAAgB/W,EAAoB,KACtC+B,EAASwE,EAAa,uBAAwB+oB,GAAuB,GAGvE3R,EAAOhZ,EAAI,SAAUjE,GACnB,OAAOwuB,EAAK9jB,EAAI1K,MAIpBwB,EAAQA,EAAQU,EAAIV,EAAQoB,EAAIpB,EAAQQ,GAAKksB,EAAY,CAAE1qB,OAAQ0Z,IAEnE,IAAK,IAAIgS,GAAa,iHAGpBpqB,MAAM,KAAM6Y,GAAI,EAAuBA,GAApBuR,GAAWvoB,QAAY+D,EAAIwkB,GAAWvR,OAE3D,IAAK,IAAIwR,GAAmBxmB,EAAM+B,EAAIpH,OAAQka,GAAI,EAA6BA,GAA1B2R,GAAiBxoB,QAAaymB,EAAU+B,GAAiB3R,OAE9Ghc,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAKksB,EAAY,SAAU,CAErDkB,MAAO,SAAUztB,GACf,OAAO8C,EAAIspB,EAAgBpsB,GAAO,IAC9BosB,EAAepsB,GACfosB,EAAepsB,GAAOub,EAAQvb,IAGpC0tB,OAAQ,SAASA,OAAOZ,GACtB,IAAKC,EAASD,GAAM,MAAMzrB,UAAUyrB,EAAM,qBAC1C,IAAK,IAAI9sB,KAAOosB,EAAgB,GAAIA,EAAepsB,KAAS8sB,EAAK,OAAO9sB,GAE1E2tB,UAAW,WAAclB,GAAS,GAClCmB,UAAW,WAAcnB,GAAS,KAGpC5sB,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAKksB,EAAY,SAAU,CAErD9lB,OA/FY,SAASA,OAAOrF,EAAIX,GAChC,OAAOA,IAAMjD,GAAYmuB,EAAQvqB,GAAM4rB,EAAkBrB,EAAQvqB,GAAKX,IAgGtEhC,eAAgBse,EAEhB0I,iBAAkBuH,EAElBjpB,yBAA0BopB,EAE1B1Y,oBAAqB2Y,GAErB7W,sBAAuB8W,KAKzB,IAAIQ,GAAsBrC,EAAO,WAAcK,EAAMvpB,EAAE,KAEvDzC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAIwtB,GAAqB,SAAU,CAC7DtX,sBAAuB,SAASA,sBAAsBnV,GACpD,OAAOyqB,EAAMvpB,EAAE0B,EAAS5C,OAK5B0qB,GAASjsB,EAAQA,EAAQgB,EAAIhB,EAAQQ,IAAMksB,GAAcf,EAAO,WAC9D,IAAI3qB,EAAI0a,IAIR,MAA0B,UAAnByQ,EAAW,CAACnrB,KAA2C,MAAxBmrB,EAAW,CAAEjqB,EAAGlB,KAAyC,MAAzBmrB,EAAWxtB,OAAOqC,OACrF,OAAQ,CACXorB,UAAW,SAASA,UAAU7qB,GAI5B,IAHA,IAEIkkB,EAAUwI,EAFVzR,EAAO,CAACjb,GACRrD,EAAI,EAEkBA,EAAnBuH,UAAUN,QAAYqX,EAAKtV,KAAKzB,UAAUvH,MAEjD,GADA+vB,EAAYxI,EAAWjJ,EAAK,IACvBlb,EAASmkB,IAAalkB,IAAO5D,MAAauvB,EAAS3rB,GAMxD,OALKoV,EAAQ8O,KAAWA,EAAW,SAAUtlB,EAAKyC,GAEhD,GADwB,mBAAbqrB,IAAyBrrB,EAAQqrB,EAAU7vB,KAAK0F,KAAM3D,EAAKyC,KACjEsqB,EAAStqB,GAAQ,OAAOA,IAE/B4Z,EAAK,GAAKiJ,EACH0G,EAAW3mB,MAAMymB,EAAOzP,MAKnCd,EAAQ3b,GAAWusB,IAAiBxuB,EAAoB,GAApBA,CAAwB4d,EAAQ3b,GAAYusB,EAAc5Q,EAAQ3b,GAAWiG,SAEjHkR,EAAewE,EAAS,UAExBxE,EAAexV,KAAM,QAAQ,GAE7BwV,EAAexX,EAAOwsB,KAAM,QAAQ,IAK9B,SAAUjuB,EAAQD,EAASF,GAEjCG,EAAOD,QAAUF,EAAoB,GAApBA,CAAwB,4BAA6BoD,SAAS2C,WAKzE,SAAU5F,EAAQD,EAASF,GAGjC,IAAI8d,EAAU9d,EAAoB,IAC9B+d,EAAO/d,EAAoB,IAC3BiG,EAAMjG,EAAoB,IAC9BG,EAAOD,QAAU,SAAUuD,GACzB,IAAI0F,EAAS2U,EAAQra,GACjB0a,EAAaJ,EAAKpZ,EACtB,GAAIwZ,EAKF,IAJA,IAGI9b,EAHA+tB,EAAUjS,EAAW1a,GACrB2a,EAASnY,EAAItB,EACbvE,EAAI,EAEgBA,EAAjBgwB,EAAQ/oB,QAAgB+W,EAAO9d,KAAKmD,EAAIpB,EAAM+tB,EAAQhwB,OAAO+I,EAAOC,KAAK/G,GAChF,OAAO8G,IAML,SAAUhJ,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK1C,EAAoB,GAAI,SAAU,CAAEc,eAAgBd,EAAoB,GAAG2E,KAKtG,SAAUxE,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK1C,EAAoB,GAAI,SAAU,CAAE8nB,iBAAkB9nB,EAAoB,QAKrG,SAAUG,EAAQD,EAASF,GAGjC,IAAIkG,EAAYlG,EAAoB,IAChCwvB,EAA4BxvB,EAAoB,IAAI2E,EAExD3E,EAAoB,GAApBA,CAAwB,2BAA4B,WAClD,OAAO,SAASoG,yBAAyB3C,EAAIpB,GAC3C,OAAOmtB,EAA0BtpB,EAAUzC,GAAKpB,OAO9C,SAAUlC,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAE4F,OAAQ9I,EAAoB,OAKrD,SAAUG,EAAQD,EAASF,GAGjC,IAAIqG,EAAWrG,EAAoB,GAC/BqwB,EAAkBrwB,EAAoB,IAE1CA,EAAoB,GAApBA,CAAwB,iBAAkB,WACxC,OAAO,SAASwG,eAAe/C,GAC7B,OAAO4sB,EAAgBhqB,EAAS5C,QAO9B,SAAUtD,EAAQD,EAASF,GAGjC,IAAIqG,EAAWrG,EAAoB,GAC/BqJ,EAAQrJ,EAAoB,IAEhCA,EAAoB,GAApBA,CAAwB,OAAQ,WAC9B,OAAO,SAASuJ,KAAK9F,GACnB,OAAO4F,EAAMhD,EAAS5C,QAOpB,SAAUtD,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,sBAAuB,WAC7C,OAAOA,EAAoB,KAAK2E,KAM5B,SAAUxE,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAC/B4V,EAAO5V,EAAoB,IAAIgW,SAEnChW,EAAoB,GAApBA,CAAwB,SAAU,SAAUswB,GAC1C,OAAO,SAASC,OAAO9sB,GACrB,OAAO6sB,GAAW9sB,EAASC,GAAM6sB,EAAQ1a,EAAKnS,IAAOA,MAOnD,SAAUtD,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAC/B4V,EAAO5V,EAAoB,IAAIgW,SAEnChW,EAAoB,GAApBA,CAAwB,OAAQ,SAAUwwB,GACxC,OAAO,SAASC,KAAKhtB,GACnB,OAAO+sB,GAAShtB,EAASC,GAAM+sB,EAAM5a,EAAKnS,IAAOA,MAO/C,SAAUtD,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAC/B4V,EAAO5V,EAAoB,IAAIgW,SAEnChW,EAAoB,GAApBA,CAAwB,oBAAqB,SAAU0wB,GACrD,OAAO,SAASjb,kBAAkBhS,GAChC,OAAOitB,GAAsBltB,EAASC,GAAMitB,EAAmB9a,EAAKnS,IAAOA,MAOzE,SAAUtD,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAEnCA,EAAoB,GAApBA,CAAwB,WAAY,SAAU2wB,GAC5C,OAAO,SAASC,SAASntB,GACvB,OAAOD,EAASC,MAAMktB,GAAYA,EAAUltB,OAO1C,SAAUtD,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAEnCA,EAAoB,GAApBA,CAAwB,WAAY,SAAU6wB,GAC5C,OAAO,SAASC,SAASrtB,GACvB,OAAOD,EAASC,MAAMotB,GAAYA,EAAUptB,OAO1C,SAAUtD,EAAQD,EAASF,GAGjC,IAAIwD,EAAWxD,EAAoB,GAEnCA,EAAoB,GAApBA,CAAwB,eAAgB,SAAU+wB,GAChD,OAAO,SAASxb,aAAa9R,GAC3B,QAAOD,EAASC,MAAMstB,GAAgBA,EAActtB,QAOlD,SAAUtD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAG,SAAU,CAAEub,OAAQje,EAAoB,OAKjE,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAClCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAEua,GAAIzd,EAAoB,QAKjD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAClCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAEqb,eAAgBve,EAAoB,IAAIqP,OAKjE,SAAUlP,EAAQD,EAASF,GAKjC,IAAIgL,EAAUhL,EAAoB,IAC9BmH,EAAO,GACXA,EAAKnH,EAAoB,EAApBA,CAAuB,gBAAkB,IAC1CmH,EAAO,IAAM,cACfnH,EAAoB,GAApBA,CAAwBa,OAAOW,UAAW,WAAY,SAASuE,WAC7D,MAAO,WAAaiF,EAAQhF,MAAQ,MACnC,IAMC,SAAU7F,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQY,EAAG,WAAY,CAAEqlB,KAAMnoB,EAAoB,QAKrD,SAAUG,EAAQD,EAASF,GAEjC,IAAI0E,EAAK1E,EAAoB,GAAG2E,EAC5BqsB,EAAS5tB,SAAS5B,UAClByvB,EAAS,wBACF,SAGHD,GAAUhxB,EAAoB,IAAM0E,EAAGssB,EAHpC,OAGkD,CAC3DjwB,cAAc,EACdE,IAAK,WACH,IACE,OAAQ,GAAK+E,MAAMua,MAAM0Q,GAAQ,GACjC,MAAOltB,GACP,MAAO,QAQP,SAAU5D,EAAQD,EAASF,GAIjC,IAAIwD,EAAWxD,EAAoB,GAC/BwG,EAAiBxG,EAAoB,IACrCkxB,EAAelxB,EAAoB,EAApBA,CAAuB,eACtCmxB,EAAgB/tB,SAAS5B,UAEvB0vB,KAAgBC,GAAgBnxB,EAAoB,GAAG2E,EAAEwsB,EAAeD,EAAc,CAAEpsB,MAAO,SAAUF,GAC7G,GAAmB,mBAARoB,OAAuBxC,EAASoB,GAAI,OAAO,EACtD,IAAKpB,EAASwC,KAAKxE,WAAY,OAAOoD,aAAaoB,KAEnD,KAAOpB,EAAI4B,EAAe5B,IAAI,GAAIoB,KAAKxE,YAAcoD,EAAG,OAAO,EAC/D,OAAO,MAMH,SAAUzE,EAAQD,EAASF,GAIjC,IAAI4B,EAAS5B,EAAoB,GAC7BmF,EAAMnF,EAAoB,IAC1BiW,EAAMjW,EAAoB,IAC1Bic,EAAoBjc,EAAoB,IACxCyE,EAAczE,EAAoB,IAClC0G,EAAQ1G,EAAoB,GAC5BkL,EAAOlL,EAAoB,IAAI2E,EAC/BwB,EAAOnG,EAAoB,IAAI2E,EAC/BD,EAAK1E,EAAoB,GAAG2E,EAC5BikB,EAAQ5oB,EAAoB,IAAI8X,KAChCsZ,EAAS,SACTC,EAAUzvB,EAAOwvB,GACjB7d,EAAO8d,EACPtgB,EAAQsgB,EAAQ7vB,UAEhB8vB,EAAarb,EAAIjW,EAAoB,GAApBA,CAAwB+Q,KAAWqgB,EACpDG,EAAO,SAAUzrB,OAAOtE,UAGxBgwB,EAAW,SAAUC,GACvB,IAAIhuB,EAAKgB,EAAYgtB,GAAU,GAC/B,GAAiB,iBAANhuB,GAA8B,EAAZA,EAAG4D,OAAY,CAE1C,IACIqqB,EAAOzI,EAAO0I,EADdC,GADJnuB,EAAK8tB,EAAO9tB,EAAGqU,OAAS8Q,EAAMnlB,EAAI,IACnBsV,WAAW,GAE1B,GAAc,KAAV6Y,GAA0B,KAAVA,GAElB,GAAc,MADdF,EAAQjuB,EAAGsV,WAAW,KACQ,MAAV2Y,EAAe,OAAOjM,SACrC,GAAc,KAAVmM,EAAc,CACvB,OAAQnuB,EAAGsV,WAAW,IACpB,KAAK,GAAI,KAAK,GAAIkQ,EAAQ,EAAG0I,EAAU,GAAI,MAC3C,KAAK,GAAI,KAAK,IAAK1I,EAAQ,EAAG0I,EAAU,GAAI,MAC5C,QAAS,OAAQluB,EAEnB,IAAK,IAAoDouB,EAAhDC,EAASruB,EAAGmE,MAAM,GAAIxH,EAAI,EAAGC,EAAIyxB,EAAOzqB,OAAcjH,EAAIC,EAAGD,IAIpE,IAHAyxB,EAAOC,EAAO/Y,WAAW3Y,IAGd,IAAauxB,EAAPE,EAAgB,OAAOpM,IACxC,OAAOqD,SAASgJ,EAAQ7I,IAE5B,OAAQxlB,GAGZ,IAAK4tB,EAAQ,UAAYA,EAAQ,QAAUA,EAAQ,QAAS,CAC1DA,EAAU,SAASU,OAAOjtB,GACxB,IAAIrB,EAAKkE,UAAUN,OAAS,EAAI,EAAIvC,EAChC0C,EAAOxB,KACX,OAAOwB,aAAgB6pB,IAEjBC,EAAa5qB,EAAM,WAAcqK,EAAM7I,QAAQ5H,KAAKkH,KAAYyO,EAAIzO,IAAS4pB,GAC7EnV,EAAkB,IAAI1I,EAAKie,EAAS/tB,IAAM+D,EAAM6pB,GAAWG,EAAS/tB,IAE5E,IAAK,IAMgBpB,EANZkH,EAAOvJ,EAAoB,GAAKkL,EAAKqI,GAAQ,6KAMpD/N,MAAM,KAAM6Y,EAAI,EAAsBA,EAAd9U,EAAKlC,OAAYgX,IACrClZ,EAAIoO,EAAMlR,EAAMkH,EAAK8U,MAAQlZ,EAAIksB,EAAShvB,IAC5CqC,EAAG2sB,EAAShvB,EAAK8D,EAAKoN,EAAMlR,KAGhCgvB,EAAQ7vB,UAAYuP,GACdtK,YAAc4qB,EACpBrxB,EAAoB,GAApBA,CAAwB4B,EAAQwvB,EAAQC,KAMpC,SAAUlxB,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BqE,EAAYrE,EAAoB,IAChCgyB,EAAehyB,EAAoB,KACnC4e,EAAS5e,EAAoB,IAC7BiyB,EAAW,GAAIC,QACfpqB,EAAQlE,KAAKkE,MACb6L,EAAO,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GACvBwe,EAAQ,wCAGRC,EAAW,SAAUlxB,EAAGV,GAG1B,IAFA,IAAIJ,GAAK,EACLiyB,EAAK7xB,IACAJ,EAAI,GAEXuT,EAAKvT,IADLiyB,GAAMnxB,EAAIyS,EAAKvT,IACA,IACfiyB,EAAKvqB,EAAMuqB,EAAK,MAGhBC,EAAS,SAAUpxB,GAGrB,IAFA,IAAId,EAAI,EACJI,EAAI,EACM,KAALJ,GAEPuT,EAAKvT,GAAK0H,GADVtH,GAAKmT,EAAKvT,IACUc,GACpBV,EAAKA,EAAIU,EAAK,KAGdqxB,EAAc,WAGhB,IAFA,IAAInyB,EAAI,EACJuB,EAAI,GACM,KAALvB,GACP,GAAU,KAANuB,GAAkB,IAANvB,GAAuB,IAAZuT,EAAKvT,GAAU,CACxC,IAAIoyB,EAAI1sB,OAAO6N,EAAKvT,IACpBuB,EAAU,KAANA,EAAW6wB,EAAI7wB,EAAIid,EAAOte,KA1BzB,IA0BoC,EAAIkyB,EAAEnrB,QAAUmrB,EAE3D,OAAO7wB,GAEP6iB,EAAM,SAAUxF,EAAG9d,EAAGuxB,GACxB,OAAa,IAANvxB,EAAUuxB,EAAMvxB,EAAI,GAAM,EAAIsjB,EAAIxF,EAAG9d,EAAI,EAAGuxB,EAAMzT,GAAKwF,EAAIxF,EAAIA,EAAG9d,EAAI,EAAGuxB,IAelFvwB,EAAQA,EAAQY,EAAIZ,EAAQQ,KAAOuvB,IACV,UAAvB,KAAQC,QAAQ,IACG,MAAnB,GAAIA,QAAQ,IACS,SAArB,MAAMA,QAAQ,IACuB,yBAArC,mBAAsBA,QAAQ,MAC1BlyB,EAAoB,EAApBA,CAAuB,WAE3BiyB,EAAS3xB,KAAK,OACX,SAAU,CACb4xB,QAAS,SAASA,QAAQQ,GACxB,IAII3uB,EAAG4uB,EAAGtU,EAAGH,EAJTc,EAAIgT,EAAahsB,KAAMmsB,GACvBxtB,EAAIN,EAAUquB,GACd/wB,EAAI,GACJpB,EA3DG,IA6DP,GAAIoE,EAAI,GAAS,GAAJA,EAAQ,MAAMqH,WAAWmmB,GAEtC,GAAInT,GAAKA,EAAG,MAAO,MACnB,GAAIA,IAAM,MAAa,MAALA,EAAW,OAAOlZ,OAAOkZ,GAK3C,GAJIA,EAAI,IACNrd,EAAI,IACJqd,GAAKA,GAEC,MAAJA,EAKF,GAHA2T,GADA5uB,EArCI,SAAUib,GAGlB,IAFA,IAAI9d,EAAI,EACJ0xB,EAAK5T,EACI,MAAN4T,GACL1xB,GAAK,GACL0xB,GAAM,KAER,KAAa,GAANA,GACL1xB,GAAK,EACL0xB,GAAM,EACN,OAAO1xB,EA2BDujB,CAAIzF,EAAIwF,EAAI,EAAG,GAAI,IAAM,IACrB,EAAIxF,EAAIwF,EAAI,GAAIzgB,EAAG,GAAKib,EAAIwF,EAAI,EAAGzgB,EAAG,GAC9C4uB,GAAK,iBAEG,GADR5uB,EAAI,GAAKA,GACE,CAGT,IAFAquB,EAAS,EAAGO,GACZtU,EAAI1Z,EACQ,GAAL0Z,GACL+T,EAAS,IAAK,GACd/T,GAAK,EAIP,IAFA+T,EAAS5N,EAAI,GAAInG,EAAG,GAAI,GACxBA,EAAIta,EAAI,EACI,IAALsa,GACLiU,EAAO,GAAK,IACZjU,GAAK,GAEPiU,EAAO,GAAKjU,GACZ+T,EAAS,EAAG,GACZE,EAAO,GACP/xB,EAAIgyB,SAEJH,EAAS,EAAGO,GACZP,EAAS,IAAMruB,EAAG,GAClBxD,EAAIgyB,IAAgB3T,EAAOte,KA9FxB,IA8FmCqE,GAQxC,OAHApE,EAFM,EAAJoE,EAEEhD,IADJuc,EAAI3d,EAAE8G,SACQ1C,EAAI,KAAOia,EAAOte,KAnG3B,IAmGsCqE,EAAIuZ,GAAK3d,EAAIA,EAAEqH,MAAM,EAAGsW,EAAIvZ,GAAK,IAAMpE,EAAEqH,MAAMsW,EAAIvZ,IAE1FhD,EAAIpB,MAQR,SAAUJ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6tB,EAAS7tB,EAAoB,GAC7BgyB,EAAehyB,EAAoB,KACnC6yB,EAAe,GAAIC,YAEvB5wB,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAKmrB,EAAO,WAEtC,MAA2C,MAApCgF,EAAavyB,KAAK,EAAGT,QACvBguB,EAAO,WAEZgF,EAAavyB,KAAK,OACf,SAAU,CACbwyB,YAAa,SAASA,YAAYC,GAChC,IAAIvrB,EAAOwqB,EAAahsB,KAAM,6CAC9B,OAAO+sB,IAAclzB,GAAYgzB,EAAavyB,KAAKkH,GAAQqrB,EAAavyB,KAAKkH,EAAMurB,OAOjF,SAAU5yB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAEimB,QAASvlB,KAAK4gB,IAAI,GAAI,OAK/C,SAAUrkB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BgzB,EAAYhzB,EAAoB,GAAGyoB,SAEvCvmB,EAAQA,EAAQgB,EAAG,SAAU,CAC3BulB,SAAU,SAASA,SAAShlB,GAC1B,MAAoB,iBAANA,GAAkBuvB,EAAUvvB,OAOxC,SAAUtD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAEslB,UAAWxoB,EAAoB,QAKxD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,SAAU,CAC3B6E,MAAO,SAASA,MAAM8jB,GAEpB,OAAOA,GAAUA,MAOf,SAAU1rB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BwoB,EAAYxoB,EAAoB,KAChCukB,EAAM3gB,KAAK2gB,IAEfriB,EAAQA,EAAQgB,EAAG,SAAU,CAC3B+vB,cAAe,SAASA,cAAcpH,GACpC,OAAOrD,EAAUqD,IAAWtH,EAAIsH,IAAW,qBAOzC,SAAU1rB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAEgwB,iBAAkB,oBAK3C,SAAU/yB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAEiwB,kBAAmB,oBAK5C,SAAUhzB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B0oB,EAAc1oB,EAAoB,KAEtCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAKqvB,OAAOpJ,YAAcD,GAAc,SAAU,CAAEC,WAAYD,KAKtF,SAAUvoB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B6oB,EAAY7oB,EAAoB,KAEpCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAKqvB,OAAOjJ,UAAYD,GAAY,SAAU,CAAEC,SAAUD,KAKhF,SAAU1oB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B6oB,EAAY7oB,EAAoB,KAEpCkC,EAAQA,EAAQU,EAAIV,EAAQQ,GAAKomB,UAAYD,GAAY,CAAEC,SAAUD,KAK/D,SAAU1oB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B0oB,EAAc1oB,EAAoB,KAEtCkC,EAAQA,EAAQU,EAAIV,EAAQQ,GAAKimB,YAAcD,GAAc,CAAEC,WAAYD,KAKrE,SAAUvoB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BkpB,EAAQlpB,EAAoB,KAC5BozB,EAAOxvB,KAAKwvB,KACZC,EAASzvB,KAAK0vB,MAElBpxB,EAAQA,EAAQgB,EAAIhB,EAAQQ,IAAM2wB,GAEW,KAAxCzvB,KAAKkE,MAAMurB,EAAOtB,OAAOwB,aAEzBF,EAAOvU,WAAaA,UACtB,OAAQ,CACTwU,MAAO,SAASA,MAAMtU,GACpB,OAAQA,GAAKA,GAAK,EAAIyG,IAAU,kBAAJzG,EACxBpb,KAAK6gB,IAAIzF,GAAKpb,KAAK8gB,IACnBwE,EAAMlK,EAAI,EAAIoU,EAAKpU,EAAI,GAAKoU,EAAKpU,EAAI,QAOvC,SAAU7e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BwzB,EAAS5vB,KAAK6vB,MAOlBvxB,EAAQA,EAAQgB,EAAIhB,EAAQQ,IAAM8wB,GAA0B,EAAhB,EAAIA,EAAO,IAAS,OAAQ,CAAEC,MAL1E,SAASA,MAAMzU,GACb,OAAQyJ,SAASzJ,GAAKA,IAAW,GAALA,EAAaA,EAAI,GAAKyU,OAAOzU,GAAKpb,KAAK6gB,IAAIzF,EAAIpb,KAAKwvB,KAAKpU,EAAIA,EAAI,IAAxDA,MASjC,SAAU7e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B0zB,EAAS9vB,KAAK+vB,MAGlBzxB,EAAQA,EAAQgB,EAAIhB,EAAQQ,IAAMgxB,GAAU,EAAIA,GAAQ,GAAK,GAAI,OAAQ,CACvEC,MAAO,SAASA,MAAM3U,GACpB,OAAmB,IAAXA,GAAKA,GAAUA,EAAIpb,KAAK6gB,KAAK,EAAIzF,IAAM,EAAIA,IAAM,MAOvD,SAAU7e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B+e,EAAO/e,EAAoB,IAE/BkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzB0wB,KAAM,SAASA,KAAK5U,GAClB,OAAOD,EAAKC,GAAKA,GAAKpb,KAAK4gB,IAAI5gB,KAAK2gB,IAAIvF,GAAI,EAAI,OAO9C,SAAU7e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzB2wB,MAAO,SAASA,MAAM7U,GACpB,OAAQA,KAAO,GAAK,GAAKpb,KAAKkE,MAAMlE,KAAK6gB,IAAIzF,EAAI,IAAOpb,KAAKkwB,OAAS,OAOpE,SAAU3zB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BwC,EAAMoB,KAAKpB,IAEfN,EAAQA,EAAQgB,EAAG,OAAQ,CACzB6wB,KAAM,SAASA,KAAK/U,GAClB,OAAQxc,EAAIwc,GAAKA,GAAKxc,GAAKwc,IAAM,MAO/B,SAAU7e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bif,EAASjf,EAAoB,IAEjCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAKuc,GAAUrb,KAAKsb,OAAQ,OAAQ,CAAEA,MAAOD,KAKnE,SAAU9e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAEqmB,OAAQvpB,EAAoB,QAKnD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BukB,EAAM3gB,KAAK2gB,IAEfriB,EAAQA,EAAQgB,EAAG,OAAQ,CACzB8wB,MAAO,SAASA,MAAMC,EAAQC,GAM5B,IALA,IAIIjsB,EAAKksB,EAJLC,EAAM,EACNh0B,EAAI,EACJiQ,EAAO1I,UAAUN,OACjBgtB,EAAO,EAEJj0B,EAAIiQ,GAELgkB,GADJpsB,EAAMsc,EAAI5c,UAAUvH,QAGlBg0B,EAAMA,GADND,EAAME,EAAOpsB,GACKksB,EAAM,EACxBE,EAAOpsB,GAGPmsB,GAFe,EAANnsB,GACTksB,EAAMlsB,EAAMosB,GACCF,EACDlsB,EAEhB,OAAOosB,IAASvV,SAAWA,SAAWuV,EAAOzwB,KAAKwvB,KAAKgB,OAOrD,SAAUj0B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bs0B,EAAQ1wB,KAAK2wB,KAGjBryB,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAI1C,EAAoB,EAApBA,CAAuB,WACrD,OAAgC,GAAzBs0B,EAAM,WAAY,IAA4B,GAAhBA,EAAMjtB,SACzC,OAAQ,CACVktB,KAAM,SAASA,KAAKvV,EAAGiJ,GACrB,IAAIuM,EAAS,MACTC,GAAMzV,EACN0V,GAAMzM,EACN0M,EAAKH,EAASC,EACdG,EAAKJ,EAASE,EAClB,OAAO,EAAIC,EAAKC,IAAOJ,EAASC,IAAO,IAAMG,EAAKD,GAAMH,EAASE,IAAO,KAAO,KAAO,OAOpF,SAAUv0B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzB2xB,MAAO,SAASA,MAAM7V,GACpB,OAAOpb,KAAK6gB,IAAIzF,GAAKpb,KAAKkxB,WAOxB,SAAU30B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAEgmB,MAAOlpB,EAAoB,QAKlD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzB6xB,KAAM,SAASA,KAAK/V,GAClB,OAAOpb,KAAK6gB,IAAIzF,GAAKpb,KAAK8gB,QAOxB,SAAUvkB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAE6b,KAAM/e,EAAoB,OAKjD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bkf,EAAQlf,EAAoB,IAC5BwC,EAAMoB,KAAKpB,IAGfN,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAI1C,EAAoB,EAApBA,CAAuB,WACrD,OAA8B,QAAtB4D,KAAKoxB,MAAM,SACjB,OAAQ,CACVA,KAAM,SAASA,KAAKhW,GAClB,OAAOpb,KAAK2gB,IAAIvF,GAAKA,GAAK,GACrBE,EAAMF,GAAKE,GAAOF,IAAM,GACxBxc,EAAIwc,EAAI,GAAKxc,GAAKwc,EAAI,KAAOpb,KAAK2rB,EAAI,OAOzC,SAAUpvB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bkf,EAAQlf,EAAoB,IAC5BwC,EAAMoB,KAAKpB,IAEfN,EAAQA,EAAQgB,EAAG,OAAQ,CACzB+xB,KAAM,SAASA,KAAKjW,GAClB,IAAI5a,EAAI8a,EAAMF,GAAKA,GACfvX,EAAIyX,GAAOF,GACf,OAAO5a,GAAK0a,SAAW,EAAIrX,GAAKqX,UAAY,GAAK1a,EAAIqD,IAAMjF,EAAIwc,GAAKxc,GAAKwc,QAOvE,SAAU7e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzBgyB,MAAO,SAASA,MAAMzxB,GACpB,OAAa,EAALA,EAASG,KAAKkE,MAAQlE,KAAKiE,MAAMpE,OAOvC,SAAUtD,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B+K,EAAkB/K,EAAoB,IACtCm1B,EAAervB,OAAOqvB,aACtBC,EAAiBtvB,OAAOuvB,cAG5BnzB,EAAQA,EAAQgB,EAAIhB,EAAQQ,KAAO0yB,GAA2C,GAAzBA,EAAe/tB,QAAc,SAAU,CAE1FguB,cAAe,SAASA,cAAcrW,GAKpC,IAJA,IAGI6S,EAHA5oB,EAAM,GACNoH,EAAO1I,UAAUN,OACjBjH,EAAI,EAEMA,EAAPiQ,GAAU,CAEf,GADAwhB,GAAQlqB,UAAUvH,KACd2K,EAAgB8mB,EAAM,WAAcA,EAAM,MAAM7lB,WAAW6lB,EAAO,8BACtE5oB,EAAIG,KAAKyoB,EAAO,MACZsD,EAAatD,GACbsD,EAAyC,QAA1BtD,GAAQ,QAAY,IAAcA,EAAO,KAAQ,QAEpE,OAAO5oB,EAAIpD,KAAK,QAOhB,SAAU1F,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9BkG,EAAYlG,EAAoB,IAChCoI,EAAWpI,EAAoB,GAEnCkC,EAAQA,EAAQgB,EAAG,SAAU,CAE3BoyB,IAAK,SAASA,IAAIC,GAMhB,IALA,IAAIC,EAAMtvB,EAAUqvB,EAASD,KACzB5iB,EAAMtK,EAASotB,EAAInuB,QACnBgJ,EAAO1I,UAAUN,OACjB4B,EAAM,GACN7I,EAAI,EACKA,EAANsS,GACLzJ,EAAIG,KAAKtD,OAAO0vB,EAAIp1B,OAChBA,EAAIiQ,GAAMpH,EAAIG,KAAKtD,OAAO6B,UAAUvH,KACxC,OAAO6I,EAAIpD,KAAK,QAOhB,SAAU1F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,OAAQ,SAAU4oB,GACxC,OAAO,SAAS9Q,OACd,OAAO8Q,EAAM5iB,KAAM,OAOjB,SAAU7F,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9By1B,EAAMz1B,EAAoB,GAApBA,EAAwB,GAClCkC,EAAQA,EAAQY,EAAG,SAAU,CAE3B4yB,YAAa,SAASA,YAAY5c,GAChC,OAAO2c,EAAIzvB,KAAM8S,OAOf,SAAU3Y,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BoI,EAAWpI,EAAoB,GAC/B21B,EAAU31B,EAAoB,IAC9B41B,EAAY,WACZC,EAAY,GAAGD,GAEnB1zB,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAI1C,EAAoB,GAApBA,CAAwB41B,GAAY,SAAU,CAC5EE,SAAU,SAASA,SAAS3W,GAC1B,IAAI3X,EAAOmuB,EAAQ3vB,KAAMmZ,EAAcyW,GACnCG,EAAiC,EAAnBpuB,UAAUN,OAAaM,UAAU,GAAK9H,GACpD6S,EAAMtK,EAASZ,EAAKH,QACpB+K,EAAM2jB,IAAgBl2B,GAAY6S,EAAM9O,KAAKU,IAAI8D,EAAS2tB,GAAcrjB,GACxEsjB,EAASlwB,OAAOqZ,GACpB,OAAO0W,EACHA,EAAUv1B,KAAKkH,EAAMwuB,EAAQ5jB,GAC7B5K,EAAKI,MAAMwK,EAAM4jB,EAAO3uB,OAAQ+K,KAAS4jB,MAO3C,SAAU71B,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B21B,EAAU31B,EAAoB,IAC9Bi2B,EAAW,WAEf/zB,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAI1C,EAAoB,GAApBA,CAAwBi2B,GAAW,SAAU,CAC3EtkB,SAAU,SAASA,SAASwN,GAC1B,SAAUwW,EAAQ3vB,KAAMmZ,EAAc8W,GACnCxkB,QAAQ0N,EAAiC,EAAnBxX,UAAUN,OAAaM,UAAU,GAAK9H,QAO7D,SAAUM,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQY,EAAG,SAAU,CAE3B8b,OAAQ5e,EAAoB,OAMxB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BoI,EAAWpI,EAAoB,GAC/B21B,EAAU31B,EAAoB,IAC9Bk2B,EAAc,aACdC,EAAc,GAAGD,GAErBh0B,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAI1C,EAAoB,GAApBA,CAAwBk2B,GAAc,SAAU,CAC9EE,WAAY,SAASA,WAAWjX,GAC9B,IAAI3X,EAAOmuB,EAAQ3vB,KAAMmZ,EAAc+W,GACnChtB,EAAQd,EAASxE,KAAKU,IAAuB,EAAnBqD,UAAUN,OAAaM,UAAU,GAAK9H,GAAW2H,EAAKH,SAChF2uB,EAASlwB,OAAOqZ,GACpB,OAAOgX,EACHA,EAAY71B,KAAKkH,EAAMwuB,EAAQ9sB,GAC/B1B,EAAKI,MAAMsB,EAAOA,EAAQ8sB,EAAO3uB,UAAY2uB,MAO/C,SAAU71B,EAAQD,EAASF,GAIjC,IAAIy1B,EAAMz1B,EAAoB,GAApBA,EAAwB,GAGlCA,EAAoB,GAApBA,CAAwB8F,OAAQ,SAAU,SAAU0Z,GAClDxZ,KAAKmR,GAAKrR,OAAO0Z,GACjBxZ,KAAKyZ,GAAK,GAET,WACD,IAEI4W,EAFAzxB,EAAIoB,KAAKmR,GACTjO,EAAQlD,KAAKyZ,GAEjB,OAAa7a,EAAEyC,QAAX6B,EAA0B,CAAEpE,MAAOjF,GAAW6Q,MAAM,IACxD2lB,EAAQZ,EAAI7wB,EAAGsE,GACflD,KAAKyZ,IAAM4W,EAAMhvB,OACV,CAAEvC,MAAOuxB,EAAO3lB,MAAM,OAMzB,SAAUvQ,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,SAAU,SAAU4G,GAC1C,OAAO,SAAS0vB,OAAO51B,GACrB,OAAOkG,EAAWZ,KAAM,IAAK,OAAQtF,OAOnC,SAAUP,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,MAAO,SAAU4G,GACvC,OAAO,SAAS2vB,MACd,OAAO3vB,EAAWZ,KAAM,MAAO,GAAI,QAOjC,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,QAAS,SAAU4G,GACzC,OAAO,SAAS4vB,QACd,OAAO5vB,EAAWZ,KAAM,QAAS,GAAI,QAOnC,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,OAAQ,SAAU4G,GACxC,OAAO,SAAS6vB,OACd,OAAO7vB,EAAWZ,KAAM,IAAK,GAAI,QAO/B,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,QAAS,SAAU4G,GACzC,OAAO,SAAS8vB,QACd,OAAO9vB,EAAWZ,KAAM,KAAM,GAAI,QAOhC,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,YAAa,SAAU4G,GAC7C,OAAO,SAAS+vB,UAAUC,GACxB,OAAOhwB,EAAWZ,KAAM,OAAQ,QAAS4wB,OAOvC,SAAUz2B,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,WAAY,SAAU4G,GAC5C,OAAO,SAASiwB,SAASC,GACvB,OAAOlwB,EAAWZ,KAAM,OAAQ,OAAQ8wB,OAOtC,SAAU32B,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,UAAW,SAAU4G,GAC3C,OAAO,SAASmwB,UACd,OAAOnwB,EAAWZ,KAAM,IAAK,GAAI,QAO/B,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,OAAQ,SAAU4G,GACxC,OAAO,SAASowB,KAAKC,GACnB,OAAOrwB,EAAWZ,KAAM,IAAK,OAAQixB,OAOnC,SAAU92B,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,QAAS,SAAU4G,GACzC,OAAO,SAASswB,QACd,OAAOtwB,EAAWZ,KAAM,QAAS,GAAI,QAOnC,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,SAAU,SAAU4G,GAC1C,OAAO,SAASuwB,SACd,OAAOvwB,EAAWZ,KAAM,SAAU,GAAI,QAOpC,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,MAAO,SAAU4G,GACvC,OAAO,SAASwwB,MACd,OAAOxwB,EAAWZ,KAAM,MAAO,GAAI,QAOjC,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,MAAO,SAAU4G,GACvC,OAAO,SAASywB,MACd,OAAOzwB,EAAWZ,KAAM,MAAO,GAAI,QAOjC,SAAU7F,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,QAAS,CAAE2V,QAAS7Y,EAAoB,OAKrD,SAAUG,EAAQD,EAASF,GAIjC,IAAIgC,EAAMhC,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9BqG,EAAWrG,EAAoB,GAC/BM,EAAON,EAAoB,KAC3BiL,EAAcjL,EAAoB,IAClCoI,EAAWpI,EAAoB,GAC/Bs3B,EAAiBt3B,EAAoB,IACrCmL,EAAYnL,EAAoB,IAEpCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK1C,EAAoB,GAApBA,CAAwB,SAAUoU,GAAQ9H,MAAM4D,KAAKkE,KAAW,QAAS,CAExGlE,KAAM,SAASA,KAAKuC,GAClB,IAOIpL,EAAQ8B,EAAQgH,EAAMC,EAPtBxL,EAAIyB,EAASoM,GACb/C,EAAmB,mBAAR1J,KAAqBA,KAAOsG,MACvC+D,EAAO1I,UAAUN,OACjBiJ,EAAe,EAAPD,EAAW1I,UAAU,GAAK9H,GAClC0Q,EAAUD,IAAUzQ,GACpBqJ,EAAQ,EACRsH,EAASrF,EAAUvG,GAIvB,GAFI2L,IAASD,EAAQtO,EAAIsO,EAAc,EAAPD,EAAW1I,UAAU,GAAK9H,GAAW,IAEjE2Q,GAAU3Q,IAAe6P,GAAKpD,OAASrB,EAAYuF,GAMrD,IAAKrH,EAAS,IAAIuG,EADlBrI,EAASe,EAASxD,EAAEyC,SACkB6B,EAAT7B,EAAgB6B,IAC3CouB,EAAenuB,EAAQD,EAAOqH,EAAUD,EAAM1L,EAAEsE,GAAQA,GAAStE,EAAEsE,SANrE,IAAKkH,EAAWI,EAAOlQ,KAAKsE,GAAIuE,EAAS,IAAIuG,IAAOS,EAAOC,EAASK,QAAQC,KAAMxH,IAChFouB,EAAenuB,EAAQD,EAAOqH,EAAUjQ,EAAK8P,EAAUE,EAAO,CAACH,EAAKrL,MAAOoE,IAAQ,GAAQiH,EAAKrL,OASpG,OADAqE,EAAO9B,OAAS6B,EACTC,MAOL,SAAUhJ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9Bs3B,EAAiBt3B,EAAoB,IAGzCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAI1C,EAAoB,EAApBA,CAAuB,WACrD,SAAS0C,KACT,QAAS4J,MAAMsE,GAAGtQ,KAAKoC,aAAcA,KACnC,QAAS,CAEXkO,GAAI,SAASA,KAIX,IAHA,IAAI1H,EAAQ,EACRmH,EAAO1I,UAAUN,OACjB8B,EAAS,IAAoB,mBAARnD,KAAqBA,KAAOsG,OAAO+D,GAC9CnH,EAAPmH,GAAcinB,EAAenuB,EAAQD,EAAOvB,UAAUuB,MAE7D,OADAC,EAAO9B,OAASgJ,EACTlH,MAOL,SAAUhJ,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BkG,EAAYlG,EAAoB,IAChC8N,EAAY,GAAGjI,KAGnB3D,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK1C,EAAoB,KAAOa,SAAWb,EAAoB,GAApBA,CAAwB8N,IAAa,QAAS,CACnHjI,KAAM,SAASA,KAAK+L,GAClB,OAAO9D,EAAUxN,KAAK4F,EAAUF,MAAO4L,IAAc/R,GAAY,IAAM+R,OAOrE,SAAUzR,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6gB,EAAO7gB,EAAoB,IAC3BiW,EAAMjW,EAAoB,IAC1B+K,EAAkB/K,EAAoB,IACtCoI,EAAWpI,EAAoB,GAC/BiO,EAAa,GAAGrG,MAGpB1F,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAI1C,EAAoB,EAApBA,CAAuB,WACjD6gB,GAAM5S,EAAW3N,KAAKugB,KACxB,QAAS,CACXjZ,MAAO,SAASA,MAAMuK,EAAOC,GAC3B,IAAIM,EAAMtK,EAASpC,KAAKqB,QACpB6M,EAAQ+B,EAAIjQ,MAEhB,GADAoM,EAAMA,IAAQvS,GAAY6S,EAAMN,EACnB,SAAT8B,EAAkB,OAAOjG,EAAW3N,KAAK0F,KAAMmM,EAAOC,GAM1D,IALA,IAAInB,EAAQlG,EAAgBoH,EAAOO,GAC/B6kB,EAAOxsB,EAAgBqH,EAAKM,GAC5BokB,EAAO1uB,EAASmvB,EAAOtmB,GACvBumB,EAAS,IAAIlrB,MAAMwqB,GACnB12B,EAAI,EACDA,EAAI02B,EAAM12B,IAAKo3B,EAAOp3B,GAAc,UAAT8T,EAC9BlO,KAAKgT,OAAO/H,EAAQ7Q,GACpB4F,KAAKiL,EAAQ7Q,GACjB,OAAOo3B,MAOL,SAAUr3B,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BsH,EAAYtH,EAAoB,IAChCqG,EAAWrG,EAAoB,GAC/B0G,EAAQ1G,EAAoB,GAC5By3B,EAAQ,GAAGzpB,KACX7G,EAAO,CAAC,EAAG,EAAG,GAElBjF,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAKgE,EAAM,WAErCS,EAAK6G,KAAKnO,QACL6G,EAAM,WAEXS,EAAK6G,KAAK,UAELhO,EAAoB,GAApBA,CAAwBy3B,IAAS,QAAS,CAE/CzpB,KAAM,SAASA,KAAKiE,GAClB,OAAOA,IAAcpS,GACjB43B,EAAMn3B,KAAK+F,EAASL,OACpByxB,EAAMn3B,KAAK+F,EAASL,MAAOsB,EAAU2K,QAOvC,SAAU9R,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B03B,EAAW13B,EAAoB,GAApBA,CAAwB,GACnC23B,EAAS33B,EAAoB,GAApBA,CAAwB,GAAGwR,SAAS,GAEjDtP,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAKi1B,EAAQ,QAAS,CAEhDnmB,QAAS,SAASA,QAAQxI,GACxB,OAAO0uB,EAAS1xB,KAAMgD,EAAYrB,UAAU,QAO1C,SAAUxH,EAAQD,EAASF,GAEjC,IAAIwD,EAAWxD,EAAoB,GAC/B6Y,EAAU7Y,EAAoB,IAC9BgX,EAAUhX,EAAoB,EAApBA,CAAuB,WAErCG,EAAOD,QAAU,SAAUmf,GACzB,IAAI3P,EASF,OAREmJ,EAAQwG,KAGM,mBAFhB3P,EAAI2P,EAAS5Y,cAEkBiJ,IAAMpD,QAASuM,EAAQnJ,EAAElO,aAAakO,EAAI7P,IACrE2D,EAASkM,IAED,QADVA,EAAIA,EAAEsH,MACUtH,EAAI7P,KAEf6P,IAAM7P,GAAYyM,MAAQoD,IAM/B,SAAUvP,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B+O,EAAO/O,EAAoB,GAApBA,CAAwB,GAEnCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK1C,EAAoB,GAApBA,CAAwB,GAAG6R,KAAK,GAAO,QAAS,CAE/EA,IAAK,SAASA,IAAI7I,GAChB,OAAO+F,EAAK/I,KAAMgD,EAAYrB,UAAU,QAOtC,SAAUxH,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B43B,EAAU53B,EAAoB,GAApBA,CAAwB,GAEtCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK1C,EAAoB,GAApBA,CAAwB,GAAGoR,QAAQ,GAAO,QAAS,CAElFA,OAAQ,SAASA,OAAOpI,GACtB,OAAO4uB,EAAQ5xB,KAAMgD,EAAYrB,UAAU,QAOzC,SAAUxH,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B63B,EAAQ73B,EAAoB,GAApBA,CAAwB,GAEpCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK1C,EAAoB,GAApBA,CAAwB,GAAGgS,MAAM,GAAO,QAAS,CAEhFA,KAAM,SAASA,KAAKhJ,GAClB,OAAO6uB,EAAM7xB,KAAMgD,EAAYrB,UAAU,QAOvC,SAAUxH,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B83B,EAAS93B,EAAoB,GAApBA,CAAwB,GAErCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK1C,EAAoB,GAApBA,CAAwB,GAAGkR,OAAO,GAAO,QAAS,CAEjFA,MAAO,SAASA,MAAMlI,GACpB,OAAO8uB,EAAO9xB,KAAMgD,EAAYrB,UAAU,QAOxC,SAAUxH,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B+3B,EAAU/3B,EAAoB,KAElCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK1C,EAAoB,GAApBA,CAAwB,GAAG2N,QAAQ,GAAO,QAAS,CAElFA,OAAQ,SAASA,OAAO3E,GACtB,OAAO+uB,EAAQ/xB,KAAMgD,EAAYrB,UAAUN,OAAQM,UAAU,IAAI,OAO/D,SAAUxH,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B+3B,EAAU/3B,EAAoB,KAElCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK1C,EAAoB,GAApBA,CAAwB,GAAG6N,aAAa,GAAO,QAAS,CAEvFA,YAAa,SAASA,YAAY7E,GAChC,OAAO+uB,EAAQ/xB,KAAMgD,EAAYrB,UAAUN,OAAQM,UAAU,IAAI,OAO/D,SAAUxH,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9Bg4B,EAAWh4B,EAAoB,GAApBA,EAAwB,GACnCia,EAAU,GAAGxI,QACbwmB,IAAkBhe,GAAW,EAAI,CAAC,GAAGxI,QAAQ,GAAI,GAAK,EAE1DvP,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAKu1B,IAAkBj4B,EAAoB,GAApBA,CAAwBia,IAAW,QAAS,CAE7FxI,QAAS,SAASA,QAAQC,GACxB,OAAOumB,EAEHhe,EAAQvS,MAAM1B,KAAM2B,YAAc,EAClCqwB,EAAShyB,KAAM0L,EAAe/J,UAAU,QAO1C,SAAUxH,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BkG,EAAYlG,EAAoB,IAChCqE,EAAYrE,EAAoB,IAChCoI,EAAWpI,EAAoB,GAC/Bia,EAAU,GAAGxM,YACbwqB,IAAkBhe,GAAW,EAAI,CAAC,GAAGxM,YAAY,GAAI,GAAK,EAE9DvL,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAKu1B,IAAkBj4B,EAAoB,GAApBA,CAAwBia,IAAW,QAAS,CAE7FxM,YAAa,SAASA,YAAYiE,GAEhC,GAAIumB,EAAe,OAAOhe,EAAQvS,MAAM1B,KAAM2B,YAAc,EAC5D,IAAI/C,EAAIsB,EAAUF,MACdqB,EAASe,EAASxD,EAAEyC,QACpB6B,EAAQ7B,EAAS,EAGrB,IAFuB,EAAnBM,UAAUN,SAAY6B,EAAQtF,KAAKU,IAAI4E,EAAO7E,EAAUsD,UAAU,MAClEuB,EAAQ,IAAGA,EAAQ7B,EAAS6B,GACjB,GAATA,EAAYA,IAAS,GAAIA,KAAStE,GAAOA,EAAEsE,KAAWwI,EAAe,OAAOxI,GAAS,EAC3F,OAAQ,MAON,SAAU/I,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQY,EAAG,QAAS,CAAEkO,WAAYhR,EAAoB,OAE9DA,EAAoB,GAApBA,CAAwB,eAKlB,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQY,EAAG,QAAS,CAAEqO,KAAMnR,EAAoB,MAExDA,EAAoB,GAApBA,CAAwB,SAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9Bk4B,EAAQl4B,EAAoB,GAApBA,CAAwB,GAChCmI,EAAM,OACN4hB,GAAS,EAET5hB,IAAO,IAAImE,MAAM,GAAGnE,GAAK,WAAc4hB,GAAS,IACpD7nB,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAIqnB,EAAQ,QAAS,CAC/C1Y,KAAM,SAASA,KAAKrI,GAClB,OAAOkvB,EAAMlyB,KAAMgD,EAA+B,EAAnBrB,UAAUN,OAAaM,UAAU,GAAK9H,OAGzEG,EAAoB,GAApBA,CAAwBmI,IAKlB,SAAUhI,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9Bk4B,EAAQl4B,EAAoB,GAApBA,CAAwB,GAChCmI,EAAM,YACN4hB,GAAS,EAET5hB,IAAO,IAAImE,MAAM,GAAGnE,GAAK,WAAc4hB,GAAS,IACpD7nB,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAIqnB,EAAQ,QAAS,CAC/CxY,UAAW,SAASA,UAAUvI,GAC5B,OAAOkvB,EAAMlyB,KAAMgD,EAA+B,EAAnBrB,UAAUN,OAAaM,UAAU,GAAK9H,OAGzEG,EAAoB,GAApBA,CAAwBmI,IAKlB,SAAUhI,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,UAKlB,SAAUG,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7Bic,EAAoBjc,EAAoB,IACxC0E,EAAK1E,EAAoB,GAAG2E,EAC5BuG,EAAOlL,EAAoB,IAAI2E,EAC/BuU,EAAWlZ,EAAoB,IAC/Bm4B,EAASn4B,EAAoB,IAC7Bo4B,EAAUx2B,EAAO6V,OACjBlE,EAAO6kB,EACPrnB,EAAQqnB,EAAQ52B,UAChBoe,EAAM,KACNC,EAAM,KAENwY,EAAc,IAAID,EAAQxY,KAASA,EAEvC,GAAI5f,EAAoB,MAAQq4B,GAAer4B,EAAoB,EAApBA,CAAuB,WAGpE,OAFA6f,EAAI7f,EAAoB,EAApBA,CAAuB,WAAY,EAEhCo4B,EAAQxY,IAAQA,GAAOwY,EAAQvY,IAAQA,GAA4B,QAArBuY,EAAQxY,EAAK,QAC/D,CACHwY,EAAU,SAAS3gB,OAAO/V,EAAGiD,GAC3B,IAAI2zB,EAAOtyB,gBAAgBoyB,EACvBG,EAAOrf,EAASxX,GAChB82B,EAAM7zB,IAAM9E,GAChB,OAAQy4B,GAAQC,GAAQ72B,EAAE+E,cAAgB2xB,GAAWI,EAAM92B,EACvDua,EAAkBoc,EAChB,IAAI9kB,EAAKglB,IAASC,EAAM92B,EAAEU,OAASV,EAAGiD,GACtC4O,GAAMglB,EAAO72B,aAAa02B,GAAW12B,EAAEU,OAASV,EAAG62B,GAAQC,EAAML,EAAO73B,KAAKoB,GAAKiD,GACpF2zB,EAAOtyB,KAAO+K,EAAOqnB,IAS3B,IAPA,IAAIK,EAAQ,SAAUp2B,GACpBA,KAAO+1B,GAAW1zB,EAAG0zB,EAAS/1B,EAAK,CACjCtB,cAAc,EACdE,IAAK,WAAc,OAAOsS,EAAKlR,IAC/BgN,IAAK,SAAU5L,GAAM8P,EAAKlR,GAAOoB,MAG5B8F,EAAO2B,EAAKqI,GAAOnT,EAAI,EAAiBA,EAAdmJ,EAAKlC,QAAaoxB,EAAMlvB,EAAKnJ,OAChE2Q,EAAMtK,YAAc2xB,GACZ52B,UAAYuP,EACpB/Q,EAAoB,GAApBA,CAAwB4B,EAAQ,SAAUw2B,GAG5Cp4B,EAAoB,GAApBA,CAAwB,WAKlB,SAAUG,EAAQD,EAASF,GAIjCA,EAAoB,KACpB,IAAIuE,EAAWvE,EAAoB,GAC/Bm4B,EAASn4B,EAAoB,IAC7B+W,EAAc/W,EAAoB,GAClCsF,EAAY,WACZD,EAAY,IAAIC,GAEhBqoB,EAAS,SAAUpmB,GACrBvH,EAAoB,GAApBA,CAAwByX,OAAOjW,UAAW8D,EAAWiC,GAAI,IAIvDvH,EAAoB,EAApBA,CAAuB,WAAc,MAAsD,QAA/CqF,EAAU/E,KAAK,CAAE8B,OAAQ,IAAK4nB,MAAO,QACnF2D,EAAO,SAAS5nB,WACd,IAAIxC,EAAIgB,EAASyB,MACjB,MAAO,IAAIqO,OAAO9Q,EAAEnB,OAAQ,IAC1B,UAAWmB,EAAIA,EAAEymB,OAASjT,GAAexT,aAAakU,OAAS0gB,EAAO73B,KAAKiD,GAAK1D,MAG3EwF,EAAU3E,MAAQ4E,GAC3BqoB,EAAO,SAAS5nB,WACd,OAAOV,EAAU/E,KAAK0F,SAOpB,SAAU7F,EAAQD,EAASF,GAKjC,IAAIuE,EAAWvE,EAAoB;EAC/BoI,EAAWpI,EAAoB,GAC/B04B,EAAqB14B,EAAoB,IACzC24B,EAAa34B,EAAoB,IAGrCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU+E,EAASkU,EAAO2f,EAAQrd,GACpE,MAAO,CAGL,SAASgF,MAAM9E,GACb,IAAI7W,EAAIG,EAAQiB,MACZuB,EAAKkU,GAAU5b,GAAYA,GAAY4b,EAAOxC,GAClD,OAAO1R,IAAO1H,GAAY0H,EAAGjH,KAAKmb,EAAQ7W,GAAK,IAAI6S,OAAOgE,GAAQxC,GAAOnT,OAAOlB,KAIlF,SAAU6W,GACR,IAAIxS,EAAMsS,EAAgBqd,EAAQnd,EAAQzV,MAC1C,GAAIiD,EAAIyH,KAAM,OAAOzH,EAAInE,MACzB,IAAI+zB,EAAKt0B,EAASkX,GACdvY,EAAI4C,OAAOE,MACf,IAAK6yB,EAAGj3B,OAAQ,OAAO+2B,EAAWE,EAAI31B,GAMtC,IALA,IAIIiG,EAJA2vB,EAAcD,EAAGvgB,QAEjB+E,EAAI,GACJnc,EAFJ23B,EAAGxY,UAAY,EAIyB,QAAhClX,EAASwvB,EAAWE,EAAI31B,KAAc,CAC5C,IAAI61B,EAAWjzB,OAAOqD,EAAO,IAEZ,MADjBkU,EAAEnc,GAAK63B,KACcF,EAAGxY,UAAYqY,EAAmBx1B,EAAGkF,EAASywB,EAAGxY,WAAYyY,IAClF53B,IAEF,OAAa,IAANA,EAAU,KAAOmc,OAQxB,SAAUld,EAAQD,EAASF,GAKjC,IAAIuE,EAAWvE,EAAoB,GAC/BqG,EAAWrG,EAAoB,GAC/BoI,EAAWpI,EAAoB,GAC/BqE,EAAYrE,EAAoB,IAChC04B,EAAqB14B,EAAoB,IACzC24B,EAAa34B,EAAoB,IACjC4W,EAAMhT,KAAKgT,IACXtS,EAAMV,KAAKU,IACXwD,EAAQlE,KAAKkE,MACbkxB,EAAuB,4BACvBC,EAAgC,oBAOpCj5B,EAAoB,GAApBA,CAAwB,UAAW,EAAG,SAAU+E,EAASm0B,EAASC,EAAU5d,GAC1E,MAAO,CAGL,SAAStU,QAAQmyB,EAAaC,GAC5B,IAAIz0B,EAAIG,EAAQiB,MACZuB,EAAK6xB,GAAev5B,GAAYA,GAAYu5B,EAAYF,GAC5D,OAAO3xB,IAAO1H,GACV0H,EAAGjH,KAAK84B,EAAax0B,EAAGy0B,GACxBF,EAAS74B,KAAKwF,OAAOlB,GAAIw0B,EAAaC,IAI5C,SAAU5d,EAAQ4d,GAChB,IAAIpwB,EAAMsS,EAAgB4d,EAAU1d,EAAQzV,KAAMqzB,GAClD,GAAIpwB,EAAIyH,KAAM,OAAOzH,EAAInE,MAEzB,IAAI+zB,EAAKt0B,EAASkX,GACdvY,EAAI4C,OAAOE,MACXszB,EAA4C,mBAAjBD,EAC1BC,IAAmBD,EAAevzB,OAAOuzB,IAC9C,IAAIz3B,EAASi3B,EAAGj3B,OAChB,GAAIA,EAAQ,CACV,IAAIk3B,EAAcD,EAAGvgB,QACrBugB,EAAGxY,UAAY,EAGjB,IADA,IAAIkZ,EAAU,KACD,CACX,IAAIpwB,EAASwvB,EAAWE,EAAI31B,GAC5B,GAAe,OAAXiG,EAAiB,MAErB,GADAowB,EAAQnwB,KAAKD,IACRvH,EAAQ,MAEI,KADFkE,OAAOqD,EAAO,MACR0vB,EAAGxY,UAAYqY,EAAmBx1B,EAAGkF,EAASywB,EAAGxY,WAAYyY,IAIpF,IAFA,IAxCwBr1B,EAwCpB+1B,EAAoB,GACpBC,EAAqB,EAChBr5B,EAAI,EAAGA,EAAIm5B,EAAQlyB,OAAQjH,IAAK,CACvC+I,EAASowB,EAAQn5B,GASjB,IARA,IAAIs5B,EAAU5zB,OAAOqD,EAAO,IACxBwwB,EAAW/iB,EAAItS,EAAID,EAAU8E,EAAOD,OAAQhG,EAAEmE,QAAS,GACvDuyB,EAAW,GAMNvb,EAAI,EAAGA,EAAIlV,EAAO9B,OAAQgX,IAAKub,EAASxwB,MApD3B3F,EAoD8C0F,EAAOkV,MAnDnExe,GAAY4D,EAAKqC,OAAOrC,IAoDhC,IAAIo2B,EAAgB1wB,EAAO2R,OAC3B,GAAIwe,EAAmB,CACrB,IAAIQ,EAAe,CAACJ,GAASrlB,OAAOulB,EAAUD,EAAUz2B,GACpD22B,IAAkBh6B,IAAWi6B,EAAa1wB,KAAKywB,GACnD,IAAIE,EAAcj0B,OAAOuzB,EAAa3xB,MAAM7H,GAAWi6B,SAEvDC,EAAcC,gBAAgBN,EAASx2B,EAAGy2B,EAAUC,EAAUC,EAAeR,GAE/DI,GAAZE,IACFH,GAAqBt2B,EAAE0E,MAAM6xB,EAAoBE,GAAYI,EAC7DN,EAAqBE,EAAWD,EAAQryB,QAG5C,OAAOmyB,EAAoBt2B,EAAE0E,MAAM6xB,KAKvC,SAASO,gBAAgBN,EAAShe,EAAKie,EAAUC,EAAUC,EAAeE,GACxE,IAAIE,EAAUN,EAAWD,EAAQryB,OAC7B9G,EAAIq5B,EAASvyB,OACb+oB,EAAU6I,EAKd,OAJIY,IAAkBh6B,KACpBg6B,EAAgBxzB,EAASwzB,GACzBzJ,EAAU4I,GAELG,EAAS74B,KAAKy5B,EAAa3J,EAAS,SAAU7P,EAAO2Z,GAC1D,IAAIC,EACJ,OAAQD,EAAGlhB,OAAO,IAChB,IAAK,IAAK,MAAO,IACjB,IAAK,IAAK,OAAO0gB,EACjB,IAAK,IAAK,OAAOhe,EAAI9T,MAAM,EAAG+xB,GAC9B,IAAK,IAAK,OAAOje,EAAI9T,MAAMqyB,GAC3B,IAAK,IACHE,EAAUN,EAAcK,EAAGtyB,MAAM,GAAI,IACrC,MACF,QACE,IAAI1G,GAAKg5B,EACT,GAAU,IAANh5B,EAAS,OAAOqf,EACpB,GAAQhgB,EAAJW,EAAO,CACT,IAAIyD,EAAImD,EAAM5G,EAAI,IAClB,OAAU,IAANyD,EAAgB4b,EAChB5b,GAAKpE,EAAUq5B,EAASj1B,EAAI,KAAO9E,GAAYq6B,EAAGlhB,OAAO,GAAK4gB,EAASj1B,EAAI,GAAKu1B,EAAGlhB,OAAO,GACvFuH,EAET4Z,EAAUP,EAAS14B,EAAI,GAE3B,OAAOi5B,IAAYt6B,GAAY,GAAKs6B,QAQpC,SAAUh6B,EAAQD,EAASF,GAKjC,IAAIuE,EAAWvE,EAAoB,GAC/Bo6B,EAAYp6B,EAAoB,KAChC24B,EAAa34B,EAAoB,IAGrCA,EAAoB,GAApBA,CAAwB,SAAU,EAAG,SAAU+E,EAASs1B,EAAQC,EAAS/e,GACvE,MAAO,CAGL,SAASya,OAAOva,GACd,IAAI7W,EAAIG,EAAQiB,MACZuB,EAAKkU,GAAU5b,GAAYA,GAAY4b,EAAO4e,GAClD,OAAO9yB,IAAO1H,GAAY0H,EAAGjH,KAAKmb,EAAQ7W,GAAK,IAAI6S,OAAOgE,GAAQ4e,GAAQv0B,OAAOlB,KAInF,SAAU6W,GACR,IAAIxS,EAAMsS,EAAgB+e,EAAS7e,EAAQzV,MAC3C,GAAIiD,EAAIyH,KAAM,OAAOzH,EAAInE,MACzB,IAAI+zB,EAAKt0B,EAASkX,GACdvY,EAAI4C,OAAOE,MACXu0B,EAAoB1B,EAAGxY,UACtB+Z,EAAUG,EAAmB,KAAI1B,EAAGxY,UAAY,GACrD,IAAIlX,EAASwvB,EAAWE,EAAI31B,GAE5B,OADKk3B,EAAUvB,EAAGxY,UAAWka,KAAoB1B,EAAGxY,UAAYka,GAC9C,OAAXpxB,GAAmB,EAAIA,EAAOD,WAQrC,SAAU/I,EAAQD,EAASF,GAKjC,IAAIkZ,EAAWlZ,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/BuL,EAAqBvL,EAAoB,IACzC04B,EAAqB14B,EAAoB,IACzCoI,EAAWpI,EAAoB,GAC/Bw6B,EAAiBx6B,EAAoB,IACrC2a,EAAa3a,EAAoB,IACjC0G,EAAQ1G,EAAoB,GAC5By6B,EAAO72B,KAAKU,IACZo2B,EAAQ,GAAGtxB,KACXuxB,EAAS,QACTC,EAAS,SACT1a,EAAa,YACb2a,EAAa,WAGbC,GAAcp0B,EAAM,WAAc+Q,OAAOojB,EAAY,OAGzD76B,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU+E,EAASg2B,EAAOC,EAAQzf,GACpE,IAAI0f,EAkDJ,OAxCEA,EAR6B,KAA7B,OAAON,GAAQ,QAAQ,IACe,GAAtC,OAAOA,GAAQ,QAAS,GAAGC,IACQ,GAAnC,KAAKD,GAAQ,WAAWC,IACW,GAAnC,IAAID,GAAQ,YAAYC,IACM,EAA9B,IAAID,GAAQ,QAAQC,IACpB,GAAGD,GAAQ,MAAMC,GAGD,SAAUhpB,EAAWspB,GACnC,IAAIr0B,EAASf,OAAOE,MACpB,GAAI4L,IAAc/R,IAAuB,IAAVq7B,EAAa,MAAO,GAEnD,IAAKhiB,EAAStH,GAAY,OAAOopB,EAAO16B,KAAKuG,EAAQ+K,EAAWspB,GAWhE,IAVA,IASI3a,EAAOF,EAAW8a,EATlBC,EAAS,GAKTC,EAAgB,EAChBC,EAAaJ,IAAUr7B,GAAYg7B,EAAaK,IAAU,EAE1DK,EAAgB,IAAI9jB,OAAO7F,EAAUxP,QAP5BwP,EAAUwG,WAAa,IAAM,KAC7BxG,EAAUyG,UAAY,IAAM,KAC5BzG,EAAU0G,QAAU,IAAM,KAC1B1G,EAAU2G,OAAS,IAAM,IAImB,MAElDgI,EAAQ5F,EAAWra,KAAKi7B,EAAe10B,OAE5Bw0B,GADhBhb,EAAYkb,EAAcrb,MAExBkb,EAAOhyB,KAAKvC,EAAOe,MAAMyzB,EAAe9a,EAAMrX,QAC1B,EAAhBqX,EAAMqa,IAAera,EAAMrX,MAAQrC,EAAO+zB,IAASF,EAAMhzB,MAAM0zB,EAAQ7a,EAAM3Y,MAAM,IACvFuzB,EAAa5a,EAAM,GAAGqa,GACtBS,EAAgBhb,EACMib,GAAlBF,EAAOR,MAETW,EAAcrb,KAAgBK,EAAMrX,OAAOqyB,EAAcrb,KAK/D,OAHImb,IAAkBx0B,EAAO+zB,IACvBO,GAAeI,EAAcp0B,KAAK,KAAKi0B,EAAOhyB,KAAK,IAClDgyB,EAAOhyB,KAAKvC,EAAOe,MAAMyzB,IACRC,EAAjBF,EAAOR,GAAuBQ,EAAOxzB,MAAM,EAAG0zB,GAAcF,GAG5D,IAAIT,GAAQ96B,GAAW,GAAG+6B,GACnB,SAAUhpB,EAAWspB,GACnC,OAAOtpB,IAAc/R,IAAuB,IAAVq7B,EAAc,GAAKF,EAAO16B,KAAK0F,KAAM4L,EAAWspB,IAGpEF,EAGX,CAGL,SAASx1B,MAAMoM,EAAWspB,GACxB,IAAIt2B,EAAIG,EAAQiB,MACZw1B,EAAW5pB,GAAa/R,GAAYA,GAAY+R,EAAUmpB,GAC9D,OAAOS,IAAa37B,GAChB27B,EAASl7B,KAAKsR,EAAWhN,EAAGs2B,GAC5BD,EAAc36B,KAAKwF,OAAOlB,GAAIgN,EAAWspB,IAO/C,SAAUzf,EAAQyf,GAChB,IAAIjyB,EAAMsS,EAAgB0f,EAAexf,EAAQzV,KAAMk1B,EAAOD,IAAkBD,GAChF,GAAI/xB,EAAIyH,KAAM,OAAOzH,EAAInE,MAEzB,IAAI+zB,EAAKt0B,EAASkX,GACdvY,EAAI4C,OAAOE,MACX0J,EAAInE,EAAmBstB,EAAIphB,QAE3BgkB,EAAkB5C,EAAGvgB,QAQrBkjB,EAAW,IAAI9rB,EAAEorB,EAAajC,EAAK,OAASA,EAAGz2B,OAAS,KAP/Cy2B,EAAGzgB,WAAa,IAAM,KACtBygB,EAAGxgB,UAAY,IAAM,KACrBwgB,EAAGvgB,QAAU,IAAM,KACnBwiB,EAAa,IAAM,MAK5BY,EAAMR,IAAUr7B,GAAYg7B,EAAaK,IAAU,EACvD,GAAY,IAARQ,EAAW,MAAO,GACtB,GAAiB,IAAbx4B,EAAEmE,OAAc,OAAuC,OAAhCmzB,EAAegB,EAAUt4B,GAAc,CAACA,GAAK,GAIxE,IAHA,IAAIxB,EAAI,EACJi6B,EAAI,EACJte,EAAI,GACDse,EAAIz4B,EAAEmE,QAAQ,CACnBm0B,EAASnb,UAAYya,EAAaa,EAAI,EACtC,IACI53B,EADA4uB,EAAI6H,EAAegB,EAAUV,EAAa53B,EAAIA,EAAE0E,MAAM+zB,IAE1D,GACQ,OAANhJ,IACC5uB,EAAI02B,EAAKryB,EAASozB,EAASnb,WAAaya,EAAa,EAAIa,IAAKz4B,EAAEmE,WAAa3F,EAE9Ei6B,EAAIjD,EAAmBx1B,EAAGy4B,EAAGF,OACxB,CAEL,GADApe,EAAEjU,KAAKlG,EAAE0E,MAAMlG,EAAGi6B,IACdte,EAAEhW,SAAWq0B,EAAK,OAAOre,EAC7B,IAAK,IAAIjd,EAAI,EAAGA,GAAKuyB,EAAEtrB,OAAS,EAAGjH,IAEjC,GADAid,EAAEjU,KAAKupB,EAAEvyB,IACLid,EAAEhW,SAAWq0B,EAAK,OAAOre,EAE/Bse,EAAIj6B,EAAIqC,GAIZ,OADAsZ,EAAEjU,KAAKlG,EAAE0E,MAAMlG,IACR2b,OAQP,SAAUld,EAAQD,EAASF,GAIjC,IAwBI47B,EAAUC,EAA6BC,EAAsBC,EAxB7DvxB,EAAUxK,EAAoB,IAC9B4B,EAAS5B,EAAoB,GAC7BgC,EAAMhC,EAAoB,IAC1BgL,EAAUhL,EAAoB,IAC9BkC,EAAUlC,EAAoB,GAC9BwD,EAAWxD,EAAoB,GAC/BsH,EAAYtH,EAAoB,IAChC2K,EAAa3K,EAAoB,IACjCgc,EAAQhc,EAAoB,IAC5BuL,EAAqBvL,EAAoB,IACzC6jB,EAAO7jB,EAAoB,IAAIqP,IAC/B2sB,EAAYh8B,EAAoB,GAApBA,GACZi8B,EAA6Bj8B,EAAoB,IACjDk8B,EAAUl8B,EAAoB,KAC9B+b,EAAY/b,EAAoB,IAChCm8B,EAAiBn8B,EAAoB,KACrCo8B,EAAU,UACV14B,EAAY9B,EAAO8B,UACnBqd,EAAUnf,EAAOmf,QACjBsb,EAAWtb,GAAWA,EAAQsb,SAC9BC,EAAKD,GAAYA,EAASC,IAAM,GAChCC,EAAW36B,EAAOw6B,GAClBzZ,EAA6B,WAApB3X,EAAQ+V,GACjByb,EAAQ,aAERvS,EAAuB4R,EAA8BI,EAA2Bt3B,EAEhFiqB,IAAe,WACjB,IAEE,IAAItL,EAAUiZ,EAASlZ,QAAQ,GAC3BoZ,GAAenZ,EAAQ7c,YAAc,IAAIzG,EAAoB,EAApBA,CAAuB,YAAc,SAAU8D,GAC1FA,EAAK04B,EAAOA,IAGd,OAAQ7Z,GAA0C,mBAAzB+Z,wBACpBpZ,EAAQC,KAAKiZ,aAAkBC,GAIT,IAAtBH,EAAG7qB,QAAQ,SACyB,IAApCsK,EAAUtK,QAAQ,aACvB,MAAO1N,KAfQ,GAmBf44B,EAAa,SAAUl5B,GACzB,IAAI8f,EACJ,SAAO/f,EAASC,IAAkC,mBAAnB8f,EAAO9f,EAAG8f,QAAsBA,GAE7DT,EAAS,SAAUQ,EAASsZ,GAC9B,IAAItZ,EAAQuZ,GAAZ,CACAvZ,EAAQuZ,IAAK,EACb,IAAIC,EAAQxZ,EAAQyZ,GACpBf,EAAU,WAoCR,IAnCA,IAAIl3B,EAAQwe,EAAQ0Z,GAChBC,EAAmB,GAAd3Z,EAAQ4Z,GACb98B,EAAI,EACJqhB,EAAM,SAAU0b,GAClB,IAIIh0B,EAAQoa,EAAM6Z,EAJdC,EAAUJ,EAAKE,EAASF,GAAKE,EAASG,KACtCja,EAAU8Z,EAAS9Z,QACnBU,EAASoZ,EAASpZ,OAClBd,EAASka,EAASla,OAEtB,IACMoa,GACGJ,IACe,GAAd3Z,EAAQia,IAASC,EAAkBla,GACvCA,EAAQia,GAAK,IAEC,IAAZF,EAAkBl0B,EAASrE,GAEzBme,GAAQA,EAAOE,QACnBha,EAASk0B,EAAQv4B,GACbme,IACFA,EAAOC,OACPka,GAAS,IAGTj0B,IAAWg0B,EAAS7Z,QACtBS,EAAOrgB,EAAU,yBACR6f,EAAOoZ,EAAWxzB,IAC3Boa,EAAKjjB,KAAK6I,EAAQka,EAASU,GACtBV,EAAQla,IACV4a,EAAOjf,GACd,MAAOf,GACHkf,IAAWma,GAAQna,EAAOC,OAC9Ba,EAAOhgB,KAGW3D,EAAf08B,EAAMz1B,QAAYoa,EAAIqb,EAAM18B,MACnCkjB,EAAQyZ,GAAK,GACbzZ,EAAQuZ,IAAK,EACTD,IAAatZ,EAAQia,IAAIE,EAAYna,OAGzCma,EAAc,SAAUna,GAC1BO,EAAKvjB,KAAKsB,EAAQ,WAChB,IAEIuH,EAAQk0B,EAASK,EAFjB54B,EAAQwe,EAAQ0Z,GAChBW,EAAYC,EAAYta,GAe5B,GAbIqa,IACFx0B,EAAS+yB,EAAQ,WACXvZ,EACF5B,EAAQ8c,KAAK,qBAAsB/4B,EAAOwe,IACjC+Z,EAAUz7B,EAAOk8B,sBAC1BT,EAAQ,CAAE/Z,QAASA,EAASya,OAAQj5B,KAC1B44B,EAAU97B,EAAO87B,UAAYA,EAAQM,OAC/CN,EAAQM,MAAM,8BAA+Bl5B,KAIjDwe,EAAQia,GAAK5a,GAAUib,EAAYta,GAAW,EAAI,GAClDA,EAAQ2a,GAAKp+B,GACX89B,GAAax0B,EAAOpF,EAAG,MAAMoF,EAAOyK,KAGxCgqB,EAAc,SAAUta,GAC1B,OAAsB,IAAfA,EAAQia,IAAkD,KAArCja,EAAQ2a,IAAM3a,EAAQyZ,IAAI11B,QAEpDm2B,EAAoB,SAAUla,GAChCO,EAAKvjB,KAAKsB,EAAQ,WAChB,IAAIy7B,EACA1a,EACF5B,EAAQ8c,KAAK,mBAAoBva,IACxB+Z,EAAUz7B,EAAOs8B,qBAC1Bb,EAAQ,CAAE/Z,QAASA,EAASya,OAAQza,EAAQ0Z,QAI9CmB,EAAU,SAAUr5B,GACtB,IAAIwe,EAAUtd,KACVsd,EAAQtT,KACZsT,EAAQtT,IAAK,GACbsT,EAAUA,EAAQ8a,IAAM9a,GAChB0Z,GAAKl4B,EACbwe,EAAQ4Z,GAAK,EACR5Z,EAAQ2a,KAAI3a,EAAQ2a,GAAK3a,EAAQyZ,GAAGn1B,SACzCkb,EAAOQ,GAAS,KAEd+a,EAAW,SAAUv5B,GACvB,IACIye,EADAD,EAAUtd,KAEd,IAAIsd,EAAQtT,GAAZ,CACAsT,EAAQtT,IAAK,EACbsT,EAAUA,EAAQ8a,IAAM9a,EACxB,IACE,GAAIA,IAAYxe,EAAO,MAAMpB,EAAU,qCACnC6f,EAAOoZ,EAAW73B,IACpBk3B,EAAU,WACR,IAAI9oB,EAAU,CAAEkrB,GAAI9a,EAAStT,IAAI,GACjC,IACEuT,EAAKjjB,KAAKwE,EAAO9C,EAAIq8B,EAAUnrB,EAAS,GAAIlR,EAAIm8B,EAASjrB,EAAS,IAClE,MAAOnP,GACPo6B,EAAQ79B,KAAK4S,EAASnP,OAI1Buf,EAAQ0Z,GAAKl4B,EACbwe,EAAQ4Z,GAAK,EACbpa,EAAOQ,GAAS,IAElB,MAAOvf,GACPo6B,EAAQ79B,KAAK,CAAE89B,GAAI9a,EAAStT,IAAI,GAASjM,MAKxC6qB,IAEH2N,EAAW,SAAS7Z,QAAQ4b,GAC1B3zB,EAAW3E,KAAMu2B,EAAUH,EAAS,MACpC90B,EAAUg3B,GACV1C,EAASt7B,KAAK0F,MACd,IACEs4B,EAASt8B,EAAIq8B,EAAUr4B,KAAM,GAAIhE,EAAIm8B,EAASn4B,KAAM,IACpD,MAAOu4B,GACPJ,EAAQ79B,KAAK0F,KAAMu4B,MAIvB3C,EAAW,SAASlZ,QAAQ4b,GAC1Bt4B,KAAK+2B,GAAK,GACV/2B,KAAKi4B,GAAKp+B,GACVmG,KAAKk3B,GAAK,EACVl3B,KAAKgK,IAAK,EACVhK,KAAKg3B,GAAKn9B,GACVmG,KAAKu3B,GAAK,EACVv3B,KAAK62B,IAAK,IAEHr7B,UAAYxB,EAAoB,GAApBA,CAAwBu8B,EAAS/6B,UAAW,CAE/D+hB,KAAM,SAASA,KAAKib,EAAaC,GAC/B,IAAItB,EAAWlT,EAAqB1e,EAAmBvF,KAAMu2B,IAO7D,OANAY,EAASF,GAA2B,mBAAfuB,GAA4BA,EACjDrB,EAASG,KAA4B,mBAAdmB,GAA4BA,EACnDtB,EAASla,OAASN,EAAS5B,EAAQkC,OAASpjB,GAC5CmG,KAAK+2B,GAAG3zB,KAAK+zB,GACTn3B,KAAKi4B,IAAIj4B,KAAKi4B,GAAG70B,KAAK+zB,GACtBn3B,KAAKk3B,IAAIpa,EAAO9c,MAAM,GACnBm3B,EAAS7Z,SAGlBob,QAAS,SAAUD,GACjB,OAAOz4B,KAAKud,KAAK1jB,GAAW4+B,MAGhC3C,EAAuB,WACrB,IAAIxY,EAAU,IAAIsY,EAClB51B,KAAKsd,QAAUA,EACftd,KAAKqd,QAAUrhB,EAAIq8B,EAAU/a,EAAS,GACtCtd,KAAK+d,OAAS/hB,EAAIm8B,EAAS7a,EAAS,IAEtC2Y,EAA2Bt3B,EAAIslB,EAAuB,SAAUva,GAC9D,OAAOA,IAAM6sB,GAAY7sB,IAAMqsB,EAC3B,IAAID,EAAqBpsB,GACzBmsB,EAA4BnsB,KAIpCxN,EAAQA,EAAQU,EAAIV,EAAQoB,EAAIpB,EAAQQ,GAAKksB,EAAY,CAAElM,QAAS6Z,IACpEv8B,EAAoB,GAApBA,CAAwBu8B,EAAUH,GAClCp8B,EAAoB,GAApBA,CAAwBo8B,GACxBL,EAAU/7B,EAAoB,IAAIo8B,GAGlCl6B,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAKksB,EAAYwN,EAAS,CAEpDrY,OAAQ,SAASA,OAAO2G,GACtB,IAAIiU,EAAa1U,EAAqBjkB,MAGtC,OADAie,EADe0a,EAAW5a,QACjB2G,GACFiU,EAAWrb,WAGtBphB,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK8H,IAAYokB,GAAawN,EAAS,CAEjE/Y,QAAS,SAASA,QAAQrE,GACxB,OAAOmd,EAAe3xB,GAAWxE,OAAS+1B,EAAUQ,EAAWv2B,KAAMgZ,MAGzE9c,EAAQA,EAAQgB,EAAIhB,EAAQQ,IAAMksB,GAAc5uB,EAAoB,GAApBA,CAAwB,SAAUoU,GAChFmoB,EAASqC,IAAIxqB,GAAa,SAAEooB,MACzBJ,EAAS,CAEZwC,IAAK,SAASA,IAAInoB,GAChB,IAAI/G,EAAI1J,KACJ24B,EAAa1U,EAAqBva,GAClC2T,EAAUsb,EAAWtb,QACrBU,EAAS4a,EAAW5a,OACpB5a,EAAS+yB,EAAQ,WACnB,IAAI9uB,EAAS,GACTlE,EAAQ,EACR21B,EAAY,EAChB7iB,EAAMvF,GAAU,EAAO,SAAU6M,GAC/B,IAAIwb,EAAS51B,IACT61B,GAAgB,EACpB3xB,EAAOhE,KAAKvJ,IACZg/B,IACAnvB,EAAE2T,QAAQC,GAASC,KAAK,SAAUze,GAC5Bi6B,IACJA,GAAgB,EAChB3xB,EAAO0xB,GAAUh6B,IACf+5B,GAAaxb,EAAQjW,KACtB2W,OAEH8a,GAAaxb,EAAQjW,KAGzB,OADIjE,EAAOpF,GAAGggB,EAAO5a,EAAOyK,GACrB+qB,EAAWrb,SAGpB0b,KAAM,SAASA,KAAKvoB,GAClB,IAAI/G,EAAI1J,KACJ24B,EAAa1U,EAAqBva,GAClCqU,EAAS4a,EAAW5a,OACpB5a,EAAS+yB,EAAQ,WACnBlgB,EAAMvF,GAAU,EAAO,SAAU6M,GAC/B5T,EAAE2T,QAAQC,GAASC,KAAKob,EAAWtb,QAASU,OAIhD,OADI5a,EAAOpF,GAAGggB,EAAO5a,EAAOyK,GACrB+qB,EAAWrb,YAOhB,SAAUnjB,EAAQD,EAASF,GAIjC,IAAIgrB,EAAOhrB,EAAoB,KAC3ByP,EAAWzP,EAAoB,IAC/Bi/B,EAAW,UAGfj/B,EAAoB,GAApBA,CAAwBi/B,EAAU,SAAUh+B,GAC1C,OAAO,SAASi+B,UAAY,OAAOj+B,EAAI+E,KAAyB,EAAnB2B,UAAUN,OAAaM,UAAU,GAAK9H,MAClF,CAEDyc,IAAK,SAASA,IAAIxX,GAChB,OAAOkmB,EAAK5T,IAAI3H,EAASzJ,KAAMi5B,GAAWn6B,GAAO,KAElDkmB,GAAM,GAAO,IAKV,SAAU7qB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BsH,EAAYtH,EAAoB,IAChCuE,EAAWvE,EAAoB,GAC/Bm/B,GAAUn/B,EAAoB,GAAGkkB,SAAW,IAAIxc,MAChD03B,EAASh8B,SAASsE,MAEtBxF,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK1C,EAAoB,EAApBA,CAAuB,WACtDm/B,EAAO,gBACL,UAAW,CACbz3B,MAAO,SAASA,MAAMzE,EAAQo8B,EAAcC,GAC1C,IAAInpB,EAAI7O,EAAUrE,GACds8B,EAAIh7B,EAAS+6B,GACjB,OAAOH,EAASA,EAAOhpB,EAAGkpB,EAAcE,GAAKH,EAAO9+B,KAAK6V,EAAGkpB,EAAcE,OAOxE,SAAUp/B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B8I,EAAS9I,EAAoB,IAC7BsH,EAAYtH,EAAoB,IAChCuE,EAAWvE,EAAoB,GAC/BwD,EAAWxD,EAAoB,GAC/B0G,EAAQ1G,EAAoB,GAC5BmoB,EAAOnoB,EAAoB,KAC3Bw/B,GAAcx/B,EAAoB,GAAGkkB,SAAW,IAAIoE,UAIpDmX,EAAiB/4B,EAAM,WACzB,SAAShE,KACT,QAAS88B,EAAW,aAA6B,GAAI98B,aAAcA,KAEjEg9B,GAAYh5B,EAAM,WACpB84B,EAAW,gBAGbt9B,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK+8B,GAAkBC,GAAW,UAAW,CACvEpX,UAAW,SAASA,UAAUqX,EAAQjhB,GACpCpX,EAAUq4B,GACVp7B,EAASma,GACT,IAAIkhB,EAAYj4B,UAAUN,OAAS,EAAIs4B,EAASr4B,EAAUK,UAAU,IACpE,GAAI+3B,IAAaD,EAAgB,OAAOD,EAAWG,EAAQjhB,EAAMkhB,GACjE,GAAID,GAAUC,EAAW,CAEvB,OAAQlhB,EAAKrX,QACX,KAAK,EAAG,OAAO,IAAIs4B,EACnB,KAAK,EAAG,OAAO,IAAIA,EAAOjhB,EAAK,IAC/B,KAAK,EAAG,OAAO,IAAIihB,EAAOjhB,EAAK,GAAIA,EAAK,IACxC,KAAK,EAAG,OAAO,IAAIihB,EAAOjhB,EAAK,GAAIA,EAAK,GAAIA,EAAK,IACjD,KAAK,EAAG,OAAO,IAAIihB,EAAOjhB,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAG5D,IAAImhB,EAAQ,CAAC,MAEb,OADAA,EAAMz2B,KAAK1B,MAAMm4B,EAAOnhB,GACjB,IAAKyJ,EAAKzgB,MAAMi4B,EAAQE,IAGjC,IAAI9uB,EAAQ6uB,EAAUp+B,UAClB+a,EAAWzT,EAAOtF,EAASuN,GAASA,EAAQlQ,OAAOW,WACnD2H,EAAS/F,SAASsE,MAAMpH,KAAKq/B,EAAQpjB,EAAUmC,GACnD,OAAOlb,EAAS2F,GAAUA,EAASoT,MAOjC,SAAUpc,EAAQD,EAASF,GAGjC,IAAI0E,EAAK1E,EAAoB,GACzBkC,EAAUlC,EAAoB,GAC9BuE,EAAWvE,EAAoB,GAC/ByE,EAAczE,EAAoB,IAGtCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAI1C,EAAoB,EAApBA,CAAuB,WAErDkkB,QAAQpjB,eAAe4D,EAAGC,EAAE,GAAI,EAAG,CAAEG,MAAO,IAAM,EAAG,CAAEA,MAAO,MAC5D,UAAW,CACbhE,eAAgB,SAASA,eAAemC,EAAQ68B,EAAaC,GAC3Dx7B,EAAStB,GACT68B,EAAcr7B,EAAYq7B,GAAa,GACvCv7B,EAASw7B,GACT,IAEE,OADAr7B,EAAGC,EAAE1B,EAAQ68B,EAAaC,IACnB,EACP,MAAOh8B,GACP,OAAO,OAQP,SAAU5D,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BmG,EAAOnG,EAAoB,IAAI2E,EAC/BJ,EAAWvE,EAAoB,GAEnCkC,EAAQA,EAAQgB,EAAG,UAAW,CAC5B88B,eAAgB,SAASA,eAAe/8B,EAAQ68B,GAC9C,IAAI/sB,EAAO5M,EAAK5B,EAAStB,GAAS68B,GAClC,QAAO/sB,IAASA,EAAKhS,sBAA8BkC,EAAO68B,OAOxD,SAAU3/B,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BuE,EAAWvE,EAAoB,GAC/BigC,EAAY,SAAUzgB,GACxBxZ,KAAKmR,GAAK5S,EAASib,GACnBxZ,KAAKyZ,GAAK,EACV,IACIpd,EADAkH,EAAOvD,KAAK0Z,GAAK,GAErB,IAAKrd,KAAOmd,EAAUjW,EAAKH,KAAK/G,IAElCrC,EAAoB,GAApBA,CAAwBigC,EAAW,SAAU,WAC3C,IAEI59B,EADAkH,EADOvD,KACK0Z,GAEhB,GACE,GAAenW,EAAKlC,QAJXrB,KAIAyZ,GAAmB,MAAO,CAAE3a,MAAOjF,GAAW6Q,MAAM,YACnDrO,EAAMkH,EALPvD,KAKiByZ,SALjBzZ,KAKgCmR,KAC3C,MAAO,CAAErS,MAAOzC,EAAKqO,MAAM,KAG7BxO,EAAQA,EAAQgB,EAAG,UAAW,CAC5Bg9B,UAAW,SAASA,UAAUj9B,GAC5B,OAAO,IAAIg9B,EAAUh9B,OAOnB,SAAU9C,EAAQD,EAASF,GAGjC,IAAImG,EAAOnG,EAAoB,IAC3BwG,EAAiBxG,EAAoB,IACrCmF,EAAMnF,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9BwD,EAAWxD,EAAoB,GAC/BuE,EAAWvE,EAAoB,GAcnCkC,EAAQA,EAAQgB,EAAG,UAAW,CAAEjC,IAZhC,SAASA,IAAIgC,EAAQ68B,GACnB,IACI/sB,EAAMhC,EADNovB,EAAWx4B,UAAUN,OAAS,EAAIpE,EAAS0E,UAAU,GAEzD,OAAIpD,EAAStB,KAAYk9B,EAAiBl9B,EAAO68B,IAC7C/sB,EAAO5M,EAAKxB,EAAE1B,EAAQ68B,IAAqB36B,EAAI4N,EAAM,SACrDA,EAAKjO,MACLiO,EAAK9R,MAAQpB,GACXkT,EAAK9R,IAAIX,KAAK6/B,GACdtgC,GACF2D,EAASuN,EAAQvK,EAAevD,IAAiBhC,IAAI8P,EAAO+uB,EAAaK,QAA7E,MAQI,SAAUhgC,EAAQD,EAASF,GAGjC,IAAImG,EAAOnG,EAAoB,IAC3BkC,EAAUlC,EAAoB,GAC9BuE,EAAWvE,EAAoB,GAEnCkC,EAAQA,EAAQgB,EAAG,UAAW,CAC5BkD,yBAA0B,SAASA,yBAAyBnD,EAAQ68B,GAClE,OAAO35B,EAAKxB,EAAEJ,EAAStB,GAAS68B,OAO9B,SAAU3/B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BogC,EAAWpgC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAEnCkC,EAAQA,EAAQgB,EAAG,UAAW,CAC5BsD,eAAgB,SAASA,eAAevD,GACtC,OAAOm9B,EAAS77B,EAAStB,QAOvB,SAAU9C,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,UAAW,CAC5BiC,IAAK,SAASA,IAAIlC,EAAQ68B,GACxB,OAAOA,KAAe78B,MAOpB,SAAU9C,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BuE,EAAWvE,EAAoB,GAC/B+wB,EAAgBlwB,OAAO0U,aAE3BrT,EAAQA,EAAQgB,EAAG,UAAW,CAC5BqS,aAAc,SAASA,aAAatS,GAElC,OADAsB,EAAStB,IACF8tB,GAAgBA,EAAc9tB,OAOnC,SAAU9C,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,UAAW,CAAEihB,QAASnkB,EAAoB,OAKvD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BuE,EAAWvE,EAAoB,GAC/B0wB,EAAqB7vB,OAAO4U,kBAEhCvT,EAAQA,EAAQgB,EAAG,UAAW,CAC5BuS,kBAAmB,SAASA,kBAAkBxS,GAC5CsB,EAAStB,GACT,IAEE,OADIytB,GAAoBA,EAAmBztB,IACpC,EACP,MAAOc,GACP,OAAO,OAQP,SAAU5D,EAAQD,EAASF,GAGjC,IAAI0E,EAAK1E,EAAoB,GACzBmG,EAAOnG,EAAoB,IAC3BwG,EAAiBxG,EAAoB,IACrCmF,EAAMnF,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9BkF,EAAalF,EAAoB,IACjCuE,EAAWvE,EAAoB,GAC/BwD,EAAWxD,EAAoB,GAwBnCkC,EAAQA,EAAQgB,EAAG,UAAW,CAAEmM,IAtBhC,SAASA,IAAIpM,EAAQ68B,EAAaO,GAChC,IAEIC,EAAoBvvB,EAFpBovB,EAAWx4B,UAAUN,OAAS,EAAIpE,EAAS0E,UAAU,GACrD44B,EAAUp6B,EAAKxB,EAAEJ,EAAStB,GAAS68B,GAEvC,IAAKS,EAAS,CACZ,GAAI/8B,EAASuN,EAAQvK,EAAevD,IAClC,OAAOoM,IAAI0B,EAAO+uB,EAAaO,EAAGF,GAEpCI,EAAUr7B,EAAW,GAEvB,GAAIC,EAAIo7B,EAAS,SAAU,CACzB,IAAyB,IAArBA,EAAQvtB,WAAuBxP,EAAS28B,GAAW,OAAO,EAC9D,GAAIG,EAAqBn6B,EAAKxB,EAAEw7B,EAAUL,GAAc,CACtD,GAAIQ,EAAmBr/B,KAAOq/B,EAAmBjxB,MAAuC,IAAhCixB,EAAmBttB,SAAoB,OAAO,EACtGstB,EAAmBx7B,MAAQu7B,EAC3B37B,EAAGC,EAAEw7B,EAAUL,EAAaQ,QACvB57B,EAAGC,EAAEw7B,EAAUL,EAAa56B,EAAW,EAAGm7B,IACjD,OAAO,EAET,OAAOE,EAAQlxB,MAAQxP,KAAqB0gC,EAAQlxB,IAAI/O,KAAK6/B,EAAUE,IAAI,OAQvE,SAAUlgC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BwgC,EAAWxgC,EAAoB,IAE/BwgC,GAAUt+B,EAAQA,EAAQgB,EAAG,UAAW,CAC1Cqb,eAAgB,SAASA,eAAetb,EAAQ8N,GAC9CyvB,EAASliB,MAAMrb,EAAQ8N,GACvB,IAEE,OADAyvB,EAASnxB,IAAIpM,EAAQ8N,IACd,EACP,MAAOhN,GACP,OAAO,OAQP,SAAU5D,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAE2e,IAAK,WAAc,OAAO,IAAI4e,MAAOC,cAK5D,SAAUvgC,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BqG,EAAWrG,EAAoB,GAC/ByE,EAAczE,EAAoB,IAEtCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAI1C,EAAoB,EAApBA,CAAuB,WACrD,OAAkC,OAA3B,IAAIygC,KAAKhb,KAAKwH,UAC2D,IAA3EwT,KAAKj/B,UAAUyrB,OAAO3sB,KAAK,CAAEqgC,YAAa,WAAc,OAAO,OAClE,OAAQ,CAEV1T,OAAQ,SAASA,OAAO5qB,GACtB,IAAIuC,EAAIyB,EAASL,MACb46B,EAAKn8B,EAAYG,GACrB,MAAoB,iBAANg8B,GAAmBnY,SAASmY,GAAah8B,EAAE+7B,cAAT,SAO9C,SAAUxgC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B2gC,EAAc3gC,EAAoB,KAGtCkC,EAAQA,EAAQY,EAAIZ,EAAQQ,GAAK+9B,KAAKj/B,UAAUm/B,cAAgBA,GAAc,OAAQ,CACpFA,YAAaA,KAMT,SAAUxgC,EAAQD,EAASF,GAKjC,IAAI0G,EAAQ1G,EAAoB,GAC5B0gC,EAAUD,KAAKj/B,UAAUk/B,QACzBG,EAAeJ,KAAKj/B,UAAUm/B,YAE9BG,EAAK,SAAUC,GACjB,OAAa,EAANA,EAAUA,EAAM,IAAMA,GAI/B5gC,EAAOD,QAAWwG,EAAM,WACtB,MAAiD,4BAA1Cm6B,EAAavgC,KAAK,IAAImgC,MAAM,KAAO,QACrC/5B,EAAM,WACXm6B,EAAavgC,KAAK,IAAImgC,KAAKhb,QACvB,SAASkb,cACb,IAAKlY,SAASiY,EAAQpgC,KAAK0F,OAAQ,MAAMgG,WAAW,sBACpD,IAAIvL,EAAIuF,KACJiiB,EAAIxnB,EAAEugC,iBACNzgC,EAAIE,EAAEwgC,qBACNt/B,EAAIsmB,EAAI,EAAI,IAAU,KAAJA,EAAW,IAAM,GACvC,OAAOtmB,GAAK,QAAUiC,KAAK2gB,IAAI0D,IAAIrgB,MAAMjG,GAAK,GAAK,GACjD,IAAMm/B,EAAGrgC,EAAEygC,cAAgB,GAAK,IAAMJ,EAAGrgC,EAAE0gC,cAC3C,IAAML,EAAGrgC,EAAE2gC,eAAiB,IAAMN,EAAGrgC,EAAE4gC,iBACvC,IAAMP,EAAGrgC,EAAE6gC,iBAAmB,KAAW,GAAJ/gC,EAASA,EAAI,IAAMugC,EAAGvgC,IAAM,KACjEsgC,GAKE,SAAU1gC,EAAQD,EAASF,GAEjC,IAAIuhC,EAAYd,KAAKj/B,UACjBggC,EAAe,eACfl8B,EAAY,WACZD,EAAYk8B,EAAUj8B,GACtBo7B,EAAUa,EAAUb,QACpB,IAAID,KAAKhb,KAAO,IAAM+b,GACxBxhC,EAAoB,GAApBA,CAAwBuhC,EAAWj8B,EAAW,SAASS,WACrD,IAAIjB,EAAQ47B,EAAQpgC,KAAK0F,MAEzB,OAAOlB,GAAUA,EAAQO,EAAU/E,KAAK0F,MAAQw7B,KAO9C,SAAUrhC,EAAQD,EAASF,GAEjC,IAAIwuB,EAAexuB,EAAoB,EAApBA,CAAuB,eACtC+Q,EAAQ0vB,KAAKj/B,UAEXgtB,KAAgBzd,GAAQ/Q,EAAoB,GAApBA,CAAwB+Q,EAAOyd,EAAcxuB,EAAoB,OAKzF,SAAUG,EAAQD,EAASF,GAIjC,IAAIuE,EAAWvE,EAAoB,GAC/ByE,EAAczE,EAAoB,IAGtCG,EAAOD,QAAU,SAAUuhC,GACzB,GAAa,WAATA,GAHO,WAGcA,GAA4B,YAATA,EAAoB,MAAM/9B,UAAU,kBAChF,OAAOe,EAAYF,EAASyB,MAJjB,UAIwBy7B,KAM/B,SAAUthC,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9ByK,EAASzK,EAAoB,IAC7BmP,EAASnP,EAAoB,IAC7BuE,EAAWvE,EAAoB,GAC/B+K,EAAkB/K,EAAoB,IACtCoI,EAAWpI,EAAoB,GAC/BwD,EAAWxD,EAAoB,GAC/BwM,EAAcxM,EAAoB,GAAGwM,YACrCjB,EAAqBvL,EAAoB,IACzCuM,EAAe4C,EAAO3C,YACtBC,EAAY0C,EAAOzC,SACnBg1B,EAAUj3B,EAAOqJ,KAAOtH,EAAYm1B,OACpCpvB,EAAShG,EAAa/K,UAAUoG,MAChCiH,EAAOpE,EAAOoE,KACd3C,EAAe,cAEnBhK,EAAQA,EAAQU,EAAIV,EAAQoB,EAAIpB,EAAQQ,GAAK8J,IAAgBD,GAAe,CAAEC,YAAaD,IAE3FrK,EAAQA,EAAQgB,EAAIhB,EAAQQ,GAAK+H,EAAOiE,OAAQxC,EAAc,CAE5Dy1B,OAAQ,SAASA,OAAOl+B,GACtB,OAAOi+B,GAAWA,EAAQj+B,IAAOD,EAASC,IAAOoL,KAAQpL,KAI7DvB,EAAQA,EAAQY,EAAIZ,EAAQmB,EAAInB,EAAQQ,EAAI1C,EAAoB,EAApBA,CAAuB,WACjE,OAAQ,IAAIuM,EAAa,GAAG3E,MAAM,EAAG/H,IAAWoU,aAC9C/H,EAAc,CAEhBtE,MAAO,SAASA,MAAMqJ,EAAOmB,GAC3B,GAAIG,IAAW1S,IAAauS,IAAQvS,GAAW,OAAO0S,EAAOjS,KAAKiE,EAASyB,MAAOiL,GAQlF,IAPA,IAAIyB,EAAMnO,EAASyB,MAAMiO,WACrB2d,EAAQ7mB,EAAgBkG,EAAOyB,GAC/BkvB,EAAM72B,EAAgBqH,IAAQvS,GAAY6S,EAAMN,EAAKM,GACrDvJ,EAAS,IAAKoC,EAAmBvF,KAAMuG,GAA9B,CAA6CnE,EAASw5B,EAAMhQ,IACrEiQ,EAAQ,IAAIp1B,EAAUzG,MACtB87B,EAAQ,IAAIr1B,EAAUtD,GACtBD,EAAQ,EACL0oB,EAAQgQ,GACbE,EAAMnb,SAASzd,IAAS24B,EAAMhb,SAAS+K,MACvC,OAAOzoB,KAIbnJ,EAAoB,GAApBA,CAAwBkM,IAKlB,SAAU/L,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAClCkC,EAAQA,EAAQU,EAAIV,EAAQoB,EAAIpB,EAAQQ,GAAK1C,EAAoB,IAAI8T,IAAK,CACxEpH,SAAU1M,EAAoB,IAAI0M,YAM9B,SAAUvM,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,OAAQ,EAAG,SAAU+hC,GAC3C,OAAO,SAASC,UAAUruB,EAAMrB,EAAYjL,GAC1C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU+hC,GAC5C,OAAO,SAAS91B,WAAW0H,EAAMrB,EAAYjL,GAC3C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU+hC,GAC5C,OAAO,SAASE,kBAAkBtuB,EAAMrB,EAAYjL,GAClD,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,MAErC,IAKG,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU+hC,GAC5C,OAAO,SAASG,WAAWvuB,EAAMrB,EAAYjL,GAC3C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,SAAU,EAAG,SAAU+hC,GAC7C,OAAO,SAAS7yB,YAAYyE,EAAMrB,EAAYjL,GAC5C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU+hC,GAC5C,OAAO,SAASI,WAAWxuB,EAAMrB,EAAYjL,GAC3C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,SAAU,EAAG,SAAU+hC,GAC7C,OAAO,SAASK,YAAYzuB,EAAMrB,EAAYjL,GAC5C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,UAAW,EAAG,SAAU+hC,GAC9C,OAAO,SAASM,aAAa1uB,EAAMrB,EAAYjL,GAC7C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,UAAW,EAAG,SAAU+hC,GAC9C,OAAO,SAASO,aAAa3uB,EAAMrB,EAAYjL,GAC7C,OAAO06B,EAAK/7B,KAAM2N,EAAMrB,EAAYjL,OAOlC,SAAUlH,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BuiC,EAAYviC,EAAoB,GAApBA,EAAwB,GAExCkC,EAAQA,EAAQY,EAAG,QAAS,CAC1B6O,SAAU,SAASA,SAAS+G,GAC1B,OAAO6pB,EAAUv8B,KAAM0S,EAAuB,EAAnB/Q,UAAUN,OAAaM,UAAU,GAAK9H,OAIrEG,EAAoB,GAApBA,CAAwB,aAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B+rB,EAAmB/rB,EAAoB,KACvCqG,EAAWrG,EAAoB,GAC/BoI,EAAWpI,EAAoB,GAC/BsH,EAAYtH,EAAoB,IAChCwiC,EAAqBxiC,EAAoB,IAE7CkC,EAAQA,EAAQY,EAAG,QAAS,CAC1B2/B,QAAS,SAASA,QAAQz5B,GACxB,IACIgjB,EAAW3O,EADXzY,EAAIyB,EAASL,MAMjB,OAJAsB,EAAU0B,GACVgjB,EAAY5jB,EAASxD,EAAEyC,QACvBgW,EAAImlB,EAAmB59B,EAAG,GAC1BmnB,EAAiB1O,EAAGzY,EAAGA,EAAGonB,EAAW,EAAG,EAAGhjB,EAAYrB,UAAU,IAC1D0V,KAIXrd,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B+rB,EAAmB/rB,EAAoB,KACvCqG,EAAWrG,EAAoB,GAC/BoI,EAAWpI,EAAoB,GAC/BqE,EAAYrE,EAAoB,IAChCwiC,EAAqBxiC,EAAoB,IAE7CkC,EAAQA,EAAQY,EAAG,QAAS,CAC1B4/B,QAAS,SAASA,UAChB,IAAIC,EAAWh7B,UAAU,GACrB/C,EAAIyB,EAASL,MACbgmB,EAAY5jB,EAASxD,EAAEyC,QACvBgW,EAAImlB,EAAmB59B,EAAG,GAE9B,OADAmnB,EAAiB1O,EAAGzY,EAAGA,EAAGonB,EAAW,EAAG2W,IAAa9iC,GAAY,EAAIwE,EAAUs+B,IACxEtlB,KAIXrd,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9By1B,EAAMz1B,EAAoB,GAApBA,EAAwB,GAElCkC,EAAQA,EAAQY,EAAG,SAAU,CAC3B0d,GAAI,SAASA,GAAG1H,GACd,OAAO2c,EAAIzvB,KAAM8S,OAOf,SAAU3Y,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B4iC,EAAO5iC,EAAoB,KAC3B+b,EAAY/b,EAAoB,IAGhC6iC,EAAa,mDAAmD17B,KAAK4U,GAEzE7Z,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAImgC,EAAY,SAAU,CACpDC,SAAU,SAASA,SAAStW,GAC1B,OAAOoW,EAAK58B,KAAMwmB,EAA8B,EAAnB7kB,UAAUN,OAAaM,UAAU,GAAK9H,IAAW,OAO5E,SAAUM,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B4iC,EAAO5iC,EAAoB,KAC3B+b,EAAY/b,EAAoB,IAGhC6iC,EAAa,mDAAmD17B,KAAK4U,GAEzE7Z,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAImgC,EAAY,SAAU,CACpDE,OAAQ,SAASA,OAAOvW,GACtB,OAAOoW,EAAK58B,KAAMwmB,EAA8B,EAAnB7kB,UAAUN,OAAaM,UAAU,GAAK9H,IAAW,OAO5E,SAAUM,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,WAAY,SAAU4oB,GAC5C,OAAO,SAASoa,WACd,OAAOpa,EAAM5iB,KAAM,KAEpB,cAKG,SAAU7F,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,YAAa,SAAU4oB,GAC7C,OAAO,SAASqa,YACd,OAAOra,EAAM5iB,KAAM,KAEpB,YAKG,SAAU7F,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B+E,EAAU/E,EAAoB,IAC9BoI,EAAWpI,EAAoB,GAC/BkZ,EAAWlZ,EAAoB,IAC/BkjC,EAAWljC,EAAoB,IAC/BmjC,EAAc1rB,OAAOjW,UAErB4hC,EAAwB,SAAU3nB,EAAQ5U,GAC5Cb,KAAKq9B,GAAK5nB,EACVzV,KAAKk3B,GAAKr2B,GAGZ7G,EAAoB,GAApBA,CAAwBojC,EAAuB,gBAAiB,SAAS3yB,OACvE,IAAI8P,EAAQva,KAAKq9B,GAAGv/B,KAAKkC,KAAKk3B,IAC9B,MAAO,CAAEp4B,MAAOyb,EAAO7P,KAAgB,OAAV6P,KAG/Bre,EAAQA,EAAQY,EAAG,SAAU,CAC3BwgC,SAAU,SAASA,SAAS7nB,GAE1B,GADA1W,EAAQiB,OACHkT,EAASuC,GAAS,MAAM/X,UAAU+X,EAAS,qBAChD,IAAIvY,EAAI4C,OAAOE,MACXgkB,EAAQ,UAAWmZ,EAAcr9B,OAAO2V,EAAOuO,OAASkZ,EAAS5iC,KAAKmb,GACtEod,EAAK,IAAIphB,OAAOgE,EAAOrZ,QAAS4nB,EAAMvY,QAAQ,KAAOuY,EAAQ,IAAMA,GAEvE,OADA6O,EAAGxY,UAAYjY,EAASqT,EAAO4E,WACxB,IAAI+iB,EAAsBvK,EAAI31B,OAOnC,SAAU/C,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,kBAKlB,SAAUG,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,eAKlB,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BmkB,EAAUnkB,EAAoB,IAC9BkG,EAAYlG,EAAoB,IAChCmG,EAAOnG,EAAoB,IAC3Bs3B,EAAiBt3B,EAAoB,IAEzCkC,EAAQA,EAAQgB,EAAG,SAAU,CAC3BqgC,0BAA2B,SAASA,0BAA0BjiC,GAO5D,IANA,IAKIe,EAAK0Q,EALLnO,EAAIsB,EAAU5E,GACdkiC,EAAUr9B,EAAKxB,EACf4E,EAAO4a,EAAQvf,GACfuE,EAAS,GACT/I,EAAI,EAEaA,EAAdmJ,EAAKlC,SACV0L,EAAOywB,EAAQ5+B,EAAGvC,EAAMkH,EAAKnJ,SAChBP,IAAWy3B,EAAenuB,EAAQ9G,EAAK0Q,GAEtD,OAAO5J,MAOL,SAAUhJ,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9ByjC,EAAUzjC,EAAoB,IAApBA,EAAyB,GAEvCkC,EAAQA,EAAQgB,EAAG,SAAU,CAC3BkK,OAAQ,SAASA,OAAO3J,GACtB,OAAOggC,EAAQhgC,OAOb,SAAUtD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bma,EAAWna,EAAoB,IAApBA,EAAyB,GAExCkC,EAAQA,EAAQgB,EAAG,SAAU,CAC3BqK,QAAS,SAASA,QAAQ9J,GACxB,OAAO0W,EAAS1W,OAOd,SAAUtD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BqG,EAAWrG,EAAoB,GAC/BsH,EAAYtH,EAAoB,IAChCof,EAAkBpf,EAAoB,GAG1CA,EAAoB,IAAMkC,EAAQA,EAAQY,EAAI9C,EAAoB,IAAK,SAAU,CAC/E0jC,iBAAkB,SAASA,iBAAiB5gC,EAAGnC,GAC7Cye,EAAgBza,EAAE0B,EAASL,MAAOlD,EAAG,CAAE7B,IAAKqG,EAAU3G,GAASK,YAAY,EAAMD,cAAc,QAO7F,SAAUZ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BqG,EAAWrG,EAAoB,GAC/BsH,EAAYtH,EAAoB,IAChCof,EAAkBpf,EAAoB,GAG1CA,EAAoB,IAAMkC,EAAQA,EAAQY,EAAI9C,EAAoB,IAAK,SAAU,CAC/Emd,iBAAkB,SAASA,iBAAiBra,EAAGgsB,GAC7C1P,EAAgBza,EAAE0B,EAASL,MAAOlD,EAAG,CAAEuM,IAAK/H,EAAUwnB,GAAS9tB,YAAY,EAAMD,cAAc,QAO7F,SAAUZ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BqG,EAAWrG,EAAoB,GAC/ByE,EAAczE,EAAoB,IAClCwG,EAAiBxG,EAAoB,IACrCoG,EAA2BpG,EAAoB,IAAI2E,EAGvD3E,EAAoB,IAAMkC,EAAQA,EAAQY,EAAI9C,EAAoB,IAAK,SAAU,CAC/E2jC,iBAAkB,SAASA,iBAAiB7gC,GAC1C,IAEI0V,EAFA5T,EAAIyB,EAASL,MACbkX,EAAIzY,EAAY3B,GAAG,GAEvB,GACE,GAAI0V,EAAIpS,EAAyBxB,EAAGsY,GAAI,OAAO1E,EAAEvX,UAC1C2D,EAAI4B,EAAe5B,QAO1B,SAAUzE,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BqG,EAAWrG,EAAoB,GAC/ByE,EAAczE,EAAoB,IAClCwG,EAAiBxG,EAAoB,IACrCoG,EAA2BpG,EAAoB,IAAI2E,EAGvD3E,EAAoB,IAAMkC,EAAQA,EAAQY,EAAI9C,EAAoB,IAAK,SAAU,CAC/E4jC,iBAAkB,SAASA,iBAAiB9gC,GAC1C,IAEI0V,EAFA5T,EAAIyB,EAASL,MACbkX,EAAIzY,EAAY3B,GAAG,GAEvB,GACE,GAAI0V,EAAIpS,EAAyBxB,EAAGsY,GAAI,OAAO1E,EAAEnJ,UAC1CzK,EAAI4B,EAAe5B,QAO1B,SAAUzE,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQY,EAAIZ,EAAQqB,EAAG,MAAO,CAAE0pB,OAAQjtB,EAAoB,IAApBA,CAAyB,UAKnE,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQY,EAAIZ,EAAQqB,EAAG,MAAO,CAAE0pB,OAAQjtB,EAAoB,IAApBA,CAAyB,UAKnE,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQU,EAAG,CAAEhB,OAAQ5B,EAAoB,MAK3C,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,SAAU,CAAEtB,OAAQ5B,EAAoB,MAKrD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BiW,EAAMjW,EAAoB,IAE9BkC,EAAQA,EAAQgB,EAAG,QAAS,CAC1B2gC,QAAS,SAASA,QAAQpgC,GACxB,MAAmB,UAAZwS,EAAIxS,OAOT,SAAUtD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzB4gC,MAAO,SAASA,MAAM9kB,EAAG+kB,EAAOC,GAC9B,OAAOpgC,KAAKU,IAAI0/B,EAAOpgC,KAAKgT,IAAImtB,EAAO/kB,QAOrC,SAAU7e,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAE+gC,YAAargC,KAAKsgC,GAAK,OAK9C,SAAU/jC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BmkC,EAAc,IAAMvgC,KAAKsgC,GAE7BhiC,EAAQA,EAAQgB,EAAG,OAAQ,CACzBkhC,QAAS,SAASA,QAAQC,GACxB,OAAOA,EAAUF,MAOf,SAAUhkC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BktB,EAAQltB,EAAoB,KAC5BupB,EAASvpB,EAAoB,KAEjCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzBohC,OAAQ,SAASA,OAAOtlB,EAAGmO,EAAOC,EAAQC,EAAQC,GAChD,OAAO/D,EAAO2D,EAAMlO,EAAGmO,EAAOC,EAAQC,EAAQC,QAO5C,SAAUntB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzBqhC,MAAO,SAASA,MAAMC,EAAIC,EAAIC,EAAIC,GAChC,IAAIC,EAAMJ,IAAO,EAEbK,EAAMH,IAAO,EACjB,OAFUD,IAAO,IAEHE,IAAO,KAAOC,EAAMC,GAAOD,EAAMC,KAASD,EAAMC,IAAQ,MAAQ,IAAM,MAOlF,SAAU1kC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzB4hC,MAAO,SAASA,MAAMN,EAAIC,EAAIC,EAAIC,GAChC,IAAIC,EAAMJ,IAAO,EAEbK,EAAMH,IAAO,EACjB,OAFUD,IAAO,IAEHE,IAAO,MAAQC,EAAMC,IAAQD,EAAMC,GAAOD,EAAMC,IAAQ,KAAO,IAAM,MAOjF,SAAU1kC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzB6hC,MAAO,SAASA,MAAMC,EAAGpxB,GACvB,IACIqxB,GAAMD,EACNE,GAAMtxB,EACNuxB,EAHS,MAGJF,EACLG,EAJS,MAIJF,EACLG,EAAKJ,GAAM,GACXK,EAAKJ,GAAM,GACX1S,GAAK6S,EAAKD,IAAO,IAAMD,EAAKC,IAAO,IACvC,OAAOC,EAAKC,GAAM9S,GAAK,MAAQ2S,EAAKG,IAAO,IAR9B,MAQoC9S,IAAe,QAO9D,SAAUryB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAEihC,YAAa,IAAMvgC,KAAKsgC,MAK/C,SAAU/jC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BikC,EAAcrgC,KAAKsgC,GAAK,IAE5BhiC,EAAQA,EAAQgB,EAAG,OAAQ,CACzBmhC,QAAS,SAASA,QAAQD,GACxB,OAAOA,EAAUH,MAOf,SAAU9jC,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAEgqB,MAAOltB,EAAoB,QAKlD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CACzBqiC,MAAO,SAASA,MAAMP,EAAGpxB,GACvB,IACIqxB,GAAMD,EACNE,GAAMtxB,EACNuxB,EAHS,MAGJF,EACLG,EAJS,MAIJF,EACLG,EAAKJ,IAAO,GACZK,EAAKJ,IAAO,GACZ1S,GAAK6S,EAAKD,IAAO,IAAMD,EAAKC,IAAO,IACvC,OAAOC,EAAKC,GAAM9S,IAAM,MAAQ2S,EAAKG,IAAO,IAR/B,MAQqC9S,KAAgB,QAOhE,SAAUryB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAG,OAAQ,CAAEsiC,QAAS,SAASA,QAAQxmB,GAErD,OAAQA,GAAKA,IAAMA,EAAIA,EAAS,GAALA,EAAS,EAAIA,GAAKF,SAAe,EAAJE,MAMpD,SAAU7e,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B6B,EAAO7B,EAAoB,IAC3B4B,EAAS5B,EAAoB,GAC7BuL,EAAqBvL,EAAoB,IACzCm8B,EAAiBn8B,EAAoB,KAEzCkC,EAAQA,EAAQY,EAAIZ,EAAQqB,EAAG,UAAW,CAAEkiC,UAAW,SAAUC,GAC/D,IAAIh2B,EAAInE,EAAmBvF,KAAMnE,EAAK6gB,SAAW9gB,EAAO8gB,SACpD9c,EAAiC,mBAAb8/B,EACxB,OAAO1/B,KAAKud,KACV3d,EAAa,SAAUoZ,GACrB,OAAOmd,EAAezsB,EAAGg2B,KAAaniB,KAAK,WAAc,OAAOvE,KAC9D0mB,EACJ9/B,EAAa,SAAU7B,GACrB,OAAOo4B,EAAezsB,EAAGg2B,KAAaniB,KAAK,WAAc,MAAMxf,KAC7D2hC,OAOF,SAAUvlC,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BiqB,EAAuBjqB,EAAoB,IAC3Ck8B,EAAUl8B,EAAoB,KAElCkC,EAAQA,EAAQgB,EAAG,UAAW,CAAEyiC,MAAO,SAAU38B,GAC/C,IAAIkhB,EAAoBD,EAAqBtlB,EAAEqB,MAC3CmD,EAAS+yB,EAAQlzB,GAErB,OADCG,EAAOpF,EAAImmB,EAAkBnG,OAASmG,EAAkB7G,SAASla,EAAOyK,GAClEsW,EAAkB5G,YAMrB,SAAUnjB,EAAQD,EAASF,GAEjC,IAAI4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/B6lC,EAAYD,EAASvjC,IACrByjC,EAA4BF,EAASv2B,IAEzCu2B,EAASpjC,IAAI,CAAEujC,eAAgB,SAASA,eAAeC,EAAaC,EAAehjC,EAAQ2R,GACzFkxB,EAA0BE,EAAaC,EAAe1hC,EAAStB,GAAS4iC,EAAUjxB,QAM9E,SAAUzU,EAAQD,EAASF,GAEjC,IAAI4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/B6lC,EAAYD,EAASvjC,IACrBsS,EAAyBixB,EAAS/zB,IAClC7N,EAAQ4hC,EAAS5hC,MAErB4hC,EAASpjC,IAAI,CAAE0jC,eAAgB,SAASA,eAAeF,EAAa/iC,GAClE,IAAI2R,EAAYjN,UAAUN,OAAS,EAAIxH,GAAYgmC,EAAUl+B,UAAU,IACnEqN,EAAcL,EAAuBpQ,EAAStB,GAAS2R,GAAW,GACtE,GAAII,IAAgBnV,KAAcmV,EAAoB,UAAEgxB,GAAc,OAAO,EAC7E,GAAIhxB,EAAY8hB,KAAM,OAAO,EAC7B,IAAIjiB,EAAiB7Q,EAAM/C,IAAIgC,GAE/B,OADA4R,EAAuB,UAAED,KAChBC,EAAeiiB,MAAQ9yB,EAAc,UAAEf,OAM5C,SAAU9C,EAAQD,EAASF,GAEjC,IAAI4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/BwG,EAAiBxG,EAAoB,IACrCmmC,EAAyBP,EAASzgC,IAClCihC,EAAyBR,EAAS3kC,IAClC4kC,EAAYD,EAASvjC,IAErBgkC,EAAsB,SAAUtxB,EAAanQ,EAAG9B,GAElD,GADaqjC,EAAuBpxB,EAAanQ,EAAG9B,GACxC,OAAOsjC,EAAuBrxB,EAAanQ,EAAG9B,GAC1D,IAAIkgB,EAASxc,EAAe5B,GAC5B,OAAkB,OAAXoe,EAAkBqjB,EAAoBtxB,EAAaiO,EAAQlgB,GAAKjD,IAGzE+lC,EAASpjC,IAAI,CAAE8jC,YAAa,SAASA,YAAYN,EAAa/iC,GAC5D,OAAOojC,EAAoBL,EAAazhC,EAAStB,GAAS0E,UAAUN,OAAS,EAAIxH,GAAYgmC,EAAUl+B,UAAU,SAM7G,SAAUxH,EAAQD,EAASF,GAEjC,IAAI6qB,EAAM7qB,EAAoB,KAC1BkQ,EAAOlQ,EAAoB,KAC3B4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/BwG,EAAiBxG,EAAoB,IACrCumC,EAA0BX,EAASr8B,KACnCs8B,EAAYD,EAASvjC,IAErBmkC,EAAuB,SAAU5hC,EAAG9B,GACtC,IAAI2jC,EAAQF,EAAwB3hC,EAAG9B,GACnCkgB,EAASxc,EAAe5B,GAC5B,GAAe,OAAXoe,EAAiB,OAAOyjB,EAC5B,IAAIC,EAAQF,EAAqBxjB,EAAQlgB,GACzC,OAAO4jC,EAAMr/B,OAASo/B,EAAMp/B,OAAS6I,EAAK,IAAI2a,EAAI4b,EAAMpyB,OAAOqyB,KAAWA,EAAQD,GAGpFb,EAASpjC,IAAI,CAAEmkC,gBAAiB,SAASA,gBAAgB1jC,GACvD,OAAOujC,EAAqBjiC,EAAStB,GAAS0E,UAAUN,OAAS,EAAIxH,GAAYgmC,EAAUl+B,UAAU,SAMjG,SAAUxH,EAAQD,EAASF,GAEjC,IAAI4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/BomC,EAAyBR,EAAS3kC,IAClC4kC,EAAYD,EAASvjC,IAEzBujC,EAASpjC,IAAI,CAAEokC,eAAgB,SAASA,eAAeZ,EAAa/iC,GAClE,OAAOmjC,EAAuBJ,EAAazhC,EAAStB,GAChD0E,UAAUN,OAAS,EAAIxH,GAAYgmC,EAAUl+B,UAAU,SAMvD,SAAUxH,EAAQD,EAASF,GAEjC,IAAI4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/BumC,EAA0BX,EAASr8B,KACnCs8B,EAAYD,EAASvjC,IAEzBujC,EAASpjC,IAAI,CAAEqkC,mBAAoB,SAASA,mBAAmB5jC,GAC7D,OAAOsjC,EAAwBhiC,EAAStB,GAAS0E,UAAUN,OAAS,EAAIxH,GAAYgmC,EAAUl+B,UAAU,SAMpG,SAAUxH,EAAQD,EAASF,GAEjC,IAAI4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/BwG,EAAiBxG,EAAoB,IACrCmmC,EAAyBP,EAASzgC,IAClC0gC,EAAYD,EAASvjC,IAErBykC,EAAsB,SAAU/xB,EAAanQ,EAAG9B,GAElD,GADaqjC,EAAuBpxB,EAAanQ,EAAG9B,GACxC,OAAO,EACnB,IAAIkgB,EAASxc,EAAe5B,GAC5B,OAAkB,OAAXoe,GAAkB8jB,EAAoB/xB,EAAaiO,EAAQlgB,IAGpE8iC,EAASpjC,IAAI,CAAEukC,YAAa,SAASA,YAAYf,EAAa/iC,GAC5D,OAAO6jC,EAAoBd,EAAazhC,EAAStB,GAAS0E,UAAUN,OAAS,EAAIxH,GAAYgmC,EAAUl+B,UAAU,SAM7G,SAAUxH,EAAQD,EAASF,GAEjC,IAAI4lC,EAAW5lC,EAAoB,IAC/BuE,EAAWvE,EAAoB,GAC/BmmC,EAAyBP,EAASzgC,IAClC0gC,EAAYD,EAASvjC,IAEzBujC,EAASpjC,IAAI,CAAEwkC,eAAgB,SAASA,eAAehB,EAAa/iC,GAClE,OAAOkjC,EAAuBH,EAAazhC,EAAStB,GAChD0E,UAAUN,OAAS,EAAIxH,GAAYgmC,EAAUl+B,UAAU,SAMvD,SAAUxH,EAAQD,EAASF,GAEjC,IAAIinC,EAAYjnC,EAAoB,IAChCuE,EAAWvE,EAAoB,GAC/BsH,EAAYtH,EAAoB,IAChC6lC,EAAYoB,EAAU5kC,IACtByjC,EAA4BmB,EAAU53B,IAE1C43B,EAAUzkC,IAAI,CAAEojC,SAAU,SAASA,SAASI,EAAaC,GACvD,OAAO,SAASiB,UAAUjkC,EAAQ2R,GAChCkxB,EACEE,EAAaC,GACZrxB,IAAc/U,GAAY0E,EAAW+C,GAAWrE,GACjD4iC,EAAUjxB,SAQV,SAAUzU,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bg8B,EAAYh8B,EAAoB,GAApBA,GACZ+gB,EAAU/gB,EAAoB,GAAG+gB,QACjC4B,EAA6C,WAApC3iB,EAAoB,GAApBA,CAAwB+gB,GAErC7e,EAAQA,EAAQU,EAAG,CACjBukC,KAAM,SAASA,KAAK5/B,GAClB,IAAI0b,EAASN,GAAU5B,EAAQkC,OAC/B+Y,EAAU/Y,EAASA,EAAOkF,KAAK5gB,GAAMA,OAOnC,SAAUpH,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3Bg8B,EAAYh8B,EAAoB,GAApBA,GACZonC,EAAapnC,EAAoB,EAApBA,CAAuB,cACpCsH,EAAYtH,EAAoB,IAChCuE,EAAWvE,EAAoB,GAC/B2K,EAAa3K,EAAoB,IACjC6K,EAAc7K,EAAoB,IAClC8B,EAAO9B,EAAoB,IAC3Bgc,EAAQhc,EAAoB,IAC5BwW,EAASwF,EAAMxF,OAEfqD,EAAY,SAAUtS,GACxB,OAAa,MAANA,EAAa1H,GAAYyH,EAAUC,IAGxC8/B,EAAsB,SAAUC,GAClC,IAAIC,EAAUD,EAAavK,GACvBwK,IACFD,EAAavK,GAAKl9B,GAClB0nC,MAIAC,EAAqB,SAAUF,GACjC,OAAOA,EAAaG,KAAO5nC,IAGzB6nC,EAAoB,SAAUJ,GAC3BE,EAAmBF,KACtBA,EAAaG,GAAK5nC,GAClBwnC,EAAoBC,KAIpBK,EAAe,SAAUC,EAAUC,GACrCtjC,EAASqjC,GACT5hC,KAAK+2B,GAAKl9B,GACVmG,KAAKyhC,GAAKG,EACVA,EAAW,IAAIE,EAAqB9hC,MACpC,IACE,IAAIuhC,EAAUM,EAAWD,GACrBN,EAAeC,EACJ,MAAXA,IACiC,mBAAxBA,EAAQQ,YAA4BR,EAAU,WAAcD,EAAaS,eAC/EzgC,EAAUigC,GACfvhC,KAAK+2B,GAAKwK,GAEZ,MAAOxjC,GAEP,YADA6jC,EAAS5J,MAAMj6B,GAEXyjC,EAAmBxhC,OAAOqhC,EAAoBrhC,OAGtD2hC,EAAanmC,UAAYqJ,EAAY,GAAI,CACvCk9B,YAAa,SAASA,cAAgBL,EAAkB1hC,SAG1D,IAAI8hC,EAAuB,SAAUR,GACnCthC,KAAKk3B,GAAKoK,GAGZQ,EAAqBtmC,UAAYqJ,EAAY,GAAI,CAC/C4F,KAAM,SAASA,KAAK3L,GAClB,IAAIwiC,EAAethC,KAAKk3B,GACxB,IAAKsK,EAAmBF,GAAe,CACrC,IAAIM,EAAWN,EAAaG,GAC5B,IACE,IAAIlnC,EAAIsZ,EAAU+tB,EAASn3B,MAC3B,GAAIlQ,EAAG,OAAOA,EAAED,KAAKsnC,EAAU9iC,GAC/B,MAAOf,GACP,IACE2jC,EAAkBJ,GAClB,QACA,MAAMvjC,MAKdi6B,MAAO,SAASA,MAAMl5B,GACpB,IAAIwiC,EAAethC,KAAKk3B,GACxB,GAAIsK,EAAmBF,GAAe,MAAMxiC,EAC5C,IAAI8iC,EAAWN,EAAaG,GAC5BH,EAAaG,GAAK5nC,GAClB,IACE,IAAIU,EAAIsZ,EAAU+tB,EAAS5J,OAC3B,IAAKz9B,EAAG,MAAMuE,EACdA,EAAQvE,EAAED,KAAKsnC,EAAU9iC,GACzB,MAAOf,GACP,IACEsjC,EAAoBC,GACpB,QACA,MAAMvjC,GAGV,OADEsjC,EAAoBC,GACfxiC,GAETkjC,SAAU,SAASA,SAASljC,GAC1B,IAAIwiC,EAAethC,KAAKk3B,GACxB,IAAKsK,EAAmBF,GAAe,CACrC,IAAIM,EAAWN,EAAaG,GAC5BH,EAAaG,GAAK5nC,GAClB,IACE,IAAIU,EAAIsZ,EAAU+tB,EAASI,UAC3BljC,EAAQvE,EAAIA,EAAED,KAAKsnC,EAAU9iC,GAASjF,GACtC,MAAOkE,GACP,IACEsjC,EAAoBC,GACpB,QACA,MAAMvjC,GAGV,OADEsjC,EAAoBC,GACfxiC,MAKb,IAAImjC,EAAc,SAASC,WAAWL,GACpCl9B,EAAW3E,KAAMiiC,EAAa,aAAc,MAAMzd,GAAKljB,EAAUugC,IAGnEh9B,EAAYo9B,EAAYzmC,UAAW,CACjC2mC,UAAW,SAASA,UAAUP,GAC5B,OAAO,IAAID,EAAaC,EAAU5hC,KAAKwkB,KAEzChZ,QAAS,SAASA,QAAQjK,GACxB,IAAIC,EAAOxB,KACX,OAAO,IAAKnE,EAAK6gB,SAAW9gB,EAAO8gB,SAAS,SAAUW,EAASU,GAC7Dzc,EAAUC,GACV,IAAI+/B,EAAe9/B,EAAK2gC,UAAU,CAChC13B,KAAM,SAAU3L,GACd,IACE,OAAOyC,EAAGzC,GACV,MAAOf,GACPggB,EAAOhgB,GACPujC,EAAaS,gBAGjB/J,MAAOja,EACPikB,SAAU3kB,SAMlBxY,EAAYo9B,EAAa,CACvB/3B,KAAM,SAASA,KAAK8O,GAClB,IAAItP,EAAoB,mBAAT1J,KAAsBA,KAAOiiC,EACxCjgC,EAAS6R,EAAUtV,EAASya,GAAGooB,IACnC,GAAIp/B,EAAQ,CACV,IAAIogC,EAAa7jC,EAASyD,EAAO1H,KAAK0e,IACtC,OAAOopB,EAAW3hC,cAAgBiJ,EAAI04B,EAAa,IAAI14B,EAAE,SAAUk4B,GACjE,OAAOQ,EAAWD,UAAUP,KAGhC,OAAO,IAAIl4B,EAAE,SAAUk4B,GACrB,IAAIl3B,GAAO,EAeX,OAdAsrB,EAAU,WACR,IAAKtrB,EAAM,CACT,IACE,GAAIsL,EAAMgD,GAAG,EAAO,SAAUvb,GAE5B,GADAmkC,EAASn3B,KAAKhN,GACViN,EAAM,OAAO8F,MACZA,EAAQ,OACf,MAAOzS,GACP,GAAI2M,EAAM,MAAM3M,EAEhB,YADA6jC,EAAS5J,MAAMj6B,GAEf6jC,EAASI,cAGR,WAAct3B,GAAO,MAGhCE,GAAI,SAASA,KACX,IAAK,IAAIxQ,EAAI,EAAGC,EAAIsH,UAAUN,OAAQghC,EAAQ,IAAI/7B,MAAMjM,GAAID,EAAIC,GAAIgoC,EAAMjoC,GAAKuH,UAAUvH,KACzF,OAAO,IAAqB,mBAAT4F,KAAsBA,KAAOiiC,GAAa,SAAUL,GACrE,IAAIl3B,GAAO,EASX,OARAsrB,EAAU,WACR,IAAKtrB,EAAM,CACT,IAAK,IAAI2N,EAAI,EAAGA,EAAIgqB,EAAMhhC,SAAUgX,EAElC,GADAupB,EAASn3B,KAAK43B,EAAMhqB,IAChB3N,EAAM,OACVk3B,EAASI,cAGR,WAAct3B,GAAO,QAKlC5O,EAAKmmC,EAAYzmC,UAAW4lC,EAAY,WAAc,OAAOphC,OAE7D9D,EAAQA,EAAQU,EAAG,CAAEslC,WAAYD,IAEjCjoC,EAAoB,GAApBA,CAAwB,eAKlB,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9BsoC,EAAQtoC,EAAoB,IAChCkC,EAAQA,EAAQU,EAAIV,EAAQc,EAAG,CAC7Bie,aAAcqnB,EAAMj5B,IACpB8R,eAAgBmnB,EAAMzrB,SAMlB,SAAU1c,EAAQD,EAASF,GA+CjC,IA7CA,IAAI2S,EAAa3S,EAAoB,IACjC8d,EAAU9d,EAAoB,IAC9B+B,EAAW/B,EAAoB,IAC/B4B,EAAS5B,EAAoB,GAC7B8B,EAAO9B,EAAoB,IAC3ByL,EAAYzL,EAAoB,IAChCoL,EAAMpL,EAAoB,GAC1BqO,EAAWjD,EAAI,YACfm9B,EAAgBn9B,EAAI,eACpBo9B,EAAc/8B,EAAUa,MAExBm8B,EAAe,CACjBC,aAAa,EACbC,qBAAqB,EACrBC,cAAc,EACdC,gBAAgB,EAChBC,aAAa,EACbC,eAAe,EACfC,cAAc,EACdC,sBAAsB,EACtBC,UAAU,EACVC,mBAAmB,EACnBC,gBAAgB,EAChBC,iBAAiB,EACjBC,mBAAmB,EACnBC,WAAW,EACXC,eAAe,EACfC,cAAc,EACdC,UAAU,EACVC,kBAAkB,EAClBC,QAAQ,EACRC,aAAa,EACbC,eAAe,EACfC,eAAe,EACfC,gBAAgB,EAChBC,cAAc,EACdC,eAAe,EACfC,kBAAkB,EAClBC,kBAAkB,EAClBC,gBAAgB,EAChBC,kBAAkB,EAClBC,eAAe,EACfC,WAAW,GAGJC,EAAc3sB,EAAQ2qB,GAAeroC,EAAI,EAAGA,EAAIqqC,EAAYpjC,OAAQjH,IAAK,CAChF,IAIIiC,EAJA6E,EAAOujC,EAAYrqC,GACnBsqC,EAAWjC,EAAavhC,GACxByjC,EAAa/oC,EAAOsF,GACpB6J,EAAQ45B,GAAcA,EAAWnpC,UAErC,GAAIuP,IACGA,EAAM1C,IAAWvM,EAAKiP,EAAO1C,EAAUm6B,GACvCz3B,EAAMw3B,IAAgBzmC,EAAKiP,EAAOw3B,EAAerhC,GACtDuE,EAAUvE,GAAQshC,EACdkC,GAAU,IAAKroC,KAAOsQ,EAAiB5B,EAAM1O,IAAMN,EAASgP,EAAO1O,EAAKsQ,EAAWtQ,IAAM,KAO3F,SAAUlC,EAAQD,EAASF,GAGjC,IAAI4B,EAAS5B,EAAoB,GAC7BkC,EAAUlC,EAAoB,GAC9B+b,EAAY/b,EAAoB,IAChC4H,EAAQ,GAAGA,MACXgjC,EAAO,WAAWzjC,KAAK4U,GACvBmT,EAAO,SAAU7f,GACnB,OAAO,SAAU9H,EAAIsjC,GACnB,IAAIC,EAA+B,EAAnBnjC,UAAUN,OACtBqX,IAAOosB,GAAYljC,EAAMtH,KAAKqH,UAAW,GAC7C,OAAO0H,EAAIy7B,EAAY,YAEP,mBAANvjC,EAAmBA,EAAKnE,SAASmE,IAAKG,MAAM1B,KAAM0Y,IACxDnX,EAAIsjC,KAGZ3oC,EAAQA,EAAQU,EAAIV,EAAQc,EAAId,EAAQQ,EAAIkoC,EAAM,CAChDvoB,WAAY6M,EAAKttB,EAAOygB,YACxB0oB,YAAa7b,EAAKttB,EAAOmpC,gBAMrB,SAAU5qC,EAAQD,EAASF,GAIjC,IAAIgC,EAAMhC,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9BkF,EAAalF,EAAoB,IACjCie,EAASje,EAAoB,IAC7B8I,EAAS9I,EAAoB,IAC7BwG,EAAiBxG,EAAoB,IACrC8d,EAAU9d,EAAoB,IAC9B0E,EAAK1E,EAAoB,GACzBgrC,EAAQhrC,EAAoB,KAC5BsH,EAAYtH,EAAoB,IAChCgc,EAAQhc,EAAoB,IAC5ButB,EAAavtB,EAAoB,KACjCmZ,EAAcnZ,EAAoB,IAClCmQ,EAAOnQ,EAAoB,IAC3BwD,EAAWxD,EAAoB,GAC/BkG,EAAYlG,EAAoB,IAChC+W,EAAc/W,EAAoB,GAClCmF,EAAMnF,EAAoB,IAU1BirC,EAAmB,SAAU3iC,GAC/B,IAAIE,EAAiB,GAARF,EACTK,EAAmB,GAARL,EACf,OAAO,SAAUhH,EAAQ0H,EAAYxB,GACnC,IAIInF,EAAKqD,EAAKuD,EAJVtE,EAAI3C,EAAIgH,EAAYxB,EAAM,GAC1B5C,EAAIsB,EAAU5E,GACd6H,EAASX,GAAkB,GAARF,GAAqB,GAARA,EAC5B,IAAoB,mBAARtC,KAAqBA,KAAOklC,MAAUrrC,GAE1D,IAAKwC,KAAOuC,EAAG,GAAIO,EAAIP,EAAGvC,KAExB4G,EAAMtE,EADNe,EAAMd,EAAEvC,GACKA,EAAKf,GACdgH,GACF,GAAIE,EAAQW,EAAO9G,GAAO4G,OACrB,GAAIA,EAAK,OAAQX,GACpB,KAAK,EAAGa,EAAO9G,GAAOqD,EAAK,MAC3B,KAAK,EAAG,OAAO,EACf,KAAK,EAAG,OAAOA,EACf,KAAK,EAAG,OAAOrD,EACf,KAAK,EAAG8G,EAAOF,EAAI,IAAMA,EAAI,QACxB,GAAIN,EAAU,OAAO,EAGhC,OAAe,GAARL,GAAaK,EAAWA,EAAWQ,IAG1CgiC,EAAUF,EAAiB,GAE3BG,EAAiB,SAAUtxB,GAC7B,OAAO,SAAUrW,GACf,OAAO,IAAI4nC,EAAa5nC,EAAIqW,KAG5BuxB,EAAe,SAAU7rB,EAAU1F,GACrC9T,KAAKmR,GAAKjR,EAAUsZ,GACpBxZ,KAAKi4B,GAAKngB,EAAQ0B,GAClBxZ,KAAKyZ,GAAK,EACVzZ,KAAK0Z,GAAK5F,GAmBZ,SAASoxB,KAAKz0B,GACZ,IAAI60B,EAAOxiC,EAAO,MAQlB,OAPI2N,GAAY5W,KACV0tB,EAAW9W,GACbuF,EAAMvF,GAAU,EAAM,SAAUpU,EAAKyC,GACnCwmC,EAAKjpC,GAAOyC,IAETmZ,EAAOqtB,EAAM70B,IAEf60B,EA1BTnyB,EAAYkyB,EAAc,OAAQ,WAChC,IAIIhpC,EAHAuC,EADOoB,KACEmR,GACT5N,EAFOvD,KAEKi4B,GACZnkB,EAHO9T,KAGK0Z,GAEhB,GACE,GAAenW,EAAKlC,QANXrB,KAMAyZ,GAEP,OAROzZ,KAOFmR,GAAKtX,GACHsQ,EAAK,UAENhL,EAAIP,EAAGvC,EAAMkH,EAVZvD,KAUsByZ,QACjC,OAA2BtP,EAAK,EAApB,QAAR2J,EAA+BzX,EACvB,UAARyX,EAAiClV,EAAEvC,GACxB,CAACA,EAAKuC,EAAEvC,OAczB6oC,KAAK1pC,UAAY,KAwCjBU,EAAQA,EAAQU,EAAIV,EAAQQ,EAAG,CAAEwoC,KAAMA,OAEvChpC,EAAQA,EAAQgB,EAAG,OAAQ,CACzBqG,KAAM6hC,EAAe,QACrBh+B,OAAQg+B,EAAe,UACvB79B,QAAS69B,EAAe,WACxB55B,QAASy5B,EAAiB,GAC1Bp5B,IAAKo5B,EAAiB,GACtB75B,OAAQ65B,EAAiB,GACzBj5B,KAAMi5B,EAAiB,GACvB/5B,MAAO+5B,EAAiB,GACxB55B,KAAM45B,EAAiB,GACvBE,QAASA,EACTI,SAAUN,EAAiB,GAC3Bt9B,OApDF,SAASA,OAAOrM,EAAQgP,EAAOyxB,GAC7Bz6B,EAAUgJ,GACV,IAIIqZ,EAAMtnB,EAJNuC,EAAIsB,EAAU5E,GACdiI,EAAOuU,EAAQlZ,GACfyC,EAASkC,EAAKlC,OACdjH,EAAI,EAER,GAAIuH,UAAUN,OAAS,EAAG,CACxB,IAAKA,EAAQ,MAAM3D,UAAU,gDAC7BimB,EAAO/kB,EAAE2E,EAAKnJ,WACTupB,EAAO9oB,OAAOkhC,GACrB,KAAgB3hC,EAATiH,GAAgBlC,EAAIP,EAAGvC,EAAMkH,EAAKnJ,QACvCupB,EAAOrZ,EAAMqZ,EAAM/kB,EAAEvC,GAAMA,EAAKf,IAElC,OAAOqoB,GAuCPqhB,MAAOA,EACPr5B,SArCF,SAASA,SAASrQ,EAAQoX,GAExB,OAAQA,GAAMA,EAAKsyB,EAAM1pC,EAAQoX,GAAMyyB,EAAQ7pC,EAAQ,SAAUmC,GAE/D,OAAOA,GAAMA,OACP5D,IAiCRsF,IAAKA,EACLlE,IA/BF,SAASA,IAAIK,EAAQe,GACnB,GAAI8C,EAAI7D,EAAQe,GAAM,OAAOf,EAAOe,IA+BpCgN,IA7BF,SAASA,IAAI/N,EAAQe,EAAKyC,GAGxB,OAFIiS,GAAe1U,KAAOxB,OAAQ6D,EAAGC,EAAErD,EAAQe,EAAK6C,EAAW,EAAGJ,IAC7DxD,EAAOe,GAAOyC,EACZxD,GA2BPkqC,OAxBF,SAASA,OAAO/nC,GACd,OAAOD,EAASC,IAAO+C,EAAe/C,KAAQynC,KAAK1pC,cA6B/C,SAAUrB,EAAQD,EAASF,GAEjC,IAAI8d,EAAU9d,EAAoB,IAC9BkG,EAAYlG,EAAoB,IACpCG,EAAOD,QAAU,SAAUoB,EAAQoX,GAMjC,IALA,IAIIrW,EAJAuC,EAAIsB,EAAU5E,GACdiI,EAAOuU,EAAQlZ,GACfyC,EAASkC,EAAKlC,OACd6B,EAAQ,EAEIA,EAAT7B,GAAgB,GAAIzC,EAAEvC,EAAMkH,EAAKL,QAAcwP,EAAI,OAAOrW,IAM7D,SAAUlC,EAAQD,EAASF,GAEjC,IAAIuE,EAAWvE,EAAoB,GAC/BiB,EAAMjB,EAAoB,IAC9BG,EAAOD,QAAUF,EAAoB,IAAIyrC,YAAc,SAAUhoC,GAC/D,IAAI+M,EAASvP,EAAIwC,GACjB,GAAqB,mBAAV+M,EAAsB,MAAM9M,UAAUD,EAAK,qBACtD,OAAOc,EAASiM,EAAOlQ,KAAKmD,MAMxB,SAAUtD,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3BkC,EAAUlC,EAAoB,GAC9B0rC,EAAU1rC,EAAoB,KAElCkC,EAAQA,EAAQU,EAAIV,EAAQQ,EAAG,CAC7BipC,MAAO,SAASA,MAAMd,GACpB,OAAO,IAAKhpC,EAAK6gB,SAAW9gB,EAAO8gB,SAAS,SAAUW,GACpDhB,WAAWqpB,EAAQprC,KAAK+iB,GAAS,GAAOwnB,SAQxC,SAAU1qC,EAAQD,EAASF,GAEjC,IAAIwtB,EAAOxtB,EAAoB,KAC3BkC,EAAUlC,EAAoB,GAGlCA,EAAoB,IAAIkV,EAAIsY,EAAKtY,EAAIsY,EAAKtY,GAAK,GAE/ChT,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAG,WAAY,CAAEklB,KAAM5nB,EAAoB,QAKjE,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAG,SAAU,CAAEc,SAAUxD,EAAoB,MAKnE,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAG,SAAU,CAAEsI,QAAShL,EAAoB,OAKlE,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B2tB,EAAS3tB,EAAoB,KAEjCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAG,SAAU,CAAEirB,OAAQA,KAK7C,SAAUxtB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B2tB,EAAS3tB,EAAoB,KAC7B8I,EAAS9I,EAAoB,IAEjCkC,EAAQA,EAAQgB,EAAIhB,EAAQQ,EAAG,SAAU,CACvCkpC,KAAM,SAAU76B,EAAO6c,GACrB,OAAOD,EAAO7kB,EAAOiI,GAAQ6c,OAO3B,SAAUztB,EAAQD,EAASF,GAIjCA,EAAoB,GAApBA,CAAwB+xB,OAAQ,SAAU,SAAUvS,GAClDxZ,KAAKykB,IAAMjL,EACXxZ,KAAKyZ,GAAK,GACT,WACD,IAAIrf,EAAI4F,KAAKyZ,KACT/O,IAAStQ,EAAI4F,KAAKykB,IACtB,MAAO,CAAE/Z,KAAMA,EAAM5L,MAAO4L,EAAO7Q,GAAYO,MAM3C,SAAUD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B6rC,EAAM7rC,EAAoB,GAApBA,CAAwB,sBAAuB,QAEzDkC,EAAQA,EAAQgB,EAAG,SAAU,CAAE4oC,OAAQ,SAASA,OAAOroC,GAAM,OAAOooC,EAAIpoC,OAKlE,SAAUtD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6rC,EAAM7rC,EAAoB,GAApBA,CAAwB,WAAY,CAC5C+rC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,WAGPjqC,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAG,SAAU,CAAE0pC,WAAY,SAASA,aAAe,OAAOP,EAAI7lC,UAKpF,SAAU7F,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6rC,EAAM7rC,EAAoB,GAApBA,CAAwB,6BAA8B,CAC9DqsC,QAAS,IACTC,OAAQ,IACRC,OAAQ,IACRC,SAAU,IACVC,SAAU,MAGZvqC,EAAQA,EAAQY,EAAIZ,EAAQQ,EAAG,SAAU,CAAEgqC,aAAc,SAASA,eAAiB,OAAOb,EAAI7lC,YAMzE,oBAAV7F,QAAyBA,OAAOD,QAASC,OAAOD,QAAUP,EAE3C,mBAAVguB,QAAwBA,OAAOgf,IAAKhf,OAAO,WAAc,OAAOhuB,IAE3EC,EAAIiC,KAAOlC,EA/3Rf,CAg4RC,EAAG","file":"core.min.js"} \ No newline at end of file diff --git a/node_modules/core-js/client/library.js b/node_modules/core-js/client/library.js new file mode 100644 index 00000000..a04db289 --- /dev/null +++ b/node_modules/core-js/client/library.js @@ -0,0 +1,8163 @@ +/** + * core-js 2.6.9 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2019 Denis Pushkarev + */ +!function(__e, __g, undefined){ +'use strict'; +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 126); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(12); +var ctx = __webpack_require__(16); +var hide = __webpack_require__(17); +var has = __webpack_require__(15); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(49)('wks'); +var uid = __webpack_require__(41); +var Symbol = __webpack_require__(2).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(22); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(4)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var IE8_DOM_DEFINE = __webpack_require__(90); +var toPrimitive = __webpack_require__(27); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(7) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(24); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(44); +var defined = __webpack_require__(24); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.6.9' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(15); +var toObject = __webpack_require__(9); +var IE_PROTO = __webpack_require__(65)('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var fails = __webpack_require__(4); +var defined = __webpack_require__(24); +var quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; +}; +module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export($export.P + $export.F * fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), 'String', O); +}; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(10); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var createDesc = __webpack_require__(28); +module.exports = __webpack_require__(7) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(45); +var createDesc = __webpack_require__(28); +var toIObject = __webpack_require__(11); +var toPrimitive = __webpack_require__(27); +var has = __webpack_require__(15); +var IE8_DOM_DEFINE = __webpack_require__(90); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__(7) ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return gOPD(O, P); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +}; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var fails = __webpack_require__(4); + +module.exports = function (method, arg) { + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call + arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); + }); +}; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = __webpack_require__(16); +var IObject = __webpack_require__(44); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(6); +var asc = __webpack_require__(80); +module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (;length > index; index++) if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) result[index] = res; // map + else if (res) switch (TYPE) { + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; +}; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(0); +var core = __webpack_require__(12); +var fails = __webpack_require__(4); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +if (__webpack_require__(7)) { + var LIBRARY = __webpack_require__(30); + var global = __webpack_require__(2); + var fails = __webpack_require__(4); + var $export = __webpack_require__(0); + var $typed = __webpack_require__(58); + var $buffer = __webpack_require__(88); + var ctx = __webpack_require__(16); + var anInstance = __webpack_require__(38); + var propertyDesc = __webpack_require__(28); + var hide = __webpack_require__(17); + var redefineAll = __webpack_require__(39); + var toInteger = __webpack_require__(22); + var toLength = __webpack_require__(6); + var toIndex = __webpack_require__(115); + var toAbsoluteIndex = __webpack_require__(35); + var toPrimitive = __webpack_require__(27); + var has = __webpack_require__(15); + var classof = __webpack_require__(37); + var isObject = __webpack_require__(3); + var toObject = __webpack_require__(9); + var isArrayIter = __webpack_require__(77); + var create = __webpack_require__(32); + var getPrototypeOf = __webpack_require__(13); + var gOPN = __webpack_require__(46).f; + var getIterFn = __webpack_require__(48); + var uid = __webpack_require__(41); + var wks = __webpack_require__(5); + var createArrayMethod = __webpack_require__(20); + var createArrayIncludes = __webpack_require__(50); + var speciesConstructor = __webpack_require__(55); + var ArrayIterators = __webpack_require__(82); + var Iterators = __webpack_require__(36); + var $iterDetect = __webpack_require__(79); + var setSpecies = __webpack_require__(43); + var arrayFill = __webpack_require__(81); + var arrayCopyWithin = __webpack_require__(106); + var $DP = __webpack_require__(8); + var $GOPD = __webpack_require__(18); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { + new Uint8Array(1).set({}); + }); + + var toOffset = function (it, BYTES) { + var offset = toInteger(it); + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!'); + } return new C(length); + }; + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function (C, list) { + var index = 0; + var length = list.length; + var result = allocate(C, length); + while (length > index) result[index] = list[index++]; + return result; + }; + + var addGetter = function (it, key, internal) { + dP(it, key, { get: function () { return this._d[internal]; } }); + }; + + var $from = function from(source /* , mapfn, thisArg */) { + var O = toObject(source); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var i, length, values, result, step, iterator; + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value); + } O = values; + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/* ...items */) { + var index = 0; + var length = arguments.length; + var result = allocate(this, length); + while (length > index) result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); + + var $toLocaleString = function toLocaleString() { + return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); + }; + + var proto = { + copyWithin: function copyWithin(target, start /* , end */) { + return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); + }, + every: function every(callbackfn /* , thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /* , thisArg */) { + return speciesFromList(this, arrayFilter(validate(this), callbackfn, + arguments.length > 1 ? arguments[1] : undefined)); + }, + find: function find(predicate /* , thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /* , thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /* , thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /* , fromIndex */) { + return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + includes: function includes(searchElement /* , fromIndex */) { + return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + join: function join(separator) { // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /* , thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse() { + var that = this; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + some: function some(callbackfn /* , thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn) { + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end) { + var O = validate(this); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var index = 0; + if (len + offset > length) throw RangeError(WRONG_LENGTH); + while (index < len) this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries() { + return arrayEntries.call(validate(this)); + }, + keys: function keys() { + return arrayKeys.call(validate(this)); + }, + values: function values() { + return arrayValues.call(validate(this)); + } + }; + + var isTAIndex = function (target, key) { + return isObject(target) + && target[TYPED_ARRAY] + && typeof key != 'symbol' + && key in target + && String(+key) == String(key); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key) { + return isTAIndex(target, key = toPrimitive(key, true)) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc) { + if (isTAIndex(target, key = toPrimitive(key, true)) + && isObject(desc) + && has(desc, 'value') + && !has(desc, 'get') + && !has(desc, 'set') + // TODO: add validation descriptor w/o calling accessors + && !desc.configurable + && (!has(desc, 'writable') || desc.writable) + && (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value; + return target; + } return dP(target, key, desc); + }; + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc + }); + + if (fails(function () { arrayToString.call({}); })) { + arrayToString = arrayToLocaleString = function toString() { + return arrayJoin.call(this); + }; + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { /* noop */ }, + toString: arrayToString, + toLocaleString: $toLocaleString + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function () { return this[TYPED_ARRAY]; } + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function (that, index) { + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function (that, index, value) { + var data = that._d; + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true + }); + }; + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d'); + var index = 0; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer) + }); + while (index < length) addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if (!fails(function () { + TypedArray(1); + }) || !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true)) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(toIndex(data)); + if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); + }); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR]; + var CORRECT_ITER_NAME = !!$nativeIterator + && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { return NAME; } + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES + }); + + $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { + from: $from, + of: $of + }); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; + + $export($export.P + $export.F * fails(function () { + new TypedArray(1).slice(); + }), NAME, { slice: $slice }); + + $export($export.P + $export.F * (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + }) || !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), NAME, { toLocaleString: $toLocaleString }); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); + }; +} else module.exports = function () { /* empty */ }; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +var Map = __webpack_require__(109); +var $export = __webpack_require__(0); +var shared = __webpack_require__(49)('metadata'); +var store = shared.store || (shared.store = new (__webpack_require__(112))()); + +var getOrCreateMetadataMap = function (target, targetKey, create) { + var targetMetadata = store.get(target); + if (!targetMetadata) { + if (!create) return undefined; + store.set(target, targetMetadata = new Map()); + } + var keyMetadata = targetMetadata.get(targetKey); + if (!keyMetadata) { + if (!create) return undefined; + targetMetadata.set(targetKey, keyMetadata = new Map()); + } return keyMetadata; +}; +var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); +}; +var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); +}; +var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); +}; +var ordinaryOwnMetadataKeys = function (target, targetKey) { + var metadataMap = getOrCreateMetadataMap(target, targetKey, false); + var keys = []; + if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); }); + return keys; +}; +var toMetaKey = function (it) { + return it === undefined || typeof it == 'symbol' ? it : String(it); +}; +var exp = function (O) { + $export($export.S, 'Reflect', O); +}; + +module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp +}; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(3); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(41)('meta'); +var isObject = __webpack_require__(3); +var has = __webpack_require__(15); +var setDesc = __webpack_require__(8).f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__(4)(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +module.exports = true; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(92); +var enumBugKeys = __webpack_require__(66); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(1); +var dPs = __webpack_require__(93); +var enumBugKeys = __webpack_require__(66); +var IE_PROTO = __webpack_require__(65)('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(62)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(67).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports) { + +module.exports = function () { /* empty */ }; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(16); +var call = __webpack_require__(104); +var isArrayIter = __webpack_require__(77); +var anObject = __webpack_require__(1); +var toLength = __webpack_require__(6); +var getIterFn = __webpack_require__(48); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(22); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(21); +var TAG = __webpack_require__(5)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + + +/***/ }), +/* 38 */ +/***/ (function(module, exports) { + +module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; + + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +var hide = __webpack_require__(17); +module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(8).f; +var has = __webpack_require__(15); +var TAG = __webpack_require__(5)('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var core = __webpack_require__(12); +var dP = __webpack_require__(8); +var DESCRIPTORS = __webpack_require__(7); +var SPECIES = __webpack_require__(5)('species'); + +module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(21); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(92); +var hiddenKeys = __webpack_require__(66).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var defined = __webpack_require__(24); +var fails = __webpack_require__(4); +var spaces = __webpack_require__(71); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var rtrim = RegExp(space + space + '*$'); + +var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); +}; + +// 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim +var trim = exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; +}; + +module.exports = exporter; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(37); +var ITERATOR = __webpack_require__(5)('iterator'); +var Iterators = __webpack_require__(36); +module.exports = __webpack_require__(12).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(12); +var global = __webpack_require__(2); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __webpack_require__(30) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' +}); + + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(11); +var toLength = __webpack_require__(6); +var toAbsoluteIndex = __webpack_require__(35); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(21); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(30); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(63); +var hide = __webpack_require__(17); +var Iterators = __webpack_require__(36); +var $iterCreate = __webpack_require__(54); +var setToStringTag = __webpack_require__(42); +var getPrototypeOf = __webpack_require__(13); +var ITERATOR = __webpack_require__(5)('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(32); +var descriptor = __webpack_require__(28); +var setToStringTag = __webpack_require__(42); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(17)(IteratorPrototype, __webpack_require__(5)('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(1); +var aFunction = __webpack_require__(10); +var SPECIES = __webpack_require__(5)('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var $export = __webpack_require__(0); +var meta = __webpack_require__(29); +var fails = __webpack_require__(4); +var hide = __webpack_require__(17); +var redefineAll = __webpack_require__(39); +var forOf = __webpack_require__(34); +var anInstance = __webpack_require__(38); +var isObject = __webpack_require__(3); +var setToStringTag = __webpack_require__(42); +var dP = __webpack_require__(8).f; +var each = __webpack_require__(20)(0); +var DESCRIPTORS = __webpack_require__(7); + +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) { + anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + IS_WEAK || dP(C.prototype, 'size', { + get: function () { + return this._c.size; + } + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; +}; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var hide = __webpack_require__(17); +var uid = __webpack_require__(41); +var TYPED = uid('typed_array'); +var VIEW = uid('view'); +var ABV = !!(global.ArrayBuffer && global.DataView); +var CONSTR = ABV; +var i = 0; +var l = 9; +var Typed; + +var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' +).split(','); + +while (i < l) { + if (Typed = global[TypedArrayConstructors[i++]]) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; +} + +module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW +}; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// Forced replacement prototype accessors methods +module.exports = __webpack_require__(30) || !__webpack_require__(4)(function () { + var K = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, K, function () { /* empty */ }); + delete __webpack_require__(2)[K]; +}); + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = __webpack_require__(0); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); +}; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = __webpack_require__(0); +var aFunction = __webpack_require__(10); +var ctx = __webpack_require__(16); +var forOf = __webpack_require__(34); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + } }); +}; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +var document = __webpack_require__(2).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(17); + + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(12); +var LIBRARY = __webpack_require__(30); +var wksExt = __webpack_require__(91); +var defineProperty = __webpack_require__(8).f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(49)('keys'); +var uid = __webpack_require__(41); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), +/* 66 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(2).document; +module.exports = document && document.documentElement; + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var DESCRIPTORS = __webpack_require__(7); +var getKeys = __webpack_require__(31); +var gOPS = __webpack_require__(51); +var pIE = __webpack_require__(45); +var toObject = __webpack_require__(9); +var IObject = __webpack_require__(44); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(4)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } return T; +} : $assign; + + +/***/ }), +/* 69 */ +/***/ (function(module, exports) { + +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; + + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toInteger = __webpack_require__(22); +var defined = __webpack_require__(24); + +module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; +}; + + +/***/ }), +/* 71 */ +/***/ (function(module, exports) { + +module.exports = '\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'; + + +/***/ }), +/* 72 */ +/***/ (function(module, exports) { + +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; + + +/***/ }), +/* 73 */ +/***/ (function(module, exports) { + +// 20.2.2.14 Math.expm1(x) +var $expm1 = Math.expm1; +module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 +) ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; +} : $expm1; + + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(22); +var defined = __webpack_require__(24); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +// helper for String#{startsWith, endsWith, includes} +var isRegExp = __webpack_require__(103); +var defined = __webpack_require__(24); + +module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; + + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +var MATCH = __webpack_require__(5)('match'); +module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { /* empty */ } + } return true; +}; + + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(36); +var ITERATOR = __webpack_require__(5)('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__(8); +var createDesc = __webpack_require__(28); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(5)('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } + +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = __webpack_require__(207); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; + + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + +var toObject = __webpack_require__(9); +var toAbsoluteIndex = __webpack_require__(35); +var toLength = __webpack_require__(6); +module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; + + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(33); +var step = __webpack_require__(83); +var Iterators = __webpack_require__(36); +var toIObject = __webpack_require__(11); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(53)(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + + +/***/ }), +/* 83 */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(16); +var invoke = __webpack_require__(69); +var html = __webpack_require__(67); +var cel = __webpack_require__(62); +var global = __webpack_require__(2); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(21)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var macrotask = __webpack_require__(84).set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = __webpack_require__(21)(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; + + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = __webpack_require__(10); + +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +// all object keys, includes non-enumerable and symbols +var gOPN = __webpack_require__(46); +var gOPS = __webpack_require__(51); +var anObject = __webpack_require__(1); +var Reflect = __webpack_require__(2).Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var DESCRIPTORS = __webpack_require__(7); +var LIBRARY = __webpack_require__(30); +var $typed = __webpack_require__(58); +var hide = __webpack_require__(17); +var redefineAll = __webpack_require__(39); +var fails = __webpack_require__(4); +var anInstance = __webpack_require__(38); +var toInteger = __webpack_require__(22); +var toLength = __webpack_require__(6); +var toIndex = __webpack_require__(115); +var gOPN = __webpack_require__(46).f; +var dP = __webpack_require__(8).f; +var arrayFill = __webpack_require__(81); +var setToStringTag = __webpack_require__(42); +var ARRAY_BUFFER = 'ArrayBuffer'; +var DATA_VIEW = 'DataView'; +var PROTOTYPE = 'prototype'; +var WRONG_LENGTH = 'Wrong length!'; +var WRONG_INDEX = 'Wrong index!'; +var $ArrayBuffer = global[ARRAY_BUFFER]; +var $DataView = global[DATA_VIEW]; +var Math = global.Math; +var RangeError = global.RangeError; +// eslint-disable-next-line no-shadow-restricted-names +var Infinity = global.Infinity; +var BaseBuffer = $ArrayBuffer; +var abs = Math.abs; +var pow = Math.pow; +var floor = Math.floor; +var log = Math.log; +var LN2 = Math.LN2; +var BUFFER = 'buffer'; +var BYTE_LENGTH = 'byteLength'; +var BYTE_OFFSET = 'byteOffset'; +var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; +var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; +var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + +// IEEE754 conversions based on https://github.com/feross/ieee754 +function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; +} +function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } return (s ? -1 : 1) * m * pow(2, e - mLen); +} + +function unpackI32(bytes) { + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; +} +function packI8(it) { + return [it & 0xff]; +} +function packI16(it) { + return [it & 0xff, it >> 8 & 0xff]; +} +function packI32(it) { + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; +} +function packF64(it) { + return packIEEE754(it, 52, 8); +} +function packF32(it) { + return packIEEE754(it, 23, 4); +} + +function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); +} + +function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); +} +function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; +} + +if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH]; + var offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return get(this, 1, byteOffset)[0] << 24 >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8 | bytes[0]) << 16 >> 16; + }, + getUint16: function getUint16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return bytes[1] << 8 | bytes[0]; + }, + getInt32: function getInt32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + } + }); +} else { + if (!fails(function () { + $ArrayBuffer(1); + }) || !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + })) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(length)); + }; + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)); + var $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + } + }, true); +} +setToStringTag($ArrayBuffer, ARRAY_BUFFER); +setToStringTag($DataView, DATA_VIEW); +hide($DataView[PROTOTYPE], $typed.VIEW, true); +exports[ARRAY_BUFFER] = $ArrayBuffer; +exports[DATA_VIEW] = $DataView; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports) { + +module.exports = function (regExp, replace) { + var replacer = replace === Object(replace) ? function (part) { + return replace[part]; + } : replace; + return function (it) { + return String(it).replace(regExp, replacer); + }; +}; + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(7) && !__webpack_require__(4)(function () { + return Object.defineProperty(__webpack_require__(62)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(5); + + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(15); +var toIObject = __webpack_require__(11); +var arrayIndexOf = __webpack_require__(50)(false); +var IE_PROTO = __webpack_require__(65)('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var anObject = __webpack_require__(1); +var getKeys = __webpack_require__(31); + +module.exports = __webpack_require__(7) ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(11); +var gOPN = __webpack_require__(46).f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(3); +var anObject = __webpack_require__(1); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = __webpack_require__(16)(Function.call, __webpack_require__(18).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; + + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var aFunction = __webpack_require__(10); +var isObject = __webpack_require__(3); +var invoke = __webpack_require__(69); +var arraySlice = [].slice; +var factories = {}; + +var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); +}; + +module.exports = Function.bind || function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; +}; + + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +var cof = __webpack_require__(21); +module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; +}; + + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var isObject = __webpack_require__(3); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; + + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseFloat = __webpack_require__(2).parseFloat; +var $trim = __webpack_require__(47).trim; + +module.exports = 1 / $parseFloat(__webpack_require__(71) + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; + + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseInt = __webpack_require__(2).parseInt; +var $trim = __webpack_require__(47).trim; +var ws = __webpack_require__(71); +var hex = /^[-+]?0[xX]/; + +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : $parseInt; + + +/***/ }), +/* 101 */ +/***/ (function(module, exports) { + +// 20.2.2.20 Math.log1p(x) +module.exports = Math.log1p || function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); +}; + + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var sign = __webpack_require__(72); +var pow = Math.pow; +var EPSILON = pow(2, -52); +var EPSILON32 = pow(2, -23); +var MAX32 = pow(2, 127) * (2 - EPSILON32); +var MIN32 = pow(2, -126); + +var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; +}; + +module.exports = Math.fround || function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; +}; + + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.8 IsRegExp(argument) +var isObject = __webpack_require__(3); +var cof = __webpack_require__(21); +var MATCH = __webpack_require__(5)('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; + + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(1); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; + + +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { + +var aFunction = __webpack_require__(10); +var toObject = __webpack_require__(9); +var IObject = __webpack_require__(44); +var toLength = __webpack_require__(6); + +module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var i = isRight ? -1 : 1; + if (aLen < 2) for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; +}; + + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + +var toObject = __webpack_require__(9); +var toAbsoluteIndex = __webpack_require__(35); +var toLength = __webpack_require__(6); + +module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; +}; + + +/***/ }), +/* 107 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var newPromiseCapability = __webpack_require__(86); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(110); +var validate = __webpack_require__(40); +var MAP = 'Map'; + +// 23.1 Map Objects +module.exports = __webpack_require__(57)(MAP, function (get) { + return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + } +}, strong, true); + + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var dP = __webpack_require__(8).f; +var create = __webpack_require__(32); +var redefineAll = __webpack_require__(39); +var ctx = __webpack_require__(16); +var anInstance = __webpack_require__(38); +var forOf = __webpack_require__(34); +var $iterDefine = __webpack_require__(53); +var step = __webpack_require__(83); +var setSpecies = __webpack_require__(43); +var DESCRIPTORS = __webpack_require__(7); +var fastKey = __webpack_require__(29).fastKey; +var validate = __webpack_require__(40); +var SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + } + }); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; + + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(110); +var validate = __webpack_require__(40); +var SET = 'Set'; + +// 23.2 Set Objects +module.exports = __webpack_require__(57)(SET, function (get) { + return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); + } +}, strong); + + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var each = __webpack_require__(20)(0); +var redefine = __webpack_require__(63); +var meta = __webpack_require__(29); +var assign = __webpack_require__(68); +var weak = __webpack_require__(113); +var isObject = __webpack_require__(3); +var validate = __webpack_require__(40); +var NATIVE_WEAK_MAP = __webpack_require__(40); +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +var InternalMap; + +var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; +}; + +var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = __webpack_require__(57)(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); +} + + +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var redefineAll = __webpack_require__(39); +var getWeak = __webpack_require__(29).getWeak; +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var anInstance = __webpack_require__(38); +var forOf = __webpack_require__(34); +var createArrayMethod = __webpack_require__(20); +var $has = __webpack_require__(15); +var validate = __webpack_require__(40); +var arrayFind = createArrayMethod(5); +var arrayFindIndex = createArrayMethod(6); +var id = 0; + +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); +}; +var UncaughtFrozenStore = function () { + this.a = []; +}; +var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); +}; +UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore +}; + + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = __webpack_require__(4); +var getTime = Date.prototype.getTime; +var $toISOString = Date.prototype.toISOString; + +var lz = function (num) { + return num > 9 ? num : '0' + num; +}; + +// PhantomJS / old WebKit has a broken implementations +module.exports = (fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; +}) || !fails(function () { + $toISOString.call(new Date(NaN)); +})) ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; +} : $toISOString; + + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = __webpack_require__(22); +var toLength = __webpack_require__(6); +module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; +}; + + +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = __webpack_require__(52); +var isObject = __webpack_require__(3); +var toLength = __webpack_require__(6); +var ctx = __webpack_require__(16); +var IS_CONCAT_SPREADABLE = __webpack_require__(5)('isConcatSpreadable'); + +function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; +} + +module.exports = flattenIntoArray; + + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = __webpack_require__(6); +var repeat = __webpack_require__(70); +var defined = __webpack_require__(24); + +module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; +}; + + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(7); +var getKeys = __webpack_require__(31); +var toIObject = __webpack_require__(11); +var isEnum = __webpack_require__(45).f; +module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; + + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = __webpack_require__(37); +var from = __webpack_require__(120); +module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; + + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +var forOf = __webpack_require__(34); + +module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; + + +/***/ }), +/* 121 */ +/***/ (function(module, exports) { + +// https://rwaldron.github.io/proposal-math-extensions/ +module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { + if ( + arguments.length === 0 + // eslint-disable-next-line no-self-compare + || x != x + // eslint-disable-next-line no-self-compare + || inLow != inLow + // eslint-disable-next-line no-self-compare + || inHigh != inHigh + // eslint-disable-next-line no-self-compare + || outLow != outLow + // eslint-disable-next-line no-self-compare + || outHigh != outHigh + ) return NaN; + if (x === Infinity || x === -Infinity) return x; + return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; +}; + + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(37); +var ITERATOR = __webpack_require__(5)('iterator'); +var Iterators = __webpack_require__(36); +module.exports = __webpack_require__(12).isIterable = function (it) { + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + // eslint-disable-next-line no-prototype-builtins + || Iterators.hasOwnProperty(classof(O)); +}; + + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var path = __webpack_require__(124); +var invoke = __webpack_require__(69); +var aFunction = __webpack_require__(10); +module.exports = function (/* ...pargs */) { + var fn = aFunction(this); + var length = arguments.length; + var pargs = new Array(length); + var i = 0; + var _ = path._; + var holder = false; + while (length > i) if ((pargs[i] = arguments[i++]) === _) holder = true; + return function (/* ...args */) { + var that = this; + var aLen = arguments.length; + var j = 0; + var k = 0; + var args; + if (!holder && !aLen) return invoke(fn, pargs, that); + args = pargs.slice(); + if (holder) for (;length > j; j++) if (args[j] === _) args[j] = arguments[k++]; + while (aLen > k) args.push(arguments[k++]); + return invoke(fn, args, that); + }; +}; + + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(12); + + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var gOPD = __webpack_require__(18); +var ownKeys = __webpack_require__(87); +var toIObject = __webpack_require__(11); + +module.exports = function define(target, mixin) { + var keys = ownKeys(toIObject(mixin)); + var length = keys.length; + var i = 0; + var key; + while (length > i) dP.f(target, key = keys[i++], gOPD.f(mixin, key)); + return target; +}; + + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(127); +__webpack_require__(129); +__webpack_require__(130); +__webpack_require__(131); +__webpack_require__(132); +__webpack_require__(133); +__webpack_require__(134); +__webpack_require__(135); +__webpack_require__(136); +__webpack_require__(137); +__webpack_require__(138); +__webpack_require__(139); +__webpack_require__(140); +__webpack_require__(141); +__webpack_require__(142); +__webpack_require__(143); +__webpack_require__(145); +__webpack_require__(146); +__webpack_require__(147); +__webpack_require__(148); +__webpack_require__(149); +__webpack_require__(150); +__webpack_require__(151); +__webpack_require__(152); +__webpack_require__(153); +__webpack_require__(154); +__webpack_require__(155); +__webpack_require__(156); +__webpack_require__(157); +__webpack_require__(158); +__webpack_require__(159); +__webpack_require__(160); +__webpack_require__(161); +__webpack_require__(162); +__webpack_require__(163); +__webpack_require__(164); +__webpack_require__(165); +__webpack_require__(166); +__webpack_require__(167); +__webpack_require__(168); +__webpack_require__(169); +__webpack_require__(170); +__webpack_require__(171); +__webpack_require__(172); +__webpack_require__(173); +__webpack_require__(174); +__webpack_require__(175); +__webpack_require__(176); +__webpack_require__(177); +__webpack_require__(178); +__webpack_require__(179); +__webpack_require__(180); +__webpack_require__(181); +__webpack_require__(182); +__webpack_require__(183); +__webpack_require__(184); +__webpack_require__(185); +__webpack_require__(186); +__webpack_require__(187); +__webpack_require__(188); +__webpack_require__(189); +__webpack_require__(190); +__webpack_require__(191); +__webpack_require__(192); +__webpack_require__(193); +__webpack_require__(194); +__webpack_require__(195); +__webpack_require__(196); +__webpack_require__(197); +__webpack_require__(198); +__webpack_require__(199); +__webpack_require__(200); +__webpack_require__(201); +__webpack_require__(202); +__webpack_require__(203); +__webpack_require__(204); +__webpack_require__(205); +__webpack_require__(206); +__webpack_require__(208); +__webpack_require__(209); +__webpack_require__(210); +__webpack_require__(211); +__webpack_require__(212); +__webpack_require__(213); +__webpack_require__(214); +__webpack_require__(215); +__webpack_require__(216); +__webpack_require__(217); +__webpack_require__(218); +__webpack_require__(219); +__webpack_require__(82); +__webpack_require__(220); +__webpack_require__(221); +__webpack_require__(222); +__webpack_require__(109); +__webpack_require__(111); +__webpack_require__(112); +__webpack_require__(223); +__webpack_require__(224); +__webpack_require__(225); +__webpack_require__(226); +__webpack_require__(227); +__webpack_require__(228); +__webpack_require__(229); +__webpack_require__(230); +__webpack_require__(231); +__webpack_require__(232); +__webpack_require__(233); +__webpack_require__(234); +__webpack_require__(235); +__webpack_require__(236); +__webpack_require__(237); +__webpack_require__(238); +__webpack_require__(239); +__webpack_require__(240); +__webpack_require__(241); +__webpack_require__(242); +__webpack_require__(243); +__webpack_require__(244); +__webpack_require__(245); +__webpack_require__(246); +__webpack_require__(247); +__webpack_require__(248); +__webpack_require__(249); +__webpack_require__(250); +__webpack_require__(251); +__webpack_require__(252); +__webpack_require__(253); +__webpack_require__(254); +__webpack_require__(255); +__webpack_require__(256); +__webpack_require__(257); +__webpack_require__(258); +__webpack_require__(259); +__webpack_require__(260); +__webpack_require__(262); +__webpack_require__(263); +__webpack_require__(264); +__webpack_require__(265); +__webpack_require__(266); +__webpack_require__(267); +__webpack_require__(268); +__webpack_require__(269); +__webpack_require__(270); +__webpack_require__(271); +__webpack_require__(272); +__webpack_require__(273); +__webpack_require__(274); +__webpack_require__(275); +__webpack_require__(276); +__webpack_require__(277); +__webpack_require__(278); +__webpack_require__(279); +__webpack_require__(280); +__webpack_require__(281); +__webpack_require__(282); +__webpack_require__(283); +__webpack_require__(284); +__webpack_require__(285); +__webpack_require__(286); +__webpack_require__(287); +__webpack_require__(288); +__webpack_require__(289); +__webpack_require__(290); +__webpack_require__(291); +__webpack_require__(292); +__webpack_require__(293); +__webpack_require__(294); +__webpack_require__(295); +__webpack_require__(296); +__webpack_require__(297); +__webpack_require__(298); +__webpack_require__(299); +__webpack_require__(300); +__webpack_require__(301); +__webpack_require__(302); +__webpack_require__(303); +__webpack_require__(304); +__webpack_require__(305); +__webpack_require__(306); +__webpack_require__(307); +__webpack_require__(308); +__webpack_require__(309); +__webpack_require__(310); +__webpack_require__(311); +__webpack_require__(312); +__webpack_require__(48); +__webpack_require__(314); +__webpack_require__(122); +__webpack_require__(315); +__webpack_require__(316); +__webpack_require__(317); +__webpack_require__(318); +__webpack_require__(319); +__webpack_require__(320); +__webpack_require__(321); +__webpack_require__(322); +__webpack_require__(323); +module.exports = __webpack_require__(324); + + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(2); +var has = __webpack_require__(15); +var DESCRIPTORS = __webpack_require__(7); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(63); +var META = __webpack_require__(29).KEY; +var $fails = __webpack_require__(4); +var shared = __webpack_require__(49); +var setToStringTag = __webpack_require__(42); +var uid = __webpack_require__(41); +var wks = __webpack_require__(5); +var wksExt = __webpack_require__(91); +var wksDefine = __webpack_require__(64); +var enumKeys = __webpack_require__(128); +var isArray = __webpack_require__(52); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var toObject = __webpack_require__(9); +var toIObject = __webpack_require__(11); +var toPrimitive = __webpack_require__(27); +var createDesc = __webpack_require__(28); +var _create = __webpack_require__(32); +var gOPNExt = __webpack_require__(94); +var $GOPD = __webpack_require__(18); +var $GOPS = __webpack_require__(51); +var $DP = __webpack_require__(8); +var $keys = __webpack_require__(31); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(46).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(45).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(30)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); + +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + } +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(17)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(31); +var gOPS = __webpack_require__(51); +var pIE = __webpack_require__(45); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(7), 'Object', { defineProperty: __webpack_require__(8).f }); + + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) +$export($export.S + $export.F * !__webpack_require__(7), 'Object', { defineProperties: __webpack_require__(93) }); + + +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = __webpack_require__(11); +var $getOwnPropertyDescriptor = __webpack_require__(18).f; + +__webpack_require__(23)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); + + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: __webpack_require__(32) }); + + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(9); +var $getPrototypeOf = __webpack_require__(13); + +__webpack_require__(23)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(9); +var $keys = __webpack_require__(31); + +__webpack_require__(23)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 Object.getOwnPropertyNames(O) +__webpack_require__(23)('getOwnPropertyNames', function () { + return __webpack_require__(94).f; +}); + + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.5 Object.freeze(O) +var isObject = __webpack_require__(3); +var meta = __webpack_require__(29).onFreeze; + +__webpack_require__(23)('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); + + +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.17 Object.seal(O) +var isObject = __webpack_require__(3); +var meta = __webpack_require__(29).onFreeze; + +__webpack_require__(23)('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); + + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.15 Object.preventExtensions(O) +var isObject = __webpack_require__(3); +var meta = __webpack_require__(29).onFreeze; + +__webpack_require__(23)('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); + + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.12 Object.isFrozen(O) +var isObject = __webpack_require__(3); + +__webpack_require__(23)('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.13 Object.isSealed(O) +var isObject = __webpack_require__(3); + +__webpack_require__(23)('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); + + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.11 Object.isExtensible(O) +var isObject = __webpack_require__(3); + +__webpack_require__(23)('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); + + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(0); + +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(68) }); + + +/***/ }), +/* 143 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.10 Object.is(value1, value2) +var $export = __webpack_require__(0); +$export($export.S, 'Object', { is: __webpack_require__(144) }); + + +/***/ }), +/* 144 */ +/***/ (function(module, exports) { + +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; + + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(0); +$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(95).set }); + + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) +var $export = __webpack_require__(0); + +$export($export.P, 'Function', { bind: __webpack_require__(96) }); + + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var isObject = __webpack_require__(3); +var getPrototypeOf = __webpack_require__(13); +var HAS_INSTANCE = __webpack_require__(5)('hasInstance'); +var FunctionProto = Function.prototype; +// 19.2.3.6 Function.prototype[@@hasInstance](V) +if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(8).f(FunctionProto, HAS_INSTANCE, { value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while (O = getPrototypeOf(O)) if (this.prototype === O) return true; + return false; +} }); + + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toInteger = __webpack_require__(22); +var aNumberValue = __webpack_require__(97); +var repeat = __webpack_require__(70); +var $toFixed = 1.0.toFixed; +var floor = Math.floor; +var data = [0, 0, 0, 0, 0, 0]; +var ERROR = 'Number.toFixed: incorrect invocation!'; +var ZERO = '0'; + +var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; +var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } +}; +var numToString = function () { + var i = 6; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } return s; +}; +var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); +}; +var log = function (x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } return n; +}; + +$export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || + 0.9.toFixed(0) !== '1' || + 1.255.toFixed(2) !== '1.25' || + 1000000000000000128.0.toFixed(0) !== '1000000000000000128' +) || !__webpack_require__(4)(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); +})), 'Number', { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } return m; + } +}); + + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $fails = __webpack_require__(4); +var aNumberValue = __webpack_require__(97); +var $toPrecision = 1.0.toPrecision; + +$export($export.P + $export.F * ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; +}) || !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); +})), 'Number', { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + } +}); + + +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.1 Number.EPSILON +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + + +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.2 Number.isFinite(number) +var $export = __webpack_require__(0); +var _isFinite = __webpack_require__(2).isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + } +}); + + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { isInteger: __webpack_require__(98) }); + + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.4 Number.isNaN(number) +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + } +}); + + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.5 Number.isSafeInteger(number) +var $export = __webpack_require__(0); +var isInteger = __webpack_require__(98); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); + + +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.6 Number.MAX_SAFE_INTEGER +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); + + +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.10 Number.MIN_SAFE_INTEGER +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); + + +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseFloat = __webpack_require__(99); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); + + +/***/ }), +/* 158 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseInt = __webpack_require__(100); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseInt = __webpack_require__(100); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseFloat = __webpack_require__(99); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.3 Math.acosh(x) +var $export = __webpack_require__(0); +var log1p = __webpack_require__(101); +var sqrt = Math.sqrt; +var $acosh = Math.acosh; + +$export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity +), 'Math', { + acosh: function acosh(x) { + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + } +}); + + +/***/ }), +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.5 Math.asinh(x) +var $export = __webpack_require__(0); +var $asinh = Math.asinh; + +function asinh(x) { + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); +} + +// Tor Browser bug: Math.asinh(0) -> -0 +$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + + +/***/ }), +/* 163 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.7 Math.atanh(x) +var $export = __webpack_require__(0); +var $atanh = Math.atanh; + +// Tor Browser bug: Math.atanh(-0) -> 0 +$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } +}); + + +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.9 Math.cbrt(x) +var $export = __webpack_require__(0); +var sign = __webpack_require__(72); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); + + +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.11 Math.clz32(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } +}); + + +/***/ }), +/* 166 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.12 Math.cosh(x) +var $export = __webpack_require__(0); +var exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp(x = +x) + exp(-x)) / 2; + } +}); + + +/***/ }), +/* 167 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.14 Math.expm1(x) +var $export = __webpack_require__(0); +var $expm1 = __webpack_require__(73); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + + +/***/ }), +/* 168 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { fround: __webpack_require__(102) }); + + +/***/ }), +/* 169 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = __webpack_require__(0); +var abs = Math.abs; + +$export($export.S, 'Math', { + hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var arg, div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + } +}); + + +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.18 Math.imul(x, y) +var $export = __webpack_require__(0); +var $imul = Math.imul; + +// some WebKit versions fails with big numbers, some has wrong arity +$export($export.S + $export.F * __webpack_require__(4)(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; +}), 'Math', { + imul: function imul(x, y) { + var UINT16 = 0xffff; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); + + +/***/ }), +/* 171 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.21 Math.log10(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + } +}); + + +/***/ }), +/* 172 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.20 Math.log1p(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { log1p: __webpack_require__(101) }); + + +/***/ }), +/* 173 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.22 Math.log2(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + } +}); + + +/***/ }), +/* 174 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.28 Math.sign(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { sign: __webpack_require__(72) }); + + +/***/ }), +/* 175 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.30 Math.sinh(x) +var $export = __webpack_require__(0); +var expm1 = __webpack_require__(73); +var exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * __webpack_require__(4)(function () { + return !Math.sinh(-2e-17) != -2e-17; +}), 'Math', { + sinh: function sinh(x) { + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + } +}); + + +/***/ }), +/* 176 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.33 Math.tanh(x) +var $export = __webpack_require__(0); +var expm1 = __webpack_require__(73); +var exp = Math.exp; + +$export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1(x = +x); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } +}); + + +/***/ }), +/* 177 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.34 Math.trunc(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + } +}); + + +/***/ }), +/* 178 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var toAbsoluteIndex = __webpack_require__(35); +var fromCharCode = String.fromCharCode; +var $fromCodePoint = String.fromCodePoint; + +// length should be 1, old FF problem +$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } +}); + + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(11); +var toLength = __webpack_require__(6); + +$export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } return res.join(''); + } +}); + + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.1.3.25 String.prototype.trim() +__webpack_require__(47)('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; +}); + + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $at = __webpack_require__(74)(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } +}); + + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + +var $export = __webpack_require__(0); +var toLength = __webpack_require__(6); +var context = __webpack_require__(75); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * __webpack_require__(76)(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); + + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.7 String.prototype.includes(searchString, position = 0) + +var $export = __webpack_require__(0); +var context = __webpack_require__(75); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * __webpack_require__(76)(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), +/* 184 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); + +$export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(70) +}); + + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + +var $export = __webpack_require__(0); +var toLength = __webpack_require__(6); +var context = __webpack_require__(75); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * __webpack_require__(76)(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); + + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(74)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(53)(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + + +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.2 String.prototype.anchor(name) +__webpack_require__(14)('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; +}); + + +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.3 String.prototype.big() +__webpack_require__(14)('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; +}); + + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.4 String.prototype.blink() +__webpack_require__(14)('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; +}); + + +/***/ }), +/* 190 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.5 String.prototype.bold() +__webpack_require__(14)('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; +}); + + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.6 String.prototype.fixed() +__webpack_require__(14)('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; +}); + + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.7 String.prototype.fontcolor(color) +__webpack_require__(14)('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; +}); + + +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.8 String.prototype.fontsize(size) +__webpack_require__(14)('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; +}); + + +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.9 String.prototype.italics() +__webpack_require__(14)('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; +}); + + +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.10 String.prototype.link(url) +__webpack_require__(14)('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; +}); + + +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.11 String.prototype.small() +__webpack_require__(14)('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; +}); + + +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.12 String.prototype.strike() +__webpack_require__(14)('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; +}); + + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.13 String.prototype.sub() +__webpack_require__(14)('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; +}); + + +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.14 String.prototype.sup() +__webpack_require__(14)('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; +}); + + +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = __webpack_require__(0); + +$export($export.S, 'Array', { isArray: __webpack_require__(52) }); + + +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(16); +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var call = __webpack_require__(104); +var isArrayIter = __webpack_require__(77); +var toLength = __webpack_require__(6); +var createProperty = __webpack_require__(78); +var getIterFn = __webpack_require__(48); + +$export($export.S + $export.F * !__webpack_require__(79)(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var createProperty = __webpack_require__(78); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * __webpack_require__(4)(function () { + function F() { /* empty */ } + return !(Array.of.call(F) instanceof F); +}), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } +}); + + +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.13 Array.prototype.join(separator) +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(11); +var arrayJoin = [].join; + +// fallback for not array-like strings +$export($export.P + $export.F * (__webpack_require__(44) != Object || !__webpack_require__(19)(arrayJoin)), 'Array', { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); + + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var html = __webpack_require__(67); +var cof = __webpack_require__(21); +var toAbsoluteIndex = __webpack_require__(35); +var toLength = __webpack_require__(6); +var arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * __webpack_require__(4)(function () { + if (html) arraySlice.call(html); +}), 'Array', { + slice: function slice(begin, end) { + var len = toLength(this.length); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } +}); + + +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var aFunction = __webpack_require__(10); +var toObject = __webpack_require__(9); +var fails = __webpack_require__(4); +var $sort = [].sort; +var test = [1, 2, 3]; + +$export($export.P + $export.F * (fails(function () { + // IE8- + test.sort(undefined); +}) || !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit +}) || !__webpack_require__(19)($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + } +}); + + +/***/ }), +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $forEach = __webpack_require__(20)(0); +var STRICT = __webpack_require__(19)([].forEach, true); + +$export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(3); +var isArray = __webpack_require__(52); +var SPECIES = __webpack_require__(5)('species'); + +module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } return C === undefined ? Array : C; +}; + + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $map = __webpack_require__(20)(1); + +$export($export.P + $export.F * !__webpack_require__(19)([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 209 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $filter = __webpack_require__(20)(2); + +$export($export.P + $export.F * !__webpack_require__(19)([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $some = __webpack_require__(20)(3); + +$export($export.P + $export.F * !__webpack_require__(19)([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 211 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $every = __webpack_require__(20)(4); + +$export($export.P + $export.F * !__webpack_require__(19)([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 212 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $reduce = __webpack_require__(105); + +$export($export.P + $export.F * !__webpack_require__(19)([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } +}); + + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $reduce = __webpack_require__(105); + +$export($export.P + $export.F * !__webpack_require__(19)([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + } +}); + + +/***/ }), +/* 214 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $indexOf = __webpack_require__(50)(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(19)($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); + + +/***/ }), +/* 215 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(11); +var toInteger = __webpack_require__(22); +var toLength = __webpack_require__(6); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(19)($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + } +}); + + +/***/ }), +/* 216 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +var $export = __webpack_require__(0); + +$export($export.P, 'Array', { copyWithin: __webpack_require__(106) }); + +__webpack_require__(33)('copyWithin'); + + +/***/ }), +/* 217 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +var $export = __webpack_require__(0); + +$export($export.P, 'Array', { fill: __webpack_require__(81) }); + +__webpack_require__(33)('fill'); + + +/***/ }), +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = __webpack_require__(0); +var $find = __webpack_require__(20)(5); +var KEY = 'find'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +__webpack_require__(33)(KEY); + + +/***/ }), +/* 219 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = __webpack_require__(0); +var $find = __webpack_require__(20)(6); +var KEY = 'findIndex'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +__webpack_require__(33)(KEY); + + +/***/ }), +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(43)('Array'); + + +/***/ }), +/* 221 */ +/***/ (function(module, exports) { + +// empty + + +/***/ }), +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(30); +var global = __webpack_require__(2); +var ctx = __webpack_require__(16); +var classof = __webpack_require__(37); +var $export = __webpack_require__(0); +var isObject = __webpack_require__(3); +var aFunction = __webpack_require__(10); +var anInstance = __webpack_require__(38); +var forOf = __webpack_require__(34); +var speciesConstructor = __webpack_require__(55); +var task = __webpack_require__(84).set; +var microtask = __webpack_require__(85)(); +var newPromiseCapabilityModule = __webpack_require__(86); +var perform = __webpack_require__(107); +var userAgent = __webpack_require__(56); +var promiseResolve = __webpack_require__(108); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[__webpack_require__(5)('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') + && promise.then(empty) instanceof FakePromise + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; + +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(39)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +__webpack_require__(42)($Promise, PROMISE); +__webpack_require__(43)(PROMISE); +Wrapper = __webpack_require__(12)[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(79)(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); + + +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var weak = __webpack_require__(113); +var validate = __webpack_require__(40); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +__webpack_require__(57)(WEAK_SET, function (get) { + return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(validate(this, WEAK_SET), value, true); + } +}, weak, false, true); + + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = __webpack_require__(0); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var rApply = (__webpack_require__(2).Reflect || {}).apply; +var fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !__webpack_require__(4)(function () { + rApply(function () { /* empty */ }); +}), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } +}); + + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = __webpack_require__(0); +var create = __webpack_require__(32); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); +var fails = __webpack_require__(4); +var bind = __webpack_require__(96); +var rConstruct = (__webpack_require__(2).Reflect || {}).construct; + +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function () { + function F() { /* empty */ } + return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function () { + rConstruct(function () { /* empty */ }); +}); + +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: return new Target(); + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); + + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = __webpack_require__(8); +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var toPrimitive = __webpack_require__(27); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * __webpack_require__(4)(function () { + // eslint-disable-next-line no-undef + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); +}), 'Reflect', { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), +/* 227 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = __webpack_require__(0); +var gOPD = __webpack_require__(18).f; +var anObject = __webpack_require__(1); + +$export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } +}); + + +/***/ }), +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 26.1.5 Reflect.enumerate(target) +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = []; // keys + var key; + for (key in iterated) keys.push(key); +}; +__webpack_require__(54)(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; +}); + +$export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + } +}); + + +/***/ }), +/* 229 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = __webpack_require__(18); +var getPrototypeOf = __webpack_require__(13); +var has = __webpack_require__(15); +var $export = __webpack_require__(0); +var isObject = __webpack_require__(3); +var anObject = __webpack_require__(1); + +function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var desc, proto; + if (anObject(target) === receiver) return target[propertyKey]; + if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); +} + +$export($export.S, 'Reflect', { get: get }); + + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = __webpack_require__(18); +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + } +}); + + +/***/ }), +/* 231 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = __webpack_require__(0); +var getProto = __webpack_require__(13); +var anObject = __webpack_require__(1); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); + + +/***/ }), +/* 232 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.9 Reflect.has(target, propertyKey) +var $export = __webpack_require__(0); + +$export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + } +}); + + +/***/ }), +/* 233 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.10 Reflect.isExtensible(target) +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); + + +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.11 Reflect.ownKeys(target) +var $export = __webpack_require__(0); + +$export($export.S, 'Reflect', { ownKeys: __webpack_require__(87) }); + + +/***/ }), +/* 235 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.12 Reflect.preventExtensions(target) +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var $preventExtensions = Object.preventExtensions; + +$export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = __webpack_require__(8); +var gOPD = __webpack_require__(18); +var getPrototypeOf = __webpack_require__(13); +var has = __webpack_require__(15); +var $export = __webpack_require__(0); +var createDesc = __webpack_require__(28); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(3); + +function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var existingDescriptor, proto; + if (!ownDesc) { + if (isObject(proto = getPrototypeOf(target))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); + + +/***/ }), +/* 237 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = __webpack_require__(0); +var setProto = __webpack_require__(95); + +if (setProto) $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), +/* 238 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.3.3.1 / 15.9.4.4 Date.now() +var $export = __webpack_require__(0); + +$export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); + + +/***/ }), +/* 239 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(27); +var toISOString = __webpack_require__(114); +var classof = __webpack_require__(37); + +$export($export.P + $export.F * __webpack_require__(4)(function () { + return new Date(NaN).toJSON() !== null + || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1; +}), 'Date', { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : + (!('toISOString' in O) && classof(O) == 'Date') ? toISOString.call(O) : O.toISOString(); + } +}); + + +/***/ }), +/* 240 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = __webpack_require__(0); +var toISOString = __webpack_require__(114); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); + + +/***/ }), +/* 241 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $typed = __webpack_require__(58); +var buffer = __webpack_require__(88); +var anObject = __webpack_require__(1); +var toAbsoluteIndex = __webpack_require__(35); +var toLength = __webpack_require__(6); +var isObject = __webpack_require__(3); +var ArrayBuffer = __webpack_require__(2).ArrayBuffer; +var speciesConstructor = __webpack_require__(55); +var $ArrayBuffer = buffer.ArrayBuffer; +var $DataView = buffer.DataView; +var $isView = $typed.ABV && ArrayBuffer.isView; +var $slice = $ArrayBuffer.prototype.slice; +var VIEW = $typed.VIEW; +var ARRAY_BUFFER = 'ArrayBuffer'; + +$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); + +$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return $isView && $isView(it) || isObject(it) && VIEW in it; + } +}); + +$export($export.P + $export.U + $export.F * __webpack_require__(4)(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; +}), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +__webpack_require__(43)(ARRAY_BUFFER); + + +/***/ }), +/* 242 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +$export($export.G + $export.W + $export.F * !__webpack_require__(58).ABV, { + DataView: __webpack_require__(88).DataView +}); + + +/***/ }), +/* 243 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 244 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 245 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Uint8', 1, function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}, true); + + +/***/ }), +/* 246 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 247 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 249 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 251 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(25)('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 252 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/Array.prototype.includes +var $export = __webpack_require__(0); +var $includes = __webpack_require__(50)(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +__webpack_require__(33)('includes'); + + +/***/ }), +/* 253 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap +var $export = __webpack_require__(0); +var flattenIntoArray = __webpack_require__(116); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(6); +var aFunction = __webpack_require__(10); +var arraySpeciesCreate = __webpack_require__(80); + +$export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + } +}); + +__webpack_require__(33)('flatMap'); + + +/***/ }), +/* 254 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten +var $export = __webpack_require__(0); +var flattenIntoArray = __webpack_require__(116); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(6); +var toInteger = __webpack_require__(22); +var arraySpeciesCreate = __webpack_require__(80); + +$export($export.P, 'Array', { + flatten: function flatten(/* depthArg = 1 */) { + var depthArg = arguments[0]; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + } +}); + +__webpack_require__(33)('flatten'); + + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/mathiasbynens/String.prototype.at +var $export = __webpack_require__(0); +var $at = __webpack_require__(74)(true); + +$export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + } +}); + + +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-string-pad-start-end +var $export = __webpack_require__(0); +var $pad = __webpack_require__(117); +var userAgent = __webpack_require__(56); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); + + +/***/ }), +/* 257 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-string-pad-start-end +var $export = __webpack_require__(0); +var $pad = __webpack_require__(117); +var userAgent = __webpack_require__(56); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); + + +/***/ }), +/* 258 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +__webpack_require__(47)('trimLeft', function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; +}, 'trimStart'); + + +/***/ }), +/* 259 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +__webpack_require__(47)('trimRight', function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; +}, 'trimEnd'); + + +/***/ }), +/* 260 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/String.prototype.matchAll/ +var $export = __webpack_require__(0); +var defined = __webpack_require__(24); +var toLength = __webpack_require__(6); +var isRegExp = __webpack_require__(103); +var getFlags = __webpack_require__(261); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +__webpack_require__(54)($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; +}); + +$export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this); + var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); + var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } +}); + + +/***/ }), +/* 261 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.2.5.3 get RegExp.prototype.flags +var anObject = __webpack_require__(1); +module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; +}; + + +/***/ }), +/* 262 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(64)('asyncIterator'); + + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(64)('observable'); + + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = __webpack_require__(0); +var ownKeys = __webpack_require__(87); +var toIObject = __webpack_require__(11); +var gOPD = __webpack_require__(18); +var createProperty = __webpack_require__(78); + +$export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, key = keys[i++]); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + } +}); + + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(0); +var $values = __webpack_require__(118)(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); + + +/***/ }), +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(0); +var $entries = __webpack_require__(118)(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); + + +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var aFunction = __webpack_require__(10); +var $defineProperty = __webpack_require__(8); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +__webpack_require__(7) && $export($export.P + __webpack_require__(59), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } +}); + + +/***/ }), +/* 268 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var aFunction = __webpack_require__(10); +var $defineProperty = __webpack_require__(8); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +__webpack_require__(7) && $export($export.P + __webpack_require__(59), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } +}); + + +/***/ }), +/* 269 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(27); +var getPrototypeOf = __webpack_require__(13); +var getOwnPropertyDescriptor = __webpack_require__(18).f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +__webpack_require__(7) && $export($export.P + __webpack_require__(59), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.get; + } while (O = getPrototypeOf(O)); + } +}); + + +/***/ }), +/* 270 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(27); +var getPrototypeOf = __webpack_require__(13); +var getOwnPropertyDescriptor = __webpack_require__(18).f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +__webpack_require__(7) && $export($export.P + __webpack_require__(59), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.set; + } while (O = getPrototypeOf(O)); + } +}); + + +/***/ }), +/* 271 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = __webpack_require__(0); + +$export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(119)('Map') }); + + +/***/ }), +/* 272 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = __webpack_require__(0); + +$export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(119)('Set') }); + + +/***/ }), +/* 273 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +__webpack_require__(60)('Map'); + + +/***/ }), +/* 274 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +__webpack_require__(60)('Set'); + + +/***/ }), +/* 275 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of +__webpack_require__(60)('WeakMap'); + + +/***/ }), +/* 276 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +__webpack_require__(60)('WeakSet'); + + +/***/ }), +/* 277 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from +__webpack_require__(61)('Map'); + + +/***/ }), +/* 278 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +__webpack_require__(61)('Set'); + + +/***/ }), +/* 279 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +__webpack_require__(61)('WeakMap'); + + +/***/ }), +/* 280 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from +__webpack_require__(61)('WeakSet'); + + +/***/ }), +/* 281 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-global +var $export = __webpack_require__(0); + +$export($export.G, { global: __webpack_require__(2) }); + + +/***/ }), +/* 282 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-global +var $export = __webpack_require__(0); + +$export($export.S, 'System', { global: __webpack_require__(2) }); + + +/***/ }), +/* 283 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/ljharb/proposal-is-error +var $export = __webpack_require__(0); +var cof = __webpack_require__(21); + +$export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + } +}); + + +/***/ }), +/* 284 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + } +}); + + +/***/ }), +/* 285 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); + + +/***/ }), +/* 286 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); +var RAD_PER_DEG = 180 / Math.PI; + +$export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + } +}); + + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); +var scale = __webpack_require__(121); +var fround = __webpack_require__(102); + +$export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + } +}); + + +/***/ }), +/* 288 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } +}); + + +/***/ }), +/* 289 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } +}); + + +/***/ }), +/* 290 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + imulh: function imulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >> 16; + var v1 = $v >> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } +}); + + +/***/ }), +/* 291 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); + + +/***/ }), +/* 292 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); +var DEG_PER_RAD = Math.PI / 180; + +$export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + } +}); + + +/***/ }), +/* 293 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { scale: __webpack_require__(121) }); + + +/***/ }), +/* 294 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + umulh: function umulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >>> 16; + var v1 = $v >>> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } +}); + + +/***/ }), +/* 295 */ +/***/ (function(module, exports, __webpack_require__) { + +// http://jfbastien.github.io/papers/Math.signbit.html +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { signbit: function signbit(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; +} }); + + +/***/ }), +/* 296 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// https://github.com/tc39/proposal-promise-finally + +var $export = __webpack_require__(0); +var core = __webpack_require__(12); +var global = __webpack_require__(2); +var speciesConstructor = __webpack_require__(55); +var promiseResolve = __webpack_require__(108); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); + + +/***/ }), +/* 297 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-promise-try +var $export = __webpack_require__(0); +var newPromiseCapability = __webpack_require__(86); +var perform = __webpack_require__(107); + +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); + + +/***/ }), +/* 298 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(26); +var anObject = __webpack_require__(1); +var toMetaKey = metadata.key; +var ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); +} }); + + +/***/ }), +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(26); +var anObject = __webpack_require__(1); +var toMetaKey = metadata.key; +var getOrCreateMetadataMap = metadata.map; +var store = metadata.store; + +metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); + var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; + if (metadataMap.size) return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); +} }); + + +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(26); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(13); +var ordinaryHasOwnMetadata = metadata.has; +var ordinaryGetOwnMetadata = metadata.get; +var toMetaKey = metadata.key; + +var ordinaryGetMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; +}; + +metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 301 */ +/***/ (function(module, exports, __webpack_require__) { + +var Set = __webpack_require__(111); +var from = __webpack_require__(120); +var metadata = __webpack_require__(26); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(13); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var parent = getPrototypeOf(O); + if (parent === null) return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; +}; + +metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { + return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); + + +/***/ }), +/* 302 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(26); +var anObject = __webpack_require__(1); +var ordinaryGetOwnMetadata = metadata.get; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 303 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(26); +var anObject = __webpack_require__(1); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); + + +/***/ }), +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(26); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(13); +var ordinaryHasOwnMetadata = metadata.has; +var toMetaKey = metadata.key; + +var ordinaryHasMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; +}; + +metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 305 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(26); +var anObject = __webpack_require__(1); +var ordinaryHasOwnMetadata = metadata.has; +var toMetaKey = metadata.key; + +metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + +var $metadata = __webpack_require__(26); +var anObject = __webpack_require__(1); +var aFunction = __webpack_require__(10); +var toMetaKey = $metadata.key; +var ordinaryDefineOwnMetadata = $metadata.set; + +$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) { + return function decorator(target, targetKey) { + ordinaryDefineOwnMetadata( + metadataKey, metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey) + ); + }; +} }); + + +/***/ }), +/* 307 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask +var $export = __webpack_require__(0); +var microtask = __webpack_require__(85)(); +var process = __webpack_require__(2).process; +var isNode = __webpack_require__(21)(process) == 'process'; + +$export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); + + +/***/ }), +/* 308 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/zenparsing/es-observable +var $export = __webpack_require__(0); +var global = __webpack_require__(2); +var core = __webpack_require__(12); +var microtask = __webpack_require__(85)(); +var OBSERVABLE = __webpack_require__(5)('observable'); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var anInstance = __webpack_require__(38); +var redefineAll = __webpack_require__(39); +var hide = __webpack_require__(17); +var forOf = __webpack_require__(34); +var RETURN = forOf.RETURN; + +var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); +}; + +var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } +}; + +var subscriptionClosed = function (subscription) { + return subscription._o === undefined; +}; + +var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } +}; + +var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer); + var subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } if (subscriptionClosed(this)) cleanupSubscription(this); +}; + +Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe() { closeSubscription(this); } +}); + +var SubscriptionObserver = function (subscription) { + this._s = subscription; +}; + +SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } +}); + +var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); +}; + +redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } +}); + +redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if (forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN) return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var j = 0; j < items.length; ++j) { + observer.next(items[j]); + if (done) return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + } +}); + +hide($Observable.prototype, OBSERVABLE, function () { return this; }); + +$export($export.G, { Observable: $Observable }); + +__webpack_require__(43)('Observable'); + + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $task = __webpack_require__(84); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); + + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(82); +var global = __webpack_require__(2); +var hide = __webpack_require__(17); +var Iterators = __webpack_require__(36); +var TO_STRING_TAG = __webpack_require__(5)('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + + +/***/ }), +/* 311 */ +/***/ (function(module, exports, __webpack_require__) { + +// ie9- setTimeout & setInterval additional parameters fix +var global = __webpack_require__(2); +var $export = __webpack_require__(0); +var userAgent = __webpack_require__(56); +var slice = [].slice; +var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check +var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set(boundArgs ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } : fn, time); + }; +}; +$export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) +}); + + +/***/ }), +/* 312 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(16); +var $export = __webpack_require__(0); +var createDesc = __webpack_require__(28); +var assign = __webpack_require__(68); +var create = __webpack_require__(32); +var getPrototypeOf = __webpack_require__(13); +var getKeys = __webpack_require__(31); +var dP = __webpack_require__(8); +var keyOf = __webpack_require__(313); +var aFunction = __webpack_require__(10); +var forOf = __webpack_require__(34); +var isIterable = __webpack_require__(122); +var $iterCreate = __webpack_require__(54); +var step = __webpack_require__(83); +var isObject = __webpack_require__(3); +var toIObject = __webpack_require__(11); +var DESCRIPTORS = __webpack_require__(7); +var has = __webpack_require__(15); + +// 0 -> Dict.forEach +// 1 -> Dict.map +// 2 -> Dict.filter +// 3 -> Dict.some +// 4 -> Dict.every +// 5 -> Dict.find +// 6 -> Dict.findKey +// 7 -> Dict.mapPairs +var createDictMethod = function (TYPE) { + var IS_MAP = TYPE == 1; + var IS_EVERY = TYPE == 4; + return function (object, callbackfn, that /* = undefined */) { + var f = ctx(callbackfn, that, 3); + var O = toIObject(object); + var result = IS_MAP || TYPE == 7 || TYPE == 2 + ? new (typeof this == 'function' ? this : Dict)() : undefined; + var key, val, res; + for (key in O) if (has(O, key)) { + val = O[key]; + res = f(val, key, object); + if (TYPE) { + if (IS_MAP) result[key] = res; // map + else if (res) switch (TYPE) { + case 2: result[key] = val; break; // filter + case 3: return true; // some + case 5: return val; // find + case 6: return key; // findKey + case 7: result[res[0]] = res[1]; // mapPairs + } else if (IS_EVERY) return false; // every + } + } + return TYPE == 3 || IS_EVERY ? IS_EVERY : result; + }; +}; +var findKey = createDictMethod(6); + +var createDictIter = function (kind) { + return function (it) { + return new DictIterator(it, kind); + }; +}; +var DictIterator = function (iterated, kind) { + this._t = toIObject(iterated); // target + this._a = getKeys(iterated); // keys + this._i = 0; // next index + this._k = kind; // kind +}; +$iterCreate(DictIterator, 'Dict', function () { + var that = this; + var O = that._t; + var keys = that._a; + var kind = that._k; + var key; + do { + if (that._i >= keys.length) { + that._t = undefined; + return step(1); + } + } while (!has(O, key = keys[that._i++])); + if (kind == 'keys') return step(0, key); + if (kind == 'values') return step(0, O[key]); + return step(0, [key, O[key]]); +}); + +function Dict(iterable) { + var dict = create(null); + if (iterable != undefined) { + if (isIterable(iterable)) { + forOf(iterable, true, function (key, value) { + dict[key] = value; + }); + } else assign(dict, iterable); + } + return dict; +} +Dict.prototype = null; + +function reduce(object, mapfn, init) { + aFunction(mapfn); + var O = toIObject(object); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var memo, key; + if (arguments.length < 3) { + if (!length) throw TypeError('Reduce of empty object with no initial value'); + memo = O[keys[i++]]; + } else memo = Object(init); + while (length > i) if (has(O, key = keys[i++])) { + memo = mapfn(memo, O[key], key, object); + } + return memo; +} + +function includes(object, el) { + // eslint-disable-next-line no-self-compare + return (el == el ? keyOf(object, el) : findKey(object, function (it) { + // eslint-disable-next-line no-self-compare + return it != it; + })) !== undefined; +} + +function get(object, key) { + if (has(object, key)) return object[key]; +} +function set(object, key, value) { + if (DESCRIPTORS && key in Object) dP.f(object, key, createDesc(0, value)); + else object[key] = value; + return object; +} + +function isDict(it) { + return isObject(it) && getPrototypeOf(it) === Dict.prototype; +} + +$export($export.G + $export.F, { Dict: Dict }); + +$export($export.S, 'Dict', { + keys: createDictIter('keys'), + values: createDictIter('values'), + entries: createDictIter('entries'), + forEach: createDictMethod(0), + map: createDictMethod(1), + filter: createDictMethod(2), + some: createDictMethod(3), + every: createDictMethod(4), + find: createDictMethod(5), + findKey: findKey, + mapPairs: createDictMethod(7), + reduce: reduce, + keyOf: keyOf, + includes: includes, + has: has, + get: get, + set: set, + isDict: isDict +}); + + +/***/ }), +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { + +var getKeys = __webpack_require__(31); +var toIObject = __webpack_require__(11); +module.exports = function (object, el) { + var O = toIObject(object); + var keys = getKeys(O); + var length = keys.length; + var index = 0; + var key; + while (length > index) if (O[key = keys[index++]] === el) return key; +}; + + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var get = __webpack_require__(48); +module.exports = __webpack_require__(12).getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; + + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(12); +var $export = __webpack_require__(0); +var partial = __webpack_require__(123); +// https://esdiscuss.org/topic/promise-returning-delay-function +$export($export.G + $export.F, { + delay: function delay(time) { + return new (core.Promise || global.Promise)(function (resolve) { + setTimeout(partial.call(resolve, true), time); + }); + } +}); + + +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +var path = __webpack_require__(124); +var $export = __webpack_require__(0); + +// Placeholder +__webpack_require__(12)._ = path._ = path._ || {}; + +$export($export.P + $export.F, 'Function', { part: __webpack_require__(123) }); + + +/***/ }), +/* 317 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); + +$export($export.S + $export.F, 'Object', { isObject: __webpack_require__(3) }); + + +/***/ }), +/* 318 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); + +$export($export.S + $export.F, 'Object', { classof: __webpack_require__(37) }); + + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var define = __webpack_require__(125); + +$export($export.S + $export.F, 'Object', { define: define }); + + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var define = __webpack_require__(125); +var create = __webpack_require__(32); + +$export($export.S + $export.F, 'Object', { + make: function (proto, mixin) { + return define(create(proto), mixin); + } +}); + + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(53)(Number, 'Number', function (iterated) { + this._l = +iterated; + this._i = 0; +}, function () { + var i = this._i++; + var done = !(i < this._l); + return { done: done, value: done ? undefined : i }; +}); + + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/benjamingr/RexExp.escape +var $export = __webpack_require__(0); +var $re = __webpack_require__(89)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); + + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $re = __webpack_require__(89)(/[&<>"']/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}); + +$export($export.P + $export.F, 'String', { escapeHTML: function escapeHTML() { return $re(this); } }); + + +/***/ }), +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $re = __webpack_require__(89)(/&(?:amp|lt|gt|quot|apos);/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}); + +$export($export.P + $export.F, 'String', { unescapeHTML: function unescapeHTML() { return $re(this); } }); + + +/***/ }) +/******/ ]); +// CommonJS export +if (typeof module != 'undefined' && module.exports) module.exports = __e; +// RequireJS export +else if (typeof define == 'function' && define.amd) define(function () { return __e; }); +// Export to global object +else __g.core = __e; +}(1, 1); \ No newline at end of file diff --git a/node_modules/core-js/client/library.min.js b/node_modules/core-js/client/library.min.js new file mode 100644 index 00000000..d8c13d2c --- /dev/null +++ b/node_modules/core-js/client/library.min.js @@ -0,0 +1,10 @@ +/** + * core-js 2.6.9 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2019 Denis Pushkarev + */ +!function(e,i,Jt){"use strict";!function(r){var e={};function __webpack_require__(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return r[t].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}__webpack_require__.m=r,__webpack_require__.c=e,__webpack_require__.d=function(t,n,r){__webpack_require__.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},__webpack_require__.n=function(t){var n=t&&t.__esModule?function getDefault(){return t["default"]}:function getModuleExports(){return t};return __webpack_require__.d(n,"a",n),n},__webpack_require__.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=126)}([function(t,n,r){var y=r(2),g=r(12),d=r(16),_=r(17),b=r(15),S="prototype",m=function(t,n,r){var e,i,o,u=t&m.F,c=t&m.G,f=t&m.S,a=t&m.P,s=t&m.B,l=t&m.W,h=c?g:g[n]||(g[n]={}),p=h[S],v=c?y:f?y[n]:(y[n]||{})[S];for(e in c&&(r=n),r)(i=!u&&v&&v[e]!==Jt)&&b(h,e)||(o=i?v[e]:r[e],h[e]=c&&"function"!=typeof v[e]?r[e]:s&&i?d(o,y):l&&v[e]==o?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[S]=e[S],t}(o):a&&"function"==typeof o?d(Function.call,o):o,a&&((h.virtual||(h.virtual={}))[e]=o,t&m.R&&p&&!p[e]&&_(p,e,o)))};m.F=1,m.G=2,m.S=4,m.P=8,m.B=16,m.W=32,m.U=64,m.R=128,t.exports=m},function(t,n,r){var e=r(3);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof i&&(i=r)},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n,r){var e=r(49)("wks"),i=r(41),o=r(2).Symbol,u="function"==typeof o;(t.exports=function(t){return e[t]||(e[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=e},function(t,n,r){var e=r(22),i=Math.min;t.exports=function(t){return 0"+i+""};t.exports=function(n,t){var r={};r[n]=t(o),e(e.P+e.F*i(function(){var t=""[n]('"');return t!==t.toLowerCase()||3document.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s[a][u[r]];return s()};t.exports=Object.create||function create(t,n){var r;return null!==t?(f[a]=i(t),r=new f,f[a]=null,r[c]=t):r=s(),n===Jt?r:o(r,n)}},function(t,n){t.exports=function(){}},function(t,n,r){var h=r(16),p=r(104),v=r(77),y=r(1),g=r(6),d=r(48),_={},b={};(n=t.exports=function(t,n,r,e,i){var o,u,c,f,a=i?function(){return t}:d(t),s=h(r,e,n?2:1),l=0;if("function"!=typeof a)throw TypeError(t+" is not iterable!");if(v(a)){for(o=g(t.length);l>>=1)&&(n+=n))1&e&&(r+=n);return r}},function(t,n){t.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(t,n){t.exports=Math.sign||function sign(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n){var r=Math.expm1;t.exports=!r||22025.465794806718>1,s=23===n?I(2,-24)-I(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=F(t))!=t||t===M?(i=t!=t?1:0,e=f):(e=k(A(t)/j),t*(o=I(2,-e))<1&&(e--,o*=2),2<=(t+=1<=e+a?s/o:s*I(2,1-a))*o&&(e++,o/=2),f<=e+a?(i=0,e=f):1<=e+a?(i=(t*o-1)*I(2,n),e+=a):(i=t*I(2,a-1)*I(2,n),e=0));8<=n;u[l++]=255&i,i/=256,n-=8);for(e=e<>1,c=i-7,f=r-1,a=t[f--],s=127&a;for(a>>=7;0>=-c,c+=n;0>8&255]}function packI32(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function packF64(t){return packIEEE754(t,52,8)}function packF32(t){return packIEEE754(t,23,4)}function addGetter(t,n,r){y(t[S],n,{get:function(){return this[r]}})}function get(t,n,r,e){var i=p(+r);if(t[D]>24)},setUint8:function setUint8(t,n){B.call(this,t,n<<24>>24)}},!0)}else w=function ArrayBuffer(t){s(this,w,_);var n=p(t);this._b=g.call(new Array(n),0),this[D]=n},x=function DataView(t,n,r){s(this,x,b),s(t,w,b);var e=t[D],i=l(n);if(i<0||e>24},getUint8:function getUint8(t){return get(this,1,t)[0]},getInt16:function getInt16(t){var n=get(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function getUint16(t){var n=get(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function getInt32(t){return unpackI32(get(this,4,t,arguments[1]))},getUint32:function getUint32(t){return unpackI32(get(this,4,t,arguments[1]))>>>0},getFloat32:function getFloat32(t){return unpackIEEE754(get(this,4,t,arguments[1]),23,4)},getFloat64:function getFloat64(t){return unpackIEEE754(get(this,8,t,arguments[1]),52,8)},setInt8:function setInt8(t,n){set(this,1,t,packI8,n)},setUint8:function setUint8(t,n){set(this,1,t,packI8,n)},setInt16:function setInt16(t,n){set(this,2,t,packI16,n,arguments[2])},setUint16:function setUint16(t,n){set(this,2,t,packI16,n,arguments[2])},setInt32:function setInt32(t,n){set(this,4,t,packI32,n,arguments[2])},setUint32:function setUint32(t,n){set(this,4,t,packI32,n,arguments[2])},setFloat32:function setFloat32(t,n){set(this,4,t,packF32,n,arguments[2])},setFloat64:function setFloat64(t,n){set(this,8,t,packF64,n,arguments[2])}});d(w,_),d(x,b),c(x[S],u.VIEW,!0),n[_]=w,n[b]=x},function(t,n){t.exports=function(n,r){var e=r===Object(r)?function(t){return r[t]}:r;return function(t){return String(t).replace(n,e)}}},function(t,n,r){t.exports=!r(7)&&!r(4)(function(){return 7!=Object.defineProperty(r(62)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){n.f=r(5)},function(t,n,r){var u=r(15),c=r(11),f=r(50)(!1),a=r(65)("IE_PROTO");t.exports=function(t,n){var r,e=c(t),i=0,o=[];for(r in e)r!=a&&u(e,r)&&o.push(r);for(;i>>0||(u.test(r)?16:10))}:e},function(t,n){t.exports=Math.log1p||function log1p(t){return-1e-8<(t=+t)&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,r){var o=r(72),e=Math.pow,u=e(2,-52),c=e(2,-23),f=e(2,127)*(2-c),a=e(2,-126);t.exports=Math.fround||function fround(t){var n,r,e=Math.abs(t),i=o(t);return e>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,r){var e=r(0),i=Math.exp;e(e.S,"Math",{cosh:function cosh(t){return(i(t=+t)+i(-t))/2}})},function(t,n,r){var e=r(0),i=r(73);e(e.S+e.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,r){var e=r(0);e(e.S,"Math",{fround:r(102)})},function(t,n,r){var e=r(0),f=Math.abs;e(e.S,"Math",{hypot:function hypot(t,n){for(var r,e,i=0,o=0,u=arguments.length,c=0;o>>16)*u+o*(r&i>>>16)<<16>>>0)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log10:function log10(t){return Math.log(t)*Math.LOG10E}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log1p:r(101)})},function(t,n,r){var e=r(0);e(e.S,"Math",{log2:function log2(t){return Math.log(t)/Math.LN2}})},function(t,n,r){var e=r(0);e(e.S,"Math",{sign:r(72)})},function(t,n,r){var e=r(0),i=r(73),o=Math.exp;e(e.S+e.F*r(4)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function sinh(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,r){var e=r(0),i=r(73),o=Math.exp;e(e.S,"Math",{tanh:function tanh(t){var n=i(t=+t),r=i(-t);return n==Infinity?1:r==Infinity?-1:(n-r)/(o(t)+o(-t))}})},function(t,n,r){var e=r(0);e(e.S,"Math",{trunc:function trunc(t){return(0>10),n%1024+56320))}return r.join("")}})},function(t,n,r){var e=r(0),u=r(11),c=r(6);e(e.S,"String",{raw:function raw(t){for(var n=u(t.raw),r=c(n.length),e=arguments.length,i=[],o=0;o>>0,o=r>>>0;return(n>>>0)+(e>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,n,r){var e=r(0);e(e.S,"Math",{isubh:function isubh(t,n,r,e){var i=t>>>0,o=r>>>0;return(n>>>0)-(e>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,n,r){var e=r(0);e(e.S,"Math",{imulh:function imulh(t,n){var r=+t,e=+n,i=65535&r,o=65535&e,u=r>>16,c=e>>16,f=(u*o>>>0)+(i*o>>>16);return u*c+(f>>16)+((i*c>>>0)+(65535&f)>>16)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,n,r){var e=r(0),i=Math.PI/180;e(e.S,"Math",{radians:function radians(t){return t*i}})},function(t,n,r){var e=r(0);e(e.S,"Math",{scale:r(121)})},function(t,n,r){var e=r(0);e(e.S,"Math",{umulh:function umulh(t,n){var r=+t,e=+n,i=65535&r,o=65535&e,u=r>>>16,c=e>>>16,f=(u*o>>>0)+(i*o>>>16);return u*c+(f>>>16)+((i*c>>>0)+(65535&f)>>>16)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{signbit:function signbit(t){return(t=+t)!=t?t:0==t?1/t==Infinity:0"']/g,{"&":"&","<":"<",">":">",'"':""","'":"'"});e(e.P+e.F,"String",{escapeHTML:function escapeHTML(){return i(this)}})},function(t,n,r){var e=r(0),i=r(89)(/&(?:amp|lt|gt|quot|apos);/g,{"&":"&","<":"<",">":">",""":'"',"'":"'"});e(e.P+e.F,"String",{unescapeHTML:function unescapeHTML(){return i(this)}})}]),"undefined"!=typeof module&&module.exports?module.exports=e:"function"==typeof define&&define.amd?define(function(){return e}):i.core=e}(1,1); +//# sourceMappingURL=library.min.js.map \ No newline at end of file diff --git a/node_modules/core-js/client/library.min.js.map b/node_modules/core-js/client/library.min.js.map new file mode 100644 index 00000000..c0daaabb --- /dev/null +++ b/node_modules/core-js/client/library.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["library.js"],"names":["__e","__g","undefined","modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","getDefault","getModuleExports","object","property","prototype","hasOwnProperty","p","s","global","core","ctx","hide","has","PROTOTYPE","$export","type","source","key","own","out","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","S","IS_PROTO","P","IS_BIND","B","IS_WRAP","W","expProto","target","C","a","b","this","arguments","length","apply","Function","virtual","R","U","isObject","it","TypeError","window","Math","self","exec","e","store","uid","Symbol","USE_SYMBOL","toInteger","min","anObject","IE8_DOM_DEFINE","toPrimitive","dP","f","O","Attributes","value","defined","IObject","version","toObject","IE_PROTO","ObjectProto","getPrototypeOf","constructor","fails","quot","createHTML","string","tag","attribute","String","p1","replace","NAME","test","toLowerCase","split","aFunction","fn","that","createDesc","pIE","toIObject","gOPD","getOwnPropertyDescriptor","method","arg","toLength","asc","TYPE","$create","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","create","$this","callbackfn","val","res","index","result","push","toString","slice","ceil","floor","isNaN","KEY","exp","LIBRARY","$typed","$buffer","anInstance","propertyDesc","redefineAll","toIndex","toAbsoluteIndex","classof","isArrayIter","gOPN","getIterFn","wks","createArrayMethod","createArrayIncludes","speciesConstructor","ArrayIterators","Iterators","$iterDetect","setSpecies","arrayFill","arrayCopyWithin","$DP","$GOPD","RangeError","Uint8Array","ARRAY_BUFFER","SHARED_BUFFER","BYTES_PER_ELEMENT","ArrayProto","Array","$ArrayBuffer","ArrayBuffer","$DataView","DataView","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayFind","arrayFindIndex","arrayIncludes","arrayIndexOf","arrayValues","values","arrayKeys","keys","arrayEntries","entries","arrayLastIndexOf","lastIndexOf","arrayReduce","reduce","arrayReduceRight","reduceRight","arrayJoin","join","arraySort","sort","arraySlice","arrayToString","arrayToLocaleString","toLocaleString","ITERATOR","TAG","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","CONSTR","TYPED_ARRAY","TYPED","VIEW","WRONG_LENGTH","$map","allocate","LITTLE_ENDIAN","Uint16Array","buffer","FORCED_SET","set","toOffset","BYTES","offset","validate","speciesFromList","list","fromList","addGetter","internal","_d","$from","from","step","iterator","aLen","mapfn","mapping","iterFn","next","done","$of","of","TO_LOCALE_BUG","$toLocaleString","proto","copyWithin","start","every","fill","filter","find","predicate","findIndex","forEach","indexOf","searchElement","includes","separator","map","reverse","middle","some","comparefn","subarray","begin","end","$begin","byteOffset","$slice","$set","arrayLike","src","len","$iterators","isTAIndex","$getDesc","$setDesc","desc","writable","$TypedArrayPrototype$","wrapper","CLAMPED","GETTER","SETTER","TypedArray","Base","TAC","TypedArrayPrototype","addElement","data","v","round","ABV","$offset","$length","byteLength","klass","$len","iter","concat","$nativeIterator","CORRECT_ITER_NAME","$iterator","Map","shared","getOrCreateMetadataMap","targetKey","targetMetadata","keyMetadata","MetadataKey","metadataMap","MetadataValue","_","valueOf","bitmap","META","setDesc","id","isExtensible","FREEZE","preventExtensions","setMeta","w","meta","NEED","fastKey","getWeak","onFreeze","$keys","enumBugKeys","dPs","Empty","createDict","iframeDocument","iframe","style","display","appendChild","contentWindow","document","open","write","lt","close","Properties","BREAK","RETURN","iterable","max","cof","ARG","T","tryGet","callee","Constructor","forbiddenField","safe","_t","px","random","def","stat","DESCRIPTORS","SPECIES","propertyIsEnumerable","hiddenKeys","getOwnPropertyNames","spaces","space","ltrim","RegExp","rtrim","exporter","ALIAS","FORCE","trim","getIteratorMethod","SHARED","mode","copyright","IS_INCLUDES","el","fromIndex","getOwnPropertySymbols","isArray","redefine","$iterCreate","setToStringTag","BUGGY","VALUES","returnThis","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","descriptor","D","navigator","userAgent","forOf","each","common","IS_WEAK","ADDER","_c","IS_ADDER","size","getConstructor","setStrong","Typed","TypedArrayConstructors","K","__defineSetter__","COLLECTION","A","cb","mapFn","nextItem","is","createElement","wksExt","$Symbol","charAt","documentElement","getKeys","gOPS","$assign","assign","k","getSymbols","isEnum","j","args","un","repeat","count","str","Infinity","sign","x","$expm1","expm1","TO_STRING","pos","charCodeAt","isRegExp","searchString","MATCH","re","$defineProperty","SAFE_CLOSING","riter","skipClosing","arr","original","endPos","addToUnscopables","iterated","_i","_k","Arguments","defer","channel","port","invoke","html","cel","process","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","Dispatch","counter","queue","ONREADYSTATECHANGE","run","listener","event","nextTick","now","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","clear","macrotask","Observer","MutationObserver","WebKitMutationObserver","Promise","isNode","head","last","notify","flush","parent","domain","exit","enter","standalone","resolve","promise","then","toggle","node","createTextNode","observe","characterData","task","PromiseCapability","reject","$$resolve","$$reject","Reflect","ownKeys","DATA_VIEW","WRONG_INDEX","BaseBuffer","abs","pow","log","LN2","BYTE_LENGTH","BYTE_OFFSET","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","NaN","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","view","isLittleEndian","intIndex","pack","_b","conversion","ArrayBufferProto","$setInt8","setInt8","getInt8","setUint8","bufferLength","getUint8","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","regExp","replacer","part","names","defineProperties","windowNames","getWindowNames","check","setPrototypeOf","buggy","__proto__","factories","bind","partArgs","bound","construct","msg","isInteger","isFinite","$parseFloat","parseFloat","$trim","$parseInt","parseInt","ws","hex","radix","log1p","EPSILON","EPSILON32","MAX32","MIN32","fround","$abs","$sign","ret","memo","isRight","to","inc","newPromiseCapability","promiseCapability","strong","entry","getEntry","$iterDefine","SIZE","_f","_l","r","delete","prev","Set","add","InternalMap","weak","NATIVE_WEAK_MAP","IS_IE11","ActiveXObject","WEAK_MAP","uncaughtFrozenStore","ufstore","WeakMap","$WeakMap","$has","UncaughtFrozenStore","findUncaughtFrozen","splice","getTime","Date","$toISOString","toISOString","lz","num","y","getUTCFullYear","getUTCMilliseconds","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","number","IS_CONCAT_SPREADABLE","flattenIntoArray","sourceLen","depth","mapper","thisArg","element","spreadable","targetIndex","sourceIndex","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","isEntries","toJSON","scale","inLow","inHigh","outLow","outHigh","isIterable","path","pargs","holder","define","mixin","$fails","wksDefine","enumKeys","_create","gOPNExt","$GOPS","$JSON","JSON","_stringify","stringify","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","protoDesc","wrap","sym","isSymbol","$defineProperties","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","es6Symbols","wellKnownSymbols","for","keyFor","useSetter","useSimple","FAILS_ON_PRIMITIVES","$replacer","symbols","$getPrototypeOf","$freeze","freeze","$seal","seal","$preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","HAS_INSTANCE","FunctionProto","aNumberValue","$toFixed","toFixed","ERROR","multiply","c2","divide","numToString","t","acc","fractionDigits","z","x2","$toPrecision","toPrecision","precision","_isFinite","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","Number","sqrt","$acosh","acosh","MAX_VALUE","$asinh","asinh","$atanh","atanh","cbrt","clz32","LOG2E","cosh","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LOG10E","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","code","raw","callSite","tpl","$at","codePointAt","context","ENDS_WITH","$endsWith","endsWith","endPosition","search","INCLUDES","STARTS_WITH","$startsWith","startsWith","point","anchor","big","blink","bold","fixed","fontcolor","color","fontsize","italics","link","url","small","strike","sub","sup","createProperty","upTo","cloned","$sort","$forEach","STRICT","$filter","$some","$every","$reduce","$indexOf","NEGATIVE_ZERO","$find","forced","Internal","newGenericPromiseCapability","OwnPromiseCapability","Wrapper","microtask","newPromiseCapabilityModule","perform","promiseResolve","PROMISE","versions","v8","$Promise","empty","FakePromise","PromiseRejectionEvent","isThenable","isReject","_n","chain","_v","ok","_s","reaction","exited","handler","fail","_h","onHandleUnhandled","onUnhandled","console","unhandled","isUnhandled","emit","onunhandledrejection","reason","error","_a","onrejectionhandled","$reject","_w","$resolve","executor","err","onFulfilled","onRejected","catch","capability","all","remaining","$index","alreadyCalled","race","WEAK_SET","WeakSet","rApply","fApply","thisArgument","argumentsList","L","rConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","instance","propertyKey","attributes","deleteProperty","Enumerate","enumerate","receiver","getProto","V","existingDescriptor","ownDesc","setProto","pv","$isView","isView","first","fin","viewS","viewT","init","Int8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint32Array","Float32Array","Float64Array","$includes","arraySpeciesCreate","flatMap","flatten","depthArg","at","$pad","WEBKIT_BUG","padStart","padEnd","trimLeft","trimRight","getFlags","RegExpProto","$RegExpStringIterator","regexp","_r","match","matchAll","flags","rx","lastIndex","ignoreCase","multiline","unicode","sticky","getOwnPropertyDescriptors","getDesc","$values","__defineGetter__","__lookupGetter__","__lookupSetter__","isError","clamp","lower","upper","DEG_PER_RAD","PI","RAD_PER_DEG","degrees","radians","fscale","iaddh","x0","x1","y0","y1","$x0","$y0","isubh","imulh","u","$u","$v","u0","v0","u1","v1","umulh","signbit","finally","onFinally","isFunction","try","metadata","toMetaKey","ordinaryDefineOwnMetadata","defineMetadata","metadataKey","metadataValue","deleteMetadata","ordinaryHasOwnMetadata","ordinaryGetOwnMetadata","ordinaryGetMetadata","getMetadata","ordinaryOwnMetadataKeys","ordinaryMetadataKeys","oKeys","pKeys","getMetadataKeys","getOwnMetadata","getOwnMetadataKeys","ordinaryHasMetadata","hasMetadata","hasOwnMetadata","$metadata","decorator","asap","OBSERVABLE","cleanupSubscription","subscription","cleanup","subscriptionClosed","_o","closeSubscription","Subscription","observer","subscriber","SubscriptionObserver","unsubscribe","complete","$Observable","Observable","subscribe","observable","items","$task","TO_STRING_TAG","DOMIterables","Collection","MSIE","time","boundArgs","setInterval","keyOf","createDictMethod","Dict","findKey","createDictIter","DictIterator","dict","mapPairs","isDict","getIterator","partial","delay","make","$re","escape","&","<",">","\"","'","escapeHTML","&","<",">",""","'","unescapeHTML","amd"],"mappings":";;;;;;CAMC,SAASA,EAAKC,EAAKC,IACpB,cACS,SAAUC,GAET,IAAIC,EAAmB,GAGvB,SAASC,oBAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAJ,EAAQG,GAAUK,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASF,qBAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,oBAAoBO,EAAIT,EAGxBE,oBAAoBQ,EAAIT,EAGxBC,oBAAoBS,EAAI,SAASP,EAASQ,EAAMC,GAC3CX,oBAAoBY,EAAEV,EAASQ,IAClCG,OAAOC,eAAeZ,EAASQ,EAAM,CACpCK,cAAc,EACdC,YAAY,EACZC,IAAKN,KAMRX,oBAAoBkB,EAAI,SAASf,GAChC,IAAIQ,EAASR,GAAUA,EAAOgB,WAC7B,SAASC,aAAe,OAAOjB,EAAgB,YAC/C,SAASkB,mBAAqB,OAAOlB,GAEtC,OADAH,oBAAoBS,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRX,oBAAoBY,EAAI,SAASU,EAAQC,GAAY,OAAOV,OAAOW,UAAUC,eAAenB,KAAKgB,EAAQC,IAGzGvB,oBAAoB0B,EAAI,GAGjB1B,oBAAoBA,oBAAoB2B,EAAI,KA9DpD,CAiEC,CAEJ,SAAUxB,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3B8B,EAAM9B,EAAoB,IAC1B+B,EAAO/B,EAAoB,IAC3BgC,EAAMhC,EAAoB,IAC1BiC,EAAY,YAEZC,EAAU,SAAUC,EAAMzB,EAAM0B,GAClC,IASIC,EAAKC,EAAKC,EATVC,EAAYL,EAAOD,EAAQO,EAC3BC,EAAYP,EAAOD,EAAQS,EAC3BC,EAAYT,EAAOD,EAAQW,EAC3BC,EAAWX,EAAOD,EAAQa,EAC1BC,EAAUb,EAAOD,EAAQe,EACzBC,EAAUf,EAAOD,EAAQiB,EACzBjD,EAAUwC,EAAYb,EAAOA,EAAKnB,KAAUmB,EAAKnB,GAAQ,IACzD0C,EAAWlD,EAAQ+B,GACnBoB,EAASX,EAAYd,EAASgB,EAAYhB,EAAOlB,IAASkB,EAAOlB,IAAS,IAAIuB,GAGlF,IAAKI,KADDK,IAAWN,EAAS1B,GACZ0B,GAEVE,GAAOE,GAAaa,GAAUA,EAAOhB,KAASxC,KACnCmC,EAAI9B,EAASmC,KAExBE,EAAMD,EAAMe,EAAOhB,GAAOD,EAAOC,GAEjCnC,EAAQmC,GAAOK,GAAmC,mBAAfW,EAAOhB,GAAqBD,EAAOC,GAEpEW,GAAWV,EAAMR,EAAIS,EAAKX,GAE1BsB,GAAWG,EAAOhB,IAAQE,EAAM,SAAWe,GAC3C,IAAIb,EAAI,SAAUc,EAAGC,EAAGhD,GACtB,GAAIiD,gBAAgBH,EAAG,CACrB,OAAQI,UAAUC,QAChB,KAAK,EAAG,OAAO,IAAIL,EACnB,KAAK,EAAG,OAAO,IAAIA,EAAEC,GACrB,KAAK,EAAG,OAAO,IAAID,EAAEC,EAAGC,GACxB,OAAO,IAAIF,EAAEC,EAAGC,EAAGhD,GACrB,OAAO8C,EAAEM,MAAMH,KAAMC,YAGzB,OADAjB,EAAER,GAAaqB,EAAErB,GACVQ,EAXyB,CAa/BF,GAAOO,GAA0B,mBAAPP,EAAoBT,EAAI+B,SAASvD,KAAMiC,GAAOA,EAEvEO,KACD5C,EAAQ4D,UAAY5D,EAAQ4D,QAAU,KAAKzB,GAAOE,EAE/CJ,EAAOD,EAAQ6B,GAAKX,IAAaA,EAASf,IAAMN,EAAKqB,EAAUf,EAAKE,MAK9EL,EAAQO,EAAI,EACZP,EAAQS,EAAI,EACZT,EAAQW,EAAI,EACZX,EAAQa,EAAI,EACZb,EAAQe,EAAI,GACZf,EAAQiB,EAAI,GACZjB,EAAQ8B,EAAI,GACZ9B,EAAQ6B,EAAI,IACZ5D,EAAOD,QAAUgC,GAKX,SAAU/B,EAAQD,EAASF,GAEjC,IAAIiE,EAAWjE,EAAoB,GACnCG,EAAOD,QAAU,SAAUgE,GACzB,IAAKD,EAASC,GAAK,MAAMC,UAAUD,EAAK,sBACxC,OAAOA,IAMH,SAAU/D,EAAQD,GAGxB,IAAI0B,EAASzB,EAAOD,QAA2B,oBAAVkE,QAAyBA,OAAOC,MAAQA,KACzED,OAAwB,oBAARE,MAAuBA,KAAKD,MAAQA,KAAOC,KAE3DT,SAAS,cAATA,GACc,iBAAPjE,IAAiBA,EAAMgC,IAK5B,SAAUzB,EAAQD,GAExBC,EAAOD,QAAU,SAAUgE,GACzB,MAAqB,iBAAPA,EAAyB,OAAPA,EAA4B,mBAAPA,IAMjD,SAAU/D,EAAQD,GAExBC,EAAOD,QAAU,SAAUqE,GACzB,IACE,QAASA,IACT,MAAOC,GACP,OAAO,KAOL,SAAUrE,EAAQD,EAASF,GAEjC,IAAIyE,EAAQzE,EAAoB,GAApBA,CAAwB,OAChC0E,EAAM1E,EAAoB,IAC1B2E,EAAS3E,EAAoB,GAAG2E,OAChCC,EAA8B,mBAAVD,GAETxE,EAAOD,QAAU,SAAUQ,GACxC,OAAO+D,EAAM/D,KAAU+D,EAAM/D,GAC3BkE,GAAcD,EAAOjE,KAAUkE,EAAaD,EAASD,GAAK,UAAYhE,MAGjE+D,MAAQA,GAKX,SAAUtE,EAAQD,EAASF,GAGjC,IAAI6E,EAAY7E,EAAoB,IAChC8E,EAAMT,KAAKS,IACf3E,EAAOD,QAAU,SAAUgE,GACzB,OAAY,EAALA,EAASY,EAAID,EAAUX,GAAK,kBAAoB,IAMnD,SAAU/D,EAAQD,EAASF,GAGjCG,EAAOD,SAAWF,EAAoB,EAApBA,CAAuB,WACvC,OAA+E,GAAxEa,OAAOC,eAAe,GAAI,IAAK,CAAEG,IAAK,WAAc,OAAO,KAAQsC,KAMtE,SAAUpD,EAAQD,EAASF,GAEjC,IAAI+E,EAAW/E,EAAoB,GAC/BgF,EAAiBhF,EAAoB,IACrCiF,EAAcjF,EAAoB,IAClCkF,EAAKrE,OAAOC,eAEhBZ,EAAQiF,EAAInF,EAAoB,GAAKa,OAAOC,eAAiB,SAASA,eAAesE,EAAGrC,EAAGsC,GAIzF,GAHAN,EAASK,GACTrC,EAAIkC,EAAYlC,GAAG,GACnBgC,EAASM,GACLL,EAAgB,IAClB,OAAOE,EAAGE,EAAGrC,EAAGsC,GAChB,MAAOb,IACT,GAAI,QAASa,GAAc,QAASA,EAAY,MAAMlB,UAAU,4BAEhE,MADI,UAAWkB,IAAYD,EAAErC,GAAKsC,EAAWC,OACtCF,IAMH,SAAUjF,EAAQD,EAASF,GAGjC,IAAIuF,EAAUvF,EAAoB,IAClCG,EAAOD,QAAU,SAAUgE,GACzB,OAAOrD,OAAO0E,EAAQrB,MAMlB,SAAU/D,EAAQD,GAExBC,EAAOD,QAAU,SAAUgE,GACzB,GAAiB,mBAANA,EAAkB,MAAMC,UAAUD,EAAK,uBAClD,OAAOA,IAMH,SAAU/D,EAAQD,EAASF,GAGjC,IAAIwF,EAAUxF,EAAoB,IAC9BuF,EAAUvF,EAAoB,IAClCG,EAAOD,QAAU,SAAUgE,GACzB,OAAOsB,EAAQD,EAAQrB,MAMnB,SAAU/D,EAAQD,GAExB,IAAI2B,EAAO1B,EAAOD,QAAU,CAAEuF,QAAS,SACrB,iBAAP9F,IAAiBA,EAAMkC,IAK5B,SAAU1B,EAAQD,EAASF,GAGjC,IAAIgC,EAAMhC,EAAoB,IAC1B0F,EAAW1F,EAAoB,GAC/B2F,EAAW3F,EAAoB,GAApBA,CAAwB,YACnC4F,EAAc/E,OAAOW,UAEzBrB,EAAOD,QAAUW,OAAOgF,gBAAkB,SAAUT,GAElD,OADAA,EAAIM,EAASN,GACTpD,EAAIoD,EAAGO,GAAkBP,EAAEO,GACH,mBAAjBP,EAAEU,aAA6BV,aAAaA,EAAEU,YAChDV,EAAEU,YAAYtE,UACd4D,aAAavE,OAAS+E,EAAc,OAMzC,SAAUzF,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B+F,EAAQ/F,EAAoB,GAC5BuF,EAAUvF,EAAoB,IAC9BgG,EAAO,KAEPC,EAAa,SAAUC,EAAQC,EAAKC,EAAWd,GACjD,IAAIzC,EAAIwD,OAAOd,EAAQW,IACnBI,EAAK,IAAMH,EAEf,MADkB,KAAdC,IAAkBE,GAAM,IAAMF,EAAY,KAAOC,OAAOf,GAAOiB,QAAQP,EAAM,UAAY,KACtFM,EAAK,IAAMzD,EAAI,KAAOsD,EAAM,KAErChG,EAAOD,QAAU,SAAUsG,EAAMjC,GAC/B,IAAIa,EAAI,GACRA,EAAEoB,GAAQjC,EAAK0B,GACf/D,EAAQA,EAAQa,EAAIb,EAAQO,EAAIsD,EAAM,WACpC,IAAIU,EAAO,GAAGD,GAAM,KACpB,OAAOC,IAASA,EAAKC,eAA0C,EAAzBD,EAAKE,MAAM,KAAKhD,SACpD,SAAUyB,KAMV,SAAUjF,EAAQD,GAExB,IAAIuB,EAAiB,GAAGA,eACxBtB,EAAOD,QAAU,SAAUgE,EAAI7B,GAC7B,OAAOZ,EAAenB,KAAK4D,EAAI7B,KAM3B,SAAUlC,EAAQD,EAASF,GAGjC,IAAI4G,EAAY5G,EAAoB,IACpCG,EAAOD,QAAU,SAAU2G,EAAIC,EAAMnD,GAEnC,GADAiD,EAAUC,GACNC,IAASjH,GAAW,OAAOgH,EAC/B,OAAQlD,GACN,KAAK,EAAG,OAAO,SAAUJ,GACvB,OAAOsD,EAAGvG,KAAKwG,EAAMvD,IAEvB,KAAK,EAAG,OAAO,SAAUA,EAAGC,GAC1B,OAAOqD,EAAGvG,KAAKwG,EAAMvD,EAAGC,IAE1B,KAAK,EAAG,OAAO,SAAUD,EAAGC,EAAGhD,GAC7B,OAAOqG,EAAGvG,KAAKwG,EAAMvD,EAAGC,EAAGhD,IAG/B,OAAO,WACL,OAAOqG,EAAGjD,MAAMkD,EAAMpD,cAOpB,SAAUvD,EAAQD,EAASF,GAEjC,IAAIkF,EAAKlF,EAAoB,GACzB+G,EAAa/G,EAAoB,IACrCG,EAAOD,QAAUF,EAAoB,GAAK,SAAUsB,EAAQe,EAAKiD,GAC/D,OAAOJ,EAAGC,EAAE7D,EAAQe,EAAK0E,EAAW,EAAGzB,KACrC,SAAUhE,EAAQe,EAAKiD,GAEzB,OADAhE,EAAOe,GAAOiD,EACPhE,IAMH,SAAUnB,EAAQD,EAASF,GAEjC,IAAIgH,EAAMhH,EAAoB,IAC1B+G,EAAa/G,EAAoB,IACjCiH,EAAYjH,EAAoB,IAChCiF,EAAcjF,EAAoB,IAClCgC,EAAMhC,EAAoB,IAC1BgF,EAAiBhF,EAAoB,IACrCkH,EAAOrG,OAAOsG,yBAElBjH,EAAQiF,EAAInF,EAAoB,GAAKkH,EAAO,SAASC,yBAAyB/B,EAAGrC,GAG/E,GAFAqC,EAAI6B,EAAU7B,GACdrC,EAAIkC,EAAYlC,GAAG,GACfiC,EAAgB,IAClB,OAAOkC,EAAK9B,EAAGrC,GACf,MAAOyB,IACT,GAAIxC,EAAIoD,EAAGrC,GAAI,OAAOgE,GAAYC,EAAI7B,EAAE7E,KAAK8E,EAAGrC,GAAIqC,EAAErC,MAMlD,SAAU5C,EAAQD,EAASF,GAIjC,IAAI+F,EAAQ/F,EAAoB,GAEhCG,EAAOD,QAAU,SAAUkH,EAAQC,GACjC,QAASD,GAAUrB,EAAM,WAEvBsB,EAAMD,EAAO9G,KAAK,KAAM,aAA6B,GAAK8G,EAAO9G,KAAK,UAOpE,SAAUH,EAAQD,EAASF,GASjC,IAAI8B,EAAM9B,EAAoB,IAC1BwF,EAAUxF,EAAoB,IAC9B0F,EAAW1F,EAAoB,GAC/BsH,EAAWtH,EAAoB,GAC/BuH,EAAMvH,EAAoB,IAC9BG,EAAOD,QAAU,SAAUsH,EAAMC,GAC/B,IAAIC,EAAiB,GAARF,EACTG,EAAoB,GAARH,EACZI,EAAkB,GAARJ,EACVK,EAAmB,GAARL,EACXM,EAAwB,GAARN,EAChBO,EAAmB,GAARP,GAAaM,EACxBE,EAASP,GAAWF,EACxB,OAAO,SAAUU,EAAOC,EAAYpB,GAQlC,IAPA,IAMIqB,EAAKC,EANLhD,EAAIM,EAASuC,GACb3D,EAAOkB,EAAQJ,GACfD,EAAIrD,EAAIoG,EAAYpB,EAAM,GAC1BnD,EAAS2D,EAAShD,EAAKX,QACvB0E,EAAQ,EACRC,EAASZ,EAASM,EAAOC,EAAOtE,GAAUgE,EAAYK,EAAOC,EAAO,GAAKpI,GAE9DwI,EAAT1E,EAAgB0E,IAAS,IAAIN,GAAYM,KAAS/D,KAEtD8D,EAAMjD,EADNgD,EAAM7D,EAAK+D,GACEA,EAAOjD,GAChBoC,GACF,GAAIE,EAAQY,EAAOD,GAASD,OACvB,GAAIA,EAAK,OAAQZ,GACpB,KAAK,EAAG,OAAO,EACf,KAAK,EAAG,OAAOW,EACf,KAAK,EAAG,OAAOE,EACf,KAAK,EAAGC,EAAOC,KAAKJ,QACf,GAAIN,EAAU,OAAO,EAGhC,OAAOC,GAAiB,EAAIF,GAAWC,EAAWA,EAAWS,KAO3D,SAAUnI,EAAQD,GAExB,IAAIsI,EAAW,GAAGA,SAElBrI,EAAOD,QAAU,SAAUgE,GACzB,OAAOsE,EAASlI,KAAK4D,GAAIuE,MAAM,GAAI,KAM/B,SAAUtI,EAAQD,GAGxB,IAAIwI,EAAOrE,KAAKqE,KACZC,EAAQtE,KAAKsE,MACjBxI,EAAOD,QAAU,SAAUgE,GACzB,OAAO0E,MAAM1E,GAAMA,GAAM,GAAU,EAALA,EAASyE,EAAQD,GAAMxE,KAMjD,SAAU/D,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B6B,EAAO7B,EAAoB,IAC3B+F,EAAQ/F,EAAoB,GAChCG,EAAOD,QAAU,SAAU2I,EAAKtE,GAC9B,IAAIsC,GAAMhF,EAAKhB,QAAU,IAAIgI,IAAQhI,OAAOgI,GACxCC,EAAM,GACVA,EAAID,GAAOtE,EAAKsC,GAChB3E,EAAQA,EAAQW,EAAIX,EAAQO,EAAIsD,EAAM,WAAcc,EAAG,KAAQ,SAAUiC,KAMrE,SAAU3I,EAAQD,GAGxBC,EAAOD,QAAU,SAAUgE,GACzB,GAAIA,GAAMrE,GAAW,MAAMsE,UAAU,yBAA2BD,GAChE,OAAOA,IAMH,SAAU/D,EAAQD,EAASF,GAIjC,GAAIA,EAAoB,GAAI,CAC1B,IAAI+I,EAAU/I,EAAoB,IAC9B4B,EAAS5B,EAAoB,GAC7B+F,EAAQ/F,EAAoB,GAC5BkC,EAAUlC,EAAoB,GAC9BgJ,EAAShJ,EAAoB,IAC7BiJ,EAAUjJ,EAAoB,IAC9B8B,EAAM9B,EAAoB,IAC1BkJ,EAAalJ,EAAoB,IACjCmJ,EAAenJ,EAAoB,IACnC+B,EAAO/B,EAAoB,IAC3BoJ,EAAcpJ,EAAoB,IAClC6E,EAAY7E,EAAoB,IAChCsH,EAAWtH,EAAoB,GAC/BqJ,EAAUrJ,EAAoB,KAC9BsJ,EAAkBtJ,EAAoB,IACtCiF,EAAcjF,EAAoB,IAClCgC,EAAMhC,EAAoB,IAC1BuJ,EAAUvJ,EAAoB,IAC9BiE,EAAWjE,EAAoB,GAC/B0F,EAAW1F,EAAoB,GAC/BwJ,EAAcxJ,EAAoB,IAClCgI,EAAShI,EAAoB,IAC7B6F,EAAiB7F,EAAoB,IACrCyJ,EAAOzJ,EAAoB,IAAImF,EAC/BuE,EAAY1J,EAAoB,IAChC0E,EAAM1E,EAAoB,IAC1B2J,EAAM3J,EAAoB,GAC1B4J,EAAoB5J,EAAoB,IACxC6J,EAAsB7J,EAAoB,IAC1C8J,EAAqB9J,EAAoB,IACzC+J,EAAiB/J,EAAoB,IACrCgK,EAAYhK,EAAoB,IAChCiK,EAAcjK,EAAoB,IAClCkK,EAAalK,EAAoB,IACjCmK,EAAYnK,EAAoB,IAChCoK,EAAkBpK,EAAoB,KACtCqK,EAAMrK,EAAoB,GAC1BsK,EAAQtK,EAAoB,IAC5BkF,EAAKmF,EAAIlF,EACT+B,EAAOoD,EAAMnF,EACboF,EAAa3I,EAAO2I,WACpBpG,EAAYvC,EAAOuC,UACnBqG,EAAa5I,EAAO4I,WACpBC,EAAe,cACfC,EAAgB,SAAWD,EAC3BE,EAAoB,oBACpB1I,EAAY,YACZ2I,EAAaC,MAAM5I,GACnB6I,EAAe7B,EAAQ8B,YACvBC,EAAY/B,EAAQgC,SACpBC,EAAetB,EAAkB,GACjCuB,GAAcvB,EAAkB,GAChCwB,GAAYxB,EAAkB,GAC9ByB,GAAazB,EAAkB,GAC/B0B,GAAY1B,EAAkB,GAC9B2B,GAAiB3B,EAAkB,GACnC4B,GAAgB3B,GAAoB,GACpC4B,GAAe5B,GAAoB,GACnC6B,GAAc3B,EAAe4B,OAC7BC,GAAY7B,EAAe8B,KAC3BC,GAAe/B,EAAegC,QAC9BC,GAAmBpB,EAAWqB,YAC9BC,GAActB,EAAWuB,OACzBC,GAAmBxB,EAAWyB,YAC9BC,GAAY1B,EAAW2B,KACvBC,GAAY5B,EAAW6B,KACvBC,GAAa9B,EAAWnC,MACxBkE,GAAgB/B,EAAWpC,SAC3BoE,GAAsBhC,EAAWiC,eACjCC,GAAWnD,EAAI,YACfoD,GAAMpD,EAAI,eACVqD,GAAoBtI,EAAI,qBACxBuI,GAAkBvI,EAAI,mBACtBwI,GAAmBlE,EAAOmE,OAC1BC,GAAcpE,EAAOqE,MACrBC,GAAOtE,EAAOsE,KACdC,GAAe,gBAEfC,GAAO5D,EAAkB,EAAG,SAAUxE,EAAGzB,GAC3C,OAAO8J,GAAS3D,EAAmB1E,EAAGA,EAAE6H,KAAmBtJ,KAGzD+J,GAAgB3H,EAAM,WAExB,OAA0D,IAAnD,IAAIyE,EAAW,IAAImD,YAAY,CAAC,IAAIC,QAAQ,KAGjDC,KAAerD,KAAgBA,EAAWvI,GAAW6L,KAAO/H,EAAM,WACpE,IAAIyE,EAAW,GAAGsD,IAAI,MAGpBC,GAAW,SAAU7J,EAAI8J,GAC3B,IAAIC,EAASpJ,EAAUX,GACvB,GAAI+J,EAAS,GAAKA,EAASD,EAAO,MAAMzD,EAAW,iBACnD,OAAO0D,GAGLC,GAAW,SAAUhK,GACvB,GAAID,EAASC,IAAOkJ,MAAelJ,EAAI,OAAOA,EAC9C,MAAMC,EAAUD,EAAK,2BAGnBuJ,GAAW,SAAUnK,EAAGK,GAC1B,KAAMM,EAASX,IAAM0J,MAAqB1J,GACxC,MAAMa,EAAU,wCAChB,OAAO,IAAIb,EAAEK,IAGbwK,GAAkB,SAAU/I,EAAGgJ,GACjC,OAAOC,GAASvE,EAAmB1E,EAAGA,EAAE6H,KAAmBmB,IAGzDC,GAAW,SAAU/K,EAAG8K,GAI1B,IAHA,IAAI/F,EAAQ,EACR1E,EAASyK,EAAKzK,OACd2E,EAASmF,GAASnK,EAAGK,GACT0E,EAAT1E,GAAgB2E,EAAOD,GAAS+F,EAAK/F,KAC5C,OAAOC,GAGLgG,GAAY,SAAUpK,EAAI7B,EAAKkM,GACjCrJ,EAAGhB,EAAI7B,EAAK,CAAEpB,IAAK,WAAc,OAAOwC,KAAK+K,GAAGD,OAG9CE,GAAQ,SAASC,KAAKtM,GACxB,IAKIhC,EAAGuD,EAAQgI,EAAQrD,EAAQqG,EAAMC,EALjCxJ,EAAIM,EAAStD,GACbyM,EAAOnL,UAAUC,OACjBmL,EAAe,EAAPD,EAAWnL,UAAU,GAAK7D,GAClCkP,EAAUD,IAAUjP,GACpBmP,EAAStF,EAAUtE,GAEvB,GAAI4J,GAAUnP,KAAc2J,EAAYwF,GAAS,CAC/C,IAAKJ,EAAWI,EAAO1O,KAAK8E,GAAIuG,EAAS,GAAIvL,EAAI,IAAKuO,EAAOC,EAASK,QAAQC,KAAM9O,IAClFuL,EAAOpD,KAAKoG,EAAKrJ,OACjBF,EAAIuG,EAGR,IADIoD,GAAkB,EAAPF,IAAUC,EAAQhN,EAAIgN,EAAOpL,UAAU,GAAI,IACrDtD,EAAI,EAAGuD,EAAS2D,EAASlC,EAAEzB,QAAS2E,EAASmF,GAAShK,KAAME,GAAkBvD,EAATuD,EAAYvD,IACpFkI,EAAOlI,GAAK2O,EAAUD,EAAM1J,EAAEhF,GAAIA,GAAKgF,EAAEhF,GAE3C,OAAOkI,GAGL6G,GAAM,SAASC,KAIjB,IAHA,IAAI/G,EAAQ,EACR1E,EAASD,UAAUC,OACnB2E,EAASmF,GAAShK,KAAME,GACZ0E,EAAT1E,GAAgB2E,EAAOD,GAAS3E,UAAU2E,KACjD,OAAOC,GAIL+G,KAAkB7E,GAAczE,EAAM,WAAc6G,GAAoBtM,KAAK,IAAIkK,EAAW,MAE5F8E,GAAkB,SAASzC,iBAC7B,OAAOD,GAAoBhJ,MAAMyL,GAAgB3C,GAAWpM,KAAK4N,GAASzK,OAASyK,GAASzK,MAAOC,YAGjG6L,GAAQ,CACVC,WAAY,SAASA,WAAWnM,EAAQoM,GACtC,OAAOrF,EAAgB9J,KAAK4N,GAASzK,MAAOJ,EAAQoM,EAA0B,EAAnB/L,UAAUC,OAAaD,UAAU,GAAK7D,KAEnG6P,MAAO,SAASA,MAAMxH,GACpB,OAAOmD,GAAW6C,GAASzK,MAAOyE,EAA+B,EAAnBxE,UAAUC,OAAaD,UAAU,GAAK7D,KAEtF8P,KAAM,SAASA,KAAKrK,GAClB,OAAO6E,EAAUvG,MAAMsK,GAASzK,MAAOC,YAEzCkM,OAAQ,SAASA,OAAO1H,GACtB,OAAOiG,GAAgB1K,KAAM0H,GAAY+C,GAASzK,MAAOyE,EACpC,EAAnBxE,UAAUC,OAAaD,UAAU,GAAK7D,MAE1CgQ,KAAM,SAASA,KAAKC,GAClB,OAAOxE,GAAU4C,GAASzK,MAAOqM,EAA8B,EAAnBpM,UAAUC,OAAaD,UAAU,GAAK7D,KAEpFkQ,UAAW,SAASA,UAAUD,GAC5B,OAAOvE,GAAe2C,GAASzK,MAAOqM,EAA8B,EAAnBpM,UAAUC,OAAaD,UAAU,GAAK7D,KAEzFmQ,QAAS,SAASA,QAAQ9H,GACxBgD,EAAagD,GAASzK,MAAOyE,EAA+B,EAAnBxE,UAAUC,OAAaD,UAAU,GAAK7D,KAEjFoQ,QAAS,SAASA,QAAQC,GACxB,OAAOzE,GAAayC,GAASzK,MAAOyM,EAAkC,EAAnBxM,UAAUC,OAAaD,UAAU,GAAK7D,KAE3FsQ,SAAU,SAASA,SAASD,GAC1B,OAAO1E,GAAc0C,GAASzK,MAAOyM,EAAkC,EAAnBxM,UAAUC,OAAaD,UAAU,GAAK7D,KAE5F0M,KAAM,SAASA,KAAK6D,GAClB,OAAO9D,GAAU1I,MAAMsK,GAASzK,MAAOC,YAEzCuI,YAAa,SAASA,YAAYiE,GAChC,OAAOlE,GAAiBpI,MAAMsK,GAASzK,MAAOC,YAEhD2M,IAAK,SAASA,IAAIvB,GAChB,OAAOtB,GAAKU,GAASzK,MAAOqL,EAA0B,EAAnBpL,UAAUC,OAAaD,UAAU,GAAK7D,KAE3EsM,OAAQ,SAASA,OAAOjE,GACtB,OAAOgE,GAAYtI,MAAMsK,GAASzK,MAAOC,YAE3C2I,YAAa,SAASA,YAAYnE,GAChC,OAAOkE,GAAiBxI,MAAMsK,GAASzK,MAAOC,YAEhD4M,QAAS,SAASA,UAMhB,IALA,IAIIhL,EAJAwB,EAAOrD,KACPE,EAASuK,GAASpH,GAAMnD,OACxB4M,EAASlM,KAAKsE,MAAMhF,EAAS,GAC7B0E,EAAQ,EAELA,EAAQkI,GACbjL,EAAQwB,EAAKuB,GACbvB,EAAKuB,KAAWvB,IAAOnD,GACvBmD,EAAKnD,GAAU2B,EACf,OAAOwB,GAEX0J,KAAM,SAASA,KAAKtI,GAClB,OAAOkD,GAAU8C,GAASzK,MAAOyE,EAA+B,EAAnBxE,UAAUC,OAAaD,UAAU,GAAK7D,KAErF4M,KAAM,SAASA,KAAKgE,GAClB,OAAOjE,GAAUlM,KAAK4N,GAASzK,MAAOgN,IAExCC,SAAU,SAASA,SAASC,EAAOC,GACjC,IAAIxL,EAAI8I,GAASzK,MACbE,EAASyB,EAAEzB,OACXkN,EAASvH,EAAgBqH,EAAOhN,GACpC,OAAO,IAAKmG,EAAmB1E,EAAGA,EAAE6H,KAA7B,CACL7H,EAAEwI,OACFxI,EAAE0L,WAAaD,EAASzL,EAAEuF,kBAC1BrD,GAAUsJ,IAAQ/Q,GAAY8D,EAAS2F,EAAgBsH,EAAKjN,IAAWkN,MAKzEE,GAAS,SAAStI,MAAMgH,EAAOmB,GACjC,OAAOzC,GAAgB1K,KAAMiJ,GAAWpM,KAAK4N,GAASzK,MAAOgM,EAAOmB,KAGlEI,GAAO,SAASlD,IAAImD,GACtB/C,GAASzK,MACT,IAAIwK,EAASF,GAASrK,UAAU,GAAI,GAChCC,EAASF,KAAKE,OACduN,EAAMxL,EAASuL,GACfE,EAAM7J,EAAS4J,EAAIvN,QACnB0E,EAAQ,EACZ,GAAmB1E,EAAfwN,EAAMlD,EAAiB,MAAM1D,EAAWgD,IAC5C,KAAOlF,EAAQ8I,GAAK1N,KAAKwK,EAAS5F,GAAS6I,EAAI7I,MAG7C+I,GAAa,CACfrF,QAAS,SAASA,UAChB,OAAOD,GAAaxL,KAAK4N,GAASzK,QAEpCoI,KAAM,SAASA,OACb,OAAOD,GAAUtL,KAAK4N,GAASzK,QAEjCkI,OAAQ,SAASA,SACf,OAAOD,GAAYpL,KAAK4N,GAASzK,SAIjC4N,GAAY,SAAUhO,EAAQhB,GAChC,OAAO4B,EAASZ,IACXA,EAAO+J,KACO,iBAAP/K,GACPA,KAAOgB,GACPgD,QAAQhE,IAAQgE,OAAOhE,IAE1BiP,GAAW,SAASnK,yBAAyB9D,EAAQhB,GACvD,OAAOgP,GAAUhO,EAAQhB,EAAM4C,EAAY5C,GAAK,IAC5C8G,EAAa,EAAG9F,EAAOhB,IACvB6E,EAAK7D,EAAQhB,IAEfkP,GAAW,SAASzQ,eAAeuC,EAAQhB,EAAKmP,GAClD,QAAIH,GAAUhO,EAAQhB,EAAM4C,EAAY5C,GAAK,KACxC4B,EAASuN,IACTxP,EAAIwP,EAAM,WACTxP,EAAIwP,EAAM,QACVxP,EAAIwP,EAAM,QAEVA,EAAKzQ,cACJiB,EAAIwP,EAAM,cAAeA,EAAKC,UAC9BzP,EAAIwP,EAAM,gBAAiBA,EAAKxQ,WAI9BkE,EAAG7B,EAAQhB,EAAKmP,IAFvBnO,EAAOhB,GAAOmP,EAAKlM,MACZjC,IAIN6J,KACH5C,EAAMnF,EAAImM,GACVjH,EAAIlF,EAAIoM,IAGVrP,EAAQA,EAAQW,EAAIX,EAAQO,GAAKyK,GAAkB,SAAU,CAC3D/F,yBAA0BmK,GAC1BxQ,eAAgByQ,KAGdxL,EAAM,WAAc4G,GAAcrM,KAAK,QACzCqM,GAAgBC,GAAsB,SAASpE,WAC7C,OAAO8D,GAAUhM,KAAKmD,QAI1B,IAAIiO,GAAwBtI,EAAY,GAAImG,IAC5CnG,EAAYsI,GAAuBN,IACnCrP,EAAK2P,GAAuB5E,GAAUsE,GAAWzF,QACjDvC,EAAYsI,GAAuB,CACjCjJ,MAAOsI,GACPjD,IAAKkD,GACLlL,YAAa,aACb0C,SAAUmE,GACVE,eAAgByC,KAElBhB,GAAUoD,GAAuB,SAAU,KAC3CpD,GAAUoD,GAAuB,aAAc,KAC/CpD,GAAUoD,GAAuB,aAAc,KAC/CpD,GAAUoD,GAAuB,SAAU,KAC3CxM,EAAGwM,GAAuB3E,GAAK,CAC7B9L,IAAK,WAAc,OAAOwC,KAAK2J,OAIjCjN,EAAOD,QAAU,SAAU2I,EAAKmF,EAAO2D,EAASC,GAE9C,IAAIpL,EAAOqC,IADX+I,IAAYA,GACgB,UAAY,IAAM,QAC1CC,EAAS,MAAQhJ,EACjBiJ,EAAS,MAAQjJ,EACjBkJ,EAAanQ,EAAO4E,GACpBwL,EAAOD,GAAc,GACrBE,EAAMF,GAAclM,EAAekM,GAEnC3M,EAAI,GACJ8M,EAAsBH,GAAcA,EAAW9P,GAU/CkQ,EAAa,SAAUrL,EAAMuB,GAC/BnD,EAAG4B,EAAMuB,EAAO,CACdpH,IAAK,WACH,OAXAmR,EAWc3O,KAXF+K,IACJ6D,EAAER,GAUUxJ,EAVM2F,EAAQoE,EAAKxR,EAAG8M,IAFnC,IACP0E,GAaFtE,IAAK,SAAUxI,GACb,OAXuB+C,EAWHA,EAXU/C,EAWHA,EAV3B8M,EAUc3O,KAVF+K,GACZoD,IAAStM,GAASA,EAAQjB,KAAKiO,MAAMhN,IAAU,EAAI,EAAY,IAARA,EAAe,IAAe,IAARA,QACjF8M,EAAKC,EAAEP,GAAQzJ,EAAQ2F,EAAQoE,EAAKxR,EAAG0E,EAAOoI,IAHnC,IAAgBrF,EAAO/C,EAC9B8M,GAYFpR,YAAY,MApBF+Q,IAAe/I,EAAOuJ,KAwBlCR,EAAaJ,EAAQ,SAAU7K,EAAMsL,EAAMI,EAASC,GAClDvJ,EAAWpC,EAAMiL,EAAYvL,EAAM,MACnC,IAEIoH,EAAQ8E,EAAY/O,EAAQgP,EAF5BtK,EAAQ,EACR4F,EAAS,EAEb,GAAKhK,EAASmO,GAIP,CAAA,KAAIA,aAAgBtH,IAAiB6H,EAAQpJ,EAAQ6I,KAAU3H,GAAgBkI,GAASjI,GAaxF,OAAI0C,MAAegF,EACjB/D,GAAS0D,EAAYK,GAErB3D,GAAMnO,KAAKyR,EAAYK,GAf9BxE,EAASwE,EACTnE,EAASF,GAASyE,EAASxE,GAC3B,IAAI4E,EAAOR,EAAKM,WAChB,GAAID,IAAY5S,GAAW,CACzB,GAAI+S,EAAO5E,EAAO,MAAMzD,EAAWgD,IAEnC,IADAmF,EAAaE,EAAO3E,GACH,EAAG,MAAM1D,EAAWgD,SAGrC,GAA0BqF,GAD1BF,EAAapL,EAASmL,GAAWzE,GAChBC,EAAe,MAAM1D,EAAWgD,IAEnD5J,EAAS+O,EAAa1E,OAftBrK,EAAS0F,EAAQ+I,GAEjBxE,EAAS,IAAI9C,EADb4H,EAAa/O,EAASqK,GA2BxB,IAPAjM,EAAK+E,EAAM,KAAM,CACftD,EAAGoK,EACHhN,EAAGqN,EACH5N,EAAGqS,EACHlO,EAAGb,EACH0O,EAAG,IAAIrH,EAAU4C,KAEZvF,EAAQ1E,GAAQwO,EAAWrL,EAAMuB,OAE1C6J,EAAsBH,EAAW9P,GAAa+F,EAAO0J,IACrD3P,EAAKmQ,EAAqB,cAAeH,IAC/BhM,EAAM,WAChBgM,EAAW,MACNhM,EAAM,WACX,IAAIgM,GAAY,MACX9H,EAAY,SAAU4I,GAC3B,IAAId,EACJ,IAAIA,EAAW,MACf,IAAIA,EAAW,KACf,IAAIA,EAAWc,KACd,KACDd,EAAaJ,EAAQ,SAAU7K,EAAMsL,EAAMI,EAASC,GAElD,IAAIE,EAGJ,OAJAzJ,EAAWpC,EAAMiL,EAAYvL,GAIxBvC,EAASmO,GACVA,aAAgBtH,IAAiB6H,EAAQpJ,EAAQ6I,KAAU3H,GAAgBkI,GAASjI,EAC/E+H,IAAY5S,GACf,IAAImS,EAAKI,EAAMrE,GAASyE,EAASxE,GAAQyE,GACzCD,IAAY3S,GACV,IAAImS,EAAKI,EAAMrE,GAASyE,EAASxE,IACjC,IAAIgE,EAAKI,GAEbhF,MAAegF,EAAa/D,GAAS0D,EAAYK,GAC9C3D,GAAMnO,KAAKyR,EAAYK,GATF,IAAIJ,EAAK3I,EAAQ+I,MAW/ClH,EAAa+G,IAAQpO,SAASrC,UAAYiI,EAAKuI,GAAMc,OAAOrJ,EAAKwI,IAAQxI,EAAKuI,GAAO,SAAU3P,GACvFA,KAAO0P,GAAahQ,EAAKgQ,EAAY1P,EAAK2P,EAAK3P,MAEvD0P,EAAW9P,GAAaiQ,EACnBnJ,IAASmJ,EAAoBpM,YAAciM,IAElD,IAAIgB,EAAkBb,EAAoBpF,IACtCkG,IAAsBD,IACI,UAAxBA,EAAgBrS,MAAoBqS,EAAgBrS,MAAQb,IAC9DoT,EAAY7B,GAAWzF,OAC3B5J,EAAKgQ,EAAY/E,IAAmB,GACpCjL,EAAKmQ,EAAqB9E,GAAa5G,GACvCzE,EAAKmQ,EAAqB5E,IAAM,GAChCvL,EAAKmQ,EAAqBjF,GAAiB8E,IAEvCH,EAAU,IAAIG,EAAW,GAAGhF,KAAQvG,EAASuG,MAAOmF,IACtDhN,EAAGgN,EAAqBnF,GAAK,CAC3B9L,IAAK,WAAc,OAAOuF,KAM9BtE,EAAQA,EAAQS,EAAIT,EAAQiB,EAAIjB,EAAQO,IAFxC2C,EAAEoB,GAAQuL,IAEiDC,GAAO5M,GAElElD,EAAQA,EAAQW,EAAG2D,EAAM,CACvBmE,kBAAmBqD,IAGrB9L,EAAQA,EAAQW,EAAIX,EAAQO,EAAIsD,EAAM,WAAciM,EAAK5C,GAAG9O,KAAKyR,EAAY,KAAQvL,EAAM,CACzFkI,KAAMD,GACNW,GAAID,KAGAxE,KAAqBuH,GAAsBnQ,EAAKmQ,EAAqBvH,EAAmBqD,GAE9F9L,EAAQA,EAAQa,EAAGyD,EAAM+I,IAEzBrF,EAAW1D,GAEXtE,EAAQA,EAAQa,EAAIb,EAAQO,EAAIoL,GAAYrH,EAAM,CAAEsH,IAAKkD,KAEzD9O,EAAQA,EAAQa,EAAIb,EAAQO,GAAKuQ,EAAmBxM,EAAM4K,IAErDrI,GAAWmJ,EAAoB1J,UAAYmE,KAAeuF,EAAoB1J,SAAWmE,IAE9FzK,EAAQA,EAAQa,EAAIb,EAAQO,EAAIsD,EAAM,WACpC,IAAIgM,EAAW,GAAGtJ,UAChBjC,EAAM,CAAEiC,MAAOsI,KAEnB7O,EAAQA,EAAQa,EAAIb,EAAQO,GAAKsD,EAAM,WACrC,MAAO,CAAC,EAAG,GAAG8G,kBAAoB,IAAIkF,EAAW,CAAC,EAAG,IAAIlF,qBACpD9G,EAAM,WACXmM,EAAoBrF,eAAevM,KAAK,CAAC,EAAG,OACzCkG,EAAM,CAAEqG,eAAgByC,KAE7BtF,EAAUxD,GAAQwM,EAAoBD,EAAkBE,EACnDlK,GAAYiK,GAAmBjR,EAAKmQ,EAAqBpF,GAAUmG,SAErE9S,EAAOD,QAAU,cAKlB,SAAUC,EAAQD,EAASF,GAEjC,IAAIkT,EAAMlT,EAAoB,KAC1BkC,EAAUlC,EAAoB,GAC9BmT,EAASnT,EAAoB,GAApBA,CAAwB,YACjCyE,EAAQ0O,EAAO1O,QAAU0O,EAAO1O,MAAQ,IAAKzE,EAAoB,OAEjEoT,EAAyB,SAAU/P,EAAQgQ,EAAWrL,GACxD,IAAIsL,EAAiB7O,EAAMxD,IAAIoC,GAC/B,IAAKiQ,EAAgB,CACnB,IAAKtL,EAAQ,OAAOnI,GACpB4E,EAAMqJ,IAAIzK,EAAQiQ,EAAiB,IAAIJ,GAEzC,IAAIK,EAAcD,EAAerS,IAAIoS,GACrC,IAAKE,EAAa,CAChB,IAAKvL,EAAQ,OAAOnI,GACpByT,EAAexF,IAAIuF,EAAWE,EAAc,IAAIL,GAChD,OAAOK,GA0BXpT,EAAOD,QAAU,CACfuE,MAAOA,EACP4L,IAAK+C,EACLpR,IA3B2B,SAAUwR,EAAapO,EAAGrC,GACrD,IAAI0Q,EAAcL,EAAuBhO,EAAGrC,GAAG,GAC/C,OAAO0Q,IAAgB5T,IAAoB4T,EAAYzR,IAAIwR,IA0B3DvS,IAxB2B,SAAUuS,EAAapO,EAAGrC,GACrD,IAAI0Q,EAAcL,EAAuBhO,EAAGrC,GAAG,GAC/C,OAAO0Q,IAAgB5T,GAAYA,GAAY4T,EAAYxS,IAAIuS,IAuB/D1F,IArB8B,SAAU0F,EAAaE,EAAetO,EAAGrC,GACvEqQ,EAAuBhO,EAAGrC,GAAG,GAAM+K,IAAI0F,EAAaE,IAqBpD7H,KAnB4B,SAAUxI,EAAQgQ,GAC9C,IAAII,EAAcL,EAAuB/P,EAAQgQ,GAAW,GACxDxH,EAAO,GAEX,OADI4H,GAAaA,EAAYzD,QAAQ,SAAU2D,EAAGtR,GAAOwJ,EAAKtD,KAAKlG,KAC5DwJ,GAgBPxJ,IAdc,SAAU6B,GACxB,OAAOA,IAAOrE,IAA0B,iBAANqE,EAAiBA,EAAKmC,OAAOnC,IAc/D4E,IAZQ,SAAU1D,GAClBlD,EAAQA,EAAQW,EAAG,UAAWuC,MAiB1B,SAAUjF,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAGnCG,EAAOD,QAAU,SAAUgE,EAAIrB,GAC7B,IAAKoB,EAASC,GAAK,OAAOA,EAC1B,IAAI2C,EAAIsB,EACR,GAAItF,GAAkC,mBAArBgE,EAAK3C,EAAGsE,YAA4BvE,EAASkE,EAAMtB,EAAGvG,KAAK4D,IAAM,OAAOiE,EACzF,GAAgC,mBAApBtB,EAAK3C,EAAG0P,WAA2B3P,EAASkE,EAAMtB,EAAGvG,KAAK4D,IAAM,OAAOiE,EACnF,IAAKtF,GAAkC,mBAArBgE,EAAK3C,EAAGsE,YAA4BvE,EAASkE,EAAMtB,EAAGvG,KAAK4D,IAAM,OAAOiE,EAC1F,MAAMhE,UAAU,6CAMZ,SAAUhE,EAAQD,GAExBC,EAAOD,QAAU,SAAU2T,EAAQvO,GACjC,MAAO,CACLtE,aAAuB,EAAT6S,GACd9S,eAAyB,EAAT8S,GAChBpC,WAAqB,EAAToC,GACZvO,MAAOA,KAOL,SAAUnF,EAAQD,EAASF,GAEjC,IAAI8T,EAAO9T,EAAoB,GAApBA,CAAwB,QAC/BiE,EAAWjE,EAAoB,GAC/BgC,EAAMhC,EAAoB,IAC1B+T,EAAU/T,EAAoB,GAAGmF,EACjC6O,EAAK,EACLC,EAAepT,OAAOoT,cAAgB,WACxC,OAAO,GAELC,GAAUlU,EAAoB,EAApBA,CAAuB,WACnC,OAAOiU,EAAapT,OAAOsT,kBAAkB,OAE3CC,EAAU,SAAUlQ,GACtB6P,EAAQ7P,EAAI4P,EAAM,CAAExO,MAAO,CACzBlF,EAAG,OAAQ4T,EACXK,EAAG,OAgCHC,EAAOnU,EAAOD,QAAU,CAC1B2I,IAAKiL,EACLS,MAAM,EACNC,QAhCY,SAAUtQ,EAAI8D,GAE1B,IAAK/D,EAASC,GAAK,MAAoB,iBAANA,EAAiBA,GAAmB,iBAANA,EAAiB,IAAM,KAAOA,EAC7F,IAAKlC,EAAIkC,EAAI4P,GAAO,CAElB,IAAKG,EAAa/P,GAAK,MAAO,IAE9B,IAAK8D,EAAQ,MAAO,IAEpBoM,EAAQlQ,GAER,OAAOA,EAAG4P,GAAM1T,GAsBlBqU,QApBY,SAAUvQ,EAAI8D,GAC1B,IAAKhG,EAAIkC,EAAI4P,GAAO,CAElB,IAAKG,EAAa/P,GAAK,OAAO,EAE9B,IAAK8D,EAAQ,OAAO,EAEpBoM,EAAQlQ,GAER,OAAOA,EAAG4P,GAAMO,GAYlBK,SATa,SAAUxQ,GAEvB,OADIgQ,GAAUI,EAAKC,MAAQN,EAAa/P,KAAQlC,EAAIkC,EAAI4P,IAAOM,EAAQlQ,GAChEA,KAaH,SAAU/D,EAAQD,GAExBC,EAAOD,SAAU,GAKX,SAAUC,EAAQD,EAASF,GAGjC,IAAI2U,EAAQ3U,EAAoB,IAC5B4U,EAAc5U,EAAoB,IAEtCG,EAAOD,QAAUW,OAAOgL,MAAQ,SAASA,KAAKzG,GAC5C,OAAOuP,EAAMvP,EAAGwP,KAMZ,SAAUzU,EAAQD,EAASF,GAGjC,IAAI+E,EAAW/E,EAAoB,GAC/B6U,EAAM7U,EAAoB,IAC1B4U,EAAc5U,EAAoB,IAClC2F,EAAW3F,EAAoB,GAApBA,CAAwB,YACnC8U,EAAQ,aACR7S,EAAY,YAGZ8S,EAAa,WAEf,IAIIC,EAJAC,EAASjV,EAAoB,GAApBA,CAAwB,UACjCI,EAAIwU,EAAYjR,OAcpB,IAVAsR,EAAOC,MAAMC,QAAU,OACvBnV,EAAoB,IAAIoV,YAAYH,GACpCA,EAAO/D,IAAM,eAGb8D,EAAiBC,EAAOI,cAAcC,UACvBC,OACfP,EAAeQ,MAAMC,uCACrBT,EAAeU,QACfX,EAAaC,EAAevS,EACrBrC,YAAY2U,EAAW9S,GAAW2S,EAAYxU,IACrD,OAAO2U,KAGT5U,EAAOD,QAAUW,OAAOmH,QAAU,SAASA,OAAO5C,EAAGuQ,GACnD,IAAIrN,EAQJ,OAPU,OAANlD,GACF0P,EAAM7S,GAAa8C,EAASK,GAC5BkD,EAAS,IAAIwM,EACbA,EAAM7S,GAAa,KAEnBqG,EAAO3C,GAAYP,GACdkD,EAASyM,IACTY,IAAe9V,GAAYyI,EAASuM,EAAIvM,EAAQqN,KAMnD,SAAUxV,EAAQD,GAExBC,EAAOD,QAAU,cAKX,SAAUC,EAAQD,EAASF,GAEjC,IAAI8B,EAAM9B,EAAoB,IAC1BM,EAAON,EAAoB,KAC3BwJ,EAAcxJ,EAAoB,IAClC+E,EAAW/E,EAAoB,GAC/BsH,EAAWtH,EAAoB,GAC/B0J,EAAY1J,EAAoB,IAChC4V,EAAQ,GACRC,EAAS,IACT3V,EAAUC,EAAOD,QAAU,SAAU4V,EAAU/J,EAASlF,EAAIC,EAAMgG,GACpE,IAGInJ,EAAQgL,EAAMC,EAAUtG,EAHxB0G,EAASlC,EAAW,WAAc,OAAOgJ,GAAcpM,EAAUoM,GACjE3Q,EAAIrD,EAAI+E,EAAIC,EAAMiF,EAAU,EAAI,GAChC1D,EAAQ,EAEZ,GAAqB,mBAAV2G,EAAsB,MAAM7K,UAAU2R,EAAW,qBAE5D,GAAItM,EAAYwF,IAAS,IAAKrL,EAAS2D,EAASwO,EAASnS,QAAkB0E,EAAT1E,EAAgB0E,IAEhF,IADAC,EAASyD,EAAU5G,EAAEJ,EAAS4J,EAAOmH,EAASzN,IAAQ,GAAIsG,EAAK,IAAMxJ,EAAE2Q,EAASzN,OACjEuN,GAAStN,IAAWuN,EAAQ,OAAOvN,OAC7C,IAAKsG,EAAWI,EAAO1O,KAAKwV,KAAanH,EAAOC,EAASK,QAAQC,MAEtE,IADA5G,EAAShI,EAAKsO,EAAUzJ,EAAGwJ,EAAKrJ,MAAOyG,MACxB6J,GAAStN,IAAWuN,EAAQ,OAAOvN,IAG9CsN,MAAQA,EAChB1V,EAAQ2V,OAASA,GAKX,SAAU1V,EAAQD,EAASF,GAEjC,IAAI6E,EAAY7E,EAAoB,IAChC+V,EAAM1R,KAAK0R,IACXjR,EAAMT,KAAKS,IACf3E,EAAOD,QAAU,SAAUmI,EAAO1E,GAEhC,OADA0E,EAAQxD,EAAUwD,IACH,EAAI0N,EAAI1N,EAAQ1E,EAAQ,GAAKmB,EAAIuD,EAAO1E,KAMnD,SAAUxD,EAAQD,GAExBC,EAAOD,QAAU,IAKX,SAAUC,EAAQD,EAASF,GAGjC,IAAIgW,EAAMhW,EAAoB,IAC1B+M,EAAM/M,EAAoB,EAApBA,CAAuB,eAE7BiW,EAAkD,aAA5CD,EAAI,WAAc,OAAOtS,UAArB,IASdvD,EAAOD,QAAU,SAAUgE,GACzB,IAAIkB,EAAG8Q,EAAGjT,EACV,OAAOiB,IAAOrE,GAAY,YAAqB,OAAPqE,EAAc,OAEN,iBAApCgS,EAVD,SAAUhS,EAAI7B,GACzB,IACE,OAAO6B,EAAG7B,GACV,MAAOmC,KAOO2R,CAAO/Q,EAAIvE,OAAOqD,GAAK6I,IAAoBmJ,EAEvDD,EAAMD,EAAI5Q,GAEM,WAAfnC,EAAI+S,EAAI5Q,KAAsC,mBAAZA,EAAEgR,OAAuB,YAAcnT,IAM1E,SAAU9C,EAAQD,GAExBC,EAAOD,QAAU,SAAUgE,EAAImS,EAAa3V,EAAM4V,GAChD,KAAMpS,aAAcmS,IAAiBC,IAAmBzW,IAAayW,KAAkBpS,EACrF,MAAMC,UAAUzD,EAAO,2BACvB,OAAOwD,IAML,SAAU/D,EAAQD,EAASF,GAEjC,IAAI+B,EAAO/B,EAAoB,IAC/BG,EAAOD,QAAU,SAAUmD,EAAQ6N,EAAKqF,GACtC,IAAK,IAAIlU,KAAO6O,EACVqF,GAAQlT,EAAOhB,GAAMgB,EAAOhB,GAAO6O,EAAI7O,GACtCN,EAAKsB,EAAQhB,EAAK6O,EAAI7O,IAC3B,OAAOgB,IAML,SAAUlD,EAAQD,EAASF,GAEjC,IAAIiE,EAAWjE,EAAoB,GACnCG,EAAOD,QAAU,SAAUgE,EAAIsD,GAC7B,IAAKvD,EAASC,IAAOA,EAAGsS,KAAOhP,EAAM,MAAMrD,UAAU,0BAA4BqD,EAAO,cACxF,OAAOtD,IAMH,SAAU/D,EAAQD,GAExB,IAAI8T,EAAK,EACLyC,EAAKpS,KAAKqS,SACdvW,EAAOD,QAAU,SAAUmC,GACzB,MAAO,UAAUyQ,OAAOzQ,IAAQxC,GAAY,GAAKwC,EAAK,QAAS2R,EAAKyC,GAAIjO,SAAS,OAM7E,SAAUrI,EAAQD,EAASF,GAEjC,IAAI2W,EAAM3W,EAAoB,GAAGmF,EAC7BnD,EAAMhC,EAAoB,IAC1B+M,EAAM/M,EAAoB,EAApBA,CAAuB,eAEjCG,EAAOD,QAAU,SAAUgE,EAAIiC,EAAKyQ,GAC9B1S,IAAOlC,EAAIkC,EAAK0S,EAAO1S,EAAKA,EAAG1C,UAAWuL,IAAM4J,EAAIzS,EAAI6I,EAAK,CAAEhM,cAAc,EAAMuE,MAAOa,MAM1F,SAAUhG,EAAQD,EAASF,GAIjC,IAAI4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3BkF,EAAKlF,EAAoB,GACzB6W,EAAc7W,EAAoB,GAClC8W,EAAU9W,EAAoB,EAApBA,CAAuB,WAErCG,EAAOD,QAAU,SAAU2I,GACzB,IAAIvF,EAAwB,mBAAbzB,EAAKgH,GAAqBhH,EAAKgH,GAAOjH,EAAOiH,GACxDgO,GAAevT,IAAMA,EAAEwT,IAAU5R,EAAGC,EAAE7B,EAAGwT,EAAS,CACpD/V,cAAc,EACdE,IAAK,WAAc,OAAOwC,UAOxB,SAAUtD,EAAQD,EAASF,GAGjC,IAAIgW,EAAMhW,EAAoB,IAE9BG,EAAOD,QAAUW,OAAO,KAAKkW,qBAAqB,GAAKlW,OAAS,SAAUqD,GACxE,MAAkB,UAAX8R,EAAI9R,GAAkBA,EAAGyC,MAAM,IAAM9F,OAAOqD,KAM/C,SAAU/D,EAAQD,GAExBA,EAAQiF,EAAI,GAAG4R,sBAKT,SAAU5W,EAAQD,EAASF,GAGjC,IAAI2U,EAAQ3U,EAAoB,IAC5BgX,EAAahX,EAAoB,IAAI8S,OAAO,SAAU,aAE1D5S,EAAQiF,EAAItE,OAAOoW,qBAAuB,SAASA,oBAAoB7R,GACrE,OAAOuP,EAAMvP,EAAG4R,KAMZ,SAAU7W,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9BuF,EAAUvF,EAAoB,IAC9B+F,EAAQ/F,EAAoB,GAC5BkX,EAASlX,EAAoB,IAC7BmX,EAAQ,IAAMD,EAAS,IAEvBE,EAAQC,OAAO,IAAMF,EAAQA,EAAQ,KACrCG,EAAQD,OAAOF,EAAQA,EAAQ,MAE/BI,EAAW,SAAU1O,EAAKtE,EAAMiT,GAClC,IAAI1O,EAAM,GACN2O,EAAQ1R,EAAM,WAChB,QAASmR,EAAOrO,MAPV,MAAA,KAOwBA,OAE5BhC,EAAKiC,EAAID,GAAO4O,EAAQlT,EAAKmT,GAAQR,EAAOrO,GAC5C2O,IAAO1O,EAAI0O,GAAS3Q,GACxB3E,EAAQA,EAAQa,EAAIb,EAAQO,EAAIgV,EAAO,SAAU3O,IAM/C4O,EAAOH,EAASG,KAAO,SAAUxR,EAAQsB,GAI3C,OAHAtB,EAASG,OAAOd,EAAQW,IACb,EAAPsB,IAAUtB,EAASA,EAAOK,QAAQ6Q,EAAO,KAClC,EAAP5P,IAAUtB,EAASA,EAAOK,QAAQ+Q,EAAO,KACtCpR,GAGT/F,EAAOD,QAAUqX,GAKX,SAAUpX,EAAQD,EAASF,GAEjC,IAAIuJ,EAAUvJ,EAAoB,IAC9B8M,EAAW9M,EAAoB,EAApBA,CAAuB,YAClCgK,EAAYhK,EAAoB,IACpCG,EAAOD,QAAUF,EAAoB,IAAI2X,kBAAoB,SAAUzT,GACrE,GAAIA,GAAMrE,GAAW,OAAOqE,EAAG4I,IAC1B5I,EAAG,eACH8F,EAAUT,EAAQrF,MAMnB,SAAU/D,EAAQD,EAASF,GAEjC,IAAI6B,EAAO7B,EAAoB,IAC3B4B,EAAS5B,EAAoB,GAC7B4X,EAAS,qBACTnT,EAAQ7C,EAAOgW,KAAYhW,EAAOgW,GAAU,KAE/CzX,EAAOD,QAAU,SAAUmC,EAAKiD,GAC/B,OAAOb,EAAMpC,KAASoC,EAAMpC,GAAOiD,IAAUzF,GAAYyF,EAAQ,MAChE,WAAY,IAAIiD,KAAK,CACtB9C,QAAS5D,EAAK4D,QACdoS,KAAM7X,EAAoB,IAAM,OAAS,SACzC8X,UAAW,0CAMP,SAAU3X,EAAQD,EAASF,GAIjC,IAAIiH,EAAYjH,EAAoB,IAChCsH,EAAWtH,EAAoB,GAC/BsJ,EAAkBtJ,EAAoB,IAC1CG,EAAOD,QAAU,SAAU6X,GACzB,OAAO,SAAU9P,EAAO+P,EAAIC,GAC1B,IAGI3S,EAHAF,EAAI6B,EAAUgB,GACdtE,EAAS2D,EAASlC,EAAEzB,QACpB0E,EAAQiB,EAAgB2O,EAAWtU,GAIvC,GAAIoU,GAAeC,GAAMA,GAAI,KAAgB3P,EAAT1E,GAGlC,IAFA2B,EAAQF,EAAEiD,OAEG/C,EAAO,OAAO,OAEtB,KAAe+C,EAAT1E,EAAgB0E,IAAS,IAAI0P,GAAe1P,KAASjD,IAC5DA,EAAEiD,KAAW2P,EAAI,OAAOD,GAAe1P,GAAS,EACpD,OAAQ0P,IAAgB,KAOxB,SAAU5X,EAAQD,GAExBA,EAAQiF,EAAItE,OAAOqX,uBAKb,SAAU/X,EAAQD,EAASF,GAGjC,IAAIgW,EAAMhW,EAAoB,IAC9BG,EAAOD,QAAU2K,MAAMsN,SAAW,SAASA,QAAQ9Q,GACjD,MAAmB,SAAZ2O,EAAI3O,KAMP,SAAUlH,EAAQD,EAASF,GAIjC,IAAI+I,EAAU/I,EAAoB,IAC9BkC,EAAUlC,EAAoB,GAC9BoY,EAAWpY,EAAoB,IAC/B+B,EAAO/B,EAAoB,IAC3BgK,EAAYhK,EAAoB,IAChCqY,EAAcrY,EAAoB,IAClCsY,EAAiBtY,EAAoB,IACrC6F,EAAiB7F,EAAoB,IACrC8M,EAAW9M,EAAoB,EAApBA,CAAuB,YAClCuY,IAAU,GAAG1M,MAAQ,QAAU,GAAGA,QAGlC2M,EAAS,SAETC,EAAa,WAAc,OAAOhV,MAEtCtD,EAAOD,QAAU,SAAU8R,EAAMxL,EAAM6P,EAAapH,EAAMyJ,EAASC,EAAQC,GACzEP,EAAYhC,EAAa7P,EAAMyI,GAC/B,IAeI4J,EAASxW,EAAKyW,EAfdC,EAAY,SAAUC,GACxB,IAAKT,GAASS,KAAQzJ,EAAO,OAAOA,EAAMyJ,GAC1C,OAAQA,GACN,IAVK,OAUM,OAAO,SAASnN,OAAS,OAAO,IAAIwK,EAAY5S,KAAMuV,IACjE,KAAKR,EAAQ,OAAO,SAAS7M,SAAW,OAAO,IAAI0K,EAAY5S,KAAMuV,IACrE,OAAO,SAASjN,UAAY,OAAO,IAAIsK,EAAY5S,KAAMuV,KAEzDjM,EAAMvG,EAAO,YACbyS,EAAaP,GAAWF,EACxBU,GAAa,EACb3J,EAAQyC,EAAKxQ,UACb2X,EAAU5J,EAAMzC,IAAayC,EAnBjB,eAmBuCmJ,GAAWnJ,EAAMmJ,GACpEU,EAAWD,GAAWJ,EAAUL,GAChCW,EAAWX,EAAWO,EAAwBF,EAAU,WAArBK,EAAkCvZ,GACrEyZ,EAAqB,SAAR9S,GAAkB+I,EAAMxD,SAAqBoN,EAwB9D,GArBIG,IACFR,EAAoBjT,EAAeyT,EAAWhZ,KAAK,IAAI0R,OAC7BnR,OAAOW,WAAasX,EAAkB7J,OAE9DqJ,EAAeQ,EAAmB/L,GAAK,GAElChE,GAAiD,mBAA/B+P,EAAkBhM,IAAyB/K,EAAK+W,EAAmBhM,EAAU2L,IAIpGQ,GAAcE,GAAWA,EAAQzY,OAAS8X,IAC5CU,GAAa,EACbE,EAAW,SAASzN,SAAW,OAAOwN,EAAQ7Y,KAAKmD,QAG/CsF,IAAW6P,IAAYL,IAASW,GAAe3J,EAAMzC,IACzD/K,EAAKwN,EAAOzC,EAAUsM,GAGxBpP,EAAUxD,GAAQ4S,EAClBpP,EAAU+C,GAAO0L,EACbC,EAMF,GALAG,EAAU,CACRlN,OAAQsN,EAAaG,EAAWL,EAAUP,GAC1C3M,KAAM8M,EAASS,EAAWL,EAhDrB,QAiDLhN,QAASsN,GAEPT,EAAQ,IAAKvW,KAAOwW,EAChBxW,KAAOkN,GAAQ6I,EAAS7I,EAAOlN,EAAKwW,EAAQxW,SAC7CH,EAAQA,EAAQa,EAAIb,EAAQO,GAAK8V,GAASW,GAAa1S,EAAMqS,GAEtE,OAAOA,IAMH,SAAU1Y,EAAQD,EAASF,GAIjC,IAAIgI,EAAShI,EAAoB,IAC7BuZ,EAAavZ,EAAoB,IACjCsY,EAAiBtY,EAAoB,IACrC8Y,EAAoB,GAGxB9Y,EAAoB,GAApBA,CAAwB8Y,EAAmB9Y,EAAoB,EAApBA,CAAuB,YAAa,WAAc,OAAOyD,OAEpGtD,EAAOD,QAAU,SAAUmW,EAAa7P,EAAMyI,GAC5CoH,EAAY7U,UAAYwG,EAAO8Q,EAAmB,CAAE7J,KAAMsK,EAAW,EAAGtK,KACxEqJ,EAAejC,EAAa7P,EAAO,eAM/B,SAAUrG,EAAQD,EAASF,GAGjC,IAAI+E,EAAW/E,EAAoB,GAC/B4G,EAAY5G,EAAoB,IAChC8W,EAAU9W,EAAoB,EAApBA,CAAuB,WACrCG,EAAOD,QAAU,SAAUkF,EAAGoU,GAC5B,IACI3W,EADAS,EAAIyB,EAASK,GAAGU,YAEpB,OAAOxC,IAAMzD,KAAcgD,EAAIkC,EAASzB,GAAGwT,KAAajX,GAAY2Z,EAAI5S,EAAU/D,KAM9E,SAAU1C,EAAQD,EAASF,GAEjC,IACIyZ,EADSzZ,EAAoB,GACVyZ,UAEvBtZ,EAAOD,QAAUuZ,GAAaA,EAAUC,WAAa,IAK/C,SAAUvZ,EAAQD,EAASF,GAIjC,IAAI4B,EAAS5B,EAAoB,GAC7BkC,EAAUlC,EAAoB,GAC9BsU,EAAOtU,EAAoB,IAC3B+F,EAAQ/F,EAAoB,GAC5B+B,EAAO/B,EAAoB,IAC3BoJ,EAAcpJ,EAAoB,IAClC2Z,EAAQ3Z,EAAoB,IAC5BkJ,EAAalJ,EAAoB,IACjCiE,EAAWjE,EAAoB,GAC/BsY,EAAiBtY,EAAoB,IACrCkF,EAAKlF,EAAoB,GAAGmF,EAC5ByU,EAAO5Z,EAAoB,GAApBA,CAAwB,GAC/B6W,EAAc7W,EAAoB,GAEtCG,EAAOD,QAAU,SAAUsG,EAAMmL,EAASkH,EAASgB,EAAQnS,EAAQoS,GACjE,IAAI9H,EAAOpQ,EAAO4E,GACdlD,EAAI0O,EACJ+H,EAAQrS,EAAS,MAAQ,MACzB6H,EAAQjM,GAAKA,EAAE9B,UACf4D,EAAI,GAqCR,OApCKyR,GAA2B,mBAALvT,IAAqBwW,GAAWvK,EAAMS,UAAYjK,EAAM,YACjF,IAAIzC,GAAIyI,UAAUkD,WAOlB3L,EAAIqO,EAAQ,SAAUtO,EAAQyS,GAC5B5M,EAAW7F,EAAQC,EAAGkD,EAAM,MAC5BnD,EAAO2W,GAAK,IAAIhI,EACZ8D,GAAYjW,IAAW8Z,EAAM7D,EAAUpO,EAAQrE,EAAO0W,GAAQ1W,KAEpEuW,EAAK,kEAAkEjT,MAAM,KAAM,SAAUkC,GAC3F,IAAIoR,EAAkB,OAAPpR,GAAuB,OAAPA,EAC3BA,KAAO0G,KAAWuK,GAAkB,SAAPjR,IAAiB9G,EAAKuB,EAAE9B,UAAWqH,EAAK,SAAUtF,EAAGC,GAEpF,GADA0F,EAAWzF,KAAMH,EAAGuF,IACfoR,GAAYH,IAAY7V,EAASV,GAAI,MAAc,OAAPsF,GAAehJ,GAChE,IAAIyI,EAAS7E,KAAKuW,GAAGnR,GAAW,IAANtF,EAAU,EAAIA,EAAGC,GAC3C,OAAOyW,EAAWxW,KAAO6E,MAG7BwR,GAAW5U,EAAG5B,EAAE9B,UAAW,OAAQ,CACjCP,IAAK,WACH,OAAOwC,KAAKuW,GAAGE,UApBnB5W,EAAIuW,EAAOM,eAAexI,EAASnL,EAAMkB,EAAQqS,GACjD3Q,EAAY9F,EAAE9B,UAAWqX,GACzBvE,EAAKC,MAAO,GAuBd+D,EAAehV,EAAGkD,GAElBpB,EAAEoB,GAAQlD,EACVpB,EAAQA,EAAQS,EAAIT,EAAQiB,EAAIjB,EAAQO,EAAG2C,GAEtC0U,GAASD,EAAOO,UAAU9W,EAAGkD,EAAMkB,GAEjCpE,IAMH,SAAUnD,EAAQD,EAASF,GAiBjC,IAfA,IASIqa,EATAzY,EAAS5B,EAAoB,GAC7B+B,EAAO/B,EAAoB,IAC3B0E,EAAM1E,EAAoB,IAC1BqN,EAAQ3I,EAAI,eACZ4I,EAAO5I,EAAI,QACX6N,KAAS3Q,EAAOmJ,cAAenJ,EAAOqJ,UACtCkC,EAASoF,EACTnS,EAAI,EAIJka,EAAyB,iHAE3B3T,MAAM,KAEDvG,EAPC,IAQFia,EAAQzY,EAAO0Y,EAAuBla,QACxC2B,EAAKsY,EAAM7Y,UAAW6L,GAAO,GAC7BtL,EAAKsY,EAAM7Y,UAAW8L,GAAM,IACvBH,GAAS,EAGlBhN,EAAOD,QAAU,CACfqS,IAAKA,EACLpF,OAAQA,EACRE,MAAOA,EACPC,KAAMA,IAMF,SAAUnN,EAAQD,EAASF,GAKjCG,EAAOD,QAAUF,EAAoB,MAAQA,EAAoB,EAApBA,CAAuB,WAClE,IAAIua,EAAIlW,KAAKqS,SAGb8D,iBAAiBla,KAAK,KAAMia,EAAG,qBACxBva,EAAoB,GAAGua,MAM1B,SAAUpa,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAElCG,EAAOD,QAAU,SAAUua,GACzBvY,EAAQA,EAAQW,EAAG4X,EAAY,CAAErL,GAAI,SAASA,KAG5C,IAFA,IAAIzL,EAASD,UAAUC,OACnB+W,EAAI,IAAI7P,MAAMlH,GACXA,KAAU+W,EAAE/W,GAAUD,UAAUC,GACvC,OAAO,IAAIF,KAAKiX,QAOd,SAAUva,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B4G,EAAY5G,EAAoB,IAChC8B,EAAM9B,EAAoB,IAC1B2Z,EAAQ3Z,EAAoB,IAEhCG,EAAOD,QAAU,SAAUua,GACzBvY,EAAQA,EAAQW,EAAG4X,EAAY,CAAE/L,KAAM,SAASA,KAAKtM,GACnD,IACI2M,EAAS2L,EAAGxZ,EAAGyZ,EADfC,EAAQlX,UAAU,GAKtB,OAHAkD,EAAUnD,OACVsL,EAAU6L,IAAU/a,KACP+G,EAAUgU,GACnBxY,GAAUvC,GAAkB,IAAI4D,MACpCiX,EAAI,GACA3L,GACF7N,EAAI,EACJyZ,EAAK7Y,EAAI8Y,EAAOlX,UAAU,GAAI,GAC9BiW,EAAMvX,GAAQ,EAAO,SAAUyY,GAC7BH,EAAEnS,KAAKoS,EAAGE,EAAU3Z,SAGtByY,EAAMvX,GAAQ,EAAOsY,EAAEnS,KAAMmS,GAExB,IAAIjX,KAAKiX,SAOd,SAAUva,EAAQD,EAASF,GAEjC,IAAIiE,EAAWjE,EAAoB,GAC/BsV,EAAWtV,EAAoB,GAAGsV,SAElCwF,EAAK7W,EAASqR,IAAarR,EAASqR,EAASyF,eACjD5a,EAAOD,QAAU,SAAUgE,GACzB,OAAO4W,EAAKxF,EAASyF,cAAc7W,GAAM,KAMrC,SAAU/D,EAAQD,EAASF,GAEjCG,EAAOD,QAAUF,EAAoB,KAK/B,SAAUG,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3B+I,EAAU/I,EAAoB,IAC9Bgb,EAAShb,EAAoB,IAC7Bc,EAAiBd,EAAoB,GAAGmF,EAC5ChF,EAAOD,QAAU,SAAUQ,GACzB,IAAIua,EAAUpZ,EAAK8C,SAAW9C,EAAK8C,OAASoE,EAAU,GAAKnH,EAAO+C,QAAU,IACtD,KAAlBjE,EAAKwa,OAAO,IAAexa,KAAQua,GAAUna,EAAema,EAASva,EAAM,CAAE4E,MAAO0V,EAAO7V,EAAEzE,OAM7F,SAAUP,EAAQD,EAASF,GAEjC,IAAImT,EAASnT,EAAoB,GAApBA,CAAwB,QACjC0E,EAAM1E,EAAoB,IAC9BG,EAAOD,QAAU,SAAUmC,GACzB,OAAO8Q,EAAO9Q,KAAS8Q,EAAO9Q,GAAOqC,EAAIrC,MAMrC,SAAUlC,EAAQD,GAGxBC,EAAOD,QAAU,gGAEfyG,MAAM,MAKF,SAAUxG,EAAQD,EAASF,GAEjC,IAAIsV,EAAWtV,EAAoB,GAAGsV,SACtCnV,EAAOD,QAAUoV,GAAYA,EAAS6F,iBAKhC,SAAUhb,EAAQD,EAASF,GAKjC,IAAI6W,EAAc7W,EAAoB,GAClCob,EAAUpb,EAAoB,IAC9Bqb,EAAOrb,EAAoB,IAC3BgH,EAAMhH,EAAoB,IAC1B0F,EAAW1F,EAAoB,GAC/BwF,EAAUxF,EAAoB,IAC9Bsb,EAAUza,OAAO0a,OAGrBpb,EAAOD,SAAWob,GAAWtb,EAAoB,EAApBA,CAAuB,WAClD,IAAI0a,EAAI,GACJzX,EAAI,GAEJJ,EAAI8B,SACJ4V,EAAI,uBAGR,OAFAG,EAAE7X,GAAK,EACP0X,EAAE5T,MAAM,IAAIqJ,QAAQ,SAAUwL,GAAKvY,EAAEuY,GAAKA,IACd,GAArBF,EAAQ,GAAIZ,GAAG7X,IAAWhC,OAAOgL,KAAKyP,EAAQ,GAAIrY,IAAIsJ,KAAK,KAAOgO,IACtE,SAASgB,OAAOlY,EAAQjB,GAM3B,IALA,IAAI8T,EAAIxQ,EAASrC,GACbwL,EAAOnL,UAAUC,OACjB0E,EAAQ,EACRoT,EAAaJ,EAAKlW,EAClBuW,EAAS1U,EAAI7B,EACHkD,EAAPwG,GAML,IALA,IAIIxM,EAJAQ,EAAI2C,EAAQ9B,UAAU2E,MACtBwD,EAAO4P,EAAaL,EAAQvY,GAAGiQ,OAAO2I,EAAW5Y,IAAMuY,EAAQvY,GAC/Dc,EAASkI,EAAKlI,OACdgY,EAAI,EAEQA,EAAThY,GACLtB,EAAMwJ,EAAK8P,KACN9E,IAAe6E,EAAOpb,KAAKuC,EAAGR,KAAM6T,EAAE7T,GAAOQ,EAAER,IAEtD,OAAO6T,GACPoF,GAKE,SAAUnb,EAAQD,GAGxBC,EAAOD,QAAU,SAAU2G,EAAI+U,EAAM9U,GACnC,IAAI+U,EAAK/U,IAASjH,GAClB,OAAQ+b,EAAKjY,QACX,KAAK,EAAG,OAAOkY,EAAKhV,IACAA,EAAGvG,KAAKwG,GAC5B,KAAK,EAAG,OAAO+U,EAAKhV,EAAG+U,EAAK,IACR/U,EAAGvG,KAAKwG,EAAM8U,EAAK,IACvC,KAAK,EAAG,OAAOC,EAAKhV,EAAG+U,EAAK,GAAIA,EAAK,IACjB/U,EAAGvG,KAAKwG,EAAM8U,EAAK,GAAIA,EAAK,IAChD,KAAK,EAAG,OAAOC,EAAKhV,EAAG+U,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAC1B/U,EAAGvG,KAAKwG,EAAM8U,EAAK,GAAIA,EAAK,GAAIA,EAAK,IACzD,KAAK,EAAG,OAAOC,EAAKhV,EAAG+U,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IACnC/U,EAAGvG,KAAKwG,EAAM8U,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAClE,OAAO/U,EAAGjD,MAAMkD,EAAM8U,KAMpB,SAAUzb,EAAQD,EAASF,GAIjC,IAAI6E,EAAY7E,EAAoB,IAChCuF,EAAUvF,EAAoB,IAElCG,EAAOD,QAAU,SAAS4b,OAAOC,GAC/B,IAAIC,EAAM3V,OAAOd,EAAQ9B,OACrB2E,EAAM,GACNlH,EAAI2D,EAAUkX,GAClB,GAAI7a,EAAI,GAAKA,GAAK+a,SAAU,MAAM1R,WAAW,2BAC7C,KAAU,EAAJrJ,GAAQA,KAAO,KAAO8a,GAAOA,GAAc,EAAJ9a,IAAOkH,GAAO4T,GAC3D,OAAO5T,IAMH,SAAUjI,EAAQD,GAExBC,EAAOD,QAAU,oDAMX,SAAUC,EAAQD,GAGxBC,EAAOD,QAAUmE,KAAK6X,MAAQ,SAASA,KAAKC,GAE1C,OAAmB,IAAXA,GAAKA,IAAWA,GAAKA,EAAIA,EAAIA,EAAI,GAAK,EAAI,IAM9C,SAAUhc,EAAQD,GAGxB,IAAIkc,EAAS/X,KAAKgY,MAClBlc,EAAOD,SAAYkc,GAED,mBAAbA,EAAO,KAA4BA,EAAO,IAAM,qBAE7B,OAAnBA,GAAQ,OACT,SAASC,MAAMF,GACjB,OAAmB,IAAXA,GAAKA,GAAUA,GAAS,KAALA,GAAaA,EAAI,KAAOA,EAAIA,EAAIA,EAAI,EAAI9X,KAAKyE,IAAIqT,GAAK,GAC/EC,GAKE,SAAUjc,EAAQD,EAASF,GAEjC,IAAI6E,EAAY7E,EAAoB,IAChCuF,EAAUvF,EAAoB,IAGlCG,EAAOD,QAAU,SAAUoc,GACzB,OAAO,SAAUxV,EAAMyV,GACrB,IAGIhZ,EAAGC,EAHH7B,EAAI0E,OAAOd,EAAQuB,IACnB1G,EAAIyE,EAAU0X,GACdlc,EAAIsB,EAAEgC,OAEV,OAAIvD,EAAI,GAAUC,GAALD,EAAekc,EAAY,GAAKzc,IAC7C0D,EAAI5B,EAAE6a,WAAWpc,IACN,OAAc,MAAJmD,GAAcnD,EAAI,IAAMC,IAAMmD,EAAI7B,EAAE6a,WAAWpc,EAAI,IAAM,OAAc,MAAJoD,EACpF8Y,EAAY3a,EAAEuZ,OAAO9a,GAAKmD,EAC1B+Y,EAAY3a,EAAE8G,MAAMrI,EAAGA,EAAI,GAA2BoD,EAAI,OAAzBD,EAAI,OAAU,IAAqB,SAOtE,SAAUpD,EAAQD,EAASF,GAGjC,IAAIyc,EAAWzc,EAAoB,KAC/BuF,EAAUvF,EAAoB,IAElCG,EAAOD,QAAU,SAAU4G,EAAM4V,EAAclW,GAC7C,GAAIiW,EAASC,GAAe,MAAMvY,UAAU,UAAYqC,EAAO,0BAC/D,OAAOH,OAAOd,EAAQuB,MAMlB,SAAU3G,EAAQD,EAASF,GAEjC,IAAI2c,EAAQ3c,EAAoB,EAApBA,CAAuB,SACnCG,EAAOD,QAAU,SAAU2I,GACzB,IAAI+T,EAAK,IACT,IACE,MAAM/T,GAAK+T,GACX,MAAOpY,GACP,IAEE,OADAoY,EAAGD,IAAS,GACJ,MAAM9T,GAAK+T,GACnB,MAAOzX,KACT,OAAO,IAML,SAAUhF,EAAQD,EAASF,GAGjC,IAAIgK,EAAYhK,EAAoB,IAChC8M,EAAW9M,EAAoB,EAApBA,CAAuB,YAClC4K,EAAaC,MAAMrJ,UAEvBrB,EAAOD,QAAU,SAAUgE,GACzB,OAAOA,IAAOrE,KAAcmK,EAAUa,QAAU3G,GAAM0G,EAAWkC,KAAc5I,KAM3E,SAAU/D,EAAQD,EAASF,GAIjC,IAAI6c,EAAkB7c,EAAoB,GACtC+G,EAAa/G,EAAoB,IAErCG,EAAOD,QAAU,SAAUoB,EAAQ+G,EAAO/C,GACpC+C,KAAS/G,EAAQub,EAAgB1X,EAAE7D,EAAQ+G,EAAOtB,EAAW,EAAGzB,IAC/DhE,EAAO+G,GAAS/C,IAMjB,SAAUnF,EAAQD,EAASF,GAEjC,IAAI8M,EAAW9M,EAAoB,EAApBA,CAAuB,YAClC8c,GAAe,EAEnB,IACE,IAAIC,EAAQ,CAAC,GAAGjQ,KAChBiQ,EAAc,UAAI,WAAcD,GAAe,GAE/CjS,MAAM6D,KAAKqO,EAAO,WAAc,MAAM,IACtC,MAAOvY,IAETrE,EAAOD,QAAU,SAAUqE,EAAMyY,GAC/B,IAAKA,IAAgBF,EAAc,OAAO,EAC1C,IAAIvG,GAAO,EACX,IACE,IAAI0G,EAAM,CAAC,GACPpK,EAAOoK,EAAInQ,KACf+F,EAAK5D,KAAO,WAAc,MAAO,CAAEC,KAAMqH,GAAO,IAChD0G,EAAInQ,GAAY,WAAc,OAAO+F,GACrCtO,EAAK0Y,GACL,MAAOzY,IACT,OAAO+R,IAMH,SAAUpW,EAAQD,EAASF,GAGjC,IAAI8J,EAAqB9J,EAAoB,KAE7CG,EAAOD,QAAU,SAAUgd,EAAUvZ,GACnC,OAAO,IAAKmG,EAAmBoT,GAAxB,CAAmCvZ,KAMtC,SAAUxD,EAAQD,EAASF,GAKjC,IAAI0F,EAAW1F,EAAoB,GAC/BsJ,EAAkBtJ,EAAoB,IACtCsH,EAAWtH,EAAoB,GACnCG,EAAOD,QAAU,SAASyP,KAAKrK,GAO7B,IANA,IAAIF,EAAIM,EAASjC,MACbE,EAAS2D,EAASlC,EAAEzB,QACpBkL,EAAOnL,UAAUC,OACjB0E,EAAQiB,EAAuB,EAAPuF,EAAWnL,UAAU,GAAK7D,GAAW8D,GAC7DiN,EAAa,EAAP/B,EAAWnL,UAAU,GAAK7D,GAChCsd,EAASvM,IAAQ/Q,GAAY8D,EAAS2F,EAAgBsH,EAAKjN,GAC/C0E,EAAT8U,GAAgB/X,EAAEiD,KAAW/C,EACpC,OAAOF,IAMH,SAAUjF,EAAQD,EAASF,GAIjC,IAAIod,EAAmBpd,EAAoB,IACvC2O,EAAO3O,EAAoB,IAC3BgK,EAAYhK,EAAoB,IAChCiH,EAAYjH,EAAoB,IAMpCG,EAAOD,QAAUF,EAAoB,GAApBA,CAAwB6K,MAAO,QAAS,SAAUwS,EAAUrE,GAC3EvV,KAAK+S,GAAKvP,EAAUoW,GACpB5Z,KAAK6Z,GAAK,EACV7Z,KAAK8Z,GAAKvE,GAET,WACD,IAAI5T,EAAI3B,KAAK+S,GACTwC,EAAOvV,KAAK8Z,GACZlV,EAAQ5E,KAAK6Z,KACjB,OAAKlY,GAAcA,EAAEzB,QAAX0E,GACR5E,KAAK+S,GAAK3W,GACH8O,EAAK,IAEaA,EAAK,EAApB,QAARqK,EAA+B3Q,EACvB,UAAR2Q,EAAiC5T,EAAEiD,GACxB,CAACA,EAAOjD,EAAEiD,MACxB,UAGH2B,EAAUwT,UAAYxT,EAAUa,MAEhCuS,EAAiB,QACjBA,EAAiB,UACjBA,EAAiB,YAKX,SAAUjd,EAAQD,GAExBC,EAAOD,QAAU,SAAUgP,EAAM5J,GAC/B,MAAO,CAAEA,MAAOA,EAAO4J,OAAQA,KAM3B,SAAU/O,EAAQD,EAASF,GAEjC,IAaIyd,EAAOC,EAASC,EAbhB7b,EAAM9B,EAAoB,IAC1B4d,EAAS5d,EAAoB,IAC7B6d,EAAO7d,EAAoB,IAC3B8d,EAAM9d,EAAoB,IAC1B4B,EAAS5B,EAAoB,GAC7B+d,EAAUnc,EAAOmc,QACjBC,EAAUpc,EAAOqc,aACjBC,EAAYtc,EAAOuc,eACnBC,EAAiBxc,EAAOwc,eACxBC,EAAWzc,EAAOyc,SAClBC,EAAU,EACVC,EAAQ,GACRC,EAAqB,qBAErBC,EAAM,WACR,IAAIzK,GAAMvQ,KAEV,GAAI8a,EAAM9c,eAAeuS,GAAK,CAC5B,IAAInN,EAAK0X,EAAMvK,UACRuK,EAAMvK,GACbnN,MAGA6X,EAAW,SAAUC,GACvBF,EAAIne,KAAKqe,EAAMvM,OAGZ4L,GAAYE,IACfF,EAAU,SAASC,aAAapX,GAG9B,IAFA,IAAI+U,EAAO,GACPxb,EAAI,EACkBA,EAAnBsD,UAAUC,QAAYiY,EAAKrT,KAAK7E,UAAUtD,MAMjD,OALAme,IAAQD,GAAW,WAEjBV,EAAoB,mBAAN/W,EAAmBA,EAAKhD,SAASgD,GAAK+U,IAEtD6B,EAAMa,GACCA,GAETJ,EAAY,SAASC,eAAenK,UAC3BuK,EAAMvK,IAGyB,WAApChU,EAAoB,GAApBA,CAAwB+d,GAC1BN,EAAQ,SAAUzJ,GAChB+J,EAAQa,SAAS9c,EAAI2c,EAAKzK,EAAI,KAGvBqK,GAAYA,EAASQ,IAC9BpB,EAAQ,SAAUzJ,GAChBqK,EAASQ,IAAI/c,EAAI2c,EAAKzK,EAAI,KAGnBoK,GAETT,GADAD,EAAU,IAAIU,GACCU,MACfpB,EAAQqB,MAAMC,UAAYN,EAC1BjB,EAAQ3b,EAAI6b,EAAKsB,YAAatB,EAAM,IAG3B/b,EAAOsd,kBAA0C,mBAAfD,cAA8Brd,EAAOud,eAChF1B,EAAQ,SAAUzJ,GAChBpS,EAAOqd,YAAYjL,EAAK,GAAI,MAE9BpS,EAAOsd,iBAAiB,UAAWR,GAAU,IAG7CjB,EADSe,KAAsBV,EAAI,UAC3B,SAAU9J,GAChB6J,EAAKzI,YAAY0I,EAAI,WAAWU,GAAsB,WACpDX,EAAKuB,YAAY3b,MACjBgb,EAAIne,KAAK0T,KAKL,SAAUA,GAChBqL,WAAWvd,EAAI2c,EAAKzK,EAAI,GAAI,KAIlC7T,EAAOD,QAAU,CACf4N,IAAKkQ,EACLsB,MAAOpB,IAMH,SAAU/d,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7Buf,EAAYvf,EAAoB,IAAI8N,IACpC0R,EAAW5d,EAAO6d,kBAAoB7d,EAAO8d,uBAC7C3B,EAAUnc,EAAOmc,QACjB4B,EAAU/d,EAAO+d,QACjBC,EAA6C,WAApC5f,EAAoB,GAApBA,CAAwB+d,GAErC5d,EAAOD,QAAU,WACf,IAAI2f,EAAMC,EAAMC,EAEZC,EAAQ,WACV,IAAIC,EAAQpZ,EAEZ,IADI+Y,IAAWK,EAASlC,EAAQmC,SAASD,EAAOE,OACzCN,GAAM,CACXhZ,EAAKgZ,EAAKhZ,GACVgZ,EAAOA,EAAK5Q,KACZ,IACEpI,IACA,MAAOrC,GAGP,MAFIqb,EAAME,IACLD,EAAOjgB,GACN2E,GAERsb,EAAOjgB,GACLogB,GAAQA,EAAOG,SAIrB,GAAIR,EACFG,EAAS,WACPhC,EAAQa,SAASoB,SAGd,IAAIR,GAAc5d,EAAO6X,WAAa7X,EAAO6X,UAAU4G,WAQvD,GAAIV,GAAWA,EAAQW,QAAS,CAErC,IAAIC,EAAUZ,EAAQW,QAAQzgB,IAC9BkgB,EAAS,WACPQ,EAAQC,KAAKR,SASfD,EAAS,WAEPR,EAAUjf,KAAKsB,EAAQoe,QAvBgD,CACzE,IAAIS,GAAS,EACTC,EAAOpL,SAASqL,eAAe,IACnC,IAAInB,EAASQ,GAAOY,QAAQF,EAAM,CAAEG,eAAe,IACnDd,EAAS,WACPW,EAAKtO,KAAOqO,GAAUA,GAsB1B,OAAO,SAAU5Z,GACf,IAAIia,EAAO,CAAEja,GAAIA,EAAIoI,KAAMpP,IACvBigB,IAAMA,EAAK7Q,KAAO6R,GACjBjB,IACHA,EAAOiB,EACPf,KACAD,EAAOgB,KAOP,SAAU3gB,EAAQD,EAASF,GAKjC,IAAI4G,EAAY5G,EAAoB,IAEpC,SAAS+gB,kBAAkBzd,GACzB,IAAIgd,EAASU,EACbvd,KAAK8c,QAAU,IAAIjd,EAAE,SAAU2d,EAAWC,GACxC,GAAIZ,IAAYzgB,IAAamhB,IAAWnhB,GAAW,MAAMsE,UAAU,2BACnEmc,EAAUW,EACVD,EAASE,IAEXzd,KAAK6c,QAAU1Z,EAAU0Z,GACzB7c,KAAKud,OAASpa,EAAUoa,GAG1B7gB,EAAOD,QAAQiF,EAAI,SAAU7B,GAC3B,OAAO,IAAIyd,kBAAkBzd,KAMzB,SAAUnD,EAAQD,EAASF,GAGjC,IAAIyJ,EAAOzJ,EAAoB,IAC3Bqb,EAAOrb,EAAoB,IAC3B+E,EAAW/E,EAAoB,GAC/BmhB,EAAUnhB,EAAoB,GAAGmhB,QACrChhB,EAAOD,QAAUihB,GAAWA,EAAQC,SAAW,SAASA,QAAQld,GAC9D,IAAI2H,EAAOpC,EAAKtE,EAAEJ,EAASb,IACvBuX,EAAaJ,EAAKlW,EACtB,OAAOsW,EAAa5P,EAAKiH,OAAO2I,EAAWvX,IAAO2H,IAM9C,SAAU1L,EAAQD,EAASF,GAIjC,IAAI4B,EAAS5B,EAAoB,GAC7B6W,EAAc7W,EAAoB,GAClC+I,EAAU/I,EAAoB,IAC9BgJ,EAAShJ,EAAoB,IAC7B+B,EAAO/B,EAAoB,IAC3BoJ,EAAcpJ,EAAoB,IAClC+F,EAAQ/F,EAAoB,GAC5BkJ,EAAalJ,EAAoB,IACjC6E,EAAY7E,EAAoB,IAChCsH,EAAWtH,EAAoB,GAC/BqJ,EAAUrJ,EAAoB,KAC9ByJ,EAAOzJ,EAAoB,IAAImF,EAC/BD,EAAKlF,EAAoB,GAAGmF,EAC5BgF,EAAYnK,EAAoB,IAChCsY,EAAiBtY,EAAoB,IACrCyK,EAAe,cACf4W,EAAY,WACZpf,EAAY,YAEZqf,EAAc,eACdxW,EAAelJ,EAAO6I,GACtBO,EAAYpJ,EAAOyf,GACnBhd,EAAOzC,EAAOyC,KACdkG,EAAa3I,EAAO2I,WAEpB0R,EAAWra,EAAOqa,SAClBsF,EAAazW,EACb0W,EAAMnd,EAAKmd,IACXC,EAAMpd,EAAKod,IACX9Y,EAAQtE,EAAKsE,MACb+Y,EAAMrd,EAAKqd,IACXC,EAAMtd,EAAKsd,IAEXC,EAAc,aACdC,EAAc,aACdC,EAAUjL,EAAc,KAHf,SAITkL,EAAUlL,EAAc,KAAO+K,EAC/BI,EAAUnL,EAAc,KAAOgL,EAGnC,SAASI,YAAY3c,EAAO4c,EAAMC,GAChC,IAOI3d,EAAGjE,EAAGC,EAPNoN,EAAS,IAAI/C,MAAMsX,GACnBC,EAAgB,EAATD,EAAaD,EAAO,EAC3BG,GAAQ,GAAKD,GAAQ,EACrBE,EAAQD,GAAQ,EAChBE,EAAc,KAATL,EAAcT,EAAI,GAAI,IAAMA,EAAI,GAAI,IAAM,EAC/CrhB,EAAI,EACJuB,EAAI2D,EAAQ,GAAe,IAAVA,GAAe,EAAIA,EAAQ,EAAI,EAAI,EAkCxD,KAhCAA,EAAQkc,EAAIlc,KAECA,GAASA,IAAU2W,GAE9B1b,EAAI+E,GAASA,EAAQ,EAAI,EACzBd,EAAI6d,IAEJ7d,EAAImE,EAAM+Y,EAAIpc,GAASqc,GACnBrc,GAAS9E,EAAIihB,EAAI,GAAIjd,IAAM,IAC7BA,IACAhE,GAAK,GAOU,IAJf8E,GADe,GAAbd,EAAI8d,EACGC,EAAK/hB,EAEL+hB,EAAKd,EAAI,EAAG,EAAIa,IAEf9hB,IACVgE,IACAhE,GAAK,GAEU6hB,GAAb7d,EAAI8d,GACN/hB,EAAI,EACJiE,EAAI6d,GACkB,GAAb7d,EAAI8d,GACb/hB,GAAK+E,EAAQ9E,EAAI,GAAKihB,EAAI,EAAGS,GAC7B1d,GAAQ8d,IAER/hB,EAAI+E,EAAQmc,EAAI,EAAGa,EAAQ,GAAKb,EAAI,EAAGS,GACvC1d,EAAI,IAGO,GAAR0d,EAAWtU,EAAOxN,KAAW,IAAJG,EAASA,GAAK,IAAK2hB,GAAQ,GAG3D,IAFA1d,EAAIA,GAAK0d,EAAO3hB,EAChB6hB,GAAQF,EACM,EAAPE,EAAUxU,EAAOxN,KAAW,IAAJoE,EAASA,GAAK,IAAK4d,GAAQ,GAE1D,OADAxU,IAASxN,IAAU,IAAJuB,EACRiM,EAET,SAAS4U,cAAc5U,EAAQsU,EAAMC,GACnC,IAOI5hB,EAPA6hB,EAAgB,EAATD,EAAaD,EAAO,EAC3BG,GAAQ,GAAKD,GAAQ,EACrBE,EAAQD,GAAQ,EAChBI,EAAQL,EAAO,EACfhiB,EAAI+hB,EAAS,EACbxgB,EAAIiM,EAAOxN,KACXoE,EAAQ,IAAJ7C,EAGR,IADAA,IAAM,EACS,EAAR8gB,EAAWje,EAAQ,IAAJA,EAAUoJ,EAAOxN,GAAIA,IAAKqiB,GAAS,GAIzD,IAHAliB,EAAIiE,GAAK,IAAMie,GAAS,EACxBje,KAAOie,EACPA,GAASP,EACM,EAARO,EAAWliB,EAAQ,IAAJA,EAAUqN,EAAOxN,GAAIA,IAAKqiB,GAAS,GACzD,GAAU,IAANje,EACFA,EAAI,EAAI8d,MACH,CAAA,GAAI9d,IAAM6d,EACf,OAAO9hB,EAAImiB,IAAM/gB,GAAKsa,EAAWA,EAEjC1b,GAAQkhB,EAAI,EAAGS,GACf1d,GAAQ8d,EACR,OAAQ3gB,GAAK,EAAI,GAAKpB,EAAIkhB,EAAI,EAAGjd,EAAI0d,GAGzC,SAASS,UAAUC,GACjB,OAAOA,EAAM,IAAM,GAAKA,EAAM,IAAM,GAAKA,EAAM,IAAM,EAAIA,EAAM,GAEjE,SAASC,OAAO3e,GACd,MAAO,CAAM,IAALA,GAEV,SAAS4e,QAAQ5e,GACf,MAAO,CAAM,IAALA,EAAWA,GAAM,EAAI,KAE/B,SAAS6e,QAAQ7e,GACf,MAAO,CAAM,IAALA,EAAWA,GAAM,EAAI,IAAMA,GAAM,GAAK,IAAMA,GAAM,GAAK,KAEjE,SAAS8e,QAAQ9e,GACf,OAAO+d,YAAY/d,EAAI,GAAI,GAE7B,SAAS+e,QAAQ/e,GACf,OAAO+d,YAAY/d,EAAI,GAAI,GAG7B,SAASoK,UAAUhL,EAAGjB,EAAKkM,GACzBrJ,EAAG5B,EAAErB,GAAYI,EAAK,CAAEpB,IAAK,WAAc,OAAOwC,KAAK8K,MAGzD,SAAStN,IAAIiiB,EAAMN,EAAOva,EAAO8a,GAC/B,IACIC,EAAW/Z,GADChB,GAEhB,GAAuB6a,EAAKnB,GAAxBqB,EAAWR,EAAuB,MAAMrY,EAAW+W,GACvD,IACI7R,EAAQ2T,EAAWF,EAAKlB,GACxBqB,EAFQH,EAAKpB,GAASwB,GAET7a,MAAMgH,EAAOA,EAAQmT,GACtC,OAAOO,EAAiBE,EAAOA,EAAK/S,UAEtC,SAASxC,IAAIoV,EAAMN,EAAOva,EAAOkb,EAAYje,EAAO6d,GAClD,IACIC,EAAW/Z,GADChB,GAEhB,GAAuB6a,EAAKnB,GAAxBqB,EAAWR,EAAuB,MAAMrY,EAAW+W,GAIvD,IAHA,IAAI7c,EAAQye,EAAKpB,GAASwB,GACtB7T,EAAQ2T,EAAWF,EAAKlB,GACxBqB,EAAOE,GAAYje,GACdlF,EAAI,EAAGA,EAAIwiB,EAAOxiB,IAAKqE,EAAMgL,EAAQrP,GAAKijB,EAAKF,EAAiB/iB,EAAIwiB,EAAQxiB,EAAI,GAG3F,GAAK4I,EAAOuJ,IAgFL,CACL,IAAKxM,EAAM,WACT+E,EAAa,OACR/E,EAAM,WACX,IAAI+E,GAAc,MACd/E,EAAM,WAIV,OAHA,IAAI+E,EACJ,IAAIA,EAAa,KACjB,IAAIA,EAAa4X,KACV5X,EAAapK,MAAQ+J,IAC1B,CAMF,IADA,IACyCpI,EADrCmhB,GAJJ1Y,EAAe,SAASC,YAAYpH,GAElC,OADAuF,EAAWzF,KAAMqH,GACV,IAAIyW,EAAWlY,EAAQ1F,MAEI1B,GAAasf,EAAWtf,GACnD4J,EAAOpC,EAAK8X,GAAa5F,EAAI,EAAsBA,EAAd9P,EAAKlI,SAC1CtB,EAAMwJ,EAAK8P,QAAS7Q,GAAe/I,EAAK+I,EAAczI,EAAKkf,EAAWlf,IAE1E0G,IAASya,EAAiB1d,YAAcgF,GAG/C,IAAIoY,EAAO,IAAIlY,EAAU,IAAIF,EAAa,IACtC2Y,EAAWzY,EAAU/I,GAAWyhB,QACpCR,EAAKQ,QAAQ,EAAG,YAChBR,EAAKQ,QAAQ,EAAG,aACZR,EAAKS,QAAQ,IAAOT,EAAKS,QAAQ,IAAIva,EAAY4B,EAAU/I,GAAY,CACzEyhB,QAAS,SAASA,QAAQ5S,EAAYxL,GACpCme,EAASnjB,KAAKmD,KAAMqN,EAAYxL,GAAS,IAAM,KAEjDse,SAAU,SAASA,SAAS9S,EAAYxL,GACtCme,EAASnjB,KAAKmD,KAAMqN,EAAYxL,GAAS,IAAM,OAEhD,QAhHHwF,EAAe,SAASC,YAAYpH,GAClCuF,EAAWzF,KAAMqH,EAAcL,GAC/B,IAAIiI,EAAarJ,EAAQ1F,GACzBF,KAAK6f,GAAKnZ,EAAU7J,KAAK,IAAIuK,MAAM6H,GAAa,GAChDjP,KAAKse,GAAWrP,GAGlB1H,EAAY,SAASC,SAAS2C,EAAQkD,EAAY4B,GAChDxJ,EAAWzF,KAAMuH,EAAWqW,GAC5BnY,EAAW0E,EAAQ9C,EAAcuW,GACjC,IAAIwC,EAAejW,EAAOmU,GACtB9T,EAASpJ,EAAUiM,GACvB,GAAI7C,EAAS,GAAc4V,EAAT5V,EAAuB,MAAM1D,EAAW,iBAE1D,GAA0BsZ,EAAtB5V,GADJyE,EAAaA,IAAe7S,GAAYgkB,EAAe5V,EAAS3G,EAASoL,IACjC,MAAMnI,EAxJ/B,iBAyJf9G,KAAKqe,GAAWlU,EAChBnK,KAAKue,GAAW/T,EAChBxK,KAAKse,GAAWrP,GAGdmE,IACFvI,UAAUxD,EAAc8W,EAAa,MACrCtT,UAAUtD,EAlJD,SAkJoB,MAC7BsD,UAAUtD,EAAW4W,EAAa,MAClCtT,UAAUtD,EAAW6W,EAAa,OAGpCzY,EAAY4B,EAAU/I,GAAY,CAChC0hB,QAAS,SAASA,QAAQ7S,GACxB,OAAO7P,IAAIwC,KAAM,EAAGqN,GAAY,IAAM,IAAM,IAE9CgT,SAAU,SAASA,SAAShT,GAC1B,OAAO7P,IAAIwC,KAAM,EAAGqN,GAAY,IAElCiT,SAAU,SAASA,SAASjT,GAC1B,IAAI8R,EAAQ3hB,IAAIwC,KAAM,EAAGqN,EAAYpN,UAAU,IAC/C,OAAQkf,EAAM,IAAM,EAAIA,EAAM,KAAO,IAAM,IAE7CoB,UAAW,SAASA,UAAUlT,GAC5B,IAAI8R,EAAQ3hB,IAAIwC,KAAM,EAAGqN,EAAYpN,UAAU,IAC/C,OAAOkf,EAAM,IAAM,EAAIA,EAAM,IAE/BqB,SAAU,SAASA,SAASnT,GAC1B,OAAO6R,UAAU1hB,IAAIwC,KAAM,EAAGqN,EAAYpN,UAAU,MAEtDwgB,UAAW,SAASA,UAAUpT,GAC5B,OAAO6R,UAAU1hB,IAAIwC,KAAM,EAAGqN,EAAYpN,UAAU,OAAS,GAE/DygB,WAAY,SAASA,WAAWrT,GAC9B,OAAO0R,cAAcvhB,IAAIwC,KAAM,EAAGqN,EAAYpN,UAAU,IAAK,GAAI,IAEnE0gB,WAAY,SAASA,WAAWtT,GAC9B,OAAO0R,cAAcvhB,IAAIwC,KAAM,EAAGqN,EAAYpN,UAAU,IAAK,GAAI,IAEnEggB,QAAS,SAASA,QAAQ5S,EAAYxL,GACpCwI,IAAIrK,KAAM,EAAGqN,EAAY+R,OAAQvd,IAEnCse,SAAU,SAASA,SAAS9S,EAAYxL,GACtCwI,IAAIrK,KAAM,EAAGqN,EAAY+R,OAAQvd,IAEnC+e,SAAU,SAASA,SAASvT,EAAYxL,GACtCwI,IAAIrK,KAAM,EAAGqN,EAAYgS,QAASxd,EAAO5B,UAAU,KAErD4gB,UAAW,SAASA,UAAUxT,EAAYxL,GACxCwI,IAAIrK,KAAM,EAAGqN,EAAYgS,QAASxd,EAAO5B,UAAU,KAErD6gB,SAAU,SAASA,SAASzT,EAAYxL,GACtCwI,IAAIrK,KAAM,EAAGqN,EAAYiS,QAASzd,EAAO5B,UAAU,KAErD8gB,UAAW,SAASA,UAAU1T,EAAYxL,GACxCwI,IAAIrK,KAAM,EAAGqN,EAAYiS,QAASzd,EAAO5B,UAAU,KAErD+gB,WAAY,SAASA,WAAW3T,EAAYxL,GAC1CwI,IAAIrK,KAAM,EAAGqN,EAAYmS,QAAS3d,EAAO5B,UAAU,KAErDghB,WAAY,SAASA,WAAW5T,EAAYxL,GAC1CwI,IAAIrK,KAAM,EAAGqN,EAAYkS,QAAS1d,EAAO5B,UAAU,OAsCzD4U,EAAexN,EAAcL,GAC7B6N,EAAetN,EAAWqW,GAC1Btf,EAAKiJ,EAAU/I,GAAY+G,EAAOsE,MAAM,GACxCpN,EAAQuK,GAAgBK,EACxB5K,EAAQmhB,GAAarW,GAKf,SAAU7K,EAAQD,GAExBC,EAAOD,QAAU,SAAUykB,EAAQpe,GACjC,IAAIqe,EAAWre,IAAY1F,OAAO0F,GAAW,SAAUse,GACrD,OAAOte,EAAQse,IACbte,EACJ,OAAO,SAAUrC,GACf,OAAOmC,OAAOnC,GAAIqC,QAAQoe,EAAQC,MAOhC,SAAUzkB,EAAQD,EAASF,GAEjCG,EAAOD,SAAWF,EAAoB,KAAOA,EAAoB,EAApBA,CAAuB,WAClE,OAA2G,GAApGa,OAAOC,eAAed,EAAoB,GAApBA,CAAwB,OAAQ,IAAK,CAAEiB,IAAK,WAAc,OAAO,KAAQsC,KAMlG,SAAUpD,EAAQD,EAASF,GAEjCE,EAAQiF,EAAInF,EAAoB,IAK1B,SAAUG,EAAQD,EAASF,GAEjC,IAAIgC,EAAMhC,EAAoB,IAC1BiH,EAAYjH,EAAoB,IAChCyL,EAAezL,EAAoB,GAApBA,EAAwB,GACvC2F,EAAW3F,EAAoB,GAApBA,CAAwB,YAEvCG,EAAOD,QAAU,SAAUoB,EAAQwjB,GACjC,IAGIziB,EAHA+C,EAAI6B,EAAU3F,GACdlB,EAAI,EACJkI,EAAS,GAEb,IAAKjG,KAAO+C,EAAO/C,GAAOsD,GAAU3D,EAAIoD,EAAG/C,IAAQiG,EAAOC,KAAKlG,GAE/D,KAAsBjC,EAAf0kB,EAAMnhB,QAAgB3B,EAAIoD,EAAG/C,EAAMyiB,EAAM1kB,SAC7CqL,EAAanD,EAAQjG,IAAQiG,EAAOC,KAAKlG,IAE5C,OAAOiG,IAMH,SAAUnI,EAAQD,EAASF,GAEjC,IAAIkF,EAAKlF,EAAoB,GACzB+E,EAAW/E,EAAoB,GAC/Bob,EAAUpb,EAAoB,IAElCG,EAAOD,QAAUF,EAAoB,GAAKa,OAAOkkB,iBAAmB,SAASA,iBAAiB3f,EAAGuQ,GAC/F5Q,EAASK,GAKT,IAJA,IAGIrC,EAHA8I,EAAOuP,EAAQzF,GACfhS,EAASkI,EAAKlI,OACdvD,EAAI,EAEQA,EAATuD,GAAYuB,EAAGC,EAAEC,EAAGrC,EAAI8I,EAAKzL,KAAMuV,EAAW5S,IACrD,OAAOqC,IAMH,SAAUjF,EAAQD,EAASF,GAGjC,IAAIiH,EAAYjH,EAAoB,IAChCyJ,EAAOzJ,EAAoB,IAAImF,EAC/BqD,EAAW,GAAGA,SAEdwc,EAA+B,iBAAV5gB,QAAsBA,QAAUvD,OAAOoW,oBAC5DpW,OAAOoW,oBAAoB7S,QAAU,GAUzCjE,EAAOD,QAAQiF,EAAI,SAAS8R,oBAAoB/S,GAC9C,OAAO8gB,GAAoC,mBAArBxc,EAASlI,KAAK4D,GATjB,SAAUA,GAC7B,IACE,OAAOuF,EAAKvF,GACZ,MAAOM,GACP,OAAOwgB,EAAYvc,SAK0Cwc,CAAe/gB,GAAMuF,EAAKxC,EAAU/C,MAM/F,SAAU/D,EAAQD,EAASF,GAIjC,IAAIiE,EAAWjE,EAAoB,GAC/B+E,EAAW/E,EAAoB,GAC/BklB,EAAQ,SAAU9f,EAAGmK,GAEvB,GADAxK,EAASK,IACJnB,EAASsL,IAAoB,OAAVA,EAAgB,MAAMpL,UAAUoL,EAAQ,8BAElEpP,EAAOD,QAAU,CACf4N,IAAKjN,OAAOskB,iBAAmB,aAAe,GAC5C,SAAU1e,EAAM2e,EAAOtX,GACrB,KACEA,EAAM9N,EAAoB,GAApBA,CAAwB6D,SAASvD,KAAMN,EAAoB,IAAImF,EAAEtE,OAAOW,UAAW,aAAasM,IAAK,IACvGrH,EAAM,IACV2e,IAAU3e,aAAgBoE,OAC1B,MAAOrG,GAAK4gB,GAAQ,EACtB,OAAO,SAASD,eAAe/f,EAAGmK,GAIhC,OAHA2V,EAAM9f,EAAGmK,GACL6V,EAAOhgB,EAAEigB,UAAY9V,EACpBzB,EAAI1I,EAAGmK,GACLnK,GAVX,CAYE,IAAI,GAASvF,IACjBqlB,MAAOA,IAMH,SAAU/kB,EAAQD,EAASF,GAIjC,IAAI4G,EAAY5G,EAAoB,IAChCiE,EAAWjE,EAAoB,GAC/B4d,EAAS5d,EAAoB,IAC7B0M,EAAa,GAAGjE,MAChB6c,EAAY,GAUhBnlB,EAAOD,QAAU2D,SAAS0hB,MAAQ,SAASA,KAAKze,GAC9C,IAAID,EAAKD,EAAUnD,MACf+hB,EAAW9Y,EAAWpM,KAAKoD,UAAW,GACtC+hB,EAAQ,WACV,IAAI7J,EAAO4J,EAAS1S,OAAOpG,EAAWpM,KAAKoD,YAC3C,OAAOD,gBAAgBgiB,EAbX,SAAUhjB,EAAG0O,EAAKyK,GAChC,KAAMzK,KAAOmU,GAAY,CACvB,IAAK,IAAIpkB,EAAI,GAAId,EAAI,EAAGA,EAAI+Q,EAAK/Q,IAAKc,EAAEd,GAAK,KAAOA,EAAI,IAExDklB,EAAUnU,GAAOtN,SAAS,MAAO,gBAAkB3C,EAAEqL,KAAK,KAAO,KACjE,OAAO+Y,EAAUnU,GAAK1O,EAAGmZ,GAQM8J,CAAU7e,EAAI+U,EAAKjY,OAAQiY,GAAQgC,EAAO/W,EAAI+U,EAAM9U,IAGrF,OADI7C,EAAS4C,EAAGrF,aAAYikB,EAAMjkB,UAAYqF,EAAGrF,WAC1CikB,IAMH,SAAUtlB,EAAQD,EAASF,GAEjC,IAAIgW,EAAMhW,EAAoB,IAC9BG,EAAOD,QAAU,SAAUgE,EAAIyhB,GAC7B,GAAiB,iBAANzhB,GAA6B,UAAX8R,EAAI9R,GAAiB,MAAMC,UAAUwhB,GAClE,OAAQzhB,IAMJ,SAAU/D,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAC/B2I,EAAQtE,KAAKsE,MACjBxI,EAAOD,QAAU,SAAS0lB,UAAU1hB,GAClC,OAAQD,EAASC,IAAO2hB,SAAS3hB,IAAOyE,EAAMzE,KAAQA,IAMlD,SAAU/D,EAAQD,EAASF,GAEjC,IAAI8lB,EAAc9lB,EAAoB,GAAG+lB,WACrCC,EAAQhmB,EAAoB,IAAI0X,KAEpCvX,EAAOD,QAAU,EAAI4lB,EAAY9lB,EAAoB,IAAM,QAAWic,SAAW,SAAS8J;AAAW/J,GACnG,IAAI9V,EAAS8f,EAAM3f,OAAO2V,GAAM,GAC5B1T,EAASwd,EAAY5f,GACzB,OAAkB,IAAXoC,GAAoC,KAApBpC,EAAOgV,OAAO,IAAa,EAAI5S,GACpDwd,GAKE,SAAU3lB,EAAQD,EAASF,GAEjC,IAAIimB,EAAYjmB,EAAoB,GAAGkmB,SACnCF,EAAQhmB,EAAoB,IAAI0X,KAChCyO,EAAKnmB,EAAoB,IACzBomB,EAAM,cAEVjmB,EAAOD,QAAmC,IAAzB+lB,EAAUE,EAAK,OAA0C,KAA3BF,EAAUE,EAAK,QAAiB,SAASD,SAASlK,EAAKqK,GACpG,IAAIngB,EAAS8f,EAAM3f,OAAO2V,GAAM,GAChC,OAAOiK,EAAU/f,EAASmgB,IAAU,IAAOD,EAAI3f,KAAKP,GAAU,GAAK,MACjE+f,GAKE,SAAU9lB,EAAQD,GAGxBC,EAAOD,QAAUmE,KAAKiiB,OAAS,SAASA,MAAMnK,GAC5C,OAAmB,MAAXA,GAAKA,IAAcA,EAAI,KAAOA,EAAIA,EAAIA,EAAI,EAAI9X,KAAKqd,IAAI,EAAIvF,KAM/D,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkc,EAAOlc,EAAoB,IAC3ByhB,EAAMpd,KAAKod,IACX8E,EAAU9E,EAAI,GAAI,IAClB+E,EAAY/E,EAAI,GAAI,IACpBgF,EAAQhF,EAAI,EAAG,MAAQ,EAAI+E,GAC3BE,EAAQjF,EAAI,GAAI,KAMpBthB,EAAOD,QAAUmE,KAAKsiB,QAAU,SAASA,OAAOxK,GAC9C,IAEI5Y,EAAG+E,EAFHse,EAAOviB,KAAKmd,IAAIrF,GAChB0K,EAAQ3K,EAAKC,GAEjB,OAAIyK,EAAOF,EAAcG,GAAwBD,EAAOF,EAAQF,EAPrD,EAAID,EAAU,EAAIA,GAOgDG,EAAQF,EAIxEC,GAFbne,GADA/E,GAAK,EAAIijB,EAAYD,GAAWK,IAClBrjB,EAAIqjB,KAEIte,GAAUA,EAAeue,EAAQ5K,SAChD4K,EAAQve,IAMX,SAAUnI,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAC/BgW,EAAMhW,EAAoB,IAC1B2c,EAAQ3c,EAAoB,EAApBA,CAAuB,SACnCG,EAAOD,QAAU,SAAUgE,GACzB,IAAIuY,EACJ,OAAOxY,EAASC,MAASuY,EAAWvY,EAAGyY,MAAY9c,KAAc4c,EAAsB,UAAXzG,EAAI9R,MAM5E,SAAU/D,EAAQD,EAASF,GAGjC,IAAI+E,EAAW/E,EAAoB,GACnCG,EAAOD,QAAU,SAAU0O,EAAU/H,EAAIvB,EAAOyG,GAC9C,IACE,OAAOA,EAAUlF,EAAG9B,EAASO,GAAO,GAAIA,EAAM,IAAMuB,EAAGvB,GAEvD,MAAOd,GACP,IAAIsiB,EAAMlY,EAAiB,UAE3B,MADIkY,IAAQjnB,IAAWkF,EAAS+hB,EAAIxmB,KAAKsO,IACnCpK,KAOJ,SAAUrE,EAAQD,EAASF,GAEjC,IAAI4G,EAAY5G,EAAoB,IAChC0F,EAAW1F,EAAoB,GAC/BwF,EAAUxF,EAAoB,IAC9BsH,EAAWtH,EAAoB,GAEnCG,EAAOD,QAAU,SAAU4G,EAAMoB,EAAY2G,EAAMkY,EAAMC,GACvDpgB,EAAUsB,GACV,IAAI9C,EAAIM,EAASoB,GACbxC,EAAOkB,EAAQJ,GACfzB,EAAS2D,EAASlC,EAAEzB,QACpB0E,EAAQ2e,EAAUrjB,EAAS,EAAI,EAC/BvD,EAAI4mB,GAAW,EAAI,EACvB,GAAInY,EAAO,EAAG,OAAS,CACrB,GAAIxG,KAAS/D,EAAM,CACjByiB,EAAOziB,EAAK+D,GACZA,GAASjI,EACT,MAGF,GADAiI,GAASjI,EACL4mB,EAAU3e,EAAQ,EAAI1E,GAAU0E,EAClC,MAAMlE,UAAU,+CAGpB,KAAM6iB,EAAmB,GAAT3e,EAAsBA,EAAT1E,EAAgB0E,GAASjI,EAAOiI,KAAS/D,IACpEyiB,EAAO7e,EAAW6e,EAAMziB,EAAK+D,GAAQA,EAAOjD,IAE9C,OAAO2hB,IAMH,SAAU5mB,EAAQD,EAASF,GAKjC,IAAI0F,EAAW1F,EAAoB,GAC/BsJ,EAAkBtJ,EAAoB,IACtCsH,EAAWtH,EAAoB,GAEnCG,EAAOD,QAAU,GAAGsP,YAAc,SAASA,WAAWnM,EAAkBoM,GACtE,IAAIrK,EAAIM,EAASjC,MACb0N,EAAM7J,EAASlC,EAAEzB,QACjBsjB,EAAK3d,EAAgBjG,EAAQ8N,GAC7BzC,EAAOpF,EAAgBmG,EAAO0B,GAC9BP,EAAyB,EAAnBlN,UAAUC,OAAaD,UAAU,GAAK7D,GAC5Ckc,EAAQ1X,KAAKS,KAAK8L,IAAQ/Q,GAAYsR,EAAM7H,EAAgBsH,EAAKO,IAAQzC,EAAMyC,EAAM8V,GACrFC,EAAM,EAMV,IALIxY,EAAOuY,GAAMA,EAAKvY,EAAOqN,IAC3BmL,GAAO,EACPxY,GAAQqN,EAAQ,EAChBkL,GAAMlL,EAAQ,GAEC,EAAVA,KACDrN,KAAQtJ,EAAGA,EAAE6hB,GAAM7hB,EAAEsJ,UACbtJ,EAAE6hB,GACdA,GAAMC,EACNxY,GAAQwY,EACR,OAAO9hB,IAML,SAAUjF,EAAQD,GAExBC,EAAOD,QAAU,SAAUqE,GACzB,IACE,MAAO,CAAEC,GAAG,EAAO6N,EAAG9N,KACtB,MAAOC,GACP,MAAO,CAAEA,GAAG,EAAM6N,EAAG7N,MAOnB,SAAUrE,EAAQD,EAASF,GAEjC,IAAI+E,EAAW/E,EAAoB,GAC/BiE,EAAWjE,EAAoB,GAC/BmnB,EAAuBnnB,EAAoB,IAE/CG,EAAOD,QAAU,SAAUoD,EAAG6Y,GAE5B,GADApX,EAASzB,GACLW,EAASkY,IAAMA,EAAErW,cAAgBxC,EAAG,OAAO6Y,EAC/C,IAAIiL,EAAoBD,EAAqBhiB,EAAE7B,GAG/C,OADAgd,EADc8G,EAAkB9G,SACxBnE,GACDiL,EAAkB7G,UAMrB,SAAUpgB,EAAQD,EAASF,GAIjC,IAAIqnB,EAASrnB,EAAoB,KAC7BkO,EAAWlO,EAAoB,IAInCG,EAAOD,QAAUF,EAAoB,GAApBA,CAHP,MAGoC,SAAUiB,GACtD,OAAO,SAASiS,MAAQ,OAAOjS,EAAIwC,KAAyB,EAAnBC,UAAUC,OAAaD,UAAU,GAAK7D,MAC9E,CAEDoB,IAAK,SAASA,IAAIoB,GAChB,IAAIilB,EAAQD,EAAOE,SAASrZ,EAASzK,KAR/B,OAQ2CpB,GACjD,OAAOilB,GAASA,EAAMjV,GAGxBvE,IAAK,SAASA,IAAIzL,EAAKiD,GACrB,OAAO+hB,EAAO1Q,IAAIzI,EAASzK,KAbrB,OAayC,IAARpB,EAAY,EAAIA,EAAKiD,KAE7D+hB,GAAQ,IAKL,SAAUlnB,EAAQD,EAASF,GAIjC,IAAIkF,EAAKlF,EAAoB,GAAGmF,EAC5B6C,EAAShI,EAAoB,IAC7BoJ,EAAcpJ,EAAoB,IAClC8B,EAAM9B,EAAoB,IAC1BkJ,EAAalJ,EAAoB,IACjC2Z,EAAQ3Z,EAAoB,IAC5BwnB,EAAcxnB,EAAoB,IAClC2O,EAAO3O,EAAoB,IAC3BkK,EAAalK,EAAoB,IACjC6W,EAAc7W,EAAoB,GAClCwU,EAAUxU,EAAoB,IAAIwU,QAClCtG,EAAWlO,EAAoB,IAC/BynB,EAAO5Q,EAAc,KAAO,OAE5B0Q,EAAW,SAAUzgB,EAAMzE,GAE7B,IACIilB,EADAjf,EAAQmM,EAAQnS,GAEpB,GAAc,MAAVgG,EAAe,OAAOvB,EAAKwW,GAAGjV,GAElC,IAAKif,EAAQxgB,EAAK4gB,GAAIJ,EAAOA,EAAQA,EAAMpmB,EACzC,GAAIomB,EAAM9L,GAAKnZ,EAAK,OAAOilB,GAI/BnnB,EAAOD,QAAU,CACfia,eAAgB,SAAUxI,EAASnL,EAAMkB,EAAQqS,GAC/C,IAAIzW,EAAIqO,EAAQ,SAAU7K,EAAMgP,GAC9B5M,EAAWpC,EAAMxD,EAAGkD,EAAM,MAC1BM,EAAK0P,GAAKhQ,EACVM,EAAKwW,GAAKtV,EAAO,MACjBlB,EAAK4gB,GAAK7nB,GACViH,EAAK6gB,GAAK9nB,GACViH,EAAK2gB,GAAQ,EACT3R,GAAYjW,IAAW8Z,EAAM7D,EAAUpO,EAAQZ,EAAKiT,GAAQjT,KAsDlE,OApDAsC,EAAY9F,EAAE9B,UAAW,CAGvB8d,MAAO,SAASA,QACd,IAAK,IAAIxY,EAAOoH,EAASzK,KAAM+C,GAAO4L,EAAOtL,EAAKwW,GAAIgK,EAAQxgB,EAAK4gB,GAAIJ,EAAOA,EAAQA,EAAMpmB,EAC1FomB,EAAMM,GAAI,EACNN,EAAM5lB,IAAG4lB,EAAM5lB,EAAI4lB,EAAM5lB,EAAER,EAAIrB,WAC5BuS,EAAKkV,EAAMlnB,GAEpB0G,EAAK4gB,GAAK5gB,EAAK6gB,GAAK9nB,GACpBiH,EAAK2gB,GAAQ,GAIfI,SAAU,SAAUxlB,GAClB,IAAIyE,EAAOoH,EAASzK,KAAM+C,GACtB8gB,EAAQC,EAASzgB,EAAMzE,GAC3B,GAAIilB,EAAO,CACT,IAAIrY,EAAOqY,EAAMpmB,EACb4mB,EAAOR,EAAM5lB,SACVoF,EAAKwW,GAAGgK,EAAMlnB,GACrBknB,EAAMM,GAAI,EACNE,IAAMA,EAAK5mB,EAAI+N,GACfA,IAAMA,EAAKvN,EAAIomB,GACfhhB,EAAK4gB,IAAMJ,IAAOxgB,EAAK4gB,GAAKzY,GAC5BnI,EAAK6gB,IAAML,IAAOxgB,EAAK6gB,GAAKG,GAChChhB,EAAK2gB,KACL,QAASH,GAIbtX,QAAS,SAASA,QAAQ9H,GACxBgG,EAASzK,KAAM+C,GAGf,IAFA,IACI8gB,EADAniB,EAAIrD,EAAIoG,EAA+B,EAAnBxE,UAAUC,OAAaD,UAAU,GAAK7D,GAAW,GAElEynB,EAAQA,EAAQA,EAAMpmB,EAAIuC,KAAKikB,IAGpC,IAFAviB,EAAEmiB,EAAMjV,EAAGiV,EAAM9L,EAAG/X,MAEb6jB,GAASA,EAAMM,GAAGN,EAAQA,EAAM5lB,GAK3CM,IAAK,SAASA,IAAIK,GAChB,QAASklB,EAASrZ,EAASzK,KAAM+C,GAAOnE,MAGxCwU,GAAa3R,EAAG5B,EAAE9B,UAAW,OAAQ,CACvCP,IAAK,WACH,OAAOiN,EAASzK,KAAM+C,GAAMihB,MAGzBnkB,GAETqT,IAAK,SAAU7P,EAAMzE,EAAKiD,GACxB,IACIwiB,EAAMzf,EADNif,EAAQC,EAASzgB,EAAMzE,GAoBzB,OAjBEilB,EACFA,EAAMjV,EAAI/M,GAGVwB,EAAK6gB,GAAKL,EAAQ,CAChBlnB,EAAGiI,EAAQmM,EAAQnS,GAAK,GACxBmZ,EAAGnZ,EACHgQ,EAAG/M,EACH5D,EAAGomB,EAAOhhB,EAAK6gB,GACfzmB,EAAGrB,GACH+nB,GAAG,GAEA9gB,EAAK4gB,KAAI5gB,EAAK4gB,GAAKJ,GACpBQ,IAAMA,EAAK5mB,EAAIomB,GACnBxgB,EAAK2gB,KAES,MAAVpf,IAAevB,EAAKwW,GAAGjV,GAASif,IAC7BxgB,GAEXygB,SAAUA,EACVnN,UAAW,SAAU9W,EAAGkD,EAAMkB,GAG5B8f,EAAYlkB,EAAGkD,EAAM,SAAU6W,EAAUrE,GACvCvV,KAAK+S,GAAKtI,EAASmP,EAAU7W,GAC7B/C,KAAK8Z,GAAKvE,EACVvV,KAAKkkB,GAAK9nB,IACT,WAKD,IAJA,IAAIiH,EAAOrD,KACPuV,EAAOlS,EAAKyW,GACZ+J,EAAQxgB,EAAK6gB,GAEVL,GAASA,EAAMM,GAAGN,EAAQA,EAAM5lB,EAEvC,OAAKoF,EAAK0P,KAAQ1P,EAAK6gB,GAAKL,EAAQA,EAAQA,EAAMpmB,EAAI4F,EAAK0P,GAAGkR,IAMnC/Y,EAAK,EAApB,QAARqK,EAA+BsO,EAAM9L,EAC7B,UAARxC,EAAiCsO,EAAMjV,EAC5B,CAACiV,EAAM9L,EAAG8L,EAAMjV,KAN7BvL,EAAK0P,GAAK3W,GACH8O,EAAK,KAMbjH,EAAS,UAAY,UAAWA,GAAQ,GAG3CwC,EAAW1D,MAOT,SAAUrG,EAAQD,EAASF,GAIjC,IAAIqnB,EAASrnB,EAAoB,KAC7BkO,EAAWlO,EAAoB,IAInCG,EAAOD,QAAUF,EAAoB,GAApBA,CAHP,MAGoC,SAAUiB,GACtD,OAAO,SAAS8mB,MAAQ,OAAO9mB,EAAIwC,KAAyB,EAAnBC,UAAUC,OAAaD,UAAU,GAAK7D,MAC9E,CAEDmoB,IAAK,SAASA,IAAI1iB,GAChB,OAAO+hB,EAAO1Q,IAAIzI,EAASzK,KARrB,OAQiC6B,EAAkB,IAAVA,EAAc,EAAIA,EAAOA,KAEzE+hB,IAKG,SAAUlnB,EAAQD,EAASF,GAIjC,IAcIioB,EAdArmB,EAAS5B,EAAoB,GAC7B4Z,EAAO5Z,EAAoB,GAApBA,CAAwB,GAC/BoY,EAAWpY,EAAoB,IAC/BsU,EAAOtU,EAAoB,IAC3Bub,EAASvb,EAAoB,IAC7BkoB,EAAOloB,EAAoB,KAC3BiE,EAAWjE,EAAoB,GAC/BkO,EAAWlO,EAAoB,IAC/BmoB,EAAkBnoB,EAAoB,IACtCooB,GAAWxmB,EAAOymB,eAAiB,kBAAmBzmB,EACtD0mB,EAAW,UACX7T,EAAUH,EAAKG,QACfR,EAAepT,OAAOoT,aACtBsU,EAAsBL,EAAKM,QAG3B7W,EAAU,SAAU1Q,GACtB,OAAO,SAASwnB,UACd,OAAOxnB,EAAIwC,KAAyB,EAAnBC,UAAUC,OAAaD,UAAU,GAAK7D,MAIvDgZ,EAAU,CAEZ5X,IAAK,SAASA,IAAIoB,GAChB,GAAI4B,EAAS5B,GAAM,CACjB,IAAI+P,EAAOqC,EAAQpS,GACnB,OAAa,IAAT+P,EAAsBmW,EAAoBra,EAASzK,KAAM6kB,IAAWrnB,IAAIoB,GACrE+P,EAAOA,EAAK3O,KAAK6Z,IAAMzd,KAIlCiO,IAAK,SAASA,IAAIzL,EAAKiD,GACrB,OAAO4iB,EAAKvR,IAAIzI,EAASzK,KAAM6kB,GAAWjmB,EAAKiD,KAK/CojB,EAAWvoB,EAAOD,QAAUF,EAAoB,GAApBA,CAAwBsoB,EAAU3W,EAASkH,EAASqP,GAAM,GAAM,GAG5FC,GAAmBC,IAErB7M,GADA0M,EAAcC,EAAK/N,eAAexI,EAAS2W,IACxB9mB,UAAWqX,GAC9BvE,EAAKC,MAAO,EACZqF,EAAK,CAAC,SAAU,MAAO,MAAO,OAAQ,SAAUvX,GAC9C,IAAIkN,EAAQmZ,EAASlnB,UACjB4F,EAASmI,EAAMlN,GACnB+V,EAAS7I,EAAOlN,EAAK,SAAUkB,EAAGC,GAEhC,GAAIS,EAASV,KAAO0Q,EAAa1Q,GAAI,CAC9BE,KAAKikB,KAAIjkB,KAAKikB,GAAK,IAAIO,GAC5B,IAAI3f,EAAS7E,KAAKikB,GAAGrlB,GAAKkB,EAAGC,GAC7B,MAAc,OAAPnB,EAAeoB,KAAO6E,EAE7B,OAAOlB,EAAO9G,KAAKmD,KAAMF,EAAGC,SAQ9B,SAAUrD,EAAQD,EAASF,GAIjC,IAAIoJ,EAAcpJ,EAAoB,IAClCyU,EAAUzU,EAAoB,IAAIyU,QAClC1P,EAAW/E,EAAoB,GAC/BiE,EAAWjE,EAAoB,GAC/BkJ,EAAalJ,EAAoB,IACjC2Z,EAAQ3Z,EAAoB,IAC5B4J,EAAoB5J,EAAoB,IACxC2oB,EAAO3oB,EAAoB,IAC3BkO,EAAWlO,EAAoB,IAC/BsL,EAAY1B,EAAkB,GAC9B2B,EAAiB3B,EAAkB,GACnCoK,EAAK,EAGLuU,EAAsB,SAAUzhB,GAClC,OAAOA,EAAK6gB,KAAO7gB,EAAK6gB,GAAK,IAAIiB,IAE/BA,EAAsB,WACxBnlB,KAAKF,EAAI,IAEPslB,EAAqB,SAAUpkB,EAAOpC,GACxC,OAAOiJ,EAAU7G,EAAMlB,EAAG,SAAUW,GAClC,OAAOA,EAAG,KAAO7B,KAGrBumB,EAAoBpnB,UAAY,CAC9BP,IAAK,SAAUoB,GACb,IAAIilB,EAAQuB,EAAmBplB,KAAMpB,GACrC,GAAIilB,EAAO,OAAOA,EAAM,IAE1BtlB,IAAK,SAAUK,GACb,QAASwmB,EAAmBplB,KAAMpB,IAEpCyL,IAAK,SAAUzL,EAAKiD,GAClB,IAAIgiB,EAAQuB,EAAmBplB,KAAMpB,GACjCilB,EAAOA,EAAM,GAAKhiB,EACjB7B,KAAKF,EAAEgF,KAAK,CAAClG,EAAKiD,KAEzBuiB,SAAU,SAAUxlB,GAClB,IAAIgG,EAAQkD,EAAe9H,KAAKF,EAAG,SAAUW,GAC3C,OAAOA,EAAG,KAAO7B,IAGnB,OADKgG,GAAO5E,KAAKF,EAAEulB,OAAOzgB,EAAO,MACvBA,IAIdlI,EAAOD,QAAU,CACfia,eAAgB,SAAUxI,EAASnL,EAAMkB,EAAQqS,GAC/C,IAAIzW,EAAIqO,EAAQ,SAAU7K,EAAMgP,GAC9B5M,EAAWpC,EAAMxD,EAAGkD,EAAM,MAC1BM,EAAK0P,GAAKhQ,EACVM,EAAKwW,GAAKtJ,IAEN8B,IADJhP,EAAK6gB,GAAK9nB,KACiB8Z,EAAM7D,EAAUpO,EAAQZ,EAAKiT,GAAQjT,KAoBlE,OAlBAsC,EAAY9F,EAAE9B,UAAW,CAGvBqmB,SAAU,SAAUxlB,GAClB,IAAK4B,EAAS5B,GAAM,OAAO,EAC3B,IAAI+P,EAAOqC,EAAQpS,GACnB,OAAa,IAAT+P,EAAsBmW,EAAoBra,EAASzK,KAAM+C,IAAe,UAAEnE,GACvE+P,GAAQuW,EAAKvW,EAAM3O,KAAK6Z,YAAclL,EAAK3O,KAAK6Z,KAIzDtb,IAAK,SAASA,IAAIK,GAChB,IAAK4B,EAAS5B,GAAM,OAAO,EAC3B,IAAI+P,EAAOqC,EAAQpS,GACnB,OAAa,IAAT+P,EAAsBmW,EAAoBra,EAASzK,KAAM+C,IAAOxE,IAAIK,GACjE+P,GAAQuW,EAAKvW,EAAM3O,KAAK6Z,OAG5Bha,GAETqT,IAAK,SAAU7P,EAAMzE,EAAKiD,GACxB,IAAI8M,EAAOqC,EAAQ1P,EAAS1C,IAAM,GAGlC,OAFa,IAAT+P,EAAemW,EAAoBzhB,GAAMgH,IAAIzL,EAAKiD,GACjD8M,EAAKtL,EAAKwW,IAAMhY,EACdwB,GAET0hB,QAASD,IAML,SAAUpoB,EAAQD,EAASF,GAKjC,IAAI+F,EAAQ/F,EAAoB,GAC5B+oB,EAAUC,KAAKxnB,UAAUunB,QACzBE,EAAeD,KAAKxnB,UAAU0nB,YAE9BC,EAAK,SAAUC,GACjB,OAAa,EAANA,EAAUA,EAAM,IAAMA,GAI/BjpB,EAAOD,QAAW6F,EAAM,WACtB,MAAiD,4BAA1CkjB,EAAa3oB,KAAK,IAAI0oB,MAAM,KAAO,QACrCjjB,EAAM,WACXkjB,EAAa3oB,KAAK,IAAI0oB,KAAKtG,QACvB,SAASwG,cACb,IAAKrD,SAASkD,EAAQzoB,KAAKmD,OAAQ,MAAM8G,WAAW,sBACpD,IAAI9J,EAAIgD,KACJ4lB,EAAI5oB,EAAE6oB,iBACN/oB,EAAIE,EAAE8oB,qBACN5nB,EAAI0nB,EAAI,EAAI,IAAU,KAAJA,EAAW,IAAM,GACvC,OAAO1nB,GAAK,QAAU0C,KAAKmd,IAAI6H,IAAI5gB,MAAM9G,GAAK,GAAK,GACjD,IAAMwnB,EAAG1oB,EAAE+oB,cAAgB,GAAK,IAAML,EAAG1oB,EAAEgpB,cAC3C,IAAMN,EAAG1oB,EAAEipB,eAAiB,IAAMP,EAAG1oB,EAAEkpB,iBACvC,IAAMR,EAAG1oB,EAAEmpB,iBAAmB,KAAW,GAAJrpB,EAASA,EAAI,IAAM4oB,EAAG5oB,IAAM,KACjE0oB,GAKE,SAAU9oB,EAAQD,EAASF,GAGjC,IAAI6E,EAAY7E,EAAoB,IAChCsH,EAAWtH,EAAoB,GACnCG,EAAOD,QAAU,SAAUgE,GACzB,GAAIA,IAAOrE,GAAW,OAAO,EAC7B,IAAIgqB,EAAShlB,EAAUX,GACnBP,EAAS2D,EAASuiB,GACtB,GAAIA,IAAWlmB,EAAQ,MAAM4G,WAAW,iBACxC,OAAO5G,IAMH,SAAUxD,EAAQD,EAASF,GAKjC,IAAImY,EAAUnY,EAAoB,IAC9BiE,EAAWjE,EAAoB,GAC/BsH,EAAWtH,EAAoB,GAC/B8B,EAAM9B,EAAoB,IAC1B8pB,EAAuB9pB,EAAoB,EAApBA,CAAuB,sBAgClDG,EAAOD,QA9BP,SAAS6pB,iBAAiB1mB,EAAQ6Z,EAAU9a,EAAQ4nB,EAAWva,EAAOwa,EAAOC,EAAQC,GAMnF,IALA,IAGIC,EAASC,EAHTC,EAAc7a,EACd8a,EAAc,EACd3P,IAAQsP,GAASpoB,EAAIooB,EAAQC,EAAS,GAGnCI,EAAcP,GAAW,CAC9B,GAAIO,KAAenoB,EAAQ,CASzB,GARAgoB,EAAUxP,EAAQA,EAAMxY,EAAOmoB,GAAcA,EAAarN,GAAY9a,EAAOmoB,GAE7EF,GAAa,EACTpmB,EAASmmB,KAEXC,GADAA,EAAaD,EAAQN,MACOjqB,KAAcwqB,EAAalS,EAAQiS,IAG7DC,GAAsB,EAARJ,EAChBK,EAAcP,iBAAiB1mB,EAAQ6Z,EAAUkN,EAAS9iB,EAAS8iB,EAAQzmB,QAAS2mB,EAAaL,EAAQ,GAAK,MACzG,CACL,GAAmB,kBAAfK,EAAiC,MAAMnmB,YAC3Cd,EAAOinB,GAAeF,EAGxBE,IAEFC,IAEF,OAAOD,IAQH,SAAUnqB,EAAQD,EAASF,GAGjC,IAAIsH,EAAWtH,EAAoB,GAC/B8b,EAAS9b,EAAoB,IAC7BuF,EAAUvF,EAAoB,IAElCG,EAAOD,QAAU,SAAU4G,EAAM0jB,EAAWC,EAAYC,GACtD,IAAI7nB,EAAIwD,OAAOd,EAAQuB,IACnB6jB,EAAe9nB,EAAEc,OACjBinB,EAAUH,IAAe5qB,GAAY,IAAMwG,OAAOokB,GAClDI,EAAevjB,EAASkjB,GAC5B,GAAIK,GAAgBF,GAA2B,IAAXC,EAAe,OAAO/nB,EAC1D,IAAIioB,EAAUD,EAAeF,EACzBI,EAAejP,EAAOxb,KAAKsqB,EAASvmB,KAAKqE,KAAKoiB,EAAUF,EAAQjnB,SAEpE,OAD0BmnB,EAAtBC,EAAapnB,SAAkBonB,EAAeA,EAAatiB,MAAM,EAAGqiB,IACjEJ,EAAOK,EAAeloB,EAAIA,EAAIkoB,IAMjC,SAAU5qB,EAAQD,EAASF,GAEjC,IAAI6W,EAAc7W,EAAoB,GAClCob,EAAUpb,EAAoB,IAC9BiH,EAAYjH,EAAoB,IAChC0b,EAAS1b,EAAoB,IAAImF,EACrChF,EAAOD,QAAU,SAAU8qB,GACzB,OAAO,SAAU9mB,GAOf,IANA,IAKI7B,EALA+C,EAAI6B,EAAU/C,GACd2H,EAAOuP,EAAQhW,GACfzB,EAASkI,EAAKlI,OACdvD,EAAI,EACJkI,EAAS,GAEGlI,EAATuD,GACLtB,EAAMwJ,EAAKzL,KACNyW,IAAe6E,EAAOpb,KAAK8E,EAAG/C,IACjCiG,EAAOC,KAAKyiB,EAAY,CAAC3oB,EAAK+C,EAAE/C,IAAQ+C,EAAE/C,IAG9C,OAAOiG,KAOL,SAAUnI,EAAQD,EAASF,GAGjC,IAAIuJ,EAAUvJ,EAAoB,IAC9B0O,EAAO1O,EAAoB,KAC/BG,EAAOD,QAAU,SAAUsG,GACzB,OAAO,SAASykB,SACd,GAAI1hB,EAAQ9F,OAAS+C,EAAM,MAAMrC,UAAUqC,EAAO,yBAClD,OAAOkI,EAAKjL,SAOV,SAAUtD,EAAQD,EAASF,GAEjC,IAAI2Z,EAAQ3Z,EAAoB,IAEhCG,EAAOD,QAAU,SAAU2S,EAAM/F,GAC/B,IAAIxE,EAAS,GAEb,OADAqR,EAAM9G,GAAM,EAAOvK,EAAOC,KAAMD,EAAQwE,GACjCxE,IAMH,SAAUnI,EAAQD,GAGxBC,EAAOD,QAAUmE,KAAK6mB,OAAS,SAASA,MAAM/O,EAAGgP,EAAOC,EAAQC,EAAQC,GACtE,OACuB,IAArB5nB,UAAUC,QAELwY,GAAKA,GAELgP,GAASA,GAETC,GAAUA,GAEVC,GAAUA,GAEVC,GAAWA,EACT5I,IACLvG,IAAMF,UAAYE,KAAOF,SAAiBE,GACtCA,EAAIgP,IAAUG,EAAUD,IAAWD,EAASD,GAASE,IAMzD,SAAUlrB,EAAQD,EAASF,GAEjC,IAAIuJ,EAAUvJ,EAAoB,IAC9B8M,EAAW9M,EAAoB,EAApBA,CAAuB,YAClCgK,EAAYhK,EAAoB,IACpCG,EAAOD,QAAUF,EAAoB,IAAIurB,WAAa,SAAUrnB,GAC9D,IAAIkB,EAAIvE,OAAOqD,GACf,OAAOkB,EAAE0H,KAAcjN,IAClB,eAAgBuF,GAEhB4E,EAAUvI,eAAe8H,EAAQnE,MAMlC,SAAUjF,EAAQD,EAASF,GAIjC,IAAIwrB,EAAOxrB,EAAoB,KAC3B4d,EAAS5d,EAAoB,IAC7B4G,EAAY5G,EAAoB,IACpCG,EAAOD,QAAU,WAOf,IANA,IAAI2G,EAAKD,EAAUnD,MACfE,EAASD,UAAUC,OACnB8nB,EAAQ,IAAI5gB,MAAMlH,GAClBvD,EAAI,EACJuT,EAAI6X,EAAK7X,EACT+X,GAAS,EACGtrB,EAATuD,IAAiB8nB,EAAMrrB,GAAKsD,UAAUtD,QAAUuT,IAAG+X,GAAS,GACnE,OAAO,WACL,IAII9P,EAHA/M,EAAOnL,UAAUC,OACjBgY,EAAI,EACJH,EAAI,EAER,IAAKkQ,IAAW7c,EAAM,OAAO+O,EAAO/W,EAAI4kB,EAL7BhoB,MAOX,GADAmY,EAAO6P,EAAMhjB,QACTijB,EAAQ,KAAe/P,EAAThY,EAAYgY,IAASC,EAAKD,KAAOhI,IAAGiI,EAAKD,GAAKjY,UAAU8X,MAC1E,KAAcA,EAAP3M,GAAU+M,EAAKrT,KAAK7E,UAAU8X,MACrC,OAAOoC,EAAO/W,EAAI+U,EATPnY,SAgBT,SAAUtD,EAAQD,EAASF,GAEjCG,EAAOD,QAAUF,EAAoB,KAK/B,SAAUG,EAAQD,EAASF,GAEjC,IAAIkF,EAAKlF,EAAoB,GACzBkH,EAAOlH,EAAoB,IAC3BohB,EAAUphB,EAAoB,IAC9BiH,EAAYjH,EAAoB,IAEpCG,EAAOD,QAAU,SAASyrB,OAAOtoB,EAAQuoB,GAKvC,IAJA,IAGIvpB,EAHAwJ,EAAOuV,EAAQna,EAAU2kB,IACzBjoB,EAASkI,EAAKlI,OACdvD,EAAI,EAEQA,EAATuD,GAAYuB,EAAGC,EAAE9B,EAAQhB,EAAMwJ,EAAKzL,KAAM8G,EAAK/B,EAAEymB,EAAOvpB,IAC/D,OAAOgB,IAMH,SAAUlD,EAAQD,EAASF,GAEjCA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBG,EAAOD,QAAUF,EAAoB,MAK/B,SAAUG,EAAQD,EAASF,GAKjC,IAAI4B,EAAS5B,EAAoB,GAC7BgC,EAAMhC,EAAoB,IAC1B6W,EAAc7W,EAAoB,GAClCkC,EAAUlC,EAAoB,GAC9BoY,EAAWpY,EAAoB,IAC/B8T,EAAO9T,EAAoB,IAAI6I,IAC/BgjB,EAAS7rB,EAAoB,GAC7BmT,EAASnT,EAAoB,IAC7BsY,EAAiBtY,EAAoB,IACrC0E,EAAM1E,EAAoB,IAC1B2J,EAAM3J,EAAoB,GAC1Bgb,EAAShb,EAAoB,IAC7B8rB,EAAY9rB,EAAoB,IAChC+rB,EAAW/rB,EAAoB,KAC/BmY,EAAUnY,EAAoB,IAC9B+E,EAAW/E,EAAoB,GAC/BiE,EAAWjE,EAAoB,GAC/B0F,EAAW1F,EAAoB,GAC/BiH,EAAYjH,EAAoB,IAChCiF,EAAcjF,EAAoB,IAClC+G,EAAa/G,EAAoB,IACjCgsB,EAAUhsB,EAAoB,IAC9BisB,EAAUjsB,EAAoB,IAC9BsK,EAAQtK,EAAoB,IAC5BksB,EAAQlsB,EAAoB,IAC5BqK,EAAMrK,EAAoB,GAC1B2U,EAAQ3U,EAAoB,IAC5BkH,EAAOoD,EAAMnF,EACbD,EAAKmF,EAAIlF,EACTsE,EAAOwiB,EAAQ9mB,EACf8V,EAAUrZ,EAAO+C,OACjBwnB,EAAQvqB,EAAOwqB,KACfC,EAAaF,GAASA,EAAMG,UAC5BrqB,EAAY,YACZsqB,EAAS5iB,EAAI,WACb6iB,EAAe7iB,EAAI,eACnB+R,EAAS,GAAG3E,qBACZ0V,EAAiBtZ,EAAO,mBACxBuZ,EAAavZ,EAAO,WACpBwZ,EAAYxZ,EAAO,cACnBvN,EAAc/E,OAAOoB,GACrB2qB,EAA+B,mBAAX3R,KAA2BiR,EAAM/mB,EACrD0nB,EAAUjrB,EAAOirB,QAEjBC,GAAUD,IAAYA,EAAQ5qB,KAAe4qB,EAAQ5qB,GAAW8qB,UAGhEC,EAAgBnW,GAAegV,EAAO,WACxC,OAES,GAFFG,EAAQ9mB,EAAG,GAAI,IAAK,CACzBjE,IAAK,WAAc,OAAOiE,EAAGzB,KAAM,IAAK,CAAE6B,MAAO,IAAK/B,MACpDA,IACD,SAAUW,EAAI7B,EAAKmX,GACtB,IAAIyT,EAAY/lB,EAAKtB,EAAavD,GAC9B4qB,UAAkBrnB,EAAYvD,GAClC6C,EAAGhB,EAAI7B,EAAKmX,GACRyT,GAAa/oB,IAAO0B,GAAaV,EAAGU,EAAavD,EAAK4qB,IACxD/nB,EAEAgoB,EAAO,SAAU/mB,GACnB,IAAIgnB,EAAMT,EAAWvmB,GAAO6lB,EAAQ/Q,EAAQhZ,IAE5C,OADAkrB,EAAI5P,GAAKpX,EACFgnB,GAGLC,EAAWR,GAAyC,iBAApB3R,EAAQrM,SAAuB,SAAU1K,GAC3E,MAAoB,iBAANA,GACZ,SAAUA,GACZ,OAAOA,aAAc+W,GAGnB4B,EAAkB,SAAS/b,eAAeoD,EAAI7B,EAAKmX,GAKrD,OAJItV,IAAO0B,GAAaiX,EAAgB8P,EAAWtqB,EAAKmX,GACxDzU,EAASb,GACT7B,EAAM4C,EAAY5C,GAAK,GACvB0C,EAASyU,GACLxX,EAAI0qB,EAAYrqB,IACbmX,EAAExY,YAIDgB,EAAIkC,EAAIqoB,IAAWroB,EAAGqoB,GAAQlqB,KAAM6B,EAAGqoB,GAAQlqB,IAAO,GAC1DmX,EAAIwS,EAAQxS,EAAG,CAAExY,WAAY+F,EAAW,GAAG,OAJtC/E,EAAIkC,EAAIqoB,IAASrnB,EAAGhB,EAAIqoB,EAAQxlB,EAAW,EAAG,KACnD7C,EAAGqoB,GAAQlqB,IAAO,GAIX2qB,EAAc9oB,EAAI7B,EAAKmX,IACzBtU,EAAGhB,EAAI7B,EAAKmX,IAEnB6T,EAAoB,SAAStI,iBAAiB7gB,EAAInB,GACpDgC,EAASb,GAKT,IAJA,IAGI7B,EAHAwJ,EAAOkgB,EAAShpB,EAAIkE,EAAUlE,IAC9B3C,EAAI,EACJC,EAAIwL,EAAKlI,OAEFvD,EAAJC,GAAOwc,EAAgB3Y,EAAI7B,EAAMwJ,EAAKzL,KAAM2C,EAAEV,IACrD,OAAO6B,GAKLopB,EAAwB,SAASvW,qBAAqB1U,GACxD,IAAIkrB,EAAI7R,EAAOpb,KAAKmD,KAAMpB,EAAM4C,EAAY5C,GAAK,IACjD,QAAIoB,OAASmC,GAAe5D,EAAI0qB,EAAYrqB,KAASL,EAAI2qB,EAAWtqB,QAC7DkrB,IAAMvrB,EAAIyB,KAAMpB,KAASL,EAAI0qB,EAAYrqB,IAAQL,EAAIyB,KAAM8oB,IAAW9oB,KAAK8oB,GAAQlqB,KAAOkrB,IAE/FC,EAA4B,SAASrmB,yBAAyBjD,EAAI7B,GAGpE,GAFA6B,EAAK+C,EAAU/C,GACf7B,EAAM4C,EAAY5C,GAAK,GACnB6B,IAAO0B,IAAe5D,EAAI0qB,EAAYrqB,IAASL,EAAI2qB,EAAWtqB,GAAlE,CACA,IAAImX,EAAItS,EAAKhD,EAAI7B,GAEjB,OADImX,IAAKxX,EAAI0qB,EAAYrqB,IAAUL,EAAIkC,EAAIqoB,IAAWroB,EAAGqoB,GAAQlqB,KAAOmX,EAAExY,YAAa,GAChFwY,IAELiU,GAAuB,SAASxW,oBAAoB/S,GAKtD,IAJA,IAGI7B,EAHAyiB,EAAQrb,EAAKxC,EAAU/C,IACvBoE,EAAS,GACTlI,EAAI,EAEcA,EAAf0kB,EAAMnhB,QACN3B,EAAI0qB,EAAYrqB,EAAMyiB,EAAM1kB,OAASiC,GAAOkqB,GAAUlqB,GAAOyR,GAAMxL,EAAOC,KAAKlG,GACpF,OAAOiG,GAEPolB,GAAyB,SAASxV,sBAAsBhU,GAM1D,IALA,IAII7B,EAJAsrB,EAAQzpB,IAAO0B,EACfkf,EAAQrb,EAAKkkB,EAAQhB,EAAY1lB,EAAU/C,IAC3CoE,EAAS,GACTlI,EAAI,EAEcA,EAAf0kB,EAAMnhB,SACP3B,EAAI0qB,EAAYrqB,EAAMyiB,EAAM1kB,OAAUutB,IAAQ3rB,EAAI4D,EAAavD,IAAciG,EAAOC,KAAKmkB,EAAWrqB,IACxG,OAAOiG,GAINskB,IAYHxU,GAXA6C,EAAU,SAAStW,SACjB,GAAIlB,gBAAgBwX,EAAS,MAAM9W,UAAU,gCAC7C,IAAIgC,EAAMzB,EAAuB,EAAnBhB,UAAUC,OAAaD,UAAU,GAAK7D,IAChDmR,EAAO,SAAU1L,GACf7B,OAASmC,GAAaoL,EAAK1Q,KAAKqsB,EAAWrnB,GAC3CtD,EAAIyB,KAAM8oB,IAAWvqB,EAAIyB,KAAK8oB,GAASpmB,KAAM1C,KAAK8oB,GAAQpmB,IAAO,GACrE6mB,EAAcvpB,KAAM0C,EAAKY,EAAW,EAAGzB,KAGzC,OADIuR,GAAeiW,GAAQE,EAAcpnB,EAAaO,EAAK,CAAEpF,cAAc,EAAM+M,IAAKkD,IAC/Ekc,EAAK/mB,KAEGlE,GAAY,WAAY,SAASuG,WAChD,OAAO/E,KAAK8Z,KAGdjT,EAAMnF,EAAIqoB,EACVnjB,EAAIlF,EAAI0X,EACR7c,EAAoB,IAAImF,EAAI8mB,EAAQ9mB,EAAIsoB,GACxCztB,EAAoB,IAAImF,EAAImoB,EAC5BpB,EAAM/mB,EAAIuoB,GAEN7W,IAAgB7W,EAAoB,KACtCoY,EAASxS,EAAa,uBAAwB0nB,GAAuB,GAGvEtS,EAAO7V,EAAI,SAAUzE,GACnB,OAAOwsB,EAAKvjB,EAAIjJ,MAIpBwB,EAAQA,EAAQS,EAAIT,EAAQiB,EAAIjB,EAAQO,GAAKmqB,EAAY,CAAEjoB,OAAQsW,IAEnE,IAAK,IAAI2S,GAAa,iHAGpBjnB,MAAM,KAAMgV,GAAI,EAAuBA,GAApBiS,GAAWjqB,QAAYgG,EAAIikB,GAAWjS,OAE3D,IAAK,IAAIkS,GAAmBlZ,EAAMhL,EAAIlF,OAAQ+W,GAAI,EAA6BA,GAA1BqS,GAAiBlqB,QAAamoB,EAAU+B,GAAiBrS,OAE9GtZ,EAAQA,EAAQW,EAAIX,EAAQO,GAAKmqB,EAAY,SAAU,CAErDkB,MAAO,SAAUzrB,GACf,OAAOL,EAAIyqB,EAAgBpqB,GAAO,IAC9BoqB,EAAepqB,GACfoqB,EAAepqB,GAAO4Y,EAAQ5Y,IAGpC0rB,OAAQ,SAASA,OAAOZ,GACtB,IAAKC,EAASD,GAAM,MAAMhpB,UAAUgpB,EAAM,qBAC1C,IAAK,IAAI9qB,KAAOoqB,EAAgB,GAAIA,EAAepqB,KAAS8qB,EAAK,OAAO9qB,GAE1E2rB,UAAW,WAAclB,GAAS,GAClCmB,UAAW,WAAcnB,GAAS,KAGpC5qB,EAAQA,EAAQW,EAAIX,EAAQO,GAAKmqB,EAAY,SAAU,CAErD5kB,OA/FY,SAASA,OAAO9D,EAAInB,GAChC,OAAOA,IAAMlD,GAAYmsB,EAAQ9nB,GAAMmpB,EAAkBrB,EAAQ9nB,GAAKnB,IAgGtEjC,eAAgB+b,EAEhBkI,iBAAkBsI,EAElBlmB,yBAA0BqmB,EAE1BvW,oBAAqBwW,GAErBvV,sBAAuBwV,KAKzB,IAAIQ,GAAsBrC,EAAO,WAAcK,EAAM/mB,EAAE,KAEvDjD,EAAQA,EAAQW,EAAIX,EAAQO,EAAIyrB,GAAqB,SAAU,CAC7DhW,sBAAuB,SAASA,sBAAsBhU,GACpD,OAAOgoB,EAAM/mB,EAAEO,EAASxB,OAK5BioB,GAASjqB,EAAQA,EAAQW,EAAIX,EAAQO,IAAMmqB,GAAcf,EAAO,WAC9D,IAAIhpB,EAAIoY,IAIR,MAA0B,UAAnBoR,EAAW,CAACxpB,KAA2C,MAAxBwpB,EAAW,CAAE9oB,EAAGV,KAAyC,MAAzBwpB,EAAWxrB,OAAOgC,OACrF,OAAQ,CACXypB,UAAW,SAASA,UAAUpoB,GAI5B,IAHA,IAEI0gB,EAAUuJ,EAFVvS,EAAO,CAAC1X,GACR9D,EAAI,EAEkBA,EAAnBsD,UAAUC,QAAYiY,EAAKrT,KAAK7E,UAAUtD,MAEjD,GADA+tB,EAAYvJ,EAAWhJ,EAAK,IACvB3X,EAAS2gB,IAAa1gB,IAAOrE,MAAautB,EAASlpB,GAMxD,OALKiU,EAAQyM,KAAWA,EAAW,SAAUviB,EAAKiD,GAEhD,GADwB,mBAAb6oB,IAAyB7oB,EAAQ6oB,EAAU7tB,KAAKmD,KAAMpB,EAAKiD,KACjE8nB,EAAS9nB,GAAQ,OAAOA,IAE/BsW,EAAK,GAAKgJ,EACHyH,EAAWzoB,MAAMuoB,EAAOvQ,MAKnCX,EAAQhZ,GAAWuqB,IAAiBxsB,EAAoB,GAApBA,CAAwBib,EAAQhZ,GAAYuqB,EAAcvR,EAAQhZ,GAAW2R,SAEjH0E,EAAe2C,EAAS,UAExB3C,EAAejU,KAAM,QAAQ,GAE7BiU,EAAe1W,EAAOwqB,KAAM,QAAQ,IAK9B,SAAUjsB,EAAQD,EAASF,GAGjC,IAAIob,EAAUpb,EAAoB,IAC9Bqb,EAAOrb,EAAoB,IAC3BgH,EAAMhH,EAAoB,IAC9BG,EAAOD,QAAU,SAAUgE,GACzB,IAAIoE,EAAS8S,EAAQlX,GACjBuX,EAAaJ,EAAKlW,EACtB,GAAIsW,EAKF,IAJA,IAGIpZ,EAHA+rB,EAAU3S,EAAWvX,GACrBwX,EAAS1U,EAAI7B,EACb/E,EAAI,EAEgBA,EAAjBguB,EAAQzqB,QAAgB+X,EAAOpb,KAAK4D,EAAI7B,EAAM+rB,EAAQhuB,OAAOkI,EAAOC,KAAKlG,GAChF,OAAOiG,IAML,SAAUnI,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAIX,EAAQO,GAAKzC,EAAoB,GAAI,SAAU,CAAEc,eAAgBd,EAAoB,GAAGmF,KAKtG,SAAUhF,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAIX,EAAQO,GAAKzC,EAAoB,GAAI,SAAU,CAAE+kB,iBAAkB/kB,EAAoB,OAKrG,SAAUG,EAAQD,EAASF,GAGjC,IAAIiH,EAAYjH,EAAoB,IAChCwtB,EAA4BxtB,EAAoB,IAAImF,EAExDnF,EAAoB,GAApBA,CAAwB,2BAA4B,WAClD,OAAO,SAASmH,yBAAyBjD,EAAI7B,GAC3C,OAAOmrB,EAA0BvmB,EAAU/C,GAAK7B,OAO9C,SAAUlC,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,SAAU,CAAEmF,OAAQhI,EAAoB,OAKrD,SAAUG,EAAQD,EAASF,GAGjC,IAAI0F,EAAW1F,EAAoB,GAC/BquB,EAAkBruB,EAAoB,IAE1CA,EAAoB,GAApBA,CAAwB,iBAAkB,WACxC,OAAO,SAAS6F,eAAe3B,GAC7B,OAAOmqB,EAAgB3oB,EAASxB,QAO9B,SAAU/D,EAAQD,EAASF,GAGjC,IAAI0F,EAAW1F,EAAoB,GAC/B2U,EAAQ3U,EAAoB,IAEhCA,EAAoB,GAApBA,CAAwB,OAAQ,WAC9B,OAAO,SAAS6L,KAAK3H,GACnB,OAAOyQ,EAAMjP,EAASxB,QAOpB,SAAU/D,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,sBAAuB,WAC7C,OAAOA,EAAoB,IAAImF,KAM3B,SAAUhF,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAC/BsU,EAAOtU,EAAoB,IAAI0U,SAEnC1U,EAAoB,GAApBA,CAAwB,SAAU,SAAUsuB,GAC1C,OAAO,SAASC,OAAOrqB,GACrB,OAAOoqB,GAAWrqB,EAASC,GAAMoqB,EAAQha,EAAKpQ,IAAOA,MAOnD,SAAU/D,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAC/BsU,EAAOtU,EAAoB,IAAI0U,SAEnC1U,EAAoB,GAApBA,CAAwB,OAAQ,SAAUwuB,GACxC,OAAO,SAASC,KAAKvqB,GACnB,OAAOsqB,GAASvqB,EAASC,GAAMsqB,EAAMla,EAAKpQ,IAAOA,MAO/C,SAAU/D,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAC/BsU,EAAOtU,EAAoB,IAAI0U,SAEnC1U,EAAoB,GAApBA,CAAwB,oBAAqB,SAAU0uB,GACrD,OAAO,SAASva,kBAAkBjQ,GAChC,OAAOwqB,GAAsBzqB,EAASC,GAAMwqB,EAAmBpa,EAAKpQ,IAAOA,MAOzE,SAAU/D,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAEnCA,EAAoB,GAApBA,CAAwB,WAAY,SAAU2uB,GAC5C,OAAO,SAASC,SAAS1qB,GACvB,OAAOD,EAASC,MAAMyqB,GAAYA,EAAUzqB,OAO1C,SAAU/D,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAEnCA,EAAoB,GAApBA,CAAwB,WAAY,SAAU6uB,GAC5C,OAAO,SAASC,SAAS5qB,GACvB,OAAOD,EAASC,MAAM2qB,GAAYA,EAAU3qB,OAO1C,SAAU/D,EAAQD,EAASF,GAGjC,IAAIiE,EAAWjE,EAAoB,GAEnCA,EAAoB,GAApBA,CAAwB,eAAgB,SAAU+uB,GAChD,OAAO,SAAS9a,aAAa/P,GAC3B,QAAOD,EAASC,MAAM6qB,GAAgBA,EAAc7qB,QAOlD,SAAU/D,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAIX,EAAQO,EAAG,SAAU,CAAE8Y,OAAQvb,EAAoB,OAKjE,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAClCkC,EAAQA,EAAQW,EAAG,SAAU,CAAEiY,GAAI9a,EAAoB,QAKjD,SAAUG,EAAQD,GAGxBC,EAAOD,QAAUW,OAAOia,IAAM,SAASA,GAAGqB,EAAGkN,GAE3C,OAAOlN,IAAMkN,EAAU,IAANlN,GAAW,EAAIA,GAAM,EAAIkN,EAAIlN,GAAKA,GAAKkN,GAAKA,IAMzD,SAAUlpB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAClCkC,EAAQA,EAAQW,EAAG,SAAU,CAAEsiB,eAAgBnlB,EAAoB,IAAI8N,OAKjE,SAAU3N,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQa,EAAG,WAAY,CAAEwiB,KAAMvlB,EAAoB,OAKrD,SAAUG,EAAQD,EAASF,GAIjC,IAAIiE,EAAWjE,EAAoB,GAC/B6F,EAAiB7F,EAAoB,IACrCgvB,EAAehvB,EAAoB,EAApBA,CAAuB,eACtCivB,EAAgBprB,SAASrC,UAEvBwtB,KAAgBC,GAAgBjvB,EAAoB,GAAGmF,EAAE8pB,EAAeD,EAAc,CAAE1pB,MAAO,SAAUF,GAC7G,GAAmB,mBAAR3B,OAAuBQ,EAASmB,GAAI,OAAO,EACtD,IAAKnB,EAASR,KAAKjC,WAAY,OAAO4D,aAAa3B,KAEnD,KAAO2B,EAAIS,EAAeT,IAAI,GAAI3B,KAAKjC,YAAc4D,EAAG,OAAO,EAC/D,OAAO,MAMH,SAAUjF,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6E,EAAY7E,EAAoB,IAChCkvB,EAAelvB,EAAoB,IACnC8b,EAAS9b,EAAoB,IAC7BmvB,EAAW,GAAIC,QACfzmB,EAAQtE,KAAKsE,MACbyJ,EAAO,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GACvBid,EAAQ,wCAGRC,EAAW,SAAUpuB,EAAGV,GAG1B,IAFA,IAAIJ,GAAK,EACLmvB,EAAK/uB,IACAJ,EAAI,GAEXgS,EAAKhS,IADLmvB,GAAMruB,EAAIkR,EAAKhS,IACA,IACfmvB,EAAK5mB,EAAM4mB,EAAK,MAGhBC,EAAS,SAAUtuB,GAGrB,IAFA,IAAId,EAAI,EACJI,EAAI,EACM,KAALJ,GAEPgS,EAAKhS,GAAKuI,GADVnI,GAAK4R,EAAKhS,IACUc,GACpBV,EAAKA,EAAIU,EAAK,KAGduuB,EAAc,WAGhB,IAFA,IAAIrvB,EAAI,EACJuB,EAAI,GACM,KAALvB,GACP,GAAU,KAANuB,GAAkB,IAANvB,GAAuB,IAAZgS,EAAKhS,GAAU,CACxC,IAAIsvB,EAAIrpB,OAAO+L,EAAKhS,IACpBuB,EAAU,KAANA,EAAW+tB,EAAI/tB,EAAIma,EAAOxb,KA1BzB,IA0BoC,EAAIovB,EAAE/rB,QAAU+rB,EAE3D,OAAO/tB,GAEP8f,EAAM,SAAUtF,EAAGjb,EAAGyuB,GACxB,OAAa,IAANzuB,EAAUyuB,EAAMzuB,EAAI,GAAM,EAAIugB,EAAItF,EAAGjb,EAAI,EAAGyuB,EAAMxT,GAAKsF,EAAItF,EAAIA,EAAGjb,EAAI,EAAGyuB,IAelFztB,EAAQA,EAAQa,EAAIb,EAAQO,KAAO0sB,IACV,UAAvB,KAAQC,QAAQ,IACG,MAAnB,GAAIA,QAAQ,IACS,SAArB,MAAMA,QAAQ,IACuB,yBAArC,mBAAsBA,QAAQ,MAC1BpvB,EAAoB,EAApBA,CAAuB,WAE3BmvB,EAAS7uB,KAAK,OACX,SAAU,CACb8uB,QAAS,SAASA,QAAQQ,GACxB,IAIIprB,EAAGqrB,EAAGlU,EAAGH,EAJTW,EAAI+S,EAAazrB,KAAM4rB,GACvBlqB,EAAIN,EAAU+qB,GACdjuB,EAAI,GACJpB,EA3DG,IA6DP,GAAI4E,EAAI,GAAS,GAAJA,EAAQ,MAAMoF,WAAW8kB,GAEtC,GAAIlT,GAAKA,EAAG,MAAO,MACnB,GAAIA,IAAM,MAAa,MAALA,EAAW,OAAO9V,OAAO8V,GAK3C,GAJIA,EAAI,IACNxa,EAAI,IACJwa,GAAKA,GAEC,MAAJA,EAKF,GAHA0T,GADArrB,EArCI,SAAU2X,GAGlB,IAFA,IAAIjb,EAAI,EACJ4uB,EAAK3T,EACI,MAAN2T,GACL5uB,GAAK,GACL4uB,GAAM,KAER,KAAa,GAANA,GACL5uB,GAAK,EACL4uB,GAAM,EACN,OAAO5uB,EA2BDwgB,CAAIvF,EAAIsF,EAAI,EAAG,GAAI,IAAM,IACrB,EAAItF,EAAIsF,EAAI,GAAIjd,EAAG,GAAK2X,EAAIsF,EAAI,EAAGjd,EAAG,GAC9CqrB,GAAK,iBAEG,GADRrrB,EAAI,GAAKA,GACE,CAGT,IAFA8qB,EAAS,EAAGO,GACZlU,EAAIxW,EACQ,GAALwW,GACL2T,EAAS,IAAK,GACd3T,GAAK,EAIP,IAFA2T,EAAS7N,EAAI,GAAI9F,EAAG,GAAI,GACxBA,EAAInX,EAAI,EACI,IAALmX,GACL6T,EAAO,GAAK,IACZ7T,GAAK,GAEP6T,EAAO,GAAK7T,GACZ2T,EAAS,EAAG,GACZE,EAAO,GACPjvB,EAAIkvB,SAEJH,EAAS,EAAGO,GACZP,EAAS,IAAM9qB,EAAG,GAClBjE,EAAIkvB,IAAgB3T,EAAOxb,KA9FxB,IA8FmC6E,GAQxC,OAHA5E,EAFM,EAAJ4E,EAEExD,IADJ6Z,EAAIjb,EAAEoD,SACQwB,EAAI,KAAO2W,EAAOxb,KAnG3B,IAmGsC6E,EAAIqW,GAAKjb,EAAIA,EAAEkI,MAAM,EAAG+S,EAAIrW,GAAK,IAAM5E,EAAEkI,MAAM+S,EAAIrW,IAE1FxD,EAAIpB,MAQR,SAAUJ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6rB,EAAS7rB,EAAoB,GAC7BkvB,EAAelvB,EAAoB,IACnC+vB,EAAe,GAAIC,YAEvB9tB,EAAQA,EAAQa,EAAIb,EAAQO,GAAKopB,EAAO,WAEtC,MAA2C,MAApCkE,EAAazvB,KAAK,EAAGT,QACvBgsB,EAAO,WAEZkE,EAAazvB,KAAK,OACf,SAAU,CACb0vB,YAAa,SAASA,YAAYC,GAChC,IAAInpB,EAAOooB,EAAazrB,KAAM,6CAC9B,OAAOwsB,IAAcpwB,GAAYkwB,EAAazvB,KAAKwG,GAAQipB,EAAazvB,KAAKwG,EAAMmpB,OAOjF,SAAU9vB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,SAAU,CAAE0jB,QAASliB,KAAKod,IAAI,GAAI,OAK/C,SAAUthB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BkwB,EAAYlwB,EAAoB,GAAG6lB,SAEvC3jB,EAAQA,EAAQW,EAAG,SAAU,CAC3BgjB,SAAU,SAASA,SAAS3hB,GAC1B,MAAoB,iBAANA,GAAkBgsB,EAAUhsB,OAOxC,SAAU/D,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,SAAU,CAAE+iB,UAAW5lB,EAAoB,OAKxD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,SAAU,CAC3B+F,MAAO,SAASA,MAAMihB,GAEpB,OAAOA,GAAUA,MAOf,SAAU1pB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B4lB,EAAY5lB,EAAoB,IAChCwhB,EAAMnd,KAAKmd,IAEftf,EAAQA,EAAQW,EAAG,SAAU,CAC3BstB,cAAe,SAASA,cAActG,GACpC,OAAOjE,EAAUiE,IAAWrI,EAAIqI,IAAW,qBAOzC,SAAU1pB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,SAAU,CAAEutB,iBAAkB,oBAK3C,SAAUjwB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,SAAU,CAAEwtB,kBAAmB,oBAK5C,SAAUlwB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B8lB,EAAc9lB,EAAoB,IAEtCkC,EAAQA,EAAQW,EAAIX,EAAQO,GAAK6tB,OAAOvK,YAAcD,GAAc,SAAU,CAAEC,WAAYD,KAKtF,SAAU3lB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9BimB,EAAYjmB,EAAoB,KAEpCkC,EAAQA,EAAQW,EAAIX,EAAQO,GAAK6tB,OAAOpK,UAAYD,GAAY,SAAU,CAAEC,SAAUD,KAKhF,SAAU9lB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9BimB,EAAYjmB,EAAoB,KAEpCkC,EAAQA,EAAQS,EAAIT,EAAQO,GAAKyjB,UAAYD,GAAY,CAAEC,SAAUD,KAK/D,SAAU9lB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B8lB,EAAc9lB,EAAoB,IAEtCkC,EAAQA,EAAQS,EAAIT,EAAQO,GAAKsjB,YAAcD,GAAc,CAAEC,WAAYD,KAKrE,SAAU3lB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BsmB,EAAQtmB,EAAoB,KAC5BuwB,EAAOlsB,KAAKksB,KACZC,EAASnsB,KAAKosB,MAElBvuB,EAAQA,EAAQW,EAAIX,EAAQO,IAAM+tB,GAEW,KAAxCnsB,KAAKsE,MAAM6nB,EAAOF,OAAOI,aAEzBF,EAAOvU,WAAaA,UACtB,OAAQ,CACTwU,MAAO,SAASA,MAAMtU,GACpB,OAAQA,GAAKA,GAAK,EAAIuG,IAAU,kBAAJvG,EACxB9X,KAAKqd,IAAIvF,GAAK9X,KAAKsd,IACnB2E,EAAMnK,EAAI,EAAIoU,EAAKpU,EAAI,GAAKoU,EAAKpU,EAAI,QAOvC,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B2wB,EAAStsB,KAAKusB,MAOlB1uB,EAAQA,EAAQW,EAAIX,EAAQO,IAAMkuB,GAA0B,EAAhB,EAAIA,EAAO,IAAS,OAAQ,CAAEC,MAL1E,SAASA,MAAMzU,GACb,OAAQ0J,SAAS1J,GAAKA,IAAW,GAALA,EAAaA,EAAI,GAAKyU,OAAOzU,GAAK9X,KAAKqd,IAAIvF,EAAI9X,KAAKksB,KAAKpU,EAAIA,EAAI,IAAxDA,MASjC,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B6wB,EAASxsB,KAAKysB,MAGlB5uB,EAAQA,EAAQW,EAAIX,EAAQO,IAAMouB,GAAU,EAAIA,GAAQ,GAAK,GAAI,OAAQ,CACvEC,MAAO,SAASA,MAAM3U,GACpB,OAAmB,IAAXA,GAAKA,GAAUA,EAAI9X,KAAKqd,KAAK,EAAIvF,IAAM,EAAIA,IAAM,MAOvD,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bkc,EAAOlc,EAAoB,IAE/BkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBkuB,KAAM,SAASA,KAAK5U,GAClB,OAAOD,EAAKC,GAAKA,GAAK9X,KAAKod,IAAIpd,KAAKmd,IAAIrF,GAAI,EAAI,OAO9C,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBmuB,MAAO,SAASA,MAAM7U,GACpB,OAAQA,KAAO,GAAK,GAAK9X,KAAKsE,MAAMtE,KAAKqd,IAAIvF,EAAI,IAAO9X,KAAK4sB,OAAS,OAOpE,SAAU9wB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B8I,EAAMzE,KAAKyE,IAEf5G,EAAQA,EAAQW,EAAG,OAAQ,CACzBquB,KAAM,SAASA,KAAK/U,GAClB,OAAQrT,EAAIqT,GAAKA,GAAKrT,GAAKqT,IAAM,MAO/B,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Boc,EAASpc,EAAoB,IAEjCkC,EAAQA,EAAQW,EAAIX,EAAQO,GAAK2Z,GAAU/X,KAAKgY,OAAQ,OAAQ,CAAEA,MAAOD,KAKnE,SAAUjc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAE8jB,OAAQ3mB,EAAoB,QAKnD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BwhB,EAAMnd,KAAKmd,IAEftf,EAAQA,EAAQW,EAAG,OAAQ,CACzBsuB,MAAO,SAASA,MAAMC,EAAQC,GAM5B,IALA,IAIIhqB,EAAKiqB,EAJLC,EAAM,EACNnxB,EAAI,EACJyO,EAAOnL,UAAUC,OACjB6tB,EAAO,EAEJpxB,EAAIyO,GAEL2iB,GADJnqB,EAAMma,EAAI9d,UAAUtD,QAGlBmxB,EAAMA,GADND,EAAME,EAAOnqB,GACKiqB,EAAM,EACxBE,EAAOnqB,GAGPkqB,GAFe,EAANlqB,GACTiqB,EAAMjqB,EAAMmqB,GACCF,EACDjqB,EAEhB,OAAOmqB,IAASvV,SAAWA,SAAWuV,EAAOntB,KAAKksB,KAAKgB,OAOrD,SAAUpxB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9ByxB,EAAQptB,KAAKqtB,KAGjBxvB,EAAQA,EAAQW,EAAIX,EAAQO,EAAIzC,EAAoB,EAApBA,CAAuB,WACrD,OAAgC,GAAzByxB,EAAM,WAAY,IAA4B,GAAhBA,EAAM9tB,SACzC,OAAQ,CACV+tB,KAAM,SAASA,KAAKvV,EAAGkN,GACrB,IAAIsI,EAAS,MACTC,GAAMzV,EACN0V,GAAMxI,EACNyI,EAAKH,EAASC,EACdG,EAAKJ,EAASE,EAClB,OAAO,EAAIC,EAAKC,IAAOJ,EAASC,IAAO,IAAMG,EAAKD,GAAMH,EAASE,IAAO,KAAO,KAAO,OAOpF,SAAU1xB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBmvB,MAAO,SAASA,MAAM7V,GACpB,OAAO9X,KAAKqd,IAAIvF,GAAK9X,KAAK4tB,WAOxB,SAAU9xB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAEyjB,MAAOtmB,EAAoB,QAKlD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBqvB,KAAM,SAASA,KAAK/V,GAClB,OAAO9X,KAAKqd,IAAIvF,GAAK9X,KAAKsd,QAOxB,SAAUxhB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAEqZ,KAAMlc,EAAoB,OAKjD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bqc,EAAQrc,EAAoB,IAC5B8I,EAAMzE,KAAKyE,IAGf5G,EAAQA,EAAQW,EAAIX,EAAQO,EAAIzC,EAAoB,EAApBA,CAAuB,WACrD,OAA8B,QAAtBqE,KAAK8tB,MAAM,SACjB,OAAQ,CACVA,KAAM,SAASA,KAAKhW,GAClB,OAAO9X,KAAKmd,IAAIrF,GAAKA,GAAK,GACrBE,EAAMF,GAAKE,GAAOF,IAAM,GACxBrT,EAAIqT,EAAI,GAAKrT,GAAKqT,EAAI,KAAO9X,KAAKkpB,EAAI,OAOzC,SAAUptB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bqc,EAAQrc,EAAoB,IAC5B8I,EAAMzE,KAAKyE,IAEf5G,EAAQA,EAAQW,EAAG,OAAQ,CACzBuvB,KAAM,SAASA,KAAKjW,GAClB,IAAI5Y,EAAI8Y,EAAMF,GAAKA,GACf3Y,EAAI6Y,GAAOF,GACf,OAAO5Y,GAAK0Y,SAAW,EAAIzY,GAAKyY,UAAY,GAAK1Y,EAAIC,IAAMsF,EAAIqT,GAAKrT,GAAKqT,QAOvE,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBwvB,MAAO,SAASA,MAAMnuB,GACpB,OAAa,EAALA,EAASG,KAAKsE,MAAQtE,KAAKqE,MAAMxE,OAOvC,SAAU/D,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9BsJ,EAAkBtJ,EAAoB,IACtCsyB,EAAejsB,OAAOisB,aACtBC,EAAiBlsB,OAAOmsB,cAG5BtwB,EAAQA,EAAQW,EAAIX,EAAQO,KAAO8vB,GAA2C,GAAzBA,EAAe5uB,QAAc,SAAU,CAE1F6uB,cAAe,SAASA,cAAcrW,GAKpC,IAJA,IAGIsW,EAHArqB,EAAM,GACNyG,EAAOnL,UAAUC,OACjBvD,EAAI,EAEMA,EAAPyO,GAAU,CAEf,GADA4jB,GAAQ/uB,UAAUtD,KACdkJ,EAAgBmpB,EAAM,WAAcA,EAAM,MAAMloB,WAAWkoB,EAAO,8BACtErqB,EAAIG,KAAKkqB,EAAO,MACZH,EAAaG,GACbH,EAAyC,QAA1BG,GAAQ,QAAY,IAAcA,EAAO,KAAQ,QAEpE,OAAOrqB,EAAImE,KAAK,QAOhB,SAAUpM,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9BiH,EAAYjH,EAAoB,IAChCsH,EAAWtH,EAAoB,GAEnCkC,EAAQA,EAAQW,EAAG,SAAU,CAE3B6vB,IAAK,SAASA,IAAIC,GAMhB,IALA,IAAIC,EAAM3rB,EAAU0rB,EAASD,KACzBvhB,EAAM7J,EAASsrB,EAAIjvB,QACnBkL,EAAOnL,UAAUC,OACjByE,EAAM,GACNhI,EAAI,EACKA,EAAN+Q,GACL/I,EAAIG,KAAKlC,OAAOusB,EAAIxyB,OAChBA,EAAIyO,GAAMzG,EAAIG,KAAKlC,OAAO3C,UAAUtD,KACxC,OAAOgI,EAAImE,KAAK,QAOhB,SAAUpM,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,OAAQ,SAAUgmB,GACxC,OAAO,SAAStO,OACd,OAAOsO,EAAMviB,KAAM,OAOjB,SAAUtD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6yB,EAAM7yB,EAAoB,GAApBA,EAAwB,GAClCkC,EAAQA,EAAQa,EAAG,SAAU,CAE3B+vB,YAAa,SAASA,YAAYvW,GAChC,OAAOsW,EAAIpvB,KAAM8Y,OAOf,SAAUpc,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BsH,EAAWtH,EAAoB,GAC/B+yB,EAAU/yB,EAAoB,IAC9BgzB,EAAY,WACZC,EAAY,GAAGD,GAEnB9wB,EAAQA,EAAQa,EAAIb,EAAQO,EAAIzC,EAAoB,GAApBA,CAAwBgzB,GAAY,SAAU,CAC5EE,SAAU,SAASA,SAASxW,GAC1B,IAAI5V,EAAOisB,EAAQtvB,KAAMiZ,EAAcsW,GACnCG,EAAiC,EAAnBzvB,UAAUC,OAAaD,UAAU,GAAK7D,GACpDsR,EAAM7J,EAASR,EAAKnD,QACpBiN,EAAMuiB,IAAgBtzB,GAAYsR,EAAM9M,KAAKS,IAAIwC,EAAS6rB,GAAchiB,GACxEiiB,EAAS/sB,OAAOqW,GACpB,OAAOuW,EACHA,EAAU3yB,KAAKwG,EAAMssB,EAAQxiB,GAC7B9J,EAAK2B,MAAMmI,EAAMwiB,EAAOzvB,OAAQiN,KAASwiB,MAO3C,SAAUjzB,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B+yB,EAAU/yB,EAAoB,IAC9BqzB,EAAW,WAEfnxB,EAAQA,EAAQa,EAAIb,EAAQO,EAAIzC,EAAoB,GAApBA,CAAwBqzB,GAAW,SAAU,CAC3EljB,SAAU,SAASA,SAASuM,GAC1B,SAAUqW,EAAQtvB,KAAMiZ,EAAc2W,GACnCpjB,QAAQyM,EAAiC,EAAnBhZ,UAAUC,OAAaD,UAAU,GAAK7D,QAO7D,SAAUM,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQa,EAAG,SAAU,CAE3B+Y,OAAQ9b,EAAoB,OAMxB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BsH,EAAWtH,EAAoB,GAC/B+yB,EAAU/yB,EAAoB,IAC9BszB,EAAc,aACdC,EAAc,GAAGD,GAErBpxB,EAAQA,EAAQa,EAAIb,EAAQO,EAAIzC,EAAoB,GAApBA,CAAwBszB,GAAc,SAAU,CAC9EE,WAAY,SAASA,WAAW9W,GAC9B,IAAI5V,EAAOisB,EAAQtvB,KAAMiZ,EAAc4W,GACnCjrB,EAAQf,EAASjD,KAAKS,IAAuB,EAAnBpB,UAAUC,OAAaD,UAAU,GAAK7D,GAAWiH,EAAKnD,SAChFyvB,EAAS/sB,OAAOqW,GACpB,OAAO6W,EACHA,EAAYjzB,KAAKwG,EAAMssB,EAAQ/qB,GAC/BvB,EAAK2B,MAAMJ,EAAOA,EAAQ+qB,EAAOzvB,UAAYyvB,MAO/C,SAAUjzB,EAAQD,EAASF,GAIjC,IAAI6yB,EAAM7yB,EAAoB,GAApBA,EAAwB,GAGlCA,EAAoB,GAApBA,CAAwBqG,OAAQ,SAAU,SAAUgX,GAClD5Z,KAAK+S,GAAKnQ,OAAOgX,GACjB5Z,KAAK6Z,GAAK,GAET,WACD,IAEImW,EAFAruB,EAAI3B,KAAK+S,GACTnO,EAAQ5E,KAAK6Z,GAEjB,OAAalY,EAAEzB,QAAX0E,EAA0B,CAAE/C,MAAOzF,GAAWqP,MAAM,IACxDukB,EAAQZ,EAAIztB,EAAGiD,GACf5E,KAAK6Z,IAAMmW,EAAM9vB,OACV,CAAE2B,MAAOmuB,EAAOvkB,MAAM,OAMzB,SAAU/O,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,SAAU,SAAUiG,GAC1C,OAAO,SAASytB,OAAOhzB,GACrB,OAAOuF,EAAWxC,KAAM,IAAK,OAAQ/C,OAOnC,SAAUP,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,MAAO,SAAUiG,GACvC,OAAO,SAAS0tB,MACd,OAAO1tB,EAAWxC,KAAM,MAAO,GAAI,QAOjC,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,QAAS,SAAUiG,GACzC,OAAO,SAAS2tB,QACd,OAAO3tB,EAAWxC,KAAM,QAAS,GAAI,QAOnC,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,OAAQ,SAAUiG,GACxC,OAAO,SAAS4tB,OACd,OAAO5tB,EAAWxC,KAAM,IAAK,GAAI,QAO/B,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,QAAS,SAAUiG,GACzC,OAAO,SAAS6tB,QACd,OAAO7tB,EAAWxC,KAAM,KAAM,GAAI,QAOhC,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,YAAa,SAAUiG,GAC7C,OAAO,SAAS8tB,UAAUC,GACxB,OAAO/tB,EAAWxC,KAAM,OAAQ,QAASuwB,OAOvC,SAAU7zB,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,WAAY,SAAUiG,GAC5C,OAAO,SAASguB,SAAS/Z,GACvB,OAAOjU,EAAWxC,KAAM,OAAQ,OAAQyW,OAOtC,SAAU/Z,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,UAAW,SAAUiG,GAC3C,OAAO,SAASiuB,UACd,OAAOjuB,EAAWxC,KAAM,IAAK,GAAI,QAO/B,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,OAAQ,SAAUiG,GACxC,OAAO,SAASkuB,KAAKC,GACnB,OAAOnuB,EAAWxC,KAAM,IAAK,OAAQ2wB,OAOnC,SAAUj0B,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,QAAS,SAAUiG,GACzC,OAAO,SAASouB,QACd,OAAOpuB,EAAWxC,KAAM,QAAS,GAAI,QAOnC,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,SAAU,SAAUiG,GAC1C,OAAO,SAASquB,SACd,OAAOruB,EAAWxC,KAAM,SAAU,GAAI,QAOpC,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,MAAO,SAAUiG,GACvC,OAAO,SAASsuB,MACd,OAAOtuB,EAAWxC,KAAM,MAAO,GAAI,QAOjC,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,MAAO,SAAUiG,GACvC,OAAO,SAASuuB,MACd,OAAOvuB,EAAWxC,KAAM,MAAO,GAAI,QAOjC,SAAUtD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,QAAS,CAAEsV,QAASnY,EAAoB,OAKrD,SAAUG,EAAQD,EAASF,GAIjC,IAAI8B,EAAM9B,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9B0F,EAAW1F,EAAoB,GAC/BM,EAAON,EAAoB,KAC3BwJ,EAAcxJ,EAAoB,IAClCsH,EAAWtH,EAAoB,GAC/By0B,EAAiBz0B,EAAoB,IACrC0J,EAAY1J,EAAoB,IAEpCkC,EAAQA,EAAQW,EAAIX,EAAQO,GAAKzC,EAAoB,GAApBA,CAAwB,SAAU6S,GAAQhI,MAAM6D,KAAKmE,KAAW,QAAS,CAExGnE,KAAM,SAASA,KAAKuC,GAClB,IAOItN,EAAQ2E,EAAQqG,EAAMC,EAPtBxJ,EAAIM,EAASuL,GACb3N,EAAmB,mBAARG,KAAqBA,KAAOoH,MACvCgE,EAAOnL,UAAUC,OACjBmL,EAAe,EAAPD,EAAWnL,UAAU,GAAK7D,GAClCkP,EAAUD,IAAUjP,GACpBwI,EAAQ,EACR2G,EAAStF,EAAUtE,GAIvB,GAFI2J,IAASD,EAAQhN,EAAIgN,EAAc,EAAPD,EAAWnL,UAAU,GAAK7D,GAAW,IAEjEmP,GAAUnP,IAAeyD,GAAKuH,OAASrB,EAAYwF,GAMrD,IAAK1G,EAAS,IAAIhF,EADlBK,EAAS2D,EAASlC,EAAEzB,SACkB0E,EAAT1E,EAAgB0E,IAC3CosB,EAAensB,EAAQD,EAAO0G,EAAUD,EAAM1J,EAAEiD,GAAQA,GAASjD,EAAEiD,SANrE,IAAKuG,EAAWI,EAAO1O,KAAK8E,GAAIkD,EAAS,IAAIhF,IAAOqL,EAAOC,EAASK,QAAQC,KAAM7G,IAChFosB,EAAensB,EAAQD,EAAO0G,EAAUzO,EAAKsO,EAAUE,EAAO,CAACH,EAAKrJ,MAAO+C,IAAQ,GAAQsG,EAAKrJ,OASpG,OADAgD,EAAO3E,OAAS0E,EACTC,MAOL,SAAUnI,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9By0B,EAAiBz0B,EAAoB,IAGzCkC,EAAQA,EAAQW,EAAIX,EAAQO,EAAIzC,EAAoB,EAApBA,CAAuB,WACrD,SAASyC,KACT,QAASoI,MAAMuE,GAAG9O,KAAKmC,aAAcA,KACnC,QAAS,CAEX2M,GAAI,SAASA,KAIX,IAHA,IAAI/G,EAAQ,EACRwG,EAAOnL,UAAUC,OACjB2E,EAAS,IAAoB,mBAAR7E,KAAqBA,KAAOoH,OAAOgE,GAC9CxG,EAAPwG,GAAc4lB,EAAensB,EAAQD,EAAO3E,UAAU2E,MAE7D,OADAC,EAAO3E,OAASkL,EACTvG,MAOL,SAAUnI,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BiH,EAAYjH,EAAoB,IAChCsM,EAAY,GAAGC,KAGnBrK,EAAQA,EAAQa,EAAIb,EAAQO,GAAKzC,EAAoB,KAAOa,SAAWb,EAAoB,GAApBA,CAAwBsM,IAAa,QAAS,CACnHC,KAAM,SAASA,KAAK6D,GAClB,OAAO9D,EAAUhM,KAAK2G,EAAUxD,MAAO2M,IAAcvQ,GAAY,IAAMuQ,OAOrE,SAAUjQ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B6d,EAAO7d,EAAoB,IAC3BgW,EAAMhW,EAAoB,IAC1BsJ,EAAkBtJ,EAAoB,IACtCsH,EAAWtH,EAAoB,GAC/B0M,EAAa,GAAGjE,MAGpBvG,EAAQA,EAAQa,EAAIb,EAAQO,EAAIzC,EAAoB,EAApBA,CAAuB,WACjD6d,GAAMnR,EAAWpM,KAAKud,KACxB,QAAS,CACXpV,MAAO,SAASA,MAAMkI,EAAOC,GAC3B,IAAIO,EAAM7J,EAAS7D,KAAKE,QACpBgP,EAAQqD,EAAIvS,MAEhB,GADAmN,EAAMA,IAAQ/Q,GAAYsR,EAAMP,EACnB,SAAT+B,EAAkB,OAAOjG,EAAWpM,KAAKmD,KAAMkN,EAAOC,GAM1D,IALA,IAAInB,EAAQnG,EAAgBqH,EAAOQ,GAC/BujB,EAAOprB,EAAgBsH,EAAKO,GAC5B+I,EAAO5S,EAASotB,EAAOjlB,GACvBklB,EAAS,IAAI9pB,MAAMqP,GACnB9Z,EAAI,EACDA,EAAI8Z,EAAM9Z,IAAKu0B,EAAOv0B,GAAc,UAATuS,EAC9BlP,KAAKyX,OAAOzL,EAAQrP,GACpBqD,KAAKgM,EAAQrP,GACjB,OAAOu0B,MAOL,SAAUx0B,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B4G,EAAY5G,EAAoB,IAChC0F,EAAW1F,EAAoB,GAC/B+F,EAAQ/F,EAAoB,GAC5B40B,EAAQ,GAAGnoB,KACXhG,EAAO,CAAC,EAAG,EAAG,GAElBvE,EAAQA,EAAQa,EAAIb,EAAQO,GAAKsD,EAAM,WAErCU,EAAKgG,KAAK5M,QACLkG,EAAM,WAEXU,EAAKgG,KAAK,UAELzM,EAAoB,GAApBA,CAAwB40B,IAAS,QAAS,CAE/CnoB,KAAM,SAASA,KAAKgE,GAClB,OAAOA,IAAc5Q,GACjB+0B,EAAMt0B,KAAKoF,EAASjC,OACpBmxB,EAAMt0B,KAAKoF,EAASjC,MAAOmD,EAAU6J,QAOvC,SAAUtQ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B60B,EAAW70B,EAAoB,GAApBA,CAAwB,GACnC80B,EAAS90B,EAAoB,GAApBA,CAAwB,GAAGgQ,SAAS,GAEjD9N,EAAQA,EAAQa,EAAIb,EAAQO,GAAKqyB,EAAQ,QAAS,CAEhD9kB,QAAS,SAASA,QAAQ9H,GACxB,OAAO2sB,EAASpxB,KAAMyE,EAAYxE,UAAU,QAO1C,SAAUvD,EAAQD,EAASF,GAEjC,IAAIiE,EAAWjE,EAAoB,GAC/BmY,EAAUnY,EAAoB,IAC9B8W,EAAU9W,EAAoB,EAApBA,CAAuB,WAErCG,EAAOD,QAAU,SAAUgd,GACzB,IAAI5Z,EASF,OARE6U,EAAQ+E,KAGM,mBAFhB5Z,EAAI4Z,EAASpX,cAEkBxC,IAAMuH,QAASsN,EAAQ7U,EAAE9B,aAAa8B,EAAIzD,IACrEoE,EAASX,IAED,QADVA,EAAIA,EAAEwT,MACUxT,EAAIzD,KAEfyD,IAAMzD,GAAYgL,MAAQvH,IAM/B,SAAUnD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BwN,EAAOxN,EAAoB,GAApBA,CAAwB,GAEnCkC,EAAQA,EAAQa,EAAIb,EAAQO,GAAKzC,EAAoB,GAApBA,CAAwB,GAAGqQ,KAAK,GAAO,QAAS,CAE/EA,IAAK,SAASA,IAAInI,GAChB,OAAOsF,EAAK/J,KAAMyE,EAAYxE,UAAU,QAOtC,SAAUvD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B+0B,EAAU/0B,EAAoB,GAApBA,CAAwB,GAEtCkC,EAAQA,EAAQa,EAAIb,EAAQO,GAAKzC,EAAoB,GAApBA,CAAwB,GAAG4P,QAAQ,GAAO,QAAS,CAElFA,OAAQ,SAASA,OAAO1H,GACtB,OAAO6sB,EAAQtxB,KAAMyE,EAAYxE,UAAU,QAOzC,SAAUvD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9Bg1B,EAAQh1B,EAAoB,GAApBA,CAAwB,GAEpCkC,EAAQA,EAAQa,EAAIb,EAAQO,GAAKzC,EAAoB,GAApBA,CAAwB,GAAGwQ,MAAM,GAAO,QAAS,CAEhFA,KAAM,SAASA,KAAKtI,GAClB,OAAO8sB,EAAMvxB,KAAMyE,EAAYxE,UAAU,QAOvC,SAAUvD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9Bi1B,EAASj1B,EAAoB,GAApBA,CAAwB,GAErCkC,EAAQA,EAAQa,EAAIb,EAAQO,GAAKzC,EAAoB,GAApBA,CAAwB,GAAG0P,OAAO,GAAO,QAAS,CAEjFA,MAAO,SAASA,MAAMxH,GACpB,OAAO+sB,EAAOxxB,KAAMyE,EAAYxE,UAAU,QAOxC,SAAUvD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9Bk1B,EAAUl1B,EAAoB,KAElCkC,EAAQA,EAAQa,EAAIb,EAAQO,GAAKzC,EAAoB,GAApBA,CAAwB,GAAGmM,QAAQ,GAAO,QAAS,CAElFA,OAAQ,SAASA,OAAOjE,GACtB,OAAOgtB,EAAQzxB,KAAMyE,EAAYxE,UAAUC,OAAQD,UAAU,IAAI,OAO/D,SAAUvD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9Bk1B,EAAUl1B,EAAoB,KAElCkC,EAAQA,EAAQa,EAAIb,EAAQO,GAAKzC,EAAoB,GAApBA,CAAwB,GAAGqM,aAAa,GAAO,QAAS,CAEvFA,YAAa,SAASA,YAAYnE,GAChC,OAAOgtB,EAAQzxB,KAAMyE,EAAYxE,UAAUC,OAAQD,UAAU,IAAI,OAO/D,SAAUvD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9Bm1B,EAAWn1B,EAAoB,GAApBA,EAAwB,GACnCmZ,EAAU,GAAGlJ,QACbmlB,IAAkBjc,GAAW,EAAI,CAAC,GAAGlJ,QAAQ,GAAI,GAAK,EAE1D/N,EAAQA,EAAQa,EAAIb,EAAQO,GAAK2yB,IAAkBp1B,EAAoB,GAApBA,CAAwBmZ,IAAW,QAAS,CAE7FlJ,QAAS,SAASA,QAAQC,GACxB,OAAOklB,EAEHjc,EAAQvV,MAAMH,KAAMC,YAAc,EAClCyxB,EAAS1xB,KAAMyM,EAAexM,UAAU,QAO1C,SAAUvD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BiH,EAAYjH,EAAoB,IAChC6E,EAAY7E,EAAoB,IAChCsH,EAAWtH,EAAoB,GAC/BmZ,EAAU,GAAGlN,YACbmpB,IAAkBjc,GAAW,EAAI,CAAC,GAAGlN,YAAY,GAAI,GAAK,EAE9D/J,EAAQA,EAAQa,EAAIb,EAAQO,GAAK2yB,IAAkBp1B,EAAoB,GAApBA,CAAwBmZ,IAAW,QAAS,CAE7FlN,YAAa,SAASA,YAAYiE,GAEhC,GAAIklB,EAAe,OAAOjc,EAAQvV,MAAMH,KAAMC,YAAc,EAC5D,IAAI0B,EAAI6B,EAAUxD,MACdE,EAAS2D,EAASlC,EAAEzB,QACpB0E,EAAQ1E,EAAS,EAGrB,IAFuB,EAAnBD,UAAUC,SAAY0E,EAAQhE,KAAKS,IAAIuD,EAAOxD,EAAUnB,UAAU,MAClE2E,EAAQ,IAAGA,EAAQ1E,EAAS0E,GACjB,GAATA,EAAYA,IAAS,GAAIA,KAASjD,GAAOA,EAAEiD,KAAW6H,EAAe,OAAO7H,GAAS,EAC3F,OAAQ,MAON,SAAUlI,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQa,EAAG,QAAS,CAAEyM,WAAYxP,EAAoB,OAE9DA,EAAoB,GAApBA,CAAwB,eAKlB,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQa,EAAG,QAAS,CAAE4M,KAAM3P,EAAoB,MAExDA,EAAoB,GAApBA,CAAwB,SAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9Bq1B,EAAQr1B,EAAoB,GAApBA,CAAwB,GAChC6I,EAAM,OACNysB,GAAS,EAETzsB,IAAO,IAAIgC,MAAM,GAAGhC,GAAK,WAAcysB,GAAS,IACpDpzB,EAAQA,EAAQa,EAAIb,EAAQO,EAAI6yB,EAAQ,QAAS,CAC/CzlB,KAAM,SAASA,KAAK3H,GAClB,OAAOmtB,EAAM5xB,KAAMyE,EAA+B,EAAnBxE,UAAUC,OAAaD,UAAU,GAAK7D,OAGzEG,EAAoB,GAApBA,CAAwB6I,IAKlB,SAAU1I,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9Bq1B,EAAQr1B,EAAoB,GAApBA,CAAwB,GAChC6I,EAAM,YACNysB,GAAS,EAETzsB,IAAO,IAAIgC,MAAM,GAAGhC,GAAK,WAAcysB,GAAS,IACpDpzB,EAAQA,EAAQa,EAAIb,EAAQO,EAAI6yB,EAAQ,QAAS,CAC/CvlB,UAAW,SAASA,UAAU7H,GAC5B,OAAOmtB,EAAM5xB,KAAMyE,EAA+B,EAAnBxE,UAAUC,OAAaD,UAAU,GAAK7D,OAGzEG,EAAoB,GAApBA,CAAwB6I,IAKlB,SAAU1I,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,UAKlB,SAAUG,EAAQD,KAOlB,SAAUC,EAAQD,EAASF,GAIjC,IAwBIu1B,EAAUC,EAA6BC,EAAsBC,EAxB7D3sB,EAAU/I,EAAoB,IAC9B4B,EAAS5B,EAAoB,GAC7B8B,EAAM9B,EAAoB,IAC1BuJ,EAAUvJ,EAAoB,IAC9BkC,EAAUlC,EAAoB,GAC9BiE,EAAWjE,EAAoB,GAC/B4G,EAAY5G,EAAoB,IAChCkJ,EAAalJ,EAAoB,IACjC2Z,EAAQ3Z,EAAoB,IAC5B8J,EAAqB9J,EAAoB,IACzC8gB,EAAO9gB,EAAoB,IAAI8N,IAC/B6nB,EAAY31B,EAAoB,GAApBA,GACZ41B,EAA6B51B,EAAoB,IACjD61B,EAAU71B,EAAoB,KAC9B0Z,EAAY1Z,EAAoB,IAChC81B,EAAiB91B,EAAoB,KACrC+1B,EAAU,UACV5xB,EAAYvC,EAAOuC,UACnB4Z,EAAUnc,EAAOmc,QACjBiY,EAAWjY,GAAWA,EAAQiY,SAC9BC,EAAKD,GAAYA,EAASC,IAAM,GAChCC,EAAWt0B,EAAOm0B,GAClBnW,EAA6B,WAApBrW,EAAQwU,GACjBoY,EAAQ,aAERhP,EAAuBqO,EAA8BI,EAA2BzwB,EAEhFynB,IAAe,WACjB,IAEE,IAAIrM,EAAU2V,EAAS5V,QAAQ,GAC3B8V,GAAe7V,EAAQza,YAAc,IAAI9F,EAAoB,EAApBA,CAAuB,YAAc,SAAUuE,GAC1FA,EAAK4xB,EAAOA,IAGd,OAAQvW,GAA0C,mBAAzByW,wBACpB9V,EAAQC,KAAK2V,aAAkBC,GAIT,IAAtBH,EAAGhmB,QAAQ,SACyB,IAApCyJ,EAAUzJ,QAAQ,aACvB,MAAOzL,KAfQ,GAmBf8xB,EAAa,SAAUpyB,GACzB,IAAIsc,EACJ,SAAOvc,EAASC,IAAkC,mBAAnBsc,EAAOtc,EAAGsc,QAAsBA,GAE7DT,EAAS,SAAUQ,EAASgW,GAC9B,IAAIhW,EAAQiW,GAAZ,CACAjW,EAAQiW,IAAK,EACb,IAAIC,EAAQlW,EAAQvG,GACpB2b,EAAU,WAoCR,IAnCA,IAAIrwB,EAAQib,EAAQmW,GAChBC,EAAmB,GAAdpW,EAAQqW,GACbx2B,EAAI,EACJqe,EAAM,SAAUoY,GAClB,IAIIvuB,EAAQkY,EAAMsW,EAJdC,EAAUJ,EAAKE,EAASF,GAAKE,EAASG,KACtC1W,EAAUuW,EAASvW,QACnBU,EAAS6V,EAAS7V,OAClBd,EAAS2W,EAAS3W,OAEtB,IACM6W,GACGJ,IACe,GAAdpW,EAAQ0W,IAASC,EAAkB3W,GACvCA,EAAQ0W,GAAK,IAEC,IAAZF,EAAkBzuB,EAAShD,GAEzB4a,GAAQA,EAAOE,QACnB9X,EAASyuB,EAAQzxB,GACb4a,IACFA,EAAOC,OACP2W,GAAS,IAGTxuB,IAAWuuB,EAAStW,QACtBS,EAAO7c,EAAU,yBACRqc,EAAO8V,EAAWhuB,IAC3BkY,EAAKlgB,KAAKgI,EAAQgY,EAASU,GACtBV,EAAQhY,IACV0Y,EAAO1b,GACd,MAAOd,GACH0b,IAAW4W,GAAQ5W,EAAOC,OAC9Ba,EAAOxc,KAGWpE,EAAfq2B,EAAM9yB,QAAY8a,EAAIgY,EAAMr2B,MACnCmgB,EAAQvG,GAAK,GACbuG,EAAQiW,IAAK,EACTD,IAAahW,EAAQ0W,IAAIE,EAAY5W,OAGzC4W,EAAc,SAAU5W,GAC1BO,EAAKxgB,KAAKsB,EAAQ,WAChB,IAEI0G,EAAQyuB,EAASK,EAFjB9xB,EAAQib,EAAQmW,GAChBW,EAAYC,EAAY/W,GAe5B,GAbI8W,IACF/uB,EAASutB,EAAQ,WACXjW,EACF7B,EAAQwZ,KAAK,qBAAsBjyB,EAAOib,IACjCwW,EAAUn1B,EAAO41B,sBAC1BT,EAAQ,CAAExW,QAASA,EAASkX,OAAQnyB,KAC1B8xB,EAAUx1B,EAAOw1B,UAAYA,EAAQM,OAC/CN,EAAQM,MAAM,8BAA+BpyB,KAIjDib,EAAQ0W,GAAKrX,GAAU0X,EAAY/W,GAAW,EAAI,GAClDA,EAAQoX,GAAK93B,GACXw3B,GAAa/uB,EAAO9D,EAAG,MAAM8D,EAAO+J,KAGxCilB,EAAc,SAAU/W,GAC1B,OAAsB,IAAfA,EAAQ0W,IAAkD,KAArC1W,EAAQoX,IAAMpX,EAAQvG,IAAIrW,QAEpDuzB,EAAoB,SAAU3W,GAChCO,EAAKxgB,KAAKsB,EAAQ,WAChB,IAAIm1B,EACAnX,EACF7B,EAAQwZ,KAAK,mBAAoBhX,IACxBwW,EAAUn1B,EAAOg2B,qBAC1Bb,EAAQ,CAAExW,QAASA,EAASkX,OAAQlX,EAAQmW,QAI9CmB,EAAU,SAAUvyB,GACtB,IAAIib,EAAU9c,KACV8c,EAAQ/R,KACZ+R,EAAQ/R,IAAK,GACb+R,EAAUA,EAAQuX,IAAMvX,GAChBmW,GAAKpxB,EACbib,EAAQqW,GAAK,EACRrW,EAAQoX,KAAIpX,EAAQoX,GAAKpX,EAAQvG,GAAGvR,SACzCsX,EAAOQ,GAAS,KAEdwX,EAAW,SAAUzyB,GACvB,IACIkb,EADAD,EAAU9c,KAEd,IAAI8c,EAAQ/R,GAAZ,CACA+R,EAAQ/R,IAAK,EACb+R,EAAUA,EAAQuX,IAAMvX,EACxB,IACE,GAAIA,IAAYjb,EAAO,MAAMnB,EAAU,qCACnCqc,EAAO8V,EAAWhxB,IACpBqwB,EAAU,WACR,IAAIhkB,EAAU,CAAEmmB,GAAIvX,EAAS/R,IAAI,GACjC,IACEgS,EAAKlgB,KAAKgF,EAAOxD,EAAIi2B,EAAUpmB,EAAS,GAAI7P,EAAI+1B,EAASlmB,EAAS,IAClE,MAAOnN,GACPqzB,EAAQv3B,KAAKqR,EAASnN,OAI1B+b,EAAQmW,GAAKpxB,EACbib,EAAQqW,GAAK,EACb7W,EAAOQ,GAAS,IAElB,MAAO/b,GACPqzB,EAAQv3B,KAAK,CAAEw3B,GAAIvX,EAAS/R,IAAI,GAAShK,MAKxCooB,IAEHsJ,EAAW,SAASvW,QAAQqY,GAC1B9uB,EAAWzF,KAAMyyB,EAAUH,EAAS,MACpCnvB,EAAUoxB,GACVzC,EAASj1B,KAAKmD,MACd,IACEu0B,EAASl2B,EAAIi2B,EAAUt0B,KAAM,GAAI3B,EAAI+1B,EAASp0B,KAAM,IACpD,MAAOw0B,GACPJ,EAAQv3B,KAAKmD,KAAMw0B,MAIvB1C,EAAW,SAAS5V,QAAQqY,GAC1Bv0B,KAAKuW,GAAK,GACVvW,KAAKk0B,GAAK93B,GACV4D,KAAKmzB,GAAK,EACVnzB,KAAK+K,IAAK,EACV/K,KAAKizB,GAAK72B,GACV4D,KAAKwzB,GAAK,EACVxzB,KAAK+yB,IAAK,IAEHh1B,UAAYxB,EAAoB,GAApBA,CAAwBk2B,EAAS10B,UAAW,CAE/Dgf,KAAM,SAASA,KAAK0X,EAAaC,GAC/B,IAAItB,EAAW1P,EAAqBrd,EAAmBrG,KAAMyyB,IAO7D,OANAW,EAASF,GAA2B,mBAAfuB,GAA4BA,EACjDrB,EAASG,KAA4B,mBAAdmB,GAA4BA,EACnDtB,EAAS3W,OAASN,EAAS7B,EAAQmC,OAASrgB,GAC5C4D,KAAKuW,GAAGzR,KAAKsuB,GACTpzB,KAAKk0B,IAAIl0B,KAAKk0B,GAAGpvB,KAAKsuB,GACtBpzB,KAAKmzB,IAAI7W,EAAOtc,MAAM,GACnBozB,EAAStW,SAGlB6X,QAAS,SAAUD,GACjB,OAAO10B,KAAK+c,KAAK3gB,GAAWs4B,MAGhC1C,EAAuB,WACrB,IAAIlV,EAAU,IAAIgV,EAClB9xB,KAAK8c,QAAUA,EACf9c,KAAK6c,QAAUxe,EAAIi2B,EAAUxX,EAAS,GACtC9c,KAAKud,OAASlf,EAAI+1B,EAAStX,EAAS,IAEtCqV,EAA2BzwB,EAAIgiB,EAAuB,SAAU7jB,GAC9D,OAAOA,IAAM4yB,GAAY5yB,IAAMoyB,EAC3B,IAAID,EAAqBnyB,GACzBkyB,EAA4BlyB,KAIpCpB,EAAQA,EAAQS,EAAIT,EAAQiB,EAAIjB,EAAQO,GAAKmqB,EAAY,CAAEjN,QAASuW,IACpEl2B,EAAoB,GAApBA,CAAwBk2B,EAAUH,GAClC/1B,EAAoB,GAApBA,CAAwB+1B,GACxBL,EAAU11B,EAAoB,IAAI+1B,GAGlC7zB,EAAQA,EAAQW,EAAIX,EAAQO,GAAKmqB,EAAYmJ,EAAS,CAEpD/U,OAAQ,SAASA,OAAO4G,GACtB,IAAIyQ,EAAalR,EAAqB1jB,MAGtC,OADAyd,EADemX,EAAWrX,QACjB4G,GACFyQ,EAAW9X,WAGtBre,EAAQA,EAAQW,EAAIX,EAAQO,GAAKsG,IAAY6jB,GAAamJ,EAAS,CAEjEzV,QAAS,SAASA,QAAQnE,GACxB,OAAO2Z,EAAe/sB,GAAWtF,OAASiyB,EAAUQ,EAAWzyB,KAAM0Y,MAGzEja,EAAQA,EAAQW,EAAIX,EAAQO,IAAMmqB,GAAc5sB,EAAoB,GAApBA,CAAwB,SAAU6S,GAChFqjB,EAASoC,IAAIzlB,GAAa,SAAEsjB,MACzBJ,EAAS,CAEZuC,IAAK,SAASA,IAAIxiB,GAChB,IAAIxS,EAAIG,KACJ40B,EAAalR,EAAqB7jB,GAClCgd,EAAU+X,EAAW/X,QACrBU,EAASqX,EAAWrX,OACpB1Y,EAASutB,EAAQ,WACnB,IAAIlqB,EAAS,GACTtD,EAAQ,EACRkwB,EAAY,EAChB5e,EAAM7D,GAAU,EAAO,SAAUyK,GAC/B,IAAIiY,EAASnwB,IACTowB,GAAgB,EACpB9sB,EAAOpD,KAAK1I,IACZ04B,IACAj1B,EAAEgd,QAAQC,GAASC,KAAK,SAAUlb,GAC5BmzB,IACJA,GAAgB,EAChB9sB,EAAO6sB,GAAUlzB,IACfizB,GAAajY,EAAQ3U,KACtBqV,OAEHuX,GAAajY,EAAQ3U,KAGzB,OADIrD,EAAO9D,GAAGwc,EAAO1Y,EAAO+J,GACrBgmB,EAAW9X,SAGpBmY,KAAM,SAASA,KAAK5iB,GAClB,IAAIxS,EAAIG,KACJ40B,EAAalR,EAAqB7jB,GAClC0d,EAASqX,EAAWrX,OACpB1Y,EAASutB,EAAQ,WACnBlc,EAAM7D,GAAU,EAAO,SAAUyK,GAC/Bjd,EAAEgd,QAAQC,GAASC,KAAK6X,EAAW/X,QAASU,OAIhD,OADI1Y,EAAO9D,GAAGwc,EAAO1Y,EAAO+J,GACrBgmB,EAAW9X,YAOhB,SAAUpgB,EAAQD,EAASF,GAIjC,IAAIkoB,EAAOloB,EAAoB,KAC3BkO,EAAWlO,EAAoB,IAC/B24B,EAAW,UAGf34B,EAAoB,GAApBA,CAAwB24B,EAAU,SAAU13B,GAC1C,OAAO,SAAS23B,UAAY,OAAO33B,EAAIwC,KAAyB,EAAnBC,UAAUC,OAAaD,UAAU,GAAK7D,MAClF,CAEDmoB,IAAK,SAASA,IAAI1iB,GAChB,OAAO4iB,EAAKvR,IAAIzI,EAASzK,KAAMk1B,GAAWrzB,GAAO,KAElD4iB,GAAM,GAAO,IAKV,SAAU/nB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B4G,EAAY5G,EAAoB,IAChC+E,EAAW/E,EAAoB,GAC/B64B,GAAU74B,EAAoB,GAAGmhB,SAAW,IAAIvd,MAChDk1B,EAASj1B,SAASD,MAEtB1B,EAAQA,EAAQW,EAAIX,EAAQO,GAAKzC,EAAoB,EAApBA,CAAuB,WACtD64B,EAAO,gBACL,UAAW,CACbj1B,MAAO,SAASA,MAAMP,EAAQ01B,EAAcC,GAC1C,IAAI9iB,EAAItP,EAAUvD,GACd41B,EAAIl0B,EAASi0B,GACjB,OAAOH,EAASA,EAAO3iB,EAAG6iB,EAAcE,GAAKH,EAAOx4B,KAAK4V,EAAG6iB,EAAcE,OAOxE,SAAU94B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BgI,EAAShI,EAAoB,IAC7B4G,EAAY5G,EAAoB,IAChC+E,EAAW/E,EAAoB,GAC/BiE,EAAWjE,EAAoB,GAC/B+F,EAAQ/F,EAAoB,GAC5BulB,EAAOvlB,EAAoB,IAC3Bk5B,GAAcl5B,EAAoB,GAAGmhB,SAAW,IAAIuE,UAIpDyT,EAAiBpzB,EAAM,WACzB,SAAStD,KACT,QAASy2B,EAAW,aAA6B,GAAIz2B,aAAcA,KAEjE22B,GAAYrzB,EAAM,WACpBmzB,EAAW,gBAGbh3B,EAAQA,EAAQW,EAAIX,EAAQO,GAAK02B,GAAkBC,GAAW,UAAW,CACvE1T,UAAW,SAASA,UAAU2T,EAAQzd,GACpChV,EAAUyyB,GACVt0B,EAAS6W,GACT,IAAI0d,EAAY51B,UAAUC,OAAS,EAAI01B,EAASzyB,EAAUlD,UAAU,IACpE,GAAI01B,IAAaD,EAAgB,OAAOD,EAAWG,EAAQzd,EAAM0d,GACjE,GAAID,GAAUC,EAAW,CAEvB,OAAQ1d,EAAKjY,QACX,KAAK,EAAG,OAAO,IAAI01B,EACnB,KAAK,EAAG,OAAO,IAAIA,EAAOzd,EAAK,IAC/B,KAAK,EAAG,OAAO,IAAIyd,EAAOzd,EAAK,GAAIA,EAAK,IACxC,KAAK,EAAG,OAAO,IAAIyd,EAAOzd,EAAK,GAAIA,EAAK,GAAIA,EAAK,IACjD,KAAK,EAAG,OAAO,IAAIyd,EAAOzd,EAAK,GAAIA,EAAK,GAAIA,EAAK,GAAIA,EAAK,IAG5D,IAAI2d,EAAQ,CAAC,MAEb,OADAA,EAAMhxB,KAAK3E,MAAM21B,EAAO3d,GACjB,IAAK2J,EAAK3hB,MAAMy1B,EAAQE,IAGjC,IAAIhqB,EAAQ+pB,EAAU93B,UAClBg4B,EAAWxxB,EAAO/D,EAASsL,GAASA,EAAQ1O,OAAOW,WACnD8G,EAASzE,SAASD,MAAMtD,KAAK+4B,EAAQG,EAAU5d,GACnD,OAAO3X,EAASqE,GAAUA,EAASkxB,MAOjC,SAAUr5B,EAAQD,EAASF,GAGjC,IAAIkF,EAAKlF,EAAoB,GACzBkC,EAAUlC,EAAoB,GAC9B+E,EAAW/E,EAAoB,GAC/BiF,EAAcjF,EAAoB,IAGtCkC,EAAQA,EAAQW,EAAIX,EAAQO,EAAIzC,EAAoB,EAApBA,CAAuB,WAErDmhB,QAAQrgB,eAAeoE,EAAGC,EAAE,GAAI,EAAG,CAAEG,MAAO,IAAM,EAAG,CAAEA,MAAO,MAC5D,UAAW,CACbxE,eAAgB,SAASA,eAAeuC,EAAQo2B,EAAaC,GAC3D30B,EAAS1B,GACTo2B,EAAcx0B,EAAYw0B,GAAa,GACvC10B,EAAS20B,GACT,IAEE,OADAx0B,EAAGC,EAAE9B,EAAQo2B,EAAaC,IACnB,EACP,MAAOl1B,GACP,OAAO,OAQP,SAAUrE,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BkH,EAAOlH,EAAoB,IAAImF,EAC/BJ,EAAW/E,EAAoB,GAEnCkC,EAAQA,EAAQW,EAAG,UAAW,CAC5B82B,eAAgB,SAASA,eAAet2B,EAAQo2B,GAC9C,IAAIjoB,EAAOtK,EAAKnC,EAAS1B,GAASo2B,GAClC,QAAOjoB,IAASA,EAAKzQ,sBAA8BsC,EAAOo2B,OAOxD,SAAUt5B,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B+E,EAAW/E,EAAoB,GAC/B45B,EAAY,SAAUvc,GACxB5Z,KAAK+S,GAAKzR,EAASsY,GACnB5Z,KAAK6Z,GAAK,EACV,IACIjb,EADAwJ,EAAOpI,KAAK8Z,GAAK,GAErB,IAAKlb,KAAOgb,EAAUxR,EAAKtD,KAAKlG,IAElCrC,EAAoB,GAApBA,CAAwB45B,EAAW,SAAU,WAC3C,IAEIv3B,EADAwJ,EADOpI,KACK8Z,GAEhB,GACE,GAAe1R,EAAKlI,QAJXF,KAIA6Z,GAAmB,MAAO,CAAEhY,MAAOzF,GAAWqP,MAAM,YACnD7M,EAAMwJ,EALPpI,KAKiB6Z,SALjB7Z,KAKgC+S,KAC3C,MAAO,CAAElR,MAAOjD,EAAK6M,MAAM,KAG7BhN,EAAQA,EAAQW,EAAG,UAAW;AAC5Bg3B,UAAW,SAASA,UAAUx2B,GAC5B,OAAO,IAAIu2B,EAAUv2B,OAOnB,SAAUlD,EAAQD,EAASF,GAGjC,IAAIkH,EAAOlH,EAAoB,IAC3B6F,EAAiB7F,EAAoB,IACrCgC,EAAMhC,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9BiE,EAAWjE,EAAoB,GAC/B+E,EAAW/E,EAAoB,GAcnCkC,EAAQA,EAAQW,EAAG,UAAW,CAAE5B,IAZhC,SAASA,IAAIoC,EAAQo2B,GACnB,IACIjoB,EAAMjC,EADNuqB,EAAWp2B,UAAUC,OAAS,EAAIN,EAASK,UAAU,GAEzD,OAAIqB,EAAS1B,KAAYy2B,EAAiBz2B,EAAOo2B,IAC7CjoB,EAAOtK,EAAK/B,EAAE9B,EAAQo2B,IAAqBz3B,EAAIwP,EAAM,SACrDA,EAAKlM,MACLkM,EAAKvQ,MAAQpB,GACX2R,EAAKvQ,IAAIX,KAAKw5B,GACdj6B,GACFoE,EAASsL,EAAQ1J,EAAexC,IAAiBpC,IAAIsO,EAAOkqB,EAAaK,QAA7E,MAQI,SAAU35B,EAAQD,EAASF,GAGjC,IAAIkH,EAAOlH,EAAoB,IAC3BkC,EAAUlC,EAAoB,GAC9B+E,EAAW/E,EAAoB,GAEnCkC,EAAQA,EAAQW,EAAG,UAAW,CAC5BsE,yBAA0B,SAASA,yBAAyB9D,EAAQo2B,GAClE,OAAOvyB,EAAK/B,EAAEJ,EAAS1B,GAASo2B,OAO9B,SAAUt5B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B+5B,EAAW/5B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAEnCkC,EAAQA,EAAQW,EAAG,UAAW,CAC5BgD,eAAgB,SAASA,eAAexC,GACtC,OAAO02B,EAASh1B,EAAS1B,QAOvB,SAAUlD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,UAAW,CAC5Bb,IAAK,SAASA,IAAIqB,EAAQo2B,GACxB,OAAOA,KAAep2B,MAOpB,SAAUlD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B+E,EAAW/E,EAAoB,GAC/B+uB,EAAgBluB,OAAOoT,aAE3B/R,EAAQA,EAAQW,EAAG,UAAW,CAC5BoR,aAAc,SAASA,aAAa5Q,GAElC,OADA0B,EAAS1B,IACF0rB,GAAgBA,EAAc1rB,OAOnC,SAAUlD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,UAAW,CAAEue,QAASphB,EAAoB,OAKvD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B+E,EAAW/E,EAAoB,GAC/B0uB,EAAqB7tB,OAAOsT,kBAEhCjS,EAAQA,EAAQW,EAAG,UAAW,CAC5BsR,kBAAmB,SAASA,kBAAkB9Q,GAC5C0B,EAAS1B,GACT,IAEE,OADIqrB,GAAoBA,EAAmBrrB,IACpC,EACP,MAAOmB,GACP,OAAO,OAQP,SAAUrE,EAAQD,EAASF,GAGjC,IAAIkF,EAAKlF,EAAoB,GACzBkH,EAAOlH,EAAoB,IAC3B6F,EAAiB7F,EAAoB,IACrCgC,EAAMhC,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9B+G,EAAa/G,EAAoB,IACjC+E,EAAW/E,EAAoB,GAC/BiE,EAAWjE,EAAoB,GAwBnCkC,EAAQA,EAAQW,EAAG,UAAW,CAAEiL,IAtBhC,SAASA,IAAIzK,EAAQo2B,EAAaO,GAChC,IAEIC,EAAoB1qB,EAFpBuqB,EAAWp2B,UAAUC,OAAS,EAAIN,EAASK,UAAU,GACrDw2B,EAAUhzB,EAAK/B,EAAEJ,EAAS1B,GAASo2B,GAEvC,IAAKS,EAAS,CACZ,GAAIj2B,EAASsL,EAAQ1J,EAAexC,IAClC,OAAOyK,IAAIyB,EAAOkqB,EAAaO,EAAGF,GAEpCI,EAAUnzB,EAAW,GAEvB,GAAI/E,EAAIk4B,EAAS,SAAU,CACzB,IAAyB,IAArBA,EAAQzoB,WAAuBxN,EAAS61B,GAAW,OAAO,EAC9D,GAAIG,EAAqB/yB,EAAK/B,EAAE20B,EAAUL,GAAc,CACtD,GAAIQ,EAAmBh5B,KAAOg5B,EAAmBnsB,MAAuC,IAAhCmsB,EAAmBxoB,SAAoB,OAAO,EACtGwoB,EAAmB30B,MAAQ00B,EAC3B90B,EAAGC,EAAE20B,EAAUL,EAAaQ,QACvB/0B,EAAGC,EAAE20B,EAAUL,EAAa1yB,EAAW,EAAGizB,IACjD,OAAO,EAET,OAAOE,EAAQpsB,MAAQjO,KAAqBq6B,EAAQpsB,IAAIxN,KAAKw5B,EAAUE,IAAI,OAQvE,SAAU75B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bm6B,EAAWn6B,EAAoB,IAE/Bm6B,GAAUj4B,EAAQA,EAAQW,EAAG,UAAW,CAC1CsiB,eAAgB,SAASA,eAAe9hB,EAAQkM,GAC9C4qB,EAASjV,MAAM7hB,EAAQkM,GACvB,IAEE,OADA4qB,EAASrsB,IAAIzK,EAAQkM,IACd,EACP,MAAO/K,GACP,OAAO,OAQP,SAAUrE,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAEgc,IAAK,WAAc,OAAO,IAAImK,MAAOD,cAK5D,SAAU5oB,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B0F,EAAW1F,EAAoB,GAC/BiF,EAAcjF,EAAoB,IAClCkpB,EAAclpB,EAAoB,KAClCuJ,EAAUvJ,EAAoB,IAElCkC,EAAQA,EAAQa,EAAIb,EAAQO,EAAIzC,EAAoB,EAApBA,CAAuB,WACrD,OAAkC,OAA3B,IAAIgpB,KAAKtG,KAAKuI,UAC2D,IAA3EjC,KAAKxnB,UAAUypB,OAAO3qB,KAAK,CAAE4oB,YAAa,WAAc,OAAO,OAClE,OAAQ,CAEV+B,OAAQ,SAASA,OAAO5oB,GACtB,IAAI+C,EAAIM,EAASjC,MACb22B,EAAKn1B,EAAYG,GACrB,MAAoB,iBAANg1B,GAAmBvU,SAASuU,GACrC,gBAAiBh1B,GAAoB,QAAdmE,EAAQnE,GAAsCA,EAAE8jB,cAAxBA,EAAY5oB,KAAK8E,GADrB,SAQ9C,SAAUjF,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BkpB,EAAclpB,EAAoB,KAGtCkC,EAAQA,EAAQa,EAAIb,EAAQO,GAAKumB,KAAKxnB,UAAU0nB,cAAgBA,GAAc,OAAQ,CACpFA,YAAaA,KAMT,SAAU/oB,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BgJ,EAAShJ,EAAoB,IAC7B4N,EAAS5N,EAAoB,IAC7B+E,EAAW/E,EAAoB,GAC/BsJ,EAAkBtJ,EAAoB,IACtCsH,EAAWtH,EAAoB,GAC/BiE,EAAWjE,EAAoB,GAC/B+K,EAAc/K,EAAoB,GAAG+K,YACrCjB,EAAqB9J,EAAoB,IACzC8K,EAAe8C,EAAO7C,YACtBC,EAAY4C,EAAO3C,SACnBovB,EAAUrxB,EAAOuJ,KAAOxH,EAAYuvB,OACpCvpB,EAASjG,EAAatJ,UAAUiH,MAChC6E,EAAOtE,EAAOsE,KACd7C,EAAe,cAEnBvI,EAAQA,EAAQS,EAAIT,EAAQiB,EAAIjB,EAAQO,GAAKsI,IAAgBD,GAAe,CAAEC,YAAaD,IAE3F5I,EAAQA,EAAQW,EAAIX,EAAQO,GAAKuG,EAAOmE,OAAQ1C,EAAc,CAE5D6vB,OAAQ,SAASA,OAAOp2B,GACtB,OAAOm2B,GAAWA,EAAQn2B,IAAOD,EAASC,IAAOoJ,KAAQpJ,KAI7DhC,EAAQA,EAAQa,EAAIb,EAAQ8B,EAAI9B,EAAQO,EAAIzC,EAAoB,EAApBA,CAAuB,WACjE,OAAQ,IAAI8K,EAAa,GAAGrC,MAAM,EAAG5I,IAAW6S,aAC9CjI,EAAc,CAEhBhC,MAAO,SAASA,MAAMgH,EAAOmB,GAC3B,GAAIG,IAAWlR,IAAa+Q,IAAQ/Q,GAAW,OAAOkR,EAAOzQ,KAAKyE,EAAStB,MAAOgM,GAQlF,IAPA,IAAI0B,EAAMpM,EAAStB,MAAMiP,WACrB6nB,EAAQjxB,EAAgBmG,EAAO0B,GAC/BqpB,EAAMlxB,EAAgBsH,IAAQ/Q,GAAYsR,EAAMP,EAAKO,GACrD7I,EAAS,IAAKwB,EAAmBrG,KAAMqH,GAA9B,CAA6CxD,EAASkzB,EAAMD,IACrEE,EAAQ,IAAIzvB,EAAUvH,MACtBi3B,EAAQ,IAAI1vB,EAAU1C,GACtBD,EAAQ,EACLkyB,EAAQC,GACbE,EAAM9W,SAASvb,IAASoyB,EAAM3W,SAASyW,MACvC,OAAOjyB,KAIbtI,EAAoB,GAApBA,CAAwByK,IAKlB,SAAUtK,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAClCkC,EAAQA,EAAQS,EAAIT,EAAQiB,EAAIjB,EAAQO,GAAKzC,EAAoB,IAAIuS,IAAK,CACxEtH,SAAUjL,EAAoB,IAAIiL,YAM9B,SAAU9K,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,OAAQ,EAAG,SAAU26B,GAC3C,OAAO,SAASC,UAAUxoB,EAAMtB,EAAYnN,GAC1C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU26B,GAC5C,OAAO,SAASnwB,WAAW4H,EAAMtB,EAAYnN,GAC3C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU26B,GAC5C,OAAO,SAASE,kBAAkBzoB,EAAMtB,EAAYnN,GAClD,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,MAErC,IAKG,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU26B,GAC5C,OAAO,SAASG,WAAW1oB,EAAMtB,EAAYnN,GAC3C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,SAAU,EAAG,SAAU26B,GAC7C,OAAO,SAAShtB,YAAYyE,EAAMtB,EAAYnN,GAC5C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,QAAS,EAAG,SAAU26B,GAC5C,OAAO,SAASI,WAAW3oB,EAAMtB,EAAYnN,GAC3C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,SAAU,EAAG,SAAU26B,GAC7C,OAAO,SAASK,YAAY5oB,EAAMtB,EAAYnN,GAC5C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,UAAW,EAAG,SAAU26B,GAC9C,OAAO,SAASM,aAAa7oB,EAAMtB,EAAYnN,GAC7C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,UAAW,EAAG,SAAU26B,GAC9C,OAAO,SAASO,aAAa9oB,EAAMtB,EAAYnN,GAC7C,OAAOg3B,EAAKl3B,KAAM2O,EAAMtB,EAAYnN,OAOlC,SAAUxD,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9Bm7B,EAAYn7B,EAAoB,GAApBA,EAAwB,GAExCkC,EAAQA,EAAQa,EAAG,QAAS,CAC1BoN,SAAU,SAASA,SAAS6H,GAC1B,OAAOmjB,EAAU13B,KAAMuU,EAAuB,EAAnBtU,UAAUC,OAAaD,UAAU,GAAK7D,OAIrEG,EAAoB,GAApBA,CAAwB,aAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B+pB,EAAmB/pB,EAAoB,KACvC0F,EAAW1F,EAAoB,GAC/BsH,EAAWtH,EAAoB,GAC/B4G,EAAY5G,EAAoB,IAChCo7B,EAAqBp7B,EAAoB,IAE7CkC,EAAQA,EAAQa,EAAG,QAAS,CAC1Bs4B,QAAS,SAASA,QAAQnzB,GACxB,IACI8hB,EAAWtP,EADXtV,EAAIM,EAASjC,MAMjB,OAJAmD,EAAUsB,GACV8hB,EAAY1iB,EAASlC,EAAEzB,QACvB+W,EAAI0gB,EAAmBh2B,EAAG,GAC1B2kB,EAAiBrP,EAAGtV,EAAGA,EAAG4kB,EAAW,EAAG,EAAG9hB,EAAYxE,UAAU,IAC1DgX,KAIX1a,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B+pB,EAAmB/pB,EAAoB,KACvC0F,EAAW1F,EAAoB,GAC/BsH,EAAWtH,EAAoB,GAC/B6E,EAAY7E,EAAoB,IAChCo7B,EAAqBp7B,EAAoB,IAE7CkC,EAAQA,EAAQa,EAAG,QAAS,CAC1Bu4B,QAAS,SAASA,UAChB,IAAIC,EAAW73B,UAAU,GACrB0B,EAAIM,EAASjC,MACbumB,EAAY1iB,EAASlC,EAAEzB,QACvB+W,EAAI0gB,EAAmBh2B,EAAG,GAE9B,OADA2kB,EAAiBrP,EAAGtV,EAAGA,EAAG4kB,EAAW,EAAGuR,IAAa17B,GAAY,EAAIgF,EAAU02B,IACxE7gB,KAIX1a,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B6yB,EAAM7yB,EAAoB,GAApBA,EAAwB,GAElCkC,EAAQA,EAAQa,EAAG,SAAU,CAC3By4B,GAAI,SAASA,GAAGjf,GACd,OAAOsW,EAAIpvB,KAAM8Y,OAOf,SAAUpc,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9By7B,EAAOz7B,EAAoB,KAC3B0Z,EAAY1Z,EAAoB,IAGhC07B,EAAa,mDAAmDj1B,KAAKiT,GAEzExX,EAAQA,EAAQa,EAAIb,EAAQO,EAAIi5B,EAAY,SAAU,CACpDC,SAAU,SAASA,SAASnR,GAC1B,OAAOiR,EAAKh4B,KAAM+mB,EAA8B,EAAnB9mB,UAAUC,OAAaD,UAAU,GAAK7D,IAAW,OAO5E,SAAUM,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9By7B,EAAOz7B,EAAoB,KAC3B0Z,EAAY1Z,EAAoB,IAGhC07B,EAAa,mDAAmDj1B,KAAKiT,GAEzExX,EAAQA,EAAQa,EAAIb,EAAQO,EAAIi5B,EAAY,SAAU,CACpDE,OAAQ,SAASA,OAAOpR,GACtB,OAAOiR,EAAKh4B,KAAM+mB,EAA8B,EAAnB9mB,UAAUC,OAAaD,UAAU,GAAK7D,IAAW,OAO5E,SAAUM,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,WAAY,SAAUgmB,GAC5C,OAAO,SAAS6V,WACd,OAAO7V,EAAMviB,KAAM,KAEpB,cAKG,SAAUtD,EAAQD,EAASF,GAKjCA,EAAoB,GAApBA,CAAwB,YAAa,SAAUgmB,GAC7C,OAAO,SAAS8V,YACd,OAAO9V,EAAMviB,KAAM,KAEpB,YAKG,SAAUtD,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BuF,EAAUvF,EAAoB,IAC9BsH,EAAWtH,EAAoB,GAC/Byc,EAAWzc,EAAoB,KAC/B+7B,EAAW/7B,EAAoB,KAC/Bg8B,EAAc3kB,OAAO7V,UAErBy6B,EAAwB,SAAUC,EAAQh2B,GAC5CzC,KAAK04B,GAAKD,EACVz4B,KAAKmzB,GAAK1wB,GAGZlG,EAAoB,GAApBA,CAAwBi8B,EAAuB,gBAAiB,SAAShtB,OACvE,IAAImtB,EAAQ34B,KAAK04B,GAAG53B,KAAKd,KAAKmzB,IAC9B,MAAO,CAAEtxB,MAAO82B,EAAOltB,KAAgB,OAAVktB,KAG/Bl6B,EAAQA,EAAQa,EAAG,SAAU,CAC3Bs5B,SAAU,SAASA,SAASH,GAE1B,GADA32B,EAAQ9B,OACHgZ,EAASyf,GAAS,MAAM/3B,UAAU+3B,EAAS,qBAChD,IAAIr5B,EAAIwD,OAAO5C,MACX64B,EAAQ,UAAWN,EAAc31B,OAAO61B,EAAOI,OAASP,EAASz7B,KAAK47B,GACtEK,EAAK,IAAIllB,OAAO6kB,EAAO95B,QAASk6B,EAAMrsB,QAAQ,KAAOqsB,EAAQ,IAAMA,GAEvE,OADAC,EAAGC,UAAYl1B,EAAS40B,EAAOM,WACxB,IAAIP,EAAsBM,EAAI15B,OAOnC,SAAU1C,EAAQD,EAASF,GAKjC,IAAI+E,EAAW/E,EAAoB,GACnCG,EAAOD,QAAU,WACf,IAAI4G,EAAO/B,EAAStB,MAChB6E,EAAS,GAMb,OALIxB,EAAKlF,SAAQ0G,GAAU,KACvBxB,EAAK21B,aAAYn0B,GAAU,KAC3BxB,EAAK41B,YAAWp0B,GAAU,KAC1BxB,EAAK61B,UAASr0B,GAAU,KACxBxB,EAAK81B,SAAQt0B,GAAU,KACpBA,IAMH,SAAUnI,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,kBAKlB,SAAUG,EAAQD,EAASF,GAEjCA,EAAoB,GAApBA,CAAwB,eAKlB,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BohB,EAAUphB,EAAoB,IAC9BiH,EAAYjH,EAAoB,IAChCkH,EAAOlH,EAAoB,IAC3By0B,EAAiBz0B,EAAoB,IAEzCkC,EAAQA,EAAQW,EAAG,SAAU,CAC3Bg6B,0BAA2B,SAASA,0BAA0Bv7B,GAO5D,IANA,IAKIe,EAAKmP,EALLpM,EAAI6B,EAAU3F,GACdw7B,EAAU51B,EAAK/B,EACf0G,EAAOuV,EAAQhc,GACfkD,EAAS,GACTlI,EAAI,EAEaA,EAAdyL,EAAKlI,SACV6N,EAAOsrB,EAAQ13B,EAAG/C,EAAMwJ,EAAKzL,SAChBP,IAAW40B,EAAensB,EAAQjG,EAAKmP,GAEtD,OAAOlJ,MAOL,SAAUnI,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B+8B,EAAU/8B,EAAoB,IAApBA,EAAyB,GAEvCkC,EAAQA,EAAQW,EAAG,SAAU,CAC3B8I,OAAQ,SAASA,OAAOzH,GACtB,OAAO64B,EAAQ74B,OAOb,SAAU/D,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BqZ,EAAWrZ,EAAoB,IAApBA,EAAyB,GAExCkC,EAAQA,EAAQW,EAAG,SAAU,CAC3BkJ,QAAS,SAASA,QAAQ7H,GACxB,OAAOmV,EAASnV,OAOd,SAAU/D,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B0F,EAAW1F,EAAoB,GAC/B4G,EAAY5G,EAAoB,IAChC6c,EAAkB7c,EAAoB,GAG1CA,EAAoB,IAAMkC,EAAQA,EAAQa,EAAI/C,EAAoB,IAAK,SAAU,CAC/Eg9B,iBAAkB,SAASA,iBAAiBj6B,EAAGpC,GAC7Ckc,EAAgB1X,EAAEO,EAASjC,MAAOV,EAAG,CAAE9B,IAAK2F,EAAUjG,GAASK,YAAY,EAAMD,cAAc,QAO7F,SAAUZ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B0F,EAAW1F,EAAoB,GAC/B4G,EAAY5G,EAAoB,IAChC6c,EAAkB7c,EAAoB,GAG1CA,EAAoB,IAAMkC,EAAQA,EAAQa,EAAI/C,EAAoB,IAAK,SAAU,CAC/Ewa,iBAAkB,SAASA,iBAAiBzX,EAAG+pB,GAC7CjQ,EAAgB1X,EAAEO,EAASjC,MAAOV,EAAG,CAAE+K,IAAKlH,EAAUkmB,GAAS9rB,YAAY,EAAMD,cAAc,QAO7F,SAAUZ,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B0F,EAAW1F,EAAoB,GAC/BiF,EAAcjF,EAAoB,IAClC6F,EAAiB7F,EAAoB,IACrCmH,EAA2BnH,EAAoB,IAAImF,EAGvDnF,EAAoB,IAAMkC,EAAQA,EAAQa,EAAI/C,EAAoB,IAAK,SAAU,CAC/Ei9B,iBAAkB,SAASA,iBAAiBl6B,GAC1C,IAEIyW,EAFApU,EAAIM,EAASjC,MACb8W,EAAItV,EAAYlC,GAAG,GAEvB,GACE,GAAIyW,EAAIrS,EAAyB/B,EAAGmV,GAAI,OAAOf,EAAEvY,UAC1CmE,EAAIS,EAAeT,QAO1B,SAAUjF,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9B0F,EAAW1F,EAAoB,GAC/BiF,EAAcjF,EAAoB,IAClC6F,EAAiB7F,EAAoB,IACrCmH,EAA2BnH,EAAoB,IAAImF,EAGvDnF,EAAoB,IAAMkC,EAAQA,EAAQa,EAAI/C,EAAoB,IAAK,SAAU,CAC/Ek9B,iBAAkB,SAASA,iBAAiBn6B,GAC1C,IAEIyW,EAFApU,EAAIM,EAASjC,MACb8W,EAAItV,EAAYlC,GAAG,GAEvB,GACE,GAAIyW,EAAIrS,EAAyB/B,EAAGmV,GAAI,OAAOf,EAAE1L,UAC1C1I,EAAIS,EAAeT,QAO1B,SAAUjF,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQa,EAAIb,EAAQ6B,EAAG,MAAO,CAAEknB,OAAQjrB,EAAoB,IAApBA,CAAyB,UAKnE,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQa,EAAIb,EAAQ6B,EAAG,MAAO,CAAEknB,OAAQjrB,EAAoB,IAApBA,CAAyB,UAKnE,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,QAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjCA,EAAoB,GAApBA,CAAwB,YAKlB,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQS,EAAG,CAAEf,OAAQ5B,EAAoB,MAK3C,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,SAAU,CAAEjB,OAAQ5B,EAAoB,MAKrD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BgW,EAAMhW,EAAoB,IAE9BkC,EAAQA,EAAQW,EAAG,QAAS,CAC1Bs6B,QAAS,SAASA,QAAQj5B,GACxB,MAAmB,UAAZ8R,EAAI9R,OAOT,SAAU/D,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBu6B,MAAO,SAASA,MAAMjhB,EAAGkhB,EAAOC,GAC9B,OAAOj5B,KAAKS,IAAIw4B,EAAOj5B,KAAK0R,IAAIsnB,EAAOlhB,QAOrC,SAAUhc,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAE06B,YAAal5B,KAAKm5B,GAAK,OAK9C,SAAUr9B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9By9B,EAAc,IAAMp5B,KAAKm5B,GAE7Bt7B,EAAQA,EAAQW,EAAG,OAAQ,CACzB66B,QAAS,SAASA,QAAQC,GACxB,OAAOA,EAAUF,MAOf,SAAUt9B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BkrB,EAAQlrB,EAAoB,KAC5B2mB,EAAS3mB,EAAoB,KAEjCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzB+6B,OAAQ,SAASA,OAAOzhB,EAAGgP,EAAOC,EAAQC,EAAQC,GAChD,OAAO3E,EAAOuE,EAAM/O,EAAGgP,EAAOC,EAAQC,EAAQC,QAO5C,SAAUnrB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBg7B,MAAO,SAASA,MAAMC,EAAIC,EAAIC,EAAIC,GAChC,IAAIC,EAAMJ,IAAO,EAEbK,EAAMH,IAAO,EACjB,OAFUD,IAAO,IAEHE,IAAO,KAAOC,EAAMC,GAAOD,EAAMC,KAASD,EAAMC,IAAQ,MAAQ,IAAM,MAOlF,SAAUh+B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBu7B,MAAO,SAASA,MAAMN,EAAIC,EAAIC,EAAIC,GAChC,IAAIC,EAAMJ,IAAO,EAEbK,EAAMH,IAAO,EACjB,OAFUD,IAAO,IAEHE,IAAO,MAAQC,EAAMC,IAAQD,EAAMC,GAAOD,EAAMC,IAAQ,KAAO,IAAM,MAOjF,SAAUh+B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBw7B,MAAO,SAASA,MAAMC,EAAGjsB,GACvB,IACIksB,GAAMD,EACNE,GAAMnsB,EACNosB,EAHS,MAGJF,EACLG,EAJS,MAIJF,EACLG,EAAKJ,GAAM,GACXK,EAAKJ,GAAM,GACX9O,GAAKiP,EAAKD,IAAO,IAAMD,EAAKC,IAAO,IACvC,OAAOC,EAAKC,GAAMlP,GAAK,MAAQ+O,EAAKG,IAAO,IAR9B,MAQoClP,IAAe,QAO9D,SAAUvvB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAE46B,YAAa,IAAMp5B,KAAKm5B,MAK/C,SAAUr9B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9Bu9B,EAAcl5B,KAAKm5B,GAAK,IAE5Bt7B,EAAQA,EAAQW,EAAG,OAAQ,CACzB86B,QAAS,SAASA,QAAQD,GACxB,OAAOA,EAAUH,MAOf,SAAUp9B,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAEqoB,MAAOlrB,EAAoB,QAKlD,SAAUG,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CACzBg8B,MAAO,SAASA,MAAMP,EAAGjsB,GACvB,IACIksB,GAAMD,EACNE,GAAMnsB,EACNosB,EAHS,MAGJF,EACLG,EAJS,MAIJF,EACLG,EAAKJ,IAAO,GACZK,EAAKJ,IAAO,GACZ9O,GAAKiP,EAAKD,IAAO,IAAMD,EAAKC,IAAO,IACvC,OAAOC,EAAKC,GAAMlP,IAAM,MAAQ+O,EAAKG,IAAO,IAR/B,MAQqClP,KAAgB,QAOhE,SAAUvvB,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAG,OAAQ,CAAEi8B,QAAS,SAASA,QAAQ3iB,GAErD,OAAQA,GAAKA,IAAMA,EAAIA,EAAS,GAALA,EAAS,EAAIA,GAAKF,SAAe,EAAJE,MAMpD,SAAUhc,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B6B,EAAO7B,EAAoB,IAC3B4B,EAAS5B,EAAoB,GAC7B8J,EAAqB9J,EAAoB,IACzC81B,EAAiB91B,EAAoB,KAEzCkC,EAAQA,EAAQa,EAAIb,EAAQ6B,EAAG,UAAW,CAAEg7B,UAAW,SAAUC,GAC/D,IAAI17B,EAAIwG,EAAmBrG,KAAM5B,EAAK8d,SAAW/d,EAAO+d,SACpDsf,EAAiC,mBAAbD,EACxB,OAAOv7B,KAAK+c,KACVye,EAAa,SAAU9iB,GACrB,OAAO2Z,EAAexyB,EAAG07B,KAAaxe,KAAK,WAAc,OAAOrE,KAC9D6iB,EACJC,EAAa,SAAUz6B,GACrB,OAAOsxB,EAAexyB,EAAG07B,KAAaxe,KAAK,WAAc,MAAMhc,KAC7Dw6B,OAOF,SAAU7+B,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9BmnB,EAAuBnnB,EAAoB,IAC3C61B,EAAU71B,EAAoB,KAElCkC,EAAQA,EAAQW,EAAG,UAAW,CAAEq8B,MAAO,SAAUh3B,GAC/C,IAAIkf,EAAoBD,EAAqBhiB,EAAE1B,MAC3C6E,EAASutB,EAAQ3tB,GAErB,OADCI,EAAO9D,EAAI4iB,EAAkBpG,OAASoG,EAAkB9G,SAAShY,EAAO+J,GAClE+U,EAAkB7G,YAMrB,SAAUpgB,EAAQD,EAASF,GAEjC,IAAIm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/Bo/B,EAAYD,EAAS98B,IACrBg9B,EAA4BF,EAASrxB,IAEzCqxB,EAASr2B,IAAI,CAAEw2B,eAAgB,SAASA,eAAeC,EAAaC,EAAen8B,EAAQgQ,GACzFgsB,EAA0BE,EAAaC,EAAez6B,EAAS1B,GAAS+7B,EAAU/rB,QAM9E,SAAUlT,EAAQD,EAASF,GAEjC,IAAIm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/Bo/B,EAAYD,EAAS98B,IACrB+Q,EAAyB+rB,EAAS9uB,IAClC5L,EAAQ06B,EAAS16B,MAErB06B,EAASr2B,IAAI,CAAE22B,eAAgB,SAASA,eAAeF,EAAal8B,GAClE,IAAIgQ,EAAY3P,UAAUC,OAAS,EAAI9D,GAAYu/B,EAAU17B,UAAU,IACnE+P,EAAcL,EAAuBrO,EAAS1B,GAASgQ,GAAW,GACtE,GAAII,IAAgB5T,KAAc4T,EAAoB,UAAE8rB,GAAc,OAAO,EAC7E,GAAI9rB,EAAYyG,KAAM,OAAO,EAC7B,IAAI5G,EAAiB7O,EAAMxD,IAAIoC,GAE/B,OADAiQ,EAAuB,UAAED,KAChBC,EAAe4G,MAAQzV,EAAc,UAAEpB,OAM5C,SAAUlD,EAAQD,EAASF,GAEjC,IAAIm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/B6F,EAAiB7F,EAAoB,IACrC0/B,EAAyBP,EAASn9B,IAClC29B,EAAyBR,EAASl+B,IAClCm+B,EAAYD,EAAS98B,IAErBu9B,EAAsB,SAAUpsB,EAAapO,EAAGrC,GAElD,GADa28B,EAAuBlsB,EAAapO,EAAGrC,GACxC,OAAO48B,EAAuBnsB,EAAapO,EAAGrC,GAC1D,IAAIkd,EAASpa,EAAeT,GAC5B,OAAkB,OAAX6a,EAAkB2f,EAAoBpsB,EAAayM,EAAQld,GAAKlD,IAGzEs/B,EAASr2B,IAAI,CAAE+2B,YAAa,SAASA,YAAYN,EAAal8B,GAC5D,OAAOu8B,EAAoBL,EAAax6B,EAAS1B,GAASK,UAAUC,OAAS,EAAI9D,GAAYu/B,EAAU17B,UAAU,SAM7G,SAAUvD,EAAQD,EAASF,GAEjC,IAAI+nB,EAAM/nB,EAAoB,KAC1B0O,EAAO1O,EAAoB,KAC3Bm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/B6F,EAAiB7F,EAAoB,IACrC8/B,EAA0BX,EAAStzB,KACnCuzB,EAAYD,EAAS98B,IAErB09B,EAAuB,SAAU36B,EAAGrC,GACtC,IAAIi9B,EAAQF,EAAwB16B,EAAGrC,GACnCkd,EAASpa,EAAeT,GAC5B,GAAe,OAAX6a,EAAiB,OAAO+f,EAC5B,IAAIC,EAAQF,EAAqB9f,EAAQld,GACzC,OAAOk9B,EAAMt8B,OAASq8B,EAAMr8B,OAAS+K,EAAK,IAAIqZ,EAAIiY,EAAMltB,OAAOmtB,KAAWA,EAAQD,GAGpFb,EAASr2B,IAAI,CAAEo3B,gBAAiB,SAASA,gBAAgB78B,GACvD,OAAO08B,EAAqBh7B,EAAS1B,GAASK,UAAUC,OAAS,EAAI9D,GAAYu/B,EAAU17B,UAAU,SAMjG,SAAUvD,EAAQD,EAASF,GAEjC,IAAIm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/B2/B,EAAyBR,EAASl+B,IAClCm+B,EAAYD,EAAS98B,IAEzB88B,EAASr2B,IAAI,CAAEq3B,eAAgB,SAASA,eAAeZ,EAAal8B,GAClE,OAAOs8B,EAAuBJ,EAAax6B,EAAS1B,GAChDK,UAAUC,OAAS,EAAI9D,GAAYu/B,EAAU17B,UAAU,SAMvD,SAAUvD,EAAQD,EAASF,GAEjC,IAAIm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/B8/B,EAA0BX,EAAStzB,KACnCuzB,EAAYD,EAAS98B,IAEzB88B,EAASr2B,IAAI,CAAEs3B,mBAAoB,SAASA,mBAAmB/8B,GAC7D,OAAOy8B,EAAwB/6B,EAAS1B,GAASK,UAAUC,OAAS,EAAI9D,GAAYu/B,EAAU17B,UAAU,SAMpG,SAAUvD,EAAQD,EAASF,GAEjC,IAAIm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/B6F,EAAiB7F,EAAoB,IACrC0/B,EAAyBP,EAASn9B,IAClCo9B,EAAYD,EAAS98B,IAErBg+B,EAAsB,SAAU7sB,EAAapO,EAAGrC,GAElD,GADa28B,EAAuBlsB,EAAapO,EAAGrC,GACxC,OAAO,EACnB,IAAIkd,EAASpa,EAAeT,GAC5B,OAAkB,OAAX6a,GAAkBogB,EAAoB7sB,EAAayM,EAAQld,IAGpEo8B,EAASr2B,IAAI,CAAEw3B,YAAa,SAASA,YAAYf,EAAal8B,GAC5D,OAAOg9B,EAAoBd,EAAax6B,EAAS1B,GAASK,UAAUC,OAAS,EAAI9D,GAAYu/B,EAAU17B,UAAU,SAM7G,SAAUvD,EAAQD,EAASF,GAEjC,IAAIm/B,EAAWn/B,EAAoB,IAC/B+E,EAAW/E,EAAoB,GAC/B0/B,EAAyBP,EAASn9B,IAClCo9B,EAAYD,EAAS98B,IAEzB88B,EAASr2B,IAAI,CAAEy3B,eAAgB,SAASA,eAAehB,EAAal8B,GAClE,OAAOq8B,EAAuBH,EAAax6B,EAAS1B,GAChDK,UAAUC,OAAS,EAAI9D,GAAYu/B,EAAU17B,UAAU,SAMvD,SAAUvD,EAAQD,EAASF,GAEjC,IAAIwgC,EAAYxgC,EAAoB,IAChC+E,EAAW/E,EAAoB,GAC/B4G,EAAY5G,EAAoB,IAChCo/B,EAAYoB,EAAUn+B,IACtBg9B,EAA4BmB,EAAU1yB,IAE1C0yB,EAAU13B,IAAI,CAAEq2B,SAAU,SAASA,SAASI,EAAaC,GACvD,OAAO,SAASiB,UAAUp9B,EAAQgQ,GAChCgsB,EACEE,EAAaC,GACZnsB,IAAcxT,GAAYkF,EAAW6B,GAAWvD,GACjD+7B,EAAU/rB,SAQV,SAAUlT,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9B21B,EAAY31B,EAAoB,GAApBA,GACZ+d,EAAU/d,EAAoB,GAAG+d,QACjC6B,EAA6C,WAApC5f,EAAoB,GAApBA,CAAwB+d,GAErC7b,EAAQA,EAAQS,EAAG,CACjB+9B,KAAM,SAASA,KAAK75B,GAClB,IAAIqZ,EAASN,GAAU7B,EAAQmC,OAC/ByV,EAAUzV,EAASA,EAAOqF,KAAK1e,GAAMA,OAOnC,SAAU1G,EAAQD,EAASF,GAKjC,IAAIkC,EAAUlC,EAAoB,GAC9B4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3B21B,EAAY31B,EAAoB,GAApBA,GACZ2gC,EAAa3gC,EAAoB,EAApBA,CAAuB,cACpC4G,EAAY5G,EAAoB,IAChC+E,EAAW/E,EAAoB,GAC/BkJ,EAAalJ,EAAoB,IACjCoJ,EAAcpJ,EAAoB,IAClC+B,EAAO/B,EAAoB,IAC3B2Z,EAAQ3Z,EAAoB,IAC5B6V,EAAS8D,EAAM9D,OAEfkD,EAAY,SAAUlS,GACxB,OAAa,MAANA,EAAahH,GAAY+G,EAAUC,IAGxC+5B,EAAsB,SAAUC,GAClC,IAAIC,EAAUD,EAAa7mB,GACvB8mB,IACFD,EAAa7mB,GAAKna,GAClBihC,MAIAC,EAAqB,SAAUF,GACjC,OAAOA,EAAaG,KAAOnhC,IAGzBohC,EAAoB,SAAUJ,GAC3BE,EAAmBF,KACtBA,EAAaG,GAAKnhC,GAClB+gC,EAAoBC,KAIpBK,EAAe,SAAUC,EAAUC,GACrCr8B,EAASo8B,GACT19B,KAAKuW,GAAKna,GACV4D,KAAKu9B,GAAKG,EACVA,EAAW,IAAIE,EAAqB59B,MACpC,IACE,IAAIq9B,EAAUM,EAAWD,GACrBN,EAAeC,EACJ,MAAXA,IACiC,mBAAxBA,EAAQQ,YAA4BR,EAAU,WAAcD,EAAaS,eAC/E16B,EAAUk6B,GACfr9B,KAAKuW,GAAK8mB,GAEZ,MAAOt8B,GAEP,YADA28B,EAASzJ,MAAMlzB,GAEXu8B,EAAmBt9B,OAAOm9B,EAAoBn9B,OAGtDy9B,EAAa1/B,UAAY4H,EAAY,GAAI,CACvCk4B,YAAa,SAASA,cAAgBL,EAAkBx9B,SAG1D,IAAI49B,EAAuB,SAAUR,GACnCp9B,KAAKmzB,GAAKiK,GAGZQ,EAAqB7/B,UAAY4H,EAAY,GAAI,CAC/C6F,KAAM,SAASA,KAAK3J,GAClB,IAAIu7B,EAAep9B,KAAKmzB,GACxB,IAAKmK,EAAmBF,GAAe,CACrC,IAAIM,EAAWN,EAAaG,GAC5B,IACE,IAAIzgC,EAAIwY,EAAUooB,EAASlyB,MAC3B,GAAI1O,EAAG,OAAOA,EAAED,KAAK6gC,EAAU77B,GAC/B,MAAOd,GACP,IACEy8B,EAAkBJ,GAClB,QACA,MAAMr8B,MAKdkzB,MAAO,SAASA,MAAMpyB,GACpB,IAAIu7B,EAAep9B,KAAKmzB,GACxB,GAAImK,EAAmBF,GAAe,MAAMv7B,EAC5C,IAAI67B,EAAWN,EAAaG,GAC5BH,EAAaG,GAAKnhC,GAClB,IACE,IAAIU,EAAIwY,EAAUooB,EAASzJ,OAC3B,IAAKn3B,EAAG,MAAM+E,EACdA,EAAQ/E,EAAED,KAAK6gC,EAAU77B,GACzB,MAAOd,GACP,IACEo8B,EAAoBC,GACpB,QACA,MAAMr8B,GAGV,OADEo8B,EAAoBC,GACfv7B,GAETi8B,SAAU,SAASA,SAASj8B,GAC1B,IAAIu7B,EAAep9B,KAAKmzB,GACxB,IAAKmK,EAAmBF,GAAe,CACrC,IAAIM,EAAWN,EAAaG,GAC5BH,EAAaG,GAAKnhC,GAClB,IACE,IAAIU,EAAIwY,EAAUooB,EAASI,UAC3Bj8B,EAAQ/E,EAAIA,EAAED,KAAK6gC,EAAU77B,GAASzF,GACtC,MAAO2E,GACP,IACEo8B,EAAoBC,GACpB,QACA,MAAMr8B,GAGV,OADEo8B,EAAoBC,GACfv7B,MAKb,IAAIk8B,EAAc,SAASC,WAAWL,GACpCl4B,EAAWzF,KAAM+9B,EAAa,aAAc,MAAM9Z,GAAK9gB,EAAUw6B,IAGnEh4B,EAAYo4B,EAAYhgC,UAAW,CACjCkgC,UAAW,SAASA,UAAUP,GAC5B,OAAO,IAAID,EAAaC,EAAU19B,KAAKikB,KAEzC1X,QAAS,SAASA,QAAQnJ,GACxB,IAAIC,EAAOrD,KACX,OAAO,IAAK5B,EAAK8d,SAAW/d,EAAO+d,SAAS,SAAUW,EAASU,GAC7Dpa,EAAUC,GACV,IAAIg6B,EAAe/5B,EAAK46B,UAAU,CAChCzyB,KAAM,SAAU3J,GACd,IACE,OAAOuB,EAAGvB,GACV,MAAOd,GACPwc,EAAOxc,GACPq8B,EAAaS,gBAGjB5J,MAAO1W,EACPugB,SAAUjhB,SAMlBlX,EAAYo4B,EAAa,CACvB9yB,KAAM,SAASA,KAAKyN,GAClB,IAAI7Y,EAAoB,mBAATG,KAAsBA,KAAO+9B,EACxCp6B,EAAS2R,EAAUhU,EAASoX,GAAGwkB,IACnC,GAAIv5B,EAAQ,CACV,IAAIu6B,EAAa58B,EAASqC,EAAO9G,KAAK6b,IACtC,OAAOwlB,EAAW77B,cAAgBxC,EAAIq+B,EAAa,IAAIr+B,EAAE,SAAU69B,GACjE,OAAOQ,EAAWD,UAAUP,KAGhC,OAAO,IAAI79B,EAAE,SAAU69B,GACrB,IAAIjyB,GAAO,EAeX,OAdAymB,EAAU,WACR,IAAKzmB,EAAM,CACT,IACE,GAAIyK,EAAMwC,GAAG,EAAO,SAAUjY,GAE5B,GADAi9B,EAASlyB,KAAK/K,GACVgL,EAAM,OAAO2G,MACZA,EAAQ,OACf,MAAOrR,GACP,GAAI0K,EAAM,MAAM1K,EAEhB,YADA28B,EAASzJ,MAAMlzB,GAEf28B,EAASI,cAGR,WAAcryB,GAAO,MAGhCE,GAAI,SAASA,KACX,IAAK,IAAIhP,EAAI,EAAGC,EAAIqD,UAAUC,OAAQi+B,EAAQ,IAAI/2B,MAAMxK,GAAID,EAAIC,GAAIuhC,EAAMxhC,GAAKsD,UAAUtD,KACzF,OAAO,IAAqB,mBAATqD,KAAsBA,KAAO+9B,GAAa,SAAUL,GACrE,IAAIjyB,GAAO,EASX,OARAymB,EAAU,WACR,IAAKzmB,EAAM,CACT,IAAK,IAAIyM,EAAI,EAAGA,EAAIimB,EAAMj+B,SAAUgY,EAElC,GADAwlB,EAASlyB,KAAK2yB,EAAMjmB,IAChBzM,EAAM,OACViyB,EAASI,cAGR,WAAcryB,GAAO,QAKlCnN,EAAKy/B,EAAYhgC,UAAWm/B,EAAY,WAAc,OAAOl9B,OAE7DvB,EAAQA,EAAQS,EAAG,CAAE8+B,WAAYD,IAEjCxhC,EAAoB,GAApBA,CAAwB,eAKlB,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B6hC,EAAQ7hC,EAAoB,IAChCkC,EAAQA,EAAQS,EAAIT,EAAQe,EAAG,CAC7Bgb,aAAc4jB,EAAM/zB,IACpBqQ,eAAgB0jB,EAAMviB,SAMlB,SAAUnf,EAAQD,EAASF,GAEjCA,EAAoB,IAYpB,IAXA,IAAI4B,EAAS5B,EAAoB,GAC7B+B,EAAO/B,EAAoB,IAC3BgK,EAAYhK,EAAoB,IAChC8hC,EAAgB9hC,EAAoB,EAApBA,CAAuB,eAEvC+hC,EAAe,wbAIUp7B,MAAM,KAE1BvG,EAAI,EAAGA,EAAI2hC,EAAap+B,OAAQvD,IAAK,CAC5C,IAAIoG,EAAOu7B,EAAa3hC,GACpB4hC,EAAapgC,EAAO4E,GACpB+I,EAAQyyB,GAAcA,EAAWxgC,UACjC+N,IAAUA,EAAMuyB,IAAgB//B,EAAKwN,EAAOuyB,EAAet7B,GAC/DwD,EAAUxD,GAAQwD,EAAUa,QAMxB,SAAU1K,EAAQD,EAASF,GAGjC,IAAI4B,EAAS5B,EAAoB,GAC7BkC,EAAUlC,EAAoB,GAC9B0Z,EAAY1Z,EAAoB,IAChCyI,EAAQ,GAAGA,MACXw5B,EAAO,WAAWx7B,KAAKiT,GACvBwT,EAAO,SAAUpf,GACnB,OAAO,SAAUjH,EAAIq7B,GACnB,IAAIC,EAA+B,EAAnBz+B,UAAUC,OACtBiY,IAAOumB,GAAY15B,EAAMnI,KAAKoD,UAAW,GAC7C,OAAOoK,EAAIq0B,EAAY,YAEP,mBAANt7B,EAAmBA,EAAKhD,SAASgD,IAAKjD,MAAMH,KAAMmY,IACxD/U,EAAIq7B,KAGZhgC,EAAQA,EAAQS,EAAIT,EAAQe,EAAIf,EAAQO,EAAIw/B,EAAM,CAChD5iB,WAAY6N,EAAKtrB,EAAOyd,YACxB+iB,YAAalV,EAAKtrB,EAAOwgC,gBAMrB,SAAUjiC,EAAQD,EAASF,GAIjC,IAAI8B,EAAM9B,EAAoB,IAC1BkC,EAAUlC,EAAoB,GAC9B+G,EAAa/G,EAAoB,IACjCub,EAASvb,EAAoB,IAC7BgI,EAAShI,EAAoB,IAC7B6F,EAAiB7F,EAAoB,IACrCob,EAAUpb,EAAoB,IAC9BkF,EAAKlF,EAAoB,GACzBqiC,EAAQriC,EAAoB,KAC5B4G,EAAY5G,EAAoB,IAChC2Z,EAAQ3Z,EAAoB,IAC5BurB,EAAavrB,EAAoB,KACjCqY,EAAcrY,EAAoB,IAClC2O,EAAO3O,EAAoB,IAC3BiE,EAAWjE,EAAoB,GAC/BiH,EAAYjH,EAAoB,IAChC6W,EAAc7W,EAAoB,GAClCgC,EAAMhC,EAAoB,IAU1BsiC,EAAmB,SAAU96B,GAC/B,IAAIE,EAAiB,GAARF,EACTK,EAAmB,GAARL,EACf,OAAO,SAAUlG,EAAQ4G,EAAYpB,GACnC,IAIIzE,EAAK8F,EAAKC,EAJVjD,EAAIrD,EAAIoG,EAAYpB,EAAM,GAC1B1B,EAAI6B,EAAU3F,GACdgH,EAASZ,GAAkB,GAARF,GAAqB,GAARA,EAC5B,IAAoB,mBAAR/D,KAAqBA,KAAO8+B,MAAU1iC,GAE1D,IAAKwC,KAAO+C,EAAG,GAAIpD,EAAIoD,EAAG/C,KAExB+F,EAAMjD,EADNgD,EAAM/C,EAAE/C,GACKA,EAAKf,GACdkG,GACF,GAAIE,EAAQY,EAAOjG,GAAO+F,OACrB,GAAIA,EAAK,OAAQZ,GACpB,KAAK,EAAGc,EAAOjG,GAAO8F,EAAK,MAC3B,KAAK,EAAG,OAAO,EACf,KAAK,EAAG,OAAOA,EACf,KAAK,EAAG,OAAO9F,EACf,KAAK,EAAGiG,EAAOF,EAAI,IAAMA,EAAI,QACxB,GAAIP,EAAU,OAAO,EAGhC,OAAe,GAARL,GAAaK,EAAWA,EAAWS,IAG1Ck6B,EAAUF,EAAiB,GAE3BG,EAAiB,SAAUzpB,GAC7B,OAAO,SAAU9U,GACf,OAAO,IAAIw+B,EAAax+B,EAAI8U,KAG5B0pB,EAAe,SAAUrlB,EAAUrE,GACrCvV,KAAK+S,GAAKvP,EAAUoW,GACpB5Z,KAAKk0B,GAAKvc,EAAQiC,GAClB5Z,KAAK6Z,GAAK,EACV7Z,KAAK8Z,GAAKvE,GAmBZ,SAASupB,KAAKzsB,GACZ,IAAI6sB,EAAO36B,EAAO,MAQlB,OAPI8N,GAAYjW,KACV0rB,EAAWzV,GACb6D,EAAM7D,GAAU,EAAM,SAAUzT,EAAKiD,GACnCq9B,EAAKtgC,GAAOiD,IAETiW,EAAOonB,EAAM7sB,IAEf6sB,EA1BTtqB,EAAYqqB,EAAc,OAAQ,WAChC,IAIIrgC,EAJAyE,EAAOrD,KACP2B,EAAI0B,EAAK0P,GACT3K,EAAO/E,EAAK6wB,GACZ3e,EAAOlS,EAAKyW,GAEhB,GACE,GAAe1R,EAAKlI,QAAhBmD,EAAKwW,GAEP,OADAxW,EAAK0P,GAAK3W,GACH8O,EAAK,UAEN3M,EAAIoD,EAAG/C,EAAMwJ,EAAK/E,EAAKwW,QACjC,OAA2B3O,EAAK,EAApB,QAARqK,EAA+B3W,EACvB,UAAR2W,EAAiC5T,EAAE/C,GACxB,CAACA,EAAK+C,EAAE/C,OAczBkgC,KAAK/gC,UAAY,KAwCjBU,EAAQA,EAAQS,EAAIT,EAAQO,EAAG,CAAE8/B,KAAMA,OAEvCrgC,EAAQA,EAAQW,EAAG,OAAQ,CACzBgJ,KAAM42B,EAAe,QACrB92B,OAAQ82B,EAAe,UACvB12B,QAAS02B,EAAe,WACxBzyB,QAASsyB,EAAiB,GAC1BjyB,IAAKiyB,EAAiB,GACtB1yB,OAAQ0yB,EAAiB,GACzB9xB,KAAM8xB,EAAiB,GACvB5yB,MAAO4yB,EAAiB,GACxBzyB,KAAMyyB,EAAiB,GACvBE,QAASA,EACTI,SAAUN,EAAiB,GAC3Bn2B,OApDF,SAASA,OAAO7K,EAAQwN,EAAO6rB,GAC7B/zB,EAAUkI,GACV,IAIIiY,EAAM1kB,EAJN+C,EAAI6B,EAAU3F,GACduK,EAAOuP,EAAQhW,GACfzB,EAASkI,EAAKlI,OACdvD,EAAI,EAER,GAAIsD,UAAUC,OAAS,EAAG,CACxB,IAAKA,EAAQ,MAAMQ,UAAU,gDAC7B4iB,EAAO3hB,EAAEyG,EAAKzL,WACT2mB,EAAOlmB,OAAO85B,GACrB,KAAgBv6B,EAATuD,GAAgB3B,EAAIoD,EAAG/C,EAAMwJ,EAAKzL,QACvC2mB,EAAOjY,EAAMiY,EAAM3hB,EAAE/C,GAAMA,EAAKf,IAElC,OAAOylB,GAuCPsb,MAAOA,EACPlyB,SArCF,SAASA,SAAS7O,EAAQ0W,GAExB,OAAQA,GAAMA,EAAKqqB,EAAM/gC,EAAQ0W,GAAMwqB,EAAQlhC,EAAQ,SAAU4C,GAE/D,OAAOA,GAAMA,OACPrE,IAiCRmC,IAAKA,EACLf,IA/BF,SAASA,IAAIK,EAAQe,GACnB,GAAIL,EAAIV,EAAQe,GAAM,OAAOf,EAAOe,IA+BpCyL,IA7BF,SAASA,IAAIxM,EAAQe,EAAKiD,GAGxB,OAFIuR,GAAexU,KAAOxB,OAAQqE,EAAGC,EAAE7D,EAAQe,EAAK0E,EAAW,EAAGzB,IAC7DhE,EAAOe,GAAOiD,EACZhE,GA2BPuhC,OAxBF,SAASA,OAAO3+B,GACd,OAAOD,EAASC,IAAO2B,EAAe3B,KAAQq+B,KAAK/gC,cA6B/C,SAAUrB,EAAQD,EAASF,GAEjC,IAAIob,EAAUpb,EAAoB,IAC9BiH,EAAYjH,EAAoB,IACpCG,EAAOD,QAAU,SAAUoB,EAAQ0W,GAMjC,IALA,IAII3V,EAJA+C,EAAI6B,EAAU3F,GACduK,EAAOuP,EAAQhW,GACfzB,EAASkI,EAAKlI,OACd0E,EAAQ,EAEIA,EAAT1E,GAAgB,GAAIyB,EAAE/C,EAAMwJ,EAAKxD,QAAc2P,EAAI,OAAO3V,IAM7D,SAAUlC,EAAQD,EAASF,GAEjC,IAAI+E,EAAW/E,EAAoB,GAC/BiB,EAAMjB,EAAoB,IAC9BG,EAAOD,QAAUF,EAAoB,IAAI8iC,YAAc,SAAU5+B,GAC/D,IAAI8K,EAAS/N,EAAIiD,GACjB,GAAqB,mBAAV8K,EAAsB,MAAM7K,UAAUD,EAAK,qBACtD,OAAOa,EAASiK,EAAO1O,KAAK4D,MAMxB,SAAU/D,EAAQD,EAASF,GAEjC,IAAI4B,EAAS5B,EAAoB,GAC7B6B,EAAO7B,EAAoB,IAC3BkC,EAAUlC,EAAoB,GAC9B+iC,EAAU/iC,EAAoB,KAElCkC,EAAQA,EAAQS,EAAIT,EAAQO,EAAG,CAC7BugC,MAAO,SAASA,MAAMd,GACpB,OAAO,IAAKrgC,EAAK8d,SAAW/d,EAAO+d,SAAS,SAAUW,GACpDjB,WAAW0jB,EAAQziC,KAAKggB,GAAS,GAAO4hB,SAQxC,SAAU/hC,EAAQD,EAASF,GAEjC,IAAIwrB,EAAOxrB,EAAoB,KAC3BkC,EAAUlC,EAAoB,GAGlCA,EAAoB,IAAI2T,EAAI6X,EAAK7X,EAAI6X,EAAK7X,GAAK,GAE/CzR,EAAQA,EAAQa,EAAIb,EAAQO,EAAG,WAAY,CAAEoiB,KAAM7kB,EAAoB,QAKjE,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAIX,EAAQO,EAAG,SAAU,CAAEwB,SAAUjE,EAAoB,MAKnE,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAElCkC,EAAQA,EAAQW,EAAIX,EAAQO,EAAG,SAAU,CAAE8G,QAASvJ,EAAoB,OAKlE,SAAUG,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B2rB,EAAS3rB,EAAoB,KAEjCkC,EAAQA,EAAQW,EAAIX,EAAQO,EAAG,SAAU,CAAEkpB,OAAQA,KAK7C,SAAUxrB,EAAQD,EAASF,GAEjC,IAAIkC,EAAUlC,EAAoB,GAC9B2rB,EAAS3rB,EAAoB,KAC7BgI,EAAShI,EAAoB,IAEjCkC,EAAQA,EAAQW,EAAIX,EAAQO,EAAG,SAAU,CACvCwgC,KAAM,SAAU1zB,EAAOqc,GACrB,OAAOD,EAAO3jB,EAAOuH,GAAQqc,OAO3B,SAAUzrB,EAAQD,EAASF,GAIjCA,EAAoB,GAApBA,CAAwBswB,OAAQ,SAAU,SAAUjT,GAClD5Z,KAAKkkB,IAAMtK,EACX5Z,KAAK6Z,GAAK,GACT,WACD,IAAIld,EAAIqD,KAAK6Z,KACTpO,IAAS9O,EAAIqD,KAAKkkB,IACtB,MAAO,CAAEzY,KAAMA,EAAM5J,MAAO4J,EAAOrP,GAAYO,MAM3C,SAAUD,EAAQD,EAASF,GAGjC,IAAIkC,EAAUlC,EAAoB,GAC9BkjC,EAAMljC,EAAoB,GAApBA,CAAwB,sBAAuB,QAEzDkC,EAAQA,EAAQW,EAAG,SAAU,CAAEsgC,OAAQ,SAASA,OAAOj/B,GAAM,OAAOg/B,EAAIh/B,OAKlE,SAAU/D,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BkjC,EAAMljC,EAAoB,GAApBA,CAAwB,WAAY,CAC5CojC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,WAGPthC,EAAQA,EAAQa,EAAIb,EAAQO,EAAG,SAAU,CAAEghC,WAAY,SAASA,aAAe,OAAOP,EAAIz/B,UAKpF,SAAUtD,EAAQD,EAASF,GAIjC,IAAIkC,EAAUlC,EAAoB,GAC9BkjC,EAAMljC,EAAoB,GAApBA,CAAwB,6BAA8B,CAC9D0jC,QAAS,IACTC,OAAQ,IACRC,OAAQ,IACRC,SAAU,IACVC,SAAU,MAGZ5hC,EAAQA,EAAQa,EAAIb,EAAQO,EAAG,SAAU,CAAEshC,aAAc,SAASA,eAAiB,OAAOb,EAAIz/B,YAMzE,oBAAVtD,QAAyBA,OAAOD,QAASC,OAAOD,QAAUP,EAE3C,mBAAVgsB,QAAwBA,OAAOqY,IAAKrY,OAAO,WAAc,OAAOhsB,IAE3EC,EAAIiC,KAAOlC,EA39Pf,CA49PC,EAAG","file":"library.min.js"} \ No newline at end of file diff --git a/node_modules/core-js/client/shim.js b/node_modules/core-js/client/shim.js new file mode 100644 index 00000000..ea722e8f --- /dev/null +++ b/node_modules/core-js/client/shim.js @@ -0,0 +1,8663 @@ +/** + * core-js 2.6.9 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2019 Denis Pushkarev + */ +!function(__e, __g, undefined){ +'use strict'; +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 129); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(26); +var hide = __webpack_require__(11); +var redefine = __webpack_require__(12); +var ctx = __webpack_require__(18); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // extend global + if (target) redefine(target, key, out, type & $export.U); + // export + if (exports[key] != out) hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } +}; +global.core = core; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(4); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(47)('wks'); +var uid = __webpack_require__(33); +var Symbol = __webpack_require__(2).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(20); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(3)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var IE8_DOM_DEFINE = __webpack_require__(93); +var toPrimitive = __webpack_require__(22); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(7) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(23); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var createDesc = __webpack_require__(32); +module.exports = __webpack_require__(7) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var hide = __webpack_require__(11); +var has = __webpack_require__(14); +var SRC = __webpack_require__(33)('src'); +var $toString = __webpack_require__(131); +var TO_STRING = 'toString'; +var TPL = ('' + $toString).split(TO_STRING); + +__webpack_require__(26).inspectSource = function (it) { + return $toString.call(it); +}; + +(module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) has(val, 'name') || hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if (O === global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + hide(O, key, val); + } +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative +})(Function.prototype, TO_STRING, function toString() { + return typeof this == 'function' && this[SRC] || $toString.call(this); +}); + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var fails = __webpack_require__(3); +var defined = __webpack_require__(23); +var quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; +}; +module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export($export.P + $export.F * fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), 'String', O); +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(48); +var defined = __webpack_require__(23); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(49); +var createDesc = __webpack_require__(32); +var toIObject = __webpack_require__(15); +var toPrimitive = __webpack_require__(22); +var has = __webpack_require__(14); +var IE8_DOM_DEFINE = __webpack_require__(93); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__(7) ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return gOPD(O, P); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +}; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(14); +var toObject = __webpack_require__(9); +var IE_PROTO = __webpack_require__(68)('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(10); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var fails = __webpack_require__(3); + +module.exports = function (method, arg) { + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call + arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); + }); +}; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(4); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(0); +var core = __webpack_require__(26); +var fails = __webpack_require__(3); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = __webpack_require__(18); +var IObject = __webpack_require__(48); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(6); +var asc = __webpack_require__(84); +module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (;length > index; index++) if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) result[index] = res; // map + else if (res) switch (TYPE) { + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; +}; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.6.9' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +if (__webpack_require__(7)) { + var LIBRARY = __webpack_require__(29); + var global = __webpack_require__(2); + var fails = __webpack_require__(3); + var $export = __webpack_require__(0); + var $typed = __webpack_require__(62); + var $buffer = __webpack_require__(92); + var ctx = __webpack_require__(18); + var anInstance = __webpack_require__(39); + var propertyDesc = __webpack_require__(32); + var hide = __webpack_require__(11); + var redefineAll = __webpack_require__(41); + var toInteger = __webpack_require__(20); + var toLength = __webpack_require__(6); + var toIndex = __webpack_require__(122); + var toAbsoluteIndex = __webpack_require__(35); + var toPrimitive = __webpack_require__(22); + var has = __webpack_require__(14); + var classof = __webpack_require__(44); + var isObject = __webpack_require__(4); + var toObject = __webpack_require__(9); + var isArrayIter = __webpack_require__(81); + var create = __webpack_require__(36); + var getPrototypeOf = __webpack_require__(17); + var gOPN = __webpack_require__(37).f; + var getIterFn = __webpack_require__(83); + var uid = __webpack_require__(33); + var wks = __webpack_require__(5); + var createArrayMethod = __webpack_require__(25); + var createArrayIncludes = __webpack_require__(52); + var speciesConstructor = __webpack_require__(51); + var ArrayIterators = __webpack_require__(86); + var Iterators = __webpack_require__(46); + var $iterDetect = __webpack_require__(57); + var setSpecies = __webpack_require__(38); + var arrayFill = __webpack_require__(85); + var arrayCopyWithin = __webpack_require__(110); + var $DP = __webpack_require__(8); + var $GOPD = __webpack_require__(16); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { + new Uint8Array(1).set({}); + }); + + var toOffset = function (it, BYTES) { + var offset = toInteger(it); + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!'); + } return new C(length); + }; + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function (C, list) { + var index = 0; + var length = list.length; + var result = allocate(C, length); + while (length > index) result[index] = list[index++]; + return result; + }; + + var addGetter = function (it, key, internal) { + dP(it, key, { get: function () { return this._d[internal]; } }); + }; + + var $from = function from(source /* , mapfn, thisArg */) { + var O = toObject(source); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var i, length, values, result, step, iterator; + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value); + } O = values; + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/* ...items */) { + var index = 0; + var length = arguments.length; + var result = allocate(this, length); + while (length > index) result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); + + var $toLocaleString = function toLocaleString() { + return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); + }; + + var proto = { + copyWithin: function copyWithin(target, start /* , end */) { + return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); + }, + every: function every(callbackfn /* , thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /* , thisArg */) { + return speciesFromList(this, arrayFilter(validate(this), callbackfn, + arguments.length > 1 ? arguments[1] : undefined)); + }, + find: function find(predicate /* , thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /* , thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /* , thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /* , fromIndex */) { + return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + includes: function includes(searchElement /* , fromIndex */) { + return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + join: function join(separator) { // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /* , thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse() { + var that = this; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + some: function some(callbackfn /* , thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn) { + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end) { + var O = validate(this); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var index = 0; + if (len + offset > length) throw RangeError(WRONG_LENGTH); + while (index < len) this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries() { + return arrayEntries.call(validate(this)); + }, + keys: function keys() { + return arrayKeys.call(validate(this)); + }, + values: function values() { + return arrayValues.call(validate(this)); + } + }; + + var isTAIndex = function (target, key) { + return isObject(target) + && target[TYPED_ARRAY] + && typeof key != 'symbol' + && key in target + && String(+key) == String(key); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key) { + return isTAIndex(target, key = toPrimitive(key, true)) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc) { + if (isTAIndex(target, key = toPrimitive(key, true)) + && isObject(desc) + && has(desc, 'value') + && !has(desc, 'get') + && !has(desc, 'set') + // TODO: add validation descriptor w/o calling accessors + && !desc.configurable + && (!has(desc, 'writable') || desc.writable) + && (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value; + return target; + } return dP(target, key, desc); + }; + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc + }); + + if (fails(function () { arrayToString.call({}); })) { + arrayToString = arrayToLocaleString = function toString() { + return arrayJoin.call(this); + }; + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { /* noop */ }, + toString: arrayToString, + toLocaleString: $toLocaleString + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function () { return this[TYPED_ARRAY]; } + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function (that, index) { + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function (that, index, value) { + var data = that._d; + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true + }); + }; + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d'); + var index = 0; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer) + }); + while (index < length) addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if (!fails(function () { + TypedArray(1); + }) || !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true)) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(toIndex(data)); + if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); + }); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR]; + var CORRECT_ITER_NAME = !!$nativeIterator + && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { return NAME; } + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES + }); + + $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { + from: $from, + of: $of + }); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; + + $export($export.P + $export.F * fails(function () { + new TypedArray(1).slice(); + }), NAME, { slice: $slice }); + + $export($export.P + $export.F * (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + }) || !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), NAME, { toLocaleString: $toLocaleString }); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); + }; +} else module.exports = function () { /* empty */ }; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +var Map = __webpack_require__(116); +var $export = __webpack_require__(0); +var shared = __webpack_require__(47)('metadata'); +var store = shared.store || (shared.store = new (__webpack_require__(119))()); + +var getOrCreateMetadataMap = function (target, targetKey, create) { + var targetMetadata = store.get(target); + if (!targetMetadata) { + if (!create) return undefined; + store.set(target, targetMetadata = new Map()); + } + var keyMetadata = targetMetadata.get(targetKey); + if (!keyMetadata) { + if (!create) return undefined; + targetMetadata.set(targetKey, keyMetadata = new Map()); + } return keyMetadata; +}; +var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); +}; +var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); +}; +var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); +}; +var ordinaryOwnMetadataKeys = function (target, targetKey) { + var metadataMap = getOrCreateMetadataMap(target, targetKey, false); + var keys = []; + if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); }); + return keys; +}; +var toMetaKey = function (it) { + return it === undefined || typeof it == 'symbol' ? it : String(it); +}; +var exp = function (O) { + $export($export.S, 'Reflect', O); +}; + +module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp +}; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports) { + +module.exports = false; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(33)('meta'); +var isObject = __webpack_require__(4); +var has = __webpack_require__(14); +var setDesc = __webpack_require__(8).f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__(3)(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.31 Array.prototype[@@unscopables] +var UNSCOPABLES = __webpack_require__(5)('unscopables'); +var ArrayProto = Array.prototype; +if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(11)(ArrayProto, UNSCOPABLES, {}); +module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(95); +var enumBugKeys = __webpack_require__(69); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(20); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(1); +var dPs = __webpack_require__(96); +var enumBugKeys = __webpack_require__(69); +var IE_PROTO = __webpack_require__(68)('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(66)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(70).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(95); +var hiddenKeys = __webpack_require__(69).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var dP = __webpack_require__(8); +var DESCRIPTORS = __webpack_require__(7); +var SPECIES = __webpack_require__(5)('species'); + +module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; + + +/***/ }), +/* 39 */ +/***/ (function(module, exports) { + +module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(18); +var call = __webpack_require__(108); +var isArrayIter = __webpack_require__(81); +var anObject = __webpack_require__(1); +var toLength = __webpack_require__(6); +var getIterFn = __webpack_require__(83); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +var redefine = __webpack_require__(12); +module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; +}; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(4); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(8).f; +var has = __webpack_require__(14); +var TAG = __webpack_require__(5)('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(19); +var TAG = __webpack_require__(5)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var defined = __webpack_require__(23); +var fails = __webpack_require__(3); +var spaces = __webpack_require__(73); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var rtrim = RegExp(space + space + '*$'); + +var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); +}; + +// 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim +var trim = exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; +}; + +module.exports = exporter; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(26); +var global = __webpack_require__(2); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __webpack_require__(29) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' +}); + + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(19); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.2.5.3 get RegExp.prototype.flags +var anObject = __webpack_require__(1); +module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; +}; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(1); +var aFunction = __webpack_require__(10); +var SPECIES = __webpack_require__(5)('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(15); +var toLength = __webpack_require__(6); +var toAbsoluteIndex = __webpack_require__(35); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(19); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(20); +var defined = __webpack_require__(23); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.8 IsRegExp(argument) +var isObject = __webpack_require__(4); +var cof = __webpack_require__(19); +var MATCH = __webpack_require__(5)('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(5)('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } + +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var classof = __webpack_require__(44); +var builtinExec = RegExp.prototype.exec; + + // `RegExpExec` abstract operation +// https://tc39.github.io/ecma262/#sec-regexpexec +module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + if (classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver'); + } + return builtinExec.call(R, S); +}; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(112); +var redefine = __webpack_require__(12); +var hide = __webpack_require__(11); +var fails = __webpack_require__(3); +var defined = __webpack_require__(23); +var wks = __webpack_require__(5); +var regexpExec = __webpack_require__(87); + +var SPECIES = wks('species'); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; +}); + +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; +})(); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { execCalled = true; return null; }; + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + } + re[SYMBOL](''); + return !execCalled; + }) : undefined; + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + } + ); + var strfn = fns[0]; + var rxfn = fns[1]; + + redefine(String.prototype, KEY, strfn); + hide(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return rxfn.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return rxfn.call(string, this); } + ); + } +}; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(12); +var redefineAll = __webpack_require__(41); +var meta = __webpack_require__(30); +var forOf = __webpack_require__(40); +var anInstance = __webpack_require__(39); +var isObject = __webpack_require__(4); +var fails = __webpack_require__(3); +var $iterDetect = __webpack_require__(57); +var setToStringTag = __webpack_require__(43); +var inheritIfRequired = __webpack_require__(72); + +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + var fixMethod = function (KEY) { + var fn = proto[KEY]; + redefine(proto, KEY, + KEY == 'delete' ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'has' ? function has(a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'get' ? function get(a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } + : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } + ); + }; + if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base(), target, C); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; +}; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var hide = __webpack_require__(11); +var uid = __webpack_require__(33); +var TYPED = uid('typed_array'); +var VIEW = uid('view'); +var ABV = !!(global.ArrayBuffer && global.DataView); +var CONSTR = ABV; +var i = 0; +var l = 9; +var Typed; + +var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' +).split(','); + +while (i < l) { + if (Typed = global[TypedArrayConstructors[i++]]) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; +} + +module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW +}; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// Forced replacement prototype accessors methods +module.exports = __webpack_require__(29) || !__webpack_require__(3)(function () { + var K = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, K, function () { /* empty */ }); + delete __webpack_require__(2)[K]; +}); + + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = __webpack_require__(0); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); +}; + + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = __webpack_require__(0); +var aFunction = __webpack_require__(10); +var ctx = __webpack_require__(18); +var forOf = __webpack_require__(40); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + } }); +}; + + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(4); +var document = __webpack_require__(2).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var core = __webpack_require__(26); +var LIBRARY = __webpack_require__(29); +var wksExt = __webpack_require__(94); +var defineProperty = __webpack_require__(8).f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(47)('keys'); +var uid = __webpack_require__(33); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), +/* 69 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(2).document; +module.exports = document && document.documentElement; + + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(4); +var anObject = __webpack_require__(1); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = __webpack_require__(18)(Function.call, __webpack_require__(16).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; + + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(4); +var setPrototypeOf = __webpack_require__(71).set; +module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P); + } return that; +}; + + +/***/ }), +/* 73 */ +/***/ (function(module, exports) { + +module.exports = '\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'; + + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toInteger = __webpack_require__(20); +var defined = __webpack_require__(23); + +module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; +}; + + +/***/ }), +/* 75 */ +/***/ (function(module, exports) { + +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; + + +/***/ }), +/* 76 */ +/***/ (function(module, exports) { + +// 20.2.2.14 Math.expm1(x) +var $expm1 = Math.expm1; +module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 +) ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; +} : $expm1; + + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +// helper for String#{startsWith, endsWith, includes} +var isRegExp = __webpack_require__(56); +var defined = __webpack_require__(23); + +module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; + + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +var MATCH = __webpack_require__(5)('match'); +module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { /* empty */ } + } return true; +}; + + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(29); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(12); +var hide = __webpack_require__(11); +var Iterators = __webpack_require__(46); +var $iterCreate = __webpack_require__(80); +var setToStringTag = __webpack_require__(43); +var getPrototypeOf = __webpack_require__(17); +var ITERATOR = __webpack_require__(5)('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(36); +var descriptor = __webpack_require__(32); +var setToStringTag = __webpack_require__(43); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(11)(IteratorPrototype, __webpack_require__(5)('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(46); +var ITERATOR = __webpack_require__(5)('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__(8); +var createDesc = __webpack_require__(32); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(44); +var ITERATOR = __webpack_require__(5)('iterator'); +var Iterators = __webpack_require__(46); +module.exports = __webpack_require__(26).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = __webpack_require__(213); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + +var toObject = __webpack_require__(9); +var toAbsoluteIndex = __webpack_require__(35); +var toLength = __webpack_require__(6); +module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; + + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(31); +var step = __webpack_require__(111); +var Iterators = __webpack_require__(46); +var toIObject = __webpack_require__(15); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(79)(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var regexpFlags = __webpack_require__(50); + +var nativeExec = RegExp.prototype.exec; +// This always refers to the native implementation, because the +// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, +// which loads this file before patching the method. +var nativeReplace = String.prototype.replace; + +var patchedExec = nativeExec; + +var LAST_INDEX = 'lastIndex'; + +var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/, + re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; +})(); + +// nonparticipating capturing group, copied from es5-shim's String#split patch. +var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + +var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + +if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; + + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; +} + +module.exports = patchedExec; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var at = __webpack_require__(55)(true); + + // `AdvanceStringIndex` abstract operation +// https://tc39.github.io/ecma262/#sec-advancestringindex +module.exports = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); +}; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(18); +var invoke = __webpack_require__(101); +var html = __webpack_require__(70); +var cel = __webpack_require__(66); +var global = __webpack_require__(2); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(19)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var macrotask = __webpack_require__(89).set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = __webpack_require__(19)(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; + + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = __webpack_require__(10); + +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var DESCRIPTORS = __webpack_require__(7); +var LIBRARY = __webpack_require__(29); +var $typed = __webpack_require__(62); +var hide = __webpack_require__(11); +var redefineAll = __webpack_require__(41); +var fails = __webpack_require__(3); +var anInstance = __webpack_require__(39); +var toInteger = __webpack_require__(20); +var toLength = __webpack_require__(6); +var toIndex = __webpack_require__(122); +var gOPN = __webpack_require__(37).f; +var dP = __webpack_require__(8).f; +var arrayFill = __webpack_require__(85); +var setToStringTag = __webpack_require__(43); +var ARRAY_BUFFER = 'ArrayBuffer'; +var DATA_VIEW = 'DataView'; +var PROTOTYPE = 'prototype'; +var WRONG_LENGTH = 'Wrong length!'; +var WRONG_INDEX = 'Wrong index!'; +var $ArrayBuffer = global[ARRAY_BUFFER]; +var $DataView = global[DATA_VIEW]; +var Math = global.Math; +var RangeError = global.RangeError; +// eslint-disable-next-line no-shadow-restricted-names +var Infinity = global.Infinity; +var BaseBuffer = $ArrayBuffer; +var abs = Math.abs; +var pow = Math.pow; +var floor = Math.floor; +var log = Math.log; +var LN2 = Math.LN2; +var BUFFER = 'buffer'; +var BYTE_LENGTH = 'byteLength'; +var BYTE_OFFSET = 'byteOffset'; +var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; +var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; +var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + +// IEEE754 conversions based on https://github.com/feross/ieee754 +function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; +} +function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } return (s ? -1 : 1) * m * pow(2, e - mLen); +} + +function unpackI32(bytes) { + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; +} +function packI8(it) { + return [it & 0xff]; +} +function packI16(it) { + return [it & 0xff, it >> 8 & 0xff]; +} +function packI32(it) { + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; +} +function packF64(it) { + return packIEEE754(it, 52, 8); +} +function packF32(it) { + return packIEEE754(it, 23, 4); +} + +function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); +} + +function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); +} +function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; +} + +if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH]; + var offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return get(this, 1, byteOffset)[0] << 24 >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8 | bytes[0]) << 16 >> 16; + }, + getUint16: function getUint16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return bytes[1] << 8 | bytes[0]; + }, + getInt32: function getInt32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + } + }); +} else { + if (!fails(function () { + $ArrayBuffer(1); + }) || !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + })) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(length)); + }; + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)); + var $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + } + }, true); +} +setToStringTag($ArrayBuffer, ARRAY_BUFFER); +setToStringTag($DataView, DATA_VIEW); +hide($DataView[PROTOTYPE], $typed.VIEW, true); +exports[ARRAY_BUFFER] = $ArrayBuffer; +exports[DATA_VIEW] = $DataView; + + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(7) && !__webpack_require__(3)(function () { + return Object.defineProperty(__webpack_require__(66)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(5); + + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(14); +var toIObject = __webpack_require__(15); +var arrayIndexOf = __webpack_require__(52)(false); +var IE_PROTO = __webpack_require__(68)('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var anObject = __webpack_require__(1); +var getKeys = __webpack_require__(34); + +module.exports = __webpack_require__(7) ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(15); +var gOPN = __webpack_require__(37).f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var DESCRIPTORS = __webpack_require__(7); +var getKeys = __webpack_require__(34); +var gOPS = __webpack_require__(53); +var pIE = __webpack_require__(49); +var toObject = __webpack_require__(9); +var IObject = __webpack_require__(48); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(3)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } return T; +} : $assign; + + +/***/ }), +/* 99 */ +/***/ (function(module, exports) { + +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; + + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var aFunction = __webpack_require__(10); +var isObject = __webpack_require__(4); +var invoke = __webpack_require__(101); +var arraySlice = [].slice; +var factories = {}; + +var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); +}; + +module.exports = Function.bind || function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; +}; + + +/***/ }), +/* 101 */ +/***/ (function(module, exports) { + +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; + + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +var cof = __webpack_require__(19); +module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; +}; + + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var isObject = __webpack_require__(4); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; + + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseFloat = __webpack_require__(2).parseFloat; +var $trim = __webpack_require__(45).trim; + +module.exports = 1 / $parseFloat(__webpack_require__(73) + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; + + +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseInt = __webpack_require__(2).parseInt; +var $trim = __webpack_require__(45).trim; +var ws = __webpack_require__(73); +var hex = /^[-+]?0[xX]/; + +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : $parseInt; + + +/***/ }), +/* 106 */ +/***/ (function(module, exports) { + +// 20.2.2.20 Math.log1p(x) +module.exports = Math.log1p || function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); +}; + + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var sign = __webpack_require__(75); +var pow = Math.pow; +var EPSILON = pow(2, -52); +var EPSILON32 = pow(2, -23); +var MAX32 = pow(2, 127) * (2 - EPSILON32); +var MIN32 = pow(2, -126); + +var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; +}; + +module.exports = Math.fround || function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; +}; + + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(1); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +var aFunction = __webpack_require__(10); +var toObject = __webpack_require__(9); +var IObject = __webpack_require__(48); +var toLength = __webpack_require__(6); + +module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var i = isRight ? -1 : 1; + if (aLen < 2) for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; +}; + + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + +var toObject = __webpack_require__(9); +var toAbsoluteIndex = __webpack_require__(35); +var toLength = __webpack_require__(6); + +module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; +}; + + +/***/ }), +/* 111 */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var regexpExec = __webpack_require__(87); +__webpack_require__(0)({ + target: 'RegExp', + proto: true, + forced: regexpExec !== /./.exec +}, { + exec: regexpExec +}); + + +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + +// 21.2.5.3 get RegExp.prototype.flags() +if (__webpack_require__(7) && /./g.flags != 'g') __webpack_require__(8).f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(50) +}); + + +/***/ }), +/* 114 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(4); +var newPromiseCapability = __webpack_require__(91); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + + +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(117); +var validate = __webpack_require__(42); +var MAP = 'Map'; + +// 23.1 Map Objects +module.exports = __webpack_require__(61)(MAP, function (get) { + return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + } +}, strong, true); + + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var dP = __webpack_require__(8).f; +var create = __webpack_require__(36); +var redefineAll = __webpack_require__(41); +var ctx = __webpack_require__(18); +var anInstance = __webpack_require__(39); +var forOf = __webpack_require__(40); +var $iterDefine = __webpack_require__(79); +var step = __webpack_require__(111); +var setSpecies = __webpack_require__(38); +var DESCRIPTORS = __webpack_require__(7); +var fastKey = __webpack_require__(30).fastKey; +var validate = __webpack_require__(42); +var SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + } + }); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; + + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__(117); +var validate = __webpack_require__(42); +var SET = 'Set'; + +// 23.2 Set Objects +module.exports = __webpack_require__(61)(SET, function (get) { + return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); + } +}, strong); + + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var each = __webpack_require__(25)(0); +var redefine = __webpack_require__(12); +var meta = __webpack_require__(30); +var assign = __webpack_require__(98); +var weak = __webpack_require__(120); +var isObject = __webpack_require__(4); +var validate = __webpack_require__(42); +var NATIVE_WEAK_MAP = __webpack_require__(42); +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +var InternalMap; + +var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; +}; + +var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = __webpack_require__(61)(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); +} + + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var redefineAll = __webpack_require__(41); +var getWeak = __webpack_require__(30).getWeak; +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(4); +var anInstance = __webpack_require__(39); +var forOf = __webpack_require__(40); +var createArrayMethod = __webpack_require__(25); +var $has = __webpack_require__(14); +var validate = __webpack_require__(42); +var arrayFind = createArrayMethod(5); +var arrayFindIndex = createArrayMethod(6); +var id = 0; + +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); +}; +var UncaughtFrozenStore = function () { + this.a = []; +}; +var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); +}; +UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore +}; + + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +// all object keys, includes non-enumerable and symbols +var gOPN = __webpack_require__(37); +var gOPS = __webpack_require__(53); +var anObject = __webpack_require__(1); +var Reflect = __webpack_require__(2).Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; + + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = __webpack_require__(20); +var toLength = __webpack_require__(6); +module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; +}; + + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = __webpack_require__(54); +var isObject = __webpack_require__(4); +var toLength = __webpack_require__(6); +var ctx = __webpack_require__(18); +var IS_CONCAT_SPREADABLE = __webpack_require__(5)('isConcatSpreadable'); + +function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; +} + +module.exports = flattenIntoArray; + + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = __webpack_require__(6); +var repeat = __webpack_require__(74); +var defined = __webpack_require__(23); + +module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; +}; + + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(7); +var getKeys = __webpack_require__(34); +var toIObject = __webpack_require__(15); +var isEnum = __webpack_require__(49).f; +module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; + + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = __webpack_require__(44); +var from = __webpack_require__(127); +module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; + + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +var forOf = __webpack_require__(40); + +module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; + + +/***/ }), +/* 128 */ +/***/ (function(module, exports) { + +// https://rwaldron.github.io/proposal-math-extensions/ +module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { + if ( + arguments.length === 0 + // eslint-disable-next-line no-self-compare + || x != x + // eslint-disable-next-line no-self-compare + || inLow != inLow + // eslint-disable-next-line no-self-compare + || inHigh != inHigh + // eslint-disable-next-line no-self-compare + || outLow != outLow + // eslint-disable-next-line no-self-compare + || outHigh != outHigh + ) return NaN; + if (x === Infinity || x === -Infinity) return x; + return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; +}; + + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(130); +__webpack_require__(133); +__webpack_require__(134); +__webpack_require__(135); +__webpack_require__(136); +__webpack_require__(137); +__webpack_require__(138); +__webpack_require__(139); +__webpack_require__(140); +__webpack_require__(141); +__webpack_require__(142); +__webpack_require__(143); +__webpack_require__(144); +__webpack_require__(145); +__webpack_require__(146); +__webpack_require__(147); +__webpack_require__(148); +__webpack_require__(149); +__webpack_require__(150); +__webpack_require__(151); +__webpack_require__(152); +__webpack_require__(153); +__webpack_require__(154); +__webpack_require__(155); +__webpack_require__(156); +__webpack_require__(157); +__webpack_require__(158); +__webpack_require__(159); +__webpack_require__(160); +__webpack_require__(161); +__webpack_require__(162); +__webpack_require__(163); +__webpack_require__(164); +__webpack_require__(165); +__webpack_require__(166); +__webpack_require__(167); +__webpack_require__(168); +__webpack_require__(169); +__webpack_require__(170); +__webpack_require__(171); +__webpack_require__(172); +__webpack_require__(173); +__webpack_require__(174); +__webpack_require__(175); +__webpack_require__(176); +__webpack_require__(177); +__webpack_require__(178); +__webpack_require__(179); +__webpack_require__(180); +__webpack_require__(181); +__webpack_require__(182); +__webpack_require__(183); +__webpack_require__(184); +__webpack_require__(185); +__webpack_require__(186); +__webpack_require__(187); +__webpack_require__(188); +__webpack_require__(189); +__webpack_require__(190); +__webpack_require__(191); +__webpack_require__(192); +__webpack_require__(193); +__webpack_require__(194); +__webpack_require__(195); +__webpack_require__(196); +__webpack_require__(197); +__webpack_require__(198); +__webpack_require__(199); +__webpack_require__(200); +__webpack_require__(201); +__webpack_require__(202); +__webpack_require__(203); +__webpack_require__(204); +__webpack_require__(205); +__webpack_require__(206); +__webpack_require__(207); +__webpack_require__(208); +__webpack_require__(209); +__webpack_require__(210); +__webpack_require__(211); +__webpack_require__(212); +__webpack_require__(214); +__webpack_require__(215); +__webpack_require__(216); +__webpack_require__(217); +__webpack_require__(218); +__webpack_require__(219); +__webpack_require__(220); +__webpack_require__(221); +__webpack_require__(222); +__webpack_require__(223); +__webpack_require__(224); +__webpack_require__(225); +__webpack_require__(86); +__webpack_require__(226); +__webpack_require__(227); +__webpack_require__(112); +__webpack_require__(228); +__webpack_require__(113); +__webpack_require__(229); +__webpack_require__(230); +__webpack_require__(231); +__webpack_require__(232); +__webpack_require__(233); +__webpack_require__(116); +__webpack_require__(118); +__webpack_require__(119); +__webpack_require__(234); +__webpack_require__(235); +__webpack_require__(236); +__webpack_require__(237); +__webpack_require__(238); +__webpack_require__(239); +__webpack_require__(240); +__webpack_require__(241); +__webpack_require__(242); +__webpack_require__(243); +__webpack_require__(244); +__webpack_require__(245); +__webpack_require__(246); +__webpack_require__(247); +__webpack_require__(248); +__webpack_require__(249); +__webpack_require__(250); +__webpack_require__(251); +__webpack_require__(253); +__webpack_require__(254); +__webpack_require__(256); +__webpack_require__(257); +__webpack_require__(258); +__webpack_require__(259); +__webpack_require__(260); +__webpack_require__(261); +__webpack_require__(262); +__webpack_require__(263); +__webpack_require__(264); +__webpack_require__(265); +__webpack_require__(266); +__webpack_require__(267); +__webpack_require__(268); +__webpack_require__(269); +__webpack_require__(270); +__webpack_require__(271); +__webpack_require__(272); +__webpack_require__(273); +__webpack_require__(274); +__webpack_require__(275); +__webpack_require__(276); +__webpack_require__(277); +__webpack_require__(278); +__webpack_require__(279); +__webpack_require__(280); +__webpack_require__(281); +__webpack_require__(282); +__webpack_require__(283); +__webpack_require__(284); +__webpack_require__(285); +__webpack_require__(286); +__webpack_require__(287); +__webpack_require__(288); +__webpack_require__(289); +__webpack_require__(290); +__webpack_require__(291); +__webpack_require__(292); +__webpack_require__(293); +__webpack_require__(294); +__webpack_require__(295); +__webpack_require__(296); +__webpack_require__(297); +__webpack_require__(298); +__webpack_require__(299); +__webpack_require__(300); +__webpack_require__(301); +__webpack_require__(302); +__webpack_require__(303); +__webpack_require__(304); +__webpack_require__(305); +__webpack_require__(306); +__webpack_require__(307); +__webpack_require__(308); +__webpack_require__(309); +__webpack_require__(310); +__webpack_require__(311); +__webpack_require__(312); +__webpack_require__(313); +__webpack_require__(314); +__webpack_require__(315); +__webpack_require__(316); +__webpack_require__(317); +__webpack_require__(318); +__webpack_require__(319); +__webpack_require__(320); +__webpack_require__(321); +__webpack_require__(322); +__webpack_require__(323); +__webpack_require__(324); +module.exports = __webpack_require__(325); + + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(2); +var has = __webpack_require__(14); +var DESCRIPTORS = __webpack_require__(7); +var $export = __webpack_require__(0); +var redefine = __webpack_require__(12); +var META = __webpack_require__(30).KEY; +var $fails = __webpack_require__(3); +var shared = __webpack_require__(47); +var setToStringTag = __webpack_require__(43); +var uid = __webpack_require__(33); +var wks = __webpack_require__(5); +var wksExt = __webpack_require__(94); +var wksDefine = __webpack_require__(67); +var enumKeys = __webpack_require__(132); +var isArray = __webpack_require__(54); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(4); +var toObject = __webpack_require__(9); +var toIObject = __webpack_require__(15); +var toPrimitive = __webpack_require__(22); +var createDesc = __webpack_require__(32); +var _create = __webpack_require__(36); +var gOPNExt = __webpack_require__(97); +var $GOPD = __webpack_require__(16); +var $GOPS = __webpack_require__(53); +var $DP = __webpack_require__(8); +var $keys = __webpack_require__(34); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(37).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(49).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(29)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); + +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + } +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(11)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(47)('native-function-to-string', Function.toString); + + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(34); +var gOPS = __webpack_require__(53); +var pIE = __webpack_require__(49); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(7), 'Object', { defineProperty: __webpack_require__(8).f }); + + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) +$export($export.S + $export.F * !__webpack_require__(7), 'Object', { defineProperties: __webpack_require__(96) }); + + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = __webpack_require__(15); +var $getOwnPropertyDescriptor = __webpack_require__(16).f; + +__webpack_require__(24)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); + + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: __webpack_require__(36) }); + + +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(9); +var $getPrototypeOf = __webpack_require__(17); + +__webpack_require__(24)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(9); +var $keys = __webpack_require__(34); + +__webpack_require__(24)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 Object.getOwnPropertyNames(O) +__webpack_require__(24)('getOwnPropertyNames', function () { + return __webpack_require__(97).f; +}); + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.5 Object.freeze(O) +var isObject = __webpack_require__(4); +var meta = __webpack_require__(30).onFreeze; + +__webpack_require__(24)('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); + + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.17 Object.seal(O) +var isObject = __webpack_require__(4); +var meta = __webpack_require__(30).onFreeze; + +__webpack_require__(24)('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); + + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.15 Object.preventExtensions(O) +var isObject = __webpack_require__(4); +var meta = __webpack_require__(30).onFreeze; + +__webpack_require__(24)('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); + + +/***/ }), +/* 143 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.12 Object.isFrozen(O) +var isObject = __webpack_require__(4); + +__webpack_require__(24)('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); + + +/***/ }), +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.13 Object.isSealed(O) +var isObject = __webpack_require__(4); + +__webpack_require__(24)('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); + + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.11 Object.isExtensible(O) +var isObject = __webpack_require__(4); + +__webpack_require__(24)('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); + + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(0); + +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(98) }); + + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.10 Object.is(value1, value2) +var $export = __webpack_require__(0); +$export($export.S, 'Object', { is: __webpack_require__(99) }); + + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(0); +$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(71).set }); + + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.3.6 Object.prototype.toString() +var classof = __webpack_require__(44); +var test = {}; +test[__webpack_require__(5)('toStringTag')] = 'z'; +if (test + '' != '[object z]') { + __webpack_require__(12)(Object.prototype, 'toString', function toString() { + return '[object ' + classof(this) + ']'; + }, true); +} + + +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) +var $export = __webpack_require__(0); + +$export($export.P, 'Function', { bind: __webpack_require__(100) }); + + +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8).f; +var FProto = Function.prototype; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; + +// 19.2.4.2 name +NAME in FProto || __webpack_require__(7) && dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + } +}); + + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var isObject = __webpack_require__(4); +var getPrototypeOf = __webpack_require__(17); +var HAS_INSTANCE = __webpack_require__(5)('hasInstance'); +var FunctionProto = Function.prototype; +// 19.2.3.6 Function.prototype[@@hasInstance](V) +if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(8).f(FunctionProto, HAS_INSTANCE, { value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while (O = getPrototypeOf(O)) if (this.prototype === O) return true; + return false; +} }); + + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(2); +var has = __webpack_require__(14); +var cof = __webpack_require__(19); +var inheritIfRequired = __webpack_require__(72); +var toPrimitive = __webpack_require__(22); +var fails = __webpack_require__(3); +var gOPN = __webpack_require__(37).f; +var gOPD = __webpack_require__(16).f; +var dP = __webpack_require__(8).f; +var $trim = __webpack_require__(45).trim; +var NUMBER = 'Number'; +var $Number = global[NUMBER]; +var Base = $Number; +var proto = $Number.prototype; +// Opera ~12 has broken Object#toString +var BROKEN_COF = cof(__webpack_require__(36)(proto)) == NUMBER; +var TRIM = 'trim' in String.prototype; + +// 7.1.3 ToNumber(argument) +var toNumber = function (argument) { + var it = toPrimitive(argument, false); + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0); + var third, radix, maxCode; + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i + case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i + default: return +it; + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } return parseInt(digits, radix); + } + } return +it; +}; + +if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var that = this; + return that instanceof $Number + // check on 1..constructor(foo) case + && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); + }; + for (var keys = __webpack_require__(7) ? gOPN(Base) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), j = 0, key; keys.length > j; j++) { + if (has(Base, key = keys[j]) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + __webpack_require__(12)(global, NUMBER, $Number); +} + + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toInteger = __webpack_require__(20); +var aNumberValue = __webpack_require__(102); +var repeat = __webpack_require__(74); +var $toFixed = 1.0.toFixed; +var floor = Math.floor; +var data = [0, 0, 0, 0, 0, 0]; +var ERROR = 'Number.toFixed: incorrect invocation!'; +var ZERO = '0'; + +var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; +var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } +}; +var numToString = function () { + var i = 6; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } return s; +}; +var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); +}; +var log = function (x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } return n; +}; + +$export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || + 0.9.toFixed(0) !== '1' || + 1.255.toFixed(2) !== '1.25' || + 1000000000000000128.0.toFixed(0) !== '1000000000000000128' +) || !__webpack_require__(3)(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); +})), 'Number', { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } return m; + } +}); + + +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $fails = __webpack_require__(3); +var aNumberValue = __webpack_require__(102); +var $toPrecision = 1.0.toPrecision; + +$export($export.P + $export.F * ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; +}) || !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); +})), 'Number', { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + } +}); + + +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.1 Number.EPSILON +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + + +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.2 Number.isFinite(number) +var $export = __webpack_require__(0); +var _isFinite = __webpack_require__(2).isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + } +}); + + +/***/ }), +/* 158 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { isInteger: __webpack_require__(103) }); + + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.4 Number.isNaN(number) +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + } +}); + + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.5 Number.isSafeInteger(number) +var $export = __webpack_require__(0); +var isInteger = __webpack_require__(103); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); + + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.6 Number.MAX_SAFE_INTEGER +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); + + +/***/ }), +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.10 Number.MIN_SAFE_INTEGER +var $export = __webpack_require__(0); + +$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); + + +/***/ }), +/* 163 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseFloat = __webpack_require__(104); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); + + +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseInt = __webpack_require__(105); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + + +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseInt = __webpack_require__(105); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + + +/***/ }), +/* 166 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $parseFloat = __webpack_require__(104); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + + +/***/ }), +/* 167 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.3 Math.acosh(x) +var $export = __webpack_require__(0); +var log1p = __webpack_require__(106); +var sqrt = Math.sqrt; +var $acosh = Math.acosh; + +$export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity +), 'Math', { + acosh: function acosh(x) { + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + } +}); + + +/***/ }), +/* 168 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.5 Math.asinh(x) +var $export = __webpack_require__(0); +var $asinh = Math.asinh; + +function asinh(x) { + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); +} + +// Tor Browser bug: Math.asinh(0) -> -0 +$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + + +/***/ }), +/* 169 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.7 Math.atanh(x) +var $export = __webpack_require__(0); +var $atanh = Math.atanh; + +// Tor Browser bug: Math.atanh(-0) -> 0 +$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } +}); + + +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.9 Math.cbrt(x) +var $export = __webpack_require__(0); +var sign = __webpack_require__(75); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); + + +/***/ }), +/* 171 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.11 Math.clz32(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } +}); + + +/***/ }), +/* 172 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.12 Math.cosh(x) +var $export = __webpack_require__(0); +var exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp(x = +x) + exp(-x)) / 2; + } +}); + + +/***/ }), +/* 173 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.14 Math.expm1(x) +var $export = __webpack_require__(0); +var $expm1 = __webpack_require__(76); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + + +/***/ }), +/* 174 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { fround: __webpack_require__(107) }); + + +/***/ }), +/* 175 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = __webpack_require__(0); +var abs = Math.abs; + +$export($export.S, 'Math', { + hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var arg, div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + } +}); + + +/***/ }), +/* 176 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.18 Math.imul(x, y) +var $export = __webpack_require__(0); +var $imul = Math.imul; + +// some WebKit versions fails with big numbers, some has wrong arity +$export($export.S + $export.F * __webpack_require__(3)(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; +}), 'Math', { + imul: function imul(x, y) { + var UINT16 = 0xffff; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); + + +/***/ }), +/* 177 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.21 Math.log10(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + } +}); + + +/***/ }), +/* 178 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.20 Math.log1p(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { log1p: __webpack_require__(106) }); + + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.22 Math.log2(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + } +}); + + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.28 Math.sign(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { sign: __webpack_require__(75) }); + + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.30 Math.sinh(x) +var $export = __webpack_require__(0); +var expm1 = __webpack_require__(76); +var exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * __webpack_require__(3)(function () { + return !Math.sinh(-2e-17) != -2e-17; +}), 'Math', { + sinh: function sinh(x) { + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + } +}); + + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.33 Math.tanh(x) +var $export = __webpack_require__(0); +var expm1 = __webpack_require__(76); +var exp = Math.exp; + +$export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1(x = +x); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } +}); + + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.34 Math.trunc(x) +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + } +}); + + +/***/ }), +/* 184 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var toAbsoluteIndex = __webpack_require__(35); +var fromCharCode = String.fromCharCode; +var $fromCodePoint = String.fromCodePoint; + +// length should be 1, old FF problem +$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } +}); + + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(15); +var toLength = __webpack_require__(6); + +$export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } return res.join(''); + } +}); + + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.1.3.25 String.prototype.trim() +__webpack_require__(45)('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; +}); + + +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $at = __webpack_require__(55)(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } +}); + + +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + +var $export = __webpack_require__(0); +var toLength = __webpack_require__(6); +var context = __webpack_require__(77); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * __webpack_require__(78)(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); + + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.7 String.prototype.includes(searchString, position = 0) + +var $export = __webpack_require__(0); +var context = __webpack_require__(77); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * __webpack_require__(78)(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), +/* 190 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); + +$export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(74) +}); + + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + +var $export = __webpack_require__(0); +var toLength = __webpack_require__(6); +var context = __webpack_require__(77); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * __webpack_require__(78)(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); + + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(55)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(79)(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + + +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.2 String.prototype.anchor(name) +__webpack_require__(13)('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; +}); + + +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.3 String.prototype.big() +__webpack_require__(13)('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; +}); + + +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.4 String.prototype.blink() +__webpack_require__(13)('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; +}); + + +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.5 String.prototype.bold() +__webpack_require__(13)('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; +}); + + +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.6 String.prototype.fixed() +__webpack_require__(13)('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; +}); + + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.7 String.prototype.fontcolor(color) +__webpack_require__(13)('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; +}); + + +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.8 String.prototype.fontsize(size) +__webpack_require__(13)('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; +}); + + +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.9 String.prototype.italics() +__webpack_require__(13)('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; +}); + + +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.10 String.prototype.link(url) +__webpack_require__(13)('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; +}); + + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.11 String.prototype.small() +__webpack_require__(13)('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; +}); + + +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.12 String.prototype.strike() +__webpack_require__(13)('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; +}); + + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.13 String.prototype.sub() +__webpack_require__(13)('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; +}); + + +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.14 String.prototype.sup() +__webpack_require__(13)('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; +}); + + +/***/ }), +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = __webpack_require__(0); + +$export($export.S, 'Array', { isArray: __webpack_require__(54) }); + + +/***/ }), +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(18); +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var call = __webpack_require__(108); +var isArrayIter = __webpack_require__(81); +var toLength = __webpack_require__(6); +var createProperty = __webpack_require__(82); +var getIterFn = __webpack_require__(83); + +$export($export.S + $export.F * !__webpack_require__(57)(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var createProperty = __webpack_require__(82); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * __webpack_require__(3)(function () { + function F() { /* empty */ } + return !(Array.of.call(F) instanceof F); +}), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } +}); + + +/***/ }), +/* 209 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.13 Array.prototype.join(separator) +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(15); +var arrayJoin = [].join; + +// fallback for not array-like strings +$export($export.P + $export.F * (__webpack_require__(48) != Object || !__webpack_require__(21)(arrayJoin)), 'Array', { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); + + +/***/ }), +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var html = __webpack_require__(70); +var cof = __webpack_require__(19); +var toAbsoluteIndex = __webpack_require__(35); +var toLength = __webpack_require__(6); +var arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * __webpack_require__(3)(function () { + if (html) arraySlice.call(html); +}), 'Array', { + slice: function slice(begin, end) { + var len = toLength(this.length); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } +}); + + +/***/ }), +/* 211 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var aFunction = __webpack_require__(10); +var toObject = __webpack_require__(9); +var fails = __webpack_require__(3); +var $sort = [].sort; +var test = [1, 2, 3]; + +$export($export.P + $export.F * (fails(function () { + // IE8- + test.sort(undefined); +}) || !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit +}) || !__webpack_require__(21)($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + } +}); + + +/***/ }), +/* 212 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $forEach = __webpack_require__(25)(0); +var STRICT = __webpack_require__(21)([].forEach, true); + +$export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(4); +var isArray = __webpack_require__(54); +var SPECIES = __webpack_require__(5)('species'); + +module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } return C === undefined ? Array : C; +}; + + +/***/ }), +/* 214 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $map = __webpack_require__(25)(1); + +$export($export.P + $export.F * !__webpack_require__(21)([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 215 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $filter = __webpack_require__(25)(2); + +$export($export.P + $export.F * !__webpack_require__(21)([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 216 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $some = __webpack_require__(25)(3); + +$export($export.P + $export.F * !__webpack_require__(21)([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 217 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $every = __webpack_require__(25)(4); + +$export($export.P + $export.F * !__webpack_require__(21)([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $reduce = __webpack_require__(109); + +$export($export.P + $export.F * !__webpack_require__(21)([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } +}); + + +/***/ }), +/* 219 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $reduce = __webpack_require__(109); + +$export($export.P + $export.F * !__webpack_require__(21)([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + } +}); + + +/***/ }), +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $indexOf = __webpack_require__(52)(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(21)($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); + + +/***/ }), +/* 221 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toIObject = __webpack_require__(15); +var toInteger = __webpack_require__(20); +var toLength = __webpack_require__(6); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(21)($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + } +}); + + +/***/ }), +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +var $export = __webpack_require__(0); + +$export($export.P, 'Array', { copyWithin: __webpack_require__(110) }); + +__webpack_require__(31)('copyWithin'); + + +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +var $export = __webpack_require__(0); + +$export($export.P, 'Array', { fill: __webpack_require__(85) }); + +__webpack_require__(31)('fill'); + + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = __webpack_require__(0); +var $find = __webpack_require__(25)(5); +var KEY = 'find'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +__webpack_require__(31)(KEY); + + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = __webpack_require__(0); +var $find = __webpack_require__(25)(6); +var KEY = 'findIndex'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +__webpack_require__(31)(KEY); + + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(38)('Array'); + + +/***/ }), +/* 227 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(2); +var inheritIfRequired = __webpack_require__(72); +var dP = __webpack_require__(8).f; +var gOPN = __webpack_require__(37).f; +var isRegExp = __webpack_require__(56); +var $flags = __webpack_require__(50); +var $RegExp = global.RegExp; +var Base = $RegExp; +var proto = $RegExp.prototype; +var re1 = /a/g; +var re2 = /a/g; +// "new" creates a new object, old webkit buggy here +var CORRECT_NEW = new $RegExp(re1) !== re1; + +if (__webpack_require__(7) && (!CORRECT_NEW || __webpack_require__(3)(function () { + re2[__webpack_require__(5)('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; +}))) { + $RegExp = function RegExp(p, f) { + var tiRE = this instanceof $RegExp; + var piRE = isRegExp(p); + var fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU ? p + : inheritIfRequired(CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) + , tiRE ? this : proto, $RegExp); + }; + var proxy = function (key) { + key in $RegExp || dP($RegExp, key, { + configurable: true, + get: function () { return Base[key]; }, + set: function (it) { Base[key] = it; } + }); + }; + for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + __webpack_require__(12)(global, 'RegExp', $RegExp); +} + +__webpack_require__(38)('RegExp'); + + +/***/ }), +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__(113); +var anObject = __webpack_require__(1); +var $flags = __webpack_require__(50); +var DESCRIPTORS = __webpack_require__(7); +var TO_STRING = 'toString'; +var $toString = /./[TO_STRING]; + +var define = function (fn) { + __webpack_require__(12)(RegExp.prototype, TO_STRING, fn, true); +}; + +// 21.2.5.14 RegExp.prototype.toString() +if (__webpack_require__(3)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { + define(function toString() { + var R = anObject(this); + return '/'.concat(R.source, '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); + }); +// FF44- RegExp#toString has a wrong name +} else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); +} + + +/***/ }), +/* 229 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var anObject = __webpack_require__(1); +var toLength = __webpack_require__(6); +var advanceStringIndex = __webpack_require__(88); +var regExpExec = __webpack_require__(58); + +// @@match logic +__webpack_require__(59)('match', 1, function (defined, MATCH, $match, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.github.io/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative($match, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + if (!rx.global) return regExpExec(rx, S); + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = String(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + } + ]; +}); + + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var anObject = __webpack_require__(1); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(6); +var toInteger = __webpack_require__(20); +var advanceStringIndex = __webpack_require__(88); +var regExpExec = __webpack_require__(58); +var max = Math.max; +var min = Math.min; +var floor = Math.floor; +var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; +var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + +var maybeToString = function (it) { + return it === undefined ? it : String(it); +}; + +// @@replace logic +__webpack_require__(59)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = defined(this); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regExpExec(rx, S); + if (result === null) break; + results.push(result); + if (!global) break; + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + var matched = String(result[0]); + var position = max(min(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + } + ]; + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return $replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': return '$'; + case '&': return matched; + case '`': return str.slice(0, position); + case "'": return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + } +}); + + +/***/ }), +/* 231 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var anObject = __webpack_require__(1); +var sameValue = __webpack_require__(99); +var regExpExec = __webpack_require__(58); + +// @@search logic +__webpack_require__(59)('search', 1, function (defined, SEARCH, $search, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.github.io/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative($search, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regExpExec(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + } + ]; +}); + + +/***/ }), +/* 232 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var isRegExp = __webpack_require__(56); +var anObject = __webpack_require__(1); +var speciesConstructor = __webpack_require__(51); +var advanceStringIndex = __webpack_require__(88); +var toLength = __webpack_require__(6); +var callRegExpExec = __webpack_require__(58); +var regexpExec = __webpack_require__(87); +var fails = __webpack_require__(3); +var $min = Math.min; +var $push = [].push; +var $SPLIT = 'split'; +var LENGTH = 'length'; +var LAST_INDEX = 'lastIndex'; +var MAX_UINT32 = 0xffffffff; + +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError +var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); }); + +// @@split logic +__webpack_require__(59)('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return $split.call(string, separator, limit); + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while (match = regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy[LAST_INDEX]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); + }; + } else { + internalSplit = $split; + } + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = defined(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + } + ]; +}); + + +/***/ }), +/* 233 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(29); +var global = __webpack_require__(2); +var ctx = __webpack_require__(18); +var classof = __webpack_require__(44); +var $export = __webpack_require__(0); +var isObject = __webpack_require__(4); +var aFunction = __webpack_require__(10); +var anInstance = __webpack_require__(39); +var forOf = __webpack_require__(40); +var speciesConstructor = __webpack_require__(51); +var task = __webpack_require__(89).set; +var microtask = __webpack_require__(90)(); +var newPromiseCapabilityModule = __webpack_require__(91); +var perform = __webpack_require__(114); +var userAgent = __webpack_require__(60); +var promiseResolve = __webpack_require__(115); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[__webpack_require__(5)('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') + && promise.then(empty) instanceof FakePromise + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; + +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(41)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +__webpack_require__(43)($Promise, PROMISE); +__webpack_require__(38)(PROMISE); +Wrapper = __webpack_require__(26)[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(57)(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); + + +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var weak = __webpack_require__(120); +var validate = __webpack_require__(42); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +__webpack_require__(61)(WEAK_SET, function (get) { + return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(validate(this, WEAK_SET), value, true); + } +}, weak, false, true); + + +/***/ }), +/* 235 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = __webpack_require__(0); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var rApply = (__webpack_require__(2).Reflect || {}).apply; +var fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !__webpack_require__(3)(function () { + rApply(function () { /* empty */ }); +}), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } +}); + + +/***/ }), +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = __webpack_require__(0); +var create = __webpack_require__(36); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(4); +var fails = __webpack_require__(3); +var bind = __webpack_require__(100); +var rConstruct = (__webpack_require__(2).Reflect || {}).construct; + +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function () { + function F() { /* empty */ } + return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function () { + rConstruct(function () { /* empty */ }); +}); + +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: return new Target(); + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); + + +/***/ }), +/* 237 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = __webpack_require__(8); +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var toPrimitive = __webpack_require__(22); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * __webpack_require__(3)(function () { + // eslint-disable-next-line no-undef + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); +}), 'Reflect', { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), +/* 238 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = __webpack_require__(0); +var gOPD = __webpack_require__(16).f; +var anObject = __webpack_require__(1); + +$export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } +}); + + +/***/ }), +/* 239 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 26.1.5 Reflect.enumerate(target) +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = []; // keys + var key; + for (key in iterated) keys.push(key); +}; +__webpack_require__(80)(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; +}); + +$export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + } +}); + + +/***/ }), +/* 240 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = __webpack_require__(16); +var getPrototypeOf = __webpack_require__(17); +var has = __webpack_require__(14); +var $export = __webpack_require__(0); +var isObject = __webpack_require__(4); +var anObject = __webpack_require__(1); + +function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var desc, proto; + if (anObject(target) === receiver) return target[propertyKey]; + if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); +} + +$export($export.S, 'Reflect', { get: get }); + + +/***/ }), +/* 241 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = __webpack_require__(16); +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + } +}); + + +/***/ }), +/* 242 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = __webpack_require__(0); +var getProto = __webpack_require__(17); +var anObject = __webpack_require__(1); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); + + +/***/ }), +/* 243 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.9 Reflect.has(target, propertyKey) +var $export = __webpack_require__(0); + +$export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + } +}); + + +/***/ }), +/* 244 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.10 Reflect.isExtensible(target) +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); + + +/***/ }), +/* 245 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.11 Reflect.ownKeys(target) +var $export = __webpack_require__(0); + +$export($export.S, 'Reflect', { ownKeys: __webpack_require__(121) }); + + +/***/ }), +/* 246 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.12 Reflect.preventExtensions(target) +var $export = __webpack_require__(0); +var anObject = __webpack_require__(1); +var $preventExtensions = Object.preventExtensions; + +$export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), +/* 247 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = __webpack_require__(8); +var gOPD = __webpack_require__(16); +var getPrototypeOf = __webpack_require__(17); +var has = __webpack_require__(14); +var $export = __webpack_require__(0); +var createDesc = __webpack_require__(32); +var anObject = __webpack_require__(1); +var isObject = __webpack_require__(4); + +function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var existingDescriptor, proto; + if (!ownDesc) { + if (isObject(proto = getPrototypeOf(target))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); + + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = __webpack_require__(0); +var setProto = __webpack_require__(71); + +if (setProto) $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), +/* 249 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.3.3.1 / 15.9.4.4 Date.now() +var $export = __webpack_require__(0); + +$export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); + + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(22); + +$export($export.P + $export.F * __webpack_require__(3)(function () { + return new Date(NaN).toJSON() !== null + || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1; +}), 'Date', { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } +}); + + +/***/ }), +/* 251 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = __webpack_require__(0); +var toISOString = __webpack_require__(252); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); + + +/***/ }), +/* 252 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = __webpack_require__(3); +var getTime = Date.prototype.getTime; +var $toISOString = Date.prototype.toISOString; + +var lz = function (num) { + return num > 9 ? num : '0' + num; +}; + +// PhantomJS / old WebKit has a broken implementations +module.exports = (fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; +}) || !fails(function () { + $toISOString.call(new Date(NaN)); +})) ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; +} : $toISOString; + + +/***/ }), +/* 253 */ +/***/ (function(module, exports, __webpack_require__) { + +var DateProto = Date.prototype; +var INVALID_DATE = 'Invalid Date'; +var TO_STRING = 'toString'; +var $toString = DateProto[TO_STRING]; +var getTime = DateProto.getTime; +if (new Date(NaN) + '' != INVALID_DATE) { + __webpack_require__(12)(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE; + }); +} + + +/***/ }), +/* 254 */ +/***/ (function(module, exports, __webpack_require__) { + +var TO_PRIMITIVE = __webpack_require__(5)('toPrimitive'); +var proto = Date.prototype; + +if (!(TO_PRIMITIVE in proto)) __webpack_require__(11)(proto, TO_PRIMITIVE, __webpack_require__(255)); + + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var anObject = __webpack_require__(1); +var toPrimitive = __webpack_require__(22); +var NUMBER = 'number'; + +module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; + + +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var $typed = __webpack_require__(62); +var buffer = __webpack_require__(92); +var anObject = __webpack_require__(1); +var toAbsoluteIndex = __webpack_require__(35); +var toLength = __webpack_require__(6); +var isObject = __webpack_require__(4); +var ArrayBuffer = __webpack_require__(2).ArrayBuffer; +var speciesConstructor = __webpack_require__(51); +var $ArrayBuffer = buffer.ArrayBuffer; +var $DataView = buffer.DataView; +var $isView = $typed.ABV && ArrayBuffer.isView; +var $slice = $ArrayBuffer.prototype.slice; +var VIEW = $typed.VIEW; +var ARRAY_BUFFER = 'ArrayBuffer'; + +$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); + +$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return $isView && $isView(it) || isObject(it) && VIEW in it; + } +}); + +$export($export.P + $export.U + $export.F * __webpack_require__(3)(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; +}), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +__webpack_require__(38)(ARRAY_BUFFER); + + +/***/ }), +/* 257 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +$export($export.G + $export.W + $export.F * !__webpack_require__(62).ABV, { + DataView: __webpack_require__(92).DataView +}); + + +/***/ }), +/* 258 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 259 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 260 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('Uint8', 1, function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}, true); + + +/***/ }), +/* 261 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 262 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(27)('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/Array.prototype.includes +var $export = __webpack_require__(0); +var $includes = __webpack_require__(52)(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +__webpack_require__(31)('includes'); + + +/***/ }), +/* 268 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap +var $export = __webpack_require__(0); +var flattenIntoArray = __webpack_require__(123); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(6); +var aFunction = __webpack_require__(10); +var arraySpeciesCreate = __webpack_require__(84); + +$export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + } +}); + +__webpack_require__(31)('flatMap'); + + +/***/ }), +/* 269 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten +var $export = __webpack_require__(0); +var flattenIntoArray = __webpack_require__(123); +var toObject = __webpack_require__(9); +var toLength = __webpack_require__(6); +var toInteger = __webpack_require__(20); +var arraySpeciesCreate = __webpack_require__(84); + +$export($export.P, 'Array', { + flatten: function flatten(/* depthArg = 1 */) { + var depthArg = arguments[0]; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + } +}); + +__webpack_require__(31)('flatten'); + + +/***/ }), +/* 270 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/mathiasbynens/String.prototype.at +var $export = __webpack_require__(0); +var $at = __webpack_require__(55)(true); + +$export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + } +}); + + +/***/ }), +/* 271 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-string-pad-start-end +var $export = __webpack_require__(0); +var $pad = __webpack_require__(124); +var userAgent = __webpack_require__(60); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); + + +/***/ }), +/* 272 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-string-pad-start-end +var $export = __webpack_require__(0); +var $pad = __webpack_require__(124); +var userAgent = __webpack_require__(60); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); + + +/***/ }), +/* 273 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +__webpack_require__(45)('trimLeft', function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; +}, 'trimStart'); + + +/***/ }), +/* 274 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +__webpack_require__(45)('trimRight', function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; +}, 'trimEnd'); + + +/***/ }), +/* 275 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/String.prototype.matchAll/ +var $export = __webpack_require__(0); +var defined = __webpack_require__(23); +var toLength = __webpack_require__(6); +var isRegExp = __webpack_require__(56); +var getFlags = __webpack_require__(50); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +__webpack_require__(80)($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; +}); + +$export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this); + var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); + var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } +}); + + +/***/ }), +/* 276 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(67)('asyncIterator'); + + +/***/ }), +/* 277 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(67)('observable'); + + +/***/ }), +/* 278 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = __webpack_require__(0); +var ownKeys = __webpack_require__(121); +var toIObject = __webpack_require__(15); +var gOPD = __webpack_require__(16); +var createProperty = __webpack_require__(82); + +$export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, key = keys[i++]); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + } +}); + + +/***/ }), +/* 279 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(0); +var $values = __webpack_require__(125)(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); + + +/***/ }), +/* 280 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(0); +var $entries = __webpack_require__(125)(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); + + +/***/ }), +/* 281 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var aFunction = __webpack_require__(10); +var $defineProperty = __webpack_require__(8); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +__webpack_require__(7) && $export($export.P + __webpack_require__(63), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } +}); + + +/***/ }), +/* 282 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var aFunction = __webpack_require__(10); +var $defineProperty = __webpack_require__(8); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +__webpack_require__(7) && $export($export.P + __webpack_require__(63), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } +}); + + +/***/ }), +/* 283 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(22); +var getPrototypeOf = __webpack_require__(17); +var getOwnPropertyDescriptor = __webpack_require__(16).f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +__webpack_require__(7) && $export($export.P + __webpack_require__(63), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.get; + } while (O = getPrototypeOf(O)); + } +}); + + +/***/ }), +/* 284 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__(0); +var toObject = __webpack_require__(9); +var toPrimitive = __webpack_require__(22); +var getPrototypeOf = __webpack_require__(17); +var getOwnPropertyDescriptor = __webpack_require__(16).f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +__webpack_require__(7) && $export($export.P + __webpack_require__(63), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.set; + } while (O = getPrototypeOf(O)); + } +}); + + +/***/ }), +/* 285 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = __webpack_require__(0); + +$export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(126)('Map') }); + + +/***/ }), +/* 286 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = __webpack_require__(0); + +$export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(126)('Set') }); + + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +__webpack_require__(64)('Map'); + + +/***/ }), +/* 288 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +__webpack_require__(64)('Set'); + + +/***/ }), +/* 289 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of +__webpack_require__(64)('WeakMap'); + + +/***/ }), +/* 290 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +__webpack_require__(64)('WeakSet'); + + +/***/ }), +/* 291 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from +__webpack_require__(65)('Map'); + + +/***/ }), +/* 292 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +__webpack_require__(65)('Set'); + + +/***/ }), +/* 293 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +__webpack_require__(65)('WeakMap'); + + +/***/ }), +/* 294 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from +__webpack_require__(65)('WeakSet'); + + +/***/ }), +/* 295 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-global +var $export = __webpack_require__(0); + +$export($export.G, { global: __webpack_require__(2) }); + + +/***/ }), +/* 296 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-global +var $export = __webpack_require__(0); + +$export($export.S, 'System', { global: __webpack_require__(2) }); + + +/***/ }), +/* 297 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/ljharb/proposal-is-error +var $export = __webpack_require__(0); +var cof = __webpack_require__(19); + +$export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + } +}); + + +/***/ }), +/* 298 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + } +}); + + +/***/ }), +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); + + +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); +var RAD_PER_DEG = 180 / Math.PI; + +$export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + } +}); + + +/***/ }), +/* 301 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); +var scale = __webpack_require__(128); +var fround = __webpack_require__(107); + +$export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + } +}); + + +/***/ }), +/* 302 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } +}); + + +/***/ }), +/* 303 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } +}); + + +/***/ }), +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + imulh: function imulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >> 16; + var v1 = $v >> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } +}); + + +/***/ }), +/* 305 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); + + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); +var DEG_PER_RAD = Math.PI / 180; + +$export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + } +}); + + +/***/ }), +/* 307 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { scale: __webpack_require__(128) }); + + +/***/ }), +/* 308 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { + umulh: function umulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >>> 16; + var v1 = $v >>> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } +}); + + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +// http://jfbastien.github.io/papers/Math.signbit.html +var $export = __webpack_require__(0); + +$export($export.S, 'Math', { signbit: function signbit(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; +} }); + + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// https://github.com/tc39/proposal-promise-finally + +var $export = __webpack_require__(0); +var core = __webpack_require__(26); +var global = __webpack_require__(2); +var speciesConstructor = __webpack_require__(51); +var promiseResolve = __webpack_require__(115); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); + + +/***/ }), +/* 311 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-promise-try +var $export = __webpack_require__(0); +var newPromiseCapability = __webpack_require__(91); +var perform = __webpack_require__(114); + +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); + + +/***/ }), +/* 312 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(28); +var anObject = __webpack_require__(1); +var toMetaKey = metadata.key; +var ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); +} }); + + +/***/ }), +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(28); +var anObject = __webpack_require__(1); +var toMetaKey = metadata.key; +var getOrCreateMetadataMap = metadata.map; +var store = metadata.store; + +metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); + var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; + if (metadataMap.size) return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); +} }); + + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(28); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(17); +var ordinaryHasOwnMetadata = metadata.has; +var ordinaryGetOwnMetadata = metadata.get; +var toMetaKey = metadata.key; + +var ordinaryGetMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; +}; + +metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +var Set = __webpack_require__(118); +var from = __webpack_require__(127); +var metadata = __webpack_require__(28); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(17); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var parent = getPrototypeOf(O); + if (parent === null) return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; +}; + +metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { + return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); + + +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(28); +var anObject = __webpack_require__(1); +var ordinaryGetOwnMetadata = metadata.get; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 317 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(28); +var anObject = __webpack_require__(1); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); + + +/***/ }), +/* 318 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(28); +var anObject = __webpack_require__(1); +var getPrototypeOf = __webpack_require__(17); +var ordinaryHasOwnMetadata = metadata.has; +var toMetaKey = metadata.key; + +var ordinaryHasMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; +}; + +metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +var metadata = __webpack_require__(28); +var anObject = __webpack_require__(1); +var ordinaryHasOwnMetadata = metadata.has; +var toMetaKey = metadata.key; + +metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +var $metadata = __webpack_require__(28); +var anObject = __webpack_require__(1); +var aFunction = __webpack_require__(10); +var toMetaKey = $metadata.key; +var ordinaryDefineOwnMetadata = $metadata.set; + +$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) { + return function decorator(target, targetKey) { + ordinaryDefineOwnMetadata( + metadataKey, metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey) + ); + }; +} }); + + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask +var $export = __webpack_require__(0); +var microtask = __webpack_require__(90)(); +var process = __webpack_require__(2).process; +var isNode = __webpack_require__(19)(process) == 'process'; + +$export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); + + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/zenparsing/es-observable +var $export = __webpack_require__(0); +var global = __webpack_require__(2); +var core = __webpack_require__(26); +var microtask = __webpack_require__(90)(); +var OBSERVABLE = __webpack_require__(5)('observable'); +var aFunction = __webpack_require__(10); +var anObject = __webpack_require__(1); +var anInstance = __webpack_require__(39); +var redefineAll = __webpack_require__(41); +var hide = __webpack_require__(11); +var forOf = __webpack_require__(40); +var RETURN = forOf.RETURN; + +var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); +}; + +var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } +}; + +var subscriptionClosed = function (subscription) { + return subscription._o === undefined; +}; + +var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } +}; + +var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer); + var subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } if (subscriptionClosed(this)) cleanupSubscription(this); +}; + +Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe() { closeSubscription(this); } +}); + +var SubscriptionObserver = function (subscription) { + this._s = subscription; +}; + +SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } +}); + +var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); +}; + +redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } +}); + +redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if (forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN) return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var j = 0; j < items.length; ++j) { + observer.next(items[j]); + if (done) return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + } +}); + +hide($Observable.prototype, OBSERVABLE, function () { return this; }); + +$export($export.G, { Observable: $Observable }); + +__webpack_require__(38)('Observable'); + + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(0); +var $task = __webpack_require__(89); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); + + +/***/ }), +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { + +var $iterators = __webpack_require__(86); +var getKeys = __webpack_require__(34); +var redefine = __webpack_require__(12); +var global = __webpack_require__(2); +var hide = __webpack_require__(11); +var Iterators = __webpack_require__(46); +var wks = __webpack_require__(5); +var ITERATOR = wks('iterator'); +var TO_STRING_TAG = wks('toStringTag'); +var ArrayValues = Iterators.Array; + +var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false +}; + +for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } +} + + +/***/ }), +/* 325 */ +/***/ (function(module, exports, __webpack_require__) { + +// ie9- setTimeout & setInterval additional parameters fix +var global = __webpack_require__(2); +var $export = __webpack_require__(0); +var userAgent = __webpack_require__(60); +var slice = [].slice; +var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check +var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set(boundArgs ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } : fn, time); + }; +}; +$export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) +}); + + +/***/ }) +/******/ ]); +// CommonJS export +if (typeof module != 'undefined' && module.exports) module.exports = __e; +// RequireJS export +else if (typeof define == 'function' && define.amd) define(function () { return __e; }); +// Export to global object +else __g.core = __e; +}(1, 1); \ No newline at end of file diff --git a/node_modules/core-js/client/shim.min.js b/node_modules/core-js/client/shim.min.js new file mode 100644 index 00000000..def83cc8 --- /dev/null +++ b/node_modules/core-js/client/shim.min.js @@ -0,0 +1,10 @@ +/** + * core-js 2.6.9 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2019 Denis Pushkarev + */ +!function(e,i,Jt){"use strict";!function(r){var e={};function __webpack_require__(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return r[t].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}__webpack_require__.m=r,__webpack_require__.c=e,__webpack_require__.d=function(t,n,r){__webpack_require__.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},__webpack_require__.n=function(t){var n=t&&t.__esModule?function getDefault(){return t["default"]}:function getModuleExports(){return t};return __webpack_require__.d(n,"a",n),n},__webpack_require__.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=129)}([function(t,n,r){var v=r(2),g=r(26),y=r(11),d=r(12),b=r(18),S="prototype",_=function(t,n,r){var e,i,o,u,c=t&_.F,a=t&_.G,f=t&_.P,s=t&_.B,l=a?v:t&_.S?v[n]||(v[n]={}):(v[n]||{})[S],h=a?g:g[n]||(g[n]={}),p=h[S]||(h[S]={});for(e in a&&(r=n),r)o=((i=!c&&l&&l[e]!==Jt)?l:r)[e],u=s&&i?b(o,v):f&&"function"==typeof o?b(Function.call,o):o,l&&d(l,e,o,t&_.U),h[e]!=o&&y(h,e,u),f&&p[e]!=o&&(p[e]=o)};v.core=g,_.F=1,_.G=2,_.S=4,_.P=8,_.B=16,_.W=32,_.U=64,_.R=128,t.exports=_},function(t,n,r){var e=r(4);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof i&&(i=r)},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){var e=r(47)("wks"),i=r(33),o=r(2).Symbol,u="function"==typeof o;(t.exports=function(t){return e[t]||(e[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=e},function(t,n,r){var e=r(20),i=Math.min;t.exports=function(t){return 0"+i+""};t.exports=function(n,t){var r={};r[n]=t(o),e(e.P+e.F*i(function(){var t=""[n]('"');return t!==t.toLowerCase()||3document.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s[f][u[r]];return s()};t.exports=Object.create||function create(t,n){var r;return null!==t?(a[f]=i(t),r=new a,a[f]=null,r[c]=t):r=s(),n===Jt?r:o(r,n)}},function(t,n,r){var e=r(95),i=r(69).concat("length","prototype");n.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return e(t,i)}},function(t,n,r){var e=r(2),i=r(8),o=r(7),u=r(5)("species");t.exports=function(t){var n=e[t];o&&n&&!n[u]&&i.f(n,u,{configurable:!0,get:function(){return this}})}},function(t,n){t.exports=function(t,n,r,e){if(!(t instanceof n)||e!==Jt&&e in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,n,r){var h=r(18),p=r(108),v=r(81),g=r(1),y=r(6),d=r(83),b={},S={};(n=t.exports=function(t,n,r,e,i){var o,u,c,a,f=i?function(){return t}:d(t),s=h(r,e,n?2:1),l=0;if("function"!=typeof f)throw TypeError(t+" is not iterable!");if(v(f)){for(o=y(t.length);l")}),d=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var r="ab".split(t);return 2===r.length&&"a"===r[0]&&"b"===r[1]}();t.exports=function(r,t,n){var e=p(r),o=!l(function(){var t={};return t[e]=function(){return 7},7!=""[r](t)}),i=o?!l(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===r&&(n.constructor={},n.constructor[g]=function(){return n}),n[e](""),!t}):Jt;if(!o||!i||"replace"===r&&!y||"split"===r&&!d){var u=/./[e],c=n(h,e,""[r],function maybeCallNative(t,n,r,e,i){return n.exec===v?o&&!i?{done:!0,value:u.call(n,r,e)}:{done:!0,value:t.call(r,n,e)}:{done:!1}}),a=c[1];f(String.prototype,r,c[0]),s(RegExp.prototype,e,2==t?function(t,n){return a.call(t,this,n)}:function(t){return a.call(t,this)})}}},function(t,n,r){var e=r(2).navigator;t.exports=e&&e.userAgent||""},function(t,n,r){var d=r(2),b=r(0),S=r(12),_=r(41),x=r(30),m=r(40),w=r(39),E=r(4),O=r(3),M=r(57),I=r(43),P=r(72);t.exports=function(e,t,n,r,i,o){var u=d[e],c=u,a=i?"set":"add",f=c&&c.prototype,s={},l=function(t){var r=f[t];S(f,t,"delete"==t?function(t){return!(o&&!E(t))&&r.call(this,0===t?0:t)}:"has"==t?function has(t){return!(o&&!E(t))&&r.call(this,0===t?0:t)}:"get"==t?function get(t){return o&&!E(t)?Jt:r.call(this,0===t?0:t)}:"add"==t?function add(t){return r.call(this,0===t?0:t),this}:function set(t,n){return r.call(this,0===t?0:t,n),this})};if("function"==typeof c&&(o||f.forEach&&!O(function(){(new c).entries().next()}))){var h=new c,p=h[a](o?{}:-0,1)!=h,v=O(function(){h.has(1)}),g=M(function(t){new c(t)}),y=!o&&O(function(){for(var t=new c,n=5;n--;)t[a](n,n);return!t.has(-0)});g||(((c=t(function(t,n){w(t,c,e);var r=P(new u,t,c);return n!=Jt&&m(n,i,r[a],r),r})).prototype=f).constructor=c),(v||y)&&(l("delete"),l("has"),i&&l("get")),(y||p)&&l(a),o&&f.clear&&delete f.clear}else c=r.getConstructor(t,e,i,a),_(c.prototype,n),x.NEED=!0;return I(c,e),b(b.G+b.W+b.F*((s[e]=c)!=u),s),o||r.setStrong(c,e,i),c}},function(t,n,r){for(var e,i=r(2),o=r(11),u=r(33),c=u("typed_array"),a=u("view"),f=!(!i.ArrayBuffer||!i.DataView),s=f,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(e=i[h[l++]])?(o(e.prototype,c,!0),o(e.prototype,a,!0)):s=!1;t.exports={ABV:f,CONSTR:s,TYPED:c,VIEW:a}},function(t,n,r){t.exports=r(29)||!r(3)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete r(2)[t]})},function(t,n,r){var e=r(0);t.exports=function(t){e(e.S,t,{of:function of(){for(var t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return new this(n)}})}},function(t,n,r){var e=r(0),u=r(10),c=r(18),a=r(40);t.exports=function(t){e(e.S,t,{from:function from(t){var n,r,e,i,o=arguments[1];return u(this),(n=o!==Jt)&&u(o),t==Jt?new this:(r=[],n?(e=0,i=c(o,arguments[2],2),a(t,!1,function(t){r.push(i(t,e++))})):a(t,!1,r.push,r),new this(r))}})}},function(t,n,r){var e=r(4),i=r(2).document,o=e(i)&&e(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,r){var e=r(2),i=r(26),o=r(29),u=r(94),c=r(8).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:e.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n,r){var e=r(47)("keys"),i=r(33);t.exports=function(t){return e[t]||(e[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,r){var e=r(2).document;t.exports=e&&e.documentElement},function(t,n,i){var r=i(4),e=i(1),o=function(t,n){if(e(t),!r(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r,e){try{(e=i(18)(Function.call,i(16).f(Object.prototype,"__proto__").set,2))(t,[]),r=!(t instanceof Array)}catch(n){r=!0}return function setPrototypeOf(t,n){return o(t,n),r?t.__proto__=n:e(t,n),t}}({},!1):Jt),check:o}},function(t,n,r){var o=r(4),u=r(71).set;t.exports=function(t,n,r){var e,i=n.constructor;return i!==r&&"function"==typeof i&&(e=i.prototype)!==r.prototype&&o(e)&&u&&u(t,e),t}},function(t,n){t.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(t,n,r){var i=r(20),o=r(23);t.exports=function repeat(t){var n=String(o(this)),r="",e=i(t);if(e<0||e==Infinity)throw RangeError("Count can't be negative");for(;0>>=1)&&(n+=n))1&e&&(r+=n);return r}},function(t,n){t.exports=Math.sign||function sign(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n){var r=Math.expm1;t.exports=!r||22025.465794806718>1,s=23===n?F(2,-24)-F(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=P(t))!=t||t===M?(i=t!=t?1:0,e=a):(e=A(k(t)/N),t*(o=F(2,-e))<1&&(e--,o*=2),2<=(t+=1<=e+f?s/o:s*F(2,1-f))*o&&(e++,o/=2),a<=e+f?(i=0,e=a):1<=e+f?(i=(t*o-1)*F(2,n),e+=f):(i=t*F(2,f-1)*F(2,n),e=0));8<=n;u[l++]=255&i,i/=256,n-=8);for(e=e<>1,c=i-7,a=r-1,f=t[a--],s=127&f;for(f>>=7;0>=-c,c+=n;0>8&255]}function packI32(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function packF64(t){return packIEEE754(t,52,8)}function packF32(t){return packIEEE754(t,23,4)}function addGetter(t,n,r){g(t[_],n,{get:function(){return this[r]}})}function get(t,n,r,e){var i=p(+r);if(t[L]>24)},setUint8:function setUint8(t,n){B.call(this,t,n<<24>>24)}},!0)}else m=function ArrayBuffer(t){s(this,m,b);var n=p(t);this._b=y.call(new Array(n),0),this[L]=n},w=function DataView(t,n,r){s(this,w,S),s(t,m,S);var e=t[L],i=l(n);if(i<0||e>24},getUint8:function getUint8(t){return get(this,1,t)[0]},getInt16:function getInt16(t){var n=get(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function getUint16(t){var n=get(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function getInt32(t){return unpackI32(get(this,4,t,arguments[1]))},getUint32:function getUint32(t){return unpackI32(get(this,4,t,arguments[1]))>>>0},getFloat32:function getFloat32(t){return unpackIEEE754(get(this,4,t,arguments[1]),23,4)},getFloat64:function getFloat64(t){return unpackIEEE754(get(this,8,t,arguments[1]),52,8)},setInt8:function setInt8(t,n){set(this,1,t,packI8,n)},setUint8:function setUint8(t,n){set(this,1,t,packI8,n)},setInt16:function setInt16(t,n){set(this,2,t,packI16,n,arguments[2])},setUint16:function setUint16(t,n){set(this,2,t,packI16,n,arguments[2])},setInt32:function setInt32(t,n){set(this,4,t,packI32,n,arguments[2])},setUint32:function setUint32(t,n){set(this,4,t,packI32,n,arguments[2])},setFloat32:function setFloat32(t,n){set(this,4,t,packF32,n,arguments[2])}, +setFloat64:function setFloat64(t,n){set(this,8,t,packF64,n,arguments[2])}});d(m,b),d(w,S),c(w[_],u.VIEW,!0),n[b]=m,n[S]=w},function(t,n,r){t.exports=!r(7)&&!r(3)(function(){return 7!=Object.defineProperty(r(66)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){n.f=r(5)},function(t,n,r){var u=r(14),c=r(15),a=r(52)(!1),f=r(68)("IE_PROTO");t.exports=function(t,n){var r,e=c(t),i=0,o=[];for(r in e)r!=f&&u(e,r)&&o.push(r);for(;i>>0||(u.test(r)?16:10))}:e},function(t,n){t.exports=Math.log1p||function log1p(t){return-1e-8<(t=+t)&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,r){var o=r(75),e=Math.pow,u=e(2,-52),c=e(2,-23),a=e(2,127)*(2-c),f=e(2,-126);t.exports=Math.fround||function fround(t){var n,r,e=Math.abs(t),i=o(t);return e>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,r){var e=r(0),i=Math.exp;e(e.S,"Math",{cosh:function cosh(t){return(i(t=+t)+i(-t))/2}})},function(t,n,r){var e=r(0),i=r(76);e(e.S+e.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,r){var e=r(0);e(e.S,"Math",{fround:r(107)})},function(t,n,r){var e=r(0),a=Math.abs;e(e.S,"Math",{hypot:function hypot(t,n){for(var r,e,i=0,o=0,u=arguments.length,c=0;o>>16)*u+o*(r&i>>>16)<<16>>>0)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log10:function log10(t){return Math.log(t)*Math.LOG10E}})},function(t,n,r){var e=r(0);e(e.S,"Math",{log1p:r(106)})},function(t,n,r){var e=r(0);e(e.S,"Math",{log2:function log2(t){return Math.log(t)/Math.LN2}})},function(t,n,r){var e=r(0);e(e.S,"Math",{sign:r(75)})},function(t,n,r){var e=r(0),i=r(76),o=Math.exp;e(e.S+e.F*r(3)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function sinh(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,r){var e=r(0),i=r(76),o=Math.exp;e(e.S,"Math",{tanh:function tanh(t){var n=i(t=+t),r=i(-t);return n==Infinity?1:r==Infinity?-1:(n-r)/(o(t)+o(-t))}})},function(t,n,r){var e=r(0);e(e.S,"Math",{trunc:function trunc(t){return(0>10),n%1024+56320))}return r.join("")}})},function(t,n,r){var e=r(0),u=r(15),c=r(6);e(e.S,"String",{raw:function raw(t){for(var n=u(t.raw),r=c(n.length),e=arguments.length,i=[],o=0;o]*>)/g,v=/\$([$&`']|\d\d?)/g;r(59)("replace",2,function(i,o,x,m){return[function replace(t,n){var r=i(this),e=t==Jt?Jt:t[o];return e!==Jt?e.call(t,r,n):x.call(String(r),t,n)},function(t,n){var r=m(x,t,this,n);if(r.done)return r.value;var e=w(t),i=String(this),o="function"==typeof n;o||(n=String(n));var u=e.global;if(u){var c=e.unicode;e.lastIndex=0}for(var a=[];;){var f=I(e,i);if( +null===f)break;if(a.push(f),!u)break;""===String(f[0])&&(e.lastIndex=M(i,E(e.lastIndex),c))}for(var s,l="",h=0,p=0;p>>0,f=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(e=l.call(f,r))&&!(c<(i=f[v])&&(u.push(r.slice(c,e.index)),1>>0;if(0===a)return[];if(0===i.length)return null===m(c,i)?[i]:[];for(var f=0,s=0,l=[];s>>0,o=r>>>0;return(n>>>0)+(e>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,n,r){var e=r(0);e(e.S,"Math",{isubh:function isubh(t,n,r,e){var i=t>>>0,o=r>>>0;return(n>>>0)-(e>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,n,r){var e=r(0);e(e.S,"Math",{imulh:function imulh(t,n){var r=+t,e=+n,i=65535&r,o=65535&e,u=r>>16,c=e>>16,a=(u*o>>>0)+(i*o>>>16);return u*c+(a>>16)+((i*c>>>0)+(65535&a)>>16)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,n,r){var e=r(0),i=Math.PI/180;e(e.S,"Math",{radians:function radians(t){return t*i}})},function(t,n,r){var e=r(0);e(e.S,"Math",{scale:r(128)})},function(t,n,r){var e=r(0);e(e.S,"Math",{umulh:function umulh(t,n){var r=+t,e=+n,i=65535&r,o=65535&e,u=r>>>16,c=e>>>16,a=(u*o>>>0)+(i*o>>>16);return u*c+(a>>>16)+((i*c>>>0)+(65535&a)>>>16)}})},function(t,n,r){var e=r(0);e(e.S,"Math",{signbit:function signbit(t){return(t=+t)!=t?t:0==t?1/t==Infinity:0 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; +}; diff --git a/node_modules/core-js/library/modules/_array-fill.js b/node_modules/core-js/library/modules/_array-fill.js new file mode 100644 index 00000000..0753c36a --- /dev/null +++ b/node_modules/core-js/library/modules/_array-fill.js @@ -0,0 +1,15 @@ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +'use strict'; +var toObject = require('./_to-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; diff --git a/node_modules/core-js/library/modules/_array-from-iterable.js b/node_modules/core-js/library/modules/_array-from-iterable.js new file mode 100644 index 00000000..08be255f --- /dev/null +++ b/node_modules/core-js/library/modules/_array-from-iterable.js @@ -0,0 +1,7 @@ +var forOf = require('./_for-of'); + +module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; diff --git a/node_modules/core-js/library/modules/_array-includes.js b/node_modules/core-js/library/modules/_array-includes.js new file mode 100644 index 00000000..0ef3efeb --- /dev/null +++ b/node_modules/core-js/library/modules/_array-includes.js @@ -0,0 +1,23 @@ +// false -> Array#indexOf +// true -> Array#includes +var toIObject = require('./_to-iobject'); +var toLength = require('./_to-length'); +var toAbsoluteIndex = require('./_to-absolute-index'); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; diff --git a/node_modules/core-js/library/modules/_array-methods.js b/node_modules/core-js/library/modules/_array-methods.js new file mode 100644 index 00000000..ae7f447d --- /dev/null +++ b/node_modules/core-js/library/modules/_array-methods.js @@ -0,0 +1,44 @@ +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = require('./_ctx'); +var IObject = require('./_iobject'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var asc = require('./_array-species-create'); +module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (;length > index; index++) if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) result[index] = res; // map + else if (res) switch (TYPE) { + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; +}; diff --git a/node_modules/core-js/library/modules/_array-reduce.js b/node_modules/core-js/library/modules/_array-reduce.js new file mode 100644 index 00000000..8596ac70 --- /dev/null +++ b/node_modules/core-js/library/modules/_array-reduce.js @@ -0,0 +1,28 @@ +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var toLength = require('./_to-length'); + +module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var i = isRight ? -1 : 1; + if (aLen < 2) for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; +}; diff --git a/node_modules/core-js/library/modules/_array-species-constructor.js b/node_modules/core-js/library/modules/_array-species-constructor.js new file mode 100644 index 00000000..0771c236 --- /dev/null +++ b/node_modules/core-js/library/modules/_array-species-constructor.js @@ -0,0 +1,16 @@ +var isObject = require('./_is-object'); +var isArray = require('./_is-array'); +var SPECIES = require('./_wks')('species'); + +module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } return C === undefined ? Array : C; +}; diff --git a/node_modules/core-js/library/modules/_array-species-create.js b/node_modules/core-js/library/modules/_array-species-create.js new file mode 100644 index 00000000..36ed58bd --- /dev/null +++ b/node_modules/core-js/library/modules/_array-species-create.js @@ -0,0 +1,6 @@ +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = require('./_array-species-constructor'); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; diff --git a/node_modules/core-js/library/modules/_bind.js b/node_modules/core-js/library/modules/_bind.js new file mode 100644 index 00000000..3cf1e5ae --- /dev/null +++ b/node_modules/core-js/library/modules/_bind.js @@ -0,0 +1,25 @@ +'use strict'; +var aFunction = require('./_a-function'); +var isObject = require('./_is-object'); +var invoke = require('./_invoke'); +var arraySlice = [].slice; +var factories = {}; + +var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); +}; + +module.exports = Function.bind || function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; +}; diff --git a/node_modules/core-js/library/modules/_classof.js b/node_modules/core-js/library/modules/_classof.js new file mode 100644 index 00000000..d106d5be --- /dev/null +++ b/node_modules/core-js/library/modules/_classof.js @@ -0,0 +1,23 @@ +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = require('./_cof'); +var TAG = require('./_wks')('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; diff --git a/node_modules/core-js/library/modules/_cof.js b/node_modules/core-js/library/modules/_cof.js new file mode 100644 index 00000000..332c0bc0 --- /dev/null +++ b/node_modules/core-js/library/modules/_cof.js @@ -0,0 +1,5 @@ +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; diff --git a/node_modules/core-js/library/modules/_collection-strong.js b/node_modules/core-js/library/modules/_collection-strong.js new file mode 100644 index 00000000..68ce63f0 --- /dev/null +++ b/node_modules/core-js/library/modules/_collection-strong.js @@ -0,0 +1,144 @@ +'use strict'; +var dP = require('./_object-dp').f; +var create = require('./_object-create'); +var redefineAll = require('./_redefine-all'); +var ctx = require('./_ctx'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var $iterDefine = require('./_iter-define'); +var step = require('./_iter-step'); +var setSpecies = require('./_set-species'); +var DESCRIPTORS = require('./_descriptors'); +var fastKey = require('./_meta').fastKey; +var validate = require('./_validate-collection'); +var SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + } + }); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; diff --git a/node_modules/core-js/library/modules/_collection-to-json.js b/node_modules/core-js/library/modules/_collection-to-json.js new file mode 100644 index 00000000..a6ee0029 --- /dev/null +++ b/node_modules/core-js/library/modules/_collection-to-json.js @@ -0,0 +1,9 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = require('./_classof'); +var from = require('./_array-from-iterable'); +module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; diff --git a/node_modules/core-js/library/modules/_collection-weak.js b/node_modules/core-js/library/modules/_collection-weak.js new file mode 100644 index 00000000..04d3af5a --- /dev/null +++ b/node_modules/core-js/library/modules/_collection-weak.js @@ -0,0 +1,85 @@ +'use strict'; +var redefineAll = require('./_redefine-all'); +var getWeak = require('./_meta').getWeak; +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var createArrayMethod = require('./_array-methods'); +var $has = require('./_has'); +var validate = require('./_validate-collection'); +var arrayFind = createArrayMethod(5); +var arrayFindIndex = createArrayMethod(6); +var id = 0; + +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); +}; +var UncaughtFrozenStore = function () { + this.a = []; +}; +var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); +}; +UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore +}; diff --git a/node_modules/core-js/library/modules/_collection.js b/node_modules/core-js/library/modules/_collection.js new file mode 100644 index 00000000..31a36b87 --- /dev/null +++ b/node_modules/core-js/library/modules/_collection.js @@ -0,0 +1,59 @@ +'use strict'; +var global = require('./_global'); +var $export = require('./_export'); +var meta = require('./_meta'); +var fails = require('./_fails'); +var hide = require('./_hide'); +var redefineAll = require('./_redefine-all'); +var forOf = require('./_for-of'); +var anInstance = require('./_an-instance'); +var isObject = require('./_is-object'); +var setToStringTag = require('./_set-to-string-tag'); +var dP = require('./_object-dp').f; +var each = require('./_array-methods')(0); +var DESCRIPTORS = require('./_descriptors'); + +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) { + anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + IS_WEAK || dP(C.prototype, 'size', { + get: function () { + return this._c.size; + } + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; +}; diff --git a/node_modules/core-js/library/modules/_core.js b/node_modules/core-js/library/modules/_core.js new file mode 100644 index 00000000..6ab2de52 --- /dev/null +++ b/node_modules/core-js/library/modules/_core.js @@ -0,0 +1,2 @@ +var core = module.exports = { version: '2.6.9' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef diff --git a/node_modules/core-js/library/modules/_create-property.js b/node_modules/core-js/library/modules/_create-property.js new file mode 100644 index 00000000..fd0ea8c9 --- /dev/null +++ b/node_modules/core-js/library/modules/_create-property.js @@ -0,0 +1,8 @@ +'use strict'; +var $defineProperty = require('./_object-dp'); +var createDesc = require('./_property-desc'); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; diff --git a/node_modules/core-js/library/modules/_ctx.js b/node_modules/core-js/library/modules/_ctx.js new file mode 100644 index 00000000..0a100ff3 --- /dev/null +++ b/node_modules/core-js/library/modules/_ctx.js @@ -0,0 +1,20 @@ +// optional / simple context binding +var aFunction = require('./_a-function'); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; diff --git a/node_modules/core-js/library/modules/_date-to-iso-string.js b/node_modules/core-js/library/modules/_date-to-iso-string.js new file mode 100644 index 00000000..95a02e22 --- /dev/null +++ b/node_modules/core-js/library/modules/_date-to-iso-string.js @@ -0,0 +1,26 @@ +'use strict'; +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = require('./_fails'); +var getTime = Date.prototype.getTime; +var $toISOString = Date.prototype.toISOString; + +var lz = function (num) { + return num > 9 ? num : '0' + num; +}; + +// PhantomJS / old WebKit has a broken implementations +module.exports = (fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; +}) || !fails(function () { + $toISOString.call(new Date(NaN)); +})) ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; +} : $toISOString; diff --git a/node_modules/core-js/library/modules/_date-to-primitive.js b/node_modules/core-js/library/modules/_date-to-primitive.js new file mode 100644 index 00000000..57c32030 --- /dev/null +++ b/node_modules/core-js/library/modules/_date-to-primitive.js @@ -0,0 +1,9 @@ +'use strict'; +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); +var NUMBER = 'number'; + +module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; diff --git a/node_modules/core-js/library/modules/_defined.js b/node_modules/core-js/library/modules/_defined.js new file mode 100644 index 00000000..66c7ed32 --- /dev/null +++ b/node_modules/core-js/library/modules/_defined.js @@ -0,0 +1,5 @@ +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; diff --git a/node_modules/core-js/library/modules/_descriptors.js b/node_modules/core-js/library/modules/_descriptors.js new file mode 100644 index 00000000..04697406 --- /dev/null +++ b/node_modules/core-js/library/modules/_descriptors.js @@ -0,0 +1,4 @@ +// Thank's IE8 for his funny defineProperty +module.exports = !require('./_fails')(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); diff --git a/node_modules/core-js/library/modules/_dom-create.js b/node_modules/core-js/library/modules/_dom-create.js new file mode 100644 index 00000000..39ca2569 --- /dev/null +++ b/node_modules/core-js/library/modules/_dom-create.js @@ -0,0 +1,7 @@ +var isObject = require('./_is-object'); +var document = require('./_global').document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; diff --git a/node_modules/core-js/library/modules/_entry-virtual.js b/node_modules/core-js/library/modules/_entry-virtual.js new file mode 100644 index 00000000..7a734390 --- /dev/null +++ b/node_modules/core-js/library/modules/_entry-virtual.js @@ -0,0 +1,5 @@ +var core = require('./_core'); +module.exports = function (CONSTRUCTOR) { + var C = core[CONSTRUCTOR]; + return (C.virtual || C.prototype); +}; diff --git a/node_modules/core-js/library/modules/_enum-bug-keys.js b/node_modules/core-js/library/modules/_enum-bug-keys.js new file mode 100644 index 00000000..d9ad8551 --- /dev/null +++ b/node_modules/core-js/library/modules/_enum-bug-keys.js @@ -0,0 +1,4 @@ +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); diff --git a/node_modules/core-js/library/modules/_enum-keys.js b/node_modules/core-js/library/modules/_enum-keys.js new file mode 100644 index 00000000..3e7053d1 --- /dev/null +++ b/node_modules/core-js/library/modules/_enum-keys.js @@ -0,0 +1,15 @@ +// all enumerable object keys, includes symbols +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; diff --git a/node_modules/core-js/library/modules/_export.js b/node_modules/core-js/library/modules/_export.js new file mode 100644 index 00000000..02bddc0a --- /dev/null +++ b/node_modules/core-js/library/modules/_export.js @@ -0,0 +1,62 @@ +var global = require('./_global'); +var core = require('./_core'); +var ctx = require('./_ctx'); +var hide = require('./_hide'); +var has = require('./_has'); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; diff --git a/node_modules/core-js/library/modules/_fails-is-regexp.js b/node_modules/core-js/library/modules/_fails-is-regexp.js new file mode 100644 index 00000000..8eec2e47 --- /dev/null +++ b/node_modules/core-js/library/modules/_fails-is-regexp.js @@ -0,0 +1,12 @@ +var MATCH = require('./_wks')('match'); +module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { /* empty */ } + } return true; +}; diff --git a/node_modules/core-js/library/modules/_fails.js b/node_modules/core-js/library/modules/_fails.js new file mode 100644 index 00000000..3b4cdf67 --- /dev/null +++ b/node_modules/core-js/library/modules/_fails.js @@ -0,0 +1,7 @@ +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; diff --git a/node_modules/core-js/library/modules/_fix-re-wks.js b/node_modules/core-js/library/modules/_fix-re-wks.js new file mode 100644 index 00000000..64d00fe6 --- /dev/null +++ b/node_modules/core-js/library/modules/_fix-re-wks.js @@ -0,0 +1,96 @@ +'use strict'; +require('./es6.regexp.exec'); +var redefine = require('./_redefine'); +var hide = require('./_hide'); +var fails = require('./_fails'); +var defined = require('./_defined'); +var wks = require('./_wks'); +var regexpExec = require('./_regexp-exec'); + +var SPECIES = wks('species'); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; +}); + +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; +})(); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { execCalled = true; return null; }; + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + } + re[SYMBOL](''); + return !execCalled; + }) : undefined; + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + } + ); + var strfn = fns[0]; + var rxfn = fns[1]; + + redefine(String.prototype, KEY, strfn); + hide(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return rxfn.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return rxfn.call(string, this); } + ); + } +}; diff --git a/node_modules/core-js/library/modules/_flags.js b/node_modules/core-js/library/modules/_flags.js new file mode 100644 index 00000000..b6fc324b --- /dev/null +++ b/node_modules/core-js/library/modules/_flags.js @@ -0,0 +1,13 @@ +'use strict'; +// 21.2.5.3 get RegExp.prototype.flags +var anObject = require('./_an-object'); +module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; +}; diff --git a/node_modules/core-js/library/modules/_flatten-into-array.js b/node_modules/core-js/library/modules/_flatten-into-array.js new file mode 100644 index 00000000..1838517a --- /dev/null +++ b/node_modules/core-js/library/modules/_flatten-into-array.js @@ -0,0 +1,39 @@ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = require('./_is-array'); +var isObject = require('./_is-object'); +var toLength = require('./_to-length'); +var ctx = require('./_ctx'); +var IS_CONCAT_SPREADABLE = require('./_wks')('isConcatSpreadable'); + +function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; +} + +module.exports = flattenIntoArray; diff --git a/node_modules/core-js/library/modules/_for-of.js b/node_modules/core-js/library/modules/_for-of.js new file mode 100644 index 00000000..9ed22818 --- /dev/null +++ b/node_modules/core-js/library/modules/_for-of.js @@ -0,0 +1,25 @@ +var ctx = require('./_ctx'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var anObject = require('./_an-object'); +var toLength = require('./_to-length'); +var getIterFn = require('./core.get-iterator-method'); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; diff --git a/node_modules/core-js/library/modules/_function-to-string.js b/node_modules/core-js/library/modules/_function-to-string.js new file mode 100644 index 00000000..d7f5419c --- /dev/null +++ b/node_modules/core-js/library/modules/_function-to-string.js @@ -0,0 +1 @@ +module.exports = require('./_shared')('native-function-to-string', Function.toString); diff --git a/node_modules/core-js/library/modules/_global.js b/node_modules/core-js/library/modules/_global.js new file mode 100644 index 00000000..bf85b44a --- /dev/null +++ b/node_modules/core-js/library/modules/_global.js @@ -0,0 +1,6 @@ +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef diff --git a/node_modules/core-js/library/modules/_has.js b/node_modules/core-js/library/modules/_has.js new file mode 100644 index 00000000..2a37d8b7 --- /dev/null +++ b/node_modules/core-js/library/modules/_has.js @@ -0,0 +1,4 @@ +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; diff --git a/node_modules/core-js/library/modules/_hide.js b/node_modules/core-js/library/modules/_hide.js new file mode 100644 index 00000000..cec258a0 --- /dev/null +++ b/node_modules/core-js/library/modules/_hide.js @@ -0,0 +1,8 @@ +var dP = require('./_object-dp'); +var createDesc = require('./_property-desc'); +module.exports = require('./_descriptors') ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; diff --git a/node_modules/core-js/library/modules/_html.js b/node_modules/core-js/library/modules/_html.js new file mode 100644 index 00000000..7daff14c --- /dev/null +++ b/node_modules/core-js/library/modules/_html.js @@ -0,0 +1,2 @@ +var document = require('./_global').document; +module.exports = document && document.documentElement; diff --git a/node_modules/core-js/library/modules/_ie8-dom-define.js b/node_modules/core-js/library/modules/_ie8-dom-define.js new file mode 100644 index 00000000..a3805cb7 --- /dev/null +++ b/node_modules/core-js/library/modules/_ie8-dom-define.js @@ -0,0 +1,3 @@ +module.exports = !require('./_descriptors') && !require('./_fails')(function () { + return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7; +}); diff --git a/node_modules/core-js/library/modules/_inherit-if-required.js b/node_modules/core-js/library/modules/_inherit-if-required.js new file mode 100644 index 00000000..b95fcd98 --- /dev/null +++ b/node_modules/core-js/library/modules/_inherit-if-required.js @@ -0,0 +1,9 @@ +var isObject = require('./_is-object'); +var setPrototypeOf = require('./_set-proto').set; +module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P); + } return that; +}; diff --git a/node_modules/core-js/library/modules/_invoke.js b/node_modules/core-js/library/modules/_invoke.js new file mode 100644 index 00000000..6cccebdc --- /dev/null +++ b/node_modules/core-js/library/modules/_invoke.js @@ -0,0 +1,16 @@ +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; diff --git a/node_modules/core-js/library/modules/_iobject.js b/node_modules/core-js/library/modules/_iobject.js new file mode 100644 index 00000000..2b57c8a0 --- /dev/null +++ b/node_modules/core-js/library/modules/_iobject.js @@ -0,0 +1,6 @@ +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = require('./_cof'); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; diff --git a/node_modules/core-js/library/modules/_is-array-iter.js b/node_modules/core-js/library/modules/_is-array-iter.js new file mode 100644 index 00000000..6f67d905 --- /dev/null +++ b/node_modules/core-js/library/modules/_is-array-iter.js @@ -0,0 +1,8 @@ +// check on default Array iterator +var Iterators = require('./_iterators'); +var ITERATOR = require('./_wks')('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; diff --git a/node_modules/core-js/library/modules/_is-array.js b/node_modules/core-js/library/modules/_is-array.js new file mode 100644 index 00000000..0581dc2e --- /dev/null +++ b/node_modules/core-js/library/modules/_is-array.js @@ -0,0 +1,5 @@ +// 7.2.2 IsArray(argument) +var cof = require('./_cof'); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; diff --git a/node_modules/core-js/library/modules/_is-integer.js b/node_modules/core-js/library/modules/_is-integer.js new file mode 100644 index 00000000..0074ae97 --- /dev/null +++ b/node_modules/core-js/library/modules/_is-integer.js @@ -0,0 +1,6 @@ +// 20.1.2.3 Number.isInteger(number) +var isObject = require('./_is-object'); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; diff --git a/node_modules/core-js/library/modules/_is-object.js b/node_modules/core-js/library/modules/_is-object.js new file mode 100644 index 00000000..dda6e04d --- /dev/null +++ b/node_modules/core-js/library/modules/_is-object.js @@ -0,0 +1,3 @@ +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; diff --git a/node_modules/core-js/library/modules/_is-regexp.js b/node_modules/core-js/library/modules/_is-regexp.js new file mode 100644 index 00000000..598d159d --- /dev/null +++ b/node_modules/core-js/library/modules/_is-regexp.js @@ -0,0 +1,8 @@ +// 7.2.8 IsRegExp(argument) +var isObject = require('./_is-object'); +var cof = require('./_cof'); +var MATCH = require('./_wks')('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; diff --git a/node_modules/core-js/library/modules/_iter-call.js b/node_modules/core-js/library/modules/_iter-call.js new file mode 100644 index 00000000..a7026e34 --- /dev/null +++ b/node_modules/core-js/library/modules/_iter-call.js @@ -0,0 +1,12 @@ +// call something on iterator step with safe closing on error +var anObject = require('./_an-object'); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; diff --git a/node_modules/core-js/library/modules/_iter-create.js b/node_modules/core-js/library/modules/_iter-create.js new file mode 100644 index 00000000..04708c83 --- /dev/null +++ b/node_modules/core-js/library/modules/_iter-create.js @@ -0,0 +1,13 @@ +'use strict'; +var create = require('./_object-create'); +var descriptor = require('./_property-desc'); +var setToStringTag = require('./_set-to-string-tag'); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; diff --git a/node_modules/core-js/library/modules/_iter-define.js b/node_modules/core-js/library/modules/_iter-define.js new file mode 100644 index 00000000..578dfb73 --- /dev/null +++ b/node_modules/core-js/library/modules/_iter-define.js @@ -0,0 +1,69 @@ +'use strict'; +var LIBRARY = require('./_library'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var $iterCreate = require('./_iter-create'); +var setToStringTag = require('./_set-to-string-tag'); +var getPrototypeOf = require('./_object-gpo'); +var ITERATOR = require('./_wks')('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; diff --git a/node_modules/core-js/library/modules/_iter-detect.js b/node_modules/core-js/library/modules/_iter-detect.js new file mode 100644 index 00000000..5cb34973 --- /dev/null +++ b/node_modules/core-js/library/modules/_iter-detect.js @@ -0,0 +1,22 @@ +var ITERATOR = require('./_wks')('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } + +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; diff --git a/node_modules/core-js/library/modules/_iter-step.js b/node_modules/core-js/library/modules/_iter-step.js new file mode 100644 index 00000000..b0691c88 --- /dev/null +++ b/node_modules/core-js/library/modules/_iter-step.js @@ -0,0 +1,3 @@ +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; diff --git a/node_modules/core-js/library/modules/_iterators.js b/node_modules/core-js/library/modules/_iterators.js new file mode 100644 index 00000000..f053ebf7 --- /dev/null +++ b/node_modules/core-js/library/modules/_iterators.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/node_modules/core-js/library/modules/_keyof.js b/node_modules/core-js/library/modules/_keyof.js new file mode 100644 index 00000000..0786096f --- /dev/null +++ b/node_modules/core-js/library/modules/_keyof.js @@ -0,0 +1,10 @@ +var getKeys = require('./_object-keys'); +var toIObject = require('./_to-iobject'); +module.exports = function (object, el) { + var O = toIObject(object); + var keys = getKeys(O); + var length = keys.length; + var index = 0; + var key; + while (length > index) if (O[key = keys[index++]] === el) return key; +}; diff --git a/node_modules/core-js/library/modules/_library.js b/node_modules/core-js/library/modules/_library.js new file mode 100644 index 00000000..ec01c2c1 --- /dev/null +++ b/node_modules/core-js/library/modules/_library.js @@ -0,0 +1 @@ +module.exports = true; diff --git a/node_modules/core-js/library/modules/_math-expm1.js b/node_modules/core-js/library/modules/_math-expm1.js new file mode 100644 index 00000000..75c68501 --- /dev/null +++ b/node_modules/core-js/library/modules/_math-expm1.js @@ -0,0 +1,10 @@ +// 20.2.2.14 Math.expm1(x) +var $expm1 = Math.expm1; +module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 +) ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; +} : $expm1; diff --git a/node_modules/core-js/library/modules/_math-fround.js b/node_modules/core-js/library/modules/_math-fround.js new file mode 100644 index 00000000..c85eb4b7 --- /dev/null +++ b/node_modules/core-js/library/modules/_math-fround.js @@ -0,0 +1,23 @@ +// 20.2.2.16 Math.fround(x) +var sign = require('./_math-sign'); +var pow = Math.pow; +var EPSILON = pow(2, -52); +var EPSILON32 = pow(2, -23); +var MAX32 = pow(2, 127) * (2 - EPSILON32); +var MIN32 = pow(2, -126); + +var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; +}; + +module.exports = Math.fround || function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; +}; diff --git a/node_modules/core-js/library/modules/_math-log1p.js b/node_modules/core-js/library/modules/_math-log1p.js new file mode 100644 index 00000000..16d5f493 --- /dev/null +++ b/node_modules/core-js/library/modules/_math-log1p.js @@ -0,0 +1,4 @@ +// 20.2.2.20 Math.log1p(x) +module.exports = Math.log1p || function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); +}; diff --git a/node_modules/core-js/library/modules/_math-scale.js b/node_modules/core-js/library/modules/_math-scale.js new file mode 100644 index 00000000..ba3cdb20 --- /dev/null +++ b/node_modules/core-js/library/modules/_math-scale.js @@ -0,0 +1,18 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { + if ( + arguments.length === 0 + // eslint-disable-next-line no-self-compare + || x != x + // eslint-disable-next-line no-self-compare + || inLow != inLow + // eslint-disable-next-line no-self-compare + || inHigh != inHigh + // eslint-disable-next-line no-self-compare + || outLow != outLow + // eslint-disable-next-line no-self-compare + || outHigh != outHigh + ) return NaN; + if (x === Infinity || x === -Infinity) return x; + return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; +}; diff --git a/node_modules/core-js/library/modules/_math-sign.js b/node_modules/core-js/library/modules/_math-sign.js new file mode 100644 index 00000000..7a46b9d0 --- /dev/null +++ b/node_modules/core-js/library/modules/_math-sign.js @@ -0,0 +1,5 @@ +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; diff --git a/node_modules/core-js/library/modules/_meta.js b/node_modules/core-js/library/modules/_meta.js new file mode 100644 index 00000000..2d4b3257 --- /dev/null +++ b/node_modules/core-js/library/modules/_meta.js @@ -0,0 +1,53 @@ +var META = require('./_uid')('meta'); +var isObject = require('./_is-object'); +var has = require('./_has'); +var setDesc = require('./_object-dp').f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !require('./_fails')(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; diff --git a/node_modules/core-js/library/modules/_metadata.js b/node_modules/core-js/library/modules/_metadata.js new file mode 100644 index 00000000..759cfc44 --- /dev/null +++ b/node_modules/core-js/library/modules/_metadata.js @@ -0,0 +1,51 @@ +var Map = require('./es6.map'); +var $export = require('./_export'); +var shared = require('./_shared')('metadata'); +var store = shared.store || (shared.store = new (require('./es6.weak-map'))()); + +var getOrCreateMetadataMap = function (target, targetKey, create) { + var targetMetadata = store.get(target); + if (!targetMetadata) { + if (!create) return undefined; + store.set(target, targetMetadata = new Map()); + } + var keyMetadata = targetMetadata.get(targetKey); + if (!keyMetadata) { + if (!create) return undefined; + targetMetadata.set(targetKey, keyMetadata = new Map()); + } return keyMetadata; +}; +var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); +}; +var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); +}; +var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); +}; +var ordinaryOwnMetadataKeys = function (target, targetKey) { + var metadataMap = getOrCreateMetadataMap(target, targetKey, false); + var keys = []; + if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); }); + return keys; +}; +var toMetaKey = function (it) { + return it === undefined || typeof it == 'symbol' ? it : String(it); +}; +var exp = function (O) { + $export($export.S, 'Reflect', O); +}; + +module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp +}; diff --git a/node_modules/core-js/library/modules/_microtask.js b/node_modules/core-js/library/modules/_microtask.js new file mode 100644 index 00000000..b321c648 --- /dev/null +++ b/node_modules/core-js/library/modules/_microtask.js @@ -0,0 +1,69 @@ +var global = require('./_global'); +var macrotask = require('./_task').set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = require('./_cof')(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; diff --git a/node_modules/core-js/library/modules/_native-weak-map.js b/node_modules/core-js/library/modules/_native-weak-map.js new file mode 100644 index 00000000..ebaf445f --- /dev/null +++ b/node_modules/core-js/library/modules/_native-weak-map.js @@ -0,0 +1,4 @@ +var nativeFunctionToString = require('./_function-to-string'); +var WeakMap = require('./_global').WeakMap; + +module.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap)); diff --git a/node_modules/core-js/library/modules/_new-promise-capability.js b/node_modules/core-js/library/modules/_new-promise-capability.js new file mode 100644 index 00000000..82b74a33 --- /dev/null +++ b/node_modules/core-js/library/modules/_new-promise-capability.js @@ -0,0 +1,18 @@ +'use strict'; +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = require('./_a-function'); + +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; diff --git a/node_modules/core-js/library/modules/_object-assign.js b/node_modules/core-js/library/modules/_object-assign.js new file mode 100644 index 00000000..d739c430 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-assign.js @@ -0,0 +1,38 @@ +'use strict'; +// 19.1.2.1 Object.assign(target, source, ...) +var DESCRIPTORS = require('./_descriptors'); +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || require('./_fails')(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } return T; +} : $assign; diff --git a/node_modules/core-js/library/modules/_object-create.js b/node_modules/core-js/library/modules/_object-create.js new file mode 100644 index 00000000..a76808ea --- /dev/null +++ b/node_modules/core-js/library/modules/_object-create.js @@ -0,0 +1,41 @@ +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = require('./_an-object'); +var dPs = require('./_object-dps'); +var enumBugKeys = require('./_enum-bug-keys'); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = require('./_dom-create')('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + require('./_html').appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; diff --git a/node_modules/core-js/library/modules/_object-define.js b/node_modules/core-js/library/modules/_object-define.js new file mode 100644 index 00000000..4d131f33 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-define.js @@ -0,0 +1,13 @@ +var dP = require('./_object-dp'); +var gOPD = require('./_object-gopd'); +var ownKeys = require('./_own-keys'); +var toIObject = require('./_to-iobject'); + +module.exports = function define(target, mixin) { + var keys = ownKeys(toIObject(mixin)); + var length = keys.length; + var i = 0; + var key; + while (length > i) dP.f(target, key = keys[i++], gOPD.f(mixin, key)); + return target; +}; diff --git a/node_modules/core-js/library/modules/_object-dp.js b/node_modules/core-js/library/modules/_object-dp.js new file mode 100644 index 00000000..0340a830 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-dp.js @@ -0,0 +1,16 @@ +var anObject = require('./_an-object'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var toPrimitive = require('./_to-primitive'); +var dP = Object.defineProperty; + +exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; diff --git a/node_modules/core-js/library/modules/_object-dps.js b/node_modules/core-js/library/modules/_object-dps.js new file mode 100644 index 00000000..173c338f --- /dev/null +++ b/node_modules/core-js/library/modules/_object-dps.js @@ -0,0 +1,13 @@ +var dP = require('./_object-dp'); +var anObject = require('./_an-object'); +var getKeys = require('./_object-keys'); + +module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; diff --git a/node_modules/core-js/library/modules/_object-forced-pam.js b/node_modules/core-js/library/modules/_object-forced-pam.js new file mode 100644 index 00000000..71ede922 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-forced-pam.js @@ -0,0 +1,9 @@ +'use strict'; +// Forced replacement prototype accessors methods +module.exports = require('./_library') || !require('./_fails')(function () { + var K = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, K, function () { /* empty */ }); + delete require('./_global')[K]; +}); diff --git a/node_modules/core-js/library/modules/_object-gopd.js b/node_modules/core-js/library/modules/_object-gopd.js new file mode 100644 index 00000000..555dd31a --- /dev/null +++ b/node_modules/core-js/library/modules/_object-gopd.js @@ -0,0 +1,16 @@ +var pIE = require('./_object-pie'); +var createDesc = require('./_property-desc'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var has = require('./_has'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return gOPD(O, P); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +}; diff --git a/node_modules/core-js/library/modules/_object-gopn-ext.js b/node_modules/core-js/library/modules/_object-gopn-ext.js new file mode 100644 index 00000000..4abb6ae8 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-gopn-ext.js @@ -0,0 +1,19 @@ +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = require('./_to-iobject'); +var gOPN = require('./_object-gopn').f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; diff --git a/node_modules/core-js/library/modules/_object-gopn.js b/node_modules/core-js/library/modules/_object-gopn.js new file mode 100644 index 00000000..da82333f --- /dev/null +++ b/node_modules/core-js/library/modules/_object-gopn.js @@ -0,0 +1,7 @@ +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = require('./_object-keys-internal'); +var hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; diff --git a/node_modules/core-js/library/modules/_object-gops.js b/node_modules/core-js/library/modules/_object-gops.js new file mode 100644 index 00000000..bc067290 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-gops.js @@ -0,0 +1 @@ +exports.f = Object.getOwnPropertySymbols; diff --git a/node_modules/core-js/library/modules/_object-gpo.js b/node_modules/core-js/library/modules/_object-gpo.js new file mode 100644 index 00000000..27f2a94e --- /dev/null +++ b/node_modules/core-js/library/modules/_object-gpo.js @@ -0,0 +1,13 @@ +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = require('./_has'); +var toObject = require('./_to-object'); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; diff --git a/node_modules/core-js/library/modules/_object-keys-internal.js b/node_modules/core-js/library/modules/_object-keys-internal.js new file mode 100644 index 00000000..71abdd1a --- /dev/null +++ b/node_modules/core-js/library/modules/_object-keys-internal.js @@ -0,0 +1,17 @@ +var has = require('./_has'); +var toIObject = require('./_to-iobject'); +var arrayIndexOf = require('./_array-includes')(false); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; diff --git a/node_modules/core-js/library/modules/_object-keys.js b/node_modules/core-js/library/modules/_object-keys.js new file mode 100644 index 00000000..62f73f91 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-keys.js @@ -0,0 +1,7 @@ +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = require('./_object-keys-internal'); +var enumBugKeys = require('./_enum-bug-keys'); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; diff --git a/node_modules/core-js/library/modules/_object-pie.js b/node_modules/core-js/library/modules/_object-pie.js new file mode 100644 index 00000000..4cc71072 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-pie.js @@ -0,0 +1 @@ +exports.f = {}.propertyIsEnumerable; diff --git a/node_modules/core-js/library/modules/_object-sap.js b/node_modules/core-js/library/modules/_object-sap.js new file mode 100644 index 00000000..643535e0 --- /dev/null +++ b/node_modules/core-js/library/modules/_object-sap.js @@ -0,0 +1,10 @@ +// most Object methods by ES6 should accept primitives +var $export = require('./_export'); +var core = require('./_core'); +var fails = require('./_fails'); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; diff --git a/node_modules/core-js/library/modules/_object-to-array.js b/node_modules/core-js/library/modules/_object-to-array.js new file mode 100644 index 00000000..288b5fcc --- /dev/null +++ b/node_modules/core-js/library/modules/_object-to-array.js @@ -0,0 +1,21 @@ +var DESCRIPTORS = require('./_descriptors'); +var getKeys = require('./_object-keys'); +var toIObject = require('./_to-iobject'); +var isEnum = require('./_object-pie').f; +module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; diff --git a/node_modules/core-js/library/modules/_own-keys.js b/node_modules/core-js/library/modules/_own-keys.js new file mode 100644 index 00000000..84faece8 --- /dev/null +++ b/node_modules/core-js/library/modules/_own-keys.js @@ -0,0 +1,10 @@ +// all object keys, includes non-enumerable and symbols +var gOPN = require('./_object-gopn'); +var gOPS = require('./_object-gops'); +var anObject = require('./_an-object'); +var Reflect = require('./_global').Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; diff --git a/node_modules/core-js/library/modules/_parse-float.js b/node_modules/core-js/library/modules/_parse-float.js new file mode 100644 index 00000000..acfb350f --- /dev/null +++ b/node_modules/core-js/library/modules/_parse-float.js @@ -0,0 +1,8 @@ +var $parseFloat = require('./_global').parseFloat; +var $trim = require('./_string-trim').trim; + +module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; diff --git a/node_modules/core-js/library/modules/_parse-int.js b/node_modules/core-js/library/modules/_parse-int.js new file mode 100644 index 00000000..ddd7172a --- /dev/null +++ b/node_modules/core-js/library/modules/_parse-int.js @@ -0,0 +1,9 @@ +var $parseInt = require('./_global').parseInt; +var $trim = require('./_string-trim').trim; +var ws = require('./_string-ws'); +var hex = /^[-+]?0[xX]/; + +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : $parseInt; diff --git a/node_modules/core-js/library/modules/_partial.js b/node_modules/core-js/library/modules/_partial.js new file mode 100644 index 00000000..ca3f35bf --- /dev/null +++ b/node_modules/core-js/library/modules/_partial.js @@ -0,0 +1,25 @@ +'use strict'; +var path = require('./_path'); +var invoke = require('./_invoke'); +var aFunction = require('./_a-function'); +module.exports = function (/* ...pargs */) { + var fn = aFunction(this); + var length = arguments.length; + var pargs = new Array(length); + var i = 0; + var _ = path._; + var holder = false; + while (length > i) if ((pargs[i] = arguments[i++]) === _) holder = true; + return function (/* ...args */) { + var that = this; + var aLen = arguments.length; + var j = 0; + var k = 0; + var args; + if (!holder && !aLen) return invoke(fn, pargs, that); + args = pargs.slice(); + if (holder) for (;length > j; j++) if (args[j] === _) args[j] = arguments[k++]; + while (aLen > k) args.push(arguments[k++]); + return invoke(fn, args, that); + }; +}; diff --git a/node_modules/core-js/library/modules/_path.js b/node_modules/core-js/library/modules/_path.js new file mode 100644 index 00000000..2796ebcb --- /dev/null +++ b/node_modules/core-js/library/modules/_path.js @@ -0,0 +1 @@ +module.exports = require('./_core'); diff --git a/node_modules/core-js/library/modules/_perform.js b/node_modules/core-js/library/modules/_perform.js new file mode 100644 index 00000000..bfc7b296 --- /dev/null +++ b/node_modules/core-js/library/modules/_perform.js @@ -0,0 +1,7 @@ +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; diff --git a/node_modules/core-js/library/modules/_promise-resolve.js b/node_modules/core-js/library/modules/_promise-resolve.js new file mode 100644 index 00000000..c3cac764 --- /dev/null +++ b/node_modules/core-js/library/modules/_promise-resolve.js @@ -0,0 +1,12 @@ +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var newPromiseCapability = require('./_new-promise-capability'); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; diff --git a/node_modules/core-js/library/modules/_property-desc.js b/node_modules/core-js/library/modules/_property-desc.js new file mode 100644 index 00000000..09059340 --- /dev/null +++ b/node_modules/core-js/library/modules/_property-desc.js @@ -0,0 +1,8 @@ +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; diff --git a/node_modules/core-js/library/modules/_redefine-all.js b/node_modules/core-js/library/modules/_redefine-all.js new file mode 100644 index 00000000..bf8c0ea3 --- /dev/null +++ b/node_modules/core-js/library/modules/_redefine-all.js @@ -0,0 +1,7 @@ +var hide = require('./_hide'); +module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; diff --git a/node_modules/core-js/library/modules/_redefine.js b/node_modules/core-js/library/modules/_redefine.js new file mode 100644 index 00000000..fde6108e --- /dev/null +++ b/node_modules/core-js/library/modules/_redefine.js @@ -0,0 +1 @@ +module.exports = require('./_hide'); diff --git a/node_modules/core-js/library/modules/_regexp-exec-abstract.js b/node_modules/core-js/library/modules/_regexp-exec-abstract.js new file mode 100644 index 00000000..8b1a3937 --- /dev/null +++ b/node_modules/core-js/library/modules/_regexp-exec-abstract.js @@ -0,0 +1 @@ +// empty diff --git a/node_modules/core-js/library/modules/_regexp-exec.js b/node_modules/core-js/library/modules/_regexp-exec.js new file mode 100644 index 00000000..8b1a3937 --- /dev/null +++ b/node_modules/core-js/library/modules/_regexp-exec.js @@ -0,0 +1 @@ +// empty diff --git a/node_modules/core-js/library/modules/_replacer.js b/node_modules/core-js/library/modules/_replacer.js new file mode 100644 index 00000000..c37703dd --- /dev/null +++ b/node_modules/core-js/library/modules/_replacer.js @@ -0,0 +1,8 @@ +module.exports = function (regExp, replace) { + var replacer = replace === Object(replace) ? function (part) { + return replace[part]; + } : replace; + return function (it) { + return String(it).replace(regExp, replacer); + }; +}; diff --git a/node_modules/core-js/library/modules/_same-value.js b/node_modules/core-js/library/modules/_same-value.js new file mode 100644 index 00000000..c6d045e8 --- /dev/null +++ b/node_modules/core-js/library/modules/_same-value.js @@ -0,0 +1,5 @@ +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; diff --git a/node_modules/core-js/library/modules/_set-collection-from.js b/node_modules/core-js/library/modules/_set-collection-from.js new file mode 100644 index 00000000..d5001f93 --- /dev/null +++ b/node_modules/core-js/library/modules/_set-collection-from.js @@ -0,0 +1,28 @@ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var ctx = require('./_ctx'); +var forOf = require('./_for-of'); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + } }); +}; diff --git a/node_modules/core-js/library/modules/_set-collection-of.js b/node_modules/core-js/library/modules/_set-collection-of.js new file mode 100644 index 00000000..f559af3f --- /dev/null +++ b/node_modules/core-js/library/modules/_set-collection-of.js @@ -0,0 +1,12 @@ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); +}; diff --git a/node_modules/core-js/library/modules/_set-proto.js b/node_modules/core-js/library/modules/_set-proto.js new file mode 100644 index 00000000..c1990622 --- /dev/null +++ b/node_modules/core-js/library/modules/_set-proto.js @@ -0,0 +1,25 @@ +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = require('./_is-object'); +var anObject = require('./_an-object'); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; diff --git a/node_modules/core-js/library/modules/_set-species.js b/node_modules/core-js/library/modules/_set-species.js new file mode 100644 index 00000000..1f25fde1 --- /dev/null +++ b/node_modules/core-js/library/modules/_set-species.js @@ -0,0 +1,14 @@ +'use strict'; +var global = require('./_global'); +var core = require('./_core'); +var dP = require('./_object-dp'); +var DESCRIPTORS = require('./_descriptors'); +var SPECIES = require('./_wks')('species'); + +module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; diff --git a/node_modules/core-js/library/modules/_set-to-string-tag.js b/node_modules/core-js/library/modules/_set-to-string-tag.js new file mode 100644 index 00000000..5bd64144 --- /dev/null +++ b/node_modules/core-js/library/modules/_set-to-string-tag.js @@ -0,0 +1,7 @@ +var def = require('./_object-dp').f; +var has = require('./_has'); +var TAG = require('./_wks')('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; diff --git a/node_modules/core-js/library/modules/_shared-key.js b/node_modules/core-js/library/modules/_shared-key.js new file mode 100644 index 00000000..d47fe7a2 --- /dev/null +++ b/node_modules/core-js/library/modules/_shared-key.js @@ -0,0 +1,5 @@ +var shared = require('./_shared')('keys'); +var uid = require('./_uid'); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; diff --git a/node_modules/core-js/library/modules/_shared.js b/node_modules/core-js/library/modules/_shared.js new file mode 100644 index 00000000..3adec722 --- /dev/null +++ b/node_modules/core-js/library/modules/_shared.js @@ -0,0 +1,12 @@ +var core = require('./_core'); +var global = require('./_global'); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: require('./_library') ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' +}); diff --git a/node_modules/core-js/library/modules/_species-constructor.js b/node_modules/core-js/library/modules/_species-constructor.js new file mode 100644 index 00000000..0cb4ffb8 --- /dev/null +++ b/node_modules/core-js/library/modules/_species-constructor.js @@ -0,0 +1,9 @@ +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +var SPECIES = require('./_wks')('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; diff --git a/node_modules/core-js/library/modules/_strict-method.js b/node_modules/core-js/library/modules/_strict-method.js new file mode 100644 index 00000000..e68f41bb --- /dev/null +++ b/node_modules/core-js/library/modules/_strict-method.js @@ -0,0 +1,9 @@ +'use strict'; +var fails = require('./_fails'); + +module.exports = function (method, arg) { + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call + arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); + }); +}; diff --git a/node_modules/core-js/library/modules/_string-at.js b/node_modules/core-js/library/modules/_string-at.js new file mode 100644 index 00000000..88d66bd1 --- /dev/null +++ b/node_modules/core-js/library/modules/_string-at.js @@ -0,0 +1,17 @@ +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; diff --git a/node_modules/core-js/library/modules/_string-context.js b/node_modules/core-js/library/modules/_string-context.js new file mode 100644 index 00000000..becf3fbe --- /dev/null +++ b/node_modules/core-js/library/modules/_string-context.js @@ -0,0 +1,8 @@ +// helper for String#{startsWith, endsWith, includes} +var isRegExp = require('./_is-regexp'); +var defined = require('./_defined'); + +module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; diff --git a/node_modules/core-js/library/modules/_string-html.js b/node_modules/core-js/library/modules/_string-html.js new file mode 100644 index 00000000..1dcc95bc --- /dev/null +++ b/node_modules/core-js/library/modules/_string-html.js @@ -0,0 +1,19 @@ +var $export = require('./_export'); +var fails = require('./_fails'); +var defined = require('./_defined'); +var quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; +}; +module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export($export.P + $export.F * fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), 'String', O); +}; diff --git a/node_modules/core-js/library/modules/_string-pad.js b/node_modules/core-js/library/modules/_string-pad.js new file mode 100644 index 00000000..ceb6077f --- /dev/null +++ b/node_modules/core-js/library/modules/_string-pad.js @@ -0,0 +1,16 @@ +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = require('./_to-length'); +var repeat = require('./_string-repeat'); +var defined = require('./_defined'); + +module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; +}; diff --git a/node_modules/core-js/library/modules/_string-repeat.js b/node_modules/core-js/library/modules/_string-repeat.js new file mode 100644 index 00000000..a69b9626 --- /dev/null +++ b/node_modules/core-js/library/modules/_string-repeat.js @@ -0,0 +1,12 @@ +'use strict'; +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); + +module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; +}; diff --git a/node_modules/core-js/library/modules/_string-trim.js b/node_modules/core-js/library/modules/_string-trim.js new file mode 100644 index 00000000..6b54a81a --- /dev/null +++ b/node_modules/core-js/library/modules/_string-trim.js @@ -0,0 +1,30 @@ +var $export = require('./_export'); +var defined = require('./_defined'); +var fails = require('./_fails'); +var spaces = require('./_string-ws'); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var rtrim = RegExp(space + space + '*$'); + +var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); +}; + +// 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim +var trim = exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; +}; + +module.exports = exporter; diff --git a/node_modules/core-js/library/modules/_string-ws.js b/node_modules/core-js/library/modules/_string-ws.js new file mode 100644 index 00000000..2c68cf9f --- /dev/null +++ b/node_modules/core-js/library/modules/_string-ws.js @@ -0,0 +1,2 @@ +module.exports = '\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'; diff --git a/node_modules/core-js/library/modules/_task.js b/node_modules/core-js/library/modules/_task.js new file mode 100644 index 00000000..8777a6e2 --- /dev/null +++ b/node_modules/core-js/library/modules/_task.js @@ -0,0 +1,84 @@ +var ctx = require('./_ctx'); +var invoke = require('./_invoke'); +var html = require('./_html'); +var cel = require('./_dom-create'); +var global = require('./_global'); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (require('./_cof')(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; diff --git a/node_modules/core-js/library/modules/_to-absolute-index.js b/node_modules/core-js/library/modules/_to-absolute-index.js new file mode 100644 index 00000000..dfee02e8 --- /dev/null +++ b/node_modules/core-js/library/modules/_to-absolute-index.js @@ -0,0 +1,7 @@ +var toInteger = require('./_to-integer'); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; diff --git a/node_modules/core-js/library/modules/_to-index.js b/node_modules/core-js/library/modules/_to-index.js new file mode 100644 index 00000000..8f51c32d --- /dev/null +++ b/node_modules/core-js/library/modules/_to-index.js @@ -0,0 +1,10 @@ +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; +}; diff --git a/node_modules/core-js/library/modules/_to-integer.js b/node_modules/core-js/library/modules/_to-integer.js new file mode 100644 index 00000000..3d50f97d --- /dev/null +++ b/node_modules/core-js/library/modules/_to-integer.js @@ -0,0 +1,6 @@ +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; diff --git a/node_modules/core-js/library/modules/_to-iobject.js b/node_modules/core-js/library/modules/_to-iobject.js new file mode 100644 index 00000000..7614503a --- /dev/null +++ b/node_modules/core-js/library/modules/_to-iobject.js @@ -0,0 +1,6 @@ +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = require('./_iobject'); +var defined = require('./_defined'); +module.exports = function (it) { + return IObject(defined(it)); +}; diff --git a/node_modules/core-js/library/modules/_to-length.js b/node_modules/core-js/library/modules/_to-length.js new file mode 100644 index 00000000..a9db5017 --- /dev/null +++ b/node_modules/core-js/library/modules/_to-length.js @@ -0,0 +1,6 @@ +// 7.1.15 ToLength +var toInteger = require('./_to-integer'); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; diff --git a/node_modules/core-js/library/modules/_to-object.js b/node_modules/core-js/library/modules/_to-object.js new file mode 100644 index 00000000..0efea4c6 --- /dev/null +++ b/node_modules/core-js/library/modules/_to-object.js @@ -0,0 +1,5 @@ +// 7.1.13 ToObject(argument) +var defined = require('./_defined'); +module.exports = function (it) { + return Object(defined(it)); +}; diff --git a/node_modules/core-js/library/modules/_to-primitive.js b/node_modules/core-js/library/modules/_to-primitive.js new file mode 100644 index 00000000..de3dd6b1 --- /dev/null +++ b/node_modules/core-js/library/modules/_to-primitive.js @@ -0,0 +1,12 @@ +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = require('./_is-object'); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; diff --git a/node_modules/core-js/library/modules/_typed-array.js b/node_modules/core-js/library/modules/_typed-array.js new file mode 100644 index 00000000..30d9c0ba --- /dev/null +++ b/node_modules/core-js/library/modules/_typed-array.js @@ -0,0 +1,480 @@ +'use strict'; +if (require('./_descriptors')) { + var LIBRARY = require('./_library'); + var global = require('./_global'); + var fails = require('./_fails'); + var $export = require('./_export'); + var $typed = require('./_typed'); + var $buffer = require('./_typed-buffer'); + var ctx = require('./_ctx'); + var anInstance = require('./_an-instance'); + var propertyDesc = require('./_property-desc'); + var hide = require('./_hide'); + var redefineAll = require('./_redefine-all'); + var toInteger = require('./_to-integer'); + var toLength = require('./_to-length'); + var toIndex = require('./_to-index'); + var toAbsoluteIndex = require('./_to-absolute-index'); + var toPrimitive = require('./_to-primitive'); + var has = require('./_has'); + var classof = require('./_classof'); + var isObject = require('./_is-object'); + var toObject = require('./_to-object'); + var isArrayIter = require('./_is-array-iter'); + var create = require('./_object-create'); + var getPrototypeOf = require('./_object-gpo'); + var gOPN = require('./_object-gopn').f; + var getIterFn = require('./core.get-iterator-method'); + var uid = require('./_uid'); + var wks = require('./_wks'); + var createArrayMethod = require('./_array-methods'); + var createArrayIncludes = require('./_array-includes'); + var speciesConstructor = require('./_species-constructor'); + var ArrayIterators = require('./es6.array.iterator'); + var Iterators = require('./_iterators'); + var $iterDetect = require('./_iter-detect'); + var setSpecies = require('./_set-species'); + var arrayFill = require('./_array-fill'); + var arrayCopyWithin = require('./_array-copy-within'); + var $DP = require('./_object-dp'); + var $GOPD = require('./_object-gopd'); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { + new Uint8Array(1).set({}); + }); + + var toOffset = function (it, BYTES) { + var offset = toInteger(it); + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!'); + } return new C(length); + }; + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function (C, list) { + var index = 0; + var length = list.length; + var result = allocate(C, length); + while (length > index) result[index] = list[index++]; + return result; + }; + + var addGetter = function (it, key, internal) { + dP(it, key, { get: function () { return this._d[internal]; } }); + }; + + var $from = function from(source /* , mapfn, thisArg */) { + var O = toObject(source); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var i, length, values, result, step, iterator; + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value); + } O = values; + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/* ...items */) { + var index = 0; + var length = arguments.length; + var result = allocate(this, length); + while (length > index) result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); + + var $toLocaleString = function toLocaleString() { + return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); + }; + + var proto = { + copyWithin: function copyWithin(target, start /* , end */) { + return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); + }, + every: function every(callbackfn /* , thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /* , thisArg */) { + return speciesFromList(this, arrayFilter(validate(this), callbackfn, + arguments.length > 1 ? arguments[1] : undefined)); + }, + find: function find(predicate /* , thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /* , thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /* , thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /* , fromIndex */) { + return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + includes: function includes(searchElement /* , fromIndex */) { + return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + join: function join(separator) { // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /* , thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse() { + var that = this; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + some: function some(callbackfn /* , thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn) { + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end) { + var O = validate(this); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var index = 0; + if (len + offset > length) throw RangeError(WRONG_LENGTH); + while (index < len) this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries() { + return arrayEntries.call(validate(this)); + }, + keys: function keys() { + return arrayKeys.call(validate(this)); + }, + values: function values() { + return arrayValues.call(validate(this)); + } + }; + + var isTAIndex = function (target, key) { + return isObject(target) + && target[TYPED_ARRAY] + && typeof key != 'symbol' + && key in target + && String(+key) == String(key); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key) { + return isTAIndex(target, key = toPrimitive(key, true)) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc) { + if (isTAIndex(target, key = toPrimitive(key, true)) + && isObject(desc) + && has(desc, 'value') + && !has(desc, 'get') + && !has(desc, 'set') + // TODO: add validation descriptor w/o calling accessors + && !desc.configurable + && (!has(desc, 'writable') || desc.writable) + && (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value; + return target; + } return dP(target, key, desc); + }; + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc + }); + + if (fails(function () { arrayToString.call({}); })) { + arrayToString = arrayToLocaleString = function toString() { + return arrayJoin.call(this); + }; + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { /* noop */ }, + toString: arrayToString, + toLocaleString: $toLocaleString + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function () { return this[TYPED_ARRAY]; } + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function (that, index) { + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function (that, index, value) { + var data = that._d; + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true + }); + }; + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d'); + var index = 0; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer) + }); + while (index < length) addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if (!fails(function () { + TypedArray(1); + }) || !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true)) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(toIndex(data)); + if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); + }); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR]; + var CORRECT_ITER_NAME = !!$nativeIterator + && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { return NAME; } + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES + }); + + $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { + from: $from, + of: $of + }); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; + + $export($export.P + $export.F * fails(function () { + new TypedArray(1).slice(); + }), NAME, { slice: $slice }); + + $export($export.P + $export.F * (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + }) || !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), NAME, { toLocaleString: $toLocaleString }); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); + }; +} else module.exports = function () { /* empty */ }; diff --git a/node_modules/core-js/library/modules/_typed-buffer.js b/node_modules/core-js/library/modules/_typed-buffer.js new file mode 100644 index 00000000..c24cef38 --- /dev/null +++ b/node_modules/core-js/library/modules/_typed-buffer.js @@ -0,0 +1,276 @@ +'use strict'; +var global = require('./_global'); +var DESCRIPTORS = require('./_descriptors'); +var LIBRARY = require('./_library'); +var $typed = require('./_typed'); +var hide = require('./_hide'); +var redefineAll = require('./_redefine-all'); +var fails = require('./_fails'); +var anInstance = require('./_an-instance'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var toIndex = require('./_to-index'); +var gOPN = require('./_object-gopn').f; +var dP = require('./_object-dp').f; +var arrayFill = require('./_array-fill'); +var setToStringTag = require('./_set-to-string-tag'); +var ARRAY_BUFFER = 'ArrayBuffer'; +var DATA_VIEW = 'DataView'; +var PROTOTYPE = 'prototype'; +var WRONG_LENGTH = 'Wrong length!'; +var WRONG_INDEX = 'Wrong index!'; +var $ArrayBuffer = global[ARRAY_BUFFER]; +var $DataView = global[DATA_VIEW]; +var Math = global.Math; +var RangeError = global.RangeError; +// eslint-disable-next-line no-shadow-restricted-names +var Infinity = global.Infinity; +var BaseBuffer = $ArrayBuffer; +var abs = Math.abs; +var pow = Math.pow; +var floor = Math.floor; +var log = Math.log; +var LN2 = Math.LN2; +var BUFFER = 'buffer'; +var BYTE_LENGTH = 'byteLength'; +var BYTE_OFFSET = 'byteOffset'; +var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; +var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; +var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + +// IEEE754 conversions based on https://github.com/feross/ieee754 +function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; +} +function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } return (s ? -1 : 1) * m * pow(2, e - mLen); +} + +function unpackI32(bytes) { + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; +} +function packI8(it) { + return [it & 0xff]; +} +function packI16(it) { + return [it & 0xff, it >> 8 & 0xff]; +} +function packI32(it) { + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; +} +function packF64(it) { + return packIEEE754(it, 52, 8); +} +function packF32(it) { + return packIEEE754(it, 23, 4); +} + +function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); +} + +function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); +} +function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; +} + +if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH]; + var offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return get(this, 1, byteOffset)[0] << 24 >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8 | bytes[0]) << 16 >> 16; + }, + getUint16: function getUint16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return bytes[1] << 8 | bytes[0]; + }, + getInt32: function getInt32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + } + }); +} else { + if (!fails(function () { + $ArrayBuffer(1); + }) || !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + })) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(length)); + }; + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)); + var $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + } + }, true); +} +setToStringTag($ArrayBuffer, ARRAY_BUFFER); +setToStringTag($DataView, DATA_VIEW); +hide($DataView[PROTOTYPE], $typed.VIEW, true); +exports[ARRAY_BUFFER] = $ArrayBuffer; +exports[DATA_VIEW] = $DataView; diff --git a/node_modules/core-js/library/modules/_typed.js b/node_modules/core-js/library/modules/_typed.js new file mode 100644 index 00000000..8747ffd7 --- /dev/null +++ b/node_modules/core-js/library/modules/_typed.js @@ -0,0 +1,28 @@ +var global = require('./_global'); +var hide = require('./_hide'); +var uid = require('./_uid'); +var TYPED = uid('typed_array'); +var VIEW = uid('view'); +var ABV = !!(global.ArrayBuffer && global.DataView); +var CONSTR = ABV; +var i = 0; +var l = 9; +var Typed; + +var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' +).split(','); + +while (i < l) { + if (Typed = global[TypedArrayConstructors[i++]]) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; +} + +module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW +}; diff --git a/node_modules/core-js/library/modules/_uid.js b/node_modules/core-js/library/modules/_uid.js new file mode 100644 index 00000000..ffbe7185 --- /dev/null +++ b/node_modules/core-js/library/modules/_uid.js @@ -0,0 +1,5 @@ +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; diff --git a/node_modules/core-js/library/modules/_user-agent.js b/node_modules/core-js/library/modules/_user-agent.js new file mode 100644 index 00000000..363fedc2 --- /dev/null +++ b/node_modules/core-js/library/modules/_user-agent.js @@ -0,0 +1,4 @@ +var global = require('./_global'); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; diff --git a/node_modules/core-js/library/modules/_validate-collection.js b/node_modules/core-js/library/modules/_validate-collection.js new file mode 100644 index 00000000..cec1ceff --- /dev/null +++ b/node_modules/core-js/library/modules/_validate-collection.js @@ -0,0 +1,5 @@ +var isObject = require('./_is-object'); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; diff --git a/node_modules/core-js/library/modules/_wks-define.js b/node_modules/core-js/library/modules/_wks-define.js new file mode 100644 index 00000000..7284d6ad --- /dev/null +++ b/node_modules/core-js/library/modules/_wks-define.js @@ -0,0 +1,9 @@ +var global = require('./_global'); +var core = require('./_core'); +var LIBRARY = require('./_library'); +var wksExt = require('./_wks-ext'); +var defineProperty = require('./_object-dp').f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; diff --git a/node_modules/core-js/library/modules/_wks-ext.js b/node_modules/core-js/library/modules/_wks-ext.js new file mode 100644 index 00000000..13bd83b1 --- /dev/null +++ b/node_modules/core-js/library/modules/_wks-ext.js @@ -0,0 +1 @@ +exports.f = require('./_wks'); diff --git a/node_modules/core-js/library/modules/_wks.js b/node_modules/core-js/library/modules/_wks.js new file mode 100644 index 00000000..e33f857a --- /dev/null +++ b/node_modules/core-js/library/modules/_wks.js @@ -0,0 +1,11 @@ +var store = require('./_shared')('wks'); +var uid = require('./_uid'); +var Symbol = require('./_global').Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; diff --git a/node_modules/core-js/library/modules/core.delay.js b/node_modules/core-js/library/modules/core.delay.js new file mode 100644 index 00000000..73712c01 --- /dev/null +++ b/node_modules/core-js/library/modules/core.delay.js @@ -0,0 +1,12 @@ +var global = require('./_global'); +var core = require('./_core'); +var $export = require('./_export'); +var partial = require('./_partial'); +// https://esdiscuss.org/topic/promise-returning-delay-function +$export($export.G + $export.F, { + delay: function delay(time) { + return new (core.Promise || global.Promise)(function (resolve) { + setTimeout(partial.call(resolve, true), time); + }); + } +}); diff --git a/node_modules/core-js/library/modules/core.dict.js b/node_modules/core-js/library/modules/core.dict.js new file mode 100644 index 00000000..5422ad30 --- /dev/null +++ b/node_modules/core-js/library/modules/core.dict.js @@ -0,0 +1,157 @@ +'use strict'; +var ctx = require('./_ctx'); +var $export = require('./_export'); +var createDesc = require('./_property-desc'); +var assign = require('./_object-assign'); +var create = require('./_object-create'); +var getPrototypeOf = require('./_object-gpo'); +var getKeys = require('./_object-keys'); +var dP = require('./_object-dp'); +var keyOf = require('./_keyof'); +var aFunction = require('./_a-function'); +var forOf = require('./_for-of'); +var isIterable = require('./core.is-iterable'); +var $iterCreate = require('./_iter-create'); +var step = require('./_iter-step'); +var isObject = require('./_is-object'); +var toIObject = require('./_to-iobject'); +var DESCRIPTORS = require('./_descriptors'); +var has = require('./_has'); + +// 0 -> Dict.forEach +// 1 -> Dict.map +// 2 -> Dict.filter +// 3 -> Dict.some +// 4 -> Dict.every +// 5 -> Dict.find +// 6 -> Dict.findKey +// 7 -> Dict.mapPairs +var createDictMethod = function (TYPE) { + var IS_MAP = TYPE == 1; + var IS_EVERY = TYPE == 4; + return function (object, callbackfn, that /* = undefined */) { + var f = ctx(callbackfn, that, 3); + var O = toIObject(object); + var result = IS_MAP || TYPE == 7 || TYPE == 2 + ? new (typeof this == 'function' ? this : Dict)() : undefined; + var key, val, res; + for (key in O) if (has(O, key)) { + val = O[key]; + res = f(val, key, object); + if (TYPE) { + if (IS_MAP) result[key] = res; // map + else if (res) switch (TYPE) { + case 2: result[key] = val; break; // filter + case 3: return true; // some + case 5: return val; // find + case 6: return key; // findKey + case 7: result[res[0]] = res[1]; // mapPairs + } else if (IS_EVERY) return false; // every + } + } + return TYPE == 3 || IS_EVERY ? IS_EVERY : result; + }; +}; +var findKey = createDictMethod(6); + +var createDictIter = function (kind) { + return function (it) { + return new DictIterator(it, kind); + }; +}; +var DictIterator = function (iterated, kind) { + this._t = toIObject(iterated); // target + this._a = getKeys(iterated); // keys + this._i = 0; // next index + this._k = kind; // kind +}; +$iterCreate(DictIterator, 'Dict', function () { + var that = this; + var O = that._t; + var keys = that._a; + var kind = that._k; + var key; + do { + if (that._i >= keys.length) { + that._t = undefined; + return step(1); + } + } while (!has(O, key = keys[that._i++])); + if (kind == 'keys') return step(0, key); + if (kind == 'values') return step(0, O[key]); + return step(0, [key, O[key]]); +}); + +function Dict(iterable) { + var dict = create(null); + if (iterable != undefined) { + if (isIterable(iterable)) { + forOf(iterable, true, function (key, value) { + dict[key] = value; + }); + } else assign(dict, iterable); + } + return dict; +} +Dict.prototype = null; + +function reduce(object, mapfn, init) { + aFunction(mapfn); + var O = toIObject(object); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var memo, key; + if (arguments.length < 3) { + if (!length) throw TypeError('Reduce of empty object with no initial value'); + memo = O[keys[i++]]; + } else memo = Object(init); + while (length > i) if (has(O, key = keys[i++])) { + memo = mapfn(memo, O[key], key, object); + } + return memo; +} + +function includes(object, el) { + // eslint-disable-next-line no-self-compare + return (el == el ? keyOf(object, el) : findKey(object, function (it) { + // eslint-disable-next-line no-self-compare + return it != it; + })) !== undefined; +} + +function get(object, key) { + if (has(object, key)) return object[key]; +} +function set(object, key, value) { + if (DESCRIPTORS && key in Object) dP.f(object, key, createDesc(0, value)); + else object[key] = value; + return object; +} + +function isDict(it) { + return isObject(it) && getPrototypeOf(it) === Dict.prototype; +} + +$export($export.G + $export.F, { Dict: Dict }); + +$export($export.S, 'Dict', { + keys: createDictIter('keys'), + values: createDictIter('values'), + entries: createDictIter('entries'), + forEach: createDictMethod(0), + map: createDictMethod(1), + filter: createDictMethod(2), + some: createDictMethod(3), + every: createDictMethod(4), + find: createDictMethod(5), + findKey: findKey, + mapPairs: createDictMethod(7), + reduce: reduce, + keyOf: keyOf, + includes: includes, + has: has, + get: get, + set: set, + isDict: isDict +}); diff --git a/node_modules/core-js/library/modules/core.function.part.js b/node_modules/core-js/library/modules/core.function.part.js new file mode 100644 index 00000000..050154f8 --- /dev/null +++ b/node_modules/core-js/library/modules/core.function.part.js @@ -0,0 +1,7 @@ +var path = require('./_path'); +var $export = require('./_export'); + +// Placeholder +require('./_core')._ = path._ = path._ || {}; + +$export($export.P + $export.F, 'Function', { part: require('./_partial') }); diff --git a/node_modules/core-js/library/modules/core.get-iterator-method.js b/node_modules/core-js/library/modules/core.get-iterator-method.js new file mode 100644 index 00000000..9b6fa62a --- /dev/null +++ b/node_modules/core-js/library/modules/core.get-iterator-method.js @@ -0,0 +1,8 @@ +var classof = require('./_classof'); +var ITERATOR = require('./_wks')('iterator'); +var Iterators = require('./_iterators'); +module.exports = require('./_core').getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; diff --git a/node_modules/core-js/library/modules/core.get-iterator.js b/node_modules/core-js/library/modules/core.get-iterator.js new file mode 100644 index 00000000..04568c86 --- /dev/null +++ b/node_modules/core-js/library/modules/core.get-iterator.js @@ -0,0 +1,7 @@ +var anObject = require('./_an-object'); +var get = require('./core.get-iterator-method'); +module.exports = require('./_core').getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; diff --git a/node_modules/core-js/library/modules/core.is-iterable.js b/node_modules/core-js/library/modules/core.is-iterable.js new file mode 100644 index 00000000..388e5e35 --- /dev/null +++ b/node_modules/core-js/library/modules/core.is-iterable.js @@ -0,0 +1,10 @@ +var classof = require('./_classof'); +var ITERATOR = require('./_wks')('iterator'); +var Iterators = require('./_iterators'); +module.exports = require('./_core').isIterable = function (it) { + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + // eslint-disable-next-line no-prototype-builtins + || Iterators.hasOwnProperty(classof(O)); +}; diff --git a/node_modules/core-js/library/modules/core.number.iterator.js b/node_modules/core-js/library/modules/core.number.iterator.js new file mode 100644 index 00000000..fa37791e --- /dev/null +++ b/node_modules/core-js/library/modules/core.number.iterator.js @@ -0,0 +1,9 @@ +'use strict'; +require('./_iter-define')(Number, 'Number', function (iterated) { + this._l = +iterated; + this._i = 0; +}, function () { + var i = this._i++; + var done = !(i < this._l); + return { done: done, value: done ? undefined : i }; +}); diff --git a/node_modules/core-js/library/modules/core.object.classof.js b/node_modules/core-js/library/modules/core.object.classof.js new file mode 100644 index 00000000..fe16595a --- /dev/null +++ b/node_modules/core-js/library/modules/core.object.classof.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', { classof: require('./_classof') }); diff --git a/node_modules/core-js/library/modules/core.object.define.js b/node_modules/core-js/library/modules/core.object.define.js new file mode 100644 index 00000000..e4e717b5 --- /dev/null +++ b/node_modules/core-js/library/modules/core.object.define.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var define = require('./_object-define'); + +$export($export.S + $export.F, 'Object', { define: define }); diff --git a/node_modules/core-js/library/modules/core.object.is-object.js b/node_modules/core-js/library/modules/core.object.is-object.js new file mode 100644 index 00000000..fea80b60 --- /dev/null +++ b/node_modules/core-js/library/modules/core.object.is-object.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', { isObject: require('./_is-object') }); diff --git a/node_modules/core-js/library/modules/core.object.make.js b/node_modules/core-js/library/modules/core.object.make.js new file mode 100644 index 00000000..51d47740 --- /dev/null +++ b/node_modules/core-js/library/modules/core.object.make.js @@ -0,0 +1,9 @@ +var $export = require('./_export'); +var define = require('./_object-define'); +var create = require('./_object-create'); + +$export($export.S + $export.F, 'Object', { + make: function (proto, mixin) { + return define(create(proto), mixin); + } +}); diff --git a/node_modules/core-js/library/modules/core.regexp.escape.js b/node_modules/core-js/library/modules/core.regexp.escape.js new file mode 100644 index 00000000..3ddd748c --- /dev/null +++ b/node_modules/core-js/library/modules/core.regexp.escape.js @@ -0,0 +1,5 @@ +// https://github.com/benjamingr/RexExp.escape +var $export = require('./_export'); +var $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); diff --git a/node_modules/core-js/library/modules/core.string.escape-html.js b/node_modules/core-js/library/modules/core.string.escape-html.js new file mode 100644 index 00000000..f9678861 --- /dev/null +++ b/node_modules/core-js/library/modules/core.string.escape-html.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $re = require('./_replacer')(/[&<>"']/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}); + +$export($export.P + $export.F, 'String', { escapeHTML: function escapeHTML() { return $re(this); } }); diff --git a/node_modules/core-js/library/modules/core.string.unescape-html.js b/node_modules/core-js/library/modules/core.string.unescape-html.js new file mode 100644 index 00000000..eb8a6cfb --- /dev/null +++ b/node_modules/core-js/library/modules/core.string.unescape-html.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $re = require('./_replacer')(/&(?:amp|lt|gt|quot|apos);/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}); + +$export($export.P + $export.F, 'String', { unescapeHTML: function unescapeHTML() { return $re(this); } }); diff --git a/node_modules/core-js/library/modules/es5.js b/node_modules/core-js/library/modules/es5.js new file mode 100644 index 00000000..ca10612d --- /dev/null +++ b/node_modules/core-js/library/modules/es5.js @@ -0,0 +1,35 @@ +// This file still here for a legacy code and will be removed in a near time +require('./es6.object.create'); +require('./es6.object.define-property'); +require('./es6.object.define-properties'); +require('./es6.object.get-own-property-descriptor'); +require('./es6.object.get-prototype-of'); +require('./es6.object.keys'); +require('./es6.object.get-own-property-names'); +require('./es6.object.freeze'); +require('./es6.object.seal'); +require('./es6.object.prevent-extensions'); +require('./es6.object.is-frozen'); +require('./es6.object.is-sealed'); +require('./es6.object.is-extensible'); +require('./es6.function.bind'); +require('./es6.array.is-array'); +require('./es6.array.join'); +require('./es6.array.slice'); +require('./es6.array.sort'); +require('./es6.array.for-each'); +require('./es6.array.map'); +require('./es6.array.filter'); +require('./es6.array.some'); +require('./es6.array.every'); +require('./es6.array.reduce'); +require('./es6.array.reduce-right'); +require('./es6.array.index-of'); +require('./es6.array.last-index-of'); +require('./es6.date.now'); +require('./es6.date.to-iso-string'); +require('./es6.date.to-json'); +require('./es6.parse-int'); +require('./es6.parse-float'); +require('./es6.string.trim'); +require('./es6.regexp.to-string'); diff --git a/node_modules/core-js/library/modules/es6.array.copy-within.js b/node_modules/core-js/library/modules/es6.array.copy-within.js new file mode 100644 index 00000000..f866a959 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.copy-within.js @@ -0,0 +1,6 @@ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +var $export = require('./_export'); + +$export($export.P, 'Array', { copyWithin: require('./_array-copy-within') }); + +require('./_add-to-unscopables')('copyWithin'); diff --git a/node_modules/core-js/library/modules/es6.array.every.js b/node_modules/core-js/library/modules/es6.array.every.js new file mode 100644 index 00000000..cfd448f5 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.every.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $every = require('./_array-methods')(4); + +$export($export.P + $export.F * !require('./_strict-method')([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.fill.js b/node_modules/core-js/library/modules/es6.array.fill.js new file mode 100644 index 00000000..ac171442 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.fill.js @@ -0,0 +1,6 @@ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +var $export = require('./_export'); + +$export($export.P, 'Array', { fill: require('./_array-fill') }); + +require('./_add-to-unscopables')('fill'); diff --git a/node_modules/core-js/library/modules/es6.array.filter.js b/node_modules/core-js/library/modules/es6.array.filter.js new file mode 100644 index 00000000..447ecf40 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.filter.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $filter = require('./_array-methods')(2); + +$export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.find-index.js b/node_modules/core-js/library/modules/es6.array.find-index.js new file mode 100644 index 00000000..374cadd7 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.find-index.js @@ -0,0 +1,14 @@ +'use strict'; +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(6); +var KEY = 'findIndex'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +require('./_add-to-unscopables')(KEY); diff --git a/node_modules/core-js/library/modules/es6.array.find.js b/node_modules/core-js/library/modules/es6.array.find.js new file mode 100644 index 00000000..4fbe76ce --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.find.js @@ -0,0 +1,14 @@ +'use strict'; +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(5); +var KEY = 'find'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +require('./_add-to-unscopables')(KEY); diff --git a/node_modules/core-js/library/modules/es6.array.for-each.js b/node_modules/core-js/library/modules/es6.array.for-each.js new file mode 100644 index 00000000..525ba074 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.for-each.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $forEach = require('./_array-methods')(0); +var STRICT = require('./_strict-method')([].forEach, true); + +$export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.from.js b/node_modules/core-js/library/modules/es6.array.from.js new file mode 100644 index 00000000..4db38017 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.from.js @@ -0,0 +1,37 @@ +'use strict'; +var ctx = require('./_ctx'); +var $export = require('./_export'); +var toObject = require('./_to-object'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var toLength = require('./_to-length'); +var createProperty = require('./_create-property'); +var getIterFn = require('./core.get-iterator-method'); + +$export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.index-of.js b/node_modules/core-js/library/modules/es6.array.index-of.js new file mode 100644 index 00000000..231c92e9 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.index-of.js @@ -0,0 +1,15 @@ +'use strict'; +var $export = require('./_export'); +var $indexOf = require('./_array-includes')(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.is-array.js b/node_modules/core-js/library/modules/es6.array.is-array.js new file mode 100644 index 00000000..27ca6fc5 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.is-array.js @@ -0,0 +1,4 @@ +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = require('./_export'); + +$export($export.S, 'Array', { isArray: require('./_is-array') }); diff --git a/node_modules/core-js/library/modules/es6.array.iterator.js b/node_modules/core-js/library/modules/es6.array.iterator.js new file mode 100644 index 00000000..c64e88b1 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.iterator.js @@ -0,0 +1,34 @@ +'use strict'; +var addToUnscopables = require('./_add-to-unscopables'); +var step = require('./_iter-step'); +var Iterators = require('./_iterators'); +var toIObject = require('./_to-iobject'); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); diff --git a/node_modules/core-js/library/modules/es6.array.join.js b/node_modules/core-js/library/modules/es6.array.join.js new file mode 100644 index 00000000..48e55d2e --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.join.js @@ -0,0 +1,12 @@ +'use strict'; +// 22.1.3.13 Array.prototype.join(separator) +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var arrayJoin = [].join; + +// fallback for not array-like strings +$export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.last-index-of.js b/node_modules/core-js/library/modules/es6.array.last-index-of.js new file mode 100644 index 00000000..1f70e340 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.last-index-of.js @@ -0,0 +1,22 @@ +'use strict'; +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.map.js b/node_modules/core-js/library/modules/es6.array.map.js new file mode 100644 index 00000000..1326033f --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.map.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $map = require('./_array-methods')(1); + +$export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.of.js b/node_modules/core-js/library/modules/es6.array.of.js new file mode 100644 index 00000000..b83e058c --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.of.js @@ -0,0 +1,19 @@ +'use strict'; +var $export = require('./_export'); +var createProperty = require('./_create-property'); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * require('./_fails')(function () { + function F() { /* empty */ } + return !(Array.of.call(F) instanceof F); +}), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.reduce-right.js b/node_modules/core-js/library/modules/es6.array.reduce-right.js new file mode 100644 index 00000000..168e421d --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.reduce-right.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $reduce = require('./_array-reduce'); + +$export($export.P + $export.F * !require('./_strict-method')([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.reduce.js b/node_modules/core-js/library/modules/es6.array.reduce.js new file mode 100644 index 00000000..f4e47612 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.reduce.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $reduce = require('./_array-reduce'); + +$export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.slice.js b/node_modules/core-js/library/modules/es6.array.slice.js new file mode 100644 index 00000000..bdd496ec --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.slice.js @@ -0,0 +1,28 @@ +'use strict'; +var $export = require('./_export'); +var html = require('./_html'); +var cof = require('./_cof'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * require('./_fails')(function () { + if (html) arraySlice.call(html); +}), 'Array', { + slice: function slice(begin, end) { + var len = toLength(this.length); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.some.js b/node_modules/core-js/library/modules/es6.array.some.js new file mode 100644 index 00000000..14c5eec2 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.some.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $some = require('./_array-methods')(3); + +$export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.sort.js b/node_modules/core-js/library/modules/es6.array.sort.js new file mode 100644 index 00000000..39817ffa --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.sort.js @@ -0,0 +1,23 @@ +'use strict'; +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var fails = require('./_fails'); +var $sort = [].sort; +var test = [1, 2, 3]; + +$export($export.P + $export.F * (fails(function () { + // IE8- + test.sort(undefined); +}) || !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit +}) || !require('./_strict-method')($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + } +}); diff --git a/node_modules/core-js/library/modules/es6.array.species.js b/node_modules/core-js/library/modules/es6.array.species.js new file mode 100644 index 00000000..ce0b8917 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.array.species.js @@ -0,0 +1 @@ +require('./_set-species')('Array'); diff --git a/node_modules/core-js/library/modules/es6.date.now.js b/node_modules/core-js/library/modules/es6.date.now.js new file mode 100644 index 00000000..65f134e5 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.date.now.js @@ -0,0 +1,4 @@ +// 20.3.3.1 / 15.9.4.4 Date.now() +var $export = require('./_export'); + +$export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); diff --git a/node_modules/core-js/library/modules/es6.date.to-iso-string.js b/node_modules/core-js/library/modules/es6.date.to-iso-string.js new file mode 100644 index 00000000..13b27818 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.date.to-iso-string.js @@ -0,0 +1,8 @@ +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = require('./_export'); +var toISOString = require('./_date-to-iso-string'); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); diff --git a/node_modules/core-js/library/modules/es6.date.to-json.js b/node_modules/core-js/library/modules/es6.date.to-json.js new file mode 100644 index 00000000..69b1f301 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.date.to-json.js @@ -0,0 +1,19 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var toISOString = require('./_date-to-iso-string'); +var classof = require('./_classof'); + +$export($export.P + $export.F * require('./_fails')(function () { + return new Date(NaN).toJSON() !== null + || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1; +}), 'Date', { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : + (!('toISOString' in O) && classof(O) == 'Date') ? toISOString.call(O) : O.toISOString(); + } +}); diff --git a/node_modules/nopt/.gitignore b/node_modules/core-js/library/modules/es6.date.to-primitive.js similarity index 100% rename from node_modules/nopt/.gitignore rename to node_modules/core-js/library/modules/es6.date.to-primitive.js diff --git a/node_modules/core-js/library/modules/es6.date.to-string.js b/node_modules/core-js/library/modules/es6.date.to-string.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/library/modules/es6.function.bind.js b/node_modules/core-js/library/modules/es6.function.bind.js new file mode 100644 index 00000000..38e84e1a --- /dev/null +++ b/node_modules/core-js/library/modules/es6.function.bind.js @@ -0,0 +1,4 @@ +// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) +var $export = require('./_export'); + +$export($export.P, 'Function', { bind: require('./_bind') }); diff --git a/node_modules/core-js/library/modules/es6.function.has-instance.js b/node_modules/core-js/library/modules/es6.function.has-instance.js new file mode 100644 index 00000000..7556ed9b --- /dev/null +++ b/node_modules/core-js/library/modules/es6.function.has-instance.js @@ -0,0 +1,13 @@ +'use strict'; +var isObject = require('./_is-object'); +var getPrototypeOf = require('./_object-gpo'); +var HAS_INSTANCE = require('./_wks')('hasInstance'); +var FunctionProto = Function.prototype; +// 19.2.3.6 Function.prototype[@@hasInstance](V) +if (!(HAS_INSTANCE in FunctionProto)) require('./_object-dp').f(FunctionProto, HAS_INSTANCE, { value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while (O = getPrototypeOf(O)) if (this.prototype === O) return true; + return false; +} }); diff --git a/node_modules/core-js/library/modules/es6.function.name.js b/node_modules/core-js/library/modules/es6.function.name.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/library/modules/es6.map.js b/node_modules/core-js/library/modules/es6.map.js new file mode 100644 index 00000000..a282f022 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.map.js @@ -0,0 +1,19 @@ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var MAP = 'Map'; + +// 23.1 Map Objects +module.exports = require('./_collection')(MAP, function (get) { + return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + } +}, strong, true); diff --git a/node_modules/core-js/library/modules/es6.math.acosh.js b/node_modules/core-js/library/modules/es6.math.acosh.js new file mode 100644 index 00000000..8a8989eb --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.acosh.js @@ -0,0 +1,18 @@ +// 20.2.2.3 Math.acosh(x) +var $export = require('./_export'); +var log1p = require('./_math-log1p'); +var sqrt = Math.sqrt; +var $acosh = Math.acosh; + +$export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity +), 'Math', { + acosh: function acosh(x) { + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.asinh.js b/node_modules/core-js/library/modules/es6.math.asinh.js new file mode 100644 index 00000000..ddf46662 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.asinh.js @@ -0,0 +1,10 @@ +// 20.2.2.5 Math.asinh(x) +var $export = require('./_export'); +var $asinh = Math.asinh; + +function asinh(x) { + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); +} + +// Tor Browser bug: Math.asinh(0) -> -0 +$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); diff --git a/node_modules/core-js/library/modules/es6.math.atanh.js b/node_modules/core-js/library/modules/es6.math.atanh.js new file mode 100644 index 00000000..af3c3e80 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.atanh.js @@ -0,0 +1,10 @@ +// 20.2.2.7 Math.atanh(x) +var $export = require('./_export'); +var $atanh = Math.atanh; + +// Tor Browser bug: Math.atanh(-0) -> 0 +$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.cbrt.js b/node_modules/core-js/library/modules/es6.math.cbrt.js new file mode 100644 index 00000000..e45ac444 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.cbrt.js @@ -0,0 +1,9 @@ +// 20.2.2.9 Math.cbrt(x) +var $export = require('./_export'); +var sign = require('./_math-sign'); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.clz32.js b/node_modules/core-js/library/modules/es6.math.clz32.js new file mode 100644 index 00000000..1e4d7e19 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.clz32.js @@ -0,0 +1,8 @@ +// 20.2.2.11 Math.clz32(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.cosh.js b/node_modules/core-js/library/modules/es6.math.cosh.js new file mode 100644 index 00000000..1e0cffc1 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.cosh.js @@ -0,0 +1,9 @@ +// 20.2.2.12 Math.cosh(x) +var $export = require('./_export'); +var exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp(x = +x) + exp(-x)) / 2; + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.expm1.js b/node_modules/core-js/library/modules/es6.math.expm1.js new file mode 100644 index 00000000..da4c90df --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.expm1.js @@ -0,0 +1,5 @@ +// 20.2.2.14 Math.expm1(x) +var $export = require('./_export'); +var $expm1 = require('./_math-expm1'); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); diff --git a/node_modules/core-js/library/modules/es6.math.fround.js b/node_modules/core-js/library/modules/es6.math.fround.js new file mode 100644 index 00000000..9c262f2e --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.fround.js @@ -0,0 +1,4 @@ +// 20.2.2.16 Math.fround(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { fround: require('./_math-fround') }); diff --git a/node_modules/core-js/library/modules/es6.math.hypot.js b/node_modules/core-js/library/modules/es6.math.hypot.js new file mode 100644 index 00000000..41ffdb27 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.hypot.js @@ -0,0 +1,25 @@ +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = require('./_export'); +var abs = Math.abs; + +$export($export.S, 'Math', { + hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var arg, div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.imul.js b/node_modules/core-js/library/modules/es6.math.imul.js new file mode 100644 index 00000000..96e683d2 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.imul.js @@ -0,0 +1,17 @@ +// 20.2.2.18 Math.imul(x, y) +var $export = require('./_export'); +var $imul = Math.imul; + +// some WebKit versions fails with big numbers, some has wrong arity +$export($export.S + $export.F * require('./_fails')(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; +}), 'Math', { + imul: function imul(x, y) { + var UINT16 = 0xffff; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.log10.js b/node_modules/core-js/library/modules/es6.math.log10.js new file mode 100644 index 00000000..9ee8ae68 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.log10.js @@ -0,0 +1,8 @@ +// 20.2.2.21 Math.log10(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.log1p.js b/node_modules/core-js/library/modules/es6.math.log1p.js new file mode 100644 index 00000000..62959800 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.log1p.js @@ -0,0 +1,4 @@ +// 20.2.2.20 Math.log1p(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { log1p: require('./_math-log1p') }); diff --git a/node_modules/core-js/library/modules/es6.math.log2.js b/node_modules/core-js/library/modules/es6.math.log2.js new file mode 100644 index 00000000..03d127cb --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.log2.js @@ -0,0 +1,8 @@ +// 20.2.2.22 Math.log2(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.sign.js b/node_modules/core-js/library/modules/es6.math.sign.js new file mode 100644 index 00000000..981f69e5 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.sign.js @@ -0,0 +1,4 @@ +// 20.2.2.28 Math.sign(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { sign: require('./_math-sign') }); diff --git a/node_modules/core-js/library/modules/es6.math.sinh.js b/node_modules/core-js/library/modules/es6.math.sinh.js new file mode 100644 index 00000000..57606333 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.sinh.js @@ -0,0 +1,15 @@ +// 20.2.2.30 Math.sinh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +var exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * require('./_fails')(function () { + return !Math.sinh(-2e-17) != -2e-17; +}), 'Math', { + sinh: function sinh(x) { + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.tanh.js b/node_modules/core-js/library/modules/es6.math.tanh.js new file mode 100644 index 00000000..0d3135b0 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.tanh.js @@ -0,0 +1,12 @@ +// 20.2.2.33 Math.tanh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +var exp = Math.exp; + +$export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1(x = +x); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } +}); diff --git a/node_modules/core-js/library/modules/es6.math.trunc.js b/node_modules/core-js/library/modules/es6.math.trunc.js new file mode 100644 index 00000000..35ddb808 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.math.trunc.js @@ -0,0 +1,8 @@ +// 20.2.2.34 Math.trunc(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + } +}); diff --git a/node_modules/core-js/library/modules/es6.number.constructor.js b/node_modules/core-js/library/modules/es6.number.constructor.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/library/modules/es6.number.epsilon.js b/node_modules/core-js/library/modules/es6.number.epsilon.js new file mode 100644 index 00000000..34a2ec5f --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.epsilon.js @@ -0,0 +1,4 @@ +// 20.1.2.1 Number.EPSILON +var $export = require('./_export'); + +$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); diff --git a/node_modules/core-js/library/modules/es6.number.is-finite.js b/node_modules/core-js/library/modules/es6.number.is-finite.js new file mode 100644 index 00000000..8719da97 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.is-finite.js @@ -0,0 +1,9 @@ +// 20.1.2.2 Number.isFinite(number) +var $export = require('./_export'); +var _isFinite = require('./_global').isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + } +}); diff --git a/node_modules/core-js/library/modules/es6.number.is-integer.js b/node_modules/core-js/library/modules/es6.number.is-integer.js new file mode 100644 index 00000000..f1ab5dc4 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.is-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.3 Number.isInteger(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { isInteger: require('./_is-integer') }); diff --git a/node_modules/core-js/library/modules/es6.number.is-nan.js b/node_modules/core-js/library/modules/es6.number.is-nan.js new file mode 100644 index 00000000..01d76ba2 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.is-nan.js @@ -0,0 +1,9 @@ +// 20.1.2.4 Number.isNaN(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + } +}); diff --git a/node_modules/core-js/library/modules/es6.number.is-safe-integer.js b/node_modules/core-js/library/modules/es6.number.is-safe-integer.js new file mode 100644 index 00000000..004e7d16 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.is-safe-integer.js @@ -0,0 +1,10 @@ +// 20.1.2.5 Number.isSafeInteger(number) +var $export = require('./_export'); +var isInteger = require('./_is-integer'); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); diff --git a/node_modules/core-js/library/modules/es6.number.max-safe-integer.js b/node_modules/core-js/library/modules/es6.number.max-safe-integer.js new file mode 100644 index 00000000..a4f248f1 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.max-safe-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.6 Number.MAX_SAFE_INTEGER +var $export = require('./_export'); + +$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); diff --git a/node_modules/core-js/library/modules/es6.number.min-safe-integer.js b/node_modules/core-js/library/modules/es6.number.min-safe-integer.js new file mode 100644 index 00000000..34df374b --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.min-safe-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.10 Number.MIN_SAFE_INTEGER +var $export = require('./_export'); + +$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); diff --git a/node_modules/core-js/library/modules/es6.number.parse-float.js b/node_modules/core-js/library/modules/es6.number.parse-float.js new file mode 100644 index 00000000..317c4310 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.parse-float.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); diff --git a/node_modules/core-js/library/modules/es6.number.parse-int.js b/node_modules/core-js/library/modules/es6.number.parse-int.js new file mode 100644 index 00000000..cb48da28 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.parse-int.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); diff --git a/node_modules/core-js/library/modules/es6.number.to-fixed.js b/node_modules/core-js/library/modules/es6.number.to-fixed.js new file mode 100644 index 00000000..2bf78af9 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.to-fixed.js @@ -0,0 +1,114 @@ +'use strict'; +var $export = require('./_export'); +var toInteger = require('./_to-integer'); +var aNumberValue = require('./_a-number-value'); +var repeat = require('./_string-repeat'); +var $toFixed = 1.0.toFixed; +var floor = Math.floor; +var data = [0, 0, 0, 0, 0, 0]; +var ERROR = 'Number.toFixed: incorrect invocation!'; +var ZERO = '0'; + +var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; +var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } +}; +var numToString = function () { + var i = 6; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } return s; +}; +var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); +}; +var log = function (x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } return n; +}; + +$export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || + 0.9.toFixed(0) !== '1' || + 1.255.toFixed(2) !== '1.25' || + 1000000000000000128.0.toFixed(0) !== '1000000000000000128' +) || !require('./_fails')(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); +})), 'Number', { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } return m; + } +}); diff --git a/node_modules/core-js/library/modules/es6.number.to-precision.js b/node_modules/core-js/library/modules/es6.number.to-precision.js new file mode 100644 index 00000000..0d92527f --- /dev/null +++ b/node_modules/core-js/library/modules/es6.number.to-precision.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export'); +var $fails = require('./_fails'); +var aNumberValue = require('./_a-number-value'); +var $toPrecision = 1.0.toPrecision; + +$export($export.P + $export.F * ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; +}) || !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); +})), 'Number', { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + } +}); diff --git a/node_modules/core-js/library/modules/es6.object.assign.js b/node_modules/core-js/library/modules/es6.object.assign.js new file mode 100644 index 00000000..d28085a7 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.assign.js @@ -0,0 +1,4 @@ +// 19.1.3.1 Object.assign(target, source) +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') }); diff --git a/node_modules/core-js/library/modules/es6.object.create.js b/node_modules/core-js/library/modules/es6.object.create.js new file mode 100644 index 00000000..70627d69 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.create.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: require('./_object-create') }); diff --git a/node_modules/core-js/library/modules/es6.object.define-properties.js b/node_modules/core-js/library/modules/es6.object.define-properties.js new file mode 100644 index 00000000..5ec34214 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.define-properties.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) +$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperties: require('./_object-dps') }); diff --git a/node_modules/core-js/library/modules/es6.object.define-property.js b/node_modules/core-js/library/modules/es6.object.define-property.js new file mode 100644 index 00000000..12068582 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.define-property.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f }); diff --git a/node_modules/core-js/library/modules/es6.object.freeze.js b/node_modules/core-js/library/modules/es6.object.freeze.js new file mode 100644 index 00000000..0856ce9d --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.freeze.js @@ -0,0 +1,9 @@ +// 19.1.2.5 Object.freeze(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js b/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js new file mode 100644 index 00000000..9df21417 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js @@ -0,0 +1,9 @@ +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = require('./_to-iobject'); +var $getOwnPropertyDescriptor = require('./_object-gopd').f; + +require('./_object-sap')('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.get-own-property-names.js b/node_modules/core-js/library/modules/es6.object.get-own-property-names.js new file mode 100644 index 00000000..172f51c7 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.get-own-property-names.js @@ -0,0 +1,4 @@ +// 19.1.2.7 Object.getOwnPropertyNames(O) +require('./_object-sap')('getOwnPropertyNames', function () { + return require('./_object-gopn-ext').f; +}); diff --git a/node_modules/core-js/library/modules/es6.object.get-prototype-of.js b/node_modules/core-js/library/modules/es6.object.get-prototype-of.js new file mode 100644 index 00000000..8fe2728c --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.get-prototype-of.js @@ -0,0 +1,9 @@ +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = require('./_to-object'); +var $getPrototypeOf = require('./_object-gpo'); + +require('./_object-sap')('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.is-extensible.js b/node_modules/core-js/library/modules/es6.object.is-extensible.js new file mode 100644 index 00000000..5cd4575a --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.is-extensible.js @@ -0,0 +1,8 @@ +// 19.1.2.11 Object.isExtensible(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.is-frozen.js b/node_modules/core-js/library/modules/es6.object.is-frozen.js new file mode 100644 index 00000000..0ceeabbb --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.is-frozen.js @@ -0,0 +1,8 @@ +// 19.1.2.12 Object.isFrozen(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.is-sealed.js b/node_modules/core-js/library/modules/es6.object.is-sealed.js new file mode 100644 index 00000000..7fa8dded --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.is-sealed.js @@ -0,0 +1,8 @@ +// 19.1.2.13 Object.isSealed(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.is.js b/node_modules/core-js/library/modules/es6.object.is.js new file mode 100644 index 00000000..204d7030 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.is.js @@ -0,0 +1,3 @@ +// 19.1.3.10 Object.is(value1, value2) +var $export = require('./_export'); +$export($export.S, 'Object', { is: require('./_same-value') }); diff --git a/node_modules/core-js/library/modules/es6.object.keys.js b/node_modules/core-js/library/modules/es6.object.keys.js new file mode 100644 index 00000000..e9dade7d --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.keys.js @@ -0,0 +1,9 @@ +// 19.1.2.14 Object.keys(O) +var toObject = require('./_to-object'); +var $keys = require('./_object-keys'); + +require('./_object-sap')('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.prevent-extensions.js b/node_modules/core-js/library/modules/es6.object.prevent-extensions.js new file mode 100644 index 00000000..2f729181 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.prevent-extensions.js @@ -0,0 +1,9 @@ +// 19.1.2.15 Object.preventExtensions(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.seal.js b/node_modules/core-js/library/modules/es6.object.seal.js new file mode 100644 index 00000000..12c3f6a3 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.seal.js @@ -0,0 +1,9 @@ +// 19.1.2.17 Object.seal(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); diff --git a/node_modules/core-js/library/modules/es6.object.set-prototype-of.js b/node_modules/core-js/library/modules/es6.object.set-prototype-of.js new file mode 100644 index 00000000..461dbd2e --- /dev/null +++ b/node_modules/core-js/library/modules/es6.object.set-prototype-of.js @@ -0,0 +1,3 @@ +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = require('./_export'); +$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set }); diff --git a/node_modules/core-js/library/modules/es6.object.to-string.js b/node_modules/core-js/library/modules/es6.object.to-string.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/library/modules/es6.parse-float.js b/node_modules/core-js/library/modules/es6.parse-float.js new file mode 100644 index 00000000..cbf50ead --- /dev/null +++ b/node_modules/core-js/library/modules/es6.parse-float.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); diff --git a/node_modules/core-js/library/modules/es6.parse-int.js b/node_modules/core-js/library/modules/es6.parse-int.js new file mode 100644 index 00000000..7ea358e8 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.parse-int.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); diff --git a/node_modules/core-js/library/modules/es6.promise.js b/node_modules/core-js/library/modules/es6.promise.js new file mode 100644 index 00000000..b0ff3bfc --- /dev/null +++ b/node_modules/core-js/library/modules/es6.promise.js @@ -0,0 +1,286 @@ +'use strict'; +var LIBRARY = require('./_library'); +var global = require('./_global'); +var ctx = require('./_ctx'); +var classof = require('./_classof'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var aFunction = require('./_a-function'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var speciesConstructor = require('./_species-constructor'); +var task = require('./_task').set; +var microtask = require('./_microtask')(); +var newPromiseCapabilityModule = require('./_new-promise-capability'); +var perform = require('./_perform'); +var userAgent = require('./_user-agent'); +var promiseResolve = require('./_promise-resolve'); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') + && promise.then(empty) instanceof FakePromise + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; + +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = require('./_redefine-all')($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +require('./_set-to-string-tag')($Promise, PROMISE); +require('./_set-species')(PROMISE); +Wrapper = require('./_core')[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.apply.js b/node_modules/core-js/library/modules/es6.reflect.apply.js new file mode 100644 index 00000000..3b9c03a9 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.apply.js @@ -0,0 +1,16 @@ +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var rApply = (require('./_global').Reflect || {}).apply; +var fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !require('./_fails')(function () { + rApply(function () { /* empty */ }); +}), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.construct.js b/node_modules/core-js/library/modules/es6.reflect.construct.js new file mode 100644 index 00000000..380addb5 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.construct.js @@ -0,0 +1,47 @@ +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = require('./_export'); +var create = require('./_object-create'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var bind = require('./_bind'); +var rConstruct = (require('./_global').Reflect || {}).construct; + +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function () { + function F() { /* empty */ } + return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function () { + rConstruct(function () { /* empty */ }); +}); + +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: return new Target(); + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.define-property.js b/node_modules/core-js/library/modules/es6.reflect.define-property.js new file mode 100644 index 00000000..be7fbde6 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.define-property.js @@ -0,0 +1,23 @@ +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = require('./_object-dp'); +var $export = require('./_export'); +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * require('./_fails')(function () { + // eslint-disable-next-line no-undef + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); +}), 'Reflect', { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.delete-property.js b/node_modules/core-js/library/modules/es6.reflect.delete-property.js new file mode 100644 index 00000000..0902b38a --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.delete-property.js @@ -0,0 +1,11 @@ +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = require('./_export'); +var gOPD = require('./_object-gopd').f; +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.enumerate.js b/node_modules/core-js/library/modules/es6.reflect.enumerate.js new file mode 100644 index 00000000..9e7c76a3 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.enumerate.js @@ -0,0 +1,26 @@ +'use strict'; +// 26.1.5 Reflect.enumerate(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = []; // keys + var key; + for (key in iterated) keys.push(key); +}; +require('./_iter-create')(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; +}); + +$export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js b/node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js new file mode 100644 index 00000000..e1299f90 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js @@ -0,0 +1,10 @@ +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = require('./_object-gopd'); +var $export = require('./_export'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js b/node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js new file mode 100644 index 00000000..28351d41 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js @@ -0,0 +1,10 @@ +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = require('./_export'); +var getProto = require('./_object-gpo'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.get.js b/node_modules/core-js/library/modules/es6.reflect.get.js new file mode 100644 index 00000000..a7ee7666 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.get.js @@ -0,0 +1,21 @@ +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var anObject = require('./_an-object'); + +function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var desc, proto; + if (anObject(target) === receiver) return target[propertyKey]; + if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); +} + +$export($export.S, 'Reflect', { get: get }); diff --git a/node_modules/core-js/library/modules/es6.reflect.has.js b/node_modules/core-js/library/modules/es6.reflect.has.js new file mode 100644 index 00000000..4f5efa99 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.has.js @@ -0,0 +1,8 @@ +// 26.1.9 Reflect.has(target, propertyKey) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.is-extensible.js b/node_modules/core-js/library/modules/es6.reflect.is-extensible.js new file mode 100644 index 00000000..700f938a --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.is-extensible.js @@ -0,0 +1,11 @@ +// 26.1.10 Reflect.isExtensible(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.own-keys.js b/node_modules/core-js/library/modules/es6.reflect.own-keys.js new file mode 100644 index 00000000..9f2424ae --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.own-keys.js @@ -0,0 +1,4 @@ +// 26.1.11 Reflect.ownKeys(target) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { ownKeys: require('./_own-keys') }); diff --git a/node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js b/node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js new file mode 100644 index 00000000..e1037fa1 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js @@ -0,0 +1,16 @@ +// 26.1.12 Reflect.preventExtensions(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var $preventExtensions = Object.preventExtensions; + +$export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js b/node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js new file mode 100644 index 00000000..5dae9012 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js @@ -0,0 +1,15 @@ +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = require('./_export'); +var setProto = require('./_set-proto'); + +if (setProto) $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + } +}); diff --git a/node_modules/core-js/library/modules/es6.reflect.set.js b/node_modules/core-js/library/modules/es6.reflect.set.js new file mode 100644 index 00000000..d809d7a4 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.reflect.set.js @@ -0,0 +1,33 @@ +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = require('./_object-dp'); +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var createDesc = require('./_property-desc'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); + +function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var existingDescriptor, proto; + if (!ownDesc) { + if (isObject(proto = getPrototypeOf(target))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); diff --git a/node_modules/core-js/library/modules/es6.regexp.constructor.js b/node_modules/core-js/library/modules/es6.regexp.constructor.js new file mode 100644 index 00000000..e85e3141 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.regexp.constructor.js @@ -0,0 +1 @@ +require('./_set-species')('RegExp'); diff --git a/node_modules/core-js/library/modules/es6.regexp.exec.js b/node_modules/core-js/library/modules/es6.regexp.exec.js new file mode 100644 index 00000000..8b1a3937 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.regexp.exec.js @@ -0,0 +1 @@ +// empty diff --git a/node_modules/core-js/library/modules/es6.regexp.flags.js b/node_modules/core-js/library/modules/es6.regexp.flags.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/library/modules/es6.regexp.match.js b/node_modules/core-js/library/modules/es6.regexp.match.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/library/modules/es6.regexp.replace.js b/node_modules/core-js/library/modules/es6.regexp.replace.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/library/modules/es6.regexp.search.js b/node_modules/core-js/library/modules/es6.regexp.search.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/library/modules/es6.regexp.split.js b/node_modules/core-js/library/modules/es6.regexp.split.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/library/modules/es6.regexp.to-string.js b/node_modules/core-js/library/modules/es6.regexp.to-string.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/library/modules/es6.set.js b/node_modules/core-js/library/modules/es6.set.js new file mode 100644 index 00000000..55b8bdd8 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.set.js @@ -0,0 +1,14 @@ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var SET = 'Set'; + +// 23.2 Set Objects +module.exports = require('./_collection')(SET, function (get) { + return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); + } +}, strong); diff --git a/node_modules/core-js/library/modules/es6.string.anchor.js b/node_modules/core-js/library/modules/es6.string.anchor.js new file mode 100644 index 00000000..3493e54c --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.anchor.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.2 String.prototype.anchor(name) +require('./_string-html')('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.big.js b/node_modules/core-js/library/modules/es6.string.big.js new file mode 100644 index 00000000..38aab341 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.big.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.3 String.prototype.big() +require('./_string-html')('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.blink.js b/node_modules/core-js/library/modules/es6.string.blink.js new file mode 100644 index 00000000..6188d96e --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.blink.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.4 String.prototype.blink() +require('./_string-html')('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.bold.js b/node_modules/core-js/library/modules/es6.string.bold.js new file mode 100644 index 00000000..ff3ecb9c --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.bold.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.5 String.prototype.bold() +require('./_string-html')('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.code-point-at.js b/node_modules/core-js/library/modules/es6.string.code-point-at.js new file mode 100644 index 00000000..e39b8c5e --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.code-point-at.js @@ -0,0 +1,9 @@ +'use strict'; +var $export = require('./_export'); +var $at = require('./_string-at')(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } +}); diff --git a/node_modules/core-js/library/modules/es6.string.ends-with.js b/node_modules/core-js/library/modules/es6.string.ends-with.js new file mode 100644 index 00000000..06568888 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.ends-with.js @@ -0,0 +1,20 @@ +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); diff --git a/node_modules/core-js/library/modules/es6.string.fixed.js b/node_modules/core-js/library/modules/es6.string.fixed.js new file mode 100644 index 00000000..d4a60f37 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.fixed.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.6 String.prototype.fixed() +require('./_string-html')('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.fontcolor.js b/node_modules/core-js/library/modules/es6.string.fontcolor.js new file mode 100644 index 00000000..f7b95957 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.fontcolor.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.7 String.prototype.fontcolor(color) +require('./_string-html')('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.fontsize.js b/node_modules/core-js/library/modules/es6.string.fontsize.js new file mode 100644 index 00000000..f4cc20ae --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.fontsize.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.8 String.prototype.fontsize(size) +require('./_string-html')('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.from-code-point.js b/node_modules/core-js/library/modules/es6.string.from-code-point.js new file mode 100644 index 00000000..bece66e2 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.from-code-point.js @@ -0,0 +1,23 @@ +var $export = require('./_export'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var fromCharCode = String.fromCharCode; +var $fromCodePoint = String.fromCodePoint; + +// length should be 1, old FF problem +$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } +}); diff --git a/node_modules/core-js/library/modules/es6.string.includes.js b/node_modules/core-js/library/modules/es6.string.includes.js new file mode 100644 index 00000000..28d17416 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.includes.js @@ -0,0 +1,12 @@ +// 21.1.3.7 String.prototype.includes(searchString, position = 0) +'use strict'; +var $export = require('./_export'); +var context = require('./_string-context'); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); diff --git a/node_modules/core-js/library/modules/es6.string.italics.js b/node_modules/core-js/library/modules/es6.string.italics.js new file mode 100644 index 00000000..ed4cc3bf --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.italics.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.9 String.prototype.italics() +require('./_string-html')('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.iterator.js b/node_modules/core-js/library/modules/es6.string.iterator.js new file mode 100644 index 00000000..5d84c7fd --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.iterator.js @@ -0,0 +1,17 @@ +'use strict'; +var $at = require('./_string-at')(true); + +// 21.1.3.27 String.prototype[@@iterator]() +require('./_iter-define')(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.link.js b/node_modules/core-js/library/modules/es6.string.link.js new file mode 100644 index 00000000..d0255edd --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.link.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.10 String.prototype.link(url) +require('./_string-html')('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.raw.js b/node_modules/core-js/library/modules/es6.string.raw.js new file mode 100644 index 00000000..aa40ff6f --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.raw.js @@ -0,0 +1,18 @@ +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var toLength = require('./_to-length'); + +$export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } return res.join(''); + } +}); diff --git a/node_modules/core-js/library/modules/es6.string.repeat.js b/node_modules/core-js/library/modules/es6.string.repeat.js new file mode 100644 index 00000000..08412d91 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.repeat.js @@ -0,0 +1,6 @@ +var $export = require('./_export'); + +$export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: require('./_string-repeat') +}); diff --git a/node_modules/core-js/library/modules/es6.string.small.js b/node_modules/core-js/library/modules/es6.string.small.js new file mode 100644 index 00000000..941e4a76 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.small.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.11 String.prototype.small() +require('./_string-html')('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.starts-with.js b/node_modules/core-js/library/modules/es6.string.starts-with.js new file mode 100644 index 00000000..c1723767 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.starts-with.js @@ -0,0 +1,18 @@ +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); diff --git a/node_modules/core-js/library/modules/es6.string.strike.js b/node_modules/core-js/library/modules/es6.string.strike.js new file mode 100644 index 00000000..66055bc0 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.strike.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.12 String.prototype.strike() +require('./_string-html')('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.sub.js b/node_modules/core-js/library/modules/es6.string.sub.js new file mode 100644 index 00000000..e295a27b --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.sub.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.13 String.prototype.sub() +require('./_string-html')('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.sup.js b/node_modules/core-js/library/modules/es6.string.sup.js new file mode 100644 index 00000000..125a989a --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.sup.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.14 String.prototype.sup() +require('./_string-html')('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.string.trim.js b/node_modules/core-js/library/modules/es6.string.trim.js new file mode 100644 index 00000000..02b8a6c6 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.string.trim.js @@ -0,0 +1,7 @@ +'use strict'; +// 21.1.3.25 String.prototype.trim() +require('./_string-trim')('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.symbol.js b/node_modules/core-js/library/modules/es6.symbol.js new file mode 100644 index 00000000..52dbbc81 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.symbol.js @@ -0,0 +1,246 @@ +'use strict'; +// ECMAScript 6 symbols shim +var global = require('./_global'); +var has = require('./_has'); +var DESCRIPTORS = require('./_descriptors'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var META = require('./_meta').KEY; +var $fails = require('./_fails'); +var shared = require('./_shared'); +var setToStringTag = require('./_set-to-string-tag'); +var uid = require('./_uid'); +var wks = require('./_wks'); +var wksExt = require('./_wks-ext'); +var wksDefine = require('./_wks-define'); +var enumKeys = require('./_enum-keys'); +var isArray = require('./_is-array'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var toObject = require('./_to-object'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var createDesc = require('./_property-desc'); +var _create = require('./_object-create'); +var gOPNExt = require('./_object-gopn-ext'); +var $GOPD = require('./_object-gopd'); +var $GOPS = require('./_object-gops'); +var $DP = require('./_object-dp'); +var $keys = require('./_object-keys'); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames; + require('./_object-pie').f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !require('./_library')) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); + +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + } +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); diff --git a/node_modules/core-js/library/modules/es6.typed.array-buffer.js b/node_modules/core-js/library/modules/es6.typed.array-buffer.js new file mode 100644 index 00000000..b2473709 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.array-buffer.js @@ -0,0 +1,46 @@ +'use strict'; +var $export = require('./_export'); +var $typed = require('./_typed'); +var buffer = require('./_typed-buffer'); +var anObject = require('./_an-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var isObject = require('./_is-object'); +var ArrayBuffer = require('./_global').ArrayBuffer; +var speciesConstructor = require('./_species-constructor'); +var $ArrayBuffer = buffer.ArrayBuffer; +var $DataView = buffer.DataView; +var $isView = $typed.ABV && ArrayBuffer.isView; +var $slice = $ArrayBuffer.prototype.slice; +var VIEW = $typed.VIEW; +var ARRAY_BUFFER = 'ArrayBuffer'; + +$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); + +$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return $isView && $isView(it) || isObject(it) && VIEW in it; + } +}); + +$export($export.P + $export.U + $export.F * require('./_fails')(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; +}), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +require('./_set-species')(ARRAY_BUFFER); diff --git a/node_modules/core-js/library/modules/es6.typed.data-view.js b/node_modules/core-js/library/modules/es6.typed.data-view.js new file mode 100644 index 00000000..d0e23536 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.data-view.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +$export($export.G + $export.W + $export.F * !require('./_typed').ABV, { + DataView: require('./_typed-buffer').DataView +}); diff --git a/node_modules/core-js/library/modules/es6.typed.float32-array.js b/node_modules/core-js/library/modules/es6.typed.float32-array.js new file mode 100644 index 00000000..f4970061 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.float32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.float64-array.js b/node_modules/core-js/library/modules/es6.typed.float64-array.js new file mode 100644 index 00000000..85dedcd5 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.float64-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.int16-array.js b/node_modules/core-js/library/modules/es6.typed.int16-array.js new file mode 100644 index 00000000..b20ed041 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.int16-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.int32-array.js b/node_modules/core-js/library/modules/es6.typed.int32-array.js new file mode 100644 index 00000000..c7e6ae06 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.int32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.int8-array.js b/node_modules/core-js/library/modules/es6.typed.int8-array.js new file mode 100644 index 00000000..58ab9f36 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.int8-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.uint16-array.js b/node_modules/core-js/library/modules/es6.typed.uint16-array.js new file mode 100644 index 00000000..992805d6 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.uint16-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.uint32-array.js b/node_modules/core-js/library/modules/es6.typed.uint32-array.js new file mode 100644 index 00000000..5c444246 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.uint32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.uint8-array.js b/node_modules/core-js/library/modules/es6.typed.uint8-array.js new file mode 100644 index 00000000..465cdc80 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.uint8-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js b/node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js new file mode 100644 index 00000000..a84a1c1a --- /dev/null +++ b/node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint8', 1, function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}, true); diff --git a/node_modules/core-js/library/modules/es6.weak-map.js b/node_modules/core-js/library/modules/es6.weak-map.js new file mode 100644 index 00000000..35605214 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.weak-map.js @@ -0,0 +1,60 @@ +'use strict'; +var global = require('./_global'); +var each = require('./_array-methods')(0); +var redefine = require('./_redefine'); +var meta = require('./_meta'); +var assign = require('./_object-assign'); +var weak = require('./_collection-weak'); +var isObject = require('./_is-object'); +var validate = require('./_validate-collection'); +var NATIVE_WEAK_MAP = require('./_validate-collection'); +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +var InternalMap; + +var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; +}; + +var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); +} diff --git a/node_modules/core-js/library/modules/es6.weak-set.js b/node_modules/core-js/library/modules/es6.weak-set.js new file mode 100644 index 00000000..18a81e52 --- /dev/null +++ b/node_modules/core-js/library/modules/es6.weak-set.js @@ -0,0 +1,14 @@ +'use strict'; +var weak = require('./_collection-weak'); +var validate = require('./_validate-collection'); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +require('./_collection')(WEAK_SET, function (get) { + return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(validate(this, WEAK_SET), value, true); + } +}, weak, false, true); diff --git a/node_modules/core-js/library/modules/es7.array.flat-map.js b/node_modules/core-js/library/modules/es7.array.flat-map.js new file mode 100644 index 00000000..2a210cd3 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.array.flat-map.js @@ -0,0 +1,22 @@ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var aFunction = require('./_a-function'); +var arraySpeciesCreate = require('./_array-species-create'); + +$export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + } +}); + +require('./_add-to-unscopables')('flatMap'); diff --git a/node_modules/core-js/library/modules/es7.array.flatten.js b/node_modules/core-js/library/modules/es7.array.flatten.js new file mode 100644 index 00000000..9019b2d1 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.array.flatten.js @@ -0,0 +1,21 @@ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var toInteger = require('./_to-integer'); +var arraySpeciesCreate = require('./_array-species-create'); + +$export($export.P, 'Array', { + flatten: function flatten(/* depthArg = 1 */) { + var depthArg = arguments[0]; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + } +}); + +require('./_add-to-unscopables')('flatten'); diff --git a/node_modules/core-js/library/modules/es7.array.includes.js b/node_modules/core-js/library/modules/es7.array.includes.js new file mode 100644 index 00000000..1b77f0eb --- /dev/null +++ b/node_modules/core-js/library/modules/es7.array.includes.js @@ -0,0 +1,12 @@ +'use strict'; +// https://github.com/tc39/Array.prototype.includes +var $export = require('./_export'); +var $includes = require('./_array-includes')(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +require('./_add-to-unscopables')('includes'); diff --git a/node_modules/core-js/library/modules/es7.asap.js b/node_modules/core-js/library/modules/es7.asap.js new file mode 100644 index 00000000..d36f7c76 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.asap.js @@ -0,0 +1,12 @@ +// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask +var $export = require('./_export'); +var microtask = require('./_microtask')(); +var process = require('./_global').process; +var isNode = require('./_cof')(process) == 'process'; + +$export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); diff --git a/node_modules/core-js/library/modules/es7.error.is-error.js b/node_modules/core-js/library/modules/es7.error.is-error.js new file mode 100644 index 00000000..ba94f5d1 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.error.is-error.js @@ -0,0 +1,9 @@ +// https://github.com/ljharb/proposal-is-error +var $export = require('./_export'); +var cof = require('./_cof'); + +$export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + } +}); diff --git a/node_modules/core-js/library/modules/es7.global.js b/node_modules/core-js/library/modules/es7.global.js new file mode 100644 index 00000000..a315fd43 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.global.js @@ -0,0 +1,4 @@ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.G, { global: require('./_global') }); diff --git a/node_modules/core-js/library/modules/es7.map.from.js b/node_modules/core-js/library/modules/es7.map.from.js new file mode 100644 index 00000000..a6057370 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.map.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from +require('./_set-collection-from')('Map'); diff --git a/node_modules/core-js/library/modules/es7.map.of.js b/node_modules/core-js/library/modules/es7.map.of.js new file mode 100644 index 00000000..a2bf1fef --- /dev/null +++ b/node_modules/core-js/library/modules/es7.map.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +require('./_set-collection-of')('Map'); diff --git a/node_modules/core-js/library/modules/es7.map.to-json.js b/node_modules/core-js/library/modules/es7.map.to-json.js new file mode 100644 index 00000000..95a3569f --- /dev/null +++ b/node_modules/core-js/library/modules/es7.map.to-json.js @@ -0,0 +1,4 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = require('./_export'); + +$export($export.P + $export.R, 'Map', { toJSON: require('./_collection-to-json')('Map') }); diff --git a/node_modules/core-js/library/modules/es7.math.clamp.js b/node_modules/core-js/library/modules/es7.math.clamp.js new file mode 100644 index 00000000..319cda60 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.clamp.js @@ -0,0 +1,8 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + } +}); diff --git a/node_modules/core-js/library/modules/es7.math.deg-per-rad.js b/node_modules/core-js/library/modules/es7.math.deg-per-rad.js new file mode 100644 index 00000000..99b95bba --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.deg-per-rad.js @@ -0,0 +1,4 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); diff --git a/node_modules/core-js/library/modules/es7.math.degrees.js b/node_modules/core-js/library/modules/es7.math.degrees.js new file mode 100644 index 00000000..6637d915 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.degrees.js @@ -0,0 +1,9 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var RAD_PER_DEG = 180 / Math.PI; + +$export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + } +}); diff --git a/node_modules/core-js/library/modules/es7.math.fscale.js b/node_modules/core-js/library/modules/es7.math.fscale.js new file mode 100644 index 00000000..ad660a05 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.fscale.js @@ -0,0 +1,10 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var scale = require('./_math-scale'); +var fround = require('./_math-fround'); + +$export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + } +}); diff --git a/node_modules/core-js/library/modules/es7.math.iaddh.js b/node_modules/core-js/library/modules/es7.math.iaddh.js new file mode 100644 index 00000000..a331ba9b --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.iaddh.js @@ -0,0 +1,11 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } +}); diff --git a/node_modules/core-js/library/modules/es7.math.imulh.js b/node_modules/core-js/library/modules/es7.math.imulh.js new file mode 100644 index 00000000..58d19f3a --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.imulh.js @@ -0,0 +1,16 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + imulh: function imulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >> 16; + var v1 = $v >> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } +}); diff --git a/node_modules/core-js/library/modules/es7.math.isubh.js b/node_modules/core-js/library/modules/es7.math.isubh.js new file mode 100644 index 00000000..de22793c --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.isubh.js @@ -0,0 +1,11 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } +}); diff --git a/node_modules/core-js/library/modules/es7.math.rad-per-deg.js b/node_modules/core-js/library/modules/es7.math.rad-per-deg.js new file mode 100644 index 00000000..6f702596 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.rad-per-deg.js @@ -0,0 +1,4 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); diff --git a/node_modules/core-js/library/modules/es7.math.radians.js b/node_modules/core-js/library/modules/es7.math.radians.js new file mode 100644 index 00000000..abd9575f --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.radians.js @@ -0,0 +1,9 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var DEG_PER_RAD = Math.PI / 180; + +$export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + } +}); diff --git a/node_modules/core-js/library/modules/es7.math.scale.js b/node_modules/core-js/library/modules/es7.math.scale.js new file mode 100644 index 00000000..2866dcd7 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.scale.js @@ -0,0 +1,4 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { scale: require('./_math-scale') }); diff --git a/node_modules/core-js/library/modules/es7.math.signbit.js b/node_modules/core-js/library/modules/es7.math.signbit.js new file mode 100644 index 00000000..c2568048 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.signbit.js @@ -0,0 +1,7 @@ +// http://jfbastien.github.io/papers/Math.signbit.html +var $export = require('./_export'); + +$export($export.S, 'Math', { signbit: function signbit(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; +} }); diff --git a/node_modules/core-js/library/modules/es7.math.umulh.js b/node_modules/core-js/library/modules/es7.math.umulh.js new file mode 100644 index 00000000..3ddfa468 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.math.umulh.js @@ -0,0 +1,16 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + umulh: function umulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >>> 16; + var v1 = $v >>> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } +}); diff --git a/node_modules/core-js/library/modules/es7.object.define-getter.js b/node_modules/core-js/library/modules/es7.object.define-getter.js new file mode 100644 index 00000000..ffc6203f --- /dev/null +++ b/node_modules/core-js/library/modules/es7.object.define-getter.js @@ -0,0 +1,12 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } +}); diff --git a/node_modules/core-js/library/modules/es7.object.define-setter.js b/node_modules/core-js/library/modules/es7.object.define-setter.js new file mode 100644 index 00000000..8ceefdd6 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.object.define-setter.js @@ -0,0 +1,12 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } +}); diff --git a/node_modules/core-js/library/modules/es7.object.entries.js b/node_modules/core-js/library/modules/es7.object.entries.js new file mode 100644 index 00000000..2f83437c --- /dev/null +++ b/node_modules/core-js/library/modules/es7.object.entries.js @@ -0,0 +1,9 @@ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $entries = require('./_object-to-array')(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); diff --git a/node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js b/node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js new file mode 100644 index 00000000..b1ab72fd --- /dev/null +++ b/node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js @@ -0,0 +1,22 @@ +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = require('./_export'); +var ownKeys = require('./_own-keys'); +var toIObject = require('./_to-iobject'); +var gOPD = require('./_object-gopd'); +var createProperty = require('./_create-property'); + +$export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, key = keys[i++]); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + } +}); diff --git a/node_modules/core-js/library/modules/es7.object.lookup-getter.js b/node_modules/core-js/library/modules/es7.object.lookup-getter.js new file mode 100644 index 00000000..f8022291 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.object.lookup-getter.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.get; + } while (O = getPrototypeOf(O)); + } +}); diff --git a/node_modules/core-js/library/modules/es7.object.lookup-setter.js b/node_modules/core-js/library/modules/es7.object.lookup-setter.js new file mode 100644 index 00000000..8bf8b64e --- /dev/null +++ b/node_modules/core-js/library/modules/es7.object.lookup-setter.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.set; + } while (O = getPrototypeOf(O)); + } +}); diff --git a/node_modules/core-js/library/modules/es7.object.values.js b/node_modules/core-js/library/modules/es7.object.values.js new file mode 100644 index 00000000..d6f09527 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.object.values.js @@ -0,0 +1,9 @@ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $values = require('./_object-to-array')(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); diff --git a/node_modules/core-js/library/modules/es7.observable.js b/node_modules/core-js/library/modules/es7.observable.js new file mode 100644 index 00000000..6dcb2c8f --- /dev/null +++ b/node_modules/core-js/library/modules/es7.observable.js @@ -0,0 +1,199 @@ +'use strict'; +// https://github.com/zenparsing/es-observable +var $export = require('./_export'); +var global = require('./_global'); +var core = require('./_core'); +var microtask = require('./_microtask')(); +var OBSERVABLE = require('./_wks')('observable'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var anInstance = require('./_an-instance'); +var redefineAll = require('./_redefine-all'); +var hide = require('./_hide'); +var forOf = require('./_for-of'); +var RETURN = forOf.RETURN; + +var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); +}; + +var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } +}; + +var subscriptionClosed = function (subscription) { + return subscription._o === undefined; +}; + +var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } +}; + +var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer); + var subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } if (subscriptionClosed(this)) cleanupSubscription(this); +}; + +Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe() { closeSubscription(this); } +}); + +var SubscriptionObserver = function (subscription) { + this._s = subscription; +}; + +SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } +}); + +var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); +}; + +redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } +}); + +redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if (forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN) return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var j = 0; j < items.length; ++j) { + observer.next(items[j]); + if (done) return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + } +}); + +hide($Observable.prototype, OBSERVABLE, function () { return this; }); + +$export($export.G, { Observable: $Observable }); + +require('./_set-species')('Observable'); diff --git a/node_modules/core-js/library/modules/es7.promise.finally.js b/node_modules/core-js/library/modules/es7.promise.finally.js new file mode 100644 index 00000000..fa04b639 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.promise.finally.js @@ -0,0 +1,20 @@ +// https://github.com/tc39/proposal-promise-finally +'use strict'; +var $export = require('./_export'); +var core = require('./_core'); +var global = require('./_global'); +var speciesConstructor = require('./_species-constructor'); +var promiseResolve = require('./_promise-resolve'); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); diff --git a/node_modules/core-js/library/modules/es7.promise.try.js b/node_modules/core-js/library/modules/es7.promise.try.js new file mode 100644 index 00000000..e8163720 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.promise.try.js @@ -0,0 +1,12 @@ +'use strict'; +// https://github.com/tc39/proposal-promise-try +var $export = require('./_export'); +var newPromiseCapability = require('./_new-promise-capability'); +var perform = require('./_perform'); + +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.define-metadata.js b/node_modules/core-js/library/modules/es7.reflect.define-metadata.js new file mode 100644 index 00000000..ebef52c2 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.define-metadata.js @@ -0,0 +1,8 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var toMetaKey = metadata.key; +var ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js b/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js new file mode 100644 index 00000000..590ed53c --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js @@ -0,0 +1,15 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var toMetaKey = metadata.key; +var getOrCreateMetadataMap = metadata.map; +var store = metadata.store; + +metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); + var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; + if (metadataMap.size) return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js b/node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js new file mode 100644 index 00000000..f344172b --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js @@ -0,0 +1,19 @@ +var Set = require('./es6.set'); +var from = require('./_array-from-iterable'); +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var parent = getPrototypeOf(O); + if (parent === null) return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; +}; + +metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { + return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.get-metadata.js b/node_modules/core-js/library/modules/es7.reflect.get-metadata.js new file mode 100644 index 00000000..58c278e9 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.get-metadata.js @@ -0,0 +1,17 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryHasOwnMetadata = metadata.has; +var ordinaryGetOwnMetadata = metadata.get; +var toMetaKey = metadata.key; + +var ordinaryGetMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; +}; + +metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js b/node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js new file mode 100644 index 00000000..03e3201b --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js @@ -0,0 +1,8 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js b/node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js new file mode 100644 index 00000000..4a18b071 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js @@ -0,0 +1,9 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryGetOwnMetadata = metadata.get; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.has-metadata.js b/node_modules/core-js/library/modules/es7.reflect.has-metadata.js new file mode 100644 index 00000000..b934bb4e --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.has-metadata.js @@ -0,0 +1,16 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryHasOwnMetadata = metadata.has; +var toMetaKey = metadata.key; + +var ordinaryHasMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; +}; + +metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js b/node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js new file mode 100644 index 00000000..512850dd --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js @@ -0,0 +1,9 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryHasOwnMetadata = metadata.has; +var toMetaKey = metadata.key; + +metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); diff --git a/node_modules/core-js/library/modules/es7.reflect.metadata.js b/node_modules/core-js/library/modules/es7.reflect.metadata.js new file mode 100644 index 00000000..efb9a9e2 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.reflect.metadata.js @@ -0,0 +1,15 @@ +var $metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +var toMetaKey = $metadata.key; +var ordinaryDefineOwnMetadata = $metadata.set; + +$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) { + return function decorator(target, targetKey) { + ordinaryDefineOwnMetadata( + metadataKey, metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey) + ); + }; +} }); diff --git a/node_modules/core-js/library/modules/es7.set.from.js b/node_modules/core-js/library/modules/es7.set.from.js new file mode 100644 index 00000000..26542b66 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.set.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +require('./_set-collection-from')('Set'); diff --git a/node_modules/core-js/library/modules/es7.set.of.js b/node_modules/core-js/library/modules/es7.set.of.js new file mode 100644 index 00000000..2a50ad91 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.set.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +require('./_set-collection-of')('Set'); diff --git a/node_modules/core-js/library/modules/es7.set.to-json.js b/node_modules/core-js/library/modules/es7.set.to-json.js new file mode 100644 index 00000000..95cbcfa5 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.set.to-json.js @@ -0,0 +1,4 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = require('./_export'); + +$export($export.P + $export.R, 'Set', { toJSON: require('./_collection-to-json')('Set') }); diff --git a/node_modules/core-js/library/modules/es7.string.at.js b/node_modules/core-js/library/modules/es7.string.at.js new file mode 100644 index 00000000..8b3ab98d --- /dev/null +++ b/node_modules/core-js/library/modules/es7.string.at.js @@ -0,0 +1,10 @@ +'use strict'; +// https://github.com/mathiasbynens/String.prototype.at +var $export = require('./_export'); +var $at = require('./_string-at')(true); + +$export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + } +}); diff --git a/node_modules/core-js/library/modules/es7.string.match-all.js b/node_modules/core-js/library/modules/es7.string.match-all.js new file mode 100644 index 00000000..78237036 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.string.match-all.js @@ -0,0 +1,30 @@ +'use strict'; +// https://tc39.github.io/String.prototype.matchAll/ +var $export = require('./_export'); +var defined = require('./_defined'); +var toLength = require('./_to-length'); +var isRegExp = require('./_is-regexp'); +var getFlags = require('./_flags'); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +require('./_iter-create')($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; +}); + +$export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this); + var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); + var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } +}); diff --git a/node_modules/core-js/library/modules/es7.string.pad-end.js b/node_modules/core-js/library/modules/es7.string.pad-end.js new file mode 100644 index 00000000..5a531a1c --- /dev/null +++ b/node_modules/core-js/library/modules/es7.string.pad-end.js @@ -0,0 +1,14 @@ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); diff --git a/node_modules/core-js/library/modules/es7.string.pad-start.js b/node_modules/core-js/library/modules/es7.string.pad-start.js new file mode 100644 index 00000000..729ed933 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.string.pad-start.js @@ -0,0 +1,14 @@ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); diff --git a/node_modules/core-js/library/modules/es7.string.trim-left.js b/node_modules/core-js/library/modules/es7.string.trim-left.js new file mode 100644 index 00000000..39a4b47c --- /dev/null +++ b/node_modules/core-js/library/modules/es7.string.trim-left.js @@ -0,0 +1,7 @@ +'use strict'; +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +require('./_string-trim')('trimLeft', function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; +}, 'trimStart'); diff --git a/node_modules/core-js/library/modules/es7.string.trim-right.js b/node_modules/core-js/library/modules/es7.string.trim-right.js new file mode 100644 index 00000000..7b7c4529 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.string.trim-right.js @@ -0,0 +1,7 @@ +'use strict'; +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +require('./_string-trim')('trimRight', function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; +}, 'trimEnd'); diff --git a/node_modules/core-js/library/modules/es7.symbol.async-iterator.js b/node_modules/core-js/library/modules/es7.symbol.async-iterator.js new file mode 100644 index 00000000..f56dc2a8 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.symbol.async-iterator.js @@ -0,0 +1 @@ +require('./_wks-define')('asyncIterator'); diff --git a/node_modules/core-js/library/modules/es7.symbol.observable.js b/node_modules/core-js/library/modules/es7.symbol.observable.js new file mode 100644 index 00000000..fc9a2376 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.symbol.observable.js @@ -0,0 +1 @@ +require('./_wks-define')('observable'); diff --git a/node_modules/core-js/library/modules/es7.system.global.js b/node_modules/core-js/library/modules/es7.system.global.js new file mode 100644 index 00000000..310a802a --- /dev/null +++ b/node_modules/core-js/library/modules/es7.system.global.js @@ -0,0 +1,4 @@ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.S, 'System', { global: require('./_global') }); diff --git a/node_modules/core-js/library/modules/es7.weak-map.from.js b/node_modules/core-js/library/modules/es7.weak-map.from.js new file mode 100644 index 00000000..1a013657 --- /dev/null +++ b/node_modules/core-js/library/modules/es7.weak-map.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +require('./_set-collection-from')('WeakMap'); diff --git a/node_modules/core-js/library/modules/es7.weak-map.of.js b/node_modules/core-js/library/modules/es7.weak-map.of.js new file mode 100644 index 00000000..52c3f66d --- /dev/null +++ b/node_modules/core-js/library/modules/es7.weak-map.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of +require('./_set-collection-of')('WeakMap'); diff --git a/node_modules/core-js/library/modules/es7.weak-set.from.js b/node_modules/core-js/library/modules/es7.weak-set.from.js new file mode 100644 index 00000000..493e5bee --- /dev/null +++ b/node_modules/core-js/library/modules/es7.weak-set.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from +require('./_set-collection-from')('WeakSet'); diff --git a/node_modules/core-js/library/modules/es7.weak-set.of.js b/node_modules/core-js/library/modules/es7.weak-set.of.js new file mode 100644 index 00000000..5941e72a --- /dev/null +++ b/node_modules/core-js/library/modules/es7.weak-set.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +require('./_set-collection-of')('WeakSet'); diff --git a/node_modules/core-js/library/modules/web.dom.iterable.js b/node_modules/core-js/library/modules/web.dom.iterable.js new file mode 100644 index 00000000..fc00afac --- /dev/null +++ b/node_modules/core-js/library/modules/web.dom.iterable.js @@ -0,0 +1,19 @@ +require('./es6.array.iterator'); +var global = require('./_global'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var TO_STRING_TAG = require('./_wks')('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} diff --git a/node_modules/core-js/library/modules/web.immediate.js b/node_modules/core-js/library/modules/web.immediate.js new file mode 100644 index 00000000..70f3e70d --- /dev/null +++ b/node_modules/core-js/library/modules/web.immediate.js @@ -0,0 +1,6 @@ +var $export = require('./_export'); +var $task = require('./_task'); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); diff --git a/node_modules/core-js/library/modules/web.timers.js b/node_modules/core-js/library/modules/web.timers.js new file mode 100644 index 00000000..c8790830 --- /dev/null +++ b/node_modules/core-js/library/modules/web.timers.js @@ -0,0 +1,20 @@ +// ie9- setTimeout & setInterval additional parameters fix +var global = require('./_global'); +var $export = require('./_export'); +var userAgent = require('./_user-agent'); +var slice = [].slice; +var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check +var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set(boundArgs ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } : fn, time); + }; +}; +$export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) +}); diff --git a/node_modules/core-js/library/shim.js b/node_modules/core-js/library/shim.js new file mode 100644 index 00000000..e2d53f45 --- /dev/null +++ b/node_modules/core-js/library/shim.js @@ -0,0 +1,198 @@ +require('./modules/es6.symbol'); +require('./modules/es6.object.create'); +require('./modules/es6.object.define-property'); +require('./modules/es6.object.define-properties'); +require('./modules/es6.object.get-own-property-descriptor'); +require('./modules/es6.object.get-prototype-of'); +require('./modules/es6.object.keys'); +require('./modules/es6.object.get-own-property-names'); +require('./modules/es6.object.freeze'); +require('./modules/es6.object.seal'); +require('./modules/es6.object.prevent-extensions'); +require('./modules/es6.object.is-frozen'); +require('./modules/es6.object.is-sealed'); +require('./modules/es6.object.is-extensible'); +require('./modules/es6.object.assign'); +require('./modules/es6.object.is'); +require('./modules/es6.object.set-prototype-of'); +require('./modules/es6.object.to-string'); +require('./modules/es6.function.bind'); +require('./modules/es6.function.name'); +require('./modules/es6.function.has-instance'); +require('./modules/es6.parse-int'); +require('./modules/es6.parse-float'); +require('./modules/es6.number.constructor'); +require('./modules/es6.number.to-fixed'); +require('./modules/es6.number.to-precision'); +require('./modules/es6.number.epsilon'); +require('./modules/es6.number.is-finite'); +require('./modules/es6.number.is-integer'); +require('./modules/es6.number.is-nan'); +require('./modules/es6.number.is-safe-integer'); +require('./modules/es6.number.max-safe-integer'); +require('./modules/es6.number.min-safe-integer'); +require('./modules/es6.number.parse-float'); +require('./modules/es6.number.parse-int'); +require('./modules/es6.math.acosh'); +require('./modules/es6.math.asinh'); +require('./modules/es6.math.atanh'); +require('./modules/es6.math.cbrt'); +require('./modules/es6.math.clz32'); +require('./modules/es6.math.cosh'); +require('./modules/es6.math.expm1'); +require('./modules/es6.math.fround'); +require('./modules/es6.math.hypot'); +require('./modules/es6.math.imul'); +require('./modules/es6.math.log10'); +require('./modules/es6.math.log1p'); +require('./modules/es6.math.log2'); +require('./modules/es6.math.sign'); +require('./modules/es6.math.sinh'); +require('./modules/es6.math.tanh'); +require('./modules/es6.math.trunc'); +require('./modules/es6.string.from-code-point'); +require('./modules/es6.string.raw'); +require('./modules/es6.string.trim'); +require('./modules/es6.string.iterator'); +require('./modules/es6.string.code-point-at'); +require('./modules/es6.string.ends-with'); +require('./modules/es6.string.includes'); +require('./modules/es6.string.repeat'); +require('./modules/es6.string.starts-with'); +require('./modules/es6.string.anchor'); +require('./modules/es6.string.big'); +require('./modules/es6.string.blink'); +require('./modules/es6.string.bold'); +require('./modules/es6.string.fixed'); +require('./modules/es6.string.fontcolor'); +require('./modules/es6.string.fontsize'); +require('./modules/es6.string.italics'); +require('./modules/es6.string.link'); +require('./modules/es6.string.small'); +require('./modules/es6.string.strike'); +require('./modules/es6.string.sub'); +require('./modules/es6.string.sup'); +require('./modules/es6.date.now'); +require('./modules/es6.date.to-json'); +require('./modules/es6.date.to-iso-string'); +require('./modules/es6.date.to-string'); +require('./modules/es6.date.to-primitive'); +require('./modules/es6.array.is-array'); +require('./modules/es6.array.from'); +require('./modules/es6.array.of'); +require('./modules/es6.array.join'); +require('./modules/es6.array.slice'); +require('./modules/es6.array.sort'); +require('./modules/es6.array.for-each'); +require('./modules/es6.array.map'); +require('./modules/es6.array.filter'); +require('./modules/es6.array.some'); +require('./modules/es6.array.every'); +require('./modules/es6.array.reduce'); +require('./modules/es6.array.reduce-right'); +require('./modules/es6.array.index-of'); +require('./modules/es6.array.last-index-of'); +require('./modules/es6.array.copy-within'); +require('./modules/es6.array.fill'); +require('./modules/es6.array.find'); +require('./modules/es6.array.find-index'); +require('./modules/es6.array.species'); +require('./modules/es6.array.iterator'); +require('./modules/es6.regexp.constructor'); +require('./modules/es6.regexp.exec'); +require('./modules/es6.regexp.to-string'); +require('./modules/es6.regexp.flags'); +require('./modules/es6.regexp.match'); +require('./modules/es6.regexp.replace'); +require('./modules/es6.regexp.search'); +require('./modules/es6.regexp.split'); +require('./modules/es6.promise'); +require('./modules/es6.map'); +require('./modules/es6.set'); +require('./modules/es6.weak-map'); +require('./modules/es6.weak-set'); +require('./modules/es6.typed.array-buffer'); +require('./modules/es6.typed.data-view'); +require('./modules/es6.typed.int8-array'); +require('./modules/es6.typed.uint8-array'); +require('./modules/es6.typed.uint8-clamped-array'); +require('./modules/es6.typed.int16-array'); +require('./modules/es6.typed.uint16-array'); +require('./modules/es6.typed.int32-array'); +require('./modules/es6.typed.uint32-array'); +require('./modules/es6.typed.float32-array'); +require('./modules/es6.typed.float64-array'); +require('./modules/es6.reflect.apply'); +require('./modules/es6.reflect.construct'); +require('./modules/es6.reflect.define-property'); +require('./modules/es6.reflect.delete-property'); +require('./modules/es6.reflect.enumerate'); +require('./modules/es6.reflect.get'); +require('./modules/es6.reflect.get-own-property-descriptor'); +require('./modules/es6.reflect.get-prototype-of'); +require('./modules/es6.reflect.has'); +require('./modules/es6.reflect.is-extensible'); +require('./modules/es6.reflect.own-keys'); +require('./modules/es6.reflect.prevent-extensions'); +require('./modules/es6.reflect.set'); +require('./modules/es6.reflect.set-prototype-of'); +require('./modules/es7.array.includes'); +require('./modules/es7.array.flat-map'); +require('./modules/es7.array.flatten'); +require('./modules/es7.string.at'); +require('./modules/es7.string.pad-start'); +require('./modules/es7.string.pad-end'); +require('./modules/es7.string.trim-left'); +require('./modules/es7.string.trim-right'); +require('./modules/es7.string.match-all'); +require('./modules/es7.symbol.async-iterator'); +require('./modules/es7.symbol.observable'); +require('./modules/es7.object.get-own-property-descriptors'); +require('./modules/es7.object.values'); +require('./modules/es7.object.entries'); +require('./modules/es7.object.define-getter'); +require('./modules/es7.object.define-setter'); +require('./modules/es7.object.lookup-getter'); +require('./modules/es7.object.lookup-setter'); +require('./modules/es7.map.to-json'); +require('./modules/es7.set.to-json'); +require('./modules/es7.map.of'); +require('./modules/es7.set.of'); +require('./modules/es7.weak-map.of'); +require('./modules/es7.weak-set.of'); +require('./modules/es7.map.from'); +require('./modules/es7.set.from'); +require('./modules/es7.weak-map.from'); +require('./modules/es7.weak-set.from'); +require('./modules/es7.global'); +require('./modules/es7.system.global'); +require('./modules/es7.error.is-error'); +require('./modules/es7.math.clamp'); +require('./modules/es7.math.deg-per-rad'); +require('./modules/es7.math.degrees'); +require('./modules/es7.math.fscale'); +require('./modules/es7.math.iaddh'); +require('./modules/es7.math.isubh'); +require('./modules/es7.math.imulh'); +require('./modules/es7.math.rad-per-deg'); +require('./modules/es7.math.radians'); +require('./modules/es7.math.scale'); +require('./modules/es7.math.umulh'); +require('./modules/es7.math.signbit'); +require('./modules/es7.promise.finally'); +require('./modules/es7.promise.try'); +require('./modules/es7.reflect.define-metadata'); +require('./modules/es7.reflect.delete-metadata'); +require('./modules/es7.reflect.get-metadata'); +require('./modules/es7.reflect.get-metadata-keys'); +require('./modules/es7.reflect.get-own-metadata'); +require('./modules/es7.reflect.get-own-metadata-keys'); +require('./modules/es7.reflect.has-metadata'); +require('./modules/es7.reflect.has-own-metadata'); +require('./modules/es7.reflect.metadata'); +require('./modules/es7.asap'); +require('./modules/es7.observable'); +require('./modules/web.timers'); +require('./modules/web.immediate'); +require('./modules/web.dom.iterable'); +module.exports = require('./modules/_core'); diff --git a/node_modules/core-js/library/stage/0.js b/node_modules/core-js/library/stage/0.js new file mode 100644 index 00000000..4aa50704 --- /dev/null +++ b/node_modules/core-js/library/stage/0.js @@ -0,0 +1,10 @@ +require('../modules/es7.string.at'); +require('../modules/es7.map.to-json'); +require('../modules/es7.set.to-json'); +require('../modules/es7.error.is-error'); +require('../modules/es7.math.iaddh'); +require('../modules/es7.math.isubh'); +require('../modules/es7.math.imulh'); +require('../modules/es7.math.umulh'); +require('../modules/es7.asap'); +module.exports = require('./1'); diff --git a/node_modules/core-js/library/stage/1.js b/node_modules/core-js/library/stage/1.js new file mode 100644 index 00000000..5f634d80 --- /dev/null +++ b/node_modules/core-js/library/stage/1.js @@ -0,0 +1,23 @@ +require('../modules/es7.map.of'); +require('../modules/es7.set.of'); +require('../modules/es7.weak-map.of'); +require('../modules/es7.weak-set.of'); +require('../modules/es7.map.from'); +require('../modules/es7.set.from'); +require('../modules/es7.weak-map.from'); +require('../modules/es7.weak-set.from'); +require('../modules/es7.math.clamp'); +require('../modules/es7.math.deg-per-rad'); +require('../modules/es7.math.degrees'); +require('../modules/es7.math.fscale'); +require('../modules/es7.math.rad-per-deg'); +require('../modules/es7.math.radians'); +require('../modules/es7.math.scale'); +require('../modules/es7.math.signbit'); +require('../modules/es7.promise.try'); +require('../modules/es7.string.match-all'); +require('../modules/es7.symbol.observable'); +require('../modules/es7.observable'); +require('../modules/es7.array.flat-map'); +require('../modules/es7.array.flatten'); +module.exports = require('./2'); diff --git a/node_modules/core-js/library/stage/2.js b/node_modules/core-js/library/stage/2.js new file mode 100644 index 00000000..d7aaa0ef --- /dev/null +++ b/node_modules/core-js/library/stage/2.js @@ -0,0 +1,4 @@ +require('../modules/es7.string.trim-left'); +require('../modules/es7.string.trim-right'); +require('../modules/es7.symbol.async-iterator'); +module.exports = require('./3'); diff --git a/node_modules/core-js/library/stage/3.js b/node_modules/core-js/library/stage/3.js new file mode 100644 index 00000000..9afd07fe --- /dev/null +++ b/node_modules/core-js/library/stage/3.js @@ -0,0 +1,4 @@ +require('../modules/es7.global'); +require('../modules/es7.system.global'); +require('../modules/es7.promise.finally'); +module.exports = require('./4'); diff --git a/node_modules/core-js/library/stage/4.js b/node_modules/core-js/library/stage/4.js new file mode 100644 index 00000000..875762a2 --- /dev/null +++ b/node_modules/core-js/library/stage/4.js @@ -0,0 +1,11 @@ +require('../modules/es7.object.define-getter'); +require('../modules/es7.object.define-setter'); +require('../modules/es7.object.lookup-getter'); +require('../modules/es7.object.lookup-setter'); +require('../modules/es7.object.values'); +require('../modules/es7.object.entries'); +require('../modules/es7.object.get-own-property-descriptors'); +require('../modules/es7.array.includes'); +require('../modules/es7.string.pad-start'); +require('../modules/es7.string.pad-end'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/library/stage/index.js b/node_modules/core-js/library/stage/index.js new file mode 100644 index 00000000..24dcf2e5 --- /dev/null +++ b/node_modules/core-js/library/stage/index.js @@ -0,0 +1 @@ +module.exports = require('./pre'); diff --git a/node_modules/core-js/library/stage/pre.js b/node_modules/core-js/library/stage/pre.js new file mode 100644 index 00000000..ed197a8b --- /dev/null +++ b/node_modules/core-js/library/stage/pre.js @@ -0,0 +1,10 @@ +require('../modules/es7.reflect.define-metadata'); +require('../modules/es7.reflect.delete-metadata'); +require('../modules/es7.reflect.get-metadata'); +require('../modules/es7.reflect.get-metadata-keys'); +require('../modules/es7.reflect.get-own-metadata'); +require('../modules/es7.reflect.get-own-metadata-keys'); +require('../modules/es7.reflect.has-metadata'); +require('../modules/es7.reflect.has-own-metadata'); +require('../modules/es7.reflect.metadata'); +module.exports = require('./0'); diff --git a/node_modules/core-js/library/web/dom-collections.js b/node_modules/core-js/library/web/dom-collections.js new file mode 100644 index 00000000..a138bb9d --- /dev/null +++ b/node_modules/core-js/library/web/dom-collections.js @@ -0,0 +1,2 @@ +require('../modules/web.dom.iterable'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/library/web/immediate.js b/node_modules/core-js/library/web/immediate.js new file mode 100644 index 00000000..6866abde --- /dev/null +++ b/node_modules/core-js/library/web/immediate.js @@ -0,0 +1,2 @@ +require('../modules/web.immediate'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/library/web/index.js b/node_modules/core-js/library/web/index.js new file mode 100644 index 00000000..66db256d --- /dev/null +++ b/node_modules/core-js/library/web/index.js @@ -0,0 +1,4 @@ +require('../modules/web.timers'); +require('../modules/web.immediate'); +require('../modules/web.dom.iterable'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/library/web/timers.js b/node_modules/core-js/library/web/timers.js new file mode 100644 index 00000000..a3f528e4 --- /dev/null +++ b/node_modules/core-js/library/web/timers.js @@ -0,0 +1,2 @@ +require('../modules/web.timers'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/modules/_a-function.js b/node_modules/core-js/modules/_a-function.js new file mode 100644 index 00000000..a9a5d84f --- /dev/null +++ b/node_modules/core-js/modules/_a-function.js @@ -0,0 +1,4 @@ +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; diff --git a/node_modules/core-js/modules/_a-number-value.js b/node_modules/core-js/modules/_a-number-value.js new file mode 100644 index 00000000..2723de4d --- /dev/null +++ b/node_modules/core-js/modules/_a-number-value.js @@ -0,0 +1,5 @@ +var cof = require('./_cof'); +module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; +}; diff --git a/node_modules/core-js/modules/_add-to-unscopables.js b/node_modules/core-js/modules/_add-to-unscopables.js new file mode 100644 index 00000000..a2dd97d9 --- /dev/null +++ b/node_modules/core-js/modules/_add-to-unscopables.js @@ -0,0 +1,7 @@ +// 22.1.3.31 Array.prototype[@@unscopables] +var UNSCOPABLES = require('./_wks')('unscopables'); +var ArrayProto = Array.prototype; +if (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {}); +module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; diff --git a/node_modules/core-js/modules/_advance-string-index.js b/node_modules/core-js/modules/_advance-string-index.js new file mode 100644 index 00000000..a4688c18 --- /dev/null +++ b/node_modules/core-js/modules/_advance-string-index.js @@ -0,0 +1,8 @@ +'use strict'; +var at = require('./_string-at')(true); + + // `AdvanceStringIndex` abstract operation +// https://tc39.github.io/ecma262/#sec-advancestringindex +module.exports = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); +}; diff --git a/node_modules/core-js/modules/_an-instance.js b/node_modules/core-js/modules/_an-instance.js new file mode 100644 index 00000000..c0a5f920 --- /dev/null +++ b/node_modules/core-js/modules/_an-instance.js @@ -0,0 +1,5 @@ +module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; diff --git a/node_modules/core-js/modules/_an-object.js b/node_modules/core-js/modules/_an-object.js new file mode 100644 index 00000000..b1c316cd --- /dev/null +++ b/node_modules/core-js/modules/_an-object.js @@ -0,0 +1,5 @@ +var isObject = require('./_is-object'); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; diff --git a/node_modules/core-js/modules/_array-copy-within.js b/node_modules/core-js/modules/_array-copy-within.js new file mode 100644 index 00000000..d331576c --- /dev/null +++ b/node_modules/core-js/modules/_array-copy-within.js @@ -0,0 +1,26 @@ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +'use strict'; +var toObject = require('./_to-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); + +module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; +}; diff --git a/node_modules/core-js/modules/_array-fill.js b/node_modules/core-js/modules/_array-fill.js new file mode 100644 index 00000000..0753c36a --- /dev/null +++ b/node_modules/core-js/modules/_array-fill.js @@ -0,0 +1,15 @@ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +'use strict'; +var toObject = require('./_to-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; diff --git a/node_modules/core-js/modules/_array-from-iterable.js b/node_modules/core-js/modules/_array-from-iterable.js new file mode 100644 index 00000000..08be255f --- /dev/null +++ b/node_modules/core-js/modules/_array-from-iterable.js @@ -0,0 +1,7 @@ +var forOf = require('./_for-of'); + +module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; diff --git a/node_modules/core-js/modules/_array-includes.js b/node_modules/core-js/modules/_array-includes.js new file mode 100644 index 00000000..0ef3efeb --- /dev/null +++ b/node_modules/core-js/modules/_array-includes.js @@ -0,0 +1,23 @@ +// false -> Array#indexOf +// true -> Array#includes +var toIObject = require('./_to-iobject'); +var toLength = require('./_to-length'); +var toAbsoluteIndex = require('./_to-absolute-index'); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; diff --git a/node_modules/core-js/modules/_array-methods.js b/node_modules/core-js/modules/_array-methods.js new file mode 100644 index 00000000..ae7f447d --- /dev/null +++ b/node_modules/core-js/modules/_array-methods.js @@ -0,0 +1,44 @@ +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = require('./_ctx'); +var IObject = require('./_iobject'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var asc = require('./_array-species-create'); +module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (;length > index; index++) if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) result[index] = res; // map + else if (res) switch (TYPE) { + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; +}; diff --git a/node_modules/core-js/modules/_array-reduce.js b/node_modules/core-js/modules/_array-reduce.js new file mode 100644 index 00000000..8596ac70 --- /dev/null +++ b/node_modules/core-js/modules/_array-reduce.js @@ -0,0 +1,28 @@ +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var toLength = require('./_to-length'); + +module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var i = isRight ? -1 : 1; + if (aLen < 2) for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; +}; diff --git a/node_modules/core-js/modules/_array-species-constructor.js b/node_modules/core-js/modules/_array-species-constructor.js new file mode 100644 index 00000000..0771c236 --- /dev/null +++ b/node_modules/core-js/modules/_array-species-constructor.js @@ -0,0 +1,16 @@ +var isObject = require('./_is-object'); +var isArray = require('./_is-array'); +var SPECIES = require('./_wks')('species'); + +module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } return C === undefined ? Array : C; +}; diff --git a/node_modules/core-js/modules/_array-species-create.js b/node_modules/core-js/modules/_array-species-create.js new file mode 100644 index 00000000..36ed58bd --- /dev/null +++ b/node_modules/core-js/modules/_array-species-create.js @@ -0,0 +1,6 @@ +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = require('./_array-species-constructor'); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; diff --git a/node_modules/core-js/modules/_bind.js b/node_modules/core-js/modules/_bind.js new file mode 100644 index 00000000..3cf1e5ae --- /dev/null +++ b/node_modules/core-js/modules/_bind.js @@ -0,0 +1,25 @@ +'use strict'; +var aFunction = require('./_a-function'); +var isObject = require('./_is-object'); +var invoke = require('./_invoke'); +var arraySlice = [].slice; +var factories = {}; + +var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); +}; + +module.exports = Function.bind || function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; +}; diff --git a/node_modules/core-js/modules/_classof.js b/node_modules/core-js/modules/_classof.js new file mode 100644 index 00000000..d106d5be --- /dev/null +++ b/node_modules/core-js/modules/_classof.js @@ -0,0 +1,23 @@ +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = require('./_cof'); +var TAG = require('./_wks')('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; diff --git a/node_modules/core-js/modules/_cof.js b/node_modules/core-js/modules/_cof.js new file mode 100644 index 00000000..332c0bc0 --- /dev/null +++ b/node_modules/core-js/modules/_cof.js @@ -0,0 +1,5 @@ +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; diff --git a/node_modules/core-js/modules/_collection-strong.js b/node_modules/core-js/modules/_collection-strong.js new file mode 100644 index 00000000..68ce63f0 --- /dev/null +++ b/node_modules/core-js/modules/_collection-strong.js @@ -0,0 +1,144 @@ +'use strict'; +var dP = require('./_object-dp').f; +var create = require('./_object-create'); +var redefineAll = require('./_redefine-all'); +var ctx = require('./_ctx'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var $iterDefine = require('./_iter-define'); +var step = require('./_iter-step'); +var setSpecies = require('./_set-species'); +var DESCRIPTORS = require('./_descriptors'); +var fastKey = require('./_meta').fastKey; +var validate = require('./_validate-collection'); +var SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + } + }); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; diff --git a/node_modules/core-js/modules/_collection-to-json.js b/node_modules/core-js/modules/_collection-to-json.js new file mode 100644 index 00000000..a6ee0029 --- /dev/null +++ b/node_modules/core-js/modules/_collection-to-json.js @@ -0,0 +1,9 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = require('./_classof'); +var from = require('./_array-from-iterable'); +module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; diff --git a/node_modules/core-js/modules/_collection-weak.js b/node_modules/core-js/modules/_collection-weak.js new file mode 100644 index 00000000..04d3af5a --- /dev/null +++ b/node_modules/core-js/modules/_collection-weak.js @@ -0,0 +1,85 @@ +'use strict'; +var redefineAll = require('./_redefine-all'); +var getWeak = require('./_meta').getWeak; +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var createArrayMethod = require('./_array-methods'); +var $has = require('./_has'); +var validate = require('./_validate-collection'); +var arrayFind = createArrayMethod(5); +var arrayFindIndex = createArrayMethod(6); +var id = 0; + +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); +}; +var UncaughtFrozenStore = function () { + this.a = []; +}; +var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); +}; +UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore +}; diff --git a/node_modules/core-js/modules/_collection.js b/node_modules/core-js/modules/_collection.js new file mode 100644 index 00000000..767dde50 --- /dev/null +++ b/node_modules/core-js/modules/_collection.js @@ -0,0 +1,85 @@ +'use strict'; +var global = require('./_global'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var redefineAll = require('./_redefine-all'); +var meta = require('./_meta'); +var forOf = require('./_for-of'); +var anInstance = require('./_an-instance'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var $iterDetect = require('./_iter-detect'); +var setToStringTag = require('./_set-to-string-tag'); +var inheritIfRequired = require('./_inherit-if-required'); + +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + var fixMethod = function (KEY) { + var fn = proto[KEY]; + redefine(proto, KEY, + KEY == 'delete' ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'has' ? function has(a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'get' ? function get(a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } + : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } + ); + }; + if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base(), target, C); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; +}; diff --git a/node_modules/core-js/modules/_core.js b/node_modules/core-js/modules/_core.js new file mode 100644 index 00000000..6ab2de52 --- /dev/null +++ b/node_modules/core-js/modules/_core.js @@ -0,0 +1,2 @@ +var core = module.exports = { version: '2.6.9' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef diff --git a/node_modules/core-js/modules/_create-property.js b/node_modules/core-js/modules/_create-property.js new file mode 100644 index 00000000..fd0ea8c9 --- /dev/null +++ b/node_modules/core-js/modules/_create-property.js @@ -0,0 +1,8 @@ +'use strict'; +var $defineProperty = require('./_object-dp'); +var createDesc = require('./_property-desc'); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; diff --git a/node_modules/core-js/modules/_ctx.js b/node_modules/core-js/modules/_ctx.js new file mode 100644 index 00000000..0a100ff3 --- /dev/null +++ b/node_modules/core-js/modules/_ctx.js @@ -0,0 +1,20 @@ +// optional / simple context binding +var aFunction = require('./_a-function'); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; diff --git a/node_modules/core-js/modules/_date-to-iso-string.js b/node_modules/core-js/modules/_date-to-iso-string.js new file mode 100644 index 00000000..95a02e22 --- /dev/null +++ b/node_modules/core-js/modules/_date-to-iso-string.js @@ -0,0 +1,26 @@ +'use strict'; +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = require('./_fails'); +var getTime = Date.prototype.getTime; +var $toISOString = Date.prototype.toISOString; + +var lz = function (num) { + return num > 9 ? num : '0' + num; +}; + +// PhantomJS / old WebKit has a broken implementations +module.exports = (fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; +}) || !fails(function () { + $toISOString.call(new Date(NaN)); +})) ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; +} : $toISOString; diff --git a/node_modules/core-js/modules/_date-to-primitive.js b/node_modules/core-js/modules/_date-to-primitive.js new file mode 100644 index 00000000..57c32030 --- /dev/null +++ b/node_modules/core-js/modules/_date-to-primitive.js @@ -0,0 +1,9 @@ +'use strict'; +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); +var NUMBER = 'number'; + +module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; diff --git a/node_modules/core-js/modules/_defined.js b/node_modules/core-js/modules/_defined.js new file mode 100644 index 00000000..66c7ed32 --- /dev/null +++ b/node_modules/core-js/modules/_defined.js @@ -0,0 +1,5 @@ +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; diff --git a/node_modules/core-js/modules/_descriptors.js b/node_modules/core-js/modules/_descriptors.js new file mode 100644 index 00000000..04697406 --- /dev/null +++ b/node_modules/core-js/modules/_descriptors.js @@ -0,0 +1,4 @@ +// Thank's IE8 for his funny defineProperty +module.exports = !require('./_fails')(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); diff --git a/node_modules/core-js/modules/_dom-create.js b/node_modules/core-js/modules/_dom-create.js new file mode 100644 index 00000000..39ca2569 --- /dev/null +++ b/node_modules/core-js/modules/_dom-create.js @@ -0,0 +1,7 @@ +var isObject = require('./_is-object'); +var document = require('./_global').document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; diff --git a/node_modules/core-js/modules/_entry-virtual.js b/node_modules/core-js/modules/_entry-virtual.js new file mode 100644 index 00000000..7a734390 --- /dev/null +++ b/node_modules/core-js/modules/_entry-virtual.js @@ -0,0 +1,5 @@ +var core = require('./_core'); +module.exports = function (CONSTRUCTOR) { + var C = core[CONSTRUCTOR]; + return (C.virtual || C.prototype); +}; diff --git a/node_modules/core-js/modules/_enum-bug-keys.js b/node_modules/core-js/modules/_enum-bug-keys.js new file mode 100644 index 00000000..d9ad8551 --- /dev/null +++ b/node_modules/core-js/modules/_enum-bug-keys.js @@ -0,0 +1,4 @@ +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); diff --git a/node_modules/core-js/modules/_enum-keys.js b/node_modules/core-js/modules/_enum-keys.js new file mode 100644 index 00000000..3e7053d1 --- /dev/null +++ b/node_modules/core-js/modules/_enum-keys.js @@ -0,0 +1,15 @@ +// all enumerable object keys, includes symbols +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; diff --git a/node_modules/core-js/modules/_export.js b/node_modules/core-js/modules/_export.js new file mode 100644 index 00000000..3c907c6e --- /dev/null +++ b/node_modules/core-js/modules/_export.js @@ -0,0 +1,43 @@ +var global = require('./_global'); +var core = require('./_core'); +var hide = require('./_hide'); +var redefine = require('./_redefine'); +var ctx = require('./_ctx'); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // extend global + if (target) redefine(target, key, out, type & $export.U); + // export + if (exports[key] != out) hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } +}; +global.core = core; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; diff --git a/node_modules/core-js/modules/_fails-is-regexp.js b/node_modules/core-js/modules/_fails-is-regexp.js new file mode 100644 index 00000000..8eec2e47 --- /dev/null +++ b/node_modules/core-js/modules/_fails-is-regexp.js @@ -0,0 +1,12 @@ +var MATCH = require('./_wks')('match'); +module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { /* empty */ } + } return true; +}; diff --git a/node_modules/core-js/modules/_fails.js b/node_modules/core-js/modules/_fails.js new file mode 100644 index 00000000..3b4cdf67 --- /dev/null +++ b/node_modules/core-js/modules/_fails.js @@ -0,0 +1,7 @@ +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; diff --git a/node_modules/core-js/modules/_fix-re-wks.js b/node_modules/core-js/modules/_fix-re-wks.js new file mode 100644 index 00000000..64d00fe6 --- /dev/null +++ b/node_modules/core-js/modules/_fix-re-wks.js @@ -0,0 +1,96 @@ +'use strict'; +require('./es6.regexp.exec'); +var redefine = require('./_redefine'); +var hide = require('./_hide'); +var fails = require('./_fails'); +var defined = require('./_defined'); +var wks = require('./_wks'); +var regexpExec = require('./_regexp-exec'); + +var SPECIES = wks('species'); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; +}); + +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; +})(); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { execCalled = true; return null; }; + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + } + re[SYMBOL](''); + return !execCalled; + }) : undefined; + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + } + ); + var strfn = fns[0]; + var rxfn = fns[1]; + + redefine(String.prototype, KEY, strfn); + hide(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return rxfn.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return rxfn.call(string, this); } + ); + } +}; diff --git a/node_modules/core-js/modules/_flags.js b/node_modules/core-js/modules/_flags.js new file mode 100644 index 00000000..b6fc324b --- /dev/null +++ b/node_modules/core-js/modules/_flags.js @@ -0,0 +1,13 @@ +'use strict'; +// 21.2.5.3 get RegExp.prototype.flags +var anObject = require('./_an-object'); +module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; +}; diff --git a/node_modules/core-js/modules/_flatten-into-array.js b/node_modules/core-js/modules/_flatten-into-array.js new file mode 100644 index 00000000..1838517a --- /dev/null +++ b/node_modules/core-js/modules/_flatten-into-array.js @@ -0,0 +1,39 @@ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = require('./_is-array'); +var isObject = require('./_is-object'); +var toLength = require('./_to-length'); +var ctx = require('./_ctx'); +var IS_CONCAT_SPREADABLE = require('./_wks')('isConcatSpreadable'); + +function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; +} + +module.exports = flattenIntoArray; diff --git a/node_modules/core-js/modules/_for-of.js b/node_modules/core-js/modules/_for-of.js new file mode 100644 index 00000000..9ed22818 --- /dev/null +++ b/node_modules/core-js/modules/_for-of.js @@ -0,0 +1,25 @@ +var ctx = require('./_ctx'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var anObject = require('./_an-object'); +var toLength = require('./_to-length'); +var getIterFn = require('./core.get-iterator-method'); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; diff --git a/node_modules/core-js/modules/_function-to-string.js b/node_modules/core-js/modules/_function-to-string.js new file mode 100644 index 00000000..d7f5419c --- /dev/null +++ b/node_modules/core-js/modules/_function-to-string.js @@ -0,0 +1 @@ +module.exports = require('./_shared')('native-function-to-string', Function.toString); diff --git a/node_modules/core-js/modules/_global.js b/node_modules/core-js/modules/_global.js new file mode 100644 index 00000000..bf85b44a --- /dev/null +++ b/node_modules/core-js/modules/_global.js @@ -0,0 +1,6 @@ +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef diff --git a/node_modules/core-js/modules/_has.js b/node_modules/core-js/modules/_has.js new file mode 100644 index 00000000..2a37d8b7 --- /dev/null +++ b/node_modules/core-js/modules/_has.js @@ -0,0 +1,4 @@ +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; diff --git a/node_modules/core-js/modules/_hide.js b/node_modules/core-js/modules/_hide.js new file mode 100644 index 00000000..cec258a0 --- /dev/null +++ b/node_modules/core-js/modules/_hide.js @@ -0,0 +1,8 @@ +var dP = require('./_object-dp'); +var createDesc = require('./_property-desc'); +module.exports = require('./_descriptors') ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; diff --git a/node_modules/core-js/modules/_html.js b/node_modules/core-js/modules/_html.js new file mode 100644 index 00000000..7daff14c --- /dev/null +++ b/node_modules/core-js/modules/_html.js @@ -0,0 +1,2 @@ +var document = require('./_global').document; +module.exports = document && document.documentElement; diff --git a/node_modules/core-js/modules/_ie8-dom-define.js b/node_modules/core-js/modules/_ie8-dom-define.js new file mode 100644 index 00000000..a3805cb7 --- /dev/null +++ b/node_modules/core-js/modules/_ie8-dom-define.js @@ -0,0 +1,3 @@ +module.exports = !require('./_descriptors') && !require('./_fails')(function () { + return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7; +}); diff --git a/node_modules/core-js/modules/_inherit-if-required.js b/node_modules/core-js/modules/_inherit-if-required.js new file mode 100644 index 00000000..b95fcd98 --- /dev/null +++ b/node_modules/core-js/modules/_inherit-if-required.js @@ -0,0 +1,9 @@ +var isObject = require('./_is-object'); +var setPrototypeOf = require('./_set-proto').set; +module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P); + } return that; +}; diff --git a/node_modules/core-js/modules/_invoke.js b/node_modules/core-js/modules/_invoke.js new file mode 100644 index 00000000..6cccebdc --- /dev/null +++ b/node_modules/core-js/modules/_invoke.js @@ -0,0 +1,16 @@ +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; diff --git a/node_modules/core-js/modules/_iobject.js b/node_modules/core-js/modules/_iobject.js new file mode 100644 index 00000000..2b57c8a0 --- /dev/null +++ b/node_modules/core-js/modules/_iobject.js @@ -0,0 +1,6 @@ +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = require('./_cof'); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; diff --git a/node_modules/core-js/modules/_is-array-iter.js b/node_modules/core-js/modules/_is-array-iter.js new file mode 100644 index 00000000..6f67d905 --- /dev/null +++ b/node_modules/core-js/modules/_is-array-iter.js @@ -0,0 +1,8 @@ +// check on default Array iterator +var Iterators = require('./_iterators'); +var ITERATOR = require('./_wks')('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; diff --git a/node_modules/core-js/modules/_is-array.js b/node_modules/core-js/modules/_is-array.js new file mode 100644 index 00000000..0581dc2e --- /dev/null +++ b/node_modules/core-js/modules/_is-array.js @@ -0,0 +1,5 @@ +// 7.2.2 IsArray(argument) +var cof = require('./_cof'); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; diff --git a/node_modules/core-js/modules/_is-integer.js b/node_modules/core-js/modules/_is-integer.js new file mode 100644 index 00000000..0074ae97 --- /dev/null +++ b/node_modules/core-js/modules/_is-integer.js @@ -0,0 +1,6 @@ +// 20.1.2.3 Number.isInteger(number) +var isObject = require('./_is-object'); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; diff --git a/node_modules/core-js/modules/_is-object.js b/node_modules/core-js/modules/_is-object.js new file mode 100644 index 00000000..dda6e04d --- /dev/null +++ b/node_modules/core-js/modules/_is-object.js @@ -0,0 +1,3 @@ +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; diff --git a/node_modules/core-js/modules/_is-regexp.js b/node_modules/core-js/modules/_is-regexp.js new file mode 100644 index 00000000..598d159d --- /dev/null +++ b/node_modules/core-js/modules/_is-regexp.js @@ -0,0 +1,8 @@ +// 7.2.8 IsRegExp(argument) +var isObject = require('./_is-object'); +var cof = require('./_cof'); +var MATCH = require('./_wks')('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; diff --git a/node_modules/core-js/modules/_iter-call.js b/node_modules/core-js/modules/_iter-call.js new file mode 100644 index 00000000..a7026e34 --- /dev/null +++ b/node_modules/core-js/modules/_iter-call.js @@ -0,0 +1,12 @@ +// call something on iterator step with safe closing on error +var anObject = require('./_an-object'); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; diff --git a/node_modules/core-js/modules/_iter-create.js b/node_modules/core-js/modules/_iter-create.js new file mode 100644 index 00000000..04708c83 --- /dev/null +++ b/node_modules/core-js/modules/_iter-create.js @@ -0,0 +1,13 @@ +'use strict'; +var create = require('./_object-create'); +var descriptor = require('./_property-desc'); +var setToStringTag = require('./_set-to-string-tag'); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; diff --git a/node_modules/core-js/modules/_iter-define.js b/node_modules/core-js/modules/_iter-define.js new file mode 100644 index 00000000..578dfb73 --- /dev/null +++ b/node_modules/core-js/modules/_iter-define.js @@ -0,0 +1,69 @@ +'use strict'; +var LIBRARY = require('./_library'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var $iterCreate = require('./_iter-create'); +var setToStringTag = require('./_set-to-string-tag'); +var getPrototypeOf = require('./_object-gpo'); +var ITERATOR = require('./_wks')('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; diff --git a/node_modules/core-js/modules/_iter-detect.js b/node_modules/core-js/modules/_iter-detect.js new file mode 100644 index 00000000..5cb34973 --- /dev/null +++ b/node_modules/core-js/modules/_iter-detect.js @@ -0,0 +1,22 @@ +var ITERATOR = require('./_wks')('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } + +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; diff --git a/node_modules/core-js/modules/_iter-step.js b/node_modules/core-js/modules/_iter-step.js new file mode 100644 index 00000000..b0691c88 --- /dev/null +++ b/node_modules/core-js/modules/_iter-step.js @@ -0,0 +1,3 @@ +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; diff --git a/node_modules/core-js/modules/_iterators.js b/node_modules/core-js/modules/_iterators.js new file mode 100644 index 00000000..f053ebf7 --- /dev/null +++ b/node_modules/core-js/modules/_iterators.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/node_modules/core-js/modules/_keyof.js b/node_modules/core-js/modules/_keyof.js new file mode 100644 index 00000000..0786096f --- /dev/null +++ b/node_modules/core-js/modules/_keyof.js @@ -0,0 +1,10 @@ +var getKeys = require('./_object-keys'); +var toIObject = require('./_to-iobject'); +module.exports = function (object, el) { + var O = toIObject(object); + var keys = getKeys(O); + var length = keys.length; + var index = 0; + var key; + while (length > index) if (O[key = keys[index++]] === el) return key; +}; diff --git a/node_modules/core-js/modules/_library.js b/node_modules/core-js/modules/_library.js new file mode 100644 index 00000000..a5d30209 --- /dev/null +++ b/node_modules/core-js/modules/_library.js @@ -0,0 +1 @@ +module.exports = false; diff --git a/node_modules/core-js/modules/_math-expm1.js b/node_modules/core-js/modules/_math-expm1.js new file mode 100644 index 00000000..75c68501 --- /dev/null +++ b/node_modules/core-js/modules/_math-expm1.js @@ -0,0 +1,10 @@ +// 20.2.2.14 Math.expm1(x) +var $expm1 = Math.expm1; +module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 +) ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; +} : $expm1; diff --git a/node_modules/core-js/modules/_math-fround.js b/node_modules/core-js/modules/_math-fround.js new file mode 100644 index 00000000..c85eb4b7 --- /dev/null +++ b/node_modules/core-js/modules/_math-fround.js @@ -0,0 +1,23 @@ +// 20.2.2.16 Math.fround(x) +var sign = require('./_math-sign'); +var pow = Math.pow; +var EPSILON = pow(2, -52); +var EPSILON32 = pow(2, -23); +var MAX32 = pow(2, 127) * (2 - EPSILON32); +var MIN32 = pow(2, -126); + +var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; +}; + +module.exports = Math.fround || function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; +}; diff --git a/node_modules/core-js/modules/_math-log1p.js b/node_modules/core-js/modules/_math-log1p.js new file mode 100644 index 00000000..16d5f493 --- /dev/null +++ b/node_modules/core-js/modules/_math-log1p.js @@ -0,0 +1,4 @@ +// 20.2.2.20 Math.log1p(x) +module.exports = Math.log1p || function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); +}; diff --git a/node_modules/core-js/modules/_math-scale.js b/node_modules/core-js/modules/_math-scale.js new file mode 100644 index 00000000..ba3cdb20 --- /dev/null +++ b/node_modules/core-js/modules/_math-scale.js @@ -0,0 +1,18 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { + if ( + arguments.length === 0 + // eslint-disable-next-line no-self-compare + || x != x + // eslint-disable-next-line no-self-compare + || inLow != inLow + // eslint-disable-next-line no-self-compare + || inHigh != inHigh + // eslint-disable-next-line no-self-compare + || outLow != outLow + // eslint-disable-next-line no-self-compare + || outHigh != outHigh + ) return NaN; + if (x === Infinity || x === -Infinity) return x; + return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; +}; diff --git a/node_modules/core-js/modules/_math-sign.js b/node_modules/core-js/modules/_math-sign.js new file mode 100644 index 00000000..7a46b9d0 --- /dev/null +++ b/node_modules/core-js/modules/_math-sign.js @@ -0,0 +1,5 @@ +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; diff --git a/node_modules/core-js/modules/_meta.js b/node_modules/core-js/modules/_meta.js new file mode 100644 index 00000000..2d4b3257 --- /dev/null +++ b/node_modules/core-js/modules/_meta.js @@ -0,0 +1,53 @@ +var META = require('./_uid')('meta'); +var isObject = require('./_is-object'); +var has = require('./_has'); +var setDesc = require('./_object-dp').f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !require('./_fails')(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; diff --git a/node_modules/core-js/modules/_metadata.js b/node_modules/core-js/modules/_metadata.js new file mode 100644 index 00000000..759cfc44 --- /dev/null +++ b/node_modules/core-js/modules/_metadata.js @@ -0,0 +1,51 @@ +var Map = require('./es6.map'); +var $export = require('./_export'); +var shared = require('./_shared')('metadata'); +var store = shared.store || (shared.store = new (require('./es6.weak-map'))()); + +var getOrCreateMetadataMap = function (target, targetKey, create) { + var targetMetadata = store.get(target); + if (!targetMetadata) { + if (!create) return undefined; + store.set(target, targetMetadata = new Map()); + } + var keyMetadata = targetMetadata.get(targetKey); + if (!keyMetadata) { + if (!create) return undefined; + targetMetadata.set(targetKey, keyMetadata = new Map()); + } return keyMetadata; +}; +var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); +}; +var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); +}; +var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); +}; +var ordinaryOwnMetadataKeys = function (target, targetKey) { + var metadataMap = getOrCreateMetadataMap(target, targetKey, false); + var keys = []; + if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); }); + return keys; +}; +var toMetaKey = function (it) { + return it === undefined || typeof it == 'symbol' ? it : String(it); +}; +var exp = function (O) { + $export($export.S, 'Reflect', O); +}; + +module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp +}; diff --git a/node_modules/core-js/modules/_microtask.js b/node_modules/core-js/modules/_microtask.js new file mode 100644 index 00000000..b321c648 --- /dev/null +++ b/node_modules/core-js/modules/_microtask.js @@ -0,0 +1,69 @@ +var global = require('./_global'); +var macrotask = require('./_task').set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = require('./_cof')(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; diff --git a/node_modules/core-js/modules/_native-weak-map.js b/node_modules/core-js/modules/_native-weak-map.js new file mode 100644 index 00000000..ebaf445f --- /dev/null +++ b/node_modules/core-js/modules/_native-weak-map.js @@ -0,0 +1,4 @@ +var nativeFunctionToString = require('./_function-to-string'); +var WeakMap = require('./_global').WeakMap; + +module.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap)); diff --git a/node_modules/core-js/modules/_new-promise-capability.js b/node_modules/core-js/modules/_new-promise-capability.js new file mode 100644 index 00000000..82b74a33 --- /dev/null +++ b/node_modules/core-js/modules/_new-promise-capability.js @@ -0,0 +1,18 @@ +'use strict'; +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = require('./_a-function'); + +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; diff --git a/node_modules/core-js/modules/_object-assign.js b/node_modules/core-js/modules/_object-assign.js new file mode 100644 index 00000000..d739c430 --- /dev/null +++ b/node_modules/core-js/modules/_object-assign.js @@ -0,0 +1,38 @@ +'use strict'; +// 19.1.2.1 Object.assign(target, source, ...) +var DESCRIPTORS = require('./_descriptors'); +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || require('./_fails')(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } return T; +} : $assign; diff --git a/node_modules/core-js/modules/_object-create.js b/node_modules/core-js/modules/_object-create.js new file mode 100644 index 00000000..a76808ea --- /dev/null +++ b/node_modules/core-js/modules/_object-create.js @@ -0,0 +1,41 @@ +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = require('./_an-object'); +var dPs = require('./_object-dps'); +var enumBugKeys = require('./_enum-bug-keys'); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = require('./_dom-create')('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + require('./_html').appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; diff --git a/node_modules/core-js/modules/_object-define.js b/node_modules/core-js/modules/_object-define.js new file mode 100644 index 00000000..4d131f33 --- /dev/null +++ b/node_modules/core-js/modules/_object-define.js @@ -0,0 +1,13 @@ +var dP = require('./_object-dp'); +var gOPD = require('./_object-gopd'); +var ownKeys = require('./_own-keys'); +var toIObject = require('./_to-iobject'); + +module.exports = function define(target, mixin) { + var keys = ownKeys(toIObject(mixin)); + var length = keys.length; + var i = 0; + var key; + while (length > i) dP.f(target, key = keys[i++], gOPD.f(mixin, key)); + return target; +}; diff --git a/node_modules/core-js/modules/_object-dp.js b/node_modules/core-js/modules/_object-dp.js new file mode 100644 index 00000000..0340a830 --- /dev/null +++ b/node_modules/core-js/modules/_object-dp.js @@ -0,0 +1,16 @@ +var anObject = require('./_an-object'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var toPrimitive = require('./_to-primitive'); +var dP = Object.defineProperty; + +exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; diff --git a/node_modules/core-js/modules/_object-dps.js b/node_modules/core-js/modules/_object-dps.js new file mode 100644 index 00000000..173c338f --- /dev/null +++ b/node_modules/core-js/modules/_object-dps.js @@ -0,0 +1,13 @@ +var dP = require('./_object-dp'); +var anObject = require('./_an-object'); +var getKeys = require('./_object-keys'); + +module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; diff --git a/node_modules/core-js/modules/_object-forced-pam.js b/node_modules/core-js/modules/_object-forced-pam.js new file mode 100644 index 00000000..71ede922 --- /dev/null +++ b/node_modules/core-js/modules/_object-forced-pam.js @@ -0,0 +1,9 @@ +'use strict'; +// Forced replacement prototype accessors methods +module.exports = require('./_library') || !require('./_fails')(function () { + var K = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, K, function () { /* empty */ }); + delete require('./_global')[K]; +}); diff --git a/node_modules/core-js/modules/_object-gopd.js b/node_modules/core-js/modules/_object-gopd.js new file mode 100644 index 00000000..555dd31a --- /dev/null +++ b/node_modules/core-js/modules/_object-gopd.js @@ -0,0 +1,16 @@ +var pIE = require('./_object-pie'); +var createDesc = require('./_property-desc'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var has = require('./_has'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return gOPD(O, P); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +}; diff --git a/node_modules/core-js/modules/_object-gopn-ext.js b/node_modules/core-js/modules/_object-gopn-ext.js new file mode 100644 index 00000000..4abb6ae8 --- /dev/null +++ b/node_modules/core-js/modules/_object-gopn-ext.js @@ -0,0 +1,19 @@ +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = require('./_to-iobject'); +var gOPN = require('./_object-gopn').f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; diff --git a/node_modules/core-js/modules/_object-gopn.js b/node_modules/core-js/modules/_object-gopn.js new file mode 100644 index 00000000..da82333f --- /dev/null +++ b/node_modules/core-js/modules/_object-gopn.js @@ -0,0 +1,7 @@ +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = require('./_object-keys-internal'); +var hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; diff --git a/node_modules/core-js/modules/_object-gops.js b/node_modules/core-js/modules/_object-gops.js new file mode 100644 index 00000000..bc067290 --- /dev/null +++ b/node_modules/core-js/modules/_object-gops.js @@ -0,0 +1 @@ +exports.f = Object.getOwnPropertySymbols; diff --git a/node_modules/core-js/modules/_object-gpo.js b/node_modules/core-js/modules/_object-gpo.js new file mode 100644 index 00000000..27f2a94e --- /dev/null +++ b/node_modules/core-js/modules/_object-gpo.js @@ -0,0 +1,13 @@ +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = require('./_has'); +var toObject = require('./_to-object'); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; diff --git a/node_modules/core-js/modules/_object-keys-internal.js b/node_modules/core-js/modules/_object-keys-internal.js new file mode 100644 index 00000000..71abdd1a --- /dev/null +++ b/node_modules/core-js/modules/_object-keys-internal.js @@ -0,0 +1,17 @@ +var has = require('./_has'); +var toIObject = require('./_to-iobject'); +var arrayIndexOf = require('./_array-includes')(false); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; diff --git a/node_modules/core-js/modules/_object-keys.js b/node_modules/core-js/modules/_object-keys.js new file mode 100644 index 00000000..62f73f91 --- /dev/null +++ b/node_modules/core-js/modules/_object-keys.js @@ -0,0 +1,7 @@ +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = require('./_object-keys-internal'); +var enumBugKeys = require('./_enum-bug-keys'); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; diff --git a/node_modules/core-js/modules/_object-pie.js b/node_modules/core-js/modules/_object-pie.js new file mode 100644 index 00000000..4cc71072 --- /dev/null +++ b/node_modules/core-js/modules/_object-pie.js @@ -0,0 +1 @@ +exports.f = {}.propertyIsEnumerable; diff --git a/node_modules/core-js/modules/_object-sap.js b/node_modules/core-js/modules/_object-sap.js new file mode 100644 index 00000000..643535e0 --- /dev/null +++ b/node_modules/core-js/modules/_object-sap.js @@ -0,0 +1,10 @@ +// most Object methods by ES6 should accept primitives +var $export = require('./_export'); +var core = require('./_core'); +var fails = require('./_fails'); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; diff --git a/node_modules/core-js/modules/_object-to-array.js b/node_modules/core-js/modules/_object-to-array.js new file mode 100644 index 00000000..288b5fcc --- /dev/null +++ b/node_modules/core-js/modules/_object-to-array.js @@ -0,0 +1,21 @@ +var DESCRIPTORS = require('./_descriptors'); +var getKeys = require('./_object-keys'); +var toIObject = require('./_to-iobject'); +var isEnum = require('./_object-pie').f; +module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; diff --git a/node_modules/core-js/modules/_own-keys.js b/node_modules/core-js/modules/_own-keys.js new file mode 100644 index 00000000..84faece8 --- /dev/null +++ b/node_modules/core-js/modules/_own-keys.js @@ -0,0 +1,10 @@ +// all object keys, includes non-enumerable and symbols +var gOPN = require('./_object-gopn'); +var gOPS = require('./_object-gops'); +var anObject = require('./_an-object'); +var Reflect = require('./_global').Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; diff --git a/node_modules/core-js/modules/_parse-float.js b/node_modules/core-js/modules/_parse-float.js new file mode 100644 index 00000000..acfb350f --- /dev/null +++ b/node_modules/core-js/modules/_parse-float.js @@ -0,0 +1,8 @@ +var $parseFloat = require('./_global').parseFloat; +var $trim = require('./_string-trim').trim; + +module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; diff --git a/node_modules/core-js/modules/_parse-int.js b/node_modules/core-js/modules/_parse-int.js new file mode 100644 index 00000000..ddd7172a --- /dev/null +++ b/node_modules/core-js/modules/_parse-int.js @@ -0,0 +1,9 @@ +var $parseInt = require('./_global').parseInt; +var $trim = require('./_string-trim').trim; +var ws = require('./_string-ws'); +var hex = /^[-+]?0[xX]/; + +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : $parseInt; diff --git a/node_modules/core-js/modules/_partial.js b/node_modules/core-js/modules/_partial.js new file mode 100644 index 00000000..ca3f35bf --- /dev/null +++ b/node_modules/core-js/modules/_partial.js @@ -0,0 +1,25 @@ +'use strict'; +var path = require('./_path'); +var invoke = require('./_invoke'); +var aFunction = require('./_a-function'); +module.exports = function (/* ...pargs */) { + var fn = aFunction(this); + var length = arguments.length; + var pargs = new Array(length); + var i = 0; + var _ = path._; + var holder = false; + while (length > i) if ((pargs[i] = arguments[i++]) === _) holder = true; + return function (/* ...args */) { + var that = this; + var aLen = arguments.length; + var j = 0; + var k = 0; + var args; + if (!holder && !aLen) return invoke(fn, pargs, that); + args = pargs.slice(); + if (holder) for (;length > j; j++) if (args[j] === _) args[j] = arguments[k++]; + while (aLen > k) args.push(arguments[k++]); + return invoke(fn, args, that); + }; +}; diff --git a/node_modules/core-js/modules/_path.js b/node_modules/core-js/modules/_path.js new file mode 100644 index 00000000..754592ad --- /dev/null +++ b/node_modules/core-js/modules/_path.js @@ -0,0 +1 @@ +module.exports = require('./_global'); diff --git a/node_modules/core-js/modules/_perform.js b/node_modules/core-js/modules/_perform.js new file mode 100644 index 00000000..bfc7b296 --- /dev/null +++ b/node_modules/core-js/modules/_perform.js @@ -0,0 +1,7 @@ +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; diff --git a/node_modules/core-js/modules/_promise-resolve.js b/node_modules/core-js/modules/_promise-resolve.js new file mode 100644 index 00000000..c3cac764 --- /dev/null +++ b/node_modules/core-js/modules/_promise-resolve.js @@ -0,0 +1,12 @@ +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var newPromiseCapability = require('./_new-promise-capability'); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; diff --git a/node_modules/core-js/modules/_property-desc.js b/node_modules/core-js/modules/_property-desc.js new file mode 100644 index 00000000..09059340 --- /dev/null +++ b/node_modules/core-js/modules/_property-desc.js @@ -0,0 +1,8 @@ +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; diff --git a/node_modules/core-js/modules/_redefine-all.js b/node_modules/core-js/modules/_redefine-all.js new file mode 100644 index 00000000..dcf7944f --- /dev/null +++ b/node_modules/core-js/modules/_redefine-all.js @@ -0,0 +1,5 @@ +var redefine = require('./_redefine'); +module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; +}; diff --git a/node_modules/core-js/modules/_redefine.js b/node_modules/core-js/modules/_redefine.js new file mode 100644 index 00000000..442ea611 --- /dev/null +++ b/node_modules/core-js/modules/_redefine.js @@ -0,0 +1,31 @@ +var global = require('./_global'); +var hide = require('./_hide'); +var has = require('./_has'); +var SRC = require('./_uid')('src'); +var $toString = require('./_function-to-string'); +var TO_STRING = 'toString'; +var TPL = ('' + $toString).split(TO_STRING); + +require('./_core').inspectSource = function (it) { + return $toString.call(it); +}; + +(module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) has(val, 'name') || hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if (O === global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + hide(O, key, val); + } +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative +})(Function.prototype, TO_STRING, function toString() { + return typeof this == 'function' && this[SRC] || $toString.call(this); +}); diff --git a/node_modules/core-js/modules/_regexp-exec-abstract.js b/node_modules/core-js/modules/_regexp-exec-abstract.js new file mode 100644 index 00000000..b722aad1 --- /dev/null +++ b/node_modules/core-js/modules/_regexp-exec-abstract.js @@ -0,0 +1,21 @@ +'use strict'; + +var classof = require('./_classof'); +var builtinExec = RegExp.prototype.exec; + + // `RegExpExec` abstract operation +// https://tc39.github.io/ecma262/#sec-regexpexec +module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + if (classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver'); + } + return builtinExec.call(R, S); +}; diff --git a/node_modules/core-js/modules/_regexp-exec.js b/node_modules/core-js/modules/_regexp-exec.js new file mode 100644 index 00000000..f88bfe99 --- /dev/null +++ b/node_modules/core-js/modules/_regexp-exec.js @@ -0,0 +1,58 @@ +'use strict'; + +var regexpFlags = require('./_flags'); + +var nativeExec = RegExp.prototype.exec; +// This always refers to the native implementation, because the +// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, +// which loads this file before patching the method. +var nativeReplace = String.prototype.replace; + +var patchedExec = nativeExec; + +var LAST_INDEX = 'lastIndex'; + +var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/, + re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; +})(); + +// nonparticipating capturing group, copied from es5-shim's String#split patch. +var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + +var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + +if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; + + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; +} + +module.exports = patchedExec; diff --git a/node_modules/core-js/modules/_replacer.js b/node_modules/core-js/modules/_replacer.js new file mode 100644 index 00000000..c37703dd --- /dev/null +++ b/node_modules/core-js/modules/_replacer.js @@ -0,0 +1,8 @@ +module.exports = function (regExp, replace) { + var replacer = replace === Object(replace) ? function (part) { + return replace[part]; + } : replace; + return function (it) { + return String(it).replace(regExp, replacer); + }; +}; diff --git a/node_modules/core-js/modules/_same-value.js b/node_modules/core-js/modules/_same-value.js new file mode 100644 index 00000000..c6d045e8 --- /dev/null +++ b/node_modules/core-js/modules/_same-value.js @@ -0,0 +1,5 @@ +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; diff --git a/node_modules/core-js/modules/_set-collection-from.js b/node_modules/core-js/modules/_set-collection-from.js new file mode 100644 index 00000000..d5001f93 --- /dev/null +++ b/node_modules/core-js/modules/_set-collection-from.js @@ -0,0 +1,28 @@ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var ctx = require('./_ctx'); +var forOf = require('./_for-of'); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + } }); +}; diff --git a/node_modules/core-js/modules/_set-collection-of.js b/node_modules/core-js/modules/_set-collection-of.js new file mode 100644 index 00000000..f559af3f --- /dev/null +++ b/node_modules/core-js/modules/_set-collection-of.js @@ -0,0 +1,12 @@ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); +}; diff --git a/node_modules/core-js/modules/_set-proto.js b/node_modules/core-js/modules/_set-proto.js new file mode 100644 index 00000000..c1990622 --- /dev/null +++ b/node_modules/core-js/modules/_set-proto.js @@ -0,0 +1,25 @@ +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = require('./_is-object'); +var anObject = require('./_an-object'); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; diff --git a/node_modules/core-js/modules/_set-species.js b/node_modules/core-js/modules/_set-species.js new file mode 100644 index 00000000..2d505d2a --- /dev/null +++ b/node_modules/core-js/modules/_set-species.js @@ -0,0 +1,13 @@ +'use strict'; +var global = require('./_global'); +var dP = require('./_object-dp'); +var DESCRIPTORS = require('./_descriptors'); +var SPECIES = require('./_wks')('species'); + +module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; diff --git a/node_modules/core-js/modules/_set-to-string-tag.js b/node_modules/core-js/modules/_set-to-string-tag.js new file mode 100644 index 00000000..5bd64144 --- /dev/null +++ b/node_modules/core-js/modules/_set-to-string-tag.js @@ -0,0 +1,7 @@ +var def = require('./_object-dp').f; +var has = require('./_has'); +var TAG = require('./_wks')('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; diff --git a/node_modules/core-js/modules/_shared-key.js b/node_modules/core-js/modules/_shared-key.js new file mode 100644 index 00000000..d47fe7a2 --- /dev/null +++ b/node_modules/core-js/modules/_shared-key.js @@ -0,0 +1,5 @@ +var shared = require('./_shared')('keys'); +var uid = require('./_uid'); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; diff --git a/node_modules/core-js/modules/_shared.js b/node_modules/core-js/modules/_shared.js new file mode 100644 index 00000000..3adec722 --- /dev/null +++ b/node_modules/core-js/modules/_shared.js @@ -0,0 +1,12 @@ +var core = require('./_core'); +var global = require('./_global'); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: require('./_library') ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' +}); diff --git a/node_modules/core-js/modules/_species-constructor.js b/node_modules/core-js/modules/_species-constructor.js new file mode 100644 index 00000000..0cb4ffb8 --- /dev/null +++ b/node_modules/core-js/modules/_species-constructor.js @@ -0,0 +1,9 @@ +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +var SPECIES = require('./_wks')('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; diff --git a/node_modules/core-js/modules/_strict-method.js b/node_modules/core-js/modules/_strict-method.js new file mode 100644 index 00000000..e68f41bb --- /dev/null +++ b/node_modules/core-js/modules/_strict-method.js @@ -0,0 +1,9 @@ +'use strict'; +var fails = require('./_fails'); + +module.exports = function (method, arg) { + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call + arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); + }); +}; diff --git a/node_modules/core-js/modules/_string-at.js b/node_modules/core-js/modules/_string-at.js new file mode 100644 index 00000000..88d66bd1 --- /dev/null +++ b/node_modules/core-js/modules/_string-at.js @@ -0,0 +1,17 @@ +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; diff --git a/node_modules/core-js/modules/_string-context.js b/node_modules/core-js/modules/_string-context.js new file mode 100644 index 00000000..becf3fbe --- /dev/null +++ b/node_modules/core-js/modules/_string-context.js @@ -0,0 +1,8 @@ +// helper for String#{startsWith, endsWith, includes} +var isRegExp = require('./_is-regexp'); +var defined = require('./_defined'); + +module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; diff --git a/node_modules/core-js/modules/_string-html.js b/node_modules/core-js/modules/_string-html.js new file mode 100644 index 00000000..1dcc95bc --- /dev/null +++ b/node_modules/core-js/modules/_string-html.js @@ -0,0 +1,19 @@ +var $export = require('./_export'); +var fails = require('./_fails'); +var defined = require('./_defined'); +var quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; +}; +module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export($export.P + $export.F * fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), 'String', O); +}; diff --git a/node_modules/core-js/modules/_string-pad.js b/node_modules/core-js/modules/_string-pad.js new file mode 100644 index 00000000..ceb6077f --- /dev/null +++ b/node_modules/core-js/modules/_string-pad.js @@ -0,0 +1,16 @@ +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = require('./_to-length'); +var repeat = require('./_string-repeat'); +var defined = require('./_defined'); + +module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; +}; diff --git a/node_modules/core-js/modules/_string-repeat.js b/node_modules/core-js/modules/_string-repeat.js new file mode 100644 index 00000000..a69b9626 --- /dev/null +++ b/node_modules/core-js/modules/_string-repeat.js @@ -0,0 +1,12 @@ +'use strict'; +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); + +module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; +}; diff --git a/node_modules/core-js/modules/_string-trim.js b/node_modules/core-js/modules/_string-trim.js new file mode 100644 index 00000000..6b54a81a --- /dev/null +++ b/node_modules/core-js/modules/_string-trim.js @@ -0,0 +1,30 @@ +var $export = require('./_export'); +var defined = require('./_defined'); +var fails = require('./_fails'); +var spaces = require('./_string-ws'); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var rtrim = RegExp(space + space + '*$'); + +var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); +}; + +// 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim +var trim = exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; +}; + +module.exports = exporter; diff --git a/node_modules/core-js/modules/_string-ws.js b/node_modules/core-js/modules/_string-ws.js new file mode 100644 index 00000000..2c68cf9f --- /dev/null +++ b/node_modules/core-js/modules/_string-ws.js @@ -0,0 +1,2 @@ +module.exports = '\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'; diff --git a/node_modules/core-js/modules/_task.js b/node_modules/core-js/modules/_task.js new file mode 100644 index 00000000..8777a6e2 --- /dev/null +++ b/node_modules/core-js/modules/_task.js @@ -0,0 +1,84 @@ +var ctx = require('./_ctx'); +var invoke = require('./_invoke'); +var html = require('./_html'); +var cel = require('./_dom-create'); +var global = require('./_global'); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (require('./_cof')(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; diff --git a/node_modules/core-js/modules/_to-absolute-index.js b/node_modules/core-js/modules/_to-absolute-index.js new file mode 100644 index 00000000..dfee02e8 --- /dev/null +++ b/node_modules/core-js/modules/_to-absolute-index.js @@ -0,0 +1,7 @@ +var toInteger = require('./_to-integer'); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; diff --git a/node_modules/core-js/modules/_to-index.js b/node_modules/core-js/modules/_to-index.js new file mode 100644 index 00000000..8f51c32d --- /dev/null +++ b/node_modules/core-js/modules/_to-index.js @@ -0,0 +1,10 @@ +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; +}; diff --git a/node_modules/core-js/modules/_to-integer.js b/node_modules/core-js/modules/_to-integer.js new file mode 100644 index 00000000..3d50f97d --- /dev/null +++ b/node_modules/core-js/modules/_to-integer.js @@ -0,0 +1,6 @@ +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; diff --git a/node_modules/core-js/modules/_to-iobject.js b/node_modules/core-js/modules/_to-iobject.js new file mode 100644 index 00000000..7614503a --- /dev/null +++ b/node_modules/core-js/modules/_to-iobject.js @@ -0,0 +1,6 @@ +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = require('./_iobject'); +var defined = require('./_defined'); +module.exports = function (it) { + return IObject(defined(it)); +}; diff --git a/node_modules/core-js/modules/_to-length.js b/node_modules/core-js/modules/_to-length.js new file mode 100644 index 00000000..a9db5017 --- /dev/null +++ b/node_modules/core-js/modules/_to-length.js @@ -0,0 +1,6 @@ +// 7.1.15 ToLength +var toInteger = require('./_to-integer'); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; diff --git a/node_modules/core-js/modules/_to-object.js b/node_modules/core-js/modules/_to-object.js new file mode 100644 index 00000000..0efea4c6 --- /dev/null +++ b/node_modules/core-js/modules/_to-object.js @@ -0,0 +1,5 @@ +// 7.1.13 ToObject(argument) +var defined = require('./_defined'); +module.exports = function (it) { + return Object(defined(it)); +}; diff --git a/node_modules/core-js/modules/_to-primitive.js b/node_modules/core-js/modules/_to-primitive.js new file mode 100644 index 00000000..de3dd6b1 --- /dev/null +++ b/node_modules/core-js/modules/_to-primitive.js @@ -0,0 +1,12 @@ +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = require('./_is-object'); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; diff --git a/node_modules/core-js/modules/_typed-array.js b/node_modules/core-js/modules/_typed-array.js new file mode 100644 index 00000000..30d9c0ba --- /dev/null +++ b/node_modules/core-js/modules/_typed-array.js @@ -0,0 +1,480 @@ +'use strict'; +if (require('./_descriptors')) { + var LIBRARY = require('./_library'); + var global = require('./_global'); + var fails = require('./_fails'); + var $export = require('./_export'); + var $typed = require('./_typed'); + var $buffer = require('./_typed-buffer'); + var ctx = require('./_ctx'); + var anInstance = require('./_an-instance'); + var propertyDesc = require('./_property-desc'); + var hide = require('./_hide'); + var redefineAll = require('./_redefine-all'); + var toInteger = require('./_to-integer'); + var toLength = require('./_to-length'); + var toIndex = require('./_to-index'); + var toAbsoluteIndex = require('./_to-absolute-index'); + var toPrimitive = require('./_to-primitive'); + var has = require('./_has'); + var classof = require('./_classof'); + var isObject = require('./_is-object'); + var toObject = require('./_to-object'); + var isArrayIter = require('./_is-array-iter'); + var create = require('./_object-create'); + var getPrototypeOf = require('./_object-gpo'); + var gOPN = require('./_object-gopn').f; + var getIterFn = require('./core.get-iterator-method'); + var uid = require('./_uid'); + var wks = require('./_wks'); + var createArrayMethod = require('./_array-methods'); + var createArrayIncludes = require('./_array-includes'); + var speciesConstructor = require('./_species-constructor'); + var ArrayIterators = require('./es6.array.iterator'); + var Iterators = require('./_iterators'); + var $iterDetect = require('./_iter-detect'); + var setSpecies = require('./_set-species'); + var arrayFill = require('./_array-fill'); + var arrayCopyWithin = require('./_array-copy-within'); + var $DP = require('./_object-dp'); + var $GOPD = require('./_object-gopd'); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { + new Uint8Array(1).set({}); + }); + + var toOffset = function (it, BYTES) { + var offset = toInteger(it); + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!'); + } return new C(length); + }; + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function (C, list) { + var index = 0; + var length = list.length; + var result = allocate(C, length); + while (length > index) result[index] = list[index++]; + return result; + }; + + var addGetter = function (it, key, internal) { + dP(it, key, { get: function () { return this._d[internal]; } }); + }; + + var $from = function from(source /* , mapfn, thisArg */) { + var O = toObject(source); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var i, length, values, result, step, iterator; + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value); + } O = values; + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/* ...items */) { + var index = 0; + var length = arguments.length; + var result = allocate(this, length); + while (length > index) result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); + + var $toLocaleString = function toLocaleString() { + return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); + }; + + var proto = { + copyWithin: function copyWithin(target, start /* , end */) { + return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); + }, + every: function every(callbackfn /* , thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /* , thisArg */) { + return speciesFromList(this, arrayFilter(validate(this), callbackfn, + arguments.length > 1 ? arguments[1] : undefined)); + }, + find: function find(predicate /* , thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /* , thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /* , thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /* , fromIndex */) { + return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + includes: function includes(searchElement /* , fromIndex */) { + return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + join: function join(separator) { // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /* , thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse() { + var that = this; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + some: function some(callbackfn /* , thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn) { + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end) { + var O = validate(this); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var index = 0; + if (len + offset > length) throw RangeError(WRONG_LENGTH); + while (index < len) this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries() { + return arrayEntries.call(validate(this)); + }, + keys: function keys() { + return arrayKeys.call(validate(this)); + }, + values: function values() { + return arrayValues.call(validate(this)); + } + }; + + var isTAIndex = function (target, key) { + return isObject(target) + && target[TYPED_ARRAY] + && typeof key != 'symbol' + && key in target + && String(+key) == String(key); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key) { + return isTAIndex(target, key = toPrimitive(key, true)) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc) { + if (isTAIndex(target, key = toPrimitive(key, true)) + && isObject(desc) + && has(desc, 'value') + && !has(desc, 'get') + && !has(desc, 'set') + // TODO: add validation descriptor w/o calling accessors + && !desc.configurable + && (!has(desc, 'writable') || desc.writable) + && (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value; + return target; + } return dP(target, key, desc); + }; + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc + }); + + if (fails(function () { arrayToString.call({}); })) { + arrayToString = arrayToLocaleString = function toString() { + return arrayJoin.call(this); + }; + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { /* noop */ }, + toString: arrayToString, + toLocaleString: $toLocaleString + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function () { return this[TYPED_ARRAY]; } + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function (that, index) { + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function (that, index, value) { + var data = that._d; + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true + }); + }; + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d'); + var index = 0; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer) + }); + while (index < length) addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if (!fails(function () { + TypedArray(1); + }) || !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true)) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(toIndex(data)); + if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); + }); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR]; + var CORRECT_ITER_NAME = !!$nativeIterator + && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { return NAME; } + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES + }); + + $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { + from: $from, + of: $of + }); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; + + $export($export.P + $export.F * fails(function () { + new TypedArray(1).slice(); + }), NAME, { slice: $slice }); + + $export($export.P + $export.F * (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + }) || !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), NAME, { toLocaleString: $toLocaleString }); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); + }; +} else module.exports = function () { /* empty */ }; diff --git a/node_modules/core-js/modules/_typed-buffer.js b/node_modules/core-js/modules/_typed-buffer.js new file mode 100644 index 00000000..c24cef38 --- /dev/null +++ b/node_modules/core-js/modules/_typed-buffer.js @@ -0,0 +1,276 @@ +'use strict'; +var global = require('./_global'); +var DESCRIPTORS = require('./_descriptors'); +var LIBRARY = require('./_library'); +var $typed = require('./_typed'); +var hide = require('./_hide'); +var redefineAll = require('./_redefine-all'); +var fails = require('./_fails'); +var anInstance = require('./_an-instance'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var toIndex = require('./_to-index'); +var gOPN = require('./_object-gopn').f; +var dP = require('./_object-dp').f; +var arrayFill = require('./_array-fill'); +var setToStringTag = require('./_set-to-string-tag'); +var ARRAY_BUFFER = 'ArrayBuffer'; +var DATA_VIEW = 'DataView'; +var PROTOTYPE = 'prototype'; +var WRONG_LENGTH = 'Wrong length!'; +var WRONG_INDEX = 'Wrong index!'; +var $ArrayBuffer = global[ARRAY_BUFFER]; +var $DataView = global[DATA_VIEW]; +var Math = global.Math; +var RangeError = global.RangeError; +// eslint-disable-next-line no-shadow-restricted-names +var Infinity = global.Infinity; +var BaseBuffer = $ArrayBuffer; +var abs = Math.abs; +var pow = Math.pow; +var floor = Math.floor; +var log = Math.log; +var LN2 = Math.LN2; +var BUFFER = 'buffer'; +var BYTE_LENGTH = 'byteLength'; +var BYTE_OFFSET = 'byteOffset'; +var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; +var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; +var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + +// IEEE754 conversions based on https://github.com/feross/ieee754 +function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; +} +function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } return (s ? -1 : 1) * m * pow(2, e - mLen); +} + +function unpackI32(bytes) { + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; +} +function packI8(it) { + return [it & 0xff]; +} +function packI16(it) { + return [it & 0xff, it >> 8 & 0xff]; +} +function packI32(it) { + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; +} +function packF64(it) { + return packIEEE754(it, 52, 8); +} +function packF32(it) { + return packIEEE754(it, 23, 4); +} + +function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); +} + +function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); +} +function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; +} + +if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH]; + var offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return get(this, 1, byteOffset)[0] << 24 >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8 | bytes[0]) << 16 >> 16; + }, + getUint16: function getUint16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return bytes[1] << 8 | bytes[0]; + }, + getInt32: function getInt32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + } + }); +} else { + if (!fails(function () { + $ArrayBuffer(1); + }) || !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + })) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(length)); + }; + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)); + var $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + } + }, true); +} +setToStringTag($ArrayBuffer, ARRAY_BUFFER); +setToStringTag($DataView, DATA_VIEW); +hide($DataView[PROTOTYPE], $typed.VIEW, true); +exports[ARRAY_BUFFER] = $ArrayBuffer; +exports[DATA_VIEW] = $DataView; diff --git a/node_modules/core-js/modules/_typed.js b/node_modules/core-js/modules/_typed.js new file mode 100644 index 00000000..8747ffd7 --- /dev/null +++ b/node_modules/core-js/modules/_typed.js @@ -0,0 +1,28 @@ +var global = require('./_global'); +var hide = require('./_hide'); +var uid = require('./_uid'); +var TYPED = uid('typed_array'); +var VIEW = uid('view'); +var ABV = !!(global.ArrayBuffer && global.DataView); +var CONSTR = ABV; +var i = 0; +var l = 9; +var Typed; + +var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' +).split(','); + +while (i < l) { + if (Typed = global[TypedArrayConstructors[i++]]) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; +} + +module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW +}; diff --git a/node_modules/core-js/modules/_uid.js b/node_modules/core-js/modules/_uid.js new file mode 100644 index 00000000..ffbe7185 --- /dev/null +++ b/node_modules/core-js/modules/_uid.js @@ -0,0 +1,5 @@ +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; diff --git a/node_modules/core-js/modules/_user-agent.js b/node_modules/core-js/modules/_user-agent.js new file mode 100644 index 00000000..363fedc2 --- /dev/null +++ b/node_modules/core-js/modules/_user-agent.js @@ -0,0 +1,4 @@ +var global = require('./_global'); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; diff --git a/node_modules/core-js/modules/_validate-collection.js b/node_modules/core-js/modules/_validate-collection.js new file mode 100644 index 00000000..cec1ceff --- /dev/null +++ b/node_modules/core-js/modules/_validate-collection.js @@ -0,0 +1,5 @@ +var isObject = require('./_is-object'); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; diff --git a/node_modules/core-js/modules/_wks-define.js b/node_modules/core-js/modules/_wks-define.js new file mode 100644 index 00000000..7284d6ad --- /dev/null +++ b/node_modules/core-js/modules/_wks-define.js @@ -0,0 +1,9 @@ +var global = require('./_global'); +var core = require('./_core'); +var LIBRARY = require('./_library'); +var wksExt = require('./_wks-ext'); +var defineProperty = require('./_object-dp').f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; diff --git a/node_modules/core-js/modules/_wks-ext.js b/node_modules/core-js/modules/_wks-ext.js new file mode 100644 index 00000000..13bd83b1 --- /dev/null +++ b/node_modules/core-js/modules/_wks-ext.js @@ -0,0 +1 @@ +exports.f = require('./_wks'); diff --git a/node_modules/core-js/modules/_wks.js b/node_modules/core-js/modules/_wks.js new file mode 100644 index 00000000..e33f857a --- /dev/null +++ b/node_modules/core-js/modules/_wks.js @@ -0,0 +1,11 @@ +var store = require('./_shared')('wks'); +var uid = require('./_uid'); +var Symbol = require('./_global').Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; diff --git a/node_modules/core-js/modules/core.delay.js b/node_modules/core-js/modules/core.delay.js new file mode 100644 index 00000000..73712c01 --- /dev/null +++ b/node_modules/core-js/modules/core.delay.js @@ -0,0 +1,12 @@ +var global = require('./_global'); +var core = require('./_core'); +var $export = require('./_export'); +var partial = require('./_partial'); +// https://esdiscuss.org/topic/promise-returning-delay-function +$export($export.G + $export.F, { + delay: function delay(time) { + return new (core.Promise || global.Promise)(function (resolve) { + setTimeout(partial.call(resolve, true), time); + }); + } +}); diff --git a/node_modules/core-js/modules/core.dict.js b/node_modules/core-js/modules/core.dict.js new file mode 100644 index 00000000..5422ad30 --- /dev/null +++ b/node_modules/core-js/modules/core.dict.js @@ -0,0 +1,157 @@ +'use strict'; +var ctx = require('./_ctx'); +var $export = require('./_export'); +var createDesc = require('./_property-desc'); +var assign = require('./_object-assign'); +var create = require('./_object-create'); +var getPrototypeOf = require('./_object-gpo'); +var getKeys = require('./_object-keys'); +var dP = require('./_object-dp'); +var keyOf = require('./_keyof'); +var aFunction = require('./_a-function'); +var forOf = require('./_for-of'); +var isIterable = require('./core.is-iterable'); +var $iterCreate = require('./_iter-create'); +var step = require('./_iter-step'); +var isObject = require('./_is-object'); +var toIObject = require('./_to-iobject'); +var DESCRIPTORS = require('./_descriptors'); +var has = require('./_has'); + +// 0 -> Dict.forEach +// 1 -> Dict.map +// 2 -> Dict.filter +// 3 -> Dict.some +// 4 -> Dict.every +// 5 -> Dict.find +// 6 -> Dict.findKey +// 7 -> Dict.mapPairs +var createDictMethod = function (TYPE) { + var IS_MAP = TYPE == 1; + var IS_EVERY = TYPE == 4; + return function (object, callbackfn, that /* = undefined */) { + var f = ctx(callbackfn, that, 3); + var O = toIObject(object); + var result = IS_MAP || TYPE == 7 || TYPE == 2 + ? new (typeof this == 'function' ? this : Dict)() : undefined; + var key, val, res; + for (key in O) if (has(O, key)) { + val = O[key]; + res = f(val, key, object); + if (TYPE) { + if (IS_MAP) result[key] = res; // map + else if (res) switch (TYPE) { + case 2: result[key] = val; break; // filter + case 3: return true; // some + case 5: return val; // find + case 6: return key; // findKey + case 7: result[res[0]] = res[1]; // mapPairs + } else if (IS_EVERY) return false; // every + } + } + return TYPE == 3 || IS_EVERY ? IS_EVERY : result; + }; +}; +var findKey = createDictMethod(6); + +var createDictIter = function (kind) { + return function (it) { + return new DictIterator(it, kind); + }; +}; +var DictIterator = function (iterated, kind) { + this._t = toIObject(iterated); // target + this._a = getKeys(iterated); // keys + this._i = 0; // next index + this._k = kind; // kind +}; +$iterCreate(DictIterator, 'Dict', function () { + var that = this; + var O = that._t; + var keys = that._a; + var kind = that._k; + var key; + do { + if (that._i >= keys.length) { + that._t = undefined; + return step(1); + } + } while (!has(O, key = keys[that._i++])); + if (kind == 'keys') return step(0, key); + if (kind == 'values') return step(0, O[key]); + return step(0, [key, O[key]]); +}); + +function Dict(iterable) { + var dict = create(null); + if (iterable != undefined) { + if (isIterable(iterable)) { + forOf(iterable, true, function (key, value) { + dict[key] = value; + }); + } else assign(dict, iterable); + } + return dict; +} +Dict.prototype = null; + +function reduce(object, mapfn, init) { + aFunction(mapfn); + var O = toIObject(object); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var memo, key; + if (arguments.length < 3) { + if (!length) throw TypeError('Reduce of empty object with no initial value'); + memo = O[keys[i++]]; + } else memo = Object(init); + while (length > i) if (has(O, key = keys[i++])) { + memo = mapfn(memo, O[key], key, object); + } + return memo; +} + +function includes(object, el) { + // eslint-disable-next-line no-self-compare + return (el == el ? keyOf(object, el) : findKey(object, function (it) { + // eslint-disable-next-line no-self-compare + return it != it; + })) !== undefined; +} + +function get(object, key) { + if (has(object, key)) return object[key]; +} +function set(object, key, value) { + if (DESCRIPTORS && key in Object) dP.f(object, key, createDesc(0, value)); + else object[key] = value; + return object; +} + +function isDict(it) { + return isObject(it) && getPrototypeOf(it) === Dict.prototype; +} + +$export($export.G + $export.F, { Dict: Dict }); + +$export($export.S, 'Dict', { + keys: createDictIter('keys'), + values: createDictIter('values'), + entries: createDictIter('entries'), + forEach: createDictMethod(0), + map: createDictMethod(1), + filter: createDictMethod(2), + some: createDictMethod(3), + every: createDictMethod(4), + find: createDictMethod(5), + findKey: findKey, + mapPairs: createDictMethod(7), + reduce: reduce, + keyOf: keyOf, + includes: includes, + has: has, + get: get, + set: set, + isDict: isDict +}); diff --git a/node_modules/core-js/modules/core.function.part.js b/node_modules/core-js/modules/core.function.part.js new file mode 100644 index 00000000..050154f8 --- /dev/null +++ b/node_modules/core-js/modules/core.function.part.js @@ -0,0 +1,7 @@ +var path = require('./_path'); +var $export = require('./_export'); + +// Placeholder +require('./_core')._ = path._ = path._ || {}; + +$export($export.P + $export.F, 'Function', { part: require('./_partial') }); diff --git a/node_modules/core-js/modules/core.get-iterator-method.js b/node_modules/core-js/modules/core.get-iterator-method.js new file mode 100644 index 00000000..9b6fa62a --- /dev/null +++ b/node_modules/core-js/modules/core.get-iterator-method.js @@ -0,0 +1,8 @@ +var classof = require('./_classof'); +var ITERATOR = require('./_wks')('iterator'); +var Iterators = require('./_iterators'); +module.exports = require('./_core').getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; diff --git a/node_modules/core-js/modules/core.get-iterator.js b/node_modules/core-js/modules/core.get-iterator.js new file mode 100644 index 00000000..04568c86 --- /dev/null +++ b/node_modules/core-js/modules/core.get-iterator.js @@ -0,0 +1,7 @@ +var anObject = require('./_an-object'); +var get = require('./core.get-iterator-method'); +module.exports = require('./_core').getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; diff --git a/node_modules/core-js/modules/core.is-iterable.js b/node_modules/core-js/modules/core.is-iterable.js new file mode 100644 index 00000000..388e5e35 --- /dev/null +++ b/node_modules/core-js/modules/core.is-iterable.js @@ -0,0 +1,10 @@ +var classof = require('./_classof'); +var ITERATOR = require('./_wks')('iterator'); +var Iterators = require('./_iterators'); +module.exports = require('./_core').isIterable = function (it) { + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + // eslint-disable-next-line no-prototype-builtins + || Iterators.hasOwnProperty(classof(O)); +}; diff --git a/node_modules/core-js/modules/core.number.iterator.js b/node_modules/core-js/modules/core.number.iterator.js new file mode 100644 index 00000000..fa37791e --- /dev/null +++ b/node_modules/core-js/modules/core.number.iterator.js @@ -0,0 +1,9 @@ +'use strict'; +require('./_iter-define')(Number, 'Number', function (iterated) { + this._l = +iterated; + this._i = 0; +}, function () { + var i = this._i++; + var done = !(i < this._l); + return { done: done, value: done ? undefined : i }; +}); diff --git a/node_modules/core-js/modules/core.object.classof.js b/node_modules/core-js/modules/core.object.classof.js new file mode 100644 index 00000000..fe16595a --- /dev/null +++ b/node_modules/core-js/modules/core.object.classof.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', { classof: require('./_classof') }); diff --git a/node_modules/core-js/modules/core.object.define.js b/node_modules/core-js/modules/core.object.define.js new file mode 100644 index 00000000..e4e717b5 --- /dev/null +++ b/node_modules/core-js/modules/core.object.define.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var define = require('./_object-define'); + +$export($export.S + $export.F, 'Object', { define: define }); diff --git a/node_modules/core-js/modules/core.object.is-object.js b/node_modules/core-js/modules/core.object.is-object.js new file mode 100644 index 00000000..fea80b60 --- /dev/null +++ b/node_modules/core-js/modules/core.object.is-object.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', { isObject: require('./_is-object') }); diff --git a/node_modules/core-js/modules/core.object.make.js b/node_modules/core-js/modules/core.object.make.js new file mode 100644 index 00000000..51d47740 --- /dev/null +++ b/node_modules/core-js/modules/core.object.make.js @@ -0,0 +1,9 @@ +var $export = require('./_export'); +var define = require('./_object-define'); +var create = require('./_object-create'); + +$export($export.S + $export.F, 'Object', { + make: function (proto, mixin) { + return define(create(proto), mixin); + } +}); diff --git a/node_modules/core-js/modules/core.regexp.escape.js b/node_modules/core-js/modules/core.regexp.escape.js new file mode 100644 index 00000000..3ddd748c --- /dev/null +++ b/node_modules/core-js/modules/core.regexp.escape.js @@ -0,0 +1,5 @@ +// https://github.com/benjamingr/RexExp.escape +var $export = require('./_export'); +var $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); diff --git a/node_modules/core-js/modules/core.string.escape-html.js b/node_modules/core-js/modules/core.string.escape-html.js new file mode 100644 index 00000000..f9678861 --- /dev/null +++ b/node_modules/core-js/modules/core.string.escape-html.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $re = require('./_replacer')(/[&<>"']/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}); + +$export($export.P + $export.F, 'String', { escapeHTML: function escapeHTML() { return $re(this); } }); diff --git a/node_modules/core-js/modules/core.string.unescape-html.js b/node_modules/core-js/modules/core.string.unescape-html.js new file mode 100644 index 00000000..eb8a6cfb --- /dev/null +++ b/node_modules/core-js/modules/core.string.unescape-html.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $re = require('./_replacer')(/&(?:amp|lt|gt|quot|apos);/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}); + +$export($export.P + $export.F, 'String', { unescapeHTML: function unescapeHTML() { return $re(this); } }); diff --git a/node_modules/core-js/modules/es5.js b/node_modules/core-js/modules/es5.js new file mode 100644 index 00000000..ca10612d --- /dev/null +++ b/node_modules/core-js/modules/es5.js @@ -0,0 +1,35 @@ +// This file still here for a legacy code and will be removed in a near time +require('./es6.object.create'); +require('./es6.object.define-property'); +require('./es6.object.define-properties'); +require('./es6.object.get-own-property-descriptor'); +require('./es6.object.get-prototype-of'); +require('./es6.object.keys'); +require('./es6.object.get-own-property-names'); +require('./es6.object.freeze'); +require('./es6.object.seal'); +require('./es6.object.prevent-extensions'); +require('./es6.object.is-frozen'); +require('./es6.object.is-sealed'); +require('./es6.object.is-extensible'); +require('./es6.function.bind'); +require('./es6.array.is-array'); +require('./es6.array.join'); +require('./es6.array.slice'); +require('./es6.array.sort'); +require('./es6.array.for-each'); +require('./es6.array.map'); +require('./es6.array.filter'); +require('./es6.array.some'); +require('./es6.array.every'); +require('./es6.array.reduce'); +require('./es6.array.reduce-right'); +require('./es6.array.index-of'); +require('./es6.array.last-index-of'); +require('./es6.date.now'); +require('./es6.date.to-iso-string'); +require('./es6.date.to-json'); +require('./es6.parse-int'); +require('./es6.parse-float'); +require('./es6.string.trim'); +require('./es6.regexp.to-string'); diff --git a/node_modules/core-js/modules/es6.array.copy-within.js b/node_modules/core-js/modules/es6.array.copy-within.js new file mode 100644 index 00000000..f866a959 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.copy-within.js @@ -0,0 +1,6 @@ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +var $export = require('./_export'); + +$export($export.P, 'Array', { copyWithin: require('./_array-copy-within') }); + +require('./_add-to-unscopables')('copyWithin'); diff --git a/node_modules/core-js/modules/es6.array.every.js b/node_modules/core-js/modules/es6.array.every.js new file mode 100644 index 00000000..cfd448f5 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.every.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $every = require('./_array-methods')(4); + +$export($export.P + $export.F * !require('./_strict-method')([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + } +}); diff --git a/node_modules/core-js/modules/es6.array.fill.js b/node_modules/core-js/modules/es6.array.fill.js new file mode 100644 index 00000000..ac171442 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.fill.js @@ -0,0 +1,6 @@ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +var $export = require('./_export'); + +$export($export.P, 'Array', { fill: require('./_array-fill') }); + +require('./_add-to-unscopables')('fill'); diff --git a/node_modules/core-js/modules/es6.array.filter.js b/node_modules/core-js/modules/es6.array.filter.js new file mode 100644 index 00000000..447ecf40 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.filter.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $filter = require('./_array-methods')(2); + +$export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + } +}); diff --git a/node_modules/core-js/modules/es6.array.find-index.js b/node_modules/core-js/modules/es6.array.find-index.js new file mode 100644 index 00000000..374cadd7 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.find-index.js @@ -0,0 +1,14 @@ +'use strict'; +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(6); +var KEY = 'findIndex'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +require('./_add-to-unscopables')(KEY); diff --git a/node_modules/core-js/modules/es6.array.find.js b/node_modules/core-js/modules/es6.array.find.js new file mode 100644 index 00000000..4fbe76ce --- /dev/null +++ b/node_modules/core-js/modules/es6.array.find.js @@ -0,0 +1,14 @@ +'use strict'; +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(5); +var KEY = 'find'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +require('./_add-to-unscopables')(KEY); diff --git a/node_modules/core-js/modules/es6.array.for-each.js b/node_modules/core-js/modules/es6.array.for-each.js new file mode 100644 index 00000000..525ba074 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.for-each.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $forEach = require('./_array-methods')(0); +var STRICT = require('./_strict-method')([].forEach, true); + +$export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + } +}); diff --git a/node_modules/core-js/modules/es6.array.from.js b/node_modules/core-js/modules/es6.array.from.js new file mode 100644 index 00000000..4db38017 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.from.js @@ -0,0 +1,37 @@ +'use strict'; +var ctx = require('./_ctx'); +var $export = require('./_export'); +var toObject = require('./_to-object'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var toLength = require('./_to-length'); +var createProperty = require('./_create-property'); +var getIterFn = require('./core.get-iterator-method'); + +$export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); diff --git a/node_modules/core-js/modules/es6.array.index-of.js b/node_modules/core-js/modules/es6.array.index-of.js new file mode 100644 index 00000000..231c92e9 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.index-of.js @@ -0,0 +1,15 @@ +'use strict'; +var $export = require('./_export'); +var $indexOf = require('./_array-includes')(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); diff --git a/node_modules/core-js/modules/es6.array.is-array.js b/node_modules/core-js/modules/es6.array.is-array.js new file mode 100644 index 00000000..27ca6fc5 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.is-array.js @@ -0,0 +1,4 @@ +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = require('./_export'); + +$export($export.S, 'Array', { isArray: require('./_is-array') }); diff --git a/node_modules/core-js/modules/es6.array.iterator.js b/node_modules/core-js/modules/es6.array.iterator.js new file mode 100644 index 00000000..c64e88b1 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.iterator.js @@ -0,0 +1,34 @@ +'use strict'; +var addToUnscopables = require('./_add-to-unscopables'); +var step = require('./_iter-step'); +var Iterators = require('./_iterators'); +var toIObject = require('./_to-iobject'); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); diff --git a/node_modules/core-js/modules/es6.array.join.js b/node_modules/core-js/modules/es6.array.join.js new file mode 100644 index 00000000..48e55d2e --- /dev/null +++ b/node_modules/core-js/modules/es6.array.join.js @@ -0,0 +1,12 @@ +'use strict'; +// 22.1.3.13 Array.prototype.join(separator) +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var arrayJoin = [].join; + +// fallback for not array-like strings +$export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); diff --git a/node_modules/core-js/modules/es6.array.last-index-of.js b/node_modules/core-js/modules/es6.array.last-index-of.js new file mode 100644 index 00000000..1f70e340 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.last-index-of.js @@ -0,0 +1,22 @@ +'use strict'; +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + } +}); diff --git a/node_modules/core-js/modules/es6.array.map.js b/node_modules/core-js/modules/es6.array.map.js new file mode 100644 index 00000000..1326033f --- /dev/null +++ b/node_modules/core-js/modules/es6.array.map.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $map = require('./_array-methods')(1); + +$export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + } +}); diff --git a/node_modules/core-js/modules/es6.array.of.js b/node_modules/core-js/modules/es6.array.of.js new file mode 100644 index 00000000..b83e058c --- /dev/null +++ b/node_modules/core-js/modules/es6.array.of.js @@ -0,0 +1,19 @@ +'use strict'; +var $export = require('./_export'); +var createProperty = require('./_create-property'); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * require('./_fails')(function () { + function F() { /* empty */ } + return !(Array.of.call(F) instanceof F); +}), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } +}); diff --git a/node_modules/core-js/modules/es6.array.reduce-right.js b/node_modules/core-js/modules/es6.array.reduce-right.js new file mode 100644 index 00000000..168e421d --- /dev/null +++ b/node_modules/core-js/modules/es6.array.reduce-right.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $reduce = require('./_array-reduce'); + +$export($export.P + $export.F * !require('./_strict-method')([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + } +}); diff --git a/node_modules/core-js/modules/es6.array.reduce.js b/node_modules/core-js/modules/es6.array.reduce.js new file mode 100644 index 00000000..f4e47612 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.reduce.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $reduce = require('./_array-reduce'); + +$export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } +}); diff --git a/node_modules/core-js/modules/es6.array.slice.js b/node_modules/core-js/modules/es6.array.slice.js new file mode 100644 index 00000000..bdd496ec --- /dev/null +++ b/node_modules/core-js/modules/es6.array.slice.js @@ -0,0 +1,28 @@ +'use strict'; +var $export = require('./_export'); +var html = require('./_html'); +var cof = require('./_cof'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * require('./_fails')(function () { + if (html) arraySlice.call(html); +}), 'Array', { + slice: function slice(begin, end) { + var len = toLength(this.length); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } +}); diff --git a/node_modules/core-js/modules/es6.array.some.js b/node_modules/core-js/modules/es6.array.some.js new file mode 100644 index 00000000..14c5eec2 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.some.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export'); +var $some = require('./_array-methods')(3); + +$export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + } +}); diff --git a/node_modules/core-js/modules/es6.array.sort.js b/node_modules/core-js/modules/es6.array.sort.js new file mode 100644 index 00000000..39817ffa --- /dev/null +++ b/node_modules/core-js/modules/es6.array.sort.js @@ -0,0 +1,23 @@ +'use strict'; +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var fails = require('./_fails'); +var $sort = [].sort; +var test = [1, 2, 3]; + +$export($export.P + $export.F * (fails(function () { + // IE8- + test.sort(undefined); +}) || !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit +}) || !require('./_strict-method')($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + } +}); diff --git a/node_modules/core-js/modules/es6.array.species.js b/node_modules/core-js/modules/es6.array.species.js new file mode 100644 index 00000000..ce0b8917 --- /dev/null +++ b/node_modules/core-js/modules/es6.array.species.js @@ -0,0 +1 @@ +require('./_set-species')('Array'); diff --git a/node_modules/core-js/modules/es6.date.now.js b/node_modules/core-js/modules/es6.date.now.js new file mode 100644 index 00000000..65f134e5 --- /dev/null +++ b/node_modules/core-js/modules/es6.date.now.js @@ -0,0 +1,4 @@ +// 20.3.3.1 / 15.9.4.4 Date.now() +var $export = require('./_export'); + +$export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); diff --git a/node_modules/core-js/modules/es6.date.to-iso-string.js b/node_modules/core-js/modules/es6.date.to-iso-string.js new file mode 100644 index 00000000..13b27818 --- /dev/null +++ b/node_modules/core-js/modules/es6.date.to-iso-string.js @@ -0,0 +1,8 @@ +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = require('./_export'); +var toISOString = require('./_date-to-iso-string'); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); diff --git a/node_modules/core-js/modules/es6.date.to-json.js b/node_modules/core-js/modules/es6.date.to-json.js new file mode 100644 index 00000000..1508e042 --- /dev/null +++ b/node_modules/core-js/modules/es6.date.to-json.js @@ -0,0 +1,16 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); + +$export($export.P + $export.F * require('./_fails')(function () { + return new Date(NaN).toJSON() !== null + || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1; +}), 'Date', { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } +}); diff --git a/node_modules/core-js/modules/es6.date.to-primitive.js b/node_modules/core-js/modules/es6.date.to-primitive.js new file mode 100644 index 00000000..41754b9c --- /dev/null +++ b/node_modules/core-js/modules/es6.date.to-primitive.js @@ -0,0 +1,4 @@ +var TO_PRIMITIVE = require('./_wks')('toPrimitive'); +var proto = Date.prototype; + +if (!(TO_PRIMITIVE in proto)) require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive')); diff --git a/node_modules/core-js/modules/es6.date.to-string.js b/node_modules/core-js/modules/es6.date.to-string.js new file mode 100644 index 00000000..15ee75ac --- /dev/null +++ b/node_modules/core-js/modules/es6.date.to-string.js @@ -0,0 +1,12 @@ +var DateProto = Date.prototype; +var INVALID_DATE = 'Invalid Date'; +var TO_STRING = 'toString'; +var $toString = DateProto[TO_STRING]; +var getTime = DateProto.getTime; +if (new Date(NaN) + '' != INVALID_DATE) { + require('./_redefine')(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE; + }); +} diff --git a/node_modules/core-js/modules/es6.function.bind.js b/node_modules/core-js/modules/es6.function.bind.js new file mode 100644 index 00000000..38e84e1a --- /dev/null +++ b/node_modules/core-js/modules/es6.function.bind.js @@ -0,0 +1,4 @@ +// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) +var $export = require('./_export'); + +$export($export.P, 'Function', { bind: require('./_bind') }); diff --git a/node_modules/core-js/modules/es6.function.has-instance.js b/node_modules/core-js/modules/es6.function.has-instance.js new file mode 100644 index 00000000..7556ed9b --- /dev/null +++ b/node_modules/core-js/modules/es6.function.has-instance.js @@ -0,0 +1,13 @@ +'use strict'; +var isObject = require('./_is-object'); +var getPrototypeOf = require('./_object-gpo'); +var HAS_INSTANCE = require('./_wks')('hasInstance'); +var FunctionProto = Function.prototype; +// 19.2.3.6 Function.prototype[@@hasInstance](V) +if (!(HAS_INSTANCE in FunctionProto)) require('./_object-dp').f(FunctionProto, HAS_INSTANCE, { value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while (O = getPrototypeOf(O)) if (this.prototype === O) return true; + return false; +} }); diff --git a/node_modules/core-js/modules/es6.function.name.js b/node_modules/core-js/modules/es6.function.name.js new file mode 100644 index 00000000..05dd333f --- /dev/null +++ b/node_modules/core-js/modules/es6.function.name.js @@ -0,0 +1,16 @@ +var dP = require('./_object-dp').f; +var FProto = Function.prototype; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; + +// 19.2.4.2 name +NAME in FProto || require('./_descriptors') && dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + } +}); diff --git a/node_modules/core-js/modules/es6.map.js b/node_modules/core-js/modules/es6.map.js new file mode 100644 index 00000000..a282f022 --- /dev/null +++ b/node_modules/core-js/modules/es6.map.js @@ -0,0 +1,19 @@ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var MAP = 'Map'; + +// 23.1 Map Objects +module.exports = require('./_collection')(MAP, function (get) { + return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + } +}, strong, true); diff --git a/node_modules/core-js/modules/es6.math.acosh.js b/node_modules/core-js/modules/es6.math.acosh.js new file mode 100644 index 00000000..8a8989eb --- /dev/null +++ b/node_modules/core-js/modules/es6.math.acosh.js @@ -0,0 +1,18 @@ +// 20.2.2.3 Math.acosh(x) +var $export = require('./_export'); +var log1p = require('./_math-log1p'); +var sqrt = Math.sqrt; +var $acosh = Math.acosh; + +$export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity +), 'Math', { + acosh: function acosh(x) { + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + } +}); diff --git a/node_modules/core-js/modules/es6.math.asinh.js b/node_modules/core-js/modules/es6.math.asinh.js new file mode 100644 index 00000000..ddf46662 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.asinh.js @@ -0,0 +1,10 @@ +// 20.2.2.5 Math.asinh(x) +var $export = require('./_export'); +var $asinh = Math.asinh; + +function asinh(x) { + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); +} + +// Tor Browser bug: Math.asinh(0) -> -0 +$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); diff --git a/node_modules/core-js/modules/es6.math.atanh.js b/node_modules/core-js/modules/es6.math.atanh.js new file mode 100644 index 00000000..af3c3e80 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.atanh.js @@ -0,0 +1,10 @@ +// 20.2.2.7 Math.atanh(x) +var $export = require('./_export'); +var $atanh = Math.atanh; + +// Tor Browser bug: Math.atanh(-0) -> 0 +$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } +}); diff --git a/node_modules/core-js/modules/es6.math.cbrt.js b/node_modules/core-js/modules/es6.math.cbrt.js new file mode 100644 index 00000000..e45ac444 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.cbrt.js @@ -0,0 +1,9 @@ +// 20.2.2.9 Math.cbrt(x) +var $export = require('./_export'); +var sign = require('./_math-sign'); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); diff --git a/node_modules/core-js/modules/es6.math.clz32.js b/node_modules/core-js/modules/es6.math.clz32.js new file mode 100644 index 00000000..1e4d7e19 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.clz32.js @@ -0,0 +1,8 @@ +// 20.2.2.11 Math.clz32(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } +}); diff --git a/node_modules/core-js/modules/es6.math.cosh.js b/node_modules/core-js/modules/es6.math.cosh.js new file mode 100644 index 00000000..1e0cffc1 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.cosh.js @@ -0,0 +1,9 @@ +// 20.2.2.12 Math.cosh(x) +var $export = require('./_export'); +var exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp(x = +x) + exp(-x)) / 2; + } +}); diff --git a/node_modules/core-js/modules/es6.math.expm1.js b/node_modules/core-js/modules/es6.math.expm1.js new file mode 100644 index 00000000..da4c90df --- /dev/null +++ b/node_modules/core-js/modules/es6.math.expm1.js @@ -0,0 +1,5 @@ +// 20.2.2.14 Math.expm1(x) +var $export = require('./_export'); +var $expm1 = require('./_math-expm1'); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); diff --git a/node_modules/core-js/modules/es6.math.fround.js b/node_modules/core-js/modules/es6.math.fround.js new file mode 100644 index 00000000..9c262f2e --- /dev/null +++ b/node_modules/core-js/modules/es6.math.fround.js @@ -0,0 +1,4 @@ +// 20.2.2.16 Math.fround(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { fround: require('./_math-fround') }); diff --git a/node_modules/core-js/modules/es6.math.hypot.js b/node_modules/core-js/modules/es6.math.hypot.js new file mode 100644 index 00000000..41ffdb27 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.hypot.js @@ -0,0 +1,25 @@ +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = require('./_export'); +var abs = Math.abs; + +$export($export.S, 'Math', { + hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var arg, div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + } +}); diff --git a/node_modules/core-js/modules/es6.math.imul.js b/node_modules/core-js/modules/es6.math.imul.js new file mode 100644 index 00000000..96e683d2 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.imul.js @@ -0,0 +1,17 @@ +// 20.2.2.18 Math.imul(x, y) +var $export = require('./_export'); +var $imul = Math.imul; + +// some WebKit versions fails with big numbers, some has wrong arity +$export($export.S + $export.F * require('./_fails')(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; +}), 'Math', { + imul: function imul(x, y) { + var UINT16 = 0xffff; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); diff --git a/node_modules/core-js/modules/es6.math.log10.js b/node_modules/core-js/modules/es6.math.log10.js new file mode 100644 index 00000000..9ee8ae68 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.log10.js @@ -0,0 +1,8 @@ +// 20.2.2.21 Math.log10(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + } +}); diff --git a/node_modules/core-js/modules/es6.math.log1p.js b/node_modules/core-js/modules/es6.math.log1p.js new file mode 100644 index 00000000..62959800 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.log1p.js @@ -0,0 +1,4 @@ +// 20.2.2.20 Math.log1p(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { log1p: require('./_math-log1p') }); diff --git a/node_modules/core-js/modules/es6.math.log2.js b/node_modules/core-js/modules/es6.math.log2.js new file mode 100644 index 00000000..03d127cb --- /dev/null +++ b/node_modules/core-js/modules/es6.math.log2.js @@ -0,0 +1,8 @@ +// 20.2.2.22 Math.log2(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + } +}); diff --git a/node_modules/core-js/modules/es6.math.sign.js b/node_modules/core-js/modules/es6.math.sign.js new file mode 100644 index 00000000..981f69e5 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.sign.js @@ -0,0 +1,4 @@ +// 20.2.2.28 Math.sign(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { sign: require('./_math-sign') }); diff --git a/node_modules/core-js/modules/es6.math.sinh.js b/node_modules/core-js/modules/es6.math.sinh.js new file mode 100644 index 00000000..57606333 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.sinh.js @@ -0,0 +1,15 @@ +// 20.2.2.30 Math.sinh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +var exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * require('./_fails')(function () { + return !Math.sinh(-2e-17) != -2e-17; +}), 'Math', { + sinh: function sinh(x) { + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + } +}); diff --git a/node_modules/core-js/modules/es6.math.tanh.js b/node_modules/core-js/modules/es6.math.tanh.js new file mode 100644 index 00000000..0d3135b0 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.tanh.js @@ -0,0 +1,12 @@ +// 20.2.2.33 Math.tanh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +var exp = Math.exp; + +$export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1(x = +x); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } +}); diff --git a/node_modules/core-js/modules/es6.math.trunc.js b/node_modules/core-js/modules/es6.math.trunc.js new file mode 100644 index 00000000..35ddb808 --- /dev/null +++ b/node_modules/core-js/modules/es6.math.trunc.js @@ -0,0 +1,8 @@ +// 20.2.2.34 Math.trunc(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + } +}); diff --git a/node_modules/core-js/modules/es6.number.constructor.js b/node_modules/core-js/modules/es6.number.constructor.js new file mode 100644 index 00000000..aee40e9a --- /dev/null +++ b/node_modules/core-js/modules/es6.number.constructor.js @@ -0,0 +1,69 @@ +'use strict'; +var global = require('./_global'); +var has = require('./_has'); +var cof = require('./_cof'); +var inheritIfRequired = require('./_inherit-if-required'); +var toPrimitive = require('./_to-primitive'); +var fails = require('./_fails'); +var gOPN = require('./_object-gopn').f; +var gOPD = require('./_object-gopd').f; +var dP = require('./_object-dp').f; +var $trim = require('./_string-trim').trim; +var NUMBER = 'Number'; +var $Number = global[NUMBER]; +var Base = $Number; +var proto = $Number.prototype; +// Opera ~12 has broken Object#toString +var BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER; +var TRIM = 'trim' in String.prototype; + +// 7.1.3 ToNumber(argument) +var toNumber = function (argument) { + var it = toPrimitive(argument, false); + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0); + var third, radix, maxCode; + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i + case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i + default: return +it; + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } return parseInt(digits, radix); + } + } return +it; +}; + +if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var that = this; + return that instanceof $Number + // check on 1..constructor(foo) case + && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); + }; + for (var keys = require('./_descriptors') ? gOPN(Base) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), j = 0, key; keys.length > j; j++) { + if (has(Base, key = keys[j]) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + require('./_redefine')(global, NUMBER, $Number); +} diff --git a/node_modules/core-js/modules/es6.number.epsilon.js b/node_modules/core-js/modules/es6.number.epsilon.js new file mode 100644 index 00000000..34a2ec5f --- /dev/null +++ b/node_modules/core-js/modules/es6.number.epsilon.js @@ -0,0 +1,4 @@ +// 20.1.2.1 Number.EPSILON +var $export = require('./_export'); + +$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); diff --git a/node_modules/core-js/modules/es6.number.is-finite.js b/node_modules/core-js/modules/es6.number.is-finite.js new file mode 100644 index 00000000..8719da97 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.is-finite.js @@ -0,0 +1,9 @@ +// 20.1.2.2 Number.isFinite(number) +var $export = require('./_export'); +var _isFinite = require('./_global').isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + } +}); diff --git a/node_modules/core-js/modules/es6.number.is-integer.js b/node_modules/core-js/modules/es6.number.is-integer.js new file mode 100644 index 00000000..f1ab5dc4 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.is-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.3 Number.isInteger(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { isInteger: require('./_is-integer') }); diff --git a/node_modules/core-js/modules/es6.number.is-nan.js b/node_modules/core-js/modules/es6.number.is-nan.js new file mode 100644 index 00000000..01d76ba2 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.is-nan.js @@ -0,0 +1,9 @@ +// 20.1.2.4 Number.isNaN(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + } +}); diff --git a/node_modules/core-js/modules/es6.number.is-safe-integer.js b/node_modules/core-js/modules/es6.number.is-safe-integer.js new file mode 100644 index 00000000..004e7d16 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.is-safe-integer.js @@ -0,0 +1,10 @@ +// 20.1.2.5 Number.isSafeInteger(number) +var $export = require('./_export'); +var isInteger = require('./_is-integer'); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); diff --git a/node_modules/core-js/modules/es6.number.max-safe-integer.js b/node_modules/core-js/modules/es6.number.max-safe-integer.js new file mode 100644 index 00000000..a4f248f1 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.max-safe-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.6 Number.MAX_SAFE_INTEGER +var $export = require('./_export'); + +$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); diff --git a/node_modules/core-js/modules/es6.number.min-safe-integer.js b/node_modules/core-js/modules/es6.number.min-safe-integer.js new file mode 100644 index 00000000..34df374b --- /dev/null +++ b/node_modules/core-js/modules/es6.number.min-safe-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.10 Number.MIN_SAFE_INTEGER +var $export = require('./_export'); + +$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); diff --git a/node_modules/core-js/modules/es6.number.parse-float.js b/node_modules/core-js/modules/es6.number.parse-float.js new file mode 100644 index 00000000..317c4310 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.parse-float.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); diff --git a/node_modules/core-js/modules/es6.number.parse-int.js b/node_modules/core-js/modules/es6.number.parse-int.js new file mode 100644 index 00000000..cb48da28 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.parse-int.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); diff --git a/node_modules/core-js/modules/es6.number.to-fixed.js b/node_modules/core-js/modules/es6.number.to-fixed.js new file mode 100644 index 00000000..2bf78af9 --- /dev/null +++ b/node_modules/core-js/modules/es6.number.to-fixed.js @@ -0,0 +1,114 @@ +'use strict'; +var $export = require('./_export'); +var toInteger = require('./_to-integer'); +var aNumberValue = require('./_a-number-value'); +var repeat = require('./_string-repeat'); +var $toFixed = 1.0.toFixed; +var floor = Math.floor; +var data = [0, 0, 0, 0, 0, 0]; +var ERROR = 'Number.toFixed: incorrect invocation!'; +var ZERO = '0'; + +var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; +var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } +}; +var numToString = function () { + var i = 6; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } return s; +}; +var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); +}; +var log = function (x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } return n; +}; + +$export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || + 0.9.toFixed(0) !== '1' || + 1.255.toFixed(2) !== '1.25' || + 1000000000000000128.0.toFixed(0) !== '1000000000000000128' +) || !require('./_fails')(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); +})), 'Number', { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } return m; + } +}); diff --git a/node_modules/core-js/modules/es6.number.to-precision.js b/node_modules/core-js/modules/es6.number.to-precision.js new file mode 100644 index 00000000..0d92527f --- /dev/null +++ b/node_modules/core-js/modules/es6.number.to-precision.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export'); +var $fails = require('./_fails'); +var aNumberValue = require('./_a-number-value'); +var $toPrecision = 1.0.toPrecision; + +$export($export.P + $export.F * ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; +}) || !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); +})), 'Number', { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + } +}); diff --git a/node_modules/core-js/modules/es6.object.assign.js b/node_modules/core-js/modules/es6.object.assign.js new file mode 100644 index 00000000..d28085a7 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.assign.js @@ -0,0 +1,4 @@ +// 19.1.3.1 Object.assign(target, source) +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') }); diff --git a/node_modules/core-js/modules/es6.object.create.js b/node_modules/core-js/modules/es6.object.create.js new file mode 100644 index 00000000..70627d69 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.create.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: require('./_object-create') }); diff --git a/node_modules/core-js/modules/es6.object.define-properties.js b/node_modules/core-js/modules/es6.object.define-properties.js new file mode 100644 index 00000000..5ec34214 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.define-properties.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) +$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperties: require('./_object-dps') }); diff --git a/node_modules/core-js/modules/es6.object.define-property.js b/node_modules/core-js/modules/es6.object.define-property.js new file mode 100644 index 00000000..12068582 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.define-property.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f }); diff --git a/node_modules/core-js/modules/es6.object.freeze.js b/node_modules/core-js/modules/es6.object.freeze.js new file mode 100644 index 00000000..0856ce9d --- /dev/null +++ b/node_modules/core-js/modules/es6.object.freeze.js @@ -0,0 +1,9 @@ +// 19.1.2.5 Object.freeze(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); diff --git a/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js b/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js new file mode 100644 index 00000000..9df21417 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js @@ -0,0 +1,9 @@ +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = require('./_to-iobject'); +var $getOwnPropertyDescriptor = require('./_object-gopd').f; + +require('./_object-sap')('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); diff --git a/node_modules/core-js/modules/es6.object.get-own-property-names.js b/node_modules/core-js/modules/es6.object.get-own-property-names.js new file mode 100644 index 00000000..172f51c7 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.get-own-property-names.js @@ -0,0 +1,4 @@ +// 19.1.2.7 Object.getOwnPropertyNames(O) +require('./_object-sap')('getOwnPropertyNames', function () { + return require('./_object-gopn-ext').f; +}); diff --git a/node_modules/core-js/modules/es6.object.get-prototype-of.js b/node_modules/core-js/modules/es6.object.get-prototype-of.js new file mode 100644 index 00000000..8fe2728c --- /dev/null +++ b/node_modules/core-js/modules/es6.object.get-prototype-of.js @@ -0,0 +1,9 @@ +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = require('./_to-object'); +var $getPrototypeOf = require('./_object-gpo'); + +require('./_object-sap')('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); diff --git a/node_modules/core-js/modules/es6.object.is-extensible.js b/node_modules/core-js/modules/es6.object.is-extensible.js new file mode 100644 index 00000000..5cd4575a --- /dev/null +++ b/node_modules/core-js/modules/es6.object.is-extensible.js @@ -0,0 +1,8 @@ +// 19.1.2.11 Object.isExtensible(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); diff --git a/node_modules/core-js/modules/es6.object.is-frozen.js b/node_modules/core-js/modules/es6.object.is-frozen.js new file mode 100644 index 00000000..0ceeabbb --- /dev/null +++ b/node_modules/core-js/modules/es6.object.is-frozen.js @@ -0,0 +1,8 @@ +// 19.1.2.12 Object.isFrozen(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); diff --git a/node_modules/core-js/modules/es6.object.is-sealed.js b/node_modules/core-js/modules/es6.object.is-sealed.js new file mode 100644 index 00000000..7fa8dded --- /dev/null +++ b/node_modules/core-js/modules/es6.object.is-sealed.js @@ -0,0 +1,8 @@ +// 19.1.2.13 Object.isSealed(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); diff --git a/node_modules/core-js/modules/es6.object.is.js b/node_modules/core-js/modules/es6.object.is.js new file mode 100644 index 00000000..204d7030 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.is.js @@ -0,0 +1,3 @@ +// 19.1.3.10 Object.is(value1, value2) +var $export = require('./_export'); +$export($export.S, 'Object', { is: require('./_same-value') }); diff --git a/node_modules/core-js/modules/es6.object.keys.js b/node_modules/core-js/modules/es6.object.keys.js new file mode 100644 index 00000000..e9dade7d --- /dev/null +++ b/node_modules/core-js/modules/es6.object.keys.js @@ -0,0 +1,9 @@ +// 19.1.2.14 Object.keys(O) +var toObject = require('./_to-object'); +var $keys = require('./_object-keys'); + +require('./_object-sap')('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); diff --git a/node_modules/core-js/modules/es6.object.prevent-extensions.js b/node_modules/core-js/modules/es6.object.prevent-extensions.js new file mode 100644 index 00000000..2f729181 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.prevent-extensions.js @@ -0,0 +1,9 @@ +// 19.1.2.15 Object.preventExtensions(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); diff --git a/node_modules/core-js/modules/es6.object.seal.js b/node_modules/core-js/modules/es6.object.seal.js new file mode 100644 index 00000000..12c3f6a3 --- /dev/null +++ b/node_modules/core-js/modules/es6.object.seal.js @@ -0,0 +1,9 @@ +// 19.1.2.17 Object.seal(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); diff --git a/node_modules/core-js/modules/es6.object.set-prototype-of.js b/node_modules/core-js/modules/es6.object.set-prototype-of.js new file mode 100644 index 00000000..461dbd2e --- /dev/null +++ b/node_modules/core-js/modules/es6.object.set-prototype-of.js @@ -0,0 +1,3 @@ +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = require('./_export'); +$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set }); diff --git a/node_modules/core-js/modules/es6.object.to-string.js b/node_modules/core-js/modules/es6.object.to-string.js new file mode 100644 index 00000000..1c7b85fe --- /dev/null +++ b/node_modules/core-js/modules/es6.object.to-string.js @@ -0,0 +1,10 @@ +'use strict'; +// 19.1.3.6 Object.prototype.toString() +var classof = require('./_classof'); +var test = {}; +test[require('./_wks')('toStringTag')] = 'z'; +if (test + '' != '[object z]') { + require('./_redefine')(Object.prototype, 'toString', function toString() { + return '[object ' + classof(this) + ']'; + }, true); +} diff --git a/node_modules/core-js/modules/es6.parse-float.js b/node_modules/core-js/modules/es6.parse-float.js new file mode 100644 index 00000000..cbf50ead --- /dev/null +++ b/node_modules/core-js/modules/es6.parse-float.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); diff --git a/node_modules/core-js/modules/es6.parse-int.js b/node_modules/core-js/modules/es6.parse-int.js new file mode 100644 index 00000000..7ea358e8 --- /dev/null +++ b/node_modules/core-js/modules/es6.parse-int.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); diff --git a/node_modules/core-js/modules/es6.promise.js b/node_modules/core-js/modules/es6.promise.js new file mode 100644 index 00000000..b0ff3bfc --- /dev/null +++ b/node_modules/core-js/modules/es6.promise.js @@ -0,0 +1,286 @@ +'use strict'; +var LIBRARY = require('./_library'); +var global = require('./_global'); +var ctx = require('./_ctx'); +var classof = require('./_classof'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var aFunction = require('./_a-function'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var speciesConstructor = require('./_species-constructor'); +var task = require('./_task').set; +var microtask = require('./_microtask')(); +var newPromiseCapabilityModule = require('./_new-promise-capability'); +var perform = require('./_perform'); +var userAgent = require('./_user-agent'); +var promiseResolve = require('./_promise-resolve'); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') + && promise.then(empty) instanceof FakePromise + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; + +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = require('./_redefine-all')($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +require('./_set-to-string-tag')($Promise, PROMISE); +require('./_set-species')(PROMISE); +Wrapper = require('./_core')[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.apply.js b/node_modules/core-js/modules/es6.reflect.apply.js new file mode 100644 index 00000000..3b9c03a9 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.apply.js @@ -0,0 +1,16 @@ +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var rApply = (require('./_global').Reflect || {}).apply; +var fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !require('./_fails')(function () { + rApply(function () { /* empty */ }); +}), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.construct.js b/node_modules/core-js/modules/es6.reflect.construct.js new file mode 100644 index 00000000..380addb5 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.construct.js @@ -0,0 +1,47 @@ +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = require('./_export'); +var create = require('./_object-create'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var bind = require('./_bind'); +var rConstruct = (require('./_global').Reflect || {}).construct; + +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function () { + function F() { /* empty */ } + return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function () { + rConstruct(function () { /* empty */ }); +}); + +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: return new Target(); + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.define-property.js b/node_modules/core-js/modules/es6.reflect.define-property.js new file mode 100644 index 00000000..be7fbde6 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.define-property.js @@ -0,0 +1,23 @@ +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = require('./_object-dp'); +var $export = require('./_export'); +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * require('./_fails')(function () { + // eslint-disable-next-line no-undef + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); +}), 'Reflect', { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.delete-property.js b/node_modules/core-js/modules/es6.reflect.delete-property.js new file mode 100644 index 00000000..0902b38a --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.delete-property.js @@ -0,0 +1,11 @@ +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = require('./_export'); +var gOPD = require('./_object-gopd').f; +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.enumerate.js b/node_modules/core-js/modules/es6.reflect.enumerate.js new file mode 100644 index 00000000..9e7c76a3 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.enumerate.js @@ -0,0 +1,26 @@ +'use strict'; +// 26.1.5 Reflect.enumerate(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = []; // keys + var key; + for (key in iterated) keys.push(key); +}; +require('./_iter-create')(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; +}); + +$export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js b/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js new file mode 100644 index 00000000..e1299f90 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js @@ -0,0 +1,10 @@ +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = require('./_object-gopd'); +var $export = require('./_export'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.get-prototype-of.js b/node_modules/core-js/modules/es6.reflect.get-prototype-of.js new file mode 100644 index 00000000..28351d41 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.get-prototype-of.js @@ -0,0 +1,10 @@ +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = require('./_export'); +var getProto = require('./_object-gpo'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.get.js b/node_modules/core-js/modules/es6.reflect.get.js new file mode 100644 index 00000000..a7ee7666 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.get.js @@ -0,0 +1,21 @@ +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var anObject = require('./_an-object'); + +function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var desc, proto; + if (anObject(target) === receiver) return target[propertyKey]; + if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); +} + +$export($export.S, 'Reflect', { get: get }); diff --git a/node_modules/core-js/modules/es6.reflect.has.js b/node_modules/core-js/modules/es6.reflect.has.js new file mode 100644 index 00000000..4f5efa99 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.has.js @@ -0,0 +1,8 @@ +// 26.1.9 Reflect.has(target, propertyKey) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.is-extensible.js b/node_modules/core-js/modules/es6.reflect.is-extensible.js new file mode 100644 index 00000000..700f938a --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.is-extensible.js @@ -0,0 +1,11 @@ +// 26.1.10 Reflect.isExtensible(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.own-keys.js b/node_modules/core-js/modules/es6.reflect.own-keys.js new file mode 100644 index 00000000..9f2424ae --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.own-keys.js @@ -0,0 +1,4 @@ +// 26.1.11 Reflect.ownKeys(target) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { ownKeys: require('./_own-keys') }); diff --git a/node_modules/core-js/modules/es6.reflect.prevent-extensions.js b/node_modules/core-js/modules/es6.reflect.prevent-extensions.js new file mode 100644 index 00000000..e1037fa1 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.prevent-extensions.js @@ -0,0 +1,16 @@ +// 26.1.12 Reflect.preventExtensions(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var $preventExtensions = Object.preventExtensions; + +$export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.set-prototype-of.js b/node_modules/core-js/modules/es6.reflect.set-prototype-of.js new file mode 100644 index 00000000..5dae9012 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.set-prototype-of.js @@ -0,0 +1,15 @@ +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = require('./_export'); +var setProto = require('./_set-proto'); + +if (setProto) $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + } +}); diff --git a/node_modules/core-js/modules/es6.reflect.set.js b/node_modules/core-js/modules/es6.reflect.set.js new file mode 100644 index 00000000..d809d7a4 --- /dev/null +++ b/node_modules/core-js/modules/es6.reflect.set.js @@ -0,0 +1,33 @@ +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = require('./_object-dp'); +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var createDesc = require('./_property-desc'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); + +function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var existingDescriptor, proto; + if (!ownDesc) { + if (isObject(proto = getPrototypeOf(target))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); diff --git a/node_modules/core-js/modules/es6.regexp.constructor.js b/node_modules/core-js/modules/es6.regexp.constructor.js new file mode 100644 index 00000000..76247c32 --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.constructor.js @@ -0,0 +1,43 @@ +var global = require('./_global'); +var inheritIfRequired = require('./_inherit-if-required'); +var dP = require('./_object-dp').f; +var gOPN = require('./_object-gopn').f; +var isRegExp = require('./_is-regexp'); +var $flags = require('./_flags'); +var $RegExp = global.RegExp; +var Base = $RegExp; +var proto = $RegExp.prototype; +var re1 = /a/g; +var re2 = /a/g; +// "new" creates a new object, old webkit buggy here +var CORRECT_NEW = new $RegExp(re1) !== re1; + +if (require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function () { + re2[require('./_wks')('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; +}))) { + $RegExp = function RegExp(p, f) { + var tiRE = this instanceof $RegExp; + var piRE = isRegExp(p); + var fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU ? p + : inheritIfRequired(CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) + , tiRE ? this : proto, $RegExp); + }; + var proxy = function (key) { + key in $RegExp || dP($RegExp, key, { + configurable: true, + get: function () { return Base[key]; }, + set: function (it) { Base[key] = it; } + }); + }; + for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + require('./_redefine')(global, 'RegExp', $RegExp); +} + +require('./_set-species')('RegExp'); diff --git a/node_modules/core-js/modules/es6.regexp.exec.js b/node_modules/core-js/modules/es6.regexp.exec.js new file mode 100644 index 00000000..a19f1eee --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.exec.js @@ -0,0 +1,9 @@ +'use strict'; +var regexpExec = require('./_regexp-exec'); +require('./_export')({ + target: 'RegExp', + proto: true, + forced: regexpExec !== /./.exec +}, { + exec: regexpExec +}); diff --git a/node_modules/core-js/modules/es6.regexp.flags.js b/node_modules/core-js/modules/es6.regexp.flags.js new file mode 100644 index 00000000..47008680 --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.flags.js @@ -0,0 +1,5 @@ +// 21.2.5.3 get RegExp.prototype.flags() +if (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', { + configurable: true, + get: require('./_flags') +}); diff --git a/node_modules/core-js/modules/es6.regexp.match.js b/node_modules/core-js/modules/es6.regexp.match.js new file mode 100644 index 00000000..6ac294eb --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.match.js @@ -0,0 +1,40 @@ +'use strict'; + +var anObject = require('./_an-object'); +var toLength = require('./_to-length'); +var advanceStringIndex = require('./_advance-string-index'); +var regExpExec = require('./_regexp-exec-abstract'); + +// @@match logic +require('./_fix-re-wks')('match', 1, function (defined, MATCH, $match, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.github.io/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative($match, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + if (!rx.global) return regExpExec(rx, S); + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = String(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + } + ]; +}); diff --git a/node_modules/core-js/modules/es6.regexp.replace.js b/node_modules/core-js/modules/es6.regexp.replace.js new file mode 100644 index 00000000..abd0f9c8 --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.replace.js @@ -0,0 +1,118 @@ +'use strict'; + +var anObject = require('./_an-object'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var toInteger = require('./_to-integer'); +var advanceStringIndex = require('./_advance-string-index'); +var regExpExec = require('./_regexp-exec-abstract'); +var max = Math.max; +var min = Math.min; +var floor = Math.floor; +var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; +var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + +var maybeToString = function (it) { + return it === undefined ? it : String(it); +}; + +// @@replace logic +require('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = defined(this); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regExpExec(rx, S); + if (result === null) break; + results.push(result); + if (!global) break; + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + var matched = String(result[0]); + var position = max(min(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + } + ]; + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return $replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': return '$'; + case '&': return matched; + case '`': return str.slice(0, position); + case "'": return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + } +}); diff --git a/node_modules/core-js/modules/es6.regexp.search.js b/node_modules/core-js/modules/es6.regexp.search.js new file mode 100644 index 00000000..ecb53bb3 --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.search.js @@ -0,0 +1,31 @@ +'use strict'; + +var anObject = require('./_an-object'); +var sameValue = require('./_same-value'); +var regExpExec = require('./_regexp-exec-abstract'); + +// @@search logic +require('./_fix-re-wks')('search', 1, function (defined, SEARCH, $search, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.github.io/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative($search, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regExpExec(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + } + ]; +}); diff --git a/node_modules/core-js/modules/es6.regexp.split.js b/node_modules/core-js/modules/es6.regexp.split.js new file mode 100644 index 00000000..45f81ce4 --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.split.js @@ -0,0 +1,134 @@ +'use strict'; + +var isRegExp = require('./_is-regexp'); +var anObject = require('./_an-object'); +var speciesConstructor = require('./_species-constructor'); +var advanceStringIndex = require('./_advance-string-index'); +var toLength = require('./_to-length'); +var callRegExpExec = require('./_regexp-exec-abstract'); +var regexpExec = require('./_regexp-exec'); +var fails = require('./_fails'); +var $min = Math.min; +var $push = [].push; +var $SPLIT = 'split'; +var LENGTH = 'length'; +var LAST_INDEX = 'lastIndex'; +var MAX_UINT32 = 0xffffffff; + +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError +var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); }); + +// @@split logic +require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return $split.call(string, separator, limit); + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while (match = regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy[LAST_INDEX]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); + }; + } else { + internalSplit = $split; + } + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = defined(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + } + ]; +}); diff --git a/node_modules/core-js/modules/es6.regexp.to-string.js b/node_modules/core-js/modules/es6.regexp.to-string.js new file mode 100644 index 00000000..33d6e6fe --- /dev/null +++ b/node_modules/core-js/modules/es6.regexp.to-string.js @@ -0,0 +1,25 @@ +'use strict'; +require('./es6.regexp.flags'); +var anObject = require('./_an-object'); +var $flags = require('./_flags'); +var DESCRIPTORS = require('./_descriptors'); +var TO_STRING = 'toString'; +var $toString = /./[TO_STRING]; + +var define = function (fn) { + require('./_redefine')(RegExp.prototype, TO_STRING, fn, true); +}; + +// 21.2.5.14 RegExp.prototype.toString() +if (require('./_fails')(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { + define(function toString() { + var R = anObject(this); + return '/'.concat(R.source, '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); + }); +// FF44- RegExp#toString has a wrong name +} else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); +} diff --git a/node_modules/core-js/modules/es6.set.js b/node_modules/core-js/modules/es6.set.js new file mode 100644 index 00000000..55b8bdd8 --- /dev/null +++ b/node_modules/core-js/modules/es6.set.js @@ -0,0 +1,14 @@ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var SET = 'Set'; + +// 23.2 Set Objects +module.exports = require('./_collection')(SET, function (get) { + return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); + } +}, strong); diff --git a/node_modules/core-js/modules/es6.string.anchor.js b/node_modules/core-js/modules/es6.string.anchor.js new file mode 100644 index 00000000..3493e54c --- /dev/null +++ b/node_modules/core-js/modules/es6.string.anchor.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.2 String.prototype.anchor(name) +require('./_string-html')('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.big.js b/node_modules/core-js/modules/es6.string.big.js new file mode 100644 index 00000000..38aab341 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.big.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.3 String.prototype.big() +require('./_string-html')('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.blink.js b/node_modules/core-js/modules/es6.string.blink.js new file mode 100644 index 00000000..6188d96e --- /dev/null +++ b/node_modules/core-js/modules/es6.string.blink.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.4 String.prototype.blink() +require('./_string-html')('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.bold.js b/node_modules/core-js/modules/es6.string.bold.js new file mode 100644 index 00000000..ff3ecb9c --- /dev/null +++ b/node_modules/core-js/modules/es6.string.bold.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.5 String.prototype.bold() +require('./_string-html')('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.code-point-at.js b/node_modules/core-js/modules/es6.string.code-point-at.js new file mode 100644 index 00000000..e39b8c5e --- /dev/null +++ b/node_modules/core-js/modules/es6.string.code-point-at.js @@ -0,0 +1,9 @@ +'use strict'; +var $export = require('./_export'); +var $at = require('./_string-at')(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } +}); diff --git a/node_modules/core-js/modules/es6.string.ends-with.js b/node_modules/core-js/modules/es6.string.ends-with.js new file mode 100644 index 00000000..06568888 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.ends-with.js @@ -0,0 +1,20 @@ +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); diff --git a/node_modules/core-js/modules/es6.string.fixed.js b/node_modules/core-js/modules/es6.string.fixed.js new file mode 100644 index 00000000..d4a60f37 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.fixed.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.6 String.prototype.fixed() +require('./_string-html')('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.fontcolor.js b/node_modules/core-js/modules/es6.string.fontcolor.js new file mode 100644 index 00000000..f7b95957 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.fontcolor.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.7 String.prototype.fontcolor(color) +require('./_string-html')('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.fontsize.js b/node_modules/core-js/modules/es6.string.fontsize.js new file mode 100644 index 00000000..f4cc20ae --- /dev/null +++ b/node_modules/core-js/modules/es6.string.fontsize.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.8 String.prototype.fontsize(size) +require('./_string-html')('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.from-code-point.js b/node_modules/core-js/modules/es6.string.from-code-point.js new file mode 100644 index 00000000..bece66e2 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.from-code-point.js @@ -0,0 +1,23 @@ +var $export = require('./_export'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var fromCharCode = String.fromCharCode; +var $fromCodePoint = String.fromCodePoint; + +// length should be 1, old FF problem +$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } +}); diff --git a/node_modules/core-js/modules/es6.string.includes.js b/node_modules/core-js/modules/es6.string.includes.js new file mode 100644 index 00000000..28d17416 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.includes.js @@ -0,0 +1,12 @@ +// 21.1.3.7 String.prototype.includes(searchString, position = 0) +'use strict'; +var $export = require('./_export'); +var context = require('./_string-context'); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); diff --git a/node_modules/core-js/modules/es6.string.italics.js b/node_modules/core-js/modules/es6.string.italics.js new file mode 100644 index 00000000..ed4cc3bf --- /dev/null +++ b/node_modules/core-js/modules/es6.string.italics.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.9 String.prototype.italics() +require('./_string-html')('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.iterator.js b/node_modules/core-js/modules/es6.string.iterator.js new file mode 100644 index 00000000..5d84c7fd --- /dev/null +++ b/node_modules/core-js/modules/es6.string.iterator.js @@ -0,0 +1,17 @@ +'use strict'; +var $at = require('./_string-at')(true); + +// 21.1.3.27 String.prototype[@@iterator]() +require('./_iter-define')(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); diff --git a/node_modules/core-js/modules/es6.string.link.js b/node_modules/core-js/modules/es6.string.link.js new file mode 100644 index 00000000..d0255edd --- /dev/null +++ b/node_modules/core-js/modules/es6.string.link.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.10 String.prototype.link(url) +require('./_string-html')('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.raw.js b/node_modules/core-js/modules/es6.string.raw.js new file mode 100644 index 00000000..aa40ff6f --- /dev/null +++ b/node_modules/core-js/modules/es6.string.raw.js @@ -0,0 +1,18 @@ +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var toLength = require('./_to-length'); + +$export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } return res.join(''); + } +}); diff --git a/node_modules/core-js/modules/es6.string.repeat.js b/node_modules/core-js/modules/es6.string.repeat.js new file mode 100644 index 00000000..08412d91 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.repeat.js @@ -0,0 +1,6 @@ +var $export = require('./_export'); + +$export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: require('./_string-repeat') +}); diff --git a/node_modules/core-js/modules/es6.string.small.js b/node_modules/core-js/modules/es6.string.small.js new file mode 100644 index 00000000..941e4a76 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.small.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.11 String.prototype.small() +require('./_string-html')('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.starts-with.js b/node_modules/core-js/modules/es6.string.starts-with.js new file mode 100644 index 00000000..c1723767 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.starts-with.js @@ -0,0 +1,18 @@ +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); diff --git a/node_modules/core-js/modules/es6.string.strike.js b/node_modules/core-js/modules/es6.string.strike.js new file mode 100644 index 00000000..66055bc0 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.strike.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.12 String.prototype.strike() +require('./_string-html')('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.sub.js b/node_modules/core-js/modules/es6.string.sub.js new file mode 100644 index 00000000..e295a27b --- /dev/null +++ b/node_modules/core-js/modules/es6.string.sub.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.13 String.prototype.sub() +require('./_string-html')('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.sup.js b/node_modules/core-js/modules/es6.string.sup.js new file mode 100644 index 00000000..125a989a --- /dev/null +++ b/node_modules/core-js/modules/es6.string.sup.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.14 String.prototype.sup() +require('./_string-html')('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; +}); diff --git a/node_modules/core-js/modules/es6.string.trim.js b/node_modules/core-js/modules/es6.string.trim.js new file mode 100644 index 00000000..02b8a6c6 --- /dev/null +++ b/node_modules/core-js/modules/es6.string.trim.js @@ -0,0 +1,7 @@ +'use strict'; +// 21.1.3.25 String.prototype.trim() +require('./_string-trim')('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; +}); diff --git a/node_modules/core-js/modules/es6.symbol.js b/node_modules/core-js/modules/es6.symbol.js new file mode 100644 index 00000000..52dbbc81 --- /dev/null +++ b/node_modules/core-js/modules/es6.symbol.js @@ -0,0 +1,246 @@ +'use strict'; +// ECMAScript 6 symbols shim +var global = require('./_global'); +var has = require('./_has'); +var DESCRIPTORS = require('./_descriptors'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var META = require('./_meta').KEY; +var $fails = require('./_fails'); +var shared = require('./_shared'); +var setToStringTag = require('./_set-to-string-tag'); +var uid = require('./_uid'); +var wks = require('./_wks'); +var wksExt = require('./_wks-ext'); +var wksDefine = require('./_wks-define'); +var enumKeys = require('./_enum-keys'); +var isArray = require('./_is-array'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var toObject = require('./_to-object'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var createDesc = require('./_property-desc'); +var _create = require('./_object-create'); +var gOPNExt = require('./_object-gopn-ext'); +var $GOPD = require('./_object-gopd'); +var $GOPS = require('./_object-gops'); +var $DP = require('./_object-dp'); +var $keys = require('./_object-keys'); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames; + require('./_object-pie').f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !require('./_library')) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); + +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + } +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); diff --git a/node_modules/core-js/modules/es6.typed.array-buffer.js b/node_modules/core-js/modules/es6.typed.array-buffer.js new file mode 100644 index 00000000..b2473709 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.array-buffer.js @@ -0,0 +1,46 @@ +'use strict'; +var $export = require('./_export'); +var $typed = require('./_typed'); +var buffer = require('./_typed-buffer'); +var anObject = require('./_an-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var isObject = require('./_is-object'); +var ArrayBuffer = require('./_global').ArrayBuffer; +var speciesConstructor = require('./_species-constructor'); +var $ArrayBuffer = buffer.ArrayBuffer; +var $DataView = buffer.DataView; +var $isView = $typed.ABV && ArrayBuffer.isView; +var $slice = $ArrayBuffer.prototype.slice; +var VIEW = $typed.VIEW; +var ARRAY_BUFFER = 'ArrayBuffer'; + +$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); + +$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return $isView && $isView(it) || isObject(it) && VIEW in it; + } +}); + +$export($export.P + $export.U + $export.F * require('./_fails')(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; +}), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +require('./_set-species')(ARRAY_BUFFER); diff --git a/node_modules/core-js/modules/es6.typed.data-view.js b/node_modules/core-js/modules/es6.typed.data-view.js new file mode 100644 index 00000000..d0e23536 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.data-view.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +$export($export.G + $export.W + $export.F * !require('./_typed').ABV, { + DataView: require('./_typed-buffer').DataView +}); diff --git a/node_modules/core-js/modules/es6.typed.float32-array.js b/node_modules/core-js/modules/es6.typed.float32-array.js new file mode 100644 index 00000000..f4970061 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.float32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.float64-array.js b/node_modules/core-js/modules/es6.typed.float64-array.js new file mode 100644 index 00000000..85dedcd5 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.float64-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.int16-array.js b/node_modules/core-js/modules/es6.typed.int16-array.js new file mode 100644 index 00000000..b20ed041 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.int16-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.int32-array.js b/node_modules/core-js/modules/es6.typed.int32-array.js new file mode 100644 index 00000000..c7e6ae06 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.int32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.int8-array.js b/node_modules/core-js/modules/es6.typed.int8-array.js new file mode 100644 index 00000000..58ab9f36 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.int8-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.uint16-array.js b/node_modules/core-js/modules/es6.typed.uint16-array.js new file mode 100644 index 00000000..992805d6 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.uint16-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.uint32-array.js b/node_modules/core-js/modules/es6.typed.uint32-array.js new file mode 100644 index 00000000..5c444246 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.uint32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.uint8-array.js b/node_modules/core-js/modules/es6.typed.uint8-array.js new file mode 100644 index 00000000..465cdc80 --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.uint8-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); diff --git a/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js b/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js new file mode 100644 index 00000000..a84a1c1a --- /dev/null +++ b/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint8', 1, function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}, true); diff --git a/node_modules/core-js/modules/es6.weak-map.js b/node_modules/core-js/modules/es6.weak-map.js new file mode 100644 index 00000000..35605214 --- /dev/null +++ b/node_modules/core-js/modules/es6.weak-map.js @@ -0,0 +1,60 @@ +'use strict'; +var global = require('./_global'); +var each = require('./_array-methods')(0); +var redefine = require('./_redefine'); +var meta = require('./_meta'); +var assign = require('./_object-assign'); +var weak = require('./_collection-weak'); +var isObject = require('./_is-object'); +var validate = require('./_validate-collection'); +var NATIVE_WEAK_MAP = require('./_validate-collection'); +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +var InternalMap; + +var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; +}; + +var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); +} diff --git a/node_modules/core-js/modules/es6.weak-set.js b/node_modules/core-js/modules/es6.weak-set.js new file mode 100644 index 00000000..18a81e52 --- /dev/null +++ b/node_modules/core-js/modules/es6.weak-set.js @@ -0,0 +1,14 @@ +'use strict'; +var weak = require('./_collection-weak'); +var validate = require('./_validate-collection'); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +require('./_collection')(WEAK_SET, function (get) { + return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(validate(this, WEAK_SET), value, true); + } +}, weak, false, true); diff --git a/node_modules/core-js/modules/es7.array.flat-map.js b/node_modules/core-js/modules/es7.array.flat-map.js new file mode 100644 index 00000000..2a210cd3 --- /dev/null +++ b/node_modules/core-js/modules/es7.array.flat-map.js @@ -0,0 +1,22 @@ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var aFunction = require('./_a-function'); +var arraySpeciesCreate = require('./_array-species-create'); + +$export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + } +}); + +require('./_add-to-unscopables')('flatMap'); diff --git a/node_modules/core-js/modules/es7.array.flatten.js b/node_modules/core-js/modules/es7.array.flatten.js new file mode 100644 index 00000000..9019b2d1 --- /dev/null +++ b/node_modules/core-js/modules/es7.array.flatten.js @@ -0,0 +1,21 @@ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var toInteger = require('./_to-integer'); +var arraySpeciesCreate = require('./_array-species-create'); + +$export($export.P, 'Array', { + flatten: function flatten(/* depthArg = 1 */) { + var depthArg = arguments[0]; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + } +}); + +require('./_add-to-unscopables')('flatten'); diff --git a/node_modules/core-js/modules/es7.array.includes.js b/node_modules/core-js/modules/es7.array.includes.js new file mode 100644 index 00000000..1b77f0eb --- /dev/null +++ b/node_modules/core-js/modules/es7.array.includes.js @@ -0,0 +1,12 @@ +'use strict'; +// https://github.com/tc39/Array.prototype.includes +var $export = require('./_export'); +var $includes = require('./_array-includes')(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +require('./_add-to-unscopables')('includes'); diff --git a/node_modules/core-js/modules/es7.asap.js b/node_modules/core-js/modules/es7.asap.js new file mode 100644 index 00000000..d36f7c76 --- /dev/null +++ b/node_modules/core-js/modules/es7.asap.js @@ -0,0 +1,12 @@ +// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask +var $export = require('./_export'); +var microtask = require('./_microtask')(); +var process = require('./_global').process; +var isNode = require('./_cof')(process) == 'process'; + +$export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); diff --git a/node_modules/core-js/modules/es7.error.is-error.js b/node_modules/core-js/modules/es7.error.is-error.js new file mode 100644 index 00000000..ba94f5d1 --- /dev/null +++ b/node_modules/core-js/modules/es7.error.is-error.js @@ -0,0 +1,9 @@ +// https://github.com/ljharb/proposal-is-error +var $export = require('./_export'); +var cof = require('./_cof'); + +$export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + } +}); diff --git a/node_modules/core-js/modules/es7.global.js b/node_modules/core-js/modules/es7.global.js new file mode 100644 index 00000000..a315fd43 --- /dev/null +++ b/node_modules/core-js/modules/es7.global.js @@ -0,0 +1,4 @@ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.G, { global: require('./_global') }); diff --git a/node_modules/core-js/modules/es7.map.from.js b/node_modules/core-js/modules/es7.map.from.js new file mode 100644 index 00000000..a6057370 --- /dev/null +++ b/node_modules/core-js/modules/es7.map.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from +require('./_set-collection-from')('Map'); diff --git a/node_modules/core-js/modules/es7.map.of.js b/node_modules/core-js/modules/es7.map.of.js new file mode 100644 index 00000000..a2bf1fef --- /dev/null +++ b/node_modules/core-js/modules/es7.map.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +require('./_set-collection-of')('Map'); diff --git a/node_modules/core-js/modules/es7.map.to-json.js b/node_modules/core-js/modules/es7.map.to-json.js new file mode 100644 index 00000000..95a3569f --- /dev/null +++ b/node_modules/core-js/modules/es7.map.to-json.js @@ -0,0 +1,4 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = require('./_export'); + +$export($export.P + $export.R, 'Map', { toJSON: require('./_collection-to-json')('Map') }); diff --git a/node_modules/core-js/modules/es7.math.clamp.js b/node_modules/core-js/modules/es7.math.clamp.js new file mode 100644 index 00000000..319cda60 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.clamp.js @@ -0,0 +1,8 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + } +}); diff --git a/node_modules/core-js/modules/es7.math.deg-per-rad.js b/node_modules/core-js/modules/es7.math.deg-per-rad.js new file mode 100644 index 00000000..99b95bba --- /dev/null +++ b/node_modules/core-js/modules/es7.math.deg-per-rad.js @@ -0,0 +1,4 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); diff --git a/node_modules/core-js/modules/es7.math.degrees.js b/node_modules/core-js/modules/es7.math.degrees.js new file mode 100644 index 00000000..6637d915 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.degrees.js @@ -0,0 +1,9 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var RAD_PER_DEG = 180 / Math.PI; + +$export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + } +}); diff --git a/node_modules/core-js/modules/es7.math.fscale.js b/node_modules/core-js/modules/es7.math.fscale.js new file mode 100644 index 00000000..ad660a05 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.fscale.js @@ -0,0 +1,10 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var scale = require('./_math-scale'); +var fround = require('./_math-fround'); + +$export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + } +}); diff --git a/node_modules/core-js/modules/es7.math.iaddh.js b/node_modules/core-js/modules/es7.math.iaddh.js new file mode 100644 index 00000000..a331ba9b --- /dev/null +++ b/node_modules/core-js/modules/es7.math.iaddh.js @@ -0,0 +1,11 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } +}); diff --git a/node_modules/core-js/modules/es7.math.imulh.js b/node_modules/core-js/modules/es7.math.imulh.js new file mode 100644 index 00000000..58d19f3a --- /dev/null +++ b/node_modules/core-js/modules/es7.math.imulh.js @@ -0,0 +1,16 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + imulh: function imulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >> 16; + var v1 = $v >> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } +}); diff --git a/node_modules/core-js/modules/es7.math.isubh.js b/node_modules/core-js/modules/es7.math.isubh.js new file mode 100644 index 00000000..de22793c --- /dev/null +++ b/node_modules/core-js/modules/es7.math.isubh.js @@ -0,0 +1,11 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } +}); diff --git a/node_modules/core-js/modules/es7.math.rad-per-deg.js b/node_modules/core-js/modules/es7.math.rad-per-deg.js new file mode 100644 index 00000000..6f702596 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.rad-per-deg.js @@ -0,0 +1,4 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); diff --git a/node_modules/core-js/modules/es7.math.radians.js b/node_modules/core-js/modules/es7.math.radians.js new file mode 100644 index 00000000..abd9575f --- /dev/null +++ b/node_modules/core-js/modules/es7.math.radians.js @@ -0,0 +1,9 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var DEG_PER_RAD = Math.PI / 180; + +$export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + } +}); diff --git a/node_modules/core-js/modules/es7.math.scale.js b/node_modules/core-js/modules/es7.math.scale.js new file mode 100644 index 00000000..2866dcd7 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.scale.js @@ -0,0 +1,4 @@ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { scale: require('./_math-scale') }); diff --git a/node_modules/core-js/modules/es7.math.signbit.js b/node_modules/core-js/modules/es7.math.signbit.js new file mode 100644 index 00000000..c2568048 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.signbit.js @@ -0,0 +1,7 @@ +// http://jfbastien.github.io/papers/Math.signbit.html +var $export = require('./_export'); + +$export($export.S, 'Math', { signbit: function signbit(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; +} }); diff --git a/node_modules/core-js/modules/es7.math.umulh.js b/node_modules/core-js/modules/es7.math.umulh.js new file mode 100644 index 00000000..3ddfa468 --- /dev/null +++ b/node_modules/core-js/modules/es7.math.umulh.js @@ -0,0 +1,16 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + umulh: function umulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >>> 16; + var v1 = $v >>> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } +}); diff --git a/node_modules/core-js/modules/es7.object.define-getter.js b/node_modules/core-js/modules/es7.object.define-getter.js new file mode 100644 index 00000000..ffc6203f --- /dev/null +++ b/node_modules/core-js/modules/es7.object.define-getter.js @@ -0,0 +1,12 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } +}); diff --git a/node_modules/core-js/modules/es7.object.define-setter.js b/node_modules/core-js/modules/es7.object.define-setter.js new file mode 100644 index 00000000..8ceefdd6 --- /dev/null +++ b/node_modules/core-js/modules/es7.object.define-setter.js @@ -0,0 +1,12 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } +}); diff --git a/node_modules/core-js/modules/es7.object.entries.js b/node_modules/core-js/modules/es7.object.entries.js new file mode 100644 index 00000000..2f83437c --- /dev/null +++ b/node_modules/core-js/modules/es7.object.entries.js @@ -0,0 +1,9 @@ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $entries = require('./_object-to-array')(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); diff --git a/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js b/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js new file mode 100644 index 00000000..b1ab72fd --- /dev/null +++ b/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js @@ -0,0 +1,22 @@ +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = require('./_export'); +var ownKeys = require('./_own-keys'); +var toIObject = require('./_to-iobject'); +var gOPD = require('./_object-gopd'); +var createProperty = require('./_create-property'); + +$export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, key = keys[i++]); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + } +}); diff --git a/node_modules/core-js/modules/es7.object.lookup-getter.js b/node_modules/core-js/modules/es7.object.lookup-getter.js new file mode 100644 index 00000000..f8022291 --- /dev/null +++ b/node_modules/core-js/modules/es7.object.lookup-getter.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.get; + } while (O = getPrototypeOf(O)); + } +}); diff --git a/node_modules/core-js/modules/es7.object.lookup-setter.js b/node_modules/core-js/modules/es7.object.lookup-setter.js new file mode 100644 index 00000000..8bf8b64e --- /dev/null +++ b/node_modules/core-js/modules/es7.object.lookup-setter.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.set; + } while (O = getPrototypeOf(O)); + } +}); diff --git a/node_modules/core-js/modules/es7.object.values.js b/node_modules/core-js/modules/es7.object.values.js new file mode 100644 index 00000000..d6f09527 --- /dev/null +++ b/node_modules/core-js/modules/es7.object.values.js @@ -0,0 +1,9 @@ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $values = require('./_object-to-array')(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); diff --git a/node_modules/core-js/modules/es7.observable.js b/node_modules/core-js/modules/es7.observable.js new file mode 100644 index 00000000..6dcb2c8f --- /dev/null +++ b/node_modules/core-js/modules/es7.observable.js @@ -0,0 +1,199 @@ +'use strict'; +// https://github.com/zenparsing/es-observable +var $export = require('./_export'); +var global = require('./_global'); +var core = require('./_core'); +var microtask = require('./_microtask')(); +var OBSERVABLE = require('./_wks')('observable'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var anInstance = require('./_an-instance'); +var redefineAll = require('./_redefine-all'); +var hide = require('./_hide'); +var forOf = require('./_for-of'); +var RETURN = forOf.RETURN; + +var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); +}; + +var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } +}; + +var subscriptionClosed = function (subscription) { + return subscription._o === undefined; +}; + +var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } +}; + +var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer); + var subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } if (subscriptionClosed(this)) cleanupSubscription(this); +}; + +Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe() { closeSubscription(this); } +}); + +var SubscriptionObserver = function (subscription) { + this._s = subscription; +}; + +SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } +}); + +var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); +}; + +redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } +}); + +redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if (forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN) return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var j = 0; j < items.length; ++j) { + observer.next(items[j]); + if (done) return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + } +}); + +hide($Observable.prototype, OBSERVABLE, function () { return this; }); + +$export($export.G, { Observable: $Observable }); + +require('./_set-species')('Observable'); diff --git a/node_modules/core-js/modules/es7.promise.finally.js b/node_modules/core-js/modules/es7.promise.finally.js new file mode 100644 index 00000000..fa04b639 --- /dev/null +++ b/node_modules/core-js/modules/es7.promise.finally.js @@ -0,0 +1,20 @@ +// https://github.com/tc39/proposal-promise-finally +'use strict'; +var $export = require('./_export'); +var core = require('./_core'); +var global = require('./_global'); +var speciesConstructor = require('./_species-constructor'); +var promiseResolve = require('./_promise-resolve'); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); diff --git a/node_modules/core-js/modules/es7.promise.try.js b/node_modules/core-js/modules/es7.promise.try.js new file mode 100644 index 00000000..e8163720 --- /dev/null +++ b/node_modules/core-js/modules/es7.promise.try.js @@ -0,0 +1,12 @@ +'use strict'; +// https://github.com/tc39/proposal-promise-try +var $export = require('./_export'); +var newPromiseCapability = require('./_new-promise-capability'); +var perform = require('./_perform'); + +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); diff --git a/node_modules/core-js/modules/es7.reflect.define-metadata.js b/node_modules/core-js/modules/es7.reflect.define-metadata.js new file mode 100644 index 00000000..ebef52c2 --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.define-metadata.js @@ -0,0 +1,8 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var toMetaKey = metadata.key; +var ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.delete-metadata.js b/node_modules/core-js/modules/es7.reflect.delete-metadata.js new file mode 100644 index 00000000..590ed53c --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.delete-metadata.js @@ -0,0 +1,15 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var toMetaKey = metadata.key; +var getOrCreateMetadataMap = metadata.map; +var store = metadata.store; + +metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); + var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; + if (metadataMap.size) return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js b/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js new file mode 100644 index 00000000..f344172b --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js @@ -0,0 +1,19 @@ +var Set = require('./es6.set'); +var from = require('./_array-from-iterable'); +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var parent = getPrototypeOf(O); + if (parent === null) return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; +}; + +metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { + return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.get-metadata.js b/node_modules/core-js/modules/es7.reflect.get-metadata.js new file mode 100644 index 00000000..58c278e9 --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.get-metadata.js @@ -0,0 +1,17 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryHasOwnMetadata = metadata.has; +var ordinaryGetOwnMetadata = metadata.get; +var toMetaKey = metadata.key; + +var ordinaryGetMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; +}; + +metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js b/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js new file mode 100644 index 00000000..03e3201b --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js @@ -0,0 +1,8 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.get-own-metadata.js b/node_modules/core-js/modules/es7.reflect.get-own-metadata.js new file mode 100644 index 00000000..4a18b071 --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.get-own-metadata.js @@ -0,0 +1,9 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryGetOwnMetadata = metadata.get; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.has-metadata.js b/node_modules/core-js/modules/es7.reflect.has-metadata.js new file mode 100644 index 00000000..b934bb4e --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.has-metadata.js @@ -0,0 +1,16 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryHasOwnMetadata = metadata.has; +var toMetaKey = metadata.key; + +var ordinaryHasMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; +}; + +metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.has-own-metadata.js b/node_modules/core-js/modules/es7.reflect.has-own-metadata.js new file mode 100644 index 00000000..512850dd --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.has-own-metadata.js @@ -0,0 +1,9 @@ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryHasOwnMetadata = metadata.has; +var toMetaKey = metadata.key; + +metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); diff --git a/node_modules/core-js/modules/es7.reflect.metadata.js b/node_modules/core-js/modules/es7.reflect.metadata.js new file mode 100644 index 00000000..efb9a9e2 --- /dev/null +++ b/node_modules/core-js/modules/es7.reflect.metadata.js @@ -0,0 +1,15 @@ +var $metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +var toMetaKey = $metadata.key; +var ordinaryDefineOwnMetadata = $metadata.set; + +$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) { + return function decorator(target, targetKey) { + ordinaryDefineOwnMetadata( + metadataKey, metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey) + ); + }; +} }); diff --git a/node_modules/core-js/modules/es7.set.from.js b/node_modules/core-js/modules/es7.set.from.js new file mode 100644 index 00000000..26542b66 --- /dev/null +++ b/node_modules/core-js/modules/es7.set.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +require('./_set-collection-from')('Set'); diff --git a/node_modules/core-js/modules/es7.set.of.js b/node_modules/core-js/modules/es7.set.of.js new file mode 100644 index 00000000..2a50ad91 --- /dev/null +++ b/node_modules/core-js/modules/es7.set.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +require('./_set-collection-of')('Set'); diff --git a/node_modules/core-js/modules/es7.set.to-json.js b/node_modules/core-js/modules/es7.set.to-json.js new file mode 100644 index 00000000..95cbcfa5 --- /dev/null +++ b/node_modules/core-js/modules/es7.set.to-json.js @@ -0,0 +1,4 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = require('./_export'); + +$export($export.P + $export.R, 'Set', { toJSON: require('./_collection-to-json')('Set') }); diff --git a/node_modules/core-js/modules/es7.string.at.js b/node_modules/core-js/modules/es7.string.at.js new file mode 100644 index 00000000..8b3ab98d --- /dev/null +++ b/node_modules/core-js/modules/es7.string.at.js @@ -0,0 +1,10 @@ +'use strict'; +// https://github.com/mathiasbynens/String.prototype.at +var $export = require('./_export'); +var $at = require('./_string-at')(true); + +$export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + } +}); diff --git a/node_modules/core-js/modules/es7.string.match-all.js b/node_modules/core-js/modules/es7.string.match-all.js new file mode 100644 index 00000000..78237036 --- /dev/null +++ b/node_modules/core-js/modules/es7.string.match-all.js @@ -0,0 +1,30 @@ +'use strict'; +// https://tc39.github.io/String.prototype.matchAll/ +var $export = require('./_export'); +var defined = require('./_defined'); +var toLength = require('./_to-length'); +var isRegExp = require('./_is-regexp'); +var getFlags = require('./_flags'); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +require('./_iter-create')($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; +}); + +$export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this); + var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); + var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } +}); diff --git a/node_modules/core-js/modules/es7.string.pad-end.js b/node_modules/core-js/modules/es7.string.pad-end.js new file mode 100644 index 00000000..5a531a1c --- /dev/null +++ b/node_modules/core-js/modules/es7.string.pad-end.js @@ -0,0 +1,14 @@ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); diff --git a/node_modules/core-js/modules/es7.string.pad-start.js b/node_modules/core-js/modules/es7.string.pad-start.js new file mode 100644 index 00000000..729ed933 --- /dev/null +++ b/node_modules/core-js/modules/es7.string.pad-start.js @@ -0,0 +1,14 @@ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); diff --git a/node_modules/core-js/modules/es7.string.trim-left.js b/node_modules/core-js/modules/es7.string.trim-left.js new file mode 100644 index 00000000..39a4b47c --- /dev/null +++ b/node_modules/core-js/modules/es7.string.trim-left.js @@ -0,0 +1,7 @@ +'use strict'; +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +require('./_string-trim')('trimLeft', function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; +}, 'trimStart'); diff --git a/node_modules/core-js/modules/es7.string.trim-right.js b/node_modules/core-js/modules/es7.string.trim-right.js new file mode 100644 index 00000000..7b7c4529 --- /dev/null +++ b/node_modules/core-js/modules/es7.string.trim-right.js @@ -0,0 +1,7 @@ +'use strict'; +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +require('./_string-trim')('trimRight', function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; +}, 'trimEnd'); diff --git a/node_modules/core-js/modules/es7.symbol.async-iterator.js b/node_modules/core-js/modules/es7.symbol.async-iterator.js new file mode 100644 index 00000000..f56dc2a8 --- /dev/null +++ b/node_modules/core-js/modules/es7.symbol.async-iterator.js @@ -0,0 +1 @@ +require('./_wks-define')('asyncIterator'); diff --git a/node_modules/core-js/modules/es7.symbol.observable.js b/node_modules/core-js/modules/es7.symbol.observable.js new file mode 100644 index 00000000..fc9a2376 --- /dev/null +++ b/node_modules/core-js/modules/es7.symbol.observable.js @@ -0,0 +1 @@ +require('./_wks-define')('observable'); diff --git a/node_modules/core-js/modules/es7.system.global.js b/node_modules/core-js/modules/es7.system.global.js new file mode 100644 index 00000000..310a802a --- /dev/null +++ b/node_modules/core-js/modules/es7.system.global.js @@ -0,0 +1,4 @@ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.S, 'System', { global: require('./_global') }); diff --git a/node_modules/core-js/modules/es7.weak-map.from.js b/node_modules/core-js/modules/es7.weak-map.from.js new file mode 100644 index 00000000..1a013657 --- /dev/null +++ b/node_modules/core-js/modules/es7.weak-map.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +require('./_set-collection-from')('WeakMap'); diff --git a/node_modules/core-js/modules/es7.weak-map.of.js b/node_modules/core-js/modules/es7.weak-map.of.js new file mode 100644 index 00000000..52c3f66d --- /dev/null +++ b/node_modules/core-js/modules/es7.weak-map.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of +require('./_set-collection-of')('WeakMap'); diff --git a/node_modules/core-js/modules/es7.weak-set.from.js b/node_modules/core-js/modules/es7.weak-set.from.js new file mode 100644 index 00000000..493e5bee --- /dev/null +++ b/node_modules/core-js/modules/es7.weak-set.from.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from +require('./_set-collection-from')('WeakSet'); diff --git a/node_modules/core-js/modules/es7.weak-set.of.js b/node_modules/core-js/modules/es7.weak-set.of.js new file mode 100644 index 00000000..5941e72a --- /dev/null +++ b/node_modules/core-js/modules/es7.weak-set.of.js @@ -0,0 +1,2 @@ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +require('./_set-collection-of')('WeakSet'); diff --git a/node_modules/core-js/modules/library/_add-to-unscopables.js b/node_modules/core-js/modules/library/_add-to-unscopables.js new file mode 100644 index 00000000..02ef44ba --- /dev/null +++ b/node_modules/core-js/modules/library/_add-to-unscopables.js @@ -0,0 +1 @@ +module.exports = function () { /* empty */ }; diff --git a/node_modules/core-js/modules/library/_collection.js b/node_modules/core-js/modules/library/_collection.js new file mode 100644 index 00000000..31a36b87 --- /dev/null +++ b/node_modules/core-js/modules/library/_collection.js @@ -0,0 +1,59 @@ +'use strict'; +var global = require('./_global'); +var $export = require('./_export'); +var meta = require('./_meta'); +var fails = require('./_fails'); +var hide = require('./_hide'); +var redefineAll = require('./_redefine-all'); +var forOf = require('./_for-of'); +var anInstance = require('./_an-instance'); +var isObject = require('./_is-object'); +var setToStringTag = require('./_set-to-string-tag'); +var dP = require('./_object-dp').f; +var each = require('./_array-methods')(0); +var DESCRIPTORS = require('./_descriptors'); + +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) { + anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + IS_WEAK || dP(C.prototype, 'size', { + get: function () { + return this._c.size; + } + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; +}; diff --git a/node_modules/core-js/modules/library/_export.js b/node_modules/core-js/modules/library/_export.js new file mode 100644 index 00000000..02bddc0a --- /dev/null +++ b/node_modules/core-js/modules/library/_export.js @@ -0,0 +1,62 @@ +var global = require('./_global'); +var core = require('./_core'); +var ctx = require('./_ctx'); +var hide = require('./_hide'); +var has = require('./_has'); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; diff --git a/node_modules/core-js/modules/library/_library.js b/node_modules/core-js/modules/library/_library.js new file mode 100644 index 00000000..ec01c2c1 --- /dev/null +++ b/node_modules/core-js/modules/library/_library.js @@ -0,0 +1 @@ +module.exports = true; diff --git a/node_modules/core-js/modules/library/_path.js b/node_modules/core-js/modules/library/_path.js new file mode 100644 index 00000000..2796ebcb --- /dev/null +++ b/node_modules/core-js/modules/library/_path.js @@ -0,0 +1 @@ +module.exports = require('./_core'); diff --git a/node_modules/core-js/modules/library/_redefine-all.js b/node_modules/core-js/modules/library/_redefine-all.js new file mode 100644 index 00000000..bf8c0ea3 --- /dev/null +++ b/node_modules/core-js/modules/library/_redefine-all.js @@ -0,0 +1,7 @@ +var hide = require('./_hide'); +module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; diff --git a/node_modules/core-js/modules/library/_redefine.js b/node_modules/core-js/modules/library/_redefine.js new file mode 100644 index 00000000..fde6108e --- /dev/null +++ b/node_modules/core-js/modules/library/_redefine.js @@ -0,0 +1 @@ +module.exports = require('./_hide'); diff --git a/node_modules/core-js/modules/library/_regexp-exec-abstract.js b/node_modules/core-js/modules/library/_regexp-exec-abstract.js new file mode 100644 index 00000000..8b1a3937 --- /dev/null +++ b/node_modules/core-js/modules/library/_regexp-exec-abstract.js @@ -0,0 +1 @@ +// empty diff --git a/node_modules/core-js/modules/library/_regexp-exec.js b/node_modules/core-js/modules/library/_regexp-exec.js new file mode 100644 index 00000000..8b1a3937 --- /dev/null +++ b/node_modules/core-js/modules/library/_regexp-exec.js @@ -0,0 +1 @@ +// empty diff --git a/node_modules/core-js/modules/library/_set-species.js b/node_modules/core-js/modules/library/_set-species.js new file mode 100644 index 00000000..1f25fde1 --- /dev/null +++ b/node_modules/core-js/modules/library/_set-species.js @@ -0,0 +1,14 @@ +'use strict'; +var global = require('./_global'); +var core = require('./_core'); +var dP = require('./_object-dp'); +var DESCRIPTORS = require('./_descriptors'); +var SPECIES = require('./_wks')('species'); + +module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; diff --git a/node_modules/core-js/modules/library/es6.date.to-json.js b/node_modules/core-js/modules/library/es6.date.to-json.js new file mode 100644 index 00000000..69b1f301 --- /dev/null +++ b/node_modules/core-js/modules/library/es6.date.to-json.js @@ -0,0 +1,19 @@ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var toISOString = require('./_date-to-iso-string'); +var classof = require('./_classof'); + +$export($export.P + $export.F * require('./_fails')(function () { + return new Date(NaN).toJSON() !== null + || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1; +}), 'Date', { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : + (!('toISOString' in O) && classof(O) == 'Date') ? toISOString.call(O) : O.toISOString(); + } +}); diff --git a/node_modules/core-js/modules/library/es6.date.to-primitive.js b/node_modules/core-js/modules/library/es6.date.to-primitive.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/modules/library/es6.date.to-string.js b/node_modules/core-js/modules/library/es6.date.to-string.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/modules/library/es6.function.name.js b/node_modules/core-js/modules/library/es6.function.name.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/modules/library/es6.number.constructor.js b/node_modules/core-js/modules/library/es6.number.constructor.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/modules/library/es6.object.to-string.js b/node_modules/core-js/modules/library/es6.object.to-string.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/modules/library/es6.regexp.constructor.js b/node_modules/core-js/modules/library/es6.regexp.constructor.js new file mode 100644 index 00000000..e85e3141 --- /dev/null +++ b/node_modules/core-js/modules/library/es6.regexp.constructor.js @@ -0,0 +1 @@ +require('./_set-species')('RegExp'); diff --git a/node_modules/core-js/modules/library/es6.regexp.exec.js b/node_modules/core-js/modules/library/es6.regexp.exec.js new file mode 100644 index 00000000..8b1a3937 --- /dev/null +++ b/node_modules/core-js/modules/library/es6.regexp.exec.js @@ -0,0 +1 @@ +// empty diff --git a/node_modules/core-js/modules/library/es6.regexp.flags.js b/node_modules/core-js/modules/library/es6.regexp.flags.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/modules/library/es6.regexp.match.js b/node_modules/core-js/modules/library/es6.regexp.match.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/modules/library/es6.regexp.replace.js b/node_modules/core-js/modules/library/es6.regexp.replace.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/modules/library/es6.regexp.search.js b/node_modules/core-js/modules/library/es6.regexp.search.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/modules/library/es6.regexp.split.js b/node_modules/core-js/modules/library/es6.regexp.split.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/modules/library/es6.regexp.to-string.js b/node_modules/core-js/modules/library/es6.regexp.to-string.js new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/core-js/modules/library/web.dom.iterable.js b/node_modules/core-js/modules/library/web.dom.iterable.js new file mode 100644 index 00000000..fc00afac --- /dev/null +++ b/node_modules/core-js/modules/library/web.dom.iterable.js @@ -0,0 +1,19 @@ +require('./es6.array.iterator'); +var global = require('./_global'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var TO_STRING_TAG = require('./_wks')('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} diff --git a/node_modules/core-js/modules/web.dom.iterable.js b/node_modules/core-js/modules/web.dom.iterable.js new file mode 100644 index 00000000..40834b02 --- /dev/null +++ b/node_modules/core-js/modules/web.dom.iterable.js @@ -0,0 +1,58 @@ +var $iterators = require('./es6.array.iterator'); +var getKeys = require('./_object-keys'); +var redefine = require('./_redefine'); +var global = require('./_global'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var wks = require('./_wks'); +var ITERATOR = wks('iterator'); +var TO_STRING_TAG = wks('toStringTag'); +var ArrayValues = Iterators.Array; + +var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false +}; + +for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } +} diff --git a/node_modules/core-js/modules/web.immediate.js b/node_modules/core-js/modules/web.immediate.js new file mode 100644 index 00000000..70f3e70d --- /dev/null +++ b/node_modules/core-js/modules/web.immediate.js @@ -0,0 +1,6 @@ +var $export = require('./_export'); +var $task = require('./_task'); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); diff --git a/node_modules/core-js/modules/web.timers.js b/node_modules/core-js/modules/web.timers.js new file mode 100644 index 00000000..c8790830 --- /dev/null +++ b/node_modules/core-js/modules/web.timers.js @@ -0,0 +1,20 @@ +// ie9- setTimeout & setInterval additional parameters fix +var global = require('./_global'); +var $export = require('./_export'); +var userAgent = require('./_user-agent'); +var slice = [].slice; +var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check +var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set(boundArgs ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } : fn, time); + }; +}; +$export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) +}); diff --git a/node_modules/core-js/package.json b/node_modules/core-js/package.json new file mode 100644 index 00000000..e5760f45 --- /dev/null +++ b/node_modules/core-js/package.json @@ -0,0 +1,73 @@ +{ + "name": "core-js", + "description": "Standard library", + "version": "2.6.9", + "repository": { + "type": "git", + "url": "https://github.com/zloirock/core-js.git" + }, + "main": "index.js", + "devDependencies": { + "LiveScript": "1.3.x", + "es-observable-tests": "0.2.x", + "eslint": "4.19.x", + "eslint-plugin-import": "2.12.x", + "grunt": "^1.0.2", + "grunt-cli": "^1.2.0", + "grunt-contrib-clean": "^1.1.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-uglify": "3.3.x", + "grunt-contrib-watch": "^1.0.0", + "grunt-karma": "^2.0.0", + "grunt-livescript": "0.6.x", + "karma": "^2.0.0", + "karma-qunit": "^2.1.0", + "karma-chrome-launcher": "^2.2.0", + "karma-firefox-launcher": "^1.0.1", + "karma-ie-launcher": "^1.0.0", + "karma-phantomjs-launcher": "1.0.x", + "phantomjs-prebuilt": "2.1.x", + "promises-aplus-tests": "^2.1.2", + "qunit": "2.6.x", + "temp": "^0.8.3", + "webpack": "^3.11.0" + }, + "scripts": { + "grunt": "grunt", + "lint": "eslint ./", + "promises-tests": "promises-aplus-tests tests/promises-aplus/adapter", + "observables-tests": "node tests/observables/adapter && node tests/observables/adapter-library", + "test": "npm run grunt clean copy && npm run lint && npm run grunt livescript client karma:default && npm run grunt library karma:library && npm run promises-tests && npm run observables-tests && lsc tests/commonjs", + "postinstall": "node scripts/postinstall || echo \"ignore\"" + }, + "license": "MIT", + "keywords": [ + "ES3", + "ES5", + "ES6", + "ES7", + "ES2015", + "ES2016", + "ES2017", + "ECMAScript 3", + "ECMAScript 5", + "ECMAScript 6", + "ECMAScript 7", + "ECMAScript 2015", + "ECMAScript 2016", + "ECMAScript 2017", + "Harmony", + "Strawman", + "Map", + "Set", + "WeakMap", + "WeakSet", + "Promise", + "Symbol", + "TypedArray", + "setImmediate", + "Dict", + "polyfill", + "shim" + ] +} diff --git a/node_modules/core-js/scripts/postinstall.js b/node_modules/core-js/scripts/postinstall.js new file mode 100644 index 00000000..e3b1c0d7 --- /dev/null +++ b/node_modules/core-js/scripts/postinstall.js @@ -0,0 +1,23 @@ +/* eslint-disable max-len */ +var env = process.env; +var ADBLOCK = is(env.ADBLOCK); +var CI = is(env.CI); +var COLOR = is(env.npm_config_color); +var SILENT = !!~['silent', 'error', 'warn'].indexOf(env.npm_config_loglevel); + +function is(it) { + return !!it && it !== '0' && it !== 'false'; +} + +function log(it) { + // eslint-disable-next-line no-console,no-control-regex + console.log(COLOR ? it : it.replace(/\u001B\[\d+m/g, '')); +} + +if (!ADBLOCK && !CI && !SILENT) { + log('\u001B[96mThank you for using core-js (\u001B[94m https://github.com/zloirock/core-js \u001B[96m) for polyfilling JavaScript standard library!\u001B[0m\n'); + log('\u001B[96mThe project needs your help! Please consider supporting of core-js on Open Collective or Patreon: \u001B[0m'); + log('\u001B[96m>\u001B[94m https://opencollective.com/core-js \u001B[0m'); + log('\u001B[96m>\u001B[94m https://www.patreon.com/zloirock \u001B[0m\n'); + log('\u001B[96mAlso, the author of core-js (\u001B[94m https://github.com/zloirock \u001B[96m) is looking for a good job -)\u001B[0m\n'); +} diff --git a/node_modules/core-js/shim.js b/node_modules/core-js/shim.js new file mode 100644 index 00000000..e2d53f45 --- /dev/null +++ b/node_modules/core-js/shim.js @@ -0,0 +1,198 @@ +require('./modules/es6.symbol'); +require('./modules/es6.object.create'); +require('./modules/es6.object.define-property'); +require('./modules/es6.object.define-properties'); +require('./modules/es6.object.get-own-property-descriptor'); +require('./modules/es6.object.get-prototype-of'); +require('./modules/es6.object.keys'); +require('./modules/es6.object.get-own-property-names'); +require('./modules/es6.object.freeze'); +require('./modules/es6.object.seal'); +require('./modules/es6.object.prevent-extensions'); +require('./modules/es6.object.is-frozen'); +require('./modules/es6.object.is-sealed'); +require('./modules/es6.object.is-extensible'); +require('./modules/es6.object.assign'); +require('./modules/es6.object.is'); +require('./modules/es6.object.set-prototype-of'); +require('./modules/es6.object.to-string'); +require('./modules/es6.function.bind'); +require('./modules/es6.function.name'); +require('./modules/es6.function.has-instance'); +require('./modules/es6.parse-int'); +require('./modules/es6.parse-float'); +require('./modules/es6.number.constructor'); +require('./modules/es6.number.to-fixed'); +require('./modules/es6.number.to-precision'); +require('./modules/es6.number.epsilon'); +require('./modules/es6.number.is-finite'); +require('./modules/es6.number.is-integer'); +require('./modules/es6.number.is-nan'); +require('./modules/es6.number.is-safe-integer'); +require('./modules/es6.number.max-safe-integer'); +require('./modules/es6.number.min-safe-integer'); +require('./modules/es6.number.parse-float'); +require('./modules/es6.number.parse-int'); +require('./modules/es6.math.acosh'); +require('./modules/es6.math.asinh'); +require('./modules/es6.math.atanh'); +require('./modules/es6.math.cbrt'); +require('./modules/es6.math.clz32'); +require('./modules/es6.math.cosh'); +require('./modules/es6.math.expm1'); +require('./modules/es6.math.fround'); +require('./modules/es6.math.hypot'); +require('./modules/es6.math.imul'); +require('./modules/es6.math.log10'); +require('./modules/es6.math.log1p'); +require('./modules/es6.math.log2'); +require('./modules/es6.math.sign'); +require('./modules/es6.math.sinh'); +require('./modules/es6.math.tanh'); +require('./modules/es6.math.trunc'); +require('./modules/es6.string.from-code-point'); +require('./modules/es6.string.raw'); +require('./modules/es6.string.trim'); +require('./modules/es6.string.iterator'); +require('./modules/es6.string.code-point-at'); +require('./modules/es6.string.ends-with'); +require('./modules/es6.string.includes'); +require('./modules/es6.string.repeat'); +require('./modules/es6.string.starts-with'); +require('./modules/es6.string.anchor'); +require('./modules/es6.string.big'); +require('./modules/es6.string.blink'); +require('./modules/es6.string.bold'); +require('./modules/es6.string.fixed'); +require('./modules/es6.string.fontcolor'); +require('./modules/es6.string.fontsize'); +require('./modules/es6.string.italics'); +require('./modules/es6.string.link'); +require('./modules/es6.string.small'); +require('./modules/es6.string.strike'); +require('./modules/es6.string.sub'); +require('./modules/es6.string.sup'); +require('./modules/es6.date.now'); +require('./modules/es6.date.to-json'); +require('./modules/es6.date.to-iso-string'); +require('./modules/es6.date.to-string'); +require('./modules/es6.date.to-primitive'); +require('./modules/es6.array.is-array'); +require('./modules/es6.array.from'); +require('./modules/es6.array.of'); +require('./modules/es6.array.join'); +require('./modules/es6.array.slice'); +require('./modules/es6.array.sort'); +require('./modules/es6.array.for-each'); +require('./modules/es6.array.map'); +require('./modules/es6.array.filter'); +require('./modules/es6.array.some'); +require('./modules/es6.array.every'); +require('./modules/es6.array.reduce'); +require('./modules/es6.array.reduce-right'); +require('./modules/es6.array.index-of'); +require('./modules/es6.array.last-index-of'); +require('./modules/es6.array.copy-within'); +require('./modules/es6.array.fill'); +require('./modules/es6.array.find'); +require('./modules/es6.array.find-index'); +require('./modules/es6.array.species'); +require('./modules/es6.array.iterator'); +require('./modules/es6.regexp.constructor'); +require('./modules/es6.regexp.exec'); +require('./modules/es6.regexp.to-string'); +require('./modules/es6.regexp.flags'); +require('./modules/es6.regexp.match'); +require('./modules/es6.regexp.replace'); +require('./modules/es6.regexp.search'); +require('./modules/es6.regexp.split'); +require('./modules/es6.promise'); +require('./modules/es6.map'); +require('./modules/es6.set'); +require('./modules/es6.weak-map'); +require('./modules/es6.weak-set'); +require('./modules/es6.typed.array-buffer'); +require('./modules/es6.typed.data-view'); +require('./modules/es6.typed.int8-array'); +require('./modules/es6.typed.uint8-array'); +require('./modules/es6.typed.uint8-clamped-array'); +require('./modules/es6.typed.int16-array'); +require('./modules/es6.typed.uint16-array'); +require('./modules/es6.typed.int32-array'); +require('./modules/es6.typed.uint32-array'); +require('./modules/es6.typed.float32-array'); +require('./modules/es6.typed.float64-array'); +require('./modules/es6.reflect.apply'); +require('./modules/es6.reflect.construct'); +require('./modules/es6.reflect.define-property'); +require('./modules/es6.reflect.delete-property'); +require('./modules/es6.reflect.enumerate'); +require('./modules/es6.reflect.get'); +require('./modules/es6.reflect.get-own-property-descriptor'); +require('./modules/es6.reflect.get-prototype-of'); +require('./modules/es6.reflect.has'); +require('./modules/es6.reflect.is-extensible'); +require('./modules/es6.reflect.own-keys'); +require('./modules/es6.reflect.prevent-extensions'); +require('./modules/es6.reflect.set'); +require('./modules/es6.reflect.set-prototype-of'); +require('./modules/es7.array.includes'); +require('./modules/es7.array.flat-map'); +require('./modules/es7.array.flatten'); +require('./modules/es7.string.at'); +require('./modules/es7.string.pad-start'); +require('./modules/es7.string.pad-end'); +require('./modules/es7.string.trim-left'); +require('./modules/es7.string.trim-right'); +require('./modules/es7.string.match-all'); +require('./modules/es7.symbol.async-iterator'); +require('./modules/es7.symbol.observable'); +require('./modules/es7.object.get-own-property-descriptors'); +require('./modules/es7.object.values'); +require('./modules/es7.object.entries'); +require('./modules/es7.object.define-getter'); +require('./modules/es7.object.define-setter'); +require('./modules/es7.object.lookup-getter'); +require('./modules/es7.object.lookup-setter'); +require('./modules/es7.map.to-json'); +require('./modules/es7.set.to-json'); +require('./modules/es7.map.of'); +require('./modules/es7.set.of'); +require('./modules/es7.weak-map.of'); +require('./modules/es7.weak-set.of'); +require('./modules/es7.map.from'); +require('./modules/es7.set.from'); +require('./modules/es7.weak-map.from'); +require('./modules/es7.weak-set.from'); +require('./modules/es7.global'); +require('./modules/es7.system.global'); +require('./modules/es7.error.is-error'); +require('./modules/es7.math.clamp'); +require('./modules/es7.math.deg-per-rad'); +require('./modules/es7.math.degrees'); +require('./modules/es7.math.fscale'); +require('./modules/es7.math.iaddh'); +require('./modules/es7.math.isubh'); +require('./modules/es7.math.imulh'); +require('./modules/es7.math.rad-per-deg'); +require('./modules/es7.math.radians'); +require('./modules/es7.math.scale'); +require('./modules/es7.math.umulh'); +require('./modules/es7.math.signbit'); +require('./modules/es7.promise.finally'); +require('./modules/es7.promise.try'); +require('./modules/es7.reflect.define-metadata'); +require('./modules/es7.reflect.delete-metadata'); +require('./modules/es7.reflect.get-metadata'); +require('./modules/es7.reflect.get-metadata-keys'); +require('./modules/es7.reflect.get-own-metadata'); +require('./modules/es7.reflect.get-own-metadata-keys'); +require('./modules/es7.reflect.has-metadata'); +require('./modules/es7.reflect.has-own-metadata'); +require('./modules/es7.reflect.metadata'); +require('./modules/es7.asap'); +require('./modules/es7.observable'); +require('./modules/web.timers'); +require('./modules/web.immediate'); +require('./modules/web.dom.iterable'); +module.exports = require('./modules/_core'); diff --git a/node_modules/core-js/stage/0.js b/node_modules/core-js/stage/0.js new file mode 100644 index 00000000..4aa50704 --- /dev/null +++ b/node_modules/core-js/stage/0.js @@ -0,0 +1,10 @@ +require('../modules/es7.string.at'); +require('../modules/es7.map.to-json'); +require('../modules/es7.set.to-json'); +require('../modules/es7.error.is-error'); +require('../modules/es7.math.iaddh'); +require('../modules/es7.math.isubh'); +require('../modules/es7.math.imulh'); +require('../modules/es7.math.umulh'); +require('../modules/es7.asap'); +module.exports = require('./1'); diff --git a/node_modules/core-js/stage/1.js b/node_modules/core-js/stage/1.js new file mode 100644 index 00000000..5f634d80 --- /dev/null +++ b/node_modules/core-js/stage/1.js @@ -0,0 +1,23 @@ +require('../modules/es7.map.of'); +require('../modules/es7.set.of'); +require('../modules/es7.weak-map.of'); +require('../modules/es7.weak-set.of'); +require('../modules/es7.map.from'); +require('../modules/es7.set.from'); +require('../modules/es7.weak-map.from'); +require('../modules/es7.weak-set.from'); +require('../modules/es7.math.clamp'); +require('../modules/es7.math.deg-per-rad'); +require('../modules/es7.math.degrees'); +require('../modules/es7.math.fscale'); +require('../modules/es7.math.rad-per-deg'); +require('../modules/es7.math.radians'); +require('../modules/es7.math.scale'); +require('../modules/es7.math.signbit'); +require('../modules/es7.promise.try'); +require('../modules/es7.string.match-all'); +require('../modules/es7.symbol.observable'); +require('../modules/es7.observable'); +require('../modules/es7.array.flat-map'); +require('../modules/es7.array.flatten'); +module.exports = require('./2'); diff --git a/node_modules/core-js/stage/2.js b/node_modules/core-js/stage/2.js new file mode 100644 index 00000000..d7aaa0ef --- /dev/null +++ b/node_modules/core-js/stage/2.js @@ -0,0 +1,4 @@ +require('../modules/es7.string.trim-left'); +require('../modules/es7.string.trim-right'); +require('../modules/es7.symbol.async-iterator'); +module.exports = require('./3'); diff --git a/node_modules/core-js/stage/3.js b/node_modules/core-js/stage/3.js new file mode 100644 index 00000000..9afd07fe --- /dev/null +++ b/node_modules/core-js/stage/3.js @@ -0,0 +1,4 @@ +require('../modules/es7.global'); +require('../modules/es7.system.global'); +require('../modules/es7.promise.finally'); +module.exports = require('./4'); diff --git a/node_modules/core-js/stage/4.js b/node_modules/core-js/stage/4.js new file mode 100644 index 00000000..875762a2 --- /dev/null +++ b/node_modules/core-js/stage/4.js @@ -0,0 +1,11 @@ +require('../modules/es7.object.define-getter'); +require('../modules/es7.object.define-setter'); +require('../modules/es7.object.lookup-getter'); +require('../modules/es7.object.lookup-setter'); +require('../modules/es7.object.values'); +require('../modules/es7.object.entries'); +require('../modules/es7.object.get-own-property-descriptors'); +require('../modules/es7.array.includes'); +require('../modules/es7.string.pad-start'); +require('../modules/es7.string.pad-end'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/stage/index.js b/node_modules/core-js/stage/index.js new file mode 100644 index 00000000..24dcf2e5 --- /dev/null +++ b/node_modules/core-js/stage/index.js @@ -0,0 +1 @@ +module.exports = require('./pre'); diff --git a/node_modules/core-js/stage/pre.js b/node_modules/core-js/stage/pre.js new file mode 100644 index 00000000..ed197a8b --- /dev/null +++ b/node_modules/core-js/stage/pre.js @@ -0,0 +1,10 @@ +require('../modules/es7.reflect.define-metadata'); +require('../modules/es7.reflect.delete-metadata'); +require('../modules/es7.reflect.get-metadata'); +require('../modules/es7.reflect.get-metadata-keys'); +require('../modules/es7.reflect.get-own-metadata'); +require('../modules/es7.reflect.get-own-metadata-keys'); +require('../modules/es7.reflect.has-metadata'); +require('../modules/es7.reflect.has-own-metadata'); +require('../modules/es7.reflect.metadata'); +module.exports = require('./0'); diff --git a/node_modules/core-js/web/dom-collections.js b/node_modules/core-js/web/dom-collections.js new file mode 100644 index 00000000..a138bb9d --- /dev/null +++ b/node_modules/core-js/web/dom-collections.js @@ -0,0 +1,2 @@ +require('../modules/web.dom.iterable'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/web/immediate.js b/node_modules/core-js/web/immediate.js new file mode 100644 index 00000000..6866abde --- /dev/null +++ b/node_modules/core-js/web/immediate.js @@ -0,0 +1,2 @@ +require('../modules/web.immediate'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/web/index.js b/node_modules/core-js/web/index.js new file mode 100644 index 00000000..66db256d --- /dev/null +++ b/node_modules/core-js/web/index.js @@ -0,0 +1,4 @@ +require('../modules/web.timers'); +require('../modules/web.immediate'); +require('../modules/web.dom.iterable'); +module.exports = require('../modules/_core'); diff --git a/node_modules/core-js/web/timers.js b/node_modules/core-js/web/timers.js new file mode 100644 index 00000000..a3f528e4 --- /dev/null +++ b/node_modules/core-js/web/timers.js @@ -0,0 +1,2 @@ +require('../modules/web.timers'); +module.exports = require('../modules/_core'); diff --git a/node_modules/d/.editorconfig b/node_modules/d/.editorconfig new file mode 100755 index 00000000..cbfa577a --- /dev/null +++ b/node_modules/d/.editorconfig @@ -0,0 +1,15 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +trim_trailing_whitespace = true + +[{*.md,*.yml}] +indent_size = 2 +indent_style = space diff --git a/node_modules/d/.github/FUNDING.yml b/node_modules/d/.github/FUNDING.yml new file mode 100644 index 00000000..bd80ae65 --- /dev/null +++ b/node_modules/d/.github/FUNDING.yml @@ -0,0 +1 @@ +tidelift: "npm/d" diff --git a/node_modules/d/CHANGELOG.md b/node_modules/d/CHANGELOG.md new file mode 100644 index 00000000..d30cc82b --- /dev/null +++ b/node_modules/d/CHANGELOG.md @@ -0,0 +1,9 @@ +# 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. + +### [1.0.1](https://github.com/medikoo/d/compare/v0.1.1...v1.0.1) (2019-06-14) + +## Changelog for previous versions + +See `CHANGES` file diff --git a/node_modules/d/CHANGES b/node_modules/d/CHANGES new file mode 100644 index 00000000..73234d5c --- /dev/null +++ b/node_modules/d/CHANGES @@ -0,0 +1,17 @@ +For recent changelog see CHANGELOG.md + +----- + +v1.0.0 -- 2015.12.04 +- autoBind changes: + - replace `bindTo` argument with options and `resolveContext` option + - Add support `overwriteDefinition` +- Introduce IE11 bug workaround in `lazy` handler + +v0.1.1 -- 2014.04.24 +- Add `autoBind` and `lazy` utilities +- Allow to pass other options to be merged onto created descriptor. + Useful when used with other custom utilties + +v0.1.0 -- 2013.06.20 +Initial (derived from es5-ext project) diff --git a/node_modules/d/LICENSE b/node_modules/d/LICENSE new file mode 100644 index 00000000..44745e26 --- /dev/null +++ b/node_modules/d/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2013-2019, Mariusz Nowak, @medikoo, medikoo.com + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/d/README.md b/node_modules/d/README.md new file mode 100644 index 00000000..95097d4b --- /dev/null +++ b/node_modules/d/README.md @@ -0,0 +1,134 @@ +# D + +## Property descriptor factory + +_Originally derived from [es5-ext](https://github.com/medikoo/es5-ext) package._ + +Defining properties with descriptors is very verbose: + +```javascript +var Account = function () {}; +Object.defineProperties(Account.prototype, { + deposit: { + value: function () { + /* ... */ + }, + configurable: true, + enumerable: false, + writable: true + }, + withdraw: { + value: function () { + /* ... */ + }, + configurable: true, + enumerable: false, + writable: true + }, + balance: { + get: function () { + /* ... */ + }, + configurable: true, + enumerable: false + } +}); +``` + +D cuts that to: + +```javascript +var d = require("d"); + +var Account = function () {}; +Object.defineProperties(Account.prototype, { + deposit: d(function () { + /* ... */ + }), + withdraw: d(function () { + /* ... */ + }), + balance: d.gs(function () { + /* ... */ + }) +}); +``` + +By default, created descriptor follow characteristics of native ES5 properties, and defines values as: + +```javascript +{ configurable: true, enumerable: false, writable: true } +``` + +You can overwrite it by preceding _value_ argument with instruction: + +```javascript +d("c", value); // { configurable: true, enumerable: false, writable: false } +d("ce", value); // { configurable: true, enumerable: true, writable: false } +d("e", value); // { configurable: false, enumerable: true, writable: false } + +// Same way for get/set: +d.gs("e", value); // { configurable: false, enumerable: true } +``` + +### Installation + + $ npm install d + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Other utilities + +#### autoBind(obj, props) _(d/auto-bind)_ + +Define methods which will be automatically bound to its instances + +```javascript +var d = require('d'); +var autoBind = require('d/auto-bind'); + +var Foo = function () { this._count = 0; }; +Object.defineProperties(Foo.prototype, autoBind({ + increment: d(function () { ++this._count; }); +})); + +var foo = new Foo(); + +// Increment foo counter on each domEl click +domEl.addEventListener('click', foo.increment, false); +``` + +#### lazy(obj, props) _(d/lazy)_ + +Define lazy properties, which will be resolved on first access + +```javascript +var d = require("d"); +var lazy = require("d/lazy"); + +var Foo = function () {}; +Object.defineProperties(Foo.prototype, lazy({ items: d(function () { return []; }) })); + +var foo = new Foo(); +foo.items.push(1, 2); // foo.items array created and defined directly on foo +``` + +## Tests [![Build Status](https://travis-ci.org/medikoo/d.png)](https://travis-ci.org/medikoo/d) + + $ npm test + +## Security contact information + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + +--- + +
+ + Get professional support for d 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/d/auto-bind.js b/node_modules/d/auto-bind.js new file mode 100644 index 00000000..a0037fa9 --- /dev/null +++ b/node_modules/d/auto-bind.js @@ -0,0 +1,33 @@ +"use strict"; + +var isValue = require("type/value/is") + , ensureValue = require("type/value/ensure") + , ensurePlainFunction = require("type/plain-function/ensure") + , copy = require("es5-ext/object/copy") + , normalizeOptions = require("es5-ext/object/normalize-options") + , map = require("es5-ext/object/map"); + +var bind = Function.prototype.bind + , defineProperty = Object.defineProperty + , hasOwnProperty = Object.prototype.hasOwnProperty + , define; + +define = function (name, desc, options) { + var value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs; + dgs = copy(desc); + delete dgs.writable; + delete dgs.value; + dgs.get = function () { + if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value; + desc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this); + defineProperty(this, name, desc); + return this[name]; + }; + return dgs; +}; + +module.exports = function (props/*, options*/) { + var options = normalizeOptions(arguments[1]); + if (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext); + return map(props, function (desc, name) { return define(name, desc, options); }); +}; diff --git a/node_modules/d/index.js b/node_modules/d/index.js new file mode 100644 index 00000000..b05448b6 --- /dev/null +++ b/node_modules/d/index.js @@ -0,0 +1,62 @@ +"use strict"; + +var isValue = require("type/value/is") + , isPlainFunction = require("type/plain-function/is") + , assign = require("es5-ext/object/assign") + , normalizeOpts = require("es5-ext/object/normalize-options") + , contains = require("es5-ext/string/#/contains"); + +var d = (module.exports = function (dscr, value/*, options*/) { + var c, e, w, options, desc; + if (arguments.length < 2 || typeof dscr !== "string") { + options = value; + value = dscr; + dscr = null; + } else { + options = arguments[2]; + } + if (isValue(dscr)) { + c = contains.call(dscr, "c"); + e = contains.call(dscr, "e"); + w = contains.call(dscr, "w"); + } else { + c = w = true; + e = false; + } + + desc = { value: value, configurable: c, enumerable: e, writable: w }; + return !options ? desc : assign(normalizeOpts(options), desc); +}); + +d.gs = function (dscr, get, set/*, options*/) { + var c, e, options, desc; + if (typeof dscr !== "string") { + options = set; + set = get; + get = dscr; + dscr = null; + } else { + options = arguments[3]; + } + if (!isValue(get)) { + get = undefined; + } else if (!isPlainFunction(get)) { + options = get; + get = set = undefined; + } else if (!isValue(set)) { + set = undefined; + } else if (!isPlainFunction(set)) { + options = set; + set = undefined; + } + if (isValue(dscr)) { + c = contains.call(dscr, "c"); + e = contains.call(dscr, "e"); + } else { + c = true; + e = false; + } + + desc = { get: get, set: set, configurable: c, enumerable: e }; + return !options ? desc : assign(normalizeOpts(options), desc); +}; diff --git a/node_modules/d/lazy.js b/node_modules/d/lazy.js new file mode 100644 index 00000000..bae0d6af --- /dev/null +++ b/node_modules/d/lazy.js @@ -0,0 +1,115 @@ +"use strict"; + +var isPlainFunction = require("type/plain-function/is") + , ensureValue = require("type/value/ensure") + , isValue = require("type/value/is") + , map = require("es5-ext/object/map") + , contains = require("es5-ext/string/#/contains"); + +var call = Function.prototype.call + , defineProperty = Object.defineProperty + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor + , getPrototypeOf = Object.getPrototypeOf + , hasOwnProperty = Object.prototype.hasOwnProperty + , cacheDesc = { configurable: false, enumerable: false, writable: false, value: null } + , define; + +define = function (name, options) { + var value, dgs, cacheName, desc, writable = false, resolvable, flat; + options = Object(ensureValue(options)); + cacheName = options.cacheName; + flat = options.flat; + if (!isValue(cacheName)) cacheName = name; + delete options.cacheName; + value = options.value; + resolvable = isPlainFunction(value); + delete options.value; + dgs = { configurable: Boolean(options.configurable), enumerable: Boolean(options.enumerable) }; + if (name !== cacheName) { + dgs.get = function () { + if (hasOwnProperty.call(this, cacheName)) return this[cacheName]; + cacheDesc.value = resolvable ? call.call(value, this, options) : value; + cacheDesc.writable = writable; + defineProperty(this, cacheName, cacheDesc); + cacheDesc.value = null; + if (desc) defineProperty(this, name, desc); + return this[cacheName]; + }; + } else if (!flat) { + dgs.get = function self() { + var ownDesc; + if (hasOwnProperty.call(this, name)) { + ownDesc = getOwnPropertyDescriptor(this, name); + // It happens in Safari, that getter is still called after property + // was defined with a value, following workarounds that + // While in IE11 it may happen that here ownDesc is undefined (go figure) + if (ownDesc) { + if (ownDesc.hasOwnProperty("value")) return ownDesc.value; + if (typeof ownDesc.get === "function" && ownDesc.get !== self) { + return ownDesc.get.call(this); + } + return value; + } + } + desc.value = resolvable ? call.call(value, this, options) : value; + defineProperty(this, name, desc); + desc.value = null; + return this[name]; + }; + } else { + dgs.get = function self() { + var base = this, ownDesc; + if (hasOwnProperty.call(this, name)) { + // It happens in Safari, that getter is still called after property + // was defined with a value, following workarounds that + ownDesc = getOwnPropertyDescriptor(this, name); + if (ownDesc.hasOwnProperty("value")) return ownDesc.value; + if (typeof ownDesc.get === "function" && ownDesc.get !== self) { + return ownDesc.get.call(this); + } + } + while (!hasOwnProperty.call(base, name)) base = getPrototypeOf(base); + desc.value = resolvable ? call.call(value, base, options) : value; + defineProperty(base, name, desc); + desc.value = null; + return base[name]; + }; + } + dgs.set = function (value) { + if (hasOwnProperty.call(this, name)) { + throw new TypeError("Cannot assign to lazy defined '" + name + "' property of " + this); + } + dgs.get.call(this); + this[cacheName] = value; + }; + if (options.desc) { + desc = { + configurable: contains.call(options.desc, "c"), + enumerable: contains.call(options.desc, "e") + }; + if (cacheName === name) { + desc.writable = contains.call(options.desc, "w"); + desc.value = null; + } else { + writable = contains.call(options.desc, "w"); + desc.get = dgs.get; + desc.set = dgs.set; + } + delete options.desc; + } else if (cacheName === name) { + desc = { + configurable: Boolean(options.configurable), + enumerable: Boolean(options.enumerable), + writable: Boolean(options.writable), + value: null + }; + } + delete options.configurable; + delete options.enumerable; + delete options.writable; + return dgs; +}; + +module.exports = function (props) { + return map(props, function (desc, name) { return define(name, desc); }); +}; diff --git a/node_modules/d/package.json b/node_modules/d/package.json new file mode 100644 index 00000000..e0370df2 --- /dev/null +++ b/node_modules/d/package.json @@ -0,0 +1,72 @@ +{ + "name": "d", + "version": "1.0.1", + "description": "Property descriptor factory", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "descriptor", + "es", + "ecmascript", + "ecma", + "property", + "descriptors", + "meta", + "properties" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/d.git" + }, + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + }, + "devDependencies": { + "eslint": "^5.16.0", + "eslint-config-medikoo": "^2.3.0", + "git-list-updated": "^1.1.2", + "husky": "^2.4.1", + "lint-staged": "^8.2.1", + "prettier-elastic": "^1.18.2", + "tad": "^2.0.1" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint" + ], + "*.{css,html,js,json,md,yaml,yml}": [ + "prettier -c" + ] + }, + "eslintConfig": { + "extends": "medikoo/es5", + "root": true + }, + "prettier": { + "printWidth": 100, + "tabWidth": 4, + "overrides": [ + { + "files": [ + "*.md" + ], + "options": { + "tabWidth": 2 + } + } + ] + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "lint-updated": "pipe-git-updated --ext=js -- eslint --ignore-pattern '!*'", + "prettier-check-updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", + "prettify": "prettier --write --ignore-path .gitignore '**/*.{css,html,js,json,md,yaml,yml}'", + "test": "node node_modules/tad/bin/tad" + }, + "license": "ISC" +} diff --git a/node_modules/d/test/auto-bind.js b/node_modules/d/test/auto-bind.js new file mode 100644 index 00000000..993308e1 --- /dev/null +++ b/node_modules/d/test/auto-bind.js @@ -0,0 +1,11 @@ +"use strict"; + +var d = require("../"); + +module.exports = function (t, a) { + var o = Object.defineProperties( + {}, t({ bar: d(function () { return this === o; }), bar2: d(function () { return this; }) }) + ); + + a.deep([o.bar(), o.bar2()], [true, o]); +}; diff --git a/node_modules/d/test/index.js b/node_modules/d/test/index.js new file mode 100644 index 00000000..43e61a34 --- /dev/null +++ b/node_modules/d/test/index.js @@ -0,0 +1,209 @@ +"use strict"; + +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +module.exports = function (t, a) { + var o, c, cg, cs, ce, ceg, ces, cew, cw, e, eg, es, ew, v, vg, vs, w, df, dfg, dfs; + + o = Object.create(Object.prototype, { + c: t("c", (c = {})), + cgs: t.gs("c", (cg = function () {}), (cs = function () {})), + ce: t("ce", (ce = {})), + cegs: t.gs("ce", (ceg = function () {}), (ces = function () {})), + cew: t("cew", (cew = {})), + cw: t("cw", (cw = {})), + e: t("e", (e = {})), + egs: t.gs("e", (eg = function () {}), (es = function () {})), + ew: t("ew", (ew = {})), + v: t("", (v = {})), + vgs: t.gs("", (vg = function () {}), (vs = function () {})), + w: t("w", (w = {})), + + df: t((df = {})), + dfgs: t.gs((dfg = function () {}), (dfs = function () {})) + }); + + return { + c: function (a) { + var d = getOwnPropertyDescriptor(o, "c"); + a(d.value, c, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, "cgs"); + a(d.value, undefined, "GS Value"); + a(d.get, cg, "GS Get"); + a(d.set, cs, "GS Set"); + a(d.configurable, true, "GS Configurable"); + a(d.enumerable, false, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + ce: function (a) { + var d = getOwnPropertyDescriptor(o, "ce"); + a(d.value, ce, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, "cegs"); + a(d.value, undefined, "GS Value"); + a(d.get, ceg, "GS Get"); + a(d.set, ces, "GS Set"); + a(d.configurable, true, "GS Configurable"); + a(d.enumerable, true, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + cew: function (a) { + var d = getOwnPropertyDescriptor(o, "cew"); + a(d.value, cew, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, true, "Writable"); + }, + cw: function (a) { + var d = getOwnPropertyDescriptor(o, "cw"); + a(d.value, cw, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, true, "Writable"); + }, + e: function (a) { + var d = getOwnPropertyDescriptor(o, "e"); + a(d.value, e, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, "egs"); + a(d.value, undefined, "GS Value"); + a(d.get, eg, "GS Get"); + a(d.set, es, "GS Set"); + a(d.configurable, false, "GS Configurable"); + a(d.enumerable, true, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + ew: function (a) { + var d = getOwnPropertyDescriptor(o, "ew"); + a(d.value, ew, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, true, "Writable"); + }, + v: function (a) { + var d = getOwnPropertyDescriptor(o, "v"); + a(d.value, v, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, "vgs"); + a(d.value, undefined, "GS Value"); + a(d.get, vg, "GS Get"); + a(d.set, vs, "GS Set"); + a(d.configurable, false, "GS Configurable"); + a(d.enumerable, false, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + w: function (a) { + var d = getOwnPropertyDescriptor(o, "w"); + a(d.value, w, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, true, "Writable"); + }, + d: function (a) { + var d = getOwnPropertyDescriptor(o, "df"); + a(d.value, df, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, true, "Writable"); + + d = getOwnPropertyDescriptor(o, "dfgs"); + a(d.value, undefined, "GS Value"); + a(d.get, dfg, "GS Get"); + a(d.set, dfs, "GS Set"); + a(d.configurable, true, "GS Configurable"); + a(d.enumerable, false, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + Options: { + v: function (a) { + var x = {}, d = t(x, { foo: true }); + a.deep( + d, + { configurable: true, enumerable: false, writable: true, value: x, foo: true }, + "No descriptor" + ); + d = t("c", "foo", { marko: "elo" }); + a.deep( + d, + { + configurable: true, + enumerable: false, + writable: false, + value: "foo", + marko: "elo" + }, + "Descriptor" + ); + }, + gs: function (a) { + var gFn = function () {}, sFn = function () {}, d; + d = t.gs(gFn, sFn, { foo: true }); + a.deep( + d, { configurable: true, enumerable: false, get: gFn, set: sFn, foo: true }, + "No descriptor" + ); + d = t.gs(null, sFn, { foo: true }); + a.deep( + d, + { configurable: true, enumerable: false, get: undefined, set: sFn, foo: true }, + "No descriptor: Just set" + ); + d = t.gs(gFn, { foo: true }); + a.deep( + d, + { configurable: true, enumerable: false, get: gFn, set: undefined, foo: true }, + "No descriptor: Just get" + ); + + d = t.gs("e", gFn, sFn, { bar: true }); + a.deep( + d, { configurable: false, enumerable: true, get: gFn, set: sFn, bar: true }, + "Descriptor" + ); + d = t.gs("e", null, sFn, { bar: true }); + a.deep( + d, + { configurable: false, enumerable: true, get: undefined, set: sFn, bar: true }, + "Descriptor: Just set" + ); + d = t.gs("e", gFn, { bar: true }); + a.deep( + d, + { configurable: false, enumerable: true, get: gFn, set: undefined, bar: true }, + "Descriptor: Just get" + ); + } + } + }; +}; diff --git a/node_modules/d/test/lazy.js b/node_modules/d/test/lazy.js new file mode 100644 index 00000000..e446dd50 --- /dev/null +++ b/node_modules/d/test/lazy.js @@ -0,0 +1,97 @@ +"use strict"; + +var d = require("../") + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +module.exports = function (t, a) { + var Foo = function () {}, i = 1, o, o2, desc; + Object.defineProperties( + Foo.prototype, + t({ + bar: d(function () { return ++i; }), + bar2: d(function () { return this.bar + 23; }), + bar3: d(function () { return this.bar2 + 34; }, { desc: "ew" }), + bar4: d(function () { return this.bar3 + 12; }, { cacheName: "_bar4_" }), + bar5: d(function () { return this.bar4 + 3; }, { cacheName: "_bar5_", desc: "e" }) + }) + ); + + desc = getOwnPropertyDescriptor(Foo.prototype, "bar"); + a(desc.configurable, true, "Configurable: default"); + a(desc.enumerable, false, "Enumerable: default"); + + o = new Foo(); + a.deep([o.bar, o.bar2, o.bar3, o.bar4, o.bar5], [2, 25, 59, 71, 74], "Values"); + + a.deep( + getOwnPropertyDescriptor(o, "bar3"), + { configurable: false, enumerable: true, writable: true, value: 59 }, "Desc" + ); + a(o.hasOwnProperty("bar4"), false, "Cache not exposed"); + desc = getOwnPropertyDescriptor(o, "bar5"); + a.deep( + desc, { configurable: false, enumerable: true, get: desc.get, set: desc.set }, + "Cache & Desc: desc" + ); + + o2 = Object.create(o); + o2.bar = 30; + o2.bar3 = 100; + + a.deep( + [o2.bar, o2.bar2, o2.bar3, o2.bar4, o2.bar5], [30, 25, 100, 112, 115], "Extension Values" + ); + + Foo = function () {}; + Object.defineProperties( + Foo.prototype, + t({ + test: d("w", function () { return "raz"; }), + test2: d("", function () { return "raz"; }, { desc: "w" }), + test3: d("", function () { return "raz"; }, { cacheName: "__test3__", desc: "w" }), + test4: d("w", "bar") + }) + ); + + o = new Foo(); + o.test = "marko"; + a.deep( + getOwnPropertyDescriptor(o, "test"), + { configurable: false, enumerable: false, writable: true, value: "marko" }, "Set before get" + ); + o.test2 = "marko2"; + a.deep( + getOwnPropertyDescriptor(o, "test2"), + { configurable: false, enumerable: false, writable: true, value: "marko2" }, + "Set before get: Custom desc" + ); + o.test3 = "marko3"; + a.deep( + getOwnPropertyDescriptor(o, "__test3__"), + { configurable: false, enumerable: false, writable: true, value: "marko3" }, + "Set before get: Custom cache name" + ); + a(o.test4, "bar", "Resolve by value"); + + a.h1("Flat"); + Object.defineProperties( + Foo.prototype, + t({ + flat: d(function () { return "foo"; }, { flat: true }), + flat2: d(function () { return "bar"; }, { flat: true }) + }) + ); + + a.h2("Instance"); + a(o.flat, "foo", "Value"); + a(o.hasOwnProperty("flat"), false, "Instance"); + a(Foo.prototype.flat, "foo", "Prototype"); + + a.h2("Direct"); + a(Foo.prototype.flat2, "bar"); + + a.h2("Reset direct"); + Object.defineProperties(Foo.prototype, t({ testResetDirect: d(false) })); + + a.throws(function () { Foo.prototype.testResetDirect = false; }, TypeError); +}; diff --git a/node_modules/decamelize/index.js b/node_modules/decamelize/index.js new file mode 100644 index 00000000..8d5bab7e --- /dev/null +++ b/node_modules/decamelize/index.js @@ -0,0 +1,13 @@ +'use strict'; +module.exports = function (str, sep) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + sep = typeof sep === 'undefined' ? '_' : sep; + + return str + .replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2') + .replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + sep + '$2') + .toLowerCase(); +}; diff --git a/node_modules/decamelize/license b/node_modules/decamelize/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/decamelize/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/decamelize/package.json b/node_modules/decamelize/package.json new file mode 100644 index 00000000..ca357903 --- /dev/null +++ b/node_modules/decamelize/package.json @@ -0,0 +1,38 @@ +{ + "name": "decamelize", + "version": "1.2.0", + "description": "Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow", + "license": "MIT", + "repository": "sindresorhus/decamelize", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "decamelize", + "decamelcase", + "camelcase", + "lowercase", + "case", + "dash", + "hyphen", + "string", + "str", + "text", + "convert" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/decamelize/readme.md b/node_modules/decamelize/readme.md new file mode 100644 index 00000000..624c7ee5 --- /dev/null +++ b/node_modules/decamelize/readme.md @@ -0,0 +1,48 @@ +# decamelize [![Build Status](https://travis-ci.org/sindresorhus/decamelize.svg?branch=master)](https://travis-ci.org/sindresorhus/decamelize) + +> Convert a camelized string into a lowercased one with a custom separator
+> Example: `unicornRainbow` → `unicorn_rainbow` + + +## Install + +``` +$ npm install --save decamelize +``` + + +## Usage + +```js +const decamelize = require('decamelize'); + +decamelize('unicornRainbow'); +//=> 'unicorn_rainbow' + +decamelize('unicornRainbow', '-'); +//=> 'unicorn-rainbow' +``` + + +## API + +### decamelize(input, [separator]) + +#### input + +Type: `string` + +#### separator + +Type: `string`
+Default: `_` + + +## Related + +See [`camelcase`](https://github.com/sindresorhus/camelcase) for the inverse. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/dottie/LICENSE b/node_modules/dottie/LICENSE new file mode 100644 index 00000000..f757bbed --- /dev/null +++ b/node_modules/dottie/LICENSE @@ -0,0 +1,23 @@ +The MIT License + +Copyright (c) 2013-2014 Mick Hansen. http://mhansen.io + +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/dottie/README.md b/node_modules/dottie/README.md new file mode 100644 index 00000000..4d3940fc --- /dev/null +++ b/node_modules/dottie/README.md @@ -0,0 +1,109 @@ +[![Build Status](https://travis-ci.org/mickhansen/dottie.js.svg?branch=master)](https://travis-ci.org/mickhansen/dottie.js) + +Dottie helps you easily (and without sacrificing too much performance) look up and play with nested keys in objects, without them throwing up in your face. + +## Install + npm install dottie + +## Usage +For detailed usage, check source or tests. + +### Get value +Gets nested value, or undefined if unreachable, or a default value if passed. + +```js +var values = { + some: { + nested: { + key: 'foobar'; + } + }, + 'some.dot.included': { + key: 'barfoo' + } +} + +dottie.get(values, 'some.nested.key'); // returns 'foobar' +dottie.get(values, 'some.undefined.key'); // returns undefined +dottie.get(values, 'some.undefined.key', 'defaultval'); // returns 'defaultval' +dottie.get(values, ['some.dot.included', 'key']); // returns 'barfoo' +``` + +*Note: lodash.get() also works fine for this* + +### Set value +Sets nested value, creates nested structure if needed + +```js +dottie.set(values, 'some.nested.value', someValue); +dottie.set(values, ['some.dot.included', 'value'], someValue); +dottie.set(values, 'some.nested.object', someValue, { + force: true // force overwrite defined non-object keys into objects if needed +}); +``` + +### Transform object +Transform object from keys with dottie notation to nested objects + +```js +var values = { + 'user.name': 'Gummy Bear', + 'user.email': 'gummybear@candymountain.com', + 'user.professional.title': 'King', + 'user.professional.employer': 'Candy Mountain' +}; +var transformed = dottie.transform(values); + +/* +{ + user: { + name: 'Gummy Bear', + email: 'gummybear@candymountain.com', + professional: { + title: 'King', + employer: 'Candy Mountain' + } + } +} +*/ +``` + +#### With a custom delimiter + +```js +var values = { + 'user_name': 'Mick Hansen', + 'user_email': 'maker@mhansen.io' +}; +var transformed = dottie.transform(values, { delimiter: '_' }); + +/* +{ + user: { + name: 'Mick Hansen', + email: 'maker@mhansen.io' + } +} +*/ +``` + +### Get paths in object +```js +var object = { + a: 1, + b: { + c: 2, + d: { e: 3 } + } +}; + +dottie.paths(object); // ["a", "b.c", "b.d.e"]; +``` + +## Performance + +`0.3.1` and up ships with `dottie.memoizePath: true` by default, if this causes any bugs, please try setting it to false + +## License + +[MIT](https://github.com/mickhansen/dottie.js/blob/master/LICENSE) diff --git a/node_modules/dottie/dottie.js b/node_modules/dottie/dottie.js new file mode 100644 index 00000000..41ec94db --- /dev/null +++ b/node_modules/dottie/dottie.js @@ -0,0 +1,224 @@ +(function(undefined) { + var root = this; + + // Weird IE shit, objects do not have hasOwn, but the prototype does... + var hasOwnProp = Object.prototype.hasOwnProperty; + + var reverseDupArray = function (array) { + var result = new Array(array.length); + var index = array.length; + var arrayMaxIndex = index - 1; + + while (index--) { + result[arrayMaxIndex - index] = array[index]; + } + + return result; + }; + + var Dottie = function() { + var args = Array.prototype.slice.call(arguments); + + if (args.length == 2) { + return Dottie.find.apply(this, args); + } + return Dottie.transform.apply(this, args); + }; + + // Legacy syntax, changed syntax to have get/set be similar in arg order + Dottie.find = function(path, object) { + return Dottie.get(object, path); + }; + + // Dottie memoization flag + Dottie.memoizePath = true; + var memoized = {}; + + // Traverse object according to path, return value if found - Return undefined if destination is unreachable + Dottie.get = function(object, path, defaultVal) { + if ((object === undefined) || (object === null) || (path === undefined) || (path === null)) { + return defaultVal; + } + + var names; + + if (typeof path === "string") { + if (Dottie.memoizePath) { + if (memoized[path]) { + names = memoized[path].slice(0); + } else { + names = path.split('.').reverse(); + memoized[path] = names.slice(0); + } + } else { + names = path.split('.').reverse(); + } + } else if (Array.isArray(path)) { + names = reverseDupArray(path); + } + + while (names.length && (object = object[names.pop()]) !== undefined && object !== null); + + // Handle cases where accessing a childprop of a null value + if (object === null && names.length) object = undefined; + + return (object === undefined ? defaultVal : object); + }; + + Dottie.exists = function(object, path) { + return Dottie.get(object, path) !== undefined; + }; + + // Set nested value + Dottie.set = function(object, path, value, options) { + var pieces = Array.isArray(path) ? path : path.split('.'), current = object, piece, length = pieces.length; + + if (typeof current !== 'object') { + throw new Error('Parent is not an object.'); + } + + for (var index = 0; index < length; index++) { + piece = pieces[index]; + + // Create namespace (object) where none exists. + // If `force === true`, bruteforce the path without throwing errors. + if (!hasOwnProp.call(current, piece) || current[piece] === undefined || (typeof current[piece] !== 'object' && options && options.force === true)) { + current[piece] = {}; + } + + if (index == (length - 1)) { + // Set final value + current[piece] = value; + } else { + // We do not overwrite existing path pieces by default + if (typeof current[piece] !== 'object') { + throw new Error('Target key "' + piece + '" is not suitable for a nested value. (It is in use as non-object. Set `force` to `true` to override.)'); + } + + // Traverse next in path + current = current[piece]; + } + } + + // Is there any case when this is relevant? It's also the last line in the above for-loop + current[piece] = value; + }; + + // Set default nested value + Dottie['default'] = function(object, path, value) { + if (Dottie.get(object, path) === undefined) { + Dottie.set(object, path, value); + } + }; + + // Transform unnested object with .-seperated keys into a nested object. + Dottie.transform = function Dottie$transformfunction(object, options) { + if (Array.isArray(object)) { + return object.map(function(o) { + return Dottie.transform(o, options); + }); + } + + options = options || {}; + options.delimiter = options.delimiter || '.'; + + var pieces + , piecesLength + , piece + , current + , transformed = {} + , key + , keys = Object.keys(object) + , length = keys.length + , i; + + for (i = 0; i < length; i++) { + key = keys[i]; + + if (key.indexOf(options.delimiter) !== -1) { + pieces = key.split(options.delimiter); + piecesLength = pieces.length; + current = transformed; + + for (var index = 0; index < piecesLength; index++) { + piece = pieces[index]; + if (index != (piecesLength - 1) && !current.hasOwnProperty(piece)) { + current[piece] = {}; + } + + if (index == (piecesLength - 1)) { + current[piece] = object[key]; + } + + current = current[piece]; + if (current === null) { + break; + } + } + } else { + transformed[key] = object[key]; + } + } + + return transformed; + }; + + Dottie.flatten = function(object, seperator) { + if (typeof seperator === "undefined") seperator = '.'; + var flattened = {} + , current + , nested; + + for (var key in object) { + if (hasOwnProp.call(object, key)) { + current = object[key]; + if (Object.prototype.toString.call(current) === "[object Object]") { + nested = Dottie.flatten(current, seperator); + + for (var _key in nested) { + flattened[key+seperator+_key] = nested[_key]; + } + } else { + flattened[key] = current; + } + } + } + + return flattened; + }; + + Dottie.paths = function(object, prefixes) { + var paths = []; + var value; + var key; + + prefixes = prefixes || []; + + if (typeof object === 'object') { + for (key in object) { + value = object[key]; + + if (typeof value === 'object') { + paths = paths.concat(Dottie.paths(value, prefixes.concat([key]))); + } else { + paths.push(prefixes.concat(key).join('.')); + } + } + } else { + throw new Error('Paths was called with non-object argument.'); + } + + return paths; + }; + + if (typeof module !== 'undefined' && module.exports) { + exports = module.exports = Dottie; + } else { + root['Dottie'] = Dottie; + root['Dot'] = Dottie; //BC + + if (typeof define === "function") { + define([], function () { return Dottie; }); + } + } +})(); diff --git a/node_modules/dottie/package.json b/node_modules/dottie/package.json new file mode 100644 index 00000000..02a73a77 --- /dev/null +++ b/node_modules/dottie/package.json @@ -0,0 +1,22 @@ +{ + "name": "dottie", + "version": "2.0.1", + "devDependencies": { + "chai": "^4.2.0", + "mocha": "^5.2.0" + }, + "license": "MIT", + "files": [ + "dottie.js" + ], + "description": "Fast and safe nested object access and manipulation in JavaScript", + "author": "Mick Hansen ", + "repository": { + "type": "git", + "url": "git://github.com/mickhansen/dottie.js.git" + }, + "main": "dottie.js", + "scripts": { + "test": "mocha -t 5000 -s 100 --reporter spec test" + } +} diff --git a/node_modules/editorconfig/CHANGELOG.md b/node_modules/editorconfig/CHANGELOG.md new file mode 100644 index 00000000..15898531 --- /dev/null +++ b/node_modules/editorconfig/CHANGELOG.md @@ -0,0 +1,14 @@ +## 0.15.3 +- Move @types dependencies to dev dependencies. +- Upgrade dependencies. + +## 0.15.2 +- Fix publish. + +## 0.15.1 +- Update dependencies. + +## 0.15.0 +- Convert source code into TypeScript. Generated type definitions are now provided. +- Remove dependency on Bluebird. +- **Breaking**: Node v4 no longer supported. diff --git a/node_modules/editorconfig/LICENSE b/node_modules/editorconfig/LICENSE new file mode 100644 index 00000000..85329c84 --- /dev/null +++ b/node_modules/editorconfig/LICENSE @@ -0,0 +1,19 @@ +Copyright © 2012 EditorConfig Team + +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/editorconfig/README.md b/node_modules/editorconfig/README.md new file mode 100644 index 00000000..6ff281a8 --- /dev/null +++ b/node_modules/editorconfig/README.md @@ -0,0 +1,206 @@ +# EditorConfig JavaScript Core + +[![Build Status](https://travis-ci.org/editorconfig/editorconfig-core-js.svg?branch=master)](https://travis-ci.org/editorconfig/editorconfig-core-js) +[![dependencies Status](https://david-dm.org/editorconfig/editorconfig-core-js/status.svg)](https://david-dm.org/editorconfig/editorconfig-core-js) + +The EditorConfig JavaScript core will provide the same functionality as the +[EditorConfig C Core][] and [EditorConfig Python Core][]. + + +## Installation + +You need [node][] to use this package. + +To install the package locally: + +```bash +$ npm install editorconfig +``` + +To install the package system-wide: + +```bash +$ npm install -g editorconfig +``` + +## Usage + +### in Node.js: + +#### parse(filePath[, options]) + +options is an object with the following defaults: + +```js +{ + config: '.editorconfig', + version: pkg.version, + root: '/' +}; +``` + +Search for `.editorconfig` starting from the current directory to the root directory. + +Example: + +```js +var editorconfig = require('editorconfig'); +var path = require('path'); +var filePath = path.join(__dirname, '/sample.js'); +var promise = editorconfig.parse(filePath); +promise.then(function onFulfilled(result) { + console.log(result); +}); + +/* + { + indent_style: 'space', + indent_size: 2, + end_of_line: 'lf', + charset: 'utf-8', + trim_trailing_whitespace: true, + insert_final_newline: true, + tab_width: 2 + }; +*/ +``` + +#### parseSync(filePath[, options]) + +Synchronous version of `editorconfig.parse()`. + +#### parseString(fileContent) + +The `parse()` function above uses `parseString()` under the hood. If you have your file contents +just pass it to `parseString()` and it'll return the same results as `parse()`. + +#### parseFromFiles(filePath, configs[, options]) + +options is an object with the following defaults: + +```js +{ + config: '.editorconfig', + version: pkg.version, + root: '/' +}; +``` + +Specify the `.editorconfig`. + +Example: + +```js +var editorconfig = require('editorconfig'); +var fs = require('fs'); +var path = require('path'); +var configPath = path.join(__dirname, '/.editorconfig'); +var configs = [ + { + name: configPath, + contents: fs.readFileSync(configPath, 'utf8') + } +]; +var filePath = path.join(__dirname, '/sample.js'); +var promise = editorconfig.parseFromFiles(filePath, configs); +promise.then(function onFulfilled(result) { + console.log(result) +}); + +/* + { + indent_style: 'space', + indent_size: 2, + end_of_line: 'lf', + charset: 'utf-8', + trim_trailing_whitespace: true, + insert_final_newline: true, + tab_width: 2 + }; +*/ +``` + +#### parseFromFilesSync(filePath, configs[, options]) + +Synchronous version of `editorconfig.parseFromFiles()`. + +### in Command Line + +```bash +$ ./bin/editorconfig + + Usage: editorconfig [OPTIONS] FILEPATH1 [FILEPATH2 FILEPATH3 ...] + + EditorConfig Node.js Core Version 0.11.4-development + + FILEPATH can be a hyphen (-) if you want path(s) to be read from stdin. + + Options: + + -h, --help output usage information + -V, --version output the version number + -f Specify conf filename other than ".editorconfig" + -b Specify version (used by devs to test compatibility) +``` + +Example: + +```bash +$ ./bin/editorconfig /home/zoidberg/humans/anatomy.md +charset=utf-8 +insert_final_newline=true +end_of_line=lf +tab_width=8 +trim_trailing_whitespace=sometimes +``` + +## Development + +To install dependencies for this package run this in the package directory: + +```bash +$ npm install +``` + +Next, run the following commands: + +```bash +$ npm run build +$ npm run copy +$ npm link ./dist +``` + +The global editorconfig will now point to the files in your development +repository instead of a globally-installed version from npm. You can now use +editorconfig directly to test your changes. + +If you ever update from the central repository and there are errors, it might +be because you are missing some dependencies. If that happens, just run npm +link again to get the latest dependencies. + +To test the command line interface: + +```bash +$ editorconfig +``` + +# Testing + +[CMake][] must be installed to run the tests. + +To run the tests: + +```bash +$ npm test +``` + +To run the tests with increased verbosity (for debugging test failures): + +```bash +$ npm run-script test-verbose +``` + +[EditorConfig C Core]: https://github.com/editorconfig/editorconfig-core +[EditorConfig Python Core]: https://github.com/editorconfig/editorconfig-core-py +[node]: http://nodejs.org/ +[cmake]: http://www.cmake.org diff --git a/node_modules/editorconfig/bin/editorconfig b/node_modules/editorconfig/bin/editorconfig new file mode 100755 index 00000000..a7792ace --- /dev/null +++ b/node_modules/editorconfig/bin/editorconfig @@ -0,0 +1,3 @@ +#!/usr/bin/env node +var cli = require('../src/cli') +cli.default(process.argv) diff --git a/node_modules/editorconfig/node_modules/.bin/semver b/node_modules/editorconfig/node_modules/.bin/semver new file mode 120000 index 00000000..b3ca6032 --- /dev/null +++ b/node_modules/editorconfig/node_modules/.bin/semver @@ -0,0 +1 @@ +../../../semver/bin/semver \ No newline at end of file diff --git a/node_modules/editorconfig/package.json b/node_modules/editorconfig/package.json new file mode 100644 index 00000000..3cb53cb3 --- /dev/null +++ b/node_modules/editorconfig/package.json @@ -0,0 +1,59 @@ +{ + "name": "editorconfig", + "version": "0.15.3", + "description": "EditorConfig File Locator and Interpreter for Node.js", + "keywords": [ + "editorconfig", + "core" + ], + "main": "src/index.js", + "contributors": [ + "Hong Xu (topbug.net)", + "Jed Mao (https://github.com/jedmao/)", + "Trey Hunner (http://treyhunner.com)" + ], + "directories": { + "bin": "./bin", + "lib": "./lib" + }, + "scripts": { + "clean": "rimraf dist", + "prebuild": "npm run clean", + "build": "tsc", + "pretest": "npm run lint && npm run build && npm run copy && cmake .", + "test": "ctest .", + "pretest:ci": "npm run pretest", + "test:ci": "ctest -VV --output-on-failure .", + "lint": "npm run eclint && npm run tslint", + "eclint": "eclint check --indent_size ignore \"src/**\"", + "tslint": "tslint --project tsconfig.json --exclude package.json", + "copy": "cpy .npmignore LICENSE README.md CHANGELOG.md dist && cpy bin/* dist/bin && cpy src/lib/fnmatch*.* dist/src/lib", + "prepub": "npm run lint && npm run build && npm run copy", + "pub": "npm publish ./dist" + }, + "repository": { + "type": "git", + "url": "git://github.com/editorconfig/editorconfig-core-js.git" + }, + "bugs": "https://github.com/editorconfig/editorconfig-core-js/issues", + "author": "EditorConfig Team", + "license": "MIT", + "dependencies": { + "commander": "^2.19.0", + "lru-cache": "^4.1.5", + "semver": "^5.6.0", + "sigmund": "^1.0.1" + }, + "devDependencies": { + "@types/mocha": "^5.2.6", + "@types/node": "^10.12.29", + "@types/semver": "^5.5.0", + "cpy-cli": "^2.0.0", + "eclint": "^2.8.1", + "mocha": "^5.2.0", + "rimraf": "^2.6.3", + "should": "^13.2.3", + "tslint": "^5.13.1", + "typescript": "^3.3.3333" + } +} diff --git a/node_modules/editorconfig/src/cli.d.ts b/node_modules/editorconfig/src/cli.d.ts new file mode 100644 index 00000000..b6c6640b --- /dev/null +++ b/node_modules/editorconfig/src/cli.d.ts @@ -0,0 +1 @@ +export default function cli(args: string[]): void; diff --git a/node_modules/editorconfig/src/cli.js b/node_modules/editorconfig/src/cli.js new file mode 100644 index 00000000..0589b0c6 --- /dev/null +++ b/node_modules/editorconfig/src/cli.js @@ -0,0 +1,53 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +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 }); +// tslint:disable:no-console +var commander_1 = __importDefault(require("commander")); +var editorconfig = __importStar(require("./")); +var package_json_1 = __importDefault(require("../package.json")); +function cli(args) { + commander_1.default.version('EditorConfig Node.js Core Version ' + package_json_1.default.version); + commander_1.default + .usage([ + '[OPTIONS] FILEPATH1 [FILEPATH2 FILEPATH3 ...]', + commander_1.default._version, + 'FILEPATH can be a hyphen (-) if you want path(s) to be read from stdin.', + ].join('\n\n ')) + .option('-f ', 'Specify conf filename other than \'.editorconfig\'') + .option('-b ', 'Specify version (used by devs to test compatibility)') + .option('-v, --version', 'Display version information') + .parse(args); + // Throw away the native -V flag in lieu of the one we've manually specified + // to adhere to testing requirements + commander_1.default.options.shift(); + var files = commander_1.default.args; + if (!files.length) { + commander_1.default.help(); + } + files + .map(function (filePath) { return editorconfig.parse(filePath, { + config: commander_1.default.F, + version: commander_1.default.B, + }); }) + .forEach(function (parsing, i, _a) { + var length = _a.length; + parsing.then(function (parsed) { + if (length > 1) { + console.log("[" + files[i] + "]"); + } + Object.keys(parsed).forEach(function (key) { + console.log(key + "=" + parsed[key]); + }); + }); + }); +} +exports.default = cli; diff --git a/node_modules/editorconfig/src/index.d.ts b/node_modules/editorconfig/src/index.d.ts new file mode 100644 index 00000000..1a69317d --- /dev/null +++ b/node_modules/editorconfig/src/index.d.ts @@ -0,0 +1,29 @@ +/// +import { parseString, ParseStringResult } from './lib/ini'; +export { parseString }; +export interface KnownProps { + end_of_line?: 'lf' | 'crlf' | 'unset'; + indent_style?: 'tab' | 'space' | 'unset'; + indent_size?: number | 'tab' | 'unset'; + insert_final_newline?: true | false | 'unset'; + tab_width?: number | 'unset'; + trim_trailing_whitespace?: true | false | 'unset'; + charset?: string | 'unset'; +} +export interface ECFile { + name: string; + contents: string | Buffer; +} +export interface FileConfig { + name: string; + contents: ParseStringResult; +} +export interface ParseOptions { + config?: string; + version?: string; + root?: string; +} +export declare function parseFromFiles(filepath: string, files: Promise, options?: ParseOptions): Promise; +export declare function parseFromFilesSync(filepath: string, files: ECFile[], options?: ParseOptions): KnownProps; +export declare function parse(_filepath: string, _options?: ParseOptions): Promise; +export declare function parseSync(_filepath: string, _options?: ParseOptions): KnownProps; diff --git a/node_modules/editorconfig/src/index.js b/node_modules/editorconfig/src/index.js new file mode 100644 index 00000000..60863664 --- /dev/null +++ b/node_modules/editorconfig/src/index.js @@ -0,0 +1,261 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + 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) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +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; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var fs = __importStar(require("fs")); +var path = __importStar(require("path")); +var semver = __importStar(require("semver")); +var fnmatch_1 = __importDefault(require("./lib/fnmatch")); +var ini_1 = require("./lib/ini"); +exports.parseString = ini_1.parseString; +var package_json_1 = __importDefault(require("../package.json")); +var knownProps = { + end_of_line: true, + indent_style: true, + indent_size: true, + insert_final_newline: true, + trim_trailing_whitespace: true, + charset: true, +}; +function fnmatch(filepath, glob) { + var matchOptions = { matchBase: true, dot: true, noext: true }; + glob = glob.replace(/\*\*/g, '{*,**/**/**}'); + return fnmatch_1.default(filepath, glob, matchOptions); +} +function getConfigFileNames(filepath, options) { + var paths = []; + do { + filepath = path.dirname(filepath); + paths.push(path.join(filepath, options.config)); + } while (filepath !== options.root); + return paths; +} +function processMatches(matches, version) { + // Set indent_size to 'tab' if indent_size is unspecified and + // indent_style is set to 'tab'. + if ('indent_style' in matches + && matches.indent_style === 'tab' + && !('indent_size' in matches) + && semver.gte(version, '0.10.0')) { + matches.indent_size = 'tab'; + } + // Set tab_width to indent_size if indent_size is specified and + // tab_width is unspecified + if ('indent_size' in matches + && !('tab_width' in matches) + && matches.indent_size !== 'tab') { + matches.tab_width = matches.indent_size; + } + // Set indent_size to tab_width if indent_size is 'tab' + if ('indent_size' in matches + && 'tab_width' in matches + && matches.indent_size === 'tab') { + matches.indent_size = matches.tab_width; + } + return matches; +} +function processOptions(options, filepath) { + if (options === void 0) { options = {}; } + return { + config: options.config || '.editorconfig', + version: options.version || package_json_1.default.version, + root: path.resolve(options.root || path.parse(filepath).root), + }; +} +function buildFullGlob(pathPrefix, glob) { + switch (glob.indexOf('/')) { + case -1: + glob = '**/' + glob; + break; + case 0: + glob = glob.substring(1); + break; + default: + break; + } + return path.join(pathPrefix, glob); +} +function extendProps(props, options) { + if (props === void 0) { props = {}; } + if (options === void 0) { options = {}; } + for (var key in options) { + if (options.hasOwnProperty(key)) { + var value = options[key]; + var key2 = key.toLowerCase(); + var value2 = value; + if (knownProps[key2]) { + value2 = value.toLowerCase(); + } + try { + value2 = JSON.parse(value); + } + catch (e) { } + if (typeof value === 'undefined' || value === null) { + // null and undefined are values specific to JSON (no special meaning + // in editorconfig) & should just be returned as regular strings. + value2 = String(value); + } + props[key2] = value2; + } + } + return props; +} +function parseFromConfigs(configs, filepath, options) { + return processMatches(configs + .reverse() + .reduce(function (matches, file) { + var pathPrefix = path.dirname(file.name); + file.contents.forEach(function (section) { + var glob = section[0]; + var options2 = section[1]; + if (!glob) { + return; + } + var fullGlob = buildFullGlob(pathPrefix, glob); + if (!fnmatch(filepath, fullGlob)) { + return; + } + matches = extendProps(matches, options2); + }); + return matches; + }, {}), options.version); +} +function getConfigsForFiles(files) { + var configs = []; + for (var i in files) { + if (files.hasOwnProperty(i)) { + var file = files[i]; + var contents = ini_1.parseString(file.contents); + configs.push({ + name: file.name, + contents: contents, + }); + if ((contents[0][1].root || '').toLowerCase() === 'true') { + break; + } + } + } + return configs; +} +function readConfigFiles(filepaths) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, Promise.all(filepaths.map(function (name) { return new Promise(function (resolve) { + fs.readFile(name, 'utf8', function (err, data) { + resolve({ + name: name, + contents: err ? '' : data, + }); + }); + }); }))]; + }); + }); +} +function readConfigFilesSync(filepaths) { + var files = []; + var file; + filepaths.forEach(function (filepath) { + try { + file = fs.readFileSync(filepath, 'utf8'); + } + catch (e) { + file = ''; + } + files.push({ + name: filepath, + contents: file, + }); + }); + return files; +} +function opts(filepath, options) { + if (options === void 0) { options = {}; } + var resolvedFilePath = path.resolve(filepath); + return [ + resolvedFilePath, + processOptions(options, resolvedFilePath), + ]; +} +function parseFromFiles(filepath, files, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, resolvedFilePath, processedOptions; + return __generator(this, function (_b) { + _a = opts(filepath, options), resolvedFilePath = _a[0], processedOptions = _a[1]; + return [2 /*return*/, files.then(getConfigsForFiles) + .then(function (configs) { return parseFromConfigs(configs, resolvedFilePath, processedOptions); })]; + }); + }); +} +exports.parseFromFiles = parseFromFiles; +function parseFromFilesSync(filepath, files, options) { + if (options === void 0) { options = {}; } + var _a = opts(filepath, options), resolvedFilePath = _a[0], processedOptions = _a[1]; + return parseFromConfigs(getConfigsForFiles(files), resolvedFilePath, processedOptions); +} +exports.parseFromFilesSync = parseFromFilesSync; +function parse(_filepath, _options) { + if (_options === void 0) { _options = {}; } + return __awaiter(this, void 0, void 0, function () { + var _a, resolvedFilePath, processedOptions, filepaths; + return __generator(this, function (_b) { + _a = opts(_filepath, _options), resolvedFilePath = _a[0], processedOptions = _a[1]; + filepaths = getConfigFileNames(resolvedFilePath, processedOptions); + return [2 /*return*/, readConfigFiles(filepaths) + .then(getConfigsForFiles) + .then(function (configs) { return parseFromConfigs(configs, resolvedFilePath, processedOptions); })]; + }); + }); +} +exports.parse = parse; +function parseSync(_filepath, _options) { + if (_options === void 0) { _options = {}; } + var _a = opts(_filepath, _options), resolvedFilePath = _a[0], processedOptions = _a[1]; + var filepaths = getConfigFileNames(resolvedFilePath, processedOptions); + var files = readConfigFilesSync(filepaths); + return parseFromConfigs(getConfigsForFiles(files), resolvedFilePath, processedOptions); +} +exports.parseSync = parseSync; diff --git a/node_modules/editorconfig/src/lib/fnmatch.d.ts b/node_modules/editorconfig/src/lib/fnmatch.d.ts new file mode 100644 index 00000000..5c9bd38a --- /dev/null +++ b/node_modules/editorconfig/src/lib/fnmatch.d.ts @@ -0,0 +1,214 @@ +// Type definitions for Minimatch 3.0 +// Project: https://github.com/isaacs/minimatch +// Definitions by: vvakame +// Shant Marouti +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Tests a path against the pattern using the options. + */ +declare function M(target: string, pattern: string, options?: M.IOptions): boolean; + +declare namespace M { + /** + * Match against the list of files, in the style of fnmatch or glob. + * If nothing is matched, and options.nonull is set, + * then return a list containing the pattern itself. + */ + function match(list: string[], pattern: string, options?: IOptions): string[]; + + /** + * Returns a function that tests its supplied argument, suitable for use with Array.filter + */ + function filter(pattern: string, options?: IOptions): (element: string, indexed: number, array: string[]) => boolean; + + /** + * Make a regular expression object from the pattern. + */ + function makeRe(pattern: string, options?: IOptions): RegExp; + + var Minimatch: IMinimatchStatic; + + interface IOptions { + /** + * Dump a ton of stuff to stderr. + * + * @default false + */ + debug?: boolean; + + /** + * Do not expand {a,b} and {1..3} brace sets. + * + * @default false + */ + nobrace?: boolean; + + /** + * Disable ** matching against multiple folder names. + * + * @default false + */ + noglobstar?: boolean; + + /** + * Allow patterns to match filenames starting with a period, + * even if the pattern does not explicitly have a period in that spot. + * + * @default false + */ + dot?: boolean; + + /** + * Disable "extglob" style patterns like +(a|b). + * + * @default false + */ + noext?: boolean; + + /** + * Perform a case-insensitive match. + * + * @default false + */ + nocase?: boolean; + + /** + * When a match is not found by minimatch.match, + * return a list containing the pattern itself if this option is set. + * Otherwise, an empty list is returned if there are no matches. + * + * @default false + */ + nonull?: boolean; + + /** + * If set, then patterns without slashes will be matched against + * the basename of the path if it contains slashes. + * + * @default false + */ + matchBase?: boolean; + + /** + * Suppress the behavior of treating # + * at the start of a pattern as a comment. + * + * @default false + */ + nocomment?: boolean; + + /** + * Suppress the behavior of treating a leading ! character as negation. + * + * @default false + */ + nonegate?: boolean; + + /** + * Returns from negate expressions the same as if they were not negated. + * (Ie, true on a hit, false on a miss.) + * + * @default false + */ + flipNegate?: boolean; + } + + interface IMinimatchStatic { + new(pattern: string, options?: IOptions): IMinimatch; + prototype: IMinimatch; + } + + interface IMinimatch { + /** + * The original pattern the minimatch object represents. + */ + pattern: string; + + /** + * The options supplied to the constructor. + */ + options: IOptions; + + /** + * A 2-dimensional array of regexp or string expressions. + */ + set: any[][]; // (RegExp | string)[][] + + /** + * A single regular expression expressing the entire pattern. + * Created by the makeRe method. + */ + regexp: RegExp; + + /** + * True if the pattern is negated. + */ + negate: boolean; + + /** + * True if the pattern is a comment. + */ + comment: boolean; + + /** + * True if the pattern is "" + */ + empty: boolean; + + /** + * Generate the regexp member if necessary, and return it. + * Will return false if the pattern is invalid. + */ + makeRe(): RegExp; // regexp or boolean + + /** + * Return true if the filename matches the pattern, or false otherwise. + */ + match(fname: string): boolean; + + /** + * Take a /-split filename, and match it against a single row in the regExpSet. + * This method is mainly for internal use, but is exposed so that it can be used + * by a glob-walker that needs to avoid excessive filesystem calls. + */ + matchOne(files: string[], pattern: string[], partial: boolean): boolean; + + /** + * Deprecated. For internal use. + * + * @private + */ + debug(): void; + + /** + * Deprecated. For internal use. + * + * @private + */ + make(): void; + + /** + * Deprecated. For internal use. + * + * @private + */ + parseNegate(): void; + + /** + * Deprecated. For internal use. + * + * @private + */ + braceExpand(pattern: string, options: IOptions): void; + + /** + * Deprecated. For internal use. + * + * @private + */ + parse(pattern: string, isSub?: boolean): void; + } +} + +export = M; diff --git a/node_modules/editorconfig/src/lib/fnmatch.js b/node_modules/editorconfig/src/lib/fnmatch.js new file mode 100644 index 00000000..240ce336 --- /dev/null +++ b/node_modules/editorconfig/src/lib/fnmatch.js @@ -0,0 +1,1047 @@ +// Based on minimatch.js by isaacs + + var platform = typeof process === "object" ? process.platform : "win32" + + if (module) module.exports = minimatch + else exports.minimatch = minimatch + + minimatch.Minimatch = Minimatch + + var LRU = require("lru-cache") + , cache = minimatch.cache = new LRU({max: 100}) + , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} + , sigmund = require("sigmund") + + var path = require("path") + // any single thing other than / + // don't need to escape / when using new RegExp() + , qmark = "[^/]" + + // * => any number of characters + , star = qmark + "*?" + + // ** when dots are allowed. Anything goes, except .. and . + // not (^ or / followed by one or two dots followed by $ or /), + // followed by anything, any number of times. + , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?" + + // not a ^ or / followed by a dot, + // followed by anything, any number of times. + , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?" + + // characters that need to be escaped in RegExp. + , reSpecials = charSet("().*{}+?[]^$\\!") + +// "abc" -> { a:true, b:true, c:true } + function charSet (s) { + return s.split("").reduce(function (set, c) { + set[c] = true + return set + }, {}) + } + +// normalizes slashes. + var slashSplit = /\/+/ + + minimatch.monkeyPatch = monkeyPatch + function monkeyPatch () { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "match") + var orig = desc.value + desc.value = function (p) { + if (p instanceof Minimatch) return p.match(this) + return orig.call(this, p) + } + Object.defineProperty(String.prototype, desc) + } + + minimatch.filter = filter + function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } + } + + function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t + } + + minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m + } + + Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch + } + + + function minimatch (p, pattern, options) { + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required") + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === "#") { + return false + } + + // "" only matches "" + if (pattern.trim() === "") return p === "" + + return new Minimatch(pattern, options).match(p) + } + + function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options, cache) + } + + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required") + } + + if (!options) options = {} + + // windows: need to use /, not \ + // On other platforms, \ is a valid (albeit bad) filename char. + if (platform === "win32") { + pattern = pattern.split("\\").join("/") + } + + // lru storage. + // these things aren't particularly big, but walking down the string + // and turning it into a regexp can get pretty costly. + var cacheKey = pattern + "\n" + sigmund(options) + var cached = minimatch.cache.get(cacheKey) + if (cached) return cached + minimatch.cache.set(cacheKey, this) + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() + } + + Minimatch.prototype.make = make + function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) console.error(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + if (options.debug) console.error(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + if (options.debug) console.error(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return -1 === s.indexOf(false) + }) + + if (options.debug) console.error(this.pattern, set) + + this.set = set + } + + Minimatch.prototype.parseNegate = parseNegate + function parseNegate () { + var pattern = this.pattern + , negate = false + , options = this.options + , negateOffset = 0 + + if (options.nonegate) return + + for ( var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === "!" + ; i ++) { + negate = !negate + negateOffset ++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate + } + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c + minimatch.braceExpand = function (pattern, options) { + return new Minimatch(pattern, options).braceExpand() + } + + Minimatch.prototype.braceExpand = braceExpand + function braceExpand (pattern, options) { + options = options || this.options + pattern = typeof pattern === "undefined" + ? this.pattern : pattern + + if (typeof pattern === "undefined") { + throw new Error("undefined pattern") + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + var escaping = false + + // examples and comments refer to this crazy pattern: + // a{b,c{d,e},{f,g}h}x{y,z} + // expected: + // abxy + // abxz + // acdxy + // acdxz + // acexy + // acexz + // afhxy + // afhxz + // aghxy + // aghxz + + // everything before the first \{ is just a prefix. + // So, we pluck that off, and work with the rest, + // and then prepend it to everything we find. + if (pattern.charAt(0) !== "{") { + // console.error(pattern) + var prefix = null + for (var i = 0, l = pattern.length; i < l; i ++) { + var c = pattern.charAt(i) + // console.error(i, c) + if (c === "\\") { + escaping = !escaping + } else if (c === "{" && !escaping) { + prefix = pattern.substr(0, i) + break + } + } + + // actually no sets, all { were escaped. + if (prefix === null) { + // console.error("no sets") + return [pattern] + } + + var tail = braceExpand(pattern.substr(i), options) + return tail.map(function (t) { + return prefix + t + }) + } + + // now we have something like: + // {b,c{d,e},{f,g}h}x{y,z} + // walk through the set, expanding each part, until + // the set ends. then, we'll expand the suffix. + // If the set only has a single member, then'll put the {} back + + // first, handle numeric sets, since they're easier + var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) + if (numset) { + // console.error("numset", numset[1], numset[2]) + var suf = braceExpand(pattern.substr(numset[0].length), options) + , start = +numset[1] + , end = +numset[2] + , inc = start > end ? -1 : 1 + , set = [] + for (var i = start; i != (end + inc); i += inc) { + // append all the suffixes + for (var ii = 0, ll = suf.length; ii < ll; ii ++) { + set.push(i + suf[ii]) + } + } + return set + } + + // ok, walk through the set + // We hope, somewhat optimistically, that there + // will be a } at the end. + // If the closing brace isn't found, then the pattern is + // interpreted as braceExpand("\\" + pattern) so that + // the leading \{ will be interpreted literally. + var i = 1 // skip the \{ + , depth = 1 + , set = [] + , member = "" + , sawEnd = false + , escaping = false + + function addMember () { + set.push(member) + member = "" + } + + // console.error("Entering for") + FOR: for (i = 1, l = pattern.length; i < l; i ++) { + var c = pattern.charAt(i) + // console.error("", i, c) + + if (escaping) { + escaping = false + member += "\\" + c + } else { + switch (c) { + case "\\": + escaping = true + continue + + case "{": + depth ++ + member += "{" + continue + + case "}": + depth -- + // if this closes the actual set, then we're done + if (depth === 0) { + addMember() + // pluck off the close-brace + i ++ + break FOR + } else { + member += c + continue + } + + case ",": + if (depth === 1) { + addMember() + } else { + member += c + } + continue + + default: + member += c + continue + } // switch + } // else + } // for + + // now we've either finished the set, and the suffix is + // pattern.substr(i), or we have *not* closed the set, + // and need to escape the leading brace + if (depth !== 0) { + // console.error("didn't close", pattern) + return braceExpand("\\" + pattern, options) + } + + // x{y,z} -> ["xy", "xz"] + // console.error("set", set) + // console.error("suffix", pattern.substr(i)) + var suf = braceExpand(pattern.substr(i), options) + // ["b", "c{d,e}","{f,g}h"] -> + // [["b"], ["cd", "ce"], ["fh", "gh"]] + var addBraces = set.length === 1 + // console.error("set pre-expanded", set) + set = set.map(function (p) { + return braceExpand(p, options) + }) + // console.error("set expanded", set) + + + // [["b"], ["cd", "ce"], ["fh", "gh"]] -> + // ["b", "cd", "ce", "fh", "gh"] + set = set.reduce(function (l, r) { + return l.concat(r) + }) + + if (addBraces) { + set = set.map(function (s) { + return "{" + s + "}" + }) + } + + // now attach the suffixes. + var ret = [] + for (var i = 0, l = set.length; i < l; i ++) { + for (var ii = 0, ll = suf.length; ii < ll; ii ++) { + ret.push(set[i] + suf[ii]) + } + } + return ret + } + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. + Minimatch.prototype.parse = parse + var SUBPARSE = {} + function parse (pattern, isSub) { + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === "**") return GLOBSTAR + if (pattern === "") return "" + + var re = "" + , hasMagic = !!options.nocase + , escaping = false + // ? => one single character + , patternListStack = [] + , plType + , stateChar + , inClass = false + , reClassStart = -1 + , classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + , patternStart = pattern.charAt(0) === "." ? "" // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" + : "(?!\\.)" + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case "*": + re += star + hasMagic = true + break + case "?": + re += qmark + hasMagic = true + break + default: + re += "\\"+stateChar + break + } + stateChar = false + } + } + + for ( var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i ++ ) { + + if (options.debug) { + console.error("%s\t%s %s %j", pattern, i, re, c) + } + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += "\\" + c + escaping = false + continue + } + + SWITCH: switch (c) { + case "/": + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case "\\": + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + if (options.debug) { + console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c) + } + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + if (c === "!" && i === classStart + 1) c = "^" + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case "(": + if (inClass) { + re += "(" + continue + } + + if (!stateChar) { + re += "\\(" + continue + } + + plType = stateChar + patternListStack.push({ type: plType + , start: i - 1 + , reStart: re.length }) + // negation is (?:(?!js)[^/]*) + re += stateChar === "!" ? "(?:(?!" : "(?:" + stateChar = false + continue + + case ")": + if (inClass || !patternListStack.length) { + re += "\\)" + continue + } + + hasMagic = true + re += ")" + plType = patternListStack.pop().type + // negation is (?:(?!js)[^/]*) + // The others are (?:) + switch (plType) { + case "!": + re += "[^/]*?)" + break + case "?": + case "+": + case "*": re += plType + case "@": break // the default anyway + } + continue + + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|" + escaping = false + continue + } + + re += "|" + continue + + // these are mostly the same in regexp and glob + case "[": + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += "\\" + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case "]": + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += "\\" + c + escaping = false + continue + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === "^" && inClass)) { + re += "\\" + } + + re += c + + } // switch + } // for + + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + var cs = pattern.substr(classStart + 1) + , sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + "\\[" + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + var pl + while (pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = "\\" + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + "|" + }) + + // console.error("tail=%j\n %s", tail, tail) + var t = pl.type === "*" ? star + : pl.type === "?" ? qmark + : "\\" + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + + t + "\\(" + + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += "\\\\" + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case ".": + case "[": + case "(": addPatternStart = true + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== "" && hasMagic) re = "(?=.)" + re + + if (addPatternStart) re = patternStart + re + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [ re, hasMagic ] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? "i" : "" + , regExp = new RegExp("^" + re + "$", flags) + + regExp._glob = pattern + regExp._src = re + + return regExp + } + + minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() + } + + Minimatch.prototype.makeRe = makeRe + function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) return this.regexp = false + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + , flags = options.nocase ? "i" : "" + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === "string") ? regExpEscape(p) + : p._src + }).join("\\\/") + }).join("|") + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = "^(?:" + re + ")$" + + // can match anything, as long as it's not this. + if (this.negate) re = "^(?!" + re + ").*$" + + try { + return this.regexp = new RegExp(re, flags) + } catch (ex) { + return this.regexp = false + } + } + + minimatch.match = function (list, pattern, options) { + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (options.nonull && !list.length) { + list.push(pattern) + } + return list + } + + Minimatch.prototype.match = match + function match (f, partial) { + // console.error("match", f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === "" + + if (f === "/" && partial) return true + + var options = this.options + + // windows: need to use /, not \ + // On other platforms, \ is a valid (albeit bad) filename char. + if (platform === "win32") { + f = f.split("\\").join("/") + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + if (options.debug) { + console.error(this.pattern, "split", f) + } + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + // console.error(this.pattern, "set", set) + + for (var i = 0, l = set.length; i < l; i ++) { + var pattern = set[i] + var hit = this.matchOne(f, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate + } + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. + Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + if (options.debug) { + console.error("matchOne", + { "this": this + , file: file + , pattern: pattern }) + } + + if (options.matchBase && pattern.length === 1) { + file = path.basename(file.join("/")).split("/") + } + + if (options.debug) { + console.error("matchOne", file.length, pattern.length) + } + + for ( var fi = 0 + , pi = 0 + , fl = file.length + , pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi ++, pi ++ ) { + + if (options.debug) { + console.error("matchOne loop") + } + var p = pattern[pi] + , f = file[fi] + + if (options.debug) { + console.error(pattern, p, f) + } + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + if (options.debug) + console.error('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + , pr = pi + 1 + if (pr === pl) { + if (options.debug) + console.error('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for ( ; fi < fl; fi ++) { + if (file[fi] === "." || file[fi] === ".." || + (!options.dot && file[fi].charAt(0) === ".")) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + WHILE: while (fr < fl) { + var swallowee = file[fr] + + if (options.debug) { + console.error('\nglobstar while', + file, fr, pattern, pr, swallowee) + } + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + if (options.debug) + console.error('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === "." || swallowee === ".." || + (!options.dot && swallowee.charAt(0) === ".")) { + if (options.debug) + console.error("dot detected!", file, fr, pattern, pr) + break WHILE + } + + // ** swallows a segment, and continue. + if (options.debug) + console.error('globstar swallow a segment, and continue') + fr ++ + } + } + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + // console.error("\n>>> no match, partial?", file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === "string") { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + if (options.debug) { + console.error("string match", p, f, hit) + } + } else { + hit = f.match(p) + if (options.debug) { + console.error("pattern match", p, f, hit) + } + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === "") + return emptyFileEnd + } + + // should be unreachable. + throw new Error("wtf?") + } + + +// replace stuff like \* with * + function globUnescape (s) { + return s.replace(/\\(.)/g, "$1") + } + + + function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") + } diff --git a/node_modules/editorconfig/src/lib/ini.d.ts b/node_modules/editorconfig/src/lib/ini.d.ts new file mode 100644 index 00000000..fa185688 --- /dev/null +++ b/node_modules/editorconfig/src/lib/ini.d.ts @@ -0,0 +1,14 @@ +/// +import { URL } from 'url'; +/** + * Parses an .ini file + * @param file The location of the .ini file + */ +export declare function parse(file: string | number | Buffer | URL): Promise<[string | null, SectionBody][]>; +export declare function parseSync(file: string | number | Buffer | URL): [string | null, SectionBody][]; +export declare type SectionName = string | null; +export interface SectionBody { + [key: string]: string; +} +export declare type ParseStringResult = Array<[SectionName, SectionBody]>; +export declare function parseString(data: string): ParseStringResult; diff --git a/node_modules/editorconfig/src/lib/ini.js b/node_modules/editorconfig/src/lib/ini.js new file mode 100644 index 00000000..d205909f --- /dev/null +++ b/node_modules/editorconfig/src/lib/ini.js @@ -0,0 +1,106 @@ +"use strict"; +// Based on iniparser by shockie +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + 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) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +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 }); +var fs = __importStar(require("fs")); +/** + * define the possible values: + * section: [section] + * param: key=value + * comment: ;this is a comment + */ +var regex = { + section: /^\s*\[(([^#;]|\\#|\\;)+)\]\s*([#;].*)?$/, + param: /^\s*([\w\.\-\_]+)\s*[=:]\s*(.*?)\s*([#;].*)?$/, + comment: /^\s*[#;].*$/, +}; +/** + * Parses an .ini file + * @param file The location of the .ini file + */ +function parse(file) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, new Promise(function (resolve, reject) { + fs.readFile(file, 'utf8', function (err, data) { + if (err) { + reject(err); + return; + } + resolve(parseString(data)); + }); + })]; + }); + }); +} +exports.parse = parse; +function parseSync(file) { + return parseString(fs.readFileSync(file, 'utf8')); +} +exports.parseSync = parseSync; +function parseString(data) { + var sectionBody = {}; + var sectionName = null; + var value = [[sectionName, sectionBody]]; + var lines = data.split(/\r\n|\r|\n/); + lines.forEach(function (line) { + var match; + if (regex.comment.test(line)) { + return; + } + if (regex.param.test(line)) { + match = line.match(regex.param); + sectionBody[match[1]] = + match[2]; + } + else if (regex.section.test(line)) { + match = line.match(regex.section); + sectionName = match[1]; + sectionBody = {}; + value.push([sectionName, sectionBody]); + } + }); + return value; +} +exports.parseString = parseString; diff --git a/node_modules/es5-ext/.editorconfig b/node_modules/es5-ext/.editorconfig new file mode 100644 index 00000000..6c3bbec1 --- /dev/null +++ b/node_modules/es5-ext/.editorconfig @@ -0,0 +1,15 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +trim_trailing_whitespace = true + +[{*.yml}] +indent_size = 2 +indent_style = space diff --git a/node_modules/es5-ext/CHANGELOG.md b/node_modules/es5-ext/CHANGELOG.md new file mode 100644 index 00000000..411c7330 --- /dev/null +++ b/node_modules/es5-ext/CHANGELOG.md @@ -0,0 +1,306 @@ +# Change Log + +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. + +## [0.10.50](https://github.com/medikoo/es5-ext/compare/v0.10.49...v0.10.50) (2019-04-30) + +### Bug Fixes + +- maximum time value reference ([708202d](https://github.com/medikoo/es5-ext/commit/708202d)) + +### Features + +- ensure global resolves in strict mode ([c6a19d7](https://github.com/medikoo/es5-ext/commit/c6a19d7)), closes [#86](https://github.com/medikoo/es5-ext/issues/86) + +## [0.10.49](https://github.com/medikoo/es5-ext/compare/v0.10.48...v0.10.49) (2019-03-11) + +### Features + +- allow plain function usage of fn.compose ([2bafef7](https://github.com/medikoo/es5-ext/commit/2bafef7)) + +## [0.10.48](https://github.com/medikoo/es5-ext/compare/v0.10.47...v0.10.48) (2019-02-22) + +### Features + +- Object.ensurePlainObject util ([f48fbcf](https://github.com/medikoo/es5-ext/commit/f48fbcf)) + + + +## [0.10.47](https://github.com/medikoo/es5-ext/compare/v0.10.46...v0.10.47) (2019-01-16) + +### Features + +- Promise.prototype.finally shim ([4dadbc7](https://github.com/medikoo/es5-ext/commit/4dadbc7)) + + + +## [0.10.46](https://github.com/medikoo/es5-ext/compare/v0.10.45...v0.10.46) (2018-08-13) + +### Bug Fixes + +- assign-deep to not modify following arguments ([bf43d57](https://github.com/medikoo/es5-ext/commit/bf43d57)) + + + +## [0.10.45](https://github.com/medikoo/es5-ext/compare/v0.10.44...v0.10.45) (2018-06-01) + +### Bug Fixes + +- improve error message readbility ([adc91b9](https://github.com/medikoo/es5-ext/commit/adc91b9)) + + + +## [0.10.44](https://github.com/medikoo/es5-ext/compare/v0.10.43...v0.10.44) (2018-05-30) + +### Features + +- add Object.entries ([51d2f43](https://github.com/medikoo/es5-ext/commit/51d2f43)) + + + +## [0.10.43](https://github.com/medikoo/es5-ext/compare/v0.10.42...v0.10.43) (2018-05-28) + +### Features + +- improve patch string ([6a25b10](https://github.com/medikoo/es5-ext/commit/6a25b10)) + + + +## [0.10.42](https://github.com/medikoo/es5-ext/compare/v0.10.41...v0.10.42) (2018-03-28) + +### Bug Fixes + +- Date.isDate to exclude NaN dates ([3b61bc6](https://github.com/medikoo/es5-ext/commit/3b61bc6)) + +### Features + +- improve non-coercible string representation ([20bfb78](https://github.com/medikoo/es5-ext/commit/20bfb78)) +- improve non-stringifiable string representation ([2e4512d](https://github.com/medikoo/es5-ext/commit/2e4512d)) + + + +## [0.10.41](https://github.com/medikoo/es5-ext/compare/v0.10.40...v0.10.41) (2018-03-16) + +### Features + +- Add function.microtaskDelay method ([66481c0](https://github.com/medikoo/es5-ext/commit/66481c0)) +- Add Object.isThenable ([8d5a45c](https://github.com/medikoo/es5-ext/commit/8d5a45c)) +- Add promise.asCallback method ([dcc1451](https://github.com/medikoo/es5-ext/commit/dcc1451)) +- Object.ensurePlainFunction ([2682be6](https://github.com/medikoo/es5-ext/commit/2682be6)) + + + +## [0.10.40](https://github.com/medikoo/es5-ext/compare/v0.10.39...v0.10.40) (2018-03-09) + +### Features + +- **math:** decimal round, floor and ceil ([39290c6](https://github.com/medikoo/es5-ext/commit/39290c6)) +- **object:** isInteger and ensureInteger ([a5f7d04](https://github.com/medikoo/es5-ext/commit/a5f7d04)) + + + +## [0.10.39](https://github.com/medikoo/es5-ext/compare/v0.10.38...v0.10.39) (2018-02-16) + +### Features + +- Promise.lazy ([7a30a78](https://github.com/medikoo/es5-ext/commit/7a30a78)) + + + +## [0.10.38](https://github.com/medikoo/es5-ext/compare/v0.10.37...v0.10.38) (2018-01-16) + +### Features + +- Object.isNaturalNumber an Object.isNaturalNumberValue ([66a40af](https://github.com/medikoo/es5-ext/commit/66a40af)) + + + +## [0.10.37](https://github.com/medikoo/es5-ext/compare/v0.10.36...v0.10.37) (2017-11-23) + +### Features + +- String.random util ([7c28739](https://github.com/medikoo/es5-ext/commit/7c28739)) + + + +## [0.10.36](https://github.com/medikoo/es5-ext/compare/v0.10.35...v0.10.36) (2017-11-23) + +### Features + +- **date:** isTimeValue and ensureTimeValue utils ([7659dc5](https://github.com/medikoo/es5-ext/commit/7659dc5)) + + + +## [0.10.35](https://github.com/medikoo/es5-ext/compare/v0.10.34...v0.10.35) (2017-10-13) + +### Bug Fixes + +- **Object.copy:** do not upgrade primitives to objects ([dd4d88f](https://github.com/medikoo/es5-ext/commit/dd4d88f)) + + + +## [0.10.34](https://github.com/medikoo/es5-ext/compare/v0.10.33...v0.10.34) (2017-10-13) + +### Features + +- **copyDeep:** duplicate only recursive instances ([bba529a](https://github.com/medikoo/es5-ext/commit/bba529a)) + + + +## [0.10.33](https://github.com/medikoo/es5-ext/compare/v0.10.32...v0.10.33) (2017-10-13) + +### Bug Fixes + +- **Object.assignDeep:** relax input validation ([1baf57d](https://github.com/medikoo/es5-ext/commit/1baf57d)) + + + +## [0.10.32](https://github.com/medikoo/es5-ext/compare/v0.10.31...v0.10.32) (2017-10-13) + +### Features + +- Object.assignDeep ([2345e0b](https://github.com/medikoo/es5-ext/commit/2345e0b)) + + + +## [0.10.31](https://github.com/medikoo/es5-ext/compare/v0.10.30...v0.10.31) (2017-10-09) + +### Features + +- Object.isPlainFunction utility ([031be0a](https://github.com/medikoo/es5-ext/commit/031be0a)) + + + +## [0.10.30](https://github.com/medikoo/es5-ext/compare/v0.10.29...v0.10.30) (2017-08-25) + +### Bug Fixes + +- value stringification for error message ([37bb96b](https://github.com/medikoo/es5-ext/commit/37bb96b)) + + + +## [0.10.29](https://github.com/medikoo/es5-ext/compare/v0.10.28...v0.10.29) (2017-08-18) + +### Bug Fixes + +- string.repeat after recent regression ([b02fab4](https://github.com/medikoo/es5-ext/commit/b02fab4)) + + + +## [0.10.28](https://github.com/medikoo/es5-ext/compare/v0.10.27...v0.10.28) (2017-08-18) + +### Features + +- array.isEmpty method ([b0cfbdd](https://github.com/medikoo/es5-ext/commit/b0cfbdd)) +- improve new lines representation ([860fe8b](https://github.com/medikoo/es5-ext/commit/860fe8b)) +- Object.ensureArray util ([595c341](https://github.com/medikoo/es5-ext/commit/595c341)) +- toShortStringRepresentation util ([6842d06](https://github.com/medikoo/es5-ext/commit/6842d06)) + + + +## [0.10.27](https://github.com/medikoo/es5-ext/compare/v0.10.26...v0.10.27) (2017-08-11) + +### Bug Fixes + +- isNumberValue should not crash on non-coercible values ([0db765e](https://github.com/medikoo/es5-ext/commit/0db765e)) + +### Features + +- add Object.ensureFiniteNumber util ([11c67f5](https://github.com/medikoo/es5-ext/commit/11c67f5)) +- add Object.isFiniteNumber util ([fe5b55a](https://github.com/medikoo/es5-ext/commit/fe5b55a)) + + + +## [0.10.26](https://github.com/medikoo/es5-ext/compare/v0.10.25...v0.10.26) (2017-08-02) + +### Bug Fixes + +- **general:** ensure optionalChaining in index ([3df879a](https://github.com/medikoo/es5-ext/commit/3df879a)) + + + +## [0.10.25](https://github.com/medikoo/es5-ext/compare/v0.10.24...v0.10.25) (2017-08-02) + +### Features + +- **general:** optionalChaining utility ([26332b5](https://github.com/medikoo/es5-ext/commit/26332b5)) + + + +## [0.10.24](https://github.com/medikoo/es5-ext/compare/v0.10.23...v0.10.24) (2017-07-10) + +### Features + +- resolve global with CSP safe method ([d386449](https://github.com/medikoo/es5-ext/commit/d386449)) + + + +## [0.10.23](https://github.com/medikoo/es5-ext/compare/v0.10.22...v0.10.23) (2017-06-05) + +### Bug Fixes + +- **Error.custom:** allow non-string code ([e8db3a0](https://github.com/medikoo/es5-ext/commit/e8db3a0)) +- **Error.custom:** improve `ext` argument detection ([0edbfbc](https://github.com/medikoo/es5-ext/commit/0edbfbc)) + + + +## [0.10.22](https://github.com/medikoo/es5-ext/compare/v0.10.21...v0.10.22) (2017-05-31) + +### Bug Fixes + +- ensure proper symbols stringification in early implementations ([ce51900](https://github.com/medikoo/es5-ext/commit/ce51900)) + + + +## [0.10.21](https://github.com/medikoo/es5-ext/compare/v0.10.20...v0.10.21) (2017-05-22) + +### Features + +- support arrow functions in Function/#/to-tring-tokens.js ([ad3de1e](https://github.com/medikoo/es5-ext/commit/ad3de1e)) + + + +## [0.10.20](https://github.com/medikoo/es5-ext/compare/v0.10.19...v0.10.20) (2017-05-17) + +### Features + +- if listed copy not only if own property ([d7e7cef](https://github.com/medikoo/es5-ext/commit/d7e7cef)) +- support `ensure` option in Object.copy ([295326f](https://github.com/medikoo/es5-ext/commit/295326f)) + + + +## [0.10.19](https://github.com/medikoo/es5-ext/compare/v0.10.18...v0.10.19) (2017-05-17) + +### Features + +- support propertyNames option in Object.copy ([5442279](https://github.com/medikoo/es5-ext/commit/5442279)) + + + +## [0.10.18](https://github.com/medikoo/es5-ext/compare/v0.10.17...v0.10.18) (2017-05-15) + +### Bug Fixes + +- take all changes in safeToString ([3c5cd12](https://github.com/medikoo/es5-ext/commit/3c5cd12)) + + + +## [0.10.17](https://github.com/medikoo/es5-ext/compare/v0.10.16...v0.10.17) (2017-05-15) + +### Features + +- introduce Object.ensurePromise ([46a2f45](https://github.com/medikoo/es5-ext/commit/46a2f45)) +- introduce Object.isPromise ([27aecc8](https://github.com/medikoo/es5-ext/commit/27aecc8)) +- introduce safeToString ([0cc6a7b](https://github.com/medikoo/es5-ext/commit/0cc6a7b)) + + + +## [0.10.16](https://github.com/medikoo/es5-ext/compare/v0.10.15...v0.10.16) (2017-05-09) + +### Features + +- add String.prototype.count ([2e53241](https://github.com/medikoo/es5-ext/commit/2e53241)) + +## Changelog for previous versions + +See `CHANGES` file diff --git a/node_modules/es5-ext/CHANGES b/node_modules/es5-ext/CHANGES new file mode 100644 index 00000000..bb84baba --- /dev/null +++ b/node_modules/es5-ext/CHANGES @@ -0,0 +1,650 @@ +For recent changelog see CHANGELOG.md + +----- + +v0.10.15 -- 2017.03.20 +* Fix Object.isValue (it was actually isNotValue) + +v0.10.14 -- 2017.03.15 +* Object.isValue util + +v0.10.13 -- 2017.03.13 +* Introduce JSON.safeStringify +* Improve message handling in error/custom +* Fix Array#concat shim +* Improve Array#flatten algorithm so it's stack trace friendly +* Make Object.isObject ES3 compatible + +v0.10.12 -- 2016.07.01 +* Ensure symbols are copied in Object.mixin +* Prevent RangeError errors in array#flatten +* Do not validate invalidate dates in validDate + +v0.10.11 -- 2015.12.18 +* Ensure that check for implementation of RegExp flags doesn't crash in V8 (thanks @mathiasbynens) + +v0.10.10 -- 2015.12.11 +* Add Object.isNumberValue util + +v0.10.9 -- 2015.12.01 +* Add Object.ensureNaturalNumber and Object.ensureNaturalNumberValue + +v0.10.8 -- 2015.10.02 +* Add Number.isNatural +* Add Object.find and Object.findKey +* Support arrays in Object.copyDeep +* Fix iteration issue in forEachRight and someRight +* Fix detection of native sinh +* Depend on es6-symbol v3 + +v0.10.7 -- 2015.04.22 +* New utlitities. They're convention differs from v0.10, as they were supposed to land in v1. + Still they're non breaking and start the conventions to be used in v1 + * Object.validateArrayLike + * Object.validateArrayLikeObject + * Object.validateStringifiable + * Object.validateStringifiableValue + * Universal utilities for array-like/iterable objects + * Iterable.is + * Iterable.validate + * Iterable.validateObject + * Iterable.forEach +* Fix camelToHyphen resolution, it must be absolutely reversable by hyphenToCamel +* Fix calculations of large numbers in Math.tanh +* Fix algorithm of Math.sinh +* Fix indexes to not use real symbols +* Fix length of String.fromCodePoint +* Fix tests of Array#copyWithin +* Update Travis CI configuration + +v0.10.6 -- 2015.02.02 +* Fix handling of infinite values in Math.trunc +* Fix handling of getters in Object.normalizeOptions + +v0.10.5 -- 2015.01.20 +* Add Function#toStringTokens +* Add Object.serialize and Object.unserialize +* Add String.randomUniq +* Fix Strin#camelToHyphen issue with tokens that end with digit +* Optimise Number.isInteger logic +* Improve documentation +* Configure lint scripts +* Fix spelling of LICENSE + +v0.10.4 -- 2014.04.30 +* Assure maximum spec compliance of Array.of and Array.from (thanks @mathiasbynens) +* Improve documentations + +v0.10.3 -- 2014.04.29 +Provide accurate iterators handling: +* Array.from improvements: + * Assure right unicode symbols resolution when processing strings in Array.from + * Rely on ES6 symbol shim and use native @@iterator Symbol if provided by environment +* Add methods: + * Array.prototype.entries + * Array.prototype.keys + * Array.prototype.values + * Array.prototype[@@iterator] + * String.prototype[@@iterator] + +Improve documentation + +v0.10.2 -- 2014.04.24 +- Simplify and deprecate `isCallable`. It seems in ES5 based engines there are + no callable objects which are `typeof obj !== 'function'` +- Update Array.from map callback signature (up to latest resolution of TC39) +- Improve documentation + +v0.10.1 -- 2014.04.14 +Bump version for npm +(Workaround for accidental premature publish & unpublish of v0.10.0 a while ago) + +v0.10.0 -- 2014.04.13 +Major update: +- All methods and function specified for ECMAScript 6 are now introduced as + shims accompanied with functions through which (optionally) they can be + implementend on native objects +- Filename convention was changed to shorter and strictly lower case names. e.g. + `lib/String/prototype/starts-with` became `string/#/starts-with` +- Generated functions are guaranteed to have expected length +- Objects with null prototype (created via `Object.create(null)`) are widely + supported (older version have crashed due to implied `obj.hasOwnProperty` and + related invocations) +- Support array subclasses +- When handling lists do not limit its length to Uint32 range +- Use newly introduced `Object.eq` for strict equality in place of `Object.is` +- Iteration of Object have been improved so properties that were hidden or + removed after iteration started are not iterated. + +Additions: +- `Array.isPlainArray` +- `Array.validArray` +- `Array.prototype.concat` (as updated with ES6) +- `Array.prototype.copyWithin` (as introduced with ES6) +- `Array.prototype.fill` (as introduced with ES6) +- `Array.prototype.filter` (as updated with ES6) +- `Array.prototype.findIndex` (as introduced with ES6) +- `Array.prototype.map` (as updated with ES6) +- `Array.prototype.separate` +- `Array.prototype.slice` (as updated with ES6) +- `Array.prototype.splice` (as updated with ES6) +- `Function.prototype.copy` +- `Math.acosh` (as introduced with ES6) +- `Math.atanh` (as introduced with ES6) +- `Math.cbrt` (as introduced with ES6) +- `Math.clz32` (as introduced with ES6) +- `Math.cosh` (as introduced with ES6) +- `Math.expm1` (as introduced with ES6) +- `Math.fround` (as introduced with ES6) +- `Math.hypot` (as introduced with ES6) +- `Math.imul` (as introduced with ES6) +- `Math.log2` (as introduced with ES6) +- `Math.log10` (as introduced with ES6) +- `Math.log1p` (as introduced with ES6) +- `Math.sinh` (as introduced with ES6) +- `Math.tanh` (as introduced with ES6) +- `Math.trunc` (as introduced with ES6) +- `Number.EPSILON` (as introduced with ES6) +- `Number.MIN_SAFE_INTEGER` (as introduced with ES6) +- `Number.MAX_SAFE_INTEGER` (as introduced with ES6) +- `Number.isFinite` (as introduced with ES6) +- `Number.isInteger` (as introduced with ES6) +- `Number.isSafeInteger` (as introduced with ES6) +- `Object.create` (with fix for V8 issue which disallows prototype turn of + objects derived from null +- `Object.eq` - Less restrictive version of `Object.is` based on SameValueZero + algorithm +- `Object.firstKey` +- `Object.keys` (as updated with ES6) +- `Object.mixinPrototypes` +- `Object.primitiveSet` +- `Object.setPrototypeOf` (as introduced with ES6) +- `Object.validObject` +- `RegExp.escape` +- `RegExp.prototype.match` (as introduced with ES6) +- `RegExp.prototype.replace` (as introduced with ES6) +- `RegExp.prototype.search` (as introduced with ES6) +- `RegExp.prototype.split` (as introduced with ES6) +- `RegExp.prototype.sticky` (as introduced with ES6) +- `RegExp.prototype.unicode` (as introduced with ES6) +- `String.fromCodePoint` (as introduced with ES6) +- `String.raw` (as introduced with ES6) +- `String.prototype.at` +- `String.prototype.codePointAt` (as introduced with ES6) +- `String.prototype.normalize` (as introduced with ES6) +- `String.prototype.plainReplaceAll` + +Removals: +- `reserved` set +- `Array.prototype.commonLeft` +- `Function.insert` +- `Function.remove` +- `Function.prototype.silent` +- `Function.prototype.wrap` +- `Object.descriptor` Move to external `d` project. + See: https://github.com/medikoo/d +- `Object.diff` +- `Object.extendDeep` +- `Object.reduce` +- `Object.values` +- `String.prototype.trimCommonLeft` + +Renames: +- `Function.i` into `Function.identity` +- `Function.k` into `Function.constant` +- `Number.toInt` into `Number.toInteger` +- `Number.toUint` into `Number.toPosInteger` +- `Object.extend` into `Object.assign` (as introduced in ES 6) +- `Object.extendProperties` into `Object.mixin`, with improved internal + handling, so it matches temporarily specified `Object.mixin` for ECMAScript 6 +- `Object.isList` into `Object.isArrayLike` +- `Object.mapToArray` into `Object.toArray` (with fixed function length) +- `Object.toPlainObject` into `Object.normalizeOptions` (as this is the real + use case where we use this function) +- `Function.prototype.chain` into `Function.prototype.compose` +- `Function.prototype.match` into `Function.prototype.spread` +- `String.prototype.format` into `String.formatMethod` + +Improvements & Fixes: +- Remove workaround for primitive values handling in object iterators +- `Array.from`: Update so it follows ES 6 spec +- `Array.prototype.compact`: filters just null and undefined values + (not all falsies) +- `Array.prototype.eIndexOf` and `Array.prototype.eLastIndexOf`: fix position + handling, improve internals +- `Array.prototype.find`: return undefined not null, in case of not found + (follow ES 6) +- `Array.prototype.remove` fix function length +- `Error.custom`: simplify, Custom class case is addressed by outer + `error-create` project -> https://github.com/medikoo/error-create +- `Error.isError` true only for Error instances (remove detection of host + Exception objects) +- `Number.prototype.pad`: Normalize negative pad +- `Object.clear`: Handle errors same way as in `Object.assign` +- `Object.compact`: filters just null and undefined values (not all falsies) +- `Object.compare`: Take into account NaN values +- `Object.copy`: Split into `Object.copy` and `Object.copyDeep` +- `Object.isCopy`: Separate into `Object.isCopy` and `Object.isCopyDeep`, where + `isCopyDeep` handles nested plain objects and plain arrays only +- `String.prototype.endsWith`: Adjust up to ES6 specification +- `String.prototype.repeat`: Adjust up to ES6 specification and improve algorithm +- `String.prototype.simpleReplace`: Rename into `String.prototype.plainReplace` +- `String.prototype.startsWith`: Adjust up to ES6 specification +- Update lint rules, and adjust code to that +- Update Travis CI configuration +- Remove Makefile (it's cross-env utility) + +v0.9.2 -- 2013.03.11 +Added: +* Array.prototype.isCopy +* Array.prototype.isUniq +* Error.CustomError +* Function.validFunction +* Object.extendDeep +* Object.descriptor.binder +* Object.safeTraverse +* RegExp.validRegExp +* String.prototype.capitalize +* String.prototype.simpleReplace + +Fixed: +* Fix Array.prototype.diff for sparse arrays +* Accept primitive objects as input values in Object iteration methods and + Object.clear, Object.count, Object.diff, Object.extend, + Object.getPropertyNames, Object.values +* Pass expected arguments to callbacks of Object.filter, Object.mapKeys, + Object.mapToArray, Object.map +* Improve callable callback support in Object.mapToArray + +v0.9.1 -- 2012.09.17 +* Object.reduce - reduce for hash-like collections +* Accapt any callable object as callback in Object.filter, mapKeys and map +* Convention cleanup + +v0.9.0 -- 2012.09.13 +We're getting to real solid API + +Removed: +* Function#memoize - it's grown up to be external package, to be soon published + as 'memoizee' +* String.guid - it doesn't fit es5-ext (extensions) concept, will be provided as + external package +# Function.arguments - obsolete +# Function.context - obsolete +# Function#flip - not readable when used, so it was never used +# Object.clone - obsolete and confusing + +Added: +* String#camelToHyphen - String format convertion + +Renamed: +* String#dashToCamelCase -> String#hyphenToCamel + +Fixes: +* Object.isObject - Quote names in literals that match reserved keywords + (older implementations crashed on that) +* String#repeat - Do not accept negative values (coerce them to 1) + +Improvements: +* Array#remove - Accepts many arguments, we can now remove many values at once +* Object iterators (forEach, map, some) - Compare function invoked with scope + object bound to this +* Function#curry - Algorithm cleanup +* Object.isCopy - Support for all types, not just plain objects +* Object.isPlainObject - Support for cross-frame objects +* Do not memoize any of the functions, it shouldn't be decided internally +* Remove Object.freeze calls in reserved, it's not up to convention +* Improved documentation +* Better linting (hard-core approach using both JSLint mod and JSHint) +* Optional arguments are now documented in funtions signature + +v0.8.2 -- 2012.06.22 +Fix errors in Array's intersection and exclusion methods, related to improper +usage of contains method + +v0.8.1 -- 2012.06.13 +Reorganized internal logic of Function.prototype.memoize. So it's more safe now +and clears cache properly. Additionally preventCache option was provided. + +v0.8.0 -- 2012.05.28 +Again, major overhaul. Probably last experimental stuff was trashed, all API +looks more like standard extensions now. + +Changes: +* Turn all Object.prototype extensions into functions and move them to Object +namespace. We learned that extending Object.prototype is bad idea in any case. +* Rename Function.prototype.curry into Function.prototype.partial. This function + is really doing partial application while currying is slightly different + concept. +* Convert Function.prototype.ncurry to new implementation of + Function.prototype.curry, it now serves real curry concept additionaly it + covers use cases for aritize and hold, which were removed. +* Rename Array's peek to last, and provide support for sparse arrays in it +* Rename Date's monthDaysCount into daysInMonth +* Simplify object iterators, now order of iteration can be configured with just + compareFn argument (no extra byKeys option) +* Rename Object.isDuplicate to Object.isCopy +* Rename Object.isEqual to Object.is which is compatible with future 'is' + keyword +* Function.memoize is now Function.prototype.memoize. Additionally clear cache + functionality is added, and access to original arguments object. +* Rename validation functions: assertNotNull to validValue, assertCallable to + validCallable. validValue was moved to Object namespace. On success they now + return validated value instead of true, it supports better composition. + Additionally created Date.validDate and Error.validError +* All documentation is now held in README.md not in code files. +* Move guid to String namespace. All guids now start with numbers. +* Array.generate: fill argument is now optional +* Object.toArray is now Array.from (as new ES6 specification draft suggests) +* All methods that rely on indexOf or lastIndexOf, now rely on egal (Object.is) + versions of them (eIndexOf, eLastIndexOf) +* Turn all get* functions that returned methods into actuall methods (get* + functionality can still be achieved with help of Function.prototype.partial). + So: Date.getFormat is now Date.prototype.format, + Number.getPad is now Number.prototype.pad, + String.getFormat is now String.prototype.format, + String.getIndent is now String.prototype.indent, + String.getPad is now String.prototype.pad +* Refactored Object.descriptor, it is now just two functions, main one and + main.gs, main is for describing values, and gs for describing getters and + setters. Configuration is passed with first argument as string e.g. 'ce' for + configurable and enumerable. If no configuration string is provided then by + default it returns configurable and writable but not enumerable for value or + configurable but not enumerable for getter/setter +* Function.prototype.silent now returns prepared function (it was + expected to be fixed for 0.7) +* Reserved keywords map (reserved) is now array not hash. +* Object.merge is now Object.extend (while former Object.extend was completely + removed) - 'extend' implies that we change object, not creating new one (as + 'merge' may imply). Similarily Object.mergeProperties was renamed to + Object.extendProperties +* Position argument support in Array.prototype.contains and + String.prototype.contains (so it follows ES6 specification draft) +* endPosition argument support in String.prototype.endsWith and fromPosition + argument support in String.prototype.startsWith (so it follows ES6 + specification draft) +* Better and cleaner String.prototype.indent implementation. No default value + for indent string argument, optional nest value (defaults to 1), remove + nostart argument +* Correct length values for most methods (so they reflect length of similar + methods in standard) +* Length argument is now optional in number and string pad methods. +* Improve arguments validation in general, so it adheres to standard conventions +* Fixed format of package.json + +Removed methods and functions: +* Object.prototype.slice - Object is not ordered collection, so slice doesn't + make sense. +* Function's rcurry, rncurry, s - too cumbersome for JS, not many use cases for + that +* Function.prototype.aritize and Function.prototype.hold - same functionality + can be achieved with new Function.prototype.curry +* Function.prototype.log - provided more generic Function.prototype.wrap for + same use case +* getNextIdGenerator - no use case for that (String.guid should be used if + needed) +* Object.toObject - Can be now acheived with Object(validValue(x)) +* Array.prototype.someValue - no real use case (personally used once and + case was already controversial) +* Date.prototype.duration - moved to external package +* Number.getAutoincrement - No real use case +* Object.prototype.extend, Object.prototype.override, + Object.prototype.plainCreate, Object.prototype.plainExtend - It was probably + too complex, same should be achieved just with Object.create, + Object.descriptor and by saving references to super methods in local scope. +* Object.getCompareBy - Functions should be created individually for each use + case +* Object.get, Object.getSet, Object.set, Object.unset - Not many use cases and + same can be easily achieved with simple inline function +* String.getPrefixWith - Not real use case for something that can be easily + achieved with '+' operator +* Object.isPrimitive - It's just negation of Object.isObject +* Number.prototype.isLess, Number.prototype.isLessOrEqual - they shouldn't be in + Number namespace and should rather be addressed with simple inline functions. +* Number.prototype.subtract - Should rather be addressed with simple inline + function + +New methods and functions: +* Array.prototype.lastIndex - Returns last declared index in array +* String.prototype.last - last for strings +* Function.prototype.wrap - Wrap function with other, it allows to specify + before and after behavior transform return value or prevent original function + from being called. +* Math.sign - Returns sign of a number (already in ES6 specification draft) +* Number.toInt - Converts value to integer (already in ES6 specification draft) +* Number.isNaN - Returns true if value is NaN (already in ES6 specification + draft) +* Number.toUint - Converts value to unsigned integer +* Number.toUint32 - Converts value to 32bit unsigned integer +* Array.prototype.eIndexOf, eLastIndexOf - Egal version (that uses Object.is) of + standard methods (all methods that were using native indexOf or lastIndexOf + now uses eIndexOf and elastIndexOf respectively) +* Array.of - as it's specified for ES6 + +Fixes: +* Fixed binarySearch so it always returns valid list index +* Object.isList - it failed on lists that are callable (e.g. NodeList in Nitro + engine) +* Object.map now supports third argument for callback + +v0.7.1 -- 2012.01.05 +New methods: +* Array.prototype.firstIndex - returns first valid index of array (for + sparse arrays it may not be '0' + +Improvements: +* Array.prototype.first - now returns value for index returned by firstIndex +* Object.prototype.mapToArray - can be called without callback, then array of + key-value pairs is returned + +Fixes +* Array.prototype.forEachRight, object's length read through UInt32 conversion + +v0.7.0 -- 2011.12.27 +Major update. +Stepped back from experimental ideas and introduced more standard approach +taking example from how ES5 methods and functions are designed. One exceptions +is that, we don’t refrain from declaring methods for Object.prototype - it’s up +to developer whether how he decides to use it in his context (as function or as +method). + +In general: +* Removed any method 'functionalization' and functionalize method itself. + es5-ext declares plain methods, which can be configured to work as functions + with call.bind(method) - see documentation. +* Removed separation of Object methods for ES5 (with descriptors) and + ES3 (plain) - we're following ES5 idea on that, some methods are intended just + for enumerable properties and some are for all properties, all are declared + for Object.prototype +* Removed separation of Array generic (collected in List folder) and not generic + methods (collected in Array folder). Now all methods are generic and are in + Array/prototype folder. This separation also meant, that methods in Array are + usually destructive. We don’t do that separation now, there’s generally no use + case for destructive iterators, we should be fine with one version of each + method, (same as ES5 is fine with e.g. one, non destructive 'filter' method) +* Folder structure resembles tree of native ES5 Objects +* All methods are written with ES5 conventions in mind, it means that most + methods are generic and can be run on any object. In more detail: + ** Array.prototype and Object.prototype methods can be run on any object (any + not null or undefined value), + ** Date.prototype methods should be called only on Date instances. + ** Function.prototype methods can be called on any callable objects (not + necessarily functions) + ** Number.prototype & String.prototype methods can be called on any value, in + case of Number it it’ll be degraded to number, in case of string it’ll be + degraded to string. +* Travis CI support (only for Node v0.6 branch, as v0.4 has buggy V8 version) + +Improvements for existing functions and methods: +* Function.memoize (was Function.cache) is now fully generic, can operate on any + type of arguments and it’s NaN safe (all NaN objects are considered equal) +* Method properties passed to Object.prototype.extend or + Object.prototype.override can aside of _super optionally take prototype object + via _proto argument +* Object iterators: forEach, mapToArray and every can now iterate in specified + order +* pluck, invoke and other functions that return reusable functions or methods + have now their results memoized. + +New methods: +* Global: assertNotNull, getNextIdGenerator, guid, isEqual, isPrimitive, + toObject +* Array: generate +* Array.prototype: binarySearch, clear, contains, diff, exclusion, find, first, + forEachRight, group, indexesOf, intersection, remove, someRight, someValue +* Boolean: isBoolean +* Date: isDate +* Function: arguments, context, insert, isArguments, remove +* Function.prototype: not, silent +* Number: getAutoincrement, isNumber +* Number.prototype: isLessOrEqual, isLess, subtract +* Object: assertCallable, descriptor (functions for clean descriptors), + getCompareBy, isCallable, isObject +* Object.prototype: clone (real clone), compact, count, diff, empty, + getPropertyNames, get, keyOf, mapKeys, override, plainCreate, plainExtend, + slice, some, unset +* RegExp: isRegExp +* String: getPrefixWith, isString +* String.prototype: caseInsensitiveCompare, contains, isNumeric + +Renamed methods: +* Date.clone -> Date.prototype.copy +* Date.format -> Date.getFormat +* Date/day/floor -> Date.prototype.floorDay +* Date/month/floor -> Date.prototype.floorMonth +* Date/month/year -> Date.prototype.floorYear +* Function.cache -> Function.memoize +* Function.getApplyArg -> Function.prototype.match +* Function.sequence -> Function.prototype.chain +* List.findSameStartLength -> Array.prototype.commonLeft +* Number.pad -> Number.getPad +* Object/plain/clone -> Object.prototype.copy +* Object/plain/elevate -> Object.prototype.flatten +* Object/plain/same -> Object.prototype.isDuplicate +* Object/plain/setValue -> Object.getSet +* String.format -> String.getFormat +* String.indent -> String.getIndent +* String.pad -> String.getPad +* String.trimLeftStr -> String.prototype.trimCommonLeft +* Object.merge -> Object.prototype.mergeProperties +* Object/plain/pluck -> Object.prototype.get +* Array.clone is now Array.prototype.copy and can be used also on any array-like + objects +* List.isList -> Object.isList +* List.toArray -> Object.prototype.toArray +* String/convert/dashToCamelCase -> String.prototype.dashToCamelCase + +Removed methods: +* Array.compact - removed destructive version (that operated on same array), we + have now non destructive version as Array.prototype.compact. +* Function.applyBind -> use apply.bind directly +* Function.bindBind -> use bind.bind directly +* Function.callBind -> use call.bind directly +* Fuction.clone -> no valid use case +* Function.dscope -> controversial approach, shouldn’t be considered seriously +* Function.functionalize -> It was experimental but standards are standards +* List/sort/length -> It can be easy obtained by Object.getCompareBy(‘length’) +* List.concat -> Concat’s for array-like’s makes no sense, just convert to array + first +* List.every -> Use Array.prototype.every directly +* List.filter -> Use Array.prototype.filter directly +* List.forEach -> User Array.prototype.forEach directly +* List.isListObject -> No valid use case, do: isList(list) && (typeof list === + 'object’) +* List.map -> Use Array.prototype.map directly +* List.reduce -> Use Array.prototype.reduce directly +* List.shiftSame -> Use Array.prototype.commonLeft and do slice +* List.slice -> Use Array.prototype.slice directly +* List.some -> Use Array.prototype.some directly +* Object.bindMethods -> it was version that considered descriptors, we have now + Object.prototype.bindMethods which operates only on enumerable properties +* Object.every -> version that considered all properties, we have now + Object.prototype.every which iterates only enumerables +* Object.invoke -> no use case +* Object.mergeDeep -> no use case +* Object.pluck -> no use case +* Object.same -> it considered descriptors, now there’s only Object.isDuplicate + which compares only enumerable properties +* Object.sameType -> no use case +* Object.toDescriptor and Object.toDescriptors -> replaced by much nicer + Object.descriptor functions +* Object/plain/link -> no use case (it was used internally only by + Object/plain/merge) +* Object/plain/setTrue -> now easily configurable by more universal + Object.getSet(true) +* String.trimRightStr -> Eventually String.prototype.trimCommonRight will be + added + +v0.6.3 -- 2011.12.12 +* Cleared npm warning for misnamed property in package.json + +v0.6.2 -- 2011.08.12 +* Calling String.indent without scope (global scope then) now treated as calling + it with null scope, it allows more direct invocations when using default nest + string: indent().call(str, nest) + +v0.6.1 -- 2011.08.08 +* Added TAD test suite to devDependencies, configured test commands. + Tests can be run with 'make test' or 'npm test' + +v0.6.0 -- 2011.08.07 +New methods: +* Array: clone, compact (in place) +* Date: format, duration, clone, monthDaysCount, day.floor, month.floor, + year.floor +* Function: getApplyArg, , ncurry, rncurry, hold, cache, log +* List: findSameStartLength, shiftSame, peek, isListObject +* Number: pad +* Object: sameType, toString, mapToArray, mergeDeep, toDescriptor, + toDescriptors, invoke +* String: startsWith, endsWith, indent, trimLeftStr, trimRightStr, pad, format + +Fixed: +* Object.extend does now prototypal extend as exptected +* Object.merge now tries to overwrite only configurable properties +* Function.flip + +Improved: +* Faster List.toArray +* Better global retrieval +* Functionalized all Function methods +* Renamed bindApply and bindCall to applyBind and callBind +* Removed Function.inherit (as it's unintuitive curry clone) +* Straightforward logic in Function.k +* Fixed naming of some tests files (letter case issue) +* Renamed Function.saturate into Function.lock +* String.dashToCamelCase digits support +* Strings now considered as List objects +* Improved List.compact +* Concise logic for List.concat +* Test wit TAD in clean ES5 context + +v0.5.1 -- 2011.07.11 +* Function's bindBind, bindCall and bindApply now more versatile + +v0.5.0 -- 2011.07.07 +* Removed Object.is and List.apply +* Renamed Object.plain.is to Object.plain.isPlainObject (keep naming convention + consistent) +* Improved documentation + +v0.4.0 -- 2011.07.05 +* Take most functions on Object to Object.plain to keep them away from object + descriptors +* Object functions with ES5 standard in mind (object descriptors) + +v0.3.0 -- 2011.06.24 +* New functions +* Consistent file naming (dash instead of camelCase) + +v0.2.1 -- 2011.05.28 +* Renamed Functions.K and Function.S to to lowercase versions (use consistent + naming) + +v0.2.0 -- 2011.05.28 +* Renamed Array folder to List (as its generic functions for array-like objects) +* Added Makefile +* Added various functions + +v0.1.0 -- 2011.05.24 +* Initial version diff --git a/node_modules/es5-ext/LICENSE b/node_modules/es5-ext/LICENSE new file mode 100644 index 00000000..89a96eac --- /dev/null +++ b/node_modules/es5-ext/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2011-2019, Mariusz Nowak, @medikoo, medikoo.com + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/es5-ext/README.md b/node_modules/es5-ext/README.md new file mode 100644 index 00000000..968c1e1a --- /dev/null +++ b/node_modules/es5-ext/README.md @@ -0,0 +1,1029 @@ +[![Build status][nix-build-image]][nix-build-url] +[![Windows status][win-build-image]][win-build-url] +![Transpilation status][transpilation-image] +[![npm version][npm-image]][npm-url] + +# es5-ext + +## ECMAScript 5 extensions + +### (with respect to ECMAScript 6 standard) + +Shims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind. + +It's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board. + +When used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims. + +### Installation + + $ npm install es5-ext + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Usage + +#### ECMAScript 6 features + +You can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already). + +```javascript +require("es5-ext/array/from/implement"); +Array.from("foo"); // ['f', 'o', 'o'] +``` + +You can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not. + +```javascript +var aFrom = require("es5-ext/array/from"); +aFrom("foo"); // ['f', 'o', 'o'] +``` + +If you want to use shim unconditionally (even if native implementation exists) do: + +```javascript +var aFrom = require("es5-ext/array/from/shim"); +aFrom("foo"); // ['f', 'o', 'o'] +``` + +##### List of ES6 shims + +It's about properties introduced with ES6 and those that have been updated in new spec. + +- `Array.from` -> `require('es5-ext/array/from')` +- `Array.of` -> `require('es5-ext/array/of')` +- `Array.prototype.concat` -> `require('es5-ext/array/#/concat')` +- `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')` +- `Array.prototype.entries` -> `require('es5-ext/array/#/entries')` +- `Array.prototype.fill` -> `require('es5-ext/array/#/fill')` +- `Array.prototype.filter` -> `require('es5-ext/array/#/filter')` +- `Array.prototype.find` -> `require('es5-ext/array/#/find')` +- `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')` +- `Array.prototype.keys` -> `require('es5-ext/array/#/keys')` +- `Array.prototype.map` -> `require('es5-ext/array/#/map')` +- `Array.prototype.slice` -> `require('es5-ext/array/#/slice')` +- `Array.prototype.splice` -> `require('es5-ext/array/#/splice')` +- `Array.prototype.values` -> `require('es5-ext/array/#/values')` +- `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')` +- `Math.acosh` -> `require('es5-ext/math/acosh')` +- `Math.asinh` -> `require('es5-ext/math/asinh')` +- `Math.atanh` -> `require('es5-ext/math/atanh')` +- `Math.cbrt` -> `require('es5-ext/math/cbrt')` +- `Math.clz32` -> `require('es5-ext/math/clz32')` +- `Math.cosh` -> `require('es5-ext/math/cosh')` +- `Math.exmp1` -> `require('es5-ext/math/expm1')` +- `Math.fround` -> `require('es5-ext/math/fround')` +- `Math.hypot` -> `require('es5-ext/math/hypot')` +- `Math.imul` -> `require('es5-ext/math/imul')` +- `Math.log1p` -> `require('es5-ext/math/log1p')` +- `Math.log2` -> `require('es5-ext/math/log2')` +- `Math.log10` -> `require('es5-ext/math/log10')` +- `Math.sign` -> `require('es5-ext/math/sign')` +- `Math.signh` -> `require('es5-ext/math/signh')` +- `Math.tanh` -> `require('es5-ext/math/tanh')` +- `Math.trunc` -> `require('es5-ext/math/trunc')` +- `Number.EPSILON` -> `require('es5-ext/number/epsilon')` +- `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')` +- `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')` +- `Number.isFinite` -> `require('es5-ext/number/is-finite')` +- `Number.isInteger` -> `require('es5-ext/number/is-integer')` +- `Number.isNaN` -> `require('es5-ext/number/is-nan')` +- `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')` +- `Object.assign` -> `require('es5-ext/object/assign')` +- `Object.keys` -> `require('es5-ext/object/keys')` +- `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')` +- `Promise.prototype.finally` -> `require('es5-ext/promise/#/finally')` +- `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')` +- `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')` +- `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')` +- `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')` +- `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')` +- `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')` +- `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')` +- `String.raw` -> `require('es5-ext/string/raw')` +- `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')` +- `String.prototype.contains` -> `require('es5-ext/string/#/contains')` +- `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')` +- `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')` +- `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')` +- `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')` +- `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')` + +#### Non ECMAScript standard features + +**es5-ext** provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes: + +```javascript +Object.defineProperty(Function.prototype, "partial", { + value: require("es5-ext/function/#/partial"), + configurable: true, + enumerable: false, + writable: true +}); +Object.defineProperty(Array.prototype, "flatten", { + value: require("es5-ext/array/#/flatten"), + configurable: true, + enumerable: false, + writable: true +}); +Object.defineProperty(String.prototype, "capitalize", { + value: require("es5-ext/string/#/capitalize"), + configurable: true, + enumerable: false, + writable: true +}); +``` + +See [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you. + +**Important:** Remember to **not** extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine **only** if you're the _owner_ of the global scope, so e.g. in final project you lead development of. + +When you're in situation when native extensions are not good idea, then you should use methods indirectly: + +```javascript +var flatten = require("es5-ext/array/#/flatten"); + +flatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +for better convenience you can turn methods into functions: + +```javascript +var call = Function.prototype.call; +var flatten = call.bind(require("es5-ext/array/#/flatten")); + +flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +You can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application + +```javascript +var util = {}; +util.partial = call.bind(require("es5-ext/function/#/partial")); +util.flatten = call.bind(require("es5-ext/array/#/flatten")); +util.startsWith = call.bind(require("es5-ext/string/#/starts-with")); + +util.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +As with native ones most methods are generic and can be run on any type of object. + +## API + +### Global extensions + +#### global _(es5-ext/global)_ + +Object that represents global scope + +### Array Constructor extensions + +#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from). +Returns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned. + +#### generate([length[, …fill]]) _(es5-ext/array/generate)_ + +Generate an array of pre-given _length_ built of repeated arguments. + +#### isPlainArray(x) _(es5-ext/array/is-plain-array)_ + +Returns true if object is plain array (not instance of one of the Array's extensions). + +#### of([…items]) _(es5-ext/array/of)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of). +Create an array from given arguments. + +#### toArray(obj) _(es5-ext/array/to-array)_ + +Returns array representation of `obj`. If `obj` is already an array, `obj` is returned back. + +#### validArray(obj) _(es5-ext/array/valid-array)_ + +Returns `obj` if it's an array, otherwise throws `TypeError` + +### Array Prototype extensions + +#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_ + +In **sorted** list search for index of item for which _compareFn_ returns value closest to _0_. +It's variant of binary search algorithm + +#### arr.clear() _(es5-ext/array/#/clear)_ + +Clears the array + +#### arr.compact() _(es5-ext/array/#/compact)_ + +Returns a copy of the context with all non-values (`null` or `undefined`) removed. + +#### arr.concat() _(es5-ext/array/#/concat)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat). +ES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context. + +#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_ + +Whether list contains the given value. + +#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin). + +#### arr.diff(other) _(es5-ext/array/#/diff)_ + +Returns the array of elements that are present in context list but not present in other list. + +#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_ + +_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision + +#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_ + +_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision + +#### arr.entries() _(es5-ext/array/#/entries)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries). +Returns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value. + +#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_ + +Returns the array of elements that are found only in one of the lists (either context list or list provided in arguments). + +#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill). + +#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter). +ES6's version of `filter`, returns array of same type as the context. + +#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find). +Return first element for which given function returns true + +#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex). +Return first index for which given function returns true + +#### arr.first() _(es5-ext/array/#/first)_ + +Returns value for first defined index + +#### arr.firstIndex() _(es5-ext/array/#/first-index)_ + +Returns first declared index of the array + +#### arr.flatten() _(es5-ext/array/#/flatten)_ + +Returns flattened version of the array + +#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_ + +`forEach` starting from last element + +#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_ + +Group list elements by value returned by _cb_ function + +#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_ + +Returns array of all indexes of given value + +#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_ + +Computes the array of values that are the intersection of all lists (context list and lists given in arguments) + +#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_ + +Returns true if both context and _other_ lists have same content + +#### arr.isUniq() _(es5-ext/array/#/is-uniq)_ + +Returns true if all values in array are unique + +#### arr.keys() _(es5-ext/array/#/keys)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys). +Returns iterator object, which traverses all array indexes. + +#### arr.last() _(es5-ext/array/#/last)_ + +Returns value of last defined index + +#### arr.lastIndex() _(es5-ext/array/#/last)_ + +Returns last defined index of the array + +#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map). +ES6's version of `map`, returns array of same type as the context. + +#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_ + +Remove values from the array + +#### arr.separate(sep) _(es5-ext/array/#/separate)_ + +Returns array with items separated with `sep` value + +#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice). +ES6's version of `slice`, returns array of same type as the context. + +#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_ + +`some` starting from last element + +#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice). +ES6's version of `splice`, returns array of same type as the context. + +#### arr.uniq() _(es5-ext/array/#/uniq)_ + +Returns duplicate-free version of the array + +#### arr.values() _(es5-ext/array/#/values)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values). +Returns iterator object which traverses all array values. + +#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator). +Returns iterator object which traverses all array values. + +### Boolean Constructor extensions + +#### isBoolean(x) _(es5-ext/boolean/is-boolean)_ + +Whether value is boolean + +### Date Constructor extensions + +#### isDate(x) _(es5-ext/date/is-date)_ + +Whether value is date instance + +#### validDate(x) _(es5-ext/date/valid-date)_ + +If given object is not date throw TypeError in other case return it. + +### Date Prototype extensions + +#### date.copy(date) _(es5-ext/date/#/copy)_ + +Returns a copy of the date object + +#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_ + +Returns number of days of date's month + +#### date.floorDay() _(es5-ext/date/#/floor-day)_ + +Sets the date time to 00:00:00.000 + +#### date.floorMonth() _(es5-ext/date/#/floor-month)_ + +Sets date day to 1 and date time to 00:00:00.000 + +#### date.floorYear() _(es5-ext/date/#/floor-year)_ + +Sets date month to 0, day to 1 and date time to 00:00:00.000 + +#### date.format(pattern) _(es5-ext/date/#/format)_ + +Formats date up to given string. Supported patterns: + +- `%Y` - Year with century, 1999, 2003 +- `%y` - Year without century, 99, 03 +- `%m` - Month, 01..12 +- `%d` - Day of the month 01..31 +- `%H` - Hour (24-hour clock), 00..23 +- `%M` - Minute, 00..59 +- `%S` - Second, 00..59 +- `%L` - Milliseconds, 000..999 + +### Error Constructor extensions + +#### custom(message/_, code, ext_/) _(es5-ext/error/custom)_ + +Creates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object) + +#### isError(x) _(es5-ext/error/is-error)_ + +Whether value is an error (instance of `Error`). + +#### validError(x) _(es5-ext/error/valid-error)_ + +If given object is not error throw TypeError in other case return it. + +### Error Prototype extensions + +#### err.throw() _(es5-ext/error/#/throw)_ + +Throws error + +### Function Constructor extensions + +Some of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele + +#### constant(x) _(es5-ext/function/constant)_ + +Returns a constant function that returns pregiven argument + +_k(x)(y) =def x_ + +#### identity(x) _(es5-ext/function/identity)_ + +Identity function. Returns first argument + +_i(x) =def x_ + +#### invoke(name[, …args]) _(es5-ext/function/invoke)_ + +Returns a function that takes an object as an argument, and applies object's +_name_ method to arguments. +_name_ can be name of the method or method itself. + +_invoke(name, …args)(object, …args2) =def object\[name\]\(…args, …args2\)_ + +#### isArguments(x) _(es5-ext/function/is-arguments)_ + +Whether value is arguments object + +#### isFunction(arg) _(es5-ext/function/is-function)_ + +Whether value is instance of function + +#### noop() _(es5-ext/function/noop)_ + +No operation function + +#### pluck(name) _(es5-ext/function/pluck)_ + +Returns a function that takes an object, and returns the value of its _name_ +property + +_pluck(name)(obj) =def obj[name]_ + +#### validFunction(arg) _(es5-ext/function/valid-function)_ + +If given object is not function throw TypeError in other case return it. + +### Function Prototype extensions + +Some of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele + +#### fn.compose([…fns]) _(es5-ext/function/#/compose)_ + +Applies the functions in reverse argument-list order. + +_f1.compose(f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_ + +`compose` can also be used in plain function form as: + +_compose(f1, f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_ + +#### fn.copy() _(es5-ext/function/#/copy)_ + +Produces copy of given function + +#### fn.curry([n]) _(es5-ext/function/#/curry)_ + +Invoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function. +If _n_ is not provided then it defaults to context function length + +_f.curry(4)(arg1, arg2)(arg3)(arg4) =def f(arg1, args2, arg3, arg4)_ + +#### fn.lock([…args]) _(es5-ext/function/#/lock)_ + +Returns a function that applies the underlying function to _args_, and ignores its own arguments. + +_f.lock(…args)(…args2) =def f(…args)_ + +_Named after it's counterpart in Google Closure_ + +#### fn.not() _(es5-ext/function/#/not)_ + +Returns a function that returns boolean negation of value returned by underlying function. + +_f.not()(…args) =def !f(…args)_ + +#### fn.partial([…args]) _(es5-ext/function/#/partial)_ + +Returns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args. + +_f.partial(…args1)(…args2) =def f(…args1, …args2)_ + +#### fn.spread() _(es5-ext/function/#/spread)_ + +Returns a function that applies underlying function with first list argument + +_f.match()(args) =def f.apply(null, args)_ + +#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_ + +Serializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties. + +### Math extensions + +#### acosh(x) _(es5-ext/math/acosh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh). + +#### asinh(x) _(es5-ext/math/asinh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh). + +#### atanh(x) _(es5-ext/math/atanh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh). + +#### cbrt(x) _(es5-ext/math/cbrt)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt). + +#### clz32(x) _(es5-ext/math/clz32)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32). + +#### cosh(x) _(es5-ext/math/cosh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh). + +#### expm1(x) _(es5-ext/math/expm1)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1). + +#### fround(x) _(es5-ext/math/fround)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround). + +#### hypot([…values]) _(es5-ext/math/hypot)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot). + +#### imul(x, y) _(es5-ext/math/imul)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul). + +#### log1p(x) _(es5-ext/math/log1p)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p). + +#### log2(x) _(es5-ext/math/log2)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2). + +#### log10(x) _(es5-ext/math/log10)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10). + +#### sign(x) _(es5-ext/math/sign)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign). + +#### sinh(x) _(es5-ext/math/sinh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh). + +#### tanh(x) _(es5-ext/math/tanh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh). + +#### trunc(x) _(es5-ext/math/trunc)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc). + +### Number Constructor extensions + +#### EPSILON _(es5-ext/number/epsilon)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon). + +The difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16. + +#### isFinite(x) _(es5-ext/number/is-finite)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite). +Whether value is finite. Differs from global isNaN that it doesn't do type coercion. + +#### isInteger(x) _(es5-ext/number/is-integer)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger). +Whether value is integer. + +#### isNaN(x) _(es5-ext/number/is-nan)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan). +Whether value is NaN. Differs from global isNaN that it doesn't do type coercion. + +#### isNumber(x) _(es5-ext/number/is-number)_ + +Whether given value is number + +#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger). + +#### MAX*SAFE_INTEGER *(es5-ext/number/max-safe-integer)\_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger). +The value of Number.MAX_SAFE_INTEGER is 9007199254740991. + +#### MIN*SAFE_INTEGER *(es5-ext/number/min-safe-integer)\_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger). +The value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1). + +#### toInteger(x) _(es5-ext/number/to-integer)_ + +Converts value to integer + +#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_ + +Converts value to positive integer. If provided value is less than 0, then 0 is returned + +#### toUint32(x) _(es5-ext/number/to-uint32)_ + +Converts value to unsigned 32 bit integer. This type is used for array lengths. +See: http://www.2ality.com/2012/02/js-integers.html + +### Number Prototype extensions + +#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_ + +Pad given number with zeros. Returns string + +### Object Constructor extensions + +#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). +Extend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten. + +#### clear(obj) _(es5-ext/object/clear)_ + +Remove all enumerable own properties of the object + +#### compact(obj) _(es5-ext/object/compact)_ + +Returns copy of the object with all enumerable properties that have no falsy values + +#### compare(obj1, obj2) _(es5-ext/object/compare)_ + +Universal cross-type compare function. To be used for e.g. array sort. + +#### copy(obj) _(es5-ext/object/copy)_ + +Returns copy of the object with all enumerable properties. + +#### copyDeep(obj) _(es5-ext/object/copy-deep)_ + +Returns deep copy of the object with all enumerable properties. + +#### count(obj) _(es5-ext/object/count)_ + +Counts number of enumerable own properties on object + +#### create(obj[, properties]) _(es5-ext/object/create)_ + +`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804). + +When `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined. + +It's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype. + +Use only for objects that you plan to switch prototypes of and be aware of limitations of this workaround. + +#### eq(x, y) _(es5-ext/object/eq)_ + +Whether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm. + +#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_ + +Analogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function. +Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_ + +Analogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value. + +#### firstKey(obj) _(es5-ext/object/first-key)_ + +Returns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object. + +#### flatten(obj) _(es5-ext/object/flatten)_ + +Returns new object, with flatten properties of input object + +_flatten({ a: { b: 1 }, c: { d: 1 } }) =def { b: 1, d: 1 }_ + +#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_ + +Analogous to Array.prototype.forEach. Calls a function for each key-value pair found in object +Optionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### getPropertyNames() _(es5-ext/object/get-property-names)_ + +Get all (not just own) property names of the object + +#### is(x, y) _(es5-ext/object/is)_ + +Whether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm. + +#### isArrayLike(x) _(es5-ext/object/is-array-like)_ + +Whether object is array-like object + +#### isCopy(x, y) _(es5-ext/object/is-copy)_ + +Two values are considered a copy of same value when all of their own enumerable properties have same values. + +#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_ + +Deep comparision of objects + +#### isEmpty(obj) _(es5-ext/object/is-empty)_ + +True if object doesn't have any own enumerable property + +#### isObject(arg) _(es5-ext/object/is-object)_ + +Whether value is not primitive + +#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_ + +Whether object is plain object, its protototype should be Object.prototype and it cannot be host object. + +#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_ + +Search object for value + +#### keys(obj) _(es5-ext/object/keys)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys). +ES6's version of `keys`, doesn't throw on primitive input + +#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_ + +Analogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object. + +#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_ + +Create new object with same values, but remapped keys + +#### mixin(target, source) _(es5-ext/object/mixin)_ + +Extend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten). +_It was for a moment part of ECMAScript 6 draft._ + +#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_ + +Extends _target_, with all source and source's prototype properties. +Useful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support). + +#### normalizeOptions(options) _(es5-ext/object/normalize-options)_ + +Normalizes options object into flat plain object. + +Useful for functions in which we either need to keep options object for future reference or need to modify it for internal use. + +- It never returns input `options` object back (always a copy is created) +- `options` can be undefined in such case empty plain object is returned. +- Copies all enumerable properties found down prototype chain. + +#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_ + +Creates `null` prototype based plain object, and sets on it all property names provided in arguments to true. + +#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_ + +Safe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator + +#### serialize(value) _(es5-ext/object/serialize)_ + +Serialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions. + +#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof). +If native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed. + +#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_ + +Analogous to Array.prototype.some Returns true if any key-value pair satisfies the provided +testing function. +Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_ + +Creates an array of results of calling a provided function on every key-value pair in this object. +Optionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### unserialize(str) _(es5-ext/object/unserialize)_ + +Userializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize) + +#### validCallable(x) _(es5-ext/object/valid-callable)_ + +If given object is not callable throw TypeError in other case return it. + +#### validObject(x) _(es5-ext/object/valid-object)_ + +Throws error if given value is not an object, otherwise it is returned. + +#### validValue(x) _(es5-ext/object/valid-value)_ + +Throws error if given value is `null` or `undefined`, otherwise returns value. + +### Promise Prototype extensions + +#### promise.finally(onFinally) _(es5-ext/promise/#/finally)_ + +[_Introduced with ECMAScript 2018_](https://tc39.github.io/ecma262/#sec-promise.prototype.finally). + +### RegExp Constructor extensions + +#### escape(str) _(es5-ext/reg-exp/escape)_ + +Escapes string to be used in regular expression + +#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_ + +Whether object is regular expression + +#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_ + +If object is regular expression it is returned, otherwise TypeError is thrown. + +### RegExp Prototype extensions + +#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_ + +Whether regular expression has `sticky` flag. + +It's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented. + +#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_ + +Whether regular expression has `unicode` flag. + +It's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented. + +#### re.match(string) _(es5-ext/reg-exp/#/match)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match). + +#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace). + +#### re.search(string) _(es5-ext/reg-exp/#/search)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search). + +#### re.split(string) _(es5-ext/reg-exp/#/search)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split). + +#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky). +It's a getter, so only `implement` and `is-implemented` modules are provided. + +#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode). +It's a getter, so only `implement` and `is-implemented` modules are provided. + +### String Constructor extensions + +#### formatMethod(fMap) _(es5-ext/string/format-method)_ + +Creates format method. It's used e.g. to create `Date.prototype.format` method + +#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint) + +#### isString(x) _(es5-ext/string/is-string)_ + +Whether object is string + +#### randomUniq() _(es5-ext/string/random-uniq)_ + +Returns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice) + +#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw) + +### String Prototype extensions + +#### str.at(pos) _(es5-ext/string/#/at)_ + +_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_ + +Returns a string at given position in Unicode-safe manner. +Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at). + +#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_ + +Convert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree. +Useful when converting names from js property convention into filename convention. + +#### str.capitalize() _(es5-ext/string/#/capitalize)_ + +Capitalize first character of a string + +#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_ + +Case insensitive compare + +#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat) + +Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt). + +#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains) + +Whether string contains given string. + +#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith). +Whether strings ends with given string + +#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_ + +Convert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree. +Useful when converting names from filename convention to js property name convention. + +#### str.indent(str[, count]) _(es5-ext/string/#/indent)_ + +Indents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times). + +#### str.last() _(es5-ext/string/#/last)_ + +Return last character + +#### str.normalize([form]) _(es5-ext/string/#/normalize)_ + +[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize). +Returns the Unicode Normalization Form of a given string. +Based on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js) + +#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_ + +Pad string with _fill_. +If _length_ si given than _fill_ is reapated _length_ times. +If _length_ is negative then pad is applied from right. + +#### str.repeat(n) _(es5-ext/string/#/repeat)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat). +Repeat given string _n_ times + +#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_ + +Simple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _\$_ characters escape in such case). + +#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_ + +Simple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _\$_ characters escape in such case). + +#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith). +Whether strings starts with given string + +#### str[@@iterator] _(es5-ext/string/#/@@iterator)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator). +Returns iterator object which traverses all string characters (with respect to unicode symbols) + +### Tests + + $ npm test + +[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/es5-ext/branches/master/shields_badge.svg +[nix-build-url]: https://semaphoreci.com/medikoo-org/es5-ext +[win-build-image]: https://ci.appveyor.com/api/projects/status/3jox67ksw3p8hkwh?svg=true +[win-build-url]: https://ci.appveyor.com/project/medikoo/es5-ext +[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg +[npm-image]: https://img.shields.io/npm/v/es5-ext.svg +[npm-url]: https://www.npmjs.com/package/es5-ext diff --git a/node_modules/es5-ext/array/#/@@iterator/implement.js b/node_modules/es5-ext/array/#/@@iterator/implement.js new file mode 100644 index 00000000..8073f2bc --- /dev/null +++ b/node_modules/es5-ext/array/#/@@iterator/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, require("es6-symbol").iterator, { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/@@iterator/index.js b/node_modules/es5-ext/array/#/@@iterator/index.js new file mode 100644 index 00000000..d9377465 --- /dev/null +++ b/node_modules/es5-ext/array/#/@@iterator/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype[require("es6-symbol").iterator] : require("./shim"); diff --git a/node_modules/es5-ext/array/#/@@iterator/is-implemented.js b/node_modules/es5-ext/array/#/@@iterator/is-implemented.js new file mode 100644 index 00000000..6445c04e --- /dev/null +++ b/node_modules/es5-ext/array/#/@@iterator/is-implemented.js @@ -0,0 +1,16 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function () { + var arr = ["foo", 1], iterator, result; + if (typeof arr[iteratorSymbol] !== "function") return false; + iterator = arr[iteratorSymbol](); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== "foo") return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/array/#/@@iterator/shim.js b/node_modules/es5-ext/array/#/@@iterator/shim.js new file mode 100644 index 00000000..307b1c0a --- /dev/null +++ b/node_modules/es5-ext/array/#/@@iterator/shim.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("../values/shim"); diff --git a/node_modules/es5-ext/array/#/_compare-by-length.js b/node_modules/es5-ext/array/#/_compare-by-length.js new file mode 100644 index 00000000..f1c0cacc --- /dev/null +++ b/node_modules/es5-ext/array/#/_compare-by-length.js @@ -0,0 +1,9 @@ +// Used internally to sort array of lists by length + +"use strict"; + +var toPosInt = require("../../number/to-pos-integer"); + +module.exports = function (arr1, arr2) { + return toPosInt(arr1.length) - toPosInt(arr2.length); +}; diff --git a/node_modules/es5-ext/array/#/binary-search.js b/node_modules/es5-ext/array/#/binary-search.js new file mode 100644 index 00000000..9b2c42ec --- /dev/null +++ b/node_modules/es5-ext/array/#/binary-search.js @@ -0,0 +1,28 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + + , floor = Math.floor; + +module.exports = function (compareFn) { + var length, low, high, middle; + + value(this); + callable(compareFn); + + length = toPosInt(this.length); + low = 0; + high = length - 1; + + while (low <= high) { + middle = floor((low + high) / 2); + if (compareFn(this[middle]) < 0) high = middle - 1; + else low = middle + 1; + } + + if (high < 0) return 0; + if (high >= length) return length - 1; + return high; +}; diff --git a/node_modules/es5-ext/array/#/clear.js b/node_modules/es5-ext/array/#/clear.js new file mode 100644 index 00000000..fd539c9b --- /dev/null +++ b/node_modules/es5-ext/array/#/clear.js @@ -0,0 +1,12 @@ +// Inspired by Google Closure: +// http://closure-library.googlecode.com/svn/docs/ +// closure_goog_array_array.js.html#goog.array.clear + +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function () { + value(this).length = 0; + return this; +}; diff --git a/node_modules/es5-ext/array/#/compact.js b/node_modules/es5-ext/array/#/compact.js new file mode 100644 index 00000000..3da1309d --- /dev/null +++ b/node_modules/es5-ext/array/#/compact.js @@ -0,0 +1,13 @@ +// Inspired by: http://documentcloud.github.com/underscore/#compact + +"use strict"; + +var isValue = require("../../object/is-value"); + +var filter = Array.prototype.filter; + +module.exports = function () { + return filter.call(this, function (val) { + return isValue(val); + }); +}; diff --git a/node_modules/es5-ext/array/#/concat/implement.js b/node_modules/es5-ext/array/#/concat/implement.js new file mode 100644 index 00000000..a5a1a409 --- /dev/null +++ b/node_modules/es5-ext/array/#/concat/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "concat", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/concat/index.js b/node_modules/es5-ext/array/#/concat/index.js new file mode 100644 index 00000000..8bbb7bc1 --- /dev/null +++ b/node_modules/es5-ext/array/#/concat/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.concat : require("./shim"); diff --git a/node_modules/es5-ext/array/#/concat/is-implemented.js b/node_modules/es5-ext/array/#/concat/is-implemented.js new file mode 100644 index 00000000..2a3a9fc6 --- /dev/null +++ b/node_modules/es5-ext/array/#/concat/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { + return (new SubArray()).concat("foo") instanceof SubArray; +}; diff --git a/node_modules/es5-ext/array/#/concat/shim.js b/node_modules/es5-ext/array/#/concat/shim.js new file mode 100644 index 00000000..5158dde5 --- /dev/null +++ b/node_modules/es5-ext/array/#/concat/shim.js @@ -0,0 +1,48 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , toPosInt = require("../../../number/to-pos-integer") + , isObject = require("../../../object/is-object") + , isConcatSpreadable = require("es6-symbol").isConcatSpreadable + , isArray = Array.isArray + , concat = Array.prototype.concat + , forEach = Array.prototype.forEach + , isSpreadable; + +isSpreadable = function (value) { + if (!value) return false; + if (!isObject(value)) return false; + if (value[isConcatSpreadable] !== undefined) { + return Boolean(value[isConcatSpreadable]); + } + return isArray(value); +}; + +// eslint-disable-next-line no-unused-vars +module.exports = function (item /*, …items*/) { + var result; + if (!this || !isArray(this) || isPlainArray(this)) { + return concat.apply(this, arguments); + } + result = new this.constructor(); + if (isSpreadable(this)) { + forEach.call(this, function (val, i) { + result[i] = val; + }); + } else { + result[0] = this; + } + forEach.call(arguments, function (arg) { + var base; + if (isSpreadable(arg)) { + base = result.length; + result.length += toPosInt(arg.length); + forEach.call(arg, function (val, i) { + result[base + i] = val; + }); + return; + } + result.push(arg); + }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/contains.js b/node_modules/es5-ext/array/#/contains.js new file mode 100644 index 00000000..cde6850e --- /dev/null +++ b/node_modules/es5-ext/array/#/contains.js @@ -0,0 +1,7 @@ +"use strict"; + +var indexOf = require("./e-index-of"); + +module.exports = function (searchElement/*, position*/) { + return indexOf.call(this, searchElement, arguments[1]) > -1; +}; diff --git a/node_modules/es5-ext/array/#/copy-within/implement.js b/node_modules/es5-ext/array/#/copy-within/implement.js new file mode 100644 index 00000000..4658fcb4 --- /dev/null +++ b/node_modules/es5-ext/array/#/copy-within/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "copyWithin", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/array/#/copy-within/index.js b/node_modules/es5-ext/array/#/copy-within/index.js new file mode 100644 index 00000000..0919b79b --- /dev/null +++ b/node_modules/es5-ext/array/#/copy-within/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.copyWithin : require("./shim"); diff --git a/node_modules/es5-ext/array/#/copy-within/is-implemented.js b/node_modules/es5-ext/array/#/copy-within/is-implemented.js new file mode 100644 index 00000000..40c499e6 --- /dev/null +++ b/node_modules/es5-ext/array/#/copy-within/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5]; + if (typeof arr.copyWithin !== "function") return false; + return String(arr.copyWithin(1, 3)) === "1,4,5,4,5"; +}; diff --git a/node_modules/es5-ext/array/#/copy-within/shim.js b/node_modules/es5-ext/array/#/copy-within/shim.js new file mode 100644 index 00000000..aad220ca --- /dev/null +++ b/node_modules/es5-ext/array/#/copy-within/shim.js @@ -0,0 +1,45 @@ +// Taken from: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var toInteger = require("../../../number/to-integer") + , toPosInt = require("../../../number/to-pos-integer") + , validValue = require("../../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty + , max = Math.max + , min = Math.min; + +module.exports = function (target, start /*, end*/) { + var arr = validValue(this) + , end = arguments[2] + , length = toPosInt(arr.length) + , to + , from + , fin + , count + , direction; + + target = toInteger(target); + start = toInteger(start); + end = end === undefined ? length : toInteger(end); + + to = target < 0 ? max(length + target, 0) : min(target, length); + from = start < 0 ? max(length + start, 0) : min(start, length); + fin = end < 0 ? max(length + end, 0) : min(end, length); + count = min(fin - from, length - to); + direction = 1; + + if (from < to && to < from + count) { + direction = -1; + from += count - 1; + to += count - 1; + } + while (count > 0) { + if (objHasOwnProperty.call(arr, from)) arr[to] = arr[from]; + else delete arr[from]; + from += direction; + to += direction; + count -= 1; + } + return arr; +}; diff --git a/node_modules/es5-ext/array/#/diff.js b/node_modules/es5-ext/array/#/diff.js new file mode 100644 index 00000000..fbb1682b --- /dev/null +++ b/node_modules/es5-ext/array/#/diff.js @@ -0,0 +1,13 @@ +"use strict"; + +var value = require("../../object/valid-value") + , contains = require("./contains") + , filter = Array.prototype.filter; + +module.exports = function (other) { + value(this); + value(other); + return filter.call(this, function (item) { + return !contains.call(other, item); + }); +}; diff --git a/node_modules/es5-ext/array/#/e-index-of.js b/node_modules/es5-ext/array/#/e-index-of.js new file mode 100644 index 00000000..8b070117 --- /dev/null +++ b/node_modules/es5-ext/array/#/e-index-of.js @@ -0,0 +1,28 @@ +"use strict"; + +var numberIsNaN = require("../../number/is-nan") + , toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , indexOf = Array.prototype.indexOf + , objHasOwnProperty = Object.prototype.hasOwnProperty + , abs = Math.abs + , floor = Math.floor; + +module.exports = function (searchElement /*, fromIndex*/) { + var i, length, fromIndex, val; + if (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments); + + length = toPosInt(value(this).length); + fromIndex = arguments[1]; + if (isNaN(fromIndex)) fromIndex = 0; + else if (fromIndex >= 0) fromIndex = floor(fromIndex); + else fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); + + for (i = fromIndex; i < length; ++i) { + if (objHasOwnProperty.call(this, i)) { + val = this[i]; + if (numberIsNaN(val)) return i; // Jslint: ignore + } + } + return -1; +}; diff --git a/node_modules/es5-ext/array/#/e-last-index-of.js b/node_modules/es5-ext/array/#/e-last-index-of.js new file mode 100644 index 00000000..15dbe05b --- /dev/null +++ b/node_modules/es5-ext/array/#/e-last-index-of.js @@ -0,0 +1,31 @@ +"use strict"; + +var numberIsNaN = require("../../number/is-nan") + , toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , lastIndexOf = Array.prototype.lastIndexOf + , objHasOwnProperty = Object.prototype.hasOwnProperty + , abs = Math.abs + , floor = Math.floor; + +module.exports = function (searchElement /*, fromIndex*/) { + var i, fromIndex, val; + if (!numberIsNaN(searchElement)) { + // Jslint: ignore + return lastIndexOf.apply(this, arguments); + } + + value(this); + fromIndex = arguments[1]; + if (isNaN(fromIndex)) fromIndex = toPosInt(this.length) - 1; + else if (fromIndex >= 0) fromIndex = floor(fromIndex); + else fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); + + for (i = fromIndex; i >= 0; --i) { + if (objHasOwnProperty.call(this, i)) { + val = this[i]; + if (numberIsNaN(val)) return i; // Jslint: ignore + } + } + return -1; +}; diff --git a/node_modules/es5-ext/array/#/entries/implement.js b/node_modules/es5-ext/array/#/entries/implement.js new file mode 100644 index 00000000..acc8a111 --- /dev/null +++ b/node_modules/es5-ext/array/#/entries/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "entries", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/entries/index.js b/node_modules/es5-ext/array/#/entries/index.js new file mode 100644 index 00000000..f18f7d92 --- /dev/null +++ b/node_modules/es5-ext/array/#/entries/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.entries : require("./shim"); diff --git a/node_modules/es5-ext/array/#/entries/is-implemented.js b/node_modules/es5-ext/array/#/entries/is-implemented.js new file mode 100644 index 00000000..335f1c20 --- /dev/null +++ b/node_modules/es5-ext/array/#/entries/is-implemented.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function () { + var arr = [1, "foo"], iterator, result; + if (typeof arr.entries !== "function") return false; + iterator = arr.entries(); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result || !result.value) return false; + if (result.value[0] !== 0) return false; + if (result.value[1] !== 1) return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/array/#/entries/shim.js b/node_modules/es5-ext/array/#/entries/shim.js new file mode 100644 index 00000000..caa45b7a --- /dev/null +++ b/node_modules/es5-ext/array/#/entries/shim.js @@ -0,0 +1,6 @@ +"use strict"; + +var ArrayIterator = require("es6-iterator/array"); +module.exports = function () { + return new ArrayIterator(this, "key+value"); +}; diff --git a/node_modules/es5-ext/array/#/exclusion.js b/node_modules/es5-ext/array/#/exclusion.js new file mode 100644 index 00000000..41057d06 --- /dev/null +++ b/node_modules/es5-ext/array/#/exclusion.js @@ -0,0 +1,31 @@ +"use strict"; + +var value = require("../../object/valid-value") + , aFrom = require("../from") + , toArray = require("../to-array") + , contains = require("./contains") + , byLength = require("./_compare-by-length") + , filter = Array.prototype.filter + , push = Array.prototype.push; + +module.exports = function (/* …lists*/) { + var lists, seen, result; + if (!arguments.length) return aFrom(this); + push.apply(lists = [this], arguments); + lists.forEach(value); + seen = []; + result = []; + lists.sort(byLength).forEach(function (list) { + result = result + .filter(function (item) { + return !contains.call(list, item); + }) + .concat( + filter.call(list, function (item) { + return !contains.call(seen, item); + }) + ); + push.apply(seen, toArray(list)); + }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/fill/implement.js b/node_modules/es5-ext/array/#/fill/implement.js new file mode 100644 index 00000000..9de58b75 --- /dev/null +++ b/node_modules/es5-ext/array/#/fill/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "fill", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/fill/index.js b/node_modules/es5-ext/array/#/fill/index.js new file mode 100644 index 00000000..a8272475 --- /dev/null +++ b/node_modules/es5-ext/array/#/fill/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.fill : require("./shim"); diff --git a/node_modules/es5-ext/array/#/fill/is-implemented.js b/node_modules/es5-ext/array/#/fill/is-implemented.js new file mode 100644 index 00000000..5d6d02e1 --- /dev/null +++ b/node_modules/es5-ext/array/#/fill/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.fill !== "function") return false; + return String(arr.fill(-1, -3)) === "1,2,3,-1,-1,-1"; +}; diff --git a/node_modules/es5-ext/array/#/fill/shim.js b/node_modules/es5-ext/array/#/fill/shim.js new file mode 100644 index 00000000..0040bf81 --- /dev/null +++ b/node_modules/es5-ext/array/#/fill/shim.js @@ -0,0 +1,25 @@ +// Taken from: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var toInteger = require("../../../number/to-integer") + , toPosInt = require("../../../number/to-pos-integer") + , validValue = require("../../../object/valid-value") + , max = Math.max + , min = Math.min; + +module.exports = function (value /*, start, end*/) { + var arr = validValue(this) + , start = arguments[1] + , end = arguments[2] + , length = toPosInt(arr.length) + , relativeStart + , i; + + start = start === undefined ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + + relativeStart = start < 0 ? max(length + start, 0) : min(start, length); + for (i = relativeStart; i < length && i < end; ++i) arr[i] = value; + return arr; +}; diff --git a/node_modules/es5-ext/array/#/filter/implement.js b/node_modules/es5-ext/array/#/filter/implement.js new file mode 100644 index 00000000..45025751 --- /dev/null +++ b/node_modules/es5-ext/array/#/filter/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "filter", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/filter/index.js b/node_modules/es5-ext/array/#/filter/index.js new file mode 100644 index 00000000..ad2082d9 --- /dev/null +++ b/node_modules/es5-ext/array/#/filter/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.filter : require("./shim"); diff --git a/node_modules/es5-ext/array/#/filter/is-implemented.js b/node_modules/es5-ext/array/#/filter/is-implemented.js new file mode 100644 index 00000000..06de0996 --- /dev/null +++ b/node_modules/es5-ext/array/#/filter/is-implemented.js @@ -0,0 +1,11 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe") + + , pass = function () { + return true; +}; + +module.exports = function () { + return (new SubArray()).filter(pass) instanceof SubArray; +}; diff --git a/node_modules/es5-ext/array/#/filter/shim.js b/node_modules/es5-ext/array/#/filter/shim.js new file mode 100644 index 00000000..38304e4b --- /dev/null +++ b/node_modules/es5-ext/array/#/filter/shim.js @@ -0,0 +1,23 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , callable = require("../../../object/valid-callable") + , isArray = Array.isArray + , filter = Array.prototype.filter + , forEach = Array.prototype.forEach + , call = Function.prototype.call; + +module.exports = function (callbackFn /*, thisArg*/) { + var result, thisArg, i; + if (!this || !isArray(this) || isPlainArray(this)) { + return filter.apply(this, arguments); + } + callable(callbackFn); + thisArg = arguments[1]; + result = new this.constructor(); + i = 0; + forEach.call(this, function (val, j, self) { + if (call.call(callbackFn, thisArg, val, j, self)) result[i++] = val; + }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/find-index/implement.js b/node_modules/es5-ext/array/#/find-index/implement.js new file mode 100644 index 00000000..4876b9e4 --- /dev/null +++ b/node_modules/es5-ext/array/#/find-index/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "findIndex", + { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/find-index/index.js b/node_modules/es5-ext/array/#/find-index/index.js new file mode 100644 index 00000000..3d505b1f --- /dev/null +++ b/node_modules/es5-ext/array/#/find-index/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.findIndex : require("./shim"); diff --git a/node_modules/es5-ext/array/#/find-index/is-implemented.js b/node_modules/es5-ext/array/#/find-index/is-implemented.js new file mode 100644 index 00000000..818c920e --- /dev/null +++ b/node_modules/es5-ext/array/#/find-index/is-implemented.js @@ -0,0 +1,11 @@ +"use strict"; + +var fn = function (value) { + return value > 3; +}; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.findIndex !== "function") return false; + return arr.findIndex(fn) === 3; +}; diff --git a/node_modules/es5-ext/array/#/find-index/shim.js b/node_modules/es5-ext/array/#/find-index/shim.js new file mode 100644 index 00000000..bc82827a --- /dev/null +++ b/node_modules/es5-ext/array/#/find-index/shim.js @@ -0,0 +1,26 @@ +"use strict"; + +var callable = require("../../../object/valid-callable") + , ensureValue = require("../../../object/valid-value") + , some = Array.prototype.some + , apply = Function.prototype.apply; + +module.exports = function (predicate /*, thisArg*/) { + var k, self; + self = Object(ensureValue(this)); + callable(predicate); + + return some.call( + self, + function (value, index) { + if (apply.call(predicate, this, arguments)) { + k = index; + return true; + } + return false; + }, + arguments[1] + ) + ? k + : -1; +}; diff --git a/node_modules/es5-ext/array/#/find/implement.js b/node_modules/es5-ext/array/#/find/implement.js new file mode 100644 index 00000000..d8ebc5b8 --- /dev/null +++ b/node_modules/es5-ext/array/#/find/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "find", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/find/index.js b/node_modules/es5-ext/array/#/find/index.js new file mode 100644 index 00000000..131a71be --- /dev/null +++ b/node_modules/es5-ext/array/#/find/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.find : require("./shim"); diff --git a/node_modules/es5-ext/array/#/find/is-implemented.js b/node_modules/es5-ext/array/#/find/is-implemented.js new file mode 100644 index 00000000..aa278a7b --- /dev/null +++ b/node_modules/es5-ext/array/#/find/is-implemented.js @@ -0,0 +1,11 @@ +"use strict"; + +var fn = function (value) { + return value > 3; +}; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.find !== "function") return false; + return arr.find(fn) === 4; +}; diff --git a/node_modules/es5-ext/array/#/find/shim.js b/node_modules/es5-ext/array/#/find/shim.js new file mode 100644 index 00000000..c45a9380 --- /dev/null +++ b/node_modules/es5-ext/array/#/find/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +var findIndex = require("../find-index/shim"); + +// eslint-disable-next-line no-unused-vars +module.exports = function (predicate /*, thisArg*/) { + var index = findIndex.apply(this, arguments); + return index === -1 ? undefined : this[index]; +}; diff --git a/node_modules/es5-ext/array/#/first-index.js b/node_modules/es5-ext/array/#/first-index.js new file mode 100644 index 00000000..19bff541 --- /dev/null +++ b/node_modules/es5-ext/array/#/first-index.js @@ -0,0 +1,15 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function () { + var i, length; + if (!(length = toPosInt(value(this).length))) return null; + i = 0; + while (!objHasOwnProperty.call(this, i)) { + if (++i === length) return null; + } + return i; +}; diff --git a/node_modules/es5-ext/array/#/first.js b/node_modules/es5-ext/array/#/first.js new file mode 100644 index 00000000..ca76833b --- /dev/null +++ b/node_modules/es5-ext/array/#/first.js @@ -0,0 +1,9 @@ +"use strict"; + +var firstIndex = require("./first-index"); + +module.exports = function () { + var i; + if ((i = firstIndex.call(this)) !== null) return this[i]; + return undefined; +}; diff --git a/node_modules/es5-ext/array/#/flatten.js b/node_modules/es5-ext/array/#/flatten.js new file mode 100644 index 00000000..40167274 --- /dev/null +++ b/node_modules/es5-ext/array/#/flatten.js @@ -0,0 +1,40 @@ +// Stack grow safe implementation + +"use strict"; + +var ensureValue = require("../../object/valid-value") + , isArray = Array.isArray + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function () { + var input = ensureValue(this), index = 0, remaining, remainingIndexes, length, i, result = []; + // Jslint: ignore + main: while (input) { + length = input.length; + for (i = index; i < length; ++i) { + if (!objHasOwnProperty.call(input, i)) continue; + if (isArray(input[i])) { + if (i < length - 1) { + // eslint-disable-next-line max-depth + if (!remaining) { + remaining = []; + remainingIndexes = []; + } + remaining.push(input); + remainingIndexes.push(i + 1); + } + input = input[i]; + index = 0; + continue main; + } + result.push(input[i]); + } + if (remaining) { + input = remaining.pop(); + index = remainingIndexes.pop(); + } else { + input = null; + } + } + return result; +}; diff --git a/node_modules/es5-ext/array/#/for-each-right.js b/node_modules/es5-ext/array/#/for-each-right.js new file mode 100644 index 00000000..ebf076b1 --- /dev/null +++ b/node_modules/es5-ext/array/#/for-each-right.js @@ -0,0 +1,19 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty + , call = Function.prototype.call; + +module.exports = function (cb /*, thisArg*/) { + var i, self, thisArg; + + self = Object(value(this)); + callable(cb); + thisArg = arguments[1]; + + for (i = toPosInt(self.length) - 1; i >= 0; --i) { + if (objHasOwnProperty.call(self, i)) call.call(cb, thisArg, self[i], i, self); + } +}; diff --git a/node_modules/es5-ext/array/#/group.js b/node_modules/es5-ext/array/#/group.js new file mode 100644 index 00000000..711eb586 --- /dev/null +++ b/node_modules/es5-ext/array/#/group.js @@ -0,0 +1,28 @@ +// Inspired by Underscore's groupBy: +// http://documentcloud.github.com/underscore/#groupBy + +"use strict"; + +var callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + , forEach = Array.prototype.forEach + , apply = Function.prototype.apply; + +module.exports = function (cb /*, thisArg*/) { + var result; + + value(this); + callable(cb); + + result = Object.create(null); + forEach.call( + this, + function (item) { + var key = apply.call(cb, this, arguments); + if (!result[key]) result[key] = []; + result[key].push(item); + }, + arguments[1] + ); + return result; +}; diff --git a/node_modules/es5-ext/array/#/index.js b/node_modules/es5-ext/array/#/index.js new file mode 100644 index 00000000..596e83b5 --- /dev/null +++ b/node_modules/es5-ext/array/#/index.js @@ -0,0 +1,41 @@ +"use strict"; + +module.exports = { + "@@iterator": require("./@@iterator"), + "binarySearch": require("./binary-search"), + "clear": require("./clear"), + "compact": require("./compact"), + "concat": require("./concat"), + "contains": require("./contains"), + "copyWithin": require("./copy-within"), + "diff": require("./diff"), + "eIndexOf": require("./e-index-of"), + "eLastIndexOf": require("./e-last-index-of"), + "entries": require("./entries"), + "exclusion": require("./exclusion"), + "fill": require("./fill"), + "filter": require("./filter"), + "find": require("./find"), + "findIndex": require("./find-index"), + "first": require("./first"), + "firstIndex": require("./first-index"), + "flatten": require("./flatten"), + "forEachRight": require("./for-each-right"), + "keys": require("./keys"), + "group": require("./group"), + "indexesOf": require("./indexes-of"), + "intersection": require("./intersection"), + "isCopy": require("./is-copy"), + "isEmpty": require("./is-empty"), + "isUniq": require("./is-uniq"), + "last": require("./last"), + "lastIndex": require("./last-index"), + "map": require("./map"), + "remove": require("./remove"), + "separate": require("./separate"), + "slice": require("./slice"), + "someRight": require("./some-right"), + "splice": require("./splice"), + "uniq": require("./uniq"), + "values": require("./values") +}; diff --git a/node_modules/es5-ext/array/#/indexes-of.js b/node_modules/es5-ext/array/#/indexes-of.js new file mode 100644 index 00000000..6c39cd92 --- /dev/null +++ b/node_modules/es5-ext/array/#/indexes-of.js @@ -0,0 +1,12 @@ +"use strict"; + +var indexOf = require("./e-index-of"); + +module.exports = function (value /*, fromIndex*/) { + var result = [], i, fromIndex = arguments[1]; + while ((i = indexOf.call(this, value, fromIndex)) !== -1) { + result.push(i); + fromIndex = i + 1; + } + return result; +}; diff --git a/node_modules/es5-ext/array/#/intersection.js b/node_modules/es5-ext/array/#/intersection.js new file mode 100644 index 00000000..91261d5f --- /dev/null +++ b/node_modules/es5-ext/array/#/intersection.js @@ -0,0 +1,21 @@ +"use strict"; + +var value = require("../../object/valid-value") + , contains = require("./contains") + , byLength = require("./_compare-by-length") + , filter = Array.prototype.filter + , push = Array.prototype.push + , slice = Array.prototype.slice; + +module.exports = function (/* …list*/) { + var lists; + if (!arguments.length) slice.call(this); + push.apply(lists = [this], arguments); + lists.forEach(value); + lists.sort(byLength); + return lists.reduce(function (list1, list2) { + return filter.call(list1, function (item) { + return contains.call(list2, item); + }); + }); +}; diff --git a/node_modules/es5-ext/array/#/is-copy.js b/node_modules/es5-ext/array/#/is-copy.js new file mode 100644 index 00000000..1413b95d --- /dev/null +++ b/node_modules/es5-ext/array/#/is-copy.js @@ -0,0 +1,21 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , eq = require("../../object/eq") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function (other) { + var i, length; + value(this); + value(other); + length = toPosInt(this.length); + if (length !== toPosInt(other.length)) return false; + for (i = 0; i < length; ++i) { + if (objHasOwnProperty.call(this, i) !== objHasOwnProperty.call(other, i)) { + return false; + } + if (!eq(this[i], other[i])) return false; + } + return true; +}; diff --git a/node_modules/es5-ext/array/#/is-empty.js b/node_modules/es5-ext/array/#/is-empty.js new file mode 100644 index 00000000..80a30695 --- /dev/null +++ b/node_modules/es5-ext/array/#/is-empty.js @@ -0,0 +1,8 @@ +"use strict"; + +var ensureArray = require("../../object/ensure-array") + , firstIndex = require("./first-index"); + +module.exports = function () { + return firstIndex.call(ensureArray(this)) === null; +}; diff --git a/node_modules/es5-ext/array/#/is-uniq.js b/node_modules/es5-ext/array/#/is-uniq.js new file mode 100644 index 00000000..148a5a91 --- /dev/null +++ b/node_modules/es5-ext/array/#/is-uniq.js @@ -0,0 +1,14 @@ +"use strict"; + +var indexOf = require("./e-index-of") + + , every = Array.prototype.every + , isFirst; + +isFirst = function (value, index) { + return indexOf.call(this, value) === index; +}; + +module.exports = function () { + return every.call(this, isFirst, this); +}; diff --git a/node_modules/es5-ext/array/#/keys/implement.js b/node_modules/es5-ext/array/#/keys/implement.js new file mode 100644 index 00000000..40d0df01 --- /dev/null +++ b/node_modules/es5-ext/array/#/keys/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "keys", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/keys/index.js b/node_modules/es5-ext/array/#/keys/index.js new file mode 100644 index 00000000..50a18f19 --- /dev/null +++ b/node_modules/es5-ext/array/#/keys/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.keys : require("./shim"); diff --git a/node_modules/es5-ext/array/#/keys/is-implemented.js b/node_modules/es5-ext/array/#/keys/is-implemented.js new file mode 100644 index 00000000..70a171f6 --- /dev/null +++ b/node_modules/es5-ext/array/#/keys/is-implemented.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function () { + var arr = [1, "foo"], iterator, result; + if (typeof arr.keys !== "function") return false; + iterator = arr.keys(); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== 0) return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/array/#/keys/shim.js b/node_modules/es5-ext/array/#/keys/shim.js new file mode 100644 index 00000000..c3c68c6d --- /dev/null +++ b/node_modules/es5-ext/array/#/keys/shim.js @@ -0,0 +1,6 @@ +"use strict"; + +var ArrayIterator = require("es6-iterator/array"); +module.exports = function () { + return new ArrayIterator(this, "key"); +}; diff --git a/node_modules/es5-ext/array/#/last-index.js b/node_modules/es5-ext/array/#/last-index.js new file mode 100644 index 00000000..74aaba46 --- /dev/null +++ b/node_modules/es5-ext/array/#/last-index.js @@ -0,0 +1,15 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function () { + var i, length; + if (!(length = toPosInt(value(this).length))) return null; + i = length - 1; + while (!objHasOwnProperty.call(this, i)) { + if (--i === -1) return null; + } + return i; +}; diff --git a/node_modules/es5-ext/array/#/last.js b/node_modules/es5-ext/array/#/last.js new file mode 100644 index 00000000..38bb359b --- /dev/null +++ b/node_modules/es5-ext/array/#/last.js @@ -0,0 +1,9 @@ +"use strict"; + +var lastIndex = require("./last-index"); + +module.exports = function () { + var i; + if ((i = lastIndex.call(this)) !== null) return this[i]; + return undefined; +}; diff --git a/node_modules/es5-ext/array/#/map/implement.js b/node_modules/es5-ext/array/#/map/implement.js new file mode 100644 index 00000000..a6d1d900 --- /dev/null +++ b/node_modules/es5-ext/array/#/map/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "map", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/map/index.js b/node_modules/es5-ext/array/#/map/index.js new file mode 100644 index 00000000..101c0649 --- /dev/null +++ b/node_modules/es5-ext/array/#/map/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.map : require("./shim"); diff --git a/node_modules/es5-ext/array/#/map/is-implemented.js b/node_modules/es5-ext/array/#/map/is-implemented.js new file mode 100644 index 00000000..24ab9084 --- /dev/null +++ b/node_modules/es5-ext/array/#/map/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var identity = require("../../../function/identity") + , SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { + return (new SubArray()).map(identity) instanceof SubArray; +}; diff --git a/node_modules/es5-ext/array/#/map/shim.js b/node_modules/es5-ext/array/#/map/shim.js new file mode 100644 index 00000000..6d8cc1fb --- /dev/null +++ b/node_modules/es5-ext/array/#/map/shim.js @@ -0,0 +1,21 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , callable = require("../../../object/valid-callable") + + , isArray = Array.isArray, map = Array.prototype.map + , forEach = Array.prototype.forEach, call = Function.prototype.call; + +module.exports = function (callbackFn/*, thisArg*/) { + var result, thisArg; + if (!this || !isArray(this) || isPlainArray(this)) { + return map.apply(this, arguments); + } + callable(callbackFn); + thisArg = arguments[1]; + result = new this.constructor(this.length); + forEach.call(this, function (val, i, self) { + result[i] = call.call(callbackFn, thisArg, val, i, self); + }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/remove.js b/node_modules/es5-ext/array/#/remove.js new file mode 100644 index 00000000..6a8a0867 --- /dev/null +++ b/node_modules/es5-ext/array/#/remove.js @@ -0,0 +1,17 @@ +"use strict"; + +var indexOf = require("./e-index-of") + , forEach = Array.prototype.forEach + , splice = Array.prototype.splice; + +// eslint-disable-next-line no-unused-vars +module.exports = function (itemToRemove /*, …item*/) { + forEach.call( + arguments, + function (item) { + var index = indexOf.call(this, item); + if (index !== -1) splice.call(this, index, 1); + }, + this + ); +}; diff --git a/node_modules/es5-ext/array/#/separate.js b/node_modules/es5-ext/array/#/separate.js new file mode 100644 index 00000000..35e1cc5a --- /dev/null +++ b/node_modules/es5-ext/array/#/separate.js @@ -0,0 +1,12 @@ +"use strict"; + +var forEach = Array.prototype.forEach; + +module.exports = function (sep) { + var result = []; + forEach.call(this, function (val) { + result.push(val, sep); + }); + result.pop(); + return result; +}; diff --git a/node_modules/es5-ext/array/#/slice/implement.js b/node_modules/es5-ext/array/#/slice/implement.js new file mode 100644 index 00000000..568e87a1 --- /dev/null +++ b/node_modules/es5-ext/array/#/slice/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "slice", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/slice/index.js b/node_modules/es5-ext/array/#/slice/index.js new file mode 100644 index 00000000..c80ee359 --- /dev/null +++ b/node_modules/es5-ext/array/#/slice/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.slice : require("./shim"); diff --git a/node_modules/es5-ext/array/#/slice/is-implemented.js b/node_modules/es5-ext/array/#/slice/is-implemented.js new file mode 100644 index 00000000..47904c20 --- /dev/null +++ b/node_modules/es5-ext/array/#/slice/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { + return (new SubArray()).slice() instanceof SubArray; +}; diff --git a/node_modules/es5-ext/array/#/slice/shim.js b/node_modules/es5-ext/array/#/slice/shim.js new file mode 100644 index 00000000..ff13085b --- /dev/null +++ b/node_modules/es5-ext/array/#/slice/shim.js @@ -0,0 +1,36 @@ +"use strict"; + +var toInteger = require("../../../number/to-integer") + , toPosInt = require("../../../number/to-pos-integer") + , isPlainArray = require("../../is-plain-array") + , isArray = Array.isArray + , slice = Array.prototype.slice + , objHasOwnProperty = Object.prototype.hasOwnProperty + , max = Math.max; + +module.exports = function (start, end) { + var length, result, i; + if (!this || !isArray(this) || isPlainArray(this)) { + return slice.apply(this, arguments); + } + length = toPosInt(this.length); + start = toInteger(start); + if (start < 0) start = max(length + start, 0); + else if (start > length) start = length; + if (end === undefined) { + end = length; + } else { + end = toInteger(end); + if (end < 0) end = max(length + end, 0); + else if (end > length) end = length; + } + if (start > end) start = end; + result = new this.constructor(end - start); + i = 0; + while (start !== end) { + if (objHasOwnProperty.call(this, start)) result[i] = this[start]; + ++i; + ++start; + } + return result; +}; diff --git a/node_modules/es5-ext/array/#/some-right.js b/node_modules/es5-ext/array/#/some-right.js new file mode 100644 index 00000000..d9a665fc --- /dev/null +++ b/node_modules/es5-ext/array/#/some-right.js @@ -0,0 +1,21 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty + , call = Function.prototype.call; + +module.exports = function (cb /*, thisArg*/) { + var i, self, thisArg; + self = Object(value(this)); + callable(cb); + thisArg = arguments[1]; + + for (i = toPosInt(self.length) - 1; i >= 0; --i) { + if (objHasOwnProperty.call(self, i) && call.call(cb, thisArg, self[i], i, self)) { + return true; + } + } + return false; +}; diff --git a/node_modules/es5-ext/array/#/splice/implement.js b/node_modules/es5-ext/array/#/splice/implement.js new file mode 100644 index 00000000..1e1682b0 --- /dev/null +++ b/node_modules/es5-ext/array/#/splice/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "splice", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/splice/index.js b/node_modules/es5-ext/array/#/splice/index.js new file mode 100644 index 00000000..e5fda951 --- /dev/null +++ b/node_modules/es5-ext/array/#/splice/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype.splice : require("./shim"); diff --git a/node_modules/es5-ext/array/#/splice/is-implemented.js b/node_modules/es5-ext/array/#/splice/is-implemented.js new file mode 100644 index 00000000..afbb95a6 --- /dev/null +++ b/node_modules/es5-ext/array/#/splice/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { + return (new SubArray()).splice(0) instanceof SubArray; +}; diff --git a/node_modules/es5-ext/array/#/splice/shim.js b/node_modules/es5-ext/array/#/splice/shim.js new file mode 100644 index 00000000..dc8d837b --- /dev/null +++ b/node_modules/es5-ext/array/#/splice/shim.js @@ -0,0 +1,17 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , isArray = Array.isArray + , splice = Array.prototype.splice + , forEach = Array.prototype.forEach; + +// eslint-disable-next-line no-unused-vars +module.exports = function (start, deleteCount /*, …items*/) { + var arr = splice.apply(this, arguments), result; + if (!this || !isArray(this) || isPlainArray(this)) return arr; + result = new this.constructor(arr.length); + forEach.call(arr, function (val, i) { + result[i] = val; + }); + return result; +}; diff --git a/node_modules/es5-ext/array/#/uniq.js b/node_modules/es5-ext/array/#/uniq.js new file mode 100644 index 00000000..944ce933 --- /dev/null +++ b/node_modules/es5-ext/array/#/uniq.js @@ -0,0 +1,15 @@ +"use strict"; + +var indexOf = require("./e-index-of") + + , filter = Array.prototype.filter + + , isFirst; + +isFirst = function (value, index) { + return indexOf.call(this, value) === index; +}; + +module.exports = function () { + return filter.call(this, isFirst, this); +}; diff --git a/node_modules/es5-ext/array/#/values/implement.js b/node_modules/es5-ext/array/#/values/implement.js new file mode 100644 index 00000000..b43e9f64 --- /dev/null +++ b/node_modules/es5-ext/array/#/values/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "values", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/#/values/index.js b/node_modules/es5-ext/array/#/values/index.js new file mode 100644 index 00000000..30a50bae --- /dev/null +++ b/node_modules/es5-ext/array/#/values/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.values : require("./shim"); diff --git a/node_modules/es5-ext/array/#/values/is-implemented.js b/node_modules/es5-ext/array/#/values/is-implemented.js new file mode 100644 index 00000000..8b72568a --- /dev/null +++ b/node_modules/es5-ext/array/#/values/is-implemented.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function () { + var arr = ["foo", 1], iterator, result; + if (typeof arr.values !== "function") return false; + iterator = arr.values(); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== "foo") return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/array/#/values/shim.js b/node_modules/es5-ext/array/#/values/shim.js new file mode 100644 index 00000000..e46a0526 --- /dev/null +++ b/node_modules/es5-ext/array/#/values/shim.js @@ -0,0 +1,6 @@ +"use strict"; + +var ArrayIterator = require("es6-iterator/array"); +module.exports = function () { + return new ArrayIterator(this, "value"); +}; diff --git a/node_modules/es5-ext/array/_is-extensible.js b/node_modules/es5-ext/array/_is-extensible.js new file mode 100644 index 00000000..a9e8ee79 --- /dev/null +++ b/node_modules/es5-ext/array/_is-extensible.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = (function () { + var SubArray = require("./_sub-array-dummy"), arr; + + if (!SubArray) return false; + arr = new SubArray(); + if (!Array.isArray(arr)) return false; + if (!(arr instanceof SubArray)) return false; + + arr[34] = "foo"; + return arr.length === 35; +}()); diff --git a/node_modules/es5-ext/array/_sub-array-dummy-safe.js b/node_modules/es5-ext/array/_sub-array-dummy-safe.js new file mode 100644 index 00000000..80e3b3c5 --- /dev/null +++ b/node_modules/es5-ext/array/_sub-array-dummy-safe.js @@ -0,0 +1,25 @@ +"use strict"; + +var setPrototypeOf = require("../object/set-prototype-of") + , isExtensible = require("./_is-extensible"); + +module.exports = (function () { + var SubArray; + + if (isExtensible) return require("./_sub-array-dummy"); + + if (!setPrototypeOf) return null; + SubArray = function () { + var arr = Array.apply(this, arguments); + setPrototypeOf(arr, SubArray.prototype); + return arr; + }; + setPrototypeOf(SubArray, Array); + SubArray.prototype = Object.create(Array.prototype, { + constructor: { value: SubArray, +enumerable: false, +writable: true, + configurable: true } + }); + return SubArray; +}()); diff --git a/node_modules/es5-ext/array/_sub-array-dummy.js b/node_modules/es5-ext/array/_sub-array-dummy.js new file mode 100644 index 00000000..cf111522 --- /dev/null +++ b/node_modules/es5-ext/array/_sub-array-dummy.js @@ -0,0 +1,20 @@ +"use strict"; + +var setPrototypeOf = require("../object/set-prototype-of"); + +module.exports = (function () { + var SubArray; + + if (!setPrototypeOf) return null; + SubArray = function () { + Array.apply(this, arguments); +}; + setPrototypeOf(SubArray, Array); + SubArray.prototype = Object.create(Array.prototype, { + constructor: { value: SubArray, +enumerable: false, +writable: true, + configurable: true } + }); + return SubArray; +}()); diff --git a/node_modules/es5-ext/array/from/implement.js b/node_modules/es5-ext/array/from/implement.js new file mode 100644 index 00000000..41172242 --- /dev/null +++ b/node_modules/es5-ext/array/from/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array, "from", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/from/index.js b/node_modules/es5-ext/array/from/index.js new file mode 100644 index 00000000..ca4492d1 --- /dev/null +++ b/node_modules/es5-ext/array/from/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.from + : require("./shim"); diff --git a/node_modules/es5-ext/array/from/is-implemented.js b/node_modules/es5-ext/array/from/is-implemented.js new file mode 100644 index 00000000..3567c876 --- /dev/null +++ b/node_modules/es5-ext/array/from/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function () { + var from = Array.from, arr, result; + if (typeof from !== "function") return false; + arr = ["raz", "dwa"]; + result = from(arr); + return Boolean(result && (result !== arr) && (result[1] === "dwa")); +}; diff --git a/node_modules/es5-ext/array/from/shim.js b/node_modules/es5-ext/array/from/shim.js new file mode 100644 index 00000000..8e3581db --- /dev/null +++ b/node_modules/es5-ext/array/from/shim.js @@ -0,0 +1,119 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , isArguments = require("../../function/is-arguments") + , isFunction = require("../../function/is-function") + , toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , validValue = require("../../object/valid-value") + , isValue = require("../../object/is-value") + , isString = require("../../string/is-string") + , isArray = Array.isArray + , call = Function.prototype.call + , desc = { configurable: true, enumerable: true, writable: true, value: null } + , defineProperty = Object.defineProperty; + +// eslint-disable-next-line complexity, max-lines-per-function +module.exports = function (arrayLike /*, mapFn, thisArg*/) { + var mapFn = arguments[1] + , thisArg = arguments[2] + , Context + , i + , j + , arr + , length + , code + , iterator + , result + , getIterator + , value; + + arrayLike = Object(validValue(arrayLike)); + + if (isValue(mapFn)) callable(mapFn); + if (!this || this === Array || !isFunction(this)) { + // Result: Plain array + if (!mapFn) { + if (isArguments(arrayLike)) { + // Source: Arguments + length = arrayLike.length; + if (length !== 1) return Array.apply(null, arrayLike); + arr = new Array(1); + arr[0] = arrayLike[0]; + return arr; + } + if (isArray(arrayLike)) { + // Source: Array + arr = new Array(length = arrayLike.length); + for (i = 0; i < length; ++i) arr[i] = arrayLike[i]; + return arr; + } + } + arr = []; + } else { + // Result: Non plain array + Context = this; + } + + if (!isArray(arrayLike)) { + if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) { + // Source: Iterator + iterator = callable(getIterator).call(arrayLike); + if (Context) arr = new Context(); + result = iterator.next(); + i = 0; + while (!result.done) { + value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value; + if (Context) { + desc.value = value; + defineProperty(arr, i, desc); + } else { + arr[i] = value; + } + result = iterator.next(); + ++i; + } + length = i; + } else if (isString(arrayLike)) { + // Source: String + length = arrayLike.length; + if (Context) arr = new Context(); + for (i = 0, j = 0; i < length; ++i) { + value = arrayLike[i]; + if (i + 1 < length) { + code = value.charCodeAt(0); + // eslint-disable-next-line max-depth + if (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i]; + } + value = mapFn ? call.call(mapFn, thisArg, value, j) : value; + if (Context) { + desc.value = value; + defineProperty(arr, j, desc); + } else { + arr[j] = value; + } + ++j; + } + length = j; + } + } + if (length === undefined) { + // Source: array or array-like + length = toPosInt(arrayLike.length); + if (Context) arr = new Context(length); + for (i = 0; i < length; ++i) { + value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i]; + if (Context) { + desc.value = value; + defineProperty(arr, i, desc); + } else { + arr[i] = value; + } + } + } + if (Context) { + desc.value = null; + arr.length = length; + } + return arr; +}; diff --git a/node_modules/es5-ext/array/generate.js b/node_modules/es5-ext/array/generate.js new file mode 100644 index 00000000..42b69303 --- /dev/null +++ b/node_modules/es5-ext/array/generate.js @@ -0,0 +1,18 @@ +"use strict"; + +var toPosInt = require("../number/to-pos-integer") + , value = require("../object/valid-value") + , slice = Array.prototype.slice; + +module.exports = function (length /*, …fill*/) { + var arr, currentLength; + length = toPosInt(value(length)); + if (length === 0) return []; + + arr = arguments.length < 2 ? [undefined] : slice.call(arguments, 1, 1 + length); + + while ((currentLength = arr.length) < length) { + arr = arr.concat(arr.slice(0, length - currentLength)); + } + return arr; +}; diff --git a/node_modules/es5-ext/array/index.js b/node_modules/es5-ext/array/index.js new file mode 100644 index 00000000..49ff58ee --- /dev/null +++ b/node_modules/es5-ext/array/index.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "from": require("./from"), + "generate": require("./generate"), + "isPlainArray": require("./is-plain-array"), + "of": require("./of"), + "toArray": require("./to-array"), + "validArray": require("./valid-array") +}; diff --git a/node_modules/es5-ext/array/is-plain-array.js b/node_modules/es5-ext/array/is-plain-array.js new file mode 100644 index 00000000..ca3d25bb --- /dev/null +++ b/node_modules/es5-ext/array/is-plain-array.js @@ -0,0 +1,11 @@ +"use strict"; + +var isArray = Array.isArray, getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (obj) { + var proto; + if (!obj || !isArray(obj)) return false; + proto = getPrototypeOf(obj); + if (!isArray(proto)) return false; + return !isArray(getPrototypeOf(proto)); +}; diff --git a/node_modules/es5-ext/array/of/implement.js b/node_modules/es5-ext/array/of/implement.js new file mode 100644 index 00000000..92f8f3e3 --- /dev/null +++ b/node_modules/es5-ext/array/of/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array, "of", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/array/of/index.js b/node_modules/es5-ext/array/of/index.js new file mode 100644 index 00000000..43ab3f62 --- /dev/null +++ b/node_modules/es5-ext/array/of/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.of + : require("./shim"); diff --git a/node_modules/es5-ext/array/of/is-implemented.js b/node_modules/es5-ext/array/of/is-implemented.js new file mode 100644 index 00000000..20b80c20 --- /dev/null +++ b/node_modules/es5-ext/array/of/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function () { + var of = Array.of, result; + if (typeof of !== "function") return false; + result = of("foo", "bar"); + return Boolean(result && (result[1] === "bar")); +}; diff --git a/node_modules/es5-ext/array/of/shim.js b/node_modules/es5-ext/array/of/shim.js new file mode 100644 index 00000000..6cc9c383 --- /dev/null +++ b/node_modules/es5-ext/array/of/shim.js @@ -0,0 +1,19 @@ +"use strict"; + +var isFunction = require("../../function/is-function") + , slice = Array.prototype.slice + , defineProperty = Object.defineProperty + , desc = { configurable: true, enumerable: true, writable: true, value: null }; + +module.exports = function (/* …items*/) { + var result, i, length; + if (!this || this === Array || !isFunction(this)) return slice.call(arguments); + result = new this(length = arguments.length); + for (i = 0; i < length; ++i) { + desc.value = arguments[i]; + defineProperty(result, i, desc); + } + desc.value = null; + result.length = length; + return result; +}; diff --git a/node_modules/es5-ext/array/to-array.js b/node_modules/es5-ext/array/to-array.js new file mode 100644 index 00000000..2078b7a3 --- /dev/null +++ b/node_modules/es5-ext/array/to-array.js @@ -0,0 +1,9 @@ +"use strict"; + +var from = require("./from") + + , isArray = Array.isArray; + +module.exports = function (arrayLike) { + return isArray(arrayLike) ? arrayLike : from(arrayLike); +}; diff --git a/node_modules/es5-ext/array/valid-array.js b/node_modules/es5-ext/array/valid-array.js new file mode 100644 index 00000000..1e58c39a --- /dev/null +++ b/node_modules/es5-ext/array/valid-array.js @@ -0,0 +1,8 @@ +"use strict"; + +var isArray = Array.isArray; + +module.exports = function (value) { + if (isArray(value)) return value; + throw new TypeError(value + " is not an array"); +}; diff --git a/node_modules/es5-ext/boolean/index.js b/node_modules/es5-ext/boolean/index.js new file mode 100644 index 00000000..ffd3fd25 --- /dev/null +++ b/node_modules/es5-ext/boolean/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = { + isBoolean: require("./is-boolean") +}; diff --git a/node_modules/es5-ext/boolean/is-boolean.js b/node_modules/es5-ext/boolean/is-boolean.js new file mode 100644 index 00000000..394845f6 --- /dev/null +++ b/node_modules/es5-ext/boolean/is-boolean.js @@ -0,0 +1,10 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(true); + +module.exports = function (value) { + return ( + typeof value === "boolean" || + (typeof value === "object" && (value instanceof Boolean || objToString.call(value) === id)) + ); +}; diff --git a/node_modules/es5-ext/date/#/copy.js b/node_modules/es5-ext/date/#/copy.js new file mode 100644 index 00000000..9638a653 --- /dev/null +++ b/node_modules/es5-ext/date/#/copy.js @@ -0,0 +1,7 @@ +"use strict"; + +var getTime = Date.prototype.getTime; + +module.exports = function () { + return new Date(getTime.call(this)); +}; diff --git a/node_modules/es5-ext/date/#/days-in-month.js b/node_modules/es5-ext/date/#/days-in-month.js new file mode 100644 index 00000000..8e8ca4d4 --- /dev/null +++ b/node_modules/es5-ext/date/#/days-in-month.js @@ -0,0 +1,17 @@ +"use strict"; + +var getMonth = Date.prototype.getMonth; + +module.exports = function () { + switch (getMonth.call(this)) { + case 1: + return this.getFullYear() % 4 ? 28 : 29; + case 3: + case 5: + case 8: + case 10: + return 30; + default: + return 31; + } +}; diff --git a/node_modules/es5-ext/date/#/floor-day.js b/node_modules/es5-ext/date/#/floor-day.js new file mode 100644 index 00000000..db696d38 --- /dev/null +++ b/node_modules/es5-ext/date/#/floor-day.js @@ -0,0 +1,8 @@ +"use strict"; + +var setHours = Date.prototype.setHours; + +module.exports = function () { + setHours.call(this, 0, 0, 0, 0); + return this; +}; diff --git a/node_modules/es5-ext/date/#/floor-month.js b/node_modules/es5-ext/date/#/floor-month.js new file mode 100644 index 00000000..c9c0460b --- /dev/null +++ b/node_modules/es5-ext/date/#/floor-month.js @@ -0,0 +1,8 @@ +"use strict"; + +var floorDay = require("./floor-day"); + +module.exports = function () { + floorDay.call(this).setDate(1); + return this; +}; diff --git a/node_modules/es5-ext/date/#/floor-year.js b/node_modules/es5-ext/date/#/floor-year.js new file mode 100644 index 00000000..e9b6f0fe --- /dev/null +++ b/node_modules/es5-ext/date/#/floor-year.js @@ -0,0 +1,8 @@ +"use strict"; + +var floorMonth = require("./floor-month"); + +module.exports = function () { + floorMonth.call(this).setMonth(0); + return this; +}; diff --git a/node_modules/es5-ext/date/#/format.js b/node_modules/es5-ext/date/#/format.js new file mode 100644 index 00000000..519d77c4 --- /dev/null +++ b/node_modules/es5-ext/date/#/format.js @@ -0,0 +1,38 @@ +/* eslint id-length: "off" */ + +"use strict"; + +var pad = require("../../number/#/pad") + , date = require("../valid-date") + , format; + +format = require("../../string/format-method")({ + Y: function () { + return String(this.getFullYear()); + }, + y: function () { + return String(this.getFullYear()).slice(-2); + }, + m: function () { + return pad.call(this.getMonth() + 1, 2); + }, + d: function () { + return pad.call(this.getDate(), 2); + }, + H: function () { + return pad.call(this.getHours(), 2); + }, + M: function () { + return pad.call(this.getMinutes(), 2); + }, + S: function () { + return pad.call(this.getSeconds(), 2); + }, + L: function () { + return pad.call(this.getMilliseconds(), 3); + } +}); + +module.exports = function (pattern) { + return format.call(date(this), pattern); +}; diff --git a/node_modules/es5-ext/date/#/index.js b/node_modules/es5-ext/date/#/index.js new file mode 100644 index 00000000..1781e218 --- /dev/null +++ b/node_modules/es5-ext/date/#/index.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = { + copy: require("./copy"), + daysInMonth: require("./days-in-month"), + floorDay: require("./floor-day"), + floorMonth: require("./floor-month"), + floorYear: require("./floor-year"), + format: require("./format") +}; diff --git a/node_modules/es5-ext/date/ensure-time-value.js b/node_modules/es5-ext/date/ensure-time-value.js new file mode 100644 index 00000000..09f5afcf --- /dev/null +++ b/node_modules/es5-ext/date/ensure-time-value.js @@ -0,0 +1,10 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , toInteger = require("../number/to-integer") + , isTimeValue = require("./is-time-value"); + +module.exports = function (value) { + if (isTimeValue(value)) return toInteger(value); + throw new TypeError(safeToString(value) + " is not a valid time value"); +}; diff --git a/node_modules/es5-ext/date/index.js b/node_modules/es5-ext/date/index.js new file mode 100644 index 00000000..c1431497 --- /dev/null +++ b/node_modules/es5-ext/date/index.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "ensureTimeValue": require("./ensure-time-value"), + "isDate": require("./is-date"), + "isTimeValue": require("./is-time-value"), + "validDate": require("./valid-date") +}; diff --git a/node_modules/es5-ext/date/is-date.js b/node_modules/es5-ext/date/is-date.js new file mode 100644 index 00000000..f45bde46 --- /dev/null +++ b/node_modules/es5-ext/date/is-date.js @@ -0,0 +1,10 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(new Date()); + +module.exports = function (value) { + return ( + (value && !isNaN(value) && (value instanceof Date || objToString.call(value) === id)) || + false + ); +}; diff --git a/node_modules/es5-ext/date/is-time-value.js b/node_modules/es5-ext/date/is-time-value.js new file mode 100644 index 00000000..0deb0b97 --- /dev/null +++ b/node_modules/es5-ext/date/is-time-value.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (value) { + try { value = Number(value); } + catch (e) { return false; } + if (isNaN(value)) return false; + if (Math.abs(value) > 8.64e15) return false; + return true; +}; diff --git a/node_modules/es5-ext/date/valid-date.js b/node_modules/es5-ext/date/valid-date.js new file mode 100644 index 00000000..0c73dc5d --- /dev/null +++ b/node_modules/es5-ext/date/valid-date.js @@ -0,0 +1,8 @@ +"use strict"; + +var isDate = require("./is-date"); + +module.exports = function (value) { + if (!isDate(value)) throw new TypeError(value + " is not valid Date object"); + return value; +}; diff --git a/node_modules/es5-ext/error/#/index.js b/node_modules/es5-ext/error/#/index.js new file mode 100644 index 00000000..ac9a4306 --- /dev/null +++ b/node_modules/es5-ext/error/#/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = { + throw: require("./throw") +}; diff --git a/node_modules/es5-ext/error/#/throw.js b/node_modules/es5-ext/error/#/throw.js new file mode 100644 index 00000000..3fe6bb4c --- /dev/null +++ b/node_modules/es5-ext/error/#/throw.js @@ -0,0 +1,7 @@ +"use strict"; + +var error = require("../valid-error"); + +module.exports = function () { + throw error(this); +}; diff --git a/node_modules/es5-ext/error/custom.js b/node_modules/es5-ext/error/custom.js new file mode 100644 index 00000000..0e4c8cb1 --- /dev/null +++ b/node_modules/es5-ext/error/custom.js @@ -0,0 +1,20 @@ +"use strict"; + +var assign = require("../object/assign") + , isObject = require("../object/is-object") + , isValue = require("../object/is-value") + , captureStackTrace = Error.captureStackTrace; + +exports = module.exports = function (message /*, code, ext*/) { + var err = new Error(message), code = arguments[1], ext = arguments[2]; + if (!isValue(ext)) { + if (isObject(code)) { + ext = code; + code = null; + } + } + if (isValue(ext)) assign(err, ext); + if (isValue(code)) err.code = code; + if (captureStackTrace) captureStackTrace(err, exports); + return err; +}; diff --git a/node_modules/es5-ext/error/index.js b/node_modules/es5-ext/error/index.js new file mode 100644 index 00000000..cb7054a2 --- /dev/null +++ b/node_modules/es5-ext/error/index.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "custom": require("./custom"), + "isError": require("./is-error"), + "validError": require("./valid-error") +}; diff --git a/node_modules/es5-ext/error/is-error.js b/node_modules/es5-ext/error/is-error.js new file mode 100644 index 00000000..aad67ed9 --- /dev/null +++ b/node_modules/es5-ext/error/is-error.js @@ -0,0 +1,7 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(new Error()); + +module.exports = function (value) { + return (value && (value instanceof Error || objToString.call(value) === id)) || false; +}; diff --git a/node_modules/es5-ext/error/valid-error.js b/node_modules/es5-ext/error/valid-error.js new file mode 100644 index 00000000..432f7ba2 --- /dev/null +++ b/node_modules/es5-ext/error/valid-error.js @@ -0,0 +1,8 @@ +"use strict"; + +var isError = require("./is-error"); + +module.exports = function (value) { + if (!isError(value)) throw new TypeError(value + " is not an Error object"); + return value; +}; diff --git a/node_modules/es5-ext/function/#/compose.js b/node_modules/es5-ext/function/#/compose.js new file mode 100644 index 00000000..c1d37b4b --- /dev/null +++ b/node_modules/es5-ext/function/#/compose.js @@ -0,0 +1,20 @@ +"use strict"; + +var isValue = require("../../object/is-value") + , callable = require("../../object/valid-callable") + , aFrom = require("../../array/from"); + +var apply = Function.prototype.apply + , call = Function.prototype.call + , callFn = function (arg, fn) { return call.call(fn, this, arg); }; + +module.exports = function (fnIgnored/*, …fnn*/) { + var fns, first; + var args = aFrom(arguments); + fns = isValue(this) ? [this].concat(args) : args; + fns.forEach(callable); + fns = fns.reverse(); + first = fns[0]; + fns = fns.slice(1); + return function (argIgnored) { return fns.reduce(callFn, apply.call(first, this, arguments)); }; +}; diff --git a/node_modules/es5-ext/function/#/copy.js b/node_modules/es5-ext/function/#/copy.js new file mode 100644 index 00000000..f0403b30 --- /dev/null +++ b/node_modules/es5-ext/function/#/copy.js @@ -0,0 +1,23 @@ +"use strict"; + +var mixin = require("../../object/mixin") + , validFunction = require("../valid-function") + , re = /^\s*function\s*([\0-')-\uffff]+)*\s*\(([\0-(*-\uffff]*)\)\s*\{/; + +module.exports = function () { + var match = String(validFunction(this)).match(re), fn; + + // eslint-disable-next-line no-new-func + fn = new Function( + "fn", + "return function " + + match[1].trim() + + "(" + + match[2] + + ") { return fn.apply(this, arguments); };" + )(this); + try { + mixin(fn, this); + } catch (ignore) {} + return fn; +}; diff --git a/node_modules/es5-ext/function/#/curry.js b/node_modules/es5-ext/function/#/curry.js new file mode 100644 index 00000000..cc1e14a5 --- /dev/null +++ b/node_modules/es5-ext/function/#/curry.js @@ -0,0 +1,24 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , defineLength = require("../_define-length") + + , slice = Array.prototype.slice, apply = Function.prototype.apply + , curry; + +curry = function self(fn, length, preArgs) { + return defineLength(function () { + var args = preArgs + ? preArgs.concat(slice.call(arguments, 0, length - preArgs.length)) + : slice.call(arguments, 0, length); + return args.length === length ? apply.call(fn, this, args) + : self(fn, length, args); + }, preArgs ? length - preArgs.length : length); +}; + +module.exports = function (/* Length*/) { + var length = arguments[0]; + return curry(callable(this), + isNaN(length) ? toPosInt(this.length) : toPosInt(length)); +}; diff --git a/node_modules/es5-ext/function/#/index.js b/node_modules/es5-ext/function/#/index.js new file mode 100644 index 00000000..02ae9f49 --- /dev/null +++ b/node_modules/es5-ext/function/#/index.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = { + compose: require("./compose"), + copy: require("./copy"), + curry: require("./curry"), + lock: require("./lock"), + microtaskDelay: require("./microtask-delay"), + not: require("./not"), + partial: require("./partial"), + spread: require("./spread"), + toStringTokens: require("./to-string-tokens") +}; diff --git a/node_modules/es5-ext/function/#/lock.js b/node_modules/es5-ext/function/#/lock.js new file mode 100644 index 00000000..dcd93bb1 --- /dev/null +++ b/node_modules/es5-ext/function/#/lock.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + + , apply = Function.prototype.apply; + +module.exports = function (/* …args*/) { + var fn = callable(this) + , args = arguments; + + return function () { + return apply.call(fn, this, args); +}; +}; diff --git a/node_modules/es5-ext/function/#/microtask-delay.js b/node_modules/es5-ext/function/#/microtask-delay.js new file mode 100644 index 00000000..89d47be5 --- /dev/null +++ b/node_modules/es5-ext/function/#/microtask-delay.js @@ -0,0 +1,14 @@ +"use strict"; + +var ensurePlainFunction = require("../../object/ensure-plain-function") + , defineLength = require("../_define-length") + , nextTick = require("next-tick"); + +var apply = Function.prototype.apply; + +module.exports = function () { + var src = ensurePlainFunction(this); + return defineLength(function () { + nextTick(apply.bind(src, this, arguments)); + }, this.length); +}; diff --git a/node_modules/es5-ext/function/#/not.js b/node_modules/es5-ext/function/#/not.js new file mode 100644 index 00000000..82d64def --- /dev/null +++ b/node_modules/es5-ext/function/#/not.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + , defineLength = require("../_define-length") + + , apply = Function.prototype.apply; + +module.exports = function () { + var fn = callable(this); + + return defineLength(function () { + return !apply.call(fn, this, arguments); + }, fn.length); +}; diff --git a/node_modules/es5-ext/function/#/partial.js b/node_modules/es5-ext/function/#/partial.js new file mode 100644 index 00000000..1734b135 --- /dev/null +++ b/node_modules/es5-ext/function/#/partial.js @@ -0,0 +1,16 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + , aFrom = require("../../array/from") + , defineLength = require("../_define-length") + + , apply = Function.prototype.apply; + +module.exports = function (/* …args*/) { + var fn = callable(this) + , args = aFrom(arguments); + + return defineLength(function () { + return apply.call(fn, this, args.concat(aFrom(arguments))); + }, fn.length - args.length); +}; diff --git a/node_modules/es5-ext/function/#/spread.js b/node_modules/es5-ext/function/#/spread.js new file mode 100644 index 00000000..755553b4 --- /dev/null +++ b/node_modules/es5-ext/function/#/spread.js @@ -0,0 +1,12 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + + , apply = Function.prototype.apply; + +module.exports = function () { + var fn = callable(this); + return function (args) { + return apply.call(fn, this, args); +}; +}; diff --git a/node_modules/es5-ext/function/#/to-string-tokens.js b/node_modules/es5-ext/function/#/to-string-tokens.js new file mode 100644 index 00000000..4ce026a5 --- /dev/null +++ b/node_modules/es5-ext/function/#/to-string-tokens.js @@ -0,0 +1,17 @@ +"use strict"; + +var validFunction = require("../valid-function"); + +var re1 = /^\s*function[\0-')-\uffff]*\(([\0-(*-\uffff]*)\)\s*\{([\0-\uffff]*)\}\s*$/ + , re2 = /^\s*\(?([\0-'*-\uffff]*)\)?\s*=>\s*(\{?[\0-\uffff]*\}?)\s*$/; + +module.exports = function () { + var str = String(validFunction(this)), data = str.match(re1); + if (!data) { + data = str.match(re2); + if (!data) throw new Error("Unrecognized string format"); + data[1] = data[1].trim(); + if (data[2][0] === "{") data[2] = data[2].trim().slice(1, -1); + } + return { args: data[1], body: data[2] }; +}; diff --git a/node_modules/es5-ext/function/_define-length.js b/node_modules/es5-ext/function/_define-length.js new file mode 100644 index 00000000..13749d3b --- /dev/null +++ b/node_modules/es5-ext/function/_define-length.js @@ -0,0 +1,56 @@ +"use strict"; + +var toPosInt = require("../number/to-pos-integer"); + +var test = function (arg1, arg2) { + return arg2; +}; + +var desc, defineProperty, generate, mixin; + +try { + Object.defineProperty(test, "length", { + configurable: true, + writable: false, + enumerable: false, + value: 1 + }); +} catch (ignore) {} + +if (test.length === 1) { + // ES6 + desc = { configurable: true, writable: false, enumerable: false }; + defineProperty = Object.defineProperty; + module.exports = function (fn, length) { + length = toPosInt(length); + if (fn.length === length) return fn; + desc.value = length; + return defineProperty(fn, "length", desc); + }; +} else { + mixin = require("../object/mixin"); + generate = (function () { + var cache = []; + return function (length) { + var args, i = 0; + if (cache[length]) return cache[length]; + args = []; + while (length--) args.push("a" + (++i).toString(36)); + // eslint-disable-next-line no-new-func + return new Function( + "fn", + "return function (" + args.join(", ") + ") { return fn.apply(this, arguments); };" + ); + }; + }()); + module.exports = function (src, length) { + var target; + length = toPosInt(length); + if (src.length === length) return src; + target = generate(length)(src); + try { + mixin(target, src); + } catch (ignore) {} + return target; + }; +} diff --git a/node_modules/es5-ext/function/constant.js b/node_modules/es5-ext/function/constant.js new file mode 100644 index 00000000..c41435d5 --- /dev/null +++ b/node_modules/es5-ext/function/constant.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (value) { + return function () { + return value; + }; +}; diff --git a/node_modules/es5-ext/function/identity.js b/node_modules/es5-ext/function/identity.js new file mode 100644 index 00000000..01a5aadf --- /dev/null +++ b/node_modules/es5-ext/function/identity.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (value) { + return value; +}; diff --git a/node_modules/es5-ext/function/index.js b/node_modules/es5-ext/function/index.js new file mode 100644 index 00000000..1574fbbb --- /dev/null +++ b/node_modules/es5-ext/function/index.js @@ -0,0 +1,15 @@ +// Export all modules. + +"use strict"; + +module.exports = { + "#": require("./#"), + "constant": require("./constant"), + "identity": require("./identity"), + "invoke": require("./invoke"), + "isArguments": require("./is-arguments"), + "isFunction": require("./is-function"), + "noop": require("./noop"), + "pluck": require("./pluck"), + "validFunction": require("./valid-function") +}; diff --git a/node_modules/es5-ext/function/invoke.js b/node_modules/es5-ext/function/invoke.js new file mode 100644 index 00000000..c3d23f2d --- /dev/null +++ b/node_modules/es5-ext/function/invoke.js @@ -0,0 +1,15 @@ +"use strict"; + +var isCallable = require("../object/is-callable") + , value = require("../object/valid-value") + + , slice = Array.prototype.slice, apply = Function.prototype.apply; + +module.exports = function (name/*, …args*/) { + var args = slice.call(arguments, 1), isFn = isCallable(name); + return function (obj) { + value(obj); + return apply.call(isFn ? name : obj[name], obj, + args.concat(slice.call(arguments, 1))); + }; +}; diff --git a/node_modules/es5-ext/function/is-arguments.js b/node_modules/es5-ext/function/is-arguments.js new file mode 100644 index 00000000..f4bf4060 --- /dev/null +++ b/node_modules/es5-ext/function/is-arguments.js @@ -0,0 +1,12 @@ +"use strict"; + +var objToString = Object.prototype.toString + , id = objToString.call( + (function () { + return arguments; + })() +); + +module.exports = function (value) { + return objToString.call(value) === id; +}; diff --git a/node_modules/es5-ext/function/is-function.js b/node_modules/es5-ext/function/is-function.js new file mode 100644 index 00000000..d3d92f4e --- /dev/null +++ b/node_modules/es5-ext/function/is-function.js @@ -0,0 +1,7 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(require("./noop")); + +module.exports = function (value) { + return typeof value === "function" && objToString.call(value) === id; +}; diff --git a/node_modules/es5-ext/function/noop.js b/node_modules/es5-ext/function/noop.js new file mode 100644 index 00000000..6174f033 --- /dev/null +++ b/node_modules/es5-ext/function/noop.js @@ -0,0 +1,4 @@ +"use strict"; + +// eslint-disable-next-line no-empty-function +module.exports = function () {}; diff --git a/node_modules/es5-ext/function/pluck.js b/node_modules/es5-ext/function/pluck.js new file mode 100644 index 00000000..8507128a --- /dev/null +++ b/node_modules/es5-ext/function/pluck.js @@ -0,0 +1,9 @@ +"use strict"; + +var value = require("../object/valid-value"); + +module.exports = function (name) { + return function (obj) { + return value(obj)[name]; + }; +}; diff --git a/node_modules/es5-ext/function/valid-function.js b/node_modules/es5-ext/function/valid-function.js new file mode 100644 index 00000000..060bd645 --- /dev/null +++ b/node_modules/es5-ext/function/valid-function.js @@ -0,0 +1,8 @@ +"use strict"; + +var isFunction = require("./is-function"); + +module.exports = function (value) { + if (!isFunction(value)) throw new TypeError(value + " is not a function"); + return value; +}; diff --git a/node_modules/es5-ext/global.js b/node_modules/es5-ext/global.js new file mode 100644 index 00000000..27d05047 --- /dev/null +++ b/node_modules/es5-ext/global.js @@ -0,0 +1,15 @@ +module.exports = (function () { + if (this) return this; + + // Unexpected strict mode (may happen if e.g. bundled into ESM module) be nice + + // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis + // In all ES5 engines global object inherits from Object.prototype + // (if you approached one that doesn't please report) + Object.defineProperty(Object.prototype, "__global__", { + get: function () { return this; }, + configurable: true + }); + try { return __global__; } + finally { delete Object.prototype.__global__; } +})(); diff --git a/node_modules/es5-ext/index.js b/node_modules/es5-ext/index.js new file mode 100644 index 00000000..0919764e --- /dev/null +++ b/node_modules/es5-ext/index.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = { + global: require("./global"), + optionalChaining: require("./optional-chaining"), + safeToString: require("./safe-to-string"), + toShortStringRepresentation: require("./to-short-string-representation"), + + array: require("./array"), + boolean: require("./boolean"), + date: require("./date"), + error: require("./error"), + function: require("./function"), + iterable: require("./iterable"), + json: require("./json"), + math: require("./math"), + number: require("./number"), + object: require("./object"), + promise: require("./promise"), + regExp: require("./reg-exp"), + string: require("./string") +}; diff --git a/node_modules/es5-ext/iterable/for-each.js b/node_modules/es5-ext/iterable/for-each.js new file mode 100644 index 00000000..2840e952 --- /dev/null +++ b/node_modules/es5-ext/iterable/for-each.js @@ -0,0 +1,12 @@ +"use strict"; + +var forOf = require("es6-iterator/for-of") + , isIterable = require("es6-iterator/is-iterable") + , iterable = require("./validate") + + , forEach = Array.prototype.forEach; + +module.exports = function (target, cb/*, thisArg*/) { + if (isIterable(iterable(target))) forOf(target, cb, arguments[2]); + else forEach.call(target, cb, arguments[2]); +}; diff --git a/node_modules/es5-ext/iterable/index.js b/node_modules/es5-ext/iterable/index.js new file mode 100644 index 00000000..4b898fc8 --- /dev/null +++ b/node_modules/es5-ext/iterable/index.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = { + forEach: require("./for-each"), + is: require("./is"), + validate: require("./validate"), + validateObject: require("./validate-object") +}; diff --git a/node_modules/es5-ext/iterable/is.js b/node_modules/es5-ext/iterable/is.js new file mode 100644 index 00000000..aa5a9b9e --- /dev/null +++ b/node_modules/es5-ext/iterable/is.js @@ -0,0 +1,11 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , isValue = require("../object/is-value") + , isArrayLike = require("../object/is-array-like"); + +module.exports = function (value) { + if (!isValue(value)) return false; + if (typeof value[iteratorSymbol] === "function") return true; + return isArrayLike(value); +}; diff --git a/node_modules/es5-ext/iterable/validate-object.js b/node_modules/es5-ext/iterable/validate-object.js new file mode 100644 index 00000000..26e622b5 --- /dev/null +++ b/node_modules/es5-ext/iterable/validate-object.js @@ -0,0 +1,9 @@ +"use strict"; + +var isObject = require("../object/is-object") + , is = require("./is"); + +module.exports = function (value) { + if (is(value) && isObject(value)) return value; + throw new TypeError(value + " is not an iterable or array-like object"); +}; diff --git a/node_modules/es5-ext/iterable/validate.js b/node_modules/es5-ext/iterable/validate.js new file mode 100644 index 00000000..94a91c47 --- /dev/null +++ b/node_modules/es5-ext/iterable/validate.js @@ -0,0 +1,8 @@ +"use strict"; + +var is = require("./is"); + +module.exports = function (value) { + if (is(value)) return value; + throw new TypeError(value + " is not an iterable or array-like"); +}; diff --git a/node_modules/es5-ext/json/index.js b/node_modules/es5-ext/json/index.js new file mode 100644 index 00000000..14b25cd6 --- /dev/null +++ b/node_modules/es5-ext/json/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = { + safeStringify: require("./safe-stringify") +}; diff --git a/node_modules/es5-ext/json/safe-stringify.js b/node_modules/es5-ext/json/safe-stringify.js new file mode 100644 index 00000000..2154f6c0 --- /dev/null +++ b/node_modules/es5-ext/json/safe-stringify.js @@ -0,0 +1,41 @@ +"use strict"; + +var compact = require("../array/#/compact") + , isObject = require("../object/is-object") + , toArray = require("../object/to-array") + , isArray = Array.isArray + , stringify = JSON.stringify; + +module.exports = function self(value /*, replacer, space*/) { + var replacer = arguments[1], space = arguments[2]; + try { + return stringify(value, replacer, space); + } catch (e) { + if (!isObject(value)) return null; + if (typeof value.toJSON === "function") return null; + if (isArray(value)) { + return ( + "[" + + compact.call( + value.map(function (item) { + return self(item, replacer, space); + }) + ) + + "]" + ); + } + return ( + "{" + + compact + .call( + toArray(value, function (item, key) { + item = self(item, replacer, space); + if (!item) return null; + return stringify(key) + ":" + item; + }) + ) + .join(",") + + "}" + ); + } +}; diff --git a/node_modules/es5-ext/math/_decimal-adjust.js b/node_modules/es5-ext/math/_decimal-adjust.js new file mode 100644 index 00000000..fd0b0025 --- /dev/null +++ b/node_modules/es5-ext/math/_decimal-adjust.js @@ -0,0 +1,29 @@ +// Credit: +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round +// #Decimal_rounding + +"use strict"; + +var isValue = require("../object/is-value") + , ensureInteger = require("../object/ensure-integer"); + +var split = String.prototype.split; + +module.exports = function (type) { + return function (value/*, exp*/) { + value = Number(value); + var exp = arguments[1]; + if (isValue(exp)) exp = ensureInteger(exp); + if (!value) return value; + if (!exp) return Math[type](value); + if (!isFinite(value)) return value; + + // Shift + var tokens = split.call(value, "e"); + value = Math[type](tokens[0] + "e" + ((tokens[1] || 0) - exp)); + + // Shift back + tokens = value.toString().split("e"); + return Number(tokens[0] + "e" + (Number(tokens[1] || 0) + exp)); + }; +}; diff --git a/node_modules/es5-ext/math/_pack-ieee754.js b/node_modules/es5-ext/math/_pack-ieee754.js new file mode 100644 index 00000000..b3edf8d1 --- /dev/null +++ b/node_modules/es5-ext/math/_pack-ieee754.js @@ -0,0 +1,88 @@ +/* eslint no-bitwise: "off" */ +// Credit: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var abs = Math.abs + , floor = Math.floor + , log = Math.log + , min = Math.min + , pow = Math.pow + , LN2 = Math.LN2 + , roundToEven; + +roundToEven = function (num) { + var whole = floor(num), fraction = num - whole; + if (fraction < 0.5) return whole; + if (fraction > 0.5) return whole + 1; + return whole % 2 ? whole + 1 : whole; +}; + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function (value, ebits, fbits) { + var bias = (1 << (ebits - 1)) - 1, sign, e, fraction, i, bits, str, bytes; + + // Compute sign, exponent, fraction + if (isNaN(value)) { + // NaN + // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping + e = (1 << ebits) - 1; + fraction = pow(2, fbits - 1); + sign = 0; + } else if (value === Infinity || value === -Infinity) { + e = (1 << ebits) - 1; + fraction = 0; + sign = value < 0 ? 1 : 0; + } else if (value === 0) { + e = 0; + fraction = 0; + sign = 1 / value === -Infinity ? 1 : 0; + } else { + sign = value < 0; + value = abs(value); + + if (value >= pow(2, 1 - bias)) { + e = min(floor(log(value) / LN2), 1023); + fraction = roundToEven((value / pow(2, e)) * pow(2, fbits)); + if (fraction / pow(2, fbits) >= 2) { + e += 1; + fraction = 1; + } + if (e > bias) { + // Overflow + e = (1 << ebits) - 1; + fraction = 0; + } else { + // Normal + e += bias; + fraction -= pow(2, fbits); + } + } else { + // Subnormal + e = 0; + fraction = roundToEven(value / pow(2, 1 - bias - fbits)); + } + } + + // Pack sign, exponent, fraction + bits = []; + for (i = fbits; i; i -= 1) { + bits.push(fraction % 2 ? 1 : 0); + fraction = floor(fraction / 2); + } + for (i = ebits; i; i -= 1) { + bits.push(e % 2 ? 1 : 0); + e = floor(e / 2); + } + bits.push(sign ? 1 : 0); + bits.reverse(); + str = bits.join(""); + + // Bits to bytes + bytes = []; + while (str.length) { + bytes.push(parseInt(str.substring(0, 8), 2)); + str = str.substring(8); + } + return bytes; +}; diff --git a/node_modules/es5-ext/math/_unpack-ieee754.js b/node_modules/es5-ext/math/_unpack-ieee754.js new file mode 100644 index 00000000..83fa9475 --- /dev/null +++ b/node_modules/es5-ext/math/_unpack-ieee754.js @@ -0,0 +1,33 @@ +/* eslint no-bitwise: "off" */ +// Credit: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var pow = Math.pow; + +module.exports = function (bytes, ebits, fbits) { + // Bytes to bits + var bits = [], i, j, bit, str, bias, sign, e, fraction; + + for (i = bytes.length; i; i -= 1) { + bit = bytes[i - 1]; + for (j = 8; j; j -= 1) { + bits.push(bit % 2 ? 1 : 0); + bit >>= 1; + } + } + bits.reverse(); + str = bits.join(""); + + // Unpack sign, exponent, fraction + bias = (1 << (ebits - 1)) - 1; + sign = parseInt(str.substring(0, 1), 2) ? -1 : 1; + e = parseInt(str.substring(1, 1 + ebits), 2); + fraction = parseInt(str.substring(1 + ebits), 2); + + // Produce number + if (e === (1 << ebits) - 1) return fraction === 0 ? sign * Infinity : NaN; + if (e > 0) return sign * pow(2, e - bias) * (1 + fraction / pow(2, fbits)); + if (fraction !== 0) return sign * pow(2, -(bias - 1)) * (fraction / pow(2, fbits)); + return sign < 0 ? -0 : 0; +}; diff --git a/node_modules/es5-ext/math/acosh/implement.js b/node_modules/es5-ext/math/acosh/implement.js new file mode 100644 index 00000000..ea75c7d1 --- /dev/null +++ b/node_modules/es5-ext/math/acosh/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "acosh", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/acosh/index.js b/node_modules/es5-ext/math/acosh/index.js new file mode 100644 index 00000000..160f6b99 --- /dev/null +++ b/node_modules/es5-ext/math/acosh/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.acosh + : require("./shim"); diff --git a/node_modules/es5-ext/math/acosh/is-implemented.js b/node_modules/es5-ext/math/acosh/is-implemented.js new file mode 100644 index 00000000..2e973013 --- /dev/null +++ b/node_modules/es5-ext/math/acosh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var acosh = Math.acosh; + if (typeof acosh !== "function") return false; + return acosh(2) === 1.3169578969248166; +}; diff --git a/node_modules/es5-ext/math/acosh/shim.js b/node_modules/es5-ext/math/acosh/shim.js new file mode 100644 index 00000000..3e632ffb --- /dev/null +++ b/node_modules/es5-ext/math/acosh/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +var log = Math.log, sqrt = Math.sqrt; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < 1) return NaN; + if (value === 1) return 0; + if (value === Infinity) return value; + return log(value + sqrt(value * value - 1)); +}; diff --git a/node_modules/es5-ext/math/asinh/implement.js b/node_modules/es5-ext/math/asinh/implement.js new file mode 100644 index 00000000..efa6704e --- /dev/null +++ b/node_modules/es5-ext/math/asinh/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "asinh", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/asinh/index.js b/node_modules/es5-ext/math/asinh/index.js new file mode 100644 index 00000000..b5fb120f --- /dev/null +++ b/node_modules/es5-ext/math/asinh/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.asinh + : require("./shim"); diff --git a/node_modules/es5-ext/math/asinh/is-implemented.js b/node_modules/es5-ext/math/asinh/is-implemented.js new file mode 100644 index 00000000..a7e0f20f --- /dev/null +++ b/node_modules/es5-ext/math/asinh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var asinh = Math.asinh; + if (typeof asinh !== "function") return false; + return asinh(2) === 1.4436354751788103; +}; diff --git a/node_modules/es5-ext/math/asinh/shim.js b/node_modules/es5-ext/math/asinh/shim.js new file mode 100644 index 00000000..30ce2e4d --- /dev/null +++ b/node_modules/es5-ext/math/asinh/shim.js @@ -0,0 +1,15 @@ +"use strict"; + +var log = Math.log, sqrt = Math.sqrt; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + if (value < 0) { + value = -value; + return -log(value + sqrt(value * value + 1)); + } + return log(value + sqrt(value * value + 1)); +}; diff --git a/node_modules/es5-ext/math/atanh/implement.js b/node_modules/es5-ext/math/atanh/implement.js new file mode 100644 index 00000000..47d5cc22 --- /dev/null +++ b/node_modules/es5-ext/math/atanh/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "atanh", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/atanh/index.js b/node_modules/es5-ext/math/atanh/index.js new file mode 100644 index 00000000..51fbcd66 --- /dev/null +++ b/node_modules/es5-ext/math/atanh/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.atanh + : require("./shim"); diff --git a/node_modules/es5-ext/math/atanh/is-implemented.js b/node_modules/es5-ext/math/atanh/is-implemented.js new file mode 100644 index 00000000..4787c4fa --- /dev/null +++ b/node_modules/es5-ext/math/atanh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var atanh = Math.atanh; + if (typeof atanh !== "function") return false; + return Math.round(atanh(0.5) * 1e15) === 549306144334055; +}; diff --git a/node_modules/es5-ext/math/atanh/shim.js b/node_modules/es5-ext/math/atanh/shim.js new file mode 100644 index 00000000..9383e971 --- /dev/null +++ b/node_modules/es5-ext/math/atanh/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var log = Math.log; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < -1) return NaN; + if (value > 1) return NaN; + if (value === -1) return -Infinity; + if (value === 1) return Infinity; + if (value === 0) return value; + return 0.5 * log((1 + value) / (1 - value)); +}; diff --git a/node_modules/es5-ext/math/cbrt/implement.js b/node_modules/es5-ext/math/cbrt/implement.js new file mode 100644 index 00000000..f5adbab0 --- /dev/null +++ b/node_modules/es5-ext/math/cbrt/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "cbrt", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/cbrt/index.js b/node_modules/es5-ext/math/cbrt/index.js new file mode 100644 index 00000000..47806407 --- /dev/null +++ b/node_modules/es5-ext/math/cbrt/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.cbrt + : require("./shim"); diff --git a/node_modules/es5-ext/math/cbrt/is-implemented.js b/node_modules/es5-ext/math/cbrt/is-implemented.js new file mode 100644 index 00000000..a8ac0db2 --- /dev/null +++ b/node_modules/es5-ext/math/cbrt/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var cbrt = Math.cbrt; + if (typeof cbrt !== "function") return false; + return cbrt(2) === 1.2599210498948732; +}; diff --git a/node_modules/es5-ext/math/cbrt/shim.js b/node_modules/es5-ext/math/cbrt/shim.js new file mode 100644 index 00000000..8871c552 --- /dev/null +++ b/node_modules/es5-ext/math/cbrt/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +var pow = Math.pow; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + if (value < 0) return -pow(-value, 1 / 3); + return pow(value, 1 / 3); +}; diff --git a/node_modules/es5-ext/math/ceil-10.js b/node_modules/es5-ext/math/ceil-10.js new file mode 100644 index 00000000..351221f6 --- /dev/null +++ b/node_modules/es5-ext/math/ceil-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_decimal-adjust")("ceil"); diff --git a/node_modules/es5-ext/math/clz32/implement.js b/node_modules/es5-ext/math/clz32/implement.js new file mode 100644 index 00000000..10b4a41d --- /dev/null +++ b/node_modules/es5-ext/math/clz32/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "clz32", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/clz32/index.js b/node_modules/es5-ext/math/clz32/index.js new file mode 100644 index 00000000..a16ee33a --- /dev/null +++ b/node_modules/es5-ext/math/clz32/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.clz32 + : require("./shim"); diff --git a/node_modules/es5-ext/math/clz32/is-implemented.js b/node_modules/es5-ext/math/clz32/is-implemented.js new file mode 100644 index 00000000..ee6d8828 --- /dev/null +++ b/node_modules/es5-ext/math/clz32/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var clz32 = Math.clz32; + if (typeof clz32 !== "function") return false; + return clz32(1000) === 22; +}; diff --git a/node_modules/es5-ext/math/clz32/shim.js b/node_modules/es5-ext/math/clz32/shim.js new file mode 100644 index 00000000..2b526c2c --- /dev/null +++ b/node_modules/es5-ext/math/clz32/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (value) { + // eslint-disable-next-line no-bitwise + value >>>= 0; + return value ? 32 - value.toString(2).length : 32; +}; diff --git a/node_modules/es5-ext/math/cosh/implement.js b/node_modules/es5-ext/math/cosh/implement.js new file mode 100644 index 00000000..6f42b387 --- /dev/null +++ b/node_modules/es5-ext/math/cosh/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "cosh", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/cosh/index.js b/node_modules/es5-ext/math/cosh/index.js new file mode 100644 index 00000000..5ed349af --- /dev/null +++ b/node_modules/es5-ext/math/cosh/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.cosh + : require("./shim"); diff --git a/node_modules/es5-ext/math/cosh/is-implemented.js b/node_modules/es5-ext/math/cosh/is-implemented.js new file mode 100644 index 00000000..7173054c --- /dev/null +++ b/node_modules/es5-ext/math/cosh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var cosh = Math.cosh; + if (typeof cosh !== "function") return false; + return cosh(1) === 1.5430806348152437; +}; diff --git a/node_modules/es5-ext/math/cosh/shim.js b/node_modules/es5-ext/math/cosh/shim.js new file mode 100644 index 00000000..c762c84d --- /dev/null +++ b/node_modules/es5-ext/math/cosh/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +var exp = Math.exp; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return 1; + if (!isFinite(value)) return Infinity; + return (exp(value) + exp(-value)) / 2; +}; diff --git a/node_modules/es5-ext/math/expm1/implement.js b/node_modules/es5-ext/math/expm1/implement.js new file mode 100644 index 00000000..8c9d8111 --- /dev/null +++ b/node_modules/es5-ext/math/expm1/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "expm1", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/expm1/index.js b/node_modules/es5-ext/math/expm1/index.js new file mode 100644 index 00000000..5b5dff6b --- /dev/null +++ b/node_modules/es5-ext/math/expm1/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.expm1 + : require("./shim"); diff --git a/node_modules/es5-ext/math/expm1/is-implemented.js b/node_modules/es5-ext/math/expm1/is-implemented.js new file mode 100644 index 00000000..dfd056e0 --- /dev/null +++ b/node_modules/es5-ext/math/expm1/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var expm1 = Math.expm1; + if (typeof expm1 !== "function") return false; + return expm1(1).toFixed(15) === "1.718281828459045"; +}; diff --git a/node_modules/es5-ext/math/expm1/shim.js b/node_modules/es5-ext/math/expm1/shim.js new file mode 100644 index 00000000..ce737b3b --- /dev/null +++ b/node_modules/es5-ext/math/expm1/shim.js @@ -0,0 +1,16 @@ +// Thanks: https://github.com/monolithed/ECMAScript-6 + +"use strict"; + +var exp = Math.exp; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (value === Infinity) return Infinity; + if (value === -Infinity) return -1; + + if (value > -1.0e-6 && value < 1.0e-6) return value + value * value / 2; + return exp(value) - 1; +}; diff --git a/node_modules/es5-ext/math/floor-10.js b/node_modules/es5-ext/math/floor-10.js new file mode 100644 index 00000000..3cb0c119 --- /dev/null +++ b/node_modules/es5-ext/math/floor-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_decimal-adjust")("floor"); diff --git a/node_modules/es5-ext/math/fround/implement.js b/node_modules/es5-ext/math/fround/implement.js new file mode 100644 index 00000000..b54d2fca --- /dev/null +++ b/node_modules/es5-ext/math/fround/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "fround", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/fround/index.js b/node_modules/es5-ext/math/fround/index.js new file mode 100644 index 00000000..db409e83 --- /dev/null +++ b/node_modules/es5-ext/math/fround/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.fround + : require("./shim"); diff --git a/node_modules/es5-ext/math/fround/is-implemented.js b/node_modules/es5-ext/math/fround/is-implemented.js new file mode 100644 index 00000000..ad2b705d --- /dev/null +++ b/node_modules/es5-ext/math/fround/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var fround = Math.fround; + if (typeof fround !== "function") return false; + return fround(1.337) === 1.3370000123977661; +}; diff --git a/node_modules/es5-ext/math/fround/shim.js b/node_modules/es5-ext/math/fround/shim.js new file mode 100644 index 00000000..bfbc54c6 --- /dev/null +++ b/node_modules/es5-ext/math/fround/shim.js @@ -0,0 +1,35 @@ +/* global Float32Array */ + +// Credit: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js + +"use strict"; + +var toFloat32; + +if (typeof Float32Array === "undefined") { + toFloat32 = (function () { + var pack = require("../_pack-ieee754") + , unpack = require("../_unpack-ieee754"); + + return function (value) { + return unpack(pack(value, 8, 23), 8, 23); + }; + }()); +} else { + toFloat32 = (function () { + var float32Array = new Float32Array(1); + return function (num) { + float32Array[0] = num; + return float32Array[0]; + }; + }()); +} + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + + return toFloat32(value); +}; diff --git a/node_modules/es5-ext/math/hypot/implement.js b/node_modules/es5-ext/math/hypot/implement.js new file mode 100644 index 00000000..e2b3928b --- /dev/null +++ b/node_modules/es5-ext/math/hypot/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "hypot", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/hypot/index.js b/node_modules/es5-ext/math/hypot/index.js new file mode 100644 index 00000000..a030a419 --- /dev/null +++ b/node_modules/es5-ext/math/hypot/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.hypot + : require("./shim"); diff --git a/node_modules/es5-ext/math/hypot/is-implemented.js b/node_modules/es5-ext/math/hypot/is-implemented.js new file mode 100644 index 00000000..d317bc7e --- /dev/null +++ b/node_modules/es5-ext/math/hypot/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var hypot = Math.hypot; + if (typeof hypot !== "function") return false; + return hypot(3, 4) === 5; +}; diff --git a/node_modules/es5-ext/math/hypot/shim.js b/node_modules/es5-ext/math/hypot/shim.js new file mode 100644 index 00000000..2a92b171 --- /dev/null +++ b/node_modules/es5-ext/math/hypot/shim.js @@ -0,0 +1,43 @@ +// Thanks for hints: https://github.com/paulmillr/es6-shim + +"use strict"; + +var some = Array.prototype.some + , abs = Math.abs + , sqrt = Math.sqrt + , compare = function (val1, val2) { + return val2 - val1; +} + , divide = function (value) { + return value / this; +} + , add = function (sum, number) { + return sum + number * number; +}; + +// eslint-disable-next-line no-unused-vars +module.exports = function (val1, val2 /*, …valn*/) { + var result, numbers; + if (!arguments.length) return 0; + some.call(arguments, function (val) { + if (isNaN(val)) { + result = NaN; + return false; + } + if (!isFinite(val)) { + result = Infinity; + return true; + } + if (result !== undefined) return false; + val = Number(val); + if (val === 0) return false; + if (numbers) numbers.push(abs(val)); + else numbers = [abs(val)]; + return false; + }); + if (result !== undefined) return result; + if (!numbers) return 0; + + numbers.sort(compare); + return numbers[0] * sqrt(numbers.map(divide, numbers[0]).reduce(add, 0)); +}; diff --git a/node_modules/es5-ext/math/imul/implement.js b/node_modules/es5-ext/math/imul/implement.js new file mode 100644 index 00000000..bff57735 --- /dev/null +++ b/node_modules/es5-ext/math/imul/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "imul", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/imul/index.js b/node_modules/es5-ext/math/imul/index.js new file mode 100644 index 00000000..a756d594 --- /dev/null +++ b/node_modules/es5-ext/math/imul/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.imul + : require("./shim"); diff --git a/node_modules/es5-ext/math/imul/is-implemented.js b/node_modules/es5-ext/math/imul/is-implemented.js new file mode 100644 index 00000000..0f329198 --- /dev/null +++ b/node_modules/es5-ext/math/imul/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var imul = Math.imul; + if (typeof imul !== "function") return false; + return imul(-1, 8) === -8; +}; diff --git a/node_modules/es5-ext/math/imul/shim.js b/node_modules/es5-ext/math/imul/shim.js new file mode 100644 index 00000000..a14e5895 --- /dev/null +++ b/node_modules/es5-ext/math/imul/shim.js @@ -0,0 +1,17 @@ +/* eslint no-bitwise: "off" */ + +// Thanks: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference +// /Global_Objects/Math/imul + +"use strict"; + +module.exports = function (val1, val2) { + var xh = (val1 >>> 16) & 0xffff + , xl = val1 & 0xffff + , yh = (val2 >>> 16) & 0xffff + , yl = val2 & 0xffff; + + // The shift by 0 fixes the sign on the high part + // the final |0 converts the unsigned value into a signed value + return (xl * yl + ((xh * yl + xl * yh) << 16 >>> 0)) | 0; +}; diff --git a/node_modules/es5-ext/math/index.js b/node_modules/es5-ext/math/index.js new file mode 100644 index 00000000..a59269cc --- /dev/null +++ b/node_modules/es5-ext/math/index.js @@ -0,0 +1,24 @@ +"use strict"; + +module.exports = { + acosh: require("./acosh"), + asinh: require("./asinh"), + atanh: require("./atanh"), + cbrt: require("./cbrt"), + ceil10: require("./ceil-10"), + clz32: require("./clz32"), + cosh: require("./cosh"), + expm1: require("./expm1"), + floor10: require("./floor-10"), + fround: require("./fround"), + hypot: require("./hypot"), + imul: require("./imul"), + log10: require("./log10"), + log2: require("./log2"), + log1p: require("./log1p"), + round10: require("./round-10"), + sign: require("./sign"), + sinh: require("./sinh"), + tanh: require("./tanh"), + trunc: require("./trunc") +}; diff --git a/node_modules/es5-ext/math/log10/implement.js b/node_modules/es5-ext/math/log10/implement.js new file mode 100644 index 00000000..669cee88 --- /dev/null +++ b/node_modules/es5-ext/math/log10/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "log10", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/log10/index.js b/node_modules/es5-ext/math/log10/index.js new file mode 100644 index 00000000..bc2ec481 --- /dev/null +++ b/node_modules/es5-ext/math/log10/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.log10 + : require("./shim"); diff --git a/node_modules/es5-ext/math/log10/is-implemented.js b/node_modules/es5-ext/math/log10/is-implemented.js new file mode 100644 index 00000000..f2217597 --- /dev/null +++ b/node_modules/es5-ext/math/log10/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var log10 = Math.log10; + if (typeof log10 !== "function") return false; + return log10(2) === 0.3010299956639812; +}; diff --git a/node_modules/es5-ext/math/log10/shim.js b/node_modules/es5-ext/math/log10/shim.js new file mode 100644 index 00000000..e8599a26 --- /dev/null +++ b/node_modules/es5-ext/math/log10/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var log = Math.log, LOG10E = Math.LOG10E; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < 0) return NaN; + if (value === 0) return -Infinity; + if (value === 1) return 0; + if (value === Infinity) return Infinity; + + return log(value) * LOG10E; +}; diff --git a/node_modules/es5-ext/math/log1p/implement.js b/node_modules/es5-ext/math/log1p/implement.js new file mode 100644 index 00000000..36fcee61 --- /dev/null +++ b/node_modules/es5-ext/math/log1p/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "log1p", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/log1p/index.js b/node_modules/es5-ext/math/log1p/index.js new file mode 100644 index 00000000..41c67364 --- /dev/null +++ b/node_modules/es5-ext/math/log1p/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.log1p + : require("./shim"); diff --git a/node_modules/es5-ext/math/log1p/is-implemented.js b/node_modules/es5-ext/math/log1p/is-implemented.js new file mode 100644 index 00000000..7626ab47 --- /dev/null +++ b/node_modules/es5-ext/math/log1p/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var log1p = Math.log1p; + if (typeof log1p !== "function") return false; + return log1p(1) === 0.6931471805599453; +}; diff --git a/node_modules/es5-ext/math/log1p/shim.js b/node_modules/es5-ext/math/log1p/shim.js new file mode 100644 index 00000000..7c6f2273 --- /dev/null +++ b/node_modules/es5-ext/math/log1p/shim.js @@ -0,0 +1,17 @@ +// Thanks: https://github.com/monolithed/ECMAScript-6/blob/master/ES6.js + +"use strict"; + +var log = Math.log; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < -1) return NaN; + if (value === -1) return -Infinity; + if (value === 0) return value; + if (value === Infinity) return Infinity; + + if (value > -1.0e-8 && value < 1.0e-8) return value - value * value / 2; + return log(1 + value); +}; diff --git a/node_modules/es5-ext/math/log2/implement.js b/node_modules/es5-ext/math/log2/implement.js new file mode 100644 index 00000000..f1c04e09 --- /dev/null +++ b/node_modules/es5-ext/math/log2/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "log2", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/log2/index.js b/node_modules/es5-ext/math/log2/index.js new file mode 100644 index 00000000..d319caec --- /dev/null +++ b/node_modules/es5-ext/math/log2/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.log2 + : require("./shim"); diff --git a/node_modules/es5-ext/math/log2/is-implemented.js b/node_modules/es5-ext/math/log2/is-implemented.js new file mode 100644 index 00000000..c70963f6 --- /dev/null +++ b/node_modules/es5-ext/math/log2/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var log2 = Math.log2; + if (typeof log2 !== "function") return false; + return log2(3).toFixed(15) === "1.584962500721156"; +}; diff --git a/node_modules/es5-ext/math/log2/shim.js b/node_modules/es5-ext/math/log2/shim.js new file mode 100644 index 00000000..51fcdae9 --- /dev/null +++ b/node_modules/es5-ext/math/log2/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var log = Math.log, LOG2E = Math.LOG2E; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < 0) return NaN; + if (value === 0) return -Infinity; + if (value === 1) return 0; + if (value === Infinity) return Infinity; + + return log(value) * LOG2E; +}; diff --git a/node_modules/es5-ext/math/round-10.js b/node_modules/es5-ext/math/round-10.js new file mode 100644 index 00000000..228c2351 --- /dev/null +++ b/node_modules/es5-ext/math/round-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_decimal-adjust")("round"); diff --git a/node_modules/es5-ext/math/sign/implement.js b/node_modules/es5-ext/math/sign/implement.js new file mode 100644 index 00000000..bc7da14d --- /dev/null +++ b/node_modules/es5-ext/math/sign/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "sign", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/sign/index.js b/node_modules/es5-ext/math/sign/index.js new file mode 100644 index 00000000..9f286564 --- /dev/null +++ b/node_modules/es5-ext/math/sign/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.sign + : require("./shim"); diff --git a/node_modules/es5-ext/math/sign/is-implemented.js b/node_modules/es5-ext/math/sign/is-implemented.js new file mode 100644 index 00000000..23ff83a6 --- /dev/null +++ b/node_modules/es5-ext/math/sign/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var sign = Math.sign; + if (typeof sign !== "function") return false; + return (sign(10) === 1) && (sign(-20) === -1); +}; diff --git a/node_modules/es5-ext/math/sign/shim.js b/node_modules/es5-ext/math/sign/shim.js new file mode 100644 index 00000000..760c69d1 --- /dev/null +++ b/node_modules/es5-ext/math/sign/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (value) { + value = Number(value); + if (isNaN(value) || (value === 0)) return value; + return value > 0 ? 1 : -1; +}; diff --git a/node_modules/es5-ext/math/sinh/implement.js b/node_modules/es5-ext/math/sinh/implement.js new file mode 100644 index 00000000..cc4c40bc --- /dev/null +++ b/node_modules/es5-ext/math/sinh/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "sinh", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/sinh/index.js b/node_modules/es5-ext/math/sinh/index.js new file mode 100644 index 00000000..2c43dce1 --- /dev/null +++ b/node_modules/es5-ext/math/sinh/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.sinh + : require("./shim"); diff --git a/node_modules/es5-ext/math/sinh/is-implemented.js b/node_modules/es5-ext/math/sinh/is-implemented.js new file mode 100644 index 00000000..5e4ee40c --- /dev/null +++ b/node_modules/es5-ext/math/sinh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var sinh = Math.sinh; + if (typeof sinh !== "function") return false; + return (sinh(1) === 1.1752011936438014) && (sinh(Number.MIN_VALUE) === 5e-324); +}; diff --git a/node_modules/es5-ext/math/sinh/shim.js b/node_modules/es5-ext/math/sinh/shim.js new file mode 100644 index 00000000..fc6a0477 --- /dev/null +++ b/node_modules/es5-ext/math/sinh/shim.js @@ -0,0 +1,18 @@ +// Parts of implementation taken from es6-shim project +// See: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js + +"use strict"; + +var expm1 = require("../expm1") + , abs = Math.abs + , exp = Math.exp + , e = Math.E; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + if (abs(value) < 1) return (expm1(value) - expm1(-value)) / 2; + return (exp(value - 1) - exp(-value - 1)) * e / 2; +}; diff --git a/node_modules/es5-ext/math/tanh/implement.js b/node_modules/es5-ext/math/tanh/implement.js new file mode 100644 index 00000000..9e30d10d --- /dev/null +++ b/node_modules/es5-ext/math/tanh/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "tanh", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/tanh/index.js b/node_modules/es5-ext/math/tanh/index.js new file mode 100644 index 00000000..7c45d988 --- /dev/null +++ b/node_modules/es5-ext/math/tanh/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.tanh + : require("./shim"); diff --git a/node_modules/es5-ext/math/tanh/is-implemented.js b/node_modules/es5-ext/math/tanh/is-implemented.js new file mode 100644 index 00000000..b17a1bc4 --- /dev/null +++ b/node_modules/es5-ext/math/tanh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var tanh = Math.tanh; + if (typeof tanh !== "function") return false; + return (tanh(1) === 0.7615941559557649) && (tanh(Number.MAX_VALUE) === 1); +}; diff --git a/node_modules/es5-ext/math/tanh/shim.js b/node_modules/es5-ext/math/tanh/shim.js new file mode 100644 index 00000000..974dd7cd --- /dev/null +++ b/node_modules/es5-ext/math/tanh/shim.js @@ -0,0 +1,17 @@ +"use strict"; + +var exp = Math.exp; + +module.exports = function (value) { + var num1, num2; + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (value === Infinity) return 1; + if (value === -Infinity) return -1; + num1 = exp(value); + if (num1 === Infinity) return 1; + num2 = exp(-value); + if (num2 === Infinity) return -1; + return (num1 - num2) / (num1 + num2); +}; diff --git a/node_modules/es5-ext/math/trunc/implement.js b/node_modules/es5-ext/math/trunc/implement.js new file mode 100644 index 00000000..1ecc124c --- /dev/null +++ b/node_modules/es5-ext/math/trunc/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "trunc", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/math/trunc/index.js b/node_modules/es5-ext/math/trunc/index.js new file mode 100644 index 00000000..94c02691 --- /dev/null +++ b/node_modules/es5-ext/math/trunc/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Math.trunc + : require("./shim"); diff --git a/node_modules/es5-ext/math/trunc/is-implemented.js b/node_modules/es5-ext/math/trunc/is-implemented.js new file mode 100644 index 00000000..b1507352 --- /dev/null +++ b/node_modules/es5-ext/math/trunc/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var trunc = Math.trunc; + if (typeof trunc !== "function") return false; + return (trunc(13.67) === 13) && (trunc(-13.67) === -13); +}; diff --git a/node_modules/es5-ext/math/trunc/shim.js b/node_modules/es5-ext/math/trunc/shim.js new file mode 100644 index 00000000..bf6ac8cc --- /dev/null +++ b/node_modules/es5-ext/math/trunc/shim.js @@ -0,0 +1,13 @@ +"use strict"; + +var floor = Math.floor; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (value === Infinity) return Infinity; + if (value === -Infinity) return -Infinity; + if (value > 0) return floor(value); + return -floor(-value); +}; diff --git a/node_modules/es5-ext/number/#/index.js b/node_modules/es5-ext/number/#/index.js new file mode 100644 index 00000000..e6e21c30 --- /dev/null +++ b/node_modules/es5-ext/number/#/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = { + pad: require("./pad") +}; diff --git a/node_modules/es5-ext/number/#/pad.js b/node_modules/es5-ext/number/#/pad.js new file mode 100644 index 00000000..26fe4b63 --- /dev/null +++ b/node_modules/es5-ext/number/#/pad.js @@ -0,0 +1,15 @@ +"use strict"; + +var pad = require("../../string/#/pad") + , toPosInt = require("../to-pos-integer") + + , toFixed = Number.prototype.toFixed; + +module.exports = function (length/*, precision*/) { + var precision; + length = toPosInt(length); + precision = toPosInt(arguments[1]); + + return pad.call(precision ? toFixed.call(this, precision) : this, + "0", length + (precision ? 1 + precision : 0)); +}; diff --git a/node_modules/es5-ext/number/epsilon/implement.js b/node_modules/es5-ext/number/epsilon/implement.js new file mode 100644 index 00000000..fa19131a --- /dev/null +++ b/node_modules/es5-ext/number/epsilon/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "EPSILON", { value: require("./"), + configurable: false, +enumerable: false, +writable: false }); +} diff --git a/node_modules/es5-ext/number/epsilon/index.js b/node_modules/es5-ext/number/epsilon/index.js new file mode 100644 index 00000000..12e8a8d2 --- /dev/null +++ b/node_modules/es5-ext/number/epsilon/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = 2.220446049250313e-16; diff --git a/node_modules/es5-ext/number/epsilon/is-implemented.js b/node_modules/es5-ext/number/epsilon/is-implemented.js new file mode 100644 index 00000000..1cfbded2 --- /dev/null +++ b/node_modules/es5-ext/number/epsilon/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function () { + return typeof Number.EPSILON === "number"; +}; diff --git a/node_modules/es5-ext/number/index.js b/node_modules/es5-ext/number/index.js new file mode 100644 index 00000000..b57ff150 --- /dev/null +++ b/node_modules/es5-ext/number/index.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "EPSILON": require("./epsilon"), + "isFinite": require("./is-finite"), + "isInteger": require("./is-integer"), + "isNaN": require("./is-nan"), + "isNatural": require("./is-natural"), + "isNumber": require("./is-number"), + "isSafeInteger": require("./is-safe-integer"), + "MAX_SAFE_INTEGER": require("./max-safe-integer"), + "MIN_SAFE_INTEGER": require("./min-safe-integer"), + "toInteger": require("./to-integer"), + "toPosInteger": require("./to-pos-integer"), + "toUint32": require("./to-uint32") +}; diff --git a/node_modules/es5-ext/number/is-finite/implement.js b/node_modules/es5-ext/number/is-finite/implement.js new file mode 100644 index 00000000..17f67cbc --- /dev/null +++ b/node_modules/es5-ext/number/is-finite/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isFinite", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/number/is-finite/index.js b/node_modules/es5-ext/number/is-finite/index.js new file mode 100644 index 00000000..dbeaf7b8 --- /dev/null +++ b/node_modules/es5-ext/number/is-finite/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Number.isFinite + : require("./shim"); diff --git a/node_modules/es5-ext/number/is-finite/is-implemented.js b/node_modules/es5-ext/number/is-finite/is-implemented.js new file mode 100644 index 00000000..eadd0507 --- /dev/null +++ b/node_modules/es5-ext/number/is-finite/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var numberIsFinite = Number.isFinite; + if (typeof numberIsFinite !== "function") return false; + return !numberIsFinite("23") && numberIsFinite(34) && !numberIsFinite(Infinity); +}; diff --git a/node_modules/es5-ext/number/is-finite/shim.js b/node_modules/es5-ext/number/is-finite/shim.js new file mode 100644 index 00000000..72dd7aae --- /dev/null +++ b/node_modules/es5-ext/number/is-finite/shim.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (value) { + return (typeof value === "number") && isFinite(value); +}; diff --git a/node_modules/es5-ext/number/is-integer/implement.js b/node_modules/es5-ext/number/is-integer/implement.js new file mode 100644 index 00000000..dd1f3bd0 --- /dev/null +++ b/node_modules/es5-ext/number/is-integer/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isInteger", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/number/is-integer/index.js b/node_modules/es5-ext/number/is-integer/index.js new file mode 100644 index 00000000..71cde73a --- /dev/null +++ b/node_modules/es5-ext/number/is-integer/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Number.isInteger + : require("./shim"); diff --git a/node_modules/es5-ext/number/is-integer/is-implemented.js b/node_modules/es5-ext/number/is-integer/is-implemented.js new file mode 100644 index 00000000..f357c717 --- /dev/null +++ b/node_modules/es5-ext/number/is-integer/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var isInteger = Number.isInteger; + if (typeof isInteger !== "function") return false; + return !isInteger("23") && isInteger(34) && !isInteger(32.34); +}; diff --git a/node_modules/es5-ext/number/is-integer/shim.js b/node_modules/es5-ext/number/is-integer/shim.js new file mode 100644 index 00000000..12058b5a --- /dev/null +++ b/node_modules/es5-ext/number/is-integer/shim.js @@ -0,0 +1,8 @@ +// Credit: http://www.2ality.com/2014/05/is-integer.html + +"use strict"; + +module.exports = function (value) { + if (typeof value !== "number") return false; + return value % 1 === 0; +}; diff --git a/node_modules/es5-ext/number/is-nan/implement.js b/node_modules/es5-ext/number/is-nan/implement.js new file mode 100644 index 00000000..2f9126c9 --- /dev/null +++ b/node_modules/es5-ext/number/is-nan/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isNaN", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/number/is-nan/index.js b/node_modules/es5-ext/number/is-nan/index.js new file mode 100644 index 00000000..9128d5c0 --- /dev/null +++ b/node_modules/es5-ext/number/is-nan/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Number.isNaN + : require("./shim"); diff --git a/node_modules/es5-ext/number/is-nan/is-implemented.js b/node_modules/es5-ext/number/is-nan/is-implemented.js new file mode 100644 index 00000000..756838a4 --- /dev/null +++ b/node_modules/es5-ext/number/is-nan/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var numberIsNaN = Number.isNaN; + if (typeof numberIsNaN !== "function") return false; + return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34); +}; diff --git a/node_modules/es5-ext/number/is-nan/shim.js b/node_modules/es5-ext/number/is-nan/shim.js new file mode 100644 index 00000000..b5730d1d --- /dev/null +++ b/node_modules/es5-ext/number/is-nan/shim.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (value) { + // eslint-disable-next-line no-self-compare + return value !== value; +}; diff --git a/node_modules/es5-ext/number/is-natural.js b/node_modules/es5-ext/number/is-natural.js new file mode 100644 index 00000000..329966e3 --- /dev/null +++ b/node_modules/es5-ext/number/is-natural.js @@ -0,0 +1,7 @@ +"use strict"; + +var isInteger = require("./is-integer"); + +module.exports = function (num) { + return isInteger(num) && (num >= 0); +}; diff --git a/node_modules/es5-ext/number/is-number.js b/node_modules/es5-ext/number/is-number.js new file mode 100644 index 00000000..3da0712d --- /dev/null +++ b/node_modules/es5-ext/number/is-number.js @@ -0,0 +1,10 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(1); + +module.exports = function (value) { + return ( + typeof value === "number" || + (value instanceof Number || (typeof value === "object" && objToString.call(value) === id)) + ); +}; diff --git a/node_modules/es5-ext/number/is-safe-integer/implement.js b/node_modules/es5-ext/number/is-safe-integer/implement.js new file mode 100644 index 00000000..6092db75 --- /dev/null +++ b/node_modules/es5-ext/number/is-safe-integer/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isSafeInteger", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/number/is-safe-integer/index.js b/node_modules/es5-ext/number/is-safe-integer/index.js new file mode 100644 index 00000000..d4314df1 --- /dev/null +++ b/node_modules/es5-ext/number/is-safe-integer/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Number.isSafeInteger + : require("./shim"); diff --git a/node_modules/es5-ext/number/is-safe-integer/is-implemented.js b/node_modules/es5-ext/number/is-safe-integer/is-implemented.js new file mode 100644 index 00000000..36b0db56 --- /dev/null +++ b/node_modules/es5-ext/number/is-safe-integer/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function () { + var isSafeInteger = Number.isSafeInteger; + if (typeof isSafeInteger !== "function") return false; + return !isSafeInteger("23") && isSafeInteger(34232322323) && + !isSafeInteger(9007199254740992); +}; diff --git a/node_modules/es5-ext/number/is-safe-integer/shim.js b/node_modules/es5-ext/number/is-safe-integer/shim.js new file mode 100644 index 00000000..de7f22f3 --- /dev/null +++ b/node_modules/es5-ext/number/is-safe-integer/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +var isInteger = require("../is-integer/shim") + , maxValue = require("../max-safe-integer") + + , abs = Math.abs; + +module.exports = function (value) { + if (!isInteger(value)) return false; + return abs(value) <= maxValue; +}; diff --git a/node_modules/es5-ext/number/max-safe-integer/implement.js b/node_modules/es5-ext/number/max-safe-integer/implement.js new file mode 100644 index 00000000..be5a2933 --- /dev/null +++ b/node_modules/es5-ext/number/max-safe-integer/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "MAX_SAFE_INTEGER", { value: require("./"), + configurable: false, +enumerable: false, +writable: false }); +} diff --git a/node_modules/es5-ext/number/max-safe-integer/index.js b/node_modules/es5-ext/number/max-safe-integer/index.js new file mode 100644 index 00000000..75a41e7c --- /dev/null +++ b/node_modules/es5-ext/number/max-safe-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = Math.pow(2, 53) - 1; diff --git a/node_modules/es5-ext/number/max-safe-integer/is-implemented.js b/node_modules/es5-ext/number/max-safe-integer/is-implemented.js new file mode 100644 index 00000000..09a7da75 --- /dev/null +++ b/node_modules/es5-ext/number/max-safe-integer/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function () { + return typeof Number.MAX_SAFE_INTEGER === "number"; +}; diff --git a/node_modules/es5-ext/number/min-safe-integer/implement.js b/node_modules/es5-ext/number/min-safe-integer/implement.js new file mode 100644 index 00000000..77d02745 --- /dev/null +++ b/node_modules/es5-ext/number/min-safe-integer/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "MIN_SAFE_INTEGER", { value: require("./"), + configurable: false, +enumerable: false, +writable: false }); +} diff --git a/node_modules/es5-ext/number/min-safe-integer/index.js b/node_modules/es5-ext/number/min-safe-integer/index.js new file mode 100644 index 00000000..cde45146 --- /dev/null +++ b/node_modules/es5-ext/number/min-safe-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = -(Math.pow(2, 53) - 1); diff --git a/node_modules/es5-ext/number/min-safe-integer/is-implemented.js b/node_modules/es5-ext/number/min-safe-integer/is-implemented.js new file mode 100644 index 00000000..7b63253f --- /dev/null +++ b/node_modules/es5-ext/number/min-safe-integer/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function () { + return typeof Number.MIN_SAFE_INTEGER === "number"; +}; diff --git a/node_modules/es5-ext/number/to-integer.js b/node_modules/es5-ext/number/to-integer.js new file mode 100644 index 00000000..524395ce --- /dev/null +++ b/node_modules/es5-ext/number/to-integer.js @@ -0,0 +1,12 @@ +"use strict"; + +var sign = require("../math/sign") + + , abs = Math.abs, floor = Math.floor; + +module.exports = function (value) { + if (isNaN(value)) return 0; + value = Number(value); + if ((value === 0) || !isFinite(value)) return value; + return sign(value) * floor(abs(value)); +}; diff --git a/node_modules/es5-ext/number/to-pos-integer.js b/node_modules/es5-ext/number/to-pos-integer.js new file mode 100644 index 00000000..fe2813da --- /dev/null +++ b/node_modules/es5-ext/number/to-pos-integer.js @@ -0,0 +1,9 @@ +"use strict"; + +var toInteger = require("./to-integer") + + , max = Math.max; + +module.exports = function (value) { + return max(0, toInteger(value)); +}; diff --git a/node_modules/es5-ext/number/to-uint32.js b/node_modules/es5-ext/number/to-uint32.js new file mode 100644 index 00000000..cb3590aa --- /dev/null +++ b/node_modules/es5-ext/number/to-uint32.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (value) { + // eslint-disable-next-line no-bitwise + return value >>> 0; +}; diff --git a/node_modules/es5-ext/object/_iterate.js b/node_modules/es5-ext/object/_iterate.js new file mode 100644 index 00000000..1f0c85fd --- /dev/null +++ b/node_modules/es5-ext/object/_iterate.js @@ -0,0 +1,30 @@ +// Internal method, used by iteration functions. +// Calls a function for each key-value pair found in object +// Optionally takes compareFn to iterate object in specific order + +"use strict"; + +var callable = require("./valid-callable") + , value = require("./valid-value") + , bind = Function.prototype.bind + , call = Function.prototype.call + , keys = Object.keys + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (method, defVal) { + return function (obj, cb /*, thisArg, compareFn*/) { + var list, thisArg = arguments[2], compareFn = arguments[3]; + obj = Object(value(obj)); + callable(cb); + + list = keys(obj); + if (compareFn) { + list.sort(typeof compareFn === "function" ? bind.call(compareFn, obj) : undefined); + } + if (typeof method !== "function") method = list[method]; + return call.call(method, list, function (key, index) { + if (!objPropertyIsEnumerable.call(obj, key)) return defVal; + return call.call(cb, thisArg, obj[key], key, obj, index); + }); + }; +}; diff --git a/node_modules/es5-ext/object/assign-deep.js b/node_modules/es5-ext/object/assign-deep.js new file mode 100644 index 00000000..4a8597a4 --- /dev/null +++ b/node_modules/es5-ext/object/assign-deep.js @@ -0,0 +1,34 @@ +"use strict"; + +var includes = require("../array/#/contains") + , uniq = require("../array/#/uniq") + , copyDeep = require("./copy-deep") + , objForEach = require("./for-each") + , isPlainObject = require("./is-plain-object") + , ensureValue = require("./valid-value"); + +var isArray = Array.isArray, slice = Array.prototype.slice; + +var deepAssign = function (target, source) { + if (target === source) return target; + if (isPlainObject(target) && isPlainObject(source)) { + objForEach(source, function (value, key) { target[key] = deepAssign(target[key], value); }); + return target; + } + if (isArray(target) && isArray(source)) { + source.forEach(function (item) { + if (includes.call(target, item)) return; + if (isArray(item) || isPlainObject(item)) item = copyDeep(item); + target.push(item); + }); + return target; + } + if (isPlainObject(source) || isArray(source)) return copyDeep(source); + return source; +}; + +module.exports = function (target/*, ...objects*/) { + return uniq + .call([ensureValue(target)].concat(slice.call(arguments, 1).map(ensureValue))) + .reduce(deepAssign); +}; diff --git a/node_modules/es5-ext/object/assign/implement.js b/node_modules/es5-ext/object/assign/implement.js new file mode 100644 index 00000000..de3c92f1 --- /dev/null +++ b/node_modules/es5-ext/object/assign/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Object, "assign", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/object/assign/index.js b/node_modules/es5-ext/object/assign/index.js new file mode 100644 index 00000000..1dd31e64 --- /dev/null +++ b/node_modules/es5-ext/object/assign/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Object.assign + : require("./shim"); diff --git a/node_modules/es5-ext/object/assign/is-implemented.js b/node_modules/es5-ext/object/assign/is-implemented.js new file mode 100644 index 00000000..6b90ea96 --- /dev/null +++ b/node_modules/es5-ext/object/assign/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function () { + var assign = Object.assign, obj; + if (typeof assign !== "function") return false; + obj = { foo: "raz" }; + assign(obj, { bar: "dwa" }, { trzy: "trzy" }); + return (obj.foo + obj.bar + obj.trzy) === "razdwatrzy"; +}; diff --git a/node_modules/es5-ext/object/assign/shim.js b/node_modules/es5-ext/object/assign/shim.js new file mode 100644 index 00000000..afa58f2f --- /dev/null +++ b/node_modules/es5-ext/object/assign/shim.js @@ -0,0 +1,23 @@ +"use strict"; + +var keys = require("../keys") + , value = require("../valid-value") + , max = Math.max; + +module.exports = function (dest, src /*, …srcn*/) { + var error, i, length = max(arguments.length, 2), assign; + dest = Object(value(dest)); + assign = function (key) { + try { + dest[key] = src[key]; + } catch (e) { + if (!error) error = e; + } + }; + for (i = 1; i < length; ++i) { + src = arguments[i]; + keys(src).forEach(assign); + } + if (error !== undefined) throw error; + return dest; +}; diff --git a/node_modules/es5-ext/object/clear.js b/node_modules/es5-ext/object/clear.js new file mode 100644 index 00000000..268cc5b5 --- /dev/null +++ b/node_modules/es5-ext/object/clear.js @@ -0,0 +1,16 @@ +"use strict"; + +var keys = require("./keys"); + +module.exports = function (obj) { + var error; + keys(obj).forEach(function (key) { + try { + delete this[key]; + } catch (e) { + if (!error) error = e; + } + }, obj); + if (error !== undefined) throw error; + return obj; +}; diff --git a/node_modules/es5-ext/object/compact.js b/node_modules/es5-ext/object/compact.js new file mode 100644 index 00000000..9943aedc --- /dev/null +++ b/node_modules/es5-ext/object/compact.js @@ -0,0 +1,10 @@ +"use strict"; + +var filter = require("./filter") + , isValue = require("./is-value"); + +module.exports = function (obj) { + return filter(obj, function (val) { + return isValue(val); + }); +}; diff --git a/node_modules/es5-ext/object/compare.js b/node_modules/es5-ext/object/compare.js new file mode 100644 index 00000000..8d078589 --- /dev/null +++ b/node_modules/es5-ext/object/compare.js @@ -0,0 +1,45 @@ +"use strict"; + +var strCompare = require("../string/#/case-insensitive-compare") + , isObject = require("./is-object") + , isValue = require("./is-value") + , numIsNaN = require("../number/is-nan") + , resolve + , typeMap; + +typeMap = { + undefined: 0, + object: 1, + boolean: 2, + string: 3, + number: 4 +}; + +resolve = function (a) { + if (isObject(a)) { + if (typeof a.valueOf !== "function") return NaN; + a = a.valueOf(); + if (isObject(a)) { + if (typeof a.toString !== "function") return NaN; + a = a.toString(); + if (typeof a !== "string") return NaN; + } + } + return a; +}; + +module.exports = function (val1, val2) { + if (val1 === val2) return 0; // Same + + val1 = resolve(val1); + val2 = resolve(val2); + // eslint-disable-next-line eqeqeq + if (val1 == val2) return typeMap[typeof val1] - typeMap[typeof val2]; + if (!isValue(val1)) return -1; + if (!isValue(val2)) return 1; + if (typeof val1 === "string" || typeof val2 === "string") { + return strCompare.call(val1, val2); + } + if (numIsNaN(val1) && numIsNaN(val2)) return 0; // Jslint: ignore + return Number(val1) - Number(val2); +}; diff --git a/node_modules/es5-ext/object/copy-deep.js b/node_modules/es5-ext/object/copy-deep.js new file mode 100644 index 00000000..39f9a1d6 --- /dev/null +++ b/node_modules/es5-ext/object/copy-deep.js @@ -0,0 +1,37 @@ +"use strict"; + +var forEach = require("./for-each") + , isPlainObject = require("./is-plain-object") + , ensureValue = require("./valid-value") + , isArray = Array.isArray; + +var copyValue = function (value, ancestors, ancestorsCopy) { + var mode; + if (isPlainObject(value)) mode = "object"; + else if (isArray(value)) mode = "array"; + if (!mode) return value; + + var copy = ancestorsCopy[ancestors.indexOf(value)]; + if (copy) return copy; + copy = mode === "object" ? {} : []; + + ancestors.push(value); + ancestorsCopy.push(copy); + if (mode === "object") { + forEach(value, function (item, key) { + copy[key] = copyValue(item, ancestors, ancestorsCopy); + }); + } else { + value.forEach(function (item, index) { + copy[index] = copyValue(item, ancestors, ancestorsCopy); + }); + } + ancestors.pop(); + ancestorsCopy.pop(); + + return copy; +}; + +module.exports = function (source) { + return copyValue(ensureValue(source), [], []); +}; diff --git a/node_modules/es5-ext/object/copy.js b/node_modules/es5-ext/object/copy.js new file mode 100644 index 00000000..5368e428 --- /dev/null +++ b/node_modules/es5-ext/object/copy.js @@ -0,0 +1,19 @@ +"use strict"; + +var aFrom = require("../array/from") + , assign = require("./assign") + , value = require("./valid-value"); + +module.exports = function (obj/*, propertyNames, options*/) { + var copy = Object(value(obj)), propertyNames = arguments[1], options = Object(arguments[2]); + if (copy !== obj && !propertyNames) return copy; + var result = {}; + if (propertyNames) { + aFrom(propertyNames, function (propertyName) { + if (options.ensure || propertyName in obj) result[propertyName] = obj[propertyName]; + }); + } else { + assign(result, obj); + } + return result; +}; diff --git a/node_modules/es5-ext/object/count.js b/node_modules/es5-ext/object/count.js new file mode 100644 index 00000000..8a2a71ef --- /dev/null +++ b/node_modules/es5-ext/object/count.js @@ -0,0 +1,7 @@ +"use strict"; + +var keys = require("./keys"); + +module.exports = function (obj) { + return keys(obj).length; +}; diff --git a/node_modules/es5-ext/object/create.js b/node_modules/es5-ext/object/create.js new file mode 100644 index 00000000..9e3e6e8d --- /dev/null +++ b/node_modules/es5-ext/object/create.js @@ -0,0 +1,48 @@ +// Workaround for http://code.google.com/p/v8/issues/detail?id=2804 + +"use strict"; + +var create = Object.create, shim; + +if (!require("./set-prototype-of/is-implemented")()) { + shim = require("./set-prototype-of/shim"); +} + +module.exports = (function () { + var nullObject, polyProps, desc; + if (!shim) return create; + if (shim.level !== 1) return create; + + nullObject = {}; + polyProps = {}; + desc = { + configurable: false, + enumerable: false, + writable: true, + value: undefined + }; + Object.getOwnPropertyNames(Object.prototype).forEach(function (name) { + if (name === "__proto__") { + polyProps[name] = { + configurable: true, + enumerable: false, + writable: true, + value: undefined + }; + return; + } + polyProps[name] = desc; + }); + Object.defineProperties(nullObject, polyProps); + + Object.defineProperty(shim, "nullPolyfill", { + configurable: false, + enumerable: false, + writable: false, + value: nullObject + }); + + return function (prototype, props) { + return create(prototype === null ? nullObject : prototype, props); + }; +}()); diff --git a/node_modules/es5-ext/object/ensure-array.js b/node_modules/es5-ext/object/ensure-array.js new file mode 100644 index 00000000..5ca7a949 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-array.js @@ -0,0 +1,9 @@ +"use strict"; + +var toShortString = require("../to-short-string-representation") + , isArray = require("./is-array-like"); + +module.exports = function (value) { + if (isArray(value)) return value; + throw new TypeError(toShortString(value) + " is not a array"); +}; diff --git a/node_modules/es5-ext/object/ensure-finite-number.js b/node_modules/es5-ext/object/ensure-finite-number.js new file mode 100644 index 00000000..4f6e4b4a --- /dev/null +++ b/node_modules/es5-ext/object/ensure-finite-number.js @@ -0,0 +1,9 @@ +"use strict"; + +var isFiniteNumber = require("./is-finite-number") + , safeToString = require("../safe-to-string"); + +module.exports = function (value) { + if (isFiniteNumber(value)) return Number(value); + throw new TypeError(safeToString(value) + " does not represent a finite number value"); +}; diff --git a/node_modules/es5-ext/object/ensure-integer.js b/node_modules/es5-ext/object/ensure-integer.js new file mode 100644 index 00000000..9ec64b5b --- /dev/null +++ b/node_modules/es5-ext/object/ensure-integer.js @@ -0,0 +1,9 @@ +"use strict"; + +var toShortString = require("../to-short-string-representation") + , isInteger = require("./is-integer"); + +module.exports = function (num) { + if (!isInteger(num)) throw new TypeError(toShortString(num) + " is not a integer"); + return Number(num); +}; diff --git a/node_modules/es5-ext/object/ensure-natural-number-value.js b/node_modules/es5-ext/object/ensure-natural-number-value.js new file mode 100644 index 00000000..1a901aa4 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-natural-number-value.js @@ -0,0 +1,10 @@ +"use strict"; + +var isNaturalValue = require("./is-natural-number-value") + , toShortString = require("../to-short-string-representation"); + +module.exports = function (arg) { + var num = Number(arg); + if (!isNaturalValue(arg)) throw new TypeError(toShortString(arg) + " is not a natural number"); + return num; +}; diff --git a/node_modules/es5-ext/object/ensure-natural-number.js b/node_modules/es5-ext/object/ensure-natural-number.js new file mode 100644 index 00000000..ec7e5146 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-natural-number.js @@ -0,0 +1,10 @@ +"use strict"; + +var isNatural = require("../number/is-natural") + , toShortString = require("../to-short-string-representation"); + +module.exports = function (arg) { + var num = Number(arg); + if (!isNatural(num)) throw new TypeError(toShortString(arg) + " is not a natural number"); + return num; +}; diff --git a/node_modules/es5-ext/object/ensure-plain-function.js b/node_modules/es5-ext/object/ensure-plain-function.js new file mode 100644 index 00000000..6cd9853e --- /dev/null +++ b/node_modules/es5-ext/object/ensure-plain-function.js @@ -0,0 +1,11 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , isPlainFunction = require("./is-plain-function"); + +module.exports = function (value) { + if (!isPlainFunction(value)) { + throw new TypeError(safeToString(value) + " is not a plain function"); + } + return value; +}; diff --git a/node_modules/es5-ext/object/ensure-plain-object.js b/node_modules/es5-ext/object/ensure-plain-object.js new file mode 100644 index 00000000..7fb2b933 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-plain-object.js @@ -0,0 +1,9 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , isPlainObject = require("./is-plain-object"); + +module.exports = function (value) { + if (!isPlainObject(value)) throw new TypeError(safeToString(value) + " is not a plain object"); + return value; +}; diff --git a/node_modules/es5-ext/object/ensure-promise.js b/node_modules/es5-ext/object/ensure-promise.js new file mode 100644 index 00000000..b5b53563 --- /dev/null +++ b/node_modules/es5-ext/object/ensure-promise.js @@ -0,0 +1,9 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , isPromise = require("./is-promise"); + +module.exports = function (value) { + if (!isPromise(value)) throw new TypeError(safeToString(value) + " is not a promise"); + return value; +}; diff --git a/node_modules/es5-ext/object/ensure-thenable.js b/node_modules/es5-ext/object/ensure-thenable.js new file mode 100644 index 00000000..c55c17ad --- /dev/null +++ b/node_modules/es5-ext/object/ensure-thenable.js @@ -0,0 +1,9 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , isThenable = require("./is-thenable"); + +module.exports = function (value) { + if (!isThenable(value)) throw new TypeError(safeToString(value) + " is not a thenable"); + return value; +}; diff --git a/node_modules/es5-ext/object/entries/implement.js b/node_modules/es5-ext/object/entries/implement.js new file mode 100644 index 00000000..5c2a246d --- /dev/null +++ b/node_modules/es5-ext/object/entries/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Object, "entries", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/object/entries/index.js b/node_modules/es5-ext/object/entries/index.js new file mode 100644 index 00000000..4a297d6a --- /dev/null +++ b/node_modules/es5-ext/object/entries/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Object.entries : require("./shim"); diff --git a/node_modules/es5-ext/object/entries/is-implemented.js b/node_modules/es5-ext/object/entries/is-implemented.js new file mode 100644 index 00000000..e13c2e65 --- /dev/null +++ b/node_modules/es5-ext/object/entries/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function () { + try { + return Object.entries({ foo: 12 })[0][0] === "foo"; + } catch (e) { + return false; + } +}; diff --git a/node_modules/es5-ext/object/entries/shim.js b/node_modules/es5-ext/object/entries/shim.js new file mode 100644 index 00000000..2348e446 --- /dev/null +++ b/node_modules/es5-ext/object/entries/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var ensureValue = require("../valid-value"); + +module.exports = function (object) { + ensureValue(object); + var result = []; + object = Object(object); + for (var key in object) { + if (!propertyIsEnumerable.call(object, key)) continue; + result.push([key, object[key]]); + } + return result; +}; diff --git a/node_modules/es5-ext/object/eq.js b/node_modules/es5-ext/object/eq.js new file mode 100644 index 00000000..03124680 --- /dev/null +++ b/node_modules/es5-ext/object/eq.js @@ -0,0 +1,7 @@ +"use strict"; + +var numIsNaN = require("../number/is-nan"); + +module.exports = function (val1, val2) { + return val1 === val2 || (numIsNaN(val1) && numIsNaN(val2)); +}; diff --git a/node_modules/es5-ext/object/every.js b/node_modules/es5-ext/object/every.js new file mode 100644 index 00000000..892b5485 --- /dev/null +++ b/node_modules/es5-ext/object/every.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")("every", true); diff --git a/node_modules/es5-ext/object/filter.js b/node_modules/es5-ext/object/filter.js new file mode 100644 index 00000000..c7dd969b --- /dev/null +++ b/node_modules/es5-ext/object/filter.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("./valid-callable") + , forEach = require("./for-each") + , call = Function.prototype.call; + +module.exports = function (obj, cb /*, thisArg*/) { + var result = {}, thisArg = arguments[2]; + callable(cb); + forEach(obj, function (value, key, targetObj, index) { + if (call.call(cb, thisArg, value, key, targetObj, index)) result[key] = targetObj[key]; + }); + return result; +}; diff --git a/node_modules/es5-ext/object/find-key.js b/node_modules/es5-ext/object/find-key.js new file mode 100644 index 00000000..6da6ba6f --- /dev/null +++ b/node_modules/es5-ext/object/find-key.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")(require("../array/#/find"), false); diff --git a/node_modules/es5-ext/object/find.js b/node_modules/es5-ext/object/find.js new file mode 100644 index 00000000..5960421a --- /dev/null +++ b/node_modules/es5-ext/object/find.js @@ -0,0 +1,10 @@ +"use strict"; + +var findKey = require("./find-key") + , isValue = require("./is-value"); + +// eslint-disable-next-line no-unused-vars +module.exports = function (obj, cb /*, thisArg, compareFn*/) { + var key = findKey.apply(this, arguments); + return isValue(key) ? obj[key] : key; +}; diff --git a/node_modules/es5-ext/object/first-key.js b/node_modules/es5-ext/object/first-key.js new file mode 100644 index 00000000..3666de57 --- /dev/null +++ b/node_modules/es5-ext/object/first-key.js @@ -0,0 +1,13 @@ +"use strict"; + +var value = require("./valid-value") + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (obj) { + var i; + value(obj); + for (i in obj) { + if (objPropertyIsEnumerable.call(obj, i)) return i; + } + return null; +}; diff --git a/node_modules/es5-ext/object/flatten.js b/node_modules/es5-ext/object/flatten.js new file mode 100644 index 00000000..34e1ab09 --- /dev/null +++ b/node_modules/es5-ext/object/flatten.js @@ -0,0 +1,17 @@ +"use strict"; + +var isPlainObject = require("./is-plain-object") + , forEach = require("./for-each") + + , process; + +process = function self(value, key) { + if (isPlainObject(value)) forEach(value, self, this); + else this[key] = value; +}; + +module.exports = function (obj) { + var flattened = {}; + forEach(obj, process, flattened); + return flattened; +}; diff --git a/node_modules/es5-ext/object/for-each.js b/node_modules/es5-ext/object/for-each.js new file mode 100644 index 00000000..d282956d --- /dev/null +++ b/node_modules/es5-ext/object/for-each.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")("forEach"); diff --git a/node_modules/es5-ext/object/get-property-names.js b/node_modules/es5-ext/object/get-property-names.js new file mode 100644 index 00000000..7dfef279 --- /dev/null +++ b/node_modules/es5-ext/object/get-property-names.js @@ -0,0 +1,17 @@ +"use strict"; + +var uniq = require("../array/#/uniq") + , value = require("./valid-value") + , push = Array.prototype.push + , getOwnPropertyNames = Object.getOwnPropertyNames + , getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (obj) { + var keys; + obj = Object(value(obj)); + keys = getOwnPropertyNames(obj); + while ((obj = getPrototypeOf(obj))) { + push.apply(keys, getOwnPropertyNames(obj)); + } + return uniq.call(keys); +}; diff --git a/node_modules/es5-ext/object/index.js b/node_modules/es5-ext/object/index.js new file mode 100644 index 00000000..13cfb95b --- /dev/null +++ b/node_modules/es5-ext/object/index.js @@ -0,0 +1,70 @@ +"use strict"; + +module.exports = { + assign: require("./assign"), + assignDeep: require("./assign-deep"), + clear: require("./clear"), + compact: require("./compact"), + compare: require("./compare"), + copy: require("./copy"), + copyDeep: require("./copy-deep"), + count: require("./count"), + create: require("./create"), + ensureArray: require("./ensure-array"), + ensureFiniteNumber: require("./ensure-finite-number"), + ensureInteger: require("./ensure-integer"), + ensureNaturalNumber: require("./ensure-natural-number"), + ensureNaturalNumberValue: require("./ensure-natural-number-value"), + ensurePlainFunction: require("./ensure-plain-function"), + ensurePlainObject: require("./ensure-plain-object"), + ensurePromise: require("./ensure-promise"), + ensureThenable: require("./ensure-thenable"), + entries: require("./entries"), + eq: require("./eq"), + every: require("./every"), + filter: require("./filter"), + find: require("./find"), + findKey: require("./find-key"), + firstKey: require("./first-key"), + flatten: require("./flatten"), + forEach: require("./for-each"), + getPropertyNames: require("./get-property-names"), + is: require("./is"), + isArrayLike: require("./is-array-like"), + isCallable: require("./is-callable"), + isCopy: require("./is-copy"), + isCopyDeep: require("./is-copy-deep"), + isEmpty: require("./is-empty"), + isFiniteNumber: require("./is-finite-number"), + isInteger: require("./is-integer"), + isNaturalNumber: require("./is-natural-number"), + isNaturalNumberValue: require("./is-natural-number-value"), + isNumberValue: require("./is-number-value"), + isObject: require("./is-object"), + isPlainFunction: require("./is-plain-function"), + isPlainObject: require("./is-plain-object"), + isPromise: require("./is-promise"), + isThenable: require("./is-thenable"), + isValue: require("./is-value"), + keyOf: require("./key-of"), + keys: require("./keys"), + map: require("./map"), + mapKeys: require("./map-keys"), + normalizeOptions: require("./normalize-options"), + mixin: require("./mixin"), + mixinPrototypes: require("./mixin-prototypes"), + primitiveSet: require("./primitive-set"), + safeTraverse: require("./safe-traverse"), + serialize: require("./serialize"), + setPrototypeOf: require("./set-prototype-of"), + some: require("./some"), + toArray: require("./to-array"), + unserialize: require("./unserialize"), + validateArrayLike: require("./validate-array-like"), + validateArrayLikeObject: require("./validate-array-like-object"), + validCallable: require("./valid-callable"), + validObject: require("./valid-object"), + validateStringifiable: require("./validate-stringifiable"), + validateStringifiableValue: require("./validate-stringifiable-value"), + validValue: require("./valid-value") +}; diff --git a/node_modules/es5-ext/object/is-array-like.js b/node_modules/es5-ext/object/is-array-like.js new file mode 100644 index 00000000..fcb9115d --- /dev/null +++ b/node_modules/es5-ext/object/is-array-like.js @@ -0,0 +1,17 @@ +"use strict"; + +var isFunction = require("../function/is-function") + , isObject = require("./is-object") + , isValue = require("./is-value"); + +module.exports = function (value) { + return ( + (isValue(value) && + typeof value.length === "number" && + // Just checking ((typeof x === 'object') && (typeof x !== 'function')) + // won't work right for some cases, e.g.: + // type of instance of NodeList in Safari is a 'function' + ((isObject(value) && !isFunction(value)) || typeof value === "string")) || + false + ); +}; diff --git a/node_modules/es5-ext/object/is-callable.js b/node_modules/es5-ext/object/is-callable.js new file mode 100644 index 00000000..c55915bc --- /dev/null +++ b/node_modules/es5-ext/object/is-callable.js @@ -0,0 +1,7 @@ +// Deprecated + +"use strict"; + +module.exports = function (obj) { + return typeof obj === "function"; +}; diff --git a/node_modules/es5-ext/object/is-copy-deep.js b/node_modules/es5-ext/object/is-copy-deep.js new file mode 100644 index 00000000..a1206aea --- /dev/null +++ b/node_modules/es5-ext/object/is-copy-deep.js @@ -0,0 +1,59 @@ +"use strict"; + +var eq = require("./eq") + , isPlainObject = require("./is-plain-object") + , value = require("./valid-value"); + +var isArray = Array.isArray + , keys = Object.keys + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable + , objHasOwnProperty = Object.prototype.hasOwnProperty + , eqArr + , eqVal + , eqObj; + +eqArr = function (arr1, arr2, recMap) { + var i, length = arr1.length; + if (length !== arr2.length) return false; + for (i = 0; i < length; ++i) { + if (objHasOwnProperty.call(arr1, i) !== objHasOwnProperty.call(arr2, i)) return false; + if (!eqVal(arr1[i], arr2[i], recMap)) return false; + } + return true; +}; + +eqObj = function (obj1, obj2, recMap) { + var k1 = keys(obj1), k2 = keys(obj2); + if (k1.length !== k2.length) return false; + return k1.every(function (key) { + if (!objPropertyIsEnumerable.call(obj2, key)) return false; + return eqVal(obj1[key], obj2[key], recMap); + }); +}; + +eqVal = function (val1, val2, recMap) { + var i, eqX, c1, c2; + if (eq(val1, val2)) return true; + if (isPlainObject(val1)) { + if (!isPlainObject(val2)) return false; + eqX = eqObj; + } else if (isArray(val1) && isArray(val2)) { + eqX = eqArr; + } else { + return false; + } + c1 = recMap[0]; + c2 = recMap[1]; + i = c1.indexOf(val1); + if (i === -1) { + i = c1.push(val1) - 1; + c2[i] = []; + } else if (c2[i].indexOf(val2) !== -1) return true; + c2[i].push(val2); + return eqX(val1, val2, recMap); +}; + +module.exports = function (val1, val2) { + if (eq(value(val1), value(val2))) return true; + return eqVal(Object(val1), Object(val2), [[], []]); +}; diff --git a/node_modules/es5-ext/object/is-copy.js b/node_modules/es5-ext/object/is-copy.js new file mode 100644 index 00000000..8c6ae5e2 --- /dev/null +++ b/node_modules/es5-ext/object/is-copy.js @@ -0,0 +1,23 @@ +"use strict"; + +var eq = require("./eq") + , value = require("./valid-value") + , keys = Object.keys + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (val1, val2) { + var k1, k2; + + if (eq(value(val1), value(val2))) return true; + + val1 = Object(val1); + val2 = Object(val2); + + k1 = keys(val1); + k2 = keys(val2); + if (k1.length !== k2.length) return false; + return k1.every(function (key) { + if (!objPropertyIsEnumerable.call(val2, key)) return false; + return eq(val1[key], val2[key]); + }); +}; diff --git a/node_modules/es5-ext/object/is-empty.js b/node_modules/es5-ext/object/is-empty.js new file mode 100644 index 00000000..dbc52d0c --- /dev/null +++ b/node_modules/es5-ext/object/is-empty.js @@ -0,0 +1,14 @@ +"use strict"; + +var value = require("./valid-value") + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (obj) { + var i; + value(obj); + for (i in obj) { + // Jslint: ignore + if (objPropertyIsEnumerable.call(obj, i)) return false; + } + return true; +}; diff --git a/node_modules/es5-ext/object/is-finite-number.js b/node_modules/es5-ext/object/is-finite-number.js new file mode 100644 index 00000000..78ed6692 --- /dev/null +++ b/node_modules/es5-ext/object/is-finite-number.js @@ -0,0 +1,7 @@ +"use strict"; + +var isNumber = require("./is-number-value"); + +module.exports = function (value) { + return isNumber(value) && isFinite(value); +}; diff --git a/node_modules/es5-ext/object/is-integer.js b/node_modules/es5-ext/object/is-integer.js new file mode 100644 index 00000000..1745b829 --- /dev/null +++ b/node_modules/es5-ext/object/is-integer.js @@ -0,0 +1,10 @@ +"use strict"; + +var isInteger = require("../number/is-integer") + , isValue = require("./is-value"); + +module.exports = function (arg) { + if (!isValue(arg)) return false; + arg = Number(arg); + return isInteger(arg); +}; diff --git a/node_modules/es5-ext/object/is-natural-number-value.js b/node_modules/es5-ext/object/is-natural-number-value.js new file mode 100644 index 00000000..c7445218 --- /dev/null +++ b/node_modules/es5-ext/object/is-natural-number-value.js @@ -0,0 +1,9 @@ +"use strict"; + +var isNaturalNumber = require("./is-natural-number") + , isValue = require("./is-value"); + +module.exports = function (arg) { + if (!isValue(arg)) return false; + return isNaturalNumber(arg); +}; diff --git a/node_modules/es5-ext/object/is-natural-number.js b/node_modules/es5-ext/object/is-natural-number.js new file mode 100644 index 00000000..37d74586 --- /dev/null +++ b/node_modules/es5-ext/object/is-natural-number.js @@ -0,0 +1,7 @@ +"use strict"; + +var isNatural = require("../number/is-natural"); + +module.exports = function (arg) { + return isNatural(Number(arg)); +}; diff --git a/node_modules/es5-ext/object/is-number-value.js b/node_modules/es5-ext/object/is-number-value.js new file mode 100644 index 00000000..e9152768 --- /dev/null +++ b/node_modules/es5-ext/object/is-number-value.js @@ -0,0 +1,12 @@ +"use strict"; + +var isValue = require("./is-value"); + +module.exports = function (value) { + if (!isValue(value)) return false; + try { + return !isNaN(value); + } catch (e) { + return false; + } +}; diff --git a/node_modules/es5-ext/object/is-object.js b/node_modules/es5-ext/object/is-object.js new file mode 100644 index 00000000..846ae217 --- /dev/null +++ b/node_modules/es5-ext/object/is-object.js @@ -0,0 +1,9 @@ +"use strict"; + +var isValue = require("./is-value"); + +var map = { function: true, object: true }; + +module.exports = function (value) { + return (isValue(value) && map[typeof value]) || false; +}; diff --git a/node_modules/es5-ext/object/is-plain-function.js b/node_modules/es5-ext/object/is-plain-function.js new file mode 100644 index 00000000..a2f32348 --- /dev/null +++ b/node_modules/es5-ext/object/is-plain-function.js @@ -0,0 +1,11 @@ +"use strict"; + +var isClassStr = RegExp.prototype.test.bind(/^\s*class[\s{/}]/) + , fnToString = Function.prototype.toString; + +module.exports = function (fn) { + if (typeof fn !== "function") return false; + if (typeof fn.call !== "function") return false; + if (typeof fn.apply !== "function") return false; + return !isClassStr(fnToString.call(fn)); +}; diff --git a/node_modules/es5-ext/object/is-plain-object.js b/node_modules/es5-ext/object/is-plain-object.js new file mode 100644 index 00000000..ff153289 --- /dev/null +++ b/node_modules/es5-ext/object/is-plain-object.js @@ -0,0 +1,20 @@ +"use strict"; + +var getPrototypeOf = Object.getPrototypeOf + , prototype = Object.prototype + , objToString = prototype.toString + , id = Object().toString(); + +module.exports = function (value) { + var proto, valueConstructor; + if (!value || typeof value !== "object" || objToString.call(value) !== id) { + return false; + } + proto = getPrototypeOf(value); + if (proto === null) { + valueConstructor = value.constructor; + if (typeof valueConstructor !== "function") return true; + return valueConstructor.prototype !== value; + } + return proto === prototype || getPrototypeOf(proto) === null; +}; diff --git a/node_modules/es5-ext/object/is-promise.js b/node_modules/es5-ext/object/is-promise.js new file mode 100644 index 00000000..33d6df13 --- /dev/null +++ b/node_modules/es5-ext/object/is-promise.js @@ -0,0 +1,4 @@ +"use strict"; + +// In next major this check will also confirm on promise constructor +module.exports = require("./is-thenable"); diff --git a/node_modules/es5-ext/object/is-thenable.js b/node_modules/es5-ext/object/is-thenable.js new file mode 100644 index 00000000..a37bffb6 --- /dev/null +++ b/node_modules/es5-ext/object/is-thenable.js @@ -0,0 +1,8 @@ +"use strict"; + +var isCallable = require("./is-callable") + , isObject = require("./is-object"); + +module.exports = function (value) { + return isObject(value) && isCallable(value.then); +}; diff --git a/node_modules/es5-ext/object/is-value.js b/node_modules/es5-ext/object/is-value.js new file mode 100644 index 00000000..82af8f33 --- /dev/null +++ b/node_modules/es5-ext/object/is-value.js @@ -0,0 +1,7 @@ +"use strict"; + +var _undefined = require("../function/noop")(); // Support ES3 engines + +module.exports = function (val) { + return (val !== _undefined) && (val !== null); +}; diff --git a/node_modules/es5-ext/object/is.js b/node_modules/es5-ext/object/is.js new file mode 100644 index 00000000..54baadec --- /dev/null +++ b/node_modules/es5-ext/object/is.js @@ -0,0 +1,10 @@ +// Implementation credits go to: +// http://wiki.ecmascript.org/doku.php?id=harmony:egal + +"use strict"; + +var numIsNaN = require("../number/is-nan"); + +module.exports = function (val1, val2) { + return val1 === val2 ? val1 !== 0 || 1 / val1 === 1 / val2 : numIsNaN(val1) && numIsNaN(val2); +}; diff --git a/node_modules/es5-ext/object/key-of.js b/node_modules/es5-ext/object/key-of.js new file mode 100644 index 00000000..dc640e4d --- /dev/null +++ b/node_modules/es5-ext/object/key-of.js @@ -0,0 +1,17 @@ +"use strict"; + +var eq = require("./eq") + , some = require("./some"); + +module.exports = function (obj, searchValue) { + var result; + return some(obj, function (value, name) { + if (eq(value, searchValue)) { + result = name; + return true; + } + return false; + }) + ? result + : null; +}; diff --git a/node_modules/es5-ext/object/keys/implement.js b/node_modules/es5-ext/object/keys/implement.js new file mode 100644 index 00000000..72ecfbdf --- /dev/null +++ b/node_modules/es5-ext/object/keys/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Object, "keys", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/object/keys/index.js b/node_modules/es5-ext/object/keys/index.js new file mode 100644 index 00000000..d1942279 --- /dev/null +++ b/node_modules/es5-ext/object/keys/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Object.keys : require("./shim"); diff --git a/node_modules/es5-ext/object/keys/is-implemented.js b/node_modules/es5-ext/object/keys/is-implemented.js new file mode 100644 index 00000000..2dfcf1b9 --- /dev/null +++ b/node_modules/es5-ext/object/keys/is-implemented.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function () { + try { + Object.keys("primitive"); + return true; + } catch (e) { + return false; + } +}; diff --git a/node_modules/es5-ext/object/keys/shim.js b/node_modules/es5-ext/object/keys/shim.js new file mode 100644 index 00000000..a8908d5c --- /dev/null +++ b/node_modules/es5-ext/object/keys/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +var isValue = require("../is-value"); + +var keys = Object.keys; + +module.exports = function (object) { return keys(isValue(object) ? Object(object) : object); }; diff --git a/node_modules/es5-ext/object/map-keys.js b/node_modules/es5-ext/object/map-keys.js new file mode 100644 index 00000000..72dada07 --- /dev/null +++ b/node_modules/es5-ext/object/map-keys.js @@ -0,0 +1,18 @@ +"use strict"; + +var callable = require("./valid-callable") + , forEach = require("./for-each") + , call = Function.prototype.call; + +module.exports = function (obj, cb /*, thisArg*/) { + var result = {}, thisArg = arguments[2]; + callable(cb); + forEach( + obj, + function (value, key, targetObj, index) { + result[call.call(cb, thisArg, key, value, this, index)] = value; + }, + obj + ); + return result; +}; diff --git a/node_modules/es5-ext/object/map.js b/node_modules/es5-ext/object/map.js new file mode 100644 index 00000000..7b718db1 --- /dev/null +++ b/node_modules/es5-ext/object/map.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("./valid-callable") + , forEach = require("./for-each") + , call = Function.prototype.call; + +module.exports = function (obj, cb /*, thisArg*/) { + var result = {}, thisArg = arguments[2]; + callable(cb); + forEach(obj, function (value, key, targetObj, index) { + result[key] = call.call(cb, thisArg, value, key, targetObj, index); + }); + return result; +}; diff --git a/node_modules/es5-ext/object/mixin-prototypes.js b/node_modules/es5-ext/object/mixin-prototypes.js new file mode 100644 index 00000000..81e27c75 --- /dev/null +++ b/node_modules/es5-ext/object/mixin-prototypes.js @@ -0,0 +1,25 @@ +"use strict"; + +var value = require("./valid-value") + , mixin = require("./mixin"); + +var getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (target, source) { + target = Object(value(target)); + source = Object(value(source)); + if (target === source) return target; + + var sources = []; + while (source && !isPrototypeOf.call(source, target)) { + sources.unshift(source); + source = getPrototypeOf(source); + } + + var error; + sources.forEach(function (sourceProto) { + try { mixin(target, sourceProto); } catch (mixinError) { error = mixinError; } + }); + if (error) throw error; + return target; +}; diff --git a/node_modules/es5-ext/object/mixin.js b/node_modules/es5-ext/object/mixin.js new file mode 100644 index 00000000..4da7cd51 --- /dev/null +++ b/node_modules/es5-ext/object/mixin.js @@ -0,0 +1,31 @@ +"use strict"; + +var value = require("./valid-value") + + , defineProperty = Object.defineProperty + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor + , getOwnPropertyNames = Object.getOwnPropertyNames + , getOwnPropertySymbols = Object.getOwnPropertySymbols; + +module.exports = function (target, source) { + var error, sourceObject = Object(value(source)); + target = Object(value(target)); + getOwnPropertyNames(sourceObject).forEach(function (name) { + try { + defineProperty(target, name, getOwnPropertyDescriptor(source, name)); + } catch (e) { + error = e; +} + }); + if (typeof getOwnPropertySymbols === "function") { + getOwnPropertySymbols(sourceObject).forEach(function (symbol) { + try { + defineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol)); + } catch (e) { + error = e; +} + }); + } + if (error !== undefined) throw error; + return target; +}; diff --git a/node_modules/es5-ext/object/normalize-options.js b/node_modules/es5-ext/object/normalize-options.js new file mode 100644 index 00000000..6c394fe9 --- /dev/null +++ b/node_modules/es5-ext/object/normalize-options.js @@ -0,0 +1,20 @@ +"use strict"; + +var isValue = require("./is-value"); + +var forEach = Array.prototype.forEach, create = Object.create; + +var process = function (src, obj) { + var key; + for (key in src) obj[key] = src[key]; +}; + +// eslint-disable-next-line no-unused-vars +module.exports = function (opts1 /*, …options*/) { + var result = create(null); + forEach.call(arguments, function (options) { + if (!isValue(options)) return; + process(Object(options), result); + }); + return result; +}; diff --git a/node_modules/es5-ext/object/primitive-set.js b/node_modules/es5-ext/object/primitive-set.js new file mode 100644 index 00000000..235eaa7f --- /dev/null +++ b/node_modules/es5-ext/object/primitive-set.js @@ -0,0 +1,12 @@ +"use strict"; + +var forEach = Array.prototype.forEach, create = Object.create; + +// eslint-disable-next-line no-unused-vars +module.exports = function (arg /*, …args*/) { + var set = create(null); + forEach.call(arguments, function (name) { + set[name] = true; + }); + return set; +}; diff --git a/node_modules/es5-ext/object/safe-traverse.js b/node_modules/es5-ext/object/safe-traverse.js new file mode 100644 index 00000000..7b72d555 --- /dev/null +++ b/node_modules/es5-ext/object/safe-traverse.js @@ -0,0 +1,16 @@ +"use strict"; + +var value = require("./valid-value") + , isValue = require("./is-value"); + +module.exports = function (obj /*, …names*/) { + var length, current = 1; + value(obj); + length = arguments.length - 1; + if (!length) return obj; + while (current < length) { + obj = obj[arguments[current++]]; + if (!isValue(obj)) return undefined; + } + return obj[arguments[current]]; +}; diff --git a/node_modules/es5-ext/object/serialize.js b/node_modules/es5-ext/object/serialize.js new file mode 100644 index 00000000..4be9aeb1 --- /dev/null +++ b/node_modules/es5-ext/object/serialize.js @@ -0,0 +1,41 @@ +"use strict"; + +var toArray = require("./to-array") + , isDate = require("../date/is-date") + , isValue = require("../object/is-value") + , isRegExp = require("../reg-exp/is-reg-exp"); + +var isArray = Array.isArray + , stringify = JSON.stringify + , objHasOwnProperty = Object.prototype.hasOwnProperty; +var keyValueToString = function (value, key) { + return stringify(key) + ":" + exports(value); +}; + +var sparseMap = function (arr) { + var i, length = arr.length, result = new Array(length); + for (i = 0; i < length; ++i) { + if (!objHasOwnProperty.call(arr, i)) continue; + result[i] = exports(arr[i]); + } + return result; +}; + +module.exports = exports = function (obj) { + if (!isValue(obj)) return String(obj); + switch (typeof obj) { + case "string": + return stringify(obj); + case "number": + case "boolean": + case "function": + return String(obj); + case "object": + if (isArray(obj)) return "[" + sparseMap(obj) + "]"; + if (isRegExp(obj)) return String(obj); + if (isDate(obj)) return "new Date(" + obj.valueOf() + ")"; + return "{" + toArray(obj, keyValueToString) + "}"; + default: + throw new TypeError("Serialization of " + String(obj) + "is unsupported"); + } +}; diff --git a/node_modules/es5-ext/object/set-prototype-of/implement.js b/node_modules/es5-ext/object/set-prototype-of/implement.js new file mode 100644 index 00000000..1b91aeba --- /dev/null +++ b/node_modules/es5-ext/object/set-prototype-of/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +var shim; + +if (!require("./is-implemented")() && (shim = require("./shim"))) { + Object.defineProperty(Object, "setPrototypeOf", + { value: shim, configurable: true, enumerable: false, writable: true }); +} diff --git a/node_modules/es5-ext/object/set-prototype-of/index.js b/node_modules/es5-ext/object/set-prototype-of/index.js new file mode 100644 index 00000000..e035173f --- /dev/null +++ b/node_modules/es5-ext/object/set-prototype-of/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Object.setPrototypeOf + : require("./shim"); diff --git a/node_modules/es5-ext/object/set-prototype-of/is-implemented.js b/node_modules/es5-ext/object/set-prototype-of/is-implemented.js new file mode 100644 index 00000000..1a00627b --- /dev/null +++ b/node_modules/es5-ext/object/set-prototype-of/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +var create = Object.create, getPrototypeOf = Object.getPrototypeOf, plainObject = {}; + +module.exports = function (/* CustomCreate*/) { + var setPrototypeOf = Object.setPrototypeOf, customCreate = arguments[0] || create; + if (typeof setPrototypeOf !== "function") return false; + return getPrototypeOf(setPrototypeOf(customCreate(null), plainObject)) === plainObject; +}; diff --git a/node_modules/es5-ext/object/set-prototype-of/shim.js b/node_modules/es5-ext/object/set-prototype-of/shim.js new file mode 100644 index 00000000..bc217844 --- /dev/null +++ b/node_modules/es5-ext/object/set-prototype-of/shim.js @@ -0,0 +1,86 @@ +/* eslint no-proto: "off" */ + +// Big thanks to @WebReflection for sorting this out +// https://gist.github.com/WebReflection/5593554 + +"use strict"; + +var isObject = require("../is-object") + , value = require("../valid-value") + , objIsPrototypeOf = Object.prototype.isPrototypeOf + , defineProperty = Object.defineProperty + , nullDesc = { + configurable: true, + enumerable: false, + writable: true, + value: undefined +} + , validate; + +validate = function (obj, prototype) { + value(obj); + if (prototype === null || isObject(prototype)) return obj; + throw new TypeError("Prototype must be null or an object"); +}; + +module.exports = (function (status) { + var fn, set; + if (!status) return null; + if (status.level === 2) { + if (status.set) { + set = status.set; + fn = function (obj, prototype) { + set.call(validate(obj, prototype), prototype); + return obj; + }; + } else { + fn = function (obj, prototype) { + validate(obj, prototype).__proto__ = prototype; + return obj; + }; + } + } else { + fn = function self(obj, prototype) { + var isNullBase; + validate(obj, prototype); + isNullBase = objIsPrototypeOf.call(self.nullPolyfill, obj); + if (isNullBase) delete self.nullPolyfill.__proto__; + if (prototype === null) prototype = self.nullPolyfill; + obj.__proto__ = prototype; + if (isNullBase) defineProperty(self.nullPolyfill, "__proto__", nullDesc); + return obj; + }; + } + return Object.defineProperty(fn, "level", { + configurable: false, + enumerable: false, + writable: false, + value: status.level + }); +}( + (function () { + var tmpObj1 = Object.create(null) + , tmpObj2 = {} + , set + , desc = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__"); + + if (desc) { + try { + set = desc.set; // Opera crashes at this point + set.call(tmpObj1, tmpObj2); + } catch (ignore) {} + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { set: set, level: 2 }; + } + + tmpObj1.__proto__ = tmpObj2; + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 2 }; + + tmpObj1 = {}; + tmpObj1.__proto__ = tmpObj2; + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 1 }; + + return false; + })() +)); + +require("../create"); diff --git a/node_modules/es5-ext/object/some.js b/node_modules/es5-ext/object/some.js new file mode 100644 index 00000000..c919466b --- /dev/null +++ b/node_modules/es5-ext/object/some.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")("some", false); diff --git a/node_modules/es5-ext/object/to-array.js b/node_modules/es5-ext/object/to-array.js new file mode 100644 index 00000000..6ed50a8e --- /dev/null +++ b/node_modules/es5-ext/object/to-array.js @@ -0,0 +1,24 @@ +"use strict"; + +var callable = require("./valid-callable") + , isValue = require("./is-value") + , forEach = require("./for-each") + , call = Function.prototype.call + , defaultCb = function (value, key) { + return [key, value]; +}; + +module.exports = function (obj /*, cb, thisArg, compareFn*/) { + var a = [], cb = arguments[1], thisArg = arguments[2]; + cb = isValue(cb) ? callable(cb) : defaultCb; + + forEach( + obj, + function (value, key, targetObj, index) { + a.push(call.call(cb, thisArg, value, key, this, index)); + }, + obj, + arguments[3] + ); + return a; +}; diff --git a/node_modules/es5-ext/object/unserialize.js b/node_modules/es5-ext/object/unserialize.js new file mode 100644 index 00000000..75745143 --- /dev/null +++ b/node_modules/es5-ext/object/unserialize.js @@ -0,0 +1,8 @@ +"use strict"; + +var value = require("./valid-value"); + +module.exports = exports = function (code) { + // eslint-disable-next-line no-new-func + return new Function("return " + value(code))(); +}; diff --git a/node_modules/es5-ext/object/valid-callable.js b/node_modules/es5-ext/object/valid-callable.js new file mode 100644 index 00000000..a97fb3ea --- /dev/null +++ b/node_modules/es5-ext/object/valid-callable.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (fn) { + if (typeof fn !== "function") throw new TypeError(fn + " is not a function"); + return fn; +}; diff --git a/node_modules/es5-ext/object/valid-object.js b/node_modules/es5-ext/object/valid-object.js new file mode 100644 index 00000000..74b5e5f2 --- /dev/null +++ b/node_modules/es5-ext/object/valid-object.js @@ -0,0 +1,8 @@ +"use strict"; + +var isObject = require("./is-object"); + +module.exports = function (value) { + if (!isObject(value)) throw new TypeError(value + " is not an Object"); + return value; +}; diff --git a/node_modules/es5-ext/object/valid-value.js b/node_modules/es5-ext/object/valid-value.js new file mode 100644 index 00000000..d0ced8a4 --- /dev/null +++ b/node_modules/es5-ext/object/valid-value.js @@ -0,0 +1,8 @@ +"use strict"; + +var isValue = require("./is-value"); + +module.exports = function (value) { + if (!isValue(value)) throw new TypeError("Cannot use null or undefined"); + return value; +}; diff --git a/node_modules/es5-ext/object/validate-array-like-object.js b/node_modules/es5-ext/object/validate-array-like-object.js new file mode 100644 index 00000000..d7c45b36 --- /dev/null +++ b/node_modules/es5-ext/object/validate-array-like-object.js @@ -0,0 +1,9 @@ +"use strict"; + +var isArrayLike = require("./is-array-like") + , isObject = require("./is-object"); + +module.exports = function (obj) { + if (isObject(obj) && isArrayLike(obj)) return obj; + throw new TypeError(obj + " is not array-like object"); +}; diff --git a/node_modules/es5-ext/object/validate-array-like.js b/node_modules/es5-ext/object/validate-array-like.js new file mode 100644 index 00000000..07aa7949 --- /dev/null +++ b/node_modules/es5-ext/object/validate-array-like.js @@ -0,0 +1,8 @@ +"use strict"; + +var isArrayLike = require("./is-array-like"); + +module.exports = function (obj) { + if (isArrayLike(obj)) return obj; + throw new TypeError(obj + " is not array-like value"); +}; diff --git a/node_modules/es5-ext/object/validate-stringifiable-value.js b/node_modules/es5-ext/object/validate-stringifiable-value.js new file mode 100644 index 00000000..5f470428 --- /dev/null +++ b/node_modules/es5-ext/object/validate-stringifiable-value.js @@ -0,0 +1,8 @@ +"use strict"; + +var ensureValue = require("./valid-value") + , stringifiable = require("./validate-stringifiable"); + +module.exports = function (value) { + return stringifiable(ensureValue(value)); +}; diff --git a/node_modules/es5-ext/object/validate-stringifiable.js b/node_modules/es5-ext/object/validate-stringifiable.js new file mode 100644 index 00000000..2b1f1271 --- /dev/null +++ b/node_modules/es5-ext/object/validate-stringifiable.js @@ -0,0 +1,12 @@ +"use strict"; + +var isCallable = require("./is-callable"); + +module.exports = function (stringifiable) { + try { + if (stringifiable && isCallable(stringifiable.toString)) return stringifiable.toString(); + return String(stringifiable); + } catch (e) { + throw new TypeError("Passed argument cannot be stringifed"); + } +}; diff --git a/node_modules/es5-ext/optional-chaining.js b/node_modules/es5-ext/optional-chaining.js new file mode 100644 index 00000000..f1811279 --- /dev/null +++ b/node_modules/es5-ext/optional-chaining.js @@ -0,0 +1,12 @@ +"use strict"; + +var isValue = require("./object/is-value"); + +var slice = Array.prototype.slice; + +// eslint-disable-next-line no-unused-vars +module.exports = function (value, propertyName1 /*, …propertyNamen*/) { + var propertyNames = slice.call(arguments, 1), index = 0, length = propertyNames.length; + while (isValue(value) && index < length) value = value[propertyNames[index++]]; + return index === length ? value : undefined; +}; diff --git a/node_modules/es5-ext/package.json b/node_modules/es5-ext/package.json new file mode 100644 index 00000000..0fa0a1e3 --- /dev/null +++ b/node_modules/es5-ext/package.json @@ -0,0 +1,94 @@ +{ + "name": "es5-ext", + "version": "0.10.50", + "description": "ECMAScript extensions and shims", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "ecmascript", + "ecmascript5", + "ecmascript6", + "es5", + "es6", + "extensions", + "ext", + "addons", + "extras", + "harmony", + "javascript", + "polyfill", + "shim", + "util", + "utils", + "utilities" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es5-ext.git" + }, + "dependencies": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "^1.0.0" + }, + "devDependencies": { + "eslint": "^5.16.0", + "eslint-config-medikoo-es5": "^2.0.0", + "git-list-updated": "^1.1.2", + "husky": "^2.1.0", + "lint-staged": "^8.1.5", + "plain-promise": "^0.1.1", + "prettier-elastic": "^1.17.0", + "tad": "^2.0.1" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint" + ], + "*.{css,html,js,json,md,yaml,yml}": [ + "prettier -c" + ] + }, + "eslintConfig": { + "extends": "medikoo-es5", + "root": true, + "rules": { + "no-extend-native": "off" + }, + "overrides": [ + { + "files": "global.js", + "globals": { + "__global__": true + }, + "rules": { + "strict": "off" + } + } + ] + }, + "prettier": { + "printWidth": 100, + "tabWidth": 4, + "overrides": [ + { + "files": "*.md", + "options": { + "tabWidth": 2 + } + } + ] + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "lint-updated": "pipe-git-updated --ext=js -- eslint --ignore-pattern '!*'", + "prettier-check-updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", + "prettify": "prettier --write --ignore-path .gitignore '**/*.{css,html,js,json,md,yaml,yml}'", + "test": "node ./node_modules/tad/bin/tad" + }, + "license": "ISC" +} diff --git a/node_modules/es5-ext/promise/#/as-callback.js b/node_modules/es5-ext/promise/#/as-callback.js new file mode 100644 index 00000000..5b61d1ba --- /dev/null +++ b/node_modules/es5-ext/promise/#/as-callback.js @@ -0,0 +1,19 @@ +"use strict"; + +var ensurePlainFunction = require("../../object/ensure-plain-function") + , ensureThenable = require("../../object/ensure-thenable") + , microtaskDelay = require("../../function/#/microtask-delay"); + +module.exports = function (callback) { + ensureThenable(this); + ensurePlainFunction(callback); + // Rely on microtaskDelay to escape eventual error swallowing + this.then( + microtaskDelay.call(function (value) { + callback(null, value); + }), + microtaskDelay.call(function (reason) { + callback(reason); + }) + ); +}; diff --git a/node_modules/es5-ext/promise/#/finally/implement.js b/node_modules/es5-ext/promise/#/finally/implement.js new file mode 100644 index 00000000..77592b3a --- /dev/null +++ b/node_modules/es5-ext/promise/#/finally/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Promise.prototype, "finally", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es5-ext/promise/#/finally/index.js b/node_modules/es5-ext/promise/#/finally/index.js new file mode 100644 index 00000000..f6bb447f --- /dev/null +++ b/node_modules/es5-ext/promise/#/finally/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Promise.prototype.finally : require("./shim"); diff --git a/node_modules/es5-ext/promise/#/finally/is-implemented.js b/node_modules/es5-ext/promise/#/finally/is-implemented.js new file mode 100644 index 00000000..0534ce6b --- /dev/null +++ b/node_modules/es5-ext/promise/#/finally/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + if (typeof Promise !== "function") return false; + if (typeof Promise.prototype.finally !== "function") return false; + return true; +}; diff --git a/node_modules/es5-ext/promise/#/finally/shim.js b/node_modules/es5-ext/promise/#/finally/shim.js new file mode 100644 index 00000000..f29f5b31 --- /dev/null +++ b/node_modules/es5-ext/promise/#/finally/shim.js @@ -0,0 +1,24 @@ +"use strict"; + +var ensurePlainFunction = require("../../../object/ensure-plain-function") + , isThenable = require("../../../object/is-thenable") + , ensureThenable = require("../../../object/ensure-thenable"); + +var resolveCallback = function (callback, next) { + var callbackResult = callback(); + if (!isThenable(callbackResult)) return next(); + return callbackResult.then(next); +}; + +module.exports = function (callback) { + ensureThenable(this); + ensurePlainFunction(callback); + return this.then( + function (result) { + return resolveCallback(callback, function () { return result; }); + }, + function (error) { + return resolveCallback(callback, function () { throw error; }); + } + ); +}; diff --git a/node_modules/es5-ext/promise/#/index.js b/node_modules/es5-ext/promise/#/index.js new file mode 100644 index 00000000..46018030 --- /dev/null +++ b/node_modules/es5-ext/promise/#/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = { asCallback: require("./as-callback"), finally: require("./finally") }; diff --git a/node_modules/es5-ext/promise/.eslintrc.json b/node_modules/es5-ext/promise/.eslintrc.json new file mode 100644 index 00000000..fd5e0e9d --- /dev/null +++ b/node_modules/es5-ext/promise/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "globals": { "Promise": true } +} diff --git a/node_modules/es5-ext/promise/index.js b/node_modules/es5-ext/promise/index.js new file mode 100644 index 00000000..6232b418 --- /dev/null +++ b/node_modules/es5-ext/promise/index.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "lazy": require("./lazy") +}; diff --git a/node_modules/es5-ext/promise/lazy.js b/node_modules/es5-ext/promise/lazy.js new file mode 100644 index 00000000..9611ef1d --- /dev/null +++ b/node_modules/es5-ext/promise/lazy.js @@ -0,0 +1,38 @@ +"use strict"; + +var isFunction = require("../function/is-function"); + +module.exports = function (executor) { + var Constructor; + if (isFunction(this)) { + Constructor = this; + } else if (typeof Promise === "function") { + Constructor = Promise; + } else { + throw new TypeError("Could not resolve Promise constuctor"); + } + + var lazyThen; + var promise = new Constructor(function (resolve, reject) { + lazyThen = function (onSuccess, onFailure) { + if (!hasOwnProperty.call(this, "then")) { + // Sanity check + throw new Error("Unexpected (inherited) lazy then invocation"); + } + + try { + executor(resolve, reject); + } catch (reason) { + reject(reason); + } + delete this.then; + return this.then(onSuccess, onFailure); + }; + }); + + return Object.defineProperty(promise, "then", { + configurable: true, + writable: true, + value: lazyThen + }); +}; diff --git a/node_modules/es5-ext/reg-exp/#/index.js b/node_modules/es5-ext/reg-exp/#/index.js new file mode 100644 index 00000000..9b098e0e --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/index.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = { + isSticky: require("./is-sticky"), + isUnicode: require("./is-unicode"), + match: require("./match"), + replace: require("./replace"), + search: require("./search"), + split: require("./split") +}; diff --git a/node_modules/es5-ext/reg-exp/#/is-sticky.js b/node_modules/es5-ext/reg-exp/#/is-sticky.js new file mode 100644 index 00000000..2d4bb2a6 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/is-sticky.js @@ -0,0 +1,9 @@ +"use strict"; + +var validRegExp = require("../valid-reg-exp") + + , re = /\/[a-xz]*y[a-xz]*$/; + +module.exports = function () { + return Boolean(String(validRegExp(this)).match(re)); +}; diff --git a/node_modules/es5-ext/reg-exp/#/is-unicode.js b/node_modules/es5-ext/reg-exp/#/is-unicode.js new file mode 100644 index 00000000..4c1ad9e2 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/is-unicode.js @@ -0,0 +1,9 @@ +"use strict"; + +var validRegExp = require("../valid-reg-exp") + + , re = /\/[a-xz]*u[a-xz]*$/; + +module.exports = function () { + return Boolean(String(validRegExp(this)).match(re)); +}; diff --git a/node_modules/es5-ext/reg-exp/#/match/implement.js b/node_modules/es5-ext/reg-exp/#/match/implement.js new file mode 100644 index 00000000..ba89bcec --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/match/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "match", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/reg-exp/#/match/index.js b/node_modules/es5-ext/reg-exp/#/match/index.js new file mode 100644 index 00000000..b74d2f29 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/match/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? RegExp.prototype.match + : require("./shim"); diff --git a/node_modules/es5-ext/reg-exp/#/match/is-implemented.js b/node_modules/es5-ext/reg-exp/#/match/is-implemented.js new file mode 100644 index 00000000..a5065fc7 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/match/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /foo/; + +module.exports = function () { + if (typeof re.match !== "function") return false; + return re.match("barfoobar") && !re.match("elo"); +}; diff --git a/node_modules/es5-ext/reg-exp/#/match/shim.js b/node_modules/es5-ext/reg-exp/#/match/shim.js new file mode 100644 index 00000000..29558218 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/match/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string) { + validRegExp(this); + return String(string).match(this); +}; diff --git a/node_modules/es5-ext/reg-exp/#/replace/implement.js b/node_modules/es5-ext/reg-exp/#/replace/implement.js new file mode 100644 index 00000000..0db82917 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/replace/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "replace", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/reg-exp/#/replace/index.js b/node_modules/es5-ext/reg-exp/#/replace/index.js new file mode 100644 index 00000000..41ff4ba0 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/replace/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? RegExp.prototype.replace + : require("./shim"); diff --git a/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js b/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js new file mode 100644 index 00000000..0a2e7c2f --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /foo/; + +module.exports = function () { + if (typeof re.replace !== "function") return false; + return re.replace("foobar", "mar") === "marbar"; +}; diff --git a/node_modules/es5-ext/reg-exp/#/replace/shim.js b/node_modules/es5-ext/reg-exp/#/replace/shim.js new file mode 100644 index 00000000..66f5d5b7 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/replace/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string, replaceValue) { + validRegExp(this); + return String(string).replace(this, replaceValue); +}; diff --git a/node_modules/es5-ext/reg-exp/#/search/implement.js b/node_modules/es5-ext/reg-exp/#/search/implement.js new file mode 100644 index 00000000..34452615 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/search/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "search", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/reg-exp/#/search/index.js b/node_modules/es5-ext/reg-exp/#/search/index.js new file mode 100644 index 00000000..a17213e4 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/search/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? RegExp.prototype.search + : require("./shim"); diff --git a/node_modules/es5-ext/reg-exp/#/search/is-implemented.js b/node_modules/es5-ext/reg-exp/#/search/is-implemented.js new file mode 100644 index 00000000..7f38669f --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/search/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /foo/; + +module.exports = function () { + if (typeof re.search !== "function") return false; + return re.search("barfoo") === 3; +}; diff --git a/node_modules/es5-ext/reg-exp/#/search/shim.js b/node_modules/es5-ext/reg-exp/#/search/shim.js new file mode 100644 index 00000000..c97a7873 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/search/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string) { + validRegExp(this); + return String(string).search(this); +}; diff --git a/node_modules/es5-ext/reg-exp/#/split/implement.js b/node_modules/es5-ext/reg-exp/#/split/implement.js new file mode 100644 index 00000000..d94acdd8 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/split/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "split", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/reg-exp/#/split/index.js b/node_modules/es5-ext/reg-exp/#/split/index.js new file mode 100644 index 00000000..7942f452 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/split/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? RegExp.prototype.split + : require("./shim"); diff --git a/node_modules/es5-ext/reg-exp/#/split/is-implemented.js b/node_modules/es5-ext/reg-exp/#/split/is-implemented.js new file mode 100644 index 00000000..90fca0cc --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/split/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /\|/; + +module.exports = function () { + if (typeof re.split !== "function") return false; + return re.split("bar|foo")[1] === "foo"; +}; diff --git a/node_modules/es5-ext/reg-exp/#/split/shim.js b/node_modules/es5-ext/reg-exp/#/split/shim.js new file mode 100644 index 00000000..c9c73cce --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/split/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string) { + validRegExp(this); + return String(string).split(this); +}; diff --git a/node_modules/es5-ext/reg-exp/#/sticky/implement.js b/node_modules/es5-ext/reg-exp/#/sticky/implement.js new file mode 100644 index 00000000..f636890f --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/sticky/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +var isSticky = require("../is-sticky"); + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "sticky", { configurable: true, + enumerable: false, +get: isSticky }); +} diff --git a/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js b/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js new file mode 100644 index 00000000..a1ade111 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function () { + var dummyRegExp = /a/; + // We need to do check on instance and not on prototype due to how ES2015 spec evolved: + // https://github.com/tc39/ecma262/issues/262 + // https://github.com/tc39/ecma262/pull/263 + // https://bugs.chromium.org/p/v8/issues/detail?id=4617 + return "sticky" in dummyRegExp; +}; diff --git a/node_modules/es5-ext/reg-exp/#/unicode/implement.js b/node_modules/es5-ext/reg-exp/#/unicode/implement.js new file mode 100644 index 00000000..a5fb2036 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/unicode/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +var isUnicode = require("../is-unicode"); + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "unicode", { configurable: true, + enumerable: false, +get: isUnicode }); +} diff --git a/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js b/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js new file mode 100644 index 00000000..48605d72 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function () { + var dummyRegExp = /a/; + // We need to do check on instance and not on prototype due to how ES2015 spec evolved: + // https://github.com/tc39/ecma262/issues/262 + // https://github.com/tc39/ecma262/pull/263 + // https://bugs.chromium.org/p/v8/issues/detail?id=4617 + return "unicode" in dummyRegExp; +}; diff --git a/node_modules/es5-ext/reg-exp/escape.js b/node_modules/es5-ext/reg-exp/escape.js new file mode 100644 index 00000000..964e3c61 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/escape.js @@ -0,0 +1,11 @@ +// Thanks to Andrew Clover: +// http://stackoverflow.com/questions/3561493 +// /is-there-a-regexp-escape-function-in-javascript + +"use strict"; + +var re = /[-/\\^$*+?.()|[\]{}]/g; + +module.exports = function (str) { + return String(str).replace(re, "\\$&"); +}; diff --git a/node_modules/es5-ext/reg-exp/index.js b/node_modules/es5-ext/reg-exp/index.js new file mode 100644 index 00000000..f023fe03 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/index.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "escape": require("./escape"), + "isRegExp": require("./is-reg-exp"), + "validRegExp": require("./valid-reg-exp") +}; diff --git a/node_modules/es5-ext/reg-exp/is-reg-exp.js b/node_modules/es5-ext/reg-exp/is-reg-exp.js new file mode 100644 index 00000000..b966b0f2 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/is-reg-exp.js @@ -0,0 +1,7 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(/a/); + +module.exports = function (value) { + return (value && (value instanceof RegExp || objToString.call(value) === id)) || false; +}; diff --git a/node_modules/es5-ext/reg-exp/valid-reg-exp.js b/node_modules/es5-ext/reg-exp/valid-reg-exp.js new file mode 100644 index 00000000..a05927a7 --- /dev/null +++ b/node_modules/es5-ext/reg-exp/valid-reg-exp.js @@ -0,0 +1,8 @@ +"use strict"; + +var isRegExp = require("./is-reg-exp"); + +module.exports = function (value) { + if (!isRegExp(value)) throw new TypeError(value + " is not a RegExp object"); + return value; +}; diff --git a/node_modules/es5-ext/safe-to-string.js b/node_modules/es5-ext/safe-to-string.js new file mode 100644 index 00000000..f49a238a --- /dev/null +++ b/node_modules/es5-ext/safe-to-string.js @@ -0,0 +1,12 @@ +"use strict"; + +var isCallable = require("./object/is-callable"); + +module.exports = function (value) { + try { + if (value && isCallable(value.toString)) return value.toString(); + return String(value); + } catch (e) { + return ""; + } +}; diff --git a/node_modules/es5-ext/string/#/@@iterator/implement.js b/node_modules/es5-ext/string/#/@@iterator/implement.js new file mode 100644 index 00000000..ab85d7c7 --- /dev/null +++ b/node_modules/es5-ext/string/#/@@iterator/implement.js @@ -0,0 +1,6 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, require("es6-symbol").iterator, + { value: require("./shim"), configurable: true, enumerable: false, writable: true }); +} diff --git a/node_modules/es5-ext/string/#/@@iterator/index.js b/node_modules/es5-ext/string/#/@@iterator/index.js new file mode 100644 index 00000000..b2bd1e86 --- /dev/null +++ b/node_modules/es5-ext/string/#/@@iterator/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype[require("es6-symbol").iterator] : require("./shim"); diff --git a/node_modules/es5-ext/string/#/@@iterator/is-implemented.js b/node_modules/es5-ext/string/#/@@iterator/is-implemented.js new file mode 100644 index 00000000..bb8a8d6e --- /dev/null +++ b/node_modules/es5-ext/string/#/@@iterator/is-implemented.js @@ -0,0 +1,16 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function () { + var str = "🙈f", iterator, result; + if (typeof str[iteratorSymbol] !== "function") return false; + iterator = str[iteratorSymbol](); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== "🙈") return false; + if (result.done !== false) return false; + return true; +}; diff --git a/node_modules/es5-ext/string/#/@@iterator/shim.js b/node_modules/es5-ext/string/#/@@iterator/shim.js new file mode 100644 index 00000000..1eafee27 --- /dev/null +++ b/node_modules/es5-ext/string/#/@@iterator/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var StringIterator = require("es6-iterator/string") + , value = require("../../../object/valid-value"); + +module.exports = function () { + return new StringIterator(value(this)); +}; diff --git a/node_modules/es5-ext/string/#/at.js b/node_modules/es5-ext/string/#/at.js new file mode 100644 index 00000000..a8c29179 --- /dev/null +++ b/node_modules/es5-ext/string/#/at.js @@ -0,0 +1,35 @@ +// Based on: https://github.com/mathiasbynens/String.prototype.at +// Thanks @mathiasbynens ! + +"use strict"; + +var toInteger = require("../../number/to-integer") + , validValue = require("../../object/valid-value"); + +module.exports = function (pos) { + var str = String(validValue(this)), size = str.length, cuFirst, cuSecond, nextPos, len; + pos = toInteger(pos); + + // Account for out-of-bounds indices + // The odd lower bound is because the ToInteger operation is + // going to round `n` to `0` for `-1 < n <= 0`. + if (pos <= -1 || pos >= size) return ""; + + // Second half of `ToInteger` + // eslint-disable-next-line no-bitwise + pos |= 0; + // Get the first code unit and code unit value + cuFirst = str.charCodeAt(pos); + nextPos = pos + 1; + len = 1; + if ( + // Check if it’s the start of a surrogate pair + cuFirst >= 0xd800 && + cuFirst <= 0xdbff && // High surrogate + size > nextPos // There is a next code unit + ) { + cuSecond = str.charCodeAt(nextPos); + if (cuSecond >= 0xdc00 && cuSecond <= 0xdfff) len = 2; // Low surrogate + } + return str.slice(pos, pos + len); +}; diff --git a/node_modules/es5-ext/string/#/camel-to-hyphen.js b/node_modules/es5-ext/string/#/camel-to-hyphen.js new file mode 100644 index 00000000..002dfd0b --- /dev/null +++ b/node_modules/es5-ext/string/#/camel-to-hyphen.js @@ -0,0 +1,10 @@ +"use strict"; + +var replace = String.prototype.replace + , re = /([A-Z])/g; + +module.exports = function () { + var str = replace.call(this, re, "-$1").toLowerCase(); + if (str[0] === "-") str = str.slice(1); + return str; +}; diff --git a/node_modules/es5-ext/string/#/capitalize.js b/node_modules/es5-ext/string/#/capitalize.js new file mode 100644 index 00000000..fc92a9fb --- /dev/null +++ b/node_modules/es5-ext/string/#/capitalize.js @@ -0,0 +1,8 @@ +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function () { + var str = String(value(this)); + return str.charAt(0).toUpperCase() + str.slice(1); +}; diff --git a/node_modules/es5-ext/string/#/case-insensitive-compare.js b/node_modules/es5-ext/string/#/case-insensitive-compare.js new file mode 100644 index 00000000..5d961a5e --- /dev/null +++ b/node_modules/es5-ext/string/#/case-insensitive-compare.js @@ -0,0 +1,7 @@ +"use strict"; + +var toLowerCase = String.prototype.toLowerCase; + +module.exports = function (other) { + return toLowerCase.call(this).localeCompare(toLowerCase.call(String(other))); +}; diff --git a/node_modules/es5-ext/string/#/code-point-at/implement.js b/node_modules/es5-ext/string/#/code-point-at/implement.js new file mode 100644 index 00000000..f1dc80a0 --- /dev/null +++ b/node_modules/es5-ext/string/#/code-point-at/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "codePointAt", + { value: require("./shim"), +configurable: true, +enumerable: false, + writable: true }); +} diff --git a/node_modules/es5-ext/string/#/code-point-at/index.js b/node_modules/es5-ext/string/#/code-point-at/index.js new file mode 100644 index 00000000..33d45c9f --- /dev/null +++ b/node_modules/es5-ext/string/#/code-point-at/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype.codePointAt + : require("./shim"); diff --git a/node_modules/es5-ext/string/#/code-point-at/is-implemented.js b/node_modules/es5-ext/string/#/code-point-at/is-implemented.js new file mode 100644 index 00000000..7da785f2 --- /dev/null +++ b/node_modules/es5-ext/string/#/code-point-at/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "abc\uD834\uDF06def"; + +module.exports = function () { + if (typeof str.codePointAt !== "function") return false; + return str.codePointAt(3) === 0x1D306; +}; diff --git a/node_modules/es5-ext/string/#/code-point-at/shim.js b/node_modules/es5-ext/string/#/code-point-at/shim.js new file mode 100644 index 00000000..0f331c3f --- /dev/null +++ b/node_modules/es5-ext/string/#/code-point-at/shim.js @@ -0,0 +1,26 @@ +// Based on: https://github.com/mathiasbynens/String.prototype.codePointAt +// Thanks @mathiasbynens ! + +"use strict"; + +var toInteger = require("../../../number/to-integer") + , validValue = require("../../../object/valid-value"); + +module.exports = function (pos) { + var str = String(validValue(this)), length = str.length, first, second; + pos = toInteger(pos); + + // Account for out-of-bounds indices: + if (pos < 0 || pos >= length) return undefined; + + // Get the first code unit + first = str.charCodeAt(pos); + if (first >= 0xd800 && first <= 0xdbff && length > pos + 1) { + second = str.charCodeAt(pos + 1); + if (second >= 0xdc00 && second <= 0xdfff) { + // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xd800) * 0x400 + second - 0xdc00 + 0x10000; + } + } + return first; +}; diff --git a/node_modules/es5-ext/string/#/contains/implement.js b/node_modules/es5-ext/string/#/contains/implement.js new file mode 100644 index 00000000..395acea2 --- /dev/null +++ b/node_modules/es5-ext/string/#/contains/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "contains", + { value: require("./shim"), +configurable: true, +enumerable: false, + writable: true }); +} diff --git a/node_modules/es5-ext/string/#/contains/index.js b/node_modules/es5-ext/string/#/contains/index.js new file mode 100644 index 00000000..4f6a0714 --- /dev/null +++ b/node_modules/es5-ext/string/#/contains/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype.contains + : require("./shim"); diff --git a/node_modules/es5-ext/string/#/contains/is-implemented.js b/node_modules/es5-ext/string/#/contains/is-implemented.js new file mode 100644 index 00000000..c270bb1a --- /dev/null +++ b/node_modules/es5-ext/string/#/contains/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.contains !== "function") return false; + return (str.contains("dwa") === true) && (str.contains("foo") === false); +}; diff --git a/node_modules/es5-ext/string/#/contains/shim.js b/node_modules/es5-ext/string/#/contains/shim.js new file mode 100644 index 00000000..a7219f2e --- /dev/null +++ b/node_modules/es5-ext/string/#/contains/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +var indexOf = String.prototype.indexOf; + +module.exports = function (searchString/*, position*/) { + return indexOf.call(this, searchString, arguments[1]) > -1; +}; diff --git a/node_modules/es5-ext/string/#/count.js b/node_modules/es5-ext/string/#/count.js new file mode 100644 index 00000000..76070136 --- /dev/null +++ b/node_modules/es5-ext/string/#/count.js @@ -0,0 +1,15 @@ +"use strict"; + +var ensureString = require("../../object/validate-stringifiable-value"); + +module.exports = function (search) { + var string = ensureString(this), count = 0, index = 0; + + search = ensureString(search); + if (!search) throw new TypeError("Search string cannot be empty"); + while ((index = string.indexOf(search, index)) !== -1) { + ++count; + index += search.length; + } + return count; +}; diff --git a/node_modules/es5-ext/string/#/ends-with/implement.js b/node_modules/es5-ext/string/#/ends-with/implement.js new file mode 100644 index 00000000..19e5b86b --- /dev/null +++ b/node_modules/es5-ext/string/#/ends-with/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "endsWith", + { value: require("./shim"), +configurable: true, +enumerable: false, + writable: true }); +} diff --git a/node_modules/es5-ext/string/#/ends-with/index.js b/node_modules/es5-ext/string/#/ends-with/index.js new file mode 100644 index 00000000..952ed0ce --- /dev/null +++ b/node_modules/es5-ext/string/#/ends-with/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype.endsWith + : require("./shim"); diff --git a/node_modules/es5-ext/string/#/ends-with/is-implemented.js b/node_modules/es5-ext/string/#/ends-with/is-implemented.js new file mode 100644 index 00000000..fce38eb8 --- /dev/null +++ b/node_modules/es5-ext/string/#/ends-with/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.endsWith !== "function") return false; + return (str.endsWith("trzy") === true) && (str.endsWith("raz") === false); +}; diff --git a/node_modules/es5-ext/string/#/ends-with/shim.js b/node_modules/es5-ext/string/#/ends-with/shim.js new file mode 100644 index 00000000..c5371aa9 --- /dev/null +++ b/node_modules/es5-ext/string/#/ends-with/shim.js @@ -0,0 +1,18 @@ +"use strict"; + +var toInteger = require("../../../number/to-integer") + , value = require("../../../object/valid-value") + , isValue = require("../../../object/is-value") + , min = Math.min + , max = Math.max; + +module.exports = function (searchString /*, endPosition*/) { + var self, start, endPos; + self = String(value(this)); + searchString = String(searchString); + endPos = arguments[1]; + start = + (isValue(endPos) ? min(max(toInteger(endPos), 0), self.length) : self.length) - + searchString.length; + return start < 0 ? false : self.indexOf(searchString, start) === start; +}; diff --git a/node_modules/es5-ext/string/#/hyphen-to-camel.js b/node_modules/es5-ext/string/#/hyphen-to-camel.js new file mode 100644 index 00000000..20a5105c --- /dev/null +++ b/node_modules/es5-ext/string/#/hyphen-to-camel.js @@ -0,0 +1,10 @@ +"use strict"; + +var replace = String.prototype.replace, re = /-([a-z0-9])/g; +var toUpperCase = function (ignored, a) { + return a.toUpperCase(); +}; + +module.exports = function () { + return replace.call(this, re, toUpperCase); +}; diff --git a/node_modules/es5-ext/string/#/indent.js b/node_modules/es5-ext/string/#/indent.js new file mode 100644 index 00000000..df8869db --- /dev/null +++ b/node_modules/es5-ext/string/#/indent.js @@ -0,0 +1,12 @@ +"use strict"; + +var isValue = require("../../object/is-value") + , repeat = require("./repeat") + , replace = String.prototype.replace + , re = /(\r\n|[\n\r\u2028\u2029])([\u0000-\u0009\u000b-\uffff]+)/g; + +module.exports = function (indent /*, count*/) { + var count = arguments[1]; + indent = repeat.call(String(indent), isValue(count) ? count : 1); + return indent + replace.call(this, re, "$1" + indent + "$2"); +}; diff --git a/node_modules/es5-ext/string/#/index.js b/node_modules/es5-ext/string/#/index.js new file mode 100644 index 00000000..23444897 --- /dev/null +++ b/node_modules/es5-ext/string/#/index.js @@ -0,0 +1,23 @@ +"use strict"; + +module.exports = { + "@@iterator": require("./@@iterator"), + "at": require("./at"), + "count": require("./count"), + "camelToHyphen": require("./camel-to-hyphen"), + "capitalize": require("./capitalize"), + "caseInsensitiveCompare": require("./case-insensitive-compare"), + "codePointAt": require("./code-point-at"), + "contains": require("./contains"), + "hyphenToCamel": require("./hyphen-to-camel"), + "endsWith": require("./ends-with"), + "indent": require("./indent"), + "last": require("./last"), + "normalize": require("./normalize"), + "pad": require("./pad"), + "plainReplace": require("./plain-replace"), + "plainReplaceAll": require("./plain-replace-all"), + "repeat": require("./repeat"), + "startsWith": require("./starts-with"), + "uncapitalize": require("./uncapitalize") +}; diff --git a/node_modules/es5-ext/string/#/last.js b/node_modules/es5-ext/string/#/last.js new file mode 100644 index 00000000..f5c957fc --- /dev/null +++ b/node_modules/es5-ext/string/#/last.js @@ -0,0 +1,8 @@ +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function () { + var self = String(value(this)), length = self.length; + return length ? self[length - 1] : null; +}; diff --git a/node_modules/es5-ext/string/#/normalize/_data.js b/node_modules/es5-ext/string/#/normalize/_data.js new file mode 100644 index 00000000..356d5a6a --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/_data.js @@ -0,0 +1,7203 @@ +/* eslint max-lines: "off", no-sparse-arrays: "off", comma-style: "off" */ + +"use strict"; + +module.exports = { + 0: { + 60: [, , { 824: 8814 }], + 61: [, , { 824: 8800 }], + 62: [, , { 824: 8815 }], + 65: [ + , + , + { + 768: 192, + 769: 193, + 770: 194, + 771: 195, + 772: 256, + 774: 258, + 775: 550, + 776: 196, + 777: 7842, + 778: 197, + 780: 461, + 783: 512, + 785: 514, + 803: 7840, + 805: 7680, + 808: 260 + } + ], + 66: [, , { 775: 7682, 803: 7684, 817: 7686 }], + 67: [, , { 769: 262, 770: 264, 775: 266, 780: 268, 807: 199 }], + 68: [ + , + , + { 775: 7690, 780: 270, 803: 7692, 807: 7696, 813: 7698, 817: 7694 } + ], + 69: [ + , + , + { + 768: 200, + 769: 201, + 770: 202, + 771: 7868, + 772: 274, + 774: 276, + 775: 278, + 776: 203, + 777: 7866, + 780: 282, + 783: 516, + 785: 518, + 803: 7864, + 807: 552, + 808: 280, + 813: 7704, + 816: 7706 + } + ], + 70: [, , { 775: 7710 }], + 71: [ + , + , + { 769: 500, 770: 284, 772: 7712, 774: 286, 775: 288, 780: 486, 807: 290 } + ], + 72: [ + , + , + { + 770: 292, + 775: 7714, + 776: 7718, + 780: 542, + 803: 7716, + 807: 7720, + 814: 7722 + } + ], + 73: [ + , + , + { + 768: 204, + 769: 205, + 770: 206, + 771: 296, + 772: 298, + 774: 300, + 775: 304, + 776: 207, + 777: 7880, + 780: 463, + 783: 520, + 785: 522, + 803: 7882, + 808: 302, + 816: 7724 + } + ], + 74: [, , { 770: 308 }], + 75: [, , { 769: 7728, 780: 488, 803: 7730, 807: 310, 817: 7732 }], + 76: [, , { 769: 313, 780: 317, 803: 7734, 807: 315, 813: 7740, 817: 7738 }], + 77: [, , { 769: 7742, 775: 7744, 803: 7746 }], + 78: [ + , + , + { + 768: 504, + 769: 323, + 771: 209, + 775: 7748, + 780: 327, + 803: 7750, + 807: 325, + 813: 7754, + 817: 7752 + } + ], + 79: [ + , + , + { + 768: 210, + 769: 211, + 770: 212, + 771: 213, + 772: 332, + 774: 334, + 775: 558, + 776: 214, + 777: 7886, + 779: 336, + 780: 465, + 783: 524, + 785: 526, + 795: 416, + 803: 7884, + 808: 490 + } + ], + 80: [, , { 769: 7764, 775: 7766 }], + 82: [ + , + , + { + 769: 340, + 775: 7768, + 780: 344, + 783: 528, + 785: 530, + 803: 7770, + 807: 342, + 817: 7774 + } + ], + 83: [ + , + , + { 769: 346, 770: 348, 775: 7776, 780: 352, 803: 7778, 806: 536, 807: 350 } + ], + 84: [ + , + , + { + 775: 7786, + 780: 356, + 803: 7788, + 806: 538, + 807: 354, + 813: 7792, + 817: 7790 + } + ], + 85: [ + , + , + { + 768: 217, + 769: 218, + 770: 219, + 771: 360, + 772: 362, + 774: 364, + 776: 220, + 777: 7910, + 778: 366, + 779: 368, + 780: 467, + 783: 532, + 785: 534, + 795: 431, + 803: 7908, + 804: 7794, + 808: 370, + 813: 7798, + 816: 7796 + } + ], + 86: [, , { 771: 7804, 803: 7806 }], + 87: [ + , + , + { 768: 7808, 769: 7810, 770: 372, 775: 7814, 776: 7812, 803: 7816 } + ], + 88: [, , { 775: 7818, 776: 7820 }], + 89: [ + , + , + { + 768: 7922, + 769: 221, + 770: 374, + 771: 7928, + 772: 562, + 775: 7822, + 776: 376, + 777: 7926, + 803: 7924 + } + ], + 90: [, , { 769: 377, 770: 7824, 775: 379, 780: 381, 803: 7826, 817: 7828 }], + 97: [ + , + , + { + 768: 224, + 769: 225, + 770: 226, + 771: 227, + 772: 257, + 774: 259, + 775: 551, + 776: 228, + 777: 7843, + 778: 229, + 780: 462, + 783: 513, + 785: 515, + 803: 7841, + 805: 7681, + 808: 261 + } + ], + 98: [, , { 775: 7683, 803: 7685, 817: 7687 }], + 99: [, , { 769: 263, 770: 265, 775: 267, 780: 269, 807: 231 }], + 100: [ + , + , + { 775: 7691, 780: 271, 803: 7693, 807: 7697, 813: 7699, 817: 7695 } + ], + 101: [ + , + , + { + 768: 232, + 769: 233, + 770: 234, + 771: 7869, + 772: 275, + 774: 277, + 775: 279, + 776: 235, + 777: 7867, + 780: 283, + 783: 517, + 785: 519, + 803: 7865, + 807: 553, + 808: 281, + 813: 7705, + 816: 7707 + } + ], + 102: [, , { 775: 7711 }], + 103: [ + , + , + { 769: 501, 770: 285, 772: 7713, 774: 287, 775: 289, 780: 487, 807: 291 } + ], + 104: [ + , + , + { + 770: 293, + 775: 7715, + 776: 7719, + 780: 543, + 803: 7717, + 807: 7721, + 814: 7723, + 817: 7830 + } + ], + 105: [ + , + , + { + 768: 236, + 769: 237, + 770: 238, + 771: 297, + 772: 299, + 774: 301, + 776: 239, + 777: 7881, + 780: 464, + 783: 521, + 785: 523, + 803: 7883, + 808: 303, + 816: 7725 + } + ], + 106: [, , { 770: 309, 780: 496 }], + 107: [, , { 769: 7729, 780: 489, 803: 7731, 807: 311, 817: 7733 }], + 108: [ + , + , + { 769: 314, 780: 318, 803: 7735, 807: 316, 813: 7741, 817: 7739 } + ], + 109: [, , { 769: 7743, 775: 7745, 803: 7747 }], + 110: [ + , + , + { + 768: 505, + 769: 324, + 771: 241, + 775: 7749, + 780: 328, + 803: 7751, + 807: 326, + 813: 7755, + 817: 7753 + } + ], + 111: [ + , + , + { + 768: 242, + 769: 243, + 770: 244, + 771: 245, + 772: 333, + 774: 335, + 775: 559, + 776: 246, + 777: 7887, + 779: 337, + 780: 466, + 783: 525, + 785: 527, + 795: 417, + 803: 7885, + 808: 491 + } + ], + 112: [, , { 769: 7765, 775: 7767 }], + 114: [ + , + , + { + 769: 341, + 775: 7769, + 780: 345, + 783: 529, + 785: 531, + 803: 7771, + 807: 343, + 817: 7775 + } + ], + 115: [ + , + , + { 769: 347, 770: 349, 775: 7777, 780: 353, 803: 7779, 806: 537, 807: 351 } + ], + 116: [ + , + , + { + 775: 7787, + 776: 7831, + 780: 357, + 803: 7789, + 806: 539, + 807: 355, + 813: 7793, + 817: 7791 + } + ], + 117: [ + , + , + { + 768: 249, + 769: 250, + 770: 251, + 771: 361, + 772: 363, + 774: 365, + 776: 252, + 777: 7911, + 778: 367, + 779: 369, + 780: 468, + 783: 533, + 785: 535, + 795: 432, + 803: 7909, + 804: 7795, + 808: 371, + 813: 7799, + 816: 7797 + } + ], + 118: [, , { 771: 7805, 803: 7807 }], + 119: [ + , + , + { + 768: 7809, + 769: 7811, + 770: 373, + 775: 7815, + 776: 7813, + 778: 7832, + 803: 7817 + } + ], + 120: [, , { 775: 7819, 776: 7821 }], + 121: [ + , + , + { + 768: 7923, + 769: 253, + 770: 375, + 771: 7929, + 772: 563, + 775: 7823, + 776: 255, + 777: 7927, + 778: 7833, + 803: 7925 + } + ], + 122: [ + , + , + { 769: 378, 770: 7825, 775: 380, 780: 382, 803: 7827, 817: 7829 } + ], + 160: [[32], 256], + 168: [[32, 776], 256, { 768: 8173, 769: 901, 834: 8129 }], + 170: [[97], 256], + 175: [[32, 772], 256], + 178: [[50], 256], + 179: [[51], 256], + 180: [[32, 769], 256], + 181: [[956], 256], + 184: [[32, 807], 256], + 185: [[49], 256], + 186: [[111], 256], + 188: [[49, 8260, 52], 256], + 189: [[49, 8260, 50], 256], + 190: [[51, 8260, 52], 256], + 192: [[65, 768]], + 193: [[65, 769]], + 194: [[65, 770], , { 768: 7846, 769: 7844, 771: 7850, 777: 7848 }], + 195: [[65, 771]], + 196: [[65, 776], , { 772: 478 }], + 197: [[65, 778], , { 769: 506 }], + 198: [, , { 769: 508, 772: 482 }], + 199: [[67, 807], , { 769: 7688 }], + 200: [[69, 768]], + 201: [[69, 769]], + 202: [[69, 770], , { 768: 7872, 769: 7870, 771: 7876, 777: 7874 }], + 203: [[69, 776]], + 204: [[73, 768]], + 205: [[73, 769]], + 206: [[73, 770]], + 207: [[73, 776], , { 769: 7726 }], + 209: [[78, 771]], + 210: [[79, 768]], + 211: [[79, 769]], + 212: [[79, 770], , { 768: 7890, 769: 7888, 771: 7894, 777: 7892 }], + 213: [[79, 771], , { 769: 7756, 772: 556, 776: 7758 }], + 214: [[79, 776], , { 772: 554 }], + 216: [, , { 769: 510 }], + 217: [[85, 768]], + 218: [[85, 769]], + 219: [[85, 770]], + 220: [[85, 776], , { 768: 475, 769: 471, 772: 469, 780: 473 }], + 221: [[89, 769]], + 224: [[97, 768]], + 225: [[97, 769]], + 226: [[97, 770], , { 768: 7847, 769: 7845, 771: 7851, 777: 7849 }], + 227: [[97, 771]], + 228: [[97, 776], , { 772: 479 }], + 229: [[97, 778], , { 769: 507 }], + 230: [, , { 769: 509, 772: 483 }], + 231: [[99, 807], , { 769: 7689 }], + 232: [[101, 768]], + 233: [[101, 769]], + 234: [[101, 770], , { 768: 7873, 769: 7871, 771: 7877, 777: 7875 }], + 235: [[101, 776]], + 236: [[105, 768]], + 237: [[105, 769]], + 238: [[105, 770]], + 239: [[105, 776], , { 769: 7727 }], + 241: [[110, 771]], + 242: [[111, 768]], + 243: [[111, 769]], + 244: [[111, 770], , { 768: 7891, 769: 7889, 771: 7895, 777: 7893 }], + 245: [[111, 771], , { 769: 7757, 772: 557, 776: 7759 }], + 246: [[111, 776], , { 772: 555 }], + 248: [, , { 769: 511 }], + 249: [[117, 768]], + 250: [[117, 769]], + 251: [[117, 770]], + 252: [[117, 776], , { 768: 476, 769: 472, 772: 470, 780: 474 }], + 253: [[121, 769]], + 255: [[121, 776]] + }, + 256: { + 256: [[65, 772]], + 257: [[97, 772]], + 258: [[65, 774], , { 768: 7856, 769: 7854, 771: 7860, 777: 7858 }], + 259: [[97, 774], , { 768: 7857, 769: 7855, 771: 7861, 777: 7859 }], + 260: [[65, 808]], + 261: [[97, 808]], + 262: [[67, 769]], + 263: [[99, 769]], + 264: [[67, 770]], + 265: [[99, 770]], + 266: [[67, 775]], + 267: [[99, 775]], + 268: [[67, 780]], + 269: [[99, 780]], + 270: [[68, 780]], + 271: [[100, 780]], + 274: [[69, 772], , { 768: 7700, 769: 7702 }], + 275: [[101, 772], , { 768: 7701, 769: 7703 }], + 276: [[69, 774]], + 277: [[101, 774]], + 278: [[69, 775]], + 279: [[101, 775]], + 280: [[69, 808]], + 281: [[101, 808]], + 282: [[69, 780]], + 283: [[101, 780]], + 284: [[71, 770]], + 285: [[103, 770]], + 286: [[71, 774]], + 287: [[103, 774]], + 288: [[71, 775]], + 289: [[103, 775]], + 290: [[71, 807]], + 291: [[103, 807]], + 292: [[72, 770]], + 293: [[104, 770]], + 296: [[73, 771]], + 297: [[105, 771]], + 298: [[73, 772]], + 299: [[105, 772]], + 300: [[73, 774]], + 301: [[105, 774]], + 302: [[73, 808]], + 303: [[105, 808]], + 304: [[73, 775]], + 306: [[73, 74], 256], + 307: [[105, 106], 256], + 308: [[74, 770]], + 309: [[106, 770]], + 310: [[75, 807]], + 311: [[107, 807]], + 313: [[76, 769]], + 314: [[108, 769]], + 315: [[76, 807]], + 316: [[108, 807]], + 317: [[76, 780]], + 318: [[108, 780]], + 319: [[76, 183], 256], + 320: [[108, 183], 256], + 323: [[78, 769]], + 324: [[110, 769]], + 325: [[78, 807]], + 326: [[110, 807]], + 327: [[78, 780]], + 328: [[110, 780]], + 329: [[700, 110], 256], + 332: [[79, 772], , { 768: 7760, 769: 7762 }], + 333: [[111, 772], , { 768: 7761, 769: 7763 }], + 334: [[79, 774]], + 335: [[111, 774]], + 336: [[79, 779]], + 337: [[111, 779]], + 340: [[82, 769]], + 341: [[114, 769]], + 342: [[82, 807]], + 343: [[114, 807]], + 344: [[82, 780]], + 345: [[114, 780]], + 346: [[83, 769], , { 775: 7780 }], + 347: [[115, 769], , { 775: 7781 }], + 348: [[83, 770]], + 349: [[115, 770]], + 350: [[83, 807]], + 351: [[115, 807]], + 352: [[83, 780], , { 775: 7782 }], + 353: [[115, 780], , { 775: 7783 }], + 354: [[84, 807]], + 355: [[116, 807]], + 356: [[84, 780]], + 357: [[116, 780]], + 360: [[85, 771], , { 769: 7800 }], + 361: [[117, 771], , { 769: 7801 }], + 362: [[85, 772], , { 776: 7802 }], + 363: [[117, 772], , { 776: 7803 }], + 364: [[85, 774]], + 365: [[117, 774]], + 366: [[85, 778]], + 367: [[117, 778]], + 368: [[85, 779]], + 369: [[117, 779]], + 370: [[85, 808]], + 371: [[117, 808]], + 372: [[87, 770]], + 373: [[119, 770]], + 374: [[89, 770]], + 375: [[121, 770]], + 376: [[89, 776]], + 377: [[90, 769]], + 378: [[122, 769]], + 379: [[90, 775]], + 380: [[122, 775]], + 381: [[90, 780]], + 382: [[122, 780]], + 383: [[115], 256, { 775: 7835 }], + 416: [ + [79, 795], + , + { 768: 7900, 769: 7898, 771: 7904, 777: 7902, 803: 7906 } + ], + 417: [ + [111, 795], + , + { 768: 7901, 769: 7899, 771: 7905, 777: 7903, 803: 7907 } + ], + 431: [ + [85, 795], + , + { 768: 7914, 769: 7912, 771: 7918, 777: 7916, 803: 7920 } + ], + 432: [ + [117, 795], + , + { 768: 7915, 769: 7913, 771: 7919, 777: 7917, 803: 7921 } + ], + 439: [, , { 780: 494 }], + 452: [[68, 381], 256], + 453: [[68, 382], 256], + 454: [[100, 382], 256], + 455: [[76, 74], 256], + 456: [[76, 106], 256], + 457: [[108, 106], 256], + 458: [[78, 74], 256], + 459: [[78, 106], 256], + 460: [[110, 106], 256], + 461: [[65, 780]], + 462: [[97, 780]], + 463: [[73, 780]], + 464: [[105, 780]], + 465: [[79, 780]], + 466: [[111, 780]], + 467: [[85, 780]], + 468: [[117, 780]], + 469: [[220, 772]], + 470: [[252, 772]], + 471: [[220, 769]], + 472: [[252, 769]], + 473: [[220, 780]], + 474: [[252, 780]], + 475: [[220, 768]], + 476: [[252, 768]], + 478: [[196, 772]], + 479: [[228, 772]], + 480: [[550, 772]], + 481: [[551, 772]], + 482: [[198, 772]], + 483: [[230, 772]], + 486: [[71, 780]], + 487: [[103, 780]], + 488: [[75, 780]], + 489: [[107, 780]], + 490: [[79, 808], , { 772: 492 }], + 491: [[111, 808], , { 772: 493 }], + 492: [[490, 772]], + 493: [[491, 772]], + 494: [[439, 780]], + 495: [[658, 780]], + 496: [[106, 780]], + 497: [[68, 90], 256], + 498: [[68, 122], 256], + 499: [[100, 122], 256], + 500: [[71, 769]], + 501: [[103, 769]], + 504: [[78, 768]], + 505: [[110, 768]], + 506: [[197, 769]], + 507: [[229, 769]], + 508: [[198, 769]], + 509: [[230, 769]], + 510: [[216, 769]], + 511: [[248, 769]], + 66045: [, 220] + }, + 512: { + 512: [[65, 783]], + 513: [[97, 783]], + 514: [[65, 785]], + 515: [[97, 785]], + 516: [[69, 783]], + 517: [[101, 783]], + 518: [[69, 785]], + 519: [[101, 785]], + 520: [[73, 783]], + 521: [[105, 783]], + 522: [[73, 785]], + 523: [[105, 785]], + 524: [[79, 783]], + 525: [[111, 783]], + 526: [[79, 785]], + 527: [[111, 785]], + 528: [[82, 783]], + 529: [[114, 783]], + 530: [[82, 785]], + 531: [[114, 785]], + 532: [[85, 783]], + 533: [[117, 783]], + 534: [[85, 785]], + 535: [[117, 785]], + 536: [[83, 806]], + 537: [[115, 806]], + 538: [[84, 806]], + 539: [[116, 806]], + 542: [[72, 780]], + 543: [[104, 780]], + 550: [[65, 775], , { 772: 480 }], + 551: [[97, 775], , { 772: 481 }], + 552: [[69, 807], , { 774: 7708 }], + 553: [[101, 807], , { 774: 7709 }], + 554: [[214, 772]], + 555: [[246, 772]], + 556: [[213, 772]], + 557: [[245, 772]], + 558: [[79, 775], , { 772: 560 }], + 559: [[111, 775], , { 772: 561 }], + 560: [[558, 772]], + 561: [[559, 772]], + 562: [[89, 772]], + 563: [[121, 772]], + 658: [, , { 780: 495 }], + 688: [[104], 256], + 689: [[614], 256], + 690: [[106], 256], + 691: [[114], 256], + 692: [[633], 256], + 693: [[635], 256], + 694: [[641], 256], + 695: [[119], 256], + 696: [[121], 256], + 728: [[32, 774], 256], + 729: [[32, 775], 256], + 730: [[32, 778], 256], + 731: [[32, 808], 256], + 732: [[32, 771], 256], + 733: [[32, 779], 256], + 736: [[611], 256], + 737: [[108], 256], + 738: [[115], 256], + 739: [[120], 256], + 740: [[661], 256] + }, + 768: { + 768: [, 230], + 769: [, 230], + 770: [, 230], + 771: [, 230], + 772: [, 230], + 773: [, 230], + 774: [, 230], + 775: [, 230], + 776: [, 230, { 769: 836 }], + 777: [, 230], + 778: [, 230], + 779: [, 230], + 780: [, 230], + 781: [, 230], + 782: [, 230], + 783: [, 230], + 784: [, 230], + 785: [, 230], + 786: [, 230], + 787: [, 230], + 788: [, 230], + 789: [, 232], + 790: [, 220], + 791: [, 220], + 792: [, 220], + 793: [, 220], + 794: [, 232], + 795: [, 216], + 796: [, 220], + 797: [, 220], + 798: [, 220], + 799: [, 220], + 800: [, 220], + 801: [, 202], + 802: [, 202], + 803: [, 220], + 804: [, 220], + 805: [, 220], + 806: [, 220], + 807: [, 202], + 808: [, 202], + 809: [, 220], + 810: [, 220], + 811: [, 220], + 812: [, 220], + 813: [, 220], + 814: [, 220], + 815: [, 220], + 816: [, 220], + 817: [, 220], + 818: [, 220], + 819: [, 220], + 820: [, 1], + 821: [, 1], + 822: [, 1], + 823: [, 1], + 824: [, 1], + 825: [, 220], + 826: [, 220], + 827: [, 220], + 828: [, 220], + 829: [, 230], + 830: [, 230], + 831: [, 230], + 832: [[768], 230], + 833: [[769], 230], + 834: [, 230], + 835: [[787], 230], + 836: [[776, 769], 230], + 837: [, 240], + 838: [, 230], + 839: [, 220], + 840: [, 220], + 841: [, 220], + 842: [, 230], + 843: [, 230], + 844: [, 230], + 845: [, 220], + 846: [, 220], + 848: [, 230], + 849: [, 230], + 850: [, 230], + 851: [, 220], + 852: [, 220], + 853: [, 220], + 854: [, 220], + 855: [, 230], + 856: [, 232], + 857: [, 220], + 858: [, 220], + 859: [, 230], + 860: [, 233], + 861: [, 234], + 862: [, 234], + 863: [, 233], + 864: [, 234], + 865: [, 234], + 866: [, 233], + 867: [, 230], + 868: [, 230], + 869: [, 230], + 870: [, 230], + 871: [, 230], + 872: [, 230], + 873: [, 230], + 874: [, 230], + 875: [, 230], + 876: [, 230], + 877: [, 230], + 878: [, 230], + 879: [, 230], + 884: [[697]], + 890: [[32, 837], 256], + 894: [[59]], + 900: [[32, 769], 256], + 901: [[168, 769]], + 902: [[913, 769]], + 903: [[183]], + 904: [[917, 769]], + 905: [[919, 769]], + 906: [[921, 769]], + 908: [[927, 769]], + 910: [[933, 769]], + 911: [[937, 769]], + 912: [[970, 769]], + 913: [ + , + , + { + 768: 8122, + 769: 902, + 772: 8121, + 774: 8120, + 787: 7944, + 788: 7945, + 837: 8124 + } + ], + 917: [, , { 768: 8136, 769: 904, 787: 7960, 788: 7961 }], + 919: [, , { 768: 8138, 769: 905, 787: 7976, 788: 7977, 837: 8140 }], + 921: [ + , + , + { + 768: 8154, + 769: 906, + 772: 8153, + 774: 8152, + 776: 938, + 787: 7992, + 788: 7993 + } + ], + 927: [, , { 768: 8184, 769: 908, 787: 8008, 788: 8009 }], + 929: [, , { 788: 8172 }], + 933: [ + , + , + { 768: 8170, 769: 910, 772: 8169, 774: 8168, 776: 939, 788: 8025 } + ], + 937: [, , { 768: 8186, 769: 911, 787: 8040, 788: 8041, 837: 8188 }], + 938: [[921, 776]], + 939: [[933, 776]], + 940: [[945, 769], , { 837: 8116 }], + 941: [[949, 769]], + 942: [[951, 769], , { 837: 8132 }], + 943: [[953, 769]], + 944: [[971, 769]], + 945: [ + , + , + { + 768: 8048, + 769: 940, + 772: 8113, + 774: 8112, + 787: 7936, + 788: 7937, + 834: 8118, + 837: 8115 + } + ], + 949: [, , { 768: 8050, 769: 941, 787: 7952, 788: 7953 }], + 951: [ + , + , + { 768: 8052, 769: 942, 787: 7968, 788: 7969, 834: 8134, 837: 8131 } + ], + 953: [ + , + , + { + 768: 8054, + 769: 943, + 772: 8145, + 774: 8144, + 776: 970, + 787: 7984, + 788: 7985, + 834: 8150 + } + ], + 959: [, , { 768: 8056, 769: 972, 787: 8000, 788: 8001 }], + 961: [, , { 787: 8164, 788: 8165 }], + 965: [ + , + , + { + 768: 8058, + 769: 973, + 772: 8161, + 774: 8160, + 776: 971, + 787: 8016, + 788: 8017, + 834: 8166 + } + ], + 969: [ + , + , + { 768: 8060, 769: 974, 787: 8032, 788: 8033, 834: 8182, 837: 8179 } + ], + 970: [[953, 776], , { 768: 8146, 769: 912, 834: 8151 }], + 971: [[965, 776], , { 768: 8162, 769: 944, 834: 8167 }], + 972: [[959, 769]], + 973: [[965, 769]], + 974: [[969, 769], , { 837: 8180 }], + 976: [[946], 256], + 977: [[952], 256], + 978: [[933], 256, { 769: 979, 776: 980 }], + 979: [[978, 769]], + 980: [[978, 776]], + 981: [[966], 256], + 982: [[960], 256], + 1008: [[954], 256], + 1009: [[961], 256], + 1010: [[962], 256], + 1012: [[920], 256], + 1013: [[949], 256], + 1017: [[931], 256] + }, + 1024: { + 1024: [[1045, 768]], + 1025: [[1045, 776]], + 1027: [[1043, 769]], + 1030: [, , { 776: 1031 }], + 1031: [[1030, 776]], + 1036: [[1050, 769]], + 1037: [[1048, 768]], + 1038: [[1059, 774]], + 1040: [, , { 774: 1232, 776: 1234 }], + 1043: [, , { 769: 1027 }], + 1045: [, , { 768: 1024, 774: 1238, 776: 1025 }], + 1046: [, , { 774: 1217, 776: 1244 }], + 1047: [, , { 776: 1246 }], + 1048: [, , { 768: 1037, 772: 1250, 774: 1049, 776: 1252 }], + 1049: [[1048, 774]], + 1050: [, , { 769: 1036 }], + 1054: [, , { 776: 1254 }], + 1059: [, , { 772: 1262, 774: 1038, 776: 1264, 779: 1266 }], + 1063: [, , { 776: 1268 }], + 1067: [, , { 776: 1272 }], + 1069: [, , { 776: 1260 }], + 1072: [, , { 774: 1233, 776: 1235 }], + 1075: [, , { 769: 1107 }], + 1077: [, , { 768: 1104, 774: 1239, 776: 1105 }], + 1078: [, , { 774: 1218, 776: 1245 }], + 1079: [, , { 776: 1247 }], + 1080: [, , { 768: 1117, 772: 1251, 774: 1081, 776: 1253 }], + 1081: [[1080, 774]], + 1082: [, , { 769: 1116 }], + 1086: [, , { 776: 1255 }], + 1091: [, , { 772: 1263, 774: 1118, 776: 1265, 779: 1267 }], + 1095: [, , { 776: 1269 }], + 1099: [, , { 776: 1273 }], + 1101: [, , { 776: 1261 }], + 1104: [[1077, 768]], + 1105: [[1077, 776]], + 1107: [[1075, 769]], + 1110: [, , { 776: 1111 }], + 1111: [[1110, 776]], + 1116: [[1082, 769]], + 1117: [[1080, 768]], + 1118: [[1091, 774]], + 1140: [, , { 783: 1142 }], + 1141: [, , { 783: 1143 }], + 1142: [[1140, 783]], + 1143: [[1141, 783]], + 1155: [, 230], + 1156: [, 230], + 1157: [, 230], + 1158: [, 230], + 1159: [, 230], + 1217: [[1046, 774]], + 1218: [[1078, 774]], + 1232: [[1040, 774]], + 1233: [[1072, 774]], + 1234: [[1040, 776]], + 1235: [[1072, 776]], + 1238: [[1045, 774]], + 1239: [[1077, 774]], + 1240: [, , { 776: 1242 }], + 1241: [, , { 776: 1243 }], + 1242: [[1240, 776]], + 1243: [[1241, 776]], + 1244: [[1046, 776]], + 1245: [[1078, 776]], + 1246: [[1047, 776]], + 1247: [[1079, 776]], + 1250: [[1048, 772]], + 1251: [[1080, 772]], + 1252: [[1048, 776]], + 1253: [[1080, 776]], + 1254: [[1054, 776]], + 1255: [[1086, 776]], + 1256: [, , { 776: 1258 }], + 1257: [, , { 776: 1259 }], + 1258: [[1256, 776]], + 1259: [[1257, 776]], + 1260: [[1069, 776]], + 1261: [[1101, 776]], + 1262: [[1059, 772]], + 1263: [[1091, 772]], + 1264: [[1059, 776]], + 1265: [[1091, 776]], + 1266: [[1059, 779]], + 1267: [[1091, 779]], + 1268: [[1063, 776]], + 1269: [[1095, 776]], + 1272: [[1067, 776]], + 1273: [[1099, 776]] + }, + 1280: { + 1415: [[1381, 1410], 256], + 1425: [, 220], + 1426: [, 230], + 1427: [, 230], + 1428: [, 230], + 1429: [, 230], + 1430: [, 220], + 1431: [, 230], + 1432: [, 230], + 1433: [, 230], + 1434: [, 222], + 1435: [, 220], + 1436: [, 230], + 1437: [, 230], + 1438: [, 230], + 1439: [, 230], + 1440: [, 230], + 1441: [, 230], + 1442: [, 220], + 1443: [, 220], + 1444: [, 220], + 1445: [, 220], + 1446: [, 220], + 1447: [, 220], + 1448: [, 230], + 1449: [, 230], + 1450: [, 220], + 1451: [, 230], + 1452: [, 230], + 1453: [, 222], + 1454: [, 228], + 1455: [, 230], + 1456: [, 10], + 1457: [, 11], + 1458: [, 12], + 1459: [, 13], + 1460: [, 14], + 1461: [, 15], + 1462: [, 16], + 1463: [, 17], + 1464: [, 18], + 1465: [, 19], + 1466: [, 19], + 1467: [, 20], + 1468: [, 21], + 1469: [, 22], + 1471: [, 23], + 1473: [, 24], + 1474: [, 25], + 1476: [, 230], + 1477: [, 220], + 1479: [, 18] + }, + 1536: { + 1552: [, 230], + 1553: [, 230], + 1554: [, 230], + 1555: [, 230], + 1556: [, 230], + 1557: [, 230], + 1558: [, 230], + 1559: [, 230], + 1560: [, 30], + 1561: [, 31], + 1562: [, 32], + 1570: [[1575, 1619]], + 1571: [[1575, 1620]], + 1572: [[1608, 1620]], + 1573: [[1575, 1621]], + 1574: [[1610, 1620]], + 1575: [, , { 1619: 1570, 1620: 1571, 1621: 1573 }], + 1608: [, , { 1620: 1572 }], + 1610: [, , { 1620: 1574 }], + 1611: [, 27], + 1612: [, 28], + 1613: [, 29], + 1614: [, 30], + 1615: [, 31], + 1616: [, 32], + 1617: [, 33], + 1618: [, 34], + 1619: [, 230], + 1620: [, 230], + 1621: [, 220], + 1622: [, 220], + 1623: [, 230], + 1624: [, 230], + 1625: [, 230], + 1626: [, 230], + 1627: [, 230], + 1628: [, 220], + 1629: [, 230], + 1630: [, 230], + 1631: [, 220], + 1648: [, 35], + 1653: [[1575, 1652], 256], + 1654: [[1608, 1652], 256], + 1655: [[1735, 1652], 256], + 1656: [[1610, 1652], 256], + 1728: [[1749, 1620]], + 1729: [, , { 1620: 1730 }], + 1730: [[1729, 1620]], + 1746: [, , { 1620: 1747 }], + 1747: [[1746, 1620]], + 1749: [, , { 1620: 1728 }], + 1750: [, 230], + 1751: [, 230], + 1752: [, 230], + 1753: [, 230], + 1754: [, 230], + 1755: [, 230], + 1756: [, 230], + 1759: [, 230], + 1760: [, 230], + 1761: [, 230], + 1762: [, 230], + 1763: [, 220], + 1764: [, 230], + 1767: [, 230], + 1768: [, 230], + 1770: [, 220], + 1771: [, 230], + 1772: [, 230], + 1773: [, 220] + }, + 1792: { + 1809: [, 36], + 1840: [, 230], + 1841: [, 220], + 1842: [, 230], + 1843: [, 230], + 1844: [, 220], + 1845: [, 230], + 1846: [, 230], + 1847: [, 220], + 1848: [, 220], + 1849: [, 220], + 1850: [, 230], + 1851: [, 220], + 1852: [, 220], + 1853: [, 230], + 1854: [, 220], + 1855: [, 230], + 1856: [, 230], + 1857: [, 230], + 1858: [, 220], + 1859: [, 230], + 1860: [, 220], + 1861: [, 230], + 1862: [, 220], + 1863: [, 230], + 1864: [, 220], + 1865: [, 230], + 1866: [, 230], + 2027: [, 230], + 2028: [, 230], + 2029: [, 230], + 2030: [, 230], + 2031: [, 230], + 2032: [, 230], + 2033: [, 230], + 2034: [, 220], + 2035: [, 230] + }, + 2048: { + 2070: [, 230], + 2071: [, 230], + 2072: [, 230], + 2073: [, 230], + 2075: [, 230], + 2076: [, 230], + 2077: [, 230], + 2078: [, 230], + 2079: [, 230], + 2080: [, 230], + 2081: [, 230], + 2082: [, 230], + 2083: [, 230], + 2085: [, 230], + 2086: [, 230], + 2087: [, 230], + 2089: [, 230], + 2090: [, 230], + 2091: [, 230], + 2092: [, 230], + 2093: [, 230], + 2137: [, 220], + 2138: [, 220], + 2139: [, 220], + 2276: [, 230], + 2277: [, 230], + 2278: [, 220], + 2279: [, 230], + 2280: [, 230], + 2281: [, 220], + 2282: [, 230], + 2283: [, 230], + 2284: [, 230], + 2285: [, 220], + 2286: [, 220], + 2287: [, 220], + 2288: [, 27], + 2289: [, 28], + 2290: [, 29], + 2291: [, 230], + 2292: [, 230], + 2293: [, 230], + 2294: [, 220], + 2295: [, 230], + 2296: [, 230], + 2297: [, 220], + 2298: [, 220], + 2299: [, 230], + 2300: [, 230], + 2301: [, 230], + 2302: [, 230] + }, + 2304: { + 2344: [, , { 2364: 2345 }], + 2345: [[2344, 2364]], + 2352: [, , { 2364: 2353 }], + 2353: [[2352, 2364]], + 2355: [, , { 2364: 2356 }], + 2356: [[2355, 2364]], + 2364: [, 7], + 2381: [, 9], + 2385: [, 230], + 2386: [, 220], + 2387: [, 230], + 2388: [, 230], + 2392: [[2325, 2364], 512], + 2393: [[2326, 2364], 512], + 2394: [[2327, 2364], 512], + 2395: [[2332, 2364], 512], + 2396: [[2337, 2364], 512], + 2397: [[2338, 2364], 512], + 2398: [[2347, 2364], 512], + 2399: [[2351, 2364], 512], + 2492: [, 7], + 2503: [, , { 2494: 2507, 2519: 2508 }], + 2507: [[2503, 2494]], + 2508: [[2503, 2519]], + 2509: [, 9], + 2524: [[2465, 2492], 512], + 2525: [[2466, 2492], 512], + 2527: [[2479, 2492], 512] + }, + 2560: { + 2611: [[2610, 2620], 512], + 2614: [[2616, 2620], 512], + 2620: [, 7], + 2637: [, 9], + 2649: [[2582, 2620], 512], + 2650: [[2583, 2620], 512], + 2651: [[2588, 2620], 512], + 2654: [[2603, 2620], 512], + 2748: [, 7], + 2765: [, 9], + 68109: [, 220], + 68111: [, 230], + 68152: [, 230], + 68153: [, 1], + 68154: [, 220], + 68159: [, 9] + }, + 2816: { + 2876: [, 7], + 2887: [, , { 2878: 2891, 2902: 2888, 2903: 2892 }], + 2888: [[2887, 2902]], + 2891: [[2887, 2878]], + 2892: [[2887, 2903]], + 2893: [, 9], + 2908: [[2849, 2876], 512], + 2909: [[2850, 2876], 512], + 2962: [, , { 3031: 2964 }], + 2964: [[2962, 3031]], + 3014: [, , { 3006: 3018, 3031: 3020 }], + 3015: [, , { 3006: 3019 }], + 3018: [[3014, 3006]], + 3019: [[3015, 3006]], + 3020: [[3014, 3031]], + 3021: [, 9] + }, + 3072: { + 3142: [, , { 3158: 3144 }], + 3144: [[3142, 3158]], + 3149: [, 9], + 3157: [, 84], + 3158: [, 91], + 3260: [, 7], + 3263: [, , { 3285: 3264 }], + 3264: [[3263, 3285]], + 3270: [, , { 3266: 3274, 3285: 3271, 3286: 3272 }], + 3271: [[3270, 3285]], + 3272: [[3270, 3286]], + 3274: [[3270, 3266], , { 3285: 3275 }], + 3275: [[3274, 3285]], + 3277: [, 9] + }, + 3328: { + 3398: [, , { 3390: 3402, 3415: 3404 }], + 3399: [, , { 3390: 3403 }], + 3402: [[3398, 3390]], + 3403: [[3399, 3390]], + 3404: [[3398, 3415]], + 3405: [, 9], + 3530: [, 9], + 3545: [, , { 3530: 3546, 3535: 3548, 3551: 3550 }], + 3546: [[3545, 3530]], + 3548: [[3545, 3535], , { 3530: 3549 }], + 3549: [[3548, 3530]], + 3550: [[3545, 3551]] + }, + 3584: { + 3635: [[3661, 3634], 256], + 3640: [, 103], + 3641: [, 103], + 3642: [, 9], + 3656: [, 107], + 3657: [, 107], + 3658: [, 107], + 3659: [, 107], + 3763: [[3789, 3762], 256], + 3768: [, 118], + 3769: [, 118], + 3784: [, 122], + 3785: [, 122], + 3786: [, 122], + 3787: [, 122], + 3804: [[3755, 3737], 256], + 3805: [[3755, 3745], 256] + }, + 3840: { + 3852: [[3851], 256], + 3864: [, 220], + 3865: [, 220], + 3893: [, 220], + 3895: [, 220], + 3897: [, 216], + 3907: [[3906, 4023], 512], + 3917: [[3916, 4023], 512], + 3922: [[3921, 4023], 512], + 3927: [[3926, 4023], 512], + 3932: [[3931, 4023], 512], + 3945: [[3904, 4021], 512], + 3953: [, 129], + 3954: [, 130], + 3955: [[3953, 3954], 512], + 3956: [, 132], + 3957: [[3953, 3956], 512], + 3958: [[4018, 3968], 512], + 3959: [[4018, 3969], 256], + 3960: [[4019, 3968], 512], + 3961: [[4019, 3969], 256], + 3962: [, 130], + 3963: [, 130], + 3964: [, 130], + 3965: [, 130], + 3968: [, 130], + 3969: [[3953, 3968], 512], + 3970: [, 230], + 3971: [, 230], + 3972: [, 9], + 3974: [, 230], + 3975: [, 230], + 3987: [[3986, 4023], 512], + 3997: [[3996, 4023], 512], + 4002: [[4001, 4023], 512], + 4007: [[4006, 4023], 512], + 4012: [[4011, 4023], 512], + 4025: [[3984, 4021], 512], + 4038: [, 220] + }, + 4096: { + 4133: [, , { 4142: 4134 }], + 4134: [[4133, 4142]], + 4151: [, 7], + 4153: [, 9], + 4154: [, 9], + 4237: [, 220], + 4348: [[4316], 256], + 69702: [, 9], + 69785: [, , { 69818: 69786 }], + 69786: [[69785, 69818]], + 69787: [, , { 69818: 69788 }], + 69788: [[69787, 69818]], + 69797: [, , { 69818: 69803 }], + 69803: [[69797, 69818]], + 69817: [, 9], + 69818: [, 7] + }, + 4352: { + 69888: [, 230], + 69889: [, 230], + 69890: [, 230], + 69934: [[69937, 69927]], + 69935: [[69938, 69927]], + 69937: [, , { 69927: 69934 }], + 69938: [, , { 69927: 69935 }], + 69939: [, 9], + 69940: [, 9], + 70080: [, 9] + }, + 4864: { 4957: [, 230], 4958: [, 230], 4959: [, 230] }, + 5632: { 71350: [, 9], 71351: [, 7] }, + 5888: { 5908: [, 9], 5940: [, 9], 6098: [, 9], 6109: [, 230] }, + 6144: { 6313: [, 228] }, + 6400: { 6457: [, 222], 6458: [, 230], 6459: [, 220] }, + 6656: { + 6679: [, 230], + 6680: [, 220], + 6752: [, 9], + 6773: [, 230], + 6774: [, 230], + 6775: [, 230], + 6776: [, 230], + 6777: [, 230], + 6778: [, 230], + 6779: [, 230], + 6780: [, 230], + 6783: [, 220] + }, + 6912: { + 6917: [, , { 6965: 6918 }], + 6918: [[6917, 6965]], + 6919: [, , { 6965: 6920 }], + 6920: [[6919, 6965]], + 6921: [, , { 6965: 6922 }], + 6922: [[6921, 6965]], + 6923: [, , { 6965: 6924 }], + 6924: [[6923, 6965]], + 6925: [, , { 6965: 6926 }], + 6926: [[6925, 6965]], + 6929: [, , { 6965: 6930 }], + 6930: [[6929, 6965]], + 6964: [, 7], + 6970: [, , { 6965: 6971 }], + 6971: [[6970, 6965]], + 6972: [, , { 6965: 6973 }], + 6973: [[6972, 6965]], + 6974: [, , { 6965: 6976 }], + 6975: [, , { 6965: 6977 }], + 6976: [[6974, 6965]], + 6977: [[6975, 6965]], + 6978: [, , { 6965: 6979 }], + 6979: [[6978, 6965]], + 6980: [, 9], + 7019: [, 230], + 7020: [, 220], + 7021: [, 230], + 7022: [, 230], + 7023: [, 230], + 7024: [, 230], + 7025: [, 230], + 7026: [, 230], + 7027: [, 230], + 7082: [, 9], + 7083: [, 9], + 7142: [, 7], + 7154: [, 9], + 7155: [, 9] + }, + 7168: { + 7223: [, 7], + 7376: [, 230], + 7377: [, 230], + 7378: [, 230], + 7380: [, 1], + 7381: [, 220], + 7382: [, 220], + 7383: [, 220], + 7384: [, 220], + 7385: [, 220], + 7386: [, 230], + 7387: [, 230], + 7388: [, 220], + 7389: [, 220], + 7390: [, 220], + 7391: [, 220], + 7392: [, 230], + 7394: [, 1], + 7395: [, 1], + 7396: [, 1], + 7397: [, 1], + 7398: [, 1], + 7399: [, 1], + 7400: [, 1], + 7405: [, 220], + 7412: [, 230] + }, + 7424: { + 7468: [[65], 256], + 7469: [[198], 256], + 7470: [[66], 256], + 7472: [[68], 256], + 7473: [[69], 256], + 7474: [[398], 256], + 7475: [[71], 256], + 7476: [[72], 256], + 7477: [[73], 256], + 7478: [[74], 256], + 7479: [[75], 256], + 7480: [[76], 256], + 7481: [[77], 256], + 7482: [[78], 256], + 7484: [[79], 256], + 7485: [[546], 256], + 7486: [[80], 256], + 7487: [[82], 256], + 7488: [[84], 256], + 7489: [[85], 256], + 7490: [[87], 256], + 7491: [[97], 256], + 7492: [[592], 256], + 7493: [[593], 256], + 7494: [[7426], 256], + 7495: [[98], 256], + 7496: [[100], 256], + 7497: [[101], 256], + 7498: [[601], 256], + 7499: [[603], 256], + 7500: [[604], 256], + 7501: [[103], 256], + 7503: [[107], 256], + 7504: [[109], 256], + 7505: [[331], 256], + 7506: [[111], 256], + 7507: [[596], 256], + 7508: [[7446], 256], + 7509: [[7447], 256], + 7510: [[112], 256], + 7511: [[116], 256], + 7512: [[117], 256], + 7513: [[7453], 256], + 7514: [[623], 256], + 7515: [[118], 256], + 7516: [[7461], 256], + 7517: [[946], 256], + 7518: [[947], 256], + 7519: [[948], 256], + 7520: [[966], 256], + 7521: [[967], 256], + 7522: [[105], 256], + 7523: [[114], 256], + 7524: [[117], 256], + 7525: [[118], 256], + 7526: [[946], 256], + 7527: [[947], 256], + 7528: [[961], 256], + 7529: [[966], 256], + 7530: [[967], 256], + 7544: [[1085], 256], + 7579: [[594], 256], + 7580: [[99], 256], + 7581: [[597], 256], + 7582: [[240], 256], + 7583: [[604], 256], + 7584: [[102], 256], + 7585: [[607], 256], + 7586: [[609], 256], + 7587: [[613], 256], + 7588: [[616], 256], + 7589: [[617], 256], + 7590: [[618], 256], + 7591: [[7547], 256], + 7592: [[669], 256], + 7593: [[621], 256], + 7594: [[7557], 256], + 7595: [[671], 256], + 7596: [[625], 256], + 7597: [[624], 256], + 7598: [[626], 256], + 7599: [[627], 256], + 7600: [[628], 256], + 7601: [[629], 256], + 7602: [[632], 256], + 7603: [[642], 256], + 7604: [[643], 256], + 7605: [[427], 256], + 7606: [[649], 256], + 7607: [[650], 256], + 7608: [[7452], 256], + 7609: [[651], 256], + 7610: [[652], 256], + 7611: [[122], 256], + 7612: [[656], 256], + 7613: [[657], 256], + 7614: [[658], 256], + 7615: [[952], 256], + 7616: [, 230], + 7617: [, 230], + 7618: [, 220], + 7619: [, 230], + 7620: [, 230], + 7621: [, 230], + 7622: [, 230], + 7623: [, 230], + 7624: [, 230], + 7625: [, 230], + 7626: [, 220], + 7627: [, 230], + 7628: [, 230], + 7629: [, 234], + 7630: [, 214], + 7631: [, 220], + 7632: [, 202], + 7633: [, 230], + 7634: [, 230], + 7635: [, 230], + 7636: [, 230], + 7637: [, 230], + 7638: [, 230], + 7639: [, 230], + 7640: [, 230], + 7641: [, 230], + 7642: [, 230], + 7643: [, 230], + 7644: [, 230], + 7645: [, 230], + 7646: [, 230], + 7647: [, 230], + 7648: [, 230], + 7649: [, 230], + 7650: [, 230], + 7651: [, 230], + 7652: [, 230], + 7653: [, 230], + 7654: [, 230], + 7676: [, 233], + 7677: [, 220], + 7678: [, 230], + 7679: [, 220] + }, + 7680: { + 7680: [[65, 805]], + 7681: [[97, 805]], + 7682: [[66, 775]], + 7683: [[98, 775]], + 7684: [[66, 803]], + 7685: [[98, 803]], + 7686: [[66, 817]], + 7687: [[98, 817]], + 7688: [[199, 769]], + 7689: [[231, 769]], + 7690: [[68, 775]], + 7691: [[100, 775]], + 7692: [[68, 803]], + 7693: [[100, 803]], + 7694: [[68, 817]], + 7695: [[100, 817]], + 7696: [[68, 807]], + 7697: [[100, 807]], + 7698: [[68, 813]], + 7699: [[100, 813]], + 7700: [[274, 768]], + 7701: [[275, 768]], + 7702: [[274, 769]], + 7703: [[275, 769]], + 7704: [[69, 813]], + 7705: [[101, 813]], + 7706: [[69, 816]], + 7707: [[101, 816]], + 7708: [[552, 774]], + 7709: [[553, 774]], + 7710: [[70, 775]], + 7711: [[102, 775]], + 7712: [[71, 772]], + 7713: [[103, 772]], + 7714: [[72, 775]], + 7715: [[104, 775]], + 7716: [[72, 803]], + 7717: [[104, 803]], + 7718: [[72, 776]], + 7719: [[104, 776]], + 7720: [[72, 807]], + 7721: [[104, 807]], + 7722: [[72, 814]], + 7723: [[104, 814]], + 7724: [[73, 816]], + 7725: [[105, 816]], + 7726: [[207, 769]], + 7727: [[239, 769]], + 7728: [[75, 769]], + 7729: [[107, 769]], + 7730: [[75, 803]], + 7731: [[107, 803]], + 7732: [[75, 817]], + 7733: [[107, 817]], + 7734: [[76, 803], , { 772: 7736 }], + 7735: [[108, 803], , { 772: 7737 }], + 7736: [[7734, 772]], + 7737: [[7735, 772]], + 7738: [[76, 817]], + 7739: [[108, 817]], + 7740: [[76, 813]], + 7741: [[108, 813]], + 7742: [[77, 769]], + 7743: [[109, 769]], + 7744: [[77, 775]], + 7745: [[109, 775]], + 7746: [[77, 803]], + 7747: [[109, 803]], + 7748: [[78, 775]], + 7749: [[110, 775]], + 7750: [[78, 803]], + 7751: [[110, 803]], + 7752: [[78, 817]], + 7753: [[110, 817]], + 7754: [[78, 813]], + 7755: [[110, 813]], + 7756: [[213, 769]], + 7757: [[245, 769]], + 7758: [[213, 776]], + 7759: [[245, 776]], + 7760: [[332, 768]], + 7761: [[333, 768]], + 7762: [[332, 769]], + 7763: [[333, 769]], + 7764: [[80, 769]], + 7765: [[112, 769]], + 7766: [[80, 775]], + 7767: [[112, 775]], + 7768: [[82, 775]], + 7769: [[114, 775]], + 7770: [[82, 803], , { 772: 7772 }], + 7771: [[114, 803], , { 772: 7773 }], + 7772: [[7770, 772]], + 7773: [[7771, 772]], + 7774: [[82, 817]], + 7775: [[114, 817]], + 7776: [[83, 775]], + 7777: [[115, 775]], + 7778: [[83, 803], , { 775: 7784 }], + 7779: [[115, 803], , { 775: 7785 }], + 7780: [[346, 775]], + 7781: [[347, 775]], + 7782: [[352, 775]], + 7783: [[353, 775]], + 7784: [[7778, 775]], + 7785: [[7779, 775]], + 7786: [[84, 775]], + 7787: [[116, 775]], + 7788: [[84, 803]], + 7789: [[116, 803]], + 7790: [[84, 817]], + 7791: [[116, 817]], + 7792: [[84, 813]], + 7793: [[116, 813]], + 7794: [[85, 804]], + 7795: [[117, 804]], + 7796: [[85, 816]], + 7797: [[117, 816]], + 7798: [[85, 813]], + 7799: [[117, 813]], + 7800: [[360, 769]], + 7801: [[361, 769]], + 7802: [[362, 776]], + 7803: [[363, 776]], + 7804: [[86, 771]], + 7805: [[118, 771]], + 7806: [[86, 803]], + 7807: [[118, 803]], + 7808: [[87, 768]], + 7809: [[119, 768]], + 7810: [[87, 769]], + 7811: [[119, 769]], + 7812: [[87, 776]], + 7813: [[119, 776]], + 7814: [[87, 775]], + 7815: [[119, 775]], + 7816: [[87, 803]], + 7817: [[119, 803]], + 7818: [[88, 775]], + 7819: [[120, 775]], + 7820: [[88, 776]], + 7821: [[120, 776]], + 7822: [[89, 775]], + 7823: [[121, 775]], + 7824: [[90, 770]], + 7825: [[122, 770]], + 7826: [[90, 803]], + 7827: [[122, 803]], + 7828: [[90, 817]], + 7829: [[122, 817]], + 7830: [[104, 817]], + 7831: [[116, 776]], + 7832: [[119, 778]], + 7833: [[121, 778]], + 7834: [[97, 702], 256], + 7835: [[383, 775]], + 7840: [[65, 803], , { 770: 7852, 774: 7862 }], + 7841: [[97, 803], , { 770: 7853, 774: 7863 }], + 7842: [[65, 777]], + 7843: [[97, 777]], + 7844: [[194, 769]], + 7845: [[226, 769]], + 7846: [[194, 768]], + 7847: [[226, 768]], + 7848: [[194, 777]], + 7849: [[226, 777]], + 7850: [[194, 771]], + 7851: [[226, 771]], + 7852: [[7840, 770]], + 7853: [[7841, 770]], + 7854: [[258, 769]], + 7855: [[259, 769]], + 7856: [[258, 768]], + 7857: [[259, 768]], + 7858: [[258, 777]], + 7859: [[259, 777]], + 7860: [[258, 771]], + 7861: [[259, 771]], + 7862: [[7840, 774]], + 7863: [[7841, 774]], + 7864: [[69, 803], , { 770: 7878 }], + 7865: [[101, 803], , { 770: 7879 }], + 7866: [[69, 777]], + 7867: [[101, 777]], + 7868: [[69, 771]], + 7869: [[101, 771]], + 7870: [[202, 769]], + 7871: [[234, 769]], + 7872: [[202, 768]], + 7873: [[234, 768]], + 7874: [[202, 777]], + 7875: [[234, 777]], + 7876: [[202, 771]], + 7877: [[234, 771]], + 7878: [[7864, 770]], + 7879: [[7865, 770]], + 7880: [[73, 777]], + 7881: [[105, 777]], + 7882: [[73, 803]], + 7883: [[105, 803]], + 7884: [[79, 803], , { 770: 7896 }], + 7885: [[111, 803], , { 770: 7897 }], + 7886: [[79, 777]], + 7887: [[111, 777]], + 7888: [[212, 769]], + 7889: [[244, 769]], + 7890: [[212, 768]], + 7891: [[244, 768]], + 7892: [[212, 777]], + 7893: [[244, 777]], + 7894: [[212, 771]], + 7895: [[244, 771]], + 7896: [[7884, 770]], + 7897: [[7885, 770]], + 7898: [[416, 769]], + 7899: [[417, 769]], + 7900: [[416, 768]], + 7901: [[417, 768]], + 7902: [[416, 777]], + 7903: [[417, 777]], + 7904: [[416, 771]], + 7905: [[417, 771]], + 7906: [[416, 803]], + 7907: [[417, 803]], + 7908: [[85, 803]], + 7909: [[117, 803]], + 7910: [[85, 777]], + 7911: [[117, 777]], + 7912: [[431, 769]], + 7913: [[432, 769]], + 7914: [[431, 768]], + 7915: [[432, 768]], + 7916: [[431, 777]], + 7917: [[432, 777]], + 7918: [[431, 771]], + 7919: [[432, 771]], + 7920: [[431, 803]], + 7921: [[432, 803]], + 7922: [[89, 768]], + 7923: [[121, 768]], + 7924: [[89, 803]], + 7925: [[121, 803]], + 7926: [[89, 777]], + 7927: [[121, 777]], + 7928: [[89, 771]], + 7929: [[121, 771]] + }, + 7936: { + 7936: [[945, 787], , { 768: 7938, 769: 7940, 834: 7942, 837: 8064 }], + 7937: [[945, 788], , { 768: 7939, 769: 7941, 834: 7943, 837: 8065 }], + 7938: [[7936, 768], , { 837: 8066 }], + 7939: [[7937, 768], , { 837: 8067 }], + 7940: [[7936, 769], , { 837: 8068 }], + 7941: [[7937, 769], , { 837: 8069 }], + 7942: [[7936, 834], , { 837: 8070 }], + 7943: [[7937, 834], , { 837: 8071 }], + 7944: [[913, 787], , { 768: 7946, 769: 7948, 834: 7950, 837: 8072 }], + 7945: [[913, 788], , { 768: 7947, 769: 7949, 834: 7951, 837: 8073 }], + 7946: [[7944, 768], , { 837: 8074 }], + 7947: [[7945, 768], , { 837: 8075 }], + 7948: [[7944, 769], , { 837: 8076 }], + 7949: [[7945, 769], , { 837: 8077 }], + 7950: [[7944, 834], , { 837: 8078 }], + 7951: [[7945, 834], , { 837: 8079 }], + 7952: [[949, 787], , { 768: 7954, 769: 7956 }], + 7953: [[949, 788], , { 768: 7955, 769: 7957 }], + 7954: [[7952, 768]], + 7955: [[7953, 768]], + 7956: [[7952, 769]], + 7957: [[7953, 769]], + 7960: [[917, 787], , { 768: 7962, 769: 7964 }], + 7961: [[917, 788], , { 768: 7963, 769: 7965 }], + 7962: [[7960, 768]], + 7963: [[7961, 768]], + 7964: [[7960, 769]], + 7965: [[7961, 769]], + 7968: [[951, 787], , { 768: 7970, 769: 7972, 834: 7974, 837: 8080 }], + 7969: [[951, 788], , { 768: 7971, 769: 7973, 834: 7975, 837: 8081 }], + 7970: [[7968, 768], , { 837: 8082 }], + 7971: [[7969, 768], , { 837: 8083 }], + 7972: [[7968, 769], , { 837: 8084 }], + 7973: [[7969, 769], , { 837: 8085 }], + 7974: [[7968, 834], , { 837: 8086 }], + 7975: [[7969, 834], , { 837: 8087 }], + 7976: [[919, 787], , { 768: 7978, 769: 7980, 834: 7982, 837: 8088 }], + 7977: [[919, 788], , { 768: 7979, 769: 7981, 834: 7983, 837: 8089 }], + 7978: [[7976, 768], , { 837: 8090 }], + 7979: [[7977, 768], , { 837: 8091 }], + 7980: [[7976, 769], , { 837: 8092 }], + 7981: [[7977, 769], , { 837: 8093 }], + 7982: [[7976, 834], , { 837: 8094 }], + 7983: [[7977, 834], , { 837: 8095 }], + 7984: [[953, 787], , { 768: 7986, 769: 7988, 834: 7990 }], + 7985: [[953, 788], , { 768: 7987, 769: 7989, 834: 7991 }], + 7986: [[7984, 768]], + 7987: [[7985, 768]], + 7988: [[7984, 769]], + 7989: [[7985, 769]], + 7990: [[7984, 834]], + 7991: [[7985, 834]], + 7992: [[921, 787], , { 768: 7994, 769: 7996, 834: 7998 }], + 7993: [[921, 788], , { 768: 7995, 769: 7997, 834: 7999 }], + 7994: [[7992, 768]], + 7995: [[7993, 768]], + 7996: [[7992, 769]], + 7997: [[7993, 769]], + 7998: [[7992, 834]], + 7999: [[7993, 834]], + 8000: [[959, 787], , { 768: 8002, 769: 8004 }], + 8001: [[959, 788], , { 768: 8003, 769: 8005 }], + 8002: [[8000, 768]], + 8003: [[8001, 768]], + 8004: [[8000, 769]], + 8005: [[8001, 769]], + 8008: [[927, 787], , { 768: 8010, 769: 8012 }], + 8009: [[927, 788], , { 768: 8011, 769: 8013 }], + 8010: [[8008, 768]], + 8011: [[8009, 768]], + 8012: [[8008, 769]], + 8013: [[8009, 769]], + 8016: [[965, 787], , { 768: 8018, 769: 8020, 834: 8022 }], + 8017: [[965, 788], , { 768: 8019, 769: 8021, 834: 8023 }], + 8018: [[8016, 768]], + 8019: [[8017, 768]], + 8020: [[8016, 769]], + 8021: [[8017, 769]], + 8022: [[8016, 834]], + 8023: [[8017, 834]], + 8025: [[933, 788], , { 768: 8027, 769: 8029, 834: 8031 }], + 8027: [[8025, 768]], + 8029: [[8025, 769]], + 8031: [[8025, 834]], + 8032: [[969, 787], , { 768: 8034, 769: 8036, 834: 8038, 837: 8096 }], + 8033: [[969, 788], , { 768: 8035, 769: 8037, 834: 8039, 837: 8097 }], + 8034: [[8032, 768], , { 837: 8098 }], + 8035: [[8033, 768], , { 837: 8099 }], + 8036: [[8032, 769], , { 837: 8100 }], + 8037: [[8033, 769], , { 837: 8101 }], + 8038: [[8032, 834], , { 837: 8102 }], + 8039: [[8033, 834], , { 837: 8103 }], + 8040: [[937, 787], , { 768: 8042, 769: 8044, 834: 8046, 837: 8104 }], + 8041: [[937, 788], , { 768: 8043, 769: 8045, 834: 8047, 837: 8105 }], + 8042: [[8040, 768], , { 837: 8106 }], + 8043: [[8041, 768], , { 837: 8107 }], + 8044: [[8040, 769], , { 837: 8108 }], + 8045: [[8041, 769], , { 837: 8109 }], + 8046: [[8040, 834], , { 837: 8110 }], + 8047: [[8041, 834], , { 837: 8111 }], + 8048: [[945, 768], , { 837: 8114 }], + 8049: [[940]], + 8050: [[949, 768]], + 8051: [[941]], + 8052: [[951, 768], , { 837: 8130 }], + 8053: [[942]], + 8054: [[953, 768]], + 8055: [[943]], + 8056: [[959, 768]], + 8057: [[972]], + 8058: [[965, 768]], + 8059: [[973]], + 8060: [[969, 768], , { 837: 8178 }], + 8061: [[974]], + 8064: [[7936, 837]], + 8065: [[7937, 837]], + 8066: [[7938, 837]], + 8067: [[7939, 837]], + 8068: [[7940, 837]], + 8069: [[7941, 837]], + 8070: [[7942, 837]], + 8071: [[7943, 837]], + 8072: [[7944, 837]], + 8073: [[7945, 837]], + 8074: [[7946, 837]], + 8075: [[7947, 837]], + 8076: [[7948, 837]], + 8077: [[7949, 837]], + 8078: [[7950, 837]], + 8079: [[7951, 837]], + 8080: [[7968, 837]], + 8081: [[7969, 837]], + 8082: [[7970, 837]], + 8083: [[7971, 837]], + 8084: [[7972, 837]], + 8085: [[7973, 837]], + 8086: [[7974, 837]], + 8087: [[7975, 837]], + 8088: [[7976, 837]], + 8089: [[7977, 837]], + 8090: [[7978, 837]], + 8091: [[7979, 837]], + 8092: [[7980, 837]], + 8093: [[7981, 837]], + 8094: [[7982, 837]], + 8095: [[7983, 837]], + 8096: [[8032, 837]], + 8097: [[8033, 837]], + 8098: [[8034, 837]], + 8099: [[8035, 837]], + 8100: [[8036, 837]], + 8101: [[8037, 837]], + 8102: [[8038, 837]], + 8103: [[8039, 837]], + 8104: [[8040, 837]], + 8105: [[8041, 837]], + 8106: [[8042, 837]], + 8107: [[8043, 837]], + 8108: [[8044, 837]], + 8109: [[8045, 837]], + 8110: [[8046, 837]], + 8111: [[8047, 837]], + 8112: [[945, 774]], + 8113: [[945, 772]], + 8114: [[8048, 837]], + 8115: [[945, 837]], + 8116: [[940, 837]], + 8118: [[945, 834], , { 837: 8119 }], + 8119: [[8118, 837]], + 8120: [[913, 774]], + 8121: [[913, 772]], + 8122: [[913, 768]], + 8123: [[902]], + 8124: [[913, 837]], + 8125: [[32, 787], 256], + 8126: [[953]], + 8127: [[32, 787], 256, { 768: 8141, 769: 8142, 834: 8143 }], + 8128: [[32, 834], 256], + 8129: [[168, 834]], + 8130: [[8052, 837]], + 8131: [[951, 837]], + 8132: [[942, 837]], + 8134: [[951, 834], , { 837: 8135 }], + 8135: [[8134, 837]], + 8136: [[917, 768]], + 8137: [[904]], + 8138: [[919, 768]], + 8139: [[905]], + 8140: [[919, 837]], + 8141: [[8127, 768]], + 8142: [[8127, 769]], + 8143: [[8127, 834]], + 8144: [[953, 774]], + 8145: [[953, 772]], + 8146: [[970, 768]], + 8147: [[912]], + 8150: [[953, 834]], + 8151: [[970, 834]], + 8152: [[921, 774]], + 8153: [[921, 772]], + 8154: [[921, 768]], + 8155: [[906]], + 8157: [[8190, 768]], + 8158: [[8190, 769]], + 8159: [[8190, 834]], + 8160: [[965, 774]], + 8161: [[965, 772]], + 8162: [[971, 768]], + 8163: [[944]], + 8164: [[961, 787]], + 8165: [[961, 788]], + 8166: [[965, 834]], + 8167: [[971, 834]], + 8168: [[933, 774]], + 8169: [[933, 772]], + 8170: [[933, 768]], + 8171: [[910]], + 8172: [[929, 788]], + 8173: [[168, 768]], + 8174: [[901]], + 8175: [[96]], + 8178: [[8060, 837]], + 8179: [[969, 837]], + 8180: [[974, 837]], + 8182: [[969, 834], , { 837: 8183 }], + 8183: [[8182, 837]], + 8184: [[927, 768]], + 8185: [[908]], + 8186: [[937, 768]], + 8187: [[911]], + 8188: [[937, 837]], + 8189: [[180]], + 8190: [[32, 788], 256, { 768: 8157, 769: 8158, 834: 8159 }] + }, + 8192: { + 8192: [[8194]], + 8193: [[8195]], + 8194: [[32], 256], + 8195: [[32], 256], + 8196: [[32], 256], + 8197: [[32], 256], + 8198: [[32], 256], + 8199: [[32], 256], + 8200: [[32], 256], + 8201: [[32], 256], + 8202: [[32], 256], + 8209: [[8208], 256], + 8215: [[32, 819], 256], + 8228: [[46], 256], + 8229: [[46, 46], 256], + 8230: [[46, 46, 46], 256], + 8239: [[32], 256], + 8243: [[8242, 8242], 256], + 8244: [[8242, 8242, 8242], 256], + 8246: [[8245, 8245], 256], + 8247: [[8245, 8245, 8245], 256], + 8252: [[33, 33], 256], + 8254: [[32, 773], 256], + 8263: [[63, 63], 256], + 8264: [[63, 33], 256], + 8265: [[33, 63], 256], + 8279: [[8242, 8242, 8242, 8242], 256], + 8287: [[32], 256], + 8304: [[48], 256], + 8305: [[105], 256], + 8308: [[52], 256], + 8309: [[53], 256], + 8310: [[54], 256], + 8311: [[55], 256], + 8312: [[56], 256], + 8313: [[57], 256], + 8314: [[43], 256], + 8315: [[8722], 256], + 8316: [[61], 256], + 8317: [[40], 256], + 8318: [[41], 256], + 8319: [[110], 256], + 8320: [[48], 256], + 8321: [[49], 256], + 8322: [[50], 256], + 8323: [[51], 256], + 8324: [[52], 256], + 8325: [[53], 256], + 8326: [[54], 256], + 8327: [[55], 256], + 8328: [[56], 256], + 8329: [[57], 256], + 8330: [[43], 256], + 8331: [[8722], 256], + 8332: [[61], 256], + 8333: [[40], 256], + 8334: [[41], 256], + 8336: [[97], 256], + 8337: [[101], 256], + 8338: [[111], 256], + 8339: [[120], 256], + 8340: [[601], 256], + 8341: [[104], 256], + 8342: [[107], 256], + 8343: [[108], 256], + 8344: [[109], 256], + 8345: [[110], 256], + 8346: [[112], 256], + 8347: [[115], 256], + 8348: [[116], 256], + 8360: [[82, 115], 256], + 8400: [, 230], + 8401: [, 230], + 8402: [, 1], + 8403: [, 1], + 8404: [, 230], + 8405: [, 230], + 8406: [, 230], + 8407: [, 230], + 8408: [, 1], + 8409: [, 1], + 8410: [, 1], + 8411: [, 230], + 8412: [, 230], + 8417: [, 230], + 8421: [, 1], + 8422: [, 1], + 8423: [, 230], + 8424: [, 220], + 8425: [, 230], + 8426: [, 1], + 8427: [, 1], + 8428: [, 220], + 8429: [, 220], + 8430: [, 220], + 8431: [, 220], + 8432: [, 230] + }, + 8448: { + 8448: [[97, 47, 99], 256], + 8449: [[97, 47, 115], 256], + 8450: [[67], 256], + 8451: [[176, 67], 256], + 8453: [[99, 47, 111], 256], + 8454: [[99, 47, 117], 256], + 8455: [[400], 256], + 8457: [[176, 70], 256], + 8458: [[103], 256], + 8459: [[72], 256], + 8460: [[72], 256], + 8461: [[72], 256], + 8462: [[104], 256], + 8463: [[295], 256], + 8464: [[73], 256], + 8465: [[73], 256], + 8466: [[76], 256], + 8467: [[108], 256], + 8469: [[78], 256], + 8470: [[78, 111], 256], + 8473: [[80], 256], + 8474: [[81], 256], + 8475: [[82], 256], + 8476: [[82], 256], + 8477: [[82], 256], + 8480: [[83, 77], 256], + 8481: [[84, 69, 76], 256], + 8482: [[84, 77], 256], + 8484: [[90], 256], + 8486: [[937]], + 8488: [[90], 256], + 8490: [[75]], + 8491: [[197]], + 8492: [[66], 256], + 8493: [[67], 256], + 8495: [[101], 256], + 8496: [[69], 256], + 8497: [[70], 256], + 8499: [[77], 256], + 8500: [[111], 256], + 8501: [[1488], 256], + 8502: [[1489], 256], + 8503: [[1490], 256], + 8504: [[1491], 256], + 8505: [[105], 256], + 8507: [[70, 65, 88], 256], + 8508: [[960], 256], + 8509: [[947], 256], + 8510: [[915], 256], + 8511: [[928], 256], + 8512: [[8721], 256], + 8517: [[68], 256], + 8518: [[100], 256], + 8519: [[101], 256], + 8520: [[105], 256], + 8521: [[106], 256], + 8528: [[49, 8260, 55], 256], + 8529: [[49, 8260, 57], 256], + 8530: [[49, 8260, 49, 48], 256], + 8531: [[49, 8260, 51], 256], + 8532: [[50, 8260, 51], 256], + 8533: [[49, 8260, 53], 256], + 8534: [[50, 8260, 53], 256], + 8535: [[51, 8260, 53], 256], + 8536: [[52, 8260, 53], 256], + 8537: [[49, 8260, 54], 256], + 8538: [[53, 8260, 54], 256], + 8539: [[49, 8260, 56], 256], + 8540: [[51, 8260, 56], 256], + 8541: [[53, 8260, 56], 256], + 8542: [[55, 8260, 56], 256], + 8543: [[49, 8260], 256], + 8544: [[73], 256], + 8545: [[73, 73], 256], + 8546: [[73, 73, 73], 256], + 8547: [[73, 86], 256], + 8548: [[86], 256], + 8549: [[86, 73], 256], + 8550: [[86, 73, 73], 256], + 8551: [[86, 73, 73, 73], 256], + 8552: [[73, 88], 256], + 8553: [[88], 256], + 8554: [[88, 73], 256], + 8555: [[88, 73, 73], 256], + 8556: [[76], 256], + 8557: [[67], 256], + 8558: [[68], 256], + 8559: [[77], 256], + 8560: [[105], 256], + 8561: [[105, 105], 256], + 8562: [[105, 105, 105], 256], + 8563: [[105, 118], 256], + 8564: [[118], 256], + 8565: [[118, 105], 256], + 8566: [[118, 105, 105], 256], + 8567: [[118, 105, 105, 105], 256], + 8568: [[105, 120], 256], + 8569: [[120], 256], + 8570: [[120, 105], 256], + 8571: [[120, 105, 105], 256], + 8572: [[108], 256], + 8573: [[99], 256], + 8574: [[100], 256], + 8575: [[109], 256], + 8585: [[48, 8260, 51], 256], + 8592: [, , { 824: 8602 }], + 8594: [, , { 824: 8603 }], + 8596: [, , { 824: 8622 }], + 8602: [[8592, 824]], + 8603: [[8594, 824]], + 8622: [[8596, 824]], + 8653: [[8656, 824]], + 8654: [[8660, 824]], + 8655: [[8658, 824]], + 8656: [, , { 824: 8653 }], + 8658: [, , { 824: 8655 }], + 8660: [, , { 824: 8654 }] + }, + 8704: { + 8707: [, , { 824: 8708 }], + 8708: [[8707, 824]], + 8712: [, , { 824: 8713 }], + 8713: [[8712, 824]], + 8715: [, , { 824: 8716 }], + 8716: [[8715, 824]], + 8739: [, , { 824: 8740 }], + 8740: [[8739, 824]], + 8741: [, , { 824: 8742 }], + 8742: [[8741, 824]], + 8748: [[8747, 8747], 256], + 8749: [[8747, 8747, 8747], 256], + 8751: [[8750, 8750], 256], + 8752: [[8750, 8750, 8750], 256], + 8764: [, , { 824: 8769 }], + 8769: [[8764, 824]], + 8771: [, , { 824: 8772 }], + 8772: [[8771, 824]], + 8773: [, , { 824: 8775 }], + 8775: [[8773, 824]], + 8776: [, , { 824: 8777 }], + 8777: [[8776, 824]], + 8781: [, , { 824: 8813 }], + 8800: [[61, 824]], + 8801: [, , { 824: 8802 }], + 8802: [[8801, 824]], + 8804: [, , { 824: 8816 }], + 8805: [, , { 824: 8817 }], + 8813: [[8781, 824]], + 8814: [[60, 824]], + 8815: [[62, 824]], + 8816: [[8804, 824]], + 8817: [[8805, 824]], + 8818: [, , { 824: 8820 }], + 8819: [, , { 824: 8821 }], + 8820: [[8818, 824]], + 8821: [[8819, 824]], + 8822: [, , { 824: 8824 }], + 8823: [, , { 824: 8825 }], + 8824: [[8822, 824]], + 8825: [[8823, 824]], + 8826: [, , { 824: 8832 }], + 8827: [, , { 824: 8833 }], + 8828: [, , { 824: 8928 }], + 8829: [, , { 824: 8929 }], + 8832: [[8826, 824]], + 8833: [[8827, 824]], + 8834: [, , { 824: 8836 }], + 8835: [, , { 824: 8837 }], + 8836: [[8834, 824]], + 8837: [[8835, 824]], + 8838: [, , { 824: 8840 }], + 8839: [, , { 824: 8841 }], + 8840: [[8838, 824]], + 8841: [[8839, 824]], + 8849: [, , { 824: 8930 }], + 8850: [, , { 824: 8931 }], + 8866: [, , { 824: 8876 }], + 8872: [, , { 824: 8877 }], + 8873: [, , { 824: 8878 }], + 8875: [, , { 824: 8879 }], + 8876: [[8866, 824]], + 8877: [[8872, 824]], + 8878: [[8873, 824]], + 8879: [[8875, 824]], + 8882: [, , { 824: 8938 }], + 8883: [, , { 824: 8939 }], + 8884: [, , { 824: 8940 }], + 8885: [, , { 824: 8941 }], + 8928: [[8828, 824]], + 8929: [[8829, 824]], + 8930: [[8849, 824]], + 8931: [[8850, 824]], + 8938: [[8882, 824]], + 8939: [[8883, 824]], + 8940: [[8884, 824]], + 8941: [[8885, 824]] + }, + 8960: { 9001: [[12296]], 9002: [[12297]] }, + 9216: { + 9312: [[49], 256], + 9313: [[50], 256], + 9314: [[51], 256], + 9315: [[52], 256], + 9316: [[53], 256], + 9317: [[54], 256], + 9318: [[55], 256], + 9319: [[56], 256], + 9320: [[57], 256], + 9321: [[49, 48], 256], + 9322: [[49, 49], 256], + 9323: [[49, 50], 256], + 9324: [[49, 51], 256], + 9325: [[49, 52], 256], + 9326: [[49, 53], 256], + 9327: [[49, 54], 256], + 9328: [[49, 55], 256], + 9329: [[49, 56], 256], + 9330: [[49, 57], 256], + 9331: [[50, 48], 256], + 9332: [[40, 49, 41], 256], + 9333: [[40, 50, 41], 256], + 9334: [[40, 51, 41], 256], + 9335: [[40, 52, 41], 256], + 9336: [[40, 53, 41], 256], + 9337: [[40, 54, 41], 256], + 9338: [[40, 55, 41], 256], + 9339: [[40, 56, 41], 256], + 9340: [[40, 57, 41], 256], + 9341: [[40, 49, 48, 41], 256], + 9342: [[40, 49, 49, 41], 256], + 9343: [[40, 49, 50, 41], 256], + 9344: [[40, 49, 51, 41], 256], + 9345: [[40, 49, 52, 41], 256], + 9346: [[40, 49, 53, 41], 256], + 9347: [[40, 49, 54, 41], 256], + 9348: [[40, 49, 55, 41], 256], + 9349: [[40, 49, 56, 41], 256], + 9350: [[40, 49, 57, 41], 256], + 9351: [[40, 50, 48, 41], 256], + 9352: [[49, 46], 256], + 9353: [[50, 46], 256], + 9354: [[51, 46], 256], + 9355: [[52, 46], 256], + 9356: [[53, 46], 256], + 9357: [[54, 46], 256], + 9358: [[55, 46], 256], + 9359: [[56, 46], 256], + 9360: [[57, 46], 256], + 9361: [[49, 48, 46], 256], + 9362: [[49, 49, 46], 256], + 9363: [[49, 50, 46], 256], + 9364: [[49, 51, 46], 256], + 9365: [[49, 52, 46], 256], + 9366: [[49, 53, 46], 256], + 9367: [[49, 54, 46], 256], + 9368: [[49, 55, 46], 256], + 9369: [[49, 56, 46], 256], + 9370: [[49, 57, 46], 256], + 9371: [[50, 48, 46], 256], + 9372: [[40, 97, 41], 256], + 9373: [[40, 98, 41], 256], + 9374: [[40, 99, 41], 256], + 9375: [[40, 100, 41], 256], + 9376: [[40, 101, 41], 256], + 9377: [[40, 102, 41], 256], + 9378: [[40, 103, 41], 256], + 9379: [[40, 104, 41], 256], + 9380: [[40, 105, 41], 256], + 9381: [[40, 106, 41], 256], + 9382: [[40, 107, 41], 256], + 9383: [[40, 108, 41], 256], + 9384: [[40, 109, 41], 256], + 9385: [[40, 110, 41], 256], + 9386: [[40, 111, 41], 256], + 9387: [[40, 112, 41], 256], + 9388: [[40, 113, 41], 256], + 9389: [[40, 114, 41], 256], + 9390: [[40, 115, 41], 256], + 9391: [[40, 116, 41], 256], + 9392: [[40, 117, 41], 256], + 9393: [[40, 118, 41], 256], + 9394: [[40, 119, 41], 256], + 9395: [[40, 120, 41], 256], + 9396: [[40, 121, 41], 256], + 9397: [[40, 122, 41], 256], + 9398: [[65], 256], + 9399: [[66], 256], + 9400: [[67], 256], + 9401: [[68], 256], + 9402: [[69], 256], + 9403: [[70], 256], + 9404: [[71], 256], + 9405: [[72], 256], + 9406: [[73], 256], + 9407: [[74], 256], + 9408: [[75], 256], + 9409: [[76], 256], + 9410: [[77], 256], + 9411: [[78], 256], + 9412: [[79], 256], + 9413: [[80], 256], + 9414: [[81], 256], + 9415: [[82], 256], + 9416: [[83], 256], + 9417: [[84], 256], + 9418: [[85], 256], + 9419: [[86], 256], + 9420: [[87], 256], + 9421: [[88], 256], + 9422: [[89], 256], + 9423: [[90], 256], + 9424: [[97], 256], + 9425: [[98], 256], + 9426: [[99], 256], + 9427: [[100], 256], + 9428: [[101], 256], + 9429: [[102], 256], + 9430: [[103], 256], + 9431: [[104], 256], + 9432: [[105], 256], + 9433: [[106], 256], + 9434: [[107], 256], + 9435: [[108], 256], + 9436: [[109], 256], + 9437: [[110], 256], + 9438: [[111], 256], + 9439: [[112], 256], + 9440: [[113], 256], + 9441: [[114], 256], + 9442: [[115], 256], + 9443: [[116], 256], + 9444: [[117], 256], + 9445: [[118], 256], + 9446: [[119], 256], + 9447: [[120], 256], + 9448: [[121], 256], + 9449: [[122], 256], + 9450: [[48], 256] + }, + 10752: { + 10764: [[8747, 8747, 8747, 8747], 256], + 10868: [[58, 58, 61], 256], + 10869: [[61, 61], 256], + 10870: [[61, 61, 61], 256], + 10972: [[10973, 824], 512] + }, + 11264: { + 11388: [[106], 256], + 11389: [[86], 256], + 11503: [, 230], + 11504: [, 230], + 11505: [, 230] + }, + 11520: { + 11631: [[11617], 256], + 11647: [, 9], + 11744: [, 230], + 11745: [, 230], + 11746: [, 230], + 11747: [, 230], + 11748: [, 230], + 11749: [, 230], + 11750: [, 230], + 11751: [, 230], + 11752: [, 230], + 11753: [, 230], + 11754: [, 230], + 11755: [, 230], + 11756: [, 230], + 11757: [, 230], + 11758: [, 230], + 11759: [, 230], + 11760: [, 230], + 11761: [, 230], + 11762: [, 230], + 11763: [, 230], + 11764: [, 230], + 11765: [, 230], + 11766: [, 230], + 11767: [, 230], + 11768: [, 230], + 11769: [, 230], + 11770: [, 230], + 11771: [, 230], + 11772: [, 230], + 11773: [, 230], + 11774: [, 230], + 11775: [, 230] + }, + 11776: { 11935: [[27597], 256], 12019: [[40863], 256] }, + 12032: { + 12032: [[19968], 256], + 12033: [[20008], 256], + 12034: [[20022], 256], + 12035: [[20031], 256], + 12036: [[20057], 256], + 12037: [[20101], 256], + 12038: [[20108], 256], + 12039: [[20128], 256], + 12040: [[20154], 256], + 12041: [[20799], 256], + 12042: [[20837], 256], + 12043: [[20843], 256], + 12044: [[20866], 256], + 12045: [[20886], 256], + 12046: [[20907], 256], + 12047: [[20960], 256], + 12048: [[20981], 256], + 12049: [[20992], 256], + 12050: [[21147], 256], + 12051: [[21241], 256], + 12052: [[21269], 256], + 12053: [[21274], 256], + 12054: [[21304], 256], + 12055: [[21313], 256], + 12056: [[21340], 256], + 12057: [[21353], 256], + 12058: [[21378], 256], + 12059: [[21430], 256], + 12060: [[21448], 256], + 12061: [[21475], 256], + 12062: [[22231], 256], + 12063: [[22303], 256], + 12064: [[22763], 256], + 12065: [[22786], 256], + 12066: [[22794], 256], + 12067: [[22805], 256], + 12068: [[22823], 256], + 12069: [[22899], 256], + 12070: [[23376], 256], + 12071: [[23424], 256], + 12072: [[23544], 256], + 12073: [[23567], 256], + 12074: [[23586], 256], + 12075: [[23608], 256], + 12076: [[23662], 256], + 12077: [[23665], 256], + 12078: [[24027], 256], + 12079: [[24037], 256], + 12080: [[24049], 256], + 12081: [[24062], 256], + 12082: [[24178], 256], + 12083: [[24186], 256], + 12084: [[24191], 256], + 12085: [[24308], 256], + 12086: [[24318], 256], + 12087: [[24331], 256], + 12088: [[24339], 256], + 12089: [[24400], 256], + 12090: [[24417], 256], + 12091: [[24435], 256], + 12092: [[24515], 256], + 12093: [[25096], 256], + 12094: [[25142], 256], + 12095: [[25163], 256], + 12096: [[25903], 256], + 12097: [[25908], 256], + 12098: [[25991], 256], + 12099: [[26007], 256], + 12100: [[26020], 256], + 12101: [[26041], 256], + 12102: [[26080], 256], + 12103: [[26085], 256], + 12104: [[26352], 256], + 12105: [[26376], 256], + 12106: [[26408], 256], + 12107: [[27424], 256], + 12108: [[27490], 256], + 12109: [[27513], 256], + 12110: [[27571], 256], + 12111: [[27595], 256], + 12112: [[27604], 256], + 12113: [[27611], 256], + 12114: [[27663], 256], + 12115: [[27668], 256], + 12116: [[27700], 256], + 12117: [[28779], 256], + 12118: [[29226], 256], + 12119: [[29238], 256], + 12120: [[29243], 256], + 12121: [[29247], 256], + 12122: [[29255], 256], + 12123: [[29273], 256], + 12124: [[29275], 256], + 12125: [[29356], 256], + 12126: [[29572], 256], + 12127: [[29577], 256], + 12128: [[29916], 256], + 12129: [[29926], 256], + 12130: [[29976], 256], + 12131: [[29983], 256], + 12132: [[29992], 256], + 12133: [[30000], 256], + 12134: [[30091], 256], + 12135: [[30098], 256], + 12136: [[30326], 256], + 12137: [[30333], 256], + 12138: [[30382], 256], + 12139: [[30399], 256], + 12140: [[30446], 256], + 12141: [[30683], 256], + 12142: [[30690], 256], + 12143: [[30707], 256], + 12144: [[31034], 256], + 12145: [[31160], 256], + 12146: [[31166], 256], + 12147: [[31348], 256], + 12148: [[31435], 256], + 12149: [[31481], 256], + 12150: [[31859], 256], + 12151: [[31992], 256], + 12152: [[32566], 256], + 12153: [[32593], 256], + 12154: [[32650], 256], + 12155: [[32701], 256], + 12156: [[32769], 256], + 12157: [[32780], 256], + 12158: [[32786], 256], + 12159: [[32819], 256], + 12160: [[32895], 256], + 12161: [[32905], 256], + 12162: [[33251], 256], + 12163: [[33258], 256], + 12164: [[33267], 256], + 12165: [[33276], 256], + 12166: [[33292], 256], + 12167: [[33307], 256], + 12168: [[33311], 256], + 12169: [[33390], 256], + 12170: [[33394], 256], + 12171: [[33400], 256], + 12172: [[34381], 256], + 12173: [[34411], 256], + 12174: [[34880], 256], + 12175: [[34892], 256], + 12176: [[34915], 256], + 12177: [[35198], 256], + 12178: [[35211], 256], + 12179: [[35282], 256], + 12180: [[35328], 256], + 12181: [[35895], 256], + 12182: [[35910], 256], + 12183: [[35925], 256], + 12184: [[35960], 256], + 12185: [[35997], 256], + 12186: [[36196], 256], + 12187: [[36208], 256], + 12188: [[36275], 256], + 12189: [[36523], 256], + 12190: [[36554], 256], + 12191: [[36763], 256], + 12192: [[36784], 256], + 12193: [[36789], 256], + 12194: [[37009], 256], + 12195: [[37193], 256], + 12196: [[37318], 256], + 12197: [[37324], 256], + 12198: [[37329], 256], + 12199: [[38263], 256], + 12200: [[38272], 256], + 12201: [[38428], 256], + 12202: [[38582], 256], + 12203: [[38585], 256], + 12204: [[38632], 256], + 12205: [[38737], 256], + 12206: [[38750], 256], + 12207: [[38754], 256], + 12208: [[38761], 256], + 12209: [[38859], 256], + 12210: [[38893], 256], + 12211: [[38899], 256], + 12212: [[38913], 256], + 12213: [[39080], 256], + 12214: [[39131], 256], + 12215: [[39135], 256], + 12216: [[39318], 256], + 12217: [[39321], 256], + 12218: [[39340], 256], + 12219: [[39592], 256], + 12220: [[39640], 256], + 12221: [[39647], 256], + 12222: [[39717], 256], + 12223: [[39727], 256], + 12224: [[39730], 256], + 12225: [[39740], 256], + 12226: [[39770], 256], + 12227: [[40165], 256], + 12228: [[40565], 256], + 12229: [[40575], 256], + 12230: [[40613], 256], + 12231: [[40635], 256], + 12232: [[40643], 256], + 12233: [[40653], 256], + 12234: [[40657], 256], + 12235: [[40697], 256], + 12236: [[40701], 256], + 12237: [[40718], 256], + 12238: [[40723], 256], + 12239: [[40736], 256], + 12240: [[40763], 256], + 12241: [[40778], 256], + 12242: [[40786], 256], + 12243: [[40845], 256], + 12244: [[40860], 256], + 12245: [[40864], 256] + }, + 12288: { + 12288: [[32], 256], + 12330: [, 218], + 12331: [, 228], + 12332: [, 232], + 12333: [, 222], + 12334: [, 224], + 12335: [, 224], + 12342: [[12306], 256], + 12344: [[21313], 256], + 12345: [[21316], 256], + 12346: [[21317], 256], + 12358: [, , { 12441: 12436 }], + 12363: [, , { 12441: 12364 }], + 12364: [[12363, 12441]], + 12365: [, , { 12441: 12366 }], + 12366: [[12365, 12441]], + 12367: [, , { 12441: 12368 }], + 12368: [[12367, 12441]], + 12369: [, , { 12441: 12370 }], + 12370: [[12369, 12441]], + 12371: [, , { 12441: 12372 }], + 12372: [[12371, 12441]], + 12373: [, , { 12441: 12374 }], + 12374: [[12373, 12441]], + 12375: [, , { 12441: 12376 }], + 12376: [[12375, 12441]], + 12377: [, , { 12441: 12378 }], + 12378: [[12377, 12441]], + 12379: [, , { 12441: 12380 }], + 12380: [[12379, 12441]], + 12381: [, , { 12441: 12382 }], + 12382: [[12381, 12441]], + 12383: [, , { 12441: 12384 }], + 12384: [[12383, 12441]], + 12385: [, , { 12441: 12386 }], + 12386: [[12385, 12441]], + 12388: [, , { 12441: 12389 }], + 12389: [[12388, 12441]], + 12390: [, , { 12441: 12391 }], + 12391: [[12390, 12441]], + 12392: [, , { 12441: 12393 }], + 12393: [[12392, 12441]], + 12399: [, , { 12441: 12400, 12442: 12401 }], + 12400: [[12399, 12441]], + 12401: [[12399, 12442]], + 12402: [, , { 12441: 12403, 12442: 12404 }], + 12403: [[12402, 12441]], + 12404: [[12402, 12442]], + 12405: [, , { 12441: 12406, 12442: 12407 }], + 12406: [[12405, 12441]], + 12407: [[12405, 12442]], + 12408: [, , { 12441: 12409, 12442: 12410 }], + 12409: [[12408, 12441]], + 12410: [[12408, 12442]], + 12411: [, , { 12441: 12412, 12442: 12413 }], + 12412: [[12411, 12441]], + 12413: [[12411, 12442]], + 12436: [[12358, 12441]], + 12441: [, 8], + 12442: [, 8], + 12443: [[32, 12441], 256], + 12444: [[32, 12442], 256], + 12445: [, , { 12441: 12446 }], + 12446: [[12445, 12441]], + 12447: [[12424, 12426], 256], + 12454: [, , { 12441: 12532 }], + 12459: [, , { 12441: 12460 }], + 12460: [[12459, 12441]], + 12461: [, , { 12441: 12462 }], + 12462: [[12461, 12441]], + 12463: [, , { 12441: 12464 }], + 12464: [[12463, 12441]], + 12465: [, , { 12441: 12466 }], + 12466: [[12465, 12441]], + 12467: [, , { 12441: 12468 }], + 12468: [[12467, 12441]], + 12469: [, , { 12441: 12470 }], + 12470: [[12469, 12441]], + 12471: [, , { 12441: 12472 }], + 12472: [[12471, 12441]], + 12473: [, , { 12441: 12474 }], + 12474: [[12473, 12441]], + 12475: [, , { 12441: 12476 }], + 12476: [[12475, 12441]], + 12477: [, , { 12441: 12478 }], + 12478: [[12477, 12441]], + 12479: [, , { 12441: 12480 }], + 12480: [[12479, 12441]], + 12481: [, , { 12441: 12482 }], + 12482: [[12481, 12441]], + 12484: [, , { 12441: 12485 }], + 12485: [[12484, 12441]], + 12486: [, , { 12441: 12487 }], + 12487: [[12486, 12441]], + 12488: [, , { 12441: 12489 }], + 12489: [[12488, 12441]], + 12495: [, , { 12441: 12496, 12442: 12497 }], + 12496: [[12495, 12441]], + 12497: [[12495, 12442]], + 12498: [, , { 12441: 12499, 12442: 12500 }], + 12499: [[12498, 12441]], + 12500: [[12498, 12442]], + 12501: [, , { 12441: 12502, 12442: 12503 }], + 12502: [[12501, 12441]], + 12503: [[12501, 12442]], + 12504: [, , { 12441: 12505, 12442: 12506 }], + 12505: [[12504, 12441]], + 12506: [[12504, 12442]], + 12507: [, , { 12441: 12508, 12442: 12509 }], + 12508: [[12507, 12441]], + 12509: [[12507, 12442]], + 12527: [, , { 12441: 12535 }], + 12528: [, , { 12441: 12536 }], + 12529: [, , { 12441: 12537 }], + 12530: [, , { 12441: 12538 }], + 12532: [[12454, 12441]], + 12535: [[12527, 12441]], + 12536: [[12528, 12441]], + 12537: [[12529, 12441]], + 12538: [[12530, 12441]], + 12541: [, , { 12441: 12542 }], + 12542: [[12541, 12441]], + 12543: [[12467, 12488], 256] + }, + 12544: { + 12593: [[4352], 256], + 12594: [[4353], 256], + 12595: [[4522], 256], + 12596: [[4354], 256], + 12597: [[4524], 256], + 12598: [[4525], 256], + 12599: [[4355], 256], + 12600: [[4356], 256], + 12601: [[4357], 256], + 12602: [[4528], 256], + 12603: [[4529], 256], + 12604: [[4530], 256], + 12605: [[4531], 256], + 12606: [[4532], 256], + 12607: [[4533], 256], + 12608: [[4378], 256], + 12609: [[4358], 256], + 12610: [[4359], 256], + 12611: [[4360], 256], + 12612: [[4385], 256], + 12613: [[4361], 256], + 12614: [[4362], 256], + 12615: [[4363], 256], + 12616: [[4364], 256], + 12617: [[4365], 256], + 12618: [[4366], 256], + 12619: [[4367], 256], + 12620: [[4368], 256], + 12621: [[4369], 256], + 12622: [[4370], 256], + 12623: [[4449], 256], + 12624: [[4450], 256], + 12625: [[4451], 256], + 12626: [[4452], 256], + 12627: [[4453], 256], + 12628: [[4454], 256], + 12629: [[4455], 256], + 12630: [[4456], 256], + 12631: [[4457], 256], + 12632: [[4458], 256], + 12633: [[4459], 256], + 12634: [[4460], 256], + 12635: [[4461], 256], + 12636: [[4462], 256], + 12637: [[4463], 256], + 12638: [[4464], 256], + 12639: [[4465], 256], + 12640: [[4466], 256], + 12641: [[4467], 256], + 12642: [[4468], 256], + 12643: [[4469], 256], + 12644: [[4448], 256], + 12645: [[4372], 256], + 12646: [[4373], 256], + 12647: [[4551], 256], + 12648: [[4552], 256], + 12649: [[4556], 256], + 12650: [[4558], 256], + 12651: [[4563], 256], + 12652: [[4567], 256], + 12653: [[4569], 256], + 12654: [[4380], 256], + 12655: [[4573], 256], + 12656: [[4575], 256], + 12657: [[4381], 256], + 12658: [[4382], 256], + 12659: [[4384], 256], + 12660: [[4386], 256], + 12661: [[4387], 256], + 12662: [[4391], 256], + 12663: [[4393], 256], + 12664: [[4395], 256], + 12665: [[4396], 256], + 12666: [[4397], 256], + 12667: [[4398], 256], + 12668: [[4399], 256], + 12669: [[4402], 256], + 12670: [[4406], 256], + 12671: [[4416], 256], + 12672: [[4423], 256], + 12673: [[4428], 256], + 12674: [[4593], 256], + 12675: [[4594], 256], + 12676: [[4439], 256], + 12677: [[4440], 256], + 12678: [[4441], 256], + 12679: [[4484], 256], + 12680: [[4485], 256], + 12681: [[4488], 256], + 12682: [[4497], 256], + 12683: [[4498], 256], + 12684: [[4500], 256], + 12685: [[4510], 256], + 12686: [[4513], 256], + 12690: [[19968], 256], + 12691: [[20108], 256], + 12692: [[19977], 256], + 12693: [[22235], 256], + 12694: [[19978], 256], + 12695: [[20013], 256], + 12696: [[19979], 256], + 12697: [[30002], 256], + 12698: [[20057], 256], + 12699: [[19993], 256], + 12700: [[19969], 256], + 12701: [[22825], 256], + 12702: [[22320], 256], + 12703: [[20154], 256] + }, + 12800: { + 12800: [[40, 4352, 41], 256], + 12801: [[40, 4354, 41], 256], + 12802: [[40, 4355, 41], 256], + 12803: [[40, 4357, 41], 256], + 12804: [[40, 4358, 41], 256], + 12805: [[40, 4359, 41], 256], + 12806: [[40, 4361, 41], 256], + 12807: [[40, 4363, 41], 256], + 12808: [[40, 4364, 41], 256], + 12809: [[40, 4366, 41], 256], + 12810: [[40, 4367, 41], 256], + 12811: [[40, 4368, 41], 256], + 12812: [[40, 4369, 41], 256], + 12813: [[40, 4370, 41], 256], + 12814: [[40, 4352, 4449, 41], 256], + 12815: [[40, 4354, 4449, 41], 256], + 12816: [[40, 4355, 4449, 41], 256], + 12817: [[40, 4357, 4449, 41], 256], + 12818: [[40, 4358, 4449, 41], 256], + 12819: [[40, 4359, 4449, 41], 256], + 12820: [[40, 4361, 4449, 41], 256], + 12821: [[40, 4363, 4449, 41], 256], + 12822: [[40, 4364, 4449, 41], 256], + 12823: [[40, 4366, 4449, 41], 256], + 12824: [[40, 4367, 4449, 41], 256], + 12825: [[40, 4368, 4449, 41], 256], + 12826: [[40, 4369, 4449, 41], 256], + 12827: [[40, 4370, 4449, 41], 256], + 12828: [[40, 4364, 4462, 41], 256], + 12829: [[40, 4363, 4457, 4364, 4453, 4523, 41], 256], + 12830: [[40, 4363, 4457, 4370, 4462, 41], 256], + 12832: [[40, 19968, 41], 256], + 12833: [[40, 20108, 41], 256], + 12834: [[40, 19977, 41], 256], + 12835: [[40, 22235, 41], 256], + 12836: [[40, 20116, 41], 256], + 12837: [[40, 20845, 41], 256], + 12838: [[40, 19971, 41], 256], + 12839: [[40, 20843, 41], 256], + 12840: [[40, 20061, 41], 256], + 12841: [[40, 21313, 41], 256], + 12842: [[40, 26376, 41], 256], + 12843: [[40, 28779, 41], 256], + 12844: [[40, 27700, 41], 256], + 12845: [[40, 26408, 41], 256], + 12846: [[40, 37329, 41], 256], + 12847: [[40, 22303, 41], 256], + 12848: [[40, 26085, 41], 256], + 12849: [[40, 26666, 41], 256], + 12850: [[40, 26377, 41], 256], + 12851: [[40, 31038, 41], 256], + 12852: [[40, 21517, 41], 256], + 12853: [[40, 29305, 41], 256], + 12854: [[40, 36001, 41], 256], + 12855: [[40, 31069, 41], 256], + 12856: [[40, 21172, 41], 256], + 12857: [[40, 20195, 41], 256], + 12858: [[40, 21628, 41], 256], + 12859: [[40, 23398, 41], 256], + 12860: [[40, 30435, 41], 256], + 12861: [[40, 20225, 41], 256], + 12862: [[40, 36039, 41], 256], + 12863: [[40, 21332, 41], 256], + 12864: [[40, 31085, 41], 256], + 12865: [[40, 20241, 41], 256], + 12866: [[40, 33258, 41], 256], + 12867: [[40, 33267, 41], 256], + 12868: [[21839], 256], + 12869: [[24188], 256], + 12870: [[25991], 256], + 12871: [[31631], 256], + 12880: [[80, 84, 69], 256], + 12881: [[50, 49], 256], + 12882: [[50, 50], 256], + 12883: [[50, 51], 256], + 12884: [[50, 52], 256], + 12885: [[50, 53], 256], + 12886: [[50, 54], 256], + 12887: [[50, 55], 256], + 12888: [[50, 56], 256], + 12889: [[50, 57], 256], + 12890: [[51, 48], 256], + 12891: [[51, 49], 256], + 12892: [[51, 50], 256], + 12893: [[51, 51], 256], + 12894: [[51, 52], 256], + 12895: [[51, 53], 256], + 12896: [[4352], 256], + 12897: [[4354], 256], + 12898: [[4355], 256], + 12899: [[4357], 256], + 12900: [[4358], 256], + 12901: [[4359], 256], + 12902: [[4361], 256], + 12903: [[4363], 256], + 12904: [[4364], 256], + 12905: [[4366], 256], + 12906: [[4367], 256], + 12907: [[4368], 256], + 12908: [[4369], 256], + 12909: [[4370], 256], + 12910: [[4352, 4449], 256], + 12911: [[4354, 4449], 256], + 12912: [[4355, 4449], 256], + 12913: [[4357, 4449], 256], + 12914: [[4358, 4449], 256], + 12915: [[4359, 4449], 256], + 12916: [[4361, 4449], 256], + 12917: [[4363, 4449], 256], + 12918: [[4364, 4449], 256], + 12919: [[4366, 4449], 256], + 12920: [[4367, 4449], 256], + 12921: [[4368, 4449], 256], + 12922: [[4369, 4449], 256], + 12923: [[4370, 4449], 256], + 12924: [[4366, 4449, 4535, 4352, 4457], 256], + 12925: [[4364, 4462, 4363, 4468], 256], + 12926: [[4363, 4462], 256], + 12928: [[19968], 256], + 12929: [[20108], 256], + 12930: [[19977], 256], + 12931: [[22235], 256], + 12932: [[20116], 256], + 12933: [[20845], 256], + 12934: [[19971], 256], + 12935: [[20843], 256], + 12936: [[20061], 256], + 12937: [[21313], 256], + 12938: [[26376], 256], + 12939: [[28779], 256], + 12940: [[27700], 256], + 12941: [[26408], 256], + 12942: [[37329], 256], + 12943: [[22303], 256], + 12944: [[26085], 256], + 12945: [[26666], 256], + 12946: [[26377], 256], + 12947: [[31038], 256], + 12948: [[21517], 256], + 12949: [[29305], 256], + 12950: [[36001], 256], + 12951: [[31069], 256], + 12952: [[21172], 256], + 12953: [[31192], 256], + 12954: [[30007], 256], + 12955: [[22899], 256], + 12956: [[36969], 256], + 12957: [[20778], 256], + 12958: [[21360], 256], + 12959: [[27880], 256], + 12960: [[38917], 256], + 12961: [[20241], 256], + 12962: [[20889], 256], + 12963: [[27491], 256], + 12964: [[19978], 256], + 12965: [[20013], 256], + 12966: [[19979], 256], + 12967: [[24038], 256], + 12968: [[21491], 256], + 12969: [[21307], 256], + 12970: [[23447], 256], + 12971: [[23398], 256], + 12972: [[30435], 256], + 12973: [[20225], 256], + 12974: [[36039], 256], + 12975: [[21332], 256], + 12976: [[22812], 256], + 12977: [[51, 54], 256], + 12978: [[51, 55], 256], + 12979: [[51, 56], 256], + 12980: [[51, 57], 256], + 12981: [[52, 48], 256], + 12982: [[52, 49], 256], + 12983: [[52, 50], 256], + 12984: [[52, 51], 256], + 12985: [[52, 52], 256], + 12986: [[52, 53], 256], + 12987: [[52, 54], 256], + 12988: [[52, 55], 256], + 12989: [[52, 56], 256], + 12990: [[52, 57], 256], + 12991: [[53, 48], 256], + 12992: [[49, 26376], 256], + 12993: [[50, 26376], 256], + 12994: [[51, 26376], 256], + 12995: [[52, 26376], 256], + 12996: [[53, 26376], 256], + 12997: [[54, 26376], 256], + 12998: [[55, 26376], 256], + 12999: [[56, 26376], 256], + 13000: [[57, 26376], 256], + 13001: [[49, 48, 26376], 256], + 13002: [[49, 49, 26376], 256], + 13003: [[49, 50, 26376], 256], + 13004: [[72, 103], 256], + 13005: [[101, 114, 103], 256], + 13006: [[101, 86], 256], + 13007: [[76, 84, 68], 256], + 13008: [[12450], 256], + 13009: [[12452], 256], + 13010: [[12454], 256], + 13011: [[12456], 256], + 13012: [[12458], 256], + 13013: [[12459], 256], + 13014: [[12461], 256], + 13015: [[12463], 256], + 13016: [[12465], 256], + 13017: [[12467], 256], + 13018: [[12469], 256], + 13019: [[12471], 256], + 13020: [[12473], 256], + 13021: [[12475], 256], + 13022: [[12477], 256], + 13023: [[12479], 256], + 13024: [[12481], 256], + 13025: [[12484], 256], + 13026: [[12486], 256], + 13027: [[12488], 256], + 13028: [[12490], 256], + 13029: [[12491], 256], + 13030: [[12492], 256], + 13031: [[12493], 256], + 13032: [[12494], 256], + 13033: [[12495], 256], + 13034: [[12498], 256], + 13035: [[12501], 256], + 13036: [[12504], 256], + 13037: [[12507], 256], + 13038: [[12510], 256], + 13039: [[12511], 256], + 13040: [[12512], 256], + 13041: [[12513], 256], + 13042: [[12514], 256], + 13043: [[12516], 256], + 13044: [[12518], 256], + 13045: [[12520], 256], + 13046: [[12521], 256], + 13047: [[12522], 256], + 13048: [[12523], 256], + 13049: [[12524], 256], + 13050: [[12525], 256], + 13051: [[12527], 256], + 13052: [[12528], 256], + 13053: [[12529], 256], + 13054: [[12530], 256] + }, + 13056: { + 13056: [[12450, 12497, 12540, 12488], 256], + 13057: [[12450, 12523, 12501, 12449], 256], + 13058: [[12450, 12531, 12506, 12450], 256], + 13059: [[12450, 12540, 12523], 256], + 13060: [[12452, 12491, 12531, 12464], 256], + 13061: [[12452, 12531, 12481], 256], + 13062: [[12454, 12457, 12531], 256], + 13063: [[12456, 12473, 12463, 12540, 12489], 256], + 13064: [[12456, 12540, 12459, 12540], 256], + 13065: [[12458, 12531, 12473], 256], + 13066: [[12458, 12540, 12512], 256], + 13067: [[12459, 12452, 12522], 256], + 13068: [[12459, 12521, 12483, 12488], 256], + 13069: [[12459, 12525, 12522, 12540], 256], + 13070: [[12460, 12525, 12531], 256], + 13071: [[12460, 12531, 12510], 256], + 13072: [[12462, 12460], 256], + 13073: [[12462, 12491, 12540], 256], + 13074: [[12461, 12517, 12522, 12540], 256], + 13075: [[12462, 12523, 12480, 12540], 256], + 13076: [[12461, 12525], 256], + 13077: [[12461, 12525, 12464, 12521, 12512], 256], + 13078: [[12461, 12525, 12513, 12540, 12488, 12523], 256], + 13079: [[12461, 12525, 12527, 12483, 12488], 256], + 13080: [[12464, 12521, 12512], 256], + 13081: [[12464, 12521, 12512, 12488, 12531], 256], + 13082: [[12463, 12523, 12476, 12452, 12525], 256], + 13083: [[12463, 12525, 12540, 12493], 256], + 13084: [[12465, 12540, 12473], 256], + 13085: [[12467, 12523, 12490], 256], + 13086: [[12467, 12540, 12509], 256], + 13087: [[12469, 12452, 12463, 12523], 256], + 13088: [[12469, 12531, 12481, 12540, 12512], 256], + 13089: [[12471, 12522, 12531, 12464], 256], + 13090: [[12475, 12531, 12481], 256], + 13091: [[12475, 12531, 12488], 256], + 13092: [[12480, 12540, 12473], 256], + 13093: [[12487, 12471], 256], + 13094: [[12489, 12523], 256], + 13095: [[12488, 12531], 256], + 13096: [[12490, 12494], 256], + 13097: [[12494, 12483, 12488], 256], + 13098: [[12495, 12452, 12484], 256], + 13099: [[12497, 12540, 12475, 12531, 12488], 256], + 13100: [[12497, 12540, 12484], 256], + 13101: [[12496, 12540, 12524, 12523], 256], + 13102: [[12500, 12450, 12473, 12488, 12523], 256], + 13103: [[12500, 12463, 12523], 256], + 13104: [[12500, 12467], 256], + 13105: [[12499, 12523], 256], + 13106: [[12501, 12449, 12521, 12483, 12489], 256], + 13107: [[12501, 12451, 12540, 12488], 256], + 13108: [[12502, 12483, 12471, 12455, 12523], 256], + 13109: [[12501, 12521, 12531], 256], + 13110: [[12504, 12463, 12479, 12540, 12523], 256], + 13111: [[12506, 12477], 256], + 13112: [[12506, 12491, 12498], 256], + 13113: [[12504, 12523, 12484], 256], + 13114: [[12506, 12531, 12473], 256], + 13115: [[12506, 12540, 12472], 256], + 13116: [[12505, 12540, 12479], 256], + 13117: [[12509, 12452, 12531, 12488], 256], + 13118: [[12508, 12523, 12488], 256], + 13119: [[12507, 12531], 256], + 13120: [[12509, 12531, 12489], 256], + 13121: [[12507, 12540, 12523], 256], + 13122: [[12507, 12540, 12531], 256], + 13123: [[12510, 12452, 12463, 12525], 256], + 13124: [[12510, 12452, 12523], 256], + 13125: [[12510, 12483, 12495], 256], + 13126: [[12510, 12523, 12463], 256], + 13127: [[12510, 12531, 12471, 12519, 12531], 256], + 13128: [[12511, 12463, 12525, 12531], 256], + 13129: [[12511, 12522], 256], + 13130: [[12511, 12522, 12496, 12540, 12523], 256], + 13131: [[12513, 12460], 256], + 13132: [[12513, 12460, 12488, 12531], 256], + 13133: [[12513, 12540, 12488, 12523], 256], + 13134: [[12516, 12540, 12489], 256], + 13135: [[12516, 12540, 12523], 256], + 13136: [[12518, 12450, 12531], 256], + 13137: [[12522, 12483, 12488, 12523], 256], + 13138: [[12522, 12521], 256], + 13139: [[12523, 12500, 12540], 256], + 13140: [[12523, 12540, 12502, 12523], 256], + 13141: [[12524, 12512], 256], + 13142: [[12524, 12531, 12488, 12466, 12531], 256], + 13143: [[12527, 12483, 12488], 256], + 13144: [[48, 28857], 256], + 13145: [[49, 28857], 256], + 13146: [[50, 28857], 256], + 13147: [[51, 28857], 256], + 13148: [[52, 28857], 256], + 13149: [[53, 28857], 256], + 13150: [[54, 28857], 256], + 13151: [[55, 28857], 256], + 13152: [[56, 28857], 256], + 13153: [[57, 28857], 256], + 13154: [[49, 48, 28857], 256], + 13155: [[49, 49, 28857], 256], + 13156: [[49, 50, 28857], 256], + 13157: [[49, 51, 28857], 256], + 13158: [[49, 52, 28857], 256], + 13159: [[49, 53, 28857], 256], + 13160: [[49, 54, 28857], 256], + 13161: [[49, 55, 28857], 256], + 13162: [[49, 56, 28857], 256], + 13163: [[49, 57, 28857], 256], + 13164: [[50, 48, 28857], 256], + 13165: [[50, 49, 28857], 256], + 13166: [[50, 50, 28857], 256], + 13167: [[50, 51, 28857], 256], + 13168: [[50, 52, 28857], 256], + 13169: [[104, 80, 97], 256], + 13170: [[100, 97], 256], + 13171: [[65, 85], 256], + 13172: [[98, 97, 114], 256], + 13173: [[111, 86], 256], + 13174: [[112, 99], 256], + 13175: [[100, 109], 256], + 13176: [[100, 109, 178], 256], + 13177: [[100, 109, 179], 256], + 13178: [[73, 85], 256], + 13179: [[24179, 25104], 256], + 13180: [[26157, 21644], 256], + 13181: [[22823, 27491], 256], + 13182: [[26126, 27835], 256], + 13183: [[26666, 24335, 20250, 31038], 256], + 13184: [[112, 65], 256], + 13185: [[110, 65], 256], + 13186: [[956, 65], 256], + 13187: [[109, 65], 256], + 13188: [[107, 65], 256], + 13189: [[75, 66], 256], + 13190: [[77, 66], 256], + 13191: [[71, 66], 256], + 13192: [[99, 97, 108], 256], + 13193: [[107, 99, 97, 108], 256], + 13194: [[112, 70], 256], + 13195: [[110, 70], 256], + 13196: [[956, 70], 256], + 13197: [[956, 103], 256], + 13198: [[109, 103], 256], + 13199: [[107, 103], 256], + 13200: [[72, 122], 256], + 13201: [[107, 72, 122], 256], + 13202: [[77, 72, 122], 256], + 13203: [[71, 72, 122], 256], + 13204: [[84, 72, 122], 256], + 13205: [[956, 8467], 256], + 13206: [[109, 8467], 256], + 13207: [[100, 8467], 256], + 13208: [[107, 8467], 256], + 13209: [[102, 109], 256], + 13210: [[110, 109], 256], + 13211: [[956, 109], 256], + 13212: [[109, 109], 256], + 13213: [[99, 109], 256], + 13214: [[107, 109], 256], + 13215: [[109, 109, 178], 256], + 13216: [[99, 109, 178], 256], + 13217: [[109, 178], 256], + 13218: [[107, 109, 178], 256], + 13219: [[109, 109, 179], 256], + 13220: [[99, 109, 179], 256], + 13221: [[109, 179], 256], + 13222: [[107, 109, 179], 256], + 13223: [[109, 8725, 115], 256], + 13224: [[109, 8725, 115, 178], 256], + 13225: [[80, 97], 256], + 13226: [[107, 80, 97], 256], + 13227: [[77, 80, 97], 256], + 13228: [[71, 80, 97], 256], + 13229: [[114, 97, 100], 256], + 13230: [[114, 97, 100, 8725, 115], 256], + 13231: [[114, 97, 100, 8725, 115, 178], 256], + 13232: [[112, 115], 256], + 13233: [[110, 115], 256], + 13234: [[956, 115], 256], + 13235: [[109, 115], 256], + 13236: [[112, 86], 256], + 13237: [[110, 86], 256], + 13238: [[956, 86], 256], + 13239: [[109, 86], 256], + 13240: [[107, 86], 256], + 13241: [[77, 86], 256], + 13242: [[112, 87], 256], + 13243: [[110, 87], 256], + 13244: [[956, 87], 256], + 13245: [[109, 87], 256], + 13246: [[107, 87], 256], + 13247: [[77, 87], 256], + 13248: [[107, 937], 256], + 13249: [[77, 937], 256], + 13250: [[97, 46, 109, 46], 256], + 13251: [[66, 113], 256], + 13252: [[99, 99], 256], + 13253: [[99, 100], 256], + 13254: [[67, 8725, 107, 103], 256], + 13255: [[67, 111, 46], 256], + 13256: [[100, 66], 256], + 13257: [[71, 121], 256], + 13258: [[104, 97], 256], + 13259: [[72, 80], 256], + 13260: [[105, 110], 256], + 13261: [[75, 75], 256], + 13262: [[75, 77], 256], + 13263: [[107, 116], 256], + 13264: [[108, 109], 256], + 13265: [[108, 110], 256], + 13266: [[108, 111, 103], 256], + 13267: [[108, 120], 256], + 13268: [[109, 98], 256], + 13269: [[109, 105, 108], 256], + 13270: [[109, 111, 108], 256], + 13271: [[80, 72], 256], + 13272: [[112, 46, 109, 46], 256], + 13273: [[80, 80, 77], 256], + 13274: [[80, 82], 256], + 13275: [[115, 114], 256], + 13276: [[83, 118], 256], + 13277: [[87, 98], 256], + 13278: [[86, 8725, 109], 256], + 13279: [[65, 8725, 109], 256], + 13280: [[49, 26085], 256], + 13281: [[50, 26085], 256], + 13282: [[51, 26085], 256], + 13283: [[52, 26085], 256], + 13284: [[53, 26085], 256], + 13285: [[54, 26085], 256], + 13286: [[55, 26085], 256], + 13287: [[56, 26085], 256], + 13288: [[57, 26085], 256], + 13289: [[49, 48, 26085], 256], + 13290: [[49, 49, 26085], 256], + 13291: [[49, 50, 26085], 256], + 13292: [[49, 51, 26085], 256], + 13293: [[49, 52, 26085], 256], + 13294: [[49, 53, 26085], 256], + 13295: [[49, 54, 26085], 256], + 13296: [[49, 55, 26085], 256], + 13297: [[49, 56, 26085], 256], + 13298: [[49, 57, 26085], 256], + 13299: [[50, 48, 26085], 256], + 13300: [[50, 49, 26085], 256], + 13301: [[50, 50, 26085], 256], + 13302: [[50, 51, 26085], 256], + 13303: [[50, 52, 26085], 256], + 13304: [[50, 53, 26085], 256], + 13305: [[50, 54, 26085], 256], + 13306: [[50, 55, 26085], 256], + 13307: [[50, 56, 26085], 256], + 13308: [[50, 57, 26085], 256], + 13309: [[51, 48, 26085], 256], + 13310: [[51, 49, 26085], 256], + 13311: [[103, 97, 108], 256] + }, + 42496: { + 42607: [, 230], + 42612: [, 230], + 42613: [, 230], + 42614: [, 230], + 42615: [, 230], + 42616: [, 230], + 42617: [, 230], + 42618: [, 230], + 42619: [, 230], + 42620: [, 230], + 42621: [, 230], + 42655: [, 230], + 42736: [, 230], + 42737: [, 230] + }, + 42752: { 42864: [[42863], 256], 43000: [[294], 256], 43001: [[339], 256] }, + 43008: { + 43014: [, 9], + 43204: [, 9], + 43232: [, 230], + 43233: [, 230], + 43234: [, 230], + 43235: [, 230], + 43236: [, 230], + 43237: [, 230], + 43238: [, 230], + 43239: [, 230], + 43240: [, 230], + 43241: [, 230], + 43242: [, 230], + 43243: [, 230], + 43244: [, 230], + 43245: [, 230], + 43246: [, 230], + 43247: [, 230], + 43248: [, 230], + 43249: [, 230] + }, + 43264: { + 43307: [, 220], + 43308: [, 220], + 43309: [, 220], + 43347: [, 9], + 43443: [, 7], + 43456: [, 9] + }, + 43520: { + 43696: [, 230], + 43698: [, 230], + 43699: [, 230], + 43700: [, 220], + 43703: [, 230], + 43704: [, 230], + 43710: [, 230], + 43711: [, 230], + 43713: [, 230], + 43766: [, 9] + }, + 43776: { 44013: [, 9] }, + 53504: { + 119134: [[119127, 119141], 512], + 119135: [[119128, 119141], 512], + 119136: [[119135, 119150], 512], + 119137: [[119135, 119151], 512], + 119138: [[119135, 119152], 512], + 119139: [[119135, 119153], 512], + 119140: [[119135, 119154], 512], + 119141: [, 216], + 119142: [, 216], + 119143: [, 1], + 119144: [, 1], + 119145: [, 1], + 119149: [, 226], + 119150: [, 216], + 119151: [, 216], + 119152: [, 216], + 119153: [, 216], + 119154: [, 216], + 119163: [, 220], + 119164: [, 220], + 119165: [, 220], + 119166: [, 220], + 119167: [, 220], + 119168: [, 220], + 119169: [, 220], + 119170: [, 220], + 119173: [, 230], + 119174: [, 230], + 119175: [, 230], + 119176: [, 230], + 119177: [, 230], + 119178: [, 220], + 119179: [, 220], + 119210: [, 230], + 119211: [, 230], + 119212: [, 230], + 119213: [, 230], + 119227: [[119225, 119141], 512], + 119228: [[119226, 119141], 512], + 119229: [[119227, 119150], 512], + 119230: [[119228, 119150], 512], + 119231: [[119227, 119151], 512], + 119232: [[119228, 119151], 512] + }, + 53760: { 119362: [, 230], 119363: [, 230], 119364: [, 230] }, + 54272: { + 119808: [[65], 256], + 119809: [[66], 256], + 119810: [[67], 256], + 119811: [[68], 256], + 119812: [[69], 256], + 119813: [[70], 256], + 119814: [[71], 256], + 119815: [[72], 256], + 119816: [[73], 256], + 119817: [[74], 256], + 119818: [[75], 256], + 119819: [[76], 256], + 119820: [[77], 256], + 119821: [[78], 256], + 119822: [[79], 256], + 119823: [[80], 256], + 119824: [[81], 256], + 119825: [[82], 256], + 119826: [[83], 256], + 119827: [[84], 256], + 119828: [[85], 256], + 119829: [[86], 256], + 119830: [[87], 256], + 119831: [[88], 256], + 119832: [[89], 256], + 119833: [[90], 256], + 119834: [[97], 256], + 119835: [[98], 256], + 119836: [[99], 256], + 119837: [[100], 256], + 119838: [[101], 256], + 119839: [[102], 256], + 119840: [[103], 256], + 119841: [[104], 256], + 119842: [[105], 256], + 119843: [[106], 256], + 119844: [[107], 256], + 119845: [[108], 256], + 119846: [[109], 256], + 119847: [[110], 256], + 119848: [[111], 256], + 119849: [[112], 256], + 119850: [[113], 256], + 119851: [[114], 256], + 119852: [[115], 256], + 119853: [[116], 256], + 119854: [[117], 256], + 119855: [[118], 256], + 119856: [[119], 256], + 119857: [[120], 256], + 119858: [[121], 256], + 119859: [[122], 256], + 119860: [[65], 256], + 119861: [[66], 256], + 119862: [[67], 256], + 119863: [[68], 256], + 119864: [[69], 256], + 119865: [[70], 256], + 119866: [[71], 256], + 119867: [[72], 256], + 119868: [[73], 256], + 119869: [[74], 256], + 119870: [[75], 256], + 119871: [[76], 256], + 119872: [[77], 256], + 119873: [[78], 256], + 119874: [[79], 256], + 119875: [[80], 256], + 119876: [[81], 256], + 119877: [[82], 256], + 119878: [[83], 256], + 119879: [[84], 256], + 119880: [[85], 256], + 119881: [[86], 256], + 119882: [[87], 256], + 119883: [[88], 256], + 119884: [[89], 256], + 119885: [[90], 256], + 119886: [[97], 256], + 119887: [[98], 256], + 119888: [[99], 256], + 119889: [[100], 256], + 119890: [[101], 256], + 119891: [[102], 256], + 119892: [[103], 256], + 119894: [[105], 256], + 119895: [[106], 256], + 119896: [[107], 256], + 119897: [[108], 256], + 119898: [[109], 256], + 119899: [[110], 256], + 119900: [[111], 256], + 119901: [[112], 256], + 119902: [[113], 256], + 119903: [[114], 256], + 119904: [[115], 256], + 119905: [[116], 256], + 119906: [[117], 256], + 119907: [[118], 256], + 119908: [[119], 256], + 119909: [[120], 256], + 119910: [[121], 256], + 119911: [[122], 256], + 119912: [[65], 256], + 119913: [[66], 256], + 119914: [[67], 256], + 119915: [[68], 256], + 119916: [[69], 256], + 119917: [[70], 256], + 119918: [[71], 256], + 119919: [[72], 256], + 119920: [[73], 256], + 119921: [[74], 256], + 119922: [[75], 256], + 119923: [[76], 256], + 119924: [[77], 256], + 119925: [[78], 256], + 119926: [[79], 256], + 119927: [[80], 256], + 119928: [[81], 256], + 119929: [[82], 256], + 119930: [[83], 256], + 119931: [[84], 256], + 119932: [[85], 256], + 119933: [[86], 256], + 119934: [[87], 256], + 119935: [[88], 256], + 119936: [[89], 256], + 119937: [[90], 256], + 119938: [[97], 256], + 119939: [[98], 256], + 119940: [[99], 256], + 119941: [[100], 256], + 119942: [[101], 256], + 119943: [[102], 256], + 119944: [[103], 256], + 119945: [[104], 256], + 119946: [[105], 256], + 119947: [[106], 256], + 119948: [[107], 256], + 119949: [[108], 256], + 119950: [[109], 256], + 119951: [[110], 256], + 119952: [[111], 256], + 119953: [[112], 256], + 119954: [[113], 256], + 119955: [[114], 256], + 119956: [[115], 256], + 119957: [[116], 256], + 119958: [[117], 256], + 119959: [[118], 256], + 119960: [[119], 256], + 119961: [[120], 256], + 119962: [[121], 256], + 119963: [[122], 256], + 119964: [[65], 256], + 119966: [[67], 256], + 119967: [[68], 256], + 119970: [[71], 256], + 119973: [[74], 256], + 119974: [[75], 256], + 119977: [[78], 256], + 119978: [[79], 256], + 119979: [[80], 256], + 119980: [[81], 256], + 119982: [[83], 256], + 119983: [[84], 256], + 119984: [[85], 256], + 119985: [[86], 256], + 119986: [[87], 256], + 119987: [[88], 256], + 119988: [[89], 256], + 119989: [[90], 256], + 119990: [[97], 256], + 119991: [[98], 256], + 119992: [[99], 256], + 119993: [[100], 256], + 119995: [[102], 256], + 119997: [[104], 256], + 119998: [[105], 256], + 119999: [[106], 256], + 120000: [[107], 256], + 120001: [[108], 256], + 120002: [[109], 256], + 120003: [[110], 256], + 120005: [[112], 256], + 120006: [[113], 256], + 120007: [[114], 256], + 120008: [[115], 256], + 120009: [[116], 256], + 120010: [[117], 256], + 120011: [[118], 256], + 120012: [[119], 256], + 120013: [[120], 256], + 120014: [[121], 256], + 120015: [[122], 256], + 120016: [[65], 256], + 120017: [[66], 256], + 120018: [[67], 256], + 120019: [[68], 256], + 120020: [[69], 256], + 120021: [[70], 256], + 120022: [[71], 256], + 120023: [[72], 256], + 120024: [[73], 256], + 120025: [[74], 256], + 120026: [[75], 256], + 120027: [[76], 256], + 120028: [[77], 256], + 120029: [[78], 256], + 120030: [[79], 256], + 120031: [[80], 256], + 120032: [[81], 256], + 120033: [[82], 256], + 120034: [[83], 256], + 120035: [[84], 256], + 120036: [[85], 256], + 120037: [[86], 256], + 120038: [[87], 256], + 120039: [[88], 256], + 120040: [[89], 256], + 120041: [[90], 256], + 120042: [[97], 256], + 120043: [[98], 256], + 120044: [[99], 256], + 120045: [[100], 256], + 120046: [[101], 256], + 120047: [[102], 256], + 120048: [[103], 256], + 120049: [[104], 256], + 120050: [[105], 256], + 120051: [[106], 256], + 120052: [[107], 256], + 120053: [[108], 256], + 120054: [[109], 256], + 120055: [[110], 256], + 120056: [[111], 256], + 120057: [[112], 256], + 120058: [[113], 256], + 120059: [[114], 256], + 120060: [[115], 256], + 120061: [[116], 256], + 120062: [[117], 256], + 120063: [[118], 256] + }, + 54528: { + 120064: [[119], 256], + 120065: [[120], 256], + 120066: [[121], 256], + 120067: [[122], 256], + 120068: [[65], 256], + 120069: [[66], 256], + 120071: [[68], 256], + 120072: [[69], 256], + 120073: [[70], 256], + 120074: [[71], 256], + 120077: [[74], 256], + 120078: [[75], 256], + 120079: [[76], 256], + 120080: [[77], 256], + 120081: [[78], 256], + 120082: [[79], 256], + 120083: [[80], 256], + 120084: [[81], 256], + 120086: [[83], 256], + 120087: [[84], 256], + 120088: [[85], 256], + 120089: [[86], 256], + 120090: [[87], 256], + 120091: [[88], 256], + 120092: [[89], 256], + 120094: [[97], 256], + 120095: [[98], 256], + 120096: [[99], 256], + 120097: [[100], 256], + 120098: [[101], 256], + 120099: [[102], 256], + 120100: [[103], 256], + 120101: [[104], 256], + 120102: [[105], 256], + 120103: [[106], 256], + 120104: [[107], 256], + 120105: [[108], 256], + 120106: [[109], 256], + 120107: [[110], 256], + 120108: [[111], 256], + 120109: [[112], 256], + 120110: [[113], 256], + 120111: [[114], 256], + 120112: [[115], 256], + 120113: [[116], 256], + 120114: [[117], 256], + 120115: [[118], 256], + 120116: [[119], 256], + 120117: [[120], 256], + 120118: [[121], 256], + 120119: [[122], 256], + 120120: [[65], 256], + 120121: [[66], 256], + 120123: [[68], 256], + 120124: [[69], 256], + 120125: [[70], 256], + 120126: [[71], 256], + 120128: [[73], 256], + 120129: [[74], 256], + 120130: [[75], 256], + 120131: [[76], 256], + 120132: [[77], 256], + 120134: [[79], 256], + 120138: [[83], 256], + 120139: [[84], 256], + 120140: [[85], 256], + 120141: [[86], 256], + 120142: [[87], 256], + 120143: [[88], 256], + 120144: [[89], 256], + 120146: [[97], 256], + 120147: [[98], 256], + 120148: [[99], 256], + 120149: [[100], 256], + 120150: [[101], 256], + 120151: [[102], 256], + 120152: [[103], 256], + 120153: [[104], 256], + 120154: [[105], 256], + 120155: [[106], 256], + 120156: [[107], 256], + 120157: [[108], 256], + 120158: [[109], 256], + 120159: [[110], 256], + 120160: [[111], 256], + 120161: [[112], 256], + 120162: [[113], 256], + 120163: [[114], 256], + 120164: [[115], 256], + 120165: [[116], 256], + 120166: [[117], 256], + 120167: [[118], 256], + 120168: [[119], 256], + 120169: [[120], 256], + 120170: [[121], 256], + 120171: [[122], 256], + 120172: [[65], 256], + 120173: [[66], 256], + 120174: [[67], 256], + 120175: [[68], 256], + 120176: [[69], 256], + 120177: [[70], 256], + 120178: [[71], 256], + 120179: [[72], 256], + 120180: [[73], 256], + 120181: [[74], 256], + 120182: [[75], 256], + 120183: [[76], 256], + 120184: [[77], 256], + 120185: [[78], 256], + 120186: [[79], 256], + 120187: [[80], 256], + 120188: [[81], 256], + 120189: [[82], 256], + 120190: [[83], 256], + 120191: [[84], 256], + 120192: [[85], 256], + 120193: [[86], 256], + 120194: [[87], 256], + 120195: [[88], 256], + 120196: [[89], 256], + 120197: [[90], 256], + 120198: [[97], 256], + 120199: [[98], 256], + 120200: [[99], 256], + 120201: [[100], 256], + 120202: [[101], 256], + 120203: [[102], 256], + 120204: [[103], 256], + 120205: [[104], 256], + 120206: [[105], 256], + 120207: [[106], 256], + 120208: [[107], 256], + 120209: [[108], 256], + 120210: [[109], 256], + 120211: [[110], 256], + 120212: [[111], 256], + 120213: [[112], 256], + 120214: [[113], 256], + 120215: [[114], 256], + 120216: [[115], 256], + 120217: [[116], 256], + 120218: [[117], 256], + 120219: [[118], 256], + 120220: [[119], 256], + 120221: [[120], 256], + 120222: [[121], 256], + 120223: [[122], 256], + 120224: [[65], 256], + 120225: [[66], 256], + 120226: [[67], 256], + 120227: [[68], 256], + 120228: [[69], 256], + 120229: [[70], 256], + 120230: [[71], 256], + 120231: [[72], 256], + 120232: [[73], 256], + 120233: [[74], 256], + 120234: [[75], 256], + 120235: [[76], 256], + 120236: [[77], 256], + 120237: [[78], 256], + 120238: [[79], 256], + 120239: [[80], 256], + 120240: [[81], 256], + 120241: [[82], 256], + 120242: [[83], 256], + 120243: [[84], 256], + 120244: [[85], 256], + 120245: [[86], 256], + 120246: [[87], 256], + 120247: [[88], 256], + 120248: [[89], 256], + 120249: [[90], 256], + 120250: [[97], 256], + 120251: [[98], 256], + 120252: [[99], 256], + 120253: [[100], 256], + 120254: [[101], 256], + 120255: [[102], 256], + 120256: [[103], 256], + 120257: [[104], 256], + 120258: [[105], 256], + 120259: [[106], 256], + 120260: [[107], 256], + 120261: [[108], 256], + 120262: [[109], 256], + 120263: [[110], 256], + 120264: [[111], 256], + 120265: [[112], 256], + 120266: [[113], 256], + 120267: [[114], 256], + 120268: [[115], 256], + 120269: [[116], 256], + 120270: [[117], 256], + 120271: [[118], 256], + 120272: [[119], 256], + 120273: [[120], 256], + 120274: [[121], 256], + 120275: [[122], 256], + 120276: [[65], 256], + 120277: [[66], 256], + 120278: [[67], 256], + 120279: [[68], 256], + 120280: [[69], 256], + 120281: [[70], 256], + 120282: [[71], 256], + 120283: [[72], 256], + 120284: [[73], 256], + 120285: [[74], 256], + 120286: [[75], 256], + 120287: [[76], 256], + 120288: [[77], 256], + 120289: [[78], 256], + 120290: [[79], 256], + 120291: [[80], 256], + 120292: [[81], 256], + 120293: [[82], 256], + 120294: [[83], 256], + 120295: [[84], 256], + 120296: [[85], 256], + 120297: [[86], 256], + 120298: [[87], 256], + 120299: [[88], 256], + 120300: [[89], 256], + 120301: [[90], 256], + 120302: [[97], 256], + 120303: [[98], 256], + 120304: [[99], 256], + 120305: [[100], 256], + 120306: [[101], 256], + 120307: [[102], 256], + 120308: [[103], 256], + 120309: [[104], 256], + 120310: [[105], 256], + 120311: [[106], 256], + 120312: [[107], 256], + 120313: [[108], 256], + 120314: [[109], 256], + 120315: [[110], 256], + 120316: [[111], 256], + 120317: [[112], 256], + 120318: [[113], 256], + 120319: [[114], 256] + }, + 54784: { + 120320: [[115], 256], + 120321: [[116], 256], + 120322: [[117], 256], + 120323: [[118], 256], + 120324: [[119], 256], + 120325: [[120], 256], + 120326: [[121], 256], + 120327: [[122], 256], + 120328: [[65], 256], + 120329: [[66], 256], + 120330: [[67], 256], + 120331: [[68], 256], + 120332: [[69], 256], + 120333: [[70], 256], + 120334: [[71], 256], + 120335: [[72], 256], + 120336: [[73], 256], + 120337: [[74], 256], + 120338: [[75], 256], + 120339: [[76], 256], + 120340: [[77], 256], + 120341: [[78], 256], + 120342: [[79], 256], + 120343: [[80], 256], + 120344: [[81], 256], + 120345: [[82], 256], + 120346: [[83], 256], + 120347: [[84], 256], + 120348: [[85], 256], + 120349: [[86], 256], + 120350: [[87], 256], + 120351: [[88], 256], + 120352: [[89], 256], + 120353: [[90], 256], + 120354: [[97], 256], + 120355: [[98], 256], + 120356: [[99], 256], + 120357: [[100], 256], + 120358: [[101], 256], + 120359: [[102], 256], + 120360: [[103], 256], + 120361: [[104], 256], + 120362: [[105], 256], + 120363: [[106], 256], + 120364: [[107], 256], + 120365: [[108], 256], + 120366: [[109], 256], + 120367: [[110], 256], + 120368: [[111], 256], + 120369: [[112], 256], + 120370: [[113], 256], + 120371: [[114], 256], + 120372: [[115], 256], + 120373: [[116], 256], + 120374: [[117], 256], + 120375: [[118], 256], + 120376: [[119], 256], + 120377: [[120], 256], + 120378: [[121], 256], + 120379: [[122], 256], + 120380: [[65], 256], + 120381: [[66], 256], + 120382: [[67], 256], + 120383: [[68], 256], + 120384: [[69], 256], + 120385: [[70], 256], + 120386: [[71], 256], + 120387: [[72], 256], + 120388: [[73], 256], + 120389: [[74], 256], + 120390: [[75], 256], + 120391: [[76], 256], + 120392: [[77], 256], + 120393: [[78], 256], + 120394: [[79], 256], + 120395: [[80], 256], + 120396: [[81], 256], + 120397: [[82], 256], + 120398: [[83], 256], + 120399: [[84], 256], + 120400: [[85], 256], + 120401: [[86], 256], + 120402: [[87], 256], + 120403: [[88], 256], + 120404: [[89], 256], + 120405: [[90], 256], + 120406: [[97], 256], + 120407: [[98], 256], + 120408: [[99], 256], + 120409: [[100], 256], + 120410: [[101], 256], + 120411: [[102], 256], + 120412: [[103], 256], + 120413: [[104], 256], + 120414: [[105], 256], + 120415: [[106], 256], + 120416: [[107], 256], + 120417: [[108], 256], + 120418: [[109], 256], + 120419: [[110], 256], + 120420: [[111], 256], + 120421: [[112], 256], + 120422: [[113], 256], + 120423: [[114], 256], + 120424: [[115], 256], + 120425: [[116], 256], + 120426: [[117], 256], + 120427: [[118], 256], + 120428: [[119], 256], + 120429: [[120], 256], + 120430: [[121], 256], + 120431: [[122], 256], + 120432: [[65], 256], + 120433: [[66], 256], + 120434: [[67], 256], + 120435: [[68], 256], + 120436: [[69], 256], + 120437: [[70], 256], + 120438: [[71], 256], + 120439: [[72], 256], + 120440: [[73], 256], + 120441: [[74], 256], + 120442: [[75], 256], + 120443: [[76], 256], + 120444: [[77], 256], + 120445: [[78], 256], + 120446: [[79], 256], + 120447: [[80], 256], + 120448: [[81], 256], + 120449: [[82], 256], + 120450: [[83], 256], + 120451: [[84], 256], + 120452: [[85], 256], + 120453: [[86], 256], + 120454: [[87], 256], + 120455: [[88], 256], + 120456: [[89], 256], + 120457: [[90], 256], + 120458: [[97], 256], + 120459: [[98], 256], + 120460: [[99], 256], + 120461: [[100], 256], + 120462: [[101], 256], + 120463: [[102], 256], + 120464: [[103], 256], + 120465: [[104], 256], + 120466: [[105], 256], + 120467: [[106], 256], + 120468: [[107], 256], + 120469: [[108], 256], + 120470: [[109], 256], + 120471: [[110], 256], + 120472: [[111], 256], + 120473: [[112], 256], + 120474: [[113], 256], + 120475: [[114], 256], + 120476: [[115], 256], + 120477: [[116], 256], + 120478: [[117], 256], + 120479: [[118], 256], + 120480: [[119], 256], + 120481: [[120], 256], + 120482: [[121], 256], + 120483: [[122], 256], + 120484: [[305], 256], + 120485: [[567], 256], + 120488: [[913], 256], + 120489: [[914], 256], + 120490: [[915], 256], + 120491: [[916], 256], + 120492: [[917], 256], + 120493: [[918], 256], + 120494: [[919], 256], + 120495: [[920], 256], + 120496: [[921], 256], + 120497: [[922], 256], + 120498: [[923], 256], + 120499: [[924], 256], + 120500: [[925], 256], + 120501: [[926], 256], + 120502: [[927], 256], + 120503: [[928], 256], + 120504: [[929], 256], + 120505: [[1012], 256], + 120506: [[931], 256], + 120507: [[932], 256], + 120508: [[933], 256], + 120509: [[934], 256], + 120510: [[935], 256], + 120511: [[936], 256], + 120512: [[937], 256], + 120513: [[8711], 256], + 120514: [[945], 256], + 120515: [[946], 256], + 120516: [[947], 256], + 120517: [[948], 256], + 120518: [[949], 256], + 120519: [[950], 256], + 120520: [[951], 256], + 120521: [[952], 256], + 120522: [[953], 256], + 120523: [[954], 256], + 120524: [[955], 256], + 120525: [[956], 256], + 120526: [[957], 256], + 120527: [[958], 256], + 120528: [[959], 256], + 120529: [[960], 256], + 120530: [[961], 256], + 120531: [[962], 256], + 120532: [[963], 256], + 120533: [[964], 256], + 120534: [[965], 256], + 120535: [[966], 256], + 120536: [[967], 256], + 120537: [[968], 256], + 120538: [[969], 256], + 120539: [[8706], 256], + 120540: [[1013], 256], + 120541: [[977], 256], + 120542: [[1008], 256], + 120543: [[981], 256], + 120544: [[1009], 256], + 120545: [[982], 256], + 120546: [[913], 256], + 120547: [[914], 256], + 120548: [[915], 256], + 120549: [[916], 256], + 120550: [[917], 256], + 120551: [[918], 256], + 120552: [[919], 256], + 120553: [[920], 256], + 120554: [[921], 256], + 120555: [[922], 256], + 120556: [[923], 256], + 120557: [[924], 256], + 120558: [[925], 256], + 120559: [[926], 256], + 120560: [[927], 256], + 120561: [[928], 256], + 120562: [[929], 256], + 120563: [[1012], 256], + 120564: [[931], 256], + 120565: [[932], 256], + 120566: [[933], 256], + 120567: [[934], 256], + 120568: [[935], 256], + 120569: [[936], 256], + 120570: [[937], 256], + 120571: [[8711], 256], + 120572: [[945], 256], + 120573: [[946], 256], + 120574: [[947], 256], + 120575: [[948], 256] + }, + 55040: { + 120576: [[949], 256], + 120577: [[950], 256], + 120578: [[951], 256], + 120579: [[952], 256], + 120580: [[953], 256], + 120581: [[954], 256], + 120582: [[955], 256], + 120583: [[956], 256], + 120584: [[957], 256], + 120585: [[958], 256], + 120586: [[959], 256], + 120587: [[960], 256], + 120588: [[961], 256], + 120589: [[962], 256], + 120590: [[963], 256], + 120591: [[964], 256], + 120592: [[965], 256], + 120593: [[966], 256], + 120594: [[967], 256], + 120595: [[968], 256], + 120596: [[969], 256], + 120597: [[8706], 256], + 120598: [[1013], 256], + 120599: [[977], 256], + 120600: [[1008], 256], + 120601: [[981], 256], + 120602: [[1009], 256], + 120603: [[982], 256], + 120604: [[913], 256], + 120605: [[914], 256], + 120606: [[915], 256], + 120607: [[916], 256], + 120608: [[917], 256], + 120609: [[918], 256], + 120610: [[919], 256], + 120611: [[920], 256], + 120612: [[921], 256], + 120613: [[922], 256], + 120614: [[923], 256], + 120615: [[924], 256], + 120616: [[925], 256], + 120617: [[926], 256], + 120618: [[927], 256], + 120619: [[928], 256], + 120620: [[929], 256], + 120621: [[1012], 256], + 120622: [[931], 256], + 120623: [[932], 256], + 120624: [[933], 256], + 120625: [[934], 256], + 120626: [[935], 256], + 120627: [[936], 256], + 120628: [[937], 256], + 120629: [[8711], 256], + 120630: [[945], 256], + 120631: [[946], 256], + 120632: [[947], 256], + 120633: [[948], 256], + 120634: [[949], 256], + 120635: [[950], 256], + 120636: [[951], 256], + 120637: [[952], 256], + 120638: [[953], 256], + 120639: [[954], 256], + 120640: [[955], 256], + 120641: [[956], 256], + 120642: [[957], 256], + 120643: [[958], 256], + 120644: [[959], 256], + 120645: [[960], 256], + 120646: [[961], 256], + 120647: [[962], 256], + 120648: [[963], 256], + 120649: [[964], 256], + 120650: [[965], 256], + 120651: [[966], 256], + 120652: [[967], 256], + 120653: [[968], 256], + 120654: [[969], 256], + 120655: [[8706], 256], + 120656: [[1013], 256], + 120657: [[977], 256], + 120658: [[1008], 256], + 120659: [[981], 256], + 120660: [[1009], 256], + 120661: [[982], 256], + 120662: [[913], 256], + 120663: [[914], 256], + 120664: [[915], 256], + 120665: [[916], 256], + 120666: [[917], 256], + 120667: [[918], 256], + 120668: [[919], 256], + 120669: [[920], 256], + 120670: [[921], 256], + 120671: [[922], 256], + 120672: [[923], 256], + 120673: [[924], 256], + 120674: [[925], 256], + 120675: [[926], 256], + 120676: [[927], 256], + 120677: [[928], 256], + 120678: [[929], 256], + 120679: [[1012], 256], + 120680: [[931], 256], + 120681: [[932], 256], + 120682: [[933], 256], + 120683: [[934], 256], + 120684: [[935], 256], + 120685: [[936], 256], + 120686: [[937], 256], + 120687: [[8711], 256], + 120688: [[945], 256], + 120689: [[946], 256], + 120690: [[947], 256], + 120691: [[948], 256], + 120692: [[949], 256], + 120693: [[950], 256], + 120694: [[951], 256], + 120695: [[952], 256], + 120696: [[953], 256], + 120697: [[954], 256], + 120698: [[955], 256], + 120699: [[956], 256], + 120700: [[957], 256], + 120701: [[958], 256], + 120702: [[959], 256], + 120703: [[960], 256], + 120704: [[961], 256], + 120705: [[962], 256], + 120706: [[963], 256], + 120707: [[964], 256], + 120708: [[965], 256], + 120709: [[966], 256], + 120710: [[967], 256], + 120711: [[968], 256], + 120712: [[969], 256], + 120713: [[8706], 256], + 120714: [[1013], 256], + 120715: [[977], 256], + 120716: [[1008], 256], + 120717: [[981], 256], + 120718: [[1009], 256], + 120719: [[982], 256], + 120720: [[913], 256], + 120721: [[914], 256], + 120722: [[915], 256], + 120723: [[916], 256], + 120724: [[917], 256], + 120725: [[918], 256], + 120726: [[919], 256], + 120727: [[920], 256], + 120728: [[921], 256], + 120729: [[922], 256], + 120730: [[923], 256], + 120731: [[924], 256], + 120732: [[925], 256], + 120733: [[926], 256], + 120734: [[927], 256], + 120735: [[928], 256], + 120736: [[929], 256], + 120737: [[1012], 256], + 120738: [[931], 256], + 120739: [[932], 256], + 120740: [[933], 256], + 120741: [[934], 256], + 120742: [[935], 256], + 120743: [[936], 256], + 120744: [[937], 256], + 120745: [[8711], 256], + 120746: [[945], 256], + 120747: [[946], 256], + 120748: [[947], 256], + 120749: [[948], 256], + 120750: [[949], 256], + 120751: [[950], 256], + 120752: [[951], 256], + 120753: [[952], 256], + 120754: [[953], 256], + 120755: [[954], 256], + 120756: [[955], 256], + 120757: [[956], 256], + 120758: [[957], 256], + 120759: [[958], 256], + 120760: [[959], 256], + 120761: [[960], 256], + 120762: [[961], 256], + 120763: [[962], 256], + 120764: [[963], 256], + 120765: [[964], 256], + 120766: [[965], 256], + 120767: [[966], 256], + 120768: [[967], 256], + 120769: [[968], 256], + 120770: [[969], 256], + 120771: [[8706], 256], + 120772: [[1013], 256], + 120773: [[977], 256], + 120774: [[1008], 256], + 120775: [[981], 256], + 120776: [[1009], 256], + 120777: [[982], 256], + 120778: [[988], 256], + 120779: [[989], 256], + 120782: [[48], 256], + 120783: [[49], 256], + 120784: [[50], 256], + 120785: [[51], 256], + 120786: [[52], 256], + 120787: [[53], 256], + 120788: [[54], 256], + 120789: [[55], 256], + 120790: [[56], 256], + 120791: [[57], 256], + 120792: [[48], 256], + 120793: [[49], 256], + 120794: [[50], 256], + 120795: [[51], 256], + 120796: [[52], 256], + 120797: [[53], 256], + 120798: [[54], 256], + 120799: [[55], 256], + 120800: [[56], 256], + 120801: [[57], 256], + 120802: [[48], 256], + 120803: [[49], 256], + 120804: [[50], 256], + 120805: [[51], 256], + 120806: [[52], 256], + 120807: [[53], 256], + 120808: [[54], 256], + 120809: [[55], 256], + 120810: [[56], 256], + 120811: [[57], 256], + 120812: [[48], 256], + 120813: [[49], 256], + 120814: [[50], 256], + 120815: [[51], 256], + 120816: [[52], 256], + 120817: [[53], 256], + 120818: [[54], 256], + 120819: [[55], 256], + 120820: [[56], 256], + 120821: [[57], 256], + 120822: [[48], 256], + 120823: [[49], 256], + 120824: [[50], 256], + 120825: [[51], 256], + 120826: [[52], 256], + 120827: [[53], 256], + 120828: [[54], 256], + 120829: [[55], 256], + 120830: [[56], 256], + 120831: [[57], 256] + }, + 60928: { + 126464: [[1575], 256], + 126465: [[1576], 256], + 126466: [[1580], 256], + 126467: [[1583], 256], + 126469: [[1608], 256], + 126470: [[1586], 256], + 126471: [[1581], 256], + 126472: [[1591], 256], + 126473: [[1610], 256], + 126474: [[1603], 256], + 126475: [[1604], 256], + 126476: [[1605], 256], + 126477: [[1606], 256], + 126478: [[1587], 256], + 126479: [[1593], 256], + 126480: [[1601], 256], + 126481: [[1589], 256], + 126482: [[1602], 256], + 126483: [[1585], 256], + 126484: [[1588], 256], + 126485: [[1578], 256], + 126486: [[1579], 256], + 126487: [[1582], 256], + 126488: [[1584], 256], + 126489: [[1590], 256], + 126490: [[1592], 256], + 126491: [[1594], 256], + 126492: [[1646], 256], + 126493: [[1722], 256], + 126494: [[1697], 256], + 126495: [[1647], 256], + 126497: [[1576], 256], + 126498: [[1580], 256], + 126500: [[1607], 256], + 126503: [[1581], 256], + 126505: [[1610], 256], + 126506: [[1603], 256], + 126507: [[1604], 256], + 126508: [[1605], 256], + 126509: [[1606], 256], + 126510: [[1587], 256], + 126511: [[1593], 256], + 126512: [[1601], 256], + 126513: [[1589], 256], + 126514: [[1602], 256], + 126516: [[1588], 256], + 126517: [[1578], 256], + 126518: [[1579], 256], + 126519: [[1582], 256], + 126521: [[1590], 256], + 126523: [[1594], 256], + 126530: [[1580], 256], + 126535: [[1581], 256], + 126537: [[1610], 256], + 126539: [[1604], 256], + 126541: [[1606], 256], + 126542: [[1587], 256], + 126543: [[1593], 256], + 126545: [[1589], 256], + 126546: [[1602], 256], + 126548: [[1588], 256], + 126551: [[1582], 256], + 126553: [[1590], 256], + 126555: [[1594], 256], + 126557: [[1722], 256], + 126559: [[1647], 256], + 126561: [[1576], 256], + 126562: [[1580], 256], + 126564: [[1607], 256], + 126567: [[1581], 256], + 126568: [[1591], 256], + 126569: [[1610], 256], + 126570: [[1603], 256], + 126572: [[1605], 256], + 126573: [[1606], 256], + 126574: [[1587], 256], + 126575: [[1593], 256], + 126576: [[1601], 256], + 126577: [[1589], 256], + 126578: [[1602], 256], + 126580: [[1588], 256], + 126581: [[1578], 256], + 126582: [[1579], 256], + 126583: [[1582], 256], + 126585: [[1590], 256], + 126586: [[1592], 256], + 126587: [[1594], 256], + 126588: [[1646], 256], + 126590: [[1697], 256], + 126592: [[1575], 256], + 126593: [[1576], 256], + 126594: [[1580], 256], + 126595: [[1583], 256], + 126596: [[1607], 256], + 126597: [[1608], 256], + 126598: [[1586], 256], + 126599: [[1581], 256], + 126600: [[1591], 256], + 126601: [[1610], 256], + 126603: [[1604], 256], + 126604: [[1605], 256], + 126605: [[1606], 256], + 126606: [[1587], 256], + 126607: [[1593], 256], + 126608: [[1601], 256], + 126609: [[1589], 256], + 126610: [[1602], 256], + 126611: [[1585], 256], + 126612: [[1588], 256], + 126613: [[1578], 256], + 126614: [[1579], 256], + 126615: [[1582], 256], + 126616: [[1584], 256], + 126617: [[1590], 256], + 126618: [[1592], 256], + 126619: [[1594], 256], + 126625: [[1576], 256], + 126626: [[1580], 256], + 126627: [[1583], 256], + 126629: [[1608], 256], + 126630: [[1586], 256], + 126631: [[1581], 256], + 126632: [[1591], 256], + 126633: [[1610], 256], + 126635: [[1604], 256], + 126636: [[1605], 256], + 126637: [[1606], 256], + 126638: [[1587], 256], + 126639: [[1593], 256], + 126640: [[1601], 256], + 126641: [[1589], 256], + 126642: [[1602], 256], + 126643: [[1585], 256], + 126644: [[1588], 256], + 126645: [[1578], 256], + 126646: [[1579], 256], + 126647: [[1582], 256], + 126648: [[1584], 256], + 126649: [[1590], 256], + 126650: [[1592], 256], + 126651: [[1594], 256] + }, + 61696: { + 127232: [[48, 46], 256], + 127233: [[48, 44], 256], + 127234: [[49, 44], 256], + 127235: [[50, 44], 256], + 127236: [[51, 44], 256], + 127237: [[52, 44], 256], + 127238: [[53, 44], 256], + 127239: [[54, 44], 256], + 127240: [[55, 44], 256], + 127241: [[56, 44], 256], + 127242: [[57, 44], 256], + 127248: [[40, 65, 41], 256], + 127249: [[40, 66, 41], 256], + 127250: [[40, 67, 41], 256], + 127251: [[40, 68, 41], 256], + 127252: [[40, 69, 41], 256], + 127253: [[40, 70, 41], 256], + 127254: [[40, 71, 41], 256], + 127255: [[40, 72, 41], 256], + 127256: [[40, 73, 41], 256], + 127257: [[40, 74, 41], 256], + 127258: [[40, 75, 41], 256], + 127259: [[40, 76, 41], 256], + 127260: [[40, 77, 41], 256], + 127261: [[40, 78, 41], 256], + 127262: [[40, 79, 41], 256], + 127263: [[40, 80, 41], 256], + 127264: [[40, 81, 41], 256], + 127265: [[40, 82, 41], 256], + 127266: [[40, 83, 41], 256], + 127267: [[40, 84, 41], 256], + 127268: [[40, 85, 41], 256], + 127269: [[40, 86, 41], 256], + 127270: [[40, 87, 41], 256], + 127271: [[40, 88, 41], 256], + 127272: [[40, 89, 41], 256], + 127273: [[40, 90, 41], 256], + 127274: [[12308, 83, 12309], 256], + 127275: [[67], 256], + 127276: [[82], 256], + 127277: [[67, 68], 256], + 127278: [[87, 90], 256], + 127280: [[65], 256], + 127281: [[66], 256], + 127282: [[67], 256], + 127283: [[68], 256], + 127284: [[69], 256], + 127285: [[70], 256], + 127286: [[71], 256], + 127287: [[72], 256], + 127288: [[73], 256], + 127289: [[74], 256], + 127290: [[75], 256], + 127291: [[76], 256], + 127292: [[77], 256], + 127293: [[78], 256], + 127294: [[79], 256], + 127295: [[80], 256], + 127296: [[81], 256], + 127297: [[82], 256], + 127298: [[83], 256], + 127299: [[84], 256], + 127300: [[85], 256], + 127301: [[86], 256], + 127302: [[87], 256], + 127303: [[88], 256], + 127304: [[89], 256], + 127305: [[90], 256], + 127306: [[72, 86], 256], + 127307: [[77, 86], 256], + 127308: [[83, 68], 256], + 127309: [[83, 83], 256], + 127310: [[80, 80, 86], 256], + 127311: [[87, 67], 256], + 127338: [[77, 67], 256], + 127339: [[77, 68], 256], + 127376: [[68, 74], 256] + }, + 61952: { + 127488: [[12411, 12363], 256], + 127489: [[12467, 12467], 256], + 127490: [[12469], 256], + 127504: [[25163], 256], + 127505: [[23383], 256], + 127506: [[21452], 256], + 127507: [[12487], 256], + 127508: [[20108], 256], + 127509: [[22810], 256], + 127510: [[35299], 256], + 127511: [[22825], 256], + 127512: [[20132], 256], + 127513: [[26144], 256], + 127514: [[28961], 256], + 127515: [[26009], 256], + 127516: [[21069], 256], + 127517: [[24460], 256], + 127518: [[20877], 256], + 127519: [[26032], 256], + 127520: [[21021], 256], + 127521: [[32066], 256], + 127522: [[29983], 256], + 127523: [[36009], 256], + 127524: [[22768], 256], + 127525: [[21561], 256], + 127526: [[28436], 256], + 127527: [[25237], 256], + 127528: [[25429], 256], + 127529: [[19968], 256], + 127530: [[19977], 256], + 127531: [[36938], 256], + 127532: [[24038], 256], + 127533: [[20013], 256], + 127534: [[21491], 256], + 127535: [[25351], 256], + 127536: [[36208], 256], + 127537: [[25171], 256], + 127538: [[31105], 256], + 127539: [[31354], 256], + 127540: [[21512], 256], + 127541: [[28288], 256], + 127542: [[26377], 256], + 127543: [[26376], 256], + 127544: [[30003], 256], + 127545: [[21106], 256], + 127546: [[21942], 256], + 127552: [[12308, 26412, 12309], 256], + 127553: [[12308, 19977, 12309], 256], + 127554: [[12308, 20108, 12309], 256], + 127555: [[12308, 23433, 12309], 256], + 127556: [[12308, 28857, 12309], 256], + 127557: [[12308, 25171, 12309], 256], + 127558: [[12308, 30423, 12309], 256], + 127559: [[12308, 21213, 12309], 256], + 127560: [[12308, 25943, 12309], 256], + 127568: [[24471], 256], + 127569: [[21487], 256] + }, + 63488: { + 194560: [[20029]], + 194561: [[20024]], + 194562: [[20033]], + 194563: [[131362]], + 194564: [[20320]], + 194565: [[20398]], + 194566: [[20411]], + 194567: [[20482]], + 194568: [[20602]], + 194569: [[20633]], + 194570: [[20711]], + 194571: [[20687]], + 194572: [[13470]], + 194573: [[132666]], + 194574: [[20813]], + 194575: [[20820]], + 194576: [[20836]], + 194577: [[20855]], + 194578: [[132380]], + 194579: [[13497]], + 194580: [[20839]], + 194581: [[20877]], + 194582: [[132427]], + 194583: [[20887]], + 194584: [[20900]], + 194585: [[20172]], + 194586: [[20908]], + 194587: [[20917]], + 194588: [[168415]], + 194589: [[20981]], + 194590: [[20995]], + 194591: [[13535]], + 194592: [[21051]], + 194593: [[21062]], + 194594: [[21106]], + 194595: [[21111]], + 194596: [[13589]], + 194597: [[21191]], + 194598: [[21193]], + 194599: [[21220]], + 194600: [[21242]], + 194601: [[21253]], + 194602: [[21254]], + 194603: [[21271]], + 194604: [[21321]], + 194605: [[21329]], + 194606: [[21338]], + 194607: [[21363]], + 194608: [[21373]], + 194609: [[21375]], + 194610: [[21375]], + 194611: [[21375]], + 194612: [[133676]], + 194613: [[28784]], + 194614: [[21450]], + 194615: [[21471]], + 194616: [[133987]], + 194617: [[21483]], + 194618: [[21489]], + 194619: [[21510]], + 194620: [[21662]], + 194621: [[21560]], + 194622: [[21576]], + 194623: [[21608]], + 194624: [[21666]], + 194625: [[21750]], + 194626: [[21776]], + 194627: [[21843]], + 194628: [[21859]], + 194629: [[21892]], + 194630: [[21892]], + 194631: [[21913]], + 194632: [[21931]], + 194633: [[21939]], + 194634: [[21954]], + 194635: [[22294]], + 194636: [[22022]], + 194637: [[22295]], + 194638: [[22097]], + 194639: [[22132]], + 194640: [[20999]], + 194641: [[22766]], + 194642: [[22478]], + 194643: [[22516]], + 194644: [[22541]], + 194645: [[22411]], + 194646: [[22578]], + 194647: [[22577]], + 194648: [[22700]], + 194649: [[136420]], + 194650: [[22770]], + 194651: [[22775]], + 194652: [[22790]], + 194653: [[22810]], + 194654: [[22818]], + 194655: [[22882]], + 194656: [[136872]], + 194657: [[136938]], + 194658: [[23020]], + 194659: [[23067]], + 194660: [[23079]], + 194661: [[23000]], + 194662: [[23142]], + 194663: [[14062]], + 194664: [[14076]], + 194665: [[23304]], + 194666: [[23358]], + 194667: [[23358]], + 194668: [[137672]], + 194669: [[23491]], + 194670: [[23512]], + 194671: [[23527]], + 194672: [[23539]], + 194673: [[138008]], + 194674: [[23551]], + 194675: [[23558]], + 194676: [[24403]], + 194677: [[23586]], + 194678: [[14209]], + 194679: [[23648]], + 194680: [[23662]], + 194681: [[23744]], + 194682: [[23693]], + 194683: [[138724]], + 194684: [[23875]], + 194685: [[138726]], + 194686: [[23918]], + 194687: [[23915]], + 194688: [[23932]], + 194689: [[24033]], + 194690: [[24034]], + 194691: [[14383]], + 194692: [[24061]], + 194693: [[24104]], + 194694: [[24125]], + 194695: [[24169]], + 194696: [[14434]], + 194697: [[139651]], + 194698: [[14460]], + 194699: [[24240]], + 194700: [[24243]], + 194701: [[24246]], + 194702: [[24266]], + 194703: [[172946]], + 194704: [[24318]], + 194705: [[140081]], + 194706: [[140081]], + 194707: [[33281]], + 194708: [[24354]], + 194709: [[24354]], + 194710: [[14535]], + 194711: [[144056]], + 194712: [[156122]], + 194713: [[24418]], + 194714: [[24427]], + 194715: [[14563]], + 194716: [[24474]], + 194717: [[24525]], + 194718: [[24535]], + 194719: [[24569]], + 194720: [[24705]], + 194721: [[14650]], + 194722: [[14620]], + 194723: [[24724]], + 194724: [[141012]], + 194725: [[24775]], + 194726: [[24904]], + 194727: [[24908]], + 194728: [[24910]], + 194729: [[24908]], + 194730: [[24954]], + 194731: [[24974]], + 194732: [[25010]], + 194733: [[24996]], + 194734: [[25007]], + 194735: [[25054]], + 194736: [[25074]], + 194737: [[25078]], + 194738: [[25104]], + 194739: [[25115]], + 194740: [[25181]], + 194741: [[25265]], + 194742: [[25300]], + 194743: [[25424]], + 194744: [[142092]], + 194745: [[25405]], + 194746: [[25340]], + 194747: [[25448]], + 194748: [[25475]], + 194749: [[25572]], + 194750: [[142321]], + 194751: [[25634]], + 194752: [[25541]], + 194753: [[25513]], + 194754: [[14894]], + 194755: [[25705]], + 194756: [[25726]], + 194757: [[25757]], + 194758: [[25719]], + 194759: [[14956]], + 194760: [[25935]], + 194761: [[25964]], + 194762: [[143370]], + 194763: [[26083]], + 194764: [[26360]], + 194765: [[26185]], + 194766: [[15129]], + 194767: [[26257]], + 194768: [[15112]], + 194769: [[15076]], + 194770: [[20882]], + 194771: [[20885]], + 194772: [[26368]], + 194773: [[26268]], + 194774: [[32941]], + 194775: [[17369]], + 194776: [[26391]], + 194777: [[26395]], + 194778: [[26401]], + 194779: [[26462]], + 194780: [[26451]], + 194781: [[144323]], + 194782: [[15177]], + 194783: [[26618]], + 194784: [[26501]], + 194785: [[26706]], + 194786: [[26757]], + 194787: [[144493]], + 194788: [[26766]], + 194789: [[26655]], + 194790: [[26900]], + 194791: [[15261]], + 194792: [[26946]], + 194793: [[27043]], + 194794: [[27114]], + 194795: [[27304]], + 194796: [[145059]], + 194797: [[27355]], + 194798: [[15384]], + 194799: [[27425]], + 194800: [[145575]], + 194801: [[27476]], + 194802: [[15438]], + 194803: [[27506]], + 194804: [[27551]], + 194805: [[27578]], + 194806: [[27579]], + 194807: [[146061]], + 194808: [[138507]], + 194809: [[146170]], + 194810: [[27726]], + 194811: [[146620]], + 194812: [[27839]], + 194813: [[27853]], + 194814: [[27751]], + 194815: [[27926]] + }, + 63744: { + 63744: [[35912]], + 63745: [[26356]], + 63746: [[36554]], + 63747: [[36040]], + 63748: [[28369]], + 63749: [[20018]], + 63750: [[21477]], + 63751: [[40860]], + 63752: [[40860]], + 63753: [[22865]], + 63754: [[37329]], + 63755: [[21895]], + 63756: [[22856]], + 63757: [[25078]], + 63758: [[30313]], + 63759: [[32645]], + 63760: [[34367]], + 63761: [[34746]], + 63762: [[35064]], + 63763: [[37007]], + 63764: [[27138]], + 63765: [[27931]], + 63766: [[28889]], + 63767: [[29662]], + 63768: [[33853]], + 63769: [[37226]], + 63770: [[39409]], + 63771: [[20098]], + 63772: [[21365]], + 63773: [[27396]], + 63774: [[29211]], + 63775: [[34349]], + 63776: [[40478]], + 63777: [[23888]], + 63778: [[28651]], + 63779: [[34253]], + 63780: [[35172]], + 63781: [[25289]], + 63782: [[33240]], + 63783: [[34847]], + 63784: [[24266]], + 63785: [[26391]], + 63786: [[28010]], + 63787: [[29436]], + 63788: [[37070]], + 63789: [[20358]], + 63790: [[20919]], + 63791: [[21214]], + 63792: [[25796]], + 63793: [[27347]], + 63794: [[29200]], + 63795: [[30439]], + 63796: [[32769]], + 63797: [[34310]], + 63798: [[34396]], + 63799: [[36335]], + 63800: [[38706]], + 63801: [[39791]], + 63802: [[40442]], + 63803: [[30860]], + 63804: [[31103]], + 63805: [[32160]], + 63806: [[33737]], + 63807: [[37636]], + 63808: [[40575]], + 63809: [[35542]], + 63810: [[22751]], + 63811: [[24324]], + 63812: [[31840]], + 63813: [[32894]], + 63814: [[29282]], + 63815: [[30922]], + 63816: [[36034]], + 63817: [[38647]], + 63818: [[22744]], + 63819: [[23650]], + 63820: [[27155]], + 63821: [[28122]], + 63822: [[28431]], + 63823: [[32047]], + 63824: [[32311]], + 63825: [[38475]], + 63826: [[21202]], + 63827: [[32907]], + 63828: [[20956]], + 63829: [[20940]], + 63830: [[31260]], + 63831: [[32190]], + 63832: [[33777]], + 63833: [[38517]], + 63834: [[35712]], + 63835: [[25295]], + 63836: [[27138]], + 63837: [[35582]], + 63838: [[20025]], + 63839: [[23527]], + 63840: [[24594]], + 63841: [[29575]], + 63842: [[30064]], + 63843: [[21271]], + 63844: [[30971]], + 63845: [[20415]], + 63846: [[24489]], + 63847: [[19981]], + 63848: [[27852]], + 63849: [[25976]], + 63850: [[32034]], + 63851: [[21443]], + 63852: [[22622]], + 63853: [[30465]], + 63854: [[33865]], + 63855: [[35498]], + 63856: [[27578]], + 63857: [[36784]], + 63858: [[27784]], + 63859: [[25342]], + 63860: [[33509]], + 63861: [[25504]], + 63862: [[30053]], + 63863: [[20142]], + 63864: [[20841]], + 63865: [[20937]], + 63866: [[26753]], + 63867: [[31975]], + 63868: [[33391]], + 63869: [[35538]], + 63870: [[37327]], + 63871: [[21237]], + 63872: [[21570]], + 63873: [[22899]], + 63874: [[24300]], + 63875: [[26053]], + 63876: [[28670]], + 63877: [[31018]], + 63878: [[38317]], + 63879: [[39530]], + 63880: [[40599]], + 63881: [[40654]], + 63882: [[21147]], + 63883: [[26310]], + 63884: [[27511]], + 63885: [[36706]], + 63886: [[24180]], + 63887: [[24976]], + 63888: [[25088]], + 63889: [[25754]], + 63890: [[28451]], + 63891: [[29001]], + 63892: [[29833]], + 63893: [[31178]], + 63894: [[32244]], + 63895: [[32879]], + 63896: [[36646]], + 63897: [[34030]], + 63898: [[36899]], + 63899: [[37706]], + 63900: [[21015]], + 63901: [[21155]], + 63902: [[21693]], + 63903: [[28872]], + 63904: [[35010]], + 63905: [[35498]], + 63906: [[24265]], + 63907: [[24565]], + 63908: [[25467]], + 63909: [[27566]], + 63910: [[31806]], + 63911: [[29557]], + 63912: [[20196]], + 63913: [[22265]], + 63914: [[23527]], + 63915: [[23994]], + 63916: [[24604]], + 63917: [[29618]], + 63918: [[29801]], + 63919: [[32666]], + 63920: [[32838]], + 63921: [[37428]], + 63922: [[38646]], + 63923: [[38728]], + 63924: [[38936]], + 63925: [[20363]], + 63926: [[31150]], + 63927: [[37300]], + 63928: [[38584]], + 63929: [[24801]], + 63930: [[20102]], + 63931: [[20698]], + 63932: [[23534]], + 63933: [[23615]], + 63934: [[26009]], + 63935: [[27138]], + 63936: [[29134]], + 63937: [[30274]], + 63938: [[34044]], + 63939: [[36988]], + 63940: [[40845]], + 63941: [[26248]], + 63942: [[38446]], + 63943: [[21129]], + 63944: [[26491]], + 63945: [[26611]], + 63946: [[27969]], + 63947: [[28316]], + 63948: [[29705]], + 63949: [[30041]], + 63950: [[30827]], + 63951: [[32016]], + 63952: [[39006]], + 63953: [[20845]], + 63954: [[25134]], + 63955: [[38520]], + 63956: [[20523]], + 63957: [[23833]], + 63958: [[28138]], + 63959: [[36650]], + 63960: [[24459]], + 63961: [[24900]], + 63962: [[26647]], + 63963: [[29575]], + 63964: [[38534]], + 63965: [[21033]], + 63966: [[21519]], + 63967: [[23653]], + 63968: [[26131]], + 63969: [[26446]], + 63970: [[26792]], + 63971: [[27877]], + 63972: [[29702]], + 63973: [[30178]], + 63974: [[32633]], + 63975: [[35023]], + 63976: [[35041]], + 63977: [[37324]], + 63978: [[38626]], + 63979: [[21311]], + 63980: [[28346]], + 63981: [[21533]], + 63982: [[29136]], + 63983: [[29848]], + 63984: [[34298]], + 63985: [[38563]], + 63986: [[40023]], + 63987: [[40607]], + 63988: [[26519]], + 63989: [[28107]], + 63990: [[33256]], + 63991: [[31435]], + 63992: [[31520]], + 63993: [[31890]], + 63994: [[29376]], + 63995: [[28825]], + 63996: [[35672]], + 63997: [[20160]], + 63998: [[33590]], + 63999: [[21050]], + 194816: [[27966]], + 194817: [[28023]], + 194818: [[27969]], + 194819: [[28009]], + 194820: [[28024]], + 194821: [[28037]], + 194822: [[146718]], + 194823: [[27956]], + 194824: [[28207]], + 194825: [[28270]], + 194826: [[15667]], + 194827: [[28363]], + 194828: [[28359]], + 194829: [[147153]], + 194830: [[28153]], + 194831: [[28526]], + 194832: [[147294]], + 194833: [[147342]], + 194834: [[28614]], + 194835: [[28729]], + 194836: [[28702]], + 194837: [[28699]], + 194838: [[15766]], + 194839: [[28746]], + 194840: [[28797]], + 194841: [[28791]], + 194842: [[28845]], + 194843: [[132389]], + 194844: [[28997]], + 194845: [[148067]], + 194846: [[29084]], + 194847: [[148395]], + 194848: [[29224]], + 194849: [[29237]], + 194850: [[29264]], + 194851: [[149000]], + 194852: [[29312]], + 194853: [[29333]], + 194854: [[149301]], + 194855: [[149524]], + 194856: [[29562]], + 194857: [[29579]], + 194858: [[16044]], + 194859: [[29605]], + 194860: [[16056]], + 194861: [[16056]], + 194862: [[29767]], + 194863: [[29788]], + 194864: [[29809]], + 194865: [[29829]], + 194866: [[29898]], + 194867: [[16155]], + 194868: [[29988]], + 194869: [[150582]], + 194870: [[30014]], + 194871: [[150674]], + 194872: [[30064]], + 194873: [[139679]], + 194874: [[30224]], + 194875: [[151457]], + 194876: [[151480]], + 194877: [[151620]], + 194878: [[16380]], + 194879: [[16392]], + 194880: [[30452]], + 194881: [[151795]], + 194882: [[151794]], + 194883: [[151833]], + 194884: [[151859]], + 194885: [[30494]], + 194886: [[30495]], + 194887: [[30495]], + 194888: [[30538]], + 194889: [[16441]], + 194890: [[30603]], + 194891: [[16454]], + 194892: [[16534]], + 194893: [[152605]], + 194894: [[30798]], + 194895: [[30860]], + 194896: [[30924]], + 194897: [[16611]], + 194898: [[153126]], + 194899: [[31062]], + 194900: [[153242]], + 194901: [[153285]], + 194902: [[31119]], + 194903: [[31211]], + 194904: [[16687]], + 194905: [[31296]], + 194906: [[31306]], + 194907: [[31311]], + 194908: [[153980]], + 194909: [[154279]], + 194910: [[154279]], + 194911: [[31470]], + 194912: [[16898]], + 194913: [[154539]], + 194914: [[31686]], + 194915: [[31689]], + 194916: [[16935]], + 194917: [[154752]], + 194918: [[31954]], + 194919: [[17056]], + 194920: [[31976]], + 194921: [[31971]], + 194922: [[32000]], + 194923: [[155526]], + 194924: [[32099]], + 194925: [[17153]], + 194926: [[32199]], + 194927: [[32258]], + 194928: [[32325]], + 194929: [[17204]], + 194930: [[156200]], + 194931: [[156231]], + 194932: [[17241]], + 194933: [[156377]], + 194934: [[32634]], + 194935: [[156478]], + 194936: [[32661]], + 194937: [[32762]], + 194938: [[32773]], + 194939: [[156890]], + 194940: [[156963]], + 194941: [[32864]], + 194942: [[157096]], + 194943: [[32880]], + 194944: [[144223]], + 194945: [[17365]], + 194946: [[32946]], + 194947: [[33027]], + 194948: [[17419]], + 194949: [[33086]], + 194950: [[23221]], + 194951: [[157607]], + 194952: [[157621]], + 194953: [[144275]], + 194954: [[144284]], + 194955: [[33281]], + 194956: [[33284]], + 194957: [[36766]], + 194958: [[17515]], + 194959: [[33425]], + 194960: [[33419]], + 194961: [[33437]], + 194962: [[21171]], + 194963: [[33457]], + 194964: [[33459]], + 194965: [[33469]], + 194966: [[33510]], + 194967: [[158524]], + 194968: [[33509]], + 194969: [[33565]], + 194970: [[33635]], + 194971: [[33709]], + 194972: [[33571]], + 194973: [[33725]], + 194974: [[33767]], + 194975: [[33879]], + 194976: [[33619]], + 194977: [[33738]], + 194978: [[33740]], + 194979: [[33756]], + 194980: [[158774]], + 194981: [[159083]], + 194982: [[158933]], + 194983: [[17707]], + 194984: [[34033]], + 194985: [[34035]], + 194986: [[34070]], + 194987: [[160714]], + 194988: [[34148]], + 194989: [[159532]], + 194990: [[17757]], + 194991: [[17761]], + 194992: [[159665]], + 194993: [[159954]], + 194994: [[17771]], + 194995: [[34384]], + 194996: [[34396]], + 194997: [[34407]], + 194998: [[34409]], + 194999: [[34473]], + 195000: [[34440]], + 195001: [[34574]], + 195002: [[34530]], + 195003: [[34681]], + 195004: [[34600]], + 195005: [[34667]], + 195006: [[34694]], + 195007: [[17879]], + 195008: [[34785]], + 195009: [[34817]], + 195010: [[17913]], + 195011: [[34912]], + 195012: [[34915]], + 195013: [[161383]], + 195014: [[35031]], + 195015: [[35038]], + 195016: [[17973]], + 195017: [[35066]], + 195018: [[13499]], + 195019: [[161966]], + 195020: [[162150]], + 195021: [[18110]], + 195022: [[18119]], + 195023: [[35488]], + 195024: [[35565]], + 195025: [[35722]], + 195026: [[35925]], + 195027: [[162984]], + 195028: [[36011]], + 195029: [[36033]], + 195030: [[36123]], + 195031: [[36215]], + 195032: [[163631]], + 195033: [[133124]], + 195034: [[36299]], + 195035: [[36284]], + 195036: [[36336]], + 195037: [[133342]], + 195038: [[36564]], + 195039: [[36664]], + 195040: [[165330]], + 195041: [[165357]], + 195042: [[37012]], + 195043: [[37105]], + 195044: [[37137]], + 195045: [[165678]], + 195046: [[37147]], + 195047: [[37432]], + 195048: [[37591]], + 195049: [[37592]], + 195050: [[37500]], + 195051: [[37881]], + 195052: [[37909]], + 195053: [[166906]], + 195054: [[38283]], + 195055: [[18837]], + 195056: [[38327]], + 195057: [[167287]], + 195058: [[18918]], + 195059: [[38595]], + 195060: [[23986]], + 195061: [[38691]], + 195062: [[168261]], + 195063: [[168474]], + 195064: [[19054]], + 195065: [[19062]], + 195066: [[38880]], + 195067: [[168970]], + 195068: [[19122]], + 195069: [[169110]], + 195070: [[38923]], + 195071: [[38923]] + }, + 64000: { + 64000: [[20999]], + 64001: [[24230]], + 64002: [[25299]], + 64003: [[31958]], + 64004: [[23429]], + 64005: [[27934]], + 64006: [[26292]], + 64007: [[36667]], + 64008: [[34892]], + 64009: [[38477]], + 64010: [[35211]], + 64011: [[24275]], + 64012: [[20800]], + 64013: [[21952]], + 64016: [[22618]], + 64018: [[26228]], + 64021: [[20958]], + 64022: [[29482]], + 64023: [[30410]], + 64024: [[31036]], + 64025: [[31070]], + 64026: [[31077]], + 64027: [[31119]], + 64028: [[38742]], + 64029: [[31934]], + 64030: [[32701]], + 64032: [[34322]], + 64034: [[35576]], + 64037: [[36920]], + 64038: [[37117]], + 64042: [[39151]], + 64043: [[39164]], + 64044: [[39208]], + 64045: [[40372]], + 64046: [[37086]], + 64047: [[38583]], + 64048: [[20398]], + 64049: [[20711]], + 64050: [[20813]], + 64051: [[21193]], + 64052: [[21220]], + 64053: [[21329]], + 64054: [[21917]], + 64055: [[22022]], + 64056: [[22120]], + 64057: [[22592]], + 64058: [[22696]], + 64059: [[23652]], + 64060: [[23662]], + 64061: [[24724]], + 64062: [[24936]], + 64063: [[24974]], + 64064: [[25074]], + 64065: [[25935]], + 64066: [[26082]], + 64067: [[26257]], + 64068: [[26757]], + 64069: [[28023]], + 64070: [[28186]], + 64071: [[28450]], + 64072: [[29038]], + 64073: [[29227]], + 64074: [[29730]], + 64075: [[30865]], + 64076: [[31038]], + 64077: [[31049]], + 64078: [[31048]], + 64079: [[31056]], + 64080: [[31062]], + 64081: [[31069]], + 64082: [[31117]], + 64083: [[31118]], + 64084: [[31296]], + 64085: [[31361]], + 64086: [[31680]], + 64087: [[32244]], + 64088: [[32265]], + 64089: [[32321]], + 64090: [[32626]], + 64091: [[32773]], + 64092: [[33261]], + 64093: [[33401]], + 64094: [[33401]], + 64095: [[33879]], + 64096: [[35088]], + 64097: [[35222]], + 64098: [[35585]], + 64099: [[35641]], + 64100: [[36051]], + 64101: [[36104]], + 64102: [[36790]], + 64103: [[36920]], + 64104: [[38627]], + 64105: [[38911]], + 64106: [[38971]], + 64107: [[24693]], + 64108: [[148206]], + 64109: [[33304]], + 64112: [[20006]], + 64113: [[20917]], + 64114: [[20840]], + 64115: [[20352]], + 64116: [[20805]], + 64117: [[20864]], + 64118: [[21191]], + 64119: [[21242]], + 64120: [[21917]], + 64121: [[21845]], + 64122: [[21913]], + 64123: [[21986]], + 64124: [[22618]], + 64125: [[22707]], + 64126: [[22852]], + 64127: [[22868]], + 64128: [[23138]], + 64129: [[23336]], + 64130: [[24274]], + 64131: [[24281]], + 64132: [[24425]], + 64133: [[24493]], + 64134: [[24792]], + 64135: [[24910]], + 64136: [[24840]], + 64137: [[24974]], + 64138: [[24928]], + 64139: [[25074]], + 64140: [[25140]], + 64141: [[25540]], + 64142: [[25628]], + 64143: [[25682]], + 64144: [[25942]], + 64145: [[26228]], + 64146: [[26391]], + 64147: [[26395]], + 64148: [[26454]], + 64149: [[27513]], + 64150: [[27578]], + 64151: [[27969]], + 64152: [[28379]], + 64153: [[28363]], + 64154: [[28450]], + 64155: [[28702]], + 64156: [[29038]], + 64157: [[30631]], + 64158: [[29237]], + 64159: [[29359]], + 64160: [[29482]], + 64161: [[29809]], + 64162: [[29958]], + 64163: [[30011]], + 64164: [[30237]], + 64165: [[30239]], + 64166: [[30410]], + 64167: [[30427]], + 64168: [[30452]], + 64169: [[30538]], + 64170: [[30528]], + 64171: [[30924]], + 64172: [[31409]], + 64173: [[31680]], + 64174: [[31867]], + 64175: [[32091]], + 64176: [[32244]], + 64177: [[32574]], + 64178: [[32773]], + 64179: [[33618]], + 64180: [[33775]], + 64181: [[34681]], + 64182: [[35137]], + 64183: [[35206]], + 64184: [[35222]], + 64185: [[35519]], + 64186: [[35576]], + 64187: [[35531]], + 64188: [[35585]], + 64189: [[35582]], + 64190: [[35565]], + 64191: [[35641]], + 64192: [[35722]], + 64193: [[36104]], + 64194: [[36664]], + 64195: [[36978]], + 64196: [[37273]], + 64197: [[37494]], + 64198: [[38524]], + 64199: [[38627]], + 64200: [[38742]], + 64201: [[38875]], + 64202: [[38911]], + 64203: [[38923]], + 64204: [[38971]], + 64205: [[39698]], + 64206: [[40860]], + 64207: [[141386]], + 64208: [[141380]], + 64209: [[144341]], + 64210: [[15261]], + 64211: [[16408]], + 64212: [[16441]], + 64213: [[152137]], + 64214: [[154832]], + 64215: [[163539]], + 64216: [[40771]], + 64217: [[40846]], + 195072: [[38953]], + 195073: [[169398]], + 195074: [[39138]], + 195075: [[19251]], + 195076: [[39209]], + 195077: [[39335]], + 195078: [[39362]], + 195079: [[39422]], + 195080: [[19406]], + 195081: [[170800]], + 195082: [[39698]], + 195083: [[40000]], + 195084: [[40189]], + 195085: [[19662]], + 195086: [[19693]], + 195087: [[40295]], + 195088: [[172238]], + 195089: [[19704]], + 195090: [[172293]], + 195091: [[172558]], + 195092: [[172689]], + 195093: [[40635]], + 195094: [[19798]], + 195095: [[40697]], + 195096: [[40702]], + 195097: [[40709]], + 195098: [[40719]], + 195099: [[40726]], + 195100: [[40763]], + 195101: [[173568]] + }, + 64256: { + 64256: [[102, 102], 256], + 64257: [[102, 105], 256], + 64258: [[102, 108], 256], + 64259: [[102, 102, 105], 256], + 64260: [[102, 102, 108], 256], + 64261: [[383, 116], 256], + 64262: [[115, 116], 256], + 64275: [[1396, 1398], 256], + 64276: [[1396, 1381], 256], + 64277: [[1396, 1387], 256], + 64278: [[1406, 1398], 256], + 64279: [[1396, 1389], 256], + 64285: [[1497, 1460], 512], + 64286: [, 26], + 64287: [[1522, 1463], 512], + 64288: [[1506], 256], + 64289: [[1488], 256], + 64290: [[1491], 256], + 64291: [[1492], 256], + 64292: [[1499], 256], + 64293: [[1500], 256], + 64294: [[1501], 256], + 64295: [[1512], 256], + 64296: [[1514], 256], + 64297: [[43], 256], + 64298: [[1513, 1473], 512], + 64299: [[1513, 1474], 512], + 64300: [[64329, 1473], 512], + 64301: [[64329, 1474], 512], + 64302: [[1488, 1463], 512], + 64303: [[1488, 1464], 512], + 64304: [[1488, 1468], 512], + 64305: [[1489, 1468], 512], + 64306: [[1490, 1468], 512], + 64307: [[1491, 1468], 512], + 64308: [[1492, 1468], 512], + 64309: [[1493, 1468], 512], + 64310: [[1494, 1468], 512], + 64312: [[1496, 1468], 512], + 64313: [[1497, 1468], 512], + 64314: [[1498, 1468], 512], + 64315: [[1499, 1468], 512], + 64316: [[1500, 1468], 512], + 64318: [[1502, 1468], 512], + 64320: [[1504, 1468], 512], + 64321: [[1505, 1468], 512], + 64323: [[1507, 1468], 512], + 64324: [[1508, 1468], 512], + 64326: [[1510, 1468], 512], + 64327: [[1511, 1468], 512], + 64328: [[1512, 1468], 512], + 64329: [[1513, 1468], 512], + 64330: [[1514, 1468], 512], + 64331: [[1493, 1465], 512], + 64332: [[1489, 1471], 512], + 64333: [[1499, 1471], 512], + 64334: [[1508, 1471], 512], + 64335: [[1488, 1500], 256], + 64336: [[1649], 256], + 64337: [[1649], 256], + 64338: [[1659], 256], + 64339: [[1659], 256], + 64340: [[1659], 256], + 64341: [[1659], 256], + 64342: [[1662], 256], + 64343: [[1662], 256], + 64344: [[1662], 256], + 64345: [[1662], 256], + 64346: [[1664], 256], + 64347: [[1664], 256], + 64348: [[1664], 256], + 64349: [[1664], 256], + 64350: [[1658], 256], + 64351: [[1658], 256], + 64352: [[1658], 256], + 64353: [[1658], 256], + 64354: [[1663], 256], + 64355: [[1663], 256], + 64356: [[1663], 256], + 64357: [[1663], 256], + 64358: [[1657], 256], + 64359: [[1657], 256], + 64360: [[1657], 256], + 64361: [[1657], 256], + 64362: [[1700], 256], + 64363: [[1700], 256], + 64364: [[1700], 256], + 64365: [[1700], 256], + 64366: [[1702], 256], + 64367: [[1702], 256], + 64368: [[1702], 256], + 64369: [[1702], 256], + 64370: [[1668], 256], + 64371: [[1668], 256], + 64372: [[1668], 256], + 64373: [[1668], 256], + 64374: [[1667], 256], + 64375: [[1667], 256], + 64376: [[1667], 256], + 64377: [[1667], 256], + 64378: [[1670], 256], + 64379: [[1670], 256], + 64380: [[1670], 256], + 64381: [[1670], 256], + 64382: [[1671], 256], + 64383: [[1671], 256], + 64384: [[1671], 256], + 64385: [[1671], 256], + 64386: [[1677], 256], + 64387: [[1677], 256], + 64388: [[1676], 256], + 64389: [[1676], 256], + 64390: [[1678], 256], + 64391: [[1678], 256], + 64392: [[1672], 256], + 64393: [[1672], 256], + 64394: [[1688], 256], + 64395: [[1688], 256], + 64396: [[1681], 256], + 64397: [[1681], 256], + 64398: [[1705], 256], + 64399: [[1705], 256], + 64400: [[1705], 256], + 64401: [[1705], 256], + 64402: [[1711], 256], + 64403: [[1711], 256], + 64404: [[1711], 256], + 64405: [[1711], 256], + 64406: [[1715], 256], + 64407: [[1715], 256], + 64408: [[1715], 256], + 64409: [[1715], 256], + 64410: [[1713], 256], + 64411: [[1713], 256], + 64412: [[1713], 256], + 64413: [[1713], 256], + 64414: [[1722], 256], + 64415: [[1722], 256], + 64416: [[1723], 256], + 64417: [[1723], 256], + 64418: [[1723], 256], + 64419: [[1723], 256], + 64420: [[1728], 256], + 64421: [[1728], 256], + 64422: [[1729], 256], + 64423: [[1729], 256], + 64424: [[1729], 256], + 64425: [[1729], 256], + 64426: [[1726], 256], + 64427: [[1726], 256], + 64428: [[1726], 256], + 64429: [[1726], 256], + 64430: [[1746], 256], + 64431: [[1746], 256], + 64432: [[1747], 256], + 64433: [[1747], 256], + 64467: [[1709], 256], + 64468: [[1709], 256], + 64469: [[1709], 256], + 64470: [[1709], 256], + 64471: [[1735], 256], + 64472: [[1735], 256], + 64473: [[1734], 256], + 64474: [[1734], 256], + 64475: [[1736], 256], + 64476: [[1736], 256], + 64477: [[1655], 256], + 64478: [[1739], 256], + 64479: [[1739], 256], + 64480: [[1733], 256], + 64481: [[1733], 256], + 64482: [[1737], 256], + 64483: [[1737], 256], + 64484: [[1744], 256], + 64485: [[1744], 256], + 64486: [[1744], 256], + 64487: [[1744], 256], + 64488: [[1609], 256], + 64489: [[1609], 256], + 64490: [[1574, 1575], 256], + 64491: [[1574, 1575], 256], + 64492: [[1574, 1749], 256], + 64493: [[1574, 1749], 256], + 64494: [[1574, 1608], 256], + 64495: [[1574, 1608], 256], + 64496: [[1574, 1735], 256], + 64497: [[1574, 1735], 256], + 64498: [[1574, 1734], 256], + 64499: [[1574, 1734], 256], + 64500: [[1574, 1736], 256], + 64501: [[1574, 1736], 256], + 64502: [[1574, 1744], 256], + 64503: [[1574, 1744], 256], + 64504: [[1574, 1744], 256], + 64505: [[1574, 1609], 256], + 64506: [[1574, 1609], 256], + 64507: [[1574, 1609], 256], + 64508: [[1740], 256], + 64509: [[1740], 256], + 64510: [[1740], 256], + 64511: [[1740], 256] + }, + 64512: { + 64512: [[1574, 1580], 256], + 64513: [[1574, 1581], 256], + 64514: [[1574, 1605], 256], + 64515: [[1574, 1609], 256], + 64516: [[1574, 1610], 256], + 64517: [[1576, 1580], 256], + 64518: [[1576, 1581], 256], + 64519: [[1576, 1582], 256], + 64520: [[1576, 1605], 256], + 64521: [[1576, 1609], 256], + 64522: [[1576, 1610], 256], + 64523: [[1578, 1580], 256], + 64524: [[1578, 1581], 256], + 64525: [[1578, 1582], 256], + 64526: [[1578, 1605], 256], + 64527: [[1578, 1609], 256], + 64528: [[1578, 1610], 256], + 64529: [[1579, 1580], 256], + 64530: [[1579, 1605], 256], + 64531: [[1579, 1609], 256], + 64532: [[1579, 1610], 256], + 64533: [[1580, 1581], 256], + 64534: [[1580, 1605], 256], + 64535: [[1581, 1580], 256], + 64536: [[1581, 1605], 256], + 64537: [[1582, 1580], 256], + 64538: [[1582, 1581], 256], + 64539: [[1582, 1605], 256], + 64540: [[1587, 1580], 256], + 64541: [[1587, 1581], 256], + 64542: [[1587, 1582], 256], + 64543: [[1587, 1605], 256], + 64544: [[1589, 1581], 256], + 64545: [[1589, 1605], 256], + 64546: [[1590, 1580], 256], + 64547: [[1590, 1581], 256], + 64548: [[1590, 1582], 256], + 64549: [[1590, 1605], 256], + 64550: [[1591, 1581], 256], + 64551: [[1591, 1605], 256], + 64552: [[1592, 1605], 256], + 64553: [[1593, 1580], 256], + 64554: [[1593, 1605], 256], + 64555: [[1594, 1580], 256], + 64556: [[1594, 1605], 256], + 64557: [[1601, 1580], 256], + 64558: [[1601, 1581], 256], + 64559: [[1601, 1582], 256], + 64560: [[1601, 1605], 256], + 64561: [[1601, 1609], 256], + 64562: [[1601, 1610], 256], + 64563: [[1602, 1581], 256], + 64564: [[1602, 1605], 256], + 64565: [[1602, 1609], 256], + 64566: [[1602, 1610], 256], + 64567: [[1603, 1575], 256], + 64568: [[1603, 1580], 256], + 64569: [[1603, 1581], 256], + 64570: [[1603, 1582], 256], + 64571: [[1603, 1604], 256], + 64572: [[1603, 1605], 256], + 64573: [[1603, 1609], 256], + 64574: [[1603, 1610], 256], + 64575: [[1604, 1580], 256], + 64576: [[1604, 1581], 256], + 64577: [[1604, 1582], 256], + 64578: [[1604, 1605], 256], + 64579: [[1604, 1609], 256], + 64580: [[1604, 1610], 256], + 64581: [[1605, 1580], 256], + 64582: [[1605, 1581], 256], + 64583: [[1605, 1582], 256], + 64584: [[1605, 1605], 256], + 64585: [[1605, 1609], 256], + 64586: [[1605, 1610], 256], + 64587: [[1606, 1580], 256], + 64588: [[1606, 1581], 256], + 64589: [[1606, 1582], 256], + 64590: [[1606, 1605], 256], + 64591: [[1606, 1609], 256], + 64592: [[1606, 1610], 256], + 64593: [[1607, 1580], 256], + 64594: [[1607, 1605], 256], + 64595: [[1607, 1609], 256], + 64596: [[1607, 1610], 256], + 64597: [[1610, 1580], 256], + 64598: [[1610, 1581], 256], + 64599: [[1610, 1582], 256], + 64600: [[1610, 1605], 256], + 64601: [[1610, 1609], 256], + 64602: [[1610, 1610], 256], + 64603: [[1584, 1648], 256], + 64604: [[1585, 1648], 256], + 64605: [[1609, 1648], 256], + 64606: [[32, 1612, 1617], 256], + 64607: [[32, 1613, 1617], 256], + 64608: [[32, 1614, 1617], 256], + 64609: [[32, 1615, 1617], 256], + 64610: [[32, 1616, 1617], 256], + 64611: [[32, 1617, 1648], 256], + 64612: [[1574, 1585], 256], + 64613: [[1574, 1586], 256], + 64614: [[1574, 1605], 256], + 64615: [[1574, 1606], 256], + 64616: [[1574, 1609], 256], + 64617: [[1574, 1610], 256], + 64618: [[1576, 1585], 256], + 64619: [[1576, 1586], 256], + 64620: [[1576, 1605], 256], + 64621: [[1576, 1606], 256], + 64622: [[1576, 1609], 256], + 64623: [[1576, 1610], 256], + 64624: [[1578, 1585], 256], + 64625: [[1578, 1586], 256], + 64626: [[1578, 1605], 256], + 64627: [[1578, 1606], 256], + 64628: [[1578, 1609], 256], + 64629: [[1578, 1610], 256], + 64630: [[1579, 1585], 256], + 64631: [[1579, 1586], 256], + 64632: [[1579, 1605], 256], + 64633: [[1579, 1606], 256], + 64634: [[1579, 1609], 256], + 64635: [[1579, 1610], 256], + 64636: [[1601, 1609], 256], + 64637: [[1601, 1610], 256], + 64638: [[1602, 1609], 256], + 64639: [[1602, 1610], 256], + 64640: [[1603, 1575], 256], + 64641: [[1603, 1604], 256], + 64642: [[1603, 1605], 256], + 64643: [[1603, 1609], 256], + 64644: [[1603, 1610], 256], + 64645: [[1604, 1605], 256], + 64646: [[1604, 1609], 256], + 64647: [[1604, 1610], 256], + 64648: [[1605, 1575], 256], + 64649: [[1605, 1605], 256], + 64650: [[1606, 1585], 256], + 64651: [[1606, 1586], 256], + 64652: [[1606, 1605], 256], + 64653: [[1606, 1606], 256], + 64654: [[1606, 1609], 256], + 64655: [[1606, 1610], 256], + 64656: [[1609, 1648], 256], + 64657: [[1610, 1585], 256], + 64658: [[1610, 1586], 256], + 64659: [[1610, 1605], 256], + 64660: [[1610, 1606], 256], + 64661: [[1610, 1609], 256], + 64662: [[1610, 1610], 256], + 64663: [[1574, 1580], 256], + 64664: [[1574, 1581], 256], + 64665: [[1574, 1582], 256], + 64666: [[1574, 1605], 256], + 64667: [[1574, 1607], 256], + 64668: [[1576, 1580], 256], + 64669: [[1576, 1581], 256], + 64670: [[1576, 1582], 256], + 64671: [[1576, 1605], 256], + 64672: [[1576, 1607], 256], + 64673: [[1578, 1580], 256], + 64674: [[1578, 1581], 256], + 64675: [[1578, 1582], 256], + 64676: [[1578, 1605], 256], + 64677: [[1578, 1607], 256], + 64678: [[1579, 1605], 256], + 64679: [[1580, 1581], 256], + 64680: [[1580, 1605], 256], + 64681: [[1581, 1580], 256], + 64682: [[1581, 1605], 256], + 64683: [[1582, 1580], 256], + 64684: [[1582, 1605], 256], + 64685: [[1587, 1580], 256], + 64686: [[1587, 1581], 256], + 64687: [[1587, 1582], 256], + 64688: [[1587, 1605], 256], + 64689: [[1589, 1581], 256], + 64690: [[1589, 1582], 256], + 64691: [[1589, 1605], 256], + 64692: [[1590, 1580], 256], + 64693: [[1590, 1581], 256], + 64694: [[1590, 1582], 256], + 64695: [[1590, 1605], 256], + 64696: [[1591, 1581], 256], + 64697: [[1592, 1605], 256], + 64698: [[1593, 1580], 256], + 64699: [[1593, 1605], 256], + 64700: [[1594, 1580], 256], + 64701: [[1594, 1605], 256], + 64702: [[1601, 1580], 256], + 64703: [[1601, 1581], 256], + 64704: [[1601, 1582], 256], + 64705: [[1601, 1605], 256], + 64706: [[1602, 1581], 256], + 64707: [[1602, 1605], 256], + 64708: [[1603, 1580], 256], + 64709: [[1603, 1581], 256], + 64710: [[1603, 1582], 256], + 64711: [[1603, 1604], 256], + 64712: [[1603, 1605], 256], + 64713: [[1604, 1580], 256], + 64714: [[1604, 1581], 256], + 64715: [[1604, 1582], 256], + 64716: [[1604, 1605], 256], + 64717: [[1604, 1607], 256], + 64718: [[1605, 1580], 256], + 64719: [[1605, 1581], 256], + 64720: [[1605, 1582], 256], + 64721: [[1605, 1605], 256], + 64722: [[1606, 1580], 256], + 64723: [[1606, 1581], 256], + 64724: [[1606, 1582], 256], + 64725: [[1606, 1605], 256], + 64726: [[1606, 1607], 256], + 64727: [[1607, 1580], 256], + 64728: [[1607, 1605], 256], + 64729: [[1607, 1648], 256], + 64730: [[1610, 1580], 256], + 64731: [[1610, 1581], 256], + 64732: [[1610, 1582], 256], + 64733: [[1610, 1605], 256], + 64734: [[1610, 1607], 256], + 64735: [[1574, 1605], 256], + 64736: [[1574, 1607], 256], + 64737: [[1576, 1605], 256], + 64738: [[1576, 1607], 256], + 64739: [[1578, 1605], 256], + 64740: [[1578, 1607], 256], + 64741: [[1579, 1605], 256], + 64742: [[1579, 1607], 256], + 64743: [[1587, 1605], 256], + 64744: [[1587, 1607], 256], + 64745: [[1588, 1605], 256], + 64746: [[1588, 1607], 256], + 64747: [[1603, 1604], 256], + 64748: [[1603, 1605], 256], + 64749: [[1604, 1605], 256], + 64750: [[1606, 1605], 256], + 64751: [[1606, 1607], 256], + 64752: [[1610, 1605], 256], + 64753: [[1610, 1607], 256], + 64754: [[1600, 1614, 1617], 256], + 64755: [[1600, 1615, 1617], 256], + 64756: [[1600, 1616, 1617], 256], + 64757: [[1591, 1609], 256], + 64758: [[1591, 1610], 256], + 64759: [[1593, 1609], 256], + 64760: [[1593, 1610], 256], + 64761: [[1594, 1609], 256], + 64762: [[1594, 1610], 256], + 64763: [[1587, 1609], 256], + 64764: [[1587, 1610], 256], + 64765: [[1588, 1609], 256], + 64766: [[1588, 1610], 256], + 64767: [[1581, 1609], 256] + }, + 64768: { + 64768: [[1581, 1610], 256], + 64769: [[1580, 1609], 256], + 64770: [[1580, 1610], 256], + 64771: [[1582, 1609], 256], + 64772: [[1582, 1610], 256], + 64773: [[1589, 1609], 256], + 64774: [[1589, 1610], 256], + 64775: [[1590, 1609], 256], + 64776: [[1590, 1610], 256], + 64777: [[1588, 1580], 256], + 64778: [[1588, 1581], 256], + 64779: [[1588, 1582], 256], + 64780: [[1588, 1605], 256], + 64781: [[1588, 1585], 256], + 64782: [[1587, 1585], 256], + 64783: [[1589, 1585], 256], + 64784: [[1590, 1585], 256], + 64785: [[1591, 1609], 256], + 64786: [[1591, 1610], 256], + 64787: [[1593, 1609], 256], + 64788: [[1593, 1610], 256], + 64789: [[1594, 1609], 256], + 64790: [[1594, 1610], 256], + 64791: [[1587, 1609], 256], + 64792: [[1587, 1610], 256], + 64793: [[1588, 1609], 256], + 64794: [[1588, 1610], 256], + 64795: [[1581, 1609], 256], + 64796: [[1581, 1610], 256], + 64797: [[1580, 1609], 256], + 64798: [[1580, 1610], 256], + 64799: [[1582, 1609], 256], + 64800: [[1582, 1610], 256], + 64801: [[1589, 1609], 256], + 64802: [[1589, 1610], 256], + 64803: [[1590, 1609], 256], + 64804: [[1590, 1610], 256], + 64805: [[1588, 1580], 256], + 64806: [[1588, 1581], 256], + 64807: [[1588, 1582], 256], + 64808: [[1588, 1605], 256], + 64809: [[1588, 1585], 256], + 64810: [[1587, 1585], 256], + 64811: [[1589, 1585], 256], + 64812: [[1590, 1585], 256], + 64813: [[1588, 1580], 256], + 64814: [[1588, 1581], 256], + 64815: [[1588, 1582], 256], + 64816: [[1588, 1605], 256], + 64817: [[1587, 1607], 256], + 64818: [[1588, 1607], 256], + 64819: [[1591, 1605], 256], + 64820: [[1587, 1580], 256], + 64821: [[1587, 1581], 256], + 64822: [[1587, 1582], 256], + 64823: [[1588, 1580], 256], + 64824: [[1588, 1581], 256], + 64825: [[1588, 1582], 256], + 64826: [[1591, 1605], 256], + 64827: [[1592, 1605], 256], + 64828: [[1575, 1611], 256], + 64829: [[1575, 1611], 256], + 64848: [[1578, 1580, 1605], 256], + 64849: [[1578, 1581, 1580], 256], + 64850: [[1578, 1581, 1580], 256], + 64851: [[1578, 1581, 1605], 256], + 64852: [[1578, 1582, 1605], 256], + 64853: [[1578, 1605, 1580], 256], + 64854: [[1578, 1605, 1581], 256], + 64855: [[1578, 1605, 1582], 256], + 64856: [[1580, 1605, 1581], 256], + 64857: [[1580, 1605, 1581], 256], + 64858: [[1581, 1605, 1610], 256], + 64859: [[1581, 1605, 1609], 256], + 64860: [[1587, 1581, 1580], 256], + 64861: [[1587, 1580, 1581], 256], + 64862: [[1587, 1580, 1609], 256], + 64863: [[1587, 1605, 1581], 256], + 64864: [[1587, 1605, 1581], 256], + 64865: [[1587, 1605, 1580], 256], + 64866: [[1587, 1605, 1605], 256], + 64867: [[1587, 1605, 1605], 256], + 64868: [[1589, 1581, 1581], 256], + 64869: [[1589, 1581, 1581], 256], + 64870: [[1589, 1605, 1605], 256], + 64871: [[1588, 1581, 1605], 256], + 64872: [[1588, 1581, 1605], 256], + 64873: [[1588, 1580, 1610], 256], + 64874: [[1588, 1605, 1582], 256], + 64875: [[1588, 1605, 1582], 256], + 64876: [[1588, 1605, 1605], 256], + 64877: [[1588, 1605, 1605], 256], + 64878: [[1590, 1581, 1609], 256], + 64879: [[1590, 1582, 1605], 256], + 64880: [[1590, 1582, 1605], 256], + 64881: [[1591, 1605, 1581], 256], + 64882: [[1591, 1605, 1581], 256], + 64883: [[1591, 1605, 1605], 256], + 64884: [[1591, 1605, 1610], 256], + 64885: [[1593, 1580, 1605], 256], + 64886: [[1593, 1605, 1605], 256], + 64887: [[1593, 1605, 1605], 256], + 64888: [[1593, 1605, 1609], 256], + 64889: [[1594, 1605, 1605], 256], + 64890: [[1594, 1605, 1610], 256], + 64891: [[1594, 1605, 1609], 256], + 64892: [[1601, 1582, 1605], 256], + 64893: [[1601, 1582, 1605], 256], + 64894: [[1602, 1605, 1581], 256], + 64895: [[1602, 1605, 1605], 256], + 64896: [[1604, 1581, 1605], 256], + 64897: [[1604, 1581, 1610], 256], + 64898: [[1604, 1581, 1609], 256], + 64899: [[1604, 1580, 1580], 256], + 64900: [[1604, 1580, 1580], 256], + 64901: [[1604, 1582, 1605], 256], + 64902: [[1604, 1582, 1605], 256], + 64903: [[1604, 1605, 1581], 256], + 64904: [[1604, 1605, 1581], 256], + 64905: [[1605, 1581, 1580], 256], + 64906: [[1605, 1581, 1605], 256], + 64907: [[1605, 1581, 1610], 256], + 64908: [[1605, 1580, 1581], 256], + 64909: [[1605, 1580, 1605], 256], + 64910: [[1605, 1582, 1580], 256], + 64911: [[1605, 1582, 1605], 256], + 64914: [[1605, 1580, 1582], 256], + 64915: [[1607, 1605, 1580], 256], + 64916: [[1607, 1605, 1605], 256], + 64917: [[1606, 1581, 1605], 256], + 64918: [[1606, 1581, 1609], 256], + 64919: [[1606, 1580, 1605], 256], + 64920: [[1606, 1580, 1605], 256], + 64921: [[1606, 1580, 1609], 256], + 64922: [[1606, 1605, 1610], 256], + 64923: [[1606, 1605, 1609], 256], + 64924: [[1610, 1605, 1605], 256], + 64925: [[1610, 1605, 1605], 256], + 64926: [[1576, 1582, 1610], 256], + 64927: [[1578, 1580, 1610], 256], + 64928: [[1578, 1580, 1609], 256], + 64929: [[1578, 1582, 1610], 256], + 64930: [[1578, 1582, 1609], 256], + 64931: [[1578, 1605, 1610], 256], + 64932: [[1578, 1605, 1609], 256], + 64933: [[1580, 1605, 1610], 256], + 64934: [[1580, 1581, 1609], 256], + 64935: [[1580, 1605, 1609], 256], + 64936: [[1587, 1582, 1609], 256], + 64937: [[1589, 1581, 1610], 256], + 64938: [[1588, 1581, 1610], 256], + 64939: [[1590, 1581, 1610], 256], + 64940: [[1604, 1580, 1610], 256], + 64941: [[1604, 1605, 1610], 256], + 64942: [[1610, 1581, 1610], 256], + 64943: [[1610, 1580, 1610], 256], + 64944: [[1610, 1605, 1610], 256], + 64945: [[1605, 1605, 1610], 256], + 64946: [[1602, 1605, 1610], 256], + 64947: [[1606, 1581, 1610], 256], + 64948: [[1602, 1605, 1581], 256], + 64949: [[1604, 1581, 1605], 256], + 64950: [[1593, 1605, 1610], 256], + 64951: [[1603, 1605, 1610], 256], + 64952: [[1606, 1580, 1581], 256], + 64953: [[1605, 1582, 1610], 256], + 64954: [[1604, 1580, 1605], 256], + 64955: [[1603, 1605, 1605], 256], + 64956: [[1604, 1580, 1605], 256], + 64957: [[1606, 1580, 1581], 256], + 64958: [[1580, 1581, 1610], 256], + 64959: [[1581, 1580, 1610], 256], + 64960: [[1605, 1580, 1610], 256], + 64961: [[1601, 1605, 1610], 256], + 64962: [[1576, 1581, 1610], 256], + 64963: [[1603, 1605, 1605], 256], + 64964: [[1593, 1580, 1605], 256], + 64965: [[1589, 1605, 1605], 256], + 64966: [[1587, 1582, 1610], 256], + 64967: [[1606, 1580, 1610], 256], + 65008: [[1589, 1604, 1746], 256], + 65009: [[1602, 1604, 1746], 256], + 65010: [[1575, 1604, 1604, 1607], 256], + 65011: [[1575, 1603, 1576, 1585], 256], + 65012: [[1605, 1581, 1605, 1583], 256], + 65013: [[1589, 1604, 1593, 1605], 256], + 65014: [[1585, 1587, 1608, 1604], 256], + 65015: [[1593, 1604, 1610, 1607], 256], + 65016: [[1608, 1587, 1604, 1605], 256], + 65017: [[1589, 1604, 1609], 256], + 65018: [ + [ + 1589, + 1604, + 1609, + 32, + 1575, + 1604, + 1604, + 1607, + 32, + 1593, + 1604, + 1610, + 1607, + 32, + 1608, + 1587, + 1604, + 1605 + ], + 256 + ], + 65019: [[1580, 1604, 32, 1580, 1604, 1575, 1604, 1607], 256], + 65020: [[1585, 1740, 1575, 1604], 256] + }, + 65024: { + 65040: [[44], 256], + 65041: [[12289], 256], + 65042: [[12290], 256], + 65043: [[58], 256], + 65044: [[59], 256], + 65045: [[33], 256], + 65046: [[63], 256], + 65047: [[12310], 256], + 65048: [[12311], 256], + 65049: [[8230], 256], + 65056: [, 230], + 65057: [, 230], + 65058: [, 230], + 65059: [, 230], + 65060: [, 230], + 65061: [, 230], + 65062: [, 230], + 65072: [[8229], 256], + 65073: [[8212], 256], + 65074: [[8211], 256], + 65075: [[95], 256], + 65076: [[95], 256], + 65077: [[40], 256], + 65078: [[41], 256], + 65079: [[123], 256], + 65080: [[125], 256], + 65081: [[12308], 256], + 65082: [[12309], 256], + 65083: [[12304], 256], + 65084: [[12305], 256], + 65085: [[12298], 256], + 65086: [[12299], 256], + 65087: [[12296], 256], + 65088: [[12297], 256], + 65089: [[12300], 256], + 65090: [[12301], 256], + 65091: [[12302], 256], + 65092: [[12303], 256], + 65095: [[91], 256], + 65096: [[93], 256], + 65097: [[8254], 256], + 65098: [[8254], 256], + 65099: [[8254], 256], + 65100: [[8254], 256], + 65101: [[95], 256], + 65102: [[95], 256], + 65103: [[95], 256], + 65104: [[44], 256], + 65105: [[12289], 256], + 65106: [[46], 256], + 65108: [[59], 256], + 65109: [[58], 256], + 65110: [[63], 256], + 65111: [[33], 256], + 65112: [[8212], 256], + 65113: [[40], 256], + 65114: [[41], 256], + 65115: [[123], 256], + 65116: [[125], 256], + 65117: [[12308], 256], + 65118: [[12309], 256], + 65119: [[35], 256], + 65120: [[38], 256], + 65121: [[42], 256], + 65122: [[43], 256], + 65123: [[45], 256], + 65124: [[60], 256], + 65125: [[62], 256], + 65126: [[61], 256], + 65128: [[92], 256], + 65129: [[36], 256], + 65130: [[37], 256], + 65131: [[64], 256], + 65136: [[32, 1611], 256], + 65137: [[1600, 1611], 256], + 65138: [[32, 1612], 256], + 65140: [[32, 1613], 256], + 65142: [[32, 1614], 256], + 65143: [[1600, 1614], 256], + 65144: [[32, 1615], 256], + 65145: [[1600, 1615], 256], + 65146: [[32, 1616], 256], + 65147: [[1600, 1616], 256], + 65148: [[32, 1617], 256], + 65149: [[1600, 1617], 256], + 65150: [[32, 1618], 256], + 65151: [[1600, 1618], 256], + 65152: [[1569], 256], + 65153: [[1570], 256], + 65154: [[1570], 256], + 65155: [[1571], 256], + 65156: [[1571], 256], + 65157: [[1572], 256], + 65158: [[1572], 256], + 65159: [[1573], 256], + 65160: [[1573], 256], + 65161: [[1574], 256], + 65162: [[1574], 256], + 65163: [[1574], 256], + 65164: [[1574], 256], + 65165: [[1575], 256], + 65166: [[1575], 256], + 65167: [[1576], 256], + 65168: [[1576], 256], + 65169: [[1576], 256], + 65170: [[1576], 256], + 65171: [[1577], 256], + 65172: [[1577], 256], + 65173: [[1578], 256], + 65174: [[1578], 256], + 65175: [[1578], 256], + 65176: [[1578], 256], + 65177: [[1579], 256], + 65178: [[1579], 256], + 65179: [[1579], 256], + 65180: [[1579], 256], + 65181: [[1580], 256], + 65182: [[1580], 256], + 65183: [[1580], 256], + 65184: [[1580], 256], + 65185: [[1581], 256], + 65186: [[1581], 256], + 65187: [[1581], 256], + 65188: [[1581], 256], + 65189: [[1582], 256], + 65190: [[1582], 256], + 65191: [[1582], 256], + 65192: [[1582], 256], + 65193: [[1583], 256], + 65194: [[1583], 256], + 65195: [[1584], 256], + 65196: [[1584], 256], + 65197: [[1585], 256], + 65198: [[1585], 256], + 65199: [[1586], 256], + 65200: [[1586], 256], + 65201: [[1587], 256], + 65202: [[1587], 256], + 65203: [[1587], 256], + 65204: [[1587], 256], + 65205: [[1588], 256], + 65206: [[1588], 256], + 65207: [[1588], 256], + 65208: [[1588], 256], + 65209: [[1589], 256], + 65210: [[1589], 256], + 65211: [[1589], 256], + 65212: [[1589], 256], + 65213: [[1590], 256], + 65214: [[1590], 256], + 65215: [[1590], 256], + 65216: [[1590], 256], + 65217: [[1591], 256], + 65218: [[1591], 256], + 65219: [[1591], 256], + 65220: [[1591], 256], + 65221: [[1592], 256], + 65222: [[1592], 256], + 65223: [[1592], 256], + 65224: [[1592], 256], + 65225: [[1593], 256], + 65226: [[1593], 256], + 65227: [[1593], 256], + 65228: [[1593], 256], + 65229: [[1594], 256], + 65230: [[1594], 256], + 65231: [[1594], 256], + 65232: [[1594], 256], + 65233: [[1601], 256], + 65234: [[1601], 256], + 65235: [[1601], 256], + 65236: [[1601], 256], + 65237: [[1602], 256], + 65238: [[1602], 256], + 65239: [[1602], 256], + 65240: [[1602], 256], + 65241: [[1603], 256], + 65242: [[1603], 256], + 65243: [[1603], 256], + 65244: [[1603], 256], + 65245: [[1604], 256], + 65246: [[1604], 256], + 65247: [[1604], 256], + 65248: [[1604], 256], + 65249: [[1605], 256], + 65250: [[1605], 256], + 65251: [[1605], 256], + 65252: [[1605], 256], + 65253: [[1606], 256], + 65254: [[1606], 256], + 65255: [[1606], 256], + 65256: [[1606], 256], + 65257: [[1607], 256], + 65258: [[1607], 256], + 65259: [[1607], 256], + 65260: [[1607], 256], + 65261: [[1608], 256], + 65262: [[1608], 256], + 65263: [[1609], 256], + 65264: [[1609], 256], + 65265: [[1610], 256], + 65266: [[1610], 256], + 65267: [[1610], 256], + 65268: [[1610], 256], + 65269: [[1604, 1570], 256], + 65270: [[1604, 1570], 256], + 65271: [[1604, 1571], 256], + 65272: [[1604, 1571], 256], + 65273: [[1604, 1573], 256], + 65274: [[1604, 1573], 256], + 65275: [[1604, 1575], 256], + 65276: [[1604, 1575], 256] + }, + 65280: { + 65281: [[33], 256], + 65282: [[34], 256], + 65283: [[35], 256], + 65284: [[36], 256], + 65285: [[37], 256], + 65286: [[38], 256], + 65287: [[39], 256], + 65288: [[40], 256], + 65289: [[41], 256], + 65290: [[42], 256], + 65291: [[43], 256], + 65292: [[44], 256], + 65293: [[45], 256], + 65294: [[46], 256], + 65295: [[47], 256], + 65296: [[48], 256], + 65297: [[49], 256], + 65298: [[50], 256], + 65299: [[51], 256], + 65300: [[52], 256], + 65301: [[53], 256], + 65302: [[54], 256], + 65303: [[55], 256], + 65304: [[56], 256], + 65305: [[57], 256], + 65306: [[58], 256], + 65307: [[59], 256], + 65308: [[60], 256], + 65309: [[61], 256], + 65310: [[62], 256], + 65311: [[63], 256], + 65312: [[64], 256], + 65313: [[65], 256], + 65314: [[66], 256], + 65315: [[67], 256], + 65316: [[68], 256], + 65317: [[69], 256], + 65318: [[70], 256], + 65319: [[71], 256], + 65320: [[72], 256], + 65321: [[73], 256], + 65322: [[74], 256], + 65323: [[75], 256], + 65324: [[76], 256], + 65325: [[77], 256], + 65326: [[78], 256], + 65327: [[79], 256], + 65328: [[80], 256], + 65329: [[81], 256], + 65330: [[82], 256], + 65331: [[83], 256], + 65332: [[84], 256], + 65333: [[85], 256], + 65334: [[86], 256], + 65335: [[87], 256], + 65336: [[88], 256], + 65337: [[89], 256], + 65338: [[90], 256], + 65339: [[91], 256], + 65340: [[92], 256], + 65341: [[93], 256], + 65342: [[94], 256], + 65343: [[95], 256], + 65344: [[96], 256], + 65345: [[97], 256], + 65346: [[98], 256], + 65347: [[99], 256], + 65348: [[100], 256], + 65349: [[101], 256], + 65350: [[102], 256], + 65351: [[103], 256], + 65352: [[104], 256], + 65353: [[105], 256], + 65354: [[106], 256], + 65355: [[107], 256], + 65356: [[108], 256], + 65357: [[109], 256], + 65358: [[110], 256], + 65359: [[111], 256], + 65360: [[112], 256], + 65361: [[113], 256], + 65362: [[114], 256], + 65363: [[115], 256], + 65364: [[116], 256], + 65365: [[117], 256], + 65366: [[118], 256], + 65367: [[119], 256], + 65368: [[120], 256], + 65369: [[121], 256], + 65370: [[122], 256], + 65371: [[123], 256], + 65372: [[124], 256], + 65373: [[125], 256], + 65374: [[126], 256], + 65375: [[10629], 256], + 65376: [[10630], 256], + 65377: [[12290], 256], + 65378: [[12300], 256], + 65379: [[12301], 256], + 65380: [[12289], 256], + 65381: [[12539], 256], + 65382: [[12530], 256], + 65383: [[12449], 256], + 65384: [[12451], 256], + 65385: [[12453], 256], + 65386: [[12455], 256], + 65387: [[12457], 256], + 65388: [[12515], 256], + 65389: [[12517], 256], + 65390: [[12519], 256], + 65391: [[12483], 256], + 65392: [[12540], 256], + 65393: [[12450], 256], + 65394: [[12452], 256], + 65395: [[12454], 256], + 65396: [[12456], 256], + 65397: [[12458], 256], + 65398: [[12459], 256], + 65399: [[12461], 256], + 65400: [[12463], 256], + 65401: [[12465], 256], + 65402: [[12467], 256], + 65403: [[12469], 256], + 65404: [[12471], 256], + 65405: [[12473], 256], + 65406: [[12475], 256], + 65407: [[12477], 256], + 65408: [[12479], 256], + 65409: [[12481], 256], + 65410: [[12484], 256], + 65411: [[12486], 256], + 65412: [[12488], 256], + 65413: [[12490], 256], + 65414: [[12491], 256], + 65415: [[12492], 256], + 65416: [[12493], 256], + 65417: [[12494], 256], + 65418: [[12495], 256], + 65419: [[12498], 256], + 65420: [[12501], 256], + 65421: [[12504], 256], + 65422: [[12507], 256], + 65423: [[12510], 256], + 65424: [[12511], 256], + 65425: [[12512], 256], + 65426: [[12513], 256], + 65427: [[12514], 256], + 65428: [[12516], 256], + 65429: [[12518], 256], + 65430: [[12520], 256], + 65431: [[12521], 256], + 65432: [[12522], 256], + 65433: [[12523], 256], + 65434: [[12524], 256], + 65435: [[12525], 256], + 65436: [[12527], 256], + 65437: [[12531], 256], + 65438: [[12441], 256], + 65439: [[12442], 256], + 65440: [[12644], 256], + 65441: [[12593], 256], + 65442: [[12594], 256], + 65443: [[12595], 256], + 65444: [[12596], 256], + 65445: [[12597], 256], + 65446: [[12598], 256], + 65447: [[12599], 256], + 65448: [[12600], 256], + 65449: [[12601], 256], + 65450: [[12602], 256], + 65451: [[12603], 256], + 65452: [[12604], 256], + 65453: [[12605], 256], + 65454: [[12606], 256], + 65455: [[12607], 256], + 65456: [[12608], 256], + 65457: [[12609], 256], + 65458: [[12610], 256], + 65459: [[12611], 256], + 65460: [[12612], 256], + 65461: [[12613], 256], + 65462: [[12614], 256], + 65463: [[12615], 256], + 65464: [[12616], 256], + 65465: [[12617], 256], + 65466: [[12618], 256], + 65467: [[12619], 256], + 65468: [[12620], 256], + 65469: [[12621], 256], + 65470: [[12622], 256], + 65474: [[12623], 256], + 65475: [[12624], 256], + 65476: [[12625], 256], + 65477: [[12626], 256], + 65478: [[12627], 256], + 65479: [[12628], 256], + 65482: [[12629], 256], + 65483: [[12630], 256], + 65484: [[12631], 256], + 65485: [[12632], 256], + 65486: [[12633], 256], + 65487: [[12634], 256], + 65490: [[12635], 256], + 65491: [[12636], 256], + 65492: [[12637], 256], + 65493: [[12638], 256], + 65494: [[12639], 256], + 65495: [[12640], 256], + 65498: [[12641], 256], + 65499: [[12642], 256], + 65500: [[12643], 256], + 65504: [[162], 256], + 65505: [[163], 256], + 65506: [[172], 256], + 65507: [[175], 256], + 65508: [[166], 256], + 65509: [[165], 256], + 65510: [[8361], 256], + 65512: [[9474], 256], + 65513: [[8592], 256], + 65514: [[8593], 256], + 65515: [[8594], 256], + 65516: [[8595], 256], + 65517: [[9632], 256], + 65518: [[9675], 256] + } +}; diff --git a/node_modules/es5-ext/string/#/normalize/implement.js b/node_modules/es5-ext/string/#/normalize/implement.js new file mode 100644 index 00000000..ad11739e --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "normalize", + { value: require("./shim"), +configurable: true, +enumerable: false, + writable: true }); +} diff --git a/node_modules/es5-ext/string/#/normalize/index.js b/node_modules/es5-ext/string/#/normalize/index.js new file mode 100644 index 00000000..7e91b08b --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype.normalize + : require("./shim"); diff --git a/node_modules/es5-ext/string/#/normalize/is-implemented.js b/node_modules/es5-ext/string/#/normalize/is-implemented.js new file mode 100644 index 00000000..01b48a9d --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "æøåäüö"; + +module.exports = function () { + if (typeof str.normalize !== "function") return false; + return str.normalize("NFKD") === "æøåäüö"; +}; diff --git a/node_modules/es5-ext/string/#/normalize/shim.js b/node_modules/es5-ext/string/#/normalize/shim.js new file mode 100644 index 00000000..aba37f55 --- /dev/null +++ b/node_modules/es5-ext/string/#/normalize/shim.js @@ -0,0 +1,317 @@ +/* eslint no-bitwise: "off", max-statements: "off", max-lines: "off" */ + +// Taken from: https://github.com/walling/unorm/blob/master/lib/unorm.js + +/* + * UnicodeNormalizer 1.0.0 + * Copyright (c) 2008 Matsuza + * Dual licensed under the MIT (MIT-LICENSE.txt) and + * GPL (GPL-LICENSE.txt) licenses. + * $Date: 2008-06-05 16:44:17 +0200 (Thu, 05 Jun 2008) $ + * $Rev: 13309 $ +*/ + +"use strict"; + +var primitiveSet = require("../../../object/primitive-set") + , validValue = require("../../../object/valid-value") + , data = require("./_data"); + +var floor = Math.floor + , forms = primitiveSet("NFC", "NFD", "NFKC", "NFKD") + , DEFAULT_FEATURE = [null, 0, {}] + , CACHE_THRESHOLD = 10 + , SBase = 0xac00 + , LBase = 0x1100 + , VBase = 0x1161 + , TBase = 0x11a7 + , LCount = 19 + , VCount = 21 + , TCount = 28 + , NCount = VCount * TCount + , SCount = LCount * NCount + , UChar + , cache = {} + , cacheCounter = [] + , fromCache + , fromData + , fromCpOnly + , fromRuleBasedJamo + , fromCpFilter + , strategies + , UCharIterator + , RecursDecompIterator + , DecompIterator + , CompIterator + , createIterator + , normalize; + +UChar = function (cp, feature) { + this.codepoint = cp; + this.feature = feature; +}; + +// Strategies +(function () { + for (var i = 0; i <= 0xff; ++i) cacheCounter[i] = 0; +}()); + +fromCache = function (nextStep, cp, needFeature) { + var ret = cache[cp]; + if (!ret) { + ret = nextStep(cp, needFeature); + if (Boolean(ret.feature) && ++cacheCounter[(cp >> 8) & 0xff] > CACHE_THRESHOLD) { + cache[cp] = ret; + } + } + return ret; +}; + +fromData = function (next, cp) { + var hash = cp & 0xff00, dunit = UChar.udata[hash] || {}, feature = dunit[cp]; + return feature ? new UChar(cp, feature) : new UChar(cp, DEFAULT_FEATURE); +}; +fromCpOnly = function (next, cp, needFeature) { + return needFeature ? next(cp, needFeature) : new UChar(cp, null); +}; + +fromRuleBasedJamo = function (next, cp, needFeature) { + var char, base, i, arr, SIndex, TIndex, feature, j; + if (cp < LBase || (LBase + LCount <= cp && cp < SBase) || SBase + SCount < cp) { + return next(cp, needFeature); + } + if (LBase <= cp && cp < LBase + LCount) { + char = {}; + base = (cp - LBase) * VCount; + for (i = 0; i < VCount; ++i) { + char[VBase + i] = SBase + TCount * (i + base); + } + arr = new Array(3); + arr[2] = char; + return new UChar(cp, arr); + } + + SIndex = cp - SBase; + TIndex = SIndex % TCount; + feature = []; + if (TIndex === 0) { + feature[0] = [LBase + floor(SIndex / NCount), VBase + floor(SIndex % NCount / TCount)]; + feature[2] = {}; + for (j = 1; j < TCount; ++j) { + feature[2][TBase + j] = cp + j; + } + } else { + feature[0] = [SBase + SIndex - TIndex, TBase + TIndex]; + } + return new UChar(cp, feature); +}; + +fromCpFilter = function (next, cp, needFeature) { + return cp < 60 || (cp > 13311 && cp < 42607) + ? new UChar(cp, DEFAULT_FEATURE) + : next(cp, needFeature); +}; + +strategies = [fromCpFilter, fromCache, fromCpOnly, fromRuleBasedJamo, fromData]; + +UChar.fromCharCode = strategies.reduceRight(function (next, strategy) { + return function (cp, needFeature) { + return strategy(next, cp, needFeature); + }; +}, null); + +UChar.isHighSurrogate = function (cp) { + return cp >= 0xd800 && cp <= 0xdbff; +}; +UChar.isLowSurrogate = function (cp) { + return cp >= 0xdc00 && cp <= 0xdfff; +}; + +UChar.prototype.prepFeature = function () { + if (!this.feature) { + this.feature = UChar.fromCharCode(this.codepoint, true).feature; + } +}; + +UChar.prototype.toString = function () { + var num; + if (this.codepoint < 0x10000) return String.fromCharCode(this.codepoint); + num = this.codepoint - 0x10000; + return String.fromCharCode(floor(num / 0x400) + 0xd800, num % 0x400 + 0xdc00); +}; + +UChar.prototype.getDecomp = function () { + this.prepFeature(); + return this.feature[0] || null; +}; + +UChar.prototype.isCompatibility = function () { + this.prepFeature(); + return Boolean(this.feature[1]) && this.feature[1] & (1 << 8); +}; +UChar.prototype.isExclude = function () { + this.prepFeature(); + return Boolean(this.feature[1]) && this.feature[1] & (1 << 9); +}; +UChar.prototype.getCanonicalClass = function () { + this.prepFeature(); + return this.feature[1] ? this.feature[1] & 0xff : 0; +}; +UChar.prototype.getComposite = function (following) { + var cp; + this.prepFeature(); + if (!this.feature[2]) return null; + cp = this.feature[2][following.codepoint]; + return cp ? UChar.fromCharCode(cp) : null; +}; + +UCharIterator = function (str) { + this.str = str; + this.cursor = 0; +}; +UCharIterator.prototype.next = function () { + if (Boolean(this.str) && this.cursor < this.str.length) { + var cp = this.str.charCodeAt(this.cursor++), d; + if ( + UChar.isHighSurrogate(cp) && + this.cursor < this.str.length && + UChar.isLowSurrogate(d = this.str.charCodeAt(this.cursor)) + ) { + cp = (cp - 0xd800) * 0x400 + (d - 0xdc00) + 0x10000; + ++this.cursor; + } + return UChar.fromCharCode(cp); + } + this.str = null; + return null; +}; + +RecursDecompIterator = function (it, cano) { + this.it = it; + this.canonical = cano; + this.resBuf = []; +}; + +RecursDecompIterator.prototype.next = function () { + var recursiveDecomp, uchar; + recursiveDecomp = function (cano, ucharLoc) { + var decomp = ucharLoc.getDecomp(), ret, i, a, j; + if (Boolean(decomp) && !(cano && ucharLoc.isCompatibility())) { + ret = []; + for (i = 0; i < decomp.length; ++i) { + a = recursiveDecomp(cano, UChar.fromCharCode(decomp[i])); + // Ret.concat(a); //<-why does not this work? + // following block is a workaround. + for (j = 0; j < a.length; ++j) ret.push(a[j]); + } + return ret; + } + return [ucharLoc]; + }; + if (this.resBuf.length === 0) { + uchar = this.it.next(); + if (!uchar) return null; + this.resBuf = recursiveDecomp(this.canonical, uchar); + } + return this.resBuf.shift(); +}; + +DecompIterator = function (it) { + this.it = it; + this.resBuf = []; +}; + +DecompIterator.prototype.next = function () { + var cc, uchar, inspt, uchar2, cc2; + if (this.resBuf.length === 0) { + do { + uchar = this.it.next(); + if (!uchar) break; + cc = uchar.getCanonicalClass(); + inspt = this.resBuf.length; + if (cc !== 0) { + for (inspt; inspt > 0; --inspt) { + uchar2 = this.resBuf[inspt - 1]; + cc2 = uchar2.getCanonicalClass(); + // eslint-disable-next-line max-depth + if (cc2 <= cc) break; + } + } + this.resBuf.splice(inspt, 0, uchar); + } while (cc !== 0); + } + return this.resBuf.shift(); +}; + +CompIterator = function (it) { + this.it = it; + this.procBuf = []; + this.resBuf = []; + this.lastClass = null; +}; + +CompIterator.prototype.next = function () { + var uchar, starter, composite, cc; + while (this.resBuf.length === 0) { + uchar = this.it.next(); + if (!uchar) { + this.resBuf = this.procBuf; + this.procBuf = []; + break; + } + if (this.procBuf.length === 0) { + this.lastClass = uchar.getCanonicalClass(); + this.procBuf.push(uchar); + } else { + starter = this.procBuf[0]; + composite = starter.getComposite(uchar); + cc = uchar.getCanonicalClass(); + if (Boolean(composite) && (this.lastClass < cc || this.lastClass === 0)) { + this.procBuf[0] = composite; + } else { + if (cc === 0) { + this.resBuf = this.procBuf; + this.procBuf = []; + } + this.lastClass = cc; + this.procBuf.push(uchar); + } + } + } + return this.resBuf.shift(); +}; + +createIterator = function (mode, str) { + switch (mode) { + case "NFD": + return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true)); + case "NFKD": + return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false)); + case "NFC": + return new CompIterator( + new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true)) + ); + case "NFKC": + return new CompIterator( + new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false)) + ); + default: + throw new Error(mode + " is invalid"); + } +}; +normalize = function (mode, str) { + var it = createIterator(mode, str), ret = "", uchar; + while ((uchar = it.next())) ret += uchar.toString(); + return ret; +}; + +/* Unicode data */ +UChar.udata = data; + +module.exports = function (/* Form*/) { + var str = String(validValue(this)), form = arguments[0]; + if (form === undefined) form = "NFC"; + else form = String(form); + if (!forms[form]) throw new RangeError("Invalid normalization form: " + form); + return normalize(form, str); +}; diff --git a/node_modules/es5-ext/string/#/pad.js b/node_modules/es5-ext/string/#/pad.js new file mode 100644 index 00000000..159f8951 --- /dev/null +++ b/node_modules/es5-ext/string/#/pad.js @@ -0,0 +1,18 @@ +"use strict"; + +var toInteger = require("../../number/to-integer") + , value = require("../../object/valid-value") + , repeat = require("./repeat") + + , abs = Math.abs, max = Math.max; + +module.exports = function (fill/*, length*/) { + var self = String(value(this)) + , sLength = self.length + , length = arguments[1]; + + length = isNaN(length) ? 1 : toInteger(length); + fill = repeat.call(String(fill), abs(length)); + if (length >= 0) return fill.slice(0, max(0, length - sLength)) + self; + return self + ((sLength + length) >= 0 ? "" : fill.slice(length + sLength)); +}; diff --git a/node_modules/es5-ext/string/#/plain-replace-all.js b/node_modules/es5-ext/string/#/plain-replace-all.js new file mode 100644 index 00000000..9334fe09 --- /dev/null +++ b/node_modules/es5-ext/string/#/plain-replace-all.js @@ -0,0 +1,16 @@ +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function (search, replace) { + var index, pos = 0, str = String(value(this)), sl, rl; + search = String(search); + replace = String(replace); + sl = search.length; + rl = replace.length; + while ((index = str.indexOf(search, pos)) !== -1) { + str = str.slice(0, index) + replace + str.slice(index + sl); + pos = index + rl; + } + return str; +}; diff --git a/node_modules/es5-ext/string/#/plain-replace.js b/node_modules/es5-ext/string/#/plain-replace.js new file mode 100644 index 00000000..f24f5215 --- /dev/null +++ b/node_modules/es5-ext/string/#/plain-replace.js @@ -0,0 +1,10 @@ +"use strict"; + +var indexOf = String.prototype.indexOf, slice = String.prototype.slice; + +module.exports = function (search, replace) { + var index = indexOf.call(this, search); + if (index === -1) return String(this); + return slice.call(this, 0, index) + replace + + slice.call(this, index + String(search).length); +}; diff --git a/node_modules/es5-ext/string/#/repeat/implement.js b/node_modules/es5-ext/string/#/repeat/implement.js new file mode 100644 index 00000000..7066b7b4 --- /dev/null +++ b/node_modules/es5-ext/string/#/repeat/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "repeat", + { value: require("./shim"), +configurable: true, +enumerable: false, + writable: true }); +} diff --git a/node_modules/es5-ext/string/#/repeat/index.js b/node_modules/es5-ext/string/#/repeat/index.js new file mode 100644 index 00000000..99d44b2e --- /dev/null +++ b/node_modules/es5-ext/string/#/repeat/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype.repeat + : require("./shim"); diff --git a/node_modules/es5-ext/string/#/repeat/is-implemented.js b/node_modules/es5-ext/string/#/repeat/is-implemented.js new file mode 100644 index 00000000..e8e02409 --- /dev/null +++ b/node_modules/es5-ext/string/#/repeat/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "foo"; + +module.exports = function () { + if (typeof str.repeat !== "function") return false; + return str.repeat(2) === "foofoo"; +}; diff --git a/node_modules/es5-ext/string/#/repeat/shim.js b/node_modules/es5-ext/string/#/repeat/shim.js new file mode 100644 index 00000000..ac259a83 --- /dev/null +++ b/node_modules/es5-ext/string/#/repeat/shim.js @@ -0,0 +1,24 @@ +// Thanks +// @rauchma http://www.2ality.com/2014/01/efficient-string-repeat.html +// @mathiasbynens https://github.com/mathiasbynens/String.prototype.repeat/blob/4a4b567def/repeat.js + +"use strict"; + +var value = require("../../../object/valid-value") + , toInteger = require("../../../number/to-integer"); + +module.exports = function (count) { + var str = String(value(this)), result; + count = toInteger(count); + if (count < 0) throw new RangeError("Count must be >= 0"); + if (!isFinite(count)) throw new RangeError("Count must be < ∞"); + + result = ""; + while (count) { + if (count % 2) result += str; + if (count > 1) str += str; + // eslint-disable-next-line no-bitwise + count >>= 1; + } + return result; +}; diff --git a/node_modules/es5-ext/string/#/starts-with/implement.js b/node_modules/es5-ext/string/#/starts-with/implement.js new file mode 100644 index 00000000..11613da2 --- /dev/null +++ b/node_modules/es5-ext/string/#/starts-with/implement.js @@ -0,0 +1,9 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "startsWith", + { value: require("./shim"), +configurable: true, +enumerable: false, + writable: true }); +} diff --git a/node_modules/es5-ext/string/#/starts-with/index.js b/node_modules/es5-ext/string/#/starts-with/index.js new file mode 100644 index 00000000..9a6c3743 --- /dev/null +++ b/node_modules/es5-ext/string/#/starts-with/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype.startsWith + : require("./shim"); diff --git a/node_modules/es5-ext/string/#/starts-with/is-implemented.js b/node_modules/es5-ext/string/#/starts-with/is-implemented.js new file mode 100644 index 00000000..f6b6e296 --- /dev/null +++ b/node_modules/es5-ext/string/#/starts-with/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.startsWith !== "function") return false; + return (str.startsWith("trzy") === false) && + (str.startsWith("raz") === true); +}; diff --git a/node_modules/es5-ext/string/#/starts-with/shim.js b/node_modules/es5-ext/string/#/starts-with/shim.js new file mode 100644 index 00000000..d4554779 --- /dev/null +++ b/node_modules/es5-ext/string/#/starts-with/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +var value = require("../../../object/valid-value") + , toInteger = require("../../../number/to-integer") + + , max = Math.max, min = Math.min; + +module.exports = function (searchString/*, position*/) { + var start, self = String(value(this)); + start = min(max(toInteger(arguments[1]), 0), self.length); + return self.indexOf(searchString, start) === start; +}; diff --git a/node_modules/es5-ext/string/#/uncapitalize.js b/node_modules/es5-ext/string/#/uncapitalize.js new file mode 100644 index 00000000..202dbb73 --- /dev/null +++ b/node_modules/es5-ext/string/#/uncapitalize.js @@ -0,0 +1,8 @@ +"use strict"; + +var ensureStringifiable = require("../../object/validate-stringifiable-value"); + +module.exports = function () { + var str = ensureStringifiable(this); + return str.charAt(0).toLowerCase() + str.slice(1); +}; diff --git a/node_modules/es5-ext/string/format-method.js b/node_modules/es5-ext/string/format-method.js new file mode 100644 index 00000000..28956fea --- /dev/null +++ b/node_modules/es5-ext/string/format-method.js @@ -0,0 +1,27 @@ +"use strict"; + +var isCallable = require("../object/is-callable") + , value = require("../object/valid-value") + , call = Function.prototype.call; + +module.exports = function (fmap) { + fmap = Object(value(fmap)); + return function (pattern) { + var context = this; + value(context); + pattern = String(pattern); + return pattern.replace(/%([a-zA-Z]+)|\\([\u0000-\uffff])/g, function ( + match, + token, + escapeChar + ) { + var t, result; + if (escapeChar) return escapeChar; + t = token; + while (t && !(result = fmap[t])) t = t.slice(0, -1); + if (!result) return match; + if (isCallable(result)) result = call.call(result, context); + return result + token.slice(t.length); + }); + }; +}; diff --git a/node_modules/es5-ext/string/from-code-point/implement.js b/node_modules/es5-ext/string/from-code-point/implement.js new file mode 100644 index 00000000..4f815d6b --- /dev/null +++ b/node_modules/es5-ext/string/from-code-point/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String, "fromCodePoint", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/string/from-code-point/index.js b/node_modules/es5-ext/string/from-code-point/index.js new file mode 100644 index 00000000..d5a81122 --- /dev/null +++ b/node_modules/es5-ext/string/from-code-point/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.fromCodePoint + : require("./shim"); diff --git a/node_modules/es5-ext/string/from-code-point/is-implemented.js b/node_modules/es5-ext/string/from-code-point/is-implemented.js new file mode 100644 index 00000000..e6ccfa7f --- /dev/null +++ b/node_modules/es5-ext/string/from-code-point/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var fromCodePoint = String.fromCodePoint; + if (typeof fromCodePoint !== "function") return false; + return fromCodePoint(0x1D306, 0x61, 0x1D307) === "\ud834\udf06a\ud834\udf07"; +}; diff --git a/node_modules/es5-ext/string/from-code-point/shim.js b/node_modules/es5-ext/string/from-code-point/shim.js new file mode 100644 index 00000000..55824f57 --- /dev/null +++ b/node_modules/es5-ext/string/from-code-point/shim.js @@ -0,0 +1,37 @@ +// Based on: +// http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/ +// and: +// https://github.com/mathiasbynens/String.fromCodePoint/blob/master +// /fromcodepoint.js + +"use strict"; + +var floor = Math.floor, fromCharCode = String.fromCharCode; + +// eslint-disable-next-line no-unused-vars +module.exports = function (codePoint1 /*, …codePoints*/) { + var chars = [], length = arguments.length, i, codePoint, result = ""; + for (i = 0; i < length; ++i) { + codePoint = Number(arguments[i]); + if ( + !isFinite(codePoint) || + codePoint < 0 || + codePoint > 0x10ffff || + floor(codePoint) !== codePoint + ) { + throw new RangeError("Invalid code point " + codePoint); + } + + if (codePoint < 0x10000) { + chars.push(codePoint); + } else { + codePoint -= 0x10000; + // eslint-disable-next-line no-bitwise + chars.push((codePoint >> 10) + 0xd800, codePoint % 0x400 + 0xdc00); + } + if (i + 1 !== length && chars.length <= 0x4000) continue; + result += fromCharCode.apply(null, chars); + chars.length = 0; + } + return result; +}; diff --git a/node_modules/es5-ext/string/index.js b/node_modules/es5-ext/string/index.js new file mode 100644 index 00000000..4393588f --- /dev/null +++ b/node_modules/es5-ext/string/index.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "formatMethod": require("./format-method"), + "fromCodePoint": require("./from-code-point"), + "isString": require("./is-string"), + "random": require("./random"), + "randomUniq": require("./random-uniq"), + "raw": require("./raw") +}; diff --git a/node_modules/es5-ext/string/is-string.js b/node_modules/es5-ext/string/is-string.js new file mode 100644 index 00000000..1b1e8630 --- /dev/null +++ b/node_modules/es5-ext/string/is-string.js @@ -0,0 +1,13 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(""); + +module.exports = function (value) { + return ( + typeof value === "string" || + (value && + typeof value === "object" && + (value instanceof String || objToString.call(value) === id)) || + false + ); +}; diff --git a/node_modules/es5-ext/string/random-uniq.js b/node_modules/es5-ext/string/random-uniq.js new file mode 100644 index 00000000..ea10a816 --- /dev/null +++ b/node_modules/es5-ext/string/random-uniq.js @@ -0,0 +1,13 @@ +"use strict"; + +var generated = Object.create(null), random = Math.random; + +module.exports = function () { + var str; + do { + str = random() + .toString(36) + .slice(2); + } while (generated[str]); + return str; +}; diff --git a/node_modules/es5-ext/string/random.js b/node_modules/es5-ext/string/random.js new file mode 100644 index 00000000..4ecec7fc --- /dev/null +++ b/node_modules/es5-ext/string/random.js @@ -0,0 +1,42 @@ +"use strict"; + +var isValue = require("../object/is-value") + , toNaturalNumber = require("../number/to-pos-integer"); + +var generated = Object.create(null), random = Math.random, uniqTryLimit = 100; + +var getChunk = function () { + return random() + .toString(36) + .slice(2); +}; + +var getString = function (/* length */) { + var str = getChunk(), length = arguments[0]; + if (!isValue(length)) return str; + while (str.length < length) str += getChunk(); + return str.slice(0, length); +}; + +module.exports = function (/* options */) { + var options = Object(arguments[0]), length = options.length, isUnique = options.isUnique; + + if (isValue(length)) length = toNaturalNumber(length); + + var str = getString(length); + if (isUnique) { + var count = 0; + while (generated[str]) { + if (++count === uniqTryLimit) { + throw new Error( + "Cannot generate random string.\n" + + "String.random is not designed to effectively generate many short and " + + "unique random strings" + ); + } + str = getString(length); + } + generated[str] = true; + } + return str; +}; diff --git a/node_modules/es5-ext/string/raw/implement.js b/node_modules/es5-ext/string/raw/implement.js new file mode 100644 index 00000000..0f17df3f --- /dev/null +++ b/node_modules/es5-ext/string/raw/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String, "raw", { value: require("./shim"), + configurable: true, +enumerable: false, +writable: true }); +} diff --git a/node_modules/es5-ext/string/raw/index.js b/node_modules/es5-ext/string/raw/index.js new file mode 100644 index 00000000..e818dd56 --- /dev/null +++ b/node_modules/es5-ext/string/raw/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.raw + : require("./shim"); diff --git a/node_modules/es5-ext/string/raw/is-implemented.js b/node_modules/es5-ext/string/raw/is-implemented.js new file mode 100644 index 00000000..8758108c --- /dev/null +++ b/node_modules/es5-ext/string/raw/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function () { + var raw = String.raw, test; + if (typeof raw !== "function") return false; + test = ["foo\nbar", "marko\n"]; + test.raw = ["foo\\nbar", "marko\\n"]; + return raw(test, "INSE\nRT") === "foo\\nbarINSE\nRTmarko\\n"; +}; diff --git a/node_modules/es5-ext/string/raw/shim.js b/node_modules/es5-ext/string/raw/shim.js new file mode 100644 index 00000000..8c52bb55 --- /dev/null +++ b/node_modules/es5-ext/string/raw/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , validValue = require("../../object/valid-value") + , reduce = Array.prototype.reduce; + +module.exports = function (callSite /*, …substitutions*/) { + var args, rawValue = Object(validValue(Object(validValue(callSite)).raw)); + if (!toPosInt(rawValue.length)) return ""; + args = arguments; + return reduce.call(rawValue, function (str1, str2, i) { + return str1 + String(args[i]) + str2; + }); +}; diff --git a/node_modules/es5-ext/test/.eslintrc.json b/node_modules/es5-ext/test/.eslintrc.json new file mode 100644 index 00000000..3ac4585b --- /dev/null +++ b/node_modules/es5-ext/test/.eslintrc.json @@ -0,0 +1,14 @@ +{ + "globals": { + "Symbol": true + }, + "rules": { + "consistent-this": "off", + "id-length": "off", + "no-empty-function": "off", + "no-eval": "off", + "no-new-wrappers": "off", + "no-prototype-builtins": "off", + "no-shadow": "off" + } +} diff --git a/node_modules/es5-ext/test/__tad.js b/node_modules/es5-ext/test/__tad.js new file mode 100644 index 00000000..883c3792 --- /dev/null +++ b/node_modules/es5-ext/test/__tad.js @@ -0,0 +1,3 @@ +"use strict"; + +exports.context = null; diff --git a/node_modules/es5-ext/test/array/#/@@iterator/implement.js b/node_modules/es5-ext/test/array/#/@@iterator/implement.js new file mode 100644 index 00000000..1a20aa82 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/@@iterator/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/@@iterator/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/@@iterator/index.js b/node_modules/es5-ext/test/array/#/@@iterator/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/@@iterator/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js b/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/@@iterator/shim.js b/node_modules/es5-ext/test/array/#/@@iterator/shim.js new file mode 100644 index 00000000..71b71d58 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/@@iterator/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__generic = function (t, a) { + var iterator = t.call(this); + a.deep(iterator.next(), { value: "1", done: false }); + a.deep(iterator.next(), { value: "2", done: false }); + a.deep(iterator.next(), { value: "3", done: false }); + a.deep(iterator.next(), { value: undefined, done: true }); +}; diff --git a/node_modules/es5-ext/test/array/#/_compare-by-length.js b/node_modules/es5-ext/test/array/#/_compare-by-length.js new file mode 100644 index 00000000..a53d8470 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/_compare-by-length.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + var arr = [4, 5, 6], obj1 = { length: 8 }, obj2 = {}, obj3 = { length: 1 }; + + a.deep([arr, obj1, obj2, obj3].sort(t), [obj2, obj3, arr, obj1]); +}; diff --git a/node_modules/es5-ext/test/array/#/binary-search.js b/node_modules/es5-ext/test/array/#/binary-search.js new file mode 100644 index 00000000..04dfaefa --- /dev/null +++ b/node_modules/es5-ext/test/array/#/binary-search.js @@ -0,0 +1,17 @@ +"use strict"; + +var compare = function (value) { + return this - value; +}; + +module.exports = function (t, a) { + var arr; + arr = [2, 5, 5, 8, 34, 67, 98, 345, 678]; + + // Highest, equal match + a(t.call(arr, compare.bind(1)), 0, "All higher"); + a(t.call(arr, compare.bind(679)), arr.length - 1, "All lower"); + a(t.call(arr, compare.bind(4)), 0, "Mid"); + a(t.call(arr, compare.bind(5)), 2, "Match"); + a(t.call(arr, compare.bind(6)), 2, "Above"); +}; diff --git a/node_modules/es5-ext/test/array/#/clear.js b/node_modules/es5-ext/test/array/#/clear.js new file mode 100644 index 00000000..640cc192 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/clear.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + var arr = [1, 2, {}, 4]; + a(t.call(arr), arr, "Returns same array"); + a.deep(arr, [], "Empties array"); +}; diff --git a/node_modules/es5-ext/test/array/#/compact.js b/node_modules/es5-ext/test/array/#/compact.js new file mode 100644 index 00000000..05160844 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/compact.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + a(t.call(this).length, 3); + }, + "": function (t, a) { + var o, x, y, z; + o = {}; + x = [0, 1, "", null, o, false, undefined, true]; + y = x.slice(0); + + a.not(z = t.call(x), x, "Returns different object"); + a.deep(x, y, "Origin not changed"); + a.deep(z, [0, 1, "", o, false, true], "Result"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/concat/implement.js b/node_modules/es5-ext/test/array/#/concat/implement.js new file mode 100644 index 00000000..c4dc41fa --- /dev/null +++ b/node_modules/es5-ext/test/array/#/concat/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/concat/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/concat/index.js b/node_modules/es5-ext/test/array/#/concat/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/concat/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/concat/is-implemented.js b/node_modules/es5-ext/test/array/#/concat/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/concat/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/concat/shim.js b/node_modules/es5-ext/test/array/#/concat/shim.js new file mode 100644 index 00000000..30a9b0c6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/concat/shim.js @@ -0,0 +1,26 @@ +"use strict"; + +var isConcatSpreadable = require("es6-symbol").isConcatSpreadable + , SubArray = require("../../../../array/_sub-array-dummy-safe"); + +module.exports = function (t, a) { + var arr = [1, 3, 45], x = {}, subArr, subArr2, result; + + a.deep(t.call(arr, "2d", x, ["ere", "fe", x], false, null), + [1, 3, 45, "2d", x, "ere", "fe", x, false, null], "Plain array"); + + subArr = new SubArray("lol", "miszko"); + subArr2 = new SubArray("elo", "fol"); + + result = t.call(subArr, "df", arr, "fef", subArr2, null); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, ["lol", "miszko", "df", 1, 3, 45, "fef", "elo", "fol", null], + "Spreable by default"); + + SubArray.prototype[isConcatSpreadable] = false; + + result = t.call(subArr, "df", arr, "fef", subArr2, null); + a.deep(result, [subArr, "df", 1, 3, 45, "fef", subArr2, null], "Non spreadable"); + + delete SubArray.prototype[isConcatSpreadable]; +}; diff --git a/node_modules/es5-ext/test/array/#/contains.js b/node_modules/es5-ext/test/array/#/contains.js new file mode 100644 index 00000000..fb0f96ce --- /dev/null +++ b/node_modules/es5-ext/test/array/#/contains.js @@ -0,0 +1,21 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + a(t.call(this, this[1]), true, "Contains"); + a(t.call(this, {}), false, "Does Not contain"); + }, + "": function (t, a) { + var o, x = {}, y = {}; + + o = [1, "raz", x]; + + a(t.call(o, 1), true, "First"); + a(t.call(o, "1"), false, "Type coercion"); + a(t.call(o, "raz"), true, "Primitive"); + a(t.call(o, "foo"), false, "Primitive not found"); + a(t.call(o, x), true, "Object found"); + a(t.call(o, y), false, "Object not found"); + a(t.call(o, 1, 1), false, "Position"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/copy-within/implement.js b/node_modules/es5-ext/test/array/#/copy-within/implement.js new file mode 100644 index 00000000..87272ac0 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/copy-within/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/copy-within/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/copy-within/index.js b/node_modules/es5-ext/test/array/#/copy-within/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/copy-within/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js b/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/copy-within/shim.js b/node_modules/es5-ext/test/array/#/copy-within/shim.js new file mode 100644 index 00000000..03a631fe --- /dev/null +++ b/node_modules/es5-ext/test/array/#/copy-within/shim.js @@ -0,0 +1,29 @@ +"use strict"; + +module.exports = function (t, a) { + var args, x; + + a.h1("2 args"); + x = [1, 2, 3, 4, 5]; + t.call(x, 0, 3); + a.deep(x, [4, 5, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 1, 3), [1, 4, 5, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 1, 2), [1, 3, 4, 5, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 2, 2), [1, 2, 3, 4, 5]); + + a.h1("3 args"); + a.deep(t.call([1, 2, 3, 4, 5], 0, 3, 4), [4, 2, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 1, 3, 4), [1, 4, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 1, 2, 4), [1, 3, 4, 4, 5]); + + a.h1("Negative args"); + a.deep(t.call([1, 2, 3, 4, 5], 0, -2), [4, 5, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 0, -2, -1), [4, 2, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], -4, -3, -2), [1, 3, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], -4, -3, -1), [1, 3, 4, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], -4, -3), [1, 3, 4, 5, 5]); + + a.h1("Array-likes"); + args = { 0: 1, 1: 2, 2: 3, length: 3 }; + a.deep(t.call(args, -2, 0), { 0: 1, 1: 1, 2: 2, length: 3 }); +}; diff --git a/node_modules/es5-ext/test/array/#/diff.js b/node_modules/es5-ext/test/array/#/diff.js new file mode 100644 index 00000000..397c5ddf --- /dev/null +++ b/node_modules/es5-ext/test/array/#/diff.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + a.deep(t.call(this, this), []); + }, + "": function (t, a) { + var x = {}, y = {}; + + a.deep(t.call([1, "raz", x, 2, "trzy", y], [x, 2, "trzy"]), [1, "raz", y], + "Scope longer"); + a.deep(t.call([1, "raz", x], [x, 2, "trzy", 1, y]), ["raz"], + "Arg longer"); + a.deep(t.call([1, "raz", x], []), [1, "raz", x], "Empty arg"); + a.deep(t.call([], [1, y, "sdfs"]), [], "Empty scope"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/e-index-of.js b/node_modules/es5-ext/test/array/#/e-index-of.js new file mode 100644 index 00000000..1e42cbd7 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/e-index-of.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}; + a(t.call([3, "raz", {}, x, {}], x), 3, "Regular"); + a(t.call([3, "raz", NaN, {}, NaN], NaN), 2, "NaN"); + a(t.call([3, "raz", 0, {}, -0], -0), 2, "-0"); + a(t.call([3, "raz", -0, {}, 0], +0), 2, "+0"); + a(t.call([3, "raz", NaN, {}, NaN], NaN, 3), 4, "fromIndex"); + a(t.call([3, "raz", NaN, {}, NaN], NaN, -1), 4, "fromIndex negative #1"); + a(t.call([3, "raz", NaN, {}, NaN], NaN, -2), 4, "fromIndex negative #2"); + a(t.call([3, "raz", NaN, {}, NaN], NaN, -3), 2, "fromIndex negative #3"); +}; diff --git a/node_modules/es5-ext/test/array/#/e-last-index-of.js b/node_modules/es5-ext/test/array/#/e-last-index-of.js new file mode 100644 index 00000000..2c7fff9f --- /dev/null +++ b/node_modules/es5-ext/test/array/#/e-last-index-of.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}; + a(t.call([3, "raz", {}, x, {}, x], x), 5, "Regular"); + a(t.call([3, "raz", NaN, {}, x], NaN), 2, "NaN"); + a(t.call([3, "raz", 0, {}, -0], -0), 4, "-0"); + a(t.call([3, "raz", -0, {}, 0], +0), 4, "+0"); + a(t.call([3, "raz", NaN, {}, NaN], NaN, 3), 2, "fromIndex"); + a(t.call([3, "raz", NaN, 2, NaN], NaN, -1), 4, "Negative fromIndex #1"); + a(t.call([3, "raz", NaN, 2, NaN], NaN, -2), 2, "Negative fromIndex #2"); +}; diff --git a/node_modules/es5-ext/test/array/#/entries/implement.js b/node_modules/es5-ext/test/array/#/entries/implement.js new file mode 100644 index 00000000..fa16930c --- /dev/null +++ b/node_modules/es5-ext/test/array/#/entries/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/entries/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/entries/index.js b/node_modules/es5-ext/test/array/#/entries/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/entries/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/entries/is-implemented.js b/node_modules/es5-ext/test/array/#/entries/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/entries/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/entries/shim.js b/node_modules/es5-ext/test/array/#/entries/shim.js new file mode 100644 index 00000000..87ac25a9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/entries/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__generic = function (t, a) { + var iterator = t.call(this); + a.deep(iterator.next(), { value: [0, "1"], done: false }); + a.deep(iterator.next(), { value: [1, "2"], done: false }); + a.deep(iterator.next(), { value: [2, "3"], done: false }); + a.deep(iterator.next(), { value: undefined, done: true }); +}; diff --git a/node_modules/es5-ext/test/array/#/exclusion.js b/node_modules/es5-ext/test/array/#/exclusion.js new file mode 100644 index 00000000..827c037a --- /dev/null +++ b/node_modules/es5-ext/test/array/#/exclusion.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + var x = {}; + a.deep(t.call(this, this, [this[0], this[2], x]), [x]); + }, + "": function (t, a) { + var x = {}, y = {}; + + a.deep(t.call([x, y]), [x, y], "No arguments"); + a.deep(t.call([x, 1], [], []), [x, 1], "Empty arguments"); + a.deep(t.call([1, "raz", x], [2, "raz", y], [2, "raz", x]), [1, y]); + } +}; diff --git a/node_modules/es5-ext/test/array/#/fill/implement.js b/node_modules/es5-ext/test/array/#/fill/implement.js new file mode 100644 index 00000000..fe806a6b --- /dev/null +++ b/node_modules/es5-ext/test/array/#/fill/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/fill/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/fill/index.js b/node_modules/es5-ext/test/array/#/fill/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/fill/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/fill/is-implemented.js b/node_modules/es5-ext/test/array/#/fill/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/fill/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/fill/shim.js b/node_modules/es5-ext/test/array/#/fill/shim.js new file mode 100644 index 00000000..c752e10b --- /dev/null +++ b/node_modules/es5-ext/test/array/#/fill/shim.js @@ -0,0 +1,18 @@ +// Taken from https://github.com/paulmillr/es6-shim/blob/master/test/array.js + +"use strict"; + +module.exports = function (t, a) { + var x; + + x = [1, 2, 3, 4, 5, 6]; + a(t.call(x, -1), x, "Returns self object"); + a.deep(x, [-1, -1, -1, -1, -1, -1], "Value"); + + a.deep(t.call([1, 2, 3, 4, 5, 6], -1, 3), [1, 2, 3, -1, -1, -1], + "Positive start"); + a.deep(t.call([1, 2, 3, 4, 5, 6], -1, -3), [1, 2, 3, -1, -1, -1], + "Negative start"); + a.deep(t.call([1, 2, 3, 4, 5, 6], -1, 9), [1, 2, 3, 4, 5, 6], + "Large start"); +}; diff --git a/node_modules/es5-ext/test/array/#/filter/implement.js b/node_modules/es5-ext/test/array/#/filter/implement.js new file mode 100644 index 00000000..cac92c83 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/filter/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/filter/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/filter/index.js b/node_modules/es5-ext/test/array/#/filter/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/filter/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/filter/is-implemented.js b/node_modules/es5-ext/test/array/#/filter/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/filter/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/filter/shim.js b/node_modules/es5-ext/test/array/#/filter/shim.js new file mode 100644 index 00000000..e20a6511 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/filter/shim.js @@ -0,0 +1,17 @@ +"use strict"; + +var SubArray = require("../../../../array/_sub-array-dummy-safe"); + +module.exports = function (t, a) { + var arr, x = {}, subArr, result; + + arr = ["foo", undefined, 0, "2d", false, x, null]; + + a.deep(t.call(arr, Boolean), ["foo", "2d", x], "Plain array"); + + subArr = new SubArray("foo", undefined, 0, "2d", false, x, null); + + result = t.call(subArr, Boolean); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, ["foo", "2d", x], "Result of subclass"); +}; diff --git a/node_modules/es5-ext/test/array/#/find-index/implement.js b/node_modules/es5-ext/test/array/#/find-index/implement.js new file mode 100644 index 00000000..341bedef --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find-index/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/find-index/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/find-index/index.js b/node_modules/es5-ext/test/array/#/find-index/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find-index/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/find-index/is-implemented.js b/node_modules/es5-ext/test/array/#/find-index/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find-index/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/find-index/shim.js b/node_modules/es5-ext/test/array/#/find-index/shim.js new file mode 100644 index 00000000..0a6fe113 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find-index/shim.js @@ -0,0 +1,17 @@ +"use strict"; + +exports.__generic = function (t, a) { + var count = 0, o = {}, self = Object(this); + a(t.call(self, function (value, i, scope) { + a(value, this[i], "Value"); + a(i, count++, "Index"); + a(scope, this, "Scope"); + }, self), -1, "Falsy result"); + a(count, 3); + + count = -1; + a(t.call(this, function () { + return ++count ? o : null; + }, this), 1, "Truthy result"); + a(count, 1); +}; diff --git a/node_modules/es5-ext/test/array/#/find/implement.js b/node_modules/es5-ext/test/array/#/find/implement.js new file mode 100644 index 00000000..9333b25f --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/find/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/find/index.js b/node_modules/es5-ext/test/array/#/find/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/find/is-implemented.js b/node_modules/es5-ext/test/array/#/find/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/find/shim.js b/node_modules/es5-ext/test/array/#/find/shim.js new file mode 100644 index 00000000..b8fd9f06 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/find/shim.js @@ -0,0 +1,17 @@ +"use strict"; + +exports.__generic = function (t, a) { + var count = 0, o = {}, self = Object(this); + a(t.call(self, function (value, i, scope) { + a(value, this[i], "Value"); + a(i, count++, "Index"); + a(scope, this, "Scope"); + }, self), undefined, "Falsy result"); + a(count, 3); + + count = -1; + a(t.call(this, function () { + return ++count ? o : null; + }, this), this[1], "Truthy result"); + a(count, 1); +}; diff --git a/node_modules/es5-ext/test/array/#/first-index.js b/node_modules/es5-ext/test/array/#/first-index.js new file mode 100644 index 00000000..af3388b5 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/first-index.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a(t.call([]), null, "Empty"); + a(t.call([null]), 0, "One value"); + a(t.call([1, 2, 3]), 0, "Many values"); + a(t.call(new Array(1000)), null, "Sparse empty"); + x = []; + x[883] = undefined; + x[890] = null; + a(t.call(x), 883, "Manual sparse, distant value"); + x = new Array(1000); + x[657] = undefined; + x[700] = null; + a(t.call(x), 657, "Sparse, distant value"); +}; diff --git a/node_modules/es5-ext/test/array/#/first.js b/node_modules/es5-ext/test/array/#/first.js new file mode 100644 index 00000000..5e9c1ae8 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/first.js @@ -0,0 +1,13 @@ +"use strict"; + +exports.__generic = function (t, a) { + a(t.call(this), this[0]); +}; +exports[""] = function (t, a) { + var x; + a(t.call([]), undefined, "Empty"); + a(t.call(new Array(234), undefined, "Sparse empty")); + x = new Array(2342); + x[434] = {}; + a(t.call(x), x[434], "Sparse"); +}; diff --git a/node_modules/es5-ext/test/array/#/flatten.js b/node_modules/es5-ext/test/array/#/flatten.js new file mode 100644 index 00000000..c1234c3a --- /dev/null +++ b/node_modules/es5-ext/test/array/#/flatten.js @@ -0,0 +1,14 @@ +"use strict"; + +var o = [1, 2, [3, 4, [5, 6], 7, 8], 9, 10, [11, 12, [13, 14]], 15]; + +module.exports = { + "__generic": function (t, a) { + a(t.call(this).length, 3); + }, + "Nested Arrays": function (t, a) { + var result = t.call(o); + a.not(o, result); + a.deep(result, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]); + } +}; diff --git a/node_modules/es5-ext/test/array/#/for-each-right.js b/node_modules/es5-ext/test/array/#/for-each-right.js new file mode 100644 index 00000000..109101f8 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/for-each-right.js @@ -0,0 +1,47 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + var count = 0, first, last, x, icount = this.length; + t.call(this, function (item, index, col) { + ++count; + if (!first) { + first = item; + } + last = item; + x = col; + a(index, --icount, "Index"); + }); + a(count, this.length, "Iterated"); + a(first, this[this.length - 1], "First is last"); + a(last, this[0], "Last is first"); + a.deep(x, Object(this), "Collection as third argument"); // Jslint: skip + }, + "": function (t, a) { + var x = {}, y, count; + t.call( + [1], + function () { + y = this; + }, + x + ); + a(y, x, "Scope"); + y = 0; + t.call([3, 4, 4], function (a, i) { + y += i; + }); + a(y, 3, "Indexes"); + + x = [1, 3]; + x[5] = "x"; + y = 0; + count = 0; + t.call(x, function (a, i) { + ++count; + y += i; + }); + a(y, 6, "Misssing Indexes"); + a(count, 3, "Misssing Indexes, count"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/group.js b/node_modules/es5-ext/test/array/#/group.js new file mode 100644 index 00000000..12667de9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/group.js @@ -0,0 +1,24 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + var count = 0, self; + + self = Object(this); + a.deep(t.call(self, function (v, i, scope) { + a(v, this[i], "Value"); + a(i, count++, "Index"); + a(scope, this, "Scope"); + return i; + }, self), { 0: [this[0]], 1: [this[1]], 2: [this[2]] }); + }, + "": function (t, a) { + var r; + r = t.call([2, 3, 3, 4, 5, 6, 7, 7, 23, 45, 34, 56], + function (v) { + return v % 2 ? "odd" : "even"; + }); + a.deep(r.odd, [3, 3, 5, 7, 7, 23, 45]); + a.deep(r.even, [2, 4, 6, 34, 56]); + } +}; diff --git a/node_modules/es5-ext/test/array/#/indexes-of.js b/node_modules/es5-ext/test/array/#/indexes-of.js new file mode 100644 index 00000000..1463417d --- /dev/null +++ b/node_modules/es5-ext/test/array/#/indexes-of.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + a.deep(t.call(this, this[1]), [1]); + }, + "": function (t, a) { + var x = {}; + a.deep(t.call([1, 3, 5, 3, 5], 6), [], "No result"); + a.deep(t.call([1, 3, 5, 1, 3, 5, 1], 1), [0, 3, 6], "Some results"); + a.deep(t.call([], x), [], "Empty array"); + a.deep(t.call([x, 3, {}, x, 3, 5, x], x), [0, 3, 6], "Search for object"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/intersection.js b/node_modules/es5-ext/test/array/#/intersection.js new file mode 100644 index 00000000..bb1097d1 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/intersection.js @@ -0,0 +1,24 @@ +"use strict"; + +var toArray = require("../../../array/to-array"); + +module.exports = { + "__generic": function (t, a) { + a.deep(t.call(this, this, this), toArray(this)); + }, + "": function (t, a) { + var x = {}, y = {}, p, r; + a.deep(t.call([], [2, 3, 4]), [], "Empty #1"); + a.deep(t.call([2, 3, 4], []), [], "Empty #2"); + a.deep(t.call([2, 3, x], [y, 5, 7]), [], "Different"); + p = t.call([3, 5, "raz", {}, "dwa", x], [1, 3, "raz", "dwa", "trzy", x, {}], + [3, "raz", x, 65]); + r = [3, "raz", x]; + p.sort(); + r.sort(); + a.deep(p, r, "Same parts"); + a.deep(t.call(r, r), r, "Same"); + a.deep(t.call([1, 2, x, 4, 5, y, 7], [7, y, 5, 4, x, 2, 1]), + [1, 2, x, 4, 5, y, 7], "Long reverse same"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/is-copy.js b/node_modules/es5-ext/test/array/#/is-copy.js new file mode 100644 index 00000000..b090c2ac --- /dev/null +++ b/node_modules/es5-ext/test/array/#/is-copy.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}; + a(t.call([], []), true, "Empty"); + a(t.call([], {}), true, "Empty lists"); + a(t.call([1, x, "raz"], [1, x, "raz"]), true, "Same"); + a(t.call([1, x, "raz"], { 0: 1, 1: x, 2: "raz", length: 3 }), true, + "Same lists"); + a(t.call([1, x, "raz"], [x, 1, "raz"]), false, "Diff order"); + a(t.call([1, x], [1, x, "raz"]), false, "Diff length #1"); + a(t.call([1, x, "raz"], [1, x]), false, "Diff length #2"); +}; diff --git a/node_modules/es5-ext/test/array/#/is-empty.js b/node_modules/es5-ext/test/array/#/is-empty.js new file mode 100644 index 00000000..1e1c097b --- /dev/null +++ b/node_modules/es5-ext/test/array/#/is-empty.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}; + a(t.call([]), true, "Empty"); + a(t.call({ length: 0 }), true, "Empty lists"); + a(t.call([1, x, "raz"]), false, "Non empty"); +}; diff --git a/node_modules/es5-ext/test/array/#/is-uniq.js b/node_modules/es5-ext/test/array/#/is-uniq.js new file mode 100644 index 00000000..ab531ac5 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/is-uniq.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}; + a(t.call([]), true, "Empty"); + a(t.call({}), true, "Empty lists"); + a(t.call([1, x, "raz"]), true, "Uniq"); + a(t.call([1, x, 1, "raz"]), false, "Not Uniq: primitive"); + a(t.call([1, x, "1", "raz"]), true, "Uniq: primitive"); + a(t.call([1, x, 1, {}, "raz"]), false, "Not Uniq: Obj"); +}; diff --git a/node_modules/es5-ext/test/array/#/keys/implement.js b/node_modules/es5-ext/test/array/#/keys/implement.js new file mode 100644 index 00000000..cc1f9316 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/keys/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/keys/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/keys/index.js b/node_modules/es5-ext/test/array/#/keys/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/keys/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/keys/is-implemented.js b/node_modules/es5-ext/test/array/#/keys/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/keys/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/keys/shim.js b/node_modules/es5-ext/test/array/#/keys/shim.js new file mode 100644 index 00000000..9be9a8f0 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/keys/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__generic = function (t, a) { + var iterator = t.call(this); + a.deep(iterator.next(), { value: 0, done: false }); + a.deep(iterator.next(), { value: 1, done: false }); + a.deep(iterator.next(), { value: 2, done: false }); + a.deep(iterator.next(), { value: undefined, done: true }); +}; diff --git a/node_modules/es5-ext/test/array/#/last-index.js b/node_modules/es5-ext/test/array/#/last-index.js new file mode 100644 index 00000000..e66d16f1 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/last-index.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a(t.call([]), null, "Empty"); + a(t.call([null]), 0, "One value"); + a(t.call([1, 2, 3]), 2, "Many values"); + a(t.call(new Array(1000)), null, "Sparse empty"); + x = []; + x[883] = null; + x[890] = undefined; + a(t.call(x), 890, "Manual sparse, distant value"); + x = new Array(1000); + x[657] = null; + x[700] = undefined; + a(t.call(x), 700, "Sparse, distant value"); +}; diff --git a/node_modules/es5-ext/test/array/#/last.js b/node_modules/es5-ext/test/array/#/last.js new file mode 100644 index 00000000..6ca5d053 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/last.js @@ -0,0 +1,15 @@ +"use strict"; + +exports.__generic = function (t, a) { + a(t.call(this), this[this.length - 1]); +}; + +exports[""] = function (t, a) { + var x; + a(t.call([]), undefined, "Empty"); + a(t.call(new Array(234), undefined, "Sparse empty")); + x = new Array(2342); + x[434] = {}; + x[450] = {}; + a(t.call(x), x[450], "Sparse"); +}; diff --git a/node_modules/es5-ext/test/array/#/map/implement.js b/node_modules/es5-ext/test/array/#/map/implement.js new file mode 100644 index 00000000..26bb4115 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/map/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/map/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/map/index.js b/node_modules/es5-ext/test/array/#/map/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/map/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/map/is-implemented.js b/node_modules/es5-ext/test/array/#/map/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/map/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/map/shim.js b/node_modules/es5-ext/test/array/#/map/shim.js new file mode 100644 index 00000000..02a5af25 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/map/shim.js @@ -0,0 +1,19 @@ +"use strict"; + +var SubArray = require("../../../../array/_sub-array-dummy-safe"); + +module.exports = function (t, a) { + var arr, x = {}, subArr, result; + + arr = ["foo", undefined, 0, "2d", false, x, null]; + + a.deep(t.call(arr, Boolean), [true, false, false, true, false, true, false], + "Plain array"); + + subArr = new SubArray("foo", undefined, 0, "2d", false, x, null); + + result = t.call(subArr, Boolean); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, [true, false, false, true, false, true, false], + "Result of subclass"); +}; diff --git a/node_modules/es5-ext/test/array/#/remove.js b/node_modules/es5-ext/test/array/#/remove.js new file mode 100644 index 00000000..d67457ea --- /dev/null +++ b/node_modules/es5-ext/test/array/#/remove.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + var y = {}, z = {}, x = [9, z, 5, y, "foo"]; + t.call(x, y); + a.deep(x, [9, z, 5, "foo"]); + t.call(x, {}); + a.deep(x, [9, z, 5, "foo"], "Not existing"); + t.call(x, 5); + a.deep(x, [9, z, "foo"], "Primitive"); + x = [9, z, 5, y, "foo"]; + t.call(x, z, 5, "foo"); + a.deep(x, [9, y], "More than one argument"); +}; diff --git a/node_modules/es5-ext/test/array/#/separate.js b/node_modules/es5-ext/test/array/#/separate.js new file mode 100644 index 00000000..9792637f --- /dev/null +++ b/node_modules/es5-ext/test/array/#/separate.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function (t, a) { + var x = [], y = {}, z = {}; + a.deep(t.call(x, y), [], "Empty"); + a.not(t.call(x), x, "Returns copy"); + a.deep(t.call([1], y), [1], "One"); + a.deep(t.call([1, "raz"], y), [1, y, "raz"], "One"); + a.deep(t.call([1, "raz", x], y), [1, y, "raz", y, x], "More"); + x = new Array(1000); + x[23] = 2; + x[3453] = "raz"; + x[500] = z; + a.deep(t.call(x, y), [2, y, z, y, "raz"], "Sparse"); +}; diff --git a/node_modules/es5-ext/test/array/#/slice/implement.js b/node_modules/es5-ext/test/array/#/slice/implement.js new file mode 100644 index 00000000..8c9b9be6 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/slice/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/slice/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/slice/index.js b/node_modules/es5-ext/test/array/#/slice/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/slice/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/slice/is-implemented.js b/node_modules/es5-ext/test/array/#/slice/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/slice/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/slice/shim.js b/node_modules/es5-ext/test/array/#/slice/shim.js new file mode 100644 index 00000000..f09ad13c --- /dev/null +++ b/node_modules/es5-ext/test/array/#/slice/shim.js @@ -0,0 +1,17 @@ +"use strict"; + +var SubArray = require("../../../../array/_sub-array-dummy-safe"); + +module.exports = function (t, a) { + var arr, x = {}, subArr, result; + + arr = ["foo", undefined, 0, "2d", false, x, null]; + + a.deep(t.call(arr, 2, 4), [0, "2d"], "Plain array: result"); + + subArr = new SubArray("foo", undefined, 0, "2d", false, x, null); + + result = t.call(subArr, 2, 4); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, [0, "2d"], "Subclass: result"); +}; diff --git a/node_modules/es5-ext/test/array/#/some-right.js b/node_modules/es5-ext/test/array/#/some-right.js new file mode 100644 index 00000000..1e0f407e --- /dev/null +++ b/node_modules/es5-ext/test/array/#/some-right.js @@ -0,0 +1,62 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + var count = 0, first, last, x, icount = this.length; + t.call(this, function (item, index, col) { + ++count; + if (!first) { + first = item; + } + last = item; + x = col; + a(index, --icount, "Index"); + }); + a(count, this.length, "Iterated"); + a(first, this[this.length - 1], "First is last"); + a(last, this[0], "Last is first"); + a.deep(x, Object(this), "Collection as third argument"); // Jslint: skip + }, + "": function (t, a) { + var x = {}, y, count; + t.call( + [1], + function () { + y = this; + }, + x + ); + a(y, x, "Scope"); + y = 0; + t.call([3, 4, 4], function (a, i) { + y += i; + }); + a(y, 3, "Indexes"); + + x = [1, 3]; + x[5] = "x"; + y = 0; + count = 0; + a( + t.call(x, function (a, i) { + ++count; + y += i; + }), + false, + "Return" + ); + a(y, 6, "Misssing Indexes"); + a(count, 3, "Misssing Indexes, count"); + + count = 0; + a( + t.call([-2, -3, -4, 2, -5], function (item) { + ++count; + return item > 0; + }), + true, + "Return" + ); + a(count, 2, "Break after true is returned"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/splice/implement.js b/node_modules/es5-ext/test/array/#/splice/implement.js new file mode 100644 index 00000000..f09257a4 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/splice/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/splice/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/splice/index.js b/node_modules/es5-ext/test/array/#/splice/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/splice/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/splice/is-implemented.js b/node_modules/es5-ext/test/array/#/splice/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/splice/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/splice/shim.js b/node_modules/es5-ext/test/array/#/splice/shim.js new file mode 100644 index 00000000..48020078 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/splice/shim.js @@ -0,0 +1,19 @@ +"use strict"; + +var SubArray = require("../../../../array/_sub-array-dummy-safe"); + +module.exports = function (t, a) { + var arr, x = {}, subArr, result; + + arr = ["foo", undefined, 0, "2d", false, x, null]; + + a.deep(t.call(arr, 2, 2, "bar"), [0, "2d"], "Plain array: result"); + a.deep(arr, ["foo", undefined, "bar", false, x, null], "Plain array: change"); + + subArr = new SubArray("foo", undefined, 0, "2d", false, x, null); + + result = t.call(subArr, 2, 2, "bar"); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, [0, "2d"], "Subclass: result"); + a.deep(subArr, ["foo", undefined, "bar", false, x, null], "Subclass: change"); +}; diff --git a/node_modules/es5-ext/test/array/#/uniq.js b/node_modules/es5-ext/test/array/#/uniq.js new file mode 100644 index 00000000..c7223b26 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/uniq.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = { + "__generic": function (t, a) { + a(t.call(this).length, 3); + }, + "": function (t, a) { + var o, x = {}, y = {}, z = {}, w; + o = [1, 2, x, 3, 1, "raz", "1", y, x, "trzy", z, "raz"]; + + a.not(w = t.call(o), o, "Returns different object"); + a.deep(w, [1, 2, x, 3, "raz", "1", y, "trzy", z], "Result"); + } +}; diff --git a/node_modules/es5-ext/test/array/#/values/implement.js b/node_modules/es5-ext/test/array/#/values/implement.js new file mode 100644 index 00000000..4ba7613a --- /dev/null +++ b/node_modules/es5-ext/test/array/#/values/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../array/#/values/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/#/values/index.js b/node_modules/es5-ext/test/array/#/values/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/values/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/#/values/is-implemented.js b/node_modules/es5-ext/test/array/#/values/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/values/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/#/values/shim.js b/node_modules/es5-ext/test/array/#/values/shim.js new file mode 100644 index 00000000..71b71d58 --- /dev/null +++ b/node_modules/es5-ext/test/array/#/values/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +exports.__generic = function (t, a) { + var iterator = t.call(this); + a.deep(iterator.next(), { value: "1", done: false }); + a.deep(iterator.next(), { value: "2", done: false }); + a.deep(iterator.next(), { value: "3", done: false }); + a.deep(iterator.next(), { value: undefined, done: true }); +}; diff --git a/node_modules/es5-ext/test/array/__scopes.js b/node_modules/es5-ext/test/array/__scopes.js new file mode 100644 index 00000000..bf47389f --- /dev/null +++ b/node_modules/es5-ext/test/array/__scopes.js @@ -0,0 +1,11 @@ +"use strict"; + +exports.Array = ["1", "2", "3"]; + +exports.Arguments = (function () { + return arguments; +}("1", "2", "3")); + +exports.String = "123"; + +exports.Object = { 0: "1", 1: "2", 2: "3", 3: "4", length: 3 }; diff --git a/node_modules/es5-ext/test/array/_is-extensible.js b/node_modules/es5-ext/test/array/_is-extensible.js new file mode 100644 index 00000000..87881863 --- /dev/null +++ b/node_modules/es5-ext/test/array/_is-extensible.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t, "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js b/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js new file mode 100644 index 00000000..6b42f4d1 --- /dev/null +++ b/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js @@ -0,0 +1,7 @@ +"use strict"; + +var isArray = Array.isArray; + +module.exports = function (t) { + t(t === null || isArray(t.prototype), true); +}; diff --git a/node_modules/es5-ext/test/array/_sub-array-dummy.js b/node_modules/es5-ext/test/array/_sub-array-dummy.js new file mode 100644 index 00000000..6b42f4d1 --- /dev/null +++ b/node_modules/es5-ext/test/array/_sub-array-dummy.js @@ -0,0 +1,7 @@ +"use strict"; + +var isArray = Array.isArray; + +module.exports = function (t) { + t(t === null || isArray(t.prototype), true); +}; diff --git a/node_modules/es5-ext/test/array/from/implement.js b/node_modules/es5-ext/test/array/from/implement.js new file mode 100644 index 00000000..2ed3788f --- /dev/null +++ b/node_modules/es5-ext/test/array/from/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../array/from/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/from/index.js b/node_modules/es5-ext/test/array/from/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/from/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/from/is-implemented.js b/node_modules/es5-ext/test/array/from/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/from/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/from/shim.js b/node_modules/es5-ext/test/array/from/shim.js new file mode 100644 index 00000000..17974c4b --- /dev/null +++ b/node_modules/es5-ext/test/array/from/shim.js @@ -0,0 +1,138 @@ +// Some tests taken from: https://github.com/mathiasbynens/Array.from/blob/master/tests/tests.js + +"use strict"; + +module.exports = function (t, a) { + var o = [1, 2, 3], MyType; + a.not(t(o), o, "Array"); + a.deep(t(o), o, "Array: same content"); + a.deep(t("12r3v"), ["1", "2", "r", "3", "v"], "String"); + a.deep( + t( + (function () { + return arguments; + })(3, o, "raz") + ), + [3, o, "raz"], + "Arguments" + ); + a.deep( + t( + (function () { + return arguments; + })(3) + ), + [3], + "Arguments with one numeric value" + ); + + a.deep(t({ 0: "raz", 1: "dwa", length: 2 }), ["raz", "dwa"], "Other"); + + a.deep( + t( + o, + function (val) { + return (val + 2) * 10; + }, + 10 + ), + [30, 40, 50], + "Mapping" + ); + + a.throws( + function () { + t(); + }, + TypeError, + "Undefined" + ); + a.deep(t(3), [], "Primitive"); + + a(t.length, 1, "Length"); + a.deep(t({ length: 0 }), [], "No values Array-like"); + a.deep(t({ length: -1 }), [], "Invalid length Array-like"); + a.deep(t({ length: -Infinity }), [], "Invalid length Array-like #2"); + a.throws( + function () { + t(undefined); + }, + TypeError, + "Undefined" + ); + a.throws( + function () { + t(null); + }, + TypeError, + "Null" + ); + a.deep(t(false), [], "Boolean"); + a.deep(t(-Infinity), [], "Inifity"); + a.deep(t(-0), [], "-0"); + a.deep(t(+0), [], "+0"); + a.deep(t(1), [], "1"); + a.deep(t(Number(Infinity)), [], "+Infinity"); + a.deep(t({}), [], "Plain object"); + a.deep(t({ length: 1 }), [undefined], "Sparse array-like"); + a.deep( + t({ 0: "a", 1: "b", length: 2 }, function (x) { + return x + x; + }), + ["aa", "bb"], + "Map" + ); + a.deep( + t( + { 0: "a", 1: "b", length: 2 }, + function () { + return String(this); + }, + undefined + ), + ["undefined", "undefined"], + "Map context" + ); + a.deep( + t( + { 0: "a", 1: "b", length: 2 }, + function () { + return String(this); + }, + "x" + ), + ["x", "x"], + "Map primitive context" + ); + a.throws( + function () { + t({}, "foo", "x"); + }, + TypeError, + "Non callable for map" + ); + + a.deep(t({ length: 1, 0: "a" }), ["a"], "Null context"); + + a(t({ __proto__: { 0: "abc", length: 1 } })[0], "abc", "Values on prototype"); + + a.throws( + function () { + t.call(function () { + return Object.freeze({}); + }, {}); + }, + TypeError, + "Contructor producing freezed objects" + ); + + // Ensure no setters are called for the indexes + // Ensure no setters are called for the indexes + MyType = function () {}; + Object.defineProperty(MyType.prototype, "0", { + set: function (x) { + throw new Error("Setter called: " + x); + } + }); + a.deep(t.call(MyType, { 0: "abc", length: 1 }), { 0: "abc", length: 1 }, "Defined not set"); +}; diff --git a/node_modules/es5-ext/test/array/generate.js b/node_modules/es5-ext/test/array/generate.js new file mode 100644 index 00000000..efd5f7c8 --- /dev/null +++ b/node_modules/es5-ext/test/array/generate.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}, y = {}; + a.deep(t(3), [undefined, undefined, undefined], "Just length"); + a.deep(t(0, "x"), [], "No repeat"); + a.deep(t(1, x, y), [x], "Arguments length larger than repeat number"); + a.deep(t(3, x), [x, x, x], "Single argument"); + a.deep(t(5, x, y), [x, y, x, y, x], "Many arguments"); +}; diff --git a/node_modules/es5-ext/test/array/is-plain-array.js b/node_modules/es5-ext/test/array/is-plain-array.js new file mode 100644 index 00000000..2cfd50d3 --- /dev/null +++ b/node_modules/es5-ext/test/array/is-plain-array.js @@ -0,0 +1,18 @@ +"use strict"; + +var SubArray = require("../../array/_sub-array-dummy-safe"); + +module.exports = function (t, a) { + var arr = [1, 2, 3]; + a(t(arr), true, "Array"); + a(t(null), false, "Null"); + a(t(), false, "Undefined"); + a(t("234"), false, "String"); + a(t(23), false, "Number"); + a(t({}), false, "Plain object"); + a(t({ length: 1, 0: "raz" }), false, "Array-like"); + a(t(Object.create(arr)), false, "Array extension"); + if (!SubArray) return; + a(t(new SubArray(23)), false, "Subclass instance"); + a(t(Array.prototype), false, "Array.prototype"); +}; diff --git a/node_modules/es5-ext/test/array/of/implement.js b/node_modules/es5-ext/test/array/of/implement.js new file mode 100644 index 00000000..0b1f5c8f --- /dev/null +++ b/node_modules/es5-ext/test/array/of/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../array/of/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/array/of/index.js b/node_modules/es5-ext/test/array/of/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/array/of/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/array/of/is-implemented.js b/node_modules/es5-ext/test/array/of/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/array/of/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/array/of/shim.js b/node_modules/es5-ext/test/array/of/shim.js new file mode 100644 index 00000000..7d18859a --- /dev/null +++ b/node_modules/es5-ext/test/array/of/shim.js @@ -0,0 +1,89 @@ +/* eslint no-useless-call: "off" */ +// Most tests taken from https://github.com/mathiasbynens/Array.of/blob/master/tests/tests.js +// Thanks @mathiasbynens + +"use strict"; + +var defineProperty = Object.defineProperty; + +module.exports = function (t, a) { + var x = {}, testObject, MyType; + + a.deep(t(), [], "No arguments"); + a.deep(t(3), [3], "One numeric argument"); + a.deep(t(3, "raz", null, x, undefined), [3, "raz", null, x, undefined], "Many arguments"); + + a(t.length, 0, "Length"); + + a.deep(t("abc"), ["abc"], "String"); + a.deep(t(undefined), [undefined], "Undefined"); + a.deep(t(null), [null], "Null"); + a.deep(t(false), [false], "Boolean"); + a.deep(t(-Infinity), [-Infinity], "Infinity"); + a.deep(t(-0), [-0], "-0"); + a.deep(t(+0), [+0], "+0"); + a.deep(t(1), [1], "1"); + a.deep(t(1, 2, 3), [1, 2, 3], "Numeric args"); + a.deep(t(Number(Infinity)), [Number(Infinity)], "+Infinity"); + a.deep( + t({ 0: "a", 1: "b", 2: "c", length: 3 }), + [{ 0: "a", 1: "b", 2: "c", length: 3 }], + "Array like" + ); + a.deep( + t(undefined, null, false, -Infinity, -0, +0, 1, 2, Number(Infinity)), + [undefined, null, false, -Infinity, -0, +0, 1, 2, Number(Infinity)], + "Falsy arguments" + ); + + a.h1("Null context"); + a.deep(t.call(null, "abc"), ["abc"], "String"); + a.deep(t.call(null, undefined), [undefined], "Undefined"); + a.deep(t.call(null, null), [null], "Null"); + a.deep(t.call(null, false), [false], "Boolean"); + a.deep(t.call(null, -Infinity), [-Infinity], "-Infinity"); + a.deep(t.call(null, -0), [-0], "-0"); + a.deep(t.call(null, +0), [+0], "+0"); + a.deep(t.call(null, 1), [1], "1"); + a.deep(t.call(null, 1, 2, 3), [1, 2, 3], "Numeric"); + a.deep(t.call(null, Number(Infinity)), [Number(Infinity)], "+Infinity"); + a.deep( + t.call(null, { 0: "a", 1: "b", 2: "c", length: 3 }), + [{ 0: "a", 1: "b", 2: "c", length: 3 }], + "Array-like" + ); + a.deep( + t.call(null, undefined, null, false, -Infinity, -0, +0, 1, 2, Number(Infinity)), + [undefined, null, false, -Infinity, -0, +0, 1, 2, Number(Infinity)], + "Falsy" + ); + + a.h1("Other constructor context"); + a.deep(t.call(Object, 1, 2, 3), { 0: 1, 1: 2, 2: 3, length: 3 }, "Many arguments"); + + testObject = Object(3); + testObject[0] = 1; + testObject[1] = 2; + testObject[2] = 3; + testObject.length = 3; + a.deep(t.call(Object, 1, 2, 3), testObject, "Test object"); + a(t.call(Object).length, 0, "No arguments"); + a.throws( + function () { + t.call(function () { + return Object.freeze({}); + }); + }, + TypeError, + "Frozen instance" + ); + + // Ensure no setters are called for the indexes + MyType = function () {}; + defineProperty(MyType.prototype, "0", { + set: function (x) { + throw new Error("Setter called: " + x); + } + }); + a.deep(t.call(MyType, "abc"), { 0: "abc", length: 1 }, "Define, not set"); +}; diff --git a/node_modules/es5-ext/test/array/to-array.js b/node_modules/es5-ext/test/array/to-array.js new file mode 100644 index 00000000..a1f10a4a --- /dev/null +++ b/node_modules/es5-ext/test/array/to-array.js @@ -0,0 +1,27 @@ +"use strict"; + +module.exports = function (t, a) { + var o = [1, 2, 3]; + a(t(o), o, "Array"); + a.deep(t("12r3v"), ["1", "2", "r", "3", "v"], "String"); + a.deep( + t( + (function () { + return arguments; + })(3, o, "raz") + ), + [3, o, "raz"], + "Arguments" + ); + a.deep( + t( + (function () { + return arguments; + })(3) + ), + [3], + "Arguments with one numeric value" + ); + + a.deep(t({ 0: "raz", 1: "dwa", length: 2 }), ["raz", "dwa"], "Other"); +}; diff --git a/node_modules/es5-ext/test/array/valid-array.js b/node_modules/es5-ext/test/array/valid-array.js new file mode 100644 index 00000000..a3708b22 --- /dev/null +++ b/node_modules/es5-ext/test/array/valid-array.js @@ -0,0 +1,30 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "Null"); + a.throws(function () { + t(0); +}, TypeError, "Number"); + a.throws(function () { + t(true); +}, TypeError, "Boolean"); + a.throws(function () { + t("raz"); +}, TypeError, "String"); + a.throws(function () { + t(function () {}); +}, TypeError, "Function"); + a.throws(function () { + t({}); +}, TypeError, "Object"); + a.throws(function () { + t({ length: 0 }); +}, TypeError, "Array-like"); + a(t(x = []), x, "Array"); +}; diff --git a/node_modules/es5-ext/test/boolean/is-boolean.js b/node_modules/es5-ext/test/boolean/is-boolean.js new file mode 100644 index 00000000..e36b3f34 --- /dev/null +++ b/node_modules/es5-ext/test/boolean/is-boolean.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a(t("arar"), false, "String"); + a(t(12), false, "Number"); + a(t(false), true, "Boolean"); + a(t(new Boolean(false)), true, "Boolean object"); + a(t(new Date()), false, "Date"); + a(t(new String("raz")), false, "String object"); + a(t({}), false, "Plain object"); + a(t(/a/), false, "Regular expression"); +}; diff --git a/node_modules/es5-ext/test/date/#/copy.js b/node_modules/es5-ext/test/date/#/copy.js new file mode 100644 index 00000000..27c996bb --- /dev/null +++ b/node_modules/es5-ext/test/date/#/copy.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + var o = new Date(), o2; + + o2 = t.call(o); + a.not(o, o2, "Different objects"); + a.ok(o2 instanceof Date, "Instance of Date"); + a(o.getTime(), o2.getTime(), "Same time"); +}; diff --git a/node_modules/es5-ext/test/date/#/days-in-month.js b/node_modules/es5-ext/test/date/#/days-in-month.js new file mode 100644 index 00000000..ce2dd775 --- /dev/null +++ b/node_modules/es5-ext/test/date/#/days-in-month.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(new Date(2001, 0, 1)), 31, "January"); + a(t.call(new Date(2001, 1, 1)), 28, "February"); + a(t.call(new Date(2000, 1, 1)), 29, "February (leap)"); + a(t.call(new Date(2001, 2, 1)), 31, "March"); + a(t.call(new Date(2001, 3, 1)), 30, "April"); + a(t.call(new Date(2001, 4, 1)), 31, "May"); + a(t.call(new Date(2001, 5, 1)), 30, "June"); + a(t.call(new Date(2001, 6, 1)), 31, "July"); + a(t.call(new Date(2001, 7, 1)), 31, "August"); + a(t.call(new Date(2001, 8, 1)), 30, "September"); + a(t.call(new Date(2001, 9, 1)), 31, "October"); + a(t.call(new Date(2001, 10, 1)), 30, "November"); + a(t.call(new Date(2001, 11, 1)), 31, "December"); +}; diff --git a/node_modules/es5-ext/test/date/#/floor-day.js b/node_modules/es5-ext/test/date/#/floor-day.js new file mode 100644 index 00000000..fa929d68 --- /dev/null +++ b/node_modules/es5-ext/test/date/#/floor-day.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(new Date(2000, 0, 1, 13, 32, 34, 234)).valueOf(), + new Date(2000, 0, 1).valueOf()); +}; diff --git a/node_modules/es5-ext/test/date/#/floor-month.js b/node_modules/es5-ext/test/date/#/floor-month.js new file mode 100644 index 00000000..1df4ddbe --- /dev/null +++ b/node_modules/es5-ext/test/date/#/floor-month.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(new Date(2000, 0, 15, 13, 32, 34, 234)).valueOf(), + new Date(2000, 0, 1).valueOf()); +}; diff --git a/node_modules/es5-ext/test/date/#/floor-year.js b/node_modules/es5-ext/test/date/#/floor-year.js new file mode 100644 index 00000000..5b78b7dc --- /dev/null +++ b/node_modules/es5-ext/test/date/#/floor-year.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(new Date(2000, 5, 13, 13, 32, 34, 234)).valueOf(), + new Date(2000, 0, 1).valueOf()); +}; diff --git a/node_modules/es5-ext/test/date/#/format.js b/node_modules/es5-ext/test/date/#/format.js new file mode 100644 index 00000000..510b26b4 --- /dev/null +++ b/node_modules/es5-ext/test/date/#/format.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + var dt = new Date(2011, 2, 3, 3, 5, 5, 32); + a(t.call(dt, " %Y.%y.%m.%d.%H.%M.%S.%L "), " 2011.11.03.03.03.05.05.032 "); +}; diff --git a/node_modules/es5-ext/test/date/ensure-time-value.js b/node_modules/es5-ext/test/date/ensure-time-value.js new file mode 100644 index 00000000..39ddc23c --- /dev/null +++ b/node_modules/es5-ext/test/date/ensure-time-value.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(12), 12, "Number in range"); + a(t(12.23), 12, "Rounds number in range"); + a(t(-12.63), -12, "Rounds negative number in range"); + a.throws( + function () { + t(NaN); + }, + TypeError, + "Throws on invalid" + ); +}; diff --git a/node_modules/es5-ext/test/date/is-date.js b/node_modules/es5-ext/test/date/is-date.js new file mode 100644 index 00000000..90ae8ad7 --- /dev/null +++ b/node_modules/es5-ext/test/date/is-date.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t("arar"), false, "String"); + a(t(12), false, "Number"); + a(t(true), false, "Boolean"); + a(t(new Date()), true, "Date"); + a(t(new String("raz")), false, "String object"); + a(t({}), false, "Plain object"); +}; diff --git a/node_modules/es5-ext/test/date/is-time-value.js b/node_modules/es5-ext/test/date/is-time-value.js new file mode 100644 index 00000000..a21677c0 --- /dev/null +++ b/node_modules/es5-ext/test/date/is-time-value.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function (t, a) { + a(t("arar"), false, "String"); + a(t(12), true, "Number in range"); + a(t(true), true, "Boolean"); + a(t(new Date()), true, "Date"); + a(t({}), false, "Plain object"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); + a(t(8.64e17), false, "Beyond range"); + a(t(8.64e15), true, "Below range"); + a(t(-8.64e17), false, "Negative beyond range"); + a(t(-8.64e15), true, "Negative below range"); +}; diff --git a/node_modules/es5-ext/test/date/valid-date.js b/node_modules/es5-ext/test/date/valid-date.js new file mode 100644 index 00000000..2856cb6a --- /dev/null +++ b/node_modules/es5-ext/test/date/valid-date.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + var d = new Date(); + a(t(d), d, "Date"); + a.throws(function () { + t({}); + }, "Object"); + a.throws(function () { + t({ valueOf: function () { + return 20; +} }); + }, "Number object"); +}; diff --git a/node_modules/es5-ext/test/error/#/throw.js b/node_modules/es5-ext/test/error/#/throw.js new file mode 100644 index 00000000..8c5d04ee --- /dev/null +++ b/node_modules/es5-ext/test/error/#/throw.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + var e = new Error(); + try { + t.call(e); + } catch (e2) { + a(e2, e); + } +}; diff --git a/node_modules/es5-ext/test/error/custom.js b/node_modules/es5-ext/test/error/custom.js new file mode 100644 index 00000000..ca35c766 --- /dev/null +++ b/node_modules/es5-ext/test/error/custom.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + var T = t, err = new T("My Error", "MY_ERROR", { errno: 123 }); + a(err instanceof Error, true, "Instance of error"); + a(err.constructor, Error, "Constructor"); + a(err.name, "Error", "Name"); + a(String(err), "Error: My Error", "String representation"); + a(err.code, "MY_ERROR", "Code"); + a(err.errno, 123, "Errno"); + a(typeof err.stack, "string", "Stack trace"); +}; diff --git a/node_modules/es5-ext/test/error/is-error.js b/node_modules/es5-ext/test/error/is-error.js new file mode 100644 index 00000000..423c7359 --- /dev/null +++ b/node_modules/es5-ext/test/error/is-error.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(), false, "Undefined"); + a(t(1), false, "Primitive"); + a(t({}), false, "Objectt"); + a(t({ toString: function () { + return "[object Error]"; +} }), false, + "Fake error"); + a(t(new Error()), true, "Error"); + a(t(new EvalError()), true, "EvalError"); + a(t(new RangeError()), true, "RangeError"); + a(t(new ReferenceError()), true, "ReferenceError"); + a(t(new SyntaxError()), true, "SyntaxError"); + a(t(new TypeError()), true, "TypeError"); + a(t(new URIError()), true, "URIError"); +}; diff --git a/node_modules/es5-ext/test/error/valid-error.js b/node_modules/es5-ext/test/error/valid-error.js new file mode 100644 index 00000000..7d032bf2 --- /dev/null +++ b/node_modules/es5-ext/test/error/valid-error.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + var e = new Error(); + a(t(e), e, "Error"); + a.throws(function () { + t({}); + }, "Other"); +}; diff --git a/node_modules/es5-ext/test/function/#/compose.js b/node_modules/es5-ext/test/function/#/compose.js new file mode 100644 index 00000000..b90a2169 --- /dev/null +++ b/node_modules/es5-ext/test/function/#/compose.js @@ -0,0 +1,10 @@ +"use strict"; + +var f = function (a, b) { return ["a", arguments.length, a, b]; } + , g = function (a) { return ["b", arguments.length].concat(a); } + , h = function (a) { return ["c", arguments.length].concat(a); }; + +module.exports = function (t, a) { + a.deep(t.call(h, g, f)(1, 2), ["c", 1, "b", 1, "a", 2, 1, 2]); + a.deep(t(h, g, f)(1, 2), ["c", 1, "b", 1, "a", 2, 1, 2]); +}; diff --git a/node_modules/es5-ext/test/function/#/copy.js b/node_modules/es5-ext/test/function/#/copy.js new file mode 100644 index 00000000..e7988ce7 --- /dev/null +++ b/node_modules/es5-ext/test/function/#/copy.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = function (t, a) { + var foo = "raz", bar = "dwa"; + // eslint-disable-next-line func-names + var fn = function marko(a, b) { + return this + a + b + foo + bar; + }; + var result, o = {}; + + fn.prototype = o; + + fn.foo = "raz"; + + result = t.call(fn); + + a(result.length, fn.length, "Length"); + a(result.name, fn.name, "Length"); + a(result.call("marko", "el", "fe"), "markoelferazdwa", "Body"); + a(result.prototype, fn.prototype, "Prototype"); + a(result.foo, fn.foo, "Custom property"); +}; diff --git a/node_modules/es5-ext/test/function/#/curry.js b/node_modules/es5-ext/test/function/#/curry.js new file mode 100644 index 00000000..c30313a0 --- /dev/null +++ b/node_modules/es5-ext/test/function/#/curry.js @@ -0,0 +1,20 @@ +"use strict"; + +var toArray = require("../../../array/to-array") + + , f = function () { + return toArray(arguments); +}; + +module.exports = function (t, a) { + var x, y = {}, z; + a.deep(t.call(f, 0, 1, 2)(3), [], "0 arguments"); + x = t.call(f, 5, {}); + a(x.length, 5, "Length #1"); + z = x(1, 2); + a(z.length, 3, "Length #2"); + z = z(3, 4); + a(z.length, 1, "Length #1"); + a.deep(z(5, 6), [1, 2, 3, 4, 5], "Many arguments"); + a.deep(x(8, 3)(y, 45)("raz", 6), [8, 3, y, 45, "raz"], "Many arguments #2"); +}; diff --git a/node_modules/es5-ext/test/function/#/lock.js b/node_modules/es5-ext/test/function/#/lock.js new file mode 100644 index 00000000..08ea9505 --- /dev/null +++ b/node_modules/es5-ext/test/function/#/lock.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(function () { + return arguments.length; + })(1, 2, 3), 0); +}; diff --git a/node_modules/es5-ext/test/function/#/microtask-delay.js b/node_modules/es5-ext/test/function/#/microtask-delay.js new file mode 100644 index 00000000..8bd0dc12 --- /dev/null +++ b/node_modules/es5-ext/test/function/#/microtask-delay.js @@ -0,0 +1,22 @@ +"use strict"; + +var nextTick = require("next-tick"); + +module.exports = function (t, a, d) { + var wasInvoked = false, args = [{}, {}], context = {}; + var target = t.call(function () { + a(this, context); + a.deep(arguments, args); + wasInvoked = true; + }); + + nextTick(function () { + a(wasInvoked, false); + target.apply(context, args); + a(wasInvoked, false); + nextTick(function () { + a(wasInvoked, true); + d(); + }); + }); +}; diff --git a/node_modules/es5-ext/test/function/#/not.js b/node_modules/es5-ext/test/function/#/not.js new file mode 100644 index 00000000..64fff715 --- /dev/null +++ b/node_modules/es5-ext/test/function/#/not.js @@ -0,0 +1,11 @@ +"use strict"; + +var identity = require("../../../function/identity") + , noop = require("../../../function/noop"); + +module.exports = function (t, a) { + a(t.call(identity)(""), true, "Falsy"); + a(t.call(noop)(), true, "Undefined"); + a(t.call(identity)({}), false, "Any object"); + a(t.call(identity)(true), false, "True"); +}; diff --git a/node_modules/es5-ext/test/function/#/partial.js b/node_modules/es5-ext/test/function/#/partial.js new file mode 100644 index 00000000..7e9428fa --- /dev/null +++ b/node_modules/es5-ext/test/function/#/partial.js @@ -0,0 +1,11 @@ +"use strict"; + +var toArray = require("../../../array/to-array") + + , f = function () { + return toArray(arguments); +}; + +module.exports = function (t, a) { + a.deep(t.call(f, 1)(2, 3), [1, 2, 3]); +}; diff --git a/node_modules/es5-ext/test/function/#/spread.js b/node_modules/es5-ext/test/function/#/spread.js new file mode 100644 index 00000000..d082fcab --- /dev/null +++ b/node_modules/es5-ext/test/function/#/spread.js @@ -0,0 +1,10 @@ +"use strict"; + +var f = function (a, b) { + return this[a] + this[b]; +} + , o = { a: 3, b: 4 }; + +module.exports = function (t, a) { + a(t.call(f).call(o, ["a", "b"]), 7); +}; diff --git a/node_modules/es5-ext/test/function/#/to-string-tokens.js b/node_modules/es5-ext/test/function/#/to-string-tokens.js new file mode 100644 index 00000000..0691cc39 --- /dev/null +++ b/node_modules/es5-ext/test/function/#/to-string-tokens.js @@ -0,0 +1,33 @@ +/* eslint no-eval: "off" */ + +"use strict"; + +module.exports = function (t, a) { + a.deep( + t.call(function (a, b) { + return this[a] + this[b]; + }), + { args: "a, b", body: "\n\t\t\treturn this[a] + this[b];\n\t\t" } + ); + a.deep(t.call(function () {}), { args: "", body: "" }); + // eslint-disable-next-line no-unused-vars + a.deep(t.call(function (raz) {}), { args: "raz", body: "" }); + a.deep( + t.call(function () { + Object(); + }), + { args: "", body: "\n\t\t\tObject();\n\t\t" } + ); + + try { + eval("(() => {})"); + } catch (e) { + // Non ES2015 env + return; + } + + a.deep(t.call(eval("(() => {})")), { args: "", body: "" }); + a.deep(t.call(eval("((elo) => foo)")), { args: "elo", body: "foo" }); + a.deep(t.call(eval("(elo => foo)")), { args: "elo", body: "foo" }); + a.deep(t.call(eval("((elo, bar) => foo())")), { args: "elo, bar", body: "foo()" }); +}; diff --git a/node_modules/es5-ext/test/function/_define-length.js b/node_modules/es5-ext/test/function/_define-length.js new file mode 100644 index 00000000..324e273c --- /dev/null +++ b/node_modules/es5-ext/test/function/_define-length.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + var foo = "raz", bar = "dwa" + , fn = function (a, b) { + return this + a + b + foo + bar; +} + , result; + + result = t(fn, 3); + a(result.call("marko", "el", "fe"), "markoelferazdwa", "Content"); + a(result.length, 3, "Length"); + a(result.prototype, fn.prototype, "Prototype"); +}; diff --git a/node_modules/es5-ext/test/function/constant.js b/node_modules/es5-ext/test/function/constant.js new file mode 100644 index 00000000..4ba2d898 --- /dev/null +++ b/node_modules/es5-ext/test/function/constant.js @@ -0,0 +1,7 @@ +"use strict"; + +var o = {}; + +module.exports = function (t, a) { + a(t(o)(), o); +}; diff --git a/node_modules/es5-ext/test/function/identity.js b/node_modules/es5-ext/test/function/identity.js new file mode 100644 index 00000000..a5b0b1bc --- /dev/null +++ b/node_modules/es5-ext/test/function/identity.js @@ -0,0 +1,7 @@ +"use strict"; + +var o = {}; + +module.exports = function (t, a) { + a(t(o), o); +}; diff --git a/node_modules/es5-ext/test/function/invoke.js b/node_modules/es5-ext/test/function/invoke.js new file mode 100644 index 00000000..6268f47e --- /dev/null +++ b/node_modules/es5-ext/test/function/invoke.js @@ -0,0 +1,9 @@ +"use strict"; + +var constant = require("../../function/constant") + + , o = { b: constant("c") }; + +module.exports = function (t, a) { + a(t("b")(o), "c"); +}; diff --git a/node_modules/es5-ext/test/function/is-arguments.js b/node_modules/es5-ext/test/function/is-arguments.js new file mode 100644 index 00000000..5bd54ac7 --- /dev/null +++ b/node_modules/es5-ext/test/function/is-arguments.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + var args, dummy; + args = (function () { + return arguments; +}()); + dummy = { 0: 1, 1: 2 }; + Object.defineProperty(dummy, "length", { value: 2 }); + a(t(args), true, "Arguments"); + a(t(dummy), false, "Dummy"); + a(t([]), false, "Array"); +}; diff --git a/node_modules/es5-ext/test/function/is-function.js b/node_modules/es5-ext/test/function/is-function.js new file mode 100644 index 00000000..fe897985 --- /dev/null +++ b/node_modules/es5-ext/test/function/is-function.js @@ -0,0 +1,8 @@ +"use strict"; + +var o = { call: Function.prototype.call, apply: Function.prototype.apply }; + +module.exports = function (t, a) { + a(t(function () {}), true, "Function is function"); + a(t(o), false, "Plain object is not function"); +}; diff --git a/node_modules/es5-ext/test/function/noop.js b/node_modules/es5-ext/test/function/noop.js new file mode 100644 index 00000000..34de85ab --- /dev/null +++ b/node_modules/es5-ext/test/function/noop.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(1, 2, 3), "undefined"); +}; diff --git a/node_modules/es5-ext/test/function/pluck.js b/node_modules/es5-ext/test/function/pluck.js new file mode 100644 index 00000000..f8954c59 --- /dev/null +++ b/node_modules/es5-ext/test/function/pluck.js @@ -0,0 +1,7 @@ +"use strict"; + +var o = { foo: "bar" }; + +module.exports = function (t, a) { + a(t("foo")(o), o.foo); +}; diff --git a/node_modules/es5-ext/test/function/valid-function.js b/node_modules/es5-ext/test/function/valid-function.js new file mode 100644 index 00000000..30c03608 --- /dev/null +++ b/node_modules/es5-ext/test/function/valid-function.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = function (t, a) { + var f = function () {}; + a(t(f), f, "Function"); + // eslint-disable-next-line no-new-func + f = new Function(); + a(t(f), f, "Function"); + a.throws(function () { + t({}); + }, "Object"); + a.throws(function () { + t(/re/); + }, "RegExp"); + a.throws(function () { + t({ + call: function () { + return 20; + } + }); + }, "Plain object"); +}; diff --git a/node_modules/es5-ext/test/global.js b/node_modules/es5-ext/test/global.js new file mode 100644 index 00000000..b29fbbb1 --- /dev/null +++ b/node_modules/es5-ext/test/global.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a.ok(t && typeof t === "object"); + a(typeof t.Array, "function"); + a("__global__" in Object.prototype, false); +}; diff --git a/node_modules/es5-ext/test/iterable/for-each.js b/node_modules/es5-ext/test/iterable/for-each.js new file mode 100644 index 00000000..d6c3872a --- /dev/null +++ b/node_modules/es5-ext/test/iterable/for-each.js @@ -0,0 +1,42 @@ +"use strict"; + +var ArrayIterator = require("es6-iterator/array") + + , slice = Array.prototype.slice; + +module.exports = function (t, a) { + var i = 0, x = ["raz", "dwa", "trzy"], y = {}; + t(x, function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#"); + a(this, y, "Array: context: " + i++ + "#"); + }, y); + i = 0; + t((function () { + return arguments; +}("raz", "dwa", "trzy")), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Arguments" + i + "#"); + a(this, y, "Arguments: context: " + i++ + "#"); + }, y); + i = 0; + t({ 0: "raz", 1: "dwa", 2: "trzy", length: 3 }, function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Array-like" + i + "#"); + a(this, y, "Array-like: context: " + i++ + "#"); + }, y); + i = 0; + t(x = "foo", function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Regular String: context: " + i++ + "#"); + }, y); + i = 0; + x = ["r", "💩", "z"]; + t("r💩z", function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Unicode String: context: " + i++ + "#"); + }, y); + i = 0; + t(new ArrayIterator(x), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#"); + a(this, y, "Iterator: context: " + i++ + "#"); + }, y); + +}; diff --git a/node_modules/es5-ext/test/iterable/is.js b/node_modules/es5-ext/test/iterable/is.js new file mode 100644 index 00000000..04d34a83 --- /dev/null +++ b/node_modules/es5-ext/test/iterable/is.js @@ -0,0 +1,28 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (t, a) { + var x; + a(t([]), true, "Array"); + a(t(""), true, "String"); + a( + t( + (function () { + return arguments; + })() + ), + true, + "Arguments" + ); + a(t({ length: 0 }), true, "List object"); + a(t(function () {}), false, "Function"); + a(t({}), false, "Plain object"); + a(t(/raz/), false, "Regexp"); + a(t(), false, "No argument"); + a(t(null), false, "Null"); + a(t(undefined), false, "Undefined"); + x = {}; + x[iteratorSymbol] = function () {}; + a(t(x), true, "Iterable"); +}; diff --git a/node_modules/es5-ext/test/iterable/validate-object.js b/node_modules/es5-ext/test/iterable/validate-object.js new file mode 100644 index 00000000..83a9ca15 --- /dev/null +++ b/node_modules/es5-ext/test/iterable/validate-object.js @@ -0,0 +1,34 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (t, a) { + var x; + a.throws(function () { + t(0); +}, TypeError, "0"); + a.throws(function () { + t(false); +}, TypeError, "false"); + a.throws(function () { + t(""); +}, TypeError, "String"); + a.throws(function () { + t({}); +}, TypeError, "Plain Object"); + a.throws(function () { + t(function () {}); +}, TypeError, "Function"); + a(t(x = new String("raz")), x, "String object"); // Jslint: ignore + + a(t(x = { length: 1 }), x, "Array like"); + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "null"); + x = {}; + x[iteratorSymbol] = function () {}; + a(t(x), x, "Iterable"); +}; diff --git a/node_modules/es5-ext/test/iterable/validate.js b/node_modules/es5-ext/test/iterable/validate.js new file mode 100644 index 00000000..61cab5d3 --- /dev/null +++ b/node_modules/es5-ext/test/iterable/validate.js @@ -0,0 +1,32 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (t, a) { + var x; + a.throws(function () { + t(0); +}, TypeError, "0"); + a.throws(function () { + t(false); +}, TypeError, "false"); + a(t(""), "", "''"); + a.throws(function () { + t({}); +}, TypeError, "Plain Object"); + a.throws(function () { + t(function () {}); +}, TypeError, "Function"); + a(t(x = new String("raz")), x, "String object"); // Jslint: ignore + + a(t(x = { length: 1 }), x, "Array like"); + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "null"); + x = {}; + x[iteratorSymbol] = function () {}; + a(t(x), x, "Iterable"); +}; diff --git a/node_modules/es5-ext/test/json/safe-stringify.js b/node_modules/es5-ext/test/json/safe-stringify.js new file mode 100644 index 00000000..2d13f3de --- /dev/null +++ b/node_modules/es5-ext/test/json/safe-stringify.js @@ -0,0 +1,26 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({ foo: "bar" }), JSON.stringify({ foo: "bar" })); + a(t({ foo: { elo: 12 } }), "{\"foo\":{\"elo\":12}}"); + a(t({ foo: { elo: 12, +mel: { + toJSON: function () { + throw new Error("Nu nu!"); +} + } } }), "{\"foo\":{\"elo\":12}}"); + a(t({ foo: { elo: 12 }, +mel: { + toJSON: function () { + throw new Error("Nu nu!"); +} + } }), "{\"foo\":{\"elo\":12}}"); + a(t({ foo: { elo: 12 }, +mel: [ +"raz", { + toJSON: function () { + throw new Error("Nu nu!"); +} + }, 0, 2 +] }), "{\"foo\":{\"elo\":12},\"mel\":[\"raz\",0,2]}"); +}; diff --git a/node_modules/es5-ext/test/math/_decimal-adjust.js b/node_modules/es5-ext/test/math/_decimal-adjust.js new file mode 100644 index 00000000..6da15ecf --- /dev/null +++ b/node_modules/es5-ext/test/math/_decimal-adjust.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + // Just sanity check, as real tests are in 'round', 'ceil' and 'floor' variants + a(t("round")(55.55, -1), 55.6); +}; diff --git a/node_modules/es5-ext/test/math/_pack-ieee754.js b/node_modules/es5-ext/test/math/_pack-ieee754.js new file mode 100644 index 00000000..7e56f7f2 --- /dev/null +++ b/node_modules/es5-ext/test/math/_pack-ieee754.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t(1.337, 8, 23), [63, 171, 34, 209]); +}; diff --git a/node_modules/es5-ext/test/math/_unpack-ieee754.js b/node_modules/es5-ext/test/math/_unpack-ieee754.js new file mode 100644 index 00000000..52730f38 --- /dev/null +++ b/node_modules/es5-ext/test/math/_unpack-ieee754.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t([63, 171, 34, 209], 8, 23), 1.3370000123977661); +}; diff --git a/node_modules/es5-ext/test/math/acosh/implement.js b/node_modules/es5-ext/test/math/acosh/implement.js new file mode 100644 index 00000000..d7bcc28a --- /dev/null +++ b/node_modules/es5-ext/test/math/acosh/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/acosh/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/acosh/index.js b/node_modules/es5-ext/test/math/acosh/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/acosh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/acosh/is-implemented.js b/node_modules/es5-ext/test/math/acosh/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/acosh/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/acosh/shim.js b/node_modules/es5-ext/test/math/acosh/shim.js new file mode 100644 index 00000000..17ac1819 --- /dev/null +++ b/node_modules/es5-ext/test/math/acosh/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-1), NaN, "Negative"); + a(t(0), NaN, "Zero"); + a(t(0.5), NaN, "Below 1"); + a(t(1), 0, "1"); + a(t(2), 1.3169578969248166, "Other"); + a(t(Infinity), Infinity, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/math/asinh/implement.js b/node_modules/es5-ext/test/math/asinh/implement.js new file mode 100644 index 00000000..ab4b9691 --- /dev/null +++ b/node_modules/es5-ext/test/math/asinh/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/asinh/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/asinh/index.js b/node_modules/es5-ext/test/math/asinh/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/asinh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/asinh/is-implemented.js b/node_modules/es5-ext/test/math/asinh/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/asinh/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/asinh/shim.js b/node_modules/es5-ext/test/math/asinh/shim.js new file mode 100644 index 00000000..a4328d2e --- /dev/null +++ b/node_modules/es5-ext/test/math/asinh/shim.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(t(-2), -1.4436354751788103, "Negative"); + a(t(2), 1.4436354751788103, "Positive"); +}; diff --git a/node_modules/es5-ext/test/math/atanh/implement.js b/node_modules/es5-ext/test/math/atanh/implement.js new file mode 100644 index 00000000..bcd3bd87 --- /dev/null +++ b/node_modules/es5-ext/test/math/atanh/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/atanh/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/atanh/index.js b/node_modules/es5-ext/test/math/atanh/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/atanh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/atanh/is-implemented.js b/node_modules/es5-ext/test/math/atanh/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/atanh/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/atanh/shim.js b/node_modules/es5-ext/test/math/atanh/shim.js new file mode 100644 index 00000000..f58709cc --- /dev/null +++ b/node_modules/es5-ext/test/math/atanh/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-2), NaN, "Less than -1"); + a(t(2), NaN, "Greater than 1"); + a(t(-1), -Infinity, "-1"); + a(t(1), Infinity, "1"); + a(t(0), 0, "Zero"); + a(Math.round(t(0.5) * 1e15), 549306144334055, "Other"); +}; diff --git a/node_modules/es5-ext/test/math/cbrt/implement.js b/node_modules/es5-ext/test/math/cbrt/implement.js new file mode 100644 index 00000000..132e9296 --- /dev/null +++ b/node_modules/es5-ext/test/math/cbrt/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/cbrt/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/cbrt/index.js b/node_modules/es5-ext/test/math/cbrt/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/cbrt/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/cbrt/is-implemented.js b/node_modules/es5-ext/test/math/cbrt/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/cbrt/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/cbrt/shim.js b/node_modules/es5-ext/test/math/cbrt/shim.js new file mode 100644 index 00000000..fc1beee4 --- /dev/null +++ b/node_modules/es5-ext/test/math/cbrt/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(t(-1), -1, "-1"); + a(t(1), 1, "1"); + a(t(2), 1.2599210498948732, "Ohter"); +}; diff --git a/node_modules/es5-ext/test/math/ceil-10.js b/node_modules/es5-ext/test/math/ceil-10.js new file mode 100644 index 00000000..1c4a3866 --- /dev/null +++ b/node_modules/es5-ext/test/math/ceil-10.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(55.51, -1), 55.6); + a(t(51, 1), 60); + a(t(-55.59, -1), -55.5); + a(t(-59, 1), -50); +}; diff --git a/node_modules/es5-ext/test/math/clz32/implement.js b/node_modules/es5-ext/test/math/clz32/implement.js new file mode 100644 index 00000000..36f529f1 --- /dev/null +++ b/node_modules/es5-ext/test/math/clz32/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/clz32/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/clz32/index.js b/node_modules/es5-ext/test/math/clz32/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/clz32/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/clz32/is-implemented.js b/node_modules/es5-ext/test/math/clz32/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/clz32/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/clz32/shim.js b/node_modules/es5-ext/test/math/clz32/shim.js new file mode 100644 index 00000000..4d8dd2fa --- /dev/null +++ b/node_modules/es5-ext/test/math/clz32/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(1), 31, "1"); + a(t(1000), 22, "1000"); + a(t(), 32, "No arguments"); + a(t(Infinity), 32, "Infinity"); + a(t(-Infinity), 32, "-Infinity"); + a(t("foo"), 32, "String"); + a(t(true), 31, "Boolean"); + a(t(3.5), 30, "Float"); +}; diff --git a/node_modules/es5-ext/test/math/cosh/implement.js b/node_modules/es5-ext/test/math/cosh/implement.js new file mode 100644 index 00000000..6ad42efb --- /dev/null +++ b/node_modules/es5-ext/test/math/cosh/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/cosh/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/cosh/index.js b/node_modules/es5-ext/test/math/cosh/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/cosh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/cosh/is-implemented.js b/node_modules/es5-ext/test/math/cosh/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/cosh/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/cosh/shim.js b/node_modules/es5-ext/test/math/cosh/shim.js new file mode 100644 index 00000000..0b917c70 --- /dev/null +++ b/node_modules/es5-ext/test/math/cosh/shim.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 1, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), Infinity, "-Infinity"); + a(t(1), 1.5430806348152437, "1"); + a(t(Number.MAX_VALUE), Infinity); + a(t(-Number.MAX_VALUE), Infinity); + a(t(Number.MIN_VALUE), 1); + a(t(-Number.MIN_VALUE), 1); +}; diff --git a/node_modules/es5-ext/test/math/expm1/implement.js b/node_modules/es5-ext/test/math/expm1/implement.js new file mode 100644 index 00000000..7fb528a3 --- /dev/null +++ b/node_modules/es5-ext/test/math/expm1/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/expm1/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/expm1/index.js b/node_modules/es5-ext/test/math/expm1/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/expm1/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/expm1/is-implemented.js b/node_modules/es5-ext/test/math/expm1/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/expm1/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/expm1/shim.js b/node_modules/es5-ext/test/math/expm1/shim.js new file mode 100644 index 00000000..cebb063c --- /dev/null +++ b/node_modules/es5-ext/test/math/expm1/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -1, "-Infinity"); + a(t(1).toFixed(15), "1.718281828459045", "1"); +}; diff --git a/node_modules/es5-ext/test/math/floor-10.js b/node_modules/es5-ext/test/math/floor-10.js new file mode 100644 index 00000000..a086d80f --- /dev/null +++ b/node_modules/es5-ext/test/math/floor-10.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(55.59, -1), 55.5); + a(t(59, 1), 50); + a(t(-55.51, -1), -55.6); + a(t(-51, 1), -60); +}; diff --git a/node_modules/es5-ext/test/math/fround/implement.js b/node_modules/es5-ext/test/math/fround/implement.js new file mode 100644 index 00000000..c7b9ad4a --- /dev/null +++ b/node_modules/es5-ext/test/math/fround/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/fround/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/fround/index.js b/node_modules/es5-ext/test/math/fround/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/fround/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/fround/is-implemented.js b/node_modules/es5-ext/test/math/fround/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/fround/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/fround/shim.js b/node_modules/es5-ext/test/math/fround/shim.js new file mode 100644 index 00000000..0525bfab --- /dev/null +++ b/node_modules/es5-ext/test/math/fround/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(t(1.337), 1.3370000123977661, "1"); +}; diff --git a/node_modules/es5-ext/test/math/hypot/implement.js b/node_modules/es5-ext/test/math/hypot/implement.js new file mode 100644 index 00000000..29c87fe9 --- /dev/null +++ b/node_modules/es5-ext/test/math/hypot/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/hypot/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/hypot/index.js b/node_modules/es5-ext/test/math/hypot/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/hypot/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/hypot/is-implemented.js b/node_modules/es5-ext/test/math/hypot/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/hypot/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/hypot/shim.js b/node_modules/es5-ext/test/math/hypot/shim.js new file mode 100644 index 00000000..89e4657c --- /dev/null +++ b/node_modules/es5-ext/test/math/hypot/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(), 0, "No arguments"); + a(t(0, -0, 0), 0, "Zeros"); + a(t(4, NaN, Infinity), Infinity, "Infinity"); + a(t(4, NaN, -Infinity), Infinity, "Infinity"); + a(t(4, NaN, 34), NaN, "NaN"); + a(t(3, 4), 5, "#1"); + a(t(3, 4, 5), 7.0710678118654755, "#2"); +}; diff --git a/node_modules/es5-ext/test/math/imul/implement.js b/node_modules/es5-ext/test/math/imul/implement.js new file mode 100644 index 00000000..b633a72b --- /dev/null +++ b/node_modules/es5-ext/test/math/imul/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/imul/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/imul/index.js b/node_modules/es5-ext/test/math/imul/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/imul/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/imul/is-implemented.js b/node_modules/es5-ext/test/math/imul/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/imul/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/imul/shim.js b/node_modules/es5-ext/test/math/imul/shim.js new file mode 100644 index 00000000..a8d4e906 --- /dev/null +++ b/node_modules/es5-ext/test/math/imul/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(), 0, "No arguments"); + a(t(0, 0), 0, "Zeros"); + a(t(2, 4), 8, "#1"); + a(t(-1, 8), -8, "#2"); + a(t(0xfffffffe, 5), -10, "#3"); +}; diff --git a/node_modules/es5-ext/test/math/log10/implement.js b/node_modules/es5-ext/test/math/log10/implement.js new file mode 100644 index 00000000..afc9dab1 --- /dev/null +++ b/node_modules/es5-ext/test/math/log10/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/log10/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/log10/index.js b/node_modules/es5-ext/test/math/log10/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/log10/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/log10/is-implemented.js b/node_modules/es5-ext/test/math/log10/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/log10/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/log10/shim.js b/node_modules/es5-ext/test/math/log10/shim.js new file mode 100644 index 00000000..d0696287 --- /dev/null +++ b/node_modules/es5-ext/test/math/log10/shim.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-0.5), NaN, "Less than 0"); + a(t(0), -Infinity, "0"); + a(t(1), 0, "1"); + a(t(Infinity), Infinity, "Infinity"); + a(t(2), 0.3010299956639812, "Other"); +}; diff --git a/node_modules/es5-ext/test/math/log1p/implement.js b/node_modules/es5-ext/test/math/log1p/implement.js new file mode 100644 index 00000000..baa2ab15 --- /dev/null +++ b/node_modules/es5-ext/test/math/log1p/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/log1p/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/log1p/index.js b/node_modules/es5-ext/test/math/log1p/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/log1p/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/log1p/is-implemented.js b/node_modules/es5-ext/test/math/log1p/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/log1p/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/log1p/shim.js b/node_modules/es5-ext/test/math/log1p/shim.js new file mode 100644 index 00000000..66b400cc --- /dev/null +++ b/node_modules/es5-ext/test/math/log1p/shim.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-1.5), NaN, "Less than -1"); + a(t(-1), -Infinity, "-1"); + a(t(0), 0, "0"); + a(t(Infinity), Infinity, "Infinity"); + a(t(1), 0.6931471805599453, "Other"); +}; diff --git a/node_modules/es5-ext/test/math/log2/implement.js b/node_modules/es5-ext/test/math/log2/implement.js new file mode 100644 index 00000000..43bdf436 --- /dev/null +++ b/node_modules/es5-ext/test/math/log2/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/log2/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/log2/index.js b/node_modules/es5-ext/test/math/log2/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/log2/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/log2/is-implemented.js b/node_modules/es5-ext/test/math/log2/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/log2/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/log2/shim.js b/node_modules/es5-ext/test/math/log2/shim.js new file mode 100644 index 00000000..f587e339 --- /dev/null +++ b/node_modules/es5-ext/test/math/log2/shim.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-0.5), NaN, "Less than 0"); + a(t(0), -Infinity, "0"); + a(t(1), 0, "1"); + a(t(Infinity), Infinity, "Infinity"); + a(t(3).toFixed(15), "1.584962500721156", "Other"); +}; diff --git a/node_modules/es5-ext/test/math/round-10.js b/node_modules/es5-ext/test/math/round-10.js new file mode 100644 index 00000000..c7ae38c4 --- /dev/null +++ b/node_modules/es5-ext/test/math/round-10.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(55.55, -1), 55.6); + a(t(55.549, -1), 55.5); + a(t(55, 1), 60); + a(t(54.9, 1), 50); + a(t(-55.55, -1), -55.5); + a(t(-55.551, -1), -55.6); + a(t(-55, 1), -50); + a(t(-55.1, 1), -60); + a(t(1.005, -2), 1.01); + a(t(-1.005, -2), -1.0); +}; diff --git a/node_modules/es5-ext/test/math/sign/implement.js b/node_modules/es5-ext/test/math/sign/implement.js new file mode 100644 index 00000000..409beb1f --- /dev/null +++ b/node_modules/es5-ext/test/math/sign/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/sign/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/sign/index.js b/node_modules/es5-ext/test/math/sign/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/sign/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/sign/is-implemented.js b/node_modules/es5-ext/test/math/sign/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/sign/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/sign/shim.js b/node_modules/es5-ext/test/math/sign/shim.js new file mode 100644 index 00000000..071ea07e --- /dev/null +++ b/node_modules/es5-ext/test/math/sign/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +var is = require("../../../object/is"); + +module.exports = function (t, a) { + a(is(t(0), +0), true, "+0"); + a(is(t(-0), -0), true, "-0"); + a(t({}), NaN, true, "NaN"); + a(t(-234234234), -1, "Negative"); + a(t(234234234), 1, "Positive"); +}; diff --git a/node_modules/es5-ext/test/math/sinh/implement.js b/node_modules/es5-ext/test/math/sinh/implement.js new file mode 100644 index 00000000..ca4b5e7b --- /dev/null +++ b/node_modules/es5-ext/test/math/sinh/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/sinh/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/sinh/index.js b/node_modules/es5-ext/test/math/sinh/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/sinh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/sinh/is-implemented.js b/node_modules/es5-ext/test/math/sinh/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/sinh/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/sinh/shim.js b/node_modules/es5-ext/test/math/sinh/shim.js new file mode 100644 index 00000000..f168a7f7 --- /dev/null +++ b/node_modules/es5-ext/test/math/sinh/shim.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(t(1), 1.1752011936438014, "1"); + a(t(Number.MAX_VALUE), Infinity); + a(t(-Number.MAX_VALUE), -Infinity); + a(t(Number.MIN_VALUE), 5e-324); + a(t(-Number.MIN_VALUE), -5e-324); +}; diff --git a/node_modules/es5-ext/test/math/tanh/implement.js b/node_modules/es5-ext/test/math/tanh/implement.js new file mode 100644 index 00000000..8503711f --- /dev/null +++ b/node_modules/es5-ext/test/math/tanh/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/tanh/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/tanh/index.js b/node_modules/es5-ext/test/math/tanh/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/tanh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/tanh/is-implemented.js b/node_modules/es5-ext/test/math/tanh/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/tanh/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/tanh/shim.js b/node_modules/es5-ext/test/math/tanh/shim.js new file mode 100644 index 00000000..5da3c087 --- /dev/null +++ b/node_modules/es5-ext/test/math/tanh/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), 1, "Infinity"); + a(t(-Infinity), -1, "-Infinity"); + a(t(1), 0.7615941559557649, "1"); + a(t(Number.MAX_VALUE), 1); + a(t(-Number.MAX_VALUE), -1); +}; diff --git a/node_modules/es5-ext/test/math/trunc/implement.js b/node_modules/es5-ext/test/math/trunc/implement.js new file mode 100644 index 00000000..0d3374fc --- /dev/null +++ b/node_modules/es5-ext/test/math/trunc/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../math/trunc/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/math/trunc/index.js b/node_modules/es5-ext/test/math/trunc/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/math/trunc/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/math/trunc/is-implemented.js b/node_modules/es5-ext/test/math/trunc/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/math/trunc/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/math/trunc/shim.js b/node_modules/es5-ext/test/math/trunc/shim.js new file mode 100644 index 00000000..b80e8683 --- /dev/null +++ b/node_modules/es5-ext/test/math/trunc/shim.js @@ -0,0 +1,16 @@ +"use strict"; + +var is = require("../../../object/is"); + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(is(t(0.234), 0), true, "0"); + a(is(t(-0.234), -0), true, "-0"); + a(t(13.7), 13, "Positive #1"); + a(t(12.3), 12, "Positive #2"); + a(t(-12.3), -12, "Negative #1"); + a(t(-14.7), -14, "Negative #2"); +}; diff --git a/node_modules/es5-ext/test/number/#/pad.js b/node_modules/es5-ext/test/number/#/pad.js new file mode 100644 index 00000000..cc8aa5e4 --- /dev/null +++ b/node_modules/es5-ext/test/number/#/pad.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(78, 4), "0078"); + a(t.call(65.12323, 4, 3), "0065.123", "Precision"); + a(t.call(65, 4, 3), "0065.000", "Precision integer"); +}; diff --git a/node_modules/es5-ext/test/number/epsilon/implement.js b/node_modules/es5-ext/test/number/epsilon/implement.js new file mode 100644 index 00000000..d387b7c1 --- /dev/null +++ b/node_modules/es5-ext/test/number/epsilon/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../number/epsilon/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/number/epsilon/index.js b/node_modules/es5-ext/test/number/epsilon/index.js new file mode 100644 index 00000000..d20e5c3b --- /dev/null +++ b/node_modules/es5-ext/test/number/epsilon/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t, "number"); +}; diff --git a/node_modules/es5-ext/test/number/epsilon/is-implemented.js b/node_modules/es5-ext/test/number/epsilon/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/number/epsilon/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/number/is-finite/implement.js b/node_modules/es5-ext/test/number/is-finite/implement.js new file mode 100644 index 00000000..5300de62 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-finite/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../number/is-finite/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/number/is-finite/index.js b/node_modules/es5-ext/test/number/is-finite/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-finite/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/number/is-finite/is-implemented.js b/node_modules/es5-ext/test/number/is-finite/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-finite/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/number/is-finite/shim.js b/node_modules/es5-ext/test/number/is-finite/shim.js new file mode 100644 index 00000000..8fa004fd --- /dev/null +++ b/node_modules/es5-ext/test/number/is-finite/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(2), true, "Number"); + a(t("23"), false, "Not numeric"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/number/is-integer/implement.js b/node_modules/es5-ext/test/number/is-integer/implement.js new file mode 100644 index 00000000..2290b250 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-integer/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../number/is-integer/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/number/is-integer/index.js b/node_modules/es5-ext/test/number/is-integer/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/number/is-integer/is-implemented.js b/node_modules/es5-ext/test/number/is-integer/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-integer/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/number/is-integer/shim.js b/node_modules/es5-ext/test/number/is-integer/shim.js new file mode 100644 index 00000000..e367990b --- /dev/null +++ b/node_modules/es5-ext/test/number/is-integer/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(2), true, "Number"); + a(t(2.34), false, "Float"); + a(t("23"), false, "Not numeric"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/number/is-nan/implement.js b/node_modules/es5-ext/test/number/is-nan/implement.js new file mode 100644 index 00000000..10fa084e --- /dev/null +++ b/node_modules/es5-ext/test/number/is-nan/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../number/is-nan/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/number/is-nan/index.js b/node_modules/es5-ext/test/number/is-nan/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-nan/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/number/is-nan/is-implemented.js b/node_modules/es5-ext/test/number/is-nan/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-nan/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/number/is-nan/shim.js b/node_modules/es5-ext/test/number/is-nan/shim.js new file mode 100644 index 00000000..31810474 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-nan/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(2), false, "Number"); + a(t({}), false, "Not numeric"); + a(t(NaN), true, "NaN"); +}; diff --git a/node_modules/es5-ext/test/number/is-natural.js b/node_modules/es5-ext/test/number/is-natural.js new file mode 100644 index 00000000..8fe4dcc4 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-natural.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(2), true, "Number"); + a(t(-2), false, "Negative"); + a(t(2.34), false, "Float"); + a(t("23"), false, "Not numeric"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/number/is-number.js b/node_modules/es5-ext/test/number/is-number.js new file mode 100644 index 00000000..9cd670c1 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-number.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(0), true, "Zero"); + a(t(NaN), true, "NaN"); + a(t(Infinity), true, "Infinity"); + a(t(12), true, "Number"); + a(t(false), false, "Boolean"); + a(t(new Date()), false, "Date"); + a(t(new Number(2)), true, "Number object"); + a(t("asdfaf"), false, "String"); + a(t(""), false, "Empty String"); +}; diff --git a/node_modules/es5-ext/test/number/is-safe-integer/implement.js b/node_modules/es5-ext/test/number/is-safe-integer/implement.js new file mode 100644 index 00000000..96f634b1 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-safe-integer/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../number/is-safe-integer/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/number/is-safe-integer/index.js b/node_modules/es5-ext/test/number/is-safe-integer/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-safe-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js b/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/number/is-safe-integer/shim.js b/node_modules/es5-ext/test/number/is-safe-integer/shim.js new file mode 100644 index 00000000..a4ea6913 --- /dev/null +++ b/node_modules/es5-ext/test/number/is-safe-integer/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(2), true, "Number"); + a(t(2.34), false, "Float"); + a(t(Math.pow(2, 53)), false, "Too large"); + a(t(Math.pow(2, 53) - 1), true, "Maximum"); + a(t("23"), false, "Not numeric"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/number/max-safe-integer/implement.js b/node_modules/es5-ext/test/number/max-safe-integer/implement.js new file mode 100644 index 00000000..1928f341 --- /dev/null +++ b/node_modules/es5-ext/test/number/max-safe-integer/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../number/max-safe-integer/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/number/max-safe-integer/index.js b/node_modules/es5-ext/test/number/max-safe-integer/index.js new file mode 100644 index 00000000..d20e5c3b --- /dev/null +++ b/node_modules/es5-ext/test/number/max-safe-integer/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t, "number"); +}; diff --git a/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js b/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/number/min-safe-integer/implement.js b/node_modules/es5-ext/test/number/min-safe-integer/implement.js new file mode 100644 index 00000000..f8b309a8 --- /dev/null +++ b/node_modules/es5-ext/test/number/min-safe-integer/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../number/min-safe-integer/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/number/min-safe-integer/index.js b/node_modules/es5-ext/test/number/min-safe-integer/index.js new file mode 100644 index 00000000..d20e5c3b --- /dev/null +++ b/node_modules/es5-ext/test/number/min-safe-integer/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t, "number"); +}; diff --git a/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js b/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/number/to-integer.js b/node_modules/es5-ext/test/number/to-integer.js new file mode 100644 index 00000000..b7b975f5 --- /dev/null +++ b/node_modules/es5-ext/test/number/to-integer.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), 0, "NaN"); + a(t(20), 20, "Positive integer"); + a(t("-20"), -20, "String negative integer"); + a(t(Infinity), Infinity, "Infinity"); + a(t(15.343), 15, "Float"); + a(t(-15.343), -15, "Negative float"); +}; diff --git a/node_modules/es5-ext/test/number/to-pos-integer.js b/node_modules/es5-ext/test/number/to-pos-integer.js new file mode 100644 index 00000000..27c7cdfa --- /dev/null +++ b/node_modules/es5-ext/test/number/to-pos-integer.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), 0, "NaN"); + a(t(20), 20, "Positive integer"); + a(t(-20), 0, "Negative integer"); + a(t(Infinity), Infinity, "Infinity"); + a(t(15.343), 15, "Float"); + a(t(-15.343), 0, "Negative float"); +}; diff --git a/node_modules/es5-ext/test/number/to-uint32.js b/node_modules/es5-ext/test/number/to-uint32.js new file mode 100644 index 00000000..7eea42f5 --- /dev/null +++ b/node_modules/es5-ext/test/number/to-uint32.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), 0, "Not numeric"); + a(t(-4), 4294967292, "Negative"); + a(t(133432), 133432, "Positive"); + a(t(8589934592), 0, "Greater than maximum"); +}; diff --git a/node_modules/es5-ext/test/object/_iterate.js b/node_modules/es5-ext/test/object/_iterate.js new file mode 100644 index 00000000..d7728f42 --- /dev/null +++ b/node_modules/es5-ext/test/object/_iterate.js @@ -0,0 +1,30 @@ +"use strict"; + +module.exports = function (t, a) { + var o = { raz: 1, dwa: 2, trzy: 3 } + , o2 = {}, o3 = {}, arr, i = -1; + + t = t("forEach"); + t(o, function (value, name, self, index) { + o2[name] = value; + a(index, ++i, "Index"); + a(self, o, "Self"); + a(this, o3, "Scope"); + }, o3); + a.deep(o2, o); + + arr = []; + o2 = {}; + i = -1; + t(o, function (value, name, self, index) { + arr.push(value); + o2[name] = value; + a(index, ++i, "Index"); + a(self, o, "Self"); + a(this, o3, "Scope"); + }, o3, function (a, b) { + return o[b] - o[a]; + }); + a.deep(o2, o, "Sort by Values: Content"); + a.deep(arr, [3, 2, 1], "Sort by Values: Order"); +}; diff --git a/node_modules/es5-ext/test/object/assign-deep.js b/node_modules/es5-ext/test/object/assign-deep.js new file mode 100644 index 00000000..962ac40d --- /dev/null +++ b/node_modules/es5-ext/test/object/assign-deep.js @@ -0,0 +1,27 @@ +"use strict"; + +module.exports = function (t, a) { + var o1 = { a: 1, b: 2 }, o2 = { b: 3, c: 4 }; + + a(t(o1, o2), o1, "Returns self"); + a.deep(o1, { a: 1, b: 3, c: 4 }, "Single: content"); + + a.deep(t({}, o1, o2), { a: 1, b: 3, c: 4 }, "Multi argument"); + + var obj1 = { foo: { bar: 3, marko: true } } + , obj2 = { foo: { elo: 12, marko: false }, miszka: [23] }; + + var copyObj1 = JSON.parse(JSON.stringify(obj1)), copyObj2 = JSON.parse(JSON.stringify(obj2)); + a.deep(t({}, obj1, obj2), { foo: { bar: 3, marko: false, elo: 12 }, miszka: [23] }); + // Ensure it's side effects free + a.deep(obj1, copyObj1); + a.deep(obj2, copyObj2); + + obj1 = [{ foo: "bar" }]; + var assignedObj = []; + t(assignedObj, obj1); + a.deep(assignedObj, [{ foo: "bar" }]); + // Ensure array items are copied and not passed + a.not(assignedObj[0], obj1[0]); + a(t(true), true); +}; diff --git a/node_modules/es5-ext/test/object/assign/implement.js b/node_modules/es5-ext/test/object/assign/implement.js new file mode 100644 index 00000000..c3e0396b --- /dev/null +++ b/node_modules/es5-ext/test/object/assign/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../object/assign/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/object/assign/index.js b/node_modules/es5-ext/test/object/assign/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/object/assign/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/object/assign/is-implemented.js b/node_modules/es5-ext/test/object/assign/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/object/assign/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/object/assign/shim.js b/node_modules/es5-ext/test/object/assign/shim.js new file mode 100644 index 00000000..36074907 --- /dev/null +++ b/node_modules/es5-ext/test/object/assign/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + var o1 = { a: 1, b: 2 } + , o2 = { b: 3, c: 4 }; + + a(t(o1, o2), o1, "Returns self"); + a.deep(o1, { a: 1, b: 3, c: 4 }, "Single: content"); + + a.deep(t({}, o1, o2), { a: 1, b: 3, c: 4 }, "Multi argument"); +}; diff --git a/node_modules/es5-ext/test/object/clear.js b/node_modules/es5-ext/test/object/clear.js new file mode 100644 index 00000000..5735e796 --- /dev/null +++ b/node_modules/es5-ext/test/object/clear.js @@ -0,0 +1,13 @@ +"use strict"; + +var isEmpty = require("../../object/is-empty"); + +module.exports = function (t, a) { + var x = {}; + a(t(x), x, "Empty: Returns same object"); + a(isEmpty(x), true, "Empty: Not changed"); + x.foo = "raz"; + x.bar = "dwa"; + a(t(x), x, "Same object"); + a(isEmpty(x), true, "Emptied"); +}; diff --git a/node_modules/es5-ext/test/object/compact.js b/node_modules/es5-ext/test/object/compact.js new file mode 100644 index 00000000..353f6f32 --- /dev/null +++ b/node_modules/es5-ext/test/object/compact.js @@ -0,0 +1,20 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}, y = {}, z; + z = t(x); + a.not(z, x, "Returns different object"); + a.deep(z, {}, "Empty on empty"); + + x = { foo: "bar", +a: 0, +b: false, +c: "", +d: "0", +e: null, +bar: y, + elo: undefined }; + z = t(x); + a.deep(z, { foo: "bar", a: 0, b: false, c: "", d: "0", bar: y }, + "Cleared null values"); +}; diff --git a/node_modules/es5-ext/test/object/compare.js b/node_modules/es5-ext/test/object/compare.js new file mode 100644 index 00000000..23cc5116 --- /dev/null +++ b/node_modules/es5-ext/test/object/compare.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + var d = new Date(); + + a.ok(t(12, 3) > 0, "Numbers"); + a.ok(t(2, 13) < 0, "Numbers #2"); + a.ok(t("aaa", "aa") > 0, "Strings"); + a.ok(t("aa", "ab") < 0, "Strings #2"); + a(t("aa", "aa"), 0, "Strings same"); + a(t(d, new Date(d.getTime())), 0, "Same date"); + a.ok(t(d, new Date(d.getTime() + 1)) < 0, "Different date"); +}; diff --git a/node_modules/es5-ext/test/object/copy-deep.js b/node_modules/es5-ext/test/object/copy-deep.js new file mode 100644 index 00000000..93813830 --- /dev/null +++ b/node_modules/es5-ext/test/object/copy-deep.js @@ -0,0 +1,35 @@ +"use strict"; + +var stringify = JSON.stringify; + +module.exports = function (t, a) { + var o = { 1: "raz", 2: "dwa", 3: "trzy" }, no = t(o); + + a.not(no, o, "Return different object"); + a(stringify(no), stringify(o), "Match properties and values"); + + o = { + foo: "bar", + raz: { + dwa: "dwa", + trzy: { cztery: "pięć", sześć: "siedem" }, + osiem: {}, + dziewięć: function () {} + }, + dziesięć: 10, + jedenaście: ["raz", ["dwa", "trzy", { elo: "true" }]] + }; + o.raz.rec = o; + + no = t(o); + a.not(o.raz, no.raz, "Deep"); + a.not(o.raz.trzy, no.raz.trzy, "Deep #2"); + a(stringify(o.raz.trzy), stringify(no.raz.trzy), "Deep content"); + a(no.raz.rec, no, "Recursive"); + a.not(o.raz.osiem, no.raz.osiem, "Empty object"); + a(o.raz["dziewięć"], no.raz["dziewięć"], "Function"); + a.not(o["jedenaście"], no["jedenaście"]); + a.not(o["jedenaście"][1], no["jedenaście"][1]); + a.not(o["jedenaście"][1][2], no["jedenaście"][1][2]); + a(t(true), true); +}; diff --git a/node_modules/es5-ext/test/object/copy.js b/node_modules/es5-ext/test/object/copy.js new file mode 100644 index 00000000..a5e2c348 --- /dev/null +++ b/node_modules/es5-ext/test/object/copy.js @@ -0,0 +1,30 @@ +"use strict"; + +var stringify = JSON.stringify; + +module.exports = function (t, a) { + var o = { 1: "raz", 2: "dwa", 3: "trzy" }, no = t(o); + + a.not(no, o, "Return different object"); + a(stringify(no), stringify(o), "Match properties and values"); + + o = { + foo: "bar", + raz: { + dwa: "dwa", + trzy: { cztery: "pięć", sześć: "siedem" }, + osiem: {}, + dziewięć: function () {} + }, + dziesięć: 10 + }; + o.raz.rec = o; + + no = t(o); + a(o.raz, no.raz, "Shallow"); + + a.deep(t(o, ["foo"]), { foo: "bar" }); + a.deep(t(Object.create(o), ["foo"]), { foo: "bar" }); + a.deep(t(o, ["foo", "habla"]), { foo: "bar" }); + a.deep(t(o, ["foo", "habla"], { ensure: true }), { foo: "bar", habla: undefined }); +}; diff --git a/node_modules/es5-ext/test/object/count.js b/node_modules/es5-ext/test/object/count.js new file mode 100644 index 00000000..ec1c5045 --- /dev/null +++ b/node_modules/es5-ext/test/object/count.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), 0, "Empty"); + a(t({ raz: 1, dwa: null, trzy: undefined, cztery: 0 }), 4, + "Some properties"); + a(t(Object.defineProperties({}, { + raz: { value: "raz" }, + dwa: { value: "dwa", enumerable: true } + })), 1, "Some properties hidden"); +}; diff --git a/node_modules/es5-ext/test/object/create.js b/node_modules/es5-ext/test/object/create.js new file mode 100644 index 00000000..c9f3029f --- /dev/null +++ b/node_modules/es5-ext/test/object/create.js @@ -0,0 +1,22 @@ +"use strict"; + +var setPrototypeOf = require("../../object/set-prototype-of") + + , getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (t, a) { + var x = {}, obj; + + a(getPrototypeOf(t(x)), x, "Normal object"); + a(getPrototypeOf(t(null)), + (setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Null"); + + a.h1("Properties"); + a.h2("Normal object"); + a(getPrototypeOf(obj = t(x, { foo: { value: "bar" } })), x, "Prototype"); + a(obj.foo, "bar", "Property"); + a.h2("Null"); + a(getPrototypeOf(obj = t(null, { foo: { value: "bar2" } })), + (setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Prototype"); + a(obj.foo, "bar2", "Property"); +}; diff --git a/node_modules/es5-ext/test/object/ensure-array.js b/node_modules/es5-ext/test/object/ensure-array.js new file mode 100644 index 00000000..fd3c32c9 --- /dev/null +++ b/node_modules/es5-ext/test/object/ensure-array.js @@ -0,0 +1,55 @@ +"use strict"; + +module.exports = function (t, a) { + var arr = []; + a(t(arr), arr, "Array"); + a(t(""), "", "String"); + var args = (function () { + return arguments; + }()); + a(t(args), args, "Arguments"); + var arrayLike = { length: 0 }; + a(t(arrayLike), arrayLike, "Array like"); + a.throws( + function () { + t(function () {}); + }, + TypeError, + "Function" + ); + a.throws( + function () { + t({}); + }, + TypeError, + "Plain object" + ); + a.throws( + function () { + t(/raz/); + }, + TypeError, + "Regexp" + ); + a.throws( + function () { + t(); + }, + TypeError, + "No argument" + ); + a.throws( + function () { + t(null); + }, + TypeError, + "Null" + ); + a.throws( + function () { + t(undefined); + }, + TypeError, + "Undefined" + ); +}; diff --git a/node_modules/es5-ext/test/object/ensure-finite-number.js b/node_modules/es5-ext/test/object/ensure-finite-number.js new file mode 100644 index 00000000..f1e6166b --- /dev/null +++ b/node_modules/es5-ext/test/object/ensure-finite-number.js @@ -0,0 +1,54 @@ +"use strict"; + +module.exports = function (t, a) { + a.throws( + function () { + t(undefined); + }, + TypeError, + "Undefined" + ); + a.throws( + function () { + t(null); + }, + TypeError, + "Null" + ); + a(t(0), 0, "Zero"); + a.throws( + function () { + t(NaN); + }, + TypeError, + "NaN" + ); + a.throws( + function () { + t(Infinity); + }, + TypeError, + "Infinity" + ); + a(t(12), 12, "Number"); + a(t(false), 0, "Boolean"); + a(t(new Date(1000000)), 1000000, "Date"); + a(t(new Number(2)), 2, "Number object"); + a.throws( + function () { + t("asdfaf"); + }, + TypeError, + "String" + ); + a(t(""), 0, "Empty String"); + if (typeof Symbol === "function") { + a.throws( + function () { + t(Symbol("test")); + }, + TypeError, + "Symbol" + ); + } +}; diff --git a/node_modules/es5-ext/test/object/ensure-integer.js b/node_modules/es5-ext/test/object/ensure-integer.js new file mode 100644 index 00000000..03db9c36 --- /dev/null +++ b/node_modules/es5-ext/test/object/ensure-integer.js @@ -0,0 +1,42 @@ +"use strict"; + +module.exports = function (t, a) { + a.throws( + function () { + t(undefined); + }, + TypeError, + "Undefined" + ); + a.throws( + function () { + t(null); + }, + TypeError, + "Null" + ); + a(t(2), 2, "Number"); + a(t(-2), -2, "Negative"); + a.throws( + function () { + t(2.34); + }, + TypeError, + "Float" + ); + a(t("23"), 23, "Numeric string"); + a.throws( + function () { + t(NaN); + }, + TypeError, + "NaN" + ); + a.throws( + function () { + t(Infinity); + }, + TypeError, + "Infinity" + ); +}; diff --git a/node_modules/es5-ext/test/object/ensure-natural-number-value.js b/node_modules/es5-ext/test/object/ensure-natural-number-value.js new file mode 100644 index 00000000..9aaae370 --- /dev/null +++ b/node_modules/es5-ext/test/object/ensure-natural-number-value.js @@ -0,0 +1,24 @@ +"use strict"; + +module.exports = function (t, a) { + a.throws(function () { + t(undefined); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "Null"); + a(t(2), 2, "Number"); + a.throws(function () { + t(-2); +}, TypeError, "Negative"); + a.throws(function () { + t(2.34); +}, TypeError, "Float"); + a(t("23"), 23, "Numeric string"); + a.throws(function () { + t(NaN); +}, TypeError, "NaN"); + a.throws(function () { + t(Infinity); +}, TypeError, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/object/ensure-natural-number.js b/node_modules/es5-ext/test/object/ensure-natural-number.js new file mode 100644 index 00000000..ff0e836a --- /dev/null +++ b/node_modules/es5-ext/test/object/ensure-natural-number.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = function (t, a) { + a.throws(function () { + t(undefined); +}, TypeError, "Undefined"); + a(t(null), 0, "Null"); + a(t(2), 2, "Number"); + a.throws(function () { + t(-2); +}, TypeError, "Negative"); + a.throws(function () { + t(2.34); +}, TypeError, "Float"); + a(t("23"), 23, "Numeric string"); + a.throws(function () { + t(NaN); +}, TypeError, "NaN"); + a.throws(function () { + t(Infinity); +}, TypeError, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/object/ensure-plain-function.js b/node_modules/es5-ext/test/object/ensure-plain-function.js new file mode 100644 index 00000000..3306d3a5 --- /dev/null +++ b/node_modules/es5-ext/test/object/ensure-plain-function.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + // Just sanity checks, as logic is tested at isPlainFunction + var fn = function () {}; + a(t(fn), fn, "Function"); + a.throws( + function () { + t({}); + }, + TypeError, + "Error" + ); +}; diff --git a/node_modules/es5-ext/test/object/ensure-plain-object.js b/node_modules/es5-ext/test/object/ensure-plain-object.js new file mode 100644 index 00000000..cc1d1fae --- /dev/null +++ b/node_modules/es5-ext/test/object/ensure-plain-object.js @@ -0,0 +1,16 @@ +"use strict"; + +module.exports = function (t, a) { + // Just sanity checks, as logic is tested at isPlainFunction + var obj = {}; + a(t(obj), obj, "Reguar object instance"); + obj = Object.create(null); + a(t(obj), obj, "Null prototype"); + a.throws( + function () { + t(function () {}); + }, + TypeError, + "Error" + ); +}; diff --git a/node_modules/es5-ext/test/object/ensure-promise.js b/node_modules/es5-ext/test/object/ensure-promise.js new file mode 100644 index 00000000..1af15bab --- /dev/null +++ b/node_modules/es5-ext/test/object/ensure-promise.js @@ -0,0 +1,32 @@ +"use strict"; + +module.exports = function (t, a) { + var promise; + a.throws(function () { + t(); +}, TypeError); + a.throws(function () { + t(null); +}, TypeError); + a.throws(function () { + t("promise"); +}, TypeError); + a.throws(function () { + t({}); +}, TypeError); + a.throws(function () { + t(function () {}); +}, TypeError); + a.throws(function () { + t({ then: {} }); +}, TypeError); + promise = { then: function () {} }; + a(t(promise), promise); + promise = function () {}; + promise.then = {}; + a.throws(function () { + t(promise); +}, TypeError); + promise.then = function () {}; + a(t(promise), promise); +}; diff --git a/node_modules/es5-ext/test/object/ensure-thenable.js b/node_modules/es5-ext/test/object/ensure-thenable.js new file mode 100644 index 00000000..151238ba --- /dev/null +++ b/node_modules/es5-ext/test/object/ensure-thenable.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + // Just sanity checks as proper tests are at isThenable + var thenable = { then: function () {} }; + + a.throws(function () { + t({}); + }, TypeError); + a(t(thenable), thenable); +}; diff --git a/node_modules/es5-ext/test/object/entries/implement.js b/node_modules/es5-ext/test/object/entries/implement.js new file mode 100644 index 00000000..c367ee44 --- /dev/null +++ b/node_modules/es5-ext/test/object/entries/implement.js @@ -0,0 +1,5 @@ +"use strict"; + +var isImplemented = require("../../../object/entries/is-implemented"); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/node_modules/es5-ext/test/object/entries/index.js b/node_modules/es5-ext/test/object/entries/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/object/entries/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/object/entries/is-implemented.js b/node_modules/es5-ext/test/object/entries/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/object/entries/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/object/entries/shim.js b/node_modules/es5-ext/test/object/entries/shim.js new file mode 100644 index 00000000..eb7285a5 --- /dev/null +++ b/node_modules/es5-ext/test/object/entries/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t({ foo: "bar" }), [["foo", "bar"]], "Object"); + a.deep(t("raz"), [["0", "r"], ["1", "a"], ["2", "z"]], "Primitive"); + a.throws(function () { t(); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "Undefined"); +}; diff --git a/node_modules/es5-ext/test/object/eq.js b/node_modules/es5-ext/test/object/eq.js new file mode 100644 index 00000000..8cad90ae --- /dev/null +++ b/node_modules/es5-ext/test/object/eq.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + var o = {}; + a(t(o, {}), false, "Different objects"); + a(t(o, o), true, "Same objects"); + a(t("1", "1"), true, "Same primitive"); + a(t("1", 1), false, "Different primitive types"); + a(t(NaN, NaN), true, "NaN"); + a(t(0, 0), true, "0,0"); + a(t(0, -0), true, "0,-0"); +}; diff --git a/node_modules/es5-ext/test/object/every.js b/node_modules/es5-ext/test/object/every.js new file mode 100644 index 00000000..7e837d22 --- /dev/null +++ b/node_modules/es5-ext/test/object/every.js @@ -0,0 +1,21 @@ +"use strict"; + +var o = { 1: 1, 2: 2, 3: 3 }; + +module.exports = function (t, a) { + var o2 = {}; + t(o, function (value, name) { + o2[name] = value; + return true; + }); + a(JSON.stringify(o2), JSON.stringify(o), "Iterates"); + + a(t(o, function () { + return true; + }), true, "Succeeds"); + + a(t(o, function () { + return false; + }), false, "Fails"); + +}; diff --git a/node_modules/es5-ext/test/object/filter.js b/node_modules/es5-ext/test/object/filter.js new file mode 100644 index 00000000..c714d237 --- /dev/null +++ b/node_modules/es5-ext/test/object/filter.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t({ 1: 1, 2: 2, 3: 3, 4: 4 }, + function (value) { + return Boolean(value % 2); +}), { 1: 1, 3: 3 }); +}; diff --git a/node_modules/es5-ext/test/object/find-key.js b/node_modules/es5-ext/test/object/find-key.js new file mode 100644 index 00000000..d4a578ff --- /dev/null +++ b/node_modules/es5-ext/test/object/find-key.js @@ -0,0 +1,23 @@ +"use strict"; + +var o = { 1: 1, 2: 2, 3: 3 }; + +module.exports = function (t, a) { + var o2 = {}, i = 0; + t(o, function (value, name) { + o2[name] = value; + return false; + }); + a(JSON.stringify(o2), JSON.stringify(o), "Iterates"); + + a(t(o, function () { + ++i; + return true; + }), "1", "Finds"); + a(i, 1, "Stops iteration after condition is met"); + + a(t(o, function () { + return false; + }), undefined, "Fails"); + +}; diff --git a/node_modules/es5-ext/test/object/find.js b/node_modules/es5-ext/test/object/find.js new file mode 100644 index 00000000..eea51247 --- /dev/null +++ b/node_modules/es5-ext/test/object/find.js @@ -0,0 +1,23 @@ +"use strict"; + +var o = { 1: 1, 2: 2, 3: 3 }; + +module.exports = function (t, a) { + var o2 = {}, i = 0; + t(o, function (value, name) { + o2[name] = value; + return false; + }); + a(JSON.stringify(o2), JSON.stringify(o), "Iterates"); + + a(t(o, function () { + ++i; + return true; + }), 1, "Finds"); + a(i, 1, "Stops iteration after condition is met"); + + a(t(o, function () { + return false; + }), undefined, "Fails"); + +}; diff --git a/node_modules/es5-ext/test/object/first-key.js b/node_modules/es5-ext/test/object/first-key.js new file mode 100644 index 00000000..6010ba11 --- /dev/null +++ b/node_modules/es5-ext/test/object/first-key.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}, y = Object.create(null); + a(t(x), null, "Normal: Empty"); + a(t(y), null, "Null extension: Empty"); + x.foo = "raz"; + x.bar = 343; + a(["foo", "bar"].indexOf(t(x)) !== -1, true, "Normal"); + y.elo = "foo"; + y.mar = "wew"; + a(["elo", "mar"].indexOf(t(y)) !== -1, true, "Null extension"); +}; diff --git a/node_modules/es5-ext/test/object/flatten.js b/node_modules/es5-ext/test/object/flatten.js new file mode 100644 index 00000000..277a97cf --- /dev/null +++ b/node_modules/es5-ext/test/object/flatten.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t({ a: { aa: 1, ab: 2 }, b: { ba: 3, bb: 4 } }), + { aa: 1, ab: 2, ba: 3, bb: 4 }); +}; diff --git a/node_modules/es5-ext/test/object/for-each.js b/node_modules/es5-ext/test/object/for-each.js new file mode 100644 index 00000000..97c6399a --- /dev/null +++ b/node_modules/es5-ext/test/object/for-each.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + var o = { raz: 1, dwa: 2, trzy: 3 } + , o2 = {}; + a(t(o, function (value, name) { + o2[name] = value; + }), undefined, "Return"); + a.deep(o2, o); +}; diff --git a/node_modules/es5-ext/test/object/get-property-names.js b/node_modules/es5-ext/test/object/get-property-names.js new file mode 100644 index 00000000..a1d6377f --- /dev/null +++ b/node_modules/es5-ext/test/object/get-property-names.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = function (t, a) { + var o = { first: 1, second: 4 }, r1, r2; + o = Object.create(o, { + third: { value: null } + }); + o.first = 2; + o = Object.create(o); + o.fourth = 3; + + r1 = t(o); + r1.sort(); + r2 = ["first", "second", "third", "fourth"] + .concat(Object.getOwnPropertyNames(Object.prototype)); + r2.sort(); + a.deep(r1, r2); +}; diff --git a/node_modules/es5-ext/test/object/is-array-like.js b/node_modules/es5-ext/test/object/is-array-like.js new file mode 100644 index 00000000..50f5ce59 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-array-like.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = function (t, a) { + a(t([]), true, "Array"); + a(t(""), true, "String"); + a( + t( + (function () { + return arguments; + })() + ), + true, + "Arguments" + ); + a(t({ length: 0 }), true, "List object"); + a(t(function () {}), false, "Function"); + a(t({}), false, "Plain object"); + a(t(/raz/), false, "Regexp"); + a(t(), false, "No argument"); + a(t(null), false, "Null"); + a(t(undefined), false, "Undefined"); +}; diff --git a/node_modules/es5-ext/test/object/is-callable.js b/node_modules/es5-ext/test/object/is-callable.js new file mode 100644 index 00000000..415023e3 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-callable.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(function () {}), true, "Function"); + a(t({}), false, "Object"); + a(t(), false, "Undefined"); + a(t(null), false, "Null"); +}; diff --git a/node_modules/es5-ext/test/object/is-copy-deep.js b/node_modules/es5-ext/test/object/is-copy-deep.js new file mode 100644 index 00000000..9c8ad925 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-copy-deep.js @@ -0,0 +1,46 @@ +"use strict"; + +module.exports = function (t, a) { + var x, y; + + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same"); + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false, + "Different property value"); + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false, + "Property only in source"); + a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false, + "Property only in target"); + + a(t("raz", "dwa"), false, "String: diff"); + a(t("raz", "raz"), true, "String: same"); + a(t("32", 32), false, "String & Number"); + + a(t([1, "raz", true], [1, "raz", true]), true, "Array: same"); + a(t([1, "raz", undefined], [1, "raz"]), false, "Array: diff"); + a(t(["foo"], ["one"]), false, "Array: One value comparision"); + + x = { foo: { bar: { mar: {} } } }; + y = { foo: { bar: { mar: {} } } }; + a(t(x, y), true, "Deep"); + + a(t({ foo: { bar: { mar: "foo" } } }, { foo: { bar: { mar: {} } } }), + false, "Deep: false"); + + x = { foo: { bar: { mar: {} } } }; + x.rec = { foo: x }; + + y = { foo: { bar: { mar: {} } } }; + y.rec = { foo: x }; + + a(t(x, y), true, "Object: Infinite Recursion: Same #1"); + + x.rec.foo = y; + a(t(x, y), true, "Object: Infinite Recursion: Same #2"); + + x.rec.foo = x; + y.rec.foo = y; + a(t(x, y), true, "Object: Infinite Recursion: Same #3"); + + y.foo.bar.mar = "raz"; + a(t(x, y), false, "Object: Infinite Recursion: Diff"); +}; diff --git a/node_modules/es5-ext/test/object/is-copy.js b/node_modules/es5-ext/test/object/is-copy.js new file mode 100644 index 00000000..6052bb05 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-copy.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same"); + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false, + "Different property value"); + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false, + "Property only in source"); + a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false, + "Property only in target"); + + a(t("raz", "dwa"), false, "String: diff"); + a(t("raz", "raz"), true, "String: same"); + a(t("32", 32), false, "String & Number"); + + a(t([1, "raz", true], [1, "raz", true]), true, "Array: same"); + a(t([1, "raz", undefined], [1, "raz"]), false, "Array: diff"); +}; diff --git a/node_modules/es5-ext/test/object/is-empty.js b/node_modules/es5-ext/test/object/is-empty.js new file mode 100644 index 00000000..067b1621 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-empty.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), true, "Empty"); + a(t({ 1: 1 }), false, "Not empty"); +}; diff --git a/node_modules/es5-ext/test/object/is-finite-number.js b/node_modules/es5-ext/test/object/is-finite-number.js new file mode 100644 index 00000000..6475fb66 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-finite-number.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(0), true, "Zero"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); + a(t(12), true, "Number"); + a(t(false), true, "Boolean"); + a(t(new Date()), true, "Date"); + a(t(new Number(2)), true, "Number object"); + a(t("asdfaf"), false, "String"); + a(t(""), true, "Empty String"); + if (typeof Symbol === "function") { + a(t(Symbol("test")), false, "Symbol"); + } +}; diff --git a/node_modules/es5-ext/test/object/is-integer.js b/node_modules/es5-ext/test/object/is-integer.js new file mode 100644 index 00000000..a0bcd5cd --- /dev/null +++ b/node_modules/es5-ext/test/object/is-integer.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(2), true, "Number"); + a(t(-2), true, "Negative"); + a(t(2.34), false, "Float"); + a(t("23"), true, "Numeric string"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/object/is-natural-number-value.js b/node_modules/es5-ext/test/object/is-natural-number-value.js new file mode 100644 index 00000000..2bc2b1c8 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-natural-number-value.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(2), true, "Number"); + a(t(-2), false, "Negative"); + a(t(2.34), false, "Float"); + a(t("23"), true, "Numeric string"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/object/is-natural-number.js b/node_modules/es5-ext/test/object/is-natural-number.js new file mode 100644 index 00000000..bb110e60 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-natural-number.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), true, "Null"); + a(t(2), true, "Number"); + a(t(-2), false, "Negative"); + a(t(2.34), false, "Float"); + a(t("23"), true, "Numeric string"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/node_modules/es5-ext/test/object/is-number-value.js b/node_modules/es5-ext/test/object/is-number-value.js new file mode 100644 index 00000000..2c09d251 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-number-value.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(0), true, "Zero"); + a(t(NaN), false, "NaN"); + a(t(Infinity), true, "Infinity"); + a(t(12), true, "Number"); + a(t(false), true, "Boolean"); + a(t(new Date()), true, "Date"); + a(t(new Number(2)), true, "Number object"); + a(t("asdfaf"), false, "String"); + a(t(""), true, "Empty String"); + if (typeof Symbol === "function") { + a(t(Symbol("test")), false, "Symbol"); + } +}; diff --git a/node_modules/es5-ext/test/object/is-object.js b/node_modules/es5-ext/test/object/is-object.js new file mode 100644 index 00000000..0b835997 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-object.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + a(t("arar"), false, "String"); + a(t(12), false, "Number"); + a(t(true), false, "Boolean"); + a(t(null), false, "Null"); + a(t(new Date()), true, "Date"); + a(t(new String("raz")), true, "String object"); + a(t({}), true, "Plain object"); + a(t(/a/), true, "Regular expression"); + a(t(function () {}), true, "Function"); +}; diff --git a/node_modules/es5-ext/test/object/is-plain-function.js b/node_modules/es5-ext/test/object/is-plain-function.js new file mode 100644 index 00000000..9c1f5ed3 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-plain-function.js @@ -0,0 +1,42 @@ +"use strict"; + +var setPrototypeOf = require("../../object/set-prototype-of"); + +module.exports = function (t, a) { + a(t(function () {}), true, "Function"); + a(t({}), false, "Object"); + a(t(), false, "Undefined"); + a(t(null), false, "Null"); + if (setPrototypeOf) { + a( + t(Object.setPrototypeOf(function () {}, Object.prototype)), + false, + "Function with non-function prototype" + ); + } + var arrowfn; + try { + arrowfn = eval("(() => {})"); + } catch (e) {} + if (arrowfn) { + a(t(arrowfn), true, "Arrow function"); + } + + var classFn; + try { + classFn = eval("(class {})"); + } catch (e) {} + if (classFn) { + a(t(classFn), false, "Class"); + } + + var commentedClassFn; + try { + // Follows issue reported to ljhard/is-callable project: + // https://github.com/ljharb/is-callable/issues/4 + commentedClassFn = eval("(class/*kkk*/\n//blah\n Bar\n//blah\n {})"); + } catch (e) {} + if (commentedClassFn) { + a(t(commentedClassFn, false, "Class"), false, "Class with comments"); + } +}; diff --git a/node_modules/es5-ext/test/object/is-plain-object.js b/node_modules/es5-ext/test/object/is-plain-object.js new file mode 100644 index 00000000..7324438d --- /dev/null +++ b/node_modules/es5-ext/test/object/is-plain-object.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = function (t, a) { + a(t({}), true, "Empty {} is plain object"); + a(t({ a: true }), true, "{} with property is plain object"); + a(t({ prototype: 1, constructor: 2, __proto__: 3 }), true, + "{} with any property keys is plain object"); + a(t(null), false, "Null is not plain object"); + a(t("string"), false, "Primitive is not plain object"); + a(t(function () {}), false, "Function is not plain object"); + a(t(Object.create({})), false, + "Object whose prototype is not Object.prototype is not plain object"); + a(t(Object.create(Object.prototype)), true, + "Object whose prototype is Object.prototype is plain object"); + a(t(Object.create(null)), true, + "Object whose prototype is null is plain object"); + a(t(Object.prototype), false, "Object.prototype"); +}; diff --git a/node_modules/es5-ext/test/object/is-promise.js b/node_modules/es5-ext/test/object/is-promise.js new file mode 100644 index 00000000..18bf934d --- /dev/null +++ b/node_modules/es5-ext/test/object/is-promise.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = function (t, a) { + var promise; + a(t(), false); + a(t(null), false); + a(t("promise"), false); + a(t({}), false); + a(t(function () {}), false); + a(t({ then: {} }), false); + a(t({ then: function () {} }), true); + promise = function () {}; + promise.then = {}; + a(t(promise), false); + promise.then = function () {}; + a(t(promise), true); +}; diff --git a/node_modules/es5-ext/test/object/is-thenable.js b/node_modules/es5-ext/test/object/is-thenable.js new file mode 100644 index 00000000..18bf934d --- /dev/null +++ b/node_modules/es5-ext/test/object/is-thenable.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = function (t, a) { + var promise; + a(t(), false); + a(t(null), false); + a(t("promise"), false); + a(t({}), false); + a(t(function () {}), false); + a(t({ then: {} }), false); + a(t({ then: function () {} }), true); + promise = function () {}; + promise.then = {}; + a(t(promise), false); + promise.then = function () {}; + a(t(promise), true); +}; diff --git a/node_modules/es5-ext/test/object/is-value.js b/node_modules/es5-ext/test/object/is-value.js new file mode 100644 index 00000000..c97722d0 --- /dev/null +++ b/node_modules/es5-ext/test/object/is-value.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(), false); + a(t(undefined), false); + a(t(null), false); + a(t(NaN), true); + a(t(0), true); + a(t(false), true); + a(t("null"), true); + a(t(""), true); + a(t({}), true); + a(t(Object.prototype), true); +}; diff --git a/node_modules/es5-ext/test/object/is.js b/node_modules/es5-ext/test/object/is.js new file mode 100644 index 00000000..c94ed41c --- /dev/null +++ b/node_modules/es5-ext/test/object/is.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + var o = {}; + a(t(o, {}), false, "Different objects"); + a(t(o, o), true, "Same objects"); + a(t("1", "1"), true, "Same primitive"); + a(t("1", 1), false, "Different primitive types"); + a(t(NaN, NaN), true, "NaN"); + a(t(0, 0), true, "0,0"); + a(t(0, -0), false, "0,-0"); +}; diff --git a/node_modules/es5-ext/test/object/key-of.js b/node_modules/es5-ext/test/object/key-of.js new file mode 100644 index 00000000..bf10ca03 --- /dev/null +++ b/node_modules/es5-ext/test/object/key-of.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + var x = {}, y = {} + , o = { foo: "bar", raz: x, trzy: "cztery", five: "6" }; + + a(t(o, "bar"), "foo", "First property"); + a(t(o, 6), null, "Primitive that's not there"); + a(t(o, x), "raz", "Object"); + a(t(o, y), null, "Object that's not there"); + a(t(o, "6"), "five", "Last property"); +}; diff --git a/node_modules/es5-ext/test/object/keys/implement.js b/node_modules/es5-ext/test/object/keys/implement.js new file mode 100644 index 00000000..3134886d --- /dev/null +++ b/node_modules/es5-ext/test/object/keys/implement.js @@ -0,0 +1,5 @@ +"use strict"; + +var isImplemented = require("../../../object/keys/is-implemented"); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/node_modules/es5-ext/test/object/keys/index.js b/node_modules/es5-ext/test/object/keys/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/object/keys/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/object/keys/is-implemented.js b/node_modules/es5-ext/test/object/keys/is-implemented.js new file mode 100644 index 00000000..566411ce --- /dev/null +++ b/node_modules/es5-ext/test/object/keys/is-implemented.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function (t, a) { a(typeof t(), "boolean"); }; diff --git a/node_modules/es5-ext/test/object/keys/shim.js b/node_modules/es5-ext/test/object/keys/shim.js new file mode 100644 index 00000000..dc09f46b --- /dev/null +++ b/node_modules/es5-ext/test/object/keys/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t({ foo: "bar" }), ["foo"], "Object"); + a.deep(t("raz"), ["0", "1", "2"], "Primitive"); + a.throws(function () { t(); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "Undefined"); +}; diff --git a/node_modules/es5-ext/test/object/map-keys.js b/node_modules/es5-ext/test/object/map-keys.js new file mode 100644 index 00000000..4598db21 --- /dev/null +++ b/node_modules/es5-ext/test/object/map-keys.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t({ 1: 1, 2: 2, 3: 3 }, function (key, value) { + return "x" + (key + value); + }), { x11: 1, x22: 2, x33: 3 }); +}; diff --git a/node_modules/es5-ext/test/object/map.js b/node_modules/es5-ext/test/object/map.js new file mode 100644 index 00000000..78c1ed34 --- /dev/null +++ b/node_modules/es5-ext/test/object/map.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + var obj = { 1: 1, 2: 2, 3: 3 }; + a.deep(t(obj, function (value, key, context) { + a(context, obj, "Context argument"); + return (value + 1) + key; + }), { 1: "21", 2: "32", 3: "43" }); +}; diff --git a/node_modules/es5-ext/test/object/mixin-prototypes.js b/node_modules/es5-ext/test/object/mixin-prototypes.js new file mode 100644 index 00000000..f510afb4 --- /dev/null +++ b/node_modules/es5-ext/test/object/mixin-prototypes.js @@ -0,0 +1,68 @@ +"use strict"; + +module.exports = function (t, a) { + var o, o1, o2, x, y = {}, z = {}; + o = { inherited: true, visible: 23 }; + o1 = Object.create(o); + o1.visible = z; + o1.nonremovable = "raz"; + Object.defineProperty(o1, "hidden", { value: "hidden" }); + + o2 = Object.defineProperties({}, { nonremovable: { value: y } }); + o2.other = "other"; + + try { t(o2, o1); } + catch (ignore) {} + + a(o2.visible, z, "Enumerable"); + a(o1.hidden, "hidden", "Not Enumerable"); + a(o2.propertyIsEnumerable("visible"), true, "Enumerable is enumerable"); + a(o2.propertyIsEnumerable("hidden"), false, "Not enumerable is not enumerable"); + + a(o2.inherited, true, "Extend deep"); + + a(o2.nonremovable, y, "Do not overwrite non configurable"); + a(o2.other, "other", "Own kept"); + + x = {}; + t(x, o2); + try { t(x, o1); } + catch (ignore) {} + + a(x.visible, z, "Enumerable"); + a(x.hidden, "hidden", "Not Enumerable"); + a(x.propertyIsEnumerable("visible"), true, "Enumerable is enumerable"); + a(x.propertyIsEnumerable("hidden"), false, "Not enumerable is not enumerable"); + + a(x.inherited, true, "Extend deep"); + + a(x.nonremovable, y, "Ignored non configurable"); + a(x.other, "other", "Other"); + + x.visible = 3; + a(x.visible, 3, "Writable is writable"); + + x = {}; + t(x, o1); + a.throws(function () { x.hidden = 3; }, "Not writable is not writable"); + + x = {}; + t(x, o1); + delete x.visible; + a.ok(!x.hasOwnProperty("visible"), "Configurable is configurable"); + + x = {}; + t(x, o1); + a.throws(function () { delete x.hidden; }, "Not configurable is not configurable"); + + x = Object.defineProperty({}, "foo", { + configurable: false, + writable: true, + enumerable: false, + value: "bar" + }); + + try { t(x, { foo: "lorem" }); } + catch (ignore) {} + a(x.foo, "bar", "Writable, not enumerable"); +}; diff --git a/node_modules/es5-ext/test/object/mixin.js b/node_modules/es5-ext/test/object/mixin.js new file mode 100644 index 00000000..d1905c17 --- /dev/null +++ b/node_modules/es5-ext/test/object/mixin.js @@ -0,0 +1,75 @@ +"use strict"; + +module.exports = function (t, a) { + var o, o1, o2, x, y = {}, z = {}; + o = { inherited: true }; + o1 = Object.create(o); + o1.visible = z; + o1.nonremovable = "raz"; + Object.defineProperty(o1, "hidden", { value: "hidden" }); + + o2 = Object.defineProperties({}, { nonremovable: { value: y } }); + o2.other = "other"; + + try { + t(o2, o1); +} catch (ignore) {} + + a(o2.visible, z, "Enumerable"); + a(o1.hidden, "hidden", "Not Enumerable"); + a(o2.propertyIsEnumerable("visible"), true, "Enumerable is enumerable"); + a(o2.propertyIsEnumerable("hidden"), false, + "Not enumerable is not enumerable"); + + a(o2.hasOwnProperty("inherited"), false, "Extend only own"); + a(o2.inherited, undefined, "Extend ony own: value"); + + a(o2.nonremovable, y, "Do not overwrite non configurable"); + a(o2.other, "other", "Own kept"); + + x = {}; + t(x, o2); + try { + t(x, o1); +} catch (ignore) {} + + a(x.visible, z, "Enumerable"); + a(x.hidden, "hidden", "Not Enumerable"); + a(x.propertyIsEnumerable("visible"), true, "Enumerable is enumerable"); + a(x.propertyIsEnumerable("hidden"), false, + "Not enumerable is not enumerable"); + + a(x.hasOwnProperty("inherited"), false, "Extend only own"); + a(x.inherited, undefined, "Extend ony own: value"); + + a(x.nonremovable, y, "Ignored non configurable"); + a(x.other, "other", "Other"); + + x.visible = 3; + a(x.visible, 3, "Writable is writable"); + + x = {}; + t(x, o1); + a.throws(function () { + x.hidden = 3; + }, "Not writable is not writable"); + + x = {}; + t(x, o1); + delete x.visible; + a.ok(!x.hasOwnProperty("visible"), "Configurable is configurable"); + + x = {}; + t(x, o1); + a.throws(function () { + delete x.hidden; + }, "Not configurable is not configurable"); + + x = Object.defineProperty({}, "foo", + { configurable: false, writable: true, enumerable: false, value: "bar" }); + + try { + t(x, { foo: "lorem" }); +} catch (ignore) {} + a(x.foo, "bar", "Writable, not enumerable"); +}; diff --git a/node_modules/es5-ext/test/object/normalize-options.js b/node_modules/es5-ext/test/object/normalize-options.js new file mode 100644 index 00000000..028864fe --- /dev/null +++ b/node_modules/es5-ext/test/object/normalize-options.js @@ -0,0 +1,46 @@ +"use strict"; + +var create = Object.create, defineProperty = Object.defineProperty; + +module.exports = function (t, a) { + var x = { foo: "raz", bar: "dwa" }, y; + y = t(x); + a.not(y, x, "Returns copy"); + a.deep(y, x, "Plain"); + + x = { raz: "one", dwa: "two" }; + defineProperty(x, "get", { + configurable: true, + enumerable: true, + get: function () { + return this.dwa; +} + }); + x = create(x); + x.trzy = "three"; + x.cztery = "four"; + x = create(x); + x.dwa = "two!"; + x.trzy = "three!"; + x.piec = "five"; + x.szesc = "six"; + + a.deep(t(x), { raz: "one", +dwa: "two!", +trzy: "three!", +cztery: "four", + piec: "five", +szesc: "six", +get: "two!" }, "Deep object"); + + a.deep(t({ marko: "raz", raz: "foo" }, x, { szesc: "elo", siedem: "bibg" }), + { marko: "raz", +raz: "one", +dwa: "two!", +trzy: "three!", +cztery: "four", + piec: "five", +szesc: "elo", +siedem: "bibg", +get: "two!" }, "Multiple options"); +}; diff --git a/node_modules/es5-ext/test/object/primitive-set.js b/node_modules/es5-ext/test/object/primitive-set.js new file mode 100644 index 00000000..b5083d5c --- /dev/null +++ b/node_modules/es5-ext/test/object/primitive-set.js @@ -0,0 +1,15 @@ +"use strict"; + +var getPropertyNames = require("../../object/get-property-names") + , isPlainObject = require("../../object/is-plain-object"); + +module.exports = function (t, a) { + var x = t(); + a(isPlainObject(x), true, "Plain object"); + a.deep(getPropertyNames(x), [], "No properties"); + x.foo = "bar"; + a.deep(getPropertyNames(x), ["foo"], "Extensible"); + + a.deep(t("raz", "dwa", 3), { raz: true, dwa: true, 3: true }, + "Arguments handling"); +}; diff --git a/node_modules/es5-ext/test/object/safe-traverse.js b/node_modules/es5-ext/test/object/safe-traverse.js new file mode 100644 index 00000000..acf49c0e --- /dev/null +++ b/node_modules/es5-ext/test/object/safe-traverse.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function (t, a) { + var obj = { foo: { bar: { lorem: 12 } } }; + a(t(obj), obj, "No props"); + a(t(obj, "foo"), obj.foo, "One"); + a(t(obj, "raz"), undefined, "One: Fail"); + a(t(obj, "foo", "bar"), obj.foo.bar, "Two"); + a(t(obj, "dsd", "raz"), undefined, "Two: Fail #1"); + a(t(obj, "foo", "raz"), undefined, "Two: Fail #2"); + a(t(obj, "foo", "bar", "lorem"), obj.foo.bar.lorem, "Three"); + a(t(obj, "dsd", "raz", "fef"), undefined, "Three: Fail #1"); + a(t(obj, "foo", "raz", "asdf"), undefined, "Three: Fail #2"); + a(t(obj, "foo", "bar", "asd"), undefined, "Three: Fail #3"); +}; diff --git a/node_modules/es5-ext/test/object/serialize.js b/node_modules/es5-ext/test/object/serialize.js new file mode 100644 index 00000000..f0ca800c --- /dev/null +++ b/node_modules/es5-ext/test/object/serialize.js @@ -0,0 +1,45 @@ +"use strict"; + +module.exports = function (t, a) { + var fn = function (raz, dwa) { + return raz + dwa; + }; + a(t(), "undefined", "Undefined"); + a(t(null), "null", "Null"); + a(t(null), "null", "Null"); + a(t("raz"), "\"raz\"", "String"); + a(t("raz\"ddwa\ntrzy"), "\"raz\\\"ddwa\\ntrzy\"", "String with escape"); + a(t(false), "false", "Booelean"); + a(t(fn), String(fn), "Function"); + + a(t(/raz-dwa/g), "/raz-dwa/g", "RegExp"); + a(t(new Date(1234567)), "new Date(1234567)", "Date"); + a(t([]), "[]", "Empty array"); + a( + t([undefined, false, null, "raz\"ddwa\ntrzy", fn, /raz/g, new Date(1234567), ["foo"]]), + "[undefined,false,null,\"raz\\\"ddwa\\ntrzy\"," + + String(fn) + + ",/raz/g,new Date(1234567),[\"foo\"]]", + "Rich Array" + ); + a(t({}), "{}", "Empty object"); + a( + t({ + raz: undefined, + dwa: false, + trzy: null, + cztery: "raz\"ddwa\ntrzy", + piec: fn, + szesc: /raz/g, + siedem: new Date(1234567), + osiem: ["foo", 32], + dziewiec: { foo: "bar", dwa: 343 } + }), + "{\"raz\":undefined,\"dwa\":false,\"trzy\":null,\"cztery\":\"raz\\\"ddwa\\ntrzy\"," + + "\"piec\":" + + String(fn) + + ",\"szesc\":/raz/g,\"siedem\":new Date(1234567),\"osiem\":[\"foo\",32]," + + "\"dziewiec\":{\"foo\":\"bar\",\"dwa\":343}}", + "Rich object" + ); +}; diff --git a/node_modules/es5-ext/test/object/set-prototype-of/implement.js b/node_modules/es5-ext/test/object/set-prototype-of/implement.js new file mode 100644 index 00000000..5b8fb9e9 --- /dev/null +++ b/node_modules/es5-ext/test/object/set-prototype-of/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +var create = require("../../../object/create") + , isImplemented = require("../../../object/set-prototype-of/is-implemented"); + +module.exports = function (a) { + a(isImplemented(create), true); +}; diff --git a/node_modules/es5-ext/test/object/set-prototype-of/index.js b/node_modules/es5-ext/test/object/set-prototype-of/index.js new file mode 100644 index 00000000..23619b07 --- /dev/null +++ b/node_modules/es5-ext/test/object/set-prototype-of/index.js @@ -0,0 +1,27 @@ +"use strict"; + +var create = require("../../../object/create") + + , getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (t, a) { + var x = {}, y = {}; + + if (t === null) return; + a(t(x, y), x, "Return self object"); + a(getPrototypeOf(x), y, "Object"); + a.throws(function () { + t(x); +}, TypeError, "Undefined"); + a.throws(function () { + t("foo"); +}, TypeError, "Primitive"); + a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null"); + x = create(null); + a.h1("Change null prototype"); + a(t(x, y), x, "Result"); + a(getPrototypeOf(x), y, "Prototype"); + a.h1("Set null prototype"); + a(t(y, null), y, "Result"); + a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype"); +}; diff --git a/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js b/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/object/set-prototype-of/shim.js b/node_modules/es5-ext/test/object/set-prototype-of/shim.js new file mode 100644 index 00000000..23619b07 --- /dev/null +++ b/node_modules/es5-ext/test/object/set-prototype-of/shim.js @@ -0,0 +1,27 @@ +"use strict"; + +var create = require("../../../object/create") + + , getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (t, a) { + var x = {}, y = {}; + + if (t === null) return; + a(t(x, y), x, "Return self object"); + a(getPrototypeOf(x), y, "Object"); + a.throws(function () { + t(x); +}, TypeError, "Undefined"); + a.throws(function () { + t("foo"); +}, TypeError, "Primitive"); + a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null"); + x = create(null); + a.h1("Change null prototype"); + a(t(x, y), x, "Result"); + a(getPrototypeOf(x), y, "Prototype"); + a.h1("Set null prototype"); + a(t(y, null), y, "Result"); + a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype"); +}; diff --git a/node_modules/es5-ext/test/object/some.js b/node_modules/es5-ext/test/object/some.js new file mode 100644 index 00000000..97e5d772 --- /dev/null +++ b/node_modules/es5-ext/test/object/some.js @@ -0,0 +1,23 @@ +"use strict"; + +var o = { 1: 1, 2: 2, 3: 3 }; + +module.exports = function (t, a) { + var o2 = {}, i = 0; + t(o, function (value, name) { + o2[name] = value; + return false; + }); + a(JSON.stringify(o2), JSON.stringify(o), "Iterates"); + + a(t(o, function () { + ++i; + return true; + }), true, "Succeeds"); + a(i, 1, "Stops iteration after condition is met"); + + a(t(o, function () { + return false; + }), false, "Fails"); + +}; diff --git a/node_modules/es5-ext/test/object/to-array.js b/node_modules/es5-ext/test/object/to-array.js new file mode 100644 index 00000000..cd11a05f --- /dev/null +++ b/node_modules/es5-ext/test/object/to-array.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function (t, a) { + var o = { 1: 1, 2: 2, 3: 3 }, o1 = {} + , o2 = t(o, function (value, name, self) { + a(self, o, "Self"); + a(this, o1, "Scope"); + return value + Number(name); + }, o1); + a.deep(o2, [2, 4, 6]); + + t(o).sort().forEach(function (item) { + a.deep(item, [item[0], o[item[0]]], "Default"); + }); +}; diff --git a/node_modules/es5-ext/test/object/unserialize.js b/node_modules/es5-ext/test/object/unserialize.js new file mode 100644 index 00000000..5af3c77f --- /dev/null +++ b/node_modules/es5-ext/test/object/unserialize.js @@ -0,0 +1,41 @@ +"use strict"; + +module.exports = function (t, a) { + var fn = function (raz, dwa) { + return raz + dwa; + }; + a(t("undefined"), undefined, "Undefined"); + a(t("null"), null, "Null"); + a(t("\"raz\""), "raz", "String"); + a(t("\"raz\\\"ddwa\\ntrzy\""), "raz\"ddwa\ntrzy", "String with escape"); + a(t("false"), false, "Booelean"); + a(String(t(String(fn))), String(fn), "Function"); + + a.deep(t("/raz-dwa/g"), /raz-dwa/g, "RegExp"); + a.deep(t("new Date(1234567)"), new Date(1234567), "Date"); + a.deep(t("[]"), [], "Empty array"); + a.deep( + t("[undefined,false,null,\"raz\\\"ddwa\\ntrzy\",/raz/g,new Date(1234567),[\"foo\"]]"), + [undefined, false, null, "raz\"ddwa\ntrzy", /raz/g, new Date(1234567), ["foo"]], + "Rich Array" + ); + a.deep(t("{}"), {}, "Empty object"); + a.deep( + t( + "{\"raz\":undefined,\"dwa\":false,\"trzy\":null,\"cztery\":\"raz\\\"ddwa\\ntrzy\"," + + "\"szesc\":/raz/g,\"siedem\":new Date(1234567),\"osiem\":[\"foo\",32]," + + "\"dziewiec\":{\"foo\":\"bar\",\"dwa\":343}}" + ), + { + raz: undefined, + dwa: false, + trzy: null, + cztery: "raz\"ddwa\ntrzy", + szesc: /raz/g, + siedem: new Date(1234567), + osiem: ["foo", 32], + dziewiec: { foo: "bar", dwa: 343 } + }, + "Rich object" + ); +}; diff --git a/node_modules/es5-ext/test/object/valid-callable.js b/node_modules/es5-ext/test/object/valid-callable.js new file mode 100644 index 00000000..fb7310c8 --- /dev/null +++ b/node_modules/es5-ext/test/object/valid-callable.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + var f = function () {}; + a(t(f), f, "Function"); + a.throws(function () { + t({}); + }, "Not Function"); +}; diff --git a/node_modules/es5-ext/test/object/valid-object.js b/node_modules/es5-ext/test/object/valid-object.js new file mode 100644 index 00000000..b33be977 --- /dev/null +++ b/node_modules/es5-ext/test/object/valid-object.js @@ -0,0 +1,25 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a.throws(function () { + t(0); +}, TypeError, "0"); + a.throws(function () { + t(false); +}, TypeError, "false"); + a.throws(function () { + t(""); +}, TypeError, "''"); + a(t(x = {}), x, "Object"); + a(t(x = function () {}), x, "Function"); + a(t(x = new String("raz")), x, "String object"); // Jslint: ignore + a(t(x = new Date()), x, "Date"); + + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "null"); +}; diff --git a/node_modules/es5-ext/test/object/valid-value.js b/node_modules/es5-ext/test/object/valid-value.js new file mode 100644 index 00000000..394f89f7 --- /dev/null +++ b/node_modules/es5-ext/test/object/valid-value.js @@ -0,0 +1,19 @@ +"use strict"; + +var numIsNaN = require("../../number/is-nan"); + +module.exports = function (t, a) { + var x; + a(t(0), 0, "0"); + a(t(false), false, "false"); + a(t(""), "", "''"); + a(numIsNaN(t(NaN)), true, "NaN"); + a(t(x = {}), x, "{}"); + + a.throws(function () { + t(); + }, "Undefined"); + a.throws(function () { + t(null); + }, "null"); +}; diff --git a/node_modules/es5-ext/test/object/validate-array-like-object.js b/node_modules/es5-ext/test/object/validate-array-like-object.js new file mode 100644 index 00000000..b10ec69b --- /dev/null +++ b/node_modules/es5-ext/test/object/validate-array-like-object.js @@ -0,0 +1,29 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a.throws(function () { + t(0); +}, TypeError, "0"); + a.throws(function () { + t(false); +}, TypeError, "false"); + a.throws(function () { + t(""); +}, TypeError, "String"); + a.throws(function () { + t({}); +}, TypeError, "Plain Object"); + a.throws(function () { + t(function () {}); +}, TypeError, "Function"); + a(t(x = new String("raz")), x, "String object"); // Jslint: ignore + + a(t(x = { length: 1 }), x, "Array like"); + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "null"); +}; diff --git a/node_modules/es5-ext/test/object/validate-array-like.js b/node_modules/es5-ext/test/object/validate-array-like.js new file mode 100644 index 00000000..6da6b191 --- /dev/null +++ b/node_modules/es5-ext/test/object/validate-array-like.js @@ -0,0 +1,27 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a.throws(function () { + t(0); +}, TypeError, "0"); + a.throws(function () { + t(false); +}, TypeError, "false"); + a(t(""), "", "''"); + a.throws(function () { + t({}); +}, TypeError, "Plain Object"); + a.throws(function () { + t(function () {}); +}, TypeError, "Function"); + a(t(x = new String("raz")), x, "String object"); // Jslint: ignore + + a(t(x = { length: 1 }), x, "Array like"); + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "null"); +}; diff --git a/node_modules/es5-ext/test/object/validate-stringifiable-value.js b/node_modules/es5-ext/test/object/validate-stringifiable-value.js new file mode 100644 index 00000000..8283814a --- /dev/null +++ b/node_modules/es5-ext/test/object/validate-stringifiable-value.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t(null); +}, TypeError, "Null"); + a(t(0), "0"); + a(t(false), "false"); + a(t(""), ""); + a(t({}), String({}), "Object"); + a(t(x = function () {}), String(x), "Function"); + a(t(x = new String("raz")), String(x), "String object"); // Jslint: ignore + a(t(x = new Date()), String(x), "Date"); + + a.throws(function () { + t(Object.create(null)); +}, TypeError, "Null prototype object"); +}; diff --git a/node_modules/es5-ext/test/object/validate-stringifiable.js b/node_modules/es5-ext/test/object/validate-stringifiable.js new file mode 100644 index 00000000..e75a4157 --- /dev/null +++ b/node_modules/es5-ext/test/object/validate-stringifiable.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = function (t, a) { + var x; + a(t(), "undefined", "Undefined"); + a(t(null), "null", "Null"); + a(t(0), "0"); + a(t(false), "false"); + a(t(""), ""); + a(t({}), String({}), "Object"); + a(t(x = function () {}), String(x), "Function"); + a(t(x = new String("raz")), String(x), "String object"); // Jslint: ignore + a(t(x = new Date()), String(x), "Date"); + + a.throws(function () { + t(Object.create(null)); +}, TypeError, "Null prototype object"); +}; diff --git a/node_modules/es5-ext/test/optional-chaining.js b/node_modules/es5-ext/test/optional-chaining.js new file mode 100644 index 00000000..1f7d4056 --- /dev/null +++ b/node_modules/es5-ext/test/optional-chaining.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = function (t, a) { + var obj = { foo: { bar: "elo", par: null } }; + a(t(), undefined); + a(t(null), null); + a(t(obj), obj); + a(t(obj, "foo"), obj.foo); + a(t(obj, "foo", "bar"), "elo"); + a(t(obj, "foo", "bar", "slice"), String.prototype.slice); + a(t(obj, "foo", "par"), null); + a(t(obj, "foo", "par", "marko"), undefined); + a(t(obj, "marko"), undefined); + a(t(""), ""); + a(t("", "foo"), undefined); + a(t("", "slice"), String.prototype.slice); +}; diff --git a/node_modules/es5-ext/test/promise/#/as-callback.js b/node_modules/es5-ext/test/promise/#/as-callback.js new file mode 100644 index 00000000..528d766a --- /dev/null +++ b/node_modules/es5-ext/test/promise/#/as-callback.js @@ -0,0 +1,32 @@ +"use strict"; + +module.exports = function (t, a) { + if (typeof Promise !== "function") return null; + return { + Success: function (d) { + t.call( + new Promise(function (resolve) { + resolve("foo"); + }), + function (error, value) { + a(error, null); + a(value, "foo"); + d(); + } + ); + }, + Failure: function (d) { + var error = new Error("Rejection"); + t.call( + new Promise(function (resolve, reject) { + reject(error); + }), + function (passedError, value) { + a(passedError, error); + a(value, undefined); + d(); + } + ); + } + }; +}; diff --git a/node_modules/es5-ext/test/promise/#/finally/implement.js b/node_modules/es5-ext/test/promise/#/finally/implement.js new file mode 100644 index 00000000..94401862 --- /dev/null +++ b/node_modules/es5-ext/test/promise/#/finally/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../promise/#/finally/is-implemented"); + +if (typeof Promise !== "function") global.Promise = require("plain-promise"); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/node_modules/es5-ext/test/promise/#/finally/index.js b/node_modules/es5-ext/test/promise/#/finally/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/promise/#/finally/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/promise/#/finally/is-implemented.js b/node_modules/es5-ext/test/promise/#/finally/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/promise/#/finally/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/promise/#/finally/shim.js b/node_modules/es5-ext/test/promise/#/finally/shim.js new file mode 100644 index 00000000..a92fab85 --- /dev/null +++ b/node_modules/es5-ext/test/promise/#/finally/shim.js @@ -0,0 +1,75 @@ +"use strict"; + +var microtaskDelay = require("../../../../function/#/microtask-delay"); + +if (typeof Promise !== "function") global.Promise = require("plain-promise"); + +module.exports = function (t, a) { + return { + Success: function (d) { + var invoked; + t.call(Promise.resolve("foo"), function () { + invoked = true; + return "bar"; + }).then( + microtaskDelay.call(function (result) { + a(result, "foo"); + a(invoked, true); + d(); + }, microtaskDelay.call(d)) + ); + }, + Failure: function (d) { + var invoked; + var error = new Error("Some error"); + t.call(Promise.reject(error), function () { + invoked = true; + return "bar"; + }).then( + microtaskDelay.call(function () { + a.never(); + d(); + }), + microtaskDelay.call(function (result) { + a(result, error); + a(invoked, true); + d(); + }) + ); + }, + SuccessFinallyError: function (d) { + var invoked, finallyError = new Error("Finally error"); + t.call(Promise.resolve("foo"), function () { + invoked = true; + throw finallyError; + }).then( + microtaskDelay.call(function () { + a.never(); + d(); + }), + microtaskDelay.call(function (result) { + a(result, finallyError); + a(invoked, true); + d(); + }) + ); + }, + FailureFinallyError: function (d) { + var invoked, finallyError = new Error("Finally error"); + t.call(Promise.reject(new Error("Some error")), function () { + invoked = true; + throw finallyError; + }).then( + microtaskDelay.call(function () { + a.never(); + d(); + }), + microtaskDelay.call(function (result) { + a(result, finallyError); + a(invoked, true); + d(); + }) + ); + } + }; +}; diff --git a/node_modules/es5-ext/test/promise/.eslintrc.json b/node_modules/es5-ext/test/promise/.eslintrc.json new file mode 100644 index 00000000..b8acafa7 --- /dev/null +++ b/node_modules/es5-ext/test/promise/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "globals": { "Promise": true, "setTimeout": true } +} diff --git a/node_modules/es5-ext/test/promise/lazy.js b/node_modules/es5-ext/test/promise/lazy.js new file mode 100644 index 00000000..8c7a5bfa --- /dev/null +++ b/node_modules/es5-ext/test/promise/lazy.js @@ -0,0 +1,52 @@ +"use strict"; + +module.exports = function (t) { + if (typeof Promise !== "function") return null; // Run tests only in ES2015+ env + + return { + "Delays execution": function (a, d) { + var invoked = false; + var promise = t(function (resolve) { + invoked = true; + setTimeout(function () { + resolve(20); + }, 10); + }); + + a(invoked, false); + + setTimeout(function () { + a(invoked, false); + promise.then(function (value) { + a(value, 20); + setTimeout(d, 0); // Escape error swallowing + }); + a(invoked, true); + }, 15); + }, + "Passes rejection": function (a, d) { + var promise = t(function (resolve, reject) { + setTimeout(function () { + reject(new Error("Stop")); + }, 10); + }); + + promise.catch(function (error) { + a(error instanceof Error, true); + a(error.message, "Stop"); + setTimeout(d, 0); // Escape error swallowing + }); + }, + "Passes sync exception": function (a, d) { + var promise = t(function () { + throw new Error("Stop"); + }); + + promise.catch(function (error) { + a(error instanceof Error, true); + a(error.message, "Stop"); + setTimeout(d, 0); // Escape error swallowing + }); + } + }; +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/index.js b/node_modules/es5-ext/test/reg-exp/#/index.js new file mode 100644 index 00000000..7ab9ab8a --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/index.js @@ -0,0 +1,15 @@ +/* eslint-env node */ + +"use strict"; + +var indexTest = require("tad/lib/utils/index-test") + , path = require("path").resolve(__dirname, "../../../reg-exp/#"); + +module.exports = function (t, a, d) { + indexTest( + indexTest.readDir(path).aside(function (data) { + delete data.sticky; + delete data.unicode; + }) + )(t, a, d); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/is-sticky.js b/node_modules/es5-ext/test/reg-exp/#/is-sticky.js new file mode 100644 index 00000000..e65740e7 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/is-sticky.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + var re; + a(t.call(/raz/), false, "Normal"); + a(t.call(/raz/g), false, "Global"); + try { + // eslint-disable-next-line no-invalid-regexp + re = new RegExp("raz", "y"); + } catch (ignore) {} + if (!re) return; + a(t.call(re), true, "Sticky"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/is-unicode.js b/node_modules/es5-ext/test/reg-exp/#/is-unicode.js new file mode 100644 index 00000000..86217aa0 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/is-unicode.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a) { + var re; + a(t.call(/raz/), false, "Normal"); + a(t.call(/raz/g), false, "Global"); + try { + // eslint-disable-next-line no-invalid-regexp + re = new RegExp("raz", "u"); + } catch (ignore) {} + if (!re) return; + a(t.call(re), true, "Unicode"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/match/implement.js b/node_modules/es5-ext/test/reg-exp/#/match/implement.js new file mode 100644 index 00000000..633d9bb6 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/match/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../reg-exp/#/match/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/match/index.js b/node_modules/es5-ext/test/reg-exp/#/match/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/match/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js b/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/match/shim.js b/node_modules/es5-ext/test/reg-exp/#/match/shim.js new file mode 100644 index 00000000..c6fedb57 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/match/shim.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + var result = "foobar".match(/foo/); + a.deep(t.call(/foo/, "foobar"), result); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/replace/implement.js b/node_modules/es5-ext/test/reg-exp/#/replace/implement.js new file mode 100644 index 00000000..7da5e669 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/replace/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../reg-exp/#/replace/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/replace/index.js b/node_modules/es5-ext/test/reg-exp/#/replace/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/replace/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js b/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/replace/shim.js b/node_modules/es5-ext/test/reg-exp/#/replace/shim.js new file mode 100644 index 00000000..4178065d --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/replace/shim.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(/foo/, "foobar", "mar"), "marbar"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/search/implement.js b/node_modules/es5-ext/test/reg-exp/#/search/implement.js new file mode 100644 index 00000000..ded73e27 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/search/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../reg-exp/#/search/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/search/index.js b/node_modules/es5-ext/test/reg-exp/#/search/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/search/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js b/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/search/shim.js b/node_modules/es5-ext/test/reg-exp/#/search/shim.js new file mode 100644 index 00000000..779b1327 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/search/shim.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(/foo/, "barfoo"), 3); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/split/implement.js b/node_modules/es5-ext/test/reg-exp/#/split/implement.js new file mode 100644 index 00000000..4ef532bd --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/split/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../reg-exp/#/split/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/split/index.js b/node_modules/es5-ext/test/reg-exp/#/split/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/split/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js b/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/split/shim.js b/node_modules/es5-ext/test/reg-exp/#/split/shim.js new file mode 100644 index 00000000..a01250e9 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/split/shim.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t.call(/\|/, "bar|foo"), ["bar", "foo"]); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js b/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js new file mode 100644 index 00000000..d7e59bf9 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../reg-exp/#/sticky/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js b/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js b/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js new file mode 100644 index 00000000..9cb2b379 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../reg-exp/#/unicode/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js b/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/escape.js b/node_modules/es5-ext/test/reg-exp/escape.js new file mode 100644 index 00000000..9478f523 --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/escape.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + var str = "(?:^te|er)s{2}t\\[raz]+$"; + a(RegExp("^" + t(str) + "$").test(str), true); +}; diff --git a/node_modules/es5-ext/test/reg-exp/is-reg-exp.js b/node_modules/es5-ext/test/reg-exp/is-reg-exp.js new file mode 100644 index 00000000..7727eaba --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/is-reg-exp.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a(t("arar"), false, "String"); + a(t(12), false, "Number"); + a(t(true), false, "Boolean"); + a(t(new Date()), false, "Date"); + a(t(new String("raz")), false, "String object"); + a(t({}), false, "Plain object"); + a(t(/a/), true, "Regular expression"); + a(t(new RegExp("a")), true, "Regular expression via constructor"); +}; diff --git a/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js b/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js new file mode 100644 index 00000000..2f99441b --- /dev/null +++ b/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js @@ -0,0 +1,19 @@ +"use strict"; + +module.exports = function (t, a) { + var r = /raz/; + a(t(r), r, "Direct"); + r = new RegExp("foo"); + a(t(r), r, "Constructor"); + a.throws(function () { + t({}); + }, "Object"); + a.throws(function () { + t(function () {}); + }, "Function"); + a.throws(function () { + t({ exec: function () { + return 20; +} }); + }, "Plain object"); +}; diff --git a/node_modules/es5-ext/test/safe-to-string.js b/node_modules/es5-ext/test/safe-to-string.js new file mode 100644 index 00000000..8f545e5b --- /dev/null +++ b/node_modules/es5-ext/test/safe-to-string.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(), "undefined"); + a(t(null), "null"); + a(t(10), "10"); + a(t("str"), "str"); + a(t({ toString: function () { return "miszka"; } }), "miszka"); + // eslint-disable-next-line symbol-description + if (typeof Symbol === "function") a(t(Symbol()), "Symbol()"); + a(t(Object.create(null)), ""); +}; diff --git a/node_modules/es5-ext/test/string/#/@@iterator/implement.js b/node_modules/es5-ext/test/string/#/@@iterator/implement.js new file mode 100644 index 00000000..c984fb26 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/@@iterator/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../string/#/@@iterator/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/#/@@iterator/index.js b/node_modules/es5-ext/test/string/#/@@iterator/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/@@iterator/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js b/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/#/@@iterator/shim.js b/node_modules/es5-ext/test/string/#/@@iterator/shim.js new file mode 100644 index 00000000..467cdc35 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/@@iterator/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + var it = t.call("r💩z"); + a.deep(it.next(), { done: false, value: "r" }, "#1"); + a.deep(it.next(), { done: false, value: "💩" }, "#2"); + a.deep(it.next(), { done: false, value: "z" }, "#3"); + a.deep(it.next(), { done: true, value: undefined }, "End"); +}; diff --git a/node_modules/es5-ext/test/string/#/at.js b/node_modules/es5-ext/test/string/#/at.js new file mode 100644 index 00000000..a614f938 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/at.js @@ -0,0 +1,132 @@ +/* eslint no-useless-call: "off" */ +// See tests at https://github.com/mathiasbynens/String.prototype.at + +"use strict"; + +module.exports = function (t, a) { + a(t.length, 1, "Length"); + + a.h1("BMP"); + a(t.call("abc\uD834\uDF06def", -Infinity), "", "-Infinity"); + a(t.call("abc\uD834\uDF06def", -1), "", "-1"); + a(t.call("abc\uD834\uDF06def", -0), "a", "-0"); + a(t.call("abc\uD834\uDF06def", +0), "a", "+0"); + a(t.call("abc\uD834\uDF06def", 1), "b", "1"); + a(t.call("abc\uD834\uDF06def", 3), "\uD834\uDF06", "3"); + a(t.call("abc\uD834\uDF06def", 4), "\uDF06", "4"); + a(t.call("abc\uD834\uDF06def", 5), "d", "5"); + a(t.call("abc\uD834\uDF06def", 42), "", "42"); + a(t.call("abc\uD834\uDF06def", Number(Infinity)), "", "+Infinity"); + a(t.call("abc\uD834\uDF06def", null), "a", "null"); + a(t.call("abc\uD834\uDF06def", undefined), "a", "undefined"); + a(t.call("abc\uD834\uDF06def"), "a", "No argument"); + a(t.call("abc\uD834\uDF06def", false), "a", "false"); + a(t.call("abc\uD834\uDF06def", NaN), "a", "NaN"); + a(t.call("abc\uD834\uDF06def", ""), "a", "Empty string"); + a(t.call("abc\uD834\uDF06def", "_"), "a", "_"); + a(t.call("abc\uD834\uDF06def", "1"), "b", "'1'"); + a(t.call("abc\uD834\uDF06def", []), "a", "[]"); + a(t.call("abc\uD834\uDF06def", {}), "a", "{}"); + a(t.call("abc\uD834\uDF06def", -0.9), "a", "-0.9"); + a(t.call("abc\uD834\uDF06def", 1.9), "b", "1.9"); + a(t.call("abc\uD834\uDF06def", 7.9), "f", "7.9"); + a(t.call("abc\uD834\uDF06def", Math.pow(2, 32)), "", "Big number"); + + a.h1("Astral symbol"); + a(t.call("\uD834\uDF06def", -Infinity), "", "-Infinity"); + a(t.call("\uD834\uDF06def", -1), "", "-1"); + a(t.call("\uD834\uDF06def", -0), "\uD834\uDF06", "-0"); + a(t.call("\uD834\uDF06def", +0), "\uD834\uDF06", "+0"); + a(t.call("\uD834\uDF06def", 1), "\uDF06", "1"); + a(t.call("\uD834\uDF06def", 2), "d", "2"); + a(t.call("\uD834\uDF06def", 3), "e", "3"); + a(t.call("\uD834\uDF06def", 4), "f", "4"); + a(t.call("\uD834\uDF06def", 42), "", "42"); + a(t.call("\uD834\uDF06def", Number(Infinity)), "", "+Infinity"); + a(t.call("\uD834\uDF06def", null), "\uD834\uDF06", "null"); + a(t.call("\uD834\uDF06def", undefined), "\uD834\uDF06", "undefined"); + a(t.call("\uD834\uDF06def"), "\uD834\uDF06", "No arguments"); + a(t.call("\uD834\uDF06def", false), "\uD834\uDF06", "false"); + a(t.call("\uD834\uDF06def", NaN), "\uD834\uDF06", "NaN"); + a(t.call("\uD834\uDF06def", ""), "\uD834\uDF06", "Empty string"); + a(t.call("\uD834\uDF06def", "_"), "\uD834\uDF06", "_"); + a(t.call("\uD834\uDF06def", "1"), "\uDF06", "'1'"); + + a.h1("Lone high surrogates"); + a(t.call("\uD834abc", -Infinity), "", "-Infinity"); + a(t.call("\uD834abc", -1), "", "-1"); + a(t.call("\uD834abc", -0), "\uD834", "-0"); + a(t.call("\uD834abc", +0), "\uD834", "+0"); + a(t.call("\uD834abc", 1), "a", "1"); + a(t.call("\uD834abc", 42), "", "42"); + a(t.call("\uD834abc", Number(Infinity)), "", "Infinity"); + a(t.call("\uD834abc", null), "\uD834", "null"); + a(t.call("\uD834abc", undefined), "\uD834", "undefined"); + a(t.call("\uD834abc"), "\uD834", "No arguments"); + a(t.call("\uD834abc", false), "\uD834", "false"); + a(t.call("\uD834abc", NaN), "\uD834", "NaN"); + a(t.call("\uD834abc", ""), "\uD834", "Empty string"); + a(t.call("\uD834abc", "_"), "\uD834", "_"); + a(t.call("\uD834abc", "1"), "a", "'a'"); + + a.h1("Lone low surrogates"); + a(t.call("\uDF06abc", -Infinity), "", "-Infinity"); + a(t.call("\uDF06abc", -1), "", "-1"); + a(t.call("\uDF06abc", -0), "\uDF06", "-0"); + a(t.call("\uDF06abc", +0), "\uDF06", "+0"); + a(t.call("\uDF06abc", 1), "a", "1"); + a(t.call("\uDF06abc", 42), "", "42"); + a(t.call("\uDF06abc", Number(Infinity)), "", "+Infinity"); + a(t.call("\uDF06abc", null), "\uDF06", "null"); + a(t.call("\uDF06abc", undefined), "\uDF06", "undefined"); + a(t.call("\uDF06abc"), "\uDF06", "No arguments"); + a(t.call("\uDF06abc", false), "\uDF06", "false"); + a(t.call("\uDF06abc", NaN), "\uDF06", "NaN"); + a(t.call("\uDF06abc", ""), "\uDF06", "Empty string"); + a(t.call("\uDF06abc", "_"), "\uDF06", "_"); + a(t.call("\uDF06abc", "1"), "a", "'1'"); + + a.h1("Context"); + a.throws( + function () { + t.call(undefined); + }, + TypeError, + "Undefined" + ); + a.throws( + function () { + t.call(undefined, 4); + }, + TypeError, + "Undefined + argument" + ); + a.throws( + function () { + t.call(null); + }, + TypeError, + "Null" + ); + a.throws( + function () { + t.call(null, 4); + }, + TypeError, + "Null + argument" + ); + a(t.call(42, 0), "4", "Number #1"); + a(t.call(42, 1), "2", "Number #2"); + a( + t.call( + { + toString: function () { + return "abc"; + } + }, + 2 + ), + "c", + "Object" + ); +}; diff --git a/node_modules/es5-ext/test/string/#/camel-to-hyphen.js b/node_modules/es5-ext/test/string/#/camel-to-hyphen.js new file mode 100644 index 00000000..bbf9ae48 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/camel-to-hyphen.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("razDwaTRzy4yFoo45My"), "raz-dwa-t-rzy4y-foo45-my"); + a(t.call("razDwaTRzy4yFoo45My-"), "raz-dwa-t-rzy4y-foo45-my-"); + a(t.call("razDwaTRzy4yFoo45My--"), "raz-dwa-t-rzy4y-foo45-my--"); +}; diff --git a/node_modules/es5-ext/test/string/#/capitalize.js b/node_modules/es5-ext/test/string/#/capitalize.js new file mode 100644 index 00000000..884ae9cb --- /dev/null +++ b/node_modules/es5-ext/test/string/#/capitalize.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("raz"), "Raz", "Word"); + a(t.call("BLA"), "BLA", "Uppercase"); + a(t.call(""), "", "Empty"); + a(t.call("a"), "A", "One letter"); + a(t.call("this is a test"), "This is a test", "Sentence"); +}; diff --git a/node_modules/es5-ext/test/string/#/case-insensitive-compare.js b/node_modules/es5-ext/test/string/#/case-insensitive-compare.js new file mode 100644 index 00000000..8117f920 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/case-insensitive-compare.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("AA", "aa"), 0, "Same"); + a.ok(t.call("Amber", "zebra") < 0, "Less"); + a.ok(t.call("Zebra", "amber") > 0, "Greater"); +}; diff --git a/node_modules/es5-ext/test/string/#/code-point-at/implement.js b/node_modules/es5-ext/test/string/#/code-point-at/implement.js new file mode 100644 index 00000000..f966c535 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/code-point-at/implement.js @@ -0,0 +1,8 @@ +"use strict"; + +var isImplemented = + require("../../../../string/#/code-point-at/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/#/code-point-at/index.js b/node_modules/es5-ext/test/string/#/code-point-at/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/code-point-at/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js b/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/#/code-point-at/shim.js b/node_modules/es5-ext/test/string/#/code-point-at/shim.js new file mode 100644 index 00000000..40d62766 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/code-point-at/shim.js @@ -0,0 +1,119 @@ +/* eslint no-useless-call: "off" */ + +// Taken from: https://github.com/mathiasbynens/String.prototype.codePointAt +// /blob/master/tests/tests.js + +"use strict"; + +module.exports = function (t, a) { + a(t.length, 1, "Length"); + + // String that starts with a BMP symbol + a(t.call("abc\uD834\uDF06def", ""), 0x61); + a(t.call("abc\uD834\uDF06def", "_"), 0x61); + a(t.call("abc\uD834\uDF06def"), 0x61); + a(t.call("abc\uD834\uDF06def", -Infinity), undefined); + a(t.call("abc\uD834\uDF06def", -1), undefined); + a(t.call("abc\uD834\uDF06def", -0), 0x61); + a(t.call("abc\uD834\uDF06def", 0), 0x61); + a(t.call("abc\uD834\uDF06def", 3), 0x1d306); + a(t.call("abc\uD834\uDF06def", 4), 0xdf06); + a(t.call("abc\uD834\uDF06def", 5), 0x64); + a(t.call("abc\uD834\uDF06def", 42), undefined); + a(t.call("abc\uD834\uDF06def", Infinity), undefined); + a(t.call("abc\uD834\uDF06def", Infinity), undefined); + a(t.call("abc\uD834\uDF06def", NaN), 0x61); + a(t.call("abc\uD834\uDF06def", false), 0x61); + a(t.call("abc\uD834\uDF06def", null), 0x61); + a(t.call("abc\uD834\uDF06def", undefined), 0x61); + + // String that starts with an astral symbol + a(t.call("\uD834\uDF06def", ""), 0x1d306); + a(t.call("\uD834\uDF06def", "1"), 0xdf06); + a(t.call("\uD834\uDF06def", "_"), 0x1d306); + a(t.call("\uD834\uDF06def"), 0x1d306); + a(t.call("\uD834\uDF06def", -1), undefined); + a(t.call("\uD834\uDF06def", -0), 0x1d306); + a(t.call("\uD834\uDF06def", 0), 0x1d306); + a(t.call("\uD834\uDF06def", 1), 0xdf06); + a(t.call("\uD834\uDF06def", 42), undefined); + a(t.call("\uD834\uDF06def", false), 0x1d306); + a(t.call("\uD834\uDF06def", null), 0x1d306); + a(t.call("\uD834\uDF06def", undefined), 0x1d306); + + // Lone high surrogates + a(t.call("\uD834abc", ""), 0xd834); + a(t.call("\uD834abc", "_"), 0xd834); + a(t.call("\uD834abc"), 0xd834); + a(t.call("\uD834abc", -1), undefined); + a(t.call("\uD834abc", -0), 0xd834); + a(t.call("\uD834abc", 0), 0xd834); + a(t.call("\uD834abc", false), 0xd834); + a(t.call("\uD834abc", NaN), 0xd834); + a(t.call("\uD834abc", null), 0xd834); + a(t.call("\uD834abc", undefined), 0xd834); + + // Lone low surrogates + a(t.call("\uDF06abc", ""), 0xdf06); + a(t.call("\uDF06abc", "_"), 0xdf06); + a(t.call("\uDF06abc"), 0xdf06); + a(t.call("\uDF06abc", -1), undefined); + a(t.call("\uDF06abc", -0), 0xdf06); + a(t.call("\uDF06abc", 0), 0xdf06); + a(t.call("\uDF06abc", false), 0xdf06); + a(t.call("\uDF06abc", NaN), 0xdf06); + a(t.call("\uDF06abc", null), 0xdf06); + a(t.call("\uDF06abc", undefined), 0xdf06); + + a.throws(function () { + t.call(undefined); + }, TypeError); + a.throws(function () { + t.call(undefined, 4); + }, TypeError); + a.throws(function () { + t.call(null); + }, TypeError); + a.throws(function () { + t.call(null, 4); + }, TypeError); + a(t.call(42, 0), 0x34); + a(t.call(42, 1), 0x32); + a( + t.call( + { + toString: function () { + return "abc"; + } + }, + 2 + ), + 0x63 + ); + + a.throws(function () { + t.apply(undefined); + }, TypeError); + a.throws(function () { + t.apply(undefined, [4]); + }, TypeError); + a.throws(function () { + t.apply(null); + }, TypeError); + a.throws(function () { + t.apply(null, [4]); + }, TypeError); + a(t.apply(42, [0]), 0x34); + a(t.apply(42, [1]), 0x32); + a( + t.apply( + { + toString: function () { + return "abc"; + } + }, + [2] + ), + 0x63 + ); +}; diff --git a/node_modules/es5-ext/test/string/#/contains/implement.js b/node_modules/es5-ext/test/string/#/contains/implement.js new file mode 100644 index 00000000..297a832f --- /dev/null +++ b/node_modules/es5-ext/test/string/#/contains/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../string/#/contains/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/#/contains/index.js b/node_modules/es5-ext/test/string/#/contains/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/contains/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/#/contains/is-implemented.js b/node_modules/es5-ext/test/string/#/contains/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/contains/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/#/contains/shim.js b/node_modules/es5-ext/test/string/#/contains/shim.js new file mode 100644 index 00000000..0a73671d --- /dev/null +++ b/node_modules/es5-ext/test/string/#/contains/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("raz", ""), true, "Empty"); + a(t.call("", ""), true, "Both Empty"); + a(t.call("raz", "raz"), true, "Same"); + a(t.call("razdwa", "raz"), true, "Starts with"); + a(t.call("razdwa", "dwa"), true, "Ends with"); + a(t.call("razdwa", "zdw"), true, "In middle"); + a(t.call("", "raz"), false, "Something in empty"); + a(t.call("az", "raz"), false, "Longer"); + a(t.call("azasdfasdf", "azff"), false, "Not found"); + a(t.call("razdwa", "raz", 1), false, "Position"); +}; diff --git a/node_modules/es5-ext/test/string/#/count.js b/node_modules/es5-ext/test/string/#/count.js new file mode 100644 index 00000000..d259c901 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/count.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + a.throws(function () { + t.call("", ""); + }); + a(t.call("x", "x"), 1); + a(t.call("xx", "x"), 2); + a(t.call("xxx", "xx"), 1); + a(t.call("xxxx", "xx"), 2); + a(t.call("xx", "xxx"), 0); + a(t.call("", "elo"), 0); + a(t.call("fooo", "foofooo"), 0); +}; diff --git a/node_modules/es5-ext/test/string/#/ends-with/implement.js b/node_modules/es5-ext/test/string/#/ends-with/implement.js new file mode 100644 index 00000000..5a2ca3cc --- /dev/null +++ b/node_modules/es5-ext/test/string/#/ends-with/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../string/#/ends-with/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/#/ends-with/index.js b/node_modules/es5-ext/test/string/#/ends-with/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/ends-with/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js b/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/#/ends-with/shim.js b/node_modules/es5-ext/test/string/#/ends-with/shim.js new file mode 100644 index 00000000..75398833 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/ends-with/shim.js @@ -0,0 +1,16 @@ +// In some parts copied from: +// http://closure-library.googlecode.com/svn/trunk/closure/goog/ +// string/string_test.html + +"use strict"; + +module.exports = function (t, a) { + a(t.call("abc", ""), true, "Empty needle"); + a(t.call("abcd", "cd"), true, "Ends with needle"); + a(t.call("abcd", "abcd"), true, "Needle equals haystack"); + a(t.call("abcd", "ab"), false, "Doesn't end with needle"); + a(t.call("abc", "defg"), false, "Length trick"); + a(t.call("razdwa", "zd", 3), false, "Position: false"); + a(t.call("razdwa", "zd", 4), true, "Position: true"); + a(t.call("razdwa", "zd", 5), false, "Position: false #2"); +}; diff --git a/node_modules/es5-ext/test/string/#/hyphen-to-camel.js b/node_modules/es5-ext/test/string/#/hyphen-to-camel.js new file mode 100644 index 00000000..89c8161c --- /dev/null +++ b/node_modules/es5-ext/test/string/#/hyphen-to-camel.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("raz-dwa-t-rzy-4y-rtr4-tiu-45-pa"), "razDwaTRzy4yRtr4Tiu45Pa"); + a(t.call("raz-dwa-t-rzy-4y-rtr4-tiu-45-pa-"), "razDwaTRzy4yRtr4Tiu45Pa-"); + a(t.call("raz-dwa-t-rzy-4y-rtr4-tiu-45-pa--"), "razDwaTRzy4yRtr4Tiu45Pa--"); +}; diff --git a/node_modules/es5-ext/test/string/#/indent.js b/node_modules/es5-ext/test/string/#/indent.js new file mode 100644 index 00000000..6b1dd895 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/indent.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("ra\nzz", ""), "ra\nzz", "Empty"); + a(t.call("ra\nzz", "\t", 3), "\t\t\tra\n\t\t\tzz", "String repeat"); + a(t.call("ra\nzz\nsss\nfff\n", "\t"), "\tra\n\tzz\n\tsss\n\tfff\n", + "Multi-line"); + a(t.call("ra\n\nzz\n", "\t"), "\tra\n\n\tzz\n", "Don't touch empty lines"); +}; diff --git a/node_modules/es5-ext/test/string/#/last.js b/node_modules/es5-ext/test/string/#/last.js new file mode 100644 index 00000000..fea798d6 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/last.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call(""), null, "Null"); + a(t.call("abcdef"), "f", "String"); +}; diff --git a/node_modules/es5-ext/test/string/#/normalize/_data.js b/node_modules/es5-ext/test/string/#/normalize/_data.js new file mode 100644 index 00000000..96312119 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/normalize/_data.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t[0], "object"); +}; diff --git a/node_modules/es5-ext/test/string/#/normalize/implement.js b/node_modules/es5-ext/test/string/#/normalize/implement.js new file mode 100644 index 00000000..b053aa89 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/normalize/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../string/#/normalize/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/#/normalize/index.js b/node_modules/es5-ext/test/string/#/normalize/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/normalize/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/#/normalize/is-implemented.js b/node_modules/es5-ext/test/string/#/normalize/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/normalize/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/#/normalize/shim.js b/node_modules/es5-ext/test/string/#/normalize/shim.js new file mode 100644 index 00000000..0c80aa40 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/normalize/shim.js @@ -0,0 +1,13 @@ +// Taken from: https://github.com/walling/unorm/blob/master/test/es6-shim.js + +"use strict"; + +var str = "äiti"; + +module.exports = function (t, a) { + a(t.call(str), "\u00e4iti"); + a(t.call(str, "NFC"), "\u00e4iti"); + a(t.call(str, "NFD"), "a\u0308iti"); + a(t.call(str, "NFKC"), "\u00e4iti"); + a(t.call(str, "NFKD"), "a\u0308iti"); +}; diff --git a/node_modules/es5-ext/test/string/#/pad.js b/node_modules/es5-ext/test/string/#/pad.js new file mode 100644 index 00000000..e573453f --- /dev/null +++ b/node_modules/es5-ext/test/string/#/pad.js @@ -0,0 +1,24 @@ +"use strict"; + +var partial = require("../../../function/#/partial"); + +module.exports = { + Left: function (t, a) { + t = partial.call(t, "x", 5); + + a(t.call("yy"), "xxxyy"); + a(t.call(""), "xxxxx", "Empty string"); + + a(t.call("yyyyy"), "yyyyy", "Equal length"); + a(t.call("yyyyyyy"), "yyyyyyy", "Longer"); + }, + Right: function (t, a) { + t = partial.call(t, "x", -5); + + a(t.call("yy"), "yyxxx"); + a(t.call(""), "xxxxx", "Empty string"); + + a(t.call("yyyyy"), "yyyyy", "Equal length"); + a(t.call("yyyyyyy"), "yyyyyyy", "Longer"); + } +}; diff --git a/node_modules/es5-ext/test/string/#/plain-replace-all.js b/node_modules/es5-ext/test/string/#/plain-replace-all.js new file mode 100644 index 00000000..e5f801c6 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/plain-replace-all.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("razdwatrzy", "dwa", "olera"), "razoleratrzy", "Basic"); + a(t.call("razdwatrzy", "dwa", "ole$&a"), "razole$&atrzy", "Inserts"); + a(t.call("razdwa", "ola", "sdfs"), "razdwa", "No replace"); + + a(t.call("$raz$$dwa$trzy$", "$", "&&"), "&&raz&&&&dwa&&trzy&&", "Multi"); + a(t.call("$raz$$dwa$$$$trzy$", "$$", "&"), "$raz&dwa&&trzy$", + "Multi many chars"); +}; diff --git a/node_modules/es5-ext/test/string/#/plain-replace.js b/node_modules/es5-ext/test/string/#/plain-replace.js new file mode 100644 index 00000000..9f6c2bee --- /dev/null +++ b/node_modules/es5-ext/test/string/#/plain-replace.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("razdwatrzy", "dwa", "olera"), "razoleratrzy", "Basic"); + a(t.call("razdwatrzy", "dwa", "ole$&a"), "razole$&atrzy", "Inserts"); + a(t.call("razdwa", "ola", "sdfs"), "razdwa", "No replace"); +}; diff --git a/node_modules/es5-ext/test/string/#/repeat/implement.js b/node_modules/es5-ext/test/string/#/repeat/implement.js new file mode 100644 index 00000000..27096289 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/repeat/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../string/#/repeat/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/#/repeat/index.js b/node_modules/es5-ext/test/string/#/repeat/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/repeat/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/#/repeat/is-implemented.js b/node_modules/es5-ext/test/string/#/repeat/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/repeat/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/#/repeat/shim.js b/node_modules/es5-ext/test/string/#/repeat/shim.js new file mode 100644 index 00000000..c5848840 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/repeat/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("a", 0), "", "Empty"); + a(t.call("a", 1), "a", "1"); + a(t.call("a", 2), "aa", "2"); + a(t.call("\t", 5), "\t\t\t\t\t", "Whitespace"); + a(t.call("raz", 3), "razrazraz", "Many chars"); + a(t.call("raz", 3), "razrazraz", "Many chars"); + a(t.call("razfoobar", 5), "razfoobarrazfoobarrazfoobarrazfoobarrazfoobar", "Many chars"); + a(t.call("a", 300).length, 300); +}; diff --git a/node_modules/es5-ext/test/string/#/starts-with/implement.js b/node_modules/es5-ext/test/string/#/starts-with/implement.js new file mode 100644 index 00000000..d1f1ce25 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/starts-with/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../../string/#/starts-with/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/#/starts-with/index.js b/node_modules/es5-ext/test/string/#/starts-with/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/starts-with/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js b/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/#/starts-with/shim.js b/node_modules/es5-ext/test/string/#/starts-with/shim.js new file mode 100644 index 00000000..4b5e4e40 --- /dev/null +++ b/node_modules/es5-ext/test/string/#/starts-with/shim.js @@ -0,0 +1,14 @@ +// Inspired and in some parts copied from: +// http://closure-library.googlecode.com/svn/trunk/closure/goog +// /string/string_test.html + +"use strict"; + +module.exports = function (t, a) { + a(t.call("abc", ""), true, "Empty needle"); + a(t.call("abcd", "ab"), true, "Starts with needle"); + a(t.call("abcd", "abcd"), true, "Needle equals haystack"); + a(t.call("abcd", "bcde", 1), false, "Needle larger than haystack"); + a(!t.call("abcd", "cd"), true, "Doesn't start with needle"); + a(t.call("abcd", "bc", 1), true, "Position"); +}; diff --git a/node_modules/es5-ext/test/string/#/uncapitalize.js b/node_modules/es5-ext/test/string/#/uncapitalize.js new file mode 100644 index 00000000..cddd847c --- /dev/null +++ b/node_modules/es5-ext/test/string/#/uncapitalize.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t.call("raz"), "raz", "Word"); + a(t.call("BLA"), "bLA", "Uppercase"); + a(t.call(""), "", "Empty"); + a(t.call("a"), "a", "One letter"); + a(t.call("this is a test"), "this is a test", "Sentence"); + a(t.call("This is a test"), "this is a test", "Capitalized sentence"); +}; diff --git a/node_modules/es5-ext/test/string/format-method.js b/node_modules/es5-ext/test/string/format-method.js new file mode 100644 index 00000000..d0c216b4 --- /dev/null +++ b/node_modules/es5-ext/test/string/format-method.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function (t, a) { + t = t({ + a: "A", + aa: "B", + ab: "C", + b: "D", + c: function () { + return ++this.a; + } + }); + a(t.call({ a: 0 }, " %a%aab%abb%b\\%aa%ab%c%c "), " ABbCbD%aaC12 "); +}; diff --git a/node_modules/es5-ext/test/string/from-code-point/implement.js b/node_modules/es5-ext/test/string/from-code-point/implement.js new file mode 100644 index 00000000..31ed7b5b --- /dev/null +++ b/node_modules/es5-ext/test/string/from-code-point/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../string/from-code-point/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/from-code-point/index.js b/node_modules/es5-ext/test/string/from-code-point/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/string/from-code-point/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/from-code-point/is-implemented.js b/node_modules/es5-ext/test/string/from-code-point/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/string/from-code-point/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/from-code-point/shim.js b/node_modules/es5-ext/test/string/from-code-point/shim.js new file mode 100644 index 00000000..023931f1 --- /dev/null +++ b/node_modules/es5-ext/test/string/from-code-point/shim.js @@ -0,0 +1,73 @@ +// Taken from: https://github.com/mathiasbynens/String.fromCodePoint/blob/master +// /tests/tests.js + +"use strict"; + +var pow = Math.pow; + +module.exports = function (t, a) { + var counter, result; + + a(t.length, 1, "Length"); + a(String.propertyIsEnumerable("fromCodePoint"), false, "Not enumerable"); + + a(t(""), "\0", "Empty string"); + a(t(), "", "No arguments"); + a(t(-0), "\0", "-0"); + a(t(0), "\0", "0"); + a(t(0x1D306), "\uD834\uDF06", "Unicode"); + a(t(0x1D306, 0x61, 0x1D307), "\uD834\uDF06a\uD834\uDF07", "Complex unicode"); + a(t(0x61, 0x62, 0x1D307), "ab\uD834\uDF07", "Complex"); + a(t(false), "\0", "false"); + a(t(null), "\0", "null"); + + a.throws(function () { + t("_"); +}, RangeError, "_"); + a.throws(function () { + t(Infinity); +}, RangeError, "Infinity"); + a.throws(function () { + t(-Infinity); +}, RangeError, "-Infinity"); + a.throws(function () { + t(-1); +}, RangeError, "-1"); + a.throws(function () { + t(0x10FFFF + 1); +}, RangeError, "Range error #1"); + a.throws(function () { + t(3.14); +}, RangeError, "Range error #2"); + a.throws(function () { + t(3e-2); +}, RangeError, "Range error #3"); + a.throws(function () { + t(-Infinity); +}, RangeError, "Range error #4"); + a.throws(function () { + t(Number(Infinity)); +}, RangeError, "Range error #5"); + a.throws(function () { + t(NaN); +}, RangeError, "Range error #6"); + a.throws(function () { + t(undefined); +}, RangeError, "Range error #7"); + a.throws(function () { + t({}); +}, RangeError, "Range error #8"); + a.throws(function () { + t(/re/); +}, RangeError, "Range error #9"); + + counter = pow(2, 15) * 3 / 2; + result = []; + while (--counter >= 0) result.push(0); // One code unit per symbol + t.apply(null, result); // Must not throw + + counter = pow(2, 15) * 3 / 2; + result = []; + while (--counter >= 0) result.push(0xFFFF + 1); // Two code units per symbol + t.apply(null, result); // Must not throw +}; diff --git a/node_modules/es5-ext/test/string/is-string.js b/node_modules/es5-ext/test/string/is-string.js new file mode 100644 index 00000000..0e831221 --- /dev/null +++ b/node_modules/es5-ext/test/string/is-string.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(null), false, "Null"); + a(t(""), true, "Empty string"); + a(t(12), false, "Number"); + a(t(false), false, "Boolean"); + a(t(new Date()), false, "Date"); + a(t(new String("raz")), true, "String object"); + a(t("asdfaf"), true, "String"); +}; diff --git a/node_modules/es5-ext/test/string/random-uniq.js b/node_modules/es5-ext/test/string/random-uniq.js new file mode 100644 index 00000000..3b6d889a --- /dev/null +++ b/node_modules/es5-ext/test/string/random-uniq.js @@ -0,0 +1,14 @@ +"use strict"; + +var isValidFormat = RegExp.prototype.test.bind(/^[a-z0-9]+$/); + +module.exports = function (t, a) { + a(typeof t(), "string"); + a.ok(t().length > 7); + a.not(t(), t()); + a.ok(isValidFormat(t())); + a.ok(isValidFormat(t())); + a.ok(isValidFormat(t())); + a.ok(isValidFormat(t())); + a.ok(isValidFormat(t())); +}; diff --git a/node_modules/es5-ext/test/string/random.js b/node_modules/es5-ext/test/string/random.js new file mode 100644 index 00000000..3fa44ca5 --- /dev/null +++ b/node_modules/es5-ext/test/string/random.js @@ -0,0 +1,13 @@ +"use strict"; + +var isValidFormat = RegExp.prototype.test.bind(/^[a-z0-9]+$/); + +module.exports = function (t, a) { + a(typeof t(), "string"); + a.ok(t().length > 7); + a.not(t({ isUnique: true }), t({ isUnique: true })); + a.ok(isValidFormat(t())); + a(t({ length: 1 }).length, 1); + a(t({ length: 100 }).length, 100); + a(t({ length: 0 }), ""); +}; diff --git a/node_modules/es5-ext/test/string/raw/implement.js b/node_modules/es5-ext/test/string/raw/implement.js new file mode 100644 index 00000000..25b624e8 --- /dev/null +++ b/node_modules/es5-ext/test/string/raw/implement.js @@ -0,0 +1,7 @@ +"use strict"; + +var isImplemented = require("../../../string/raw/is-implemented"); + +module.exports = function (a) { + a(isImplemented(), true); +}; diff --git a/node_modules/es5-ext/test/string/raw/index.js b/node_modules/es5-ext/test/string/raw/index.js new file mode 100644 index 00000000..10bb8f65 --- /dev/null +++ b/node_modules/es5-ext/test/string/raw/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/string/raw/is-implemented.js b/node_modules/es5-ext/test/string/raw/is-implemented.js new file mode 100644 index 00000000..5003e7e9 --- /dev/null +++ b/node_modules/es5-ext/test/string/raw/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t(), "boolean"); +}; diff --git a/node_modules/es5-ext/test/string/raw/shim.js b/node_modules/es5-ext/test/string/raw/shim.js new file mode 100644 index 00000000..17a11ac5 --- /dev/null +++ b/node_modules/es5-ext/test/string/raw/shim.js @@ -0,0 +1,15 @@ +// Partially taken from: +// https://github.com/paulmillr/es6-shim/blob/master/test/string.js + +"use strict"; + +module.exports = function (t, a) { + var callSite = []; + + callSite.raw = ["The total is ", " ($", " with tax)"]; + a(t(callSite, "{total}", "{total * 1.01}"), + "The total is {total} (${total * 1.01} with tax)"); + + callSite.raw = []; + a(t(callSite, "{total}", "{total * 1.01}"), ""); +}; diff --git a/node_modules/es5-ext/test/to-short-string-representation.js b/node_modules/es5-ext/test/to-short-string-representation.js new file mode 100644 index 00000000..cac8d870 --- /dev/null +++ b/node_modules/es5-ext/test/to-short-string-representation.js @@ -0,0 +1,16 @@ +"use strict"; + +var repeat = require("../string/#/repeat"); + +module.exports = function (t, a) { + a(t(), "undefined"); + a(t(null), "null"); + a(t(10), "10"); + a(t("str"), "str"); + a(t({ toString: function () { return "miszka"; } }), "miszka"); + // eslint-disable-next-line symbol-description + if (typeof Symbol === "function") a(t(Symbol()), "Symbol()"); + a(t(Object.create(null)), ""); + a(t(repeat.call("a", 300)), repeat.call("a", 99) + "…"); + a(t("mar\ntoo\nfar"), "mar\\ntoo\\nfar"); +}; diff --git a/node_modules/es5-ext/to-short-string-representation.js b/node_modules/es5-ext/to-short-string-representation.js new file mode 100644 index 00000000..5aede538 --- /dev/null +++ b/node_modules/es5-ext/to-short-string-representation.js @@ -0,0 +1,16 @@ +"use strict"; + +var safeToString = require("./safe-to-string"); + +var reNewLine = /[\n\r\u2028\u2029]/g; + +module.exports = function (value) { + var string = safeToString(value); + // Trim if too long + if (string.length > 100) string = string.slice(0, 99) + "…"; + // Replace eventual new lines + string = string.replace(reNewLine, function (char) { + return JSON.stringify(char).slice(1, -1); + }); + return string; +}; diff --git a/node_modules/es6-iterator/#/chain.js b/node_modules/es6-iterator/#/chain.js new file mode 100644 index 00000000..190a3464 --- /dev/null +++ b/node_modules/es6-iterator/#/chain.js @@ -0,0 +1,40 @@ +"use strict"; + +var setPrototypeOf = require("es5-ext/object/set-prototype-of") + , d = require("d") + , Iterator = require("../") + , validIterable = require("../valid-iterable") + + , push = Array.prototype.push + , defineProperties = Object.defineProperties + , IteratorChain; + +IteratorChain = function (iterators) { + defineProperties(this, { + __iterators__: d("", iterators), + __current__: d("w", iterators.shift()) + }); +}; +if (setPrototypeOf) setPrototypeOf(IteratorChain, Iterator); + +IteratorChain.prototype = Object.create(Iterator.prototype, { + constructor: d(IteratorChain), + next: d(function () { + var result; + if (!this.__current__) return { done: true, value: undefined }; + result = this.__current__.next(); + while (result.done) { + this.__current__ = this.__iterators__.shift(); + if (!this.__current__) return { done: true, value: undefined }; + result = this.__current__.next(); + } + return result; + }) +}); + +module.exports = function () { + var iterators = [this]; + push.apply(iterators, arguments); + iterators.forEach(validIterable); + return new IteratorChain(iterators); +}; diff --git a/node_modules/es6-iterator/.editorconfig b/node_modules/es6-iterator/.editorconfig new file mode 100644 index 00000000..c24a6cd1 --- /dev/null +++ b/node_modules/es6-iterator/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = tab + +[{*.json,*.yml}] +indent_style = space +indent_size = 2 diff --git a/node_modules/es6-iterator/.npmignore b/node_modules/es6-iterator/.npmignore new file mode 100644 index 00000000..a91db655 --- /dev/null +++ b/node_modules/es6-iterator/.npmignore @@ -0,0 +1,12 @@ +.DS_Store +Thumbs.db +/.idea +/.vscode +npm-debug.log +/wallaby.js +/node_modules +/.travis.yml +/.gitignore +/.circle.yml +/.circleci +/.appveyor.yml diff --git a/node_modules/es6-iterator/CHANGELOG.md b/node_modules/es6-iterator/CHANGELOG.md new file mode 100644 index 00000000..37eb16ab --- /dev/null +++ b/node_modules/es6-iterator/CHANGELOG.md @@ -0,0 +1,27 @@ +# Change Log + +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. + + +## [2.0.3](https://github.com/medikoo/es6-iterator/compare/v2.0.2...v2.0.3) (2017-10-17) + + +### Bug Fixes + +* configurability of toStringTag ([b99f692](https://github.com/medikoo/es6-iterator/commit/b99f692)) + + + + +## [2.0.2](https://github.com/medikoo/es6-iterator/compare/v2.0.1...v2.0.2) (2017-10-17) + + +### Bug Fixes + +* constructor exposure ([dbc0c51](https://github.com/medikoo/es6-iterator/commit/dbc0c51)) +* do not allow non constructor calls ([1f2f800](https://github.com/medikoo/es6-iterator/commit/1f2f800)) +* toString and toStringTag symbol definitions. ([2d17786](https://github.com/medikoo/es6-iterator/commit/2d17786)), closes [#6](https://github.com/medikoo/es6-iterator/issues/6) + +## Changelog for previous versions + +See `CHANGES` file diff --git a/node_modules/es6-iterator/CHANGES b/node_modules/es6-iterator/CHANGES new file mode 100644 index 00000000..83095f7c --- /dev/null +++ b/node_modules/es6-iterator/CHANGES @@ -0,0 +1,42 @@ +For recent changelog see CHANGELOG.md + +----- + +v2.0.1 -- 2017.03.15 +* Update dependencies + +v2.0.0 -- 2015.10.02 +* Use es6-symbol at v3 + +v1.0.0 -- 2015.06.23 +* Implement support for arguments object +* Drop support for v0.8 node ('^' in package.json dependencies) + +v0.1.3 -- 2015.02.02 +* Update dependencies +* Fix spelling of LICENSE + +v0.1.2 -- 2014.11.19 +* Optimise internal `_next` to not verify internal's list length at all times + (#2 thanks @RReverser) +* Fix documentation examples +* Configure lint scripts + +v0.1.1 -- 2014.04.29 +* Fix es6-symbol dependency version + +v0.1.0 -- 2014.04.29 +* Assure strictly npm hosted dependencies +* Remove sparse arrays dedicated handling (as per spec) +* Add: isIterable, validIterable and chain (method) +* Remove toArray, it's addressed by Array.from (polyfil can be found in es5-ext/array/from) +* Add break possiblity to 'forOf' via 'doBreak' function argument +* Provide dedicated iterator for array-likes (ArrayIterator) and for strings (StringIterator) +* Provide @@toStringTag symbol +* When available rely on @@iterator symbol +* Remove 32bit integer maximum list length restriction +* Improve Iterator internals +* Update to use latest version of dependencies + +v0.0.0 -- 2013.10.12 +Initial (dev version) diff --git a/node_modules/es6-iterator/LICENSE b/node_modules/es6-iterator/LICENSE new file mode 100644 index 00000000..d7c36d55 --- /dev/null +++ b/node_modules/es6-iterator/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013-2017 Mariusz Nowak (www.medikoo.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/es6-iterator/README.md b/node_modules/es6-iterator/README.md new file mode 100644 index 00000000..288373da --- /dev/null +++ b/node_modules/es6-iterator/README.md @@ -0,0 +1,148 @@ +# es6-iterator +## ECMAScript 6 Iterator interface + +### Installation + + $ npm install es6-iterator + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +## API + +### Constructors + +#### Iterator(list) _(es6-iterator)_ + +Abstract Iterator interface. Meant for extensions and not to be used on its own. + +Accepts any _list_ object (technically object with numeric _length_ property). + +_Mind it doesn't iterate strings properly, for that use dedicated [StringIterator](#string-iterator)_ + +```javascript +var Iterator = require('es6-iterator') +var iterator = new Iterator([1, 2, 3]); + +iterator.next(); // { value: 1, done: false } +iterator.next(); // { value: 2, done: false } +iterator.next(); // { value: 3, done: false } +iterator.next(); // { value: undefined, done: true } +``` + + +#### ArrayIterator(arrayLike[, kind]) _(es6-iterator/array)_ + +Dedicated for arrays and array-likes. Supports three iteration kinds: +* __value__ _(default)_ - Iterates values +* __key__ - Iterates indexes +* __key+value__ - Iterates keys and indexes, each iteration value is in _[key, value]_ form. + + +```javascript +var ArrayIterator = require('es6-iterator/array') +var iterator = new ArrayIterator([1, 2, 3], 'key+value'); + +iterator.next(); // { value: [0, 1], done: false } +iterator.next(); // { value: [1, 2], done: false } +iterator.next(); // { value: [2, 3], done: false } +iterator.next(); // { value: undefined, done: true } +``` + +May also be used for _arguments_ objects: + +```javascript +(function () { + var iterator = new ArrayIterator(arguments); + + iterator.next(); // { value: 1, done: false } + iterator.next(); // { value: 2, done: false } + iterator.next(); // { value: 3, done: false } + iterator.next(); // { value: undefined, done: true } +}(1, 2, 3)); +``` + +#### StringIterator(str) _(es6-iterator/string)_ + +Assures proper iteration over unicode symbols. +See: http://mathiasbynens.be/notes/javascript-unicode + +```javascript +var StringIterator = require('es6-iterator/string'); +var iterator = new StringIterator('f🙈o🙉o🙊'); + +iterator.next(); // { value: 'f', done: false } +iterator.next(); // { value: '🙈', done: false } +iterator.next(); // { value: 'o', done: false } +iterator.next(); // { value: '🙉', done: false } +iterator.next(); // { value: 'o', done: false } +iterator.next(); // { value: '🙊', done: false } +iterator.next(); // { value: undefined, done: true } +``` + +### Function utilities + +#### forOf(iterable, callback[, thisArg]) _(es6-iterator/for-of)_ + +Polyfill for ECMAScript 6 [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement. + +``` +var forOf = require('es6-iterator/for-of'); +var result = []; + +forOf('🙈🙉🙊', function (monkey) { result.push(monkey); }); +console.log(result); // ['🙈', '🙉', '🙊']; +``` + +Optionally you can break iteration at any point: + +```javascript +var result = []; + +forOf([1,2,3,4]', function (val, doBreak) { + result.push(monkey); + if (val >= 3) doBreak(); +}); +console.log(result); // [1, 2, 3]; +``` + +#### get(obj) _(es6-iterator/get)_ + +Return iterator for any iterable object. + +```javascript +var getIterator = require('es6-iterator/get'); +var iterator = get([1,2,3]); + +iterator.next(); // { value: 1, done: false } +iterator.next(); // { value: 2, done: false } +iterator.next(); // { value: 3, done: false } +iterator.next(); // { value: undefined, done: true } +``` + +#### isIterable(obj) _(es6-iterator/is-iterable)_ + +Whether _obj_ is iterable + +```javascript +var isIterable = require('es6-iterator/is-iterable'); + +isIterable(null); // false +isIterable(true); // false +isIterable('str'); // true +isIterable(['a', 'r', 'r']); // true +isIterable(new ArrayIterator([])); // true +``` + +#### validIterable(obj) _(es6-iterator/valid-iterable)_ + +If _obj_ is an iterable it is returned. Otherwise _TypeError_ is thrown. + +### Method extensions + +#### iterator.chain(iterator1[, …iteratorn]) _(es6-iterator/#/chain)_ + +Chain multiple iterators into one. + +### Tests [![Build Status](https://travis-ci.org/medikoo/es6-iterator.png)](https://travis-ci.org/medikoo/es6-iterator) + + $ npm test diff --git a/node_modules/es6-iterator/appveyor.yml b/node_modules/es6-iterator/appveyor.yml new file mode 100644 index 00000000..942ab827 --- /dev/null +++ b/node_modules/es6-iterator/appveyor.yml @@ -0,0 +1,26 @@ +# Test against the latest version of this Node.js version +environment: + matrix: + # node.js + - nodejs_version: "0.12" + - nodejs_version: "4" + - nodejs_version: "6" + - nodejs_version: "8" + +# Install scripts. (runs after repo cloning) +install: + # Get the latest stable version of Node.js or io.js + - ps: Install-Product node $env:nodejs_version + # install modules + - npm install + +# Post-install test scripts. +test_script: + # Output useful info for debugging. + - node --version + - npm --version + # run tests + - npm test + +# Don't actually build. +build: off diff --git a/node_modules/es6-iterator/array.js b/node_modules/es6-iterator/array.js new file mode 100644 index 00000000..d7a46a48 --- /dev/null +++ b/node_modules/es6-iterator/array.js @@ -0,0 +1,32 @@ +"use strict"; + +var setPrototypeOf = require("es5-ext/object/set-prototype-of") + , contains = require("es5-ext/string/#/contains") + , d = require("d") + , Symbol = require("es6-symbol") + , Iterator = require("./"); + +var defineProperty = Object.defineProperty, ArrayIterator; + +ArrayIterator = module.exports = function (arr, kind) { + if (!(this instanceof ArrayIterator)) throw new TypeError("Constructor requires 'new'"); + Iterator.call(this, arr); + if (!kind) kind = "value"; + else if (contains.call(kind, "key+value")) kind = "key+value"; + else if (contains.call(kind, "key")) kind = "key"; + else kind = "value"; + defineProperty(this, "__kind__", d("", kind)); +}; +if (setPrototypeOf) setPrototypeOf(ArrayIterator, Iterator); + +// Internal %ArrayIteratorPrototype% doesn't expose its constructor +delete ArrayIterator.prototype.constructor; + +ArrayIterator.prototype = Object.create(Iterator.prototype, { + _resolve: d(function (i) { + if (this.__kind__ === "value") return this.__list__[i]; + if (this.__kind__ === "key+value") return [i, this.__list__[i]]; + return i; + }) +}); +defineProperty(ArrayIterator.prototype, Symbol.toStringTag, d("c", "Array Iterator")); diff --git a/node_modules/es6-iterator/for-of.js b/node_modules/es6-iterator/for-of.js new file mode 100644 index 00000000..5d15c349 --- /dev/null +++ b/node_modules/es6-iterator/for-of.js @@ -0,0 +1,47 @@ +"use strict"; + +var isArguments = require("es5-ext/function/is-arguments") + , callable = require("es5-ext/object/valid-callable") + , isString = require("es5-ext/string/is-string") + , get = require("./get"); + +var isArray = Array.isArray, call = Function.prototype.call, some = Array.prototype.some; + +module.exports = function (iterable, cb /*, thisArg*/) { + var mode, thisArg = arguments[2], result, doBreak, broken, i, length, char, code; + if (isArray(iterable) || isArguments(iterable)) mode = "array"; + else if (isString(iterable)) mode = "string"; + else iterable = get(iterable); + + callable(cb); + doBreak = function () { + broken = true; + }; + if (mode === "array") { + some.call(iterable, function (value) { + call.call(cb, thisArg, value, doBreak); + return broken; + }); + return; + } + if (mode === "string") { + length = iterable.length; + for (i = 0; i < length; ++i) { + char = iterable[i]; + if (i + 1 < length) { + code = char.charCodeAt(0); + if (code >= 0xd800 && code <= 0xdbff) char += iterable[++i]; + } + call.call(cb, thisArg, char, doBreak); + if (broken) break; + } + return; + } + result = iterable.next(); + + while (!result.done) { + call.call(cb, thisArg, result.value, doBreak); + if (broken) return; + result = iterable.next(); + } +}; diff --git a/node_modules/es6-iterator/get.js b/node_modules/es6-iterator/get.js new file mode 100644 index 00000000..d36c9e24 --- /dev/null +++ b/node_modules/es6-iterator/get.js @@ -0,0 +1,15 @@ +"use strict"; + +var isArguments = require("es5-ext/function/is-arguments") + , isString = require("es5-ext/string/is-string") + , ArrayIterator = require("./array") + , StringIterator = require("./string") + , iterable = require("./valid-iterable") + , iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (obj) { + if (typeof iterable(obj)[iteratorSymbol] === "function") return obj[iteratorSymbol](); + if (isArguments(obj)) return new ArrayIterator(obj); + if (isString(obj)) return new StringIterator(obj); + return new ArrayIterator(obj); +}; diff --git a/node_modules/es6-iterator/index.js b/node_modules/es6-iterator/index.js new file mode 100644 index 00000000..790475fd --- /dev/null +++ b/node_modules/es6-iterator/index.js @@ -0,0 +1,106 @@ +"use strict"; + +var clear = require("es5-ext/array/#/clear") + , assign = require("es5-ext/object/assign") + , callable = require("es5-ext/object/valid-callable") + , value = require("es5-ext/object/valid-value") + , d = require("d") + , autoBind = require("d/auto-bind") + , Symbol = require("es6-symbol"); + +var defineProperty = Object.defineProperty, defineProperties = Object.defineProperties, Iterator; + +module.exports = Iterator = function (list, context) { + if (!(this instanceof Iterator)) throw new TypeError("Constructor requires 'new'"); + defineProperties(this, { + __list__: d("w", value(list)), + __context__: d("w", context), + __nextIndex__: d("w", 0) + }); + if (!context) return; + callable(context.on); + context.on("_add", this._onAdd); + context.on("_delete", this._onDelete); + context.on("_clear", this._onClear); +}; + +// Internal %IteratorPrototype% doesn't expose its constructor +delete Iterator.prototype.constructor; + +defineProperties( + Iterator.prototype, + assign( + { + _next: d(function () { + var i; + if (!this.__list__) return undefined; + if (this.__redo__) { + i = this.__redo__.shift(); + if (i !== undefined) return i; + } + if (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++; + this._unBind(); + return undefined; + }), + next: d(function () { + return this._createResult(this._next()); + }), + _createResult: d(function (i) { + if (i === undefined) return { done: true, value: undefined }; + return { done: false, value: this._resolve(i) }; + }), + _resolve: d(function (i) { + return this.__list__[i]; + }), + _unBind: d(function () { + this.__list__ = null; + delete this.__redo__; + if (!this.__context__) return; + this.__context__.off("_add", this._onAdd); + this.__context__.off("_delete", this._onDelete); + this.__context__.off("_clear", this._onClear); + this.__context__ = null; + }), + toString: d(function () { + return "[object " + (this[Symbol.toStringTag] || "Object") + "]"; + }) + }, + autoBind({ + _onAdd: d(function (index) { + if (index >= this.__nextIndex__) return; + ++this.__nextIndex__; + if (!this.__redo__) { + defineProperty(this, "__redo__", d("c", [index])); + return; + } + this.__redo__.forEach(function (redo, i) { + if (redo >= index) this.__redo__[i] = ++redo; + }, this); + this.__redo__.push(index); + }), + _onDelete: d(function (index) { + var i; + if (index >= this.__nextIndex__) return; + --this.__nextIndex__; + if (!this.__redo__) return; + i = this.__redo__.indexOf(index); + if (i !== -1) this.__redo__.splice(i, 1); + this.__redo__.forEach(function (redo, j) { + if (redo > index) this.__redo__[j] = --redo; + }, this); + }), + _onClear: d(function () { + if (this.__redo__) clear.call(this.__redo__); + this.__nextIndex__ = 0; + }) + }) + ) +); + +defineProperty( + Iterator.prototype, + Symbol.iterator, + d(function () { + return this; + }) +); diff --git a/node_modules/es6-iterator/is-iterable.js b/node_modules/es6-iterator/is-iterable.js new file mode 100644 index 00000000..cda7dfeb --- /dev/null +++ b/node_modules/es6-iterator/is-iterable.js @@ -0,0 +1,16 @@ +"use strict"; + +var isArguments = require("es5-ext/function/is-arguments") + , isValue = require("es5-ext/object/is-value") + , isString = require("es5-ext/string/is-string"); + +var iteratorSymbol = require("es6-symbol").iterator + , isArray = Array.isArray; + +module.exports = function (value) { + if (!isValue(value)) return false; + if (isArray(value)) return true; + if (isString(value)) return true; + if (isArguments(value)) return true; + return typeof value[iteratorSymbol] === "function"; +}; diff --git a/node_modules/es6-iterator/package.json b/node_modules/es6-iterator/package.json new file mode 100644 index 00000000..bc2582ab --- /dev/null +++ b/node_modules/es6-iterator/package.json @@ -0,0 +1,41 @@ +{ + "name": "es6-iterator", + "version": "2.0.3", + "description": "Iterator abstraction based on ES6 specification", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "iterator", + "array", + "list", + "set", + "map", + "generator" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es6-iterator.git" + }, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + }, + "devDependencies": { + "eslint": "^4.9", + "eslint-config-medikoo-es5": "^1.4.4", + "event-emitter": "^0.3.5", + "tad": "^0.2.7" + }, + "eslintConfig": { + "extends": "medikoo-es5", + "root": true, + "rules": { + "no-extend-native": "off" + } + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "test": "node ./node_modules/tad/bin/tad" + }, + "license": "MIT" +} diff --git a/node_modules/es6-iterator/string.js b/node_modules/es6-iterator/string.js new file mode 100644 index 00000000..48882252 --- /dev/null +++ b/node_modules/es6-iterator/string.js @@ -0,0 +1,39 @@ +// Thanks @mathiasbynens +// http://mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols + +"use strict"; + +var setPrototypeOf = require("es5-ext/object/set-prototype-of") + , d = require("d") + , Symbol = require("es6-symbol") + , Iterator = require("./"); + +var defineProperty = Object.defineProperty, StringIterator; + +StringIterator = module.exports = function (str) { + if (!(this instanceof StringIterator)) throw new TypeError("Constructor requires 'new'"); + str = String(str); + Iterator.call(this, str); + defineProperty(this, "__length__", d("", str.length)); +}; +if (setPrototypeOf) setPrototypeOf(StringIterator, Iterator); + +// Internal %ArrayIteratorPrototype% doesn't expose its constructor +delete StringIterator.prototype.constructor; + +StringIterator.prototype = Object.create(Iterator.prototype, { + _next: d(function () { + if (!this.__list__) return undefined; + if (this.__nextIndex__ < this.__length__) return this.__nextIndex__++; + this._unBind(); + return undefined; + }), + _resolve: d(function (i) { + var char = this.__list__[i], code; + if (this.__nextIndex__ === this.__length__) return char; + code = char.charCodeAt(0); + if (code >= 0xd800 && code <= 0xdbff) return char + this.__list__[this.__nextIndex__++]; + return char; + }) +}); +defineProperty(StringIterator.prototype, Symbol.toStringTag, d("c", "String Iterator")); diff --git a/node_modules/es6-iterator/test/#/chain.js b/node_modules/es6-iterator/test/#/chain.js new file mode 100644 index 00000000..457356f2 --- /dev/null +++ b/node_modules/es6-iterator/test/#/chain.js @@ -0,0 +1,23 @@ +"use strict"; + +var Iterator = require("../../"); + +module.exports = function (t, a) { + var i1 = new Iterator(["raz", "dwa", "trzy"]) + , i2 = new Iterator(["cztery", "pięć", "sześć"]) + , i3 = new Iterator(["siedem", "osiem", "dziewięć"]) + + , iterator = t.call(i1, i2, i3); + + a.deep(iterator.next(), { done: false, value: "raz" }, "#1"); + a.deep(iterator.next(), { done: false, value: "dwa" }, "#2"); + a.deep(iterator.next(), { done: false, value: "trzy" }, "#3"); + a.deep(iterator.next(), { done: false, value: "cztery" }, "#4"); + a.deep(iterator.next(), { done: false, value: "pięć" }, "#5"); + a.deep(iterator.next(), { done: false, value: "sześć" }, "#6"); + a.deep(iterator.next(), { done: false, value: "siedem" }, "#7"); + a.deep(iterator.next(), { done: false, value: "osiem" }, "#8"); + a.deep(iterator.next(), { done: false, value: "dziewięć" }, "#9"); + a.deep(iterator.next(), { done: true, value: undefined }, "Done #1"); + a.deep(iterator.next(), { done: true, value: undefined }, "Done #2"); +}; diff --git a/node_modules/es6-iterator/test/.eslintrc.json b/node_modules/es6-iterator/test/.eslintrc.json new file mode 100644 index 00000000..99f0b655 --- /dev/null +++ b/node_modules/es6-iterator/test/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "id-length": "off" + } +} diff --git a/node_modules/es6-iterator/test/array.js b/node_modules/es6-iterator/test/array.js new file mode 100644 index 00000000..447dfa73 --- /dev/null +++ b/node_modules/es6-iterator/test/array.js @@ -0,0 +1,67 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (T) { + return { + "Values": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; + + it = new T(x); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.splice(1, 0, "elo"); + a.deep(it.next(), { done: false, value: "dwa" }, "Insert"); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: "pięć" }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Keys & Values": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; + + it = new T(x, "key+value"); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: [0, "raz"] }, "#1"); + a.deep(it.next(), { done: false, value: [1, "dwa"] }, "#2"); + x.splice(1, 0, "elo"); + a.deep(it.next(), { done: false, value: [2, "dwa"] }, "Insert"); + a.deep(it.next(), { done: false, value: [3, "trzy"] }, "#3"); + a.deep(it.next(), { done: false, value: [4, "cztery"] }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: [5, "pięć"] }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Keys": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; + + it = new T(x, "key"); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: 0 }, "#1"); + a.deep(it.next(), { done: false, value: 1 }, "#2"); + x.splice(1, 0, "elo"); + a.deep(it.next(), { done: false, value: 2 }, "Insert"); + a.deep(it.next(), { done: false, value: 3 }, "#3"); + a.deep(it.next(), { done: false, value: 4 }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: 5 }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Sparse": function (a) { + var x = new Array(6), it; + + x[2] = "raz"; + x[4] = "dwa"; + it = new T(x); + a.deep(it.next(), { done: false, value: undefined }, "#1"); + a.deep(it.next(), { done: false, value: undefined }, "#2"); + a.deep(it.next(), { done: false, value: "raz" }, "#3"); + a.deep(it.next(), { done: false, value: undefined }, "#4"); + a.deep(it.next(), { done: false, value: "dwa" }, "#5"); + a.deep(it.next(), { done: false, value: undefined }, "#6"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + } + }; +}; diff --git a/node_modules/es6-iterator/test/for-of.js b/node_modules/es6-iterator/test/for-of.js new file mode 100644 index 00000000..9b47e979 --- /dev/null +++ b/node_modules/es6-iterator/test/for-of.js @@ -0,0 +1,42 @@ +"use strict"; + +var ArrayIterator = require("../array") + + , slice = Array.prototype.slice; + +module.exports = function (t, a) { + var i = 0, x = ["raz", "dwa", "trzy"], y = {}, called = 0; + t(x, function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#"); + a(this, y, "Array: context: " + i++ + "#"); + }, y); + i = 0; + t((function () { + return arguments; +}("raz", "dwa", "trzy")), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Arguments" + i + "#"); + a(this, y, "Arguments: context: " + i++ + "#"); + }, y); + i = 0; + t(x = "foo", function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Regular String: context: " + i++ + "#"); + }, y); + i = 0; + x = ["r", "💩", "z"]; + t("r💩z", function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Unicode String: context: " + i++ + "#"); + }, y); + i = 0; + t(new ArrayIterator(x), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#"); + a(this, y, "Iterator: context: " + i++ + "#"); + }, y); + + t(x = ["raz", "dwa", "trzy"], function (value, doBreak) { + ++called; + return doBreak(); + }); + a(called, 1, "Break"); +}; diff --git a/node_modules/es6-iterator/test/get.js b/node_modules/es6-iterator/test/get.js new file mode 100644 index 00000000..c5947d3e --- /dev/null +++ b/node_modules/es6-iterator/test/get.js @@ -0,0 +1,27 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , Iterator = require("../"); + +module.exports = function (t, a) { + var iterator; + a.throws(function () { + t(); +}, TypeError, "Null"); + a.throws(function () { + t({}); +}, TypeError, "Plain object"); + a.throws(function () { + t({ length: 0 }); +}, TypeError, "Array-like"); + iterator = {}; + iterator[iteratorSymbol] = function () { + return new Iterator([]); +}; + a(t(iterator) instanceof Iterator, true, "Iterator"); + a(String(t([])), "[object Array Iterator]", " Array"); + a(String(t(function () { + return arguments; +}())), "[object Array Iterator]", " Arguments"); + a(String(t("foo")), "[object String Iterator]", "String"); +}; diff --git a/node_modules/es6-iterator/test/index.js b/node_modules/es6-iterator/test/index.js new file mode 100644 index 00000000..48982185 --- /dev/null +++ b/node_modules/es6-iterator/test/index.js @@ -0,0 +1,99 @@ +"use strict"; + +var ee = require("event-emitter") + , iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (T) { + return { + "": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć"], it, y, z; + + it = new T(x); + a(it[iteratorSymbol](), it, "@@iterator"); + y = it.next(); + a.deep(y, { done: false, value: "raz" }, "#1"); + z = it.next(); + a.not(y, z, "Recreate result"); + a.deep(z, { done: false, value: "dwa" }, "#2"); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + a.deep(it.next(), { done: false, value: "pięć" }, "#5"); + a.deep(y = it.next(), { done: true, value: undefined }, "End"); + a.not(y, it.next(), "Recreate result on dead"); + }, + "Emited": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + y.emit("_add", x.push("sześć") - 1); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + x.splice(1, 0, "półtora"); + y.emit("_add", 1); + a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); + x.splice(5, 1); + y.emit("_delete", 5); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + a.deep(it.next(), { done: false, value: "sześć" }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited #2": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.splice(1, 0, "półtora"); + y.emit("_add", 1); + x.splice(1, 0, "1.25"); + y.emit("_add", 1); + x.splice(0, 1); + y.emit("_delete", 0); + a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); + a.deep(it.next(), { done: false, value: "1.25" }, "Insert #2"); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + x.splice(5, 1); + y.emit("_delete", 5); + a.deep(it.next(), { done: false, value: "sześć" }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited: Clear #1": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.length = 0; + y.emit("_clear"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited: Clear #2": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.length = 0; + y.emit("_clear"); + x.push("foo"); + x.push("bar"); + a.deep(it.next(), { done: false, value: "foo" }, "#3"); + a.deep(it.next(), { done: false, value: "bar" }, "#4"); + x.splice(1, 0, "półtora"); + y.emit("_add", 1); + x.splice(1, 0, "1.25"); + y.emit("_add", 1); + x.splice(0, 1); + y.emit("_delete", 0); + a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); + a.deep(it.next(), { done: false, value: "1.25" }, "Insert #2"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + } + }; +}; diff --git a/node_modules/es6-iterator/test/is-iterable.js b/node_modules/es6-iterator/test/is-iterable.js new file mode 100644 index 00000000..5787351a --- /dev/null +++ b/node_modules/es6-iterator/test/is-iterable.js @@ -0,0 +1,23 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , Iterator = require("../"); + +module.exports = function (t, a) { + var iterator; + a(t(), false, "Undefined"); + a(t(123), false, "Number"); + a(t({}), false, "Plain object"); + a(t({ length: 0 }), false, "Array-like"); + iterator = {}; + iterator[iteratorSymbol] = function () { + return new Iterator([]); +}; + a(t(iterator), true, "Iterator"); + a(t([]), true, "Array"); + a(t("foo"), true, "String"); + a(t(""), true, "Empty string"); + a(t(function () { + return arguments; +}()), true, "Arguments"); +}; diff --git a/node_modules/es6-iterator/test/string.js b/node_modules/es6-iterator/test/string.js new file mode 100644 index 00000000..3f2a5b67 --- /dev/null +++ b/node_modules/es6-iterator/test/string.js @@ -0,0 +1,23 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (T, a) { + var it = new T("foobar"); + + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: "f" }, "#1"); + a.deep(it.next(), { done: false, value: "o" }, "#2"); + a.deep(it.next(), { done: false, value: "o" }, "#3"); + a.deep(it.next(), { done: false, value: "b" }, "#4"); + a.deep(it.next(), { done: false, value: "a" }, "#5"); + a.deep(it.next(), { done: false, value: "r" }, "#6"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + + a.h1("Outside of BMP"); + it = new T("r💩z"); + a.deep(it.next(), { done: false, value: "r" }, "#1"); + a.deep(it.next(), { done: false, value: "💩" }, "#2"); + a.deep(it.next(), { done: false, value: "z" }, "#3"); + a.deep(it.next(), { done: true, value: undefined }, "End"); +}; diff --git a/node_modules/es6-iterator/test/valid-iterable.js b/node_modules/es6-iterator/test/valid-iterable.js new file mode 100644 index 00000000..b8b2a8a6 --- /dev/null +++ b/node_modules/es6-iterator/test/valid-iterable.js @@ -0,0 +1,28 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , Iterator = require("../"); + +module.exports = function (t, a) { + var obj; + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t({}); +}, TypeError, "Plain object"); + a.throws(function () { + t({ length: 0 }); +}, TypeError, "Array-like"); + obj = {}; + obj[iteratorSymbol] = function () { + return new Iterator([]); +}; + a(t(obj), obj, "Iterator"); + obj = []; + a(t(obj), obj, "Array"); + obj = (function () { + return arguments; +}()); + a(t(obj), obj, "Arguments"); +}; diff --git a/node_modules/es6-iterator/valid-iterable.js b/node_modules/es6-iterator/valid-iterable.js new file mode 100644 index 00000000..8c6e0715 --- /dev/null +++ b/node_modules/es6-iterator/valid-iterable.js @@ -0,0 +1,8 @@ +"use strict"; + +var isIterable = require("./is-iterable"); + +module.exports = function (value) { + if (!isIterable(value)) throw new TypeError(value + " is not iterable"); + return value; +}; diff --git a/node_modules/es6-symbol/.lint b/node_modules/es6-symbol/.lint new file mode 100644 index 00000000..df1e53cd --- /dev/null +++ b/node_modules/es6-symbol/.lint @@ -0,0 +1,15 @@ +@root + +module + +tabs +indent 2 +maxlen 100 + +ass +nomen +plusplus +newcap +vars + +predef+ Symbol diff --git a/node_modules/es6-symbol/.npmignore b/node_modules/es6-symbol/.npmignore new file mode 100644 index 00000000..155e41f6 --- /dev/null +++ b/node_modules/es6-symbol/.npmignore @@ -0,0 +1,4 @@ +.DS_Store +/node_modules +/npm-debug.log +/.lintcache diff --git a/node_modules/es6-symbol/.travis.yml b/node_modules/es6-symbol/.travis.yml new file mode 100644 index 00000000..0b1f5e4a --- /dev/null +++ b/node_modules/es6-symbol/.travis.yml @@ -0,0 +1,11 @@ +sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +language: node_js +node_js: + - 0.12 + - v4 + - v5 + - v6 + +notifications: + email: + - medikoo+es6-symbol@medikoo.com diff --git a/node_modules/es6-symbol/CHANGES b/node_modules/es6-symbol/CHANGES new file mode 100644 index 00000000..017d4091 --- /dev/null +++ b/node_modules/es6-symbol/CHANGES @@ -0,0 +1,57 @@ +v3.1.1 -- 2017.03.15 +* Improve documentation +* Improve error messages +* Update dependencies + +v3.1.0 -- 2016.06.03 +* Fix internals of symbol detection +* Ensure Symbol.prototype[Symbol.toPrimitive] in all cases returns primitive value + (fixes Node v6 support) +* Create native symbols whenver possible + +v3.0.2 -- 2015.12.12 +* Fix definition flow, so uneven state of Symbol implementation doesn't crash initialization of + polyfill. See #13 + +v3.0.1 -- 2015.10.22 +* Workaround for IE11 bug (reported in #12) + +v3.0.0 -- 2015.10.02 +* Reuse native symbols (e.g. iterator, toStringTag etc.) in a polyfill if they're available + Otherwise polyfill symbols may not be recognized by other functions +* Improve documentation + +v2.0.1 -- 2015.01.28 +* Fix Symbol.prototype[Symbol.isPrimitive] implementation +* Improve validation within Symbol.prototype.toString and + Symbol.prototype.valueOf + +v2.0.0 -- 2015.01.28 +* Update up to changes in specification: + * Implement `for` and `keyFor` + * Remove `Symbol.create` and `Symbol.isRegExp` + * Add `Symbol.match`, `Symbol.replace`, `Symbol.search`, `Symbol.species` and + `Symbol.split` +* Rename `validSymbol` to `validateSymbol` +* Improve documentation +* Remove dead test modules + +v1.0.0 -- 2015.01.26 +* Fix enumerability for symbol properties set normally (e.g. obj[symbol] = value) +* Introduce initialization via hidden constructor +* Fix isSymbol handling of polyfill values when native Symbol is present +* Fix spelling of LICENSE +* Configure lint scripts + +v0.1.1 -- 2014.10.07 +* Fix isImplemented, so it returns true in case of polyfill +* Improve documentations + +v0.1.0 -- 2014.04.28 +* Assure strictly npm dependencies +* Update to use latest versions of dependencies +* Fix implementation detection so it doesn't crash on `String(symbol)` +* throw on `new Symbol()` (as decided by TC39) + +v0.0.0 -- 2013.11.15 +* Initial (dev) version \ No newline at end of file diff --git a/node_modules/es6-symbol/LICENSE b/node_modules/es6-symbol/LICENSE new file mode 100644 index 00000000..04724a3a --- /dev/null +++ b/node_modules/es6-symbol/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2013-2015 Mariusz Nowak (www.medikoo.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/es6-symbol/README.md b/node_modules/es6-symbol/README.md new file mode 100644 index 00000000..fea99062 --- /dev/null +++ b/node_modules/es6-symbol/README.md @@ -0,0 +1,71 @@ +# es6-symbol +## ECMAScript 6 Symbol polyfill + +For more information about symbols see following links +- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html) +- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) +- [Specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-constructor) + +### Limitations + +Underneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely. + +### Usage + +If you'd like to use native version when it exists and fallback to [ponyfill](https://ponyfill.com) if it doesn't, use *es6-symbol* as following: + +```javascript +var Symbol = require('es6-symbol'); +``` + +If you want to make sure your environment implements `Symbol` globally, do: + +```javascript +require('es6-symbol/implement'); +``` + +If you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do: + +```javascript +var Symbol = require('es6-symbol/polyfill'); +``` + +#### API + +Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-objects). Still if you want quick look, follow examples: + +```javascript +var Symbol = require('es6-symbol'); + +var symbol = Symbol('My custom symbol'); +var x = {}; + +x[symbol] = 'foo'; +console.log(x[symbol]); 'foo' + +// Detect iterable: +var iterator, result; +if (possiblyIterable[Symbol.iterator]) { + iterator = possiblyIterable[Symbol.iterator](); + result = iterator.next(); + while(!result.done) { + console.log(result.value); + result = iterator.next(); + } +} +``` + +### Installation +#### NPM + +In your project path: + + $ npm install es6-symbol + +##### Browser + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +## Tests [![Build Status](https://travis-ci.org/medikoo/es6-symbol.png)](https://travis-ci.org/medikoo/es6-symbol) + + $ npm test diff --git a/node_modules/es6-symbol/implement.js b/node_modules/es6-symbol/implement.js new file mode 100644 index 00000000..153edacd --- /dev/null +++ b/node_modules/es6-symbol/implement.js @@ -0,0 +1,7 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(require('es5-ext/global'), 'Symbol', + { value: require('./polyfill'), configurable: true, enumerable: false, + writable: true }); +} diff --git a/node_modules/es6-symbol/index.js b/node_modules/es6-symbol/index.js new file mode 100644 index 00000000..609f1faf --- /dev/null +++ b/node_modules/es6-symbol/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? Symbol : require('./polyfill'); diff --git a/node_modules/es6-symbol/is-implemented.js b/node_modules/es6-symbol/is-implemented.js new file mode 100644 index 00000000..93629d2f --- /dev/null +++ b/node_modules/es6-symbol/is-implemented.js @@ -0,0 +1,17 @@ +'use strict'; + +var validTypes = { object: true, symbol: true }; + +module.exports = function () { + var symbol; + if (typeof Symbol !== 'function') return false; + symbol = Symbol('test symbol'); + try { String(symbol); } catch (e) { return false; } + + // Return 'true' also for polyfills + if (!validTypes[typeof Symbol.iterator]) return false; + if (!validTypes[typeof Symbol.toPrimitive]) return false; + if (!validTypes[typeof Symbol.toStringTag]) return false; + + return true; +}; diff --git a/node_modules/es6-symbol/is-native-implemented.js b/node_modules/es6-symbol/is-native-implemented.js new file mode 100644 index 00000000..8676d0e8 --- /dev/null +++ b/node_modules/es6-symbol/is-native-implemented.js @@ -0,0 +1,5 @@ +// Exports true if environment provides native `Symbol` implementation + +'use strict'; + +module.exports = typeof Symbol === 'function' && typeof Symbol() === 'symbol'; diff --git a/node_modules/es6-symbol/is-symbol.js b/node_modules/es6-symbol/is-symbol.js new file mode 100644 index 00000000..074cb07f --- /dev/null +++ b/node_modules/es6-symbol/is-symbol.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function (x) { + if (!x) return false; + if (typeof x === 'symbol') return true; + if (!x.constructor) return false; + if (x.constructor.name !== 'Symbol') return false; + return (x[x.constructor.toStringTag] === 'Symbol'); +}; diff --git a/node_modules/es6-symbol/package.json b/node_modules/es6-symbol/package.json new file mode 100644 index 00000000..db6205bd --- /dev/null +++ b/node_modules/es6-symbol/package.json @@ -0,0 +1,35 @@ +{ + "name": "es6-symbol", + "version": "3.1.1", + "description": "ECMAScript 6 Symbol polyfill", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "symbol", + "private", + "property", + "es6", + "ecmascript", + "harmony", + "ponyfill", + "polyfill" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es6-symbol.git" + }, + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + }, + "devDependencies": { + "tad": "~0.2.7", + "xlint": "~0.2.2", + "xlint-jslint-medikoo": "~0.1.4" + }, + "scripts": { + "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", + "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", + "test": "node ./node_modules/tad/bin/tad" + }, + "license": "MIT" +} diff --git a/node_modules/es6-symbol/polyfill.js b/node_modules/es6-symbol/polyfill.js new file mode 100644 index 00000000..dca879a3 --- /dev/null +++ b/node_modules/es6-symbol/polyfill.js @@ -0,0 +1,118 @@ +// ES2015 Symbol polyfill for environments that do not (or partially) support it + +'use strict'; + +var d = require('d') + , validateSymbol = require('./validate-symbol') + + , create = Object.create, defineProperties = Object.defineProperties + , defineProperty = Object.defineProperty, objPrototype = Object.prototype + , NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create(null) + , isNativeSafe; + +if (typeof Symbol === 'function') { + NativeSymbol = Symbol; + try { + String(NativeSymbol()); + isNativeSafe = true; + } catch (ignore) {} +} + +var generateName = (function () { + var created = create(null); + return function (desc) { + var postfix = 0, name, ie11BugWorkaround; + while (created[desc + (postfix || '')]) ++postfix; + desc += (postfix || ''); + created[desc] = true; + name = '@@' + desc; + defineProperty(objPrototype, name, d.gs(null, function (value) { + // For IE11 issue see: + // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/ + // ie11-broken-getters-on-dom-objects + // https://github.com/medikoo/es6-symbol/issues/12 + if (ie11BugWorkaround) return; + ie11BugWorkaround = true; + defineProperty(this, name, d(value)); + ie11BugWorkaround = false; + })); + return name; + }; +}()); + +// Internal constructor (not one exposed) for creating Symbol instances. +// This one is used to ensure that `someSymbol instanceof Symbol` always return false +HiddenSymbol = function Symbol(description) { + if (this instanceof HiddenSymbol) throw new TypeError('Symbol is not a constructor'); + return SymbolPolyfill(description); +}; + +// Exposed `Symbol` constructor +// (returns instances of HiddenSymbol) +module.exports = SymbolPolyfill = function Symbol(description) { + var symbol; + if (this instanceof Symbol) throw new TypeError('Symbol is not a constructor'); + if (isNativeSafe) return NativeSymbol(description); + symbol = create(HiddenSymbol.prototype); + description = (description === undefined ? '' : String(description)); + return defineProperties(symbol, { + __description__: d('', description), + __name__: d('', generateName(description)) + }); +}; +defineProperties(SymbolPolyfill, { + for: d(function (key) { + if (globalSymbols[key]) return globalSymbols[key]; + return (globalSymbols[key] = SymbolPolyfill(String(key))); + }), + keyFor: d(function (s) { + var key; + validateSymbol(s); + for (key in globalSymbols) if (globalSymbols[key] === s) return key; + }), + + // To ensure proper interoperability with other native functions (e.g. Array.from) + // fallback to eventual native implementation of given symbol + hasInstance: d('', (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill('hasInstance')), + isConcatSpreadable: d('', (NativeSymbol && NativeSymbol.isConcatSpreadable) || + SymbolPolyfill('isConcatSpreadable')), + iterator: d('', (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill('iterator')), + match: d('', (NativeSymbol && NativeSymbol.match) || SymbolPolyfill('match')), + replace: d('', (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill('replace')), + search: d('', (NativeSymbol && NativeSymbol.search) || SymbolPolyfill('search')), + species: d('', (NativeSymbol && NativeSymbol.species) || SymbolPolyfill('species')), + split: d('', (NativeSymbol && NativeSymbol.split) || SymbolPolyfill('split')), + toPrimitive: d('', (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill('toPrimitive')), + toStringTag: d('', (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill('toStringTag')), + unscopables: d('', (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill('unscopables')) +}); + +// Internal tweaks for real symbol producer +defineProperties(HiddenSymbol.prototype, { + constructor: d(SymbolPolyfill), + toString: d('', function () { return this.__name__; }) +}); + +// Proper implementation of methods exposed on Symbol.prototype +// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype +defineProperties(SymbolPolyfill.prototype, { + toString: d(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }), + valueOf: d(function () { return validateSymbol(this); }) +}); +defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('', function () { + var symbol = validateSymbol(this); + if (typeof symbol === 'symbol') return symbol; + return symbol.toString(); +})); +defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol')); + +// Proper implementaton of toPrimitive and toStringTag for returned symbol instances +defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, + d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])); + +// Note: It's important to define `toPrimitive` as last one, as some implementations +// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols) +// And that may invoke error in definition flow: +// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149 +defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, + d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])); diff --git a/node_modules/es6-symbol/test/implement.js b/node_modules/es6-symbol/test/implement.js new file mode 100644 index 00000000..eb35c301 --- /dev/null +++ b/node_modules/es6-symbol/test/implement.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof Symbol, 'function'); }; diff --git a/node_modules/es6-symbol/test/index.js b/node_modules/es6-symbol/test/index.js new file mode 100644 index 00000000..62b3296d --- /dev/null +++ b/node_modules/es6-symbol/test/index.js @@ -0,0 +1,12 @@ +'use strict'; + +var d = require('d') + + , defineProperty = Object.defineProperty; + +module.exports = function (T, a) { + var symbol = T('test'), x = {}; + defineProperty(x, symbol, d('foo')); + a(x.test, undefined, "Name"); + a(x[symbol], 'foo', "Get"); +}; diff --git a/node_modules/es6-symbol/test/is-implemented.js b/node_modules/es6-symbol/test/is-implemented.js new file mode 100644 index 00000000..bb0d6453 --- /dev/null +++ b/node_modules/es6-symbol/test/is-implemented.js @@ -0,0 +1,14 @@ +'use strict'; + +var global = require('es5-ext/global') + , polyfill = require('../polyfill'); + +module.exports = function (t, a) { + var cache; + a(typeof t(), 'boolean'); + cache = global.Symbol; + global.Symbol = polyfill; + a(t(), true); + if (cache === undefined) delete global.Symbol; + else global.Symbol = cache; +}; diff --git a/node_modules/es6-symbol/test/is-native-implemented.js b/node_modules/es6-symbol/test/is-native-implemented.js new file mode 100644 index 00000000..df8ba032 --- /dev/null +++ b/node_modules/es6-symbol/test/is-native-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t, 'boolean'); }; diff --git a/node_modules/es6-symbol/test/is-symbol.js b/node_modules/es6-symbol/test/is-symbol.js new file mode 100644 index 00000000..ac24b9ab --- /dev/null +++ b/node_modules/es6-symbol/test/is-symbol.js @@ -0,0 +1,16 @@ +'use strict'; + +var SymbolPoly = require('../polyfill'); + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(true), false, "Primitive"); + a(t('raz'), false, "String"); + a(t({}), false, "Object"); + a(t([]), false, "Array"); + if (typeof Symbol !== 'undefined') { + a(t(Symbol()), true, "Native"); + } + a(t(SymbolPoly()), true, "Polyfill"); +}; diff --git a/node_modules/es6-symbol/test/polyfill.js b/node_modules/es6-symbol/test/polyfill.js new file mode 100644 index 00000000..8b657905 --- /dev/null +++ b/node_modules/es6-symbol/test/polyfill.js @@ -0,0 +1,29 @@ +'use strict'; + +var d = require('d') + , isSymbol = require('../is-symbol') + + , defineProperty = Object.defineProperty; + +module.exports = function (T, a) { + var symbol = T('test'), x = {}; + defineProperty(x, symbol, d('foo')); + a(x.test, undefined, "Name"); + a(x[symbol], 'foo', "Get"); + a(x instanceof T, false); + + a(isSymbol(symbol), true, "Symbol"); + a(isSymbol(T.iterator), true, "iterator"); + a(isSymbol(T.toStringTag), true, "toStringTag"); + + x = {}; + x[symbol] = 'foo'; + if (typeof symbol !== 'symbol') { + a.deep(Object.getOwnPropertyDescriptor(x, symbol), { configurable: true, enumerable: false, + value: 'foo', writable: true }); + } + symbol = T.for('marko'); + a(isSymbol(symbol), true); + a(T.for('marko'), symbol); + a(T.keyFor(symbol), 'marko'); +}; diff --git a/node_modules/es6-symbol/test/validate-symbol.js b/node_modules/es6-symbol/test/validate-symbol.js new file mode 100644 index 00000000..2c8f84c8 --- /dev/null +++ b/node_modules/es6-symbol/test/validate-symbol.js @@ -0,0 +1,19 @@ +'use strict'; + +var SymbolPoly = require('../polyfill'); + +module.exports = function (t, a) { + var symbol; + a.throws(function () { t(undefined); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "Null"); + a.throws(function () { t(true); }, TypeError, "Primitive"); + a.throws(function () { t('raz'); }, TypeError, "String"); + a.throws(function () { t({}); }, TypeError, "Object"); + a.throws(function () { t([]); }, TypeError, "Array"); + if (typeof Symbol !== 'undefined') { + symbol = Symbol(); + a(t(symbol), symbol, "Native"); + } + symbol = SymbolPoly(); + a(t(symbol), symbol, "Polyfill"); +}; diff --git a/node_modules/es6-symbol/validate-symbol.js b/node_modules/es6-symbol/validate-symbol.js new file mode 100644 index 00000000..42750043 --- /dev/null +++ b/node_modules/es6-symbol/validate-symbol.js @@ -0,0 +1,8 @@ +'use strict'; + +var isSymbol = require('./is-symbol'); + +module.exports = function (value) { + if (!isSymbol(value)) throw new TypeError(value + " is not a symbol"); + return value; +}; diff --git a/node_modules/es6-weak-map/.editorconfig b/node_modules/es6-weak-map/.editorconfig new file mode 100644 index 00000000..e1848c65 --- /dev/null +++ b/node_modules/es6-weak-map/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = tab + +[{*.json,*.yml}] +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/node_modules/es6-weak-map/CHANGELOG.md b/node_modules/es6-weak-map/CHANGELOG.md new file mode 100644 index 00000000..1f66f2bd --- /dev/null +++ b/node_modules/es6-weak-map/CHANGELOG.md @@ -0,0 +1,5 @@ +# 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. + +### [2.0.3](https://github.com/medikoo/es6-weak-map/compare/v2.0.2...v2.0.3) (2019-06-07) diff --git a/node_modules/es6-weak-map/CHANGES b/node_modules/es6-weak-map/CHANGES new file mode 100644 index 00000000..7772891f --- /dev/null +++ b/node_modules/es6-weak-map/CHANGES @@ -0,0 +1,45 @@ +v2.0.2 -- 2017.03.15 +* Update dependencies + +v2.0.1 -- 2015.10.02 +* Update to use es6-symbol at v3 + +v2.0.0 -- 2015.09.04 +* Relax native implementation detection, stringification of instance should returm + expected result (not necesarily prototype) + +v1.0.2 -- 2015.05.07 +* Add "ponyfill" keyword to meta description. Fixes #7 + +v1.0.1 -- 2015.04.14 +* Fix isNativeImplemented, so it's not affected by #3619 V8 bug +* Fix internal prototype resolution, in case where isNativeImplemented was true, and + native implementation was shadowed it got into stack overflow + +v1.0.0 -- 2015.04.13 +* It's v0.1.3 republished as v1.0.0 + +v0.1.4 -- 2015.04.13 +* Republish v0.1.2 as v0.1.4 due to breaking changes + (v0.1.3 should have been published as next major) + +v0.1.3 -- 2015.04.12 +* Update up to changes in specification (require new, remove clear method) +* Improve native implementation validation +* Configure lint scripts +* Rename LICENCE to LICENSE + +v0.1.2 -- 2014.09.01 +* Use internal random and unique id generator instead of external (time-uuid based). + Global uniqueness is not needed in scope of this module. Fixes #1 + +v0.1.1 -- 2014.05.15 +* Improve valid WeakMap detection + +v0.1.0 -- 2014.04.29 +* Assure to depend only npm hosted dependencies +* Update to use latest versions of dependencies +* Use ES6 symbols internally + +v0.0.0 -- 2013.10.24 +Initial (dev version) diff --git a/node_modules/es6-weak-map/LICENSE b/node_modules/es6-weak-map/LICENSE new file mode 100644 index 00000000..923b7f65 --- /dev/null +++ b/node_modules/es6-weak-map/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2013-2018, Mariusz Nowak, @medikoo, medikoo.com + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/es6-weak-map/README.md b/node_modules/es6-weak-map/README.md new file mode 100644 index 00000000..2c9c3754 --- /dev/null +++ b/node_modules/es6-weak-map/README.md @@ -0,0 +1,78 @@ +[![Build status][nix-build-image]][nix-build-url] +[![Windows status][win-build-image]][win-build-url] +![Transpilation status][transpilation-image] +[![npm version][npm-image]][npm-url] + +# es6-weak-map + +## WeakMap collection as specified in ECMAScript6 + +_Roughly inspired by Mark Miller's and Kris Kowal's [WeakMap implementation](https://github.com/drses/weak-map)_. + +Differences are: + +- Assumes compliant ES5 environment (no weird ES3 workarounds or hacks) +- Well modularized CJS style +- Based on one solution. + +### Limitations + +- Will fail on non extensible objects provided as keys + +### Installation + + $ npm install es6-weak-map + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Usage + +If you want to make sure your environment implements `WeakMap`, do: + +```javascript +require("es6-weak-map/implement"); +``` + +If you'd like to use native version when it exists and fallback to polyfill if it doesn't, but without implementing `WeakMap` on global scope, do: + +```javascript +var WeakMap = require("es6-weak-map"); +``` + +If you strictly want to use polyfill even if native `WeakMap` exists, do: + +```javascript +var WeakMap = require("es6-weak-map/polyfill"); +``` + +#### API + +Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-weakmap-objects). Still if you want quick look, follow example: + +```javascript +var WeakMap = require("es6-weak-map"); + +var map = new WeakMap(); +var obj = {}; + +map.set(obj, "foo"); // map +map.get(obj); // 'foo' +map.has(obj); // true +map.delete(obj); // true +map.get(obj); // undefined +map.has(obj); // false +map.set(obj, "bar"); // map +map.has(obj); // false +``` + +## Tests + + $ npm test + +[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/es6-weak-map/branches/master/shields_badge.svg +[nix-build-url]: https://semaphoreci.com/medikoo-org/es6-weak-map +[win-build-image]: https://ci.appveyor.com/api/projects/status/1c73c57pg4s6lwmu?svg=true +[win-build-url]: https://ci.appveyor.com/project/medikoo/es6-weak-map +[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg +[npm-image]: https://img.shields.io/npm/v/es6-weak-map.svg +[npm-url]: https://www.npmjs.com/package/es6-weak-map diff --git a/node_modules/es6-weak-map/implement.js b/node_modules/es6-weak-map/implement.js new file mode 100644 index 00000000..1bca6694 --- /dev/null +++ b/node_modules/es6-weak-map/implement.js @@ -0,0 +1,11 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(require("es5-ext/global"), "WeakMap", + { + value: require("./polyfill"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/node_modules/es6-weak-map/index.js b/node_modules/es6-weak-map/index.js new file mode 100644 index 00000000..c1a0c6bf --- /dev/null +++ b/node_modules/es6-weak-map/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? WeakMap : require("./polyfill"); diff --git a/node_modules/es6-weak-map/is-implemented.js b/node_modules/es6-weak-map/is-implemented.js new file mode 100644 index 00000000..cf03fd8c --- /dev/null +++ b/node_modules/es6-weak-map/is-implemented.js @@ -0,0 +1,21 @@ +"use strict"; + +module.exports = function () { + var weakMap, obj; + + if (typeof WeakMap !== "function") return false; + try { + // WebKit doesn't support arguments and crashes + weakMap = new WeakMap([[obj = {}, "one"], [{}, "two"], [{}, "three"]]); + } catch (e) { + return false; + } + if (String(weakMap) !== "[object WeakMap]") return false; + if (typeof weakMap.set !== "function") return false; + if (weakMap.set({}, 1) !== weakMap) return false; + if (typeof weakMap.delete !== "function") return false; + if (typeof weakMap.has !== "function") return false; + if (weakMap.get(obj) !== "one") return false; + + return true; +}; diff --git a/node_modules/es6-weak-map/is-native-implemented.js b/node_modules/es6-weak-map/is-native-implemented.js new file mode 100644 index 00000000..372e929f --- /dev/null +++ b/node_modules/es6-weak-map/is-native-implemented.js @@ -0,0 +1,8 @@ +// Exports true if environment provides native `WeakMap` implementation, whatever that is. + +"use strict"; + +module.exports = (function () { + if (typeof WeakMap !== "function") return false; + return Object.prototype.toString.call(new WeakMap()) === "[object WeakMap]"; +}()); diff --git a/node_modules/es6-weak-map/is-weak-map.js b/node_modules/es6-weak-map/is-weak-map.js new file mode 100644 index 00000000..007408fd --- /dev/null +++ b/node_modules/es6-weak-map/is-weak-map.js @@ -0,0 +1,13 @@ +"use strict"; + +var toStringTagSymbol = require("es6-symbol").toStringTag + + , objToString = Object.prototype.toString + , id = "[object WeakMap]" + , Global = typeof WeakMap === "undefined" ? null : WeakMap; + +module.exports = function (value) { + return (value && ((Global && (value instanceof Global)) || + (objToString.call(value) === id) || (value[toStringTagSymbol] === "WeakMap"))) || + false; +}; diff --git a/node_modules/es6-weak-map/package.json b/node_modules/es6-weak-map/package.json new file mode 100644 index 00000000..d88bf374 --- /dev/null +++ b/node_modules/es6-weak-map/package.json @@ -0,0 +1,44 @@ +{ + "name": "es6-weak-map", + "version": "2.0.3", + "description": "ECMAScript6 WeakMap polyfill", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "map", + "weakmap", + "collection", + "es6", + "harmony", + "list", + "hash", + "gc", + "ponyfill" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es6-weak-map.git" + }, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + }, + "devDependencies": { + "eslint": "^5.5", + "eslint-config-medikoo-es5": "^1.7", + "tad": "^0.2.8" + }, + "eslintConfig": { + "extends": "medikoo-es5", + "root": true, + "globals": { + "WeakMap": true + } + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "test": "node ./node_modules/tad/bin/tad" + }, + "license": "ISC" +} diff --git a/node_modules/es6-weak-map/polyfill.js b/node_modules/es6-weak-map/polyfill.js new file mode 100644 index 00000000..95e7390e --- /dev/null +++ b/node_modules/es6-weak-map/polyfill.js @@ -0,0 +1,65 @@ +"use strict"; + +var isValue = require("es5-ext/object/is-value") + , setPrototypeOf = require("es5-ext/object/set-prototype-of") + , object = require("es5-ext/object/valid-object") + , ensureValue = require("es5-ext/object/valid-value") + , randomUniq = require("es5-ext/string/random-uniq") + , d = require("d") + , getIterator = require("es6-iterator/get") + , forOf = require("es6-iterator/for-of") + , toStringTagSymbol = require("es6-symbol").toStringTag + , isNative = require("./is-native-implemented") + + , isArray = Array.isArray, defineProperty = Object.defineProperty + , objHasOwnProperty = Object.prototype.hasOwnProperty, getPrototypeOf = Object.getPrototypeOf + , WeakMapPoly; + +module.exports = WeakMapPoly = function (/* Iterable*/) { + var iterable = arguments[0], self; + + if (!(this instanceof WeakMapPoly)) throw new TypeError("Constructor requires 'new'"); + self = isNative && setPrototypeOf && (WeakMap !== WeakMapPoly) + ? setPrototypeOf(new WeakMap(), getPrototypeOf(this)) : this; + + if (isValue(iterable)) { + if (!isArray(iterable)) iterable = getIterator(iterable); + } + defineProperty(self, "__weakMapData__", d("c", "$weakMap$" + randomUniq())); + if (!iterable) return self; + forOf(iterable, function (val) { + ensureValue(val); + self.set(val[0], val[1]); + }); + return self; +}; + +if (isNative) { + if (setPrototypeOf) setPrototypeOf(WeakMapPoly, WeakMap); + WeakMapPoly.prototype = Object.create(WeakMap.prototype, { constructor: d(WeakMapPoly) }); +} + +Object.defineProperties(WeakMapPoly.prototype, { + delete: d(function (key) { + if (objHasOwnProperty.call(object(key), this.__weakMapData__)) { + delete key[this.__weakMapData__]; + return true; + } + return false; + }), + get: d(function (key) { + if (!objHasOwnProperty.call(object(key), this.__weakMapData__)) return undefined; + return key[this.__weakMapData__]; + }), + has: d(function (key) { + return objHasOwnProperty.call(object(key), this.__weakMapData__); + }), + set: d(function (key, value) { + defineProperty(object(key), this.__weakMapData__, d("c", value)); + return this; + }), + toString: d(function () { + return "[object WeakMap]"; + }) +}); +defineProperty(WeakMapPoly.prototype, toStringTagSymbol, d("c", "WeakMap")); diff --git a/node_modules/es6-weak-map/test/implement.js b/node_modules/es6-weak-map/test/implement.js new file mode 100644 index 00000000..e64af3ee --- /dev/null +++ b/node_modules/es6-weak-map/test/implement.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof WeakMap, "function"); +}; diff --git a/node_modules/es6-weak-map/test/index.js b/node_modules/es6-weak-map/test/index.js new file mode 100644 index 00000000..418b514e --- /dev/null +++ b/node_modules/es6-weak-map/test/index.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (T, a) { + var obj = {}; + + a((new T([[obj, "foo"]])).get(obj), "foo"); +}; diff --git a/node_modules/es6-weak-map/test/is-implemented.js b/node_modules/es6-weak-map/test/is-implemented.js new file mode 100644 index 00000000..fa7f7b90 --- /dev/null +++ b/node_modules/es6-weak-map/test/is-implemented.js @@ -0,0 +1,15 @@ +"use strict"; + +var globalObj = require("es5-ext/global") + , polyfill = require("../polyfill"); + +module.exports = function (t, a) { + var cache; + + a(typeof t(), "boolean"); + cache = globalObj.WeakMap; + globalObj.WeakMap = polyfill; + a(t(), true); + if (cache === undefined) delete globalObj.WeakMap; + else globalObj.WeakMap = cache; +}; diff --git a/node_modules/es6-weak-map/test/is-native-implemented.js b/node_modules/es6-weak-map/test/is-native-implemented.js new file mode 100644 index 00000000..87881863 --- /dev/null +++ b/node_modules/es6-weak-map/test/is-native-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a(typeof t, "boolean"); +}; diff --git a/node_modules/es6-weak-map/test/is-weak-map.js b/node_modules/es6-weak-map/test/is-weak-map.js new file mode 100644 index 00000000..e73c8394 --- /dev/null +++ b/node_modules/es6-weak-map/test/is-weak-map.js @@ -0,0 +1,16 @@ +"use strict"; + +var WeakMapPoly = require("../polyfill"); + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(true), false, "Primitive"); + a(t("raz"), false, "String"); + a(t({}), false, "Object"); + a(t([]), false, "Array"); + if (typeof WeakMap !== "undefined") { + a(t(new WeakMap()), true, "Native"); + } + a(t(new WeakMapPoly()), true, "Polyfill"); +}; diff --git a/node_modules/es6-weak-map/test/polyfill.js b/node_modules/es6-weak-map/test/polyfill.js new file mode 100644 index 00000000..9275b469 --- /dev/null +++ b/node_modules/es6-weak-map/test/polyfill.js @@ -0,0 +1,23 @@ +"use strict"; + +module.exports = function (T, a) { + var obj1 = {}, obj2 = {}, obj3 = {}, arr = [[obj1, "raz"], [obj2, "dwa"]], map = new T(arr); + + a(map instanceof T, true, "WeakMap"); + a(map.has(obj1), true, "Has: true"); + a(map.get(obj1), "raz", "Get: contains"); + a(map.has(obj3), false, "Has: false"); + a(map.get(obj3), undefined, "Get: doesn't contain"); + a(map.set(obj3, "trzy"), map, "Set: return"); + a(map.has(obj3), true, "Add"); + a(map.delete({}), false, "Delete: false"); + + a(map.delete(obj1), true, "Delete: true"); + a(map.get(obj1), undefined, "Get: after delete"); + a(map.has(obj1), false, "Has: after delete"); + + a.h1("Empty initialization"); + map = new T(); + map.set(obj1, "bar"); + a(map.get(obj1), "bar"); +}; diff --git a/node_modules/es6-weak-map/test/valid-weak-map.js b/node_modules/es6-weak-map/test/valid-weak-map.js new file mode 100644 index 00000000..6e5da2c4 --- /dev/null +++ b/node_modules/es6-weak-map/test/valid-weak-map.js @@ -0,0 +1,32 @@ +"use strict"; + +var WeakMapPoly = require("../polyfill"); + +module.exports = function (t, a) { + var map; + + a.throws(function () { + t(undefined); + }, TypeError, "Undefined"); + a.throws(function () { + t(null); + }, TypeError, "Null"); + a.throws(function () { + t(true); + }, TypeError, "Primitive"); + a.throws(function () { + t("raz"); + }, TypeError, "String"); + a.throws(function () { + t({}); + }, TypeError, "Object"); + a.throws(function () { + t([]); + }, TypeError, "Array"); + if (typeof WeakMap !== "undefined") { + map = new WeakMap(); + a(t(map), map, "Native"); + } + map = new WeakMapPoly(); + a(t(map), map, "Polyfill"); +}; diff --git a/node_modules/es6-weak-map/valid-weak-map.js b/node_modules/es6-weak-map/valid-weak-map.js new file mode 100644 index 00000000..ad2f9f36 --- /dev/null +++ b/node_modules/es6-weak-map/valid-weak-map.js @@ -0,0 +1,8 @@ +"use strict"; + +var isWeakMap = require("./is-weak-map"); + +module.exports = function (value) { + if (!isWeakMap(value)) throw new TypeError(value + " is not a WeakMap"); + return value; +}; diff --git a/node_modules/event-emitter/.lint b/node_modules/event-emitter/.lint new file mode 100644 index 00000000..f76e528e --- /dev/null +++ b/node_modules/event-emitter/.lint @@ -0,0 +1,15 @@ +@root + +module +es5 + +indent 2 +maxlen 80 +tabs + +ass +plusplus +nomen + +./benchmark +predef+ console diff --git a/node_modules/event-emitter/.npmignore b/node_modules/event-emitter/.npmignore new file mode 100644 index 00000000..68ebfddd --- /dev/null +++ b/node_modules/event-emitter/.npmignore @@ -0,0 +1,3 @@ +.DS_Store +/.lintcache +/node_modules diff --git a/node_modules/event-emitter/.testignore b/node_modules/event-emitter/.testignore new file mode 100644 index 00000000..f9c8c381 --- /dev/null +++ b/node_modules/event-emitter/.testignore @@ -0,0 +1 @@ +/benchmark diff --git a/node_modules/event-emitter/.travis.yml b/node_modules/event-emitter/.travis.yml new file mode 100644 index 00000000..5f29034c --- /dev/null +++ b/node_modules/event-emitter/.travis.yml @@ -0,0 +1,16 @@ +sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +language: node_js +node_js: + - 0.12 + - 4 + - 6 + - 7 + +before_install: + - mkdir node_modules; ln -s ../ node_modules/event-emitter + +notifications: + email: + - medikoo+event-emitter@medikoo.com + +script: "npm test && npm run lint" diff --git a/node_modules/event-emitter/CHANGES b/node_modules/event-emitter/CHANGES new file mode 100644 index 00000000..3ac46ce8 --- /dev/null +++ b/node_modules/event-emitter/CHANGES @@ -0,0 +1,73 @@ +v0.3.5 -- 2017.03.15 +* Improve documentation +* Update dependencies + +v0.3.4 -- 2015.10.02 +* Add `emitError` extension + +v0.3.3 -- 2015.01.30 +* Fix reference to module in benchmarks + +v0.3.2 -- 2015.01.20 +* Improve documentation +* Configure lint scripts +* Fix spelling of LICENSE + +v0.3.1 -- 2014.04.25 +* Fix redefinition of emit method in `pipe` +* Allow custom emit method name in `pipe` + +v0.3.0 -- 2014.04.24 +* Move out from lib folder +* Do not expose all utilities on main module +* Support objects which do not inherit from Object.prototype +* Improve arguments validation +* Improve internals +* Remove Makefile +* Improve documentation + +v0.2.2 -- 2013.06.05 +* `unify` functionality + +v0.2.1 -- 2012.09.21 +* hasListeners module +* Simplified internal id (improves performance a little), now it starts with + underscore (hint it's private). Abstracted it to external module to have it + one place +* Documentation cleanup + +v0.2.0 -- 2012.09.19 +* Trashed poor implementation of v0.1 and came up with something solid + +Changes: +* Improved performance +* Fixed bugs event-emitter is now cross-prototype safe and not affected by + unexpected methods attached to Object.prototype +* Removed support for optional "emitter" argument in `emit` method, it was + cumbersome to use, and should be solved just with event objects + +v0.1.5 -- 2012.08.06 +* (maintanance) Do not use descriptors for internal objects, it exposes V8 bugs + (only Node v0.6 branch) + +v0.1.4 -- 2012.06.13 +* Fix detachment of listeners added with 'once' + +v0.1.3 -- 2012.05.28 +* Updated es5-ext to latest version (v0.8) +* Cleared package.json so it's in npm friendly format + +v0.1.2 -- 2012.01.22 +* Support for emitter argument in emit function, this allows some listeners not + to be notified about event +* allOff - removes all listeners from object +* All methods returns self object +* Internal fixes +* Travis CI integration + +v0.1.1 -- 2011.08.08 +* Added TAD test suite to devDependencies, configured test commands. + Tests can be run with 'make test' or 'npm test' + +v0.1.0 -- 2011.08.08 +Initial version diff --git a/node_modules/event-emitter/LICENSE b/node_modules/event-emitter/LICENSE new file mode 100644 index 00000000..ccb76f6e --- /dev/null +++ b/node_modules/event-emitter/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2012-2015 Mariusz Nowak (www.medikoo.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/event-emitter/README.md b/node_modules/event-emitter/README.md new file mode 100644 index 00000000..04990542 --- /dev/null +++ b/node_modules/event-emitter/README.md @@ -0,0 +1,98 @@ +# event-emitter +## Environment agnostic event emitter + +### Installation + + $ npm install event-emitter + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Usage + +```javascript +var ee = require('event-emitter'); + +var MyClass = function () { /* .. */ }; +ee(MyClass.prototype); // All instances of MyClass will expose event-emitter interface + +var emitter = new MyClass(), listener; + +emitter.on('test', listener = function (args) { + // … react to 'test' event +}); + +emitter.once('test', function (args) { + // … react to first 'test' event (invoked only once!) +}); + +emitter.emit('test', arg1, arg2/*…args*/); // Two above listeners invoked +emitter.emit('test', arg1, arg2/*…args*/); // Only first listener invoked + +emitter.off('test', listener); // Removed first listener +emitter.emit('test', arg1, arg2/*…args*/); // No listeners invoked +``` +### Additional utilities + +#### allOff(obj) _(event-emitter/all-off)_ + +Removes all listeners from given event emitter object + +#### hasListeners(obj[, name]) _(event-emitter/has-listeners)_ + +Whether object has some listeners attached to the object. +When `name` is provided, it checks listeners for specific event name + +```javascript +var emitter = ee(); +var hasListeners = require('event-emitter/has-listeners'); +var listener = function () {}; + +hasListeners(emitter); // false + +emitter.on('foo', listener); +hasListeners(emitter); // true +hasListeners(emitter, 'foo'); // true +hasListeners(emitter, 'bar'); // false + +emitter.off('foo', listener); +hasListeners(emitter, 'foo'); // false +``` + +#### pipe(source, target[, emitMethodName]) _(event-emitter/pipe)_ + +Pipes all events from _source_ emitter onto _target_ emitter (all events from _source_ emitter will be emitted also on _target_ emitter, but not other way). +Returns _pipe_ object which exposes `pipe.close` function. Invoke it to close configured _pipe_. +It works internally by redefinition of `emit` method, if in your interface this method is referenced differently, provide its name (or symbol) with third argument. + +#### unify(emitter1, emitter2) _(event-emitter/unify)_ + +Unifies event handling for two objects. Events emitted on _emitter1_ would be also emitted on _emitter2_, and other way back. +Non reversible. + +```javascript +var eeUnify = require('event-emitter/unify'); + +var emitter1 = ee(), listener1, listener3; +var emitter2 = ee(), listener2, listener4; + +emitter1.on('test', listener1 = function () { }); +emitter2.on('test', listener2 = function () { }); + +emitter1.emit('test'); // Invoked listener1 +emitter2.emit('test'); // Invoked listener2 + +var unify = eeUnify(emitter1, emitter2); + +emitter1.emit('test'); // Invoked listener1 and listener2 +emitter2.emit('test'); // Invoked listener1 and listener2 + +emitter1.on('test', listener3 = function () { }); +emitter2.on('test', listener4 = function () { }); + +emitter1.emit('test'); // Invoked listener1, listener2, listener3 and listener4 +emitter2.emit('test'); // Invoked listener1, listener2, listener3 and listener4 +``` + +### Tests [![Build Status](https://travis-ci.org/medikoo/event-emitter.png)](https://travis-ci.org/medikoo/event-emitter) + + $ npm test diff --git a/node_modules/event-emitter/all-off.js b/node_modules/event-emitter/all-off.js new file mode 100644 index 00000000..829be65c --- /dev/null +++ b/node_modules/event-emitter/all-off.js @@ -0,0 +1,19 @@ +'use strict'; + +var value = require('es5-ext/object/valid-object') + + , hasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function (emitter/*, type*/) { + var type = arguments[1], data; + + value(emitter); + + if (type !== undefined) { + data = hasOwnProperty.call(emitter, '__ee__') && emitter.__ee__; + if (!data) return; + if (data[type]) delete data[type]; + return; + } + if (hasOwnProperty.call(emitter, '__ee__')) delete emitter.__ee__; +}; diff --git a/node_modules/event-emitter/benchmark/many-on.js b/node_modules/event-emitter/benchmark/many-on.js new file mode 100644 index 00000000..e09bfde8 --- /dev/null +++ b/node_modules/event-emitter/benchmark/many-on.js @@ -0,0 +1,83 @@ +'use strict'; + +// Benchmark comparing performance of event emit for many listeners +// To run it, do following in memoizee package path: +// +// $ npm install eventemitter2 signals +// $ node benchmark/many-on.js + +var forEach = require('es5-ext/object/for-each') + , pad = require('es5-ext/string/#/pad') + + , now = Date.now + + , time, count = 1000000, i, data = {} + , ee, native, ee2, signals, a = {}, b = {}; + +ee = (function () { + var ee = require('../')(); + ee.on('test', function () { return arguments; }); + ee.on('test', function () { return arguments; }); + return ee.on('test', function () { return arguments; }); +}()); + +native = (function () { + var ee = require('events'); + ee = new ee.EventEmitter(); + ee.on('test', function () { return arguments; }); + ee.on('test', function () { return arguments; }); + return ee.on('test', function () { return arguments; }); +}()); + +ee2 = (function () { + var ee = require('eventemitter2'); + ee = new ee.EventEmitter2(); + ee.on('test', function () { return arguments; }); + ee.on('test', function () { return arguments; }); + return ee.on('test', function () { return arguments; }); +}()); + +signals = (function () { + var Signal = require('signals') + , ee = { test: new Signal() }; + ee.test.add(function () { return arguments; }); + ee.test.add(function () { return arguments; }); + ee.test.add(function () { return arguments; }); + return ee; +}()); + +console.log("Emit for 3 listeners", "x" + count + ":\n"); + +i = count; +time = now(); +while (i--) { + ee.emit('test', a, b); +} +data["event-emitter (this implementation)"] = now() - time; + +i = count; +time = now(); +while (i--) { + native.emit('test', a, b); +} +data["EventEmitter (Node.js native)"] = now() - time; + +i = count; +time = now(); +while (i--) { + ee2.emit('test', a, b); +} +data.EventEmitter2 = now() - time; + +i = count; +time = now(); +while (i--) { + signals.test.dispatch(a, b); +} +data.Signals = now() - time; + +forEach(data, function (value, name, obj, index) { + console.log(index + 1 + ":", pad.call(value, " ", 5), name); +}, null, function (a, b) { + return this[a] - this[b]; +}); diff --git a/node_modules/event-emitter/benchmark/single-on.js b/node_modules/event-emitter/benchmark/single-on.js new file mode 100644 index 00000000..99decbda --- /dev/null +++ b/node_modules/event-emitter/benchmark/single-on.js @@ -0,0 +1,73 @@ +'use strict'; + +// Benchmark comparing performance of event emit for single listener +// To run it, do following in memoizee package path: +// +// $ npm install eventemitter2 signals +// $ node benchmark/single-on.js + +var forEach = require('es5-ext/object/for-each') + , pad = require('es5-ext/string/#/pad') + + , now = Date.now + + , time, count = 1000000, i, data = {} + , ee, native, ee2, signals, a = {}, b = {}; + +ee = (function () { + var ee = require('../'); + return ee().on('test', function () { return arguments; }); +}()); + +native = (function () { + var ee = require('events'); + return (new ee.EventEmitter()).on('test', function () { return arguments; }); +}()); + +ee2 = (function () { + var ee = require('eventemitter2'); + return (new ee.EventEmitter2()).on('test', function () { return arguments; }); +}()); + +signals = (function () { + var Signal = require('signals') + , ee = { test: new Signal() }; + ee.test.add(function () { return arguments; }); + return ee; +}()); + +console.log("Emit for single listener", "x" + count + ":\n"); + +i = count; +time = now(); +while (i--) { + ee.emit('test', a, b); +} +data["event-emitter (this implementation)"] = now() - time; + +i = count; +time = now(); +while (i--) { + native.emit('test', a, b); +} +data["EventEmitter (Node.js native)"] = now() - time; + +i = count; +time = now(); +while (i--) { + ee2.emit('test', a, b); +} +data.EventEmitter2 = now() - time; + +i = count; +time = now(); +while (i--) { + signals.test.dispatch(a, b); +} +data.Signals = now() - time; + +forEach(data, function (value, name, obj, index) { + console.log(index + 1 + ":", pad.call(value, " ", 5), name); +}, null, function (a, b) { + return this[a] - this[b]; +}); diff --git a/node_modules/event-emitter/emit-error.js b/node_modules/event-emitter/emit-error.js new file mode 100644 index 00000000..769b4c53 --- /dev/null +++ b/node_modules/event-emitter/emit-error.js @@ -0,0 +1,13 @@ +'use strict'; + +var ensureError = require('es5-ext/error/valid-error') + , ensureObject = require('es5-ext/object/valid-object') + + , hasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function (err) { + (ensureObject(this) && ensureError(err)); + if (!hasOwnProperty.call(ensureObject(this), '__ee__')) throw err; + if (!this.__ee__.error) throw err; + this.emit('error', err); +}; diff --git a/node_modules/event-emitter/has-listeners.js b/node_modules/event-emitter/has-listeners.js new file mode 100644 index 00000000..8744522e --- /dev/null +++ b/node_modules/event-emitter/has-listeners.js @@ -0,0 +1,16 @@ +'use strict'; + +var isEmpty = require('es5-ext/object/is-empty') + , value = require('es5-ext/object/valid-value') + + , hasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function (obj/*, type*/) { + var type; + value(obj); + type = arguments[1]; + if (arguments.length > 1) { + return hasOwnProperty.call(obj, '__ee__') && Boolean(obj.__ee__[type]); + } + return obj.hasOwnProperty('__ee__') && !isEmpty(obj.__ee__); +}; diff --git a/node_modules/event-emitter/index.js b/node_modules/event-emitter/index.js new file mode 100644 index 00000000..c36d3e49 --- /dev/null +++ b/node_modules/event-emitter/index.js @@ -0,0 +1,132 @@ +'use strict'; + +var d = require('d') + , callable = require('es5-ext/object/valid-callable') + + , apply = Function.prototype.apply, call = Function.prototype.call + , create = Object.create, defineProperty = Object.defineProperty + , defineProperties = Object.defineProperties + , hasOwnProperty = Object.prototype.hasOwnProperty + , descriptor = { configurable: true, enumerable: false, writable: true } + + , on, once, off, emit, methods, descriptors, base; + +on = function (type, listener) { + var data; + + callable(listener); + + if (!hasOwnProperty.call(this, '__ee__')) { + data = descriptor.value = create(null); + defineProperty(this, '__ee__', descriptor); + descriptor.value = null; + } else { + data = this.__ee__; + } + if (!data[type]) data[type] = listener; + else if (typeof data[type] === 'object') data[type].push(listener); + else data[type] = [data[type], listener]; + + return this; +}; + +once = function (type, listener) { + var once, self; + + callable(listener); + self = this; + on.call(this, type, once = function () { + off.call(self, type, once); + apply.call(listener, this, arguments); + }); + + once.__eeOnceListener__ = listener; + return this; +}; + +off = function (type, listener) { + var data, listeners, candidate, i; + + callable(listener); + + if (!hasOwnProperty.call(this, '__ee__')) return this; + data = this.__ee__; + if (!data[type]) return this; + listeners = data[type]; + + if (typeof listeners === 'object') { + for (i = 0; (candidate = listeners[i]); ++i) { + if ((candidate === listener) || + (candidate.__eeOnceListener__ === listener)) { + if (listeners.length === 2) data[type] = listeners[i ? 0 : 1]; + else listeners.splice(i, 1); + } + } + } else { + if ((listeners === listener) || + (listeners.__eeOnceListener__ === listener)) { + delete data[type]; + } + } + + return this; +}; + +emit = function (type) { + var i, l, listener, listeners, args; + + if (!hasOwnProperty.call(this, '__ee__')) return; + listeners = this.__ee__[type]; + if (!listeners) return; + + if (typeof listeners === 'object') { + l = arguments.length; + args = new Array(l - 1); + for (i = 1; i < l; ++i) args[i - 1] = arguments[i]; + + listeners = listeners.slice(); + for (i = 0; (listener = listeners[i]); ++i) { + apply.call(listener, this, args); + } + } else { + switch (arguments.length) { + case 1: + call.call(listeners, this); + break; + case 2: + call.call(listeners, this, arguments[1]); + break; + case 3: + call.call(listeners, this, arguments[1], arguments[2]); + break; + default: + l = arguments.length; + args = new Array(l - 1); + for (i = 1; i < l; ++i) { + args[i - 1] = arguments[i]; + } + apply.call(listeners, this, args); + } + } +}; + +methods = { + on: on, + once: once, + off: off, + emit: emit +}; + +descriptors = { + on: d(on), + once: d(once), + off: d(off), + emit: d(emit) +}; + +base = defineProperties({}, descriptors); + +module.exports = exports = function (o) { + return (o == null) ? create(base) : defineProperties(Object(o), descriptors); +}; +exports.methods = methods; diff --git a/node_modules/event-emitter/package.json b/node_modules/event-emitter/package.json new file mode 100644 index 00000000..8784036e --- /dev/null +++ b/node_modules/event-emitter/package.json @@ -0,0 +1,34 @@ +{ + "name": "event-emitter", + "version": "0.3.5", + "description": "Environment agnostic event emitter", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "event", + "events", + "trigger", + "observer", + "listener", + "emitter", + "pubsub" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/event-emitter.git" + }, + "dependencies": { + "es5-ext": "~0.10.14", + "d": "1" + }, + "devDependencies": { + "tad": "~0.2.7", + "xlint": "~0.2.2", + "xlint-jslint-medikoo": "~0.1.4" + }, + "scripts": { + "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", + "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", + "test": "node ./node_modules/tad/bin/tad" + }, + "license": "MIT" +} diff --git a/node_modules/event-emitter/pipe.js b/node_modules/event-emitter/pipe.js new file mode 100644 index 00000000..0088efef --- /dev/null +++ b/node_modules/event-emitter/pipe.js @@ -0,0 +1,42 @@ +'use strict'; + +var aFrom = require('es5-ext/array/from') + , remove = require('es5-ext/array/#/remove') + , value = require('es5-ext/object/valid-object') + , d = require('d') + , emit = require('./').methods.emit + + , defineProperty = Object.defineProperty + , hasOwnProperty = Object.prototype.hasOwnProperty + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +module.exports = function (e1, e2/*, name*/) { + var pipes, pipe, desc, name; + + (value(e1) && value(e2)); + name = arguments[2]; + if (name === undefined) name = 'emit'; + + pipe = { + close: function () { remove.call(pipes, e2); } + }; + if (hasOwnProperty.call(e1, '__eePipes__')) { + (pipes = e1.__eePipes__).push(e2); + return pipe; + } + defineProperty(e1, '__eePipes__', d('c', pipes = [e2])); + desc = getOwnPropertyDescriptor(e1, name); + if (!desc) { + desc = d('c', undefined); + } else { + delete desc.get; + delete desc.set; + } + desc.value = function () { + var i, emitter, data = aFrom(pipes); + emit.apply(this, arguments); + for (i = 0; (emitter = data[i]); ++i) emit.apply(emitter, arguments); + }; + defineProperty(e1, name, desc); + return pipe; +}; diff --git a/node_modules/event-emitter/test/all-off.js b/node_modules/event-emitter/test/all-off.js new file mode 100644 index 00000000..8aa872e9 --- /dev/null +++ b/node_modules/event-emitter/test/all-off.js @@ -0,0 +1,48 @@ +'use strict'; + +var ee = require('../'); + +module.exports = function (t, a) { + var x, count, count2; + + x = ee(); + count = 0; + count2 = 0; + x.on('foo', function () { + ++count; + }); + x.on('foo', function () { + ++count; + }); + x.on('bar', function () { + ++count2; + }); + x.on('bar', function () { + ++count2; + }); + t(x, 'foo'); + x.emit('foo'); + x.emit('bar'); + a(count, 0, "All off: type"); + a(count2, 2, "All off: ohter type"); + + count = 0; + count2 = 0; + x.on('foo', function () { + ++count; + }); + x.on('foo', function () { + ++count; + }); + x.on('bar', function () { + ++count2; + }); + x.on('bar', function () { + ++count2; + }); + t(x); + x.emit('foo'); + x.emit('bar'); + a(count, 0, "All off: type"); + a(count2, 0, "All off: other type"); +}; diff --git a/node_modules/event-emitter/test/emit-error.js b/node_modules/event-emitter/test/emit-error.js new file mode 100644 index 00000000..edac350a --- /dev/null +++ b/node_modules/event-emitter/test/emit-error.js @@ -0,0 +1,14 @@ +'use strict'; + +var customError = require('es5-ext/error/custom') + , ee = require('../'); + +module.exports = function (t, a) { + var x, error = customError('Some error', 'ERROR_TEST'), emitted; + + x = ee(); + a.throws(function () { t.call(x, error); }, 'ERROR_TEST'); + x.on('error', function (err) { emitted = err; }); + t.call(x, error); + a(emitted, error); +}; diff --git a/node_modules/event-emitter/test/has-listeners.js b/node_modules/event-emitter/test/has-listeners.js new file mode 100644 index 00000000..875b048a --- /dev/null +++ b/node_modules/event-emitter/test/has-listeners.js @@ -0,0 +1,42 @@ +'use strict'; + +var ee = require('../'); + +module.exports = function (t) { + var x, y; + return { + Any: function (a) { + a(t(true), false, "Primitive"); + a(t({ events: [] }), false, "Other object"); + a(t(x = ee()), false, "Emitter: empty"); + + x.on('test', y = function () {}); + a(t(x), true, "Emitter: full"); + x.off('test', y); + a(t(x), false, "Emitter: empty but touched"); + x.once('test', y = function () {}); + a(t(x), true, "Emitter: full: Once"); + x.off('test', y); + a(t(x), false, "Emitter: empty but touched by once"); + }, + Specific: function (a) { + a(t(true, 'test'), false, "Primitive"); + a(t({ events: [] }, 'test'), false, "Other object"); + a(t(x = ee(), 'test'), false, "Emitter: empty"); + + x.on('test', y = function () {}); + a(t(x, 'test'), true, "Emitter: full"); + a(t(x, 'foo'), false, "Emitter: full, other event"); + x.off('test', y); + a(t(x, 'test'), false, "Emitter: empty but touched"); + a(t(x, 'foo'), false, "Emitter: empty but touched, other event"); + + x.once('test', y = function () {}); + a(t(x, 'test'), true, "Emitter: full: Once"); + a(t(x, 'foo'), false, "Emitter: full: Once, other event"); + x.off('test', y); + a(t(x, 'test'), false, "Emitter: empty but touched by once"); + a(t(x, 'foo'), false, "Emitter: empty but touched by once, other event"); + } + }; +}; diff --git a/node_modules/event-emitter/test/index.js b/node_modules/event-emitter/test/index.js new file mode 100644 index 00000000..c7c3f24c --- /dev/null +++ b/node_modules/event-emitter/test/index.js @@ -0,0 +1,107 @@ +'use strict'; + +module.exports = function (t, a) { + var x = t(), y, count, count2, count3, count4, test, listener1, listener2; + + x.emit('none'); + + test = "Once: "; + count = 0; + x.once('foo', function (a1, a2, a3) { + a(this, x, test + "Context"); + a.deep([a1, a2, a3], ['foo', x, 15], test + "Arguments"); + ++count; + }); + + x.emit('foobar'); + a(count, 0, test + "Not invoked on other event"); + x.emit('foo', 'foo', x, 15); + a(count, 1, test + "Emitted"); + x.emit('foo'); + a(count, 1, test + "Emitted once"); + + test = "On & Once: "; + count = 0; + x.on('foo', listener1 = function (a1, a2, a3) { + a(this, x, test + "Context"); + a.deep([a1, a2, a3], ['foo', x, 15], test + "Arguments"); + ++count; + }); + count2 = 0; + x.once('foo', listener2 = function (a1, a2, a3) { + a(this, x, test + "Context"); + a.deep([a1, a2, a3], ['foo', x, 15], test + "Arguments"); + ++count2; + }); + + x.emit('foobar'); + a(count, 0, test + "Not invoked on other event"); + x.emit('foo', 'foo', x, 15); + a(count, 1, test + "Emitted"); + x.emit('foo', 'foo', x, 15); + a(count, 2, test + "Emitted twice"); + a(count2, 1, test + "Emitted once"); + x.off('foo', listener1); + x.emit('foo'); + a(count, 2, test + "Not emitter after off"); + + count = 0; + x.once('foo', listener1 = function () { ++count; }); + + x.off('foo', listener1); + x.emit('foo'); + a(count, 0, "Once Off: Not emitted"); + + count = 0; + x.on('foo', listener2 = function () {}); + x.once('foo', listener1 = function () { ++count; }); + + x.off('foo', listener1); + x.emit('foo'); + a(count, 0, "Once Off (multi): Not emitted"); + x.off('foo', listener2); + + test = "Prototype Share: "; + + y = Object.create(x); + + count = 0; + count2 = 0; + count3 = 0; + count4 = 0; + x.on('foo', function () { + ++count; + }); + y.on('foo', function () { + ++count2; + }); + x.once('foo', function () { + ++count3; + }); + y.once('foo', function () { + ++count4; + }); + x.emit('foo'); + a(count, 1, test + "x on count"); + a(count2, 0, test + "y on count"); + a(count3, 1, test + "x once count"); + a(count4, 0, test + "y once count"); + + y.emit('foo'); + a(count, 1, test + "x on count"); + a(count2, 1, test + "y on count"); + a(count3, 1, test + "x once count"); + a(count4, 1, test + "y once count"); + + x.emit('foo'); + a(count, 2, test + "x on count"); + a(count2, 1, test + "y on count"); + a(count3, 1, test + "x once count"); + a(count4, 1, test + "y once count"); + + y.emit('foo'); + a(count, 2, test + "x on count"); + a(count2, 2, test + "y on count"); + a(count3, 1, test + "x once count"); + a(count4, 1, test + "y once count"); +}; diff --git a/node_modules/event-emitter/test/pipe.js b/node_modules/event-emitter/test/pipe.js new file mode 100644 index 00000000..9d15d6da --- /dev/null +++ b/node_modules/event-emitter/test/pipe.js @@ -0,0 +1,53 @@ +'use strict'; + +var ee = require('../'); + +module.exports = function (t, a) { + var x = {}, y = {}, z = {}, count, count2, count3, pipe; + + ee(x); + x = Object.create(x); + ee(y); + ee(z); + + count = 0; + count2 = 0; + count3 = 0; + x.on('foo', function () { + ++count; + }); + y.on('foo', function () { + ++count2; + }); + z.on('foo', function () { + ++count3; + }); + + x.emit('foo'); + a(count, 1, "Pre pipe, x"); + a(count2, 0, "Pre pipe, y"); + a(count3, 0, "Pre pipe, z"); + + pipe = t(x, y); + x.emit('foo'); + a(count, 2, "Post pipe, x"); + a(count2, 1, "Post pipe, y"); + a(count3, 0, "Post pipe, z"); + + y.emit('foo'); + a(count, 2, "Post pipe, on y, x"); + a(count2, 2, "Post pipe, on y, y"); + a(count3, 0, "Post pipe, on y, z"); + + t(x, z); + x.emit('foo'); + a(count, 3, "Post pipe z, x"); + a(count2, 3, "Post pipe z, y"); + a(count3, 1, "Post pipe z, z"); + + pipe.close(); + x.emit('foo'); + a(count, 4, "Close pipe y, x"); + a(count2, 3, "Close pipe y, y"); + a(count3, 2, "Close pipe y, z"); +}; diff --git a/node_modules/event-emitter/test/unify.js b/node_modules/event-emitter/test/unify.js new file mode 100644 index 00000000..69295e06 --- /dev/null +++ b/node_modules/event-emitter/test/unify.js @@ -0,0 +1,123 @@ +'use strict'; + +var ee = require('../'); + +module.exports = function (t) { + + return { + "": function (a) { + var x = {}, y = {}, z = {}, count, count2, count3; + + ee(x); + ee(y); + ee(z); + + count = 0; + count2 = 0; + count3 = 0; + x.on('foo', function () { ++count; }); + y.on('foo', function () { ++count2; }); + z.on('foo', function () { ++count3; }); + + x.emit('foo'); + a(count, 1, "Pre unify, x"); + a(count2, 0, "Pre unify, y"); + a(count3, 0, "Pre unify, z"); + + t(x, y); + a(x.__ee__, y.__ee__, "Post unify y"); + x.emit('foo'); + a(count, 2, "Post unify, x"); + a(count2, 1, "Post unify, y"); + a(count3, 0, "Post unify, z"); + + y.emit('foo'); + a(count, 3, "Post unify, on y, x"); + a(count2, 2, "Post unify, on y, y"); + a(count3, 0, "Post unify, on y, z"); + + t(x, z); + a(x.__ee__, x.__ee__, "Post unify z"); + x.emit('foo'); + a(count, 4, "Post unify z, x"); + a(count2, 3, "Post unify z, y"); + a(count3, 1, "Post unify z, z"); + }, + "On empty": function (a) { + var x = {}, y = {}, z = {}, count, count2, count3; + + ee(x); + ee(y); + ee(z); + + count = 0; + count2 = 0; + count3 = 0; + y.on('foo', function () { ++count2; }); + x.emit('foo'); + a(count, 0, "Pre unify, x"); + a(count2, 0, "Pre unify, y"); + a(count3, 0, "Pre unify, z"); + + t(x, y); + a(x.__ee__, y.__ee__, "Post unify y"); + x.on('foo', function () { ++count; }); + x.emit('foo'); + a(count, 1, "Post unify, x"); + a(count2, 1, "Post unify, y"); + a(count3, 0, "Post unify, z"); + + y.emit('foo'); + a(count, 2, "Post unify, on y, x"); + a(count2, 2, "Post unify, on y, y"); + a(count3, 0, "Post unify, on y, z"); + + t(x, z); + a(x.__ee__, z.__ee__, "Post unify z"); + z.on('foo', function () { ++count3; }); + x.emit('foo'); + a(count, 3, "Post unify z, x"); + a(count2, 3, "Post unify z, y"); + a(count3, 1, "Post unify z, z"); + }, + Many: function (a) { + var x = {}, y = {}, z = {}, count, count2, count3; + + ee(x); + ee(y); + ee(z); + + count = 0; + count2 = 0; + count3 = 0; + x.on('foo', function () { ++count; }); + y.on('foo', function () { ++count2; }); + y.on('foo', function () { ++count2; }); + z.on('foo', function () { ++count3; }); + + x.emit('foo'); + a(count, 1, "Pre unify, x"); + a(count2, 0, "Pre unify, y"); + a(count3, 0, "Pre unify, z"); + + t(x, y); + a(x.__ee__, y.__ee__, "Post unify y"); + x.emit('foo'); + a(count, 2, "Post unify, x"); + a(count2, 2, "Post unify, y"); + a(count3, 0, "Post unify, z"); + + y.emit('foo'); + a(count, 3, "Post unify, on y, x"); + a(count2, 4, "Post unify, on y, y"); + a(count3, 0, "Post unify, on y, z"); + + t(x, z); + a(x.__ee__, x.__ee__, "Post unify z"); + x.emit('foo'); + a(count, 4, "Post unify z, x"); + a(count2, 6, "Post unify z, y"); + a(count3, 1, "Post unify z, z"); + } + }; +}; diff --git a/node_modules/event-emitter/unify.js b/node_modules/event-emitter/unify.js new file mode 100644 index 00000000..c6a858a0 --- /dev/null +++ b/node_modules/event-emitter/unify.js @@ -0,0 +1,50 @@ +'use strict'; + +var forEach = require('es5-ext/object/for-each') + , validValue = require('es5-ext/object/valid-object') + + , push = Array.prototype.apply, defineProperty = Object.defineProperty + , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty + , d = { configurable: true, enumerable: false, writable: true }; + +module.exports = function (e1, e2) { + var data; + (validValue(e1) && validValue(e2)); + if (!hasOwnProperty.call(e1, '__ee__')) { + if (!hasOwnProperty.call(e2, '__ee__')) { + d.value = create(null); + defineProperty(e1, '__ee__', d); + defineProperty(e2, '__ee__', d); + d.value = null; + return; + } + d.value = e2.__ee__; + defineProperty(e1, '__ee__', d); + d.value = null; + return; + } + data = d.value = e1.__ee__; + if (!hasOwnProperty.call(e2, '__ee__')) { + defineProperty(e2, '__ee__', d); + d.value = null; + return; + } + if (data === e2.__ee__) return; + forEach(e2.__ee__, function (listener, name) { + if (!data[name]) { + data[name] = listener; + return; + } + if (typeof data[name] === 'object') { + if (typeof listener === 'object') push.apply(data[name], listener); + else data[name].push(listener); + } else if (typeof listener === 'object') { + listener.unshift(data[name]); + data[name] = listener; + } else { + data[name] = [data[name], listener]; + } + }); + defineProperty(e2, '__ee__', d); + d.value = null; +}; diff --git a/node_modules/fs-extra/CHANGELOG.md b/node_modules/fs-extra/CHANGELOG.md new file mode 100644 index 00000000..7c787139 --- /dev/null +++ b/node_modules/fs-extra/CHANGELOG.md @@ -0,0 +1,842 @@ +7.0.1 / 2018-11-07 +------------------ + +- Fix `removeSync()` on Windows, in some cases, it would error out with `ENOTEMPTY` ([#646](https://github.com/jprichardson/node-fs-extra/pull/646)) +- Document `mode` option for `ensureDir*()` ([#587](https://github.com/jprichardson/node-fs-extra/pull/587)) +- Don't include documentation files in npm package tarball ([#642](https://github.com/jprichardson/node-fs-extra/issues/642), [#643](https://github.com/jprichardson/node-fs-extra/pull/643)) + +7.0.0 / 2018-07-16 +------------------ + +- **BREAKING:** Refine `copy*()` handling of symlinks to properly detect symlinks that point to the same file. ([#582](https://github.com/jprichardson/node-fs-extra/pull/582)) +- Fix bug with copying write-protected directories ([#600](https://github.com/jprichardson/node-fs-extra/pull/600)) +- Universalify `fs.lchmod()` ([#596](https://github.com/jprichardson/node-fs-extra/pull/596)) +- Add `engines` field to `package.json` ([#580](https://github.com/jprichardson/node-fs-extra/pull/580)) + +6.0.1 / 2018-05-09 +------------------ + +- Fix `fs.promises` `ExperimentalWarning` on Node v10.1.0 ([#578](https://github.com/jprichardson/node-fs-extra/pull/578)) + +6.0.0 / 2018-05-01 +------------------ + +- Drop support for Node.js versions 4, 5, & 7 ([#564](https://github.com/jprichardson/node-fs-extra/pull/564)) +- Rewrite `move` to use `fs.rename` where possible ([#549](https://github.com/jprichardson/node-fs-extra/pull/549)) +- Don't convert relative paths to absolute paths for `filter` ([#554](https://github.com/jprichardson/node-fs-extra/pull/554)) +- `copy*`'s behavior when `preserveTimestamps` is `false` has been OS-dependent since 5.0.0, but that's now explicitly noted in the docs ([#563](https://github.com/jprichardson/node-fs-extra/pull/563)) +- Fix subdirectory detection for `copy*` & `move*` ([#541](https://github.com/jprichardson/node-fs-extra/pull/541)) +- Handle case-insensitive paths correctly in `copy*` ([#568](https://github.com/jprichardson/node-fs-extra/pull/568)) + +5.0.0 / 2017-12-11 +------------------ + +Significant refactor of `copy()` & `copySync()`, including breaking changes. No changes to other functions in this release. + +Huge thanks to **[@manidlou](https://github.com/manidlou)** for doing most of the work on this release. + +- The `filter` option can no longer be a RegExp (must be a function). This was deprecated since fs-extra v1.0.0. [#512](https://github.com/jprichardson/node-fs-extra/pull/512) +- `copy()`'s `filter` option can now be a function that returns a Promise. [#518](https://github.com/jprichardson/node-fs-extra/pull/518) +- `copy()` & `copySync()` now use `fs.copyFile()`/`fs.copyFileSync()` in environments that support it (currently Node 8.5.0+). Older Node versions still get the old implementation. [#505](https://github.com/jprichardson/node-fs-extra/pull/505) +- Don't allow copying a directory into itself. [#83](https://github.com/jprichardson/node-fs-extra/issues/83) +- Handle copying between identical files. [#198](https://github.com/jprichardson/node-fs-extra/issues/198) +- Error out when copying an empty folder to a path that already exists. [#464](https://github.com/jprichardson/node-fs-extra/issues/464) +- Don't create `dest`'s parent if the `filter` function aborts the `copy()` operation. [#517](https://github.com/jprichardson/node-fs-extra/pull/517) +- Fix `writeStream` not being closed if there was an error in `copy()`. [#516](https://github.com/jprichardson/node-fs-extra/pull/516) + +4.0.3 / 2017-12-05 +------------------ + +- Fix wrong `chmod` values in `fs.remove()` [#501](https://github.com/jprichardson/node-fs-extra/pull/501) +- Fix `TypeError` on systems that don't have some `fs` operations like `lchown` [#520](https://github.com/jprichardson/node-fs-extra/pull/520) + +4.0.2 / 2017-09-12 +------------------ + +- Added `EOL` option to `writeJson*` & `outputJson*` (via upgrade to jsonfile v4) +- Added promise support to [`fs.copyFile()`](https://nodejs.org/api/fs.html#fs_fs_copyfile_src_dest_flags_callback) in Node 8.5+ +- Added `.js` extension to `main` field in `package.json` for better tooling compatibility. [#485](https://github.com/jprichardson/node-fs-extra/pull/485) + +4.0.1 / 2017-07-31 +------------------ + +### Fixed + +- Previously, `ensureFile()` & `ensureFileSync()` would do nothing if the path was a directory. Now, they error out for consistency with `ensureDir()`. [#465](https://github.com/jprichardson/node-fs-extra/issues/465), [#466](https://github.com/jprichardson/node-fs-extra/pull/466), [#470](https://github.com/jprichardson/node-fs-extra/issues/470) + +4.0.0 / 2017-07-14 +------------------ + +### Changed + +- **BREAKING:** The promisified versions of `fs.read()` & `fs.write()` now return objects. See [the docs](docs/fs-read-write.md) for details. [#436](https://github.com/jprichardson/node-fs-extra/issues/436), [#449](https://github.com/jprichardson/node-fs-extra/pull/449) +- `fs.move()` now errors out when destination is a subdirectory of source. [#458](https://github.com/jprichardson/node-fs-extra/pull/458) +- Applied upstream fixes from `rimraf` to `fs.remove()` & `fs.removeSync()`. [#459](https://github.com/jprichardson/node-fs-extra/pull/459) + +### Fixed + +- Got `fs.outputJSONSync()` working again; it was broken due to refactoring. [#428](https://github.com/jprichardson/node-fs-extra/pull/428) + +Also clarified the docs in a few places. + +3.0.1 / 2017-05-04 +------------------ + +- Fix bug in `move()` & `moveSync()` when source and destination are the same, and source does not exist. [#415](https://github.com/jprichardson/node-fs-extra/pull/415) + +3.0.0 / 2017-04-27 +------------------ + +### Added + +- **BREAKING:** Added Promise support. All asynchronous native fs methods and fs-extra methods now return a promise if the callback is not passed. [#403](https://github.com/jprichardson/node-fs-extra/pull/403) +- `pathExists()`, a replacement for the deprecated `fs.exists`. `pathExists` has a normal error-first callback signature. Also added `pathExistsSync`, an alias to `fs.existsSync`, for completeness. [#406](https://github.com/jprichardson/node-fs-extra/pull/406) + +### Removed + +- **BREAKING:** Removed support for setting the default spaces for `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()`. This was undocumented. [#402](https://github.com/jprichardson/node-fs-extra/pull/402) + +### Changed + +- Upgraded jsonfile dependency to v3.0.0: + - **BREAKING:** Changed behavior of `throws` option for `readJsonSync()`; now does not throw filesystem errors when `throws` is `false`. +- **BREAKING:** `writeJson()`, `writeJsonSync()`, `outputJson()`, & `outputJsonSync()` now output minified JSON by default for consistency with `JSON.stringify()`; set the `spaces` option to `2` to override this new behavior. [#402](https://github.com/jprichardson/node-fs-extra/pull/402) +- Use `Buffer.allocUnsafe()` instead of `new Buffer()` in environments that support it. [#394](https://github.com/jprichardson/node-fs-extra/pull/394) + +### Fixed + +- `removeSync()` silently failed on Windows in some cases. Now throws an `EBUSY` error. [#408](https://github.com/jprichardson/node-fs-extra/pull/408) + +2.1.2 / 2017-03-16 +------------------ + +### Fixed + +- Weird windows bug that resulted in `ensureDir()`'s callback being called twice in some cases. This bug may have also affected `remove()`. See [#392](https://github.com/jprichardson/node-fs-extra/issues/392), [#393](https://github.com/jprichardson/node-fs-extra/pull/393) + +2.1.1 / 2017-03-15 +------------------ + +### Fixed + +- Reverted [`5597bd`](https://github.com/jprichardson/node-fs-extra/commit/5597bd5b67f7d060f5f5bf26e9635be48330f5d7), this broke compatibility with Node.js versions v4+ but less than `v4.5.0`. +- Remove `Buffer.alloc()` usage in `moveSync()`. + +2.1.0 / 2017-03-15 +------------------ + +Thanks to [Mani Maghsoudlou (@manidlou)](https://github.com/manidlou) & [Jan Peer Stöcklmair (@JPeer264)](https://github.com/JPeer264) for their extraordinary help with this release! + +### Added +- `moveSync()` See [#309], [#381](https://github.com/jprichardson/node-fs-extra/pull/381). ([@manidlou](https://github.com/manidlou)) +- `copy()` and `copySync()`'s `filter` option now gets the destination path passed as the second parameter. [#366](https://github.com/jprichardson/node-fs-extra/pull/366) ([@manidlou](https://github.com/manidlou)) + +### Changed +- Use `Buffer.alloc()` instead of deprecated `new Buffer()` in `copySync()`. [#380](https://github.com/jprichardson/node-fs-extra/pull/380) ([@manidlou](https://github.com/manidlou)) +- Refactored entire codebase to use ES6 features supported by Node.js v4+ [#355](https://github.com/jprichardson/node-fs-extra/issues/355). [(@JPeer264)](https://github.com/JPeer264) +- Refactored docs. ([@manidlou](https://github.com/manidlou)) + +### Fixed + +- `move()` shouldn't error out when source and dest are the same. [#377](https://github.com/jprichardson/node-fs-extra/issues/377), [#378](https://github.com/jprichardson/node-fs-extra/pull/378) ([@jdalton](https://github.com/jdalton)) + +2.0.0 / 2017-01-16 +------------------ + +### Removed +- **BREAKING:** Removed support for Node `v0.12`. The Node foundation stopped officially supporting it +on Jan 1st, 2017. +- **BREAKING:** Remove `walk()` and `walkSync()`. `walkSync()` was only part of `fs-extra` for a little +over two months. Use [klaw](https://github.com/jprichardson/node-klaw) instead of `walk()`, in fact, `walk()` was just +an alias to klaw. For `walkSync()` use [klaw-sync](https://github.com/mawni/node-klaw-sync). See: [#338], [#339] + +### Changed +- **BREAKING:** Renamed `clobber` to `overwrite`. This affects `copy()`, `copySync()`, and `move()`. [#330], [#333] +- Moved docs, to `docs/`. [#340] + +### Fixed +- Apply filters to directories in `copySync()` like in `copy()`. [#324] +- A specific condition when disk is under heavy use, `copy()` can fail. [#326] + + +1.0.0 / 2016-11-01 +------------------ + +After five years of development, we finally have reach the 1.0.0 milestone! Big thanks goes +to [Ryan Zim](https://github.com/RyanZim) for leading the charge on this release! + +### Added +- `walkSync()` + +### Changed +- **BREAKING**: dropped Node v0.10 support. +- disabled `rimaf` globbing, wasn't used. [#280] +- deprecate `copy()/copySync()` option `filter` if it's a `RegExp`. `filter` should now be a function. +- inline `rimraf`. This is temporary and was done because `rimraf` depended upon the beefy `glob` which `fs-extra` does not use. [#300] + +### Fixed +- bug fix proper closing of file handle on `utimesMillis()` [#271] +- proper escaping of files with dollar signs [#291] +- `copySync()` failed if user didn't own file. [#199], [#301] + + +0.30.0 / 2016-04-28 +------------------- +- Brought back Node v0.10 support. I didn't realize there was still demand. Official support will end **2016-10-01**. + +0.29.0 / 2016-04-27 +------------------- +- **BREAKING**: removed support for Node v0.10. If you still want to use Node v0.10, everything should work except for `ensureLink()/ensureSymlink()`. Node v0.12 is still supported but will be dropped in the near future as well. + +0.28.0 / 2016-04-17 +------------------- +- **BREAKING**: removed `createOutputStream()`. Use https://www.npmjs.com/package/create-output-stream. See: [#192][#192] +- `mkdirs()/mkdirsSync()` check for invalid win32 path chars. See: [#209][#209], [#237][#237] +- `mkdirs()/mkdirsSync()` if drive not mounted, error. See: [#93][#93] + +0.27.0 / 2016-04-15 +------------------- +- add `dereference` option to `copySync()`. [#235][#235] + +0.26.7 / 2016-03-16 +------------------- +- fixed `copy()` if source and dest are the same. [#230][#230] + +0.26.6 / 2016-03-15 +------------------- +- fixed if `emptyDir()` does not have a callback: [#229][#229] + +0.26.5 / 2016-01-27 +------------------- +- `copy()` with two arguments (w/o callback) was broken. See: [#215][#215] + +0.26.4 / 2016-01-05 +------------------- +- `copySync()` made `preserveTimestamps` default consistent with `copy()` which is `false`. See: [#208][#208] + +0.26.3 / 2015-12-17 +------------------- +- fixed `copy()` hangup in copying blockDevice / characterDevice / `/dev/null`. See: [#193][#193] + +0.26.2 / 2015-11-02 +------------------- +- fixed `outputJson{Sync}()` spacing adherence to `fs.spaces` + +0.26.1 / 2015-11-02 +------------------- +- fixed `copySync()` when `clogger=true` and the destination is read only. See: [#190][#190] + +0.26.0 / 2015-10-25 +------------------- +- extracted the `walk()` function into its own module [`klaw`](https://github.com/jprichardson/node-klaw). + +0.25.0 / 2015-10-24 +------------------- +- now has a file walker `walk()` + +0.24.0 / 2015-08-28 +------------------- +- removed alias `delete()` and `deleteSync()`. See: [#171][#171] + +0.23.1 / 2015-08-07 +------------------- +- Better handling of errors for `move()` when moving across devices. [#170][#170] +- `ensureSymlink()` and `ensureLink()` should not throw errors if link exists. [#169][#169] + +0.23.0 / 2015-08-06 +------------------- +- added `ensureLink{Sync}()` and `ensureSymlink{Sync}()`. See: [#165][#165] + +0.22.1 / 2015-07-09 +------------------- +- Prevent calling `hasMillisResSync()` on module load. See: [#149][#149]. +Fixes regression that was introduced in `0.21.0`. + +0.22.0 / 2015-07-09 +------------------- +- preserve permissions / ownership in `copy()`. See: [#54][#54] + +0.21.0 / 2015-07-04 +------------------- +- add option to preserve timestamps in `copy()` and `copySync()`. See: [#141][#141] +- updated `graceful-fs@3.x` to `4.x`. This brings in features from `amazing-graceful-fs` (much cleaner code / less hacks) + +0.20.1 / 2015-06-23 +------------------- +- fixed regression caused by latest jsonfile update: See: https://github.com/jprichardson/node-jsonfile/issues/26 + +0.20.0 / 2015-06-19 +------------------- +- removed `jsonfile` aliases with `File` in the name, they weren't documented and probably weren't in use e.g. +this package had both `fs.readJsonFile` and `fs.readJson` that were aliases to each other, now use `fs.readJson`. +- preliminary walker created. Intentionally not documented. If you use it, it will almost certainly change and break your code. +- started moving tests inline +- upgraded to `jsonfile@2.1.0`, can now pass JSON revivers/replacers to `readJson()`, `writeJson()`, `outputJson()` + +0.19.0 / 2015-06-08 +------------------- +- `fs.copy()` had support for Node v0.8, dropped support + +0.18.4 / 2015-05-22 +------------------- +- fixed license field according to this: [#136][#136] and https://github.com/npm/npm/releases/tag/v2.10.0 + +0.18.3 / 2015-05-08 +------------------- +- bugfix: handle `EEXIST` when clobbering on some Linux systems. [#134][#134] + +0.18.2 / 2015-04-17 +------------------- +- bugfix: allow `F_OK` ([#120][#120]) + +0.18.1 / 2015-04-15 +------------------- +- improved windows support for `move()` a bit. https://github.com/jprichardson/node-fs-extra/commit/92838980f25dc2ee4ec46b43ee14d3c4a1d30c1b +- fixed a lot of tests for Windows (appveyor) + +0.18.0 / 2015-03-31 +------------------- +- added `emptyDir()` and `emptyDirSync()` + +0.17.0 / 2015-03-28 +------------------- +- `copySync` added `clobber` option (before always would clobber, now if `clobber` is `false` it throws an error if the destination exists). +**Only works with files at the moment.** +- `createOutputStream()` added. See: [#118][#118] + +0.16.5 / 2015-03-08 +------------------- +- fixed `fs.move` when `clobber` is `true` and destination is a directory, it should clobber. [#114][#114] + +0.16.4 / 2015-03-01 +------------------- +- `fs.mkdirs` fix infinite loop on Windows. See: See https://github.com/substack/node-mkdirp/pull/74 and https://github.com/substack/node-mkdirp/issues/66 + +0.16.3 / 2015-01-28 +------------------- +- reverted https://github.com/jprichardson/node-fs-extra/commit/1ee77c8a805eba5b99382a2591ff99667847c9c9 + + +0.16.2 / 2015-01-28 +------------------- +- fixed `fs.copy` for Node v0.8 (support is temporary and will be removed in the near future) + +0.16.1 / 2015-01-28 +------------------- +- if `setImmediate` is not available, fall back to `process.nextTick` + +0.16.0 / 2015-01-28 +------------------- +- bugfix `fs.move()` into itself. Closes [#104] +- bugfix `fs.move()` moving directory across device. Closes [#108] +- added coveralls support +- bugfix: nasty multiple callback `fs.copy()` bug. Closes [#98] +- misc fs.copy code cleanups + +0.15.0 / 2015-01-21 +------------------- +- dropped `ncp`, imported code in +- because of previous, now supports `io.js` +- `graceful-fs` is now a dependency + +0.14.0 / 2015-01-05 +------------------- +- changed `copy`/`copySync` from `fs.copy(src, dest, [filters], callback)` to `fs.copy(src, dest, [options], callback)` [#100][#100] +- removed mockfs tests for mkdirp (this may be temporary, but was getting in the way of other tests) + +0.13.0 / 2014-12-10 +------------------- +- removed `touch` and `touchSync` methods (they didn't handle permissions like UNIX touch) +- updated `"ncp": "^0.6.0"` to `"ncp": "^1.0.1"` +- imported `mkdirp` => `minimist` and `mkdirp` are no longer dependences, should now appease people who wanted `mkdirp` to be `--use_strict` safe. See [#59]([#59][#59]) + +0.12.0 / 2014-09-22 +------------------- +- copy symlinks in `copySync()` [#85][#85] + +0.11.1 / 2014-09-02 +------------------- +- bugfix `copySync()` preserve file permissions [#80][#80] + +0.11.0 / 2014-08-11 +------------------- +- upgraded `"ncp": "^0.5.1"` to `"ncp": "^0.6.0"` +- upgrade `jsonfile": "^1.2.0"` to `jsonfile": "^2.0.0"` => on write, json files now have `\n` at end. Also adds `options.throws` to `readJsonSync()` +see https://github.com/jprichardson/node-jsonfile#readfilesyncfilename-options for more details. + +0.10.0 / 2014-06-29 +------------------ +* bugfix: upgaded `"jsonfile": "~1.1.0"` to `"jsonfile": "^1.2.0"`, bumped minor because of `jsonfile` dep change +from `~` to `^`. [#67] + +0.9.1 / 2014-05-22 +------------------ +* removed Node.js `0.8.x` support, `0.9.0` was published moments ago and should have been done there + +0.9.0 / 2014-05-22 +------------------ +* upgraded `ncp` from `~0.4.2` to `^0.5.1`, [#58] +* upgraded `rimraf` from `~2.2.6` to `^2.2.8` +* upgraded `mkdirp` from `0.3.x` to `^0.5.0` +* added methods `ensureFile()`, `ensureFileSync()` +* added methods `ensureDir()`, `ensureDirSync()` [#31] +* added `move()` method. From: https://github.com/andrewrk/node-mv + + +0.8.1 / 2013-10-24 +------------------ +* copy failed to return an error to the callback if a file doesn't exist (ulikoehler [#38], [#39]) + +0.8.0 / 2013-10-14 +------------------ +* `filter` implemented on `copy()` and `copySync()`. (Srirangan / [#36]) + +0.7.1 / 2013-10-12 +------------------ +* `copySync()` implemented (Srirangan / [#33]) +* updated to the latest `jsonfile` version `1.1.0` which gives `options` params for the JSON methods. Closes [#32] + +0.7.0 / 2013-10-07 +------------------ +* update readme conventions +* `copy()` now works if destination directory does not exist. Closes [#29] + +0.6.4 / 2013-09-05 +------------------ +* changed `homepage` field in package.json to remove NPM warning + +0.6.3 / 2013-06-28 +------------------ +* changed JSON spacing default from `4` to `2` to follow Node conventions +* updated `jsonfile` dep +* updated `rimraf` dep + +0.6.2 / 2013-06-28 +------------------ +* added .npmignore, [#25] + +0.6.1 / 2013-05-14 +------------------ +* modified for `strict` mode, closes [#24] +* added `outputJson()/outputJsonSync()`, closes [#23] + +0.6.0 / 2013-03-18 +------------------ +* removed node 0.6 support +* added node 0.10 support +* upgraded to latest `ncp` and `rimraf`. +* optional `graceful-fs` support. Closes [#17] + + +0.5.0 / 2013-02-03 +------------------ +* Removed `readTextFile`. +* Renamed `readJSONFile` to `readJSON` and `readJson`, same with write. +* Restructured documentation a bit. Added roadmap. + +0.4.0 / 2013-01-28 +------------------ +* Set default spaces in `jsonfile` from 4 to 2. +* Updated `testutil` deps for tests. +* Renamed `touch()` to `createFile()` +* Added `outputFile()` and `outputFileSync()` +* Changed creation of testing diretories so the /tmp dir is not littered. +* Added `readTextFile()` and `readTextFileSync()`. + +0.3.2 / 2012-11-01 +------------------ +* Added `touch()` and `touchSync()` methods. + +0.3.1 / 2012-10-11 +------------------ +* Fixed some stray globals. + +0.3.0 / 2012-10-09 +------------------ +* Removed all CoffeeScript from tests. +* Renamed `mkdir` to `mkdirs`/`mkdirp`. + +0.2.1 / 2012-09-11 +------------------ +* Updated `rimraf` dep. + +0.2.0 / 2012-09-10 +------------------ +* Rewrote module into JavaScript. (Must still rewrite tests into JavaScript) +* Added all methods of [jsonfile](https://github.com/jprichardson/node-jsonfile) +* Added Travis-CI. + +0.1.3 / 2012-08-13 +------------------ +* Added method `readJSONFile`. + +0.1.2 / 2012-06-15 +------------------ +* Bug fix: `deleteSync()` didn't exist. +* Verified Node v0.8 compatibility. + +0.1.1 / 2012-06-15 +------------------ +* Fixed bug in `remove()`/`delete()` that wouldn't execute the function if a callback wasn't passed. + +0.1.0 / 2012-05-31 +------------------ +* Renamed `copyFile()` to `copy()`. `copy()` can now copy directories (recursively) too. +* Renamed `rmrf()` to `remove()`. +* `remove()` aliased with `delete()`. +* Added `mkdirp` capabilities. Named: `mkdir()`. Hides Node.js native `mkdir()`. +* Instead of exporting the native `fs` module with new functions, I now copy over the native methods to a new object and export that instead. + +0.0.4 / 2012-03-14 +------------------ +* Removed CoffeeScript dependency + +0.0.3 / 2012-01-11 +------------------ +* Added methods rmrf and rmrfSync +* Moved tests from Jasmine to Mocha + + +[#344]: https://github.com/jprichardson/node-fs-extra/issues/344 "Licence Year" +[#343]: https://github.com/jprichardson/node-fs-extra/pull/343 "Add klaw-sync link to readme" +[#342]: https://github.com/jprichardson/node-fs-extra/pull/342 "allow preserveTimestamps when use move" +[#341]: https://github.com/jprichardson/node-fs-extra/issues/341 "mkdirp(path.dirname(dest) in move() logic needs cleaning up [question]" +[#340]: https://github.com/jprichardson/node-fs-extra/pull/340 "Move docs to seperate docs folder [documentation]" +[#339]: https://github.com/jprichardson/node-fs-extra/pull/339 "Remove walk() & walkSync() [feature-walk]" +[#338]: https://github.com/jprichardson/node-fs-extra/issues/338 "Remove walk() and walkSync() [feature-walk]" +[#337]: https://github.com/jprichardson/node-fs-extra/issues/337 "copy doesn't return a yieldable value" +[#336]: https://github.com/jprichardson/node-fs-extra/pull/336 "Docs enhanced walk sync [documentation, feature-walk]" +[#335]: https://github.com/jprichardson/node-fs-extra/pull/335 "Refactor move() tests [feature-move]" +[#334]: https://github.com/jprichardson/node-fs-extra/pull/334 "Cleanup lib/move/index.js [feature-move]" +[#333]: https://github.com/jprichardson/node-fs-extra/pull/333 "Rename clobber to overwrite [feature-copy, feature-move]" +[#332]: https://github.com/jprichardson/node-fs-extra/pull/332 "BREAKING: Drop Node v0.12 & io.js support" +[#331]: https://github.com/jprichardson/node-fs-extra/issues/331 "Add support for chmodr [enhancement, future]" +[#330]: https://github.com/jprichardson/node-fs-extra/pull/330 "BREAKING: Do not error when copy destination exists & clobber: false [feature-copy]" +[#329]: https://github.com/jprichardson/node-fs-extra/issues/329 "Does .walk() scale to large directories? [question]" +[#328]: https://github.com/jprichardson/node-fs-extra/issues/328 "Copying files corrupts [feature-copy, needs-confirmed]" +[#327]: https://github.com/jprichardson/node-fs-extra/pull/327 "Use writeStream 'finish' event instead of 'close' [bug, feature-copy]" +[#326]: https://github.com/jprichardson/node-fs-extra/issues/326 "fs.copy fails with chmod error when disk under heavy use [bug, feature-copy]" +[#325]: https://github.com/jprichardson/node-fs-extra/issues/325 "ensureDir is difficult to promisify [enhancement]" +[#324]: https://github.com/jprichardson/node-fs-extra/pull/324 "copySync() should apply filter to directories like copy() [bug, feature-copy]" +[#323]: https://github.com/jprichardson/node-fs-extra/issues/323 "Support for `dest` being a directory when using `copy*()`?" +[#322]: https://github.com/jprichardson/node-fs-extra/pull/322 "Add fs-promise as fs-extra-promise alternative" +[#321]: https://github.com/jprichardson/node-fs-extra/issues/321 "fs.copy() with clobber set to false return EEXIST error [feature-copy]" +[#320]: https://github.com/jprichardson/node-fs-extra/issues/320 "fs.copySync: Error: EPERM: operation not permitted, unlink " +[#319]: https://github.com/jprichardson/node-fs-extra/issues/319 "Create directory if not exists" +[#318]: https://github.com/jprichardson/node-fs-extra/issues/318 "Support glob patterns [enhancement, future]" +[#317]: https://github.com/jprichardson/node-fs-extra/pull/317 "Adding copy sync test for src file without write perms" +[#316]: https://github.com/jprichardson/node-fs-extra/pull/316 "Remove move()'s broken limit option [feature-move]" +[#315]: https://github.com/jprichardson/node-fs-extra/pull/315 "Fix move clobber tests to work around graceful-fs bug." +[#314]: https://github.com/jprichardson/node-fs-extra/issues/314 "move() limit option [documentation, enhancement, feature-move]" +[#313]: https://github.com/jprichardson/node-fs-extra/pull/313 "Test that remove() ignores glob characters." +[#312]: https://github.com/jprichardson/node-fs-extra/pull/312 "Enhance walkSync() to return items with path and stats [feature-walk]" +[#311]: https://github.com/jprichardson/node-fs-extra/issues/311 "move() not work when dest name not provided [feature-move]" +[#310]: https://github.com/jprichardson/node-fs-extra/issues/310 "Edit walkSync to return items like what walk emits [documentation, enhancement, feature-walk]" +[#309]: https://github.com/jprichardson/node-fs-extra/issues/309 "moveSync support [enhancement, feature-move]" +[#308]: https://github.com/jprichardson/node-fs-extra/pull/308 "Fix incorrect anchor link" +[#307]: https://github.com/jprichardson/node-fs-extra/pull/307 "Fix coverage" +[#306]: https://github.com/jprichardson/node-fs-extra/pull/306 "Update devDeps, fix lint error" +[#305]: https://github.com/jprichardson/node-fs-extra/pull/305 "Re-add Coveralls" +[#304]: https://github.com/jprichardson/node-fs-extra/pull/304 "Remove path-is-absolute [enhancement]" +[#303]: https://github.com/jprichardson/node-fs-extra/pull/303 "Document copySync filter inconsistency [documentation, feature-copy]" +[#302]: https://github.com/jprichardson/node-fs-extra/pull/302 "fix(console): depreciated -> deprecated" +[#301]: https://github.com/jprichardson/node-fs-extra/pull/301 "Remove chmod call from copySync [feature-copy]" +[#300]: https://github.com/jprichardson/node-fs-extra/pull/300 "Inline Rimraf [enhancement, feature-move, feature-remove]" +[#299]: https://github.com/jprichardson/node-fs-extra/pull/299 "Warn when filter is a RegExp [feature-copy]" +[#298]: https://github.com/jprichardson/node-fs-extra/issues/298 "API Docs [documentation]" +[#297]: https://github.com/jprichardson/node-fs-extra/pull/297 "Warn about using preserveTimestamps on 32-bit node" +[#296]: https://github.com/jprichardson/node-fs-extra/pull/296 "Improve EEXIST error message for copySync [enhancement]" +[#295]: https://github.com/jprichardson/node-fs-extra/pull/295 "Depreciate using regular expressions for copy's filter option [documentation]" +[#294]: https://github.com/jprichardson/node-fs-extra/pull/294 "BREAKING: Refactor lib/copy/ncp.js [feature-copy]" +[#293]: https://github.com/jprichardson/node-fs-extra/pull/293 "Update CI configs" +[#292]: https://github.com/jprichardson/node-fs-extra/issues/292 "Rewrite lib/copy/ncp.js [enhancement, feature-copy]" +[#291]: https://github.com/jprichardson/node-fs-extra/pull/291 "Escape '$' in replacement string for async file copying" +[#290]: https://github.com/jprichardson/node-fs-extra/issues/290 "Exclude files pattern while copying using copy.config.js [question]" +[#289]: https://github.com/jprichardson/node-fs-extra/pull/289 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error" +[#288]: https://github.com/jprichardson/node-fs-extra/pull/288 "(Closes #271) lib/util/utimes: properly close file descriptors in the event of an error" +[#287]: https://github.com/jprichardson/node-fs-extra/issues/287 "emptyDir() callback arguments are inconsistent [enhancement, feature-remove]" +[#286]: https://github.com/jprichardson/node-fs-extra/pull/286 "Added walkSync function" +[#285]: https://github.com/jprichardson/node-fs-extra/issues/285 "CITGM test failing on s390" +[#284]: https://github.com/jprichardson/node-fs-extra/issues/284 "outputFile method is missing a check to determine if existing item is a folder or not" +[#283]: https://github.com/jprichardson/node-fs-extra/pull/283 "Apply filter also on directories and symlinks for copySync()" +[#282]: https://github.com/jprichardson/node-fs-extra/pull/282 "Apply filter also on directories and symlinks for copySync()" +[#281]: https://github.com/jprichardson/node-fs-extra/issues/281 "remove function executes 'successfully' but doesn't do anything?" +[#280]: https://github.com/jprichardson/node-fs-extra/pull/280 "Disable rimraf globbing" +[#279]: https://github.com/jprichardson/node-fs-extra/issues/279 "Some code is vendored instead of included [awaiting-reply]" +[#278]: https://github.com/jprichardson/node-fs-extra/issues/278 "copy() does not preserve file/directory ownership" +[#277]: https://github.com/jprichardson/node-fs-extra/pull/277 "Mention defaults for clobber and dereference options" +[#276]: https://github.com/jprichardson/node-fs-extra/issues/276 "Cannot connect to Shared Folder [awaiting-reply]" +[#275]: https://github.com/jprichardson/node-fs-extra/issues/275 "EMFILE, too many open files on Mac OS with JSON API" +[#274]: https://github.com/jprichardson/node-fs-extra/issues/274 "Use with memory-fs? [enhancement, future]" +[#273]: https://github.com/jprichardson/node-fs-extra/pull/273 "tests: rename `remote.test.js` to `remove.test.js`" +[#272]: https://github.com/jprichardson/node-fs-extra/issues/272 "Copy clobber flag never err even when true [bug, feature-copy]" +[#271]: https://github.com/jprichardson/node-fs-extra/issues/271 "Unclosed file handle on futimes error" +[#270]: https://github.com/jprichardson/node-fs-extra/issues/270 "copy not working as desired on Windows [feature-copy, platform-windows]" +[#269]: https://github.com/jprichardson/node-fs-extra/issues/269 "Copying with preserveTimeStamps: true is inaccurate using 32bit node [feature-copy]" +[#268]: https://github.com/jprichardson/node-fs-extra/pull/268 "port fix for mkdirp issue #111" +[#267]: https://github.com/jprichardson/node-fs-extra/issues/267 "WARN deprecated wrench@1.5.9: wrench.js is deprecated!" +[#266]: https://github.com/jprichardson/node-fs-extra/issues/266 "fs-extra" +[#265]: https://github.com/jprichardson/node-fs-extra/issues/265 "Link the `fs.stat fs.exists` etc. methods for replace the `fs` module forever?" +[#264]: https://github.com/jprichardson/node-fs-extra/issues/264 "Renaming a file using move fails when a file inside is open (at least on windows) [wont-fix]" +[#263]: https://github.com/jprichardson/node-fs-extra/issues/263 "ENOSYS: function not implemented, link [needs-confirmed]" +[#262]: https://github.com/jprichardson/node-fs-extra/issues/262 "Add .exists() and .existsSync()" +[#261]: https://github.com/jprichardson/node-fs-extra/issues/261 "Cannot read property 'prototype' of undefined" +[#260]: https://github.com/jprichardson/node-fs-extra/pull/260 "use more specific path for method require" +[#259]: https://github.com/jprichardson/node-fs-extra/issues/259 "Feature Request: isEmpty" +[#258]: https://github.com/jprichardson/node-fs-extra/issues/258 "copy files does not preserve file timestamp" +[#257]: https://github.com/jprichardson/node-fs-extra/issues/257 "Copying a file on windows fails" +[#256]: https://github.com/jprichardson/node-fs-extra/pull/256 "Updated Readme " +[#255]: https://github.com/jprichardson/node-fs-extra/issues/255 "Update rimraf required version" +[#254]: https://github.com/jprichardson/node-fs-extra/issues/254 "request for readTree, readTreeSync, walkSync method" +[#253]: https://github.com/jprichardson/node-fs-extra/issues/253 "outputFile does not touch mtime when file exists" +[#252]: https://github.com/jprichardson/node-fs-extra/pull/252 "Fixing problem when copying file with no write permission" +[#251]: https://github.com/jprichardson/node-fs-extra/issues/251 "Just wanted to say thank you" +[#250]: https://github.com/jprichardson/node-fs-extra/issues/250 "`fs.remove()` not removing files (works with `rm -rf`)" +[#249]: https://github.com/jprichardson/node-fs-extra/issues/249 "Just a Question ... Remove Servers" +[#248]: https://github.com/jprichardson/node-fs-extra/issues/248 "Allow option to not preserve permissions for copy" +[#247]: https://github.com/jprichardson/node-fs-extra/issues/247 "Add TypeScript typing directly in the fs-extra package" +[#246]: https://github.com/jprichardson/node-fs-extra/issues/246 "fse.remove() && fse.removeSync() don't throw error on ENOENT file" +[#245]: https://github.com/jprichardson/node-fs-extra/issues/245 "filter for empty dir [enhancement]" +[#244]: https://github.com/jprichardson/node-fs-extra/issues/244 "copySync doesn't apply the filter to directories" +[#243]: https://github.com/jprichardson/node-fs-extra/issues/243 "Can I request fs.walk() to be synchronous?" +[#242]: https://github.com/jprichardson/node-fs-extra/issues/242 "Accidentally truncates file names ending with $$ [bug, feature-copy]" +[#241]: https://github.com/jprichardson/node-fs-extra/pull/241 "Remove link to createOutputStream" +[#240]: https://github.com/jprichardson/node-fs-extra/issues/240 "walkSync request" +[#239]: https://github.com/jprichardson/node-fs-extra/issues/239 "Depreciate regular expressions for copy's filter [documentation, feature-copy]" +[#238]: https://github.com/jprichardson/node-fs-extra/issues/238 "Can't write to files while in a worker thread." +[#237]: https://github.com/jprichardson/node-fs-extra/issues/237 ".ensureDir(..) fails silently when passed an invalid path..." +[#236]: https://github.com/jprichardson/node-fs-extra/issues/236 "[Removed] Filed under wrong repo" +[#235]: https://github.com/jprichardson/node-fs-extra/pull/235 "Adds symlink dereference option to `fse.copySync` (#191)" +[#234]: https://github.com/jprichardson/node-fs-extra/issues/234 "ensureDirSync fails silent when EACCES: permission denied on travis-ci" +[#233]: https://github.com/jprichardson/node-fs-extra/issues/233 "please make sure the first argument in callback is error object [feature-copy]" +[#232]: https://github.com/jprichardson/node-fs-extra/issues/232 "Copy a folder content to its child folder. " +[#231]: https://github.com/jprichardson/node-fs-extra/issues/231 "Adding read/write/output functions for YAML" +[#230]: https://github.com/jprichardson/node-fs-extra/pull/230 "throw error if src and dest are the same to avoid zeroing out + test" +[#229]: https://github.com/jprichardson/node-fs-extra/pull/229 "fix 'TypeError: callback is not a function' in emptyDir" +[#228]: https://github.com/jprichardson/node-fs-extra/pull/228 "Throw error when target is empty so file is not accidentally zeroed out" +[#227]: https://github.com/jprichardson/node-fs-extra/issues/227 "Uncatchable errors when there are invalid arguments [feature-move]" +[#226]: https://github.com/jprichardson/node-fs-extra/issues/226 "Moving to the current directory" +[#225]: https://github.com/jprichardson/node-fs-extra/issues/225 "EBUSY: resource busy or locked, unlink" +[#224]: https://github.com/jprichardson/node-fs-extra/issues/224 "fse.copy ENOENT error" +[#223]: https://github.com/jprichardson/node-fs-extra/issues/223 "Suspicious behavior of fs.existsSync" +[#222]: https://github.com/jprichardson/node-fs-extra/pull/222 "A clearer description of emtpyDir function" +[#221]: https://github.com/jprichardson/node-fs-extra/pull/221 "Update README.md" +[#220]: https://github.com/jprichardson/node-fs-extra/pull/220 "Non-breaking feature: add option 'passStats' to copy methods." +[#219]: https://github.com/jprichardson/node-fs-extra/pull/219 "Add closing parenthesis in copySync example" +[#218]: https://github.com/jprichardson/node-fs-extra/pull/218 "fix #187 #70 options.filter bug" +[#217]: https://github.com/jprichardson/node-fs-extra/pull/217 "fix #187 #70 options.filter bug" +[#216]: https://github.com/jprichardson/node-fs-extra/pull/216 "fix #187 #70 options.filter bug" +[#215]: https://github.com/jprichardson/node-fs-extra/pull/215 "fse.copy throws error when only src and dest provided [bug, documentation, feature-copy]" +[#214]: https://github.com/jprichardson/node-fs-extra/pull/214 "Fixing copySync anchor tag" +[#213]: https://github.com/jprichardson/node-fs-extra/issues/213 "Merge extfs with this repo" +[#212]: https://github.com/jprichardson/node-fs-extra/pull/212 "Update year to 2016 in README.md and LICENSE" +[#211]: https://github.com/jprichardson/node-fs-extra/issues/211 "Not copying all files" +[#210]: https://github.com/jprichardson/node-fs-extra/issues/210 "copy/copySync behave differently when copying a symbolic file [bug, documentation, feature-copy]" +[#209]: https://github.com/jprichardson/node-fs-extra/issues/209 "In Windows invalid directory name causes infinite loop in ensureDir(). [bug]" +[#208]: https://github.com/jprichardson/node-fs-extra/pull/208 "fix options.preserveTimestamps to false in copy-sync by default [feature-copy]" +[#207]: https://github.com/jprichardson/node-fs-extra/issues/207 "Add `compare` suite of functions" +[#206]: https://github.com/jprichardson/node-fs-extra/issues/206 "outputFileSync" +[#205]: https://github.com/jprichardson/node-fs-extra/issues/205 "fix documents about copy/copySync [documentation, feature-copy]" +[#204]: https://github.com/jprichardson/node-fs-extra/pull/204 "allow copy of block and character device files" +[#203]: https://github.com/jprichardson/node-fs-extra/issues/203 "copy method's argument options couldn't be undefined [bug, feature-copy]" +[#202]: https://github.com/jprichardson/node-fs-extra/issues/202 "why there is not a walkSync method?" +[#201]: https://github.com/jprichardson/node-fs-extra/issues/201 "clobber for directories [feature-copy, future]" +[#200]: https://github.com/jprichardson/node-fs-extra/issues/200 "'copySync' doesn't work in sync" +[#199]: https://github.com/jprichardson/node-fs-extra/issues/199 "fs.copySync fails if user does not own file [bug, feature-copy]" +[#198]: https://github.com/jprichardson/node-fs-extra/issues/198 "handle copying between identical files [feature-copy]" +[#197]: https://github.com/jprichardson/node-fs-extra/issues/197 "Missing documentation for `outputFile` `options` 3rd parameter [documentation]" +[#196]: https://github.com/jprichardson/node-fs-extra/issues/196 "copy filter: async function and/or function called with `fs.stat` result [future]" +[#195]: https://github.com/jprichardson/node-fs-extra/issues/195 "How to override with outputFile?" +[#194]: https://github.com/jprichardson/node-fs-extra/pull/194 "allow ensureFile(Sync) to provide data to be written to created file" +[#193]: https://github.com/jprichardson/node-fs-extra/issues/193 "`fs.copy` fails silently if source file is /dev/null [bug, feature-copy]" +[#192]: https://github.com/jprichardson/node-fs-extra/issues/192 "Remove fs.createOutputStream()" +[#191]: https://github.com/jprichardson/node-fs-extra/issues/191 "How to copy symlinks to target as normal folders [feature-copy]" +[#190]: https://github.com/jprichardson/node-fs-extra/pull/190 "copySync to overwrite destination file if readonly and clobber true" +[#189]: https://github.com/jprichardson/node-fs-extra/pull/189 "move.test fix to support CRLF on Windows" +[#188]: https://github.com/jprichardson/node-fs-extra/issues/188 "move.test failing on windows platform" +[#187]: https://github.com/jprichardson/node-fs-extra/issues/187 "Not filter each file, stops on first false [feature-copy]" +[#186]: https://github.com/jprichardson/node-fs-extra/issues/186 "Do you need a .size() function in this module? [future]" +[#185]: https://github.com/jprichardson/node-fs-extra/issues/185 "Doesn't work on NodeJS v4.x" +[#184]: https://github.com/jprichardson/node-fs-extra/issues/184 "CLI equivalent for fs-extra" +[#183]: https://github.com/jprichardson/node-fs-extra/issues/183 "with clobber true, copy and copySync behave differently if destination file is read only [bug, feature-copy]" +[#182]: https://github.com/jprichardson/node-fs-extra/issues/182 "ensureDir(dir, callback) second callback parameter not specified" +[#181]: https://github.com/jprichardson/node-fs-extra/issues/181 "Add ability to remove file securely [enhancement, wont-fix]" +[#180]: https://github.com/jprichardson/node-fs-extra/issues/180 "Filter option doesn't work the same way in copy and copySync [bug, feature-copy]" +[#179]: https://github.com/jprichardson/node-fs-extra/issues/179 "Include opendir" +[#178]: https://github.com/jprichardson/node-fs-extra/issues/178 "ENOTEMPTY is thrown on removeSync " +[#177]: https://github.com/jprichardson/node-fs-extra/issues/177 "fix `remove()` wildcards (introduced by rimraf) [feature-remove]" +[#176]: https://github.com/jprichardson/node-fs-extra/issues/176 "createOutputStream doesn't emit 'end' event" +[#175]: https://github.com/jprichardson/node-fs-extra/issues/175 "[Feature Request].moveSync support [feature-move, future]" +[#174]: https://github.com/jprichardson/node-fs-extra/pull/174 "Fix copy formatting and document options.filter" +[#173]: https://github.com/jprichardson/node-fs-extra/issues/173 "Feature Request: writeJson should mkdirs" +[#172]: https://github.com/jprichardson/node-fs-extra/issues/172 "rename `clobber` flags to `overwrite`" +[#171]: https://github.com/jprichardson/node-fs-extra/issues/171 "remove unnecessary aliases" +[#170]: https://github.com/jprichardson/node-fs-extra/pull/170 "More robust handling of errors moving across virtual drives" +[#169]: https://github.com/jprichardson/node-fs-extra/pull/169 "suppress ensureLink & ensureSymlink dest exists error" +[#168]: https://github.com/jprichardson/node-fs-extra/pull/168 "suppress ensurelink dest exists error" +[#167]: https://github.com/jprichardson/node-fs-extra/pull/167 "Adds basic (string, buffer) support for ensureFile content [future]" +[#166]: https://github.com/jprichardson/node-fs-extra/pull/166 "Adds basic (string, buffer) support for ensureFile content" +[#165]: https://github.com/jprichardson/node-fs-extra/pull/165 "ensure for link & symlink" +[#164]: https://github.com/jprichardson/node-fs-extra/issues/164 "Feature Request: ensureFile to take optional argument for file content" +[#163]: https://github.com/jprichardson/node-fs-extra/issues/163 "ouputJson not formatted out of the box [bug]" +[#162]: https://github.com/jprichardson/node-fs-extra/pull/162 "ensure symlink & link" +[#161]: https://github.com/jprichardson/node-fs-extra/pull/161 "ensure symlink & link" +[#160]: https://github.com/jprichardson/node-fs-extra/pull/160 "ensure symlink & link" +[#159]: https://github.com/jprichardson/node-fs-extra/pull/159 "ensure symlink & link" +[#158]: https://github.com/jprichardson/node-fs-extra/issues/158 "Feature Request: ensureLink and ensureSymlink methods" +[#157]: https://github.com/jprichardson/node-fs-extra/issues/157 "writeJson isn't formatted" +[#156]: https://github.com/jprichardson/node-fs-extra/issues/156 "Promise.promisifyAll doesn't work for some methods" +[#155]: https://github.com/jprichardson/node-fs-extra/issues/155 "Readme" +[#154]: https://github.com/jprichardson/node-fs-extra/issues/154 "/tmp/millis-test-sync" +[#153]: https://github.com/jprichardson/node-fs-extra/pull/153 "Make preserveTimes also work on read-only files. Closes #152" +[#152]: https://github.com/jprichardson/node-fs-extra/issues/152 "fs.copy fails for read-only files with preserveTimestamp=true [feature-copy]" +[#151]: https://github.com/jprichardson/node-fs-extra/issues/151 "TOC does not work correctly on npm [documentation]" +[#150]: https://github.com/jprichardson/node-fs-extra/issues/150 "Remove test file fixtures, create with code." +[#149]: https://github.com/jprichardson/node-fs-extra/issues/149 "/tmp/millis-test-sync" +[#148]: https://github.com/jprichardson/node-fs-extra/issues/148 "split out `Sync` methods in documentation" +[#147]: https://github.com/jprichardson/node-fs-extra/issues/147 "Adding rmdirIfEmpty" +[#146]: https://github.com/jprichardson/node-fs-extra/pull/146 "ensure test.js works" +[#145]: https://github.com/jprichardson/node-fs-extra/issues/145 "Add `fs.exists` and `fs.existsSync` if it doesn't exist." +[#144]: https://github.com/jprichardson/node-fs-extra/issues/144 "tests failing" +[#143]: https://github.com/jprichardson/node-fs-extra/issues/143 "update graceful-fs" +[#142]: https://github.com/jprichardson/node-fs-extra/issues/142 "PrependFile Feature" +[#141]: https://github.com/jprichardson/node-fs-extra/pull/141 "Add option to preserve timestamps" +[#140]: https://github.com/jprichardson/node-fs-extra/issues/140 "Json file reading fails with 'utf8'" +[#139]: https://github.com/jprichardson/node-fs-extra/pull/139 "Preserve file timestamp on copy. Closes #138" +[#138]: https://github.com/jprichardson/node-fs-extra/issues/138 "Preserve timestamps on copying files" +[#137]: https://github.com/jprichardson/node-fs-extra/issues/137 "outputFile/outputJson: Unexpected end of input" +[#136]: https://github.com/jprichardson/node-fs-extra/pull/136 "Update license attribute" +[#135]: https://github.com/jprichardson/node-fs-extra/issues/135 "emptyDir throws Error if no callback is provided" +[#134]: https://github.com/jprichardson/node-fs-extra/pull/134 "Handle EEXIST error when clobbering dir" +[#133]: https://github.com/jprichardson/node-fs-extra/pull/133 "Travis runs with `sudo: false`" +[#132]: https://github.com/jprichardson/node-fs-extra/pull/132 "isDirectory method" +[#131]: https://github.com/jprichardson/node-fs-extra/issues/131 "copySync is not working iojs 1.8.4 on linux [feature-copy]" +[#130]: https://github.com/jprichardson/node-fs-extra/pull/130 "Please review additional features." +[#129]: https://github.com/jprichardson/node-fs-extra/pull/129 "can you review this feature?" +[#128]: https://github.com/jprichardson/node-fs-extra/issues/128 "fsExtra.move(filepath, newPath) broken;" +[#127]: https://github.com/jprichardson/node-fs-extra/issues/127 "consider using fs.access to remove deprecated warnings for fs.exists" +[#126]: https://github.com/jprichardson/node-fs-extra/issues/126 " TypeError: Object # has no method 'access'" +[#125]: https://github.com/jprichardson/node-fs-extra/issues/125 "Question: What do the *Sync function do different from non-sync" +[#124]: https://github.com/jprichardson/node-fs-extra/issues/124 "move with clobber option 'ENOTEMPTY'" +[#123]: https://github.com/jprichardson/node-fs-extra/issues/123 "Only copy the content of a directory" +[#122]: https://github.com/jprichardson/node-fs-extra/pull/122 "Update section links in README to match current section ids." +[#121]: https://github.com/jprichardson/node-fs-extra/issues/121 "emptyDir is undefined" +[#120]: https://github.com/jprichardson/node-fs-extra/issues/120 "usage bug caused by shallow cloning methods of 'graceful-fs'" +[#119]: https://github.com/jprichardson/node-fs-extra/issues/119 "mkdirs and ensureDir never invoke callback and consume CPU indefinitely if provided a path with invalid characters on Windows" +[#118]: https://github.com/jprichardson/node-fs-extra/pull/118 "createOutputStream" +[#117]: https://github.com/jprichardson/node-fs-extra/pull/117 "Fixed issue with slash separated paths on windows" +[#116]: https://github.com/jprichardson/node-fs-extra/issues/116 "copySync can only copy directories not files [documentation, feature-copy]" +[#115]: https://github.com/jprichardson/node-fs-extra/issues/115 ".Copy & .CopySync [feature-copy]" +[#114]: https://github.com/jprichardson/node-fs-extra/issues/114 "Fails to move (rename) directory to non-empty directory even with clobber: true" +[#113]: https://github.com/jprichardson/node-fs-extra/issues/113 "fs.copy seems to callback early if the destination file already exists" +[#112]: https://github.com/jprichardson/node-fs-extra/pull/112 "Copying a file into an existing directory" +[#111]: https://github.com/jprichardson/node-fs-extra/pull/111 "Moving a file into an existing directory " +[#110]: https://github.com/jprichardson/node-fs-extra/pull/110 "Moving a file into an existing directory" +[#109]: https://github.com/jprichardson/node-fs-extra/issues/109 "fs.move across windows drives fails" +[#108]: https://github.com/jprichardson/node-fs-extra/issues/108 "fse.move directories across multiple devices doesn't work" +[#107]: https://github.com/jprichardson/node-fs-extra/pull/107 "Check if dest path is an existing dir and copy or move source in it" +[#106]: https://github.com/jprichardson/node-fs-extra/issues/106 "fse.copySync crashes while copying across devices D: [feature-copy]" +[#105]: https://github.com/jprichardson/node-fs-extra/issues/105 "fs.copy hangs on iojs" +[#104]: https://github.com/jprichardson/node-fs-extra/issues/104 "fse.move deletes folders [bug]" +[#103]: https://github.com/jprichardson/node-fs-extra/issues/103 "Error: EMFILE with copy" +[#102]: https://github.com/jprichardson/node-fs-extra/issues/102 "touch / touchSync was removed ?" +[#101]: https://github.com/jprichardson/node-fs-extra/issues/101 "fs-extra promisified" +[#100]: https://github.com/jprichardson/node-fs-extra/pull/100 "copy: options object or filter to pass to ncp" +[#99]: https://github.com/jprichardson/node-fs-extra/issues/99 "ensureDir() modes [future]" +[#98]: https://github.com/jprichardson/node-fs-extra/issues/98 "fs.copy() incorrect async behavior [bug]" +[#97]: https://github.com/jprichardson/node-fs-extra/pull/97 "use path.join; fix copySync bug" +[#96]: https://github.com/jprichardson/node-fs-extra/issues/96 "destFolderExists in copySync is always undefined." +[#95]: https://github.com/jprichardson/node-fs-extra/pull/95 "Using graceful-ncp instead of ncp" +[#94]: https://github.com/jprichardson/node-fs-extra/issues/94 "Error: EEXIST, file already exists '../mkdirp/bin/cmd.js' on fs.copySync() [enhancement, feature-copy]" +[#93]: https://github.com/jprichardson/node-fs-extra/issues/93 "Confusing error if drive not mounted [enhancement]" +[#92]: https://github.com/jprichardson/node-fs-extra/issues/92 "Problems with Bluebird" +[#91]: https://github.com/jprichardson/node-fs-extra/issues/91 "fs.copySync('/test', '/haha') is different with 'cp -r /test /haha' [enhancement]" +[#90]: https://github.com/jprichardson/node-fs-extra/issues/90 "Folder creation and file copy is Happening in 64 bit machine but not in 32 bit machine" +[#89]: https://github.com/jprichardson/node-fs-extra/issues/89 "Error: EEXIST using fs-extra's fs.copy to copy a directory on Windows" +[#88]: https://github.com/jprichardson/node-fs-extra/issues/88 "Stacking those libraries" +[#87]: https://github.com/jprichardson/node-fs-extra/issues/87 "createWriteStream + outputFile = ?" +[#86]: https://github.com/jprichardson/node-fs-extra/issues/86 "no moveSync?" +[#85]: https://github.com/jprichardson/node-fs-extra/pull/85 "Copy symlinks in copySync" +[#84]: https://github.com/jprichardson/node-fs-extra/issues/84 "Push latest version to npm ?" +[#83]: https://github.com/jprichardson/node-fs-extra/issues/83 "Prevent copying a directory into itself [feature-copy]" +[#82]: https://github.com/jprichardson/node-fs-extra/pull/82 "README updates for move" +[#81]: https://github.com/jprichardson/node-fs-extra/issues/81 "fd leak after fs.move" +[#80]: https://github.com/jprichardson/node-fs-extra/pull/80 "Preserve file mode in copySync" +[#79]: https://github.com/jprichardson/node-fs-extra/issues/79 "fs.copy only .html file empty" +[#78]: https://github.com/jprichardson/node-fs-extra/pull/78 "copySync was not applying filters to directories" +[#77]: https://github.com/jprichardson/node-fs-extra/issues/77 "Create README reference to bluebird" +[#76]: https://github.com/jprichardson/node-fs-extra/issues/76 "Create README reference to typescript" +[#75]: https://github.com/jprichardson/node-fs-extra/issues/75 "add glob as a dep? [question]" +[#74]: https://github.com/jprichardson/node-fs-extra/pull/74 "including new emptydir module" +[#73]: https://github.com/jprichardson/node-fs-extra/pull/73 "add dependency status in readme" +[#72]: https://github.com/jprichardson/node-fs-extra/pull/72 "Use svg instead of png to get better image quality" +[#71]: https://github.com/jprichardson/node-fs-extra/issues/71 "fse.copy not working on Windows 7 x64 OS, but, copySync does work" +[#70]: https://github.com/jprichardson/node-fs-extra/issues/70 "Not filter each file, stops on first false [bug]" +[#69]: https://github.com/jprichardson/node-fs-extra/issues/69 "How to check if folder exist and read the folder name" +[#68]: https://github.com/jprichardson/node-fs-extra/issues/68 "consider flag to readJsonSync (throw false) [enhancement]" +[#67]: https://github.com/jprichardson/node-fs-extra/issues/67 "docs for readJson incorrectly states that is accepts options" +[#66]: https://github.com/jprichardson/node-fs-extra/issues/66 "ENAMETOOLONG" +[#65]: https://github.com/jprichardson/node-fs-extra/issues/65 "exclude filter in fs.copy" +[#64]: https://github.com/jprichardson/node-fs-extra/issues/64 "Announce: mfs - monitor your fs-extra calls" +[#63]: https://github.com/jprichardson/node-fs-extra/issues/63 "Walk" +[#62]: https://github.com/jprichardson/node-fs-extra/issues/62 "npm install fs-extra doesn't work" +[#61]: https://github.com/jprichardson/node-fs-extra/issues/61 "No longer supports node 0.8 due to use of `^` in package.json dependencies" +[#60]: https://github.com/jprichardson/node-fs-extra/issues/60 "chmod & chown for mkdirs" +[#59]: https://github.com/jprichardson/node-fs-extra/issues/59 "Consider including mkdirp and making fs-extra '--use_strict' safe [question]" +[#58]: https://github.com/jprichardson/node-fs-extra/issues/58 "Stack trace not included in fs.copy error" +[#57]: https://github.com/jprichardson/node-fs-extra/issues/57 "Possible to include wildcards in delete?" +[#56]: https://github.com/jprichardson/node-fs-extra/issues/56 "Crash when have no access to write to destination file in copy " +[#55]: https://github.com/jprichardson/node-fs-extra/issues/55 "Is it possible to have any console output similar to Grunt copy module?" +[#54]: https://github.com/jprichardson/node-fs-extra/issues/54 "`copy` does not preserve file ownership and permissons" +[#53]: https://github.com/jprichardson/node-fs-extra/issues/53 "outputFile() - ability to write data in appending mode" +[#52]: https://github.com/jprichardson/node-fs-extra/pull/52 "This fixes (what I think) is a bug in copySync" +[#51]: https://github.com/jprichardson/node-fs-extra/pull/51 "Add a Bitdeli Badge to README" +[#50]: https://github.com/jprichardson/node-fs-extra/issues/50 "Replace mechanism in createFile" +[#49]: https://github.com/jprichardson/node-fs-extra/pull/49 "update rimraf to v2.2.6" +[#48]: https://github.com/jprichardson/node-fs-extra/issues/48 "fs.copy issue [bug]" +[#47]: https://github.com/jprichardson/node-fs-extra/issues/47 "Bug in copy - callback called on readStream 'close' - Fixed in ncp 0.5.0" +[#46]: https://github.com/jprichardson/node-fs-extra/pull/46 "update copyright year" +[#45]: https://github.com/jprichardson/node-fs-extra/pull/45 "Added note about fse.outputFile() being the one that overwrites" +[#44]: https://github.com/jprichardson/node-fs-extra/pull/44 "Proposal: Stream support" +[#43]: https://github.com/jprichardson/node-fs-extra/issues/43 "Better error reporting " +[#42]: https://github.com/jprichardson/node-fs-extra/issues/42 "Performance issue?" +[#41]: https://github.com/jprichardson/node-fs-extra/pull/41 "There does seem to be a synchronous version now" +[#40]: https://github.com/jprichardson/node-fs-extra/issues/40 "fs.copy throw unexplained error ENOENT, utime " +[#39]: https://github.com/jprichardson/node-fs-extra/pull/39 "Added regression test for copy() return callback on error" +[#38]: https://github.com/jprichardson/node-fs-extra/pull/38 "Return err in copy() fstat cb, because stat could be undefined or null" +[#37]: https://github.com/jprichardson/node-fs-extra/issues/37 "Maybe include a line reader? [enhancement, question]" +[#36]: https://github.com/jprichardson/node-fs-extra/pull/36 "`filter` parameter `fs.copy` and `fs.copySync`" +[#35]: https://github.com/jprichardson/node-fs-extra/pull/35 "`filter` parameter `fs.copy` and `fs.copySync` " +[#34]: https://github.com/jprichardson/node-fs-extra/issues/34 "update docs to include options for JSON methods [enhancement]" +[#33]: https://github.com/jprichardson/node-fs-extra/pull/33 "fs_extra.copySync" +[#32]: https://github.com/jprichardson/node-fs-extra/issues/32 "update to latest jsonfile [enhancement]" +[#31]: https://github.com/jprichardson/node-fs-extra/issues/31 "Add ensure methods [enhancement]" +[#30]: https://github.com/jprichardson/node-fs-extra/issues/30 "update package.json optional dep `graceful-fs`" +[#29]: https://github.com/jprichardson/node-fs-extra/issues/29 "Copy failing if dest directory doesn't exist. Is this intended?" +[#28]: https://github.com/jprichardson/node-fs-extra/issues/28 "homepage field must be a string url. Deleted." +[#27]: https://github.com/jprichardson/node-fs-extra/issues/27 "Update Readme" +[#26]: https://github.com/jprichardson/node-fs-extra/issues/26 "Add readdir recursive method. [enhancement]" +[#25]: https://github.com/jprichardson/node-fs-extra/pull/25 "adding an `.npmignore` file" +[#24]: https://github.com/jprichardson/node-fs-extra/issues/24 "[bug] cannot run in strict mode [bug]" +[#23]: https://github.com/jprichardson/node-fs-extra/issues/23 "`writeJSON()` should create parent directories" +[#22]: https://github.com/jprichardson/node-fs-extra/pull/22 "Add a limit option to mkdirs()" +[#21]: https://github.com/jprichardson/node-fs-extra/issues/21 "touch() in 0.10.0" +[#20]: https://github.com/jprichardson/node-fs-extra/issues/20 "fs.remove yields callback before directory is really deleted" +[#19]: https://github.com/jprichardson/node-fs-extra/issues/19 "fs.copy err is empty array" +[#18]: https://github.com/jprichardson/node-fs-extra/pull/18 "Exposed copyFile Function" +[#17]: https://github.com/jprichardson/node-fs-extra/issues/17 "Use `require('graceful-fs')` if found instead of `require('fs')`" +[#16]: https://github.com/jprichardson/node-fs-extra/pull/16 "Update README.md" +[#15]: https://github.com/jprichardson/node-fs-extra/issues/15 "Implement cp -r but sync aka copySync. [enhancement]" +[#14]: https://github.com/jprichardson/node-fs-extra/issues/14 "fs.mkdirSync is broken in 0.3.1" +[#13]: https://github.com/jprichardson/node-fs-extra/issues/13 "Thoughts on including a directory tree / file watcher? [enhancement, question]" +[#12]: https://github.com/jprichardson/node-fs-extra/issues/12 "copyFile & copyFileSync are global" +[#11]: https://github.com/jprichardson/node-fs-extra/issues/11 "Thoughts on including a file walker? [enhancement, question]" +[#10]: https://github.com/jprichardson/node-fs-extra/issues/10 "move / moveFile API [enhancement]" +[#9]: https://github.com/jprichardson/node-fs-extra/issues/9 "don't import normal fs stuff into fs-extra" +[#8]: https://github.com/jprichardson/node-fs-extra/pull/8 "Update rimraf to latest version" +[#6]: https://github.com/jprichardson/node-fs-extra/issues/6 "Remove CoffeeScript development dependency" +[#5]: https://github.com/jprichardson/node-fs-extra/issues/5 "comments on naming" +[#4]: https://github.com/jprichardson/node-fs-extra/issues/4 "version bump to 0.2" +[#3]: https://github.com/jprichardson/node-fs-extra/pull/3 "Hi! I fixed some code for you!" +[#2]: https://github.com/jprichardson/node-fs-extra/issues/2 "Merge with fs.extra and mkdirp" +[#1]: https://github.com/jprichardson/node-fs-extra/issues/1 "file-extra npm !exist" diff --git a/node_modules/fs-extra/LICENSE b/node_modules/fs-extra/LICENSE new file mode 100644 index 00000000..93546dfb --- /dev/null +++ b/node_modules/fs-extra/LICENSE @@ -0,0 +1,15 @@ +(The MIT License) + +Copyright (c) 2011-2017 JP Richardson + +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/fs-extra/README.md b/node_modules/fs-extra/README.md new file mode 100644 index 00000000..f09f79f7 --- /dev/null +++ b/node_modules/fs-extra/README.md @@ -0,0 +1,261 @@ +Node.js: fs-extra +================= + +`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`. + +[![npm Package](https://img.shields.io/npm/v/fs-extra.svg)](https://www.npmjs.org/package/fs-extra) +[![License](https://img.shields.io/npm/l/express.svg)](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE) +[![build status](https://img.shields.io/travis/jprichardson/node-fs-extra/master.svg)](http://travis-ci.org/jprichardson/node-fs-extra) +[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-fs-extra/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-fs-extra/branch/master) +[![downloads per month](http://img.shields.io/npm/dm/fs-extra.svg)](https://www.npmjs.org/package/fs-extra) +[![Coverage Status](https://img.shields.io/coveralls/github/jprichardson/node-fs-extra/master.svg)](https://coveralls.io/github/jprichardson/node-fs-extra) +[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) + +Why? +---- + +I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects. + + + + +Installation +------------ + + npm install --save fs-extra + + + +Usage +----- + +`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed. + +You don't ever need to include the original `fs` module again: + +```js +const fs = require('fs') // this is no longer necessary +``` + +you can now do this: + +```js +const fs = require('fs-extra') +``` + +or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want +to name your `fs` variable `fse` like so: + +```js +const fse = require('fs-extra') +``` + +you can also keep both, but it's redundant: + +```js +const fs = require('fs') +const fse = require('fs-extra') +``` + +Sync vs Async vs Async/Await +------------- +Most methods are async by default. All async methods will return a promise if the callback isn't passed. + +Sync methods on the other hand will throw if an error occurs. + +Also Async/Await will throw an error if one occurs. + +Example: + +```js +const fs = require('fs-extra') + +// Async with promises: +fs.copy('/tmp/myfile', '/tmp/mynewfile') + .then(() => console.log('success!')) + .catch(err => console.error(err)) + +// Async with callbacks: +fs.copy('/tmp/myfile', '/tmp/mynewfile', err => { + if (err) return console.error(err) + console.log('success!') +}) + +// Sync: +try { + fs.copySync('/tmp/myfile', '/tmp/mynewfile') + console.log('success!') +} catch (err) { + console.error(err) +} + +// Async/Await: +async function copyFiles () { + try { + await fs.copy('/tmp/myfile', '/tmp/mynewfile') + console.log('success!') + } catch (err) { + console.error(err) + } +} + +copyFiles() +``` + + +Methods +------- + +### Async + +- [copy](docs/copy.md) +- [emptyDir](docs/emptyDir.md) +- [ensureFile](docs/ensureFile.md) +- [ensureDir](docs/ensureDir.md) +- [ensureLink](docs/ensureLink.md) +- [ensureSymlink](docs/ensureSymlink.md) +- [mkdirp](docs/ensureDir.md) +- [mkdirs](docs/ensureDir.md) +- [move](docs/move.md) +- [outputFile](docs/outputFile.md) +- [outputJson](docs/outputJson.md) +- [pathExists](docs/pathExists.md) +- [readJson](docs/readJson.md) +- [remove](docs/remove.md) +- [writeJson](docs/writeJson.md) + +### Sync + +- [copySync](docs/copy-sync.md) +- [emptyDirSync](docs/emptyDir-sync.md) +- [ensureFileSync](docs/ensureFile-sync.md) +- [ensureDirSync](docs/ensureDir-sync.md) +- [ensureLinkSync](docs/ensureLink-sync.md) +- [ensureSymlinkSync](docs/ensureSymlink-sync.md) +- [mkdirpSync](docs/ensureDir-sync.md) +- [mkdirsSync](docs/ensureDir-sync.md) +- [moveSync](docs/move-sync.md) +- [outputFileSync](docs/outputFile-sync.md) +- [outputJsonSync](docs/outputJson-sync.md) +- [pathExistsSync](docs/pathExists-sync.md) +- [readJsonSync](docs/readJson-sync.md) +- [removeSync](docs/remove-sync.md) +- [writeJsonSync](docs/writeJson-sync.md) + + +**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()` & `fs.write()`](docs/fs-read-write.md) + +### What happened to `walk()` and `walkSync()`? + +They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync). + + +Third Party +----------- + + +### TypeScript + +If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra + + +### File / Directory Watching + +If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar). + +### Obtain Filesystem (Devices, Partitions) Information + +[fs-filesystem](https://github.com/arthurintelligence/node-fs-filesystem) allows you to read the state of the filesystem of the host on which it is run. It returns information about both the devices and the partitions (volumes) of the system. + +### Misc. + +- [fs-extra-debug](https://github.com/jdxcode/fs-extra-debug) - Send your fs-extra calls to [debug](https://npmjs.org/package/debug). +- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls. + + + +Hacking on fs-extra +------------------- + +Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project +uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you, +you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`. + +[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) + +What's needed? +- First, take a look at existing issues. Those are probably going to be where the priority lies. +- More tests for edge cases. Specifically on different platforms. There can never be enough tests. +- Improve test coverage. See coveralls output for more info. + +Note: If you make any big changes, **you should definitely file an issue for discussion first.** + +### Running the Test Suite + +fs-extra contains hundreds of tests. + +- `npm run lint`: runs the linter ([standard](http://standardjs.com/)) +- `npm run unit`: runs the unit tests +- `npm test`: runs both the linter and the tests + + +### Windows + +If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's +because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's +account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7 +However, I didn't have much luck doing this. + +Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows. +I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command: + + net use z: "\\vmware-host\Shared Folders" + +I can then navigate to my `fs-extra` directory and run the tests. + + +Naming +------ + +I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here: + +* https://github.com/jprichardson/node-fs-extra/issues/2 +* https://github.com/flatiron/utile/issues/11 +* https://github.com/ryanmcgrath/wrench-js/issues/29 +* https://github.com/substack/node-mkdirp/issues/17 + +First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes. + +For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc. + +We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`? + +My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too. + +So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`. + + +Credit +------ + +`fs-extra` wouldn't be possible without using the modules from the following authors: + +- [Isaac Shlueter](https://github.com/isaacs) +- [Charlie McConnel](https://github.com/avianflu) +- [James Halliday](https://github.com/substack) +- [Andrew Kelley](https://github.com/andrewrk) + + + + +License +------- + +Licensed under MIT + +Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson) + +[1]: http://nodejs.org/docs/latest/api/fs.html + + +[jsonfile]: https://github.com/jprichardson/node-jsonfile diff --git a/node_modules/fs-extra/lib/copy-sync/copy-sync.js b/node_modules/fs-extra/lib/copy-sync/copy-sync.js new file mode 100644 index 00000000..14ad9939 --- /dev/null +++ b/node_modules/fs-extra/lib/copy-sync/copy-sync.js @@ -0,0 +1,193 @@ +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const mkdirpSync = require('../mkdirs').mkdirsSync +const utimesSync = require('../util/utimes.js').utimesMillisSync + +const notExist = Symbol('notExist') + +function copySync (src, dest, opts) { + if (typeof opts === 'function') { + opts = {filter: opts} + } + + opts = opts || {} + opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now + opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber + + // Warn about using preserveTimestamps on 32-bit node + if (opts.preserveTimestamps && process.arch === 'ia32') { + console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n + see https://github.com/jprichardson/node-fs-extra/issues/269`) + } + + const destStat = checkPaths(src, dest) + + if (opts.filter && !opts.filter(src, dest)) return + + const destParent = path.dirname(dest) + if (!fs.existsSync(destParent)) mkdirpSync(destParent) + return startCopy(destStat, src, dest, opts) +} + +function startCopy (destStat, src, dest, opts) { + if (opts.filter && !opts.filter(src, dest)) return + return getStats(destStat, src, dest, opts) +} + +function getStats (destStat, src, dest, opts) { + const statSync = opts.dereference ? fs.statSync : fs.lstatSync + const srcStat = statSync(src) + + if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts) + else if (srcStat.isFile() || + srcStat.isCharacterDevice() || + srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts) + else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts) +} + +function onFile (srcStat, destStat, src, dest, opts) { + if (destStat === notExist) return copyFile(srcStat, src, dest, opts) + return mayCopyFile(srcStat, src, dest, opts) +} + +function mayCopyFile (srcStat, src, dest, opts) { + if (opts.overwrite) { + fs.unlinkSync(dest) + return copyFile(srcStat, src, dest, opts) + } else if (opts.errorOnExist) { + throw new Error(`'${dest}' already exists`) + } +} + +function copyFile (srcStat, src, dest, opts) { + if (typeof fs.copyFileSync === 'function') { + fs.copyFileSync(src, dest) + fs.chmodSync(dest, srcStat.mode) + if (opts.preserveTimestamps) { + return utimesSync(dest, srcStat.atime, srcStat.mtime) + } + return + } + return copyFileFallback(srcStat, src, dest, opts) +} + +function copyFileFallback (srcStat, src, dest, opts) { + const BUF_LENGTH = 64 * 1024 + const _buff = require('../util/buffer')(BUF_LENGTH) + + const fdr = fs.openSync(src, 'r') + const fdw = fs.openSync(dest, 'w', srcStat.mode) + let pos = 0 + + while (pos < srcStat.size) { + const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos) + fs.writeSync(fdw, _buff, 0, bytesRead) + pos += bytesRead + } + + if (opts.preserveTimestamps) fs.futimesSync(fdw, srcStat.atime, srcStat.mtime) + + fs.closeSync(fdr) + fs.closeSync(fdw) +} + +function onDir (srcStat, destStat, src, dest, opts) { + if (destStat === notExist) return mkDirAndCopy(srcStat, src, dest, opts) + if (destStat && !destStat.isDirectory()) { + throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`) + } + return copyDir(src, dest, opts) +} + +function mkDirAndCopy (srcStat, src, dest, opts) { + fs.mkdirSync(dest) + copyDir(src, dest, opts) + return fs.chmodSync(dest, srcStat.mode) +} + +function copyDir (src, dest, opts) { + fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts)) +} + +function copyDirItem (item, src, dest, opts) { + const srcItem = path.join(src, item) + const destItem = path.join(dest, item) + const destStat = checkPaths(srcItem, destItem) + return startCopy(destStat, srcItem, destItem, opts) +} + +function onLink (destStat, src, dest, opts) { + let resolvedSrc = fs.readlinkSync(src) + + if (opts.dereference) { + resolvedSrc = path.resolve(process.cwd(), resolvedSrc) + } + + if (destStat === notExist) { + return fs.symlinkSync(resolvedSrc, dest) + } else { + let resolvedDest + try { + resolvedDest = fs.readlinkSync(dest) + } catch (err) { + // dest exists and is a regular file or directory, + // Windows may throw UNKNOWN error. If dest already exists, + // fs throws error anyway, so no need to guard against it here. + if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest) + throw err + } + if (opts.dereference) { + resolvedDest = path.resolve(process.cwd(), resolvedDest) + } + if (isSrcSubdir(resolvedSrc, resolvedDest)) { + throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`) + } + + // prevent copy if src is a subdir of dest since unlinking + // dest in this case would result in removing src contents + // and therefore a broken symlink would be created. + if (fs.statSync(dest).isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) { + throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`) + } + return copyLink(resolvedSrc, dest) + } +} + +function copyLink (resolvedSrc, dest) { + fs.unlinkSync(dest) + return fs.symlinkSync(resolvedSrc, dest) +} + +// return true if dest is a subdir of src, otherwise false. +function isSrcSubdir (src, dest) { + const srcArray = path.resolve(src).split(path.sep) + const destArray = path.resolve(dest).split(path.sep) + return srcArray.reduce((acc, current, i) => acc && destArray[i] === current, true) +} + +function checkStats (src, dest) { + const srcStat = fs.statSync(src) + let destStat + try { + destStat = fs.statSync(dest) + } catch (err) { + if (err.code === 'ENOENT') return {srcStat, destStat: notExist} + throw err + } + return {srcStat, destStat} +} + +function checkPaths (src, dest) { + const {srcStat, destStat} = checkStats(src, dest) + if (destStat.ino && destStat.ino === srcStat.ino) { + throw new Error('Source and destination must not be the same.') + } + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { + throw new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`) + } + return destStat +} + +module.exports = copySync diff --git a/node_modules/fs-extra/lib/copy-sync/index.js b/node_modules/fs-extra/lib/copy-sync/index.js new file mode 100644 index 00000000..65945aed --- /dev/null +++ b/node_modules/fs-extra/lib/copy-sync/index.js @@ -0,0 +1,5 @@ +'use strict' + +module.exports = { + copySync: require('./copy-sync') +} diff --git a/node_modules/fs-extra/lib/copy/copy.js b/node_modules/fs-extra/lib/copy/copy.js new file mode 100644 index 00000000..3dfbc540 --- /dev/null +++ b/node_modules/fs-extra/lib/copy/copy.js @@ -0,0 +1,246 @@ +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const mkdirp = require('../mkdirs').mkdirs +const pathExists = require('../path-exists').pathExists +const utimes = require('../util/utimes').utimesMillis + +const notExist = Symbol('notExist') + +function copy (src, dest, opts, cb) { + if (typeof opts === 'function' && !cb) { + cb = opts + opts = {} + } else if (typeof opts === 'function') { + opts = {filter: opts} + } + + cb = cb || function () {} + opts = opts || {} + + opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now + opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber + + // Warn about using preserveTimestamps on 32-bit node + if (opts.preserveTimestamps && process.arch === 'ia32') { + console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n + see https://github.com/jprichardson/node-fs-extra/issues/269`) + } + + checkPaths(src, dest, (err, destStat) => { + if (err) return cb(err) + if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb) + return checkParentDir(destStat, src, dest, opts, cb) + }) +} + +function checkParentDir (destStat, src, dest, opts, cb) { + const destParent = path.dirname(dest) + pathExists(destParent, (err, dirExists) => { + if (err) return cb(err) + if (dirExists) return startCopy(destStat, src, dest, opts, cb) + mkdirp(destParent, err => { + if (err) return cb(err) + return startCopy(destStat, src, dest, opts, cb) + }) + }) +} + +function handleFilter (onInclude, destStat, src, dest, opts, cb) { + Promise.resolve(opts.filter(src, dest)).then(include => { + if (include) { + if (destStat) return onInclude(destStat, src, dest, opts, cb) + return onInclude(src, dest, opts, cb) + } + return cb() + }, error => cb(error)) +} + +function startCopy (destStat, src, dest, opts, cb) { + if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb) + return getStats(destStat, src, dest, opts, cb) +} + +function getStats (destStat, src, dest, opts, cb) { + const stat = opts.dereference ? fs.stat : fs.lstat + stat(src, (err, srcStat) => { + if (err) return cb(err) + + if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb) + else if (srcStat.isFile() || + srcStat.isCharacterDevice() || + srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb) + else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb) + }) +} + +function onFile (srcStat, destStat, src, dest, opts, cb) { + if (destStat === notExist) return copyFile(srcStat, src, dest, opts, cb) + return mayCopyFile(srcStat, src, dest, opts, cb) +} + +function mayCopyFile (srcStat, src, dest, opts, cb) { + if (opts.overwrite) { + fs.unlink(dest, err => { + if (err) return cb(err) + return copyFile(srcStat, src, dest, opts, cb) + }) + } else if (opts.errorOnExist) { + return cb(new Error(`'${dest}' already exists`)) + } else return cb() +} + +function copyFile (srcStat, src, dest, opts, cb) { + if (typeof fs.copyFile === 'function') { + return fs.copyFile(src, dest, err => { + if (err) return cb(err) + return setDestModeAndTimestamps(srcStat, dest, opts, cb) + }) + } + return copyFileFallback(srcStat, src, dest, opts, cb) +} + +function copyFileFallback (srcStat, src, dest, opts, cb) { + const rs = fs.createReadStream(src) + rs.on('error', err => cb(err)).once('open', () => { + const ws = fs.createWriteStream(dest, { mode: srcStat.mode }) + ws.on('error', err => cb(err)) + .on('open', () => rs.pipe(ws)) + .once('close', () => setDestModeAndTimestamps(srcStat, dest, opts, cb)) + }) +} + +function setDestModeAndTimestamps (srcStat, dest, opts, cb) { + fs.chmod(dest, srcStat.mode, err => { + if (err) return cb(err) + if (opts.preserveTimestamps) { + return utimes(dest, srcStat.atime, srcStat.mtime, cb) + } + return cb() + }) +} + +function onDir (srcStat, destStat, src, dest, opts, cb) { + if (destStat === notExist) return mkDirAndCopy(srcStat, src, dest, opts, cb) + if (destStat && !destStat.isDirectory()) { + return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)) + } + return copyDir(src, dest, opts, cb) +} + +function mkDirAndCopy (srcStat, src, dest, opts, cb) { + fs.mkdir(dest, err => { + if (err) return cb(err) + copyDir(src, dest, opts, err => { + if (err) return cb(err) + return fs.chmod(dest, srcStat.mode, cb) + }) + }) +} + +function copyDir (src, dest, opts, cb) { + fs.readdir(src, (err, items) => { + if (err) return cb(err) + return copyDirItems(items, src, dest, opts, cb) + }) +} + +function copyDirItems (items, src, dest, opts, cb) { + const item = items.pop() + if (!item) return cb() + return copyDirItem(items, item, src, dest, opts, cb) +} + +function copyDirItem (items, item, src, dest, opts, cb) { + const srcItem = path.join(src, item) + const destItem = path.join(dest, item) + checkPaths(srcItem, destItem, (err, destStat) => { + if (err) return cb(err) + startCopy(destStat, srcItem, destItem, opts, err => { + if (err) return cb(err) + return copyDirItems(items, src, dest, opts, cb) + }) + }) +} + +function onLink (destStat, src, dest, opts, cb) { + fs.readlink(src, (err, resolvedSrc) => { + if (err) return cb(err) + + if (opts.dereference) { + resolvedSrc = path.resolve(process.cwd(), resolvedSrc) + } + + if (destStat === notExist) { + return fs.symlink(resolvedSrc, dest, cb) + } else { + fs.readlink(dest, (err, resolvedDest) => { + if (err) { + // dest exists and is a regular file or directory, + // Windows may throw UNKNOWN error. If dest already exists, + // fs throws error anyway, so no need to guard against it here. + if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb) + return cb(err) + } + if (opts.dereference) { + resolvedDest = path.resolve(process.cwd(), resolvedDest) + } + if (isSrcSubdir(resolvedSrc, resolvedDest)) { + return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)) + } + + // do not copy if src is a subdir of dest since unlinking + // dest in this case would result in removing src contents + // and therefore a broken symlink would be created. + if (destStat.isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) { + return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)) + } + return copyLink(resolvedSrc, dest, cb) + }) + } + }) +} + +function copyLink (resolvedSrc, dest, cb) { + fs.unlink(dest, err => { + if (err) return cb(err) + return fs.symlink(resolvedSrc, dest, cb) + }) +} + +// return true if dest is a subdir of src, otherwise false. +function isSrcSubdir (src, dest) { + const srcArray = path.resolve(src).split(path.sep) + const destArray = path.resolve(dest).split(path.sep) + return srcArray.reduce((acc, current, i) => acc && destArray[i] === current, true) +} + +function checkStats (src, dest, cb) { + fs.stat(src, (err, srcStat) => { + if (err) return cb(err) + fs.stat(dest, (err, destStat) => { + if (err) { + if (err.code === 'ENOENT') return cb(null, {srcStat, destStat: notExist}) + return cb(err) + } + return cb(null, {srcStat, destStat}) + }) + }) +} + +function checkPaths (src, dest, cb) { + checkStats(src, dest, (err, stats) => { + if (err) return cb(err) + const {srcStat, destStat} = stats + if (destStat.ino && destStat.ino === srcStat.ino) { + return cb(new Error('Source and destination must not be the same.')) + } + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { + return cb(new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`)) + } + return cb(null, destStat) + }) +} + +module.exports = copy diff --git a/node_modules/fs-extra/lib/copy/index.js b/node_modules/fs-extra/lib/copy/index.js new file mode 100644 index 00000000..b7e4f7f8 --- /dev/null +++ b/node_modules/fs-extra/lib/copy/index.js @@ -0,0 +1,6 @@ +'use strict' + +const u = require('universalify').fromCallback +module.exports = { + copy: u(require('./copy')) +} diff --git a/node_modules/fs-extra/lib/empty/index.js b/node_modules/fs-extra/lib/empty/index.js new file mode 100644 index 00000000..db05c171 --- /dev/null +++ b/node_modules/fs-extra/lib/empty/index.js @@ -0,0 +1,48 @@ +'use strict' + +const u = require('universalify').fromCallback +const fs = require('fs') +const path = require('path') +const mkdir = require('../mkdirs') +const remove = require('../remove') + +const emptyDir = u(function emptyDir (dir, callback) { + callback = callback || function () {} + fs.readdir(dir, (err, items) => { + if (err) return mkdir.mkdirs(dir, callback) + + items = items.map(item => path.join(dir, item)) + + deleteItem() + + function deleteItem () { + const item = items.pop() + if (!item) return callback() + remove.remove(item, err => { + if (err) return callback(err) + deleteItem() + }) + } + }) +}) + +function emptyDirSync (dir) { + let items + try { + items = fs.readdirSync(dir) + } catch (err) { + return mkdir.mkdirsSync(dir) + } + + items.forEach(item => { + item = path.join(dir, item) + remove.removeSync(item) + }) +} + +module.exports = { + emptyDirSync, + emptydirSync: emptyDirSync, + emptyDir, + emptydir: emptyDir +} diff --git a/node_modules/fs-extra/lib/ensure/file.js b/node_modules/fs-extra/lib/ensure/file.js new file mode 100644 index 00000000..67eed301 --- /dev/null +++ b/node_modules/fs-extra/lib/ensure/file.js @@ -0,0 +1,49 @@ +'use strict' + +const u = require('universalify').fromCallback +const path = require('path') +const fs = require('graceful-fs') +const mkdir = require('../mkdirs') +const pathExists = require('../path-exists').pathExists + +function createFile (file, callback) { + function makeFile () { + fs.writeFile(file, '', err => { + if (err) return callback(err) + callback() + }) + } + + fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err + if (!err && stats.isFile()) return callback() + const dir = path.dirname(file) + pathExists(dir, (err, dirExists) => { + if (err) return callback(err) + if (dirExists) return makeFile() + mkdir.mkdirs(dir, err => { + if (err) return callback(err) + makeFile() + }) + }) + }) +} + +function createFileSync (file) { + let stats + try { + stats = fs.statSync(file) + } catch (e) {} + if (stats && stats.isFile()) return + + const dir = path.dirname(file) + if (!fs.existsSync(dir)) { + mkdir.mkdirsSync(dir) + } + + fs.writeFileSync(file, '') +} + +module.exports = { + createFile: u(createFile), + createFileSync +} diff --git a/node_modules/fs-extra/lib/ensure/index.js b/node_modules/fs-extra/lib/ensure/index.js new file mode 100644 index 00000000..c1f67b71 --- /dev/null +++ b/node_modules/fs-extra/lib/ensure/index.js @@ -0,0 +1,23 @@ +'use strict' + +const file = require('./file') +const link = require('./link') +const symlink = require('./symlink') + +module.exports = { + // file + createFile: file.createFile, + createFileSync: file.createFileSync, + ensureFile: file.createFile, + ensureFileSync: file.createFileSync, + // link + createLink: link.createLink, + createLinkSync: link.createLinkSync, + ensureLink: link.createLink, + ensureLinkSync: link.createLinkSync, + // symlink + createSymlink: symlink.createSymlink, + createSymlinkSync: symlink.createSymlinkSync, + ensureSymlink: symlink.createSymlink, + ensureSymlinkSync: symlink.createSymlinkSync +} diff --git a/node_modules/fs-extra/lib/ensure/link.js b/node_modules/fs-extra/lib/ensure/link.js new file mode 100644 index 00000000..2cd41962 --- /dev/null +++ b/node_modules/fs-extra/lib/ensure/link.js @@ -0,0 +1,61 @@ +'use strict' + +const u = require('universalify').fromCallback +const path = require('path') +const fs = require('graceful-fs') +const mkdir = require('../mkdirs') +const pathExists = require('../path-exists').pathExists + +function createLink (srcpath, dstpath, callback) { + function makeLink (srcpath, dstpath) { + fs.link(srcpath, dstpath, err => { + if (err) return callback(err) + callback(null) + }) + } + + pathExists(dstpath, (err, destinationExists) => { + if (err) return callback(err) + if (destinationExists) return callback(null) + fs.lstat(srcpath, (err) => { + if (err) { + err.message = err.message.replace('lstat', 'ensureLink') + return callback(err) + } + + const dir = path.dirname(dstpath) + pathExists(dir, (err, dirExists) => { + if (err) return callback(err) + if (dirExists) return makeLink(srcpath, dstpath) + mkdir.mkdirs(dir, err => { + if (err) return callback(err) + makeLink(srcpath, dstpath) + }) + }) + }) + }) +} + +function createLinkSync (srcpath, dstpath) { + const destinationExists = fs.existsSync(dstpath) + if (destinationExists) return undefined + + try { + fs.lstatSync(srcpath) + } catch (err) { + err.message = err.message.replace('lstat', 'ensureLink') + throw err + } + + const dir = path.dirname(dstpath) + const dirExists = fs.existsSync(dir) + if (dirExists) return fs.linkSync(srcpath, dstpath) + mkdir.mkdirsSync(dir) + + return fs.linkSync(srcpath, dstpath) +} + +module.exports = { + createLink: u(createLink), + createLinkSync +} diff --git a/node_modules/fs-extra/lib/ensure/symlink-paths.js b/node_modules/fs-extra/lib/ensure/symlink-paths.js new file mode 100644 index 00000000..24e7e1c6 --- /dev/null +++ b/node_modules/fs-extra/lib/ensure/symlink-paths.js @@ -0,0 +1,99 @@ +'use strict' + +const path = require('path') +const fs = require('graceful-fs') +const pathExists = require('../path-exists').pathExists + +/** + * Function that returns two types of paths, one relative to symlink, and one + * relative to the current working directory. Checks if path is absolute or + * relative. If the path is relative, this function checks if the path is + * relative to symlink or relative to current working directory. This is an + * initiative to find a smarter `srcpath` to supply when building symlinks. + * This allows you to determine which path to use out of one of three possible + * types of source paths. The first is an absolute path. This is detected by + * `path.isAbsolute()`. When an absolute path is provided, it is checked to + * see if it exists. If it does it's used, if not an error is returned + * (callback)/ thrown (sync). The other two options for `srcpath` are a + * relative url. By default Node's `fs.symlink` works by creating a symlink + * using `dstpath` and expects the `srcpath` to be relative to the newly + * created symlink. If you provide a `srcpath` that does not exist on the file + * system it results in a broken symlink. To minimize this, the function + * checks to see if the 'relative to symlink' source file exists, and if it + * does it will use it. If it does not, it checks if there's a file that + * exists that is relative to the current working directory, if does its used. + * This preserves the expectations of the original fs.symlink spec and adds + * the ability to pass in `relative to current working direcotry` paths. + */ + +function symlinkPaths (srcpath, dstpath, callback) { + if (path.isAbsolute(srcpath)) { + return fs.lstat(srcpath, (err) => { + if (err) { + err.message = err.message.replace('lstat', 'ensureSymlink') + return callback(err) + } + return callback(null, { + 'toCwd': srcpath, + 'toDst': srcpath + }) + }) + } else { + const dstdir = path.dirname(dstpath) + const relativeToDst = path.join(dstdir, srcpath) + return pathExists(relativeToDst, (err, exists) => { + if (err) return callback(err) + if (exists) { + return callback(null, { + 'toCwd': relativeToDst, + 'toDst': srcpath + }) + } else { + return fs.lstat(srcpath, (err) => { + if (err) { + err.message = err.message.replace('lstat', 'ensureSymlink') + return callback(err) + } + return callback(null, { + 'toCwd': srcpath, + 'toDst': path.relative(dstdir, srcpath) + }) + }) + } + }) + } +} + +function symlinkPathsSync (srcpath, dstpath) { + let exists + if (path.isAbsolute(srcpath)) { + exists = fs.existsSync(srcpath) + if (!exists) throw new Error('absolute srcpath does not exist') + return { + 'toCwd': srcpath, + 'toDst': srcpath + } + } else { + const dstdir = path.dirname(dstpath) + const relativeToDst = path.join(dstdir, srcpath) + exists = fs.existsSync(relativeToDst) + if (exists) { + return { + 'toCwd': relativeToDst, + 'toDst': srcpath + } + } else { + exists = fs.existsSync(srcpath) + if (!exists) throw new Error('relative srcpath does not exist') + return { + 'toCwd': srcpath, + 'toDst': path.relative(dstdir, srcpath) + } + } + } +} + +module.exports = { + symlinkPaths, + symlinkPathsSync +} diff --git a/node_modules/fs-extra/lib/ensure/symlink-type.js b/node_modules/fs-extra/lib/ensure/symlink-type.js new file mode 100644 index 00000000..4f8787c2 --- /dev/null +++ b/node_modules/fs-extra/lib/ensure/symlink-type.js @@ -0,0 +1,31 @@ +'use strict' + +const fs = require('graceful-fs') + +function symlinkType (srcpath, type, callback) { + callback = (typeof type === 'function') ? type : callback + type = (typeof type === 'function') ? false : type + if (type) return callback(null, type) + fs.lstat(srcpath, (err, stats) => { + if (err) return callback(null, 'file') + type = (stats && stats.isDirectory()) ? 'dir' : 'file' + callback(null, type) + }) +} + +function symlinkTypeSync (srcpath, type) { + let stats + + if (type) return type + try { + stats = fs.lstatSync(srcpath) + } catch (e) { + return 'file' + } + return (stats && stats.isDirectory()) ? 'dir' : 'file' +} + +module.exports = { + symlinkType, + symlinkTypeSync +} diff --git a/node_modules/fs-extra/lib/ensure/symlink.js b/node_modules/fs-extra/lib/ensure/symlink.js new file mode 100644 index 00000000..fe68b799 --- /dev/null +++ b/node_modules/fs-extra/lib/ensure/symlink.js @@ -0,0 +1,63 @@ +'use strict' + +const u = require('universalify').fromCallback +const path = require('path') +const fs = require('graceful-fs') +const _mkdirs = require('../mkdirs') +const mkdirs = _mkdirs.mkdirs +const mkdirsSync = _mkdirs.mkdirsSync + +const _symlinkPaths = require('./symlink-paths') +const symlinkPaths = _symlinkPaths.symlinkPaths +const symlinkPathsSync = _symlinkPaths.symlinkPathsSync + +const _symlinkType = require('./symlink-type') +const symlinkType = _symlinkType.symlinkType +const symlinkTypeSync = _symlinkType.symlinkTypeSync + +const pathExists = require('../path-exists').pathExists + +function createSymlink (srcpath, dstpath, type, callback) { + callback = (typeof type === 'function') ? type : callback + type = (typeof type === 'function') ? false : type + + pathExists(dstpath, (err, destinationExists) => { + if (err) return callback(err) + if (destinationExists) return callback(null) + symlinkPaths(srcpath, dstpath, (err, relative) => { + if (err) return callback(err) + srcpath = relative.toDst + symlinkType(relative.toCwd, type, (err, type) => { + if (err) return callback(err) + const dir = path.dirname(dstpath) + pathExists(dir, (err, dirExists) => { + if (err) return callback(err) + if (dirExists) return fs.symlink(srcpath, dstpath, type, callback) + mkdirs(dir, err => { + if (err) return callback(err) + fs.symlink(srcpath, dstpath, type, callback) + }) + }) + }) + }) + }) +} + +function createSymlinkSync (srcpath, dstpath, type) { + const destinationExists = fs.existsSync(dstpath) + if (destinationExists) return undefined + + const relative = symlinkPathsSync(srcpath, dstpath) + srcpath = relative.toDst + type = symlinkTypeSync(relative.toCwd, type) + const dir = path.dirname(dstpath) + const exists = fs.existsSync(dir) + if (exists) return fs.symlinkSync(srcpath, dstpath, type) + mkdirsSync(dir) + return fs.symlinkSync(srcpath, dstpath, type) +} + +module.exports = { + createSymlink: u(createSymlink), + createSymlinkSync +} diff --git a/node_modules/fs-extra/lib/fs/index.js b/node_modules/fs-extra/lib/fs/index.js new file mode 100644 index 00000000..8ffdf7b0 --- /dev/null +++ b/node_modules/fs-extra/lib/fs/index.js @@ -0,0 +1,104 @@ +'use strict' +// This is adapted from https://github.com/normalize/mz +// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors +const u = require('universalify').fromCallback +const fs = require('graceful-fs') + +const api = [ + 'access', + 'appendFile', + 'chmod', + 'chown', + 'close', + 'copyFile', + 'fchmod', + 'fchown', + 'fdatasync', + 'fstat', + 'fsync', + 'ftruncate', + 'futimes', + 'lchown', + 'lchmod', + 'link', + 'lstat', + 'mkdir', + 'mkdtemp', + 'open', + 'readFile', + 'readdir', + 'readlink', + 'realpath', + 'rename', + 'rmdir', + 'stat', + 'symlink', + 'truncate', + 'unlink', + 'utimes', + 'writeFile' +].filter(key => { + // Some commands are not available on some systems. Ex: + // fs.copyFile was added in Node.js v8.5.0 + // fs.mkdtemp was added in Node.js v5.10.0 + // fs.lchown is not available on at least some Linux + return typeof fs[key] === 'function' +}) + +// Export all keys: +Object.keys(fs).forEach(key => { + if (key === 'promises') { + // fs.promises is a getter property that triggers ExperimentalWarning + // Don't re-export it here, the getter is defined in "lib/index.js" + return + } + exports[key] = fs[key] +}) + +// Universalify async methods: +api.forEach(method => { + exports[method] = u(fs[method]) +}) + +// We differ from mz/fs in that we still ship the old, broken, fs.exists() +// since we are a drop-in replacement for the native module +exports.exists = function (filename, callback) { + if (typeof callback === 'function') { + return fs.exists(filename, callback) + } + return new Promise(resolve => { + return fs.exists(filename, resolve) + }) +} + +// fs.read() & fs.write need special treatment due to multiple callback args + +exports.read = function (fd, buffer, offset, length, position, callback) { + if (typeof callback === 'function') { + return fs.read(fd, buffer, offset, length, position, callback) + } + return new Promise((resolve, reject) => { + fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => { + if (err) return reject(err) + resolve({ bytesRead, buffer }) + }) + }) +} + +// Function signature can be +// fs.write(fd, buffer[, offset[, length[, position]]], callback) +// OR +// fs.write(fd, string[, position[, encoding]], callback) +// We need to handle both cases, so we use ...args +exports.write = function (fd, buffer, ...args) { + if (typeof args[args.length - 1] === 'function') { + return fs.write(fd, buffer, ...args) + } + + return new Promise((resolve, reject) => { + fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => { + if (err) return reject(err) + resolve({ bytesWritten, buffer }) + }) + }) +} diff --git a/node_modules/fs-extra/lib/index.js b/node_modules/fs-extra/lib/index.js new file mode 100644 index 00000000..40e37b18 --- /dev/null +++ b/node_modules/fs-extra/lib/index.js @@ -0,0 +1,28 @@ +'use strict' + +module.exports = Object.assign( + {}, + // Export promiseified graceful-fs: + require('./fs'), + // Export extra methods: + require('./copy-sync'), + require('./copy'), + require('./empty'), + require('./ensure'), + require('./json'), + require('./mkdirs'), + require('./move-sync'), + require('./move'), + require('./output'), + require('./path-exists'), + require('./remove') +) + +// Export fs.promises as a getter property so that we don't trigger +// ExperimentalWarning before fs.promises is actually accessed. +const fs = require('fs') +if (Object.getOwnPropertyDescriptor(fs, 'promises')) { + Object.defineProperty(module.exports, 'promises', { + get () { return fs.promises } + }) +} diff --git a/node_modules/fs-extra/lib/json/index.js b/node_modules/fs-extra/lib/json/index.js new file mode 100644 index 00000000..bae68d45 --- /dev/null +++ b/node_modules/fs-extra/lib/json/index.js @@ -0,0 +1,16 @@ +'use strict' + +const u = require('universalify').fromCallback +const jsonFile = require('./jsonfile') + +jsonFile.outputJson = u(require('./output-json')) +jsonFile.outputJsonSync = require('./output-json-sync') +// aliases +jsonFile.outputJSON = jsonFile.outputJson +jsonFile.outputJSONSync = jsonFile.outputJsonSync +jsonFile.writeJSON = jsonFile.writeJson +jsonFile.writeJSONSync = jsonFile.writeJsonSync +jsonFile.readJSON = jsonFile.readJson +jsonFile.readJSONSync = jsonFile.readJsonSync + +module.exports = jsonFile diff --git a/node_modules/fs-extra/lib/json/jsonfile.js b/node_modules/fs-extra/lib/json/jsonfile.js new file mode 100644 index 00000000..59cdb3e4 --- /dev/null +++ b/node_modules/fs-extra/lib/json/jsonfile.js @@ -0,0 +1,12 @@ +'use strict' + +const u = require('universalify').fromCallback +const jsonFile = require('jsonfile') + +module.exports = { + // jsonfile exports + readJson: u(jsonFile.readFile), + readJsonSync: jsonFile.readFileSync, + writeJson: u(jsonFile.writeFile), + writeJsonSync: jsonFile.writeFileSync +} diff --git a/node_modules/fs-extra/lib/json/output-json-sync.js b/node_modules/fs-extra/lib/json/output-json-sync.js new file mode 100644 index 00000000..6f76710e --- /dev/null +++ b/node_modules/fs-extra/lib/json/output-json-sync.js @@ -0,0 +1,18 @@ +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const mkdir = require('../mkdirs') +const jsonFile = require('./jsonfile') + +function outputJsonSync (file, data, options) { + const dir = path.dirname(file) + + if (!fs.existsSync(dir)) { + mkdir.mkdirsSync(dir) + } + + jsonFile.writeJsonSync(file, data, options) +} + +module.exports = outputJsonSync diff --git a/node_modules/fs-extra/lib/json/output-json.js b/node_modules/fs-extra/lib/json/output-json.js new file mode 100644 index 00000000..d45edb89 --- /dev/null +++ b/node_modules/fs-extra/lib/json/output-json.js @@ -0,0 +1,27 @@ +'use strict' + +const path = require('path') +const mkdir = require('../mkdirs') +const pathExists = require('../path-exists').pathExists +const jsonFile = require('./jsonfile') + +function outputJson (file, data, options, callback) { + if (typeof options === 'function') { + callback = options + options = {} + } + + const dir = path.dirname(file) + + pathExists(dir, (err, itDoes) => { + if (err) return callback(err) + if (itDoes) return jsonFile.writeJson(file, data, options, callback) + + mkdir.mkdirs(dir, err => { + if (err) return callback(err) + jsonFile.writeJson(file, data, options, callback) + }) + }) +} + +module.exports = outputJson diff --git a/node_modules/fs-extra/lib/mkdirs/index.js b/node_modules/fs-extra/lib/mkdirs/index.js new file mode 100644 index 00000000..d6e7e5bf --- /dev/null +++ b/node_modules/fs-extra/lib/mkdirs/index.js @@ -0,0 +1,14 @@ +'use strict' +const u = require('universalify').fromCallback +const mkdirs = u(require('./mkdirs')) +const mkdirsSync = require('./mkdirs-sync') + +module.exports = { + mkdirs, + mkdirsSync, + // alias + mkdirp: mkdirs, + mkdirpSync: mkdirsSync, + ensureDir: mkdirs, + ensureDirSync: mkdirsSync +} diff --git a/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js b/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js new file mode 100644 index 00000000..a34acb99 --- /dev/null +++ b/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js @@ -0,0 +1,54 @@ +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const invalidWin32Path = require('./win32').invalidWin32Path + +const o777 = parseInt('0777', 8) + +function mkdirsSync (p, opts, made) { + if (!opts || typeof opts !== 'object') { + opts = { mode: opts } + } + + let mode = opts.mode + const xfs = opts.fs || fs + + if (process.platform === 'win32' && invalidWin32Path(p)) { + const errInval = new Error(p + ' contains invalid WIN32 path characters.') + errInval.code = 'EINVAL' + throw errInval + } + + if (mode === undefined) { + mode = o777 & (~process.umask()) + } + if (!made) made = null + + p = path.resolve(p) + + try { + xfs.mkdirSync(p, mode) + made = made || p + } catch (err0) { + if (err0.code === 'ENOENT') { + if (path.dirname(p) === p) throw err0 + made = mkdirsSync(path.dirname(p), opts, made) + mkdirsSync(p, opts, made) + } else { + // In the case of any other error, just see if there's a dir there + // already. If so, then hooray! If not, then something is borked. + let stat + try { + stat = xfs.statSync(p) + } catch (err1) { + throw err0 + } + if (!stat.isDirectory()) throw err0 + } + } + + return made +} + +module.exports = mkdirsSync diff --git a/node_modules/fs-extra/lib/mkdirs/mkdirs.js b/node_modules/fs-extra/lib/mkdirs/mkdirs.js new file mode 100644 index 00000000..18975337 --- /dev/null +++ b/node_modules/fs-extra/lib/mkdirs/mkdirs.js @@ -0,0 +1,63 @@ +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const invalidWin32Path = require('./win32').invalidWin32Path + +const o777 = parseInt('0777', 8) + +function mkdirs (p, opts, callback, made) { + if (typeof opts === 'function') { + callback = opts + opts = {} + } else if (!opts || typeof opts !== 'object') { + opts = { mode: opts } + } + + if (process.platform === 'win32' && invalidWin32Path(p)) { + const errInval = new Error(p + ' contains invalid WIN32 path characters.') + errInval.code = 'EINVAL' + return callback(errInval) + } + + let mode = opts.mode + const xfs = opts.fs || fs + + if (mode === undefined) { + mode = o777 & (~process.umask()) + } + if (!made) made = null + + callback = callback || function () {} + p = path.resolve(p) + + xfs.mkdir(p, mode, er => { + if (!er) { + made = made || p + return callback(null, made) + } + switch (er.code) { + case 'ENOENT': + if (path.dirname(p) === p) return callback(er) + mkdirs(path.dirname(p), opts, (er, made) => { + if (er) callback(er, made) + else mkdirs(p, opts, callback, made) + }) + break + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + xfs.stat(p, (er2, stat) => { + // if the stat fails, then that's super weird. + // let the original error be the failure reason. + if (er2 || !stat.isDirectory()) callback(er, made) + else callback(null, made) + }) + break + } + }) +} + +module.exports = mkdirs diff --git a/node_modules/fs-extra/lib/mkdirs/win32.js b/node_modules/fs-extra/lib/mkdirs/win32.js new file mode 100644 index 00000000..99b3920f --- /dev/null +++ b/node_modules/fs-extra/lib/mkdirs/win32.js @@ -0,0 +1,25 @@ +'use strict' + +const path = require('path') + +// get drive on windows +function getRootPath (p) { + p = path.normalize(path.resolve(p)).split(path.sep) + if (p.length > 0) return p[0] + return null +} + +// http://stackoverflow.com/a/62888/10333 contains more accurate +// TODO: expand to include the rest +const INVALID_PATH_CHARS = /[<>:"|?*]/ + +function invalidWin32Path (p) { + const rp = getRootPath(p) + p = p.replace(rp, '') + return INVALID_PATH_CHARS.test(p) +} + +module.exports = { + getRootPath, + invalidWin32Path +} diff --git a/node_modules/fs-extra/lib/move-sync/index.js b/node_modules/fs-extra/lib/move-sync/index.js new file mode 100644 index 00000000..6d4f56fa --- /dev/null +++ b/node_modules/fs-extra/lib/move-sync/index.js @@ -0,0 +1,117 @@ +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const copySync = require('../copy-sync').copySync +const removeSync = require('../remove').removeSync +const mkdirpSync = require('../mkdirs').mkdirsSync +const buffer = require('../util/buffer') + +function moveSync (src, dest, options) { + options = options || {} + const overwrite = options.overwrite || options.clobber || false + + src = path.resolve(src) + dest = path.resolve(dest) + + if (src === dest) return fs.accessSync(src) + + if (isSrcSubdir(src, dest)) throw new Error(`Cannot move '${src}' into itself '${dest}'.`) + + mkdirpSync(path.dirname(dest)) + tryRenameSync() + + function tryRenameSync () { + if (overwrite) { + try { + return fs.renameSync(src, dest) + } catch (err) { + if (err.code === 'ENOTEMPTY' || err.code === 'EEXIST' || err.code === 'EPERM') { + removeSync(dest) + options.overwrite = false // just overwriteed it, no need to do it again + return moveSync(src, dest, options) + } + + if (err.code !== 'EXDEV') throw err + return moveSyncAcrossDevice(src, dest, overwrite) + } + } else { + try { + fs.linkSync(src, dest) + return fs.unlinkSync(src) + } catch (err) { + if (err.code === 'EXDEV' || err.code === 'EISDIR' || err.code === 'EPERM' || err.code === 'ENOTSUP') { + return moveSyncAcrossDevice(src, dest, overwrite) + } + throw err + } + } + } +} + +function moveSyncAcrossDevice (src, dest, overwrite) { + const stat = fs.statSync(src) + + if (stat.isDirectory()) { + return moveDirSyncAcrossDevice(src, dest, overwrite) + } else { + return moveFileSyncAcrossDevice(src, dest, overwrite) + } +} + +function moveFileSyncAcrossDevice (src, dest, overwrite) { + const BUF_LENGTH = 64 * 1024 + const _buff = buffer(BUF_LENGTH) + + const flags = overwrite ? 'w' : 'wx' + + const fdr = fs.openSync(src, 'r') + const stat = fs.fstatSync(fdr) + const fdw = fs.openSync(dest, flags, stat.mode) + let pos = 0 + + while (pos < stat.size) { + const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos) + fs.writeSync(fdw, _buff, 0, bytesRead) + pos += bytesRead + } + + fs.closeSync(fdr) + fs.closeSync(fdw) + return fs.unlinkSync(src) +} + +function moveDirSyncAcrossDevice (src, dest, overwrite) { + const options = { + overwrite: false + } + + if (overwrite) { + removeSync(dest) + tryCopySync() + } else { + tryCopySync() + } + + function tryCopySync () { + copySync(src, dest, options) + return removeSync(src) + } +} + +// return true if dest is a subdir of src, otherwise false. +// extract dest base dir and check if that is the same as src basename +function isSrcSubdir (src, dest) { + try { + return fs.statSync(src).isDirectory() && + src !== dest && + dest.indexOf(src) > -1 && + dest.split(path.dirname(src) + path.sep)[1].split(path.sep)[0] === path.basename(src) + } catch (e) { + return false + } +} + +module.exports = { + moveSync +} diff --git a/node_modules/fs-extra/lib/move/index.js b/node_modules/fs-extra/lib/move/index.js new file mode 100644 index 00000000..68947f05 --- /dev/null +++ b/node_modules/fs-extra/lib/move/index.js @@ -0,0 +1,82 @@ +'use strict' + +const u = require('universalify').fromCallback +const fs = require('graceful-fs') +const path = require('path') +const copy = require('../copy').copy +const remove = require('../remove').remove +const mkdirp = require('../mkdirs').mkdirp +const pathExists = require('../path-exists').pathExists + +function move (src, dest, opts, cb) { + if (typeof opts === 'function') { + cb = opts + opts = {} + } + + const overwrite = opts.overwrite || opts.clobber || false + + src = path.resolve(src) + dest = path.resolve(dest) + + if (src === dest) return fs.access(src, cb) + + fs.stat(src, (err, st) => { + if (err) return cb(err) + + if (st.isDirectory() && isSrcSubdir(src, dest)) { + return cb(new Error(`Cannot move '${src}' to a subdirectory of itself, '${dest}'.`)) + } + mkdirp(path.dirname(dest), err => { + if (err) return cb(err) + return doRename(src, dest, overwrite, cb) + }) + }) +} + +function doRename (src, dest, overwrite, cb) { + if (overwrite) { + return remove(dest, err => { + if (err) return cb(err) + return rename(src, dest, overwrite, cb) + }) + } + pathExists(dest, (err, destExists) => { + if (err) return cb(err) + if (destExists) return cb(new Error('dest already exists.')) + return rename(src, dest, overwrite, cb) + }) +} + +function rename (src, dest, overwrite, cb) { + fs.rename(src, dest, err => { + if (!err) return cb() + if (err.code !== 'EXDEV') return cb(err) + return moveAcrossDevice(src, dest, overwrite, cb) + }) +} + +function moveAcrossDevice (src, dest, overwrite, cb) { + const opts = { + overwrite, + errorOnExist: true + } + + copy(src, dest, opts, err => { + if (err) return cb(err) + return remove(src, cb) + }) +} + +function isSrcSubdir (src, dest) { + const srcArray = src.split(path.sep) + const destArray = dest.split(path.sep) + + return srcArray.reduce((acc, current, i) => { + return acc && destArray[i] === current + }, true) +} + +module.exports = { + move: u(move) +} diff --git a/node_modules/fs-extra/lib/output/index.js b/node_modules/fs-extra/lib/output/index.js new file mode 100644 index 00000000..92297ca3 --- /dev/null +++ b/node_modules/fs-extra/lib/output/index.js @@ -0,0 +1,40 @@ +'use strict' + +const u = require('universalify').fromCallback +const fs = require('graceful-fs') +const path = require('path') +const mkdir = require('../mkdirs') +const pathExists = require('../path-exists').pathExists + +function outputFile (file, data, encoding, callback) { + if (typeof encoding === 'function') { + callback = encoding + encoding = 'utf8' + } + + const dir = path.dirname(file) + pathExists(dir, (err, itDoes) => { + if (err) return callback(err) + if (itDoes) return fs.writeFile(file, data, encoding, callback) + + mkdir.mkdirs(dir, err => { + if (err) return callback(err) + + fs.writeFile(file, data, encoding, callback) + }) + }) +} + +function outputFileSync (file, ...args) { + const dir = path.dirname(file) + if (fs.existsSync(dir)) { + return fs.writeFileSync(file, ...args) + } + mkdir.mkdirsSync(dir) + fs.writeFileSync(file, ...args) +} + +module.exports = { + outputFile: u(outputFile), + outputFileSync +} diff --git a/node_modules/fs-extra/lib/path-exists/index.js b/node_modules/fs-extra/lib/path-exists/index.js new file mode 100644 index 00000000..ddd9bc71 --- /dev/null +++ b/node_modules/fs-extra/lib/path-exists/index.js @@ -0,0 +1,12 @@ +'use strict' +const u = require('universalify').fromPromise +const fs = require('../fs') + +function pathExists (path) { + return fs.access(path).then(() => true).catch(() => false) +} + +module.exports = { + pathExists: u(pathExists), + pathExistsSync: fs.existsSync +} diff --git a/node_modules/fs-extra/lib/remove/index.js b/node_modules/fs-extra/lib/remove/index.js new file mode 100644 index 00000000..cee53400 --- /dev/null +++ b/node_modules/fs-extra/lib/remove/index.js @@ -0,0 +1,9 @@ +'use strict' + +const u = require('universalify').fromCallback +const rimraf = require('./rimraf') + +module.exports = { + remove: u(rimraf), + removeSync: rimraf.sync +} diff --git a/node_modules/fs-extra/lib/remove/rimraf.js b/node_modules/fs-extra/lib/remove/rimraf.js new file mode 100644 index 00000000..f287e4e1 --- /dev/null +++ b/node_modules/fs-extra/lib/remove/rimraf.js @@ -0,0 +1,314 @@ +'use strict' + +const fs = require('graceful-fs') +const path = require('path') +const assert = require('assert') + +const isWindows = (process.platform === 'win32') + +function defaults (options) { + const methods = [ + 'unlink', + 'chmod', + 'stat', + 'lstat', + 'rmdir', + 'readdir' + ] + methods.forEach(m => { + options[m] = options[m] || fs[m] + m = m + 'Sync' + options[m] = options[m] || fs[m] + }) + + options.maxBusyTries = options.maxBusyTries || 3 +} + +function rimraf (p, options, cb) { + let busyTries = 0 + + if (typeof options === 'function') { + cb = options + options = {} + } + + assert(p, 'rimraf: missing path') + assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string') + assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required') + assert(options, 'rimraf: invalid options argument provided') + assert.strictEqual(typeof options, 'object', 'rimraf: options should be object') + + defaults(options) + + rimraf_(p, options, function CB (er) { + if (er) { + if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') && + busyTries < options.maxBusyTries) { + busyTries++ + const time = busyTries * 100 + // try again, with the same exact callback as this one. + return setTimeout(() => rimraf_(p, options, CB), time) + } + + // already gone + if (er.code === 'ENOENT') er = null + } + + cb(er) + }) +} + +// Two possible strategies. +// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR +// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR +// +// Both result in an extra syscall when you guess wrong. However, there +// are likely far more normal files in the world than directories. This +// is based on the assumption that a the average number of files per +// directory is >= 1. +// +// If anyone ever complains about this, then I guess the strategy could +// be made configurable somehow. But until then, YAGNI. +function rimraf_ (p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + // sunos lets the root user unlink directories, which is... weird. + // so we have to lstat here and make sure it's not a dir. + options.lstat(p, (er, st) => { + if (er && er.code === 'ENOENT') { + return cb(null) + } + + // Windows can EPERM on stat. Life is suffering. + if (er && er.code === 'EPERM' && isWindows) { + return fixWinEPERM(p, options, er, cb) + } + + if (st && st.isDirectory()) { + return rmdir(p, options, er, cb) + } + + options.unlink(p, er => { + if (er) { + if (er.code === 'ENOENT') { + return cb(null) + } + if (er.code === 'EPERM') { + return (isWindows) + ? fixWinEPERM(p, options, er, cb) + : rmdir(p, options, er, cb) + } + if (er.code === 'EISDIR') { + return rmdir(p, options, er, cb) + } + } + return cb(er) + }) + }) +} + +function fixWinEPERM (p, options, er, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + if (er) { + assert(er instanceof Error) + } + + options.chmod(p, 0o666, er2 => { + if (er2) { + cb(er2.code === 'ENOENT' ? null : er) + } else { + options.stat(p, (er3, stats) => { + if (er3) { + cb(er3.code === 'ENOENT' ? null : er) + } else if (stats.isDirectory()) { + rmdir(p, options, er, cb) + } else { + options.unlink(p, cb) + } + }) + } + }) +} + +function fixWinEPERMSync (p, options, er) { + let stats + + assert(p) + assert(options) + if (er) { + assert(er instanceof Error) + } + + try { + options.chmodSync(p, 0o666) + } catch (er2) { + if (er2.code === 'ENOENT') { + return + } else { + throw er + } + } + + try { + stats = options.statSync(p) + } catch (er3) { + if (er3.code === 'ENOENT') { + return + } else { + throw er + } + } + + if (stats.isDirectory()) { + rmdirSync(p, options, er) + } else { + options.unlinkSync(p) + } +} + +function rmdir (p, options, originalEr, cb) { + assert(p) + assert(options) + if (originalEr) { + assert(originalEr instanceof Error) + } + assert(typeof cb === 'function') + + // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) + // if we guessed wrong, and it's not a directory, then + // raise the original error. + options.rmdir(p, er => { + if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) { + rmkids(p, options, cb) + } else if (er && er.code === 'ENOTDIR') { + cb(originalEr) + } else { + cb(er) + } + }) +} + +function rmkids (p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + options.readdir(p, (er, files) => { + if (er) return cb(er) + + let n = files.length + let errState + + if (n === 0) return options.rmdir(p, cb) + + files.forEach(f => { + rimraf(path.join(p, f), options, er => { + if (errState) { + return + } + if (er) return cb(errState = er) + if (--n === 0) { + options.rmdir(p, cb) + } + }) + }) + }) +} + +// this looks simpler, and is strictly *faster*, but will +// tie up the JavaScript thread and fail on excessively +// deep directory trees. +function rimrafSync (p, options) { + let st + + options = options || {} + defaults(options) + + assert(p, 'rimraf: missing path') + assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') + assert.strictEqual(typeof options, 'object', 'rimraf: options should be object') + + try { + st = options.lstatSync(p) + } catch (er) { + if (er.code === 'ENOENT') { + return + } + + // Windows can EPERM on stat. Life is suffering. + if (er.code === 'EPERM' && isWindows) { + fixWinEPERMSync(p, options, er) + } + } + + try { + // sunos lets the root user unlink directories, which is... weird. + if (st && st.isDirectory()) { + rmdirSync(p, options, null) + } else { + options.unlinkSync(p) + } + } catch (er) { + if (er.code === 'ENOENT') { + return + } else if (er.code === 'EPERM') { + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) + } else if (er.code !== 'EISDIR') { + throw er + } + rmdirSync(p, options, er) + } +} + +function rmdirSync (p, options, originalEr) { + assert(p) + assert(options) + if (originalEr) { + assert(originalEr instanceof Error) + } + + try { + options.rmdirSync(p) + } catch (er) { + if (er.code === 'ENOTDIR') { + throw originalEr + } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') { + rmkidsSync(p, options) + } else if (er.code !== 'ENOENT') { + throw er + } + } +} + +function rmkidsSync (p, options) { + assert(p) + assert(options) + options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options)) + + if (isWindows) { + // We only end up here once we got ENOTEMPTY at least once, and + // at this point, we are guaranteed to have removed all the kids. + // So, we know that it won't be ENOENT or ENOTDIR or anything else. + // try really hard to delete stuff on windows, because it has a + // PROFOUNDLY annoying habit of not closing handles promptly when + // files are deleted, resulting in spurious ENOTEMPTY errors. + const startTime = Date.now() + do { + try { + const ret = options.rmdirSync(p, options) + return ret + } catch (er) { } + } while (Date.now() - startTime < 500) // give up after 500ms + } else { + const ret = options.rmdirSync(p, options) + return ret + } +} + +module.exports = rimraf +rimraf.sync = rimrafSync diff --git a/node_modules/fs-extra/lib/util/buffer.js b/node_modules/fs-extra/lib/util/buffer.js new file mode 100644 index 00000000..dabf2885 --- /dev/null +++ b/node_modules/fs-extra/lib/util/buffer.js @@ -0,0 +1,12 @@ +'use strict' +/* eslint-disable node/no-deprecated-api */ +module.exports = function (size) { + if (typeof Buffer.allocUnsafe === 'function') { + try { + return Buffer.allocUnsafe(size) + } catch (e) { + return new Buffer(size) + } + } + return new Buffer(size) +} diff --git a/node_modules/fs-extra/lib/util/utimes.js b/node_modules/fs-extra/lib/util/utimes.js new file mode 100644 index 00000000..8916a1b8 --- /dev/null +++ b/node_modules/fs-extra/lib/util/utimes.js @@ -0,0 +1,79 @@ +'use strict' + +const fs = require('graceful-fs') +const os = require('os') +const path = require('path') + +// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not +function hasMillisResSync () { + let tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2)) + tmpfile = path.join(os.tmpdir(), tmpfile) + + // 550 millis past UNIX epoch + const d = new Date(1435410243862) + fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141') + const fd = fs.openSync(tmpfile, 'r+') + fs.futimesSync(fd, d, d) + fs.closeSync(fd) + return fs.statSync(tmpfile).mtime > 1435410243000 +} + +function hasMillisRes (callback) { + let tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2)) + tmpfile = path.join(os.tmpdir(), tmpfile) + + // 550 millis past UNIX epoch + const d = new Date(1435410243862) + fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', err => { + if (err) return callback(err) + fs.open(tmpfile, 'r+', (err, fd) => { + if (err) return callback(err) + fs.futimes(fd, d, d, err => { + if (err) return callback(err) + fs.close(fd, err => { + if (err) return callback(err) + fs.stat(tmpfile, (err, stats) => { + if (err) return callback(err) + callback(null, stats.mtime > 1435410243000) + }) + }) + }) + }) + }) +} + +function timeRemoveMillis (timestamp) { + if (typeof timestamp === 'number') { + return Math.floor(timestamp / 1000) * 1000 + } else if (timestamp instanceof Date) { + return new Date(Math.floor(timestamp.getTime() / 1000) * 1000) + } else { + throw new Error('fs-extra: timeRemoveMillis() unknown parameter type') + } +} + +function utimesMillis (path, atime, mtime, callback) { + // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback) + fs.open(path, 'r+', (err, fd) => { + if (err) return callback(err) + fs.futimes(fd, atime, mtime, futimesErr => { + fs.close(fd, closeErr => { + if (callback) callback(futimesErr || closeErr) + }) + }) + }) +} + +function utimesMillisSync (path, atime, mtime) { + const fd = fs.openSync(path, 'r+') + fs.futimesSync(fd, atime, mtime) + return fs.closeSync(fd) +} + +module.exports = { + hasMillisRes, + hasMillisResSync, + timeRemoveMillis, + utimesMillis, + utimesMillisSync +} diff --git a/node_modules/fs-extra/package.json b/node_modules/fs-extra/package.json new file mode 100644 index 00000000..9d992b88 --- /dev/null +++ b/node_modules/fs-extra/package.json @@ -0,0 +1,68 @@ +{ + "name": "fs-extra", + "version": "7.0.1", + "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.", + "engines": { + "node": ">=6 <7 || >=8" + }, + "homepage": "https://github.com/jprichardson/node-fs-extra", + "repository": { + "type": "git", + "url": "https://github.com/jprichardson/node-fs-extra" + }, + "keywords": [ + "fs", + "file", + "file system", + "copy", + "directory", + "extra", + "mkdirp", + "mkdir", + "mkdirs", + "recursive", + "json", + "read", + "write", + "extra", + "delete", + "remove", + "touch", + "create", + "text", + "output", + "move" + ], + "author": "JP Richardson ", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "devDependencies": { + "coveralls": "^3.0.0", + "istanbul": "^0.4.5", + "klaw": "^2.1.1", + "klaw-sync": "^3.0.2", + "minimist": "^1.1.1", + "mocha": "^5.0.5", + "proxyquire": "^2.0.1", + "read-dir-files": "^0.1.1", + "rimraf": "^2.2.8", + "secure-random": "^1.1.1", + "semver": "^5.3.0", + "standard": "^11.0.1", + "standard-markdown": "^4.0.1" + }, + "main": "./lib/index.js", + "scripts": { + "full-ci": "npm run lint && npm run coverage", + "coverage": "istanbul cover -i 'lib/**' -x '**/__tests__/**' test.js", + "coveralls": "coveralls < coverage/lcov.info", + "lint": "standard", + "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha", + "test": "npm run lint && npm run unit", + "unit": "node test.js" + } +} diff --git a/node_modules/gauge/node_modules/strip-ansi/index.js b/node_modules/gauge/node_modules/strip-ansi/index.js new file mode 100644 index 00000000..099480fb --- /dev/null +++ b/node_modules/gauge/node_modules/strip-ansi/index.js @@ -0,0 +1,6 @@ +'use strict'; +var ansiRegex = require('ansi-regex')(); + +module.exports = function (str) { + return typeof str === 'string' ? str.replace(ansiRegex, '') : str; +}; diff --git a/node_modules/gauge/node_modules/strip-ansi/license b/node_modules/gauge/node_modules/strip-ansi/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/gauge/node_modules/strip-ansi/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/gauge/node_modules/strip-ansi/package.json b/node_modules/gauge/node_modules/strip-ansi/package.json new file mode 100644 index 00000000..301685ba --- /dev/null +++ b/node_modules/gauge/node_modules/strip-ansi/package.json @@ -0,0 +1,57 @@ +{ + "name": "strip-ansi", + "version": "3.0.1", + "description": "Strip ANSI escape codes", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Boy Nicolai Appelman (jbna.nl)", + "JD Ballard (github.com/qix-)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/gauge/node_modules/strip-ansi/readme.md b/node_modules/gauge/node_modules/strip-ansi/readme.md new file mode 100644 index 00000000..cb7d9ff7 --- /dev/null +++ b/node_modules/gauge/node_modules/strip-ansi/readme.md @@ -0,0 +1,33 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save strip-ansi +``` + + +## Usage + +```js +var stripAnsi = require('strip-ansi'); + +stripAnsi('\u001b[4mcake\u001b[0m'); +//=> 'cake' +``` + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/get-caller-file/LICENSE.md b/node_modules/get-caller-file/LICENSE.md new file mode 100644 index 00000000..bf3e1c07 --- /dev/null +++ b/node_modules/get-caller-file/LICENSE.md @@ -0,0 +1,6 @@ +ISC License (ISC) +Copyright 2018 Stefan Penner + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/get-caller-file/README.md b/node_modules/get-caller-file/README.md new file mode 100644 index 00000000..a7d8c079 --- /dev/null +++ b/node_modules/get-caller-file/README.md @@ -0,0 +1,41 @@ +# get-caller-file + +[![Build Status](https://travis-ci.org/stefanpenner/get-caller-file.svg?branch=master)](https://travis-ci.org/stefanpenner/get-caller-file) +[![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master) + +This is a utility, which allows a function to figure out from which file it was invoked. It does so by inspecting v8's stack trace at the time it is invoked. + +Inspired by http://stackoverflow.com/questions/13227489 + +*note: this relies on Node/V8 specific APIs, as such other runtimes may not work* + +## Installation + +```bash +yarn add get-caller-file +``` + +## Usage + +Given: + +```js +// ./foo.js +const getCallerFile = require('get-caller-file'); + +module.exports = function() { + return getCallerFile(); // figures out who called it +}; +``` + +```js +// index.js +const foo = require('./foo'); + +foo() // => /full/path/to/this/file/index.js +``` + + +## Options: + +* `getCallerFile(position = 2)`: where position is stack frame whos fileName we want. diff --git a/node_modules/get-caller-file/index.d.ts b/node_modules/get-caller-file/index.d.ts new file mode 100644 index 00000000..babed696 --- /dev/null +++ b/node_modules/get-caller-file/index.d.ts @@ -0,0 +1,2 @@ +declare const _default: (position?: number) => any; +export = _default; diff --git a/node_modules/get-caller-file/index.js b/node_modules/get-caller-file/index.js new file mode 100644 index 00000000..57304f80 --- /dev/null +++ b/node_modules/get-caller-file/index.js @@ -0,0 +1,22 @@ +"use strict"; +// Call this function in a another function to find out the file from +// which that function was called from. (Inspects the v8 stack trace) +// +// Inspired by http://stackoverflow.com/questions/13227489 +module.exports = function getCallerFile(position) { + if (position === void 0) { position = 2; } + if (position >= Error.stackTraceLimit) { + throw new TypeError('getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `' + position + '` and Error.stackTraceLimit was: `' + Error.stackTraceLimit + '`'); + } + var oldPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function (_, stack) { return stack; }; + var stack = new Error().stack; + Error.prepareStackTrace = oldPrepareStackTrace; + if (stack !== null && typeof stack === 'object') { + // stack[0] holds this file + // stack[1] holds where this function was called + // stack[2] holds the file we're interested in + return stack[position] ? stack[position].getFileName() : undefined; + } +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/get-caller-file/index.js.map b/node_modules/get-caller-file/index.js.map new file mode 100644 index 00000000..89c655c0 --- /dev/null +++ b/node_modules/get-caller-file/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,qEAAqE;AACrE,EAAE;AACF,0DAA0D;AAE1D,iBAAS,SAAS,aAAa,CAAC,QAAY;IAAZ,yBAAA,EAAA,YAAY;IAC1C,IAAI,QAAQ,IAAI,KAAK,CAAC,eAAe,EAAE;QACrC,MAAM,IAAI,SAAS,CAAC,kGAAkG,GAAG,QAAQ,GAAG,oCAAoC,GAAG,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,CAAC;KACzM;IAED,IAAM,oBAAoB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACrD,KAAK,CAAC,iBAAiB,GAAG,UAAC,CAAC,EAAE,KAAK,IAAM,OAAA,KAAK,EAAL,CAAK,CAAC;IAC/C,IAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAK,CAAC;IAChC,KAAK,CAAC,iBAAiB,GAAG,oBAAoB,CAAC;IAG/C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC/C,2BAA2B;QAC3B,gDAAgD;QAChD,8CAA8C;QAC9C,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAE,KAAK,CAAC,QAAQ,CAAS,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KAC7E;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/get-caller-file/package.json b/node_modules/get-caller-file/package.json new file mode 100644 index 00000000..b0dd5713 --- /dev/null +++ b/node_modules/get-caller-file/package.json @@ -0,0 +1,42 @@ +{ + "name": "get-caller-file", + "version": "2.0.5", + "description": "", + "main": "index.js", + "directories": { + "test": "tests" + }, + "files": [ + "index.js", + "index.js.map", + "index.d.ts" + ], + "scripts": { + "prepare": "tsc", + "test": "mocha test", + "test:debug": "mocha test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/stefanpenner/get-caller-file.git" + }, + "author": "Stefan Penner", + "license": "ISC", + "bugs": { + "url": "https://github.com/stefanpenner/get-caller-file/issues" + }, + "homepage": "https://github.com/stefanpenner/get-caller-file#readme", + "devDependencies": { + "@types/chai": "^4.1.7", + "@types/ensure-posix-path": "^1.0.0", + "@types/mocha": "^5.2.6", + "@types/node": "^11.10.5", + "chai": "^4.1.2", + "ensure-posix-path": "^1.0.1", + "mocha": "^5.2.0", + "typescript": "^3.3.3333" + }, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } +} diff --git a/node_modules/inflection/.npmignore b/node_modules/inflection/.npmignore new file mode 100644 index 00000000..f1250e58 --- /dev/null +++ b/node_modules/inflection/.npmignore @@ -0,0 +1,4 @@ +support +test +examples +*.sock diff --git a/node_modules/inflection/History.md b/node_modules/inflection/History.md new file mode 100644 index 00000000..7786ddd1 --- /dev/null +++ b/node_modules/inflection/History.md @@ -0,0 +1,232 @@ +# History + +## 1.12.0 / 2017-01-27 +- [update packages] mocha->3.2.0, should->11.2.0 +- [bug fix] `minus` plural & singular form +- [bug fix] `save` plural & singular form + + + +## 1.11.0 / 2016-04-20 +- [update packages] mocha->3.0.2, should->11.1.0 +- [bug fix] `inflection.transform` in ES6 + + + +## 1.10.0 / 2016-04-20 +- [update packages] should->8.3.1 +- [bug fix] `campus` plural & singular form + + + +## 1.9.0 / 2016-04-06 +- [update packages] mocha->2.4.5, should->8.3.0 +- [bug fix] `genus` plural & singular form + + + +## 1.8.0 / 2015-11-22 +- [update packages] mocha->2.3.4, should->7.1.1 +- [bug fix] `criterion` plural & singular form + + + +## 1.7.2 / 2015-10-11 +- [update packages] mocha->2.3.3, should->7.1.0 + + + +## 1.7.1 / 2015-03-25 +- [bug fix] `woman` plural & singular form + + + +## 1.7.0 / 2015-03-25 +- [bug fix] `canvas` plural & singular form +- [update packages] mocha->2.2.1, should->5.2.0 + + + +## 1.6.0 / 2014-12-06 + +- [bug fix] Special rules for index, vertex, and matrix masked by general rule x +- [update packages] mocha->2.1.0, should->4.6.5 + + + +## 1.5.3 / 2014-12-06 + +- [bug fix] Remove invalid uncountable words + + + +## 1.5.2 / 2014-11-14 + +- [bug fix] `business` & `access` plural form + + + +## 1.5.1 / 2014-09-23 + +- [bug fix] Fix `whereas` plural & singular form + + + +## 1.5.0 / 2014-09-23 + +- [refactor] Add more rules and uncountable nouns + + + +## 1.4.2 / 2014-09-05 + +- [bug fix] Fix wrong implementation of `goose`, `tooth` & `foot` + + + +## 1.4.1 / 2014-08-31 + +- [bug fix] Fix `goose`, `tooth` & `foot` plural & singular form + + + +## 1.4.0 / 2014-08-23 + +- [new feature] Adds support for an `inflect` method that will choose to pluralize or singularize a noun based on an integer value + + + +## 1.3.8 / 2014-07-03 + +- [others] Syntax tuning + + + +## 1.3.7 / 2014-06-25 + +- [refactor] Adopt UMD import to work in a variety of different situations +- [update packages] should->4.0.4 + + + +## 1.3.6 / 2014-06-07 + +- [bug fix] Rearrange rules. `movies`->`movy` + + + +## 1.3.5 / 2014-02-12 + +- Unable to publsih v1.3.4 therefore jump to v1.3.5 + + + +## 1.3.4 / 2014-02-12 + +- [update packages] should->3.1.2 +- [refactor] Use `mocha` instead of hard coding tests + + + +## 1.3.3 / 2014-01-22 + +- [update packages] should->3.0.1 +- Added brower.json + + + +## 1.3.2 / 2013-12-12 + +- [update packages] node.flow->1.2.3 + + + +## 1.3.1 / 2013-12-12 + +- [refactor] Support `Requirejs` + + + +## 1.3.0 / 2013-12-11 + +- [refactor] Move `var` out of loops +- [refactor] Change the way `camelize` acts to mimic 100% `Rails ActiveSupport Inflector camelize` + + + +## 1.2.7 / 2013-12-11 + +- [new feature] Added transform, thnaks to `luk3thomas` +- [update packages] should->v2.1.1 + + + +## 1.2.6 / 2013-05-24 + +- [bug fix] Use instance instead of `this` + + + +## 1.2.5 / 2013-01-09 + +- [refactor] Allow all caps strings to be returned from underscore + + + +## 1.2.4 / 2013-01-06 + +- [bug fix] window obj does not have `call` method + + + +## 1.2.3 / 2012-08-02 + +- [bug fix] Singularize `status` produces `statu` +- [update packages] should->v1.1.0 + + + +## 1.2.2 / 2012-07-23 + +- [update packages] node.flow->v1.1.3 & should->v1.0.0 + + + +## 1.2.1 / 2012-06-22 + +- [bug fix] Singularize `address` produces `addres` + + + +## 1.2.0 / 2012-04-10 + +- [new feature] Browser support +- [update packages] node.flow->v1.1.1 + + + +## 1.1.1 / 2012-02-13 + +- [update packages] node.flow->v1.1.0 + + + +## 1.1.0 / 2012-02-13 + +- [update packages] node.flow->v1.0.0 +- [refactor] Read version number from package.json + + + +## 1.0.0 / 2012-02-08 + +- Remove make file +- Add pluralize rules +- Add pluralize tests +- [refactor] Use object.jey instead of for in + + + +## 0.0.1 / 2012-01-16 + +- Initial release diff --git a/node_modules/inflection/Readme.md b/node_modules/inflection/Readme.md new file mode 100644 index 00000000..3d1560ca --- /dev/null +++ b/node_modules/inflection/Readme.md @@ -0,0 +1,504 @@ +# inflection + +A port of inflection-js to node.js module + + + +## Description +[inflection-js](http://code.google.com/p/inflection-js/) is a port of the functionality from Ruby on Rails' Active Support Inflection classes into Javascript. `inflection` is a port of `inflection-js` to node.js npm package. Instead of [extending JavaScript native](http://wonko.com/post/extending-javascript-natives) String object like `inflection-js` does, `inflection` separate the methods to a independent package to avoid unexpected behaviors. + +Note: This library uses [Wiktionary](http://en.wiktionary.org) as its reference. + + + +## Requires + +Checkout `package.json` for dependencies. + + + +## Angular Support + +Checkout [ngInflection](https://github.com/konsumer/ngInflection) from [konsumer](https://github.com/konsumer) + + + +## Meteor Support + +Checkout [Meteor Inflector](https://github.com/katrotz/meteor-inflector) from [Veaceslav Cotruta](https://github.com/katrotz) + + + +## Installation + +Install inflection through npm + + npm install inflection + + + +## API + +- inflection.indexOf( arr, item, from_index, compare_func ); +- inflection.pluralize( str, plural ); +- inflection.singularize( str, singular ); +- inflection.inflect( str, count, singular, plural ); +- inflection.camelize( str, low_first_letter ); +- inflection.underscore( str, all_upper_case ); +- inflection.humanize( str, low_first_letter ); +- inflection.capitalize( str ); +- inflection.dasherize( str ); +- inflection.titleize( str ); +- inflection.demodulize( str ); +- inflection.tableize( str ); +- inflection.classify( str ); +- inflection.foreign_key( str, drop_id_ubar ); +- inflection.ordinalize( str ); +- inflection.transform( str, arr ); + + + +## Usage + +> Require the module before using + + var inflection = require( 'inflection' ); + + + +### inflection.indexOf( arr, item, from_index, compare_func ); + +This lets us detect if an Array contains a given element. + +#### Arguments + +> arr + + type: Array + desc: The subject array. + +> item + + type: Object + desc: Object to locate in the Array. + +> from_index + + type: Number + desc: Starts checking from this position in the Array.(optional) + +> compare_func + + type: Function + desc: Function used to compare Array item vs passed item.(optional) + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.indexOf([ 'hi','there' ], 'guys' ); // === -1 + inflection.indexOf([ 'hi','there' ], 'hi' ); // === 0 + + + +### inflection.pluralize( str, plural ); + +This function adds pluralization support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> plural + + type: String + desc: Overrides normal output with said String.(optional) + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.pluralize( 'person' ); // === 'people' + inflection.pluralize( 'octopus' ); // === "octopi" + inflection.pluralize( 'Hat' ); // === 'Hats' + inflection.pluralize( 'person', 'guys' ); // === 'guys' + + + +### inflection.singularize( str, singular ); + +This function adds singularization support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> singular + + type: String + desc: Overrides normal output with said String.(optional) + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.singularize( 'people' ); // === 'person' + inflection.singularize( 'octopi' ); // === "octopus" + inflection.singularize( 'Hats' ); // === 'Hat' + inflection.singularize( 'guys', 'person' ); // === 'person' + + + +### inflection.inflect( str, count, singular, plural ); + +This function will pluralize or singularlize a String appropriately based on an integer value. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> count + type: Number + desc: The number to base pluralization off of. + +> singular + + type: String + desc: Overrides normal output with said String.(optional) + +> plural + + type: String + desc: Overrides normal output with said String.(optional) + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.inflect( 'people' 1 ); // === 'person' + inflection.inflect( 'octopi' 1 ); // === 'octopus' + inflection.inflect( 'Hats' 1 ); // === 'Hat' + inflection.inflect( 'guys', 1 , 'person' ); // === 'person' + inflection.inflect( 'person', 2 ); // === 'people' + inflection.inflect( 'octopus', 2 ); // === 'octopi' + inflection.inflect( 'Hat', 2 ); // === 'Hats' + inflection.inflect( 'person', 2, null, 'guys' ); // === 'guys' + + + +### inflection.camelize( str, low_first_letter ); + +This function transforms String object from underscore to camelcase. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> low_first_letter + + type: Boolean + desc: Default is to capitalize the first letter of the results. Passing true will lowercase it. (optional) + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.camelize( 'message_properties' ); // === 'MessageProperties' + inflection.camelize( 'message_properties', true ); // === 'messageProperties' + + + +### inflection.underscore( str, all_upper_case ); + +This function transforms String object from camelcase to underscore. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> all_upper_case + + type: Boolean + desc: Default is to lowercase and add underscore prefix + + + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.underscore( 'MessageProperties' ); // === 'message_properties' + inflection.underscore( 'messageProperties' ); // === 'message_properties' + inflection.underscore( 'MP' ); // === 'm_p' + inflection.underscore( 'MP', true ); // === 'MP' + + + +### inflection.humanize( str, low_first_letter ); + +This function adds humanize support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> low_first_letter + + type: Boolean + desc: Default is to capitalize the first letter of the results. Passing true will lowercase it. (optional) + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.humanize( 'message_properties' ); // === 'Message properties' + inflection.humanize( 'message_properties', true ); // === 'message properties' + + + +### inflection.capitalize( str ); + +This function adds capitalization support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.capitalize( 'message_properties' ); // === 'Message_properties' + inflection.capitalize( 'message properties', true ); // === 'Message properties' + + + +### inflection.dasherize( str ); + +This function replaces underscores with dashes in the string. + +#### Arguments + +> str + + type: String + desc: The subject string. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.dasherize( 'message_properties' ); // === 'message-properties' + inflection.dasherize( 'Message Properties' ); // === 'Message-Properties' + + + +### inflection.titleize( str ); + +This function adds titleize support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.titleize( 'message_properties' ); // === 'Message Properties' + inflection.titleize( 'message properties to keep' ); // === 'Message Properties to Keep' + + + +### inflection.demodulize( str ); + +This function adds demodulize support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.demodulize( 'Message::Bus::Properties' ); // === 'Properties' + + + +### inflection.tableize( str ); + +This function adds tableize support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.tableize( 'MessageBusProperty' ); // === 'message_bus_properties' + + + +### inflection.classify( str ); + +This function adds classification support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.classify( 'message_bus_properties' ); // === 'MessageBusProperty' + + + +### inflection.foreign_key( str, drop_id_ubar ); + +This function adds foreign key support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> low_first_letter + + type: Boolean + desc: Default is to seperate id with an underbar at the end of the class name, you can pass true to skip it.(optional) + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.foreign_key( 'MessageBusProperty' ); // === 'message_bus_property_id' + inflection.foreign_key( 'MessageBusProperty', true ); // === 'message_bus_propertyid' + + + +### inflection.ordinalize( str ); + +This function adds ordinalize support to every String object. + +#### Arguments + +> str + + type: String + desc: The subject string. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.ordinalize( 'the 1 pitch' ); // === 'the 1st pitch' + + + +### inflection.transform( str, arr ); + +This function performs multiple inflection methods on a string. + +#### Arguments + +> str + + type: String + desc: The subject string. + +> arr + + type: Array + desc: An array of inflection methods. + +#### Example code + + var inflection = require( 'inflection' ); + + inflection.transform( 'all job', [ 'pluralize', 'capitalize', 'dasherize' ]); // === 'All-jobs' + + + +## Credit + +- Ryan Schuft +- Lance Pollard (Browser support) +- Dane O'Connor +- brandondewitt +- luk3thomas +- Marcel Klehr +- Raymond Feng +- Kane Cohen +- Gianni Chiappetta +- Eric Brody +- overlookmotel +- Patrick Mowrer +- Greger Olsson +- Jason Crawford +- Ray Myers + + +## License + +(The MIT License) + +Copyright (c) 2011 dreamerslab <ben@dreamerslab.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/inflection/bower.json b/node_modules/inflection/bower.json new file mode 100644 index 00000000..d58b6caa --- /dev/null +++ b/node_modules/inflection/bower.json @@ -0,0 +1,58 @@ +{ + "name": "inflection", + "version": "1.12.0", + "homepage": "https://github.com/dreamerslab/node.inflection", + "description": "JavaScript Inflection Support", + "authors": [ + "ben " + ], + "contributors": [ + { "name": "Ryan Schuft", "email": "ryan.schuft@gmail.com" }, + { "name": "Ben Lin", "email": "ben@dreamerslab.com" }, + { "name": "Lance Pollard", "email": "lancejpollard@gmail.com" }, + { "name": "Dane O'Connor", "email": "dane.oconnor@gmail.com" }, + { "name": "David Miró", "email": "lite.3engine@gmail.com" }, + { "name": "brandondewitt" }, + { "name": "luk3thomas" }, + { "name": "Marcel Klehr" }, + { "name": "Raymond Feng" }, + { "name": "Kane Cohen", "email": "kanecohen@gmail.com" }, + { "name": "Gianni Chiappetta", "email": "gianni@runlevel6.org" }, + { "name": "Eric Brody" }, + { "name": "overlookmotel" }, + { "name": "Patrick Mowrer" }, + { "name": "Greger Olsson" }, + { "name": "Jason Crawford", "email": "jason@jasoncrawford.org" }, + { "name": "Ray Myers", "email": "ray.myers@gmail.com" }, + { "name": "Dillon Shook", "email": "dshook@alumni.nmt.edu" } + + ], + "main": "lib/inflection.js", + "keywords": [ + "inflection", + "inflections", + "inflection-js", + "pluralize", + "singularize", + "inflect", + "camelize", + "underscore", + "humanize", + "capitalize", + "dasherize", + "titleize", + "demodulize", + "tableize", + "classify", + "foreign_key", + "ordinalize" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/node_modules/inflection/component.json b/node_modules/inflection/component.json new file mode 100644 index 00000000..c99265b1 --- /dev/null +++ b/node_modules/inflection/component.json @@ -0,0 +1,36 @@ +{ + "name": "inflection", + "version": "1.12.0", + "repo": "dreamerslab/node.inflection", + "description": "A port of inflection-js to node.js module", + "keywords" : [ + "inflection", "inflections", "inflection-js", "pluralize" , "singularize", + "camelize", "underscore", "humanize", "capitalize", "dasherize", "titleize", + "demodulize", "tableize", "classify", "foreign_key", "ordinalize" + ], + "author": "dreamerslab ", + "contributors": [ + { "name": "Ryan Schuft", "email": "ryan.schuft@gmail.com" }, + { "name": "Ben Lin", "email": "ben@dreamerslab.com" }, + { "name": "Lance Pollard", "email": "lancejpollard@gmail.com" }, + { "name": "Dane O'Connor", "email": "dane.oconnor@gmail.com" }, + { "name": "David Miró", "email": "lite.3engine@gmail.com" }, + { "name": "brandondewitt" }, + { "name": "luk3thomas" }, + { "name": "Marcel Klehr" }, + { "name": "Raymond Feng" }, + { "name": "Kane Cohen", "email": "kanecohen@gmail.com" }, + { "name": "Gianni Chiappetta", "email": "gianni@runlevel6.org" }, + { "name": "Eric Brody" }, + { "name": "overlookmotel" }, + { "name": "Patrick Mowrer" }, + { "name": "Greger Olsson" }, + { "name": "Jason Crawford", "email": "jason@jasoncrawford.org" }, + { "name": "Ray Myers", "email": "ray.myers@gmail.com" }, + { "name": "Dillon Shook", "email": "dshook@alumni.nmt.edu" } + ], + "dependencies": {}, + "license": "MIT", + "main": "./lib/inflection.js", + "scripts": ["./lib/inflection.js"] +} diff --git a/node_modules/inflection/inflection.min.js b/node_modules/inflection/inflection.min.js new file mode 100644 index 00000000..42f6c3f5 --- /dev/null +++ b/node_modules/inflection/inflection.min.js @@ -0,0 +1,31 @@ +/*! + * inflection + * Copyright(c) 2011 Ben Lin + * MIT Licensed + * + * @fileoverview + * A port of inflection-js to node.js module. + */ +(function(a,b){if(typeof define==="function"&&define.amd){define([],b); +}else{if(typeof exports==="object"){module.exports=b();}else{a.inflection=b();}}}(this,function(){var d=["accommodation","adulthood","advertising","advice","aggression","aid","air","aircraft","alcohol","anger","applause","arithmetic","assistance","athletics","bacon","baggage","beef","biology","blood","botany","bread","butter","carbon","cardboard","cash","chalk","chaos","chess","crossroads","countryside","dancing","deer","dignity","dirt","dust","economics","education","electricity","engineering","enjoyment","envy","equipment","ethics","evidence","evolution","fame","fiction","flour","flu","food","fuel","fun","furniture","gallows","garbage","garlic","genetics","gold","golf","gossip","grammar","gratitude","grief","guilt","gymnastics","happiness","hardware","harm","hate","hatred","health","heat","help","homework","honesty","honey","hospitality","housework","humour","hunger","hydrogen","ice","importance","inflation","information","innocence","iron","irony","jam","jewelry","judo","karate","knowledge","lack","laughter","lava","leather","leisure","lightning","linguine","linguini","linguistics","literature","litter","livestock","logic","loneliness","luck","luggage","macaroni","machinery","magic","management","mankind","marble","mathematics","mayonnaise","measles","methane","milk","minus","money","mud","music","mumps","nature","news","nitrogen","nonsense","nurture","nutrition","obedience","obesity","oxygen","pasta","patience","physics","poetry","pollution","poverty","pride","psychology","publicity","punctuation","quartz","racism","relaxation","reliability","research","respect","revenge","rice","rubbish","rum","safety","scenery","seafood","seaside","series","shame","sheep","shopping","sleep","smoke","smoking","snow","soap","software","soil","spaghetti","species","steam","stuff","stupidity","sunshine","symmetry","tennis","thirst","thunder","timber","traffic","transportation","trust","underwear","unemployment","unity","validity","veal","vegetation","vegetarianism","vengeance","violence","vitality","warmth","wealth","weather","welfare","wheat","wildlife","wisdom","yoga","zinc","zoology"]; +var i={plural:{men:new RegExp("^(m|wom)en$","gi"),people:new RegExp("(pe)ople$","gi"),children:new RegExp("(child)ren$","gi"),tia:new RegExp("([ti])a$","gi"),analyses:new RegExp("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$","gi"),hives:new RegExp("(hi|ti)ves$","gi"),curves:new RegExp("(curve)s$","gi"),lrves:new RegExp("([lr])ves$","gi"),aves:new RegExp("([a])ves$","gi"),foves:new RegExp("([^fo])ves$","gi"),movies:new RegExp("(m)ovies$","gi"),aeiouyies:new RegExp("([^aeiouy]|qu)ies$","gi"),series:new RegExp("(s)eries$","gi"),xes:new RegExp("(x|ch|ss|sh)es$","gi"),mice:new RegExp("([m|l])ice$","gi"),buses:new RegExp("(bus)es$","gi"),oes:new RegExp("(o)es$","gi"),shoes:new RegExp("(shoe)s$","gi"),crises:new RegExp("(cris|ax|test)es$","gi"),octopi:new RegExp("(octop|vir)i$","gi"),aliases:new RegExp("(alias|canvas|status|campus)es$","gi"),summonses:new RegExp("^(summons)es$","gi"),oxen:new RegExp("^(ox)en","gi"),matrices:new RegExp("(matr)ices$","gi"),vertices:new RegExp("(vert|ind)ices$","gi"),feet:new RegExp("^feet$","gi"),teeth:new RegExp("^teeth$","gi"),geese:new RegExp("^geese$","gi"),quizzes:new RegExp("(quiz)zes$","gi"),whereases:new RegExp("^(whereas)es$","gi"),criteria:new RegExp("^(criteri)a$","gi"),genera:new RegExp("^genera$","gi"),ss:new RegExp("ss$","gi"),s:new RegExp("s$","gi")},singular:{man:new RegExp("^(m|wom)an$","gi"),person:new RegExp("(pe)rson$","gi"),child:new RegExp("(child)$","gi"),ox:new RegExp("^(ox)$","gi"),axis:new RegExp("(ax|test)is$","gi"),octopus:new RegExp("(octop|vir)us$","gi"),alias:new RegExp("(alias|status|canvas|campus)$","gi"),summons:new RegExp("^(summons)$","gi"),bus:new RegExp("(bu)s$","gi"),buffalo:new RegExp("(buffal|tomat|potat)o$","gi"),tium:new RegExp("([ti])um$","gi"),sis:new RegExp("sis$","gi"),ffe:new RegExp("(?:([^f])fe|([lr])f)$","gi"),hive:new RegExp("(hi|ti)ve$","gi"),aeiouyy:new RegExp("([^aeiouy]|qu)y$","gi"),x:new RegExp("(x|ch|ss|sh)$","gi"),matrix:new RegExp("(matr)ix$","gi"),vertex:new RegExp("(vert|ind)ex$","gi"),mouse:new RegExp("([m|l])ouse$","gi"),foot:new RegExp("^foot$","gi"),tooth:new RegExp("^tooth$","gi"),goose:new RegExp("^goose$","gi"),quiz:new RegExp("(quiz)$","gi"),whereas:new RegExp("^(whereas)$","gi"),criterion:new RegExp("^(criteri)on$","gi"),genus:new RegExp("^genus$","gi"),s:new RegExp("s$","gi"),common:new RegExp("$","gi")}}; +var g=[[i.plural.men],[i.plural.people],[i.plural.children],[i.plural.tia],[i.plural.analyses],[i.plural.hives],[i.plural.curves],[i.plural.lrves],[i.plural.foves],[i.plural.aeiouyies],[i.plural.series],[i.plural.movies],[i.plural.xes],[i.plural.mice],[i.plural.buses],[i.plural.oes],[i.plural.shoes],[i.plural.crises],[i.plural.octopi],[i.plural.aliases],[i.plural.summonses],[i.plural.oxen],[i.plural.matrices],[i.plural.feet],[i.plural.teeth],[i.plural.geese],[i.plural.quizzes],[i.plural.whereases],[i.plural.criteria],[i.plural.genera],[i.singular.man,"$1en"],[i.singular.person,"$1ople"],[i.singular.child,"$1ren"],[i.singular.ox,"$1en"],[i.singular.axis,"$1es"],[i.singular.octopus,"$1i"],[i.singular.alias,"$1es"],[i.singular.summons,"$1es"],[i.singular.bus,"$1ses"],[i.singular.buffalo,"$1oes"],[i.singular.tium,"$1a"],[i.singular.sis,"ses"],[i.singular.ffe,"$1$2ves"],[i.singular.hive,"$1ves"],[i.singular.aeiouyy,"$1ies"],[i.singular.matrix,"$1ices"],[i.singular.vertex,"$1ices"],[i.singular.x,"$1es"],[i.singular.mouse,"$1ice"],[i.singular.foot,"feet"],[i.singular.tooth,"teeth"],[i.singular.goose,"geese"],[i.singular.quiz,"$1zes"],[i.singular.whereas,"$1es"],[i.singular.criterion,"$1a"],[i.singular.genus,"genera"],[i.singular.s,"s"],[i.singular.common,"s"]]; +var a=[[i.singular.man],[i.singular.person],[i.singular.child],[i.singular.ox],[i.singular.axis],[i.singular.octopus],[i.singular.alias],[i.singular.summons],[i.singular.bus],[i.singular.buffalo],[i.singular.tium],[i.singular.sis],[i.singular.ffe],[i.singular.hive],[i.singular.aeiouyy],[i.singular.x],[i.singular.matrix],[i.singular.mouse],[i.singular.foot],[i.singular.tooth],[i.singular.goose],[i.singular.quiz],[i.singular.whereas],[i.singular.criterion],[i.singular.genus],[i.plural.men,"$1an"],[i.plural.people,"$1rson"],[i.plural.children,"$1"],[i.plural.genera,"genus"],[i.plural.criteria,"$1on"],[i.plural.tia,"$1um"],[i.plural.analyses,"$1$2sis"],[i.plural.hives,"$1ve"],[i.plural.curves,"$1"],[i.plural.lrves,"$1f"],[i.plural.aves,"$1ve"],[i.plural.foves,"$1fe"],[i.plural.movies,"$1ovie"],[i.plural.aeiouyies,"$1y"],[i.plural.series,"$1eries"],[i.plural.xes,"$1"],[i.plural.mice,"$1ouse"],[i.plural.buses,"$1"],[i.plural.oes,"$1"],[i.plural.shoes,"$1"],[i.plural.crises,"$1is"],[i.plural.octopi,"$1us"],[i.plural.aliases,"$1"],[i.plural.summonses,"$1"],[i.plural.oxen,"$1"],[i.plural.matrices,"$1ix"],[i.plural.vertices,"$1ex"],[i.plural.feet,"foot"],[i.plural.teeth,"tooth"],[i.plural.geese,"goose"],[i.plural.quizzes,"$1"],[i.plural.whereases,"$1"],[i.plural.ss,"ss"],[i.plural.s,""]]; +var c=["and","or","nor","a","an","the","so","but","to","of","at","by","from","into","on","onto","off","out","in","over","with","for"];var k=new RegExp("(_ids|_id)$","g"); +var f=new RegExp("_","g");var j=new RegExp("[ _]","g");var e=new RegExp("([A-Z])","g");var h=new RegExp("^_");var b={_apply_rules:function(q,p,o,n){if(n){q=n; +}else{var r=(b.indexOf(o,q.toLowerCase())>-1);if(!r){var m=0;var l=p.length;for(;m1){return b._apply_rules(o,g,d,l);}else{return b._apply_rules(o,a,d,m);}},camelize:function(t,o){var v=t.split("/"); +var r=0;var q=v.length;var u,m,p,n,s;for(;r + * MIT Licensed + * + * @fileoverview + * A port of inflection-js to node.js module. + */ + +( function ( root, factory ){ + if( typeof define === 'function' && define.amd ){ + define([], factory ); + }else if( typeof exports === 'object' ){ + module.exports = factory(); + }else{ + root.inflection = factory(); + } +}( this, function (){ + + /** + * @description This is a list of nouns that use the same form for both singular and plural. + * This list should remain entirely in lower case to correctly match Strings. + * @private + */ + var uncountable_words = [ + // 'access', + 'accommodation', + 'adulthood', + 'advertising', + 'advice', + 'aggression', + 'aid', + 'air', + 'aircraft', + 'alcohol', + 'anger', + 'applause', + 'arithmetic', + // 'art', + 'assistance', + 'athletics', + // 'attention', + + 'bacon', + 'baggage', + // 'ballet', + // 'beauty', + 'beef', + // 'beer', + // 'behavior', + 'biology', + // 'billiards', + 'blood', + 'botany', + // 'bowels', + 'bread', + // 'business', + 'butter', + + 'carbon', + 'cardboard', + 'cash', + 'chalk', + 'chaos', + 'chess', + 'crossroads', + 'countryside', + + // 'damage', + 'dancing', + // 'danger', + 'deer', + // 'delight', + // 'dessert', + 'dignity', + 'dirt', + // 'distribution', + 'dust', + + 'economics', + 'education', + 'electricity', + // 'employment', + // 'energy', + 'engineering', + 'enjoyment', + // 'entertainment', + 'envy', + 'equipment', + 'ethics', + 'evidence', + 'evolution', + + // 'failure', + // 'faith', + 'fame', + 'fiction', + // 'fish', + 'flour', + 'flu', + 'food', + // 'freedom', + // 'fruit', + 'fuel', + 'fun', + // 'funeral', + 'furniture', + + 'gallows', + 'garbage', + 'garlic', + // 'gas', + 'genetics', + // 'glass', + 'gold', + 'golf', + 'gossip', + 'grammar', + // 'grass', + 'gratitude', + 'grief', + // 'ground', + 'guilt', + 'gymnastics', + + // 'hair', + 'happiness', + 'hardware', + 'harm', + 'hate', + 'hatred', + 'health', + 'heat', + // 'height', + 'help', + 'homework', + 'honesty', + 'honey', + 'hospitality', + 'housework', + 'humour', + 'hunger', + 'hydrogen', + + 'ice', + 'importance', + 'inflation', + 'information', + // 'injustice', + 'innocence', + // 'intelligence', + 'iron', + 'irony', + + 'jam', + // 'jealousy', + // 'jelly', + 'jewelry', + // 'joy', + 'judo', + // 'juice', + // 'justice', + + 'karate', + // 'kindness', + 'knowledge', + + // 'labour', + 'lack', + // 'land', + 'laughter', + 'lava', + 'leather', + 'leisure', + 'lightning', + 'linguine', + 'linguini', + 'linguistics', + 'literature', + 'litter', + 'livestock', + 'logic', + 'loneliness', + // 'love', + 'luck', + 'luggage', + + 'macaroni', + 'machinery', + 'magic', + // 'mail', + 'management', + 'mankind', + 'marble', + 'mathematics', + 'mayonnaise', + 'measles', + // 'meat', + // 'metal', + 'methane', + 'milk', + 'minus', + 'money', + // 'moose', + 'mud', + 'music', + 'mumps', + + 'nature', + 'news', + 'nitrogen', + 'nonsense', + 'nurture', + 'nutrition', + + 'obedience', + 'obesity', + // 'oil', + 'oxygen', + + // 'paper', + // 'passion', + 'pasta', + 'patience', + // 'permission', + 'physics', + 'poetry', + 'pollution', + 'poverty', + // 'power', + 'pride', + // 'production', + // 'progress', + // 'pronunciation', + 'psychology', + 'publicity', + 'punctuation', + + // 'quality', + // 'quantity', + 'quartz', + + 'racism', + // 'rain', + // 'recreation', + 'relaxation', + 'reliability', + 'research', + 'respect', + 'revenge', + 'rice', + 'rubbish', + 'rum', + + 'safety', + // 'salad', + // 'salt', + // 'sand', + // 'satire', + 'scenery', + 'seafood', + 'seaside', + 'series', + 'shame', + 'sheep', + 'shopping', + // 'silence', + 'sleep', + // 'slang' + 'smoke', + 'smoking', + 'snow', + 'soap', + 'software', + 'soil', + // 'sorrow', + // 'soup', + 'spaghetti', + // 'speed', + 'species', + // 'spelling', + // 'sport', + 'steam', + // 'strength', + 'stuff', + 'stupidity', + // 'success', + // 'sugar', + 'sunshine', + 'symmetry', + + // 'tea', + 'tennis', + 'thirst', + 'thunder', + 'timber', + // 'time', + // 'toast', + // 'tolerance', + // 'trade', + 'traffic', + 'transportation', + // 'travel', + 'trust', + + // 'understanding', + 'underwear', + 'unemployment', + 'unity', + // 'usage', + + 'validity', + 'veal', + 'vegetation', + 'vegetarianism', + 'vengeance', + 'violence', + // 'vision', + 'vitality', + + 'warmth', + // 'water', + 'wealth', + 'weather', + // 'weight', + 'welfare', + 'wheat', + // 'whiskey', + // 'width', + 'wildlife', + // 'wine', + 'wisdom', + // 'wood', + // 'wool', + // 'work', + + // 'yeast', + 'yoga', + + 'zinc', + 'zoology' + ]; + + /** + * @description These rules translate from the singular form of a noun to its plural form. + * @private + */ + + var regex = { + plural : { + men : new RegExp( '^(m|wom)en$' , 'gi' ), + people : new RegExp( '(pe)ople$' , 'gi' ), + children : new RegExp( '(child)ren$' , 'gi' ), + tia : new RegExp( '([ti])a$' , 'gi' ), + analyses : new RegExp( '((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$','gi' ), + hives : new RegExp( '(hi|ti)ves$' , 'gi' ), + curves : new RegExp( '(curve)s$' , 'gi' ), + lrves : new RegExp( '([lr])ves$' , 'gi' ), + aves : new RegExp( '([a])ves$' , 'gi' ), + foves : new RegExp( '([^fo])ves$' , 'gi' ), + movies : new RegExp( '(m)ovies$' , 'gi' ), + aeiouyies : new RegExp( '([^aeiouy]|qu)ies$' , 'gi' ), + series : new RegExp( '(s)eries$' , 'gi' ), + xes : new RegExp( '(x|ch|ss|sh)es$' , 'gi' ), + mice : new RegExp( '([m|l])ice$' , 'gi' ), + buses : new RegExp( '(bus)es$' , 'gi' ), + oes : new RegExp( '(o)es$' , 'gi' ), + shoes : new RegExp( '(shoe)s$' , 'gi' ), + crises : new RegExp( '(cris|ax|test)es$' , 'gi' ), + octopi : new RegExp( '(octop|vir)i$' , 'gi' ), + aliases : new RegExp( '(alias|canvas|status|campus)es$', 'gi' ), + summonses : new RegExp( '^(summons)es$' , 'gi' ), + oxen : new RegExp( '^(ox)en' , 'gi' ), + matrices : new RegExp( '(matr)ices$' , 'gi' ), + vertices : new RegExp( '(vert|ind)ices$' , 'gi' ), + feet : new RegExp( '^feet$' , 'gi' ), + teeth : new RegExp( '^teeth$' , 'gi' ), + geese : new RegExp( '^geese$' , 'gi' ), + quizzes : new RegExp( '(quiz)zes$' , 'gi' ), + whereases : new RegExp( '^(whereas)es$' , 'gi' ), + criteria : new RegExp( '^(criteri)a$' , 'gi' ), + genera : new RegExp( '^genera$' , 'gi' ), + ss : new RegExp( 'ss$' , 'gi' ), + s : new RegExp( 's$' , 'gi' ) + }, + + singular : { + man : new RegExp( '^(m|wom)an$' , 'gi' ), + person : new RegExp( '(pe)rson$' , 'gi' ), + child : new RegExp( '(child)$' , 'gi' ), + ox : new RegExp( '^(ox)$' , 'gi' ), + axis : new RegExp( '(ax|test)is$' , 'gi' ), + octopus : new RegExp( '(octop|vir)us$' , 'gi' ), + alias : new RegExp( '(alias|status|canvas|campus)$', 'gi' ), + summons : new RegExp( '^(summons)$' , 'gi' ), + bus : new RegExp( '(bu)s$' , 'gi' ), + buffalo : new RegExp( '(buffal|tomat|potat)o$' , 'gi' ), + tium : new RegExp( '([ti])um$' , 'gi' ), + sis : new RegExp( 'sis$' , 'gi' ), + ffe : new RegExp( '(?:([^f])fe|([lr])f)$' , 'gi' ), + hive : new RegExp( '(hi|ti)ve$' , 'gi' ), + aeiouyy : new RegExp( '([^aeiouy]|qu)y$' , 'gi' ), + x : new RegExp( '(x|ch|ss|sh)$' , 'gi' ), + matrix : new RegExp( '(matr)ix$' , 'gi' ), + vertex : new RegExp( '(vert|ind)ex$' , 'gi' ), + mouse : new RegExp( '([m|l])ouse$' , 'gi' ), + foot : new RegExp( '^foot$' , 'gi' ), + tooth : new RegExp( '^tooth$' , 'gi' ), + goose : new RegExp( '^goose$' , 'gi' ), + quiz : new RegExp( '(quiz)$' , 'gi' ), + whereas : new RegExp( '^(whereas)$' , 'gi' ), + criterion : new RegExp( '^(criteri)on$' , 'gi' ), + genus : new RegExp( '^genus$' , 'gi' ), + s : new RegExp( 's$' , 'gi' ), + common : new RegExp( '$' , 'gi' ) + } + }; + + var plural_rules = [ + + // do not replace if its already a plural word + [ regex.plural.men ], + [ regex.plural.people ], + [ regex.plural.children ], + [ regex.plural.tia ], + [ regex.plural.analyses ], + [ regex.plural.hives ], + [ regex.plural.curves ], + [ regex.plural.lrves ], + [ regex.plural.foves ], + [ regex.plural.aeiouyies ], + [ regex.plural.series ], + [ regex.plural.movies ], + [ regex.plural.xes ], + [ regex.plural.mice ], + [ regex.plural.buses ], + [ regex.plural.oes ], + [ regex.plural.shoes ], + [ regex.plural.crises ], + [ regex.plural.octopi ], + [ regex.plural.aliases ], + [ regex.plural.summonses ], + [ regex.plural.oxen ], + [ regex.plural.matrices ], + [ regex.plural.feet ], + [ regex.plural.teeth ], + [ regex.plural.geese ], + [ regex.plural.quizzes ], + [ regex.plural.whereases ], + [ regex.plural.criteria ], + [ regex.plural.genera ], + + // original rule + [ regex.singular.man , '$1en' ], + [ regex.singular.person , '$1ople' ], + [ regex.singular.child , '$1ren' ], + [ regex.singular.ox , '$1en' ], + [ regex.singular.axis , '$1es' ], + [ regex.singular.octopus , '$1i' ], + [ regex.singular.alias , '$1es' ], + [ regex.singular.summons , '$1es' ], + [ regex.singular.bus , '$1ses' ], + [ regex.singular.buffalo , '$1oes' ], + [ regex.singular.tium , '$1a' ], + [ regex.singular.sis , 'ses' ], + [ regex.singular.ffe , '$1$2ves' ], + [ regex.singular.hive , '$1ves' ], + [ regex.singular.aeiouyy , '$1ies' ], + [ regex.singular.matrix , '$1ices' ], + [ regex.singular.vertex , '$1ices' ], + [ regex.singular.x , '$1es' ], + [ regex.singular.mouse , '$1ice' ], + [ regex.singular.foot , 'feet' ], + [ regex.singular.tooth , 'teeth' ], + [ regex.singular.goose , 'geese' ], + [ regex.singular.quiz , '$1zes' ], + [ regex.singular.whereas , '$1es' ], + [ regex.singular.criterion, '$1a' ], + [ regex.singular.genus , 'genera' ], + + [ regex.singular.s , 's' ], + [ regex.singular.common, 's' ] + ]; + + /** + * @description These rules translate from the plural form of a noun to its singular form. + * @private + */ + var singular_rules = [ + + // do not replace if its already a singular word + [ regex.singular.man ], + [ regex.singular.person ], + [ regex.singular.child ], + [ regex.singular.ox ], + [ regex.singular.axis ], + [ regex.singular.octopus ], + [ regex.singular.alias ], + [ regex.singular.summons ], + [ regex.singular.bus ], + [ regex.singular.buffalo ], + [ regex.singular.tium ], + [ regex.singular.sis ], + [ regex.singular.ffe ], + [ regex.singular.hive ], + [ regex.singular.aeiouyy ], + [ regex.singular.x ], + [ regex.singular.matrix ], + [ regex.singular.mouse ], + [ regex.singular.foot ], + [ regex.singular.tooth ], + [ regex.singular.goose ], + [ regex.singular.quiz ], + [ regex.singular.whereas ], + [ regex.singular.criterion ], + [ regex.singular.genus ], + + // original rule + [ regex.plural.men , '$1an' ], + [ regex.plural.people , '$1rson' ], + [ regex.plural.children , '$1' ], + [ regex.plural.genera , 'genus'], + [ regex.plural.criteria , '$1on'], + [ regex.plural.tia , '$1um' ], + [ regex.plural.analyses , '$1$2sis' ], + [ regex.plural.hives , '$1ve' ], + [ regex.plural.curves , '$1' ], + [ regex.plural.lrves , '$1f' ], + [ regex.plural.aves , '$1ve' ], + [ regex.plural.foves , '$1fe' ], + [ regex.plural.movies , '$1ovie' ], + [ regex.plural.aeiouyies, '$1y' ], + [ regex.plural.series , '$1eries' ], + [ regex.plural.xes , '$1' ], + [ regex.plural.mice , '$1ouse' ], + [ regex.plural.buses , '$1' ], + [ regex.plural.oes , '$1' ], + [ regex.plural.shoes , '$1' ], + [ regex.plural.crises , '$1is' ], + [ regex.plural.octopi , '$1us' ], + [ regex.plural.aliases , '$1' ], + [ regex.plural.summonses, '$1' ], + [ regex.plural.oxen , '$1' ], + [ regex.plural.matrices , '$1ix' ], + [ regex.plural.vertices , '$1ex' ], + [ regex.plural.feet , 'foot' ], + [ regex.plural.teeth , 'tooth' ], + [ regex.plural.geese , 'goose' ], + [ regex.plural.quizzes , '$1' ], + [ regex.plural.whereases, '$1' ], + + [ regex.plural.ss, 'ss' ], + [ regex.plural.s , '' ] + ]; + + /** + * @description This is a list of words that should not be capitalized for title case. + * @private + */ + var non_titlecased_words = [ + 'and', 'or', 'nor', 'a', 'an', 'the', 'so', 'but', 'to', 'of', 'at','by', + 'from', 'into', 'on', 'onto', 'off', 'out', 'in', 'over', 'with', 'for' + ]; + + /** + * @description These are regular expressions used for converting between String formats. + * @private + */ + var id_suffix = new RegExp( '(_ids|_id)$', 'g' ); + var underbar = new RegExp( '_', 'g' ); + var space_or_underbar = new RegExp( '[\ _]', 'g' ); + var uppercase = new RegExp( '([A-Z])', 'g' ); + var underbar_prefix = new RegExp( '^_' ); + + var inflector = { + + /** + * A helper method that applies rules based replacement to a String. + * @private + * @function + * @param {String} str String to modify and return based on the passed rules. + * @param {Array: [RegExp, String]} rules Regexp to match paired with String to use for replacement + * @param {Array: [String]} skip Strings to skip if they match + * @param {String} override String to return as though this method succeeded (used to conform to APIs) + * @returns {String} Return passed String modified by passed rules. + * @example + * + * this._apply_rules( 'cows', singular_rules ); // === 'cow' + */ + _apply_rules : function ( str, rules, skip, override ){ + if( override ){ + str = override; + }else{ + var ignore = ( inflector.indexOf( skip, str.toLowerCase()) > -1 ); + + if( !ignore ){ + var i = 0; + var j = rules.length; + + for( ; i < j; i++ ){ + if( str.match( rules[ i ][ 0 ])){ + if( rules[ i ][ 1 ] !== undefined ){ + str = str.replace( rules[ i ][ 0 ], rules[ i ][ 1 ]); + } + break; + } + } + } + } + + return str; + }, + + + + /** + * This lets us detect if an Array contains a given element. + * @public + * @function + * @param {Array} arr The subject array. + * @param {Object} item Object to locate in the Array. + * @param {Number} from_index Starts checking from this position in the Array.(optional) + * @param {Function} compare_func Function used to compare Array item vs passed item.(optional) + * @returns {Number} Return index position in the Array of the passed item. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.indexOf([ 'hi','there' ], 'guys' ); // === -1 + * inflection.indexOf([ 'hi','there' ], 'hi' ); // === 0 + */ + indexOf : function ( arr, item, from_index, compare_func ){ + if( !from_index ){ + from_index = -1; + } + + var index = -1; + var i = from_index; + var j = arr.length; + + for( ; i < j; i++ ){ + if( arr[ i ] === item || compare_func && compare_func( arr[ i ], item )){ + index = i; + break; + } + } + + return index; + }, + + + + /** + * This function adds pluralization support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @param {String} plural Overrides normal output with said String.(optional) + * @returns {String} Singular English language nouns are returned in plural form. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.pluralize( 'person' ); // === 'people' + * inflection.pluralize( 'octopus' ); // === 'octopi' + * inflection.pluralize( 'Hat' ); // === 'Hats' + * inflection.pluralize( 'person', 'guys' ); // === 'guys' + */ + pluralize : function ( str, plural ){ + return inflector._apply_rules( str, plural_rules, uncountable_words, plural ); + }, + + + + /** + * This function adds singularization support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @param {String} singular Overrides normal output with said String.(optional) + * @returns {String} Plural English language nouns are returned in singular form. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.singularize( 'people' ); // === 'person' + * inflection.singularize( 'octopi' ); // === 'octopus' + * inflection.singularize( 'Hats' ); // === 'Hat' + * inflection.singularize( 'guys', 'person' ); // === 'person' + */ + singularize : function ( str, singular ){ + return inflector._apply_rules( str, singular_rules, uncountable_words, singular ); + }, + + + /** + * This function will pluralize or singularlize a String appropriately based on an integer value + * @public + * @function + * @param {String} str The subject string. + * @param {Number} count The number to base pluralization off of. + * @param {String} singular Overrides normal output with said String.(optional) + * @param {String} plural Overrides normal output with said String.(optional) + * @returns {String} English language nouns are returned in the plural or singular form based on the count. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.inflect( 'people' 1 ); // === 'person' + * inflection.inflect( 'octopi' 1 ); // === 'octopus' + * inflection.inflect( 'Hats' 1 ); // === 'Hat' + * inflection.inflect( 'guys', 1 , 'person' ); // === 'person' + * inflection.inflect( 'person', 2 ); // === 'people' + * inflection.inflect( 'octopus', 2 ); // === 'octopi' + * inflection.inflect( 'Hat', 2 ); // === 'Hats' + * inflection.inflect( 'person', 2, null, 'guys' ); // === 'guys' + */ + inflect : function ( str, count, singular, plural ){ + count = parseInt( count, 10 ); + + if( isNaN( count )) return str; + + if( count === 0 || count > 1 ){ + return inflector._apply_rules( str, plural_rules, uncountable_words, plural ); + }else{ + return inflector._apply_rules( str, singular_rules, uncountable_words, singular ); + } + }, + + + + /** + * This function adds camelization support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @param {Boolean} low_first_letter Default is to capitalize the first letter of the results.(optional) + * Passing true will lowercase it. + * @returns {String} Lower case underscored words will be returned in camel case. + * additionally '/' is translated to '::' + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.camelize( 'message_properties' ); // === 'MessageProperties' + * inflection.camelize( 'message_properties', true ); // === 'messageProperties' + */ + camelize : function ( str, low_first_letter ){ + var str_path = str.split( '/' ); + var i = 0; + var j = str_path.length; + var str_arr, init_x, k, l, first; + + for( ; i < j; i++ ){ + str_arr = str_path[ i ].split( '_' ); + k = 0; + l = str_arr.length; + + for( ; k < l; k++ ){ + if( k !== 0 ){ + str_arr[ k ] = str_arr[ k ].toLowerCase(); + } + + first = str_arr[ k ].charAt( 0 ); + first = low_first_letter && i === 0 && k === 0 + ? first.toLowerCase() : first.toUpperCase(); + str_arr[ k ] = first + str_arr[ k ].substring( 1 ); + } + + str_path[ i ] = str_arr.join( '' ); + } + + return str_path.join( '::' ); + }, + + + + /** + * This function adds underscore support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @param {Boolean} all_upper_case Default is to lowercase and add underscore prefix.(optional) + * Passing true will return as entered. + * @returns {String} Camel cased words are returned as lower cased and underscored. + * additionally '::' is translated to '/'. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.underscore( 'MessageProperties' ); // === 'message_properties' + * inflection.underscore( 'messageProperties' ); // === 'message_properties' + * inflection.underscore( 'MP', true ); // === 'MP' + */ + underscore : function ( str, all_upper_case ){ + if( all_upper_case && str === str.toUpperCase()) return str; + + var str_path = str.split( '::' ); + var i = 0; + var j = str_path.length; + + for( ; i < j; i++ ){ + str_path[ i ] = str_path[ i ].replace( uppercase, '_$1' ); + str_path[ i ] = str_path[ i ].replace( underbar_prefix, '' ); + } + + return str_path.join( '/' ).toLowerCase(); + }, + + + + /** + * This function adds humanize support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @param {Boolean} low_first_letter Default is to capitalize the first letter of the results.(optional) + * Passing true will lowercase it. + * @returns {String} Lower case underscored words will be returned in humanized form. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.humanize( 'message_properties' ); // === 'Message properties' + * inflection.humanize( 'message_properties', true ); // === 'message properties' + */ + humanize : function ( str, low_first_letter ){ + str = str.toLowerCase(); + str = str.replace( id_suffix, '' ); + str = str.replace( underbar, ' ' ); + + if( !low_first_letter ){ + str = inflector.capitalize( str ); + } + + return str; + }, + + + + /** + * This function adds capitalization support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @returns {String} All characters will be lower case and the first will be upper. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.capitalize( 'message_properties' ); // === 'Message_properties' + * inflection.capitalize( 'message properties', true ); // === 'Message properties' + */ + capitalize : function ( str ){ + str = str.toLowerCase(); + + return str.substring( 0, 1 ).toUpperCase() + str.substring( 1 ); + }, + + + + /** + * This function replaces underscores with dashes in the string. + * @public + * @function + * @param {String} str The subject string. + * @returns {String} Replaces all spaces or underscores with dashes. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.dasherize( 'message_properties' ); // === 'message-properties' + * inflection.dasherize( 'Message Properties' ); // === 'Message-Properties' + */ + dasherize : function ( str ){ + return str.replace( space_or_underbar, '-' ); + }, + + + + /** + * This function adds titleize support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @returns {String} Capitalizes words as you would for a book title. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.titleize( 'message_properties' ); // === 'Message Properties' + * inflection.titleize( 'message properties to keep' ); // === 'Message Properties to Keep' + */ + titleize : function ( str ){ + str = str.toLowerCase().replace( underbar, ' ' ); + var str_arr = str.split( ' ' ); + var i = 0; + var j = str_arr.length; + var d, k, l; + + for( ; i < j; i++ ){ + d = str_arr[ i ].split( '-' ); + k = 0; + l = d.length; + + for( ; k < l; k++){ + if( inflector.indexOf( non_titlecased_words, d[ k ].toLowerCase()) < 0 ){ + d[ k ] = inflector.capitalize( d[ k ]); + } + } + + str_arr[ i ] = d.join( '-' ); + } + + str = str_arr.join( ' ' ); + str = str.substring( 0, 1 ).toUpperCase() + str.substring( 1 ); + + return str; + }, + + + + /** + * This function adds demodulize support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @returns {String} Removes module names leaving only class names.(Ruby style) + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.demodulize( 'Message::Bus::Properties' ); // === 'Properties' + */ + demodulize : function ( str ){ + var str_arr = str.split( '::' ); + + return str_arr[ str_arr.length - 1 ]; + }, + + + + /** + * This function adds tableize support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @returns {String} Return camel cased words into their underscored plural form. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.tableize( 'MessageBusProperty' ); // === 'message_bus_properties' + */ + tableize : function ( str ){ + str = inflector.underscore( str ); + str = inflector.pluralize( str ); + + return str; + }, + + + + /** + * This function adds classification support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @returns {String} Underscored plural nouns become the camel cased singular form. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.classify( 'message_bus_properties' ); // === 'MessageBusProperty' + */ + classify : function ( str ){ + str = inflector.camelize( str ); + str = inflector.singularize( str ); + + return str; + }, + + + + /** + * This function adds foreign key support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @param {Boolean} drop_id_ubar Default is to seperate id with an underbar at the end of the class name, + you can pass true to skip it.(optional) + * @returns {String} Underscored plural nouns become the camel cased singular form. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.foreign_key( 'MessageBusProperty' ); // === 'message_bus_property_id' + * inflection.foreign_key( 'MessageBusProperty', true ); // === 'message_bus_propertyid' + */ + foreign_key : function ( str, drop_id_ubar ){ + str = inflector.demodulize( str ); + str = inflector.underscore( str ) + (( drop_id_ubar ) ? ( '' ) : ( '_' )) + 'id'; + + return str; + }, + + + + /** + * This function adds ordinalize support to every String object. + * @public + * @function + * @param {String} str The subject string. + * @returns {String} Return all found numbers their sequence like '22nd'. + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.ordinalize( 'the 1 pitch' ); // === 'the 1st pitch' + */ + ordinalize : function ( str ){ + var str_arr = str.split( ' ' ); + var i = 0; + var j = str_arr.length; + + for( ; i < j; i++ ){ + var k = parseInt( str_arr[ i ], 10 ); + + if( !isNaN( k )){ + var ltd = str_arr[ i ].substring( str_arr[ i ].length - 2 ); + var ld = str_arr[ i ].substring( str_arr[ i ].length - 1 ); + var suf = 'th'; + + if( ltd != '11' && ltd != '12' && ltd != '13' ){ + if( ld === '1' ){ + suf = 'st'; + }else if( ld === '2' ){ + suf = 'nd'; + }else if( ld === '3' ){ + suf = 'rd'; + } + } + + str_arr[ i ] += suf; + } + } + + return str_arr.join( ' ' ); + }, + + /** + * This function performs multiple inflection methods on a string + * @public + * @function + * @param {String} str The subject string. + * @param {Array} arr An array of inflection methods. + * @returns {String} + * @example + * + * var inflection = require( 'inflection' ); + * + * inflection.transform( 'all job', [ 'pluralize', 'capitalize', 'dasherize' ]); // === 'All-jobs' + */ + transform : function ( str, arr ){ + var i = 0; + var j = arr.length; + + for( ;i < j; i++ ){ + var method = arr[ i ]; + + if( inflector.hasOwnProperty( method )){ + str = inflector[ method ]( str ); + } + } + + return str; + } + }; + +/** + * @public + */ + inflector.version = '1.12.0'; + + return inflector; +})); diff --git a/node_modules/inflection/package.json b/node_modules/inflection/package.json new file mode 100644 index 00000000..bacae48b --- /dev/null +++ b/node_modules/inflection/package.json @@ -0,0 +1,46 @@ +{ + "name" : "inflection", + "version" : "1.12.0", + "description": "A port of inflection-js to node.js module", + "keywords" : [ + "inflection", "inflections", "inflection-js", "pluralize" , "singularize", + "camelize", "underscore", "humanize", "capitalize", "dasherize", "titleize", + "demodulize", "tableize", "classify", "foreign_key", "ordinalize" + ], + "author" : "dreamerslab ", + "contributors": [ + { "name": "Ryan Schuft", "email": "ryan.schuft@gmail.com" }, + { "name": "Ben Lin", "email": "ben@dreamerslab.com" }, + { "name": "Lance Pollard", "email": "lancejpollard@gmail.com" }, + { "name": "Dane O'Connor", "email": "dane.oconnor@gmail.com" }, + { "name": "David Miró", "email": "lite.3engine@gmail.com" }, + { "name": "brandondewitt" }, + { "name": "luk3thomas" }, + { "name": "Marcel Klehr" }, + { "name": "Raymond Feng" }, + { "name": "Kane Cohen", "email": "kanecohen@gmail.com" }, + { "name": "Gianni Chiappetta", "email": "gianni@runlevel6.org" }, + { "name": "Eric Brody" }, + { "name": "overlookmotel" }, + { "name": "Patrick Mowrer" }, + { "name": "Greger Olsson" }, + { "name": "Jason Crawford", "email": "jason@jasoncrawford.org" }, + { "name": "Ray Myers", "email": "ray.myers@gmail.com" }, + { "name": "Dillon Shook", "email": "dshook@alumni.nmt.edu" } + ], + "dependencies" : {}, + "devDependencies": { + "mocha" : "3.2.0", + "should": "11.2.0" + }, + "main" : "./lib/inflection.js", + "repository": { + "type": "git", + "url" : "https://github.com/dreamerslab/node.inflection.git" + }, + "engines" : [ "node >= 0.4.0" ], + "license": "MIT", + "scripts": { + "test" : "mocha -R spec" + } +} diff --git a/node_modules/inquirer/node_modules/strip-ansi/index.js b/node_modules/inquirer/node_modules/strip-ansi/index.js deleted file mode 100644 index 9788c96d..00000000 --- a/node_modules/inquirer/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; - -module.exports = stripAnsi; -module.exports.default = stripAnsi; diff --git a/node_modules/inquirer/node_modules/strip-ansi/package.json b/node_modules/inquirer/node_modules/strip-ansi/package.json deleted file mode 100644 index 7494fd7e..00000000 --- a/node_modules/inquirer/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "strip-ansi", - "version": "5.2.0", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "xo && ava && tsd-check" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "devDependencies": { - "ava": "^1.3.1", - "tsd-check": "^0.5.0", - "xo": "^0.24.0" - } -} diff --git a/node_modules/inquirer/node_modules/strip-ansi/readme.md b/node_modules/inquirer/node_modules/strip-ansi/readme.md deleted file mode 100644 index 8681fe8a..00000000 --- a/node_modules/inquirer/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,61 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) - -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string - ---- - -
- - Get professional support for 'strip-ansi' 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 strip-ansi -``` - - -## Usage - -```js -const stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/is-bluebird/License b/node_modules/is-bluebird/License new file mode 100644 index 00000000..bd8523b9 --- /dev/null +++ b/node_modules/is-bluebird/License @@ -0,0 +1,19 @@ +Copyright (c) 2016 Overlook Motel (theoverlookmotel@gmail.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/is-bluebird/README.md b/node_modules/is-bluebird/README.md new file mode 100644 index 00000000..bcd6e778 --- /dev/null +++ b/node_modules/is-bluebird/README.md @@ -0,0 +1,86 @@ +# is-bluebird.js + +# Is this a bluebird promise I see before me? + +[![NPM version](https://img.shields.io/npm/v/is-bluebird.svg)](https://www.npmjs.com/package/is-bluebird) +[![Build Status](https://img.shields.io/travis/overlookmotel/is-bluebird/master.svg)](http://travis-ci.org/overlookmotel/is-bluebird) +[![Dependency Status](https://img.shields.io/david/overlookmotel/is-bluebird.svg)](https://david-dm.org/overlookmotel/is-bluebird) +[![Dev dependency Status](https://img.shields.io/david/dev/overlookmotel/is-bluebird.svg)](https://david-dm.org/overlookmotel/is-bluebird) +[![Coverage Status](https://img.shields.io/coveralls/overlookmotel/is-bluebird/master.svg)](https://coveralls.io/r/overlookmotel/is-bluebird) + +## Usage + +Tools to check whether some input is a [bluebird](http://bluebirdjs.com/) promise, a bluebird promise constructor, or determining the version of bluebird from a promise or constructor. + +#### `isBluebird( promise )` + +Returns true if is a bluebird promise, false if not. + +```js +var isBluebird = require('is-bluebird'); +var Bluebird = require('bluebird'); + +console.log( isBluebird( Bluebird.resolve() ) ); // true +console.log( isBluebird( Promise.resolve() ) ); // false (native JS promise) +``` + +#### `isBluebird.ctor( Promise )` + +Returns true if is bluebird promise constructor, false if not. + +```js +var isBluebird = require('is-bluebird'); +var Bluebird = require('bluebird'); + +console.log( isBluebird.ctor( Bluebird ) ); // true +console.log( isBluebird.ctor( Promise ) ); // false (native JS promise) +``` + +#### `isBluebird.v2( promise )` / `isBluebird.v3( promise )` + +Returns true if is a bluebird promise of the specified version. + +```js +var isBluebird = require('is-bluebird'); +var Bluebird2 = require('bluebird2'); +var Bluebird3 = require('bluebird3'); + +console.log( isBluebird.v2( Bluebird2.resolve() ) ); // true +console.log( isBluebird.v2( Bluebird3.resolve() ) ); // false +console.log( isBluebird.v2( Promise.resolve() ) ); // false (native JS promise) +``` + +#### `isBluebird.v2.ctor( Promise )` / `isBluebird.v3.ctor( Promise )` + +Returns true if is bluebird promise constructor of the specified version. + +```js +var isBluebird = require('is-bluebird'); +var Bluebird2 = require('bluebird2'); +var Bluebird3 = require('bluebird3'); + +console.log( isBluebird.v2.ctor( Bluebird2 ) ); // true +console.log( isBluebird.v2.ctor( Bluebird3 ) ); // false +console.log( isBluebird.v2.ctor( Promise ) ); // false (native JS promise) +``` + +## Tests + +Use `npm test` to run the tests. Use `npm run cover` to check coverage. + +## Changelog + +See [changelog.md](https://github.com/overlookmotel/is-bluebird/blob/master/changelog.md) + +## Issues + +If you discover a bug, please raise an issue on Github. https://github.com/overlookmotel/is-bluebird/issues + +## Contribution + +Pull requests are very welcome. Please: + +* ensure all tests pass before submitting PR +* add an entry to changelog +* add tests for new features +* document new functionality/API additions in README diff --git a/node_modules/is-bluebird/changelog.md b/node_modules/is-bluebird/changelog.md new file mode 100644 index 00000000..14d8f91a --- /dev/null +++ b/node_modules/is-bluebird/changelog.md @@ -0,0 +1,16 @@ +# Changelog + +## 1.0.0 + +* Initial release + +## 1.0.1 + +* Fix README typo + +## 1.0.2 + +* Update `bluebird` dev dependencies +* Update dev dependencies +* Additional tests +* Travis CI tests all branches (to enable `greenskeeper.io`) diff --git a/node_modules/is-bluebird/lib/index.js b/node_modules/is-bluebird/lib/index.js new file mode 100644 index 00000000..1a8bb52e --- /dev/null +++ b/node_modules/is-bluebird/lib/index.js @@ -0,0 +1,79 @@ +// -------------------- +// is-bluebird module +// -------------------- + +// exports + +/** + * Identifies whether input is a bluebird promise. + * @param {*} promise - Input to be tested + * @returns {boolean} - true if is a bluebird promise, false if not + */ +var isBluebird = function(promise) { + return isObject(promise) && isBluebird.ctor(promise.constructor); +}; + +/** + * Identifies whether input is a bluebird promise constructor. + * @param {*} Promise - Input to be tested + * @returns {boolean} - true if is bluebird promise constructor, false if not + */ +isBluebird.ctor = function(Promise) { + return typeof Promise == 'function' && !!Promise.prototype && typeof Promise.prototype._addCallbacks == 'function'; +}; + +/** + * Identifies whether input is a bluebird v2 promise. + * @param {*} promise - Input to be tested + * @returns {boolean} - true if is a bluebird v2 promise, false if not + */ +isBluebird.v2 = function(promise) { + return isObject(promise) && isBluebird.v2.ctor(promise.constructor); +}; + +/** + * Identifies whether input is bluebird v2 promise constructor. + * @alias isBluebird.ctor.v2 + * + * @param {*} promise - Input to be tested + * @returns {boolean} - true if is a bluebird v2 promise, false if not + */ +isBluebird.v2.ctor = function(Promise) { + return isBluebird.ctor(Promise) && Promise.prototype._addCallbacks.length == 6; +}; + +isBluebird.ctor.v2 = isBluebird.v2.ctor; + +/** + * Identifies whether input is a bluebird v3 promise. + * @param {*} promise - Input to be tested + * @returns {boolean} - true if is a bluebird v3 promise, false if not + */ +isBluebird.v3 = function(promise) { + return isObject(promise) && isBluebird.v3.ctor(promise.constructor); +}; + +/** + * Identifies whether input is bluebird v3 promise constructor. + * @alias isBluebird.ctor.v3 + * + * @param {*} promise - Input to be tested + * @returns {boolean} - true if is a bluebird v3 promise, false if not + */ +isBluebird.v3.ctor = function(Promise) { + return isBluebird.ctor(Promise) && Promise.prototype._addCallbacks.length == 5; +}; + +isBluebird.ctor.v3 = isBluebird.v3.ctor; + +/** + * Check if input is an object. + * @param {*} obj - Input to be tested + * @returns {boolean} - true if is an object, false if not + */ +function isObject(obj) { + return !!obj && typeof obj == 'object'; +} + +// export isBluebird +module.exports = isBluebird; diff --git a/node_modules/is-bluebird/package.json b/node_modules/is-bluebird/package.json new file mode 100644 index 00000000..501fab84 --- /dev/null +++ b/node_modules/is-bluebird/package.json @@ -0,0 +1,51 @@ +{ + "name": "is-bluebird", + "version": "1.0.2", + "description": "Is this a bluebird promise I see before me?", + "main": "./lib/", + "author": { + "name": "Overlook Motel" + }, + "repository": { + "type": "git", + "url": "https://github.com/overlookmotel/is-bluebird.git" + }, + "bugs": { + "url": "https://github.com/overlookmotel/is-bluebird/issues" + }, + "dependencies": { + }, + "devDependencies": { + "bluebird2": "^3.0.0", + "bluebird3": "^3.0.6", + "mocha": "^3.0.2", + "chai": "^3.5.0", + "jshint": "^2.9.3", + "istanbul": "^0.4.5", + "coveralls": "^2.11.12" + }, + "keywords": [ + "bluebird", + "promise", + "is", + "instance", + "constructor", + "version", + "then", + "check", + "test" + ], + "scripts": { + "test": "if [ $COVERAGE ]; then npm run coveralls; else npm run jshint && npm run test-main; fi", + "jshint": "./node_modules/.bin/jshint lib test", + "test-main": "./node_modules/mocha/bin/mocha --check-leaks --colors -t 10000 --reporter spec 'test/**/*.test.js'", + "cover": "npm run cover-main && rm -rf coverage", + "coveralls": "npm run cover-main && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", + "cover-main": "COVERAGE=true ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- -R spec 'test/**/*.test.js'" + }, + "engines": { + "node": ">=0.10.0" + }, + "readmeFilename": "README.md", + "license": "MIT" +} diff --git a/node_modules/js-beautify/CHANGELOG.md b/node_modules/js-beautify/CHANGELOG.md new file mode 100644 index 00000000..a15e71d0 --- /dev/null +++ b/node_modules/js-beautify/CHANGELOG.md @@ -0,0 +1,808 @@ +# Changelog +## v1.10.1 + +### Description + + +### Closed Issues +* javascript fails to format when is first text inside ')) { + unescaped = unescaped.substr(0, unescaped.length - 9); + } + unpacked = unescaped; + } + // throw to terminate the script + unpacked = "// Unpacker warning: be careful when using myobfuscate.com for your projects:\n" + + "// scripts obfuscated by the free online version may call back home.\n" + + "\n//\n" + unpacked; + throw unpacked; + }; // jshint ignore:line + __eval(str); // should throw + } catch (e) { + // well, it failed. we'll just return the original, instead of crashing on user. + if (typeof e === "string") { + str = e; + } + } + eval = __eval; // jshint ignore:line + } + return str; + }, + + starts_with: function(str, what) { + return str.substr(0, what.length) === what; + }, + + ends_with: function(str, what) { + return str.substr(str.length - what.length, what.length) === what; + }, + + run_tests: function(sanity_test) { + var t = sanity_test || new SanityTest(); + + return t; + } + + +}; diff --git a/node_modules/js-beautify/js/lib/unpackers/p_a_c_k_e_r_unpacker.js b/node_modules/js-beautify/js/lib/unpackers/p_a_c_k_e_r_unpacker.js new file mode 100644 index 00000000..a7421674 --- /dev/null +++ b/node_modules/js-beautify/js/lib/unpackers/p_a_c_k_e_r_unpacker.js @@ -0,0 +1,111 @@ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +// +// Unpacker for Dean Edward's p.a.c.k.e.r, a part of javascript beautifier +// +// Coincidentally, it can defeat a couple of other eval-based compressors. +// +// usage: +// +// if (P_A_C_K_E_R.detect(some_string)) { +// var unpacked = P_A_C_K_E_R.unpack(some_string); +// } +// +// + +/*jshint strict:false */ + +var P_A_C_K_E_R = { + detect: function(str) { + return (P_A_C_K_E_R.get_chunks(str).length > 0); + }, + + get_chunks: function(str) { + var chunks = str.match(/eval\(\(?function\(.*?(,0,\{\}\)\)|split\('\|'\)\)\))($|\n)/g); + return chunks ? chunks : []; + }, + + unpack: function(str) { + var chunks = P_A_C_K_E_R.get_chunks(str), + chunk; + for (var i = 0; i < chunks.length; i++) { + chunk = chunks[i].replace(/\n$/, ''); + str = str.split(chunk).join(P_A_C_K_E_R.unpack_chunk(chunk)); + } + return str; + }, + + unpack_chunk: function(str) { + var unpacked_source = ''; + var __eval = eval; + if (P_A_C_K_E_R.detect(str)) { + try { + eval = function(s) { // jshint ignore:line + unpacked_source += s; + return unpacked_source; + }; // jshint ignore:line + __eval(str); + if (typeof unpacked_source === 'string' && unpacked_source) { + str = unpacked_source; + } + } catch (e) { + // well, it failed. we'll just return the original, instead of crashing on user. + } + } + eval = __eval; // jshint ignore:line + return str; + }, + + run_tests: function(sanity_test) { + var t = sanity_test || new SanityTest(); + + var pk1 = "eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1',3,3,'var||a'.split('|'),0,{}))"; + var unpk1 = 'var a=1'; + var pk2 = "eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1',3,3,'foo||b'.split('|'),0,{}))"; + var unpk2 = 'foo b=1'; + var pk_broken = "eval(function(p,a,c,k,e,r){BORKBORK;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1',3,3,'var||a'.split('|'),0,{}))"; + var pk3 = "eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1{}))',3,3,'var||a'.split('|'),0,{}))"; + var unpk3 = 'var a=1{}))'; + + t.test_function(P_A_C_K_E_R.detect, "P_A_C_K_E_R.detect"); + t.expect('', false); + t.expect('var a = b', false); + t.test_function(P_A_C_K_E_R.unpack, "P_A_C_K_E_R.unpack"); + t.expect(pk_broken, pk_broken); + t.expect(pk1, unpk1); + t.expect(pk2, unpk2); + t.expect(pk3, unpk3); + + var filler = '\nfiller\n'; + t.expect(filler + pk1 + "\n" + pk_broken + filler + pk2 + filler, filler + unpk1 + "\n" + pk_broken + filler + unpk2 + filler); + + return t; + } + + +}; diff --git a/node_modules/js-beautify/js/lib/unpackers/urlencode_unpacker.js b/node_modules/js-beautify/js/lib/unpackers/urlencode_unpacker.js new file mode 100644 index 00000000..0f7a9a29 --- /dev/null +++ b/node_modules/js-beautify/js/lib/unpackers/urlencode_unpacker.js @@ -0,0 +1,104 @@ +/*global unescape */ +/*jshint curly: false, scripturl: true */ + +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +// +// trivial bookmarklet/escaped script detector for the javascript beautifier +// written by Einar Lielmanis +// +// usage: +// +// if (Urlencoded.detect(some_string)) { +// var unpacked = Urlencoded.unpack(some_string); +// } +// +// + +/*jshint strict:false */ + + +var isNode = (typeof module !== 'undefined' && module.exports); +if (isNode) { + var SanityTest = require(__dirname + '/../../test/sanitytest'); +} + +var Urlencoded = { + detect: function(str) { + // the fact that script doesn't contain any space, but has %20 instead + // should be sufficient check for now. + if (str.indexOf(' ') === -1) { + if (str.indexOf('%2') !== -1) return true; + if (str.replace(/[^%]+/g, '').length > 3) return true; + } + return false; + }, + + unpack: function(str) { + if (Urlencoded.detect(str)) { + if (str.indexOf('%2B') !== -1 || str.indexOf('%2b') !== -1) { + // "+" escaped as "%2B" + return unescape(str.replace(/\+/g, '%20')); + } else { + return unescape(str); + } + } + return str; + }, + + + + run_tests: function(sanity_test) { + var t = sanity_test || new SanityTest(); + t.test_function(Urlencoded.detect, "Urlencoded.detect"); + t.expect('', false); + t.expect('var a = b', false); + t.expect('var%20a+=+b', true); + t.expect('var%20a=b', true); + t.expect('var%20%21%22', true); + t.expect('javascript:(function(){var%20whatever={init:function(){alert(%22a%22+%22b%22)}};whatever.init()})();', true); + t.test_function(Urlencoded.unpack, 'Urlencoded.unpack'); + + t.expect('javascript:(function(){var%20whatever={init:function(){alert(%22a%22+%22b%22)}};whatever.init()})();', + 'javascript:(function(){var whatever={init:function(){alert("a"+"b")}};whatever.init()})();' + ); + t.expect('', ''); + t.expect('abcd', 'abcd'); + t.expect('var a = b', 'var a = b'); + t.expect('var%20a=b', 'var a=b'); + t.expect('var%20a=b+1', 'var a=b+1'); + t.expect('var%20a=b%2b1', 'var a=b+1'); + return t; + } + + +}; + +if (isNode) { + module.exports = Urlencoded; +} diff --git a/node_modules/js-beautify/js/src/cli.js b/node_modules/js-beautify/js/src/cli.js new file mode 100755 index 00000000..959fd07e --- /dev/null +++ b/node_modules/js-beautify/js/src/cli.js @@ -0,0 +1,692 @@ +#!/usr/bin/env node + +/* + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. + + Js-Beautify Command-line for node.js + ------------------------------------- + + Written by Daniel Stockman (daniel.stockman@gmail.com) + +*/ +/*jshint strict:false */ + +var debug = process.env.DEBUG_JSBEAUTIFY || process.env.JSBEAUTIFY_DEBUG ? function() { + console.error.apply(console, arguments); +} : function() {}; + +var fs = require('fs'), + cc = require('config-chain'), + beautify = require('../index'), + mkdirp = require('mkdirp'), + nopt = require('nopt'), + glob = require('glob'); + +nopt.invalidHandler = function(key, val) { + throw new Error(key + " was invalid with value \"" + val + "\""); +}; + +nopt.typeDefs.brace_style = { + type: "brace_style", + validate: function(data, key, val) { + data[key] = val; + // TODO: expand-strict is obsolete, now identical to expand. Remove in future version + // TODO: collapse-preserve-inline is obselete, now identical to collapse,preserve-inline = true. Remove in future version + var validVals = ["collapse", "collapse-preserve-inline", "expand", "end-expand", "expand-strict", "none", "preserve-inline"]; + var valSplit = val.split(/[^a-zA-Z0-9_\-]+/); //Split will always return at least one parameter + for (var i = 0; i < valSplit.length; i++) { + if (validVals.indexOf(valSplit[i]) === -1) { + return false; + } + } + return true; + } +}; +var path = require('path'), + editorconfig = require('editorconfig'), + knownOpts = { + // Beautifier + "indent_size": Number, + "indent_char": String, + "eol": String, + "indent_level": Number, + "indent_with_tabs": Boolean, + "preserve_newlines": Boolean, + "max_preserve_newlines": Number, + "space_in_paren": Boolean, + "space_in_empty_paren": Boolean, + "jslint_happy": Boolean, + "space_after_anon_function": Boolean, + "space_after_named_function": Boolean, + "brace_style": "brace_style", //See above for validation + "unindent_chained_methods": Boolean, + "break_chained_methods": Boolean, + "keep_array_indentation": Boolean, + "unescape_strings": Boolean, + "wrap_line_length": Number, + "wrap_attributes": ["auto", "force", "force-aligned", "force-expand-multiline", "aligned-multiple", "preserve", "preserve-aligned"], + "wrap_attributes_indent_size": Number, + "e4x": Boolean, + "end_with_newline": Boolean, + "comma_first": Boolean, + "operator_position": ["before-newline", "after-newline", "preserve-newline"], + "indent_empty_lines": Boolean, + "templating": [String, Array], + // CSS-only + "selector_separator_newline": Boolean, + "newline_between_rules": Boolean, + "space_around_combinator": Boolean, + //deprecated - replaced with space_around_combinator, remove in future version + "space_around_selector_separator": Boolean, + // HTML-only + "max_char": Number, // obsolete since 1.3.5 + "inline": [String, Array], + "unformatted": [String, Array], + "content_unformatted": [String, Array], + "indent_inner_html": [Boolean], + "indent_handlebars": [Boolean], + "indent_scripts": ["keep", "separate", "normal"], + "extra_liners": [String, Array], + "unformatted_content_delimiter": String, + // CLI + "version": Boolean, + "help": Boolean, + "files": [path, Array], + "outfile": path, + "replace": Boolean, + "quiet": Boolean, + "type": ["js", "css", "html"], + "config": path, + "editorconfig": Boolean + }, + // dasherizeShorthands provides { "indent-size": ["--indent_size"] } + // translation, allowing more convenient dashes in CLI arguments + shortHands = dasherizeShorthands({ + // Beautifier + "s": ["--indent_size"], + "c": ["--indent_char"], + "e": ["--eol"], + "l": ["--indent_level"], + "t": ["--indent_with_tabs"], + "p": ["--preserve_newlines"], + "m": ["--max_preserve_newlines"], + "P": ["--space_in_paren"], + "Q": ["--space_in_empty_paren"], + "j": ["--jslint_happy"], + "a": ["--space_after_anon_function"], + "b": ["--brace_style"], + "u": ["--unindent_chained_methods"], + "B": ["--break_chained_methods"], + "k": ["--keep_array_indentation"], + "x": ["--unescape_strings"], + "w": ["--wrap_line_length"], + "X": ["--e4x"], + "n": ["--end_with_newline"], + "C": ["--comma_first"], + "O": ["--operator_position"], + // CSS-only + "L": ["--selector_separator_newline"], + "N": ["--newline_between_rules"], + // HTML-only + "A": ["--wrap_attributes"], + "i": ["--wrap_attributes_indent_size"], + "W": ["--max_char"], // obsolete since 1.3.5 + "d": ["--inline"], + "U": ["--unformatted"], + "T": ["--content_unformatted"], + "I": ["--indent_inner_html"], + "H": ["--indent_handlebars"], + "S": ["--indent_scripts"], + "E": ["--extra_liners"], + // non-dasherized hybrid shortcuts + "good-stuff": [ + "--keep_array_indentation", + "--keep_function_indentation", + "--jslint_happy" + ], + "js": ["--type", "js"], + "css": ["--type", "css"], + "html": ["--type", "html"], + // CLI + "v": ["--version"], + "h": ["--help"], + "f": ["--files"], + "file": ["--files"], + "o": ["--outfile"], + "r": ["--replace"], + "q": ["--quiet"] + // no shorthand for "config" + // no shorthand for "editorconfig" + // no shorthand for "indent_empty_lines" + // not shorthad for "templating" + }); + +function verifyExists(fullPath) { + return fs.existsSync(fullPath) ? fullPath : null; +} + +function findRecursive(dir, fileName) { + var fullPath = path.join(dir, fileName); + var nextDir = path.dirname(dir); + var result = verifyExists(fullPath); + + if (!result && (nextDir !== dir)) { + result = findRecursive(nextDir, fileName); + } + + return result; +} + +function getUserHome() { + var user_home = ''; + try { + user_home = process.env.USERPROFILE || process.env.HOME || ''; + } catch (ex) {} + return user_home; +} + +function set_file_editorconfig_opts(file, config) { + try { + var eConfigs = editorconfig.parseSync(file); + + if (eConfigs.indent_style === "tab") { + config.indent_with_tabs = true; + } else if (eConfigs.indent_style === "space") { + config.indent_with_tabs = false; + } + + if (eConfigs.indent_size) { + config.indent_size = eConfigs.indent_size; + } + + if (eConfigs.max_line_length) { + if (eConfigs.max_line_length === "off") { + config.wrap_line_length = 0; + } else { + config.wrap_line_length = parseInt(eConfigs.max_line_length, 10); + } + } + + if (eConfigs.insert_final_newline === true) { + config.end_with_newline = true; + } else if (eConfigs.insert_final_newline === false) { + config.end_with_newline = false; + } + + if (eConfigs.end_of_line) { + if (eConfigs.end_of_line === 'cr') { + config.eol = '\r'; + } else if (eConfigs.end_of_line === 'lf') { + config.eol = '\n'; + } else if (eConfigs.end_of_line === 'crlf') { + config.eol = '\r\n'; + } + } + } catch (e) { + debug(e); + } +} + +// var cli = require('js-beautify/cli'); cli.interpret(); +var interpret = exports.interpret = function(argv, slice) { + var parsed; + try { + parsed = nopt(knownOpts, shortHands, argv, slice); + } catch (ex) { + usage(ex); + // console.error(ex); + // console.error('Run `' + getScriptName() + ' -h` for help.'); + process.exit(1); + } + + + if (parsed.version) { + console.log(require('../../package.json').version); + process.exit(0); + } else if (parsed.help) { + usage(); + process.exit(0); + } + + var cfg; + var configRecursive = findRecursive(process.cwd(), '.jsbeautifyrc'); + var configHome = verifyExists(path.join(getUserHome() || "", ".jsbeautifyrc")); + var configDefault = __dirname + '/../config/defaults.json'; + + try { + cfg = cc( + parsed, + cleanOptions(cc.env('jsbeautify_'), knownOpts), + parsed.config, + configRecursive, + configHome, + configDefault + ).snapshot; + } catch (ex) { + debug(cfg); + // usage(ex); + console.error(ex); + console.error('Error while loading beautifier configuration.'); + console.error('Configuration file chain included:'); + if (parsed.config) { + console.error(parsed.config); + } + if (configRecursive) { + console.error(configRecursive); + } + if (configHome) { + console.error(configHome); + } + console.error(configDefault); + console.error('Run `' + getScriptName() + ' -h` for help.'); + process.exit(1); + } + + try { + // Verify arguments + checkType(cfg); + checkFiles(cfg); + debug(cfg); + + // Process files synchronously to avoid EMFILE error + cfg.files.forEach(processInputSync, { + cfg: cfg + }); + } catch (ex) { + debug(cfg); + // usage(ex); + console.error(ex); + console.error('Run `' + getScriptName() + ' -h` for help.'); + process.exit(1); + } +}; + +// interpret args immediately when called as executable +if (require.main === module) { + interpret(); +} + +function usage(err) { + var scriptName = getScriptName(); + var msg = [ + scriptName + '@' + require('../../package.json').version, + '', + 'CLI Options:', + ' -f, --file Input file(s) (Pass \'-\' for stdin)', + ' -r, --replace Write output in-place, replacing input', + ' -o, --outfile Write output to file (default stdout)', + ' --config Path to config file', + ' --type [js|css|html] ["js"]', + ' -q, --quiet Suppress logging to stdout', + ' -h, --help Show this help', + ' -v, --version Show the version', + '', + 'Beautifier Options:', + ' -s, --indent-size Indentation size [4]', + ' -c, --indent-char Indentation character [" "]', + ' -t, --indent-with-tabs Indent with tabs, overrides -s and -c', + ' -e, --eol Character(s) to use as line terminators.', + ' [first newline in file, otherwise "\\n]', + ' -n, --end-with-newline End output with newline', + ' --indent-empty-lines Keep indentation on empty lines', + ' --templating List of templating languages (auto,none,django,erb,handlebars,php) ["auto"] auto = none in JavaScript, all in html', + ' --editorconfig Use EditorConfig to set up the options' + ]; + + switch (scriptName.split('-').shift()) { + case "js": + msg.push(' -l, --indent-level Initial indentation level [0]'); + msg.push(' -p, --preserve-newlines Preserve line-breaks (--no-preserve-newlines disables)'); + msg.push(' -m, --max-preserve-newlines Number of line-breaks to be preserved in one chunk [10]'); + msg.push(' -P, --space-in-paren Add padding spaces within paren, ie. f( a, b )'); + msg.push(' -E, --space-in-empty-paren Add a single space inside empty paren, ie. f( )'); + msg.push(' -j, --jslint-happy Enable jslint-stricter mode'); + msg.push(' -a, --space-after-anon-function Add a space before an anonymous function\'s parens, ie. function ()'); + msg.push(' --space_after_named_function Add a space before a named function\'s parens, ie. function example ()'); + msg.push(' -b, --brace-style [collapse|expand|end-expand|none][,preserve-inline] [collapse,preserve-inline]'); + msg.push(' -u, --unindent-chained-methods Don\'t indent chained method calls'); + msg.push(' -B, --break-chained-methods Break chained method calls across subsequent lines'); + msg.push(' -k, --keep-array-indentation Preserve array indentation'); + msg.push(' -x, --unescape-strings Decode printable characters encoded in xNN notation'); + msg.push(' -w, --wrap-line-length Wrap lines that exceed N characters [0]'); + msg.push(' -X, --e4x Pass E4X xml literals through untouched'); + msg.push(' --good-stuff Warm the cockles of Crockford\'s heart'); + msg.push(' -C, --comma-first Put commas at the beginning of new line instead of end'); + msg.push(' -O, --operator-position Set operator position (before-newline|after-newline|preserve-newline) [before-newline]'); + break; + case "html": + msg.push(' -b, --brace-style [collapse|expand|end-expand] ["collapse"]'); + msg.push(' -I, --indent-inner-html Indent body and head sections. Default is false.'); + msg.push(' -H, --indent-handlebars Indent handlebars. Default is false.'); + msg.push(' -S, --indent-scripts [keep|separate|normal] ["normal"]'); + msg.push(' -w, --wrap-line-length Wrap lines that exceed N characters [0]'); + msg.push(' -A, --wrap-attributes Wrap html tag attributes to new lines [auto|force|force-aligned|force-expand-multiline|aligned-multiple|preserve|preserve-aligned] ["auto"]'); + msg.push(' -i, --wrap-attributes-indent-size Indent wrapped tags to after N characters [indent-level]'); + msg.push(' -p, --preserve-newlines Preserve line-breaks (--no-preserve-newlines disables)'); + msg.push(' -m, --max-preserve-newlines Number of line-breaks to be preserved in one chunk [10]'); + msg.push(' -U, --unformatted List of tags (defaults to inline) that should not be reformatted'); + msg.push(' -T, --content_unformatted List of tags (defaults to pre) whose content should not be reformatted'); + msg.push(' -E, --extra_liners List of tags (defaults to [head,body,/html] that should have an extra newline'); + msg.push(' --unformatted_content_delimiter Keep text content together between this string [""]'); + break; + case "css": + msg.push(' -L, --selector-separator-newline Add a newline between multiple selectors.'); + msg.push(' -N, --newline-between-rules Add a newline between CSS rules.'); + } + + if (err) { + msg.push(err); + msg.push(''); + console.error(msg.join('\n')); + } else { + console.log(msg.join('\n')); + } +} + +// main iterator, {cfg} passed as thisArg of forEach call + +function processInputSync(filepath) { + var data = null, + config = this.cfg, + outfile = config.outfile, + input; + + // -o passed with no value overwrites + if (outfile === true || config.replace) { + outfile = filepath; + } + + var fileType = getOutputType(outfile, filepath, config.type); + + if (config.editorconfig) { + var editorconfig_filepath = filepath; + + if (editorconfig_filepath === '-') { + if (outfile) { + editorconfig_filepath = outfile; + } else { + editorconfig_filepath = 'stdin.' + fileType; + } + } + + debug("EditorConfig is enabled for ", editorconfig_filepath); + config = cc(config).snapshot; + set_file_editorconfig_opts(editorconfig_filepath, config); + debug(config); + } + + if (filepath === '-') { + input = process.stdin; + + input.setEncoding('utf8'); + + input.on('error', function() { + throw 'Must pipe input or define at least one file.'; + }); + + input.on('data', function(chunk) { + data = data || ''; + data += chunk; + }); + + input.on('end', function() { + if (data === null) { + throw 'Must pipe input or define at least one file.'; + } + makePretty(fileType, data, config, outfile, writePretty); // Where things get beautified + }); + + input.resume(); + + } else { + data = fs.readFileSync(filepath, 'utf8'); + makePretty(fileType, data, config, outfile, writePretty); + } +} + +function makePretty(fileType, code, config, outfile, callback) { + try { + var pretty = beautify[fileType](code, config); + + callback(null, pretty, outfile, config); + } catch (ex) { + callback(ex); + } +} + +function writePretty(err, pretty, outfile, config) { + debug('writing ' + outfile); + if (err) { + console.error(err); + process.exit(1); + } + + if (outfile) { + mkdirp.sync(path.dirname(outfile)); + + if (isFileDifferent(outfile, pretty)) { + try { + fs.writeFileSync(outfile, pretty, 'utf8'); + logToStdout('beautified ' + path.relative(process.cwd(), outfile), config); + } catch (ex) { + onOutputError(ex); + } + } else { + logToStdout('beautified ' + path.relative(process.cwd(), outfile) + ' - unchanged', config); + } + } else { + process.stdout.write(pretty); + } +} + +function isFileDifferent(filePath, expected) { + try { + return fs.readFileSync(filePath, 'utf8') !== expected; + } catch (ex) { + // failing to read is the same as different + return true; + } +} + +// workaround the fact that nopt.clean doesn't return the object passed in :P + +function cleanOptions(data, types) { + nopt.clean(data, types); + return data; +} + +// error handler for output stream that swallows errors silently, +// allowing the loop to continue over unwritable files. + +function onOutputError(err) { + if (err.code === 'EACCES') { + console.error(err.path + " is not writable. Skipping!"); + } else { + console.error(err); + process.exit(0); + } +} + +// turn "--foo_bar" into "foo-bar" + +function dasherizeFlag(str) { + return str.replace(/^\-+/, '').replace(/_/g, '-'); +} + +// translate weird python underscored keys into dashed argv, +// avoiding single character aliases. + +function dasherizeShorthands(hash) { + // operate in-place + Object.keys(hash).forEach(function(key) { + // each key value is an array + var val = hash[key][0]; + // only dasherize one-character shorthands + if (key.length === 1 && val.indexOf('_') > -1) { + hash[dasherizeFlag(val)] = val; + } + }); + + return hash; +} + +function getOutputType(outfile, filepath, configType) { + if (outfile && /\.(js|css|html)$/.test(outfile)) { + return outfile.split('.').pop(); + } else if (filepath !== '-' && /\.(js|css|html)$/.test(filepath)) { + return filepath.split('.').pop(); + } else if (configType) { + return configType; + } else { + throw 'Could not determine appropriate beautifier from file paths: ' + filepath; + } +} + +function getScriptName() { + return path.basename(process.argv[1]); +} + +function checkType(parsed) { + var scriptType = getScriptName().split('-').shift(); + if (!/^(js|css|html)$/.test(scriptType)) { + scriptType = null; + } + + debug("executable type:", scriptType); + + var parsedType = parsed.type; + debug("parsed type:", parsedType); + + if (!parsedType) { + debug("type defaulted:", scriptType); + parsed.type = scriptType; + } +} + +function checkFiles(parsed) { + var argv = parsed.argv; + var isTTY = true; + var file_params = parsed.files || []; + var hadGlob = false; + + try { + isTTY = process.stdin.isTTY; + } catch (ex) { + debug("error querying for isTTY:", ex); + } + + debug('isTTY: ' + isTTY); + + // assume any remaining args are files + file_params = file_params.concat(argv.remain); + + parsed.files = []; + // assume any remaining args are files + file_params.forEach(function(f) { + // strip stdin path eagerly added by nopt in '-f -' case + if (f === '-') { + return; + } + + var foundFiles = []; + var isGlob = glob.hasMagic(f); + + // Input was a glob + if (isGlob) { + hadGlob = true; + foundFiles = glob(f, { + sync: true, + absolute: true, + ignore: ['**/node_modules/**', '**/.git/**'] + }); + } else { + // Input was not a glob, add it to an array so we are able to handle it in the same loop below + try { + testFilePath(f); + } catch (err) { + // if file is not found, and the resolved path indicates stdin marker + if (path.parse(f).base === '-') { + f = '-'; + } else { + throw err; + } + } + foundFiles = [f]; + } + + if (foundFiles && foundFiles.length) { + // Add files to the parsed.files if it didn't exist in the array yet + foundFiles.forEach(function(file) { + var filePath = path.resolve(file); + if (file === '-') { // case of stdin + parsed.files.push(file); + } else if (parsed.files.indexOf(filePath) === -1) { + parsed.files.push(filePath); + } + }); + } + }); + + if ('string' === typeof parsed.outfile && isTTY && !parsed.files.length) { + testFilePath(parsed.outfile); + // use outfile as input when no other files passed in args + parsed.files.push(parsed.outfile); + // operation is now an implicit overwrite + parsed.replace = true; + } + + if (hadGlob || parsed.files.length > 1) { + parsed.replace = true; + } + + if (!parsed.files.length && !hadGlob) { + // read stdin by default + parsed.files.push('-'); + } + + debug('files.length ' + parsed.files.length); + + if (parsed.files.indexOf('-') > -1 && isTTY && !hadGlob) { + throw 'Must pipe input or define at least one file.'; + } + + return parsed; +} + +function testFilePath(filepath) { + try { + if (filepath !== "-") { + fs.statSync(filepath); + } + } catch (err) { + throw 'Unable to open path "' + filepath + '"'; + } +} + +function logToStdout(str, config) { + if (typeof config.quiet === "undefined" || !config.quiet) { + console.log(str); + } +} \ No newline at end of file diff --git a/node_modules/js-beautify/js/src/core/directives.js b/node_modules/js-beautify/js/src/core/directives.js new file mode 100644 index 00000000..48b161ee --- /dev/null +++ b/node_modules/js-beautify/js/src/core/directives.js @@ -0,0 +1,62 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +function Directives(start_block_pattern, end_block_pattern) { + start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source; + end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source; + this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \w+[:]\w+)+ /.source + end_block_pattern, 'g'); + this.__directive_pattern = / (\w+)[:](\w+)/g; + + this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\sbeautify\signore:end\s/.source + end_block_pattern, 'g'); +} + +Directives.prototype.get_directives = function(text) { + if (!text.match(this.__directives_block_pattern)) { + return null; + } + + var directives = {}; + this.__directive_pattern.lastIndex = 0; + var directive_match = this.__directive_pattern.exec(text); + + while (directive_match) { + directives[directive_match[1]] = directive_match[2]; + directive_match = this.__directive_pattern.exec(text); + } + + return directives; +}; + +Directives.prototype.readIgnored = function(input) { + return input.readUntilAfter(this.__directives_end_ignore_pattern); +}; + + +module.exports.Directives = Directives; diff --git a/node_modules/js-beautify/js/src/core/inputscanner.js b/node_modules/js-beautify/js/src/core/inputscanner.js new file mode 100644 index 00000000..f99bf59d --- /dev/null +++ b/node_modules/js-beautify/js/src/core/inputscanner.js @@ -0,0 +1,192 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky'); + +function InputScanner(input_string) { + this.__input = input_string || ''; + this.__input_length = this.__input.length; + this.__position = 0; +} + +InputScanner.prototype.restart = function() { + this.__position = 0; +}; + +InputScanner.prototype.back = function() { + if (this.__position > 0) { + this.__position -= 1; + } +}; + +InputScanner.prototype.hasNext = function() { + return this.__position < this.__input_length; +}; + +InputScanner.prototype.next = function() { + var val = null; + if (this.hasNext()) { + val = this.__input.charAt(this.__position); + this.__position += 1; + } + return val; +}; + +InputScanner.prototype.peek = function(index) { + var val = null; + index = index || 0; + index += this.__position; + if (index >= 0 && index < this.__input_length) { + val = this.__input.charAt(index); + } + return val; +}; + +// This is a JavaScript only helper function (not in python) +// Javascript doesn't have a match method +// and not all implementation support "sticky" flag. +// If they do not support sticky then both this.match() and this.test() method +// must get the match and check the index of the match. +// If sticky is supported and set, this method will use it. +// Otherwise it will check that global is set, and fall back to the slower method. +InputScanner.prototype.__match = function(pattern, index) { + pattern.lastIndex = index; + var pattern_match = pattern.exec(this.__input); + + if (pattern_match && !(regexp_has_sticky && pattern.sticky)) { + if (pattern_match.index !== index) { + pattern_match = null; + } + } + + return pattern_match; +}; + +InputScanner.prototype.test = function(pattern, index) { + index = index || 0; + index += this.__position; + + if (index >= 0 && index < this.__input_length) { + return !!this.__match(pattern, index); + } else { + return false; + } +}; + +InputScanner.prototype.testChar = function(pattern, index) { + // test one character regex match + var val = this.peek(index); + pattern.lastIndex = 0; + return val !== null && pattern.test(val); +}; + +InputScanner.prototype.match = function(pattern) { + var pattern_match = this.__match(pattern, this.__position); + if (pattern_match) { + this.__position += pattern_match[0].length; + } else { + pattern_match = null; + } + return pattern_match; +}; + +InputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) { + var val = ''; + var match; + if (starting_pattern) { + match = this.match(starting_pattern); + if (match) { + val += match[0]; + } + } + if (until_pattern && (match || !starting_pattern)) { + val += this.readUntil(until_pattern, until_after); + } + return val; +}; + +InputScanner.prototype.readUntil = function(pattern, until_after) { + var val = ''; + var match_index = this.__position; + pattern.lastIndex = this.__position; + var pattern_match = pattern.exec(this.__input); + if (pattern_match) { + match_index = pattern_match.index; + if (until_after) { + match_index += pattern_match[0].length; + } + } else { + match_index = this.__input_length; + } + + val = this.__input.substring(this.__position, match_index); + this.__position = match_index; + return val; +}; + +InputScanner.prototype.readUntilAfter = function(pattern) { + return this.readUntil(pattern, true); +}; + +InputScanner.prototype.get_regexp = function(pattern, match_from) { + var result = null; + var flags = 'g'; + if (match_from && regexp_has_sticky) { + flags = 'y'; + } + // strings are converted to regexp + if (typeof pattern === "string" && pattern !== '') { + // result = new RegExp(pattern.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), flags); + result = new RegExp(pattern, flags); + } else if (pattern) { + result = new RegExp(pattern.source, flags); + } + return result; +}; + +InputScanner.prototype.get_literal_regexp = function(literal_string) { + return RegExp(literal_string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')); +}; + +/* css beautifier legacy helpers */ +InputScanner.prototype.peekUntilAfter = function(pattern) { + var start = this.__position; + var val = this.readUntilAfter(pattern); + this.__position = start; + return val; +}; + +InputScanner.prototype.lookBack = function(testVal) { + var start = this.__position - 1; + return start >= testVal.length && this.__input.substring(start - testVal.length, start) + .toLowerCase() === testVal; +}; + +module.exports.InputScanner = InputScanner; diff --git a/node_modules/js-beautify/js/src/core/options.js b/node_modules/js-beautify/js/src/core/options.js new file mode 100644 index 00000000..4db19d7e --- /dev/null +++ b/node_modules/js-beautify/js/src/core/options.js @@ -0,0 +1,193 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +function Options(options, merge_child_field) { + this.raw_options = _mergeOpts(options, merge_child_field); + + // Support passing the source text back with no change + this.disabled = this._get_boolean('disabled'); + + this.eol = this._get_characters('eol', 'auto'); + this.end_with_newline = this._get_boolean('end_with_newline'); + this.indent_size = this._get_number('indent_size', 4); + this.indent_char = this._get_characters('indent_char', ' '); + this.indent_level = this._get_number('indent_level'); + + this.preserve_newlines = this._get_boolean('preserve_newlines', true); + this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786); + if (!this.preserve_newlines) { + this.max_preserve_newlines = 0; + } + + this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\t'); + if (this.indent_with_tabs) { + this.indent_char = '\t'; + + // indent_size behavior changed after 1.8.6 + // It used to be that indent_size would be + // set to 1 for indent_with_tabs. That is no longer needed and + // actually doesn't make sense - why not use spaces? Further, + // that might produce unexpected behavior - tabs being used + // for single-column alignment. So, when indent_with_tabs is true + // and indent_size is 1, reset indent_size to 4. + if (this.indent_size === 1) { + this.indent_size = 4; + } + } + + // Backwards compat with 1.3.x + this.wrap_line_length = this._get_number('wrap_line_length', this._get_number('max_char')); + + this.indent_empty_lines = this._get_boolean('indent_empty_lines'); + + // valid templating languages ['django', 'erb', 'handlebars', 'php'] + // For now, 'auto' = all off for javascript, all on for html (and inline javascript). + // other values ignored + this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php'], ['auto']); +} + +Options.prototype._get_array = function(name, default_value) { + var option_value = this.raw_options[name]; + var result = default_value || []; + if (typeof option_value === 'object') { + if (option_value !== null && typeof option_value.concat === 'function') { + result = option_value.concat(); + } + } else if (typeof option_value === 'string') { + result = option_value.split(/[^a-zA-Z0-9_\/\-]+/); + } + return result; +}; + +Options.prototype._get_boolean = function(name, default_value) { + var option_value = this.raw_options[name]; + var result = option_value === undefined ? !!default_value : !!option_value; + return result; +}; + +Options.prototype._get_characters = function(name, default_value) { + var option_value = this.raw_options[name]; + var result = default_value || ''; + if (typeof option_value === 'string') { + result = option_value.replace(/\\r/, '\r').replace(/\\n/, '\n').replace(/\\t/, '\t'); + } + return result; +}; + +Options.prototype._get_number = function(name, default_value) { + var option_value = this.raw_options[name]; + default_value = parseInt(default_value, 10); + if (isNaN(default_value)) { + default_value = 0; + } + var result = parseInt(option_value, 10); + if (isNaN(result)) { + result = default_value; + } + return result; +}; + +Options.prototype._get_selection = function(name, selection_list, default_value) { + var result = this._get_selection_list(name, selection_list, default_value); + if (result.length !== 1) { + throw new Error( + "Invalid Option Value: The option '" + name + "' can only be one of the following values:\n" + + selection_list + "\nYou passed in: '" + this.raw_options[name] + "'"); + } + + return result[0]; +}; + + +Options.prototype._get_selection_list = function(name, selection_list, default_value) { + if (!selection_list || selection_list.length === 0) { + throw new Error("Selection list cannot be empty."); + } + + default_value = default_value || [selection_list[0]]; + if (!this._is_valid_selection(default_value, selection_list)) { + throw new Error("Invalid Default Value!"); + } + + var result = this._get_array(name, default_value); + if (!this._is_valid_selection(result, selection_list)) { + throw new Error( + "Invalid Option Value: The option '" + name + "' can contain only the following values:\n" + + selection_list + "\nYou passed in: '" + this.raw_options[name] + "'"); + } + + return result; +}; + +Options.prototype._is_valid_selection = function(result, selection_list) { + return result.length && selection_list.length && + !result.some(function(item) { return selection_list.indexOf(item) === -1; }); +}; + + +// merges child options up with the parent options object +// Example: obj = {a: 1, b: {a: 2}} +// mergeOpts(obj, 'b') +// +// Returns: {a: 2} +function _mergeOpts(allOptions, childFieldName) { + var finalOpts = {}; + allOptions = _normalizeOpts(allOptions); + var name; + + for (name in allOptions) { + if (name !== childFieldName) { + finalOpts[name] = allOptions[name]; + } + } + + //merge in the per type settings for the childFieldName + if (childFieldName && allOptions[childFieldName]) { + for (name in allOptions[childFieldName]) { + finalOpts[name] = allOptions[childFieldName][name]; + } + } + return finalOpts; +} + +function _normalizeOpts(options) { + var convertedOpts = {}; + var key; + + for (key in options) { + var newKey = key.replace(/-/g, "_"); + convertedOpts[newKey] = options[key]; + } + return convertedOpts; +} + +module.exports.Options = Options; +module.exports.normalizeOpts = _normalizeOpts; +module.exports.mergeOpts = _mergeOpts; diff --git a/node_modules/js-beautify/js/src/core/output.js b/node_modules/js-beautify/js/src/core/output.js new file mode 100644 index 00000000..99b4e0e8 --- /dev/null +++ b/node_modules/js-beautify/js/src/core/output.js @@ -0,0 +1,419 @@ +/*jshint node:true */ +/* + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +function OutputLine(parent) { + this.__parent = parent; + this.__character_count = 0; + // use indent_count as a marker for this.__lines that have preserved indentation + this.__indent_count = -1; + this.__alignment_count = 0; + this.__wrap_point_index = 0; + this.__wrap_point_character_count = 0; + this.__wrap_point_indent_count = -1; + this.__wrap_point_alignment_count = 0; + + this.__items = []; +} + +OutputLine.prototype.clone_empty = function() { + var line = new OutputLine(this.__parent); + line.set_indent(this.__indent_count, this.__alignment_count); + return line; +}; + +OutputLine.prototype.item = function(index) { + if (index < 0) { + return this.__items[this.__items.length + index]; + } else { + return this.__items[index]; + } +}; + +OutputLine.prototype.has_match = function(pattern) { + for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) { + if (this.__items[lastCheckedOutput].match(pattern)) { + return true; + } + } + return false; +}; + +OutputLine.prototype.set_indent = function(indent, alignment) { + if (this.is_empty()) { + this.__indent_count = indent || 0; + this.__alignment_count = alignment || 0; + this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count); + } +}; + +OutputLine.prototype._set_wrap_point = function() { + if (this.__parent.wrap_line_length) { + this.__wrap_point_index = this.__items.length; + this.__wrap_point_character_count = this.__character_count; + this.__wrap_point_indent_count = this.__parent.next_line.__indent_count; + this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count; + } +}; + +OutputLine.prototype._should_wrap = function() { + return this.__wrap_point_index && + this.__character_count > this.__parent.wrap_line_length && + this.__wrap_point_character_count > this.__parent.next_line.__character_count; +}; + +OutputLine.prototype._allow_wrap = function() { + if (this._should_wrap()) { + this.__parent.add_new_line(); + var next = this.__parent.current_line; + next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count); + next.__items = this.__items.slice(this.__wrap_point_index); + this.__items = this.__items.slice(0, this.__wrap_point_index); + + next.__character_count += this.__character_count - this.__wrap_point_character_count; + this.__character_count = this.__wrap_point_character_count; + + if (next.__items[0] === " ") { + next.__items.splice(0, 1); + next.__character_count -= 1; + } + return true; + } + return false; +}; + +OutputLine.prototype.is_empty = function() { + return this.__items.length === 0; +}; + +OutputLine.prototype.last = function() { + if (!this.is_empty()) { + return this.__items[this.__items.length - 1]; + } else { + return null; + } +}; + +OutputLine.prototype.push = function(item) { + this.__items.push(item); + var last_newline_index = item.lastIndexOf('\n'); + if (last_newline_index !== -1) { + this.__character_count = item.length - last_newline_index; + } else { + this.__character_count += item.length; + } +}; + +OutputLine.prototype.pop = function() { + var item = null; + if (!this.is_empty()) { + item = this.__items.pop(); + this.__character_count -= item.length; + } + return item; +}; + + +OutputLine.prototype._remove_indent = function() { + if (this.__indent_count > 0) { + this.__indent_count -= 1; + this.__character_count -= this.__parent.indent_size; + } +}; + +OutputLine.prototype._remove_wrap_indent = function() { + if (this.__wrap_point_indent_count > 0) { + this.__wrap_point_indent_count -= 1; + } +}; +OutputLine.prototype.trim = function() { + while (this.last() === ' ') { + this.__items.pop(); + this.__character_count -= 1; + } +}; + +OutputLine.prototype.toString = function() { + var result = ''; + if (this.is_empty()) { + if (this.__parent.indent_empty_lines) { + result = this.__parent.get_indent_string(this.__indent_count); + } + } else { + result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count); + result += this.__items.join(''); + } + return result; +}; + +function IndentStringCache(options, baseIndentString) { + this.__cache = ['']; + this.__indent_size = options.indent_size; + this.__indent_string = options.indent_char; + if (!options.indent_with_tabs) { + this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char); + } + + // Set to null to continue support for auto detection of base indent + baseIndentString = baseIndentString || ''; + if (options.indent_level > 0) { + baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string); + } + + this.__base_string = baseIndentString; + this.__base_string_length = baseIndentString.length; +} + +IndentStringCache.prototype.get_indent_size = function(indent, column) { + var result = this.__base_string_length; + column = column || 0; + if (indent < 0) { + result = 0; + } + result += indent * this.__indent_size; + result += column; + return result; +}; + +IndentStringCache.prototype.get_indent_string = function(indent_level, column) { + var result = this.__base_string; + column = column || 0; + if (indent_level < 0) { + indent_level = 0; + result = ''; + } + column += indent_level * this.__indent_size; + this.__ensure_cache(column); + result += this.__cache[column]; + return result; +}; + +IndentStringCache.prototype.__ensure_cache = function(column) { + while (column >= this.__cache.length) { + this.__add_column(); + } +}; + +IndentStringCache.prototype.__add_column = function() { + var column = this.__cache.length; + var indent = 0; + var result = ''; + if (this.__indent_size && column >= this.__indent_size) { + indent = Math.floor(column / this.__indent_size); + column -= indent * this.__indent_size; + result = new Array(indent + 1).join(this.__indent_string); + } + if (column) { + result += new Array(column + 1).join(' '); + } + + this.__cache.push(result); +}; + +function Output(options, baseIndentString) { + this.__indent_cache = new IndentStringCache(options, baseIndentString); + this.raw = false; + this._end_with_newline = options.end_with_newline; + this.indent_size = options.indent_size; + this.wrap_line_length = options.wrap_line_length; + this.indent_empty_lines = options.indent_empty_lines; + this.__lines = []; + this.previous_line = null; + this.current_line = null; + this.next_line = new OutputLine(this); + this.space_before_token = false; + this.non_breaking_space = false; + this.previous_token_wrapped = false; + // initialize + this.__add_outputline(); +} + +Output.prototype.__add_outputline = function() { + this.previous_line = this.current_line; + this.current_line = this.next_line.clone_empty(); + this.__lines.push(this.current_line); +}; + +Output.prototype.get_line_number = function() { + return this.__lines.length; +}; + +Output.prototype.get_indent_string = function(indent, column) { + return this.__indent_cache.get_indent_string(indent, column); +}; + +Output.prototype.get_indent_size = function(indent, column) { + return this.__indent_cache.get_indent_size(indent, column); +}; + +Output.prototype.is_empty = function() { + return !this.previous_line && this.current_line.is_empty(); +}; + +Output.prototype.add_new_line = function(force_newline) { + // never newline at the start of file + // otherwise, newline only if we didn't just add one or we're forced + if (this.is_empty() || + (!force_newline && this.just_added_newline())) { + return false; + } + + // if raw output is enabled, don't print additional newlines, + // but still return True as though you had + if (!this.raw) { + this.__add_outputline(); + } + return true; +}; + +Output.prototype.get_code = function(eol) { + this.trim(true); + + // handle some edge cases where the last tokens + // has text that ends with newline(s) + var last_item = this.current_line.pop(); + if (last_item) { + if (last_item[last_item.length - 1] === '\n') { + last_item = last_item.replace(/\n+$/g, ''); + } + this.current_line.push(last_item); + } + + if (this._end_with_newline) { + this.__add_outputline(); + } + + var sweet_code = this.__lines.join('\n'); + + if (eol !== '\n') { + sweet_code = sweet_code.replace(/[\n]/g, eol); + } + return sweet_code; +}; + +Output.prototype.set_wrap_point = function() { + this.current_line._set_wrap_point(); +}; + +Output.prototype.set_indent = function(indent, alignment) { + indent = indent || 0; + alignment = alignment || 0; + + // Next line stores alignment values + this.next_line.set_indent(indent, alignment); + + // Never indent your first output indent at the start of the file + if (this.__lines.length > 1) { + this.current_line.set_indent(indent, alignment); + return true; + } + + this.current_line.set_indent(); + return false; +}; + +Output.prototype.add_raw_token = function(token) { + for (var x = 0; x < token.newlines; x++) { + this.__add_outputline(); + } + this.current_line.set_indent(-1); + this.current_line.push(token.whitespace_before); + this.current_line.push(token.text); + this.space_before_token = false; + this.non_breaking_space = false; + this.previous_token_wrapped = false; +}; + +Output.prototype.add_token = function(printable_token) { + this.__add_space_before_token(); + this.current_line.push(printable_token); + this.space_before_token = false; + this.non_breaking_space = false; + this.previous_token_wrapped = this.current_line._allow_wrap(); +}; + +Output.prototype.__add_space_before_token = function() { + if (this.space_before_token && !this.just_added_newline()) { + if (!this.non_breaking_space) { + this.set_wrap_point(); + } + this.current_line.push(' '); + } +}; + +Output.prototype.remove_indent = function(index) { + var output_length = this.__lines.length; + while (index < output_length) { + this.__lines[index]._remove_indent(); + index++; + } + this.current_line._remove_wrap_indent(); +}; + +Output.prototype.trim = function(eat_newlines) { + eat_newlines = (eat_newlines === undefined) ? false : eat_newlines; + + this.current_line.trim(); + + while (eat_newlines && this.__lines.length > 1 && + this.current_line.is_empty()) { + this.__lines.pop(); + this.current_line = this.__lines[this.__lines.length - 1]; + this.current_line.trim(); + } + + this.previous_line = this.__lines.length > 1 ? + this.__lines[this.__lines.length - 2] : null; +}; + +Output.prototype.just_added_newline = function() { + return this.current_line.is_empty(); +}; + +Output.prototype.just_added_blankline = function() { + return this.is_empty() || + (this.current_line.is_empty() && this.previous_line.is_empty()); +}; + +Output.prototype.ensure_empty_line_above = function(starts_with, ends_with) { + var index = this.__lines.length - 2; + while (index >= 0) { + var potentialEmptyLine = this.__lines[index]; + if (potentialEmptyLine.is_empty()) { + break; + } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 && + potentialEmptyLine.item(-1) !== ends_with) { + this.__lines.splice(index + 1, 0, new OutputLine(this)); + this.previous_line = this.__lines[this.__lines.length - 2]; + break; + } + index--; + } +}; + +module.exports.Output = Output; diff --git a/node_modules/js-beautify/js/src/core/pattern.js b/node_modules/js-beautify/js/src/core/pattern.js new file mode 100644 index 00000000..efcdd341 --- /dev/null +++ b/node_modules/js-beautify/js/src/core/pattern.js @@ -0,0 +1,94 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +function Pattern(input_scanner, parent) { + this._input = input_scanner; + this._starting_pattern = null; + this._match_pattern = null; + this._until_pattern = null; + this._until_after = false; + + if (parent) { + this._starting_pattern = this._input.get_regexp(parent._starting_pattern, true); + this._match_pattern = this._input.get_regexp(parent._match_pattern, true); + this._until_pattern = this._input.get_regexp(parent._until_pattern); + this._until_after = parent._until_after; + } +} + +Pattern.prototype.read = function() { + var result = this._input.read(this._starting_pattern); + if (!this._starting_pattern || result) { + result += this._input.read(this._match_pattern, this._until_pattern, this._until_after); + } + return result; +}; + +Pattern.prototype.read_match = function() { + return this._input.match(this._match_pattern); +}; + +Pattern.prototype.until_after = function(pattern) { + var result = this._create(); + result._until_after = true; + result._until_pattern = this._input.get_regexp(pattern); + result._update(); + return result; +}; + +Pattern.prototype.until = function(pattern) { + var result = this._create(); + result._until_after = false; + result._until_pattern = this._input.get_regexp(pattern); + result._update(); + return result; +}; + +Pattern.prototype.starting_with = function(pattern) { + var result = this._create(); + result._starting_pattern = this._input.get_regexp(pattern, true); + result._update(); + return result; +}; + +Pattern.prototype.matching = function(pattern) { + var result = this._create(); + result._match_pattern = this._input.get_regexp(pattern, true); + result._update(); + return result; +}; + +Pattern.prototype._create = function() { + return new Pattern(this._input, this); +}; + +Pattern.prototype._update = function() {}; + +module.exports.Pattern = Pattern; diff --git a/node_modules/js-beautify/js/src/core/templatablepattern.js b/node_modules/js-beautify/js/src/core/templatablepattern.js new file mode 100644 index 00000000..f7bba7ba --- /dev/null +++ b/node_modules/js-beautify/js/src/core/templatablepattern.js @@ -0,0 +1,188 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var Pattern = require('./pattern').Pattern; + + +var template_names = { + django: false, + erb: false, + handlebars: false, + php: false +}; + +// This lets templates appear anywhere we would do a readUntil +// The cost is higher but it is pay to play. +function TemplatablePattern(input_scanner, parent) { + Pattern.call(this, input_scanner, parent); + this.__template_pattern = null; + this._disabled = Object.assign({}, template_names); + this._excluded = Object.assign({}, template_names); + + if (parent) { + this.__template_pattern = this._input.get_regexp(parent.__template_pattern); + this._excluded = Object.assign(this._excluded, parent._excluded); + this._disabled = Object.assign(this._disabled, parent._disabled); + } + var pattern = new Pattern(input_scanner); + this.__patterns = { + handlebars_comment: pattern.starting_with(/{{!--/).until_after(/--}}/), + handlebars: pattern.starting_with(/{{/).until_after(/}}/), + php: pattern.starting_with(/<\?(?:[=]|php)/).until_after(/\?>/), + erb: pattern.starting_with(/<%[^%]/).until_after(/[^%]%>/), + // django coflicts with handlebars a bit. + django: pattern.starting_with(/{%/).until_after(/%}/), + django_value: pattern.starting_with(/{{/).until_after(/}}/), + django_comment: pattern.starting_with(/{#/).until_after(/#}/) + }; +} +TemplatablePattern.prototype = new Pattern(); + +TemplatablePattern.prototype._create = function() { + return new TemplatablePattern(this._input, this); +}; + +TemplatablePattern.prototype._update = function() { + this.__set_templated_pattern(); +}; + +TemplatablePattern.prototype.disable = function(language) { + var result = this._create(); + result._disabled[language] = true; + result._update(); + return result; +}; + +TemplatablePattern.prototype.read_options = function(options) { + var result = this._create(); + for (var language in template_names) { + result._disabled[language] = options.templating.indexOf(language) === -1; + } + result._update(); + return result; +}; + +TemplatablePattern.prototype.exclude = function(language) { + var result = this._create(); + result._excluded[language] = true; + result._update(); + return result; +}; + +TemplatablePattern.prototype.read = function() { + var result = ''; + if (this._match_pattern) { + result = this._input.read(this._starting_pattern); + } else { + result = this._input.read(this._starting_pattern, this.__template_pattern); + } + var next = this._read_template(); + while (next) { + if (this._match_pattern) { + next += this._input.read(this._match_pattern); + } else { + next += this._input.readUntil(this.__template_pattern); + } + result += next; + next = this._read_template(); + } + + if (this._until_after) { + result += this._input.readUntilAfter(this._until_pattern); + } + return result; +}; + +TemplatablePattern.prototype.__set_templated_pattern = function() { + var items = []; + + if (!this._disabled.php) { + items.push(this.__patterns.php._starting_pattern.source); + } + if (!this._disabled.handlebars) { + items.push(this.__patterns.handlebars._starting_pattern.source); + } + if (!this._disabled.erb) { + items.push(this.__patterns.erb._starting_pattern.source); + } + if (!this._disabled.django) { + items.push(this.__patterns.django._starting_pattern.source); + items.push(this.__patterns.django_value._starting_pattern.source); + items.push(this.__patterns.django_comment._starting_pattern.source); + } + + if (this._until_pattern) { + items.push(this._until_pattern.source); + } + this.__template_pattern = this._input.get_regexp('(?:' + items.join('|') + ')'); +}; + +TemplatablePattern.prototype._read_template = function() { + var resulting_string = ''; + var c = this._input.peek(); + if (c === '<') { + var peek1 = this._input.peek(1); + //if we're in a comment, do something special + // We treat all comments as literals, even more than preformatted tags + // we just look for the appropriate close tag + if (!this._disabled.php && !this._excluded.php && peek1 === '?') { + resulting_string = resulting_string || + this.__patterns.php.read(); + } + if (!this._disabled.erb && !this._excluded.erb && peek1 === '%') { + resulting_string = resulting_string || + this.__patterns.erb.read(); + } + } else if (c === '{') { + if (!this._disabled.handlebars && !this._excluded.handlebars) { + resulting_string = resulting_string || + this.__patterns.handlebars_comment.read(); + resulting_string = resulting_string || + this.__patterns.handlebars.read(); + } + if (!this._disabled.django) { + // django coflicts with handlebars a bit. + if (!this._excluded.django && !this._excluded.handlebars) { + resulting_string = resulting_string || + this.__patterns.django_value.read(); + } + if (!this._excluded.django) { + resulting_string = resulting_string || + this.__patterns.django_comment.read(); + resulting_string = resulting_string || + this.__patterns.django.read(); + } + } + } + return resulting_string; +}; + + +module.exports.TemplatablePattern = TemplatablePattern; diff --git a/node_modules/js-beautify/js/src/core/token.js b/node_modules/js-beautify/js/src/core/token.js new file mode 100644 index 00000000..13f6e901 --- /dev/null +++ b/node_modules/js-beautify/js/src/core/token.js @@ -0,0 +1,54 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +function Token(type, text, newlines, whitespace_before) { + this.type = type; + this.text = text; + + // comments_before are + // comments that have a new line before them + // and may or may not have a newline after + // this is a set of comments before + this.comments_before = null; /* inline comment*/ + + + // this.comments_after = new TokenStream(); // no new line before and newline after + this.newlines = newlines || 0; + this.whitespace_before = whitespace_before || ''; + this.parent = null; + this.next = null; + this.previous = null; + this.opened = null; + this.closed = null; + this.directives = null; +} + + +module.exports.Token = Token; diff --git a/node_modules/js-beautify/js/src/core/tokenizer.js b/node_modules/js-beautify/js/src/core/tokenizer.js new file mode 100644 index 00000000..c6bef45e --- /dev/null +++ b/node_modules/js-beautify/js/src/core/tokenizer.js @@ -0,0 +1,140 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var InputScanner = require('../core/inputscanner').InputScanner; +var Token = require('../core/token').Token; +var TokenStream = require('../core/tokenstream').TokenStream; +var WhitespacePattern = require('./whitespacepattern').WhitespacePattern; + +var TOKEN = { + START: 'TK_START', + RAW: 'TK_RAW', + EOF: 'TK_EOF' +}; + +var Tokenizer = function(input_string, options) { + this._input = new InputScanner(input_string); + this._options = options || {}; + this.__tokens = null; + + this._patterns = {}; + this._patterns.whitespace = new WhitespacePattern(this._input); +}; + +Tokenizer.prototype.tokenize = function() { + this._input.restart(); + this.__tokens = new TokenStream(); + + this._reset(); + + var current; + var previous = new Token(TOKEN.START, ''); + var open_token = null; + var open_stack = []; + var comments = new TokenStream(); + + while (previous.type !== TOKEN.EOF) { + current = this._get_next_token(previous, open_token); + while (this._is_comment(current)) { + comments.add(current); + current = this._get_next_token(previous, open_token); + } + + if (!comments.isEmpty()) { + current.comments_before = comments; + comments = new TokenStream(); + } + + current.parent = open_token; + + if (this._is_opening(current)) { + open_stack.push(open_token); + open_token = current; + } else if (open_token && this._is_closing(current, open_token)) { + current.opened = open_token; + open_token.closed = current; + open_token = open_stack.pop(); + current.parent = open_token; + } + + current.previous = previous; + previous.next = current; + + this.__tokens.add(current); + previous = current; + } + + return this.__tokens; +}; + + +Tokenizer.prototype._is_first_token = function() { + return this.__tokens.isEmpty(); +}; + +Tokenizer.prototype._reset = function() {}; + +Tokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false + this._readWhitespace(); + var resulting_string = this._input.read(/.+/g); + if (resulting_string) { + return this._create_token(TOKEN.RAW, resulting_string); + } else { + return this._create_token(TOKEN.EOF, ''); + } +}; + +Tokenizer.prototype._is_comment = function(current_token) { // jshint unused:false + return false; +}; + +Tokenizer.prototype._is_opening = function(current_token) { // jshint unused:false + return false; +}; + +Tokenizer.prototype._is_closing = function(current_token, open_token) { // jshint unused:false + return false; +}; + +Tokenizer.prototype._create_token = function(type, text) { + var token = new Token(type, text, + this._patterns.whitespace.newline_count, + this._patterns.whitespace.whitespace_before_token); + return token; +}; + +Tokenizer.prototype._readWhitespace = function() { + return this._patterns.whitespace.read(); +}; + + + +module.exports.Tokenizer = Tokenizer; +module.exports.TOKEN = TOKEN; diff --git a/node_modules/js-beautify/js/src/core/tokenstream.js b/node_modules/js-beautify/js/src/core/tokenstream.js new file mode 100644 index 00000000..88302ffe --- /dev/null +++ b/node_modules/js-beautify/js/src/core/tokenstream.js @@ -0,0 +1,78 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +function TokenStream(parent_token) { + // private + this.__tokens = []; + this.__tokens_length = this.__tokens.length; + this.__position = 0; + this.__parent_token = parent_token; +} + +TokenStream.prototype.restart = function() { + this.__position = 0; +}; + +TokenStream.prototype.isEmpty = function() { + return this.__tokens_length === 0; +}; + +TokenStream.prototype.hasNext = function() { + return this.__position < this.__tokens_length; +}; + +TokenStream.prototype.next = function() { + var val = null; + if (this.hasNext()) { + val = this.__tokens[this.__position]; + this.__position += 1; + } + return val; +}; + +TokenStream.prototype.peek = function(index) { + var val = null; + index = index || 0; + index += this.__position; + if (index >= 0 && index < this.__tokens_length) { + val = this.__tokens[index]; + } + return val; +}; + +TokenStream.prototype.add = function(token) { + if (this.__parent_token) { + token.parent = this.__parent_token; + } + this.__tokens.push(token); + this.__tokens_length += 1; +}; + +module.exports.TokenStream = TokenStream; diff --git a/node_modules/js-beautify/js/src/core/whitespacepattern.js b/node_modules/js-beautify/js/src/core/whitespacepattern.js new file mode 100644 index 00000000..4faa57e4 --- /dev/null +++ b/node_modules/js-beautify/js/src/core/whitespacepattern.js @@ -0,0 +1,105 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var Pattern = require('../core/pattern').Pattern; + +function WhitespacePattern(input_scanner, parent) { + Pattern.call(this, input_scanner, parent); + if (parent) { + this._line_regexp = this._input.get_regexp(parent._line_regexp); + } else { + this.__set_whitespace_patterns('', ''); + } + + this.newline_count = 0; + this.whitespace_before_token = ''; +} +WhitespacePattern.prototype = new Pattern(); + +WhitespacePattern.prototype.__set_whitespace_patterns = function(whitespace_chars, newline_chars) { + whitespace_chars += '\\t '; + newline_chars += '\\n\\r'; + + this._match_pattern = this._input.get_regexp( + '[' + whitespace_chars + newline_chars + ']+', true); + this._newline_regexp = this._input.get_regexp( + '\\r\\n|[' + newline_chars + ']'); +}; + +WhitespacePattern.prototype.read = function() { + this.newline_count = 0; + this.whitespace_before_token = ''; + + var resulting_string = this._input.read(this._match_pattern); + if (resulting_string === ' ') { + this.whitespace_before_token = ' '; + } else if (resulting_string) { + var matches = this.__split(this._newline_regexp, resulting_string); + this.newline_count = matches.length - 1; + this.whitespace_before_token = matches[this.newline_count]; + } + + return resulting_string; +}; + +WhitespacePattern.prototype.matching = function(whitespace_chars, newline_chars) { + var result = this._create(); + result.__set_whitespace_patterns(whitespace_chars, newline_chars); + result._update(); + return result; +}; + +WhitespacePattern.prototype._create = function() { + return new WhitespacePattern(this._input, this); +}; + +WhitespacePattern.prototype.__split = function(regexp, input_string) { + regexp.lastIndex = 0; + var start_index = 0; + var result = []; + var next_match = regexp.exec(input_string); + while (next_match) { + result.push(input_string.substring(start_index, next_match.index)); + start_index = next_match.index + next_match[0].length; + next_match = regexp.exec(input_string); + } + + if (start_index < input_string.length) { + result.push(input_string.substring(start_index, input_string.length)); + } else { + result.push(''); + } + + return result; +}; + + + +module.exports.WhitespacePattern = WhitespacePattern; diff --git a/node_modules/js-beautify/js/src/css/beautifier.js b/node_modules/js-beautify/js/src/css/beautifier.js new file mode 100644 index 00000000..aeabb2c6 --- /dev/null +++ b/node_modules/js-beautify/js/src/css/beautifier.js @@ -0,0 +1,470 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var Options = require('./options').Options; +var Output = require('../core/output').Output; +var InputScanner = require('../core/inputscanner').InputScanner; +var Directives = require('../core/directives').Directives; + +var directives_core = new Directives(/\/\*/, /\*\//); + +var lineBreak = /\r\n|[\r\n]/; +var allLineBreaks = /\r\n|[\r\n]/g; + +// tokenizer +var whitespaceChar = /\s/; +var whitespacePattern = /(?:\s|\n)+/g; +var block_comment_pattern = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g; +var comment_pattern = /\/\/(?:[^\n\r\u2028\u2029]*)/g; + +function Beautifier(source_text, options) { + this._source_text = source_text || ''; + // Allow the setting of language/file-type specific options + // with inheritance of overall settings + this._options = new Options(options); + this._ch = null; + this._input = null; + + // https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule + this.NESTED_AT_RULE = { + "@page": true, + "@font-face": true, + "@keyframes": true, + // also in CONDITIONAL_GROUP_RULE below + "@media": true, + "@supports": true, + "@document": true + }; + this.CONDITIONAL_GROUP_RULE = { + "@media": true, + "@supports": true, + "@document": true + }; + +} + +Beautifier.prototype.eatString = function(endChars) { + var result = ''; + this._ch = this._input.next(); + while (this._ch) { + result += this._ch; + if (this._ch === "\\") { + result += this._input.next(); + } else if (endChars.indexOf(this._ch) !== -1 || this._ch === "\n") { + break; + } + this._ch = this._input.next(); + } + return result; +}; + +// Skips any white space in the source text from the current position. +// When allowAtLeastOneNewLine is true, will output new lines for each +// newline character found; if the user has preserve_newlines off, only +// the first newline will be output +Beautifier.prototype.eatWhitespace = function(allowAtLeastOneNewLine) { + var result = whitespaceChar.test(this._input.peek()); + var isFirstNewLine = true; + + while (whitespaceChar.test(this._input.peek())) { + this._ch = this._input.next(); + if (allowAtLeastOneNewLine && this._ch === '\n') { + if (this._options.preserve_newlines || isFirstNewLine) { + isFirstNewLine = false; + this._output.add_new_line(true); + } + } + } + return result; +}; + +// Nested pseudo-class if we are insideRule +// and the next special character found opens +// a new block +Beautifier.prototype.foundNestedPseudoClass = function() { + var openParen = 0; + var i = 1; + var ch = this._input.peek(i); + while (ch) { + if (ch === "{") { + return true; + } else if (ch === '(') { + // pseudoclasses can contain () + openParen += 1; + } else if (ch === ')') { + if (openParen === 0) { + return false; + } + openParen -= 1; + } else if (ch === ";" || ch === "}") { + return false; + } + i++; + ch = this._input.peek(i); + } + return false; +}; + +Beautifier.prototype.print_string = function(output_string) { + this._output.set_indent(this._indentLevel); + this._output.non_breaking_space = true; + this._output.add_token(output_string); +}; + +Beautifier.prototype.preserveSingleSpace = function(isAfterSpace) { + if (isAfterSpace) { + this._output.space_before_token = true; + } +}; + +Beautifier.prototype.indent = function() { + this._indentLevel++; +}; + +Beautifier.prototype.outdent = function() { + if (this._indentLevel > 0) { + this._indentLevel--; + } +}; + +/*_____________________--------------------_____________________*/ + +Beautifier.prototype.beautify = function() { + if (this._options.disabled) { + return this._source_text; + } + + var source_text = this._source_text; + var eol = this._options.eol; + if (eol === 'auto') { + eol = '\n'; + if (source_text && lineBreak.test(source_text || '')) { + eol = source_text.match(lineBreak)[0]; + } + } + + + // HACK: newline parsing inconsistent. This brute force normalizes the this._input. + source_text = source_text.replace(allLineBreaks, '\n'); + + // reset + var baseIndentString = source_text.match(/^[\t ]*/)[0]; + + this._output = new Output(this._options, baseIndentString); + this._input = new InputScanner(source_text); + this._indentLevel = 0; + this._nestedLevel = 0; + + this._ch = null; + var parenLevel = 0; + + var insideRule = false; + // This is the value side of a property value pair (blue in the following ex) + // label { content: blue } + var insidePropertyValue = false; + var enteringConditionalGroup = false; + var insideAtExtend = false; + var insideAtImport = false; + var topCharacter = this._ch; + var whitespace; + var isAfterSpace; + var previous_ch; + + while (true) { + whitespace = this._input.read(whitespacePattern); + isAfterSpace = whitespace !== ''; + previous_ch = topCharacter; + this._ch = this._input.next(); + if (this._ch === '\\' && this._input.hasNext()) { + this._ch += this._input.next(); + } + topCharacter = this._ch; + + if (!this._ch) { + break; + } else if (this._ch === '/' && this._input.peek() === '*') { + // /* css comment */ + // Always start block comments on a new line. + // This handles scenarios where a block comment immediately + // follows a property definition on the same line or where + // minified code is being beautified. + this._output.add_new_line(); + this._input.back(); + + var comment = this._input.read(block_comment_pattern); + + // Handle ignore directive + var directives = directives_core.get_directives(comment); + if (directives && directives.ignore === 'start') { + comment += directives_core.readIgnored(this._input); + } + + this.print_string(comment); + + // Ensures any new lines following the comment are preserved + this.eatWhitespace(true); + + // Block comments are followed by a new line so they don't + // share a line with other properties + this._output.add_new_line(); + } else if (this._ch === '/' && this._input.peek() === '/') { + // // single line comment + // Preserves the space before a comment + // on the same line as a rule + this._output.space_before_token = true; + this._input.back(); + this.print_string(this._input.read(comment_pattern)); + + // Ensures any new lines following the comment are preserved + this.eatWhitespace(true); + } else if (this._ch === '@') { + this.preserveSingleSpace(isAfterSpace); + + // deal with less propery mixins @{...} + if (this._input.peek() === '{') { + this.print_string(this._ch + this.eatString('}')); + } else { + this.print_string(this._ch); + + // strip trailing space, if present, for hash property checks + var variableOrRule = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g); + + if (variableOrRule.match(/[ :]$/)) { + // we have a variable or pseudo-class, add it and insert one space before continuing + variableOrRule = this.eatString(": ").replace(/\s$/, ''); + this.print_string(variableOrRule); + this._output.space_before_token = true; + } + + variableOrRule = variableOrRule.replace(/\s$/, ''); + + if (variableOrRule === 'extend') { + insideAtExtend = true; + } else if (variableOrRule === 'import') { + insideAtImport = true; + } + + // might be a nesting at-rule + if (variableOrRule in this.NESTED_AT_RULE) { + this._nestedLevel += 1; + if (variableOrRule in this.CONDITIONAL_GROUP_RULE) { + enteringConditionalGroup = true; + } + // might be less variable + } else if (!insideRule && parenLevel === 0 && variableOrRule.indexOf(':') !== -1) { + insidePropertyValue = true; + this.indent(); + } + } + } else if (this._ch === '#' && this._input.peek() === '{') { + this.preserveSingleSpace(isAfterSpace); + this.print_string(this._ch + this.eatString('}')); + } else if (this._ch === '{') { + if (insidePropertyValue) { + insidePropertyValue = false; + this.outdent(); + } + this.indent(); + this._output.space_before_token = true; + this.print_string(this._ch); + + // when entering conditional groups, only rulesets are allowed + if (enteringConditionalGroup) { + enteringConditionalGroup = false; + insideRule = (this._indentLevel > this._nestedLevel); + } else { + // otherwise, declarations are also allowed + insideRule = (this._indentLevel >= this._nestedLevel); + } + if (this._options.newline_between_rules && insideRule) { + if (this._output.previous_line && this._output.previous_line.item(-1) !== '{') { + this._output.ensure_empty_line_above('/', ','); + } + } + this.eatWhitespace(true); + this._output.add_new_line(); + } else if (this._ch === '}') { + this.outdent(); + this._output.add_new_line(); + if (previous_ch === '{') { + this._output.trim(true); + } + insideAtImport = false; + insideAtExtend = false; + if (insidePropertyValue) { + this.outdent(); + insidePropertyValue = false; + } + this.print_string(this._ch); + insideRule = false; + if (this._nestedLevel) { + this._nestedLevel--; + } + + this.eatWhitespace(true); + this._output.add_new_line(); + + if (this._options.newline_between_rules && !this._output.just_added_blankline()) { + if (this._input.peek() !== '}') { + this._output.add_new_line(true); + } + } + } else if (this._ch === ":") { + if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideAtExtend && parenLevel === 0) { + // 'property: value' delimiter + // which could be in a conditional group query + this.print_string(':'); + if (!insidePropertyValue) { + insidePropertyValue = true; + this._output.space_before_token = true; + this.eatWhitespace(true); + this.indent(); + } + } else { + // sass/less parent reference don't use a space + // sass nested pseudo-class don't use a space + + // preserve space before pseudoclasses/pseudoelements, as it means "in any child" + if (this._input.lookBack(" ")) { + this._output.space_before_token = true; + } + if (this._input.peek() === ":") { + // pseudo-element + this._ch = this._input.next(); + this.print_string("::"); + } else { + // pseudo-class + this.print_string(':'); + } + } + } else if (this._ch === '"' || this._ch === '\'') { + this.preserveSingleSpace(isAfterSpace); + this.print_string(this._ch + this.eatString(this._ch)); + this.eatWhitespace(true); + } else if (this._ch === ';') { + if (parenLevel === 0) { + if (insidePropertyValue) { + this.outdent(); + insidePropertyValue = false; + } + insideAtExtend = false; + insideAtImport = false; + this.print_string(this._ch); + this.eatWhitespace(true); + + // This maintains single line comments on the same + // line. Block comments are also affected, but + // a new line is always output before one inside + // that section + if (this._input.peek() !== '/') { + this._output.add_new_line(); + } + } else { + this.print_string(this._ch); + this.eatWhitespace(true); + this._output.space_before_token = true; + } + } else if (this._ch === '(') { // may be a url + if (this._input.lookBack("url")) { + this.print_string(this._ch); + this.eatWhitespace(); + parenLevel++; + this.indent(); + this._ch = this._input.next(); + if (this._ch === ')' || this._ch === '"' || this._ch === '\'') { + this._input.back(); + } else if (this._ch) { + this.print_string(this._ch + this.eatString(')')); + if (parenLevel) { + parenLevel--; + this.outdent(); + } + } + } else { + this.preserveSingleSpace(isAfterSpace); + this.print_string(this._ch); + this.eatWhitespace(); + parenLevel++; + this.indent(); + } + } else if (this._ch === ')') { + if (parenLevel) { + parenLevel--; + this.outdent(); + } + this.print_string(this._ch); + } else if (this._ch === ',') { + this.print_string(this._ch); + this.eatWhitespace(true); + if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport) { + this._output.add_new_line(); + } else { + this._output.space_before_token = true; + } + } else if ((this._ch === '>' || this._ch === '+' || this._ch === '~') && !insidePropertyValue && parenLevel === 0) { + //handle combinator spacing + if (this._options.space_around_combinator) { + this._output.space_before_token = true; + this.print_string(this._ch); + this._output.space_before_token = true; + } else { + this.print_string(this._ch); + this.eatWhitespace(); + // squash extra whitespace + if (this._ch && whitespaceChar.test(this._ch)) { + this._ch = ''; + } + } + } else if (this._ch === ']') { + this.print_string(this._ch); + } else if (this._ch === '[') { + this.preserveSingleSpace(isAfterSpace); + this.print_string(this._ch); + } else if (this._ch === '=') { // no whitespace before or after + this.eatWhitespace(); + this.print_string('='); + if (whitespaceChar.test(this._ch)) { + this._ch = ''; + } + } else if (this._ch === '!' && !this._input.lookBack("\\")) { // !important + this.print_string(' '); + this.print_string(this._ch); + } else { + this.preserveSingleSpace(isAfterSpace); + this.print_string(this._ch); + } + } + + var sweetCode = this._output.get_code(eol); + + return sweetCode; +}; + +module.exports.Beautifier = Beautifier; diff --git a/node_modules/js-beautify/js/src/css/index.js b/node_modules/js-beautify/js/src/css/index.js new file mode 100644 index 00000000..70e16071 --- /dev/null +++ b/node_modules/js-beautify/js/src/css/index.js @@ -0,0 +1,42 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var Beautifier = require('./beautifier').Beautifier, + Options = require('./options').Options; + +function css_beautify(source_text, options) { + var beautifier = new Beautifier(source_text, options); + return beautifier.beautify(); +} + +module.exports = css_beautify; +module.exports.defaultOptions = function() { + return new Options(); +}; diff --git a/node_modules/js-beautify/js/src/css/options.js b/node_modules/js-beautify/js/src/css/options.js new file mode 100644 index 00000000..862769eb --- /dev/null +++ b/node_modules/js-beautify/js/src/css/options.js @@ -0,0 +1,46 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var BaseOptions = require('../core/options').Options; + +function Options(options) { + BaseOptions.call(this, options, 'css'); + + this.selector_separator_newline = this._get_boolean('selector_separator_newline', true); + this.newline_between_rules = this._get_boolean('newline_between_rules', true); + var space_around_selector_separator = this._get_boolean('space_around_selector_separator'); + this.space_around_combinator = this._get_boolean('space_around_combinator') || space_around_selector_separator; + +} +Options.prototype = new BaseOptions(); + + + +module.exports.Options = Options; diff --git a/node_modules/js-beautify/js/src/css/tokenizer.js b/node_modules/js-beautify/js/src/css/tokenizer.js new file mode 100644 index 00000000..648ca950 --- /dev/null +++ b/node_modules/js-beautify/js/src/css/tokenizer.js @@ -0,0 +1,29 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; diff --git a/node_modules/js-beautify/js/src/html/beautifier.js b/node_modules/js-beautify/js/src/html/beautifier.js new file mode 100644 index 00000000..b6cc95b8 --- /dev/null +++ b/node_modules/js-beautify/js/src/html/beautifier.js @@ -0,0 +1,840 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var Options = require('../html/options').Options; +var Output = require('../core/output').Output; +var Tokenizer = require('../html/tokenizer').Tokenizer; +var TOKEN = require('../html/tokenizer').TOKEN; + +var lineBreak = /\r\n|[\r\n]/; +var allLineBreaks = /\r\n|[\r\n]/g; + +var Printer = function(options, base_indent_string) { //handles input/output and some other printing functions + + this.indent_level = 0; + this.alignment_size = 0; + this.max_preserve_newlines = options.max_preserve_newlines; + this.preserve_newlines = options.preserve_newlines; + + this._output = new Output(options, base_indent_string); + +}; + +Printer.prototype.current_line_has_match = function(pattern) { + return this._output.current_line.has_match(pattern); +}; + +Printer.prototype.set_space_before_token = function(value, non_breaking) { + this._output.space_before_token = value; + this._output.non_breaking_space = non_breaking; +}; + +Printer.prototype.set_wrap_point = function() { + this._output.set_indent(this.indent_level, this.alignment_size); + this._output.set_wrap_point(); +}; + + +Printer.prototype.add_raw_token = function(token) { + this._output.add_raw_token(token); +}; + +Printer.prototype.print_preserved_newlines = function(raw_token) { + var newlines = 0; + if (raw_token.type !== TOKEN.TEXT && raw_token.previous.type !== TOKEN.TEXT) { + newlines = raw_token.newlines ? 1 : 0; + } + + if (this.preserve_newlines) { + newlines = raw_token.newlines < this.max_preserve_newlines + 1 ? raw_token.newlines : this.max_preserve_newlines + 1; + } + for (var n = 0; n < newlines; n++) { + this.print_newline(n > 0); + } + + return newlines !== 0; +}; + +Printer.prototype.traverse_whitespace = function(raw_token) { + if (raw_token.whitespace_before || raw_token.newlines) { + if (!this.print_preserved_newlines(raw_token)) { + this._output.space_before_token = true; + } + return true; + } + return false; +}; + +Printer.prototype.previous_token_wrapped = function() { + return this._output.previous_token_wrapped; +}; + +Printer.prototype.print_newline = function(force) { + this._output.add_new_line(force); +}; + +Printer.prototype.print_token = function(token) { + if (token.text) { + this._output.set_indent(this.indent_level, this.alignment_size); + this._output.add_token(token.text); + } +}; + +Printer.prototype.indent = function() { + this.indent_level++; +}; + +Printer.prototype.get_full_indent = function(level) { + level = this.indent_level + (level || 0); + if (level < 1) { + return ''; + } + + return this._output.get_indent_string(level); +}; + +var get_type_attribute = function(start_token) { + var result = null; + var raw_token = start_token.next; + + // Search attributes for a type attribute + while (raw_token.type !== TOKEN.EOF && start_token.closed !== raw_token) { + if (raw_token.type === TOKEN.ATTRIBUTE && raw_token.text === 'type') { + if (raw_token.next && raw_token.next.type === TOKEN.EQUALS && + raw_token.next.next && raw_token.next.next.type === TOKEN.VALUE) { + result = raw_token.next.next.text; + } + break; + } + raw_token = raw_token.next; + } + + return result; +}; + +var get_custom_beautifier_name = function(tag_check, raw_token) { + var typeAttribute = null; + var result = null; + + if (!raw_token.closed) { + return null; + } + + if (tag_check === 'script') { + typeAttribute = 'text/javascript'; + } else if (tag_check === 'style') { + typeAttribute = 'text/css'; + } + + typeAttribute = get_type_attribute(raw_token) || typeAttribute; + + // For script and style tags that have a type attribute, only enable custom beautifiers for matching values + // For those without a type attribute use default; + if (typeAttribute.search('text/css') > -1) { + result = 'css'; + } else if (typeAttribute.search(/(text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect)/) > -1) { + result = 'javascript'; + } else if (typeAttribute.search(/(text|application|dojo)\/(x-)?(html)/) > -1) { + result = 'html'; + } else if (typeAttribute.search(/test\/null/) > -1) { + // Test only mime-type for testing the beautifier when null is passed as beautifing function + result = 'null'; + } + + return result; +}; + +function in_array(what, arr) { + return arr.indexOf(what) !== -1; +} + +function TagFrame(parent, parser_token, indent_level) { + this.parent = parent || null; + this.tag = parser_token ? parser_token.tag_name : ''; + this.indent_level = indent_level || 0; + this.parser_token = parser_token || null; +} + +function TagStack(printer) { + this._printer = printer; + this._current_frame = null; +} + +TagStack.prototype.get_parser_token = function() { + return this._current_frame ? this._current_frame.parser_token : null; +}; + +TagStack.prototype.record_tag = function(parser_token) { //function to record a tag and its parent in this.tags Object + var new_frame = new TagFrame(this._current_frame, parser_token, this._printer.indent_level); + this._current_frame = new_frame; +}; + +TagStack.prototype._try_pop_frame = function(frame) { //function to retrieve the opening tag to the corresponding closer + var parser_token = null; + + if (frame) { + parser_token = frame.parser_token; + this._printer.indent_level = frame.indent_level; + this._current_frame = frame.parent; + } + + return parser_token; +}; + +TagStack.prototype._get_frame = function(tag_list, stop_list) { //function to retrieve the opening tag to the corresponding closer + var frame = this._current_frame; + + while (frame) { //till we reach '' (the initial value); + if (tag_list.indexOf(frame.tag) !== -1) { //if this is it use it + break; + } else if (stop_list && stop_list.indexOf(frame.tag) !== -1) { + frame = null; + break; + } + frame = frame.parent; + } + + return frame; +}; + +TagStack.prototype.try_pop = function(tag, stop_list) { //function to retrieve the opening tag to the corresponding closer + var frame = this._get_frame([tag], stop_list); + return this._try_pop_frame(frame); +}; + +TagStack.prototype.indent_to_tag = function(tag_list) { + var frame = this._get_frame(tag_list); + if (frame) { + this._printer.indent_level = frame.indent_level; + } +}; + +function Beautifier(source_text, options, js_beautify, css_beautify) { + //Wrapper function to invoke all the necessary constructors and deal with the output. + this._source_text = source_text || ''; + options = options || {}; + this._js_beautify = js_beautify; + this._css_beautify = css_beautify; + this._tag_stack = null; + + // Allow the setting of language/file-type specific options + // with inheritance of overall settings + var optionHtml = new Options(options, 'html'); + + this._options = optionHtml; + + this._is_wrap_attributes_force = this._options.wrap_attributes.substr(0, 'force'.length) === 'force'; + this._is_wrap_attributes_force_expand_multiline = (this._options.wrap_attributes === 'force-expand-multiline'); + this._is_wrap_attributes_force_aligned = (this._options.wrap_attributes === 'force-aligned'); + this._is_wrap_attributes_aligned_multiple = (this._options.wrap_attributes === 'aligned-multiple'); + this._is_wrap_attributes_preserve = this._options.wrap_attributes.substr(0, 'preserve'.length) === 'preserve'; + this._is_wrap_attributes_preserve_aligned = (this._options.wrap_attributes === 'preserve-aligned'); +} + +Beautifier.prototype.beautify = function() { + + // if disabled, return the input unchanged. + if (this._options.disabled) { + return this._source_text; + } + + var source_text = this._source_text; + var eol = this._options.eol; + if (this._options.eol === 'auto') { + eol = '\n'; + if (source_text && lineBreak.test(source_text)) { + eol = source_text.match(lineBreak)[0]; + } + } + + // HACK: newline parsing inconsistent. This brute force normalizes the input. + source_text = source_text.replace(allLineBreaks, '\n'); + + var baseIndentString = source_text.match(/^[\t ]*/)[0]; + + var last_token = { + text: '', + type: '' + }; + + var last_tag_token = new TagOpenParserToken(); + + var printer = new Printer(this._options, baseIndentString); + var tokens = new Tokenizer(source_text, this._options).tokenize(); + + this._tag_stack = new TagStack(printer); + + var parser_token = null; + var raw_token = tokens.next(); + while (raw_token.type !== TOKEN.EOF) { + + if (raw_token.type === TOKEN.TAG_OPEN || raw_token.type === TOKEN.COMMENT) { + parser_token = this._handle_tag_open(printer, raw_token, last_tag_token, last_token); + last_tag_token = parser_token; + } else if ((raw_token.type === TOKEN.ATTRIBUTE || raw_token.type === TOKEN.EQUALS || raw_token.type === TOKEN.VALUE) || + (raw_token.type === TOKEN.TEXT && !last_tag_token.tag_complete)) { + parser_token = this._handle_inside_tag(printer, raw_token, last_tag_token, tokens); + } else if (raw_token.type === TOKEN.TAG_CLOSE) { + parser_token = this._handle_tag_close(printer, raw_token, last_tag_token); + } else if (raw_token.type === TOKEN.TEXT) { + parser_token = this._handle_text(printer, raw_token, last_tag_token); + } else { + // This should never happen, but if it does. Print the raw token + printer.add_raw_token(raw_token); + } + + last_token = parser_token; + + raw_token = tokens.next(); + } + var sweet_code = printer._output.get_code(eol); + + return sweet_code; +}; + +Beautifier.prototype._handle_tag_close = function(printer, raw_token, last_tag_token) { + var parser_token = { + text: raw_token.text, + type: raw_token.type + }; + printer.alignment_size = 0; + last_tag_token.tag_complete = true; + + printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true); + if (last_tag_token.is_unformatted) { + printer.add_raw_token(raw_token); + } else { + if (last_tag_token.tag_start_char === '<') { + printer.set_space_before_token(raw_token.text[0] === '/', true); // space before />, no space before > + if (this._is_wrap_attributes_force_expand_multiline && last_tag_token.has_wrapped_attrs) { + printer.print_newline(false); + } + } + printer.print_token(raw_token); + + } + + if (last_tag_token.indent_content && + !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) { + printer.indent(); + + // only indent once per opened tag + last_tag_token.indent_content = false; + } + + if (!last_tag_token.is_inline_element && + !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) { + printer.set_wrap_point(); + } + + return parser_token; +}; + +Beautifier.prototype._handle_inside_tag = function(printer, raw_token, last_tag_token, tokens) { + var wrapped = last_tag_token.has_wrapped_attrs; + var parser_token = { + text: raw_token.text, + type: raw_token.type + }; + + printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true); + if (last_tag_token.is_unformatted) { + printer.add_raw_token(raw_token); + } else if (last_tag_token.tag_start_char === '{' && raw_token.type === TOKEN.TEXT) { + // For the insides of handlebars allow newlines or a single space between open and contents + if (printer.print_preserved_newlines(raw_token)) { + raw_token.newlines = 0; + printer.add_raw_token(raw_token); + } else { + printer.print_token(raw_token); + } + } else { + if (raw_token.type === TOKEN.ATTRIBUTE) { + printer.set_space_before_token(true); + last_tag_token.attr_count += 1; + } else if (raw_token.type === TOKEN.EQUALS) { //no space before = + printer.set_space_before_token(false); + } else if (raw_token.type === TOKEN.VALUE && raw_token.previous.type === TOKEN.EQUALS) { //no space before value + printer.set_space_before_token(false); + } + + if (raw_token.type === TOKEN.ATTRIBUTE && last_tag_token.tag_start_char === '<') { + if (this._is_wrap_attributes_preserve || this._is_wrap_attributes_preserve_aligned) { + printer.traverse_whitespace(raw_token); + wrapped = wrapped || raw_token.newlines !== 0; + } + + + if (this._is_wrap_attributes_force) { + var force_attr_wrap = last_tag_token.attr_count > 1; + if (this._is_wrap_attributes_force_expand_multiline && last_tag_token.attr_count === 1) { + var is_only_attribute = true; + var peek_index = 0; + var peek_token; + do { + peek_token = tokens.peek(peek_index); + if (peek_token.type === TOKEN.ATTRIBUTE) { + is_only_attribute = false; + break; + } + peek_index += 1; + } while (peek_index < 4 && peek_token.type !== TOKEN.EOF && peek_token.type !== TOKEN.TAG_CLOSE); + + force_attr_wrap = !is_only_attribute; + } + + if (force_attr_wrap) { + printer.print_newline(false); + wrapped = true; + } + } + } + printer.print_token(raw_token); + wrapped = wrapped || printer.previous_token_wrapped(); + last_tag_token.has_wrapped_attrs = wrapped; + } + return parser_token; +}; + +Beautifier.prototype._handle_text = function(printer, raw_token, last_tag_token) { + var parser_token = { + text: raw_token.text, + type: 'TK_CONTENT' + }; + if (last_tag_token.custom_beautifier_name) { //check if we need to format javascript + this._print_custom_beatifier_text(printer, raw_token, last_tag_token); + } else if (last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) { + printer.add_raw_token(raw_token); + } else { + printer.traverse_whitespace(raw_token); + printer.print_token(raw_token); + } + return parser_token; +}; + +Beautifier.prototype._print_custom_beatifier_text = function(printer, raw_token, last_tag_token) { + var local = this; + if (raw_token.text !== '') { + + var text = raw_token.text, + _beautifier, + script_indent_level = 1, + pre = '', + post = ''; + if (last_tag_token.custom_beautifier_name === 'javascript' && typeof this._js_beautify === 'function') { + _beautifier = this._js_beautify; + } else if (last_tag_token.custom_beautifier_name === 'css' && typeof this._css_beautify === 'function') { + _beautifier = this._css_beautify; + } else if (last_tag_token.custom_beautifier_name === 'html') { + _beautifier = function(html_source, options) { + var beautifier = new Beautifier(html_source, options, local._js_beautify, local._css_beautify); + return beautifier.beautify(); + }; + } + + if (this._options.indent_scripts === "keep") { + script_indent_level = 0; + } else if (this._options.indent_scripts === "separate") { + script_indent_level = -printer.indent_level; + } + + var indentation = printer.get_full_indent(script_indent_level); + + // if there is at least one empty line at the end of this text, strip it + // we'll be adding one back after the text but before the containing tag. + text = text.replace(/\n[ \t]*$/, ''); + + // Handle the case where content is wrapped in a comment or cdata. + if (last_tag_token.custom_beautifier_name !== 'html' && + text[0] === '<' && text.match(/^(|]]>)$/.exec(text); + + // if we start to wrap but don't finish, print raw + if (!matched) { + printer.add_raw_token(raw_token); + return; + } + + pre = indentation + matched[1] + '\n'; + text = matched[4]; + if (matched[5]) { + post = indentation + matched[5]; + } + + // if there is at least one empty line at the end of this text, strip it + // we'll be adding one back after the text but before the containing tag. + text = text.replace(/\n[ \t]*$/, ''); + + if (matched[2] || matched[3].indexOf('\n') !== -1) { + // if the first line of the non-comment text has spaces + // use that as the basis for indenting in null case. + matched = matched[3].match(/[ \t]+$/); + if (matched) { + raw_token.whitespace_before = matched[0]; + } + } + } + + if (text) { + if (_beautifier) { + + // call the Beautifier if avaliable + var Child_options = function() { + this.eol = '\n'; + }; + Child_options.prototype = this._options.raw_options; + var child_options = new Child_options(); + text = _beautifier(indentation + text, child_options); + } else { + // simply indent the string otherwise + var white = raw_token.whitespace_before; + if (white) { + text = text.replace(new RegExp('\n(' + white + ')?', 'g'), '\n'); + } + + text = indentation + text.replace(/\n/g, '\n' + indentation); + } + } + + if (pre) { + if (!text) { + text = pre + post; + } else { + text = pre + text + '\n' + post; + } + } + + printer.print_newline(false); + if (text) { + raw_token.text = text; + raw_token.whitespace_before = ''; + raw_token.newlines = 0; + printer.add_raw_token(raw_token); + printer.print_newline(true); + } + } +}; + +Beautifier.prototype._handle_tag_open = function(printer, raw_token, last_tag_token, last_token) { + var parser_token = this._get_tag_open_token(raw_token); + + if ((last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) && + raw_token.type === TOKEN.TAG_OPEN && raw_token.text.indexOf(']*)/); + this.tag_check = tag_check_match ? tag_check_match[1] : ''; + } else { + tag_check_match = raw_token.text.match(/^{{[#\^]?([^\s}]+)/); + this.tag_check = tag_check_match ? tag_check_match[1] : ''; + } + this.tag_check = this.tag_check.toLowerCase(); + + if (raw_token.type === TOKEN.COMMENT) { + this.tag_complete = true; + } + + this.is_start_tag = this.tag_check.charAt(0) !== '/'; + this.tag_name = !this.is_start_tag ? this.tag_check.substr(1) : this.tag_check; + this.is_end_tag = !this.is_start_tag || + (raw_token.closed && raw_token.closed.text === '/>'); + + // handlebars tags that don't start with # or ^ are single_tags, and so also start and end. + this.is_end_tag = this.is_end_tag || + (this.tag_start_char === '{' && (this.text.length < 3 || (/[^#\^]/.test(this.text.charAt(2))))); + } +}; + +Beautifier.prototype._get_tag_open_token = function(raw_token) { //function to get a full tag and parse its type + var parser_token = new TagOpenParserToken(this._tag_stack.get_parser_token(), raw_token); + + parser_token.alignment_size = this._options.wrap_attributes_indent_size; + + parser_token.is_end_tag = parser_token.is_end_tag || + in_array(parser_token.tag_check, this._options.void_elements); + + parser_token.is_empty_element = parser_token.tag_complete || + (parser_token.is_start_tag && parser_token.is_end_tag); + + parser_token.is_unformatted = !parser_token.tag_complete && in_array(parser_token.tag_check, this._options.unformatted); + parser_token.is_content_unformatted = !parser_token.is_empty_element && in_array(parser_token.tag_check, this._options.content_unformatted); + parser_token.is_inline_element = in_array(parser_token.tag_name, this._options.inline) || parser_token.tag_start_char === '{'; + + return parser_token; +}; + +Beautifier.prototype._set_tag_position = function(printer, raw_token, parser_token, last_tag_token, last_token) { + + if (!parser_token.is_empty_element) { + if (parser_token.is_end_tag) { //this tag is a double tag so check for tag-ending + parser_token.start_tag_token = this._tag_stack.try_pop(parser_token.tag_name); //remove it and all ancestors + } else { // it's a start-tag + // check if this tag is starting an element that has optional end element + // and do an ending needed + if (this._do_optional_end_element(parser_token)) { + if (!parser_token.is_inline_element) { + if (parser_token.parent) { + parser_token.parent.multiline_content = true; + } + printer.print_newline(false); + } + + } + + this._tag_stack.record_tag(parser_token); //push it on the tag stack + + if ((parser_token.tag_name === 'script' || parser_token.tag_name === 'style') && + !(parser_token.is_unformatted || parser_token.is_content_unformatted)) { + parser_token.custom_beautifier_name = get_custom_beautifier_name(parser_token.tag_check, raw_token); + } + } + } + + if (in_array(parser_token.tag_check, this._options.extra_liners)) { //check if this double needs an extra line + printer.print_newline(false); + if (!printer._output.just_added_blankline()) { + printer.print_newline(true); + } + } + + if (parser_token.is_empty_element) { //if this tag name is a single tag type (either in the list or has a closing /) + + // if you hit an else case, reset the indent level if you are inside an: + // 'if', 'unless', or 'each' block. + if (parser_token.tag_start_char === '{' && parser_token.tag_check === 'else') { + this._tag_stack.indent_to_tag(['if', 'unless', 'each']); + parser_token.indent_content = true; + // Don't add a newline if opening {{#if}} tag is on the current line + var foundIfOnCurrentLine = printer.current_line_has_match(/{{#if/); + if (!foundIfOnCurrentLine) { + printer.print_newline(false); + } + } + + // Don't add a newline before elements that should remain where they are. + if (parser_token.tag_name === '!--' && last_token.type === TOKEN.TAG_CLOSE && + last_tag_token.is_end_tag && parser_token.text.indexOf('\n') === -1) { + //Do nothing. Leave comments on same line. + } else if (!parser_token.is_inline_element && !parser_token.is_unformatted) { + printer.print_newline(false); + } + } else if (parser_token.is_unformatted || parser_token.is_content_unformatted) { + if (!parser_token.is_inline_element && !parser_token.is_unformatted) { + printer.print_newline(false); + } + } else if (parser_token.is_end_tag) { //this tag is a double tag so check for tag-ending + if ((parser_token.start_tag_token && parser_token.start_tag_token.multiline_content) || + !(parser_token.is_inline_element || + (last_tag_token.is_inline_element) || + (last_token.type === TOKEN.TAG_CLOSE && + parser_token.start_tag_token === last_tag_token) || + (last_token.type === 'TK_CONTENT') + )) { + printer.print_newline(false); + } + } else { // it's a start-tag + parser_token.indent_content = !parser_token.custom_beautifier_name; + + if (parser_token.tag_start_char === '<') { + if (parser_token.tag_name === 'html') { + parser_token.indent_content = this._options.indent_inner_html; + } else if (parser_token.tag_name === 'head') { + parser_token.indent_content = this._options.indent_head_inner_html; + } else if (parser_token.tag_name === 'body') { + parser_token.indent_content = this._options.indent_body_inner_html; + } + } + + if (!parser_token.is_inline_element && last_token.type !== 'TK_CONTENT') { + if (parser_token.parent) { + parser_token.parent.multiline_content = true; + } + printer.print_newline(false); + } + } +}; + +//To be used for

tag special case: +//var p_closers = ['address', 'article', 'aside', 'blockquote', 'details', 'div', 'dl', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'main', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul']; + +Beautifier.prototype._do_optional_end_element = function(parser_token) { + var result = null; + // NOTE: cases of "if there is no more content in the parent element" + // are handled automatically by the beautifier. + // It assumes parent or ancestor close tag closes all children. + // https://www.w3.org/TR/html5/syntax.html#optional-tags + if (parser_token.is_empty_element || !parser_token.is_start_tag || !parser_token.parent) { + return; + + } else if (parser_token.tag_name === 'body') { + // A head element’s end tag may be omitted if the head element is not immediately followed by a space character or a comment. + result = result || this._tag_stack.try_pop('head'); + + //} else if (parser_token.tag_name === 'body') { + // DONE: A body element’s end tag may be omitted if the body element is not immediately followed by a comment. + + } else if (parser_token.tag_name === 'li') { + // An li element’s end tag may be omitted if the li element is immediately followed by another li element or if there is no more content in the parent element. + result = result || this._tag_stack.try_pop('li', ['ol', 'ul']); + + } else if (parser_token.tag_name === 'dd' || parser_token.tag_name === 'dt') { + // A dd element’s end tag may be omitted if the dd element is immediately followed by another dd element or a dt element, or if there is no more content in the parent element. + // A dt element’s end tag may be omitted if the dt element is immediately followed by another dt element or a dd element. + result = result || this._tag_stack.try_pop('dt', ['dl']); + result = result || this._tag_stack.try_pop('dd', ['dl']); + + //} else if (p_closers.indexOf(parser_token.tag_name) !== -1) { + //TODO: THIS IS A BUG FARM. We are not putting this into 1.8.0 as it is likely to blow up. + //A p element’s end tag may be omitted if the p element is immediately followed by an address, article, aside, blockquote, details, div, dl, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hr, main, nav, ol, p, pre, section, table, or ul element, or if there is no more content in the parent element and the parent element is an HTML element that is not an a, audio, del, ins, map, noscript, or video element, or an autonomous custom element. + //result = result || this._tag_stack.try_pop('p', ['body']); + + } else if (parser_token.tag_name === 'rp' || parser_token.tag_name === 'rt') { + // An rt element’s end tag may be omitted if the rt element is immediately followed by an rt or rp element, or if there is no more content in the parent element. + // An rp element’s end tag may be omitted if the rp element is immediately followed by an rt or rp element, or if there is no more content in the parent element. + result = result || this._tag_stack.try_pop('rt', ['ruby', 'rtc']); + result = result || this._tag_stack.try_pop('rp', ['ruby', 'rtc']); + + } else if (parser_token.tag_name === 'optgroup') { + // An optgroup element’s end tag may be omitted if the optgroup element is immediately followed by another optgroup element, or if there is no more content in the parent element. + // An option element’s end tag may be omitted if the option element is immediately followed by another option element, or if it is immediately followed by an optgroup element, or if there is no more content in the parent element. + result = result || this._tag_stack.try_pop('optgroup', ['select']); + //result = result || this._tag_stack.try_pop('option', ['select']); + + } else if (parser_token.tag_name === 'option') { + // An option element’s end tag may be omitted if the option element is immediately followed by another option element, or if it is immediately followed by an optgroup element, or if there is no more content in the parent element. + result = result || this._tag_stack.try_pop('option', ['select', 'datalist', 'optgroup']); + + } else if (parser_token.tag_name === 'colgroup') { + // DONE: A colgroup element’s end tag may be omitted if the colgroup element is not immediately followed by a space character or a comment. + // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started. + result = result || this._tag_stack.try_pop('caption', ['table']); + + } else if (parser_token.tag_name === 'thead') { + // A colgroup element's end tag may be ommitted if a thead, tfoot, tbody, or tr element is started. + // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started. + result = result || this._tag_stack.try_pop('caption', ['table']); + result = result || this._tag_stack.try_pop('colgroup', ['table']); + + //} else if (parser_token.tag_name === 'caption') { + // DONE: A caption element’s end tag may be omitted if the caption element is not immediately followed by a space character or a comment. + + } else if (parser_token.tag_name === 'tbody' || parser_token.tag_name === 'tfoot') { + // A thead element’s end tag may be omitted if the thead element is immediately followed by a tbody or tfoot element. + // A tbody element’s end tag may be omitted if the tbody element is immediately followed by a tbody or tfoot element, or if there is no more content in the parent element. + // A colgroup element's end tag may be ommitted if a thead, tfoot, tbody, or tr element is started. + // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started. + result = result || this._tag_stack.try_pop('caption', ['table']); + result = result || this._tag_stack.try_pop('colgroup', ['table']); + result = result || this._tag_stack.try_pop('thead', ['table']); + result = result || this._tag_stack.try_pop('tbody', ['table']); + + //} else if (parser_token.tag_name === 'tfoot') { + // DONE: A tfoot element’s end tag may be omitted if there is no more content in the parent element. + + } else if (parser_token.tag_name === 'tr') { + // A tr element’s end tag may be omitted if the tr element is immediately followed by another tr element, or if there is no more content in the parent element. + // A colgroup element's end tag may be ommitted if a thead, tfoot, tbody, or tr element is started. + // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started. + result = result || this._tag_stack.try_pop('caption', ['table']); + result = result || this._tag_stack.try_pop('colgroup', ['table']); + result = result || this._tag_stack.try_pop('tr', ['table', 'thead', 'tbody', 'tfoot']); + + } else if (parser_token.tag_name === 'th' || parser_token.tag_name === 'td') { + // A td element’s end tag may be omitted if the td element is immediately followed by a td or th element, or if there is no more content in the parent element. + // A th element’s end tag may be omitted if the th element is immediately followed by a td or th element, or if there is no more content in the parent element. + result = result || this._tag_stack.try_pop('td', ['table', 'thead', 'tbody', 'tfoot', 'tr']); + result = result || this._tag_stack.try_pop('th', ['table', 'thead', 'tbody', 'tfoot', 'tr']); + } + + // Start element omission not handled currently + // A head element’s start tag may be omitted if the element is empty, or if the first thing inside the head element is an element. + // A tbody element’s start tag may be omitted if the first thing inside the tbody element is a tr element, and if the element is not immediately preceded by a tbody, thead, or tfoot element whose end tag has been omitted. (It can’t be omitted if the element is empty.) + // A colgroup element’s start tag may be omitted if the first thing inside the colgroup element is a col element, and if the element is not immediately preceded by another colgroup element whose end tag has been omitted. (It can’t be omitted if the element is empty.) + + // Fix up the parent of the parser token + parser_token.parent = this._tag_stack.get_parser_token(); + + return result; +}; + +module.exports.Beautifier = Beautifier; diff --git a/node_modules/js-beautify/js/src/html/index.js b/node_modules/js-beautify/js/src/html/index.js new file mode 100644 index 00000000..9bd9aba3 --- /dev/null +++ b/node_modules/js-beautify/js/src/html/index.js @@ -0,0 +1,42 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var Beautifier = require('./beautifier').Beautifier, + Options = require('./options').Options; + +function style_html(html_source, options, js_beautify, css_beautify) { + var beautifier = new Beautifier(html_source, options, js_beautify, css_beautify); + return beautifier.beautify(); +} + +module.exports = style_html; +module.exports.defaultOptions = function() { + return new Options(); +}; diff --git a/node_modules/js-beautify/js/src/html/options.js b/node_modules/js-beautify/js/src/html/options.js new file mode 100644 index 00000000..7df089ac --- /dev/null +++ b/node_modules/js-beautify/js/src/html/options.js @@ -0,0 +1,91 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var BaseOptions = require('../core/options').Options; + +function Options(options) { + BaseOptions.call(this, options, 'html'); + if (this.templating.length === 1 && this.templating[0] === 'auto') { + this.templating = ['django', 'erb', 'handlebars', 'php']; + } + + this.indent_inner_html = this._get_boolean('indent_inner_html'); + this.indent_body_inner_html = this._get_boolean('indent_body_inner_html', true); + this.indent_head_inner_html = this._get_boolean('indent_head_inner_html', true); + + this.indent_handlebars = this._get_boolean('indent_handlebars', true); + this.wrap_attributes = this._get_selection('wrap_attributes', + ['auto', 'force', 'force-aligned', 'force-expand-multiline', 'aligned-multiple', 'preserve', 'preserve-aligned']); + this.wrap_attributes_indent_size = this._get_number('wrap_attributes_indent_size', this.indent_size); + this.extra_liners = this._get_array('extra_liners', ['head', 'body', '/html']); + + // Block vs inline elements + // https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements + // https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements + // https://www.w3.org/TR/html5/dom.html#phrasing-content + this.inline = this._get_array('inline', [ + 'a', 'abbr', 'area', 'audio', 'b', 'bdi', 'bdo', 'br', 'button', 'canvas', 'cite', + 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'i', 'iframe', 'img', + 'input', 'ins', 'kbd', 'keygen', 'label', 'map', 'mark', 'math', 'meter', 'noscript', + 'object', 'output', 'progress', 'q', 'ruby', 's', 'samp', /* 'script', */ 'select', 'small', + 'span', 'strong', 'sub', 'sup', 'svg', 'template', 'textarea', 'time', 'u', 'var', + 'video', 'wbr', 'text', + // obsolete inline tags + 'acronym', 'big', 'strike', 'tt' + ]); + this.void_elements = this._get_array('void_elements', [ + // HTLM void elements - aka self-closing tags - aka singletons + // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements + 'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', + 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr', + // NOTE: Optional tags are too complex for a simple list + // they are hard coded in _do_optional_end_element + + // Doctype and xml elements + '!doctype', '?xml', + + // obsolete tags + // basefont: https://www.computerhope.com/jargon/h/html-basefont-tag.htm + // isndex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/isindex + 'basefont', 'isindex' + ]); + this.unformatted = this._get_array('unformatted', []); + this.content_unformatted = this._get_array('content_unformatted', [ + 'pre', 'textarea' + ]); + this.unformatted_content_delimiter = this._get_characters('unformatted_content_delimiter'); + this.indent_scripts = this._get_selection('indent_scripts', ['normal', 'keep', 'separate']); + +} +Options.prototype = new BaseOptions(); + + + +module.exports.Options = Options; diff --git a/node_modules/js-beautify/js/src/html/tokenizer.js b/node_modules/js-beautify/js/src/html/tokenizer.js new file mode 100644 index 00000000..8cd9d70f --- /dev/null +++ b/node_modules/js-beautify/js/src/html/tokenizer.js @@ -0,0 +1,329 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var BaseTokenizer = require('../core/tokenizer').Tokenizer; +var BASETOKEN = require('../core/tokenizer').TOKEN; +var Directives = require('../core/directives').Directives; +var TemplatablePattern = require('../core/templatablepattern').TemplatablePattern; +var Pattern = require('../core/pattern').Pattern; + +var TOKEN = { + TAG_OPEN: 'TK_TAG_OPEN', + TAG_CLOSE: 'TK_TAG_CLOSE', + ATTRIBUTE: 'TK_ATTRIBUTE', + EQUALS: 'TK_EQUALS', + VALUE: 'TK_VALUE', + COMMENT: 'TK_COMMENT', + TEXT: 'TK_TEXT', + UNKNOWN: 'TK_UNKNOWN', + START: BASETOKEN.START, + RAW: BASETOKEN.RAW, + EOF: BASETOKEN.EOF +}; + +var directives_core = new Directives(/<\!--/, /-->/); + +var Tokenizer = function(input_string, options) { + BaseTokenizer.call(this, input_string, options); + this._current_tag_name = ''; + + // Words end at whitespace or when a tag starts + // if we are indenting handlebars, they are considered tags + var templatable_reader = new TemplatablePattern(this._input).read_options(this._options); + var pattern_reader = new Pattern(this._input); + + this.__patterns = { + word: templatable_reader.until(/[\n\r\t <]/), + single_quote: templatable_reader.until_after(/'/), + double_quote: templatable_reader.until_after(/"/), + attribute: templatable_reader.until(/[\n\r\t =\/>]/), + element_name: templatable_reader.until(/[\n\r\t >\/]/), + + handlebars_comment: pattern_reader.starting_with(/{{!--/).until_after(/--}}/), + handlebars: pattern_reader.starting_with(/{{/).until_after(/}}/), + handlebars_open: pattern_reader.until(/[\n\r\t }]/), + handlebars_raw_close: pattern_reader.until(/}}/), + comment: pattern_reader.starting_with(//), + cdata: pattern_reader.starting_with(//), + // https://en.wikipedia.org/wiki/Conditional_comment + conditional_comment: pattern_reader.starting_with(//), + processing: pattern_reader.starting_with(/<\?/).until_after(/\?>/) + }; + + if (this._options.indent_handlebars) { + this.__patterns.word = this.__patterns.word.exclude('handlebars'); + } + + this._unformatted_content_delimiter = null; + + if (this._options.unformatted_content_delimiter) { + var literal_regexp = this._input.get_literal_regexp(this._options.unformatted_content_delimiter); + this.__patterns.unformatted_content_delimiter = + pattern_reader.matching(literal_regexp) + .until_after(literal_regexp); + } +}; +Tokenizer.prototype = new BaseTokenizer(); + +Tokenizer.prototype._is_comment = function(current_token) { // jshint unused:false + return false; //current_token.type === TOKEN.COMMENT || current_token.type === TOKEN.UNKNOWN; +}; + +Tokenizer.prototype._is_opening = function(current_token) { + return current_token.type === TOKEN.TAG_OPEN; +}; + +Tokenizer.prototype._is_closing = function(current_token, open_token) { + return current_token.type === TOKEN.TAG_CLOSE && + (open_token && ( + ((current_token.text === '>' || current_token.text === '/>') && open_token.text[0] === '<') || + (current_token.text === '}}' && open_token.text[0] === '{' && open_token.text[1] === '{'))); +}; + +Tokenizer.prototype._reset = function() { + this._current_tag_name = ''; +}; + +Tokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false + var token = null; + this._readWhitespace(); + var c = this._input.peek(); + + if (c === null) { + return this._create_token(TOKEN.EOF, ''); + } + + token = token || this._read_open_handlebars(c, open_token); + token = token || this._read_attribute(c, previous_token, open_token); + token = token || this._read_raw_content(c, previous_token, open_token); + token = token || this._read_close(c, open_token); + token = token || this._read_content_word(c); + token = token || this._read_comment_or_cdata(c); + token = token || this._read_processing(c); + token = token || this._read_open(c, open_token); + token = token || this._create_token(TOKEN.UNKNOWN, this._input.next()); + + return token; +}; + +Tokenizer.prototype._read_comment_or_cdata = function(c) { // jshint unused:false + var token = null; + var resulting_string = null; + var directives = null; + + if (c === '<') { + var peek1 = this._input.peek(1); + // We treat all comments as literals, even more than preformatted tags + // we only look for the appropriate closing marker + if (peek1 === '!') { + resulting_string = this.__patterns.comment.read(); + + // only process directive on html comments + if (resulting_string) { + directives = directives_core.get_directives(resulting_string); + if (directives && directives.ignore === 'start') { + resulting_string += directives_core.readIgnored(this._input); + } + } else { + resulting_string = this.__patterns.cdata.read(); + } + } + + if (resulting_string) { + token = this._create_token(TOKEN.COMMENT, resulting_string); + token.directives = directives; + } + } + + return token; +}; + +Tokenizer.prototype._read_processing = function(c) { // jshint unused:false + var token = null; + var resulting_string = null; + var directives = null; + + if (c === '<') { + var peek1 = this._input.peek(1); + if (peek1 === '!' || peek1 === '?') { + resulting_string = this.__patterns.conditional_comment.read(); + resulting_string = resulting_string || this.__patterns.processing.read(); + } + + if (resulting_string) { + token = this._create_token(TOKEN.COMMENT, resulting_string); + token.directives = directives; + } + } + + return token; +}; + +Tokenizer.prototype._read_open = function(c, open_token) { + var resulting_string = null; + var token = null; + if (!open_token) { + if (c === '<') { + + resulting_string = this._input.next(); + if (this._input.peek() === '/') { + resulting_string += this._input.next(); + } + resulting_string += this.__patterns.element_name.read(); + token = this._create_token(TOKEN.TAG_OPEN, resulting_string); + } + } + return token; +}; + +Tokenizer.prototype._read_open_handlebars = function(c, open_token) { + var resulting_string = null; + var token = null; + if (!open_token) { + if (this._options.indent_handlebars && c === '{' && this._input.peek(1) === '{') { + if (this._input.peek(2) === '!') { + resulting_string = this.__patterns.handlebars_comment.read(); + resulting_string = resulting_string || this.__patterns.handlebars.read(); + token = this._create_token(TOKEN.COMMENT, resulting_string); + } else { + resulting_string = this.__patterns.handlebars_open.read(); + token = this._create_token(TOKEN.TAG_OPEN, resulting_string); + } + } + } + return token; +}; + + +Tokenizer.prototype._read_close = function(c, open_token) { + var resulting_string = null; + var token = null; + if (open_token) { + if (open_token.text[0] === '<' && (c === '>' || (c === '/' && this._input.peek(1) === '>'))) { + resulting_string = this._input.next(); + if (c === '/') { // for close tag "/>" + resulting_string += this._input.next(); + } + token = this._create_token(TOKEN.TAG_CLOSE, resulting_string); + } else if (open_token.text[0] === '{' && c === '}' && this._input.peek(1) === '}') { + this._input.next(); + this._input.next(); + token = this._create_token(TOKEN.TAG_CLOSE, '}}'); + } + } + + return token; +}; + +Tokenizer.prototype._read_attribute = function(c, previous_token, open_token) { + var token = null; + var resulting_string = ''; + if (open_token && open_token.text[0] === '<') { + + if (c === '=') { + token = this._create_token(TOKEN.EQUALS, this._input.next()); + } else if (c === '"' || c === "'") { + var content = this._input.next(); + if (c === '"') { + content += this.__patterns.double_quote.read(); + } else { + content += this.__patterns.single_quote.read(); + } + token = this._create_token(TOKEN.VALUE, content); + } else { + resulting_string = this.__patterns.attribute.read(); + + if (resulting_string) { + if (previous_token.type === TOKEN.EQUALS) { + token = this._create_token(TOKEN.VALUE, resulting_string); + } else { + token = this._create_token(TOKEN.ATTRIBUTE, resulting_string); + } + } + } + } + return token; +}; + +Tokenizer.prototype._is_content_unformatted = function(tag_name) { + // void_elements have no content and so cannot have unformatted content + // script and style tags should always be read as unformatted content + // finally content_unformatted and unformatted element contents are unformatted + return this._options.void_elements.indexOf(tag_name) === -1 && + (this._options.content_unformatted.indexOf(tag_name) !== -1 || + this._options.unformatted.indexOf(tag_name) !== -1); +}; + + +Tokenizer.prototype._read_raw_content = function(c, previous_token, open_token) { // jshint unused:false + var resulting_string = ''; + if (open_token && open_token.text[0] === '{') { + resulting_string = this.__patterns.handlebars_raw_close.read(); + } else if (previous_token.type === TOKEN.TAG_CLOSE && (previous_token.opened.text[0] === '<')) { + var tag_name = previous_token.opened.text.substr(1).toLowerCase(); + if (tag_name === 'script' || tag_name === 'style') { + // Script and style tags are allowed to have comments wrapping their content + // or just have regular content. + var token = this._read_comment_or_cdata(c); + if (token) { + token.type = TOKEN.TEXT; + return token; + } + resulting_string = this._input.readUntil(new RegExp('', 'ig')); + } else if (this._is_content_unformatted(tag_name)) { + resulting_string = this._input.readUntil(new RegExp('', 'ig')); + } + } + + if (resulting_string) { + return this._create_token(TOKEN.TEXT, resulting_string); + } + + return null; +}; + +Tokenizer.prototype._read_content_word = function(c) { + var resulting_string = ''; + if (this._options.unformatted_content_delimiter) { + if (c === this._options.unformatted_content_delimiter[0]) { + resulting_string = this.__patterns.unformatted_content_delimiter.read(); + } + } + + if (!resulting_string) { + resulting_string = this.__patterns.word.read(); + } + if (resulting_string) { + return this._create_token(TOKEN.TEXT, resulting_string); + } +}; + +module.exports.Tokenizer = Tokenizer; +module.exports.TOKEN = TOKEN; diff --git a/node_modules/js-beautify/js/src/index.js b/node_modules/js-beautify/js/src/index.js new file mode 100644 index 00000000..3c0cc3a8 --- /dev/null +++ b/node_modules/js-beautify/js/src/index.js @@ -0,0 +1,44 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var js_beautify = require('./javascript/index'); +var css_beautify = require('./css/index'); +var html_beautify = require('./html/index'); + +function style_html(html_source, options, js, css) { + js = js || js_beautify; + css = css || css_beautify; + return html_beautify(html_source, options, js, css); +} +style_html.defaultOptions = html_beautify.defaultOptions; + +module.exports.js = js_beautify; +module.exports.css = css_beautify; +module.exports.html = style_html; diff --git a/node_modules/js-beautify/js/src/javascript/acorn.js b/node_modules/js-beautify/js/src/javascript/acorn.js new file mode 100644 index 00000000..0442c30e --- /dev/null +++ b/node_modules/js-beautify/js/src/javascript/acorn.js @@ -0,0 +1,57 @@ +/* jshint node: true, curly: false */ +// Parts of this section of code is taken from acorn. +// +// Acorn was written by Marijn Haverbeke and released under an MIT +// license. The Unicode regexps (for identifiers and whitespace) were +// taken from [Esprima](http://esprima.org) by Ariya Hidayat. +// +// Git repositories for Acorn are available at +// +// http://marijnhaverbeke.nl/git/acorn +// https://github.com/marijnh/acorn.git + +// ## Character categories + + +'use strict'; + +// acorn used char codes to squeeze the last bit of performance out +// Beautifier is okay without that, so we're using regex +// permit $ (36) and @ (64). @ is used in ES7 decorators. +// 65 through 91 are uppercase letters. +// permit _ (95). +// 97 through 123 are lowercase letters. +var baseASCIIidentifierStartChars = "\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a"; + +// inside an identifier @ is not allowed but 0-9 are. +var baseASCIIidentifierChars = "\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a"; + +// Big ugly regular expressions that match characters in the +// whitespace, identifier, and identifier-start categories. These +// are only applied when a character is found to actually have a +// code point above 128. +var nonASCIIidentifierStartChars = "\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc"; +var nonASCIIidentifierChars = "\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f"; +//var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +//var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + +var identifierStart = "(?:\\\\u[0-9a-fA-F]{4}|[" + baseASCIIidentifierStartChars + nonASCIIidentifierStartChars + "])"; +var identifierChars = "(?:\\\\u[0-9a-fA-F]{4}|[" + baseASCIIidentifierChars + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "])*"; + +exports.identifier = new RegExp(identifierStart + identifierChars, 'g'); +exports.identifierStart = new RegExp(identifierStart); +exports.identifierMatch = new RegExp("(?:\\\\u[0-9a-fA-F]{4}|[" + baseASCIIidentifierChars + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "])+"); + +var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; // jshint ignore:line + +// Whether a single character denotes a newline. + +exports.newline = /[\n\r\u2028\u2029]/; + +// Matches a whole line break (where CRLF is considered a single +// line break). Used to count lines. + +// in javascript, these two differ +// in python they are the same, different methods are called on them +exports.lineBreak = new RegExp('\r\n|' + exports.newline.source); +exports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g'); diff --git a/node_modules/js-beautify/js/src/javascript/beautifier.js b/node_modules/js-beautify/js/src/javascript/beautifier.js new file mode 100644 index 00000000..6490e4d7 --- /dev/null +++ b/node_modules/js-beautify/js/src/javascript/beautifier.js @@ -0,0 +1,1455 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var Output = require('../core/output').Output; +var Token = require('../core/token').Token; +var acorn = require('./acorn'); +var Options = require('./options').Options; +var Tokenizer = require('./tokenizer').Tokenizer; +var line_starters = require('./tokenizer').line_starters; +var positionable_operators = require('./tokenizer').positionable_operators; +var TOKEN = require('./tokenizer').TOKEN; + + +function in_array(what, arr) { + return arr.indexOf(what) !== -1; +} + +function ltrim(s) { + return s.replace(/^\s+/g, ''); +} + +function generateMapFromStrings(list) { + var result = {}; + for (var x = 0; x < list.length; x++) { + // make the mapped names underscored instead of dash + result[list[x].replace(/-/g, '_')] = list[x]; + } + return result; +} + +function reserved_word(token, word) { + return token && token.type === TOKEN.RESERVED && token.text === word; +} + +function reserved_array(token, words) { + return token && token.type === TOKEN.RESERVED && in_array(token.text, words); +} +// Unsure of what they mean, but they work. Worth cleaning up in future. +var special_words = ['case', 'return', 'do', 'if', 'throw', 'else', 'await', 'break', 'continue', 'async']; + +var validPositionValues = ['before-newline', 'after-newline', 'preserve-newline']; + +// Generate map from array +var OPERATOR_POSITION = generateMapFromStrings(validPositionValues); + +var OPERATOR_POSITION_BEFORE_OR_PRESERVE = [OPERATOR_POSITION.before_newline, OPERATOR_POSITION.preserve_newline]; + +var MODE = { + BlockStatement: 'BlockStatement', // 'BLOCK' + Statement: 'Statement', // 'STATEMENT' + ObjectLiteral: 'ObjectLiteral', // 'OBJECT', + ArrayLiteral: 'ArrayLiteral', //'[EXPRESSION]', + ForInitializer: 'ForInitializer', //'(FOR-EXPRESSION)', + Conditional: 'Conditional', //'(COND-EXPRESSION)', + Expression: 'Expression' //'(EXPRESSION)' +}; + +function remove_redundant_indentation(output, frame) { + // This implementation is effective but has some issues: + // - can cause line wrap to happen too soon due to indent removal + // after wrap points are calculated + // These issues are minor compared to ugly indentation. + + if (frame.multiline_frame || + frame.mode === MODE.ForInitializer || + frame.mode === MODE.Conditional) { + return; + } + + // remove one indent from each line inside this section + output.remove_indent(frame.start_line_index); +} + +// we could use just string.split, but +// IE doesn't like returning empty strings +function split_linebreaks(s) { + //return s.split(/\x0d\x0a|\x0a/); + + s = s.replace(acorn.allLineBreaks, '\n'); + var out = [], + idx = s.indexOf("\n"); + while (idx !== -1) { + out.push(s.substring(0, idx)); + s = s.substring(idx + 1); + idx = s.indexOf("\n"); + } + if (s.length) { + out.push(s); + } + return out; +} + +function is_array(mode) { + return mode === MODE.ArrayLiteral; +} + +function is_expression(mode) { + return in_array(mode, [MODE.Expression, MODE.ForInitializer, MODE.Conditional]); +} + +function all_lines_start_with(lines, c) { + for (var i = 0; i < lines.length; i++) { + var line = lines[i].trim(); + if (line.charAt(0) !== c) { + return false; + } + } + return true; +} + +function each_line_matches_indent(lines, indent) { + var i = 0, + len = lines.length, + line; + for (; i < len; i++) { + line = lines[i]; + // allow empty lines to pass through + if (line && line.indexOf(indent) !== 0) { + return false; + } + } + return true; +} + + +function Beautifier(source_text, options) { + options = options || {}; + this._source_text = source_text || ''; + + this._output = null; + this._tokens = null; + this._last_last_text = null; + this._flags = null; + this._previous_flags = null; + + this._flag_store = null; + this._options = new Options(options); +} + +Beautifier.prototype.create_flags = function(flags_base, mode) { + var next_indent_level = 0; + if (flags_base) { + next_indent_level = flags_base.indentation_level; + if (!this._output.just_added_newline() && + flags_base.line_indent_level > next_indent_level) { + next_indent_level = flags_base.line_indent_level; + } + } + + var next_flags = { + mode: mode, + parent: flags_base, + last_token: flags_base ? flags_base.last_token : new Token(TOKEN.START_BLOCK, ''), // last token text + last_word: flags_base ? flags_base.last_word : '', // last TOKEN.WORD passed + declaration_statement: false, + declaration_assignment: false, + multiline_frame: false, + inline_frame: false, + if_block: false, + else_block: false, + do_block: false, + do_while: false, + import_block: false, + in_case_statement: false, // switch(..){ INSIDE HERE } + in_case: false, // we're on the exact line with "case 0:" + case_body: false, // the indented case-action block + indentation_level: next_indent_level, + alignment: 0, + line_indent_level: flags_base ? flags_base.line_indent_level : next_indent_level, + start_line_index: this._output.get_line_number(), + ternary_depth: 0 + }; + return next_flags; +}; + +Beautifier.prototype._reset = function(source_text) { + var baseIndentString = source_text.match(/^[\t ]*/)[0]; + + this._last_last_text = ''; // pre-last token text + this._output = new Output(this._options, baseIndentString); + + // If testing the ignore directive, start with output disable set to true + this._output.raw = this._options.test_output_raw; + + + // Stack of parsing/formatting states, including MODE. + // We tokenize, parse, and output in an almost purely a forward-only stream of token input + // and formatted output. This makes the beautifier less accurate than full parsers + // but also far more tolerant of syntax errors. + // + // For example, the default mode is MODE.BlockStatement. If we see a '{' we push a new frame of type + // MODE.BlockStatement on the the stack, even though it could be object literal. If we later + // encounter a ":", we'll switch to to MODE.ObjectLiteral. If we then see a ";", + // most full parsers would die, but the beautifier gracefully falls back to + // MODE.BlockStatement and continues on. + this._flag_store = []; + this.set_mode(MODE.BlockStatement); + var tokenizer = new Tokenizer(source_text, this._options); + this._tokens = tokenizer.tokenize(); + return source_text; +}; + +Beautifier.prototype.beautify = function() { + // if disabled, return the input unchanged. + if (this._options.disabled) { + return this._source_text; + } + + var sweet_code; + var source_text = this._reset(this._source_text); + + var eol = this._options.eol; + if (this._options.eol === 'auto') { + eol = '\n'; + if (source_text && acorn.lineBreak.test(source_text || '')) { + eol = source_text.match(acorn.lineBreak)[0]; + } + } + + var current_token = this._tokens.next(); + while (current_token) { + this.handle_token(current_token); + + this._last_last_text = this._flags.last_token.text; + this._flags.last_token = current_token; + + current_token = this._tokens.next(); + } + + sweet_code = this._output.get_code(eol); + + return sweet_code; +}; + +Beautifier.prototype.handle_token = function(current_token, preserve_statement_flags) { + if (current_token.type === TOKEN.START_EXPR) { + this.handle_start_expr(current_token); + } else if (current_token.type === TOKEN.END_EXPR) { + this.handle_end_expr(current_token); + } else if (current_token.type === TOKEN.START_BLOCK) { + this.handle_start_block(current_token); + } else if (current_token.type === TOKEN.END_BLOCK) { + this.handle_end_block(current_token); + } else if (current_token.type === TOKEN.WORD) { + this.handle_word(current_token); + } else if (current_token.type === TOKEN.RESERVED) { + this.handle_word(current_token); + } else if (current_token.type === TOKEN.SEMICOLON) { + this.handle_semicolon(current_token); + } else if (current_token.type === TOKEN.STRING) { + this.handle_string(current_token); + } else if (current_token.type === TOKEN.EQUALS) { + this.handle_equals(current_token); + } else if (current_token.type === TOKEN.OPERATOR) { + this.handle_operator(current_token); + } else if (current_token.type === TOKEN.COMMA) { + this.handle_comma(current_token); + } else if (current_token.type === TOKEN.BLOCK_COMMENT) { + this.handle_block_comment(current_token, preserve_statement_flags); + } else if (current_token.type === TOKEN.COMMENT) { + this.handle_comment(current_token, preserve_statement_flags); + } else if (current_token.type === TOKEN.DOT) { + this.handle_dot(current_token); + } else if (current_token.type === TOKEN.EOF) { + this.handle_eof(current_token); + } else if (current_token.type === TOKEN.UNKNOWN) { + this.handle_unknown(current_token, preserve_statement_flags); + } else { + this.handle_unknown(current_token, preserve_statement_flags); + } +}; + +Beautifier.prototype.handle_whitespace_and_comments = function(current_token, preserve_statement_flags) { + var newlines = current_token.newlines; + var keep_whitespace = this._options.keep_array_indentation && is_array(this._flags.mode); + + if (current_token.comments_before) { + var comment_token = current_token.comments_before.next(); + while (comment_token) { + // The cleanest handling of inline comments is to treat them as though they aren't there. + // Just continue formatting and the behavior should be logical. + // Also ignore unknown tokens. Again, this should result in better behavior. + this.handle_whitespace_and_comments(comment_token, preserve_statement_flags); + this.handle_token(comment_token, preserve_statement_flags); + comment_token = current_token.comments_before.next(); + } + } + + if (keep_whitespace) { + for (var i = 0; i < newlines; i += 1) { + this.print_newline(i > 0, preserve_statement_flags); + } + } else { + if (this._options.max_preserve_newlines && newlines > this._options.max_preserve_newlines) { + newlines = this._options.max_preserve_newlines; + } + + if (this._options.preserve_newlines) { + if (newlines > 1) { + this.print_newline(false, preserve_statement_flags); + for (var j = 1; j < newlines; j += 1) { + this.print_newline(true, preserve_statement_flags); + } + } + } + } + +}; + +var newline_restricted_tokens = ['async', 'break', 'continue', 'return', 'throw', 'yield']; + +Beautifier.prototype.allow_wrap_or_preserved_newline = function(current_token, force_linewrap) { + force_linewrap = (force_linewrap === undefined) ? false : force_linewrap; + + // Never wrap the first token on a line + if (this._output.just_added_newline()) { + return; + } + + var shouldPreserveOrForce = (this._options.preserve_newlines && current_token.newlines) || force_linewrap; + var operatorLogicApplies = in_array(this._flags.last_token.text, positionable_operators) || + in_array(current_token.text, positionable_operators); + + if (operatorLogicApplies) { + var shouldPrintOperatorNewline = ( + in_array(this._flags.last_token.text, positionable_operators) && + in_array(this._options.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE) + ) || + in_array(current_token.text, positionable_operators); + shouldPreserveOrForce = shouldPreserveOrForce && shouldPrintOperatorNewline; + } + + if (shouldPreserveOrForce) { + this.print_newline(false, true); + } else if (this._options.wrap_line_length) { + if (reserved_array(this._flags.last_token, newline_restricted_tokens)) { + // These tokens should never have a newline inserted + // between them and the following expression. + return; + } + this._output.set_wrap_point(); + } +}; + +Beautifier.prototype.print_newline = function(force_newline, preserve_statement_flags) { + if (!preserve_statement_flags) { + if (this._flags.last_token.text !== ';' && this._flags.last_token.text !== ',' && this._flags.last_token.text !== '=' && (this._flags.last_token.type !== TOKEN.OPERATOR || this._flags.last_token.text === '--' || this._flags.last_token.text === '++')) { + var next_token = this._tokens.peek(); + while (this._flags.mode === MODE.Statement && + !(this._flags.if_block && reserved_word(next_token, 'else')) && + !this._flags.do_block) { + this.restore_mode(); + } + } + } + + if (this._output.add_new_line(force_newline)) { + this._flags.multiline_frame = true; + } +}; + +Beautifier.prototype.print_token_line_indentation = function(current_token) { + if (this._output.just_added_newline()) { + if (this._options.keep_array_indentation && + current_token.newlines && + (current_token.text === '[' || is_array(this._flags.mode))) { + this._output.current_line.set_indent(-1); + this._output.current_line.push(current_token.whitespace_before); + this._output.space_before_token = false; + } else if (this._output.set_indent(this._flags.indentation_level, this._flags.alignment)) { + this._flags.line_indent_level = this._flags.indentation_level; + } + } +}; + +Beautifier.prototype.print_token = function(current_token) { + if (this._output.raw) { + this._output.add_raw_token(current_token); + return; + } + + if (this._options.comma_first && current_token.previous && current_token.previous.type === TOKEN.COMMA && + this._output.just_added_newline()) { + if (this._output.previous_line.last() === ',') { + var popped = this._output.previous_line.pop(); + // if the comma was already at the start of the line, + // pull back onto that line and reprint the indentation + if (this._output.previous_line.is_empty()) { + this._output.previous_line.push(popped); + this._output.trim(true); + this._output.current_line.pop(); + this._output.trim(); + } + + // add the comma in front of the next token + this.print_token_line_indentation(current_token); + this._output.add_token(','); + this._output.space_before_token = true; + } + } + + this.print_token_line_indentation(current_token); + this._output.non_breaking_space = true; + this._output.add_token(current_token.text); + if (this._output.previous_token_wrapped) { + this._flags.multiline_frame = true; + } +}; + +Beautifier.prototype.indent = function() { + this._flags.indentation_level += 1; + this._output.set_indent(this._flags.indentation_level, this._flags.alignment); +}; + +Beautifier.prototype.deindent = function() { + if (this._flags.indentation_level > 0 && + ((!this._flags.parent) || this._flags.indentation_level > this._flags.parent.indentation_level)) { + this._flags.indentation_level -= 1; + this._output.set_indent(this._flags.indentation_level, this._flags.alignment); + } +}; + +Beautifier.prototype.set_mode = function(mode) { + if (this._flags) { + this._flag_store.push(this._flags); + this._previous_flags = this._flags; + } else { + this._previous_flags = this.create_flags(null, mode); + } + + this._flags = this.create_flags(this._previous_flags, mode); + this._output.set_indent(this._flags.indentation_level, this._flags.alignment); +}; + + +Beautifier.prototype.restore_mode = function() { + if (this._flag_store.length > 0) { + this._previous_flags = this._flags; + this._flags = this._flag_store.pop(); + if (this._previous_flags.mode === MODE.Statement) { + remove_redundant_indentation(this._output, this._previous_flags); + } + this._output.set_indent(this._flags.indentation_level, this._flags.alignment); + } +}; + +Beautifier.prototype.start_of_object_property = function() { + return this._flags.parent.mode === MODE.ObjectLiteral && this._flags.mode === MODE.Statement && ( + (this._flags.last_token.text === ':' && this._flags.ternary_depth === 0) || (reserved_array(this._flags.last_token, ['get', 'set']))); +}; + +Beautifier.prototype.start_of_statement = function(current_token) { + var start = false; + start = start || reserved_array(this._flags.last_token, ['var', 'let', 'const']) && current_token.type === TOKEN.WORD; + start = start || reserved_word(this._flags.last_token, 'do'); + start = start || (!(this._flags.parent.mode === MODE.ObjectLiteral && this._flags.mode === MODE.Statement)) && reserved_array(this._flags.last_token, newline_restricted_tokens) && !current_token.newlines; + start = start || reserved_word(this._flags.last_token, 'else') && + !(reserved_word(current_token, 'if') && !current_token.comments_before); + start = start || (this._flags.last_token.type === TOKEN.END_EXPR && (this._previous_flags.mode === MODE.ForInitializer || this._previous_flags.mode === MODE.Conditional)); + start = start || (this._flags.last_token.type === TOKEN.WORD && this._flags.mode === MODE.BlockStatement && + !this._flags.in_case && + !(current_token.text === '--' || current_token.text === '++') && + this._last_last_text !== 'function' && + current_token.type !== TOKEN.WORD && current_token.type !== TOKEN.RESERVED); + start = start || (this._flags.mode === MODE.ObjectLiteral && ( + (this._flags.last_token.text === ':' && this._flags.ternary_depth === 0) || reserved_array(this._flags.last_token, ['get', 'set']))); + + if (start) { + this.set_mode(MODE.Statement); + this.indent(); + + this.handle_whitespace_and_comments(current_token, true); + + // Issue #276: + // If starting a new statement with [if, for, while, do], push to a new line. + // if (a) if (b) if(c) d(); else e(); else f(); + if (!this.start_of_object_property()) { + this.allow_wrap_or_preserved_newline(current_token, + reserved_array(current_token, ['do', 'for', 'if', 'while'])); + } + return true; + } + return false; +}; + +Beautifier.prototype.handle_start_expr = function(current_token) { + // The conditional starts the statement if appropriate. + if (!this.start_of_statement(current_token)) { + this.handle_whitespace_and_comments(current_token); + } + + var next_mode = MODE.Expression; + if (current_token.text === '[') { + + if (this._flags.last_token.type === TOKEN.WORD || this._flags.last_token.text === ')') { + // this is array index specifier, break immediately + // a[x], fn()[x] + if (reserved_array(this._flags.last_token, line_starters)) { + this._output.space_before_token = true; + } + this.print_token(current_token); + this.set_mode(next_mode); + this.indent(); + if (this._options.space_in_paren) { + this._output.space_before_token = true; + } + return; + } + + next_mode = MODE.ArrayLiteral; + if (is_array(this._flags.mode)) { + if (this._flags.last_token.text === '[' || + (this._flags.last_token.text === ',' && (this._last_last_text === ']' || this._last_last_text === '}'))) { + // ], [ goes to new line + // }, [ goes to new line + if (!this._options.keep_array_indentation) { + this.print_newline(); + } + } + } + + if (!in_array(this._flags.last_token.type, [TOKEN.START_EXPR, TOKEN.END_EXPR, TOKEN.WORD, TOKEN.OPERATOR])) { + this._output.space_before_token = true; + } + } else { + if (this._flags.last_token.type === TOKEN.RESERVED) { + if (this._flags.last_token.text === 'for') { + this._output.space_before_token = this._options.space_before_conditional; + next_mode = MODE.ForInitializer; + } else if (in_array(this._flags.last_token.text, ['if', 'while'])) { + this._output.space_before_token = this._options.space_before_conditional; + next_mode = MODE.Conditional; + } else if (in_array(this._flags.last_word, ['await', 'async'])) { + // Should be a space between await and an IIFE, or async and an arrow function + this._output.space_before_token = true; + } else if (this._flags.last_token.text === 'import' && current_token.whitespace_before === '') { + this._output.space_before_token = false; + } else if (in_array(this._flags.last_token.text, line_starters) || this._flags.last_token.text === 'catch') { + this._output.space_before_token = true; + } + } else if (this._flags.last_token.type === TOKEN.EQUALS || this._flags.last_token.type === TOKEN.OPERATOR) { + // Support of this kind of newline preservation. + // a = (b && + // (c || d)); + if (!this.start_of_object_property()) { + this.allow_wrap_or_preserved_newline(current_token); + } + } else if (this._flags.last_token.type === TOKEN.WORD) { + this._output.space_before_token = false; + + // function name() vs function name () + // function* name() vs function* name () + // async name() vs async name () + // In ES6, you can also define the method properties of an object + // var obj = {a: function() {}} + // It can be abbreviated + // var obj = {a() {}} + // var obj = { a() {}} vs var obj = { a () {}} + // var obj = { * a() {}} vs var obj = { * a () {}} + var peek_back_two = this._tokens.peek(-3); + if (this._options.space_after_named_function && peek_back_two) { + // peek starts at next character so -1 is current token + var peek_back_three = this._tokens.peek(-4); + if (reserved_array(peek_back_two, ['async', 'function']) || + (peek_back_two.text === '*' && reserved_array(peek_back_three, ['async', 'function']))) { + this._output.space_before_token = true; + } else if (this._flags.mode === MODE.ObjectLiteral) { + if ((peek_back_two.text === '{' || peek_back_two.text === ',') || + (peek_back_two.text === '*' && (peek_back_three.text === '{' || peek_back_three.text === ','))) { + this._output.space_before_token = true; + } + } + } + } else { + // Support preserving wrapped arrow function expressions + // a.b('c', + // () => d.e + // ) + this.allow_wrap_or_preserved_newline(current_token); + } + + // function() vs function () + // yield*() vs yield* () + // function*() vs function* () + if ((this._flags.last_token.type === TOKEN.RESERVED && (this._flags.last_word === 'function' || this._flags.last_word === 'typeof')) || + (this._flags.last_token.text === '*' && + (in_array(this._last_last_text, ['function', 'yield']) || + (this._flags.mode === MODE.ObjectLiteral && in_array(this._last_last_text, ['{', ',']))))) { + this._output.space_before_token = this._options.space_after_anon_function; + } + } + + if (this._flags.last_token.text === ';' || this._flags.last_token.type === TOKEN.START_BLOCK) { + this.print_newline(); + } else if (this._flags.last_token.type === TOKEN.END_EXPR || this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.END_BLOCK || this._flags.last_token.text === '.' || this._flags.last_token.type === TOKEN.COMMA) { + // do nothing on (( and )( and ][ and ]( and .( + // TODO: Consider whether forcing this is required. Review failing tests when removed. + this.allow_wrap_or_preserved_newline(current_token, current_token.newlines); + } + + this.print_token(current_token); + this.set_mode(next_mode); + if (this._options.space_in_paren) { + this._output.space_before_token = true; + } + + // In all cases, if we newline while inside an expression it should be indented. + this.indent(); +}; + +Beautifier.prototype.handle_end_expr = function(current_token) { + // statements inside expressions are not valid syntax, but... + // statements must all be closed when their container closes + while (this._flags.mode === MODE.Statement) { + this.restore_mode(); + } + + this.handle_whitespace_and_comments(current_token); + + if (this._flags.multiline_frame) { + this.allow_wrap_or_preserved_newline(current_token, + current_token.text === ']' && is_array(this._flags.mode) && !this._options.keep_array_indentation); + } + + if (this._options.space_in_paren) { + if (this._flags.last_token.type === TOKEN.START_EXPR && !this._options.space_in_empty_paren) { + // () [] no inner space in empty parens like these, ever, ref #320 + this._output.trim(); + this._output.space_before_token = false; + } else { + this._output.space_before_token = true; + } + } + this.deindent(); + this.print_token(current_token); + this.restore_mode(); + + remove_redundant_indentation(this._output, this._previous_flags); + + // do {} while () // no statement required after + if (this._flags.do_while && this._previous_flags.mode === MODE.Conditional) { + this._previous_flags.mode = MODE.Expression; + this._flags.do_block = false; + this._flags.do_while = false; + + } +}; + +Beautifier.prototype.handle_start_block = function(current_token) { + this.handle_whitespace_and_comments(current_token); + + // Check if this is should be treated as a ObjectLiteral + var next_token = this._tokens.peek(); + var second_token = this._tokens.peek(1); + if (this._flags.last_word === 'switch' && this._flags.last_token.type === TOKEN.END_EXPR) { + this.set_mode(MODE.BlockStatement); + this._flags.in_case_statement = true; + } else if (this._flags.case_body) { + this.set_mode(MODE.BlockStatement); + } else if (second_token && ( + (in_array(second_token.text, [':', ',']) && in_array(next_token.type, [TOKEN.STRING, TOKEN.WORD, TOKEN.RESERVED])) || + (in_array(next_token.text, ['get', 'set', '...']) && in_array(second_token.type, [TOKEN.WORD, TOKEN.RESERVED])) + )) { + // We don't support TypeScript,but we didn't break it for a very long time. + // We'll try to keep not breaking it. + if (!in_array(this._last_last_text, ['class', 'interface'])) { + this.set_mode(MODE.ObjectLiteral); + } else { + this.set_mode(MODE.BlockStatement); + } + } else if (this._flags.last_token.type === TOKEN.OPERATOR && this._flags.last_token.text === '=>') { + // arrow function: (param1, paramN) => { statements } + this.set_mode(MODE.BlockStatement); + } else if (in_array(this._flags.last_token.type, [TOKEN.EQUALS, TOKEN.START_EXPR, TOKEN.COMMA, TOKEN.OPERATOR]) || + reserved_array(this._flags.last_token, ['return', 'throw', 'import', 'default']) + ) { + // Detecting shorthand function syntax is difficult by scanning forward, + // so check the surrounding context. + // If the block is being returned, imported, export default, passed as arg, + // assigned with = or assigned in a nested object, treat as an ObjectLiteral. + this.set_mode(MODE.ObjectLiteral); + } else { + this.set_mode(MODE.BlockStatement); + } + + var empty_braces = !next_token.comments_before && next_token.text === '}'; + var empty_anonymous_function = empty_braces && this._flags.last_word === 'function' && + this._flags.last_token.type === TOKEN.END_EXPR; + + if (this._options.brace_preserve_inline) // check for inline, set inline_frame if so + { + // search forward for a newline wanted inside this block + var index = 0; + var check_token = null; + this._flags.inline_frame = true; + do { + index += 1; + check_token = this._tokens.peek(index - 1); + if (check_token.newlines) { + this._flags.inline_frame = false; + break; + } + } while (check_token.type !== TOKEN.EOF && + !(check_token.type === TOKEN.END_BLOCK && check_token.opened === current_token)); + } + + if ((this._options.brace_style === "expand" || + (this._options.brace_style === "none" && current_token.newlines)) && + !this._flags.inline_frame) { + if (this._flags.last_token.type !== TOKEN.OPERATOR && + (empty_anonymous_function || + this._flags.last_token.type === TOKEN.EQUALS || + (reserved_array(this._flags.last_token, special_words) && this._flags.last_token.text !== 'else'))) { + this._output.space_before_token = true; + } else { + this.print_newline(false, true); + } + } else { // collapse || inline_frame + if (is_array(this._previous_flags.mode) && (this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.COMMA)) { + if (this._flags.last_token.type === TOKEN.COMMA || this._options.space_in_paren) { + this._output.space_before_token = true; + } + + if (this._flags.last_token.type === TOKEN.COMMA || (this._flags.last_token.type === TOKEN.START_EXPR && this._flags.inline_frame)) { + this.allow_wrap_or_preserved_newline(current_token); + this._previous_flags.multiline_frame = this._previous_flags.multiline_frame || this._flags.multiline_frame; + this._flags.multiline_frame = false; + } + } + if (this._flags.last_token.type !== TOKEN.OPERATOR && this._flags.last_token.type !== TOKEN.START_EXPR) { + if (this._flags.last_token.type === TOKEN.START_BLOCK && !this._flags.inline_frame) { + this.print_newline(); + } else { + this._output.space_before_token = true; + } + } + } + this.print_token(current_token); + this.indent(); + + // Except for specific cases, open braces are followed by a new line. + if (!empty_braces && !(this._options.brace_preserve_inline && this._flags.inline_frame)) { + this.print_newline(); + } +}; + +Beautifier.prototype.handle_end_block = function(current_token) { + // statements must all be closed when their container closes + this.handle_whitespace_and_comments(current_token); + + while (this._flags.mode === MODE.Statement) { + this.restore_mode(); + } + + var empty_braces = this._flags.last_token.type === TOKEN.START_BLOCK; + + if (this._flags.inline_frame && !empty_braces) { // try inline_frame (only set if this._options.braces-preserve-inline) first + this._output.space_before_token = true; + } else if (this._options.brace_style === "expand") { + if (!empty_braces) { + this.print_newline(); + } + } else { + // skip {} + if (!empty_braces) { + if (is_array(this._flags.mode) && this._options.keep_array_indentation) { + // we REALLY need a newline here, but newliner would skip that + this._options.keep_array_indentation = false; + this.print_newline(); + this._options.keep_array_indentation = true; + + } else { + this.print_newline(); + } + } + } + this.restore_mode(); + this.print_token(current_token); +}; + +Beautifier.prototype.handle_word = function(current_token) { + if (current_token.type === TOKEN.RESERVED) { + if (in_array(current_token.text, ['set', 'get']) && this._flags.mode !== MODE.ObjectLiteral) { + current_token.type = TOKEN.WORD; + } else if (current_token.text === 'import' && this._tokens.peek().text === '(') { + current_token.type = TOKEN.WORD; + } else if (in_array(current_token.text, ['as', 'from']) && !this._flags.import_block) { + current_token.type = TOKEN.WORD; + } else if (this._flags.mode === MODE.ObjectLiteral) { + var next_token = this._tokens.peek(); + if (next_token.text === ':') { + current_token.type = TOKEN.WORD; + } + } + } + + if (this.start_of_statement(current_token)) { + // The conditional starts the statement if appropriate. + if (reserved_array(this._flags.last_token, ['var', 'let', 'const']) && current_token.type === TOKEN.WORD) { + this._flags.declaration_statement = true; + } + } else if (current_token.newlines && !is_expression(this._flags.mode) && + (this._flags.last_token.type !== TOKEN.OPERATOR || (this._flags.last_token.text === '--' || this._flags.last_token.text === '++')) && + this._flags.last_token.type !== TOKEN.EQUALS && + (this._options.preserve_newlines || !reserved_array(this._flags.last_token, ['var', 'let', 'const', 'set', 'get']))) { + this.handle_whitespace_and_comments(current_token); + this.print_newline(); + } else { + this.handle_whitespace_and_comments(current_token); + } + + if (this._flags.do_block && !this._flags.do_while) { + if (reserved_word(current_token, 'while')) { + // do {} ## while () + this._output.space_before_token = true; + this.print_token(current_token); + this._output.space_before_token = true; + this._flags.do_while = true; + return; + } else { + // do {} should always have while as the next word. + // if we don't see the expected while, recover + this.print_newline(); + this._flags.do_block = false; + } + } + + // if may be followed by else, or not + // Bare/inline ifs are tricky + // Need to unwind the modes correctly: if (a) if (b) c(); else d(); else e(); + if (this._flags.if_block) { + if (!this._flags.else_block && reserved_word(current_token, 'else')) { + this._flags.else_block = true; + } else { + while (this._flags.mode === MODE.Statement) { + this.restore_mode(); + } + this._flags.if_block = false; + this._flags.else_block = false; + } + } + + if (this._flags.in_case_statement && reserved_array(current_token, ['case', 'default'])) { + this.print_newline(); + if (this._flags.last_token.type !== TOKEN.END_BLOCK && (this._flags.case_body || this._options.jslint_happy)) { + // switch cases following one another + this.deindent(); + } + this._flags.case_body = false; + + this.print_token(current_token); + this._flags.in_case = true; + return; + } + + if (this._flags.last_token.type === TOKEN.COMMA || this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.EQUALS || this._flags.last_token.type === TOKEN.OPERATOR) { + if (!this.start_of_object_property()) { + this.allow_wrap_or_preserved_newline(current_token); + } + } + + if (reserved_word(current_token, 'function')) { + if (in_array(this._flags.last_token.text, ['}', ';']) || + (this._output.just_added_newline() && !(in_array(this._flags.last_token.text, ['(', '[', '{', ':', '=', ',']) || this._flags.last_token.type === TOKEN.OPERATOR))) { + // make sure there is a nice clean space of at least one blank line + // before a new function definition + if (!this._output.just_added_blankline() && !current_token.comments_before) { + this.print_newline(); + this.print_newline(true); + } + } + if (this._flags.last_token.type === TOKEN.RESERVED || this._flags.last_token.type === TOKEN.WORD) { + if (reserved_array(this._flags.last_token, ['get', 'set', 'new', 'export']) || + reserved_array(this._flags.last_token, newline_restricted_tokens)) { + this._output.space_before_token = true; + } else if (reserved_word(this._flags.last_token, 'default') && this._last_last_text === 'export') { + this._output.space_before_token = true; + } else if (this._flags.last_token.text === 'declare') { + // accomodates Typescript declare function formatting + this._output.space_before_token = true; + } else { + this.print_newline(); + } + } else if (this._flags.last_token.type === TOKEN.OPERATOR || this._flags.last_token.text === '=') { + // foo = function + this._output.space_before_token = true; + } else if (!this._flags.multiline_frame && (is_expression(this._flags.mode) || is_array(this._flags.mode))) { + // (function + } else { + this.print_newline(); + } + + this.print_token(current_token); + this._flags.last_word = current_token.text; + return; + } + + var prefix = 'NONE'; + + if (this._flags.last_token.type === TOKEN.END_BLOCK) { + + if (this._previous_flags.inline_frame) { + prefix = 'SPACE'; + } else if (!reserved_array(current_token, ['else', 'catch', 'finally', 'from'])) { + prefix = 'NEWLINE'; + } else { + if (this._options.brace_style === "expand" || + this._options.brace_style === "end-expand" || + (this._options.brace_style === "none" && current_token.newlines)) { + prefix = 'NEWLINE'; + } else { + prefix = 'SPACE'; + this._output.space_before_token = true; + } + } + } else if (this._flags.last_token.type === TOKEN.SEMICOLON && this._flags.mode === MODE.BlockStatement) { + // TODO: Should this be for STATEMENT as well? + prefix = 'NEWLINE'; + } else if (this._flags.last_token.type === TOKEN.SEMICOLON && is_expression(this._flags.mode)) { + prefix = 'SPACE'; + } else if (this._flags.last_token.type === TOKEN.STRING) { + prefix = 'NEWLINE'; + } else if (this._flags.last_token.type === TOKEN.RESERVED || this._flags.last_token.type === TOKEN.WORD || + (this._flags.last_token.text === '*' && + (in_array(this._last_last_text, ['function', 'yield']) || + (this._flags.mode === MODE.ObjectLiteral && in_array(this._last_last_text, ['{', ',']))))) { + prefix = 'SPACE'; + } else if (this._flags.last_token.type === TOKEN.START_BLOCK) { + if (this._flags.inline_frame) { + prefix = 'SPACE'; + } else { + prefix = 'NEWLINE'; + } + } else if (this._flags.last_token.type === TOKEN.END_EXPR) { + this._output.space_before_token = true; + prefix = 'NEWLINE'; + } + + if (reserved_array(current_token, line_starters) && this._flags.last_token.text !== ')') { + if (this._flags.inline_frame || this._flags.last_token.text === 'else' || this._flags.last_token.text === 'export') { + prefix = 'SPACE'; + } else { + prefix = 'NEWLINE'; + } + + } + + if (reserved_array(current_token, ['else', 'catch', 'finally'])) { + if ((!(this._flags.last_token.type === TOKEN.END_BLOCK && this._previous_flags.mode === MODE.BlockStatement) || + this._options.brace_style === "expand" || + this._options.brace_style === "end-expand" || + (this._options.brace_style === "none" && current_token.newlines)) && + !this._flags.inline_frame) { + this.print_newline(); + } else { + this._output.trim(true); + var line = this._output.current_line; + // If we trimmed and there's something other than a close block before us + // put a newline back in. Handles '} // comment' scenario. + if (line.last() !== '}') { + this.print_newline(); + } + this._output.space_before_token = true; + } + } else if (prefix === 'NEWLINE') { + if (reserved_array(this._flags.last_token, special_words)) { + // no newline between 'return nnn' + this._output.space_before_token = true; + } else if (this._flags.last_token.text === 'declare' && reserved_array(current_token, ['var', 'let', 'const'])) { + // accomodates Typescript declare formatting + this._output.space_before_token = true; + } else if (this._flags.last_token.type !== TOKEN.END_EXPR) { + if ((this._flags.last_token.type !== TOKEN.START_EXPR || !reserved_array(current_token, ['var', 'let', 'const'])) && this._flags.last_token.text !== ':') { + // no need to force newline on 'var': for (var x = 0...) + if (reserved_word(current_token, 'if') && reserved_word(current_token.previous, 'else')) { + // no newline for } else if { + this._output.space_before_token = true; + } else { + this.print_newline(); + } + } + } else if (reserved_array(current_token, line_starters) && this._flags.last_token.text !== ')') { + this.print_newline(); + } + } else if (this._flags.multiline_frame && is_array(this._flags.mode) && this._flags.last_token.text === ',' && this._last_last_text === '}') { + this.print_newline(); // }, in lists get a newline treatment + } else if (prefix === 'SPACE') { + this._output.space_before_token = true; + } + if (current_token.previous && (current_token.previous.type === TOKEN.WORD || current_token.previous.type === TOKEN.RESERVED)) { + this._output.space_before_token = true; + } + this.print_token(current_token); + this._flags.last_word = current_token.text; + + if (current_token.type === TOKEN.RESERVED) { + if (current_token.text === 'do') { + this._flags.do_block = true; + } else if (current_token.text === 'if') { + this._flags.if_block = true; + } else if (current_token.text === 'import') { + this._flags.import_block = true; + } else if (this._flags.import_block && reserved_word(current_token, 'from')) { + this._flags.import_block = false; + } + } +}; + +Beautifier.prototype.handle_semicolon = function(current_token) { + if (this.start_of_statement(current_token)) { + // The conditional starts the statement if appropriate. + // Semicolon can be the start (and end) of a statement + this._output.space_before_token = false; + } else { + this.handle_whitespace_and_comments(current_token); + } + + var next_token = this._tokens.peek(); + while (this._flags.mode === MODE.Statement && + !(this._flags.if_block && reserved_word(next_token, 'else')) && + !this._flags.do_block) { + this.restore_mode(); + } + + // hacky but effective for the moment + if (this._flags.import_block) { + this._flags.import_block = false; + } + this.print_token(current_token); +}; + +Beautifier.prototype.handle_string = function(current_token) { + if (this.start_of_statement(current_token)) { + // The conditional starts the statement if appropriate. + // One difference - strings want at least a space before + this._output.space_before_token = true; + } else { + this.handle_whitespace_and_comments(current_token); + if (this._flags.last_token.type === TOKEN.RESERVED || this._flags.last_token.type === TOKEN.WORD || this._flags.inline_frame) { + this._output.space_before_token = true; + } else if (this._flags.last_token.type === TOKEN.COMMA || this._flags.last_token.type === TOKEN.START_EXPR || this._flags.last_token.type === TOKEN.EQUALS || this._flags.last_token.type === TOKEN.OPERATOR) { + if (!this.start_of_object_property()) { + this.allow_wrap_or_preserved_newline(current_token); + } + } else { + this.print_newline(); + } + } + this.print_token(current_token); +}; + +Beautifier.prototype.handle_equals = function(current_token) { + if (this.start_of_statement(current_token)) { + // The conditional starts the statement if appropriate. + } else { + this.handle_whitespace_and_comments(current_token); + } + + if (this._flags.declaration_statement) { + // just got an '=' in a var-line, different formatting/line-breaking, etc will now be done + this._flags.declaration_assignment = true; + } + this._output.space_before_token = true; + this.print_token(current_token); + this._output.space_before_token = true; +}; + +Beautifier.prototype.handle_comma = function(current_token) { + this.handle_whitespace_and_comments(current_token, true); + + this.print_token(current_token); + this._output.space_before_token = true; + if (this._flags.declaration_statement) { + if (is_expression(this._flags.parent.mode)) { + // do not break on comma, for(var a = 1, b = 2) + this._flags.declaration_assignment = false; + } + + if (this._flags.declaration_assignment) { + this._flags.declaration_assignment = false; + this.print_newline(false, true); + } else if (this._options.comma_first) { + // for comma-first, we want to allow a newline before the comma + // to turn into a newline after the comma, which we will fixup later + this.allow_wrap_or_preserved_newline(current_token); + } + } else if (this._flags.mode === MODE.ObjectLiteral || + (this._flags.mode === MODE.Statement && this._flags.parent.mode === MODE.ObjectLiteral)) { + if (this._flags.mode === MODE.Statement) { + this.restore_mode(); + } + + if (!this._flags.inline_frame) { + this.print_newline(); + } + } else if (this._options.comma_first) { + // EXPR or DO_BLOCK + // for comma-first, we want to allow a newline before the comma + // to turn into a newline after the comma, which we will fixup later + this.allow_wrap_or_preserved_newline(current_token); + } +}; + +Beautifier.prototype.handle_operator = function(current_token) { + var isGeneratorAsterisk = current_token.text === '*' && + (reserved_array(this._flags.last_token, ['function', 'yield']) || + (in_array(this._flags.last_token.type, [TOKEN.START_BLOCK, TOKEN.COMMA, TOKEN.END_BLOCK, TOKEN.SEMICOLON])) + ); + var isUnary = in_array(current_token.text, ['-', '+']) && ( + in_array(this._flags.last_token.type, [TOKEN.START_BLOCK, TOKEN.START_EXPR, TOKEN.EQUALS, TOKEN.OPERATOR]) || + in_array(this._flags.last_token.text, line_starters) || + this._flags.last_token.text === ',' + ); + + if (this.start_of_statement(current_token)) { + // The conditional starts the statement if appropriate. + } else { + var preserve_statement_flags = !isGeneratorAsterisk; + this.handle_whitespace_and_comments(current_token, preserve_statement_flags); + } + + if (reserved_array(this._flags.last_token, special_words)) { + // "return" had a special handling in TK_WORD. Now we need to return the favor + this._output.space_before_token = true; + this.print_token(current_token); + return; + } + + // hack for actionscript's import .*; + if (current_token.text === '*' && this._flags.last_token.type === TOKEN.DOT) { + this.print_token(current_token); + return; + } + + if (current_token.text === '::') { + // no spaces around exotic namespacing syntax operator + this.print_token(current_token); + return; + } + + // Allow line wrapping between operators when operator_position is + // set to before or preserve + if (this._flags.last_token.type === TOKEN.OPERATOR && in_array(this._options.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE)) { + this.allow_wrap_or_preserved_newline(current_token); + } + + if (current_token.text === ':' && this._flags.in_case) { + this.print_token(current_token); + + this._flags.in_case = false; + this._flags.case_body = true; + if (this._tokens.peek().type !== TOKEN.START_BLOCK) { + this.indent(); + this.print_newline(); + } else { + this._output.space_before_token = true; + } + return; + } + + var space_before = true; + var space_after = true; + var in_ternary = false; + if (current_token.text === ':') { + if (this._flags.ternary_depth === 0) { + // Colon is invalid javascript outside of ternary and object, but do our best to guess what was meant. + space_before = false; + } else { + this._flags.ternary_depth -= 1; + in_ternary = true; + } + } else if (current_token.text === '?') { + this._flags.ternary_depth += 1; + } + + // let's handle the operator_position option prior to any conflicting logic + if (!isUnary && !isGeneratorAsterisk && this._options.preserve_newlines && in_array(current_token.text, positionable_operators)) { + var isColon = current_token.text === ':'; + var isTernaryColon = (isColon && in_ternary); + var isOtherColon = (isColon && !in_ternary); + + switch (this._options.operator_position) { + case OPERATOR_POSITION.before_newline: + // if the current token is : and it's not a ternary statement then we set space_before to false + this._output.space_before_token = !isOtherColon; + + this.print_token(current_token); + + if (!isColon || isTernaryColon) { + this.allow_wrap_or_preserved_newline(current_token); + } + + this._output.space_before_token = true; + return; + + case OPERATOR_POSITION.after_newline: + // if the current token is anything but colon, or (via deduction) it's a colon and in a ternary statement, + // then print a newline. + + this._output.space_before_token = true; + + if (!isColon || isTernaryColon) { + if (this._tokens.peek().newlines) { + this.print_newline(false, true); + } else { + this.allow_wrap_or_preserved_newline(current_token); + } + } else { + this._output.space_before_token = false; + } + + this.print_token(current_token); + + this._output.space_before_token = true; + return; + + case OPERATOR_POSITION.preserve_newline: + if (!isOtherColon) { + this.allow_wrap_or_preserved_newline(current_token); + } + + // if we just added a newline, or the current token is : and it's not a ternary statement, + // then we set space_before to false + space_before = !(this._output.just_added_newline() || isOtherColon); + + this._output.space_before_token = space_before; + this.print_token(current_token); + this._output.space_before_token = true; + return; + } + } + + if (isGeneratorAsterisk) { + this.allow_wrap_or_preserved_newline(current_token); + space_before = false; + var next_token = this._tokens.peek(); + space_after = next_token && in_array(next_token.type, [TOKEN.WORD, TOKEN.RESERVED]); + } else if (current_token.text === '...') { + this.allow_wrap_or_preserved_newline(current_token); + space_before = this._flags.last_token.type === TOKEN.START_BLOCK; + space_after = false; + } else if (in_array(current_token.text, ['--', '++', '!', '~']) || isUnary) { + // unary operators (and binary +/- pretending to be unary) special cases + if (this._flags.last_token.type === TOKEN.COMMA || this._flags.last_token.type === TOKEN.START_EXPR) { + this.allow_wrap_or_preserved_newline(current_token); + } + + space_before = false; + space_after = false; + + // http://www.ecma-international.org/ecma-262/5.1/#sec-7.9.1 + // if there is a newline between -- or ++ and anything else we should preserve it. + if (current_token.newlines && (current_token.text === '--' || current_token.text === '++')) { + this.print_newline(false, true); + } + + if (this._flags.last_token.text === ';' && is_expression(this._flags.mode)) { + // for (;; ++i) + // ^^^ + space_before = true; + } + + if (this._flags.last_token.type === TOKEN.RESERVED) { + space_before = true; + } else if (this._flags.last_token.type === TOKEN.END_EXPR) { + space_before = !(this._flags.last_token.text === ']' && (current_token.text === '--' || current_token.text === '++')); + } else if (this._flags.last_token.type === TOKEN.OPERATOR) { + // a++ + ++b; + // a - -b + space_before = in_array(current_token.text, ['--', '-', '++', '+']) && in_array(this._flags.last_token.text, ['--', '-', '++', '+']); + // + and - are not unary when preceeded by -- or ++ operator + // a-- + b + // a * +b + // a - -b + if (in_array(current_token.text, ['+', '-']) && in_array(this._flags.last_token.text, ['--', '++'])) { + space_after = true; + } + } + + + if (((this._flags.mode === MODE.BlockStatement && !this._flags.inline_frame) || this._flags.mode === MODE.Statement) && + (this._flags.last_token.text === '{' || this._flags.last_token.text === ';')) { + // { foo; --i } + // foo(); --bar; + this.print_newline(); + } + } + + this._output.space_before_token = this._output.space_before_token || space_before; + this.print_token(current_token); + this._output.space_before_token = space_after; +}; + +Beautifier.prototype.handle_block_comment = function(current_token, preserve_statement_flags) { + if (this._output.raw) { + this._output.add_raw_token(current_token); + if (current_token.directives && current_token.directives.preserve === 'end') { + // If we're testing the raw output behavior, do not allow a directive to turn it off. + this._output.raw = this._options.test_output_raw; + } + return; + } + + if (current_token.directives) { + this.print_newline(false, preserve_statement_flags); + this.print_token(current_token); + if (current_token.directives.preserve === 'start') { + this._output.raw = true; + } + this.print_newline(false, true); + return; + } + + // inline block + if (!acorn.newline.test(current_token.text) && !current_token.newlines) { + this._output.space_before_token = true; + this.print_token(current_token); + this._output.space_before_token = true; + return; + } else { + this.print_block_commment(current_token, preserve_statement_flags); + } +}; + +Beautifier.prototype.print_block_commment = function(current_token, preserve_statement_flags) { + var lines = split_linebreaks(current_token.text); + var j; // iterator for this case + var javadoc = false; + var starless = false; + var lastIndent = current_token.whitespace_before; + var lastIndentLength = lastIndent.length; + + // block comment starts with a new line + this.print_newline(false, preserve_statement_flags); + + // first line always indented + this.print_token_line_indentation(current_token); + this._output.add_token(lines[0]); + this.print_newline(false, preserve_statement_flags); + + + if (lines.length > 1) { + lines = lines.slice(1); + javadoc = all_lines_start_with(lines, '*'); + starless = each_line_matches_indent(lines, lastIndent); + + if (javadoc) { + this._flags.alignment = 1; + } + + for (j = 0; j < lines.length; j++) { + if (javadoc) { + // javadoc: reformat and re-indent + this.print_token_line_indentation(current_token); + this._output.add_token(ltrim(lines[j])); + } else if (starless && lines[j]) { + // starless: re-indent non-empty content, avoiding trim + this.print_token_line_indentation(current_token); + this._output.add_token(lines[j].substring(lastIndentLength)); + } else { + // normal comments output raw + this._output.current_line.set_indent(-1); + this._output.add_token(lines[j]); + } + + // for comments on their own line or more than one line, make sure there's a new line after + this.print_newline(false, preserve_statement_flags); + } + + this._flags.alignment = 0; + } +}; + + +Beautifier.prototype.handle_comment = function(current_token, preserve_statement_flags) { + if (current_token.newlines) { + this.print_newline(false, preserve_statement_flags); + } else { + this._output.trim(true); + } + + this._output.space_before_token = true; + this.print_token(current_token); + this.print_newline(false, preserve_statement_flags); +}; + +Beautifier.prototype.handle_dot = function(current_token) { + if (this.start_of_statement(current_token)) { + // The conditional starts the statement if appropriate. + } else { + this.handle_whitespace_and_comments(current_token, true); + } + + if (reserved_array(this._flags.last_token, special_words)) { + this._output.space_before_token = false; + } else { + // allow preserved newlines before dots in general + // force newlines on dots after close paren when break_chained - for bar().baz() + this.allow_wrap_or_preserved_newline(current_token, + this._flags.last_token.text === ')' && this._options.break_chained_methods); + } + + // Only unindent chained method dot if this dot starts a new line. + // Otherwise the automatic extra indentation removal will handle the over indent + if (this._options.unindent_chained_methods && this._output.just_added_newline()) { + this.deindent(); + } + + this.print_token(current_token); +}; + +Beautifier.prototype.handle_unknown = function(current_token, preserve_statement_flags) { + this.print_token(current_token); + + if (current_token.text[current_token.text.length - 1] === '\n') { + this.print_newline(false, preserve_statement_flags); + } +}; + +Beautifier.prototype.handle_eof = function(current_token) { + // Unwind any open statements + while (this._flags.mode === MODE.Statement) { + this.restore_mode(); + } + this.handle_whitespace_and_comments(current_token); +}; + +module.exports.Beautifier = Beautifier; diff --git a/node_modules/js-beautify/js/src/javascript/index.js b/node_modules/js-beautify/js/src/javascript/index.js new file mode 100644 index 00000000..ec74608a --- /dev/null +++ b/node_modules/js-beautify/js/src/javascript/index.js @@ -0,0 +1,42 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var Beautifier = require('./beautifier').Beautifier, + Options = require('./options').Options; + +function js_beautify(js_source_text, options) { + var beautifier = new Beautifier(js_source_text, options); + return beautifier.beautify(); +} + +module.exports = js_beautify; +module.exports.defaultOptions = function() { + return new Options(); +}; diff --git a/node_modules/js-beautify/js/src/javascript/options.js b/node_modules/js-beautify/js/src/javascript/options.js new file mode 100644 index 00000000..1234f239 --- /dev/null +++ b/node_modules/js-beautify/js/src/javascript/options.js @@ -0,0 +1,93 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var BaseOptions = require('../core/options').Options; + +var validPositionValues = ['before-newline', 'after-newline', 'preserve-newline']; + +function Options(options) { + BaseOptions.call(this, options, 'js'); + + // compatibility, re + var raw_brace_style = this.raw_options.brace_style || null; + if (raw_brace_style === "expand-strict") { //graceful handling of deprecated option + this.raw_options.brace_style = "expand"; + } else if (raw_brace_style === "collapse-preserve-inline") { //graceful handling of deprecated option + this.raw_options.brace_style = "collapse,preserve-inline"; + } else if (this.raw_options.braces_on_own_line !== undefined) { //graceful handling of deprecated option + this.raw_options.brace_style = this.raw_options.braces_on_own_line ? "expand" : "collapse"; + // } else if (!raw_brace_style) { //Nothing exists to set it + // raw_brace_style = "collapse"; + } + + //preserve-inline in delimited string will trigger brace_preserve_inline, everything + //else is considered a brace_style and the last one only will have an effect + + var brace_style_split = this._get_selection_list('brace_style', ['collapse', 'expand', 'end-expand', 'none', 'preserve-inline']); + + this.brace_preserve_inline = false; //Defaults in case one or other was not specified in meta-option + this.brace_style = "collapse"; + + for (var bs = 0; bs < brace_style_split.length; bs++) { + if (brace_style_split[bs] === "preserve-inline") { + this.brace_preserve_inline = true; + } else { + this.brace_style = brace_style_split[bs]; + } + } + + this.unindent_chained_methods = this._get_boolean('unindent_chained_methods'); + this.break_chained_methods = this._get_boolean('break_chained_methods'); + this.space_in_paren = this._get_boolean('space_in_paren'); + this.space_in_empty_paren = this._get_boolean('space_in_empty_paren'); + this.jslint_happy = this._get_boolean('jslint_happy'); + this.space_after_anon_function = this._get_boolean('space_after_anon_function'); + this.space_after_named_function = this._get_boolean('space_after_named_function'); + this.keep_array_indentation = this._get_boolean('keep_array_indentation'); + this.space_before_conditional = this._get_boolean('space_before_conditional', true); + this.unescape_strings = this._get_boolean('unescape_strings'); + this.e4x = this._get_boolean('e4x'); + this.comma_first = this._get_boolean('comma_first'); + this.operator_position = this._get_selection('operator_position', validPositionValues); + + // For testing of beautify preserve:start directive + this.test_output_raw = this._get_boolean('test_output_raw'); + + // force this._options.space_after_anon_function to true if this._options.jslint_happy + if (this.jslint_happy) { + this.space_after_anon_function = true; + } + +} +Options.prototype = new BaseOptions(); + + + +module.exports.Options = Options; diff --git a/node_modules/js-beautify/js/src/javascript/tokenizer.js b/node_modules/js-beautify/js/src/javascript/tokenizer.js new file mode 100644 index 00000000..597b2154 --- /dev/null +++ b/node_modules/js-beautify/js/src/javascript/tokenizer.js @@ -0,0 +1,562 @@ +/*jshint node:true */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +'use strict'; + +var InputScanner = require('../core/inputscanner').InputScanner; +var BaseTokenizer = require('../core/tokenizer').Tokenizer; +var BASETOKEN = require('../core/tokenizer').TOKEN; +var Directives = require('../core/directives').Directives; +var acorn = require('./acorn'); +var Pattern = require('../core/pattern').Pattern; +var TemplatablePattern = require('../core/templatablepattern').TemplatablePattern; + + +function in_array(what, arr) { + return arr.indexOf(what) !== -1; +} + + +var TOKEN = { + START_EXPR: 'TK_START_EXPR', + END_EXPR: 'TK_END_EXPR', + START_BLOCK: 'TK_START_BLOCK', + END_BLOCK: 'TK_END_BLOCK', + WORD: 'TK_WORD', + RESERVED: 'TK_RESERVED', + SEMICOLON: 'TK_SEMICOLON', + STRING: 'TK_STRING', + EQUALS: 'TK_EQUALS', + OPERATOR: 'TK_OPERATOR', + COMMA: 'TK_COMMA', + BLOCK_COMMENT: 'TK_BLOCK_COMMENT', + COMMENT: 'TK_COMMENT', + DOT: 'TK_DOT', + UNKNOWN: 'TK_UNKNOWN', + START: BASETOKEN.START, + RAW: BASETOKEN.RAW, + EOF: BASETOKEN.EOF +}; + + +var directives_core = new Directives(/\/\*/, /\*\//); + +var number_pattern = /0[xX][0123456789abcdefABCDEF]*|0[oO][01234567]*|0[bB][01]*|\d+n|(?:\.\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?/; + +var digit = /[0-9]/; + +// Dot "." must be distinguished from "..." and decimal +var dot_pattern = /[^\d\.]/; + +var positionable_operators = ( + ">>> === !== " + + "<< && >= ** != == <= >> || " + + "< / - + > : & % ? ^ | *").split(' '); + +// IMPORTANT: this must be sorted longest to shortest or tokenizing many not work. +// Also, you must update possitionable operators separately from punct +var punct = + ">>>= " + + "... >>= <<= === >>> !== **= " + + "=> ^= :: /= << <= == && -= >= >> != -- += ** || ++ %= &= *= |= " + + "= ! ? > < : / ^ - + * & % ~ |"; + +punct = punct.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"); +punct = punct.replace(/ /g, '|'); + +var punct_pattern = new RegExp(punct); + +// words which should always start on new line. +var line_starters = 'continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export'.split(','); +var reserved_words = line_starters.concat(['do', 'in', 'of', 'else', 'get', 'set', 'new', 'catch', 'finally', 'typeof', 'yield', 'async', 'await', 'from', 'as']); +var reserved_word_pattern = new RegExp('^(?:' + reserved_words.join('|') + ')$'); + +// var template_pattern = /(?:(?:<\?php|<\?=)[\s\S]*?\?>)|(?:<%[\s\S]*?%>)/g; + +var in_html_comment; + +var Tokenizer = function(input_string, options) { + BaseTokenizer.call(this, input_string, options); + + this._patterns.whitespace = this._patterns.whitespace.matching( + /\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source, + /\u2028\u2029/.source); + + var pattern_reader = new Pattern(this._input); + var templatable = new TemplatablePattern(this._input) + .read_options(this._options); + + this.__patterns = { + template: templatable, + identifier: templatable.starting_with(acorn.identifier).matching(acorn.identifierMatch), + number: pattern_reader.matching(number_pattern), + punct: pattern_reader.matching(punct_pattern), + // comment ends just before nearest linefeed or end of file + comment: pattern_reader.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/), + // /* ... */ comment ends with nearest */ or end of file + block_comment: pattern_reader.starting_with(/\/\*/).until_after(/\*\//), + html_comment_start: pattern_reader.matching(//), + include: pattern_reader.starting_with(/#include/).until_after(acorn.lineBreak), + shebang: pattern_reader.starting_with(/#!/).until_after(acorn.lineBreak), + xml: pattern_reader.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/), + single_quote: templatable.until(/['\\\n\r\u2028\u2029]/), + double_quote: templatable.until(/["\\\n\r\u2028\u2029]/), + template_text: templatable.until(/[`\\$]/), + template_expression: templatable.until(/[`}\\]/) + }; + +}; +Tokenizer.prototype = new BaseTokenizer(); + +Tokenizer.prototype._is_comment = function(current_token) { + return current_token.type === TOKEN.COMMENT || current_token.type === TOKEN.BLOCK_COMMENT || current_token.type === TOKEN.UNKNOWN; +}; + +Tokenizer.prototype._is_opening = function(current_token) { + return current_token.type === TOKEN.START_BLOCK || current_token.type === TOKEN.START_EXPR; +}; + +Tokenizer.prototype._is_closing = function(current_token, open_token) { + return (current_token.type === TOKEN.END_BLOCK || current_token.type === TOKEN.END_EXPR) && + (open_token && ( + (current_token.text === ']' && open_token.text === '[') || + (current_token.text === ')' && open_token.text === '(') || + (current_token.text === '}' && open_token.text === '{'))); +}; + +Tokenizer.prototype._reset = function() { + in_html_comment = false; +}; + +Tokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false + var token = null; + this._readWhitespace(); + var c = this._input.peek(); + + if (c === null) { + return this._create_token(TOKEN.EOF, ''); + } + + token = token || this._read_string(c); + token = token || this._read_word(previous_token); + token = token || this._read_singles(c); + token = token || this._read_comment(c); + token = token || this._read_regexp(c, previous_token); + token = token || this._read_xml(c, previous_token); + token = token || this._read_non_javascript(c); + token = token || this._read_punctuation(); + token = token || this._create_token(TOKEN.UNKNOWN, this._input.next()); + + return token; +}; + +Tokenizer.prototype._read_word = function(previous_token) { + var resulting_string; + resulting_string = this.__patterns.identifier.read(); + if (resulting_string !== '') { + resulting_string = resulting_string.replace(acorn.allLineBreaks, '\n'); + if (!(previous_token.type === TOKEN.DOT || + (previous_token.type === TOKEN.RESERVED && (previous_token.text === 'set' || previous_token.text === 'get'))) && + reserved_word_pattern.test(resulting_string)) { + if (resulting_string === 'in' || resulting_string === 'of') { // hack for 'in' and 'of' operators + return this._create_token(TOKEN.OPERATOR, resulting_string); + } + return this._create_token(TOKEN.RESERVED, resulting_string); + } + return this._create_token(TOKEN.WORD, resulting_string); + } + + resulting_string = this.__patterns.number.read(); + if (resulting_string !== '') { + return this._create_token(TOKEN.WORD, resulting_string); + } +}; + +Tokenizer.prototype._read_singles = function(c) { + var token = null; + if (c === '(' || c === '[') { + token = this._create_token(TOKEN.START_EXPR, c); + } else if (c === ')' || c === ']') { + token = this._create_token(TOKEN.END_EXPR, c); + } else if (c === '{') { + token = this._create_token(TOKEN.START_BLOCK, c); + } else if (c === '}') { + token = this._create_token(TOKEN.END_BLOCK, c); + } else if (c === ';') { + token = this._create_token(TOKEN.SEMICOLON, c); + } else if (c === '.' && dot_pattern.test(this._input.peek(1))) { + token = this._create_token(TOKEN.DOT, c); + } else if (c === ',') { + token = this._create_token(TOKEN.COMMA, c); + } + + if (token) { + this._input.next(); + } + return token; +}; + +Tokenizer.prototype._read_punctuation = function() { + var resulting_string = this.__patterns.punct.read(); + + if (resulting_string !== '') { + if (resulting_string === '=') { + return this._create_token(TOKEN.EQUALS, resulting_string); + } else { + return this._create_token(TOKEN.OPERATOR, resulting_string); + } + } +}; + +Tokenizer.prototype._read_non_javascript = function(c) { + var resulting_string = ''; + + if (c === '#') { + if (this._is_first_token()) { + resulting_string = this.__patterns.shebang.read(); + + if (resulting_string) { + return this._create_token(TOKEN.UNKNOWN, resulting_string.trim() + '\n'); + } + } + + // handles extendscript #includes + resulting_string = this.__patterns.include.read(); + + if (resulting_string) { + return this._create_token(TOKEN.UNKNOWN, resulting_string.trim() + '\n'); + } + + c = this._input.next(); + + // Spidermonkey-specific sharp variables for circular references. Considered obsolete. + var sharp = '#'; + if (this._input.hasNext() && this._input.testChar(digit)) { + do { + c = this._input.next(); + sharp += c; + } while (this._input.hasNext() && c !== '#' && c !== '='); + if (c === '#') { + // + } else if (this._input.peek() === '[' && this._input.peek(1) === ']') { + sharp += '[]'; + this._input.next(); + this._input.next(); + } else if (this._input.peek() === '{' && this._input.peek(1) === '}') { + sharp += '{}'; + this._input.next(); + this._input.next(); + } + return this._create_token(TOKEN.WORD, sharp); + } + + this._input.back(); + + } else if (c === '<' && this._is_first_token()) { + resulting_string = this.__patterns.html_comment_start.read(); + if (resulting_string) { + while (this._input.hasNext() && !this._input.testChar(acorn.newline)) { + resulting_string += this._input.next(); + } + in_html_comment = true; + return this._create_token(TOKEN.COMMENT, resulting_string); + } + } else if (in_html_comment && c === '-') { + resulting_string = this.__patterns.html_comment_end.read(); + if (resulting_string) { + in_html_comment = false; + return this._create_token(TOKEN.COMMENT, resulting_string); + } + } + + return null; +}; + +Tokenizer.prototype._read_comment = function(c) { + var token = null; + if (c === '/') { + var comment = ''; + if (this._input.peek(1) === '*') { + // peek for comment /* ... */ + comment = this.__patterns.block_comment.read(); + var directives = directives_core.get_directives(comment); + if (directives && directives.ignore === 'start') { + comment += directives_core.readIgnored(this._input); + } + comment = comment.replace(acorn.allLineBreaks, '\n'); + token = this._create_token(TOKEN.BLOCK_COMMENT, comment); + token.directives = directives; + } else if (this._input.peek(1) === '/') { + // peek for comment // ... + comment = this.__patterns.comment.read(); + token = this._create_token(TOKEN.COMMENT, comment); + } + } + return token; +}; + +Tokenizer.prototype._read_string = function(c) { + if (c === '`' || c === "'" || c === '"') { + var resulting_string = this._input.next(); + this.has_char_escapes = false; + + if (c === '`') { + resulting_string += this._read_string_recursive('`', true, '${'); + } else { + resulting_string += this._read_string_recursive(c); + } + + if (this.has_char_escapes && this._options.unescape_strings) { + resulting_string = unescape_string(resulting_string); + } + + if (this._input.peek() === c) { + resulting_string += this._input.next(); + } + + resulting_string = resulting_string.replace(acorn.allLineBreaks, '\n'); + + return this._create_token(TOKEN.STRING, resulting_string); + } + + return null; +}; + +Tokenizer.prototype._allow_regexp_or_xml = function(previous_token) { + // regex and xml can only appear in specific locations during parsing + return (previous_token.type === TOKEN.RESERVED && in_array(previous_token.text, ['return', 'case', 'throw', 'else', 'do', 'typeof', 'yield'])) || + (previous_token.type === TOKEN.END_EXPR && previous_token.text === ')' && + previous_token.opened.previous.type === TOKEN.RESERVED && in_array(previous_token.opened.previous.text, ['if', 'while', 'for'])) || + (in_array(previous_token.type, [TOKEN.COMMENT, TOKEN.START_EXPR, TOKEN.START_BLOCK, TOKEN.START, + TOKEN.END_BLOCK, TOKEN.OPERATOR, TOKEN.EQUALS, TOKEN.EOF, TOKEN.SEMICOLON, TOKEN.COMMA + ])); +}; + +Tokenizer.prototype._read_regexp = function(c, previous_token) { + + if (c === '/' && this._allow_regexp_or_xml(previous_token)) { + // handle regexp + // + var resulting_string = this._input.next(); + var esc = false; + + var in_char_class = false; + while (this._input.hasNext() && + ((esc || in_char_class || this._input.peek() !== c) && + !this._input.testChar(acorn.newline))) { + resulting_string += this._input.peek(); + if (!esc) { + esc = this._input.peek() === '\\'; + if (this._input.peek() === '[') { + in_char_class = true; + } else if (this._input.peek() === ']') { + in_char_class = false; + } + } else { + esc = false; + } + this._input.next(); + } + + if (this._input.peek() === c) { + resulting_string += this._input.next(); + + // regexps may have modifiers /regexp/MOD , so fetch those, too + // Only [gim] are valid, but if the user puts in garbage, do what we can to take it. + resulting_string += this._input.read(acorn.identifier); + } + return this._create_token(TOKEN.STRING, resulting_string); + } + return null; +}; + +Tokenizer.prototype._read_xml = function(c, previous_token) { + + if (this._options.e4x && c === "<" && this._allow_regexp_or_xml(previous_token)) { + var xmlStr = ''; + var match = this.__patterns.xml.read_match(); + // handle e4x xml literals + // + if (match) { + // Trim root tag to attempt to + var rootTag = match[2].replace(/^{\s+/, '{').replace(/\s+}$/, '}'); + var isCurlyRoot = rootTag.indexOf('{') === 0; + var depth = 0; + while (match) { + var isEndTag = !!match[1]; + var tagName = match[2]; + var isSingletonTag = (!!match[match.length - 1]) || (tagName.slice(0, 8) === "![CDATA["); + if (!isSingletonTag && + (tagName === rootTag || (isCurlyRoot && tagName.replace(/^{\s+/, '{').replace(/\s+}$/, '}')))) { + if (isEndTag) { + --depth; + } else { + ++depth; + } + } + xmlStr += match[0]; + if (depth <= 0) { + break; + } + match = this.__patterns.xml.read_match(); + } + // if we didn't close correctly, keep unformatted. + if (!match) { + xmlStr += this._input.match(/[\s\S]*/g)[0]; + } + xmlStr = xmlStr.replace(acorn.allLineBreaks, '\n'); + return this._create_token(TOKEN.STRING, xmlStr); + } + } + + return null; +}; + +function unescape_string(s) { + // You think that a regex would work for this + // return s.replace(/\\x([0-9a-f]{2})/gi, function(match, val) { + // return String.fromCharCode(parseInt(val, 16)); + // }) + // However, dealing with '\xff', '\\xff', '\\\xff' makes this more fun. + var out = '', + escaped = 0; + + var input_scan = new InputScanner(s); + var matched = null; + + while (input_scan.hasNext()) { + // Keep any whitespace, non-slash characters + // also keep slash pairs. + matched = input_scan.match(/([\s]|[^\\]|\\\\)+/g); + + if (matched) { + out += matched[0]; + } + + if (input_scan.peek() === '\\') { + input_scan.next(); + if (input_scan.peek() === 'x') { + matched = input_scan.match(/x([0-9A-Fa-f]{2})/g); + } else if (input_scan.peek() === 'u') { + matched = input_scan.match(/u([0-9A-Fa-f]{4})/g); + } else { + out += '\\'; + if (input_scan.hasNext()) { + out += input_scan.next(); + } + continue; + } + + // If there's some error decoding, return the original string + if (!matched) { + return s; + } + + escaped = parseInt(matched[1], 16); + + if (escaped > 0x7e && escaped <= 0xff && matched[0].indexOf('x') === 0) { + // we bail out on \x7f..\xff, + // leaving whole string escaped, + // as it's probably completely binary + return s; + } else if (escaped >= 0x00 && escaped < 0x20) { + // leave 0x00...0x1f escaped + out += '\\' + matched[0]; + continue; + } else if (escaped === 0x22 || escaped === 0x27 || escaped === 0x5c) { + // single-quote, apostrophe, backslash - escape these + out += '\\' + String.fromCharCode(escaped); + } else { + out += String.fromCharCode(escaped); + } + } + } + + return out; +} + +// handle string +// +Tokenizer.prototype._read_string_recursive = function(delimiter, allow_unescaped_newlines, start_sub) { + var current_char; + var pattern; + if (delimiter === '\'') { + pattern = this.__patterns.single_quote; + } else if (delimiter === '"') { + pattern = this.__patterns.double_quote; + } else if (delimiter === '`') { + pattern = this.__patterns.template_text; + } else if (delimiter === '}') { + pattern = this.__patterns.template_expression; + } + + var resulting_string = pattern.read(); + var next = ''; + while (this._input.hasNext()) { + next = this._input.next(); + if (next === delimiter || + (!allow_unescaped_newlines && acorn.newline.test(next))) { + this._input.back(); + break; + } else if (next === '\\' && this._input.hasNext()) { + current_char = this._input.peek(); + + if (current_char === 'x' || current_char === 'u') { + this.has_char_escapes = true; + } else if (current_char === '\r' && this._input.peek(1) === '\n') { + this._input.next(); + } + next += this._input.next(); + } else if (start_sub) { + if (start_sub === '${' && next === '$' && this._input.peek() === '{') { + next += this._input.next(); + } + + if (start_sub === next) { + if (delimiter === '`') { + next += this._read_string_recursive('}', allow_unescaped_newlines, '`'); + } else { + next += this._read_string_recursive('`', allow_unescaped_newlines, '${'); + } + if (this._input.hasNext()) { + next += this._input.next(); + } + } + } + next += pattern.read(); + resulting_string += next; + } + + return resulting_string; +}; + +module.exports.Tokenizer = Tokenizer; +module.exports.TOKEN = TOKEN; +module.exports.positionable_operators = positionable_operators.slice(); +module.exports.line_starters = line_starters.slice(); diff --git a/node_modules/js-beautify/js/src/unpackers/javascriptobfuscator_unpacker.js b/node_modules/js-beautify/js/src/unpackers/javascriptobfuscator_unpacker.js new file mode 100644 index 00000000..c18794cd --- /dev/null +++ b/node_modules/js-beautify/js/src/unpackers/javascriptobfuscator_unpacker.js @@ -0,0 +1,132 @@ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +// +// simple unpacker/deobfuscator for scripts messed up with javascriptobfuscator.com +// written by Einar Lielmanis +// +// usage: +// +// if (JavascriptObfuscator.detect(some_string)) { +// var unpacked = JavascriptObfuscator.unpack(some_string); +// } +// +// + +/*jshint strict:false */ + +var JavascriptObfuscator = { + detect: function(str) { + return /^var _0x[a-f0-9]+ ?\= ?\[/.test(str); + }, + + unpack: function(str) { + if (JavascriptObfuscator.detect(str)) { + var matches = /var (_0x[a-f\d]+) ?\= ?\[(.*?)\];/.exec(str); + if (matches) { + var var_name = matches[1]; + var strings = JavascriptObfuscator._smart_split(matches[2]); + str = str.substring(matches[0].length); + for (var k in strings) { + str = str.replace(new RegExp(var_name + '\\[' + k + '\\]', 'g'), + JavascriptObfuscator._fix_quotes(JavascriptObfuscator._unescape(strings[k]))); + } + } + } + return str; + }, + + _fix_quotes: function(str) { + var matches = /^"(.*)"$/.exec(str); + if (matches) { + str = matches[1]; + str = "'" + str.replace(/'/g, "\\'") + "'"; + } + return str; + }, + + _smart_split: function(str) { + var strings = []; + var pos = 0; + while (pos < str.length) { + if (str.charAt(pos) === '"') { + // new word + var word = ''; + pos += 1; + while (pos < str.length) { + if (str.charAt(pos) === '"') { + break; + } + if (str.charAt(pos) === '\\') { + word += '\\'; + pos++; + } + word += str.charAt(pos); + pos++; + } + strings.push('"' + word + '"'); + } + pos += 1; + } + return strings; + }, + + + _unescape: function(str) { + // inefficient if used repeatedly or on small strings, but wonderful on single large chunk of text + for (var i = 32; i < 128; i++) { + str = str.replace(new RegExp('\\\\x' + i.toString(16), 'ig'), String.fromCharCode(i)); + } + str = str.replace(/\\x09/g, "\t"); + return str; + }, + + run_tests: function(sanity_test) { + var t = sanity_test || new SanityTest(); + + t.test_function(JavascriptObfuscator._smart_split, "JavascriptObfuscator._smart_split"); + t.expect('', []); + t.expect('"a", "b"', ['"a"', '"b"']); + t.expect('"aaa","bbbb"', ['"aaa"', '"bbbb"']); + t.expect('"a", "b\\\""', ['"a"', '"b\\\""']); + t.test_function(JavascriptObfuscator._unescape, 'JavascriptObfuscator._unescape'); + t.expect('\\x40', '@'); + t.expect('\\x10', '\\x10'); + t.expect('\\x1', '\\x1'); + t.expect("\\x61\\x62\\x22\\x63\\x64", 'ab"cd'); + t.test_function(JavascriptObfuscator.detect, 'JavascriptObfuscator.detect'); + t.expect('', false); + t.expect('abcd', false); + t.expect('var _0xaaaa', false); + t.expect('var _0xaaaa = ["a", "b"]', true); + t.expect('var _0xaaaa=["a", "b"]', true); + t.expect('var _0x1234=["a","b"]', true); + return t; + } + + +}; diff --git a/node_modules/js-beautify/js/src/unpackers/myobfuscate_unpacker.js b/node_modules/js-beautify/js/src/unpackers/myobfuscate_unpacker.js new file mode 100644 index 00000000..0e028ed9 --- /dev/null +++ b/node_modules/js-beautify/js/src/unpackers/myobfuscate_unpacker.js @@ -0,0 +1,119 @@ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +// +// simple unpacker/deobfuscator for scripts messed up with myobfuscate.com +// You really don't want to obfuscate your scripts there: they're tracking +// your unpackings, your script gets turned into something like this, +// as of 2011-04-25: +/* + + var _escape = 'your_script_escaped'; + var _111 = document.createElement('script'); + _111.src = 'http://api.www.myobfuscate.com/?getsrc=ok' + + '&ref=' + encodeURIComponent(document.referrer) + + '&url=' + encodeURIComponent(document.URL); + var 000 = document.getElementsByTagName('head')[0]; + 000.appendChild(_111); + document.write(unescape(_escape)); + +*/ +// +// written by Einar Lielmanis +// +// usage: +// +// if (MyObfuscate.detect(some_string)) { +// var unpacked = MyObfuscate.unpack(some_string); +// } +// +// + +/*jshint strict:false */ + +var MyObfuscate = { + detect: function(str) { + if (/^var _?[0O1lI]{3}\=('|\[).*\)\)\);/.test(str)) { + return true; + } + if (/^function _?[0O1lI]{3}\(_/.test(str) && /eval\(/.test(str)) { + return true; + } + return false; + }, + + unpack: function(str) { + if (MyObfuscate.detect(str)) { + var __eval = eval; + try { + eval = function(unpacked) { // jshint ignore:line + if (MyObfuscate.starts_with(unpacked, 'var _escape')) { + // fetch the urlencoded stuff from the script, + var matches = /'([^']*)'/.exec(unpacked); + var unescaped = unescape(matches[1]); + if (MyObfuscate.starts_with(unescaped, '')) { + unescaped = unescaped.substr(0, unescaped.length - 9); + } + unpacked = unescaped; + } + // throw to terminate the script + unpacked = "// Unpacker warning: be careful when using myobfuscate.com for your projects:\n" + + "// scripts obfuscated by the free online version may call back home.\n" + + "\n//\n" + unpacked; + throw unpacked; + }; // jshint ignore:line + __eval(str); // should throw + } catch (e) { + // well, it failed. we'll just return the original, instead of crashing on user. + if (typeof e === "string") { + str = e; + } + } + eval = __eval; // jshint ignore:line + } + return str; + }, + + starts_with: function(str, what) { + return str.substr(0, what.length) === what; + }, + + ends_with: function(str, what) { + return str.substr(str.length - what.length, what.length) === what; + }, + + run_tests: function(sanity_test) { + var t = sanity_test || new SanityTest(); + + return t; + } + + +}; diff --git a/node_modules/js-beautify/js/src/unpackers/p_a_c_k_e_r_unpacker.js b/node_modules/js-beautify/js/src/unpackers/p_a_c_k_e_r_unpacker.js new file mode 100644 index 00000000..a7421674 --- /dev/null +++ b/node_modules/js-beautify/js/src/unpackers/p_a_c_k_e_r_unpacker.js @@ -0,0 +1,111 @@ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +// +// Unpacker for Dean Edward's p.a.c.k.e.r, a part of javascript beautifier +// +// Coincidentally, it can defeat a couple of other eval-based compressors. +// +// usage: +// +// if (P_A_C_K_E_R.detect(some_string)) { +// var unpacked = P_A_C_K_E_R.unpack(some_string); +// } +// +// + +/*jshint strict:false */ + +var P_A_C_K_E_R = { + detect: function(str) { + return (P_A_C_K_E_R.get_chunks(str).length > 0); + }, + + get_chunks: function(str) { + var chunks = str.match(/eval\(\(?function\(.*?(,0,\{\}\)\)|split\('\|'\)\)\))($|\n)/g); + return chunks ? chunks : []; + }, + + unpack: function(str) { + var chunks = P_A_C_K_E_R.get_chunks(str), + chunk; + for (var i = 0; i < chunks.length; i++) { + chunk = chunks[i].replace(/\n$/, ''); + str = str.split(chunk).join(P_A_C_K_E_R.unpack_chunk(chunk)); + } + return str; + }, + + unpack_chunk: function(str) { + var unpacked_source = ''; + var __eval = eval; + if (P_A_C_K_E_R.detect(str)) { + try { + eval = function(s) { // jshint ignore:line + unpacked_source += s; + return unpacked_source; + }; // jshint ignore:line + __eval(str); + if (typeof unpacked_source === 'string' && unpacked_source) { + str = unpacked_source; + } + } catch (e) { + // well, it failed. we'll just return the original, instead of crashing on user. + } + } + eval = __eval; // jshint ignore:line + return str; + }, + + run_tests: function(sanity_test) { + var t = sanity_test || new SanityTest(); + + var pk1 = "eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1',3,3,'var||a'.split('|'),0,{}))"; + var unpk1 = 'var a=1'; + var pk2 = "eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1',3,3,'foo||b'.split('|'),0,{}))"; + var unpk2 = 'foo b=1'; + var pk_broken = "eval(function(p,a,c,k,e,r){BORKBORK;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1',3,3,'var||a'.split('|'),0,{}))"; + var pk3 = "eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('0 2=1{}))',3,3,'var||a'.split('|'),0,{}))"; + var unpk3 = 'var a=1{}))'; + + t.test_function(P_A_C_K_E_R.detect, "P_A_C_K_E_R.detect"); + t.expect('', false); + t.expect('var a = b', false); + t.test_function(P_A_C_K_E_R.unpack, "P_A_C_K_E_R.unpack"); + t.expect(pk_broken, pk_broken); + t.expect(pk1, unpk1); + t.expect(pk2, unpk2); + t.expect(pk3, unpk3); + + var filler = '\nfiller\n'; + t.expect(filler + pk1 + "\n" + pk_broken + filler + pk2 + filler, filler + unpk1 + "\n" + pk_broken + filler + unpk2 + filler); + + return t; + } + + +}; diff --git a/node_modules/js-beautify/js/src/unpackers/urlencode_unpacker.js b/node_modules/js-beautify/js/src/unpackers/urlencode_unpacker.js new file mode 100644 index 00000000..0f7a9a29 --- /dev/null +++ b/node_modules/js-beautify/js/src/unpackers/urlencode_unpacker.js @@ -0,0 +1,104 @@ +/*global unescape */ +/*jshint curly: false, scripturl: true */ + +/* + + The MIT License (MIT) + + Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and 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: + + 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. +*/ + +// +// trivial bookmarklet/escaped script detector for the javascript beautifier +// written by Einar Lielmanis +// +// usage: +// +// if (Urlencoded.detect(some_string)) { +// var unpacked = Urlencoded.unpack(some_string); +// } +// +// + +/*jshint strict:false */ + + +var isNode = (typeof module !== 'undefined' && module.exports); +if (isNode) { + var SanityTest = require(__dirname + '/../../test/sanitytest'); +} + +var Urlencoded = { + detect: function(str) { + // the fact that script doesn't contain any space, but has %20 instead + // should be sufficient check for now. + if (str.indexOf(' ') === -1) { + if (str.indexOf('%2') !== -1) return true; + if (str.replace(/[^%]+/g, '').length > 3) return true; + } + return false; + }, + + unpack: function(str) { + if (Urlencoded.detect(str)) { + if (str.indexOf('%2B') !== -1 || str.indexOf('%2b') !== -1) { + // "+" escaped as "%2B" + return unescape(str.replace(/\+/g, '%20')); + } else { + return unescape(str); + } + } + return str; + }, + + + + run_tests: function(sanity_test) { + var t = sanity_test || new SanityTest(); + t.test_function(Urlencoded.detect, "Urlencoded.detect"); + t.expect('', false); + t.expect('var a = b', false); + t.expect('var%20a+=+b', true); + t.expect('var%20a=b', true); + t.expect('var%20%21%22', true); + t.expect('javascript:(function(){var%20whatever={init:function(){alert(%22a%22+%22b%22)}};whatever.init()})();', true); + t.test_function(Urlencoded.unpack, 'Urlencoded.unpack'); + + t.expect('javascript:(function(){var%20whatever={init:function(){alert(%22a%22+%22b%22)}};whatever.init()})();', + 'javascript:(function(){var whatever={init:function(){alert("a"+"b")}};whatever.init()})();' + ); + t.expect('', ''); + t.expect('abcd', 'abcd'); + t.expect('var a = b', 'var a = b'); + t.expect('var%20a=b', 'var a=b'); + t.expect('var%20a=b+1', 'var a=b+1'); + t.expect('var%20a=b%2b1', 'var a=b+1'); + return t; + } + + +}; + +if (isNode) { + module.exports = Urlencoded; +} diff --git a/node_modules/js-beautify/node_modules/.bin/editorconfig b/node_modules/js-beautify/node_modules/.bin/editorconfig new file mode 120000 index 00000000..a8d812f8 --- /dev/null +++ b/node_modules/js-beautify/node_modules/.bin/editorconfig @@ -0,0 +1 @@ +../../../editorconfig/bin/editorconfig \ No newline at end of file diff --git a/node_modules/js-beautify/node_modules/.bin/mkdirp b/node_modules/js-beautify/node_modules/.bin/mkdirp new file mode 120000 index 00000000..91a5f623 --- /dev/null +++ b/node_modules/js-beautify/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../../../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/node_modules/js-beautify/node_modules/.bin/nopt b/node_modules/js-beautify/node_modules/.bin/nopt new file mode 120000 index 00000000..d6493b6a --- /dev/null +++ b/node_modules/js-beautify/node_modules/.bin/nopt @@ -0,0 +1 @@ +../../../nopt/bin/nopt.js \ No newline at end of file diff --git a/node_modules/js-beautify/package.json b/node_modules/js-beautify/package.json new file mode 100644 index 00000000..dd32aed7 --- /dev/null +++ b/node_modules/js-beautify/package.json @@ -0,0 +1,64 @@ +{ + "name": "js-beautify", + "version": "1.10.1", + "description": "beautifier.io for node", + "main": "js/index.js", + "bin": { + "css-beautify": "./js/bin/css-beautify.js", + "html-beautify": "./js/bin/html-beautify.js", + "js-beautify": "./js/bin/js-beautify.js" + }, + "directories": { + "lib": "js/lib", + "test": "js/test" + }, + "files": [ + "js/bin/", + "js/lib/*.js", + "js/lib/unpackers/", + "js/index.js", + "js/src/**/*" + ], + "scripts": {}, + "bugs": "https://github.com/beautify-web/js-beautify/issues", + "homepage": "https://beautifier.io/", + "repository": { + "type": "git", + "url": "git://github.com/beautify-web/js-beautify.git" + }, + "keywords": [ + "beautify", + "beautifier", + "code-quality" + ], + "author": "Einar Lielmanis ", + "contributors": [ + "Vital Batmanov ", + "Chris J. Shull ", + "Gian Marco Gherardi ", + "Stan ", + "Vittorio Gambaletta ", + "Daniel Stockman ", + "Harutyun Amirjanyan ", + "Nochum Sossonko ", + "Liam Newman " + ], + "license": "MIT", + "dependencies": { + "config-chain": "^1.1.12", + "editorconfig": "^0.15.3", + "glob": "^7.1.3", + "mkdirp": "~0.5.1", + "nopt": "~4.0.1" + }, + "devDependencies": { + "benchmark": "^2.1.4", + "jshint": "^2.10.2", + "mocha": "^6.1.4", + "mustache": "^3.0.1", + "node-static": "^0.7.11", + "requirejs": "^2.3.6", + "webpack": "^4.36.1", + "webpack-cli": "^3.3.5" + } +} diff --git a/node_modules/jsonfile/CHANGELOG.md b/node_modules/jsonfile/CHANGELOG.md new file mode 100644 index 00000000..7718857a --- /dev/null +++ b/node_modules/jsonfile/CHANGELOG.md @@ -0,0 +1,145 @@ +4.0.0 / 2017-07-12 +------------------ + +- **BREAKING:** Remove global `spaces` option. +- **BREAKING:** Drop support for Node 0.10, 0.12, and io.js. +- Remove undocumented `passParsingErrors` option. +- Added `EOL` override option to `writeFile` when using `spaces`. [#89] + +3.0.1 / 2017-07-05 +------------------ + +- Fixed bug in `writeFile` when there was a serialization error & no callback was passed. In previous versions, an empty file would be written; now no file is written. + +3.0.0 / 2017-04-25 +------------------ + +- Changed behavior of `throws` option for `readFileSync`; now does not throw filesystem errors when `throws` is `false` + +2.4.0 / 2016-09-15 +------------------ +### Changed +- added optional support for `graceful-fs` [#62] + +2.3.1 / 2016-05-13 +------------------ +- fix to support BOM. [#45][#45] + +2.3.0 / 2016-04-16 +------------------ +- add `throws` to `readFile()`. See [#39][#39] +- add support for any arbitrary `fs` module. Useful with [mock-fs](https://www.npmjs.com/package/mock-fs) + +2.2.3 / 2015-10-14 +------------------ +- include file name in parse error. See: https://github.com/jprichardson/node-jsonfile/pull/34 + +2.2.2 / 2015-09-16 +------------------ +- split out tests into separate files +- fixed `throws` when set to `true` in `readFileSync()`. See: https://github.com/jprichardson/node-jsonfile/pull/33 + +2.2.1 / 2015-06-25 +------------------ +- fixed regression when passing in string as encoding for options in `writeFile()` and `writeFileSync()`. See: https://github.com/jprichardson/node-jsonfile/issues/28 + +2.2.0 / 2015-06-25 +------------------ +- added `options.spaces` to `writeFile()` and `writeFileSync()` + +2.1.2 / 2015-06-22 +------------------ +- fixed if passed `readFileSync(file, 'utf8')`. See: https://github.com/jprichardson/node-jsonfile/issues/25 + +2.1.1 / 2015-06-19 +------------------ +- fixed regressions if `null` is passed for options. See: https://github.com/jprichardson/node-jsonfile/issues/24 + +2.1.0 / 2015-06-19 +------------------ +- cleanup: JavaScript Standard Style, rename files, dropped terst for assert +- methods now support JSON revivers/replacers + +2.0.1 / 2015-05-24 +------------------ +- update license attribute https://github.com/jprichardson/node-jsonfile/pull/21 + +2.0.0 / 2014-07-28 +------------------ +* added `\n` to end of file on write. [#14](https://github.com/jprichardson/node-jsonfile/pull/14) +* added `options.throws` to `readFileSync()` +* dropped support for Node v0.8 + +1.2.0 / 2014-06-29 +------------------ +* removed semicolons +* bugfix: passed `options` to `fs.readFile` and `fs.readFileSync`. This technically changes behavior, but +changes it according to docs. [#12][#12] + +1.1.1 / 2013-11-11 +------------------ +* fixed catching of callback bug (ffissore / #5) + +1.1.0 / 2013-10-11 +------------------ +* added `options` param to methods, (seanodell / #4) + +1.0.1 / 2013-09-05 +------------------ +* removed `homepage` field from package.json to remove NPM warning + +1.0.0 / 2013-06-28 +------------------ +* added `.npmignore`, #1 +* changed spacing default from `4` to `2` to follow Node conventions + +0.0.1 / 2012-09-10 +------------------ +* Initial release. + +[#89]: https://github.com/jprichardson/node-jsonfile/pull/89 +[#45]: https://github.com/jprichardson/node-jsonfile/issues/45 "Reading of UTF8-encoded (w/ BOM) files fails" +[#44]: https://github.com/jprichardson/node-jsonfile/issues/44 "Extra characters in written file" +[#43]: https://github.com/jprichardson/node-jsonfile/issues/43 "Prettyfy json when written to file" +[#42]: https://github.com/jprichardson/node-jsonfile/pull/42 "Moved fs.readFileSync within the try/catch" +[#41]: https://github.com/jprichardson/node-jsonfile/issues/41 "Linux: Hidden file not working" +[#40]: https://github.com/jprichardson/node-jsonfile/issues/40 "autocreate folder doesn't work from Path-value" +[#39]: https://github.com/jprichardson/node-jsonfile/pull/39 "Add `throws` option for readFile (async)" +[#38]: https://github.com/jprichardson/node-jsonfile/pull/38 "Update README.md writeFile[Sync] signature" +[#37]: https://github.com/jprichardson/node-jsonfile/pull/37 "support append file" +[#36]: https://github.com/jprichardson/node-jsonfile/pull/36 "Add typescript definition file." +[#35]: https://github.com/jprichardson/node-jsonfile/pull/35 "Add typescript definition file." +[#34]: https://github.com/jprichardson/node-jsonfile/pull/34 "readFile JSON parse error includes filename" +[#33]: https://github.com/jprichardson/node-jsonfile/pull/33 "fix throw->throws typo in readFileSync()" +[#32]: https://github.com/jprichardson/node-jsonfile/issues/32 "readFile & readFileSync can possible have strip-comments as an option?" +[#31]: https://github.com/jprichardson/node-jsonfile/pull/31 "[Modify] Support string include is unicode escape string" +[#30]: https://github.com/jprichardson/node-jsonfile/issues/30 "How to use Jsonfile package in Meteor.js App?" +[#29]: https://github.com/jprichardson/node-jsonfile/issues/29 "writefile callback if no error?" +[#28]: https://github.com/jprichardson/node-jsonfile/issues/28 "writeFile options argument broken " +[#27]: https://github.com/jprichardson/node-jsonfile/pull/27 "Use svg instead of png to get better image quality" +[#26]: https://github.com/jprichardson/node-jsonfile/issues/26 "Breaking change to fs-extra" +[#25]: https://github.com/jprichardson/node-jsonfile/issues/25 "support string encoding param for read methods" +[#24]: https://github.com/jprichardson/node-jsonfile/issues/24 "readFile: Passing in null options with a callback throws an error" +[#23]: https://github.com/jprichardson/node-jsonfile/pull/23 "Add appendFile and appendFileSync" +[#22]: https://github.com/jprichardson/node-jsonfile/issues/22 "Default value for spaces in readme.md is outdated" +[#21]: https://github.com/jprichardson/node-jsonfile/pull/21 "Update license attribute" +[#20]: https://github.com/jprichardson/node-jsonfile/issues/20 "Add simple caching functionallity" +[#19]: https://github.com/jprichardson/node-jsonfile/pull/19 "Add appendFileSync method" +[#18]: https://github.com/jprichardson/node-jsonfile/issues/18 "Add updateFile and updateFileSync methods" +[#17]: https://github.com/jprichardson/node-jsonfile/issues/17 "seem read & write sync has sequentially problem" +[#16]: https://github.com/jprichardson/node-jsonfile/pull/16 "export spaces defaulted to null" +[#15]: https://github.com/jprichardson/node-jsonfile/issues/15 "`jsonfile.spaces` should default to `null`" +[#14]: https://github.com/jprichardson/node-jsonfile/pull/14 "Add EOL at EOF" +[#13]: https://github.com/jprichardson/node-jsonfile/issues/13 "Add a final newline" +[#12]: https://github.com/jprichardson/node-jsonfile/issues/12 "readFile doesn't accept options" +[#11]: https://github.com/jprichardson/node-jsonfile/pull/11 "Added try,catch to readFileSync" +[#10]: https://github.com/jprichardson/node-jsonfile/issues/10 "No output or error from writeFile" +[#9]: https://github.com/jprichardson/node-jsonfile/pull/9 "Change 'js' to 'jf' in example." +[#8]: https://github.com/jprichardson/node-jsonfile/pull/8 "Updated forgotten module.exports to me." +[#7]: https://github.com/jprichardson/node-jsonfile/pull/7 "Add file name in error message" +[#6]: https://github.com/jprichardson/node-jsonfile/pull/6 "Use graceful-fs when possible" +[#5]: https://github.com/jprichardson/node-jsonfile/pull/5 "Jsonfile doesn't behave nicely when used inside a test suite." +[#4]: https://github.com/jprichardson/node-jsonfile/pull/4 "Added options parameter to writeFile and writeFileSync" +[#3]: https://github.com/jprichardson/node-jsonfile/issues/3 "test2" +[#2]: https://github.com/jprichardson/node-jsonfile/issues/2 "homepage field must be a string url. Deleted." +[#1]: https://github.com/jprichardson/node-jsonfile/pull/1 "adding an `.npmignore` file" diff --git a/node_modules/jsonfile/LICENSE b/node_modules/jsonfile/LICENSE new file mode 100644 index 00000000..cb7e807b --- /dev/null +++ b/node_modules/jsonfile/LICENSE @@ -0,0 +1,15 @@ +(The MIT License) + +Copyright (c) 2012-2015, JP Richardson + +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/jsonfile/README.md b/node_modules/jsonfile/README.md new file mode 100644 index 00000000..721685c9 --- /dev/null +++ b/node_modules/jsonfile/README.md @@ -0,0 +1,168 @@ +Node.js - jsonfile +================ + +Easily read/write JSON files. + +[![npm Package](https://img.shields.io/npm/v/jsonfile.svg?style=flat-square)](https://www.npmjs.org/package/jsonfile) +[![build status](https://secure.travis-ci.org/jprichardson/node-jsonfile.svg)](http://travis-ci.org/jprichardson/node-jsonfile) +[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-jsonfile/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-jsonfile/branch/master) + +Standard JavaScript + +Why? +---- + +Writing `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying. + + + +Installation +------------ + + npm install --save jsonfile + + + +API +--- + +### readFile(filename, [options], callback) + +`options` (`object`, default `undefined`): Pass in any `fs.readFile` options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse). + - `throws` (`boolean`, default: `true`). If `JSON.parse` throws an error, pass this error to the callback. + If `false`, returns `null` for the object. + + +```js +var jsonfile = require('jsonfile') +var file = '/tmp/data.json' +jsonfile.readFile(file, function(err, obj) { + console.dir(obj) +}) +``` + + +### readFileSync(filename, [options]) + +`options` (`object`, default `undefined`): Pass in any `fs.readFileSync` options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse). +- `throws` (`boolean`, default: `true`). If an error is encountered reading or parsing the file, throw the error. If `false`, returns `null` for the object. + +```js +var jsonfile = require('jsonfile') +var file = '/tmp/data.json' + +console.dir(jsonfile.readFileSync(file)) +``` + + +### writeFile(filename, obj, [options], callback) + +`options`: Pass in any `fs.writeFile` options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces` and override `EOL` string. + + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFile(file, obj, function (err) { + console.error(err) +}) +``` + +**formatting with spaces:** + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFile(file, obj, {spaces: 2}, function(err) { + console.error(err) +}) +``` + +**overriding EOL:** + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFile(file, obj, {spaces: 2, EOL: '\r\n'}, function(err) { + console.error(err) +}) +``` + +**appending to an existing JSON file:** + +You can use `fs.writeFile` option `{flag: 'a'}` to achieve this. + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/mayAlreadyExistedData.json' +var obj = {name: 'JP'} + +jsonfile.writeFile(file, obj, {flag: 'a'}, function (err) { + console.error(err) +}) +``` + +### writeFileSync(filename, obj, [options]) + +`options`: Pass in any `fs.writeFileSync` options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces` and override `EOL` string. + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFileSync(file, obj) +``` + +**formatting with spaces:** + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFileSync(file, obj, {spaces: 2}) +``` + +**overriding EOL:** + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/data.json' +var obj = {name: 'JP'} + +jsonfile.writeFileSync(file, obj, {spaces: 2, EOL: '\r\n'}) +``` + +**appending to an existing JSON file:** + +You can use `fs.writeFileSync` option `{flag: 'a'}` to achieve this. + +```js +var jsonfile = require('jsonfile') + +var file = '/tmp/mayAlreadyExistedData.json' +var obj = {name: 'JP'} + +jsonfile.writeFileSync(file, obj, {flag: 'a'}) +``` + +License +------- + +(MIT License) + +Copyright 2012-2016, JP Richardson diff --git a/node_modules/jsonfile/index.js b/node_modules/jsonfile/index.js new file mode 100644 index 00000000..d1e5827c --- /dev/null +++ b/node_modules/jsonfile/index.js @@ -0,0 +1,134 @@ +var _fs +try { + _fs = require('graceful-fs') +} catch (_) { + _fs = require('fs') +} + +function readFile (file, options, callback) { + if (callback == null) { + callback = options + options = {} + } + + if (typeof options === 'string') { + options = {encoding: options} + } + + options = options || {} + var fs = options.fs || _fs + + var shouldThrow = true + if ('throws' in options) { + shouldThrow = options.throws + } + + fs.readFile(file, options, function (err, data) { + if (err) return callback(err) + + data = stripBom(data) + + var obj + try { + obj = JSON.parse(data, options ? options.reviver : null) + } catch (err2) { + if (shouldThrow) { + err2.message = file + ': ' + err2.message + return callback(err2) + } else { + return callback(null, null) + } + } + + callback(null, obj) + }) +} + +function readFileSync (file, options) { + options = options || {} + if (typeof options === 'string') { + options = {encoding: options} + } + + var fs = options.fs || _fs + + var shouldThrow = true + if ('throws' in options) { + shouldThrow = options.throws + } + + try { + var content = fs.readFileSync(file, options) + content = stripBom(content) + return JSON.parse(content, options.reviver) + } catch (err) { + if (shouldThrow) { + err.message = file + ': ' + err.message + throw err + } else { + return null + } + } +} + +function stringify (obj, options) { + var spaces + var EOL = '\n' + if (typeof options === 'object' && options !== null) { + if (options.spaces) { + spaces = options.spaces + } + if (options.EOL) { + EOL = options.EOL + } + } + + var str = JSON.stringify(obj, options ? options.replacer : null, spaces) + + return str.replace(/\n/g, EOL) + EOL +} + +function writeFile (file, obj, options, callback) { + if (callback == null) { + callback = options + options = {} + } + options = options || {} + var fs = options.fs || _fs + + var str = '' + try { + str = stringify(obj, options) + } catch (err) { + // Need to return whether a callback was passed or not + if (callback) callback(err, null) + return + } + + fs.writeFile(file, str, options, callback) +} + +function writeFileSync (file, obj, options) { + options = options || {} + var fs = options.fs || _fs + + var str = stringify(obj, options) + // not sure if fs.writeFileSync returns anything, but just in case + return fs.writeFileSync(file, str, options) +} + +function stripBom (content) { + // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified + if (Buffer.isBuffer(content)) content = content.toString('utf8') + content = content.replace(/^\uFEFF/, '') + return content +} + +var jsonfile = { + readFile: readFile, + readFileSync: readFileSync, + writeFile: writeFile, + writeFileSync: writeFileSync +} + +module.exports = jsonfile diff --git a/node_modules/jsonfile/package.json b/node_modules/jsonfile/package.json new file mode 100644 index 00000000..29e783f4 --- /dev/null +++ b/node_modules/jsonfile/package.json @@ -0,0 +1,37 @@ +{ + "name": "jsonfile", + "version": "4.0.0", + "description": "Easily read/write JSON files.", + "repository": { + "type": "git", + "url": "git@github.com:jprichardson/node-jsonfile.git" + }, + "keywords": [ + "read", + "write", + "file", + "json", + "fs", + "fs-extra" + ], + "author": "JP Richardson ", + "license": "MIT", + "dependencies": {}, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + }, + "devDependencies": { + "mocha": "2.x", + "rimraf": "^2.4.0", + "standard": "^10.0.3" + }, + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "lint": "standard", + "test": "npm run lint && npm run unit", + "unit": "mocha" + } +} diff --git a/node_modules/lru-queue/.lint b/node_modules/lru-queue/.lint new file mode 100644 index 00000000..cf54d815 --- /dev/null +++ b/node_modules/lru-queue/.lint @@ -0,0 +1,11 @@ +@root + +module + +tabs +indent 2 +maxlen 100 + +ass +nomen +plusplus diff --git a/node_modules/lru-queue/.npmignore b/node_modules/lru-queue/.npmignore new file mode 100644 index 00000000..155e41f6 --- /dev/null +++ b/node_modules/lru-queue/.npmignore @@ -0,0 +1,4 @@ +.DS_Store +/node_modules +/npm-debug.log +/.lintcache diff --git a/node_modules/lru-queue/.travis.yml b/node_modules/lru-queue/.travis.yml new file mode 100644 index 00000000..50bc8381 --- /dev/null +++ b/node_modules/lru-queue/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +node_js: + - 0.8 + - 0.10 + - 0.11 + +notifications: + email: + - medikoo+lru-queue@medikoo.com diff --git a/node_modules/lru-queue/CHANGES b/node_modules/lru-queue/CHANGES new file mode 100644 index 00000000..73c76104 --- /dev/null +++ b/node_modules/lru-queue/CHANGES @@ -0,0 +1,3 @@ +v0.1.0 -- 2013.04.26 +Initial (derived from memoizee) + diff --git a/node_modules/lru-queue/LICENCE b/node_modules/lru-queue/LICENCE new file mode 100644 index 00000000..ff15fc4d --- /dev/null +++ b/node_modules/lru-queue/LICENCE @@ -0,0 +1,19 @@ +Copyright (C) 2014 Mariusz Nowak (www.medikoo.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/lru-queue/README.md b/node_modules/lru-queue/README.md new file mode 100644 index 00000000..b7dd9783 --- /dev/null +++ b/node_modules/lru-queue/README.md @@ -0,0 +1,65 @@ +# lru-queue +## Size limited queue based on [LRU](http://en.wikipedia.org/wiki/Least_Recently_Used#LRU) algorithm + +_Originally derived from [memoizee](https://github.com/medikoo/memoize) package._ + +It's low-level utility meant to be used internally within cache algorithms. It backs up [`max`](https://github.com/medikoo/memoize#limiting-cache-size) functionality in [memoizee](https://github.com/medikoo/memoize) project. + +### Installation + + $ npm install lru-queue + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Usage + +Create queue, and provide a limit + +```javascript +var lruQueue = require('lru-queue'); +var queue = lruQueue(3); // limit size to 3 +``` + +Each queue exposes three methods: + +#### queue.hit(id) + +Registers hit for given _id_ (must be plain string). + +```javascript +queue.hit('raz'); // size: 1 +``` + +If hit doesn't remove any old item from list it returns `undefined`, otherwise it returns removed _id_. + + +```javascript +queue.hit('dwa'); // undefined, size: 2 +queue.hit('trzy'); // undefined, size: 3 (at max) +queue.hit('raz'); // undefined, size: 3 (at max) +queue.hit('dwa'); // undefined, size: 3 (at max) +queue.hit('cztery'); // 'trzy', size: 3 (at max) + +``` + +#### queue.delete(id); + +_id's_ can be cleared from queue externally + +```javascript +queue.delete('raz'); // size: 2 +queue.delete('cztery'); // size: 1 +``` + +#### queue.clear(); + +Resets queue + +```javascript +queue.clear(); // size: 0 +``` + +### Tests [![Build Status](https://travis-ci.org/medikoo/lru-queue.png)](https://travis-ci.org/medikoo/lru-queue) + + $ npm test + diff --git a/node_modules/lru-queue/index.js b/node_modules/lru-queue/index.js new file mode 100644 index 00000000..800210e8 --- /dev/null +++ b/node_modules/lru-queue/index.js @@ -0,0 +1,48 @@ +'use strict'; + +var toPosInt = require('es5-ext/number/to-pos-integer') + + , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function (limit) { + var size = 0, base = 1, queue = create(null), map = create(null), index = 0, del; + limit = toPosInt(limit); + return { + hit: function (id) { + var oldIndex = map[id], nuIndex = ++index; + queue[nuIndex] = id; + map[id] = nuIndex; + if (!oldIndex) { + ++size; + if (size <= limit) return; + id = queue[base]; + del(id); + return id; + } + delete queue[oldIndex]; + if (base !== oldIndex) return; + while (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip + }, + delete: del = function (id) { + var oldIndex = map[id]; + if (!oldIndex) return; + delete queue[oldIndex]; + delete map[id]; + --size; + if (base !== oldIndex) return; + if (!size) { + index = 0; + base = 1; + return; + } + while (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip + }, + clear: function () { + size = 0; + base = 1; + queue = create(null); + map = create(null); + index = 0; + } + }; +}; diff --git a/node_modules/lru-queue/package.json b/node_modules/lru-queue/package.json new file mode 100644 index 00000000..e38e99f6 --- /dev/null +++ b/node_modules/lru-queue/package.json @@ -0,0 +1,25 @@ +{ + "name": "lru-queue", + "version": "0.1.0", + "description": "LRU Queue", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "repository": { + "type": "git", + "url": "git://github.com/medikoo/lru-queue.git" + }, + "keywords": [ + "lru", + "cache", + "queue" + ], + "dependencies": { + "es5-ext": "~0.10.2" + }, + "devDependencies": { + "tad": "~0.1.21" + }, + "scripts": { + "test": "node node_modules/tad/bin/tad" + }, + "license": "MIT" +} diff --git a/node_modules/lru-queue/test/index.js b/node_modules/lru-queue/test/index.js new file mode 100644 index 00000000..d0deb122 --- /dev/null +++ b/node_modules/lru-queue/test/index.js @@ -0,0 +1,29 @@ +'use strict'; + +module.exports = function (t, a) { + var queue = t(3); + + a(queue.hit('raz'), undefined, "Hit #1"); + a(queue.hit('raz'), undefined, "Hit #2"); + a(queue.hit('dwa'), undefined, "Hit #3"); + a(queue.hit('raz'), undefined, "Hit #4"); + a(queue.hit('dwa'), undefined, "Hit #5"); + a(queue.hit('trzy'), undefined, "Hit #6"); + a(queue.hit('raz'), undefined, "Hit #7"); + a(queue.hit('dwa'), undefined, "Hit #8"); + + a(queue.hit('cztery'), 'trzy', "Overflow #1"); + a(queue.hit('dwa'), undefined, "Hit #9"); + + a(queue.hit('trzy'), 'raz', "Overflow #2"); + + a(queue.hit('raz'), 'cztery', "Overflow #3"); + a(queue.hit('cztery'), 'dwa', "Overflow #4"); + a(queue.hit('trzy'), undefined, "Hit #10"); + + a(queue.hit('dwa'), 'raz', "Overflow #4"); + a(queue.hit('cztery'), undefined, "Hit #11"); + + queue.delete('cztery'); + a(queue.hit('cztery'), undefined, "Hit #12"); +}; diff --git a/node_modules/memoizee/.editorconfig b/node_modules/memoizee/.editorconfig new file mode 100644 index 00000000..c24a6cd1 --- /dev/null +++ b/node_modules/memoizee/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = tab + +[{*.json,*.yml}] +indent_style = space +indent_size = 2 diff --git a/node_modules/memoizee/.testignore b/node_modules/memoizee/.testignore new file mode 100644 index 00000000..f9c8c381 --- /dev/null +++ b/node_modules/memoizee/.testignore @@ -0,0 +1 @@ +/benchmark diff --git a/node_modules/memoizee/CHANGELOG.md b/node_modules/memoizee/CHANGELOG.md new file mode 100644 index 00000000..e7840994 --- /dev/null +++ b/node_modules/memoizee/CHANGELOG.md @@ -0,0 +1,91 @@ +# Change Log + +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. + + +## [0.4.14](https://github.com/medikoo/memoizee/compare/v0.4.13...v0.4.14) (2018-08-13) + + +### Bug Fixes + +* ensure to not force unhandled rejections ([9b416ea](https://github.com/medikoo/memoizee/commit/9b416ea)) + + + + +## [0.4.13](https://github.com/medikoo/memoizee/compare/v0.4.12...v0.4.13) (2018-08-06) + + +### Features + +* **promise:** support cancellation case ([b4b018d](https://github.com/medikoo/memoizee/commit/b4b018d)), closes [#97](https://github.com/medikoo/memoizee/issues/97) + + + + +## [0.4.12](https://github.com/medikoo/memoizee/compare/v0.4.11...v0.4.12) (2018-02-23) + + +### Bug Fixes + +* **max-age:** unref timeouts to not block processes from exiting ([5bcc5a4](https://github.com/medikoo/memoizee/commit/5bcc5a4)), closes [#25](https://github.com/medikoo/memoizee/issues/25) + + + + +## [0.4.11](https://github.com/medikoo/memoizee/compare/v0.4.10...v0.4.11) (2017-09-11) + + +### Bug Fixes + +* _get and _has internal args handling. ([7cb1c7a](https://github.com/medikoo/memoizee/commit/7cb1c7a)), closes [#88](https://github.com/medikoo/memoizee/issues/88) + + + + +## [0.4.10](https://github.com/medikoo/memoizee/compare/v0.4.9...v0.4.10) (2017-09-07) + + +### Bug Fixes + +* remove then:finally mode as it can't work right ([5b79698](https://github.com/medikoo/memoizee/commit/5b79698)) + + + + +## [0.4.9](https://github.com/medikoo/memoizee/compare/v0.4.8...v0.4.9) (2017-08-29) + + + + +## [0.4.8](https://github.com/medikoo/memoizee/compare/v0.4.7...v0.4.8) (2017-08-29) + + + + +## [0.4.7](https://github.com/medikoo/memoizee/compare/v0.4.6...v0.4.7) (2017-08-29) + + +### Features + +* improve 'promise' mode handling ([759e315](https://github.com/medikoo/memoizee/commit/759e315)) +* improve internal promise validation ([d23b94f](https://github.com/medikoo/memoizee/commit/d23b94f)) + + + + +## [0.4.6](https://github.com/medikoo/memoizee/compare/v0.4.5...v0.4.6) (2017-08-24) +* `profileName` option for naming memoizee instances in profile output + + + +## [0.4.5](https://github.com/medikoo/memoizee/compare/v0.4.4...v0.4.5) (2017-05-10) + + +### Bug Fixes + +* resolution of extensions with weak handling ([f29a97b](https://github.com/medikoo/memoizee/commit/f29a97b)), closes [#79](https://github.com/medikoo/memoizee/issues/79) + +## Old changelog + +See `CHANGES` \ No newline at end of file diff --git a/node_modules/memoizee/CHANGES b/node_modules/memoizee/CHANGES new file mode 100644 index 00000000..618179bb --- /dev/null +++ b/node_modules/memoizee/CHANGES @@ -0,0 +1,124 @@ +-- For new changelog see CHANGELOG.md + +v0.4.4 -- 2017.03.15 +* Expose _get and _has methods. It provides temporary means for better cache inspection until + v1 is delivered + +v0.4.3 -- 2017.02.20 +* Fix normalization resolver, so it validates already normalized resolvers (reported at #70) + +v0.4.2 -- 2017.02.17 +* Guard proper promise resolution in promise mode +* Improve documentation +* Improve npm scripts configuration +* Improve CI configuration + +v0.4.1 -- 2016.07.13 +* Fix promise mode to not use `then` and `finally` pair. Thanks @Kovensky +* Add 'done' mode to 'promise' mode (so now callbacks can be registered through `done` but no + `finally` event if it's implemented) + +v0.4.0 -- 2016.07.07 +* Introduce 'promise' mode +* Change signature of internal events for 'async' case +* Document 'normalizer' option + +v0.3.10 -- 2016.04.21 +* Fix resolvers bug (#12) +* Fix arguments support for weak mode +* Update repository address after rename + +v0.3.9 -- 2015.08.04 +* Update dependencies +* Improve documentation +* FIx spelling of LICENSE + +v0.3.8 -- 2014.10.08 +* Introduce WeakMap based `weak` mode + +v0.3.7 -- 2014.08.14 +* Fix prefetch support for asynchronous functions (#19) +* Configure lint scripts + +v0.3.6 -- 2014.07.28 +* Fix race condition issue related to clear/delete calls and returning id's (#18) +* Fix maxAge major cache handling issue (on timeout instead of individual record whole cache was + cleared) + +v0.3.5 -- 2014.07.07 +* Fix internal id genaration, for primitive, length = 1 case. + Ids were not serialized to strings, and that caused issues with other + internal logiv, which e.g. treated `null` case specifically. + Fixes #15 (Thanks @isaacg for reporting) + +v0.3.4 -- 2014.06.22 +* Fix async handling in case of clear between two async calls + (assurance of unique cache ids solves that). Fixes #13 + +v0.3.3 -- 2014.05.12 +* Fix profiler special property definition + +v0.3.2 -- 2014.05.01 +* Provide no-arguments memoization out of a box + (no need to provide normalizer to `memoizee/plain`) + +v0.3.1 -- 2014.04.27 +* Update package.json to use latest 'tad' engine (fixes tests evaluation) + +v0.3.0 -- 2014.04.27 +Major reorganization and partial refactoring +* Move out main modules from lib folder +* Introduce normalizer based memoization. Primitive and regular handlers were converted into + dedicated normalizers (located in lib/normalizers folder). Custom normalizers can be provided at + run time via `normalizer` option. +* Provide 'plain' module which does not import (require) any extensions or normalizers. Thanks to + that it's lighter for e.g. client-side bundle. Any extensions that are expected to be used should + be required upfront, normalizers should be provided via `normalizer` option. +* Rename `memoized.clear` into `memoized.delete`, and `memoized.clearAll` into `memoized.clear` +* Rename `memoized.clearRef` into `memoized.deleteRef` (applies to 'refCounter' option) +* Remove 'method' option. Instead 'methods' and 'methods-plan' modules are provided which generate + descriptors for lazy created memoized methods. +* 'profile' is no longer an extension. It's provided as dedicated module. +* Clean up logic for `async` handling +* Take out 'max' extension's LRU logic into external `lru-queue` package. + See https://github.com/medikoo/lru-queue +* Remove possibility to access original arguments when resolvers are used +* Assure expected length of memoized functions +* Remove Makefile (it's environment agnostic package) + +v0.2.6 -- 2013.10.08 +* Fix internal events propagation when handling async calls that + resolve with errors. `asyncpurge` was emitted for values that had no + `asyncinit` emitted. Issue #9 + +v0.2.5 -- 2013.06.21 +* Fix primitive handling for dynamic arguments length + +v0.2.4 -- 2013.03.23 +* Throw on circular invocations, they cannot be memoized as intended. + +v0.2.3 -- 2012.10.04 +* Fixed serious bug related to not properly cleared cache when working in + regular mode + +v0.2.2 -- 2012.10.03 +* preFetch functionality for maxAge variant +* Prevent memoization of already memoized functions + +v0.2.1 -- 2012.09.21 +* Fix missing global reference in method option logic +* Fix variable visibility in async option logic +* Lint cleanup + +v0.2.0 -- 2012.09.21 +* Modularization and general algorithm cleanup +* Cache is limited (max option) using LRU instead of FIFO algorithm +* Improved async mode, and its handling by other options + +v0.1.1 -- 2012.09.19 +* Fix dispose invocations for no arguments call +* Small documentation improvements + +v0.1.0 -- 2012.09.18 +* Initial. Derived from es5-ext package and added `async`, `maxAge`, + `refCounter`, `max` and `dispose` options. diff --git a/node_modules/memoizee/LICENSE b/node_modules/memoizee/LICENSE new file mode 100644 index 00000000..381b09ef --- /dev/null +++ b/node_modules/memoizee/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2012-2018, Mariusz Nowak, @medikoo, medikoo.com + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/memoizee/README.md b/node_modules/memoizee/README.md new file mode 100644 index 00000000..8c71a667 --- /dev/null +++ b/node_modules/memoizee/README.md @@ -0,0 +1,485 @@ +[![*nix build status][nix-build-image]][nix-build-url] +[![Windows build status][win-build-image]][win-build-url] +![Transpilation status][transpilation-image] +[![npm version][npm-image]][npm-url] + +# Memoizee + +## Complete memoize/cache solution for JavaScript + +_Originally derived from [es5-ext](https://github.com/medikoo/es5-ext) package._ + +Memoization is best technique to save on memory or CPU cycles when we deal with repeated operations. For detailed insight see: http://en.wikipedia.org/wiki/Memoization + +### Features + +* Works with any type of function arguments – **no serialization is needed** +* Works with [**any length of function arguments**](#arguments-length). Length can be set as fixed or dynamic. +* One of the [**fastest**](#benchmarks) available solutions. +* Support for [**promises**](#promise-returning-functions) and [**asynchronous functions**](#nodejs-callback-style-functions) +* [**Primitive mode**](#primitive-mode) which assures fast performance when arguments are convertible to strings. +* [**WeakMap based mode**](#weakmap-based-configurations) for garbage collection friendly configuration +* Can be configured [**for methods**](#memoizing-methods) (when `this` counts in) +* Cache [**can be cleared manually**](#manual-clean-up) or [**after specified timeout**](#expire-cache-after-given-period-of-time) +* Cache size can be **[limited on LRU basis](#limiting-cache-size)** +* Optionally [**accepts resolvers**](#resolvers) that normalize function arguments before passing them to underlying function. +* Optional [**reference counter mode**](#reference-counter), that allows more sophisticated cache management +* [**Profile tool**](#profiling--statistics) that provides valuable usage statistics +* Covered by [**over 500 unit tests**](#tests) + +### Installation + +In your project path — **note the two `e`'s in `memoizee`:** + + $ npm install memoizee + +_`memoize` name was already taken, therefore project is published as `memoizee` on NPM._ + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Usage + +```javascript +var memoize = require("memoizee"); + +var fn = function(one, two, three) { + /* ... */ +}; + +memoized = memoize(fn); + +memoized("foo", 3, "bar"); +memoized("foo", 3, "bar"); // Cache hit +``` + +### Configuration + +All below options can be applied in any combination + +#### Arguments length + +By default fixed number of arguments that function take is assumed (it's read from function's `length` property) this can be overridden: + +```javascript +memoized = memoize(fn, { length: 2 }); + +memoized("foo"); // Assumed: 'foo', undefined +memoized("foo", undefined); // Cache hit + +memoized("foo", 3, {}); // Third argument is ignored (but passed to underlying function) +memoized("foo", 3, 13); // Cache hit +``` + +__Note:__ [Parameters predefined with default values (ES2015+ feature)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters) are not reflected in function's `length`, therefore if you want to memoize them as well, you need to tweak `length` setting accordingly + +Dynamic _length_ behavior can be forced by setting _length_ to `false`, that means memoize will work with any number of arguments. + +```javascript +memoized = memoize(fn, { length: false }); + +memoized("foo"); +memoized("foo"); // Cache hit +memoized("foo", undefined); +memoized("foo", undefined); // Cache hit + +memoized("foo", 3, {}); +memoized("foo", 3, 13); +memoized("foo", 3, 13); // Cache hit +``` + +#### Primitive mode + +If we work with large result sets, or memoize hot functions, default mode may not perform as fast as we expect. In that case it's good to run memoization in _primitive_ mode. To provide fast access, results are saved in hash instead of an array. Generated hash ids are result of arguments to string conversion. **Mind that this mode will work correctly only if stringified arguments produce unique strings.** + +```javascript +memoized = memoize(fn, { primitive: true }); + +memoized("/path/one"); +memoized("/path/one"); // Cache hit +``` + +#### Cache id resolution (normalization) + +By default cache id for given call is resolved either by: + +* Direct Comparison of values passed in arguments as they are. In such case two different objects, even if their characteristics is exactly same (e.g. `var a = { foo: 'bar' }, b = { foo: 'bar' }`) will be treated as two different values. +* Comparison of stringified values of given arguments (`primitive` mode), which serves well, when arguments are expected to be primitive values, or objects that stringify naturally do unique values (e.g. arrays) + +Still above two methods do not serve all cases, e.g. if we want to memoize function where arguments are hash objects which we do not want to compare by instance but by its content. + +##### Writing custom cache id normalizers + +There's a `normalizer` option through which we can pass custom cache id normalization function +e.g. if we want to memoize a function where argument is a hash object which we do not want to compare by instance but by its content, then we can achieve it as following: + +```javascript +var mfn = memoize( + function(hash) { + // body of memoized function + }, + { + normalizer: function(args) { + // args is arguments object as accessible in memoized function + return JSON.stringify(args[0]); + } + } +); + +mfn({ foo: "bar" }); +mfn({ foo: "bar" }); // Cache hit +``` + +#### Argument resolvers + +When we're expecting arguments of certain type it's good to coerce them before doing memoization. We can do that by passing additional resolvers array: + +```javascript +memoized = memoize(fn, { length: 2, resolvers: [String, Boolean] }); + +memoized(12, [1, 2, 3].length); +memoized("12", true); // Cache hit +memoized( + { + toString: function() { + return "12"; + } + }, + {} +); // Cache hit +``` + +**Note. If your arguments are collections (arrays or hashes) that you want to memoize by content (not by self objects), you need to cast them to strings**, for it's best to just use [primitive mode](#primitive-mode). Arrays have standard string representation and work with primitive mode out of a box, for hashes you need to define `toString` method, that will produce unique string descriptions, or rely on `JSON.stringify`. + +Similarly **if you want to memoize functions by their code representation not by their objects, you should use primitive mode**. + +#### Memoizing asynchronous functions + +##### Promise returning functions + +With _promise_ option we indicate that we memoize a function that returns promise. + +The difference from natural behavior is that in case when promise was rejected with exception, +the result is immediately removed from memoize cache, and not kept as further reusable result. + +```javascript +var afn = function(a, b) { + return new Promise(function(res) { + res(a + b); + }); +}; +memoized = memoize(afn, { promise: true }); + +memoized(3, 7); +memoized(3, 7); // Cache hit +``` + +###### Important notice on internal promises handling + +Default handling stands purely on _then_ which has side-effect of muting eventual unhandled rejection notifications. +Alternatively we can other (explained below), by stating with `promise` option desired mode: + +```javascript +memoized = memoize(afn, { promise: "done:finally" }); +``` + +Supported modes + +* `then` _(default)_. Values are resolved purely by passing callbacks to `promise.then`. **Side effect is that eventual unhandled rejection on given promise + come with no logged warning!**, and that to avoid implied error swallowing both states are resolved tick after callbacks were invoked + +* `done` Values are resolved purely by passing callback to `done` method. **Side effect is that eventual unhandled rejection on given promise come with no logged warning!**. + +* `done:finally` The only method that may work with no side-effects assuming that promise implementaion does not throw unconditionally + if no _onFailure_ callback was passed to `done`, and promise error was handled by other consumer (this is not commonly implemented _done_ behavior). Otherwise side-effect is that exception is thrown on promise rejection (highly not recommended) + +##### Node.js callback style functions + +With _async_ option we indicate that we memoize asynchronous (Node.js style) function +Operations that result with an error are not cached. + +```javascript +afn = function(a, b, cb) { + setTimeout(function() { + cb(null, a + b); + }, 200); +}; +memoized = memoize(afn, { async: true }); + +memoized(3, 7, function(err, res) { + memoized(3, 7, function(err, res) { + // Cache hit + }); +}); + +memoized(3, 7, function(err, res) { + // Cache hit +}); +``` + +#### Memoizing methods + +When we are defining a prototype, we may want to define a method that will memoize it's results in relation to each instance. A basic way to obtain that would be: + +```javascript +var Foo = function() { + this.bar = memoize(this.bar.bind(this), { someOption: true }); + // ... constructor logic +}; +Foo.prototype.bar = function() { + // ... method logic +}; +``` + +There's a lazy methods descriptor generator provided: + +```javascript +var d = require("d"); +var memoizeMethods = require("memoizee/methods"); + +var Foo = function() { + // ... constructor logic +}; +Object.defineProperties( + Foo.prototype, + memoizeMethods({ + bar: d( + function() { + // ... method logic + }, + { someOption: true } + ) + }) +); +``` + +#### WeakMap based configurations + +In this case memoization cache is not bound to memoized function (which we may want to keep forever), but to objects for which given results were generated. + +This mode works only for functions of which first argument is expected to be an object. +It can be combined with other options mentioned across documentation. However due to WeakMap specificity global clear is not possible. + +```javascript +var memoize = require("memoizee/weak"); + +var memoized = memoize(function(obj) { + return Object.keys(obj); +}); + +var obj = { foo: true, bar: false }; +memoized(obj); +memoized(obj); // Cache hit +``` + +#### Cache handling + +##### Manual clean up: + +Delete data for particular call. + +```javascript +memoized.delete("foo", true); +``` + +Arguments passed to `delete` are treated with same rules as input arguments passed to function + +Clear all cached data: + +```javascript +memoized.clear(); +``` + +##### Expire cache after given period of time + +With _maxAge_ option we can ensure that cache for given call is cleared after predefined period of time (in milliseconds) + +```javascript +memoized = memoize(fn, { maxAge: 1000 }); // 1 second + +memoized("foo", 3); +memoized("foo", 3); // Cache hit +setTimeout(function() { + memoized("foo", 3); // No longer in cache, re-executed + memoized("foo", 3); // Cache hit +}, 2000); +``` + +Additionally we may ask to _pre-fetch_ in a background a value that is about to expire. _Pre-fetch_ is invoked only if value is accessed close to its expiry date. By default it needs to be within at least 33% of _maxAge_ timespan before expire: + +```javascript +memoized = memoize(fn, { maxAge: 1000, preFetch: true }); // Defaults to 0.33 + +memoized("foo", 3); +memoized("foo", 3); // Cache hit + +setTimeout(function() { + memoized("foo", 3); // Cache hit +}, 500); + +setTimeout(function() { + memoized("foo", 3); // Cache hit, silently pre-fetched in next tick +}, 800); + +setTimeout(function() { + memoized("foo", 3); // Cache hit +}, 1300); +``` + +_Pre-fetch_ timespan can be customized: + +```javascript +memoized = memoize(fn, { maxAge: 1000, preFetch: 0.6 }); + +memoized("foo", 3); +memoized("foo", 3); // Cache hit + +setTimeout(function() { + memoized("foo", 3); // Cache hit, silently pre-fetched in next tick +}, 500); + +setTimeout(function() { + memoized("foo", 3); // Cache hit +}, 1300); +``` + +_Thanks [@puzrin](https://github.com/puzrin) for helpful suggestions concerning this functionality_ + +##### Reference counter + +We can track number of references returned from cache, and manually delete them. When the last reference is cleared, the cache is purged automatically: + +```javascript +memoized = memoize(fn, { refCounter: true }); + +memoized("foo", 3); // refs: 1 +memoized("foo", 3); // Cache hit, refs: 2 +memoized("foo", 3); // Cache hit, refs: 3 +memoized.deleteRef("foo", 3); // refs: 2 +memoized.deleteRef("foo", 3); // refs: 1 +memoized.deleteRef("foo", 3); // refs: 0, Cache purged for 'foo', 3 +memoized("foo", 3); // Re-executed, refs: 1 +``` + +##### Limiting cache size + +With _max_ option you can limit cache size, it's backed with [LRU algorithm](http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used), provided by low-level [lru-queue](https://github.com/medikoo/lru-queue) utility. + +The _size_ relates purely to count of results we want to keep in cache, it doesn't relate to memory cost associated with cache value (but such feature is likely to be introduced with next version of memoizee). + +```javascript +memoized = memoize(fn, { max: 2 }); + +memoized("foo", 3); +memoized("bar", 7); +memoized("foo", 3); // Cache hit +memoized("bar", 7); // Cache hit +memoized("lorem", 11); // Cache cleared for 'foo', 3 +memoized("bar", 7); // Cache hit +memoized("foo", 3); // Re-executed, Cache cleared for 'lorem', 11 +memoized("lorem", 11); // Re-executed, Cache cleared for 'bar', 7 +memoized("foo", 3); // Cache hit +memoized("bar", 7); // Re-executed, Cache cleared for 'lorem', 11 +``` + +##### Registering dispose callback + +You can register a callback to be called on each value removed from the cache: + +```javascript +memoized = memoize(fn, { + dispose: function(value) { + /*…*/ + } +}); + +var foo3 = memoized("foo", 3); +var bar7 = memoized("bar", 7); +memoized.clear("foo", 3); // Dispose called with foo3 value +memoized.clear("bar", 7); // Dispose called with bar7 value +``` + +### Benchmarks + +Simple benchmark tests can be found in _benchmark_ folder. Currently it's just plain simple calculation of fibonacci sequences. To run it you need to install other test candidates: + + $ npm install underscore lodash lru-cache secondary-cache + +Example output taken under Node v0.10.35 on 2011 MBP Pro: + +``` +Fibonacci 3000 x10: + +1: 15ms Memoizee (primitive mode) +2: 15ms Underscore +3: 18ms lru-cache LRU (max: 1000) +4: 21ms secondary-cache LRU (max: 1000) +5: 37ms Lo-dash +6: 62ms Memoizee (primitive mode) LRU (max: 1000) +7: 163ms Memoizee (object mode) LRU (max: 1000) +8: 195ms Memoizee (object mode) +``` + +### Profiling & Statistics + +If you want to make sure how much you benefit from memoization or just check if memoization works as expected, loading profile module will give access to all valuable information. + +**Module needs to be imported before any memoization (that we want to track) is configured. Mind also that running profile module affects performance, it's best not to use it in production environment** + +```javascript +var memProfile = require('memoizee/profile'); +... +... +memoize(fn); +... +memoize(fn, { profileName: 'Some Function' }) +... +memoize(fn, { profileName: 'Another Function' }) +``` + +Access statistics at any time: + +```javascript +memProfile.statistics; // Statistics accessible for programmatic use +console.log(memProfile.log()); // Output statistics data in readable form +``` + +Example console output: + +``` +------------------------------------------------------------ +Memoize statistics: + + Init Cache %Cache Source location +11604 35682 75.46 (all) + 2112 19901 90.41 Some Function, at /Users/medikoo/Projects/_packages/next/lib/fs/is-ignored.js:276:12 + 2108 9087 81.17 Another Function, at /Users/medikoo/Projects/_packages/next/lib/fs/is-ignored.js:293:10 + 6687 2772 29.31 at /Users/medikoo/Projects/_packages/next/lib/fs/watch.js:125:9 + 697 3922 84.91 at /Users/medikoo/Projects/_packages/next/lib/fs/is-ignored.js:277:15 +------------------------------------------------------------ +``` + +* _Init_ – Initial hits +* _Cache_ – Cache hits +* _%Cache_ – What's the percentage of cache hits (of all function calls) +* _Source location_ – Where in the source code given memoization was initialized + +### Tests + + $ npm test + +Project cross-browser compatibility to be supported by: + + + +### Contributors + +* [@puzrin](https://github.com/puzrin) (Vitaly Puzrin) + * Proposal and help with coining right _pre-fetch_ logic for [_maxAge_](https://github.com/medikoo/memoize#expire-cache-after-given-period-of-time) variant + +[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/memoizee/branches/master/shields_badge.svg +[nix-build-url]: https://semaphoreci.com/medikoo-org/memoizee +[win-build-image]: https://ci.appveyor.com/api/projects/status/hsxubnbwe89c26bu?svg=true +[win-build-url]: https://ci.appveyor.com/project/medikoo/memoizee +[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg +[npm-image]: https://img.shields.io/npm/v/memoizee.svg +[npm-url]: https://www.npmjs.com/package/memoizee diff --git a/node_modules/memoizee/benchmark/fibonacci.js b/node_modules/memoizee/benchmark/fibonacci.js new file mode 100644 index 00000000..3a704e75 --- /dev/null +++ b/node_modules/memoizee/benchmark/fibonacci.js @@ -0,0 +1,140 @@ +/* global console */ +/* eslint no-console: 0, id-length: 0 */ + +"use strict"; + +// Simple benchmark for very simple memoization case (fibonacci series) +// To run it, do following in memoizee package path: +// +// $ npm install underscore lodash lru-cache secondary-cache +// $ node benchmark/fibonacci.js + +var forEach = require("es5-ext/object/for-each") + , pad = require("es5-ext/string/#/pad") + , memoizee = require("..") + , underscore = require("underscore").memoize + , lodash = require("lodash").memoize + , lruCache = require("lru-cache") + , lruSecondary = require("secondary-cache/lib/lru-cache"); + +var now = Date.now + , time + , getFib + , lru + , memo + , total + , index = 3000 + , count = 10 + , i + , lruMax = 1000 + , data = {} + , lruObj; + +getFib = function (memoize, opts) { + var fib = memoize(function (x) { + return x < 2 ? 1 : fib(x - 1) + fib(x - 2); + }, opts); + return fib; +}; + +lru = function (x) { + var value = lruObj.get(x); + if (value === undefined) { + value = x < 2 ? 1 : lru(x - 1) + lru(x - 2); + lruObj.set(x, value); + } + return value; +}; + +console.log("Fibonacci", index, "x" + count + ":\n"); + +total = 0; +i = count; +while (i--) { + memo = getFib(memoizee); + time = now(); + memo(index); + total += now() - time; +} +data["Memoizee (object mode)"] = total; + +total = 0; +i = count; +while (i--) { + memo = getFib(memoizee, { primitive: true }); + time = now(); + memo(index); + total += now() - time; +} +data["Memoizee (primitive mode)"] = total; + +total = 0; +i = count; +while (i--) { + memo = getFib(underscore); + time = now(); + memo(index); + total += now() - time; +} +data.Underscore = total; + +total = 0; +i = count; +while (i--) { + memo = getFib(lodash); + time = now(); + memo(index); + total += now() - time; +} +data["Lo-dash"] = total; + +total = 0; +i = count; +while (i--) { + memo = getFib(memoizee, { primitive: true, max: lruMax }); + time = now(); + memo(index); + total += now() - time; +} +data["Memoizee (primitive mode) LRU (max: 1000)"] = total; + +total = 0; +i = count; +while (i--) { + memo = getFib(memoizee, { max: lruMax }); + time = now(); + memo(index); + total += now() - time; +} +data["Memoizee (object mode) LRU (max: 1000)"] = total; + +total = 0; +i = count; +while (i--) { + lruObj = lruCache({ max: lruMax }); + time = now(); + lru(index); + total += now() - time; +} +data["lru-cache LRU (max: 1000)"] = total; + +total = 0; +i = count; +while (i--) { + lruObj = lruSecondary(lruMax); + time = now(); + lru(index); + total += now() - time; +} +data["secondary-cache LRU (max: 1000)"] = total; + +forEach( + data, + function (value, name, obj, currentIndex) { + console.log(currentIndex + 1 + ":", pad.call(value, " ", 5) + "ms ", name); + }, + null, + function (a, b) { + return this[a] - this[b]; + } +); diff --git a/node_modules/memoizee/ext/async.js b/node_modules/memoizee/ext/async.js new file mode 100644 index 00000000..a4cbd8d6 --- /dev/null +++ b/node_modules/memoizee/ext/async.js @@ -0,0 +1,154 @@ +/* eslint consistent-this: 0, no-shadow:0, no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */ + +// Support for asynchronous functions + +"use strict"; + +var aFrom = require("es5-ext/array/from") + , objectMap = require("es5-ext/object/map") + , mixin = require("es5-ext/object/mixin") + , defineLength = require("es5-ext/function/_define-length") + , nextTick = require("next-tick"); + +var slice = Array.prototype.slice, apply = Function.prototype.apply, create = Object.create; + +require("../lib/registered-extensions").async = function (tbi, conf) { + var waiting = create(null) + , cache = create(null) + , base = conf.memoized + , original = conf.original + , currentCallback + , currentContext + , currentArgs; + + // Initial + conf.memoized = defineLength(function (arg) { + var args = arguments, last = args[args.length - 1]; + if (typeof last === "function") { + currentCallback = last; + args = slice.call(args, 0, -1); + } + return base.apply(currentContext = this, currentArgs = args); + }, base); + try { mixin(conf.memoized, base); } + catch (ignore) {} + + // From cache (sync) + conf.on("get", function (id) { + var cb, context, args; + if (!currentCallback) return; + + // Unresolved + if (waiting[id]) { + if (typeof waiting[id] === "function") waiting[id] = [waiting[id], currentCallback]; + else waiting[id].push(currentCallback); + currentCallback = null; + return; + } + + // Resolved, assure next tick invocation + cb = currentCallback; + context = currentContext; + args = currentArgs; + currentCallback = currentContext = currentArgs = null; + nextTick(function () { + var data; + if (hasOwnProperty.call(cache, id)) { + data = cache[id]; + conf.emit("getasync", id, args, context); + apply.call(cb, data.context, data.args); + } else { + // Purged in a meantime, we shouldn't rely on cached value, recall + currentCallback = cb; + currentContext = context; + currentArgs = args; + base.apply(context, args); + } + }); + }); + + // Not from cache + conf.original = function () { + var args, cb, origCb, result; + if (!currentCallback) return apply.call(original, this, arguments); + args = aFrom(arguments); + cb = function self(err) { + var cb, args, id = self.id; + if (id == null) { + // Shouldn't happen, means async callback was called sync way + nextTick(apply.bind(self, this, arguments)); + return undefined; + } + delete self.id; + cb = waiting[id]; + delete waiting[id]; + if (!cb) { + // Already processed, + // outcome of race condition: asyncFn(1, cb), asyncFn.clear(), asyncFn(1, cb) + return undefined; + } + args = aFrom(arguments); + if (conf.has(id)) { + if (err) { + conf.delete(id); + } else { + cache[id] = { context: this, args: args }; + conf.emit("setasync", id, typeof cb === "function" ? 1 : cb.length); + } + } + if (typeof cb === "function") { + result = apply.call(cb, this, args); + } else { + cb.forEach(function (cb) { result = apply.call(cb, this, args); }, this); + } + return result; + }; + origCb = currentCallback; + currentCallback = currentContext = currentArgs = null; + args.push(cb); + result = apply.call(original, this, args); + cb.cb = origCb; + currentCallback = cb; + return result; + }; + + // After not from cache call + conf.on("set", function (id) { + if (!currentCallback) { + conf.delete(id); + return; + } + if (waiting[id]) { + // Race condition: asyncFn(1, cb), asyncFn.clear(), asyncFn(1, cb) + if (typeof waiting[id] === "function") waiting[id] = [waiting[id], currentCallback.cb]; + else waiting[id].push(currentCallback.cb); + } else { + waiting[id] = currentCallback.cb; + } + delete currentCallback.cb; + currentCallback.id = id; + currentCallback = null; + }); + + // On delete + conf.on("delete", function (id) { + var result; + // If false, we don't have value yet, so we assume that intention is not + // to memoize this call. After value is obtained we don't cache it but + // gracefully pass to callback + if (hasOwnProperty.call(waiting, id)) return; + if (!cache[id]) return; + result = cache[id]; + delete cache[id]; + conf.emit("deleteasync", id, slice.call(result.args, 1)); + }); + + // On clear + conf.on("clear", function () { + var oldCache = cache; + cache = create(null); + conf.emit( + "clearasync", objectMap(oldCache, function (data) { return slice.call(data.args, 1); }) + ); + }); +}; diff --git a/node_modules/memoizee/ext/dispose.js b/node_modules/memoizee/ext/dispose.js new file mode 100644 index 00000000..2eb9a23e --- /dev/null +++ b/node_modules/memoizee/ext/dispose.js @@ -0,0 +1,33 @@ +// Call dispose callback on each cache purge + +"use strict"; + +var callable = require("es5-ext/object/valid-callable") + , forEach = require("es5-ext/object/for-each") + , extensions = require("../lib/registered-extensions") + + , apply = Function.prototype.apply; + +extensions.dispose = function (dispose, conf, options) { + var del; + callable(dispose); + if ((options.async && extensions.async) || (options.promise && extensions.promise)) { + conf.on("deleteasync", del = function (id, resultArray) { + apply.call(dispose, null, resultArray); + }); + conf.on("clearasync", function (cache) { + forEach(cache, function (result, id) { + del(id, result); +}); + }); + return; + } + conf.on("delete", del = function (id, result) { + dispose(result); +}); + conf.on("clear", function (cache) { + forEach(cache, function (result, id) { + del(id, result); +}); + }); +}; diff --git a/node_modules/memoizee/ext/max-age.js b/node_modules/memoizee/ext/max-age.js new file mode 100644 index 00000000..1ec0b2fa --- /dev/null +++ b/node_modules/memoizee/ext/max-age.js @@ -0,0 +1,90 @@ +/* eslint consistent-this: 0 */ + +// Timeout cached values + +"use strict"; + +var aFrom = require("es5-ext/array/from") + , forEach = require("es5-ext/object/for-each") + , nextTick = require("next-tick") + , isPromise = require("is-promise") + , timeout = require("timers-ext/valid-timeout") + , extensions = require("../lib/registered-extensions"); + +var noop = Function.prototype, max = Math.max, min = Math.min, create = Object.create; + +extensions.maxAge = function (maxAge, conf, options) { + var timeouts, postfix, preFetchAge, preFetchTimeouts; + + maxAge = timeout(maxAge); + if (!maxAge) return; + + timeouts = create(null); + postfix = + (options.async && extensions.async) || (options.promise && extensions.promise) + ? "async" + : ""; + conf.on("set" + postfix, function (id) { + timeouts[id] = setTimeout(function () { conf.delete(id); }, maxAge); + if (typeof timeouts[id].unref === "function") timeouts[id].unref(); + if (!preFetchTimeouts) return; + if (preFetchTimeouts[id]) { + if (preFetchTimeouts[id] !== "nextTick") clearTimeout(preFetchTimeouts[id]); + } + preFetchTimeouts[id] = setTimeout(function () { + delete preFetchTimeouts[id]; + }, preFetchAge); + if (typeof preFetchTimeouts[id].unref === "function") preFetchTimeouts[id].unref(); + }); + conf.on("delete" + postfix, function (id) { + clearTimeout(timeouts[id]); + delete timeouts[id]; + if (!preFetchTimeouts) return; + if (preFetchTimeouts[id] !== "nextTick") clearTimeout(preFetchTimeouts[id]); + delete preFetchTimeouts[id]; + }); + + if (options.preFetch) { + if (options.preFetch === true || isNaN(options.preFetch)) { + preFetchAge = 0.333; + } else { + preFetchAge = max(min(Number(options.preFetch), 1), 0); + } + if (preFetchAge) { + preFetchTimeouts = {}; + preFetchAge = (1 - preFetchAge) * maxAge; + conf.on("get" + postfix, function (id, args, context) { + if (!preFetchTimeouts[id]) { + preFetchTimeouts[id] = "nextTick"; + nextTick(function () { + var result; + if (preFetchTimeouts[id] !== "nextTick") return; + delete preFetchTimeouts[id]; + conf.delete(id); + if (options.async) { + args = aFrom(args); + args.push(noop); + } + result = conf.memoized.apply(context, args); + if (options.promise) { + // Supress eventual error warnings + if (isPromise(result)) { + if (typeof result.done === "function") result.done(noop, noop); + else result.then(noop, noop); + } + } + }); + } + }); + } + } + + conf.on("clear" + postfix, function () { + forEach(timeouts, function (id) { clearTimeout(id); }); + timeouts = {}; + if (preFetchTimeouts) { + forEach(preFetchTimeouts, function (id) { if (id !== "nextTick") clearTimeout(id); }); + preFetchTimeouts = {}; + } + }); +}; diff --git a/node_modules/memoizee/ext/max.js b/node_modules/memoizee/ext/max.js new file mode 100644 index 00000000..13d120e0 --- /dev/null +++ b/node_modules/memoizee/ext/max.js @@ -0,0 +1,27 @@ +// Limit cache size, LRU (least recently used) algorithm. + +"use strict"; + +var toPosInteger = require("es5-ext/number/to-pos-integer") + , lruQueue = require("lru-queue") + , extensions = require("../lib/registered-extensions"); + +extensions.max = function (max, conf, options) { + var postfix, queue, hit; + + max = toPosInteger(max); + if (!max) return; + + queue = lruQueue(max); + postfix = (options.async && extensions.async) || (options.promise && extensions.promise) + ? "async" : ""; + + conf.on("set" + postfix, hit = function (id) { + id = queue.hit(id); + if (id === undefined) return; + conf.delete(id); + }); + conf.on("get" + postfix, hit); + conf.on("delete" + postfix, queue.delete); + conf.on("clear" + postfix, queue.clear); +}; diff --git a/node_modules/memoizee/ext/promise.js b/node_modules/memoizee/ext/promise.js new file mode 100644 index 00000000..4b7163cb --- /dev/null +++ b/node_modules/memoizee/ext/promise.js @@ -0,0 +1,147 @@ +/* eslint max-statements: 0 */ + +// Support for functions returning promise + +"use strict"; + +var objectMap = require("es5-ext/object/map") + , primitiveSet = require("es5-ext/object/primitive-set") + , ensureString = require("es5-ext/object/validate-stringifiable-value") + , toShortString = require("es5-ext/to-short-string-representation") + , isPromise = require("is-promise") + , nextTick = require("next-tick"); + +var create = Object.create + , supportedModes = primitiveSet("then", "then:finally", "done", "done:finally"); + +require("../lib/registered-extensions").promise = function (mode, conf) { + var waiting = create(null), cache = create(null), promises = create(null); + + if (mode === true) { + mode = null; + } else { + mode = ensureString(mode); + if (!supportedModes[mode]) { + throw new TypeError("'" + toShortString(mode) + "' is not valid promise mode"); + } + } + + // After not from cache call + conf.on("set", function (id, ignore, promise) { + var isFailed = false; + + if (!isPromise(promise)) { + // Non promise result + cache[id] = promise; + conf.emit("setasync", id, 1); + return; + } + waiting[id] = 1; + promises[id] = promise; + var onSuccess = function (result) { + var count = waiting[id]; + if (isFailed) { + throw new Error( + "Memoizee error: Detected unordered then|done & finally resolution, which " + + "in turn makes proper detection of success/failure impossible (when in " + + "'done:finally' mode)\n" + + "Consider to rely on 'then' or 'done' mode instead." + ); + } + if (!count) return; // Deleted from cache before resolved + delete waiting[id]; + cache[id] = result; + conf.emit("setasync", id, count); + }; + var onFailure = function () { + isFailed = true; + if (!waiting[id]) return; // Deleted from cache (or succeed in case of finally) + delete waiting[id]; + delete promises[id]; + conf.delete(id); + }; + + var resolvedMode = mode; + if (!resolvedMode) resolvedMode = "then"; + + if (resolvedMode === "then") { + var nextTickFailure = function () { nextTick(onFailure); }; + // Eventual finally needs to be attached to non rejected promise + // (so we not force propagation of unhandled rejection) + promise = promise.then(function (result) { + nextTick(onSuccess.bind(this, result)); + }, nextTickFailure); + // If `finally` is a function we attach to it to remove cancelled promises. + if (typeof promise.finally === "function") { + promise.finally(nextTickFailure); + } + } else if (resolvedMode === "done") { + // Not recommended, as it may mute any eventual "Unhandled error" events + if (typeof promise.done !== "function") { + throw new Error( + "Memoizee error: Retrieved promise does not implement 'done' " + + "in 'done' mode" + ); + } + promise.done(onSuccess, onFailure); + } else if (resolvedMode === "done:finally") { + // The only mode with no side effects assuming library does not throw unconditionally + // for rejected promises. + if (typeof promise.done !== "function") { + throw new Error( + "Memoizee error: Retrieved promise does not implement 'done' " + + "in 'done:finally' mode" + ); + } + if (typeof promise.finally !== "function") { + throw new Error( + "Memoizee error: Retrieved promise does not implement 'finally' " + + "in 'done:finally' mode" + ); + } + promise.done(onSuccess); + promise.finally(onFailure); + } + }); + + // From cache (sync) + conf.on("get", function (id, args, context) { + var promise; + if (waiting[id]) { + ++waiting[id]; // Still waiting + return; + } + promise = promises[id]; + var emit = function () { conf.emit("getasync", id, args, context); }; + if (isPromise(promise)) { + if (typeof promise.done === "function") promise.done(emit); + else { + promise.then(function () { nextTick(emit); }); + } + } else { + emit(); + } + }); + + // On delete + conf.on("delete", function (id) { + delete promises[id]; + if (waiting[id]) { + delete waiting[id]; + return; // Not yet resolved + } + if (!hasOwnProperty.call(cache, id)) return; + var result = cache[id]; + delete cache[id]; + conf.emit("deleteasync", id, [result]); + }); + + // On clear + conf.on("clear", function () { + var oldCache = cache; + cache = create(null); + waiting = create(null); + promises = create(null); + conf.emit("clearasync", objectMap(oldCache, function (data) { return [data]; })); + }); +}; diff --git a/node_modules/memoizee/ext/ref-counter.js b/node_modules/memoizee/ext/ref-counter.js new file mode 100644 index 00000000..5fd8c289 --- /dev/null +++ b/node_modules/memoizee/ext/ref-counter.js @@ -0,0 +1,48 @@ +// Reference counter, useful for garbage collector like functionality + +"use strict"; + +var d = require("d") + , extensions = require("../lib/registered-extensions") + + , create = Object.create, defineProperties = Object.defineProperties; + +extensions.refCounter = function (ignore, conf, options) { + var cache, postfix; + + cache = create(null); + postfix = (options.async && extensions.async) || (options.promise && extensions.promise) + ? "async" : ""; + + conf.on("set" + postfix, function (id, length) { + cache[id] = length || 1; +}); + conf.on("get" + postfix, function (id) { + ++cache[id]; +}); + conf.on("delete" + postfix, function (id) { + delete cache[id]; +}); + conf.on("clear" + postfix, function () { + cache = {}; +}); + + defineProperties(conf.memoized, { + deleteRef: d(function () { + var id = conf.get(arguments); + if (id === null) return null; + if (!cache[id]) return null; + if (!--cache[id]) { + conf.delete(id); + return true; + } + return false; + }), + getRefCount: d(function () { + var id = conf.get(arguments); + if (id === null) return 0; + if (!cache[id]) return 0; + return cache[id]; + }) + }); +}; diff --git a/node_modules/memoizee/index.js b/node_modules/memoizee/index.js new file mode 100644 index 00000000..6731a0d4 --- /dev/null +++ b/node_modules/memoizee/index.js @@ -0,0 +1,34 @@ +"use strict"; + +var normalizeOpts = require("es5-ext/object/normalize-options") + , resolveLength = require("./lib/resolve-length") + , plain = require("./plain"); + +module.exports = function (fn/*, options*/) { + var options = normalizeOpts(arguments[1]), length; + + if (!options.normalizer) { + length = options.length = resolveLength(options.length, fn.length, options.async); + if (length !== 0) { + if (options.primitive) { + if (length === false) { + options.normalizer = require("./normalizers/primitive"); + } else if (length > 1) { + options.normalizer = require("./normalizers/get-primitive-fixed")(length); + } + } else if (length === false) options.normalizer = require("./normalizers/get")(); + else if (length === 1) options.normalizer = require("./normalizers/get-1")(); + else options.normalizer = require("./normalizers/get-fixed")(length); + } + } + + // Assure extensions + if (options.async) require("./ext/async"); + if (options.promise) require("./ext/promise"); + if (options.dispose) require("./ext/dispose"); + if (options.maxAge) require("./ext/max-age"); + if (options.max) require("./ext/max"); + if (options.refCounter) require("./ext/ref-counter"); + + return plain(fn, options); +}; diff --git a/node_modules/memoizee/lib/configure-map.js b/node_modules/memoizee/lib/configure-map.js new file mode 100644 index 00000000..139398b7 --- /dev/null +++ b/node_modules/memoizee/lib/configure-map.js @@ -0,0 +1,182 @@ +/* eslint no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */ + +"use strict"; + +var customError = require("es5-ext/error/custom") + , defineLength = require("es5-ext/function/_define-length") + , d = require("d") + , ee = require("event-emitter").methods + , resolveResolve = require("./resolve-resolve") + , resolveNormalize = require("./resolve-normalize"); + +var apply = Function.prototype.apply + , call = Function.prototype.call + , create = Object.create + , defineProperties = Object.defineProperties + , on = ee.on + , emit = ee.emit; + +module.exports = function (original, length, options) { + var cache = create(null) + , conf + , memLength + , get + , set + , del + , clear + , extDel + , extGet + , extHas + , normalizer + , getListeners + , setListeners + , deleteListeners + , memoized + , resolve; + if (length !== false) memLength = length; + else if (isNaN(original.length)) memLength = 1; + else memLength = original.length; + + if (options.normalizer) { + normalizer = resolveNormalize(options.normalizer); + get = normalizer.get; + set = normalizer.set; + del = normalizer.delete; + clear = normalizer.clear; + } + if (options.resolvers != null) resolve = resolveResolve(options.resolvers); + + if (get) { + memoized = defineLength(function (arg) { + var id, result, args = arguments; + if (resolve) args = resolve(args); + id = get(args); + if (id !== null) { + if (hasOwnProperty.call(cache, id)) { + if (getListeners) conf.emit("get", id, args, this); + return cache[id]; + } + } + if (args.length === 1) result = call.call(original, this, args[0]); + else result = apply.call(original, this, args); + if (id === null) { + id = get(args); + if (id !== null) throw customError("Circular invocation", "CIRCULAR_INVOCATION"); + id = set(args); + } else if (hasOwnProperty.call(cache, id)) { + throw customError("Circular invocation", "CIRCULAR_INVOCATION"); + } + cache[id] = result; + if (setListeners) conf.emit("set", id, null, result); + return result; + }, memLength); + } else if (length === 0) { + memoized = function () { + var result; + if (hasOwnProperty.call(cache, "data")) { + if (getListeners) conf.emit("get", "data", arguments, this); + return cache.data; + } + if (arguments.length) result = apply.call(original, this, arguments); + else result = call.call(original, this); + if (hasOwnProperty.call(cache, "data")) { + throw customError("Circular invocation", "CIRCULAR_INVOCATION"); + } + cache.data = result; + if (setListeners) conf.emit("set", "data", null, result); + return result; + }; + } else { + memoized = function (arg) { + var result, args = arguments, id; + if (resolve) args = resolve(arguments); + id = String(args[0]); + if (hasOwnProperty.call(cache, id)) { + if (getListeners) conf.emit("get", id, args, this); + return cache[id]; + } + if (args.length === 1) result = call.call(original, this, args[0]); + else result = apply.call(original, this, args); + if (hasOwnProperty.call(cache, id)) { + throw customError("Circular invocation", "CIRCULAR_INVOCATION"); + } + cache[id] = result; + if (setListeners) conf.emit("set", id, null, result); + return result; + }; + } + conf = { + original: original, + memoized: memoized, + profileName: options.profileName, + get: function (args) { + if (resolve) args = resolve(args); + if (get) return get(args); + return String(args[0]); + }, + has: function (id) { return hasOwnProperty.call(cache, id); }, + delete: function (id) { + var result; + if (!hasOwnProperty.call(cache, id)) return; + if (del) del(id); + result = cache[id]; + delete cache[id]; + if (deleteListeners) conf.emit("delete", id, result); + }, + clear: function () { + var oldCache = cache; + if (clear) clear(); + cache = create(null); + conf.emit("clear", oldCache); + }, + on: function (type, listener) { + if (type === "get") getListeners = true; + else if (type === "set") setListeners = true; + else if (type === "delete") deleteListeners = true; + return on.call(this, type, listener); + }, + emit: emit, + updateEnv: function () { original = conf.original; } + }; + if (get) { + extDel = defineLength(function (arg) { + var id, args = arguments; + if (resolve) args = resolve(args); + id = get(args); + if (id === null) return; + conf.delete(id); + }, memLength); + } else if (length === 0) { + extDel = function () { return conf.delete("data"); }; + } else { + extDel = function (arg) { + if (resolve) arg = resolve(arguments)[0]; + return conf.delete(arg); + }; + } + extGet = defineLength(function () { + var id, args = arguments; + if (length === 0) return cache.data; + if (resolve) args = resolve(args); + if (get) id = get(args); + else id = String(args[0]); + return cache[id]; + }); + extHas = defineLength(function () { + var id, args = arguments; + if (length === 0) return conf.has("data"); + if (resolve) args = resolve(args); + if (get) id = get(args); + else id = String(args[0]); + if (id === null) return false; + return conf.has(id); + }); + defineProperties(memoized, { + __memoized__: d(true), + delete: d(extDel), + clear: d(conf.clear), + _get: d(extGet), + _has: d(extHas) + }); + return conf; +}; diff --git a/node_modules/memoizee/lib/methods.js b/node_modules/memoizee/lib/methods.js new file mode 100644 index 00000000..779b699d --- /dev/null +++ b/node_modules/memoizee/lib/methods.js @@ -0,0 +1,32 @@ +"use strict"; + +var forEach = require("es5-ext/object/for-each") + , normalizeOpts = require("es5-ext/object/normalize-options") + , callable = require("es5-ext/object/valid-callable") + , lazy = require("d/lazy") + , resolveLength = require("./resolve-length") + , extensions = require("./registered-extensions"); + +module.exports = function (memoize) { + return function (props) { + forEach(props, function (desc) { + var fn = callable(desc.value), length; + desc.value = function (options) { + if (options.getNormalizer) { + options = normalizeOpts(options); + if (length === undefined) { + length = resolveLength( + options.length, + fn.length, + options.async && extensions.async + ); + } + options.normalizer = options.getNormalizer(length); + delete options.getNormalizer; + } + return memoize(fn.bind(this), options); + }; + }); + return lazy(props); + }; +}; diff --git a/node_modules/memoizee/lib/registered-extensions.js b/node_modules/memoizee/lib/registered-extensions.js new file mode 100644 index 00000000..3918c74e --- /dev/null +++ b/node_modules/memoizee/lib/registered-extensions.js @@ -0,0 +1 @@ +"use strict"; diff --git a/node_modules/memoizee/lib/resolve-length.js b/node_modules/memoizee/lib/resolve-length.js new file mode 100644 index 00000000..a02a8a97 --- /dev/null +++ b/node_modules/memoizee/lib/resolve-length.js @@ -0,0 +1,15 @@ +"use strict"; + +var toPosInt = require("es5-ext/number/to-pos-integer"); + +module.exports = function (optsLength, fnLength, isAsync) { + var length; + if (isNaN(optsLength)) { + length = fnLength; + if (!(length >= 0)) return 1; + if (isAsync && length) return length - 1; + return length; + } + if (optsLength === false) return false; + return toPosInt(optsLength); +}; diff --git a/node_modules/memoizee/lib/resolve-normalize.js b/node_modules/memoizee/lib/resolve-normalize.js new file mode 100644 index 00000000..f0bc7190 --- /dev/null +++ b/node_modules/memoizee/lib/resolve-normalize.js @@ -0,0 +1,17 @@ +"use strict"; + +var callable = require("es5-ext/object/valid-callable"); + +module.exports = function (userNormalizer) { + var normalizer; + if (typeof userNormalizer === "function") return { set: userNormalizer, get: userNormalizer }; + normalizer = { get: callable(userNormalizer.get) }; + if (userNormalizer.set !== undefined) { + normalizer.set = callable(userNormalizer.set); + if (userNormalizer.delete) normalizer.delete = callable(userNormalizer.delete); + if (userNormalizer.clear) normalizer.clear = callable(userNormalizer.clear); + return normalizer; + } + normalizer.set = normalizer.get; + return normalizer; +}; diff --git a/node_modules/memoizee/lib/resolve-resolve.js b/node_modules/memoizee/lib/resolve-resolve.js new file mode 100644 index 00000000..578eb379 --- /dev/null +++ b/node_modules/memoizee/lib/resolve-resolve.js @@ -0,0 +1,21 @@ +"use strict"; + +var toArray = require("es5-ext/array/to-array") + , isValue = require("es5-ext/object/is-value") + , callable = require("es5-ext/object/valid-callable"); + +var slice = Array.prototype.slice, resolveArgs; + +resolveArgs = function (args) { + return this.map(function (resolve, i) { + return resolve ? resolve(args[i]) : args[i]; + }).concat(slice.call(args, this.length)); +}; + +module.exports = function (resolvers) { + resolvers = toArray(resolvers); + resolvers.forEach(function (resolve) { + if (isValue(resolve)) callable(resolve); + }); + return resolveArgs.bind(resolvers); +}; diff --git a/node_modules/memoizee/lib/weak.js b/node_modules/memoizee/lib/weak.js new file mode 100644 index 00000000..c48c9107 --- /dev/null +++ b/node_modules/memoizee/lib/weak.js @@ -0,0 +1,134 @@ +"use strict"; + +var customError = require("es5-ext/error/custom") + , defineLength = require("es5-ext/function/_define-length") + , partial = require("es5-ext/function/#/partial") + , copy = require("es5-ext/object/copy") + , normalizeOpts = require("es5-ext/object/normalize-options") + , callable = require("es5-ext/object/valid-callable") + , d = require("d") + , WeakMap = require("es6-weak-map") + , resolveLength = require("./resolve-length") + , extensions = require("./registered-extensions") + , resolveResolve = require("./resolve-resolve") + , resolveNormalize = require("./resolve-normalize"); + +var slice = Array.prototype.slice, defineProperties = Object.defineProperties; + +module.exports = function (memoize) { + return function (fn/*, options*/) { + var map, length, options = normalizeOpts(arguments[1]), memoized, resolve, normalizer; + + callable(fn); + + // Do not memoize already memoized function + if (hasOwnProperty.call(fn, "__memoized__") && !options.force) return fn; + + length = resolveLength(options.length, fn.length, options.async && extensions.async); + options.length = length ? length - 1 : 0; + map = new WeakMap(); + + if (options.resolvers) resolve = resolveResolve(options.resolvers); + if (options.normalizer) normalizer = resolveNormalize(options.normalizer); + + if ( + length === 1 && + !normalizer && + !options.async && + !options.dispose && + !options.maxAge && + !options.max && + !options.refCounter + ) { + return defineProperties( + function (obj) { + var result, args = arguments; + if (resolve) args = resolve(args); + obj = args[0]; + if (map.has(obj)) return map.get(obj); + result = fn.apply(this, args); + if (map.has(obj)) { + throw customError("Circular invocation", "CIRCULAR_INVOCATION"); + } + map.set(obj, result); + return result; + }, + { + __memoized__: d(true), + delete: d(function (obj) { + if (resolve) obj = resolve(arguments)[0]; + return map.delete(obj); + }) + } + ); + } + memoized = defineProperties( + defineLength(function (obj) { + var memoizer, args = arguments; + if (resolve) { + args = resolve(args); + obj = args[0]; + } + memoizer = map.get(obj); + if (!memoizer) { + if (normalizer) { + options = copy(options); + options.normalizer = copy(normalizer); + options.normalizer.get = partial.call(options.normalizer.get, obj); + options.normalizer.set = partial.call(options.normalizer.set, obj); + if (options.normalizer.delete) { + options.normalizer.delete = partial.call( + options.normalizer.delete, obj + ); + } + } + map.set(obj, memoizer = memoize(partial.call(fn, obj), options)); + } + return memoizer.apply(this, slice.call(args, 1)); + }, length), + { + __memoized__: d(true), + delete: d( + defineLength(function (obj) { + var memoizer, args = arguments; + if (resolve) { + args = resolve(args); + obj = args[0]; + } + memoizer = map.get(obj); + if (!memoizer) return; + memoizer.delete.apply(this, slice.call(args, 1)); + }, length) + ) + } + ); + if (!options.refCounter) return memoized; + defineProperties(memoized, { + deleteRef: d( + defineLength(function (obj) { + var memoizer, args = arguments; + if (resolve) { + args = resolve(args); + obj = args[0]; + } + memoizer = map.get(obj); + if (!memoizer) return null; + return memoizer.deleteRef.apply(this, slice.call(args, 1)); + }, length) + ), + getRefCount: d( + defineLength(function (obj) { + var memoizer, args = arguments; + if (resolve) { + args = resolve(args); + obj = args[0]; + } + memoizer = map.get(obj); + if (!memoizer) return 0; + return memoizer.getRefCount.apply(this, slice.call(args, 1)); + }, length) + ) + }); + return memoized; + }; +}; diff --git a/node_modules/memoizee/methods-plain.js b/node_modules/memoizee/methods-plain.js new file mode 100644 index 00000000..6b042507 --- /dev/null +++ b/node_modules/memoizee/methods-plain.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./lib/methods")(require("./plain")); diff --git a/node_modules/memoizee/methods.js b/node_modules/memoizee/methods.js new file mode 100644 index 00000000..3ab19114 --- /dev/null +++ b/node_modules/memoizee/methods.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./lib/methods")(require("./")); diff --git a/node_modules/memoizee/normalizers/get-1.js b/node_modules/memoizee/normalizers/get-1.js new file mode 100644 index 00000000..292463b7 --- /dev/null +++ b/node_modules/memoizee/normalizers/get-1.js @@ -0,0 +1,29 @@ +"use strict"; + +var indexOf = require("es5-ext/array/#/e-index-of"); + +module.exports = function () { + var lastId = 0, argsMap = [], cache = []; + return { + get: function (args) { + var index = indexOf.call(argsMap, args[0]); + return index === -1 ? null : cache[index]; + }, + set: function (args) { + argsMap.push(args[0]); + cache.push(++lastId); + return lastId; + }, + delete: function (id) { + var index = indexOf.call(cache, id); + if (index !== -1) { + argsMap.splice(index, 1); + cache.splice(index, 1); + } + }, + clear: function () { + argsMap = []; + cache = []; + } + }; +}; diff --git a/node_modules/memoizee/normalizers/get-fixed.js b/node_modules/memoizee/normalizers/get-fixed.js new file mode 100644 index 00000000..86f6affb --- /dev/null +++ b/node_modules/memoizee/normalizers/get-fixed.js @@ -0,0 +1,71 @@ +"use strict"; + +var indexOf = require("es5-ext/array/#/e-index-of") + , create = Object.create; + +module.exports = function (length) { + var lastId = 0, map = [[], []], cache = create(null); + return { + get: function (args) { + var index = 0, set = map, i; + while (index < length - 1) { + i = indexOf.call(set[0], args[index]); + if (i === -1) return null; + set = set[1][i]; + ++index; + } + i = indexOf.call(set[0], args[index]); + if (i === -1) return null; + return set[1][i] || null; + }, + set: function (args) { + var index = 0, set = map, i; + while (index < length - 1) { + i = indexOf.call(set[0], args[index]); + if (i === -1) { + i = set[0].push(args[index]) - 1; + set[1].push([[], []]); + } + set = set[1][i]; + ++index; + } + i = indexOf.call(set[0], args[index]); + if (i === -1) { + i = set[0].push(args[index]) - 1; + } + set[1][i] = ++lastId; + cache[lastId] = args; + return lastId; + }, + delete: function (id) { + var index = 0, set = map, i, path = [], args = cache[id]; + while (index < length - 1) { + i = indexOf.call(set[0], args[index]); + if (i === -1) { + return; + } + path.push(set, i); + set = set[1][i]; + ++index; + } + i = indexOf.call(set[0], args[index]); + if (i === -1) { + return; + } + id = set[1][i]; + set[0].splice(i, 1); + set[1].splice(i, 1); + while (!set[0].length && path.length) { + i = path.pop(); + set = path.pop(); + set[0].splice(i, 1); + set[1].splice(i, 1); + } + delete cache[id]; + }, + clear: function () { + map = [[], []]; + cache = create(null); + } + }; +}; diff --git a/node_modules/memoizee/normalizers/get-primitive-fixed.js b/node_modules/memoizee/normalizers/get-primitive-fixed.js new file mode 100644 index 00000000..baedcc8f --- /dev/null +++ b/node_modules/memoizee/normalizers/get-primitive-fixed.js @@ -0,0 +1,16 @@ +"use strict"; + +module.exports = function (length) { + if (!length) { + return function () { + return ""; + }; + } + return function (args) { + var id = String(args[0]), i = 0, currentLength = length; + while (--currentLength) { + id += "\u0001" + args[++i]; + } + return id; + }; +}; diff --git a/node_modules/memoizee/normalizers/get.js b/node_modules/memoizee/normalizers/get.js new file mode 100644 index 00000000..c5bb317b --- /dev/null +++ b/node_modules/memoizee/normalizers/get.js @@ -0,0 +1,90 @@ +/* eslint max-statements: 0 */ + +"use strict"; + +var indexOf = require("es5-ext/array/#/e-index-of"); + +var create = Object.create; + +module.exports = function () { + var lastId = 0, map = [], cache = create(null); + return { + get: function (args) { + var index = 0, set = map, i, length = args.length; + if (length === 0) return set[length] || null; + if ((set = set[length])) { + while (index < length - 1) { + i = indexOf.call(set[0], args[index]); + if (i === -1) return null; + set = set[1][i]; + ++index; + } + i = indexOf.call(set[0], args[index]); + if (i === -1) return null; + return set[1][i] || null; + } + return null; + }, + set: function (args) { + var index = 0, set = map, i, length = args.length; + if (length === 0) { + set[length] = ++lastId; + } else { + if (!set[length]) { + set[length] = [[], []]; + } + set = set[length]; + while (index < length - 1) { + i = indexOf.call(set[0], args[index]); + if (i === -1) { + i = set[0].push(args[index]) - 1; + set[1].push([[], []]); + } + set = set[1][i]; + ++index; + } + i = indexOf.call(set[0], args[index]); + if (i === -1) { + i = set[0].push(args[index]) - 1; + } + set[1][i] = ++lastId; + } + cache[lastId] = args; + return lastId; + }, + delete: function (id) { + var index = 0, set = map, i, args = cache[id], length = args.length, path = []; + if (length === 0) { + delete set[length]; + } else if ((set = set[length])) { + while (index < length - 1) { + i = indexOf.call(set[0], args[index]); + if (i === -1) { + return; + } + path.push(set, i); + set = set[1][i]; + ++index; + } + i = indexOf.call(set[0], args[index]); + if (i === -1) { + return; + } + id = set[1][i]; + set[0].splice(i, 1); + set[1].splice(i, 1); + while (!set[0].length && path.length) { + i = path.pop(); + set = path.pop(); + set[0].splice(i, 1); + set[1].splice(i, 1); + } + } + delete cache[id]; + }, + clear: function () { + map = []; + cache = create(null); + } + }; +}; diff --git a/node_modules/memoizee/normalizers/primitive.js b/node_modules/memoizee/normalizers/primitive.js new file mode 100644 index 00000000..b1cf0e3d --- /dev/null +++ b/node_modules/memoizee/normalizers/primitive.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (args) { + var id, i, length = args.length; + if (!length) return "\u0002"; + id = String(args[i = 0]); + while (--length) id += "\u0001" + args[++i]; + return id; +}; diff --git a/node_modules/memoizee/package.json b/node_modules/memoizee/package.json new file mode 100644 index 00000000..8a27fefe --- /dev/null +++ b/node_modules/memoizee/package.json @@ -0,0 +1,61 @@ +{ + "name": "memoizee", + "version": "0.4.14", + "description": "Memoize/cache function results", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "memoize", + "memoizer", + "cache", + "memoization", + "memo", + "memcached", + "hashing.", + "storage", + "caching", + "memory", + "gc", + "weak", + "garbage", + "collector", + "async" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/memoizee.git" + }, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.45", + "es6-weak-map": "^2.0.2", + "event-emitter": "^0.3.5", + "is-promise": "^2.1", + "lru-queue": "0.1", + "next-tick": "1", + "timers-ext": "^0.1.5" + }, + "devDependencies": { + "bluebird": "^3.5.1", + "eslint": "^5.3", + "eslint-config-medikoo-es5": "^1.6", + "plain-promise": "^0.1.1", + "tad": "^0.2.7" + }, + "eslintConfig": { + "extends": "medikoo-es5", + "root": true, + "globals": { + "setTimeout": true, + "clearTimeout": true + }, + "rules": { + "max-lines-per-function": "off" + } + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "lint-medikoo": "xlint --linter=node_modules/xlint-jslint-medikoo/index.js", + "test": "tad" + }, + "license": "ISC" +} diff --git a/node_modules/memoizee/plain.js b/node_modules/memoizee/plain.js new file mode 100644 index 00000000..d73111be --- /dev/null +++ b/node_modules/memoizee/plain.js @@ -0,0 +1,37 @@ +"use strict"; + +var callable = require("es5-ext/object/valid-callable") + , forEach = require("es5-ext/object/for-each") + , extensions = require("./lib/registered-extensions") + , configure = require("./lib/configure-map") + , resolveLength = require("./lib/resolve-length"); + +module.exports = function self(fn /*, options */) { + var options, length, conf; + + callable(fn); + options = Object(arguments[1]); + + if (options.async && options.promise) { + throw new Error("Options 'async' and 'promise' cannot be used together"); + } + + // Do not memoize already memoized function + if (hasOwnProperty.call(fn, "__memoized__") && !options.force) return fn; + + // Resolve length; + length = resolveLength(options.length, fn.length, options.async && extensions.async); + + // Configure cache map + conf = configure(fn, length, options); + + // Bind eventual extensions + forEach(extensions, function (extFn, name) { + if (options[name]) extFn(options[name], conf, options); + }); + + if (self.__profiler__) self.__profiler__(conf); + + conf.updateEnv(); + return conf.memoized; +}; diff --git a/node_modules/memoizee/profile.js b/node_modules/memoizee/profile.js new file mode 100644 index 00000000..a3f85efe --- /dev/null +++ b/node_modules/memoizee/profile.js @@ -0,0 +1,107 @@ +// Gathers statistical data, and provides them in convinient form + +"use strict"; + +var partial = require("es5-ext/function/#/partial") + , forEach = require("es5-ext/object/for-each") + , pad = require("es5-ext/string/#/pad") + , compact = require("es5-ext/array/#/compact") + , d = require("d") + , memoize = require("./plain"); + +var max = Math.max, stats = exports.statistics = {}; + +Object.defineProperty( + memoize, + "__profiler__", + d(function (conf) { + var id, source, data, stack; + stack = new Error().stack; + if ( + !stack || + !stack.split("\n").slice(3).some(function (line) { + if (line.indexOf("/memoizee/") === -1 && line.indexOf(" (native)") === -1) { + source = line.replace(/\n/g, "\\n").trim(); + return true; + } + return false; + }) + ) { + source = "unknown"; + } + id = compact.call([conf.profileName, source]).join(", "); + + if (!stats[id]) stats[id] = { initial: 0, cached: 0 }; + data = stats[id]; + + conf.on("set", function () { ++data.initial; }); + conf.on("get", function () { ++data.cached; }); + }) +); + +exports.log = function () { + var initial, cached, ordered, ipad, cpad, ppad, toPrc, log; + + initial = cached = 0; + ordered = []; + + toPrc = function (initialCount, cachedCount) { + if (!initialCount && !cachedCount) { + return "0.00"; + } + return ((cachedCount / (initialCount + cachedCount)) * 100).toFixed(2); + }; + + log = "------------------------------------------------------------\n"; + log += "Memoize statistics:\n\n"; + + forEach( + stats, + function (data, name) { + initial += data.initial; + cached += data.cached; + ordered.push([name, data]); + }, + null, + function (nameA, nameB) { + return ( + this[nameB].initial + + this[nameB].cached - + (this[nameA].initial + this[nameA].cached) + ); + } + ); + + ipad = partial.call(pad, " ", max(String(initial).length, "Init".length)); + cpad = partial.call(pad, " ", max(String(cached).length, "Cache".length)); + ppad = partial.call(pad, " ", "%Cache".length); + log += + ipad.call("Init") + + " " + + cpad.call("Cache") + + " " + + ppad.call("%Cache") + + " Source location\n"; + log += + ipad.call(initial) + + " " + + cpad.call(cached) + + " " + + ppad.call(toPrc(initial, cached)) + + " (all)\n"; + ordered.forEach(function (data) { + var name = data[0]; + data = data[1]; + log += + ipad.call(data.initial) + + " " + + cpad.call(data.cached) + + " " + + ppad.call(toPrc(data.initial, data.cached)) + + " " + + name + + "\n"; + }); + log += "------------------------------------------------------------\n"; + return log; +}; diff --git a/node_modules/memoizee/test/ext/async.js b/node_modules/memoizee/test/ext/async.js new file mode 100644 index 00000000..17b50223 --- /dev/null +++ b/node_modules/memoizee/test/ext/async.js @@ -0,0 +1,413 @@ +/* eslint id-length: 0, func-names: 0, handle-callback-err: 0, max-lines: 0 */ + +"use strict"; + +var memoize = require("../..") + , nextTick = require("next-tick"); + +module.exports = function () { + return { + "Regular": { + Success: function (a, d) { + var mfn, fn, u = {}, i = 0, invoked = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = memoize(fn, { async: true }); + + a( + mfn(3, 7, function (err, res) { + ++invoked; + a.deep([err, res], [null, 10], "Result #1"); + }), + u, + "Initial" + ); + a( + mfn(3, 7, function (err, res) { + ++invoked; + a.deep([err, res], [null, 10], "Result #2"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + ++invoked; + a.deep([err, res], [null, 13], "Result B #1"); + }), + u, + "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { + ++invoked; + a.deep([err, res], [null, 10], "Result #3"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + ++invoked; + a.deep([err, res], [null, 13], "Result B #2"); + }), + u, + "Initial #3" + ); + + nextTick(function () { + a(i, 2, "Init Called"); + a(invoked, 5, "Cb Called"); + + a( + mfn(3, 7, function (err, res) { + ++invoked; + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + ++invoked; + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 2, "Init Called #2"); + a(invoked, 7, "Cb Called #2"); + + mfn.delete(3, 7); + + a( + mfn(3, 7, function (err, res) { + ++invoked; + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + ++invoked; + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 3, "Init After delete"); + a(invoked, 9, "Cb After delete"); + d(); + }); + }); + }); + }, + Error: function (a, d) { + var mfn, fn, u = {}, i = 0, e = new Error("Test"); + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(e); + }); + return u; + }; + + mfn = memoize(fn, { async: true, dispose: a.never }); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Result #1"); + }), + u, + "Initial" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Result #2"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [e, undefined], "Result B #1"); + }), + u, + "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Result #3"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [e, undefined], "Result B #2"); + }), + u, + "Initial #3" + ); + + nextTick(function () { + a(i, 2, "Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [e, undefined], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 4, "Again Called #2"); + d(); + }); + }); + } + }, + "Primitive": { + "Success": function (a, d) { + var mfn, fn, u = {}, i = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = memoize(fn, { async: true, primitive: true }); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #1"); + }), + u, + "Initial" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #2"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #1"); + }), + u, + "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #3"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #2"); + }), + u, + "Initial #3" + ); + + nextTick(function () { + a(i, 2, "Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 2, "Again Called #2"); + + mfn.delete(3, 7); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 3, "Call After delete"); + d(); + }); + }); + }); + }, + "Error": function (a, d) { + var mfn, fn, u = {}, i = 0, e = new Error("Test"); + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(e); + }); + return u; + }; + + mfn = memoize(fn, { async: true, primitive: true }); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Result #1"); + }), + u, + "Initial" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Result #2"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [e, undefined], "Result B #1"); + }), + u, + "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Result #3"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [e, undefined], "Result B #2"); + }), + u, + "Initial #3" + ); + + nextTick(function () { + a(i, 2, "Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [e, undefined], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 4, "Again Called #2"); + d(); + }); + }); + }, + "Primitive null arg case": function (a, d) { + var x = {} + , mfn = memoize( + function f(id, cb) { + cb(null, x); + }, + { + async: true, + primitive: true + } + ); + + mfn(null, function (err, res) { + a.deep([err, res], [null, x], "Args"); + d(); + }); + } + }, + "Sync Clear": function (a, d) { + var mfn, fn; + fn = function (x, cb) { + nextTick(function () { + cb(null, x); + }); + }; + + mfn = memoize(fn, { async: true }); + mfn(1, function (err, i) { + a(i, 1, "First"); + }); + mfn.clear(); + mfn(2, function (err, i) { + a(i, 2, "Second"); + d(); + }); + }, + "Sync Clear: Primitive": function (a, d) { + var mfn, fn; + fn = function (x, cb) { + nextTick(function () { + cb(null, x); + }); + }; + mfn = memoize(fn, { async: true, primitive: true }); + + mfn(2, function (err, i) { + a(i, 2, "First"); + }); + mfn(1, function (err, i) { + a(i, 1, "Second"); + nextTick(d); + }); + mfn.clear(); + mfn(2, function (err, i) { + a(i, 2, "Third"); + }); + } + }; +}; diff --git a/node_modules/memoizee/test/ext/dispose.js b/node_modules/memoizee/test/ext/dispose.js new file mode 100644 index 00000000..d92cd021 --- /dev/null +++ b/node_modules/memoizee/test/ext/dispose.js @@ -0,0 +1,243 @@ +/* eslint id-length: 0, max-lines: 0, max-statements: 0 */ + +"use strict"; + +var memoize = require("../..") + , nextTick = require("next-tick") + , delay = require("timers-ext/delay") + , Promise = require("plain-promise"); + +module.exports = function () { + return { + Regular: { + "Sync": function (a) { + var mfn, fn, value = [], x, invoked; + fn = function (arg1, arg2) { return arg1 + arg2; }; + mfn = memoize(fn, { dispose: function (val) { value.push(val); } }); + mfn(3, 7); + mfn(5, 8); + mfn(12, 4); + a.deep(value, [], "Pre"); + mfn.delete(5, 8); + a.deep(value, [13], "#1"); + value = []; + mfn.delete(12, 4); + a.deep(value, [16], "#2"); + + value = []; + mfn(77, 11); + mfn.clear(); + a.deep(value, [10, 88], "Clear all"); + + x = {}; + invoked = false; + mfn = memoize(function () { return x; }, { + dispose: function (val) { invoked = val; } + }); + + mfn.delete(); + a(invoked, false, "No args: Post invalid delete"); + mfn(); + a(invoked, false, "No args: Post cache"); + mfn.delete(); + a(invoked, x, "No args: Pre delete"); + }, + "Ref counter": function (a) { + var mfn, fn, value = []; + fn = function (x, y) { return x + y; }; + mfn = memoize(fn, { + refCounter: true, + dispose: function (val) { value.push(val); } + }); + + mfn(3, 7); + mfn(5, 8); + mfn(12, 4); + a.deep(value, [], "Pre"); + mfn(5, 8); + mfn.deleteRef(5, 8); + a.deep(value, [], "Pre"); + mfn.deleteRef(5, 8); + a.deep(value, [13], "#1"); + value = []; + mfn.deleteRef(12, 4); + a.deep(value, [16], "#2"); + + value = []; + mfn(77, 11); + mfn.clear(); + a.deep(value, [10, 88], "Clear all"); + }, + "Async": function (a, d) { + var mfn, fn, u = {}, value = []; + fn = function (x, y, cb) { + nextTick(function () { cb(null, x + y); }); + return u; + }; + + mfn = memoize(fn, { async: true, dispose: function (val) { value.push(val); } }); + + mfn(3, 7, function () { + mfn(5, 8, function () { + mfn(12, 4, function () { + a.deep(value, [], "Pre"); + mfn.delete(5, 8); + a.deep(value, [13], "#1"); + value = []; + mfn.delete(12, 4); + a.deep(value, [16], "#2"); + + value = []; + mfn(77, 11, function () { + mfn.clear(); + a.deep(value, [10, 88], "Clear all"); + d(); + }); + }); + }); + }); + }, + "Promise": function (a, d) { + var mfn, fn, value = []; + fn = function (x, y) { + return new Promise(function (res) { res(x + y); }); + }; + + mfn = memoize(fn, { promise: true, dispose: function (val) { value.push(val); } }); + + mfn(3, 7).done(function () { + mfn(5, 8).done(function () { + mfn(12, 4).done( + delay(function () { + a.deep(value, [], "Pre"); + mfn.delete(5, 8); + a.deep(value, [13], "#1"); + value = []; + mfn.delete(12, 4); + a.deep(value, [16], "#2"); + + value = []; + mfn(77, 11).done( + delay(function () { + mfn.clear(); + a.deep(value, [10, 88], "Clear all"); + d(); + }) + ); + }) + ); + }); + }); + } + }, + Primitive: { + "Sync": function (a) { + var mfn, fn, value = []; + fn = function (x, y) { return x + y; }; + mfn = memoize(fn, { dispose: function (val) { value.push(val); } }); + + mfn(3, 7); + mfn(5, 8); + mfn(12, 4); + a.deep(value, [], "Pre"); + mfn.delete(5, 8); + a.deep(value, [13], "#1"); + value = []; + mfn.delete(12, 4); + a.deep(value, [16], "#2"); + + value = []; + mfn(77, 11); + mfn.clear(); + a.deep(value, [10, 88], "Clear all"); + }, + "Ref counter": function (a) { + var mfn, fn, value = []; + fn = function (x, y) { return x + y; }; + mfn = memoize(fn, { + refCounter: true, + dispose: function (val) { value.push(val); } + }); + + mfn(3, 7); + mfn(5, 8); + mfn(12, 4); + a.deep(value, [], "Pre"); + mfn(5, 8); + mfn.deleteRef(5, 8); + a.deep(value, [], "Pre"); + mfn.deleteRef(5, 8); + a.deep(value, [13], "#1"); + value = []; + mfn.deleteRef(12, 4); + a.deep(value, [16], "#2"); + + value = []; + mfn(77, 11); + mfn.clear(); + a.deep(value, [10, 88], "Clear all"); + }, + "Async": function (a, d) { + var mfn, fn, u = {}, value = []; + fn = function (x, y, cb) { + nextTick(function () { cb(null, x + y); }); + return u; + }; + + mfn = memoize(fn, { async: true, dispose: function (val) { value.push(val); } }); + + mfn(3, 7, function () { + mfn(5, 8, function () { + mfn(12, 4, function () { + a.deep(value, [], "Pre"); + mfn.delete(5, 8); + a.deep(value, [13], "#1"); + value = []; + mfn.delete(12, 4); + a.deep(value, [16], "#2"); + + value = []; + mfn(77, 11, function () { + mfn.clear(); + a.deep(value, [10, 88], "Clear all"); + d(); + }); + }); + }); + }); + }, + "Promise": function (a, d) { + var mfn, fn, value = []; + fn = function (x, y) { + return new Promise(function (res) { res(x + y); }); + }; + + mfn = memoize(fn, { promise: true, dispose: function (val) { value.push(val); } }); + + mfn(3, 7).done(function () { + mfn(5, 8).done(function () { + mfn(12, 4).done( + delay(function () { + a.deep(value, [], "Pre"); + mfn.delete(5, 8); + a.deep(value, [13], "#1"); + value = []; + mfn.delete(12, 4); + a.deep(value, [16], "#2"); + + value = []; + mfn(77, 11).done( + delay(function () { + mfn.clear(); + a.deep(value, [10, 88], "Clear all"); + d(); + }) + ); + }) + ); + }); + }); + } + } + }; +}; diff --git a/node_modules/memoizee/test/ext/max-age.js b/node_modules/memoizee/test/ext/max-age.js new file mode 100644 index 00000000..4c016499 --- /dev/null +++ b/node_modules/memoizee/test/ext/max-age.js @@ -0,0 +1,860 @@ +/* eslint max-lines: 0, id-length: 0, func-names: 0, handle-callback-err: 0, max-lines: 0, +no-unused-vars: 0, max-nested-callbacks: 0, no-shadow: 0, max-len: 0 */ + +"use strict"; + +var memoize = require("../..") + , nextTick = require("next-tick") + , delay = require("timers-ext/delay") + , Promise = require("plain-promise"); + +require("../../ext/async"); +require("../../ext/promise"); + +module.exports = function () { + return { + Regular: { + Sync: function (a, d) { + var mfn, fn, i = 0; + fn = function (x, y) { + ++i; + return x + y; + }; + mfn = memoize(fn, { maxAge: 100 }); + + a(mfn(3, 7), 10, "Result #1"); + a(i, 1, "Called #1"); + a(mfn(3, 7), 10, "Result #2"); + a(i, 1, "Called #2"); + a(mfn(5, 8), 13, "Result B #1"); + a(i, 2, "Called B #1"); + a(mfn(3, 7), 10, "Result #3"); + a(i, 2, "Called #3"); + a(mfn(5, 8), 13, "Result B #2"); + a(i, 2, "Called B #2"); + + setTimeout(function () { + a(mfn(3, 7), 10, "Result: Wait"); + a(i, 2, "Called: Wait"); + a(mfn(5, 8), 13, "Result: Wait B"); + a(i, 2, "Called: Wait B"); + + a(mfn(9, 1), 10, "Result: C"); + a(i, 3, "Called: C"); + setTimeout(function () { + a(mfn(3, 7), 10, "Result: Wait After"); + a(i, 4, "Called: Wait After"); + a(mfn(5, 8), 13, "Result: Wait After B"); + a(i, 5, "Called: Wait After B"); + + a(mfn(3, 7), 10, "Result: Wait After #2"); + a(i, 5, "Called: Wait After #2"); + a(mfn(5, 8), 13, "Result: Wait After B #2"); + a(i, 5, "Called: Wait After B #2"); + + a(mfn(9, 1), 10, "Result: WiatC"); + a(i, 5, "Called: Wait C"); + d(); + }, 70); + }, 40); + }, + Promise: function (a, d) { + var mfn, fn, i = 0; + fn = function (x, y) { + return new Promise(function (res) { + ++i; + res(x + y); + }); + }; + + mfn = memoize(fn, { promise: true, maxAge: 100 }); + + mfn(3, 7).done(function (res) { a(res, 10, "Result #1"); }); + mfn(5, 8).done(function (res) { a(res, 13, "Result #2"); }); + mfn(3, 7).done(function (res) { a(res, 10, "Result #3"); }); + mfn(3, 7).done(function (res) { a(res, 10, "Result #4"); }); + mfn(5, 8).done(function (res) { a(res, 13, "Result #5"); }); + + setTimeout(function () { + a(i, 2, "Called #2"); + + mfn(3, 7).done(function (res) { a(res, 10, "Again: Result #1"); }); + mfn(5, 8).done(function (res) { a(res, 13, "Again: Result #2"); }); + + setTimeout(function () { + a(i, 2, "Again Called #2"); + + mfn(3, 7).done(function (res) { a(res, 10, "Again: Result #1"); }); + mfn(5, 8).done(function (res) { a(res, 13, "Again: Result #2"); }); + + nextTick(function () { + a(i, 4, "Call After clear"); + d(); + }); + }, 100); + }, 20); + }, + Async: function (a, d) { + var mfn, fn, u = {}, i = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = memoize(fn, { async: true, maxAge: 100 }); + + a( + mfn(3, 7, function (err, res) { a.deep([err, res], [null, 10], "Result #1"); }), + u, "Initial" + ); + a( + mfn(3, 7, function (err, res) { a.deep([err, res], [null, 10], "Result #2"); }), + u, "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #1"); + }), + u, "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { a.deep([err, res], [null, 10], "Result #3"); }), + u, "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #2"); + }), + u, "Initial #3" + ); + + setTimeout(function () { + a(i, 2, "Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, "Again B: Initial" + ); + + setTimeout(function () { + a(i, 2, "Again Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, "Again B: Initial" + ); + + nextTick(function () { + a(i, 4, "Call After clear"); + d(); + }); + }, 100); + }, 20); + } + }, + Primitive: { + Sync: function (a, d) { + var mfn, fn, i = 0; + fn = function (x, y) { + ++i; + return x + y; + }; + mfn = memoize(fn, { primitive: true, maxAge: 100 }); + + a(mfn(3, 7), 10, "Result #1"); + a(i, 1, "Called #1"); + a(mfn(3, 7), 10, "Result #2"); + a(i, 1, "Called #2"); + a(mfn(5, 8), 13, "Result B #1"); + a(i, 2, "Called B #1"); + a(mfn(3, 7), 10, "Result #3"); + a(i, 2, "Called #3"); + a(mfn(5, 8), 13, "Result B #2"); + a(i, 2, "Called B #2"); + + setTimeout(function () { + a(mfn(3, 7), 10, "Result: Wait"); + a(i, 2, "Called: Wait"); + a(mfn(5, 8), 13, "Result: Wait B"); + a(i, 2, "Called: Wait B"); + + setTimeout(function () { + a(mfn(3, 7), 10, "Result: Wait After"); + a(i, 3, "Called: Wait After"); + a(mfn(5, 8), 13, "Result: Wait After B"); + a(i, 4, "Called: Wait After B"); + + a(mfn(3, 7), 10, "Result: Wait After #2"); + a(i, 4, "Called: Wait After #2"); + a(mfn(5, 8), 13, "Result: Wait After B #2"); + a(i, 4, "Called: Wait After B #2"); + d(); + }, 100); + }, 20); + }, + Async: function (a, d) { + var mfn, fn, u = {}, i = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = memoize(fn, { async: true, primitive: true, maxAge: 100 }); + + a( + mfn(3, 7, function (err, res) { a.deep([err, res], [null, 10], "Result #1"); }), + u, "Initial" + ); + a( + mfn(3, 7, function (err, res) { a.deep([err, res], [null, 10], "Result #2"); }), + u, "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #1"); + }), + u, "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { a.deep([err, res], [null, 10], "Result #3"); }), + u, "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #2"); + }), + u, "Initial #3" + ); + + setTimeout(function () { + a(i, 2, "Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, "Again B: Initial" + ); + + setTimeout(function () { + a(i, 2, "Again Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, "Again B: Initial" + ); + + nextTick(function () { + a(i, 4, "Call After clear"); + d(); + }); + }, 100); + }, 20); + }, + Promise: function (a, d) { + var mfn, fn, i = 0; + fn = function (x, y, cb) { + return new Promise(function (res) { + ++i; + res(x + y); + }); + }; + + mfn = memoize(fn, { promise: true, primitive: true, maxAge: 100 }); + + mfn(3, 7).done(function (res) { a.deep(res, 10, "Result #1"); }); + mfn(3, 7).done(function (res) { a.deep(res, 10, "Result #2"); }); + mfn(5, 8).done(function (res) { a.deep(res, 13, "Result B #1"); }); + mfn(3, 7).done(function (res) { a.deep(res, 10, "Result #3"); }); + mfn(5, 8).done(function (res) { a.deep(res, 13, "Result B #2"); }); + + setTimeout(function () { + a(i, 2, "Called #2"); + + mfn(3, 7).done(function (res) { a.deep(res, 10, "Again: Result"); }); + mfn(5, 8).done(function (res) { a.deep(res, 13, "Again B: Result"); }); + + setTimeout(function () { + a(i, 2, "Again Called #2"); + + mfn(3, 7).done(function (res) { a.deep(res, 10, "Again: Result"); }); + mfn(5, 8).done(function (res) { a.deep(res, 13, "Again B: Result"); }); + + nextTick(function () { + a(i, 4, "Call After clear"); + d(); + }); + }, 100); + }, 20); + } + }, + Refetch: { + Default: function (a, d) { + var mfn, fn, i = 0; + fn = function (x, y) { + ++i; + return x + y; + }; + mfn = memoize(fn, { maxAge: 600, preFetch: true }); + + a(mfn(3, 7), 10, "Result #1"); + a(i, 1, "Called #1"); + a(mfn(3, 7), 10, "Result #2"); + a(i, 1, "Called #2"); + a(mfn(5, 8), 13, "Result B #1"); + a(i, 2, "Called B #1"); + a(mfn(3, 7), 10, "Result #3"); + a(i, 2, "Called #3"); + a(mfn(5, 8), 13, "Result B #2"); + a(i, 2, "Called B #2"); + + setTimeout(function () { + a(mfn(3, 7), 10, "Result: Wait"); + a(i, 2, "Called: Wait"); + a(mfn(5, 8), 13, "Result: Wait B"); + a(i, 2, "Called: Wait B"); + + setTimeout(function () { + a(mfn(3, 7), 10, "Result: Wait After"); + a(i, 2, "Called: Wait After"); + a(mfn(5, 8), 13, "Result: Wait After B"); + a(i, 2, "Called: Wait After B"); + + a(mfn(3, 7), 10, "Result: Wait After #2"); + a(i, 2, "Called: Wait After #2"); + a(mfn(5, 8), 13, "Result: Wait After B #2"); + a(i, 2, "Called: Wait After B #2"); + + setTimeout(function () { + a(i, 4, "Called: After Refetch: Before"); + a(mfn(3, 7), 10, "Result: After Refetch"); + a(i, 4, "Called: After Refetch: After"); + a(mfn(5, 8), 13, "Result: After Refetch B"); + a(i, 4, "Called: After Refetch B: After"); + + setTimeout(function () { + a(mfn(3, 7), 10, "Result: After Refetch #2"); + a(i, 4, "Called: After Refetch #2"); + a(mfn(5, 8), 13, "Result: After Refetch #2 B"); + a(i, 4, "Called: After Refetch #2 B"); + + a(mfn(3, 7), 10, "Result: After Refetch #3"); + a(i, 4, "Called: After Refetch #3"); + a(mfn(5, 8), 13, "Result: After Refetch #3 B"); + a(i, 4, "Called: After Refetch #3 B"); + d(); + }, 200); + }, 200); + }, 200); + }, 300); + }, + Async: function (a, d) { + var mfn, fn, i = 0; + fn = function (x, y, cb) { + ++i; + setTimeout(function () { cb(null, x + y); }, 0); + }; + mfn = memoize(fn, { maxAge: 600, preFetch: true, async: true }); + + // 1.Start + mfn(3, 7, function (err, result) { + a(result, 10, "Result #1"); + a(i, 1, "Called #1"); + mfn(3, 7, function (err, result) { + a(result, 10, "Result #2"); + a(i, 1, "Called #2"); + mfn(5, 8, function (err, result) { + a(result, 13, "Result B #1"); + a(i, 2, "Called B #1"); + mfn(3, 7, function (err, result) { + a(result, 10, "Result #3"); + a(i, 2, "Called #3"); + mfn(5, 8, function (err, result) { + a(result, 13, "Result B #2"); + a(i, 2, "Called B #2"); + // 2. Wait 300ms + setTimeout(function () { + // From cache, prefetch not triggered + mfn(3, 7, function (err, result) { + a(result, 10, "Result: Wait"); + a(i, 2, "Called: Wait"); + mfn(5, 8, function (err, result) { + a(result, 13, "Result: Wait B"); + a(i, 2, "Called: Wait B"); + // Wait 200ms + setTimeout(function () { + // From cache, prefetch triggered + mfn(3, 7, function (err, result) { + a(result, 10, "Result: Wait After"); + a(i, 2, "Called: Wait After"); + mfn(5, 8, function (err, result) { + a(result, 13, "Result: Wait After B"); + a(i, 3, "Called: Wait After B"); + mfn(3, 7, function (err, result) { + a( + result, 10, + "Result: Wait After #2" + ); + a(i, 4, "Called: Wait After #2"); + mfn(5, 8, function (err, result) { + a( + result, 13, + "Result: Wait After B #2" + ); + a( + i, 4, + "Called: Wait After B #2" + ); + // Wait 200ms + setTimeout(function () { + // From cache, prefetch not triggered + a( + i, 4, + "Called: After Refetch: Before" + ); + mfn(3, 7, function ( + err, + result + ) { + a( + result, 10, + "Result: After Refetch" + ); + a( + i, 4, + "Called: After Refetch: After" + ); + mfn(5, 8, function ( + err, + result + ) { + a( + result, 13, + "Result: After Refetch B" + ); + a( + i, 4, + "Called: After Refetch B: After" + ); + // Wait 250ms + setTimeout( + function () { + // From cache, prefetch triggered + mfn( + 3, + 7, + function ( + err, + result + ) { + a( + result, + 10, + "Result: After Refetch #2" + ); + a( + i, + 4, + "Called: After Refetch #2" + ); + mfn( + 5, + 8, + function ( + err, + result + ) { + a( + result, + 13, + "Result: After Refetch #2 B" + ); + a( + i, + 5, + "Called: After Refetch #2 B" + ); + mfn( + 3, + 7, + function ( + err, + result + ) { + a( + result, + 10, + "Result: After Refetch #3" + ); + a( + i, + 6, + "Called: After Refetch #3" + ); + mfn( + 5, + 8, + function ( + err, + result + ) { + a( + result, + 13, + "Result: After Refetch #3 B" + ); + a( + i, + 6, + "Called: After Refetch #3 B" + ); + d(); + } + ); + } + ); + } + ); + } + ); + }, + 250 + ); + }); + }); + }, 200); + }); + }); + }); + }); + }, 200); + }); + }); + }, 300); + }); + }); + }); + }); + }); + }, + Promise: function (a, d) { + var mfn, fn, i = 0; + fn = function (x, y) { + ++i; + return new Promise(function (res) { res(x + y); }); + }; + mfn = memoize(fn, { maxAge: 1200, preFetch: true, promise: true }); + + mfn(3, 7).done(function (result) { + a(result, 10, "Result #1"); + a(i, 1, "Called #1"); + mfn(3, 7).done(function (result) { + a(result, 10, "Result #2"); + a(i, 1, "Called #2"); + mfn(5, 8).done(function (result) { + a(result, 13, "Result B #1"); + a(i, 2, "Called B #1"); + mfn(3, 7).done(function (result) { + a(result, 10, "Result #3"); + a(i, 2, "Called #3"); + mfn(5, 8).done(function (result) { + a(result, 13, "Result B #2"); + a(i, 2, "Called B #2"); + // 600 + setTimeout(function () { + mfn(3, 7).done(function (result) { + a(result, 10, "Result: Wait"); + a(i, 2, "Called: Wait"); + mfn(5, 8).done(function (result) { + a(result, 13, "Result: Wait B"); + a(i, 2, "Called: Wait B"); + // 400 + setTimeout(function () { + mfn(3, 7).done( + // 0 + delay(function (result) { + a(result, 10, "Result: Wait After"); + a(i, 3, "Called: Wait After"); + mfn(5, 8).done( + // 0 + delay(function (result) { + a( + result, 13, + "Result: Wait After B" + ); + a(i, 4, "Called: Wait After B"); + mfn(3, 7).done( + // next tick + delay(function (result) { + a( + result, 10, + "Result: Wait After #2" + ); + a( + i, 4, + "Called: Wait After #2" + ); + mfn(5, 8).done( + function (result) { + a( + result, 13, + "Result: Wait After B #2" + ); + a( + i, 4, + "Called: Wait After B #2" + ); + // 400 + setTimeout( + function () { + a( + i, + 4, + "Called: After Refetch: Before" + ); + mfn( + 3, 7 + ).done( + function ( + result + ) { + a( + result, + 10, + "Result: After Refetch" + ); + a( + i, + 4, + "Called: After Refetch: After" + ); + mfn( + 5, + 8 + ).done( + function ( + result + ) { + a( + result, + 13, + "Result: After Refetch B" + ); + a( + i, + 4, + "Called: After Refetch B: After" + ); + // 400 + setTimeout( + function () { + mfn( + 3, + 7 + ).done( + // 0 + delay( + function ( + result + ) { + a( + result, + 10, + "Result: After Refetch #2" + ); + a( + i, + 5, + "Called: After Refetch #2" + ); + mfn( + 5, + 8 + ).done( + // 0 + delay( + function ( + result + ) { + a( + result, + 13, + "Result: After Refetch #2 B" + ); + a( + i, + 6, + "Called: After Refetch #2 B" + ); + mfn( + 3, + 7 + ).done( + function ( + result + ) { + a( + result, + 10, + "Result: After Refetch #3" + ); + a( + i, + 6, + "Called: After Refetch #3" + ); + mfn( + 5, + 8 + ).done( + function ( + result + ) { + a( + result, + 13, + "Result: After Refetch #3 B" + ); + a( + i, + 6, + "Called: After Refetch #3 B" + ); + d(); + } + ); + } + ); + }, + 0 + ) + ); + }, + 0 + ) + ); + }, + 400 + ); + } + ); + } + ); + }, + 400 + ); + } + ); + }) + ); + }, 0) + ); + }, 0) + ); + }, 400); + }); + }); + }, 600); + }); + }); + }); + }); + }); + }, + Custom: function (a, d) { + var mfn, fn, i = 0; + fn = function (x, y) { + ++i; + return x + y; + }; + mfn = memoize(fn, { maxAge: 6000, preFetch: 1 / 6 }); + a(mfn(3, 7), 10, "Result #1"); + a(i, 1, "Called #1"); + a(mfn(3, 7), 10, "Result #2"); + a(i, 1, "Called #2"); + a(mfn(5, 8), 13, "Result B #1"); + a(i, 2, "Called B #1"); + a(mfn(3, 7), 10, "Result #3"); + a(i, 2, "Called #3"); + a(mfn(5, 8), 13, "Result B #2"); + a(i, 2, "Called B #2"); + + setTimeout(function () { + a(mfn(3, 7), 10, "Result: Wait"); + a(i, 2, "Called: Wait"); + a(mfn(5, 8), 13, "Result: Wait B"); + a(i, 2, "Called: Wait B"); + + setTimeout(function () { + a(mfn(3, 7), 10, "Result: Wait After"); + a(i, 2, "Called: Wait After"); + a(mfn(5, 8), 13, "Result: Wait After B"); + a(i, 2, "Called: Wait After B"); + + a(mfn(3, 7), 10, "Result: Wait After #2"); + a(i, 2, "Called: Wait After #2"); + a(mfn(5, 8), 13, "Result: Wait After B #2"); + a(i, 2, "Called: Wait After B #2"); + + setTimeout(function () { + a(i, 4, "Called: After Refetch: Before"); + a(mfn(3, 7), 10, "Result: After Refetch"); + a(i, 4, "Called: After Refetch: After"); + a(mfn(5, 8), 13, "Result: After Refetch B"); + a(i, 4, "Called: After Refetch B: After"); + + setTimeout(function () { + a(mfn(3, 7), 10, "Result: After Refetch #2"); + a(i, 4, "Called: After Refetch #2"); + a(mfn(5, 8), 13, "Result: After Refetch #2 B"); + a(i, 4, "Called: After Refetch #2 B"); + + a(mfn(3, 7), 10, "Result: After Refetch #3"); + a(i, 4, "Called: After Refetch #3"); + a(mfn(5, 8), 13, "Result: After Refetch #3 B"); + a(i, 4, "Called: After Refetch #3 B"); + d(); + }, 2000); + }, 3000); + }, 1000); + }, 4500); + } + } + }; +}; diff --git a/node_modules/memoizee/test/ext/max.js b/node_modules/memoizee/test/ext/max.js new file mode 100644 index 00000000..c9d9cd1c --- /dev/null +++ b/node_modules/memoizee/test/ext/max.js @@ -0,0 +1,1677 @@ +/* eslint id-length: 0, max-lines: 0, max-statements: 0, max-nested-callbacks: 0, no-shadow: 0, max-len: 0 */ + +"use strict"; + +var memoize = require("../..") + , nextTick = require("next-tick") + , delay = require("timers-ext/delay") + , Promise = require("plain-promise"); + +module.exports = function () { + return { + Regular: { + Sync: function (a) { + var mfn, + fn, + i = 0; + fn = function (x, y) { + ++i; + return x + y; + }; + mfn = memoize(fn, { max: 3 }); + + a(mfn(3, 7), 10, "Result #1"); + a(i, 1, "Called #1"); + a(mfn(3, 7), 10, "Result #2"); + a(i, 1, "Called #2"); + a(mfn(5, 8), 13, "Result B #1"); + a(i, 2, "Called B #1"); + a(mfn(3, 7), 10, "Result #3"); + a(i, 2, "Called #3"); + a(mfn(5, 8), 13, "Result B #2"); + a(i, 2, "Called B #2"); + a(mfn(12, 4), 16, "Result C #1"); + a(i, 3, "Called C #1"); + a(mfn(3, 7), 10, "Result #4"); + a(i, 3, "Called #4"); + a(mfn(5, 8), 13, "Result B #3"); + a(i, 3, "Called B #3"); + + a(mfn(77, 11), 88, "Result D #1"); // Delete 12, 4 + a(i, 4, "Called D #1"); + a(mfn(5, 8), 13, "Result B #4"); + a(i, 4, "Called B #4"); + a(mfn(12, 4), 16, "Result C #2"); // Delete 3, 7 + a(i, 5, "Called C #2"); + + a(mfn(3, 7), 10, "Result #5"); // Delete 77, 11 + a(i, 6, "Called #5"); + a(mfn(77, 11), 88, "Result D #2"); // Delete 5, 8 + a(i, 7, "Called D #2"); + a(mfn(12, 4), 16, "Result C #3"); + a(i, 7, "Called C #3"); + + a(mfn(5, 8), 13, "Result B #5"); // Delete 3, 7 + a(i, 8, "Called B #5"); + + a(mfn(77, 11), 88, "Result D #3"); + a(i, 8, "Called D #3"); + + mfn.delete(77, 11); + a(mfn(77, 11), 88, "Result D #4"); + a(i, 9, "Called D #4"); + + mfn.clear(); + a(mfn(5, 8), 13, "Result B #6"); + a(i, 10, "Called B #6"); + a(mfn(77, 11), 88, "Result D #5"); + a(i, 11, "Called D #5"); + }, + Async: function (a, d) { + var mfn, + fn, + u = {}, + i = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = memoize(fn, { async: true, max: 3 }); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #1"); + a(i, 1, "Called #1"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #2"); + a(i, 1, "Called #2"); + + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #1"); + a(i, 2, "Called B #1"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #3"); + a(i, 2, "Called #3"); + + a( + mfn(5, 8, function (err, res) { + a.deep( + [err, res], + [null, 13], + "Result B #2" + ); + a(i, 2, "Called B #2"); + + a( + mfn(12, 4, function (err, res) { + a.deep( + [err, res], + [null, 16], + "Result C #1" + ); + a(i, 3, "Called C #1"); + + a( + mfn(3, 7, function (err, res) { + a.deep( + [err, res], + [null, 10], + "Result #4" + ); + a(i, 3, "Called #4"); + + a( + mfn(5, 8, function ( + err, + res + ) { + a.deep( + [err, res], + [null, 13], + "Result B #3" + ); + a( + i, + 3, + "Called B #3" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #1" + ); + a( + i, + 4, + "Called D #1" + ); + + a( + mfn( + 5, + 8, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 13 + ], + "Result B #4" + ); + a( + i, + 4, + "Called B #4" + ); + + a( + mfn( + 12, + 4, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 16 + ], + "Result C #2" + ); + a( + i, + 5, + "Called C #2" + ); + + a( + mfn( + 3, + 7, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 10 + ], + "Result #5" + ); + a( + i, + 6, + "Called #5" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #2" + ); + a( + i, + 7, + "Called D #2" + ); + + a( + mfn( + 12, + 4, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 16 + ], + "Result C #3" + ); + a( + i, + 7, + "Called C #3" + ); + + a( + mfn( + 5, + 8, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 13 + ], + "Result B #5" + ); + a( + i, + 8, + "Called B #5" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #3" + ); + a( + i, + 8, + "Called D #3" + ); + + mfn.delete( + 77, + 11 + ); + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #4" + ); + a( + i, + 9, + "Called D #4" + ); + + mfn.clear(); + a( + mfn( + 5, + 8, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 13 + ], + "Result B #6" + ); + a( + i, + 10, + "Called B #6" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #5" + ); + a( + i, + 11, + "Called D #5" + ); + + d(); + } + ), + u, + "Initial D #5" + ); + } + ), + u, + "Initial B #6" + ); + } + ), + u, + "Initial D #4" + ); + } + ), + u, + "Initial D #3" + ); + } + ), + u, + "Initial B #5" + ); + } + ), + u, + "Initial C #3" + ); + } + ), + u, + "Initial D #2" + ); + } + ), + u, + "Initial #5" + ); + } + ), + u, + "Initial C #2" + ); + } + ), + u, + "Initial B #4" + ); + } + ), + u, + "Initial D #1" + ); + }), + u, + "Initial B #3" + ); + }), + u, + "Initial #4" + ); + }), + u, + "Initial C #1" + ); + }), + u, + "Initial B #2" + ); + }), + u, + "Initial #3" + ); + }), + u, + "Initial B #1" + ); + }), + u, + "Initial #2" + ); + }), + u, + "Initial #1" + ); + }, + Promise: function (a, d) { + var mfn, + fn, + i = 0; + fn = function (x, y) { + ++i; + return new Promise(function (res) { + res(x + y); + }); + }; + + mfn = memoize(fn, { promise: true, max: 3 }); + + mfn(3, 7).done( + delay(function (res) { + // [3,7] + a(res, 10, "Result #1"); + a(i, 1, "Called #1"); + + mfn(3, 7).done( + delay(function (res) { + a(res, 10, "Result #2"); + a(i, 1, "Called #2"); + + mfn(5, 8).done( + delay(function (res) { + // [3,7], [5,8] + a(res, 13, "Result B #1"); + a(i, 2, "Called B #1"); + + mfn(3, 7).done( + delay(function (res) { + // [5,8], [3, 7] + a(res, 10, "Result #3"); + a(i, 2, "Called #3"); + + mfn(5, 8).done( + delay(function (res) { + // [3,7], [5,8] + a(res, 13, "Result B #2"); + a(i, 2, "Called B #2"); + + mfn(12, 4).done( + delay(function (res) { + // [3,7], [5,8], [12, 4] + a(res, 16, "Result C #1"); + a(i, 3, "Called C #1"); + + mfn(3, 7).done( + delay(function (res) { + // [5,8], [12, 4], [3, 7] + a(res, 10, "Result #4"); + a(i, 3, "Called #4"); + + mfn(5, 8).done( + delay(function (res) { + // [12, 4], [3, 7], [5, 8] + a( + res, + 13, + "Result B #3" + ); + a( + i, + 3, + "Called B #3" + ); + + mfn(77, 11).done( + delay(function ( + res + ) { + // [3, 7], [5, 8], [77, 11] + a( + res, + 88, + "Result D #1" + ); + a( + i, + 4, + "Called D #1" + ); + + mfn( + 5, + 8 + ).done( + delay( + function ( + res + ) { + // [3, 7], [77, 11], [5, 8] + a( + res, + 13, + "Result B #4" + ); + a( + i, + 4, + "Called B #4" + ); + + mfn( + 12, + 4 + ).done( + delay( + function ( + res + ) { + // [77, 11], [5, 8], [12, 4] + a( + res, + 16, + "Result C #2" + ); + a( + i, + 5, + "Called C #2" + ); + + mfn( + 3, + 7 + ).done( + delay( + function ( + res + ) { + a( + res, + 10, + "Result #5" + ); + a( + i, + 6, + "Called #5" + ); + + mfn( + 77, + 11 + ).done( + delay( + function ( + res + ) { + a( + res, + 88, + "Result D #2" + ); + a( + i, + 7, + "Called D #2" + ); + + mfn( + 12, + 4 + ).done( + delay( + function ( + res + ) { + a( + res, + 16, + "Result C #3" + ); + a( + i, + 7, + "Called C #3" + ); + + mfn( + 5, + 8 + ).done( + delay( + function ( + res + ) { + a( + res, + 13, + "Result B #5" + ); + a( + i, + 8, + "Called B #5" + ); + + mfn( + 77, + 11 + ).done( + delay( + function ( + res + ) { + a( + res, + 88, + "Result D #3" + ); + a( + i, + 8, + "Called D #3" + ); + + mfn.delete( + 77, + 11 + ); + mfn( + 77, + 11 + ).done( + delay( + function ( + res + ) { + a( + res, + 88, + "Result D #4" + ); + a( + i, + 9, + "Called D #4" + ); + + mfn.clear(); + mfn( + 5, + 8 + ).done( + delay( + function ( + res + ) { + a( + res, + 13, + "Result B #6" + ); + a( + i, + 10, + "Called B #6" + ); + + mfn( + 77, + 11 + ).done( + delay( + function ( + res + ) { + a( + res, + 88, + "Result D #5" + ); + a( + i, + 11, + "Called D #5" + ); + + d(); + } + ) + ); + } + ) + ); + } + ) + ); + } + ) + ); + } + ) + ); + } + ) + ); + } + ) + ); + } + ) + ); + } + ) + ); + } + ) + ); + }) + ); + }) + ); + }) + ); + }) + ); + }) + ); + }) + ); + }) + ); + }) + ); + }) + ); + } + }, + Primitive: { + Sync: function (a) { + var mfn, + fn, + i = 0; + fn = function (x, y) { + ++i; + return x + y; + }; + mfn = memoize(fn, { primitive: true, max: 3 }); + + a(mfn(3, 7), 10, "Result #1"); + a(i, 1, "Called #1"); + a(mfn(3, 7), 10, "Result #2"); + a(i, 1, "Called #2"); + a(mfn(5, 8), 13, "Result B #1"); + a(i, 2, "Called B #1"); + a(mfn(3, 7), 10, "Result #3"); + a(i, 2, "Called #3"); + a(mfn(5, 8), 13, "Result B #2"); + a(i, 2, "Called B #2"); + a(mfn(12, 4), 16, "Result C #1"); + a(i, 3, "Called C #1"); + a(mfn(3, 7), 10, "Result #4"); + a(i, 3, "Called #4"); + a(mfn(5, 8), 13, "Result B #3"); + a(i, 3, "Called B #3"); + + a(mfn(77, 11), 88, "Result D #1"); // Delete 12, 4 + a(i, 4, "Called D #1"); + a(mfn(5, 8), 13, "Result B #4"); + a(i, 4, "Called B #4"); + a(mfn(12, 4), 16, "Result C #2"); // Delete 3, 7 + a(i, 5, "Called C #2"); + + a(mfn(3, 7), 10, "Result #5"); // Delete 77, 11 + a(i, 6, "Called #5"); + a(mfn(77, 11), 88, "Result D #2"); // Delete 5, 8 + a(i, 7, "Called D #2"); + a(mfn(12, 4), 16, "Result C #3"); + a(i, 7, "Called C #3"); + + a(mfn(5, 8), 13, "Result B #5"); // Delete 3, 7 + a(i, 8, "Called B #5"); + + a(mfn(77, 11), 88, "Result D #3"); + a(i, 8, "Called D #3"); + + mfn.delete(77, 11); + a(mfn(77, 11), 88, "Result D #4"); + a(i, 9, "Called D #4"); + + mfn.clear(); + a(mfn(5, 8), 13, "Result B #6"); + a(i, 10, "Called B #6"); + a(mfn(77, 11), 88, "Result D #5"); + a(i, 11, "Called D #5"); + }, + Async: function (a, d) { + var mfn, + fn, + u = {}, + i = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = memoize(fn, { async: true, primitive: true, max: 3 }); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #1"); + a(i, 1, "Called #1"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #2"); + a(i, 1, "Called #2"); + + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #1"); + a(i, 2, "Called B #1"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #3"); + a(i, 2, "Called #3"); + + a( + mfn(5, 8, function (err, res) { + a.deep( + [err, res], + [null, 13], + "Result B #2" + ); + a(i, 2, "Called B #2"); + + a( + mfn(12, 4, function (err, res) { + a.deep( + [err, res], + [null, 16], + "Result C #1" + ); + a(i, 3, "Called C #1"); + + a( + mfn(3, 7, function (err, res) { + a.deep( + [err, res], + [null, 10], + "Result #4" + ); + a(i, 3, "Called #4"); + + a( + mfn(5, 8, function ( + err, + res + ) { + a.deep( + [err, res], + [null, 13], + "Result B #3" + ); + a( + i, + 3, + "Called B #3" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #1" + ); + a( + i, + 4, + "Called D #1" + ); + + a( + mfn( + 5, + 8, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 13 + ], + "Result B #4" + ); + a( + i, + 4, + "Called B #4" + ); + + a( + mfn( + 12, + 4, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 16 + ], + "Result C #2" + ); + a( + i, + 5, + "Called C #2" + ); + + a( + mfn( + 3, + 7, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 10 + ], + "Result #5" + ); + a( + i, + 6, + "Called #5" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #2" + ); + a( + i, + 7, + "Called D #2" + ); + + a( + mfn( + 12, + 4, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 16 + ], + "Result C #3" + ); + a( + i, + 7, + "Called C #3" + ); + + a( + mfn( + 5, + 8, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 13 + ], + "Result B #5" + ); + a( + i, + 8, + "Called B #5" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #3" + ); + a( + i, + 8, + "Called D #3" + ); + + mfn.delete( + 77, + 11 + ); + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #4" + ); + a( + i, + 9, + "Called D #4" + ); + + mfn.clear(); + a( + mfn( + 5, + 8, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 13 + ], + "Result B #6" + ); + a( + i, + 10, + "Called B #6" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #5" + ); + a( + i, + 11, + "Called D #5" + ); + + d(); + } + ), + u, + "Initial D #5" + ); + } + ), + u, + "Initial B #6" + ); + } + ), + u, + "Initial D #4" + ); + } + ), + u, + "Initial D #3" + ); + } + ), + u, + "Initial B #5" + ); + } + ), + u, + "Initial C #3" + ); + } + ), + u, + "Initial D #2" + ); + } + ), + u, + "Initial #5" + ); + } + ), + u, + "Initial C #2" + ); + } + ), + u, + "Initial B #4" + ); + } + ), + u, + "Initial D #1" + ); + }), + u, + "Initial B #3" + ); + }), + u, + "Initial #4" + ); + }), + u, + "Initial C #1" + ); + }), + u, + "Initial B #2" + ); + }), + u, + "Initial #3" + ); + }), + u, + "Initial B #1" + ); + }), + u, + "Initial #2" + ); + }), + u, + "Initial #1" + ); + }, + Promise: function (a, d) { + var mfn, + fn, + i = 0; + fn = function (x, y) { + ++i; + return new Promise(function (res) { + res(x + y); + }); + }; + + mfn = memoize(fn, { promise: true, primitive: true, max: 3 }); + + mfn(3, 7).done( + delay(function (res) { + a(res, 10, "Result #1"); + a(i, 1, "Called #1"); + + mfn(3, 7).done( + delay(function (res) { + a(res, 10, "Result #2"); + a(i, 1, "Called #2"); + + mfn(5, 8).done( + delay(function (res) { + a(res, 13, "Result B #1"); + a(i, 2, "Called B #1"); + + mfn(3, 7).done( + delay(function (res) { + a(res, 10, "Result #3"); + a(i, 2, "Called #3"); + + mfn(5, 8).done( + delay(function (res) { + a(res, 13, "Result B #2"); + a(i, 2, "Called B #2"); + + mfn(12, 4).done( + delay(function (res) { + a(res, 16, "Result C #1"); + a(i, 3, "Called C #1"); + + mfn(3, 7).done( + delay(function (res) { + a(res, 10, "Result #4"); + a(i, 3, "Called #4"); + + mfn(5, 8).done( + delay(function (res) { + a( + res, + 13, + "Result B #3" + ); + a( + i, + 3, + "Called B #3" + ); + + mfn(77, 11).done( + delay(function ( + res + ) { + a( + res, + 88, + "Result D #1" + ); + a( + i, + 4, + "Called D #1" + ); + + mfn( + 5, + 8 + ).done( + delay( + function ( + res + ) { + a( + res, + 13, + "Result B #4" + ); + a( + i, + 4, + "Called B #4" + ); + + mfn( + 12, + 4 + ).done( + delay( + function ( + res + ) { + a( + res, + 16, + "Result C #2" + ); + a( + i, + 5, + "Called C #2" + ); + + mfn( + 3, + 7 + ).done( + delay( + function ( + res + ) { + a( + res, + 10, + "Result #5" + ); + a( + i, + 6, + "Called #5" + ); + + mfn( + 77, + 11 + ).done( + delay( + function ( + res + ) { + a( + res, + 88, + "Result D #2" + ); + a( + i, + 7, + "Called D #2" + ); + + mfn( + 12, + 4 + ).done( + delay( + function ( + res + ) { + a( + res, + 16, + "Result C #3" + ); + a( + i, + 7, + "Called C #3" + ); + + mfn( + 5, + 8 + ).done( + delay( + function ( + res + ) { + a( + res, + 13, + "Result B #5" + ); + a( + i, + 8, + "Called B #5" + ); + + mfn( + 77, + 11 + ).done( + delay( + function ( + res + ) { + a( + res, + 88, + "Result D #3" + ); + a( + i, + 8, + "Called D #3" + ); + + mfn.delete( + 77, + 11 + ); + mfn( + 77, + 11 + ).done( + delay( + function ( + res + ) { + a( + res, + 88, + "Result D #4" + ); + a( + i, + 9, + "Called D #4" + ); + + mfn.clear(); + mfn( + 5, + 8 + ).done( + delay( + function ( + res + ) { + a( + res, + 13, + "Result B #6" + ); + a( + i, + 10, + "Called B #6" + ); + + mfn( + 77, + 11 + ).done( + delay( + function ( + res + ) { + a( + res, + 88, + "Result D #5" + ); + a( + i, + 11, + "Called D #5" + ); + + d(); + } + ) + ); + } + ) + ); + } + ) + ); + } + ) + ); + } + ) + ); + } + ) + ); + } + ) + ); + } + ) + ); + } + ) + ); + } + ) + ); + }) + ); + }) + ); + }) + ); + }) + ); + }) + ); + }) + ); + }) + ); + }) + ); + }) + ); + } + } + }; +}; diff --git a/node_modules/memoizee/test/ext/promise.js b/node_modules/memoizee/test/ext/promise.js new file mode 100644 index 00000000..2f78c9a8 --- /dev/null +++ b/node_modules/memoizee/test/ext/promise.js @@ -0,0 +1,326 @@ +/* eslint id-length: 0, handle-callback-err: 0, no-undef: 0, no-unused-vars: 0, func-names: 0, +max-lines: 0 */ + +"use strict"; + +var memoize = require("../..") + , nextTick = require("next-tick") + , Promise = require("plain-promise") + , Bluebird = require("bluebird"); + +Bluebird.config({ + cancellation: true +}); + +module.exports = function () { + return { + "Regular": { + Success: function (a, d) { + var mfn, fn, i = 0, invoked = 0; + fn = function (x, y) { + return new Promise(function (res) { + ++i; + res(x + y); + }); + }; + + mfn = memoize(fn, { promise: true }); + + mfn(3, 7).done(function (res) { + ++invoked; + a(res, 10, "Result #1"); + }, a.never); + + mfn(3, 7).done(function (res) { + ++invoked; + a(res, 10, "Result #2"); + }, a.never); + + mfn(5, 8).done(function (res) { + ++invoked; + a(res, 13, "Result B #1"); + }, a.never); + + mfn(3, 7).done(function (res) { + ++invoked; + a(res, 10, "Result #3"); + }, a.never); + + mfn(5, 8).done(function (res) { + ++invoked; + a(res, 13, "Result B #2"); + }, a.never); + + setTimeout(function () { + a(i, 2, "Init Called"); + a(invoked, 5, "Cb Called"); + + mfn(3, 7).done(function (res) { + ++invoked; + a(res, 10, "Again: Result"); + }, a.never); + + mfn(5, 8).done(function (res) { + ++invoked; + a(res, 13, "Again B: Result"); + }, a.never); + + setTimeout(function () { + a(i, 2, "Init Called #2"); + a(invoked, 7, "Cb Called #2"); + + mfn.delete(3, 7); + + mfn(3, 7).done(function (res) { + ++invoked; + a(res, 10, "Again: Result"); + }, a.never); + + mfn(5, 8).done(function (res) { + ++invoked; + a(res, 13, "Again B: Result"); + }, a.never); + + setTimeout(function () { + a(i, 3, "Init After delete"); + a(invoked, 9, "Cb After delete"); + d(); + }, 10); + }, 10); + }, 10); + }, + Error: function (a, d) { + var mfn, fn, i = 0, e = new Error("Test"); + fn = function (x, y) { + ++i; + return new Promise(function (res, rej) { rej(e); }); + }; + + mfn = memoize(fn, { promise: "done", dispose: a.never }); + + mfn(3, 7).done(a.never, function (err) { a(err, e, "Result #1"); }); + + mfn(5, 8).done(a.never, function (err) { a(err, e, "Result B #2"); }); + + setTimeout(function () { + a(i, 2, "Called #2"); + + mfn(3, 7).done(a.never, function (err) { a(err, e, "Again: Result"); }); + + mfn(5, 8).done(a.never, function (err) { a(err, e, "Again B: Result"); }); + + setTimeout(function (err) { + a(i, 4, "Again Called #2"); + d(); + }, 10); + }, 10); + } + }, + "Cancellation": { + Immediate: function (a, d) { + var mfn, fn, i = 0; + fn = function (x, y) { + ++i; + var p = new Bluebird(function (res) { + setTimeout(function () { + res(x + y); + }, 100); + }); + p.cancel(); + return p; + }; + + mfn = memoize(fn, { promise: true }); + + mfn(3, 7).done(a.never, function (err) { + a.throws(function () { + throw err; + }, Bluebird.CancellationError, "Result #1"); + }); + + mfn(5, 8).done(a.never, function (err) { + a.throws(function () { + throw err; + }, Bluebird.CancellationError, "Result B #2"); + }); + + setTimeout(function () { + a(i, 2, "Called #2"); + + mfn(3, 7).done(a.never, function (err) { + a.throws(function () { + throw err; + }, Bluebird.CancellationError, "Again: Result"); + }); + + mfn(5, 8).done(a.never, function (err) { + a.throws(function () { + throw err; + }, Bluebird.CancellationError, "Again B: Result"); + }); + + setTimeout(function (err) { + a(i, 4, "Again Called #2"); + d(); + }, 10); + }, 10); + }, + Delayed: function (a, d) { + var mfn, fn, i = 0; + fn = function (x, y) { + ++i; + var p = new Bluebird(function (res) { + setTimeout(function () { + res(x + y); + }, 100); + }); + nextTick(function () { + p.cancel(); + }, 1); + return p; + }; + + mfn = memoize(fn, { promise: true }); + + mfn(3, 7).done(a.never, a.never); + + mfn(5, 8).done(a.never, a.never); + + setTimeout(function () { + a(i, 2, "Called #2"); + + mfn(3, 7).done(a.never, a.never); + + mfn(5, 8).done(a.never, a.never); + + setTimeout(function (err) { + a(i, 4, "Again Called #2"); + d(); + }, 500); + }, 500); + } + }, + "Primitive": { + "Success": function (a, d) { + var mfn, fn, i = 0; + fn = function (x, y) { + return new Promise(function (res) { + ++i; + res(x + y); + }); + }; + + mfn = memoize(fn, { promise: true, primitive: true }); + + mfn(3, 7).done(function (res) { a(res, 10, "Result #1"); }, a.never); + + mfn(3, 7).done(function (res) { a(res, 10, "Result #2"); }, a.never); + + mfn(5, 8).done(function (res) { a(res, 13, "Result B #1"); }, a.never); + + mfn(3, 7).done(function (res) { a(res, 10, "Result #3"); }, a.never); + + mfn(5, 8).done(function (res) { a(res, 13, "Result B #2"); }, a.never); + + setTimeout(function () { + a(i, 2, "Called #2"); + + mfn(3, 7).done(function (res) { a(res, 10, "Again: Result"); }, a.never); + + mfn(5, 8).done(function (res) { a(res, 13, "Again B: Result"); }, a.never); + + setTimeout(function () { + a(i, 2, "Again Called #2"); + + mfn.delete(3, 7); + + mfn(3, 7).done(function (res) { a(res, 10, "Again: Result"); }, a.never); + + mfn(5, 8).done(function (res) { a(res, 13, "Again B: Result"); }, a.never); + + setTimeout(function () { + a(i, 3, "Call After delete"); + d(); + }, 10); + }, 10); + }, 10); + }, + "Error": function (a, d) { + var mfn, fn, i = 0, e = new Error("Test"); + fn = function (x, y) { + return new Promise(function (res, rej) { + ++i; + rej(e); + }); + }; + + mfn = memoize(fn, { promise: "done", primitive: true }); + + mfn(3, 7).done(a.never, function (err) { a(err, e, "Result #1"); }); + + mfn(5, 8).done(a.never, function (err) { a(err, e, "Result B #2"); }); + + setTimeout(function () { + a(i, 2, "Called #2"); + + mfn(3, 7).done(a.never, function (err) { a(err, e, "Again: Result"); }); + + mfn(5, 8).done(a.never, function (err) { a(err, e, "Again B: Result"); }); + + setTimeout(function (err) { + a(i, 4, "Again Called #2"); + d(); + }, 10); + }, 10); + }, + "Primitive null arg case": function (a, d) { + var mfn, x = {}; + mfn = memoize( + function f(id) { + return new Promise(function (res) { res(x); }); + }, + { promise: true, primitive: true } + ); + + mfn(null).done(function (res) { + a.deep(res, x, "Args"); + d(); + }, a.never); + } + }, + "Sync Clear": function (a, d) { + var mfn, fn; + fn = function (x) { + return new Promise(function (res) { + nextTick(function () { res(x); }); + }); + }; + + mfn = memoize(fn, { promise: true }); + + mfn(1).done(function (res) { a(res, 1, "First"); }, a.never); + + mfn(2).done(function (res) { + a(res, 2, "Second"); + d(); + }, a.never); + }, + "Sync Clear: Primitive": function (a, d) { + var mfn, fn; + fn = function (x) { + return new Promise(function (res) { + nextTick(function () { res(x); }); + }); + }; + + mfn = memoize(fn, { promise: true, primitive: true }); + + mfn(1).done(function (res) { a(res, 1, "First"); }, a.never); + + mfn(2).done(function (res) { + a(res, 2, "Second"); + d(); + }, a.never); + } + }; +}; diff --git a/node_modules/memoizee/test/ext/ref-counter.js b/node_modules/memoizee/test/ext/ref-counter.js new file mode 100644 index 00000000..d5fb19aa --- /dev/null +++ b/node_modules/memoizee/test/ext/ref-counter.js @@ -0,0 +1,302 @@ +/* eslint max-lines: 0, id-length: 0, no-undef: 0 */ + +"use strict"; + +var memoize = require("../..") + , nextTick = require("next-tick") + , Promise = require("plain-promise"); + +module.exports = function () { + return { + "Regular": function (a) { + var i = 0 + , fn = function (x, y, z) { + ++i; + return x + y + z; + } + , mfn; + mfn = memoize(fn, { refCounter: true }); + a(mfn.deleteRef(3, 5, 7), null, "Delete before"); + a(mfn(3, 5, 7), 15, "Initial"); + a(mfn(3, 5, 7), 15, "Cache"); + a(mfn.deleteRef(3, 5, 7), false, "Delete #1"); + mfn(3, 5, 7); + a(mfn.deleteRef(3, 5, 7), false, "Delete #2"); + mfn(3, 5, 7); + a(mfn.deleteRef(3, 5, 7), false, "Delete #3"); + mfn(3, 5, 7); + a(i, 1, "Not deleteed"); + a(mfn.deleteRef(3, 5, 7), false, "Delete #4"); + a(mfn.deleteRef(3, 5, 7), true, "Delete final"); + mfn(3, 5, 7); + a(i, 2, "Restarted"); + mfn(3, 5, 7); + a(i, 2, "Cached again"); + }, + "Regular: Async": function (a, d) { + var mfn, fn, u = {}, i = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = memoize(fn, { async: true, refCounter: true }); + + a(mfn.deleteRef(3, 7), null, "Delete ref before"); + + a( + mfn(3, 7, function (err, res) { a.deep([err, res], [null, 10], "Result #1"); }), u, + "Initial" + ); + a( + mfn(3, 7, function (err, res) { a.deep([err, res], [null, 10], "Result #2"); }), u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { a.deep([err, res], [null, 13], "Result B #1"); }), + u, "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { a.deep([err, res], [null, 10], "Result #3"); }), u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { a.deep([err, res], [null, 13], "Result B #2"); }), + u, "Initial #3" + ); + + nextTick(function () { + a(i, 2, "Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, "Again B: Initial" + ); + + nextTick(function () { + a(i, 2, "Again Called #2"); + + a(mfn.deleteRef(3, 7), false, "Delete ref #1"); + a(mfn.deleteRef(3, 7), false, "Delete ref #2"); + a(mfn.deleteRef(3, 7), false, "Delete ref #3"); + a(mfn.deleteRef(3, 7), true, "Delete ref Final"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, "Again B: Initial" + ); + + nextTick(function () { + a(i, 3, "Call After delete"); + d(); + }); + }); + }); + }, + "Regular: Promise": function (a, d) { + var mfn, fn, i = 0; + fn = function (x, y) { + ++i; + return new Promise(function (res) { res(x + y); }); + }; + + mfn = memoize(fn, { promise: true, refCounter: true }); + + a(mfn.deleteRef(3, 7), null, "Delete ref before"); + + mfn(3, 7).done(function (res) { a(res, 10, "Result #1"); }); + mfn(3, 7).done(function (res) { a(res, 10, "Result #2"); }); + mfn(5, 8).done(function (res) { a(res, 13, "Result B #1"); }); + mfn(3, 7).done(function (res) { a(res, 10, "Result #3"); }); + mfn(5, 8).done(function (res) { a(res, 13, "Result B #2"); }); + + setTimeout(function () { + a(i, 2, "Called #2"); + + mfn(3, 7).done(function (res) { a(res, 10, "Again: Result"); }); + mfn(5, 8).done(function (res) { a(res, 13, "Again B: Result"); }); + + setTimeout(function () { + a(i, 2, "Again Called #2"); + + a(mfn.deleteRef(3, 7), false, "Delete ref #1"); + a(mfn.deleteRef(3, 7), false, "Delete ref #2"); + a(mfn.deleteRef(3, 7), false, "Delete ref #3"); + a(mfn.deleteRef(3, 7), true, "Delete ref Final"); + + mfn(3, 7).done(function (res) { a(res, 10, "Again: Result"); }); + mfn(5, 8).done(function (res) { a(res, 13, "Again B: Result"); }); + + setTimeout(function () { + a(i, 3, "Call After delete"); + d(); + }, 10); + }, 10); + }, 10); + }, + "Primitive": function (a) { + var i = 0 + , fn = function (x, y, z) { + ++i; + return x + y + z; + } + , mfn; + mfn = memoize(fn, { primitive: true, refCounter: true }); + a(mfn.deleteRef(3, 5, 7), null, "Delete before"); + a(mfn(3, 5, 7), 15, "Initial"); + a(mfn(3, 5, 7), 15, "Cache"); + a(mfn.deleteRef(3, 5, 7), false, "Delete #1"); + mfn(3, 5, 7); + a(mfn.deleteRef(3, 5, 7), false, "Delete #2"); + mfn(3, 5, 7); + a(mfn.deleteRef(3, 5, 7), false, "Delete #3"); + mfn(3, 5, 7); + a(i, 1, "Not deleteed"); + a(mfn.deleteRef(3, 5, 7), false, "Delete #4"); + a(mfn.deleteRef(3, 5, 7), true, "Delete final"); + mfn(3, 5, 7); + a(i, 2, "Restarted"); + mfn(3, 5, 7); + a(i, 2, "Cached again"); + }, + "Primitive: Async": function (a, d) { + var mfn, fn, u = {}, i = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = memoize(fn, { async: true, primitive: true, refCounter: true }); + + a(mfn.deleteRef(3, 7), null, "Delete ref before"); + + a( + mfn(3, 7, function (err, res) { a.deep([err, res], [null, 10], "Result #1"); }), u, + "Initial" + ); + a( + mfn(3, 7, function (err, res) { a.deep([err, res], [null, 10], "Result #2"); }), u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { a.deep([err, res], [null, 13], "Result B #1"); }), + u, "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { a.deep([err, res], [null, 10], "Result #3"); }), u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { a.deep([err, res], [null, 13], "Result B #2"); }), + u, "Initial #3" + ); + + nextTick(function () { + a(i, 2, "Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, "Again B: Initial" + ); + + nextTick(function () { + a(i, 2, "Again Called #2"); + + a(mfn.deleteRef(3, 7), false, "Delete ref #1"); + a(mfn.deleteRef(3, 7), false, "Delete ref #2"); + a(mfn.deleteRef(3, 7), false, "Delete ref #3"); + a(mfn.deleteRef(3, 7), true, "Delete ref Final"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, "Again B: Initial" + ); + + nextTick(function () { + a(i, 3, "Call After delete"); + d(); + }); + }); + }); + }, + "Primitive: Promise": function (a, d) { + var mfn, fn, i = 0; + fn = function (x, y) { + ++i; + return new Promise(function (res) { res(x + y); }); + }; + + mfn = memoize(fn, { promise: true, primitive: true, refCounter: true }); + + a(mfn.deleteRef(3, 7), null, "Delete ref before"); + + mfn(3, 7).done(function (res) { a(res, 10, "Result #1"); }); + mfn(3, 7).done(function (res) { a(res, 10, "Result #2"); }); + mfn(5, 8).done(function (res) { a(res, 13, "Result B #1"); }); + mfn(3, 7).done(function (res) { a(res, 10, "Result #3"); }); + mfn(5, 8).done(function (res) { a(res, 13, "Result B #2"); }); + + setTimeout(function () { + a(i, 2, "Called #2"); + + mfn(3, 7).done(function (res) { a(res, 10, "Again: Result"); }); + mfn(5, 8).done(function (res) { a(res, 13, "Again B: Result"); }); + + setTimeout(function () { + a(i, 2, "Again Called #2"); + + a(mfn.deleteRef(3, 7), false, "Delete ref #1"); + a(mfn.deleteRef(3, 7), false, "Delete ref #2"); + a(mfn.deleteRef(3, 7), false, "Delete ref #3"); + a(mfn.deleteRef(3, 7), true, "Delete ref Final"); + + mfn(3, 7).done(function (res) { a(res, 10, "Again: Result"); }); + mfn(5, 8).done(function (res) { a(res, 13, "Again B: Result"); }); + + setTimeout(function () { + a(i, 3, "Call After delete"); + d(); + }, 10); + }, 10); + }, 10); + } + }; +}; diff --git a/node_modules/memoizee/test/index.js b/node_modules/memoizee/test/index.js new file mode 100644 index 00000000..c33ab8e3 --- /dev/null +++ b/node_modules/memoizee/test/index.js @@ -0,0 +1,2474 @@ +/* eslint max-lines: 0, max-statements: 0, id-length: 0, no-shadow: 0, max-nested-callbacks: 0, max-len: 0 */ + +"use strict"; + +var aFrom = require("es5-ext/array/from") + , nextTick = require("next-tick"); + +var join = Array.prototype.join; + +module.exports = function (t, a) { + return { + "0": function () { + var i = 0, + fn = function () { + ++i; + return 3; + }; + + fn = t(fn); + a(fn(), 3, "First"); + a(fn(1), 3, "Second"); + a(fn(5), 3, "Third"); + a(i, 1, "Called once"); + }, + "1": function () { + var i = 0, + fn = function (x) { + ++i; + return x; + }; + + fn = t(fn); + return { + "No arg": function () { + i = 0; + a(fn(), undefined, "First"); + a(fn(), undefined, "Second"); + a(fn(), undefined, "Third"); + a(i, 1, "Called once"); + }, + "Arg": function () { + var x = {}; + i = 0; + a(fn(x, 8), x, "First"); + a(fn(x, 4), x, "Second"); + a(fn(x, 2), x, "Third"); + a(i, 1, "Called once"); + }, + "Other Arg": function () { + var x = {}; + i = 0; + a(fn(x, 2), x, "First"); + a(fn(x, 9), x, "Second"); + a(fn(x, 3), x, "Third"); + a(i, 1, "Called once"); + } + }; + }, + "3": function () { + var i = 0, + fn = function (x, y, z) { + ++i; + return [x, y, z]; + }, + r; + + fn = t(fn); + return { + "No args": function () { + i = 0; + a.deep(r = fn(), [undefined, undefined, undefined], "First"); + a(fn(), r, "Second"); + a(fn(), r, "Third"); + a(i, 1, "Called once"); + }, + "Some Args": function () { + var x = {}; + i = 0; + a.deep(r = fn(x, 8), [x, 8, undefined], "First"); + a(fn(x, 8), r, "Second"); + a(fn(x, 8), r, "Third"); + a(i, 1, "Called once"); + return { + Other: function () { + a.deep(r = fn(x, 5), [x, 5, undefined], "Second"); + a(fn(x, 5), r, "Third"); + a(i, 2, "Called once"); + } + }; + }, + "Full stuff": function () { + var x = {}; + i = 0; + a.deep(r = fn(x, 8, 23, 98), [x, 8, 23], "First"); + a(fn(x, 8, 23, 43), r, "Second"); + a(fn(x, 8, 23, 9), r, "Third"); + a(i, 1, "Called once"); + return { + Other: function () { + a.deep(r = fn(x, 23, 8, 13), [x, 23, 8], "Second"); + a(fn(x, 23, 8, 22), r, "Third"); + a(i, 2, "Called once"); + } + }; + } + }; + }, + "Normalizer function": function () { + var i = 0, + fn = function () { + ++i; + return join.call(arguments, "|"); + }, + mfn; + mfn = t(fn, { + normalizer: function (args) { + return Boolean(args[0]); + } + }); + a(mfn(false, "raz"), "false|raz", "#1"); + a(mfn(0, "dwa"), "false|raz", "#2"); + a(i, 1, "Called once"); + a(mfn(34, "bar"), "34|bar", "#3"); + a(i, 2, "Called twice"); + a(mfn(true, "ola"), "34|bar", "#4"); + a(i, 2, "Called twice #2"); + }, + "Dynamic": function () { + var i = 0, + fn = function () { + ++i; + return arguments; + }, + r; + + fn = t(fn, { length: false }); + return { + "No args": function () { + i = 0; + a.deep(aFrom(r = fn()), [], "First"); + a(fn(), r, "Second"); + a(fn(), r, "Third"); + a(i, 1, "Called once"); + }, + "Some Args": function () { + var x = {}; + i = 0; + a.deep(aFrom(r = fn(x, 8)), [x, 8], "First"); + a(fn(x, 8), r, "Second"); + a(fn(x, 8), r, "Third"); + a(i, 1, "Called once"); + }, + "Many args": function () { + var x = {}; + i = 0; + a.deep(aFrom(r = fn(x, 8, 23, 98)), [x, 8, 23, 98], "First"); + a(fn(x, 8, 23, 98), r, "Second"); + a(fn(x, 8, 23, 98), r, "Third"); + a(i, 1, "Called once"); + } + }; + }, + "Resolvers": function () { + var i = 0, + fn, + r; + fn = t( + function () { + ++i; + return arguments; + }, + { length: 3, resolvers: [Boolean, String] } + ); + return { + "No args": function () { + i = 0; + a.deep(aFrom(r = fn()), [false, "undefined"], "First"); + a(fn(), r, "Second"); + a(fn(), r, "Third"); + a(i, 1, "Called once"); + }, + "Some Args": function () { + var x = {}; + i = 0; + a.deep(aFrom(r = fn(0, 34, x, 45)), [false, "34", x, 45], "First"); + a(fn(0, 34, x, 22), r, "Second"); + a(fn(0, 34, x, false), r, "Third"); + a(i, 1, "Called once"); + return { + Other: function () { + a.deep(aFrom(r = fn(1, 34, x, 34)), [true, "34", x, 34], "Second"); + a(fn(1, 34, x, 89), r, "Third"); + a(i, 2, "Called once"); + } + }; + } + }; + }, + "Clear Cache": { + Specific: function () { + var i = 0, + fn, + mfn, + x = {}; + + fn = function (a, b, c) { + if (c === 3) { + ++i; + } + return arguments; + }; + + mfn = t(fn); + mfn(1, x, 3); + mfn(1, x, 4); + mfn.delete(1, x, 4); + mfn(1, x, 3); + mfn(1, x, 3); + a(i, 1, "Pre clear"); + mfn.delete(1, x, 3); + mfn(1, x, 3); + a(i, 2, "After clear"); + + i = 0; + mfn = t(fn, { length: false }); + mfn(1, x, 3); + mfn(1, x, 3); + mfn(); + mfn(); + mfn.delete(); + mfn(1, x, 3); + a(i, 1, "Proper no arguments clear"); + }, + All: function () { + var i = 0, + fn, + x = {}; + + fn = function () { + ++i; + return arguments; + }; + + fn = t(fn, { length: 3 }); + fn(1, x, 3); + fn(1, x, 4); + fn(1, x, 3); + fn(1, x, 4); + a(i, 2, "Pre clear"); + fn.clear(); + fn(1, x, 3); + fn(1, x, 4); + fn(1, x, 3); + fn(1, x, 4); + a(i, 4, "After clear"); + } + }, + "Primitive": { + "No args": function (a) { + var i = 0, + fn = function () { + ++i; + return arguments[0]; + }, + mfn; + mfn = t(fn, { primitive: true }); + a(mfn("ble"), "ble", "#1"); + a(mfn({}), "ble", "#2"); + a(i, 1, "Called once"); + }, + "One arg": function (a) { + var i = 0, + fn = function (x) { + ++i; + return x; + }, + mfn, + y = { + toString: function () { + return "foo"; + } + }; + mfn = t(fn, { primitive: true }); + a(mfn(y), y, "#1"); + a(mfn("foo"), y, "#2"); + a(i, 1, "Called once"); + }, + "Many args": function (a) { + var i = 0, + fn = function (x, y, z) { + ++i; + return x + y + z; + }, + mfn, + y = { + toString: function () { + return "foo"; + } + }; + mfn = t(fn, { primitive: true }); + a(mfn(y, "bar", "zeta"), "foobarzeta", "#1"); + a(mfn("foo", "bar", "zeta"), "foobarzeta", "#2"); + a(i, 1, "Called once"); + }, + "Clear cache": function (a) { + var i = 0, + fn = function (x, y, z) { + ++i; + return x + y + z; + }, + mfn, + y = { + toString: function () { + return "foo"; + } + }; + mfn = t(fn, { primitive: true }); + a(mfn(y, "bar", "zeta"), "foobarzeta", "#1"); + a(mfn("foo", "bar", "zeta"), "foobarzeta", "#2"); + a(i, 1, "Called once"); + mfn.delete( + "foo", + { + toString: function () { + return "bar"; + } + }, + "zeta" + ); + a(mfn(y, "bar", "zeta"), "foobarzeta", "#3"); + a(i, 2, "Called twice"); + } + }, + "Reference counter": { + Regular: function (a) { + var i = 0, + fn = function (x, y, z) { + ++i; + return x + y + z; + }, + mfn; + mfn = t(fn, { refCounter: true }); + a(mfn.deleteRef(3, 5, 7), null, "Clear before"); + a(mfn(3, 5, 7), 15, "Initial"); + a(mfn(3, 5, 7), 15, "Cache"); + a(mfn.deleteRef(3, 5, 7), false, "Clear #1"); + mfn(3, 5, 7); + a(mfn.deleteRef(3, 5, 7), false, "Clear #2"); + mfn(3, 5, 7); + a(mfn.deleteRef(3, 5, 7), false, "Clear #3"); + mfn(3, 5, 7); + a(i, 1, "Not cleared"); + a(mfn.deleteRef(3, 5, 7), false, "Clear #4"); + a(mfn.deleteRef(3, 5, 7), true, "Clear final"); + mfn(3, 5, 7); + a(i, 2, "Restarted"); + mfn(3, 5, 7); + a(i, 2, "Cached again"); + }, + Primitive: function (a) { + var i = 0, + fn = function (x, y, z) { + ++i; + return x + y + z; + }, + mfn; + mfn = t(fn, { primitive: true, refCounter: true }); + a(mfn.deleteRef(3, 5, 7), null, "Clear before"); + a(mfn(3, 5, 7), 15, "Initial"); + a(mfn(3, 5, 7), 15, "Cache"); + a(mfn.deleteRef(3, 5, 7), false, "Clear #1"); + mfn(3, 5, 7); + a(mfn.deleteRef(3, 5, 7), false, "Clear #2"); + mfn(3, 5, 7); + a(mfn.deleteRef(3, 5, 7), false, "Clear #3"); + mfn(3, 5, 7); + a(i, 1, "Not cleared"); + a(mfn.deleteRef(3, 5, 7), false, "Clear #4"); + a(mfn.deleteRef(3, 5, 7), true, "Clear final"); + mfn(3, 5, 7); + a(i, 2, "Restarted"); + mfn(3, 5, 7); + a(i, 2, "Cached again"); + } + }, + "Async": { + Regular: { + "Success": function (a, d) { + var mfn, + fn, + u = {}, + i = 0, + invoked = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = t(fn, { async: true }); + + a( + mfn(3, 7, function (err, res) { + ++invoked; + a.deep([err, res], [null, 10], "Result #1"); + }), + u, + "Initial" + ); + a( + mfn(3, 7, function (err, res) { + ++invoked; + a.deep([err, res], [null, 10], "Result #2"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + ++invoked; + a.deep([err, res], [null, 13], "Result B #1"); + }), + u, + "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { + ++invoked; + a.deep([err, res], [null, 10], "Result #3"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + ++invoked; + a.deep([err, res], [null, 13], "Result B #2"); + }), + u, + "Initial #3" + ); + + nextTick(function () { + a(i, 2, "Init Called"); + a(invoked, 5, "Cb Called"); + + a( + mfn(3, 7, function (err, res) { + ++invoked; + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + ++invoked; + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 2, "Init Called #2"); + a(invoked, 7, "Cb Called #2"); + + mfn.delete(3, 7); + + a( + mfn(3, 7, function (err, res) { + ++invoked; + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + ++invoked; + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 3, "Init After clear"); + a(invoked, 9, "Cb After clear"); + d(); + }); + }); + }); + }, + "Reference counter": function (a, d) { + var mfn, + fn, + u = {}, + i = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = t(fn, { async: true, refCounter: true }); + + a(mfn.deleteRef(3, 7), null, "Clear ref before"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #1"); + }), + u, + "Initial" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #2"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #1"); + }), + u, + "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #3"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #2"); + }), + u, + "Initial #3" + ); + + nextTick(function () { + a(i, 2, "Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 2, "Again Called #2"); + + a(mfn.deleteRef(3, 7), false, "Clear ref #1"); + a(mfn.deleteRef(3, 7), false, "Clear ref #2"); + a(mfn.deleteRef(3, 7), false, "Clear ref #3"); + a(mfn.deleteRef(3, 7), true, "Clear ref Final"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 3, "Call After clear"); + d(); + }); + }); + }); + }, + "Error": function (a, d) { + var mfn, + fn, + u = {}, + i = 0, + e = new Error("Test"); + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(e); + }); + return u; + }; + + mfn = t(fn, { async: true }); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Result #1"); + }), + u, + "Initial" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Result #2"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [e, undefined], "Result B #1"); + }), + u, + "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Result #3"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [e, undefined], "Result B #2"); + }), + u, + "Initial #3" + ); + + nextTick(function () { + a(i, 2, "Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [e, undefined], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 4, "Again Called #2"); + d(); + }); + }); + } + }, + Primitive: { + "Success": function (a, d) { + var mfn, + fn, + u = {}, + i = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = t(fn, { async: true, primitive: true }); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #1"); + }), + u, + "Initial" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #2"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #1"); + }), + u, + "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #3"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #2"); + }), + u, + "Initial #3" + ); + + nextTick(function () { + a(i, 2, "Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 2, "Again Called #2"); + + mfn.delete(3, 7); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 3, "Call After clear"); + d(); + }); + }); + }); + }, + "Reference counter": function (a, d) { + var mfn, + fn, + u = {}, + i = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = t(fn, { async: true, primitive: true, refCounter: true }); + + a(mfn.deleteRef(3, 7), null, "Clear ref before"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #1"); + }), + u, + "Initial" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #2"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #1"); + }), + u, + "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #3"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #2"); + }), + u, + "Initial #3" + ); + + nextTick(function () { + a(i, 2, "Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 2, "Again Called #2"); + + a(mfn.deleteRef(3, 7), false, "Clear ref #1"); + a(mfn.deleteRef(3, 7), false, "Clear ref #2"); + a(mfn.deleteRef(3, 7), false, "Clear ref #3"); + a(mfn.deleteRef(3, 7), true, "Clear ref Final"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 3, "Call After clear"); + d(); + }); + }); + }); + }, + "Error": function (a, d) { + var mfn, + fn, + u = {}, + i = 0, + e = new Error("Test"); + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(e); + }); + return u; + }; + + mfn = t(fn, { async: true, primitive: true }); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Result #1"); + }), + u, + "Initial" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Result #2"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [e, undefined], "Result B #1"); + }), + u, + "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Result #3"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [e, undefined], "Result B #2"); + }), + u, + "Initial #3" + ); + + nextTick(function () { + a(i, 2, "Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [e, undefined], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [e, undefined], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 4, "Again Called #2"); + d(); + }); + }); + } + } + }, + "MaxAge": { + Regular: { + Sync: function (a, d) { + var mfn, + fn, + i = 0; + fn = function (x, y) { + ++i; + return x + y; + }; + mfn = t(fn, { maxAge: 100 }); + + a(mfn(3, 7), 10, "Result #1"); + a(i, 1, "Called #1"); + a(mfn(3, 7), 10, "Result #2"); + a(i, 1, "Called #2"); + a(mfn(5, 8), 13, "Result B #1"); + a(i, 2, "Called B #1"); + a(mfn(3, 7), 10, "Result #3"); + a(i, 2, "Called #3"); + a(mfn(5, 8), 13, "Result B #2"); + a(i, 2, "Called B #2"); + + setTimeout(function () { + a(mfn(3, 7), 10, "Result: Wait"); + a(i, 2, "Called: Wait"); + a(mfn(5, 8), 13, "Result: Wait B"); + a(i, 2, "Called: Wait B"); + + setTimeout(function () { + a(mfn(3, 7), 10, "Result: Wait After"); + a(i, 3, "Called: Wait After"); + a(mfn(5, 8), 13, "Result: Wait After B"); + a(i, 4, "Called: Wait After B"); + + a(mfn(3, 7), 10, "Result: Wait After #2"); + a(i, 4, "Called: Wait After #2"); + a(mfn(5, 8), 13, "Result: Wait After B #2"); + a(i, 4, "Called: Wait After B #2"); + d(); + }, 100); + }, 20); + }, + Async: function (a, d) { + var mfn, + fn, + u = {}, + i = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = t(fn, { async: true, maxAge: 100 }); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #1"); + }), + u, + "Initial" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #2"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #1"); + }), + u, + "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #3"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #2"); + }), + u, + "Initial #3" + ); + + setTimeout(function () { + a(i, 2, "Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + setTimeout(function () { + a(i, 2, "Again Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 4, "Call After clear"); + d(); + }); + }, 100); + }, 20); + } + }, + Primitive: { + Sync: function (a, d) { + var mfn, + fn, + i = 0; + fn = function (x, y) { + ++i; + return x + y; + }; + mfn = t(fn, { primitive: true, maxAge: 100 }); + + a(mfn(3, 7), 10, "Result #1"); + a(i, 1, "Called #1"); + a(mfn(3, 7), 10, "Result #2"); + a(i, 1, "Called #2"); + a(mfn(5, 8), 13, "Result B #1"); + a(i, 2, "Called B #1"); + a(mfn(3, 7), 10, "Result #3"); + a(i, 2, "Called #3"); + a(mfn(5, 8), 13, "Result B #2"); + a(i, 2, "Called B #2"); + + setTimeout(function () { + a(mfn(3, 7), 10, "Result: Wait"); + a(i, 2, "Called: Wait"); + a(mfn(5, 8), 13, "Result: Wait B"); + a(i, 2, "Called: Wait B"); + + setTimeout(function () { + a(mfn(3, 7), 10, "Result: Wait After"); + a(i, 3, "Called: Wait After"); + a(mfn(5, 8), 13, "Result: Wait After B"); + a(i, 4, "Called: Wait After B"); + + a(mfn(3, 7), 10, "Result: Wait After #2"); + a(i, 4, "Called: Wait After #2"); + a(mfn(5, 8), 13, "Result: Wait After B #2"); + a(i, 4, "Called: Wait After B #2"); + d(); + }, 100); + }, 20); + }, + Async: function (a, d) { + var mfn, + fn, + u = {}, + i = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = t(fn, { async: true, primitive: true, maxAge: 100 }); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #1"); + }), + u, + "Initial" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #2"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #1"); + }), + u, + "Initial #2" + ); + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #3"); + }), + u, + "Initial #2" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #2"); + }), + u, + "Initial #3" + ); + + setTimeout(function () { + a(i, 2, "Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + setTimeout(function () { + a(i, 2, "Again Called #2"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Again: Result"); + }), + u, + "Again: Initial" + ); + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Again B: Result"); + }), + u, + "Again B: Initial" + ); + + nextTick(function () { + a(i, 4, "Call After clear"); + d(); + }); + }, 100); + }, 20); + } + } + }, + "Max": { + Regular: { + Sync: function (a) { + var mfn, + fn, + i = 0; + fn = function (x, y) { + ++i; + return x + y; + }; + mfn = t(fn, { max: 3 }); + + a(mfn(3, 7), 10, "Result #1"); + a(i, 1, "Called #1"); + a(mfn(3, 7), 10, "Result #2"); + a(i, 1, "Called #2"); + a(mfn(5, 8), 13, "Result B #1"); + a(i, 2, "Called B #1"); + a(mfn(3, 7), 10, "Result #3"); + a(i, 2, "Called #3"); + a(mfn(5, 8), 13, "Result B #2"); + a(i, 2, "Called B #2"); + a(mfn(12, 4), 16, "Result C #1"); + a(i, 3, "Called C #1"); + a(mfn(3, 7), 10, "Result #4"); + a(i, 3, "Called #4"); + a(mfn(5, 8), 13, "Result B #3"); + a(i, 3, "Called B #3"); + + a(mfn(77, 11), 88, "Result D #1"); // Clear 12, 4 + a(i, 4, "Called D #1"); + a(mfn(5, 8), 13, "Result B #4"); + a(i, 4, "Called B #4"); + a(mfn(12, 4), 16, "Result C #2"); // Clear 3, 7 + a(i, 5, "Called C #2"); + + a(mfn(3, 7), 10, "Result #5"); // Clear 77, 11 + a(i, 6, "Called #5"); + a(mfn(77, 11), 88, "Result D #2"); // Clear 5, 8 + a(i, 7, "Called D #2"); + a(mfn(12, 4), 16, "Result C #3"); + a(i, 7, "Called C #3"); + + a(mfn(5, 8), 13, "Result B #5"); // Clear 3, 7 + a(i, 8, "Called B #5"); + + a(mfn(77, 11), 88, "Result D #3"); + a(i, 8, "Called D #3"); + + mfn.delete(77, 11); + a(mfn(77, 11), 88, "Result D #4"); + a(i, 9, "Called D #4"); + + mfn.clear(); + a(mfn(5, 8), 13, "Result B #6"); + a(i, 10, "Called B #6"); + a(mfn(77, 11), 88, "Result D #5"); + a(i, 11, "Called D #5"); + }, + Async: function (a, d) { + var mfn, + fn, + u = {}, + i = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = t(fn, { async: true, max: 3 }); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #1"); + a(i, 1, "Called #1"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #2"); + a(i, 1, "Called #2"); + + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #1"); + a(i, 2, "Called B #1"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #3"); + a(i, 2, "Called #3"); + + a( + mfn(5, 8, function (err, res) { + a.deep( + [err, res], + [null, 13], + "Result B #2" + ); + a(i, 2, "Called B #2"); + + a( + mfn(12, 4, function (err, res) { + a.deep( + [err, res], + [null, 16], + "Result C #1" + ); + a(i, 3, "Called C #1"); + + a( + mfn(3, 7, function ( + err, + res + ) { + a.deep( + [err, res], + [null, 10], + "Result #4" + ); + a(i, 3, "Called #4"); + + a( + mfn(5, 8, function ( + err, + res + ) { + a.deep( + [err, res], + [null, 13], + "Result B #3" + ); + a( + i, + 3, + "Called B #3" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #1" + ); + a( + i, + 4, + "Called D #1" + ); + + a( + mfn( + 5, + 8, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 13 + ], + "Result B #4" + ); + a( + i, + 4, + "Called B #4" + ); + + a( + mfn( + 12, + 4, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 16 + ], + "Result C #2" + ); + a( + i, + 5, + "Called C #2" + ); + + a( + mfn( + 3, + 7, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 10 + ], + "Result #5" + ); + a( + i, + 6, + "Called #5" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #2" + ); + a( + i, + 7, + "Called D #2" + ); + + a( + mfn( + 12, + 4, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 16 + ], + "Result C #3" + ); + a( + i, + 7, + "Called C #3" + ); + + a( + mfn( + 5, + 8, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 13 + ], + "Result B #5" + ); + a( + i, + 8, + "Called B #5" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #3" + ); + a( + i, + 8, + "Called D #3" + ); + + mfn.delete( + 77, + 11 + ); + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #4" + ); + a( + i, + 9, + "Called D #4" + ); + + mfn.clear(); + a( + mfn( + 5, + 8, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 13 + ], + "Result B #6" + ); + a( + i, + 10, + "Called B #6" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #5" + ); + a( + i, + 11, + "Called D #5" + ); + + d(); + } + ), + u, + "Initial D #5" + ); + } + ), + u, + "Initial B #6" + ); + } + ), + u, + "Initial D #4" + ); + } + ), + u, + "Initial D #3" + ); + } + ), + u, + "Initial B #5" + ); + } + ), + u, + "Initial C #3" + ); + } + ), + u, + "Initial D #2" + ); + } + ), + u, + "Initial #5" + ); + } + ), + u, + "Initial C #2" + ); + } + ), + u, + "Initial B #4" + ); + } + ), + u, + "Initial D #1" + ); + }), + u, + "Initial B #3" + ); + }), + u, + "Initial #4" + ); + }), + u, + "Initial C #1" + ); + }), + u, + "Initial B #2" + ); + }), + u, + "Initial #3" + ); + }), + u, + "Initial B #1" + ); + }), + u, + "Initial #2" + ); + }), + u, + "Initial #1" + ); + } + }, + Primitive: { + Sync: function (a) { + var mfn, + fn, + i = 0; + fn = function (x, y) { + ++i; + return x + y; + }; + mfn = t(fn, { primitive: true, max: 3 }); + + a(mfn(3, 7), 10, "Result #1"); + a(i, 1, "Called #1"); + a(mfn(3, 7), 10, "Result #2"); + a(i, 1, "Called #2"); + a(mfn(5, 8), 13, "Result B #1"); + a(i, 2, "Called B #1"); + a(mfn(3, 7), 10, "Result #3"); + a(i, 2, "Called #3"); + a(mfn(5, 8), 13, "Result B #2"); + a(i, 2, "Called B #2"); + a(mfn(12, 4), 16, "Result C #1"); + a(i, 3, "Called C #1"); + a(mfn(3, 7), 10, "Result #4"); + a(i, 3, "Called #4"); + a(mfn(5, 8), 13, "Result B #3"); + a(i, 3, "Called B #3"); + + a(mfn(77, 11), 88, "Result D #1"); // Clear 12, 4 + a(i, 4, "Called D #1"); + a(mfn(5, 8), 13, "Result B #4"); + a(i, 4, "Called B #4"); + a(mfn(12, 4), 16, "Result C #2"); // Clear 3, 7 + a(i, 5, "Called C #2"); + + a(mfn(3, 7), 10, "Result #5"); // Clear 77, 11 + a(i, 6, "Called #5"); + a(mfn(77, 11), 88, "Result D #2"); // Clear 5, 8 + a(i, 7, "Called D #2"); + a(mfn(12, 4), 16, "Result C #3"); + a(i, 7, "Called C #3"); + + a(mfn(5, 8), 13, "Result B #5"); // Clear 3, 7 + a(i, 8, "Called B #5"); + + a(mfn(77, 11), 88, "Result D #3"); + a(i, 8, "Called D #3"); + + mfn.delete(77, 11); + a(mfn(77, 11), 88, "Result D #4"); + a(i, 9, "Called D #4"); + + mfn.clear(); + a(mfn(5, 8), 13, "Result B #6"); + a(i, 10, "Called B #6"); + a(mfn(77, 11), 88, "Result D #5"); + a(i, 11, "Called D #5"); + }, + Async: function (a, d) { + var mfn, + fn, + u = {}, + i = 0; + fn = function (x, y, cb) { + nextTick(function () { + ++i; + cb(null, x + y); + }); + return u; + }; + + mfn = t(fn, { async: true, primitive: true, max: 3 }); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #1"); + a(i, 1, "Called #1"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #2"); + a(i, 1, "Called #2"); + + a( + mfn(5, 8, function (err, res) { + a.deep([err, res], [null, 13], "Result B #1"); + a(i, 2, "Called B #1"); + + a( + mfn(3, 7, function (err, res) { + a.deep([err, res], [null, 10], "Result #3"); + a(i, 2, "Called #3"); + + a( + mfn(5, 8, function (err, res) { + a.deep( + [err, res], + [null, 13], + "Result B #2" + ); + a(i, 2, "Called B #2"); + + a( + mfn(12, 4, function (err, res) { + a.deep( + [err, res], + [null, 16], + "Result C #1" + ); + a(i, 3, "Called C #1"); + + a( + mfn(3, 7, function ( + err, + res + ) { + a.deep( + [err, res], + [null, 10], + "Result #4" + ); + a(i, 3, "Called #4"); + + a( + mfn(5, 8, function ( + err, + res + ) { + a.deep( + [err, res], + [null, 13], + "Result B #3" + ); + a( + i, + 3, + "Called B #3" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #1" + ); + a( + i, + 4, + "Called D #1" + ); + + a( + mfn( + 5, + 8, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 13 + ], + "Result B #4" + ); + a( + i, + 4, + "Called B #4" + ); + + a( + mfn( + 12, + 4, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 16 + ], + "Result C #2" + ); + a( + i, + 5, + "Called C #2" + ); + + a( + mfn( + 3, + 7, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 10 + ], + "Result #5" + ); + a( + i, + 6, + "Called #5" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #2" + ); + a( + i, + 7, + "Called D #2" + ); + + a( + mfn( + 12, + 4, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 16 + ], + "Result C #3" + ); + a( + i, + 7, + "Called C #3" + ); + + a( + mfn( + 5, + 8, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 13 + ], + "Result B #5" + ); + a( + i, + 8, + "Called B #5" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #3" + ); + a( + i, + 8, + "Called D #3" + ); + + mfn.delete( + 77, + 11 + ); + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #4" + ); + a( + i, + 9, + "Called D #4" + ); + + mfn.clear(); + a( + mfn( + 5, + 8, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 13 + ], + "Result B #6" + ); + a( + i, + 10, + "Called B #6" + ); + + a( + mfn( + 77, + 11, + function ( + err, + res + ) { + a.deep( + [ + err, + res + ], + [ + null, + 88 + ], + "Result D #5" + ); + a( + i, + 11, + "Called D #5" + ); + + d(); + } + ), + u, + "Initial D #5" + ); + } + ), + u, + "Initial B #6" + ); + } + ), + u, + "Initial D #4" + ); + } + ), + u, + "Initial D #3" + ); + } + ), + u, + "Initial B #5" + ); + } + ), + u, + "Initial C #3" + ); + } + ), + u, + "Initial D #2" + ); + } + ), + u, + "Initial #5" + ); + } + ), + u, + "Initial C #2" + ); + } + ), + u, + "Initial B #4" + ); + } + ), + u, + "Initial D #1" + ); + }), + u, + "Initial B #3" + ); + }), + u, + "Initial #4" + ); + }), + u, + "Initial C #1" + ); + }), + u, + "Initial B #2" + ); + }), + u, + "Initial #3" + ); + }), + u, + "Initial B #1" + ); + }), + u, + "Initial #2" + ); + }), + u, + "Initial #1" + ); + } + } + }, + "Dispose": { + Regular: { + "Sync": function (a) { + var mfn, + fn, + value = [], + x, + invoked; + fn = function (x, y) { + return x + y; + }; + mfn = t(fn, { + dispose: function (val) { + value.push(val); + } + }); + + mfn(3, 7); + mfn(5, 8); + mfn(12, 4); + a.deep(value, [], "Pre"); + mfn.delete(5, 8); + a.deep(value, [13], "#1"); + value = []; + mfn.delete(12, 4); + a.deep(value, [16], "#2"); + + value = []; + mfn(77, 11); + mfn.clear(); + a.deep(value, [10, 88], "Clear all"); + + x = {}; + invoked = false; + mfn = t( + function () { + return x; + }, + { + dispose: function (val) { + invoked = val; + } + } + ); + + mfn.delete(); + a(invoked, false, "No args: Post invalid clear"); + mfn(); + a(invoked, false, "No args: Post cache"); + mfn.delete(); + a(invoked, x, "No args: Pre clear"); + }, + "Ref counter": function (a) { + var mfn, + fn, + value = []; + fn = function (x, y) { + return x + y; + }; + mfn = t(fn, { + refCounter: true, + dispose: function (val) { + value.push(val); + } + }); + + mfn(3, 7); + mfn(5, 8); + mfn(12, 4); + a.deep(value, [], "Pre"); + mfn(5, 8); + mfn.deleteRef(5, 8); + a.deep(value, [], "Pre"); + mfn.deleteRef(5, 8); + a.deep(value, [13], "#1"); + value = []; + mfn.deleteRef(12, 4); + a.deep(value, [16], "#2"); + + value = []; + mfn(77, 11); + mfn.clear(); + a.deep(value, [10, 88], "Clear all"); + }, + "Async": function (a, d) { + var mfn, + fn, + u = {}, + value = []; + fn = function (x, y, cb) { + nextTick(function () { + cb(null, x + y); + }); + return u; + }; + + mfn = t(fn, { + async: true, + dispose: function (val) { + value.push(val); + } + }); + + mfn(3, 7, function () { + mfn(5, 8, function () { + mfn(12, 4, function () { + a.deep(value, [], "Pre"); + mfn.delete(5, 8); + a.deep(value, [13], "#1"); + value = []; + mfn.delete(12, 4); + a.deep(value, [16], "#2"); + + value = []; + mfn(77, 11, function () { + mfn.clear(); + a.deep(value, [10, 88], "Clear all"); + d(); + }); + }); + }); + }); + } + }, + Primitive: { + "Sync": function (a) { + var mfn, + fn, + value = []; + fn = function (x, y) { + return x + y; + }; + mfn = t(fn, { + dispose: function (val) { + value.push(val); + } + }); + + mfn(3, 7); + mfn(5, 8); + mfn(12, 4); + a.deep(value, [], "Pre"); + mfn.delete(5, 8); + a.deep(value, [13], "#1"); + value = []; + mfn.delete(12, 4); + a.deep(value, [16], "#2"); + + value = []; + mfn(77, 11); + mfn.clear(); + a.deep(value, [10, 88], "Clear all"); + }, + "Ref counter": function (a) { + var mfn, + fn, + value = []; + fn = function (x, y) { + return x + y; + }; + mfn = t(fn, { + refCounter: true, + dispose: function (val) { + value.push(val); + } + }); + + mfn(3, 7); + mfn(5, 8); + mfn(12, 4); + a.deep(value, [], "Pre"); + mfn(5, 8); + mfn.deleteRef(5, 8); + a.deep(value, [], "Pre"); + mfn.deleteRef(5, 8); + a.deep(value, [13], "#1"); + value = []; + mfn.deleteRef(12, 4); + a.deep(value, [16], "#2"); + + value = []; + mfn(77, 11); + mfn.clear(); + a.deep(value, [10, 88], "Clear all"); + }, + "Async": function (a, d) { + var mfn, + fn, + u = {}, + value = []; + fn = function (x, y, cb) { + nextTick(function () { + cb(null, x + y); + }); + return u; + }; + + mfn = t(fn, { + async: true, + dispose: function (val) { + value.push(val); + } + }); + + mfn(3, 7, function () { + mfn(5, 8, function () { + mfn(12, 4, function () { + a.deep(value, [], "Pre"); + mfn.delete(5, 8); + a.deep(value, [13], "#1"); + value = []; + mfn.delete(12, 4); + a.deep(value, [16], "#2"); + + value = []; + mfn(77, 11, function () { + mfn.clear(); + a.deep(value, [10, 88], "Clear all"); + d(); + }); + }); + }); + }); + } + } + } + }; +}; diff --git a/node_modules/memoizee/test/lib/configure-map.js b/node_modules/memoizee/test/lib/configure-map.js new file mode 100644 index 00000000..cb4d1db5 --- /dev/null +++ b/node_modules/memoizee/test/lib/configure-map.js @@ -0,0 +1,156 @@ +/* eslint id-length: 0, no-shadow: 0, no-unused-vars: 0 */ + +"use strict"; + +var aFrom = require("es5-ext/array/from") + , memoize = require("../.."); + +module.exports = function () { + return { + "One arg": function (a) { + var i = 0 + , fn = function (x) { + ++i; + return x; + } + , mfn + , y = { + toString: function () { + return "foo"; + } + }; + mfn = memoize(fn, { primitive: true }); + a(mfn(y), y, "#1"); + a(mfn("foo"), y, "#2"); + a(i, 1, "Called once"); + }, + "No args": function (a) { + var i = 0 + , fn = function () { + ++i; + return "foo"; + } + , mfn + , y = { + toString: function () { + return "foo"; + } + }; + mfn = memoize(fn); + a(mfn._has(), false); + a(mfn(), "foo", "#1"); + a(mfn._has(), true); + mfn(); + a(i, 1, "Called once"); + }, + "Clear cache": function (a) { + var i = 0 + , fn = function (x, y, z) { + ++i; + return x + y + z; + } + , mfn + , y = { + toString: function () { + return "foo"; + } + }; + mfn = memoize(fn, { primitive: true }); + a(mfn(y, "bar", "zeta"), "foobarzeta", "#1"); + a(mfn("foo", "bar", "zeta"), "foobarzeta", "#2"); + a(i, 1, "Called once"); + mfn.delete( + "foo", + { + toString: function () { + return "bar"; + } + }, + "zeta" + ); + a(mfn(y, "bar", "zeta"), "foobarzeta", "#3"); + a(i, 2, "Called twice"); + }, + "_get": function (a) { + var fn = function (x) { + return x; + } + , mfn; + mfn = memoize(fn); + a(mfn._get("foo"), undefined); + mfn("foo"); + a(mfn._get("foo"), "foo"); + }, + "_has": function (a) { + var fn = function (x) { + return x; + } + , mfn; + mfn = memoize(fn); + a(mfn._has("foo"), false); + mfn("foo"); + a(mfn._has("foo"), true); + }, + "Circular": function (a) { + var i = 0, fn; + fn = memoize(function (x) { + if (++i < 2) fn(x); + }); + a.throws(function () { + fn("foo"); + }, "CIRCULAR_INVOCATION"); + + i = 0; + fn = memoize(function (x, y) { + if (++i < 2) fn(x, y); + }); + a.throws(function () { + fn("foo", "bar"); + }, "CIRCULAR_INVOCATION"); + }, + "Resolvers": function () { + var i = 0, fn, r; + fn = memoize( + function () { + ++i; + return arguments; + }, + { length: 3, resolvers: [Boolean, String] } + ); + return { + "No args": function (a) { + i = 0; + a.deep(aFrom(r = fn()), [false, "undefined"], "First"); + a(fn(), r, "Second"); + a(fn(), r, "Third"); + a(i, 1, "Called once"); + }, + "One arg": function (a) { + var fn = memoize( + function (elo) { + ++i; + return arguments; + }, + { resolvers: [Boolean] } + ); + a.deep(aFrom(r = fn("elo")), [true], "First"); + }, + "Some Args": function (a) { + var x = {}; + i = 0; + a.deep(aFrom(r = fn(0, 34, x, 45)), [false, "34", x, 45], "First"); + a(fn(0, 34, x, 22), r, "Second"); + a(fn(0, 34, x, false), r, "Third"); + a(i, 1, "Called once"); + return { + Other: function (a) { + a.deep(aFrom(r = fn(1, 34, x, 34)), [true, "34", x, 34], "Second"); + a(fn(1, 34, x, 89), r, "Third"); + a(i, 2, "Called once"); + } + }; + } + }; + } + }; +}; diff --git a/node_modules/memoizee/test/lib/methods.js b/node_modules/memoizee/test/lib/methods.js new file mode 100644 index 00000000..11d9ae52 --- /dev/null +++ b/node_modules/memoizee/test/lib/methods.js @@ -0,0 +1,50 @@ +/* eslint id-length: 0 */ + +"use strict"; + +var d = require("d") + , memoize = require("../.."); + +require("../ext/dispose"); +require("../ext/ref-counter"); + +module.exports = function (t, a) { + var value = [], obj = {}; + t = t(memoize); + Object.defineProperties( + obj, + t({ + someFn: d( + function (x, y) { + a(this, obj); + return x + y; + }, + { + refCounter: true, + dispose: function (val) { + value.push(val); + } + } + ) + }) + ); + + obj = Object.create(obj); + obj.someFn(3, 7); + obj.someFn(5, 8); + obj.someFn(12, 4); + a.deep(value, [], "Pre"); + obj.someFn(5, 8); + obj.someFn.deleteRef(5, 8); + a.deep(value, [], "Pre"); + obj.someFn.deleteRef(5, 8); + a.deep(value, [13], "#1"); + value = []; + obj.someFn.deleteRef(12, 4); + a.deep(value, [16], "#2"); + + value = []; + obj.someFn(77, 11); + obj.someFn.clear(); + a.deep(value, [10, 88], "Clear"); +}; diff --git a/node_modules/memoizee/test/lib/registered-extensions.js b/node_modules/memoizee/test/lib/registered-extensions.js new file mode 100644 index 00000000..6f1141e5 --- /dev/null +++ b/node_modules/memoizee/test/lib/registered-extensions.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (t, a) { + require("../../ext/async"); + a(typeof t.async, "function"); +}; diff --git a/node_modules/memoizee/test/lib/resolve-length.js b/node_modules/memoizee/test/lib/resolve-length.js new file mode 100644 index 00000000..6d37f420 --- /dev/null +++ b/node_modules/memoizee/test/lib/resolve-length.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(1, 2), 1, "Options"); + a(t(1, 2, true), 1, "Options: Async "); + a(t(undefined, 2), 2, "Function"); + a(t(undefined, 2, true), 1, "Function: Async"); + a(t(undefined, undefined, false), 1, "Unknown"); + a(t(undefined, undefined, true), 1, "Unknown: async"); +}; diff --git a/node_modules/memoizee/test/lib/resolve-normalize.js b/node_modules/memoizee/test/lib/resolve-normalize.js new file mode 100644 index 00000000..1a0058a3 --- /dev/null +++ b/node_modules/memoizee/test/lib/resolve-normalize.js @@ -0,0 +1,9 @@ +/* eslint no-empty-function: 0 */ + +"use strict"; + +module.exports = function (t, a) { + var fn = function () {}, resolved = t(fn); + a.deep(resolved, { get: fn, set: fn }); + a.deep(t(resolved), { get: fn, set: fn }); +}; diff --git a/node_modules/memoizee/test/lib/resolve-resolve.js b/node_modules/memoizee/test/lib/resolve-resolve.js new file mode 100644 index 00000000..58d09f80 --- /dev/null +++ b/node_modules/memoizee/test/lib/resolve-resolve.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (t, a) { + a.deep(t([String, null, Number])([23, "foo", "45", "elo"]), ["23", "foo", 45, "elo"]); +}; diff --git a/node_modules/memoizee/test/lib/weak.js b/node_modules/memoizee/test/lib/weak.js new file mode 100644 index 00000000..a84acad1 --- /dev/null +++ b/node_modules/memoizee/test/lib/weak.js @@ -0,0 +1,53 @@ +/* eslint id-length: 0, no-shadow: 0, no-unused-vars: 0 */ + +"use strict"; + +var memoize = require("../.."); + +require("../ext/dispose"); +require("../ext/ref-counter"); + +module.exports = function (t, a) { + var value = [], obj = {}, memoized, count = 0, x, y, z; + t = t(memoize); + memoized = t( + function (arg, x, y) { + a(arg, obj); + return x + y; + }, + { + refCounter: true, + dispose: function (val) { + value.push(val); + } + } + ); + + a(memoized(obj, 3, 7), 10); + a(memoized(obj, 5, 8), 13); + a(memoized(obj, 12, 4), 16); + a.deep(value, [], "Pre"); + a(memoized(obj, 5, 8), 13); + memoized.deleteRef(obj, 5, 8); + a.deep(value, [], "Pre"); + memoized.deleteRef(obj, 5, 8); + a.deep(value, [13], "#1"); + value = []; + memoized.deleteRef(obj, 12, 4); + a.deep(value, [16], "#2"); + + value = []; + memoized(obj, 77, 11); + + x = {}; + y = {}; + z = {}; + memoized = t(function (arg) { + return ++count; + }); + a(memoized(x), 1); + a(memoized(y), 2); + a(memoized(x), 1); + a(memoized(z), 3); + a(count, 3); +}; diff --git a/node_modules/memoizee/test/methods-plain.js b/node_modules/memoizee/test/methods-plain.js new file mode 100644 index 00000000..a7f375c9 --- /dev/null +++ b/node_modules/memoizee/test/methods-plain.js @@ -0,0 +1,48 @@ +/* eslint id-length: 0 */ + +"use strict"; + +var d = require("d"); + +require("../ext/dispose"); +require("../ext/ref-counter"); + +module.exports = function (t, a) { + var value = [], obj = {}; + Object.defineProperties( + obj, + t({ + someFn: d( + function (x, y) { + a(this, obj); + return x + y; + }, + { + refCounter: true, + dispose: function (val) { + value.push(val); + } + } + ) + }) + ); + + obj = Object.create(obj); + obj.someFn(3, 7); + obj.someFn(5, 8); + obj.someFn(12, 4); + a.deep(value, [], "Pre"); + obj.someFn(5, 8); + obj.someFn.deleteRef(5, 8); + a.deep(value, [], "Pre"); + obj.someFn.deleteRef(5, 8); + a.deep(value, [13], "#1"); + value = []; + obj.someFn.deleteRef(12, 4); + a.deep(value, [16], "#2"); + + value = []; + obj.someFn(77, 11); + obj.someFn.clear(); + a.deep(value, [10, 88], "Clear all"); +}; diff --git a/node_modules/memoizee/test/methods.js b/node_modules/memoizee/test/methods.js new file mode 100644 index 00000000..acfd941d --- /dev/null +++ b/node_modules/memoizee/test/methods.js @@ -0,0 +1,45 @@ +/* eslint id-length: 0 */ + +"use strict"; + +var d = require("d"); + +module.exports = function (t, a) { + var value = [], obj = {}; + Object.defineProperties( + obj, + t({ + someFn: d( + function (x, y) { + a(this, obj); + return x + y; + }, + { + refCounter: true, + dispose: function (val) { + value.push(val); + } + } + ) + }) + ); + + obj = Object.create(obj); + obj.someFn(3, 7); + obj.someFn(5, 8); + obj.someFn(12, 4); + a.deep(value, [], "Pre"); + obj.someFn(5, 8); + obj.someFn.deleteRef(5, 8); + a.deep(value, [], "Pre"); + obj.someFn.deleteRef(5, 8); + a.deep(value, [13], "#1"); + value = []; + obj.someFn.deleteRef(12, 4); + a.deep(value, [16], "#2"); + + value = []; + obj.someFn(77, 11); + obj.someFn.clear(); + a.deep(value, [10, 88], "Clear all"); +}; diff --git a/node_modules/memoizee/test/normalizers/get-1.js b/node_modules/memoizee/test/normalizers/get-1.js new file mode 100644 index 00000000..e33efc3b --- /dev/null +++ b/node_modules/memoizee/test/normalizers/get-1.js @@ -0,0 +1,62 @@ +/* eslint id-length: 0, no-shadow: 0, no-unused-vars: 0 */ + +"use strict"; + +var memoize = require("../.."); + +module.exports = { + "": function (t, a) { + var i = 0 + , fn = function (x) { + ++i; + return x; + }; + + fn = memoize(fn); + return { + "No arg": function () { + i = 0; + a(fn(), undefined, "First"); + a(fn(), undefined, "Second"); + a(fn(), undefined, "Third"); + a(i, 1, "Called once"); + }, + "Arg": function () { + var x = {}; + i = 0; + a(fn(x, 8), x, "First"); + a(fn(x, 4), x, "Second"); + a(fn(x, 2), x, "Third"); + a(i, 1, "Called once"); + }, + "Other Arg": function () { + var x = {}; + i = 0; + a(fn(x, 2), x, "First"); + a(fn(x, 9), x, "Second"); + a(fn(x, 3), x, "Third"); + a(i, 1, "Called once"); + } + }; + }, + "Delete": function (a) { + var i = 0, fn, mfn, x = {}; + + fn = function (a, b, c) { + return a + ++i; + }; + mfn = memoize(fn, { length: 1 }); + a(mfn(3), 4, "Init"); + a(mfn(4, x, 1), 6, "Init #2"); + mfn.delete(4); + a(mfn(3, x, 1), 4, "Cached"); + mfn(3, x, 1); + a(i, 2, "Pre clear"); + mfn.delete(3, x, 1); + a(i, 2, "After clear"); + a(mfn(3, x, 1), 6, "Reinit"); + a(i, 3, "Reinit count"); + a(mfn(3, x, 1), 6, "Reinit Cached"); + a(i, 3, "Reinit count"); + } +}; diff --git a/node_modules/memoizee/test/normalizers/get-fixed.js b/node_modules/memoizee/test/normalizers/get-fixed.js new file mode 100644 index 00000000..f26e17e3 --- /dev/null +++ b/node_modules/memoizee/test/normalizers/get-fixed.js @@ -0,0 +1,98 @@ +/* eslint id-length: 0, no-shadow: 0, no-unused-vars: 0 */ + +"use strict"; + +var memoize = require("../.."); + +module.exports = { + "": function (a) { + var i = 0 + , fn = function (x, y, z) { + ++i; + return [x, y, z]; + } + , r; + + fn = memoize(fn); + return { + "No args": function () { + i = 0; + a.deep(r = fn(), [undefined, undefined, undefined], "First"); + a(fn(), r, "Second"); + a(fn(), r, "Third"); + a(i, 1, "Called once"); + }, + "Some Args": function () { + var x = {}; + i = 0; + a.deep(r = fn(x, 8), [x, 8, undefined], "First"); + a(fn(x, 8), r, "Second"); + a(fn(x, 8), r, "Third"); + a(i, 1, "Called once"); + return { + Other: function () { + a.deep(r = fn(x, 5), [x, 5, undefined], "Second"); + a(fn(x, 5), r, "Third"); + a(i, 2, "Called once"); + } + }; + }, + "Full stuff": function () { + var x = {}; + i = 0; + a.deep(r = fn(x, 8, 23, 98), [x, 8, 23], "First"); + a(fn(x, 8, 23, 43), r, "Second"); + a(fn(x, 8, 23, 9), r, "Third"); + a(i, 1, "Called once"); + return { + Other: function () { + a.deep(r = fn(x, 23, 8, 13), [x, 23, 8], "Second"); + a(fn(x, 23, 8, 22), r, "Third"); + a(i, 2, "Called once"); + } + }; + } + }; + }, + "Delete": function (a) { + var i = 0, fn, mfn, x = {}; + + fn = function (a, b, c) { + return a + ++i; + }; + mfn = memoize(fn); + a(mfn(3, x, 1), 4, "Init"); + a(mfn(4, x, 1), 6, "Init #2"); + mfn.delete(4, x, 1); + a(mfn(3, x, 1), 4, "Cached"); + mfn(3, x, 1); + a(i, 2, "Pre clear"); + mfn.delete(3, x, 1); + a(i, 2, "After clear"); + a(mfn(3, x, 1), 6, "Reinit"); + a(i, 3, "Reinit count"); + a(mfn(3, x, 1), 6, "Reinit Cached"); + a(i, 3, "Reinit count"); + }, + "Clear": function (a) { + var i = 0, fn, x = {}; + + fn = function () { + ++i; + return arguments; + }; + + fn = memoize(fn, { length: 3 }); + fn(1, x, 3); + fn(1, x, 4); + fn(1, x, 3); + fn(1, x, 4); + a(i, 2, "Pre clear"); + fn.clear(); + fn(1, x, 3); + fn(1, x, 4); + fn(1, x, 3); + fn(1, x, 4); + a(i, 4, "After clear"); + } +}; diff --git a/node_modules/memoizee/test/normalizers/get-primitive-fixed.js b/node_modules/memoizee/test/normalizers/get-primitive-fixed.js new file mode 100644 index 00000000..e18d9cd8 --- /dev/null +++ b/node_modules/memoizee/test/normalizers/get-primitive-fixed.js @@ -0,0 +1,70 @@ +/* eslint id-length: 0 */ + +"use strict"; + +var memoize = require("../.."); + +module.exports = { + "": function (a) { + var i = 0 + , fn = function (x, y, z) { + ++i; + return x + y + z; + } + , mfn + , y = { + toString: function () { + return "foo"; + } + }; + mfn = memoize(fn, { primitive: true }); + a(mfn(y, "bar", "zeta"), "foobarzeta", "#1"); + a(mfn("foo", "bar", "zeta"), "foobarzeta", "#2"); + a(i, 1, "Called once"); + }, + "Delete": function (a) { + var i = 0 + , fn = function (x, y, z) { + ++i; + return x + y + z; + } + , mfn + , y = { + toString: function () { + return "foo"; + } + }; + mfn = memoize(fn, { primitive: true }); + a(mfn(y, "bar", "zeta"), "foobarzeta", "#1"); + a(mfn("foo", "bar", "zeta"), "foobarzeta", "#2"); + a(i, 1, "Called once"); + mfn.delete( + "foo", + { + toString: function () { + return "bar"; + } + }, + "zeta" + ); + a(mfn(y, "bar", "zeta"), "foobarzeta", "#3"); + a(i, 2, "Called twice"); + }, + "Clear": function (a) { + var i = 0, fn; + fn = memoize(function (x) { + if (++i < 2) fn(x); + }); + a.throws(function () { + fn("foo"); + }, "CIRCULAR_INVOCATION"); + + i = 0; + fn = memoize(function (x, y) { + if (++i < 2) fn(x, y); + }); + a.throws(function () { + fn("foo", "bar"); + }, "CIRCULAR_INVOCATION"); + } +}; diff --git a/node_modules/memoizee/test/normalizers/get.js b/node_modules/memoizee/test/normalizers/get.js new file mode 100644 index 00000000..e4d512b4 --- /dev/null +++ b/node_modules/memoizee/test/normalizers/get.js @@ -0,0 +1,66 @@ +/* eslint id-length: 0, no-shadow: 0, no-unused-vars: 0 */ + +"use strict"; + +var aFrom = require("es5-ext/array/from") + , memoize = require("../.."); + +module.exports = function () { + return { + "": function (a) { + var i = 0 + , fn = function () { + ++i; + return arguments; + } + , r; + + fn = memoize(fn, { length: false }); + return { + "No args": function () { + i = 0; + a.deep(aFrom(r = fn()), [], "First"); + a(fn(), r, "Second"); + a(fn(), r, "Third"); + a(i, 1, "Called once"); + }, + "Some Args": function () { + var x = {}; + i = 0; + a.deep(aFrom(r = fn(x, 8)), [x, 8], "First"); + a(fn(x, 8), r, "Second"); + a(fn(x, 8), r, "Third"); + a(i, 1, "Called once"); + }, + "Many args": function () { + var x = {}; + i = 0; + a.deep(aFrom(r = fn(x, 8, 23, 98)), [x, 8, 23, 98], "First"); + a(fn(x, 8, 23, 98), r, "Second"); + a(fn(x, 8, 23, 98), r, "Third"); + a(i, 1, "Called once"); + } + }; + }, + "Delete": function (a) { + var i = 0, fn, mfn, x = {}; + + fn = function (a, b, c) { + return a + ++i; + }; + mfn = memoize(fn, { length: false }); + a(mfn(3, x, 1), 4, "Init"); + a(mfn(4, x, 1), 6, "Init #2"); + mfn.delete(4, x, 1); + a(mfn(3, x, 1), 4, "Cached"); + mfn(3, x, 1); + a(i, 2, "Pre clear"); + mfn.delete(3, x, 1); + a(i, 2, "After clear"); + a(mfn(3, x, 1), 6, "Reinit"); + a(i, 3, "Reinit count"); + a(mfn(3, x, 1), 6, "Reinit Cached"); + a(i, 3, "Reinit count"); + } + }; +}; diff --git a/node_modules/memoizee/test/normalizers/primitive.js b/node_modules/memoizee/test/normalizers/primitive.js new file mode 100644 index 00000000..28737951 --- /dev/null +++ b/node_modules/memoizee/test/normalizers/primitive.js @@ -0,0 +1,28 @@ +/* eslint id-length: 0 */ + +"use strict"; + +var memoize = require("../..") + , join = Array.prototype.join; + +module.exports = function (a) { + var i = 0 + , fn = function () { + ++i; + return join.call(arguments, "|"); + } + , y = { + toString: function () { + return "foo"; + } + } + , mfn; + mfn = memoize(fn, { primitive: true, length: false }); + a(mfn(y, "bar", "zeta"), "foo|bar|zeta", "#1"); + a(mfn("foo", "bar", "zeta"), "foo|bar|zeta", "#2"); + a(i, 1, "Called once"); + a(mfn(y, "bar"), "foo|bar", "#3"); + a(i, 2, "Called twice"); + a(mfn(y, "bar"), "foo|bar", "#4"); + a(i, 2, "Called twice #2"); +}; diff --git a/node_modules/memoizee/test/plain.js b/node_modules/memoizee/test/plain.js new file mode 100644 index 00000000..2f350127 --- /dev/null +++ b/node_modules/memoizee/test/plain.js @@ -0,0 +1,56 @@ +/* eslint id-length: 0 */ + +"use strict"; + +module.exports = function (t) { + return { + "": function (a) { + var i = 0 + , fn = function (x) { + ++i; + return x; + } + , mfn + , y = { + toString: function () { + return "foo"; + } + }; + mfn = t(fn, { primitive: true }); + a(typeof mfn, "function", "Returns"); + a(mfn.__memoized__, true, "Marked"); + a(t(mfn), mfn, "Do not memoize memoized"); + a(mfn(y), y, "#1"); + a(mfn("foo"), y, "#2"); + a(i, 1, "Called once"); + }, + "Clear cache": function (a) { + var i = 0 + , fn = function (x, y, z) { + ++i; + return x + y + z; + } + , mfn + , y = { + toString: function () { + return "foo"; + } + }; + mfn = t(fn, { primitive: true }); + a(mfn(y, "bar", "zeta"), "foobarzeta", "#1"); + a(mfn("foo", "bar", "zeta"), "foobarzeta", "#2"); + a(i, 1, "Called once"); + mfn.delete( + "foo", + { + toString: function () { + return "bar"; + } + }, + "zeta" + ); + a(mfn(y, "bar", "zeta"), "foobarzeta", "#3"); + a(i, 2, "Called twice"); + } + }; +}; diff --git a/node_modules/memoizee/test/profile.js b/node_modules/memoizee/test/profile.js new file mode 100644 index 00000000..120890a4 --- /dev/null +++ b/node_modules/memoizee/test/profile.js @@ -0,0 +1,14 @@ +/* eslint no-empty-function: 0 */ + +"use strict"; + +var memoize = require("../plain"); + +module.exports = function (t, a) { + memoize(function () {})(); + memoize(function () {}, { profileName: "test" })(); + a(typeof t.statistics, "object", "Access to statistics"); + a(Object.keys(t.statistics).length, 2, "Statistics collected including named function"); + a(typeof t.log, "function", "Access to log function"); + a(typeof t.log(), "string", "Log outputs string"); +}; diff --git a/node_modules/memoizee/test/weak-plain.js b/node_modules/memoizee/test/weak-plain.js new file mode 100644 index 00000000..460d4c74 --- /dev/null +++ b/node_modules/memoizee/test/weak-plain.js @@ -0,0 +1,50 @@ +/* eslint id-length: 0, no-shadow: 0, no-unused-vars: 0 */ + +"use strict"; + +require("../ext/dispose"); +require("../ext/ref-counter"); + +module.exports = function (t, a) { + var value = [], obj = {}, memoized, count = 0, x, y, z; + memoized = t( + function (arg, x, y) { + a(arg, obj); + return x + y; + }, + { + refCounter: true, + dispose: function (val) { + value.push(val); + } + } + ); + + a(memoized(obj, 3, 7), 10); + a(memoized(obj, 5, 8), 13); + a(memoized(obj, 12, 4), 16); + a.deep(value, [], "Pre"); + a(memoized(obj, 5, 8), 13); + memoized.deleteRef(obj, 5, 8); + a.deep(value, [], "Pre"); + memoized.deleteRef(obj, 5, 8); + a.deep(value, [13], "#1"); + value = []; + memoized.deleteRef(obj, 12, 4); + a.deep(value, [16], "#2"); + + value = []; + memoized(obj, 77, 11); + + x = {}; + y = {}; + z = {}; + memoized = t(function (arg) { + return ++count; + }); + a(memoized(x), 1); + a(memoized(y), 2); + a(memoized(x), 1); + a(memoized(z), 3); + a(count, 3); +}; diff --git a/node_modules/memoizee/test/weak.js b/node_modules/memoizee/test/weak.js new file mode 100644 index 00000000..9170be77 --- /dev/null +++ b/node_modules/memoizee/test/weak.js @@ -0,0 +1,62 @@ +/* eslint id-length: 0, no-shadow: 0, no-unused-vars: 0 */ + +"use strict"; + +module.exports = function (t, a, d) { + var value = [], obj = {}, memoized, count = 0, x, y, z; + memoized = t( + function (arg, x, y) { + a(arg, obj); + return x + y; + }, + { + refCounter: true, + dispose: function (val) { + value.push(val); + } + } + ); + + a(memoized(obj, 3, 7), 10); + a(memoized(obj, 5, 8), 13); + a(memoized(obj, 12, 4), 16); + a.deep(value, [], "Pre"); + a(memoized(obj, 5, 8), 13); + memoized.deleteRef(obj, 5, 8); + a.deep(value, [], "Pre"); + memoized.deleteRef(obj, 5, 8); + a.deep(value, [13], "#1"); + value = []; + memoized.deleteRef(obj, 12, 4); + a.deep(value, [16], "#2"); + + value = []; + memoized(obj, 77, 11); + + x = {}; + y = {}; + z = {}; + memoized = t(function (arg) { + return ++count; + }); + a(memoized(x), 1); + a(memoized(y), 2); + a(memoized(x), 1); + a(memoized(z), 3); + a(count, 3); + + count = 0; + memoized = t( + function (arg) { + return ++count; + }, + { maxAge: 1 } + ); + + memoized(obj); + setTimeout(function () { + memoized(obj); + a(count, 2); + d(); + }, 100); +}; diff --git a/node_modules/memoizee/weak-plain.js b/node_modules/memoizee/weak-plain.js new file mode 100644 index 00000000..9897e6e7 --- /dev/null +++ b/node_modules/memoizee/weak-plain.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./lib/weak")(require("./plain")); diff --git a/node_modules/memoizee/weak.js b/node_modules/memoizee/weak.js new file mode 100644 index 00000000..48e7b850 --- /dev/null +++ b/node_modules/memoizee/weak.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./lib/weak")(require("./")); diff --git a/node_modules/moment-timezone/LICENSE b/node_modules/moment-timezone/LICENSE new file mode 100644 index 00000000..f0bb3b4b --- /dev/null +++ b/node_modules/moment-timezone/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) JS Foundation 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: + +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/moment-timezone/README.md b/node_modules/moment-timezone/README.md new file mode 100644 index 00000000..06b2681e --- /dev/null +++ b/node_modules/moment-timezone/README.md @@ -0,0 +1,36 @@ +# [Moment Timezone](http://momentjs.com/timezone) + +[![Join the chat at https://gitter.im/moment/moment-timezone](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/moment/moment-timezone?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url] [![Build Status][travis-image]][travis-url] + +IANA Time Zone Database + [Moment.js](http://momentjs.com). + +```js +var june = moment("2014-06-01T12:00:00Z"); +june.tz('America/Los_Angeles').format('ha z'); // 5am PDT +june.tz('America/New_York').format('ha z'); // 8am EDT +june.tz('Asia/Tokyo').format('ha z'); // 9pm JST +june.tz('Australia/Sydney').format('ha z'); // 10pm EST + +var dec = moment("2014-12-01T12:00:00Z"); +dec.tz('America/Los_Angeles').format('ha z'); // 4am PST +dec.tz('America/New_York').format('ha z'); // 7am EST +dec.tz('Asia/Tokyo').format('ha z'); // 9pm JST +dec.tz('Australia/Sydney').format('ha z'); // 11pm EST +``` + +#### [Contribute code or compile time zone data](contributing.md) + +#### [Read the changelog](changelog.md) + + +[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat +[license-url]: LICENSE + +[npm-url]: https://npmjs.org/package/moment-timezone +[npm-version-image]: http://img.shields.io/npm/v/moment-timezone.svg?style=flat +[npm-downloads-image]: http://img.shields.io/npm/dm/moment-timezone.svg?style=flat + +[travis-url]: http://travis-ci.org/moment/moment-timezone +[travis-image]: http://img.shields.io/travis/moment/moment-timezone/develop.svg?style=flat diff --git a/node_modules/moment-timezone/builds/moment-timezone-with-data-10-year-range.js b/node_modules/moment-timezone/builds/moment-timezone-with-data-10-year-range.js new file mode 100644 index 00000000..cf853167 --- /dev/null +++ b/node_modules/moment-timezone/builds/moment-timezone-with-data-10-year-range.js @@ -0,0 +1,1224 @@ +//! moment-timezone.js +//! version : 0.5.26 +//! Copyright (c) JS Foundation and other contributors +//! license : MIT +//! github.com/moment/moment-timezone + +(function (root, factory) { + "use strict"; + + /*global define*/ + if (typeof module === 'object' && module.exports) { + module.exports = factory(require('moment')); // Node + } else if (typeof define === 'function' && define.amd) { + define(['moment'], factory); // AMD + } else { + factory(root.moment); // Browser + } +}(this, function (moment) { + "use strict"; + + // Do not load moment-timezone a second time. + // if (moment.tz !== undefined) { + // logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion); + // return moment; + // } + + var VERSION = "0.5.26", + zones = {}, + links = {}, + names = {}, + guesses = {}, + cachedGuess; + + if (!moment || typeof moment.version !== 'string') { + logError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/'); + } + + var momentVersion = moment.version.split('.'), + major = +momentVersion[0], + minor = +momentVersion[1]; + + // Moment.js version check + if (major < 2 || (major === 2 && minor < 6)) { + logError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com'); + } + + /************************************ + Unpacking + ************************************/ + + function charCodeToInt(charCode) { + if (charCode > 96) { + return charCode - 87; + } else if (charCode > 64) { + return charCode - 29; + } + return charCode - 48; + } + + function unpackBase60(string) { + var i = 0, + parts = string.split('.'), + whole = parts[0], + fractional = parts[1] || '', + multiplier = 1, + num, + out = 0, + sign = 1; + + // handle negative numbers + if (string.charCodeAt(0) === 45) { + i = 1; + sign = -1; + } + + // handle digits before the decimal + for (i; i < whole.length; i++) { + num = charCodeToInt(whole.charCodeAt(i)); + out = 60 * out + num; + } + + // handle digits after the decimal + for (i = 0; i < fractional.length; i++) { + multiplier = multiplier / 60; + num = charCodeToInt(fractional.charCodeAt(i)); + out += num * multiplier; + } + + return out * sign; + } + + function arrayToInt (array) { + for (var i = 0; i < array.length; i++) { + array[i] = unpackBase60(array[i]); + } + } + + function intToUntil (array, length) { + for (var i = 0; i < length; i++) { + array[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds + } + + array[length - 1] = Infinity; + } + + function mapIndices (source, indices) { + var out = [], i; + + for (i = 0; i < indices.length; i++) { + out[i] = source[indices[i]]; + } + + return out; + } + + function unpack (string) { + var data = string.split('|'), + offsets = data[2].split(' '), + indices = data[3].split(''), + untils = data[4].split(' '); + + arrayToInt(offsets); + arrayToInt(indices); + arrayToInt(untils); + + intToUntil(untils, indices.length); + + return { + name : data[0], + abbrs : mapIndices(data[1].split(' '), indices), + offsets : mapIndices(offsets, indices), + untils : untils, + population : data[5] | 0 + }; + } + + /************************************ + Zone object + ************************************/ + + function Zone (packedString) { + if (packedString) { + this._set(unpack(packedString)); + } + } + + Zone.prototype = { + _set : function (unpacked) { + this.name = unpacked.name; + this.abbrs = unpacked.abbrs; + this.untils = unpacked.untils; + this.offsets = unpacked.offsets; + this.population = unpacked.population; + }, + + _index : function (timestamp) { + var target = +timestamp, + untils = this.untils, + i; + + for (i = 0; i < untils.length; i++) { + if (target < untils[i]) { + return i; + } + } + }, + + parse : function (timestamp) { + var target = +timestamp, + offsets = this.offsets, + untils = this.untils, + max = untils.length - 1, + offset, offsetNext, offsetPrev, i; + + for (i = 0; i < max; i++) { + offset = offsets[i]; + offsetNext = offsets[i + 1]; + offsetPrev = offsets[i ? i - 1 : i]; + + if (offset < offsetNext && tz.moveAmbiguousForward) { + offset = offsetNext; + } else if (offset > offsetPrev && tz.moveInvalidForward) { + offset = offsetPrev; + } + + if (target < untils[i] - (offset * 60000)) { + return offsets[i]; + } + } + + return offsets[max]; + }, + + abbr : function (mom) { + return this.abbrs[this._index(mom)]; + }, + + offset : function (mom) { + logError("zone.offset has been deprecated in favor of zone.utcOffset"); + return this.offsets[this._index(mom)]; + }, + + utcOffset : function (mom) { + return this.offsets[this._index(mom)]; + } + }; + + /************************************ + Current Timezone + ************************************/ + + function OffsetAt(at) { + var timeString = at.toTimeString(); + var abbr = timeString.match(/\([a-z ]+\)/i); + if (abbr && abbr[0]) { + // 17:56:31 GMT-0600 (CST) + // 17:56:31 GMT-0600 (Central Standard Time) + abbr = abbr[0].match(/[A-Z]/g); + abbr = abbr ? abbr.join('') : undefined; + } else { + // 17:56:31 CST + // 17:56:31 GMT+0800 (台北標準時間) + abbr = timeString.match(/[A-Z]{3,5}/g); + abbr = abbr ? abbr[0] : undefined; + } + + if (abbr === 'GMT') { + abbr = undefined; + } + + this.at = +at; + this.abbr = abbr; + this.offset = at.getTimezoneOffset(); + } + + function ZoneScore(zone) { + this.zone = zone; + this.offsetScore = 0; + this.abbrScore = 0; + } + + ZoneScore.prototype.scoreOffsetAt = function (offsetAt) { + this.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset); + if (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) { + this.abbrScore++; + } + }; + + function findChange(low, high) { + var mid, diff; + + while ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) { + mid = new OffsetAt(new Date(low.at + diff)); + if (mid.offset === low.offset) { + low = mid; + } else { + high = mid; + } + } + + return low; + } + + function userOffsets() { + var startYear = new Date().getFullYear() - 2, + last = new OffsetAt(new Date(startYear, 0, 1)), + offsets = [last], + change, next, i; + + for (i = 1; i < 48; i++) { + next = new OffsetAt(new Date(startYear, i, 1)); + if (next.offset !== last.offset) { + change = findChange(last, next); + offsets.push(change); + offsets.push(new OffsetAt(new Date(change.at + 6e4))); + } + last = next; + } + + for (i = 0; i < 4; i++) { + offsets.push(new OffsetAt(new Date(startYear + i, 0, 1))); + offsets.push(new OffsetAt(new Date(startYear + i, 6, 1))); + } + + return offsets; + } + + function sortZoneScores (a, b) { + if (a.offsetScore !== b.offsetScore) { + return a.offsetScore - b.offsetScore; + } + if (a.abbrScore !== b.abbrScore) { + return a.abbrScore - b.abbrScore; + } + return b.zone.population - a.zone.population; + } + + function addToGuesses (name, offsets) { + var i, offset; + arrayToInt(offsets); + for (i = 0; i < offsets.length; i++) { + offset = offsets[i]; + guesses[offset] = guesses[offset] || {}; + guesses[offset][name] = true; + } + } + + function guessesForUserOffsets (offsets) { + var offsetsLength = offsets.length, + filteredGuesses = {}, + out = [], + i, j, guessesOffset; + + for (i = 0; i < offsetsLength; i++) { + guessesOffset = guesses[offsets[i].offset] || {}; + for (j in guessesOffset) { + if (guessesOffset.hasOwnProperty(j)) { + filteredGuesses[j] = true; + } + } + } + + for (i in filteredGuesses) { + if (filteredGuesses.hasOwnProperty(i)) { + out.push(names[i]); + } + } + + return out; + } + + function rebuildGuess () { + + // use Intl API when available and returning valid time zone + try { + var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone; + if (intlName && intlName.length > 3) { + var name = names[normalizeName(intlName)]; + if (name) { + return name; + } + logError("Moment Timezone found " + intlName + " from the Intl api, but did not have that data loaded."); + } + } catch (e) { + // Intl unavailable, fall back to manual guessing. + } + + var offsets = userOffsets(), + offsetsLength = offsets.length, + guesses = guessesForUserOffsets(offsets), + zoneScores = [], + zoneScore, i, j; + + for (i = 0; i < guesses.length; i++) { + zoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength); + for (j = 0; j < offsetsLength; j++) { + zoneScore.scoreOffsetAt(offsets[j]); + } + zoneScores.push(zoneScore); + } + + zoneScores.sort(sortZoneScores); + + return zoneScores.length > 0 ? zoneScores[0].zone.name : undefined; + } + + function guess (ignoreCache) { + if (!cachedGuess || ignoreCache) { + cachedGuess = rebuildGuess(); + } + return cachedGuess; + } + + /************************************ + Global Methods + ************************************/ + + function normalizeName (name) { + return (name || '').toLowerCase().replace(/\//g, '_'); + } + + function addZone (packed) { + var i, name, split, normalized; + + if (typeof packed === "string") { + packed = [packed]; + } + + for (i = 0; i < packed.length; i++) { + split = packed[i].split('|'); + name = split[0]; + normalized = normalizeName(name); + zones[normalized] = packed[i]; + names[normalized] = name; + addToGuesses(normalized, split[2].split(' ')); + } + } + + function getZone (name, caller) { + + name = normalizeName(name); + + var zone = zones[name]; + var link; + + if (zone instanceof Zone) { + return zone; + } + + if (typeof zone === 'string') { + zone = new Zone(zone); + zones[name] = zone; + return zone; + } + + // Pass getZone to prevent recursion more than 1 level deep + if (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) { + zone = zones[name] = new Zone(); + zone._set(link); + zone.name = names[name]; + return zone; + } + + return null; + } + + function getNames () { + var i, out = []; + + for (i in names) { + if (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) { + out.push(names[i]); + } + } + + return out.sort(); + } + + function addLink (aliases) { + var i, alias, normal0, normal1; + + if (typeof aliases === "string") { + aliases = [aliases]; + } + + for (i = 0; i < aliases.length; i++) { + alias = aliases[i].split('|'); + + normal0 = normalizeName(alias[0]); + normal1 = normalizeName(alias[1]); + + links[normal0] = normal1; + names[normal0] = alias[0]; + + links[normal1] = normal0; + names[normal1] = alias[1]; + } + } + + function loadData (data) { + addZone(data.zones); + addLink(data.links); + tz.dataVersion = data.version; + } + + function zoneExists (name) { + if (!zoneExists.didShowError) { + zoneExists.didShowError = true; + logError("moment.tz.zoneExists('" + name + "') has been deprecated in favor of !moment.tz.zone('" + name + "')"); + } + return !!getZone(name); + } + + function needsOffset (m) { + var isUnixTimestamp = (m._f === 'X' || m._f === 'x'); + return !!(m._a && (m._tzm === undefined) && !isUnixTimestamp); + } + + function logError (message) { + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + } + + /************************************ + moment.tz namespace + ************************************/ + + function tz (input) { + var args = Array.prototype.slice.call(arguments, 0, -1), + name = arguments[arguments.length - 1], + zone = getZone(name), + out = moment.utc.apply(null, args); + + if (zone && !moment.isMoment(input) && needsOffset(out)) { + out.add(zone.parse(out), 'minutes'); + } + + out.tz(name); + + return out; + } + + tz.version = VERSION; + tz.dataVersion = ''; + tz._zones = zones; + tz._links = links; + tz._names = names; + tz.add = addZone; + tz.link = addLink; + tz.load = loadData; + tz.zone = getZone; + tz.zoneExists = zoneExists; // deprecated in 0.1.0 + tz.guess = guess; + tz.names = getNames; + tz.Zone = Zone; + tz.unpack = unpack; + tz.unpackBase60 = unpackBase60; + tz.needsOffset = needsOffset; + tz.moveInvalidForward = true; + tz.moveAmbiguousForward = false; + + /************************************ + Interface with Moment.js + ************************************/ + + var fn = moment.fn; + + moment.tz = tz; + + moment.defaultZone = null; + + moment.updateOffset = function (mom, keepTime) { + var zone = moment.defaultZone, + offset; + + if (mom._z === undefined) { + if (zone && needsOffset(mom) && !mom._isUTC) { + mom._d = moment.utc(mom._a)._d; + mom.utc().add(zone.parse(mom), 'minutes'); + } + mom._z = zone; + } + if (mom._z) { + offset = mom._z.utcOffset(mom); + if (Math.abs(offset) < 16) { + offset = offset / 60; + } + if (mom.utcOffset !== undefined) { + var z = mom._z; + mom.utcOffset(-offset, keepTime); + mom._z = z; + } else { + mom.zone(offset, keepTime); + } + } + }; + + fn.tz = function (name, keepTime) { + if (name) { + if (typeof name !== 'string') { + throw new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']'); + } + this._z = getZone(name); + if (this._z) { + moment.updateOffset(this, keepTime); + } else { + logError("Moment Timezone has no data for " + name + ". See http://momentjs.com/timezone/docs/#/data-loading/."); + } + return this; + } + if (this._z) { return this._z.name; } + }; + + function abbrWrap (old) { + return function () { + if (this._z) { return this._z.abbr(this); } + return old.call(this); + }; + } + + function resetZoneWrap (old) { + return function () { + this._z = null; + return old.apply(this, arguments); + }; + } + + function resetZoneWrap2 (old) { + return function () { + if (arguments.length > 0) this._z = null; + return old.apply(this, arguments); + }; + } + + fn.zoneName = abbrWrap(fn.zoneName); + fn.zoneAbbr = abbrWrap(fn.zoneAbbr); + fn.utc = resetZoneWrap(fn.utc); + fn.local = resetZoneWrap(fn.local); + fn.utcOffset = resetZoneWrap2(fn.utcOffset); + + moment.tz.setDefault = function(name) { + if (major < 2 || (major === 2 && minor < 9)) { + logError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.'); + } + moment.defaultZone = name ? getZone(name) : null; + return moment; + }; + + // Cloning a moment should include the _z property. + var momentProperties = moment.momentProperties; + if (Object.prototype.toString.call(momentProperties) === '[object Array]') { + // moment 2.8.1+ + momentProperties.push('_z'); + momentProperties.push('_a'); + } else if (momentProperties) { + // moment 2.7.0 + momentProperties._z = null; + } + + loadData({ + "version": "2019b", + "zones": [ + "Africa/Abidjan|GMT|0|0||48e5", + "Africa/Nairobi|EAT|-30|0||47e5", + "Africa/Algiers|CET|-10|0||26e5", + "Africa/Lagos|WAT|-10|0||17e6", + "Africa/Maputo|CAT|-20|0||26e5", + "Africa/Cairo|EET EEST|-20 -30|01010|1M2m0 gL0 e10 mn0|15e6", + "Africa/Casablanca|+00 +01|0 -10|01010101010101010101010101010101|1LHC0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00|32e5", + "Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|11e6", + "Africa/Johannesburg|SAST|-20|0||84e5", + "Africa/Khartoum|EAT CAT|-30 -20|01|1Usl0|51e5", + "Africa/Sao_Tome|GMT WAT|0 -10|010|1UQN0 2q00", + "Africa/Tripoli|EET|-20|0||11e5", + "Africa/Windhoek|CAT WAT|-20 -10|010101010|1LKo0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4", + "America/Adak|HST HDT|a0 90|01010101010101010101010|1Lzo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326", + "America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1Lzn0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4", + "America/Santo_Domingo|AST|40|0||29e5", + "America/Fortaleza|-03|30|0||34e5", + "America/Asuncion|-03 -04|30 40|01010101010101010101010|1LEP0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0|28e5", + "America/Panama|EST|50|0||15e5", + "America/Mexico_City|CST CDT|60 50|01010101010101010101010|1LKw0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|20e6", + "America/Managua|CST|60|0||22e5", + "America/La_Paz|-04|40|0||19e5", + "America/Lima|-05|50|0||11e6", + "America/Denver|MST MDT|70 60|01010101010101010101010|1Lzl0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5", + "America/Campo_Grande|-03 -04|30 40|010101010101|1LqP0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4", + "America/Cancun|CST CDT EST|60 50 50|0102|1LKw0 1lb0 Dd0|63e4", + "America/Caracas|-0430 -04|4u 40|01|1QMT0|29e5", + "America/Chicago|CST CDT|60 50|01010101010101010101010|1Lzk0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5", + "America/Chihuahua|MST MDT|70 60|01010101010101010101010|1LKx0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|81e4", + "America/Phoenix|MST|70|0||42e5", + "America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1Lzm0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6", + "America/New_York|EST EDT|50 40|01010101010101010101010|1Lzj0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6", + "America/Fort_Nelson|PST PDT MST|80 70 70|0102|1Lzm0 1zb0 Op0|39e2", + "America/Halifax|AST ADT|40 30|01010101010101010101010|1Lzi0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4", + "America/Godthab|-03 -02|30 20|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e3", + "America/Grand_Turk|EST EDT AST|50 40 40|0101210101010101010|1Lzj0 1zb0 Op0 1zb0 5Ip0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2", + "America/Havana|CST CDT|50 40|01010101010101010101010|1Lzh0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5", + "America/Metlakatla|PST AKST AKDT|80 90 80|012121201212121212121|1PAa0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2", + "America/Miquelon|-03 -02|30 20|01010101010101010101010|1Lzh0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2", + "America/Montevideo|-02 -03|20 30|0101|1Lzg0 1o10 11z0|17e5", + "America/Noronha|-02|20|0||30e2", + "America/Port-au-Prince|EST EDT|50 40|010101010101010101010|1Lzj0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5", + "Antarctica/Palmer|-03 -04|30 40|01010|1LSP0 Rd0 46n0 Ap0|40", + "America/Santiago|-03 -04|30 40|010101010101010101010|1LSP0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0|62e5", + "America/Sao_Paulo|-02 -03|20 30|010101010101|1LqO0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6", + "Atlantic/Azores|-01 +00|10 0|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|25e4", + "America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1Lzhu 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4", + "Antarctica/Casey|+08 +11|-80 -b0|010|1RWg0 3m10|10", + "Asia/Bangkok|+07|-70|0||15e6", + "Pacific/Port_Moresby|+10|-a0|0||25e4", + "Pacific/Guadalcanal|+11|-b0|0||11e4", + "Asia/Tashkent|+05|-50|0||23e5", + "Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1LKe0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00|14e5", + "Asia/Baghdad|+03|-30|0||66e5", + "Antarctica/Troll|+00 +02|0 -20|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|40", + "Asia/Dhaka|+06|-60|0||16e6", + "Asia/Amman|EET EEST|-20 -30|01010101010101010101010|1LGK0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|25e5", + "Asia/Kamchatka|+12|-c0|0||18e4", + "Asia/Baku|+04 +05|-40 -50|01010|1LHA0 1o00 11A0 1o00|27e5", + "Asia/Barnaul|+07 +06|-70 -60|010|1N7v0 3rd0", + "Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1LHy0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0|22e5", + "Asia/Kuala_Lumpur|+08|-80|0||71e5", + "Asia/Kolkata|IST|-5u|0||15e6", + "Asia/Chita|+10 +08 +09|-a0 -80 -90|012|1N7s0 3re0|33e4", + "Asia/Ulaanbaatar|+08 +09|-80 -90|01010|1O8G0 1cJ0 1cP0 1cJ0|12e5", + "Asia/Shanghai|CST|-80|0||23e6", + "Asia/Colombo|+0530|-5u|0||22e5", + "Asia/Damascus|EET EEST|-20 -30|01010101010101010101010|1LGK0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0|26e5", + "Asia/Dili|+09|-90|0||19e4", + "Asia/Dubai|+04|-40|0||39e5", + "Asia/Famagusta|EET EEST +03|-20 -30 -30|0101012010101010101010|1LHB0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00", + "Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1LGK0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0|18e5", + "Asia/Hong_Kong|HKT|-80|0||73e5", + "Asia/Hovd|+07 +08|-70 -80|01010|1O8H0 1cJ0 1cP0 1cJ0|81e3", + "Asia/Irkutsk|+09 +08|-90 -80|01|1N7t0|60e4", + "Europe/Istanbul|EET EEST +03|-20 -30 -30|0101012|1LI10 1nA0 11A0 1tA0 U00 15w0|13e6", + "Asia/Jakarta|WIB|-70|0||31e6", + "Asia/Jayapura|WIT|-90|0||26e4", + "Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1LGM0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0|81e4", + "Asia/Kabul|+0430|-4u|0||46e5", + "Asia/Karachi|PKT|-50|0||24e6", + "Asia/Kathmandu|+0545|-5J|0||12e5", + "Asia/Yakutsk|+10 +09|-a0 -90|01|1N7s0|28e4", + "Asia/Krasnoyarsk|+08 +07|-80 -70|01|1N7u0|10e5", + "Asia/Magadan|+12 +10 +11|-c0 -a0 -b0|012|1N7q0 3Cq0|95e3", + "Asia/Makassar|WITA|-80|0||15e5", + "Asia/Manila|PST|-80|0||24e6", + "Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|35e5", + "Asia/Novosibirsk|+07 +06|-70 -60|010|1N7v0 4eN0|15e5", + "Asia/Omsk|+07 +06|-70 -60|01|1N7v0|12e5", + "Asia/Pyongyang|KST KST|-90 -8u|010|1P4D0 6BA0|29e5", + "Asia/Qyzylorda|+06 +05|-60 -50|01|1Xei0|73e4", + "Asia/Rangoon|+0630|-6u|0||48e5", + "Asia/Sakhalin|+11 +10|-b0 -a0|010|1N7r0 3rd0|58e4", + "Asia/Seoul|KST|-90|0||23e6", + "Asia/Srednekolymsk|+12 +11|-c0 -b0|01|1N7q0|35e2", + "Asia/Tehran|+0330 +0430|-3u -4u|01010101010101010101010|1LEku 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0|14e6", + "Asia/Tokyo|JST|-90|0||38e6", + "Asia/Tomsk|+07 +06|-70 -60|010|1N7v0 3Qp0|10e5", + "Asia/Vladivostok|+11 +10|-b0 -a0|01|1N7r0|60e4", + "Asia/Yekaterinburg|+06 +05|-60 -50|01|1N7w0|14e5", + "Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|27e5", + "Atlantic/Cape_Verde|-01|10|0||50e4", + "Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1LKg0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0|40e5", + "Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1LKgu 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0|11e5", + "Australia/Brisbane|AEST|-a0|0||20e5", + "Australia/Darwin|ACST|-9u|0||12e4", + "Australia/Eucla|+0845|-8J|0||368", + "Australia/Lord_Howe|+11 +1030|-b0 -au|01010101010101010101010|1LKf0 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu|347", + "Australia/Perth|AWST|-80|0||18e5", + "Pacific/Easter|-05 -06|50 60|010101010101010101010|1LSP0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0|30e2", + "Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5", + "Etc/GMT-1|+01|-10|0|", + "Pacific/Fakaofo|+13|-d0|0||483", + "Pacific/Kiritimati|+14|-e0|0||51e2", + "Etc/GMT-2|+02|-20|0|", + "Pacific/Tahiti|-10|a0|0||18e4", + "Pacific/Niue|-11|b0|0||12e2", + "Etc/GMT+12|-12|c0|0|", + "Pacific/Galapagos|-06|60|0||25e3", + "Etc/GMT+7|-07|70|0|", + "Pacific/Pitcairn|-08|80|0||56", + "Pacific/Gambier|-09|90|0||125", + "Etc/UTC|UTC|0|0|", + "Europe/Ulyanovsk|+04 +03|-40 -30|010|1N7y0 3rd0|13e5", + "Europe/London|GMT BST|0 -10|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|10e6", + "Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1LHA0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|67e4", + "Europe/Kaliningrad|+03 EET|-30 -20|01|1N7z0|44e4", + "Europe/Kirov|+04 +03|-40 -30|01|1N7y0|48e4", + "Europe/Moscow|MSK MSK|-40 -30|01|1N7y0|16e6", + "Europe/Saratov|+04 +03|-40 -30|010|1N7y0 5810", + "Europe/Simferopol|EET MSK MSK|-20 -40 -30|012|1LHA0 1nW0|33e4", + "Europe/Volgograd|+04 +03|-40 -30|010|1N7y0 9Jd0|10e5", + "Pacific/Honolulu|HST|a0|0||37e4", + "MET|MET MEST|-10 -20|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00", + "Pacific/Chatham|+1345 +1245|-dJ -cJ|01010101010101010101010|1LKe0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00|600", + "Pacific/Apia|+14 +13|-e0 -d0|01010101010101010101010|1LKe0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00|37e3", + "Pacific/Bougainville|+10 +11|-a0 -b0|01|1NwE0|18e4", + "Pacific/Fiji|+13 +12|-d0 -c0|01010101010101010101010|1Lfp0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0|88e4", + "Pacific/Guam|ChST|-a0|0||17e4", + "Pacific/Marquesas|-0930|9u|0||86e2", + "Pacific/Pago_Pago|SST|b0|0||37e2", + "Pacific/Norfolk|+1130 +11|-bu -b0|01|1PoCu|25e4", + "Pacific/Tongatapu|+13 +14|-d0 -e0|010|1S4d0 s00|75e3" + ], + "links": [ + "Africa/Abidjan|Africa/Accra", + "Africa/Abidjan|Africa/Bamako", + "Africa/Abidjan|Africa/Banjul", + "Africa/Abidjan|Africa/Bissau", + "Africa/Abidjan|Africa/Conakry", + "Africa/Abidjan|Africa/Dakar", + "Africa/Abidjan|Africa/Freetown", + "Africa/Abidjan|Africa/Lome", + "Africa/Abidjan|Africa/Monrovia", + "Africa/Abidjan|Africa/Nouakchott", + "Africa/Abidjan|Africa/Ouagadougou", + "Africa/Abidjan|Africa/Timbuktu", + "Africa/Abidjan|America/Danmarkshavn", + "Africa/Abidjan|Atlantic/Reykjavik", + "Africa/Abidjan|Atlantic/St_Helena", + "Africa/Abidjan|Etc/GMT", + "Africa/Abidjan|Etc/GMT+0", + "Africa/Abidjan|Etc/GMT-0", + "Africa/Abidjan|Etc/GMT0", + "Africa/Abidjan|Etc/Greenwich", + "Africa/Abidjan|GMT", + "Africa/Abidjan|GMT+0", + "Africa/Abidjan|GMT-0", + "Africa/Abidjan|GMT0", + "Africa/Abidjan|Greenwich", + "Africa/Abidjan|Iceland", + "Africa/Algiers|Africa/Tunis", + "Africa/Cairo|Egypt", + "Africa/Casablanca|Africa/El_Aaiun", + "Africa/Johannesburg|Africa/Maseru", + "Africa/Johannesburg|Africa/Mbabane", + "Africa/Lagos|Africa/Bangui", + "Africa/Lagos|Africa/Brazzaville", + "Africa/Lagos|Africa/Douala", + "Africa/Lagos|Africa/Kinshasa", + "Africa/Lagos|Africa/Libreville", + "Africa/Lagos|Africa/Luanda", + "Africa/Lagos|Africa/Malabo", + "Africa/Lagos|Africa/Ndjamena", + "Africa/Lagos|Africa/Niamey", + "Africa/Lagos|Africa/Porto-Novo", + "Africa/Maputo|Africa/Blantyre", + "Africa/Maputo|Africa/Bujumbura", + "Africa/Maputo|Africa/Gaborone", + "Africa/Maputo|Africa/Harare", + "Africa/Maputo|Africa/Kigali", + "Africa/Maputo|Africa/Lubumbashi", + "Africa/Maputo|Africa/Lusaka", + "Africa/Nairobi|Africa/Addis_Ababa", + "Africa/Nairobi|Africa/Asmara", + "Africa/Nairobi|Africa/Asmera", + "Africa/Nairobi|Africa/Dar_es_Salaam", + "Africa/Nairobi|Africa/Djibouti", + "Africa/Nairobi|Africa/Juba", + "Africa/Nairobi|Africa/Kampala", + "Africa/Nairobi|Africa/Mogadishu", + "Africa/Nairobi|Indian/Antananarivo", + "Africa/Nairobi|Indian/Comoro", + "Africa/Nairobi|Indian/Mayotte", + "Africa/Tripoli|Libya", + "America/Adak|America/Atka", + "America/Adak|US/Aleutian", + "America/Anchorage|America/Juneau", + "America/Anchorage|America/Nome", + "America/Anchorage|America/Sitka", + "America/Anchorage|America/Yakutat", + "America/Anchorage|US/Alaska", + "America/Campo_Grande|America/Cuiaba", + "America/Chicago|America/Indiana/Knox", + "America/Chicago|America/Indiana/Tell_City", + "America/Chicago|America/Knox_IN", + "America/Chicago|America/Matamoros", + "America/Chicago|America/Menominee", + "America/Chicago|America/North_Dakota/Beulah", + "America/Chicago|America/North_Dakota/Center", + "America/Chicago|America/North_Dakota/New_Salem", + "America/Chicago|America/Rainy_River", + "America/Chicago|America/Rankin_Inlet", + "America/Chicago|America/Resolute", + "America/Chicago|America/Winnipeg", + "America/Chicago|CST6CDT", + "America/Chicago|Canada/Central", + "America/Chicago|US/Central", + "America/Chicago|US/Indiana-Starke", + "America/Chihuahua|America/Mazatlan", + "America/Chihuahua|Mexico/BajaSur", + "America/Denver|America/Boise", + "America/Denver|America/Cambridge_Bay", + "America/Denver|America/Edmonton", + "America/Denver|America/Inuvik", + "America/Denver|America/Ojinaga", + "America/Denver|America/Shiprock", + "America/Denver|America/Yellowknife", + "America/Denver|Canada/Mountain", + "America/Denver|MST7MDT", + "America/Denver|Navajo", + "America/Denver|US/Mountain", + "America/Fortaleza|America/Araguaina", + "America/Fortaleza|America/Argentina/Buenos_Aires", + "America/Fortaleza|America/Argentina/Catamarca", + "America/Fortaleza|America/Argentina/ComodRivadavia", + "America/Fortaleza|America/Argentina/Cordoba", + "America/Fortaleza|America/Argentina/Jujuy", + "America/Fortaleza|America/Argentina/La_Rioja", + "America/Fortaleza|America/Argentina/Mendoza", + "America/Fortaleza|America/Argentina/Rio_Gallegos", + "America/Fortaleza|America/Argentina/Salta", + "America/Fortaleza|America/Argentina/San_Juan", + "America/Fortaleza|America/Argentina/San_Luis", + "America/Fortaleza|America/Argentina/Tucuman", + "America/Fortaleza|America/Argentina/Ushuaia", + "America/Fortaleza|America/Bahia", + "America/Fortaleza|America/Belem", + "America/Fortaleza|America/Buenos_Aires", + "America/Fortaleza|America/Catamarca", + "America/Fortaleza|America/Cayenne", + "America/Fortaleza|America/Cordoba", + "America/Fortaleza|America/Jujuy", + "America/Fortaleza|America/Maceio", + "America/Fortaleza|America/Mendoza", + "America/Fortaleza|America/Paramaribo", + "America/Fortaleza|America/Recife", + "America/Fortaleza|America/Rosario", + "America/Fortaleza|America/Santarem", + "America/Fortaleza|Antarctica/Rothera", + "America/Fortaleza|Atlantic/Stanley", + "America/Fortaleza|Etc/GMT+3", + "America/Halifax|America/Glace_Bay", + "America/Halifax|America/Goose_Bay", + "America/Halifax|America/Moncton", + "America/Halifax|America/Thule", + "America/Halifax|Atlantic/Bermuda", + "America/Halifax|Canada/Atlantic", + "America/Havana|Cuba", + "America/La_Paz|America/Boa_Vista", + "America/La_Paz|America/Guyana", + "America/La_Paz|America/Manaus", + "America/La_Paz|America/Porto_Velho", + "America/La_Paz|Brazil/West", + "America/La_Paz|Etc/GMT+4", + "America/Lima|America/Bogota", + "America/Lima|America/Eirunepe", + "America/Lima|America/Guayaquil", + "America/Lima|America/Porto_Acre", + "America/Lima|America/Rio_Branco", + "America/Lima|Brazil/Acre", + "America/Lima|Etc/GMT+5", + "America/Los_Angeles|America/Dawson", + "America/Los_Angeles|America/Ensenada", + "America/Los_Angeles|America/Santa_Isabel", + "America/Los_Angeles|America/Tijuana", + "America/Los_Angeles|America/Vancouver", + "America/Los_Angeles|America/Whitehorse", + "America/Los_Angeles|Canada/Pacific", + "America/Los_Angeles|Canada/Yukon", + "America/Los_Angeles|Mexico/BajaNorte", + "America/Los_Angeles|PST8PDT", + "America/Los_Angeles|US/Pacific", + "America/Los_Angeles|US/Pacific-New", + "America/Managua|America/Belize", + "America/Managua|America/Costa_Rica", + "America/Managua|America/El_Salvador", + "America/Managua|America/Guatemala", + "America/Managua|America/Regina", + "America/Managua|America/Swift_Current", + "America/Managua|America/Tegucigalpa", + "America/Managua|Canada/Saskatchewan", + "America/Mexico_City|America/Bahia_Banderas", + "America/Mexico_City|America/Merida", + "America/Mexico_City|America/Monterrey", + "America/Mexico_City|Mexico/General", + "America/New_York|America/Detroit", + "America/New_York|America/Fort_Wayne", + "America/New_York|America/Indiana/Indianapolis", + "America/New_York|America/Indiana/Marengo", + "America/New_York|America/Indiana/Petersburg", + "America/New_York|America/Indiana/Vevay", + "America/New_York|America/Indiana/Vincennes", + "America/New_York|America/Indiana/Winamac", + "America/New_York|America/Indianapolis", + "America/New_York|America/Iqaluit", + "America/New_York|America/Kentucky/Louisville", + "America/New_York|America/Kentucky/Monticello", + "America/New_York|America/Louisville", + "America/New_York|America/Montreal", + "America/New_York|America/Nassau", + "America/New_York|America/Nipigon", + "America/New_York|America/Pangnirtung", + "America/New_York|America/Thunder_Bay", + "America/New_York|America/Toronto", + "America/New_York|Canada/Eastern", + "America/New_York|EST5EDT", + "America/New_York|US/East-Indiana", + "America/New_York|US/Eastern", + "America/New_York|US/Michigan", + "America/Noronha|Atlantic/South_Georgia", + "America/Noronha|Brazil/DeNoronha", + "America/Noronha|Etc/GMT+2", + "America/Panama|America/Atikokan", + "America/Panama|America/Cayman", + "America/Panama|America/Coral_Harbour", + "America/Panama|America/Jamaica", + "America/Panama|EST", + "America/Panama|Jamaica", + "America/Phoenix|America/Creston", + "America/Phoenix|America/Dawson_Creek", + "America/Phoenix|America/Hermosillo", + "America/Phoenix|MST", + "America/Phoenix|US/Arizona", + "America/Santiago|Chile/Continental", + "America/Santo_Domingo|America/Anguilla", + "America/Santo_Domingo|America/Antigua", + "America/Santo_Domingo|America/Aruba", + "America/Santo_Domingo|America/Barbados", + "America/Santo_Domingo|America/Blanc-Sablon", + "America/Santo_Domingo|America/Curacao", + "America/Santo_Domingo|America/Dominica", + "America/Santo_Domingo|America/Grenada", + "America/Santo_Domingo|America/Guadeloupe", + "America/Santo_Domingo|America/Kralendijk", + "America/Santo_Domingo|America/Lower_Princes", + "America/Santo_Domingo|America/Marigot", + "America/Santo_Domingo|America/Martinique", + "America/Santo_Domingo|America/Montserrat", + "America/Santo_Domingo|America/Port_of_Spain", + "America/Santo_Domingo|America/Puerto_Rico", + "America/Santo_Domingo|America/St_Barthelemy", + "America/Santo_Domingo|America/St_Kitts", + "America/Santo_Domingo|America/St_Lucia", + "America/Santo_Domingo|America/St_Thomas", + "America/Santo_Domingo|America/St_Vincent", + "America/Santo_Domingo|America/Tortola", + "America/Santo_Domingo|America/Virgin", + "America/Sao_Paulo|Brazil/East", + "America/St_Johns|Canada/Newfoundland", + "Antarctica/Palmer|America/Punta_Arenas", + "Asia/Baghdad|Antarctica/Syowa", + "Asia/Baghdad|Asia/Aden", + "Asia/Baghdad|Asia/Bahrain", + "Asia/Baghdad|Asia/Kuwait", + "Asia/Baghdad|Asia/Qatar", + "Asia/Baghdad|Asia/Riyadh", + "Asia/Baghdad|Etc/GMT-3", + "Asia/Baghdad|Europe/Minsk", + "Asia/Bangkok|Antarctica/Davis", + "Asia/Bangkok|Asia/Ho_Chi_Minh", + "Asia/Bangkok|Asia/Novokuznetsk", + "Asia/Bangkok|Asia/Phnom_Penh", + "Asia/Bangkok|Asia/Saigon", + "Asia/Bangkok|Asia/Vientiane", + "Asia/Bangkok|Etc/GMT-7", + "Asia/Bangkok|Indian/Christmas", + "Asia/Dhaka|Antarctica/Vostok", + "Asia/Dhaka|Asia/Almaty", + "Asia/Dhaka|Asia/Bishkek", + "Asia/Dhaka|Asia/Dacca", + "Asia/Dhaka|Asia/Kashgar", + "Asia/Dhaka|Asia/Qostanay", + "Asia/Dhaka|Asia/Thimbu", + "Asia/Dhaka|Asia/Thimphu", + "Asia/Dhaka|Asia/Urumqi", + "Asia/Dhaka|Etc/GMT-6", + "Asia/Dhaka|Indian/Chagos", + "Asia/Dili|Etc/GMT-9", + "Asia/Dili|Pacific/Palau", + "Asia/Dubai|Asia/Muscat", + "Asia/Dubai|Asia/Tbilisi", + "Asia/Dubai|Asia/Yerevan", + "Asia/Dubai|Etc/GMT-4", + "Asia/Dubai|Europe/Samara", + "Asia/Dubai|Indian/Mahe", + "Asia/Dubai|Indian/Mauritius", + "Asia/Dubai|Indian/Reunion", + "Asia/Gaza|Asia/Hebron", + "Asia/Hong_Kong|Hongkong", + "Asia/Jakarta|Asia/Pontianak", + "Asia/Jerusalem|Asia/Tel_Aviv", + "Asia/Jerusalem|Israel", + "Asia/Kamchatka|Asia/Anadyr", + "Asia/Kamchatka|Etc/GMT-12", + "Asia/Kamchatka|Kwajalein", + "Asia/Kamchatka|Pacific/Funafuti", + "Asia/Kamchatka|Pacific/Kwajalein", + "Asia/Kamchatka|Pacific/Majuro", + "Asia/Kamchatka|Pacific/Nauru", + "Asia/Kamchatka|Pacific/Tarawa", + "Asia/Kamchatka|Pacific/Wake", + "Asia/Kamchatka|Pacific/Wallis", + "Asia/Kathmandu|Asia/Katmandu", + "Asia/Kolkata|Asia/Calcutta", + "Asia/Kuala_Lumpur|Asia/Brunei", + "Asia/Kuala_Lumpur|Asia/Kuching", + "Asia/Kuala_Lumpur|Asia/Singapore", + "Asia/Kuala_Lumpur|Etc/GMT-8", + "Asia/Kuala_Lumpur|Singapore", + "Asia/Makassar|Asia/Ujung_Pandang", + "Asia/Rangoon|Asia/Yangon", + "Asia/Rangoon|Indian/Cocos", + "Asia/Seoul|ROK", + "Asia/Shanghai|Asia/Chongqing", + "Asia/Shanghai|Asia/Chungking", + "Asia/Shanghai|Asia/Harbin", + "Asia/Shanghai|Asia/Macao", + "Asia/Shanghai|Asia/Macau", + "Asia/Shanghai|Asia/Taipei", + "Asia/Shanghai|PRC", + "Asia/Shanghai|ROC", + "Asia/Tashkent|Antarctica/Mawson", + "Asia/Tashkent|Asia/Aqtau", + "Asia/Tashkent|Asia/Aqtobe", + "Asia/Tashkent|Asia/Ashgabat", + "Asia/Tashkent|Asia/Ashkhabad", + "Asia/Tashkent|Asia/Atyrau", + "Asia/Tashkent|Asia/Dushanbe", + "Asia/Tashkent|Asia/Oral", + "Asia/Tashkent|Asia/Samarkand", + "Asia/Tashkent|Etc/GMT-5", + "Asia/Tashkent|Indian/Kerguelen", + "Asia/Tashkent|Indian/Maldives", + "Asia/Tehran|Iran", + "Asia/Tokyo|Japan", + "Asia/Ulaanbaatar|Asia/Choibalsan", + "Asia/Ulaanbaatar|Asia/Ulan_Bator", + "Asia/Vladivostok|Asia/Ust-Nera", + "Asia/Yakutsk|Asia/Khandyga", + "Atlantic/Azores|America/Scoresbysund", + "Atlantic/Cape_Verde|Etc/GMT+1", + "Australia/Adelaide|Australia/Broken_Hill", + "Australia/Adelaide|Australia/South", + "Australia/Adelaide|Australia/Yancowinna", + "Australia/Brisbane|Australia/Lindeman", + "Australia/Brisbane|Australia/Queensland", + "Australia/Darwin|Australia/North", + "Australia/Lord_Howe|Australia/LHI", + "Australia/Perth|Australia/West", + "Australia/Sydney|Australia/ACT", + "Australia/Sydney|Australia/Canberra", + "Australia/Sydney|Australia/Currie", + "Australia/Sydney|Australia/Hobart", + "Australia/Sydney|Australia/Melbourne", + "Australia/Sydney|Australia/NSW", + "Australia/Sydney|Australia/Tasmania", + "Australia/Sydney|Australia/Victoria", + "Etc/UTC|Etc/UCT", + "Etc/UTC|Etc/Universal", + "Etc/UTC|Etc/Zulu", + "Etc/UTC|UCT", + "Etc/UTC|UTC", + "Etc/UTC|Universal", + "Etc/UTC|Zulu", + "Europe/Athens|Asia/Nicosia", + "Europe/Athens|EET", + "Europe/Athens|Europe/Bucharest", + "Europe/Athens|Europe/Helsinki", + "Europe/Athens|Europe/Kiev", + "Europe/Athens|Europe/Mariehamn", + "Europe/Athens|Europe/Nicosia", + "Europe/Athens|Europe/Riga", + "Europe/Athens|Europe/Sofia", + "Europe/Athens|Europe/Tallinn", + "Europe/Athens|Europe/Uzhgorod", + "Europe/Athens|Europe/Vilnius", + "Europe/Athens|Europe/Zaporozhye", + "Europe/Chisinau|Europe/Tiraspol", + "Europe/Dublin|Eire", + "Europe/Istanbul|Asia/Istanbul", + "Europe/Istanbul|Turkey", + "Europe/Lisbon|Atlantic/Canary", + "Europe/Lisbon|Atlantic/Faeroe", + "Europe/Lisbon|Atlantic/Faroe", + "Europe/Lisbon|Atlantic/Madeira", + "Europe/Lisbon|Portugal", + "Europe/Lisbon|WET", + "Europe/London|Europe/Belfast", + "Europe/London|Europe/Guernsey", + "Europe/London|Europe/Isle_of_Man", + "Europe/London|Europe/Jersey", + "Europe/London|GB", + "Europe/London|GB-Eire", + "Europe/Moscow|W-SU", + "Europe/Paris|Africa/Ceuta", + "Europe/Paris|Arctic/Longyearbyen", + "Europe/Paris|Atlantic/Jan_Mayen", + "Europe/Paris|CET", + "Europe/Paris|Europe/Amsterdam", + "Europe/Paris|Europe/Andorra", + "Europe/Paris|Europe/Belgrade", + "Europe/Paris|Europe/Berlin", + "Europe/Paris|Europe/Bratislava", + "Europe/Paris|Europe/Brussels", + "Europe/Paris|Europe/Budapest", + "Europe/Paris|Europe/Busingen", + "Europe/Paris|Europe/Copenhagen", + "Europe/Paris|Europe/Gibraltar", + "Europe/Paris|Europe/Ljubljana", + "Europe/Paris|Europe/Luxembourg", + "Europe/Paris|Europe/Madrid", + "Europe/Paris|Europe/Malta", + "Europe/Paris|Europe/Monaco", + "Europe/Paris|Europe/Oslo", + "Europe/Paris|Europe/Podgorica", + "Europe/Paris|Europe/Prague", + "Europe/Paris|Europe/Rome", + "Europe/Paris|Europe/San_Marino", + "Europe/Paris|Europe/Sarajevo", + "Europe/Paris|Europe/Skopje", + "Europe/Paris|Europe/Stockholm", + "Europe/Paris|Europe/Tirane", + "Europe/Paris|Europe/Vaduz", + "Europe/Paris|Europe/Vatican", + "Europe/Paris|Europe/Vienna", + "Europe/Paris|Europe/Warsaw", + "Europe/Paris|Europe/Zagreb", + "Europe/Paris|Europe/Zurich", + "Europe/Paris|Poland", + "Europe/Ulyanovsk|Europe/Astrakhan", + "Pacific/Auckland|Antarctica/McMurdo", + "Pacific/Auckland|Antarctica/South_Pole", + "Pacific/Auckland|NZ", + "Pacific/Chatham|NZ-CHAT", + "Pacific/Easter|Chile/EasterIsland", + "Pacific/Fakaofo|Etc/GMT-13", + "Pacific/Fakaofo|Pacific/Enderbury", + "Pacific/Galapagos|Etc/GMT+6", + "Pacific/Gambier|Etc/GMT+9", + "Pacific/Guadalcanal|Antarctica/Macquarie", + "Pacific/Guadalcanal|Etc/GMT-11", + "Pacific/Guadalcanal|Pacific/Efate", + "Pacific/Guadalcanal|Pacific/Kosrae", + "Pacific/Guadalcanal|Pacific/Noumea", + "Pacific/Guadalcanal|Pacific/Pohnpei", + "Pacific/Guadalcanal|Pacific/Ponape", + "Pacific/Guam|Pacific/Saipan", + "Pacific/Honolulu|HST", + "Pacific/Honolulu|Pacific/Johnston", + "Pacific/Honolulu|US/Hawaii", + "Pacific/Kiritimati|Etc/GMT-14", + "Pacific/Niue|Etc/GMT+11", + "Pacific/Pago_Pago|Pacific/Midway", + "Pacific/Pago_Pago|Pacific/Samoa", + "Pacific/Pago_Pago|US/Samoa", + "Pacific/Pitcairn|Etc/GMT+8", + "Pacific/Port_Moresby|Antarctica/DumontDUrville", + "Pacific/Port_Moresby|Etc/GMT-10", + "Pacific/Port_Moresby|Pacific/Chuuk", + "Pacific/Port_Moresby|Pacific/Truk", + "Pacific/Port_Moresby|Pacific/Yap", + "Pacific/Tahiti|Etc/GMT+10", + "Pacific/Tahiti|Pacific/Rarotonga" + ] + }); + + + return moment; +})); diff --git a/node_modules/moment-timezone/builds/moment-timezone-with-data-10-year-range.min.js b/node_modules/moment-timezone/builds/moment-timezone-with-data-10-year-range.min.js new file mode 100644 index 00000000..5d2fcb4b --- /dev/null +++ b/node_modules/moment-timezone/builds/moment-timezone-with-data-10-year-range.min.js @@ -0,0 +1 @@ +!function(a,i){"use strict";"object"==typeof module&&module.exports?module.exports=i(require("moment")):"function"==typeof define&&define.amd?define(["moment"],i):i(a.moment)}(this,function(c){"use strict";var i,A={},n={},s={},u={};c&&"string"==typeof c.version||L("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var a=c.version.split("."),e=+a[0],r=+a[1];function t(a){return 96= 2.6.0. You are using Moment.js "+c.version+". See momentjs.com"),p.prototype={_set:function(a){this.name=a.name,this.abbrs=a.abbrs,this.untils=a.untils,this.offsets=a.offsets,this.population=a.population},_index:function(a){var i,e=+a,r=this.untils;for(i=0;i= 2.9.0. You are using Moment.js "+c.version+"."),c.defaultZone=a?P(a):null,c};var y=c.momentProperties;return"[object Array]"===Object.prototype.toString.call(y)?(y.push("_z"),y.push("_a")):y&&(y._z=null),_({version:"2019b",zones:["Africa/Abidjan|GMT|0|0||48e5","Africa/Nairobi|EAT|-30|0||47e5","Africa/Algiers|CET|-10|0||26e5","Africa/Lagos|WAT|-10|0||17e6","Africa/Maputo|CAT|-20|0||26e5","Africa/Cairo|EET EEST|-20 -30|01010|1M2m0 gL0 e10 mn0|15e6","Africa/Casablanca|+00 +01|0 -10|01010101010101010101010101010101|1LHC0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00|32e5","Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|11e6","Africa/Johannesburg|SAST|-20|0||84e5","Africa/Khartoum|EAT CAT|-30 -20|01|1Usl0|51e5","Africa/Sao_Tome|GMT WAT|0 -10|010|1UQN0 2q00","Africa/Tripoli|EET|-20|0||11e5","Africa/Windhoek|CAT WAT|-20 -10|010101010|1LKo0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4","America/Adak|HST HDT|a0 90|01010101010101010101010|1Lzo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326","America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1Lzn0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4","America/Santo_Domingo|AST|40|0||29e5","America/Fortaleza|-03|30|0||34e5","America/Asuncion|-03 -04|30 40|01010101010101010101010|1LEP0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0|28e5","America/Panama|EST|50|0||15e5","America/Mexico_City|CST CDT|60 50|01010101010101010101010|1LKw0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|20e6","America/Managua|CST|60|0||22e5","America/La_Paz|-04|40|0||19e5","America/Lima|-05|50|0||11e6","America/Denver|MST MDT|70 60|01010101010101010101010|1Lzl0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5","America/Campo_Grande|-03 -04|30 40|010101010101|1LqP0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4","America/Cancun|CST CDT EST|60 50 50|0102|1LKw0 1lb0 Dd0|63e4","America/Caracas|-0430 -04|4u 40|01|1QMT0|29e5","America/Chicago|CST CDT|60 50|01010101010101010101010|1Lzk0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5","America/Chihuahua|MST MDT|70 60|01010101010101010101010|1LKx0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|81e4","America/Phoenix|MST|70|0||42e5","America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1Lzm0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6","America/New_York|EST EDT|50 40|01010101010101010101010|1Lzj0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6","America/Fort_Nelson|PST PDT MST|80 70 70|0102|1Lzm0 1zb0 Op0|39e2","America/Halifax|AST ADT|40 30|01010101010101010101010|1Lzi0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4","America/Godthab|-03 -02|30 20|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e3","America/Grand_Turk|EST EDT AST|50 40 40|0101210101010101010|1Lzj0 1zb0 Op0 1zb0 5Ip0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2","America/Havana|CST CDT|50 40|01010101010101010101010|1Lzh0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5","America/Metlakatla|PST AKST AKDT|80 90 80|012121201212121212121|1PAa0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2","America/Miquelon|-03 -02|30 20|01010101010101010101010|1Lzh0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2","America/Montevideo|-02 -03|20 30|0101|1Lzg0 1o10 11z0|17e5","America/Noronha|-02|20|0||30e2","America/Port-au-Prince|EST EDT|50 40|010101010101010101010|1Lzj0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5","Antarctica/Palmer|-03 -04|30 40|01010|1LSP0 Rd0 46n0 Ap0|40","America/Santiago|-03 -04|30 40|010101010101010101010|1LSP0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0|62e5","America/Sao_Paulo|-02 -03|20 30|010101010101|1LqO0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6","Atlantic/Azores|-01 +00|10 0|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|25e4","America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1Lzhu 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4","Antarctica/Casey|+08 +11|-80 -b0|010|1RWg0 3m10|10","Asia/Bangkok|+07|-70|0||15e6","Pacific/Port_Moresby|+10|-a0|0||25e4","Pacific/Guadalcanal|+11|-b0|0||11e4","Asia/Tashkent|+05|-50|0||23e5","Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1LKe0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00|14e5","Asia/Baghdad|+03|-30|0||66e5","Antarctica/Troll|+00 +02|0 -20|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|40","Asia/Dhaka|+06|-60|0||16e6","Asia/Amman|EET EEST|-20 -30|01010101010101010101010|1LGK0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|25e5","Asia/Kamchatka|+12|-c0|0||18e4","Asia/Baku|+04 +05|-40 -50|01010|1LHA0 1o00 11A0 1o00|27e5","Asia/Barnaul|+07 +06|-70 -60|010|1N7v0 3rd0","Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1LHy0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0|22e5","Asia/Kuala_Lumpur|+08|-80|0||71e5","Asia/Kolkata|IST|-5u|0||15e6","Asia/Chita|+10 +08 +09|-a0 -80 -90|012|1N7s0 3re0|33e4","Asia/Ulaanbaatar|+08 +09|-80 -90|01010|1O8G0 1cJ0 1cP0 1cJ0|12e5","Asia/Shanghai|CST|-80|0||23e6","Asia/Colombo|+0530|-5u|0||22e5","Asia/Damascus|EET EEST|-20 -30|01010101010101010101010|1LGK0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0|26e5","Asia/Dili|+09|-90|0||19e4","Asia/Dubai|+04|-40|0||39e5","Asia/Famagusta|EET EEST +03|-20 -30 -30|0101012010101010101010|1LHB0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00","Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1LGK0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0|18e5","Asia/Hong_Kong|HKT|-80|0||73e5","Asia/Hovd|+07 +08|-70 -80|01010|1O8H0 1cJ0 1cP0 1cJ0|81e3","Asia/Irkutsk|+09 +08|-90 -80|01|1N7t0|60e4","Europe/Istanbul|EET EEST +03|-20 -30 -30|0101012|1LI10 1nA0 11A0 1tA0 U00 15w0|13e6","Asia/Jakarta|WIB|-70|0||31e6","Asia/Jayapura|WIT|-90|0||26e4","Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1LGM0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0|81e4","Asia/Kabul|+0430|-4u|0||46e5","Asia/Karachi|PKT|-50|0||24e6","Asia/Kathmandu|+0545|-5J|0||12e5","Asia/Yakutsk|+10 +09|-a0 -90|01|1N7s0|28e4","Asia/Krasnoyarsk|+08 +07|-80 -70|01|1N7u0|10e5","Asia/Magadan|+12 +10 +11|-c0 -a0 -b0|012|1N7q0 3Cq0|95e3","Asia/Makassar|WITA|-80|0||15e5","Asia/Manila|PST|-80|0||24e6","Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|35e5","Asia/Novosibirsk|+07 +06|-70 -60|010|1N7v0 4eN0|15e5","Asia/Omsk|+07 +06|-70 -60|01|1N7v0|12e5","Asia/Pyongyang|KST KST|-90 -8u|010|1P4D0 6BA0|29e5","Asia/Qyzylorda|+06 +05|-60 -50|01|1Xei0|73e4","Asia/Rangoon|+0630|-6u|0||48e5","Asia/Sakhalin|+11 +10|-b0 -a0|010|1N7r0 3rd0|58e4","Asia/Seoul|KST|-90|0||23e6","Asia/Srednekolymsk|+12 +11|-c0 -b0|01|1N7q0|35e2","Asia/Tehran|+0330 +0430|-3u -4u|01010101010101010101010|1LEku 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0|14e6","Asia/Tokyo|JST|-90|0||38e6","Asia/Tomsk|+07 +06|-70 -60|010|1N7v0 3Qp0|10e5","Asia/Vladivostok|+11 +10|-b0 -a0|01|1N7r0|60e4","Asia/Yekaterinburg|+06 +05|-60 -50|01|1N7w0|14e5","Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|27e5","Atlantic/Cape_Verde|-01|10|0||50e4","Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1LKg0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0|40e5","Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1LKgu 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0|11e5","Australia/Brisbane|AEST|-a0|0||20e5","Australia/Darwin|ACST|-9u|0||12e4","Australia/Eucla|+0845|-8J|0||368","Australia/Lord_Howe|+11 +1030|-b0 -au|01010101010101010101010|1LKf0 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu|347","Australia/Perth|AWST|-80|0||18e5","Pacific/Easter|-05 -06|50 60|010101010101010101010|1LSP0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0|30e2","Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5","Etc/GMT-1|+01|-10|0|","Pacific/Fakaofo|+13|-d0|0||483","Pacific/Kiritimati|+14|-e0|0||51e2","Etc/GMT-2|+02|-20|0|","Pacific/Tahiti|-10|a0|0||18e4","Pacific/Niue|-11|b0|0||12e2","Etc/GMT+12|-12|c0|0|","Pacific/Galapagos|-06|60|0||25e3","Etc/GMT+7|-07|70|0|","Pacific/Pitcairn|-08|80|0||56","Pacific/Gambier|-09|90|0||125","Etc/UTC|UTC|0|0|","Europe/Ulyanovsk|+04 +03|-40 -30|010|1N7y0 3rd0|13e5","Europe/London|GMT BST|0 -10|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|10e6","Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1LHA0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|67e4","Europe/Kaliningrad|+03 EET|-30 -20|01|1N7z0|44e4","Europe/Kirov|+04 +03|-40 -30|01|1N7y0|48e4","Europe/Moscow|MSK MSK|-40 -30|01|1N7y0|16e6","Europe/Saratov|+04 +03|-40 -30|010|1N7y0 5810","Europe/Simferopol|EET MSK MSK|-20 -40 -30|012|1LHA0 1nW0|33e4","Europe/Volgograd|+04 +03|-40 -30|010|1N7y0 9Jd0|10e5","Pacific/Honolulu|HST|a0|0||37e4","MET|MET MEST|-10 -20|01010101010101010101010|1LHB0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00","Pacific/Chatham|+1345 +1245|-dJ -cJ|01010101010101010101010|1LKe0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00|600","Pacific/Apia|+14 +13|-e0 -d0|01010101010101010101010|1LKe0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00|37e3","Pacific/Bougainville|+10 +11|-a0 -b0|01|1NwE0|18e4","Pacific/Fiji|+13 +12|-d0 -c0|01010101010101010101010|1Lfp0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0|88e4","Pacific/Guam|ChST|-a0|0||17e4","Pacific/Marquesas|-0930|9u|0||86e2","Pacific/Pago_Pago|SST|b0|0||37e2","Pacific/Norfolk|+1130 +11|-bu -b0|01|1PoCu|25e4","Pacific/Tongatapu|+13 +14|-d0 -e0|010|1S4d0 s00|75e3"],links:["Africa/Abidjan|Africa/Accra","Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Bissau","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Monrovia","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|America/Danmarkshavn","Africa/Abidjan|Atlantic/Reykjavik","Africa/Abidjan|Atlantic/St_Helena","Africa/Abidjan|Etc/GMT","Africa/Abidjan|Etc/GMT+0","Africa/Abidjan|Etc/GMT-0","Africa/Abidjan|Etc/GMT0","Africa/Abidjan|Etc/Greenwich","Africa/Abidjan|GMT","Africa/Abidjan|GMT+0","Africa/Abidjan|GMT-0","Africa/Abidjan|GMT0","Africa/Abidjan|Greenwich","Africa/Abidjan|Iceland","Africa/Algiers|Africa/Tunis","Africa/Cairo|Egypt","Africa/Casablanca|Africa/El_Aaiun","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Lagos|Africa/Bangui","Africa/Lagos|Africa/Brazzaville","Africa/Lagos|Africa/Douala","Africa/Lagos|Africa/Kinshasa","Africa/Lagos|Africa/Libreville","Africa/Lagos|Africa/Luanda","Africa/Lagos|Africa/Malabo","Africa/Lagos|Africa/Ndjamena","Africa/Lagos|Africa/Niamey","Africa/Lagos|Africa/Porto-Novo","Africa/Maputo|Africa/Blantyre","Africa/Maputo|Africa/Bujumbura","Africa/Maputo|Africa/Gaborone","Africa/Maputo|Africa/Harare","Africa/Maputo|Africa/Kigali","Africa/Maputo|Africa/Lubumbashi","Africa/Maputo|Africa/Lusaka","Africa/Nairobi|Africa/Addis_Ababa","Africa/Nairobi|Africa/Asmara","Africa/Nairobi|Africa/Asmera","Africa/Nairobi|Africa/Dar_es_Salaam","Africa/Nairobi|Africa/Djibouti","Africa/Nairobi|Africa/Juba","Africa/Nairobi|Africa/Kampala","Africa/Nairobi|Africa/Mogadishu","Africa/Nairobi|Indian/Antananarivo","Africa/Nairobi|Indian/Comoro","Africa/Nairobi|Indian/Mayotte","Africa/Tripoli|Libya","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|America/Juneau","America/Anchorage|America/Nome","America/Anchorage|America/Sitka","America/Anchorage|America/Yakutat","America/Anchorage|US/Alaska","America/Campo_Grande|America/Cuiaba","America/Chicago|America/Indiana/Knox","America/Chicago|America/Indiana/Tell_City","America/Chicago|America/Knox_IN","America/Chicago|America/Matamoros","America/Chicago|America/Menominee","America/Chicago|America/North_Dakota/Beulah","America/Chicago|America/North_Dakota/Center","America/Chicago|America/North_Dakota/New_Salem","America/Chicago|America/Rainy_River","America/Chicago|America/Rankin_Inlet","America/Chicago|America/Resolute","America/Chicago|America/Winnipeg","America/Chicago|CST6CDT","America/Chicago|Canada/Central","America/Chicago|US/Central","America/Chicago|US/Indiana-Starke","America/Chihuahua|America/Mazatlan","America/Chihuahua|Mexico/BajaSur","America/Denver|America/Boise","America/Denver|America/Cambridge_Bay","America/Denver|America/Edmonton","America/Denver|America/Inuvik","America/Denver|America/Ojinaga","America/Denver|America/Shiprock","America/Denver|America/Yellowknife","America/Denver|Canada/Mountain","America/Denver|MST7MDT","America/Denver|Navajo","America/Denver|US/Mountain","America/Fortaleza|America/Araguaina","America/Fortaleza|America/Argentina/Buenos_Aires","America/Fortaleza|America/Argentina/Catamarca","America/Fortaleza|America/Argentina/ComodRivadavia","America/Fortaleza|America/Argentina/Cordoba","America/Fortaleza|America/Argentina/Jujuy","America/Fortaleza|America/Argentina/La_Rioja","America/Fortaleza|America/Argentina/Mendoza","America/Fortaleza|America/Argentina/Rio_Gallegos","America/Fortaleza|America/Argentina/Salta","America/Fortaleza|America/Argentina/San_Juan","America/Fortaleza|America/Argentina/San_Luis","America/Fortaleza|America/Argentina/Tucuman","America/Fortaleza|America/Argentina/Ushuaia","America/Fortaleza|America/Bahia","America/Fortaleza|America/Belem","America/Fortaleza|America/Buenos_Aires","America/Fortaleza|America/Catamarca","America/Fortaleza|America/Cayenne","America/Fortaleza|America/Cordoba","America/Fortaleza|America/Jujuy","America/Fortaleza|America/Maceio","America/Fortaleza|America/Mendoza","America/Fortaleza|America/Paramaribo","America/Fortaleza|America/Recife","America/Fortaleza|America/Rosario","America/Fortaleza|America/Santarem","America/Fortaleza|Antarctica/Rothera","America/Fortaleza|Atlantic/Stanley","America/Fortaleza|Etc/GMT+3","America/Halifax|America/Glace_Bay","America/Halifax|America/Goose_Bay","America/Halifax|America/Moncton","America/Halifax|America/Thule","America/Halifax|Atlantic/Bermuda","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/La_Paz|America/Boa_Vista","America/La_Paz|America/Guyana","America/La_Paz|America/Manaus","America/La_Paz|America/Porto_Velho","America/La_Paz|Brazil/West","America/La_Paz|Etc/GMT+4","America/Lima|America/Bogota","America/Lima|America/Eirunepe","America/Lima|America/Guayaquil","America/Lima|America/Porto_Acre","America/Lima|America/Rio_Branco","America/Lima|Brazil/Acre","America/Lima|Etc/GMT+5","America/Los_Angeles|America/Dawson","America/Los_Angeles|America/Ensenada","America/Los_Angeles|America/Santa_Isabel","America/Los_Angeles|America/Tijuana","America/Los_Angeles|America/Vancouver","America/Los_Angeles|America/Whitehorse","America/Los_Angeles|Canada/Pacific","America/Los_Angeles|Canada/Yukon","America/Los_Angeles|Mexico/BajaNorte","America/Los_Angeles|PST8PDT","America/Los_Angeles|US/Pacific","America/Los_Angeles|US/Pacific-New","America/Managua|America/Belize","America/Managua|America/Costa_Rica","America/Managua|America/El_Salvador","America/Managua|America/Guatemala","America/Managua|America/Regina","America/Managua|America/Swift_Current","America/Managua|America/Tegucigalpa","America/Managua|Canada/Saskatchewan","America/Mexico_City|America/Bahia_Banderas","America/Mexico_City|America/Merida","America/Mexico_City|America/Monterrey","America/Mexico_City|Mexico/General","America/New_York|America/Detroit","America/New_York|America/Fort_Wayne","America/New_York|America/Indiana/Indianapolis","America/New_York|America/Indiana/Marengo","America/New_York|America/Indiana/Petersburg","America/New_York|America/Indiana/Vevay","America/New_York|America/Indiana/Vincennes","America/New_York|America/Indiana/Winamac","America/New_York|America/Indianapolis","America/New_York|America/Iqaluit","America/New_York|America/Kentucky/Louisville","America/New_York|America/Kentucky/Monticello","America/New_York|America/Louisville","America/New_York|America/Montreal","America/New_York|America/Nassau","America/New_York|America/Nipigon","America/New_York|America/Pangnirtung","America/New_York|America/Thunder_Bay","America/New_York|America/Toronto","America/New_York|Canada/Eastern","America/New_York|EST5EDT","America/New_York|US/East-Indiana","America/New_York|US/Eastern","America/New_York|US/Michigan","America/Noronha|Atlantic/South_Georgia","America/Noronha|Brazil/DeNoronha","America/Noronha|Etc/GMT+2","America/Panama|America/Atikokan","America/Panama|America/Cayman","America/Panama|America/Coral_Harbour","America/Panama|America/Jamaica","America/Panama|EST","America/Panama|Jamaica","America/Phoenix|America/Creston","America/Phoenix|America/Dawson_Creek","America/Phoenix|America/Hermosillo","America/Phoenix|MST","America/Phoenix|US/Arizona","America/Santiago|Chile/Continental","America/Santo_Domingo|America/Anguilla","America/Santo_Domingo|America/Antigua","America/Santo_Domingo|America/Aruba","America/Santo_Domingo|America/Barbados","America/Santo_Domingo|America/Blanc-Sablon","America/Santo_Domingo|America/Curacao","America/Santo_Domingo|America/Dominica","America/Santo_Domingo|America/Grenada","America/Santo_Domingo|America/Guadeloupe","America/Santo_Domingo|America/Kralendijk","America/Santo_Domingo|America/Lower_Princes","America/Santo_Domingo|America/Marigot","America/Santo_Domingo|America/Martinique","America/Santo_Domingo|America/Montserrat","America/Santo_Domingo|America/Port_of_Spain","America/Santo_Domingo|America/Puerto_Rico","America/Santo_Domingo|America/St_Barthelemy","America/Santo_Domingo|America/St_Kitts","America/Santo_Domingo|America/St_Lucia","America/Santo_Domingo|America/St_Thomas","America/Santo_Domingo|America/St_Vincent","America/Santo_Domingo|America/Tortola","America/Santo_Domingo|America/Virgin","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","Antarctica/Palmer|America/Punta_Arenas","Asia/Baghdad|Antarctica/Syowa","Asia/Baghdad|Asia/Aden","Asia/Baghdad|Asia/Bahrain","Asia/Baghdad|Asia/Kuwait","Asia/Baghdad|Asia/Qatar","Asia/Baghdad|Asia/Riyadh","Asia/Baghdad|Etc/GMT-3","Asia/Baghdad|Europe/Minsk","Asia/Bangkok|Antarctica/Davis","Asia/Bangkok|Asia/Ho_Chi_Minh","Asia/Bangkok|Asia/Novokuznetsk","Asia/Bangkok|Asia/Phnom_Penh","Asia/Bangkok|Asia/Saigon","Asia/Bangkok|Asia/Vientiane","Asia/Bangkok|Etc/GMT-7","Asia/Bangkok|Indian/Christmas","Asia/Dhaka|Antarctica/Vostok","Asia/Dhaka|Asia/Almaty","Asia/Dhaka|Asia/Bishkek","Asia/Dhaka|Asia/Dacca","Asia/Dhaka|Asia/Kashgar","Asia/Dhaka|Asia/Qostanay","Asia/Dhaka|Asia/Thimbu","Asia/Dhaka|Asia/Thimphu","Asia/Dhaka|Asia/Urumqi","Asia/Dhaka|Etc/GMT-6","Asia/Dhaka|Indian/Chagos","Asia/Dili|Etc/GMT-9","Asia/Dili|Pacific/Palau","Asia/Dubai|Asia/Muscat","Asia/Dubai|Asia/Tbilisi","Asia/Dubai|Asia/Yerevan","Asia/Dubai|Etc/GMT-4","Asia/Dubai|Europe/Samara","Asia/Dubai|Indian/Mahe","Asia/Dubai|Indian/Mauritius","Asia/Dubai|Indian/Reunion","Asia/Gaza|Asia/Hebron","Asia/Hong_Kong|Hongkong","Asia/Jakarta|Asia/Pontianak","Asia/Jerusalem|Asia/Tel_Aviv","Asia/Jerusalem|Israel","Asia/Kamchatka|Asia/Anadyr","Asia/Kamchatka|Etc/GMT-12","Asia/Kamchatka|Kwajalein","Asia/Kamchatka|Pacific/Funafuti","Asia/Kamchatka|Pacific/Kwajalein","Asia/Kamchatka|Pacific/Majuro","Asia/Kamchatka|Pacific/Nauru","Asia/Kamchatka|Pacific/Tarawa","Asia/Kamchatka|Pacific/Wake","Asia/Kamchatka|Pacific/Wallis","Asia/Kathmandu|Asia/Katmandu","Asia/Kolkata|Asia/Calcutta","Asia/Kuala_Lumpur|Asia/Brunei","Asia/Kuala_Lumpur|Asia/Kuching","Asia/Kuala_Lumpur|Asia/Singapore","Asia/Kuala_Lumpur|Etc/GMT-8","Asia/Kuala_Lumpur|Singapore","Asia/Makassar|Asia/Ujung_Pandang","Asia/Rangoon|Asia/Yangon","Asia/Rangoon|Indian/Cocos","Asia/Seoul|ROK","Asia/Shanghai|Asia/Chongqing","Asia/Shanghai|Asia/Chungking","Asia/Shanghai|Asia/Harbin","Asia/Shanghai|Asia/Macao","Asia/Shanghai|Asia/Macau","Asia/Shanghai|Asia/Taipei","Asia/Shanghai|PRC","Asia/Shanghai|ROC","Asia/Tashkent|Antarctica/Mawson","Asia/Tashkent|Asia/Aqtau","Asia/Tashkent|Asia/Aqtobe","Asia/Tashkent|Asia/Ashgabat","Asia/Tashkent|Asia/Ashkhabad","Asia/Tashkent|Asia/Atyrau","Asia/Tashkent|Asia/Dushanbe","Asia/Tashkent|Asia/Oral","Asia/Tashkent|Asia/Samarkand","Asia/Tashkent|Etc/GMT-5","Asia/Tashkent|Indian/Kerguelen","Asia/Tashkent|Indian/Maldives","Asia/Tehran|Iran","Asia/Tokyo|Japan","Asia/Ulaanbaatar|Asia/Choibalsan","Asia/Ulaanbaatar|Asia/Ulan_Bator","Asia/Vladivostok|Asia/Ust-Nera","Asia/Yakutsk|Asia/Khandyga","Atlantic/Azores|America/Scoresbysund","Atlantic/Cape_Verde|Etc/GMT+1","Australia/Adelaide|Australia/Broken_Hill","Australia/Adelaide|Australia/South","Australia/Adelaide|Australia/Yancowinna","Australia/Brisbane|Australia/Lindeman","Australia/Brisbane|Australia/Queensland","Australia/Darwin|Australia/North","Australia/Lord_Howe|Australia/LHI","Australia/Perth|Australia/West","Australia/Sydney|Australia/ACT","Australia/Sydney|Australia/Canberra","Australia/Sydney|Australia/Currie","Australia/Sydney|Australia/Hobart","Australia/Sydney|Australia/Melbourne","Australia/Sydney|Australia/NSW","Australia/Sydney|Australia/Tasmania","Australia/Sydney|Australia/Victoria","Etc/UTC|Etc/UCT","Etc/UTC|Etc/Universal","Etc/UTC|Etc/Zulu","Etc/UTC|UCT","Etc/UTC|UTC","Etc/UTC|Universal","Etc/UTC|Zulu","Europe/Athens|Asia/Nicosia","Europe/Athens|EET","Europe/Athens|Europe/Bucharest","Europe/Athens|Europe/Helsinki","Europe/Athens|Europe/Kiev","Europe/Athens|Europe/Mariehamn","Europe/Athens|Europe/Nicosia","Europe/Athens|Europe/Riga","Europe/Athens|Europe/Sofia","Europe/Athens|Europe/Tallinn","Europe/Athens|Europe/Uzhgorod","Europe/Athens|Europe/Vilnius","Europe/Athens|Europe/Zaporozhye","Europe/Chisinau|Europe/Tiraspol","Europe/Dublin|Eire","Europe/Istanbul|Asia/Istanbul","Europe/Istanbul|Turkey","Europe/Lisbon|Atlantic/Canary","Europe/Lisbon|Atlantic/Faeroe","Europe/Lisbon|Atlantic/Faroe","Europe/Lisbon|Atlantic/Madeira","Europe/Lisbon|Portugal","Europe/Lisbon|WET","Europe/London|Europe/Belfast","Europe/London|Europe/Guernsey","Europe/London|Europe/Isle_of_Man","Europe/London|Europe/Jersey","Europe/London|GB","Europe/London|GB-Eire","Europe/Moscow|W-SU","Europe/Paris|Africa/Ceuta","Europe/Paris|Arctic/Longyearbyen","Europe/Paris|Atlantic/Jan_Mayen","Europe/Paris|CET","Europe/Paris|Europe/Amsterdam","Europe/Paris|Europe/Andorra","Europe/Paris|Europe/Belgrade","Europe/Paris|Europe/Berlin","Europe/Paris|Europe/Bratislava","Europe/Paris|Europe/Brussels","Europe/Paris|Europe/Budapest","Europe/Paris|Europe/Busingen","Europe/Paris|Europe/Copenhagen","Europe/Paris|Europe/Gibraltar","Europe/Paris|Europe/Ljubljana","Europe/Paris|Europe/Luxembourg","Europe/Paris|Europe/Madrid","Europe/Paris|Europe/Malta","Europe/Paris|Europe/Monaco","Europe/Paris|Europe/Oslo","Europe/Paris|Europe/Podgorica","Europe/Paris|Europe/Prague","Europe/Paris|Europe/Rome","Europe/Paris|Europe/San_Marino","Europe/Paris|Europe/Sarajevo","Europe/Paris|Europe/Skopje","Europe/Paris|Europe/Stockholm","Europe/Paris|Europe/Tirane","Europe/Paris|Europe/Vaduz","Europe/Paris|Europe/Vatican","Europe/Paris|Europe/Vienna","Europe/Paris|Europe/Warsaw","Europe/Paris|Europe/Zagreb","Europe/Paris|Europe/Zurich","Europe/Paris|Poland","Europe/Ulyanovsk|Europe/Astrakhan","Pacific/Auckland|Antarctica/McMurdo","Pacific/Auckland|Antarctica/South_Pole","Pacific/Auckland|NZ","Pacific/Chatham|NZ-CHAT","Pacific/Easter|Chile/EasterIsland","Pacific/Fakaofo|Etc/GMT-13","Pacific/Fakaofo|Pacific/Enderbury","Pacific/Galapagos|Etc/GMT+6","Pacific/Gambier|Etc/GMT+9","Pacific/Guadalcanal|Antarctica/Macquarie","Pacific/Guadalcanal|Etc/GMT-11","Pacific/Guadalcanal|Pacific/Efate","Pacific/Guadalcanal|Pacific/Kosrae","Pacific/Guadalcanal|Pacific/Noumea","Pacific/Guadalcanal|Pacific/Pohnpei","Pacific/Guadalcanal|Pacific/Ponape","Pacific/Guam|Pacific/Saipan","Pacific/Honolulu|HST","Pacific/Honolulu|Pacific/Johnston","Pacific/Honolulu|US/Hawaii","Pacific/Kiritimati|Etc/GMT-14","Pacific/Niue|Etc/GMT+11","Pacific/Pago_Pago|Pacific/Midway","Pacific/Pago_Pago|Pacific/Samoa","Pacific/Pago_Pago|US/Samoa","Pacific/Pitcairn|Etc/GMT+8","Pacific/Port_Moresby|Antarctica/DumontDUrville","Pacific/Port_Moresby|Etc/GMT-10","Pacific/Port_Moresby|Pacific/Chuuk","Pacific/Port_Moresby|Pacific/Truk","Pacific/Port_Moresby|Pacific/Yap","Pacific/Tahiti|Etc/GMT+10","Pacific/Tahiti|Pacific/Rarotonga"]}),c}); \ No newline at end of file diff --git a/node_modules/moment-timezone/builds/moment-timezone-with-data-1970-2030.js b/node_modules/moment-timezone/builds/moment-timezone-with-data-1970-2030.js new file mode 100644 index 00000000..7eb7c9b1 --- /dev/null +++ b/node_modules/moment-timezone/builds/moment-timezone-with-data-1970-2030.js @@ -0,0 +1,1224 @@ +//! moment-timezone.js +//! version : 0.5.26 +//! Copyright (c) JS Foundation and other contributors +//! license : MIT +//! github.com/moment/moment-timezone + +(function (root, factory) { + "use strict"; + + /*global define*/ + if (typeof module === 'object' && module.exports) { + module.exports = factory(require('moment')); // Node + } else if (typeof define === 'function' && define.amd) { + define(['moment'], factory); // AMD + } else { + factory(root.moment); // Browser + } +}(this, function (moment) { + "use strict"; + + // Do not load moment-timezone a second time. + // if (moment.tz !== undefined) { + // logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion); + // return moment; + // } + + var VERSION = "0.5.26", + zones = {}, + links = {}, + names = {}, + guesses = {}, + cachedGuess; + + if (!moment || typeof moment.version !== 'string') { + logError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/'); + } + + var momentVersion = moment.version.split('.'), + major = +momentVersion[0], + minor = +momentVersion[1]; + + // Moment.js version check + if (major < 2 || (major === 2 && minor < 6)) { + logError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com'); + } + + /************************************ + Unpacking + ************************************/ + + function charCodeToInt(charCode) { + if (charCode > 96) { + return charCode - 87; + } else if (charCode > 64) { + return charCode - 29; + } + return charCode - 48; + } + + function unpackBase60(string) { + var i = 0, + parts = string.split('.'), + whole = parts[0], + fractional = parts[1] || '', + multiplier = 1, + num, + out = 0, + sign = 1; + + // handle negative numbers + if (string.charCodeAt(0) === 45) { + i = 1; + sign = -1; + } + + // handle digits before the decimal + for (i; i < whole.length; i++) { + num = charCodeToInt(whole.charCodeAt(i)); + out = 60 * out + num; + } + + // handle digits after the decimal + for (i = 0; i < fractional.length; i++) { + multiplier = multiplier / 60; + num = charCodeToInt(fractional.charCodeAt(i)); + out += num * multiplier; + } + + return out * sign; + } + + function arrayToInt (array) { + for (var i = 0; i < array.length; i++) { + array[i] = unpackBase60(array[i]); + } + } + + function intToUntil (array, length) { + for (var i = 0; i < length; i++) { + array[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds + } + + array[length - 1] = Infinity; + } + + function mapIndices (source, indices) { + var out = [], i; + + for (i = 0; i < indices.length; i++) { + out[i] = source[indices[i]]; + } + + return out; + } + + function unpack (string) { + var data = string.split('|'), + offsets = data[2].split(' '), + indices = data[3].split(''), + untils = data[4].split(' '); + + arrayToInt(offsets); + arrayToInt(indices); + arrayToInt(untils); + + intToUntil(untils, indices.length); + + return { + name : data[0], + abbrs : mapIndices(data[1].split(' '), indices), + offsets : mapIndices(offsets, indices), + untils : untils, + population : data[5] | 0 + }; + } + + /************************************ + Zone object + ************************************/ + + function Zone (packedString) { + if (packedString) { + this._set(unpack(packedString)); + } + } + + Zone.prototype = { + _set : function (unpacked) { + this.name = unpacked.name; + this.abbrs = unpacked.abbrs; + this.untils = unpacked.untils; + this.offsets = unpacked.offsets; + this.population = unpacked.population; + }, + + _index : function (timestamp) { + var target = +timestamp, + untils = this.untils, + i; + + for (i = 0; i < untils.length; i++) { + if (target < untils[i]) { + return i; + } + } + }, + + parse : function (timestamp) { + var target = +timestamp, + offsets = this.offsets, + untils = this.untils, + max = untils.length - 1, + offset, offsetNext, offsetPrev, i; + + for (i = 0; i < max; i++) { + offset = offsets[i]; + offsetNext = offsets[i + 1]; + offsetPrev = offsets[i ? i - 1 : i]; + + if (offset < offsetNext && tz.moveAmbiguousForward) { + offset = offsetNext; + } else if (offset > offsetPrev && tz.moveInvalidForward) { + offset = offsetPrev; + } + + if (target < untils[i] - (offset * 60000)) { + return offsets[i]; + } + } + + return offsets[max]; + }, + + abbr : function (mom) { + return this.abbrs[this._index(mom)]; + }, + + offset : function (mom) { + logError("zone.offset has been deprecated in favor of zone.utcOffset"); + return this.offsets[this._index(mom)]; + }, + + utcOffset : function (mom) { + return this.offsets[this._index(mom)]; + } + }; + + /************************************ + Current Timezone + ************************************/ + + function OffsetAt(at) { + var timeString = at.toTimeString(); + var abbr = timeString.match(/\([a-z ]+\)/i); + if (abbr && abbr[0]) { + // 17:56:31 GMT-0600 (CST) + // 17:56:31 GMT-0600 (Central Standard Time) + abbr = abbr[0].match(/[A-Z]/g); + abbr = abbr ? abbr.join('') : undefined; + } else { + // 17:56:31 CST + // 17:56:31 GMT+0800 (台北標準時間) + abbr = timeString.match(/[A-Z]{3,5}/g); + abbr = abbr ? abbr[0] : undefined; + } + + if (abbr === 'GMT') { + abbr = undefined; + } + + this.at = +at; + this.abbr = abbr; + this.offset = at.getTimezoneOffset(); + } + + function ZoneScore(zone) { + this.zone = zone; + this.offsetScore = 0; + this.abbrScore = 0; + } + + ZoneScore.prototype.scoreOffsetAt = function (offsetAt) { + this.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset); + if (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) { + this.abbrScore++; + } + }; + + function findChange(low, high) { + var mid, diff; + + while ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) { + mid = new OffsetAt(new Date(low.at + diff)); + if (mid.offset === low.offset) { + low = mid; + } else { + high = mid; + } + } + + return low; + } + + function userOffsets() { + var startYear = new Date().getFullYear() - 2, + last = new OffsetAt(new Date(startYear, 0, 1)), + offsets = [last], + change, next, i; + + for (i = 1; i < 48; i++) { + next = new OffsetAt(new Date(startYear, i, 1)); + if (next.offset !== last.offset) { + change = findChange(last, next); + offsets.push(change); + offsets.push(new OffsetAt(new Date(change.at + 6e4))); + } + last = next; + } + + for (i = 0; i < 4; i++) { + offsets.push(new OffsetAt(new Date(startYear + i, 0, 1))); + offsets.push(new OffsetAt(new Date(startYear + i, 6, 1))); + } + + return offsets; + } + + function sortZoneScores (a, b) { + if (a.offsetScore !== b.offsetScore) { + return a.offsetScore - b.offsetScore; + } + if (a.abbrScore !== b.abbrScore) { + return a.abbrScore - b.abbrScore; + } + return b.zone.population - a.zone.population; + } + + function addToGuesses (name, offsets) { + var i, offset; + arrayToInt(offsets); + for (i = 0; i < offsets.length; i++) { + offset = offsets[i]; + guesses[offset] = guesses[offset] || {}; + guesses[offset][name] = true; + } + } + + function guessesForUserOffsets (offsets) { + var offsetsLength = offsets.length, + filteredGuesses = {}, + out = [], + i, j, guessesOffset; + + for (i = 0; i < offsetsLength; i++) { + guessesOffset = guesses[offsets[i].offset] || {}; + for (j in guessesOffset) { + if (guessesOffset.hasOwnProperty(j)) { + filteredGuesses[j] = true; + } + } + } + + for (i in filteredGuesses) { + if (filteredGuesses.hasOwnProperty(i)) { + out.push(names[i]); + } + } + + return out; + } + + function rebuildGuess () { + + // use Intl API when available and returning valid time zone + try { + var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone; + if (intlName && intlName.length > 3) { + var name = names[normalizeName(intlName)]; + if (name) { + return name; + } + logError("Moment Timezone found " + intlName + " from the Intl api, but did not have that data loaded."); + } + } catch (e) { + // Intl unavailable, fall back to manual guessing. + } + + var offsets = userOffsets(), + offsetsLength = offsets.length, + guesses = guessesForUserOffsets(offsets), + zoneScores = [], + zoneScore, i, j; + + for (i = 0; i < guesses.length; i++) { + zoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength); + for (j = 0; j < offsetsLength; j++) { + zoneScore.scoreOffsetAt(offsets[j]); + } + zoneScores.push(zoneScore); + } + + zoneScores.sort(sortZoneScores); + + return zoneScores.length > 0 ? zoneScores[0].zone.name : undefined; + } + + function guess (ignoreCache) { + if (!cachedGuess || ignoreCache) { + cachedGuess = rebuildGuess(); + } + return cachedGuess; + } + + /************************************ + Global Methods + ************************************/ + + function normalizeName (name) { + return (name || '').toLowerCase().replace(/\//g, '_'); + } + + function addZone (packed) { + var i, name, split, normalized; + + if (typeof packed === "string") { + packed = [packed]; + } + + for (i = 0; i < packed.length; i++) { + split = packed[i].split('|'); + name = split[0]; + normalized = normalizeName(name); + zones[normalized] = packed[i]; + names[normalized] = name; + addToGuesses(normalized, split[2].split(' ')); + } + } + + function getZone (name, caller) { + + name = normalizeName(name); + + var zone = zones[name]; + var link; + + if (zone instanceof Zone) { + return zone; + } + + if (typeof zone === 'string') { + zone = new Zone(zone); + zones[name] = zone; + return zone; + } + + // Pass getZone to prevent recursion more than 1 level deep + if (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) { + zone = zones[name] = new Zone(); + zone._set(link); + zone.name = names[name]; + return zone; + } + + return null; + } + + function getNames () { + var i, out = []; + + for (i in names) { + if (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) { + out.push(names[i]); + } + } + + return out.sort(); + } + + function addLink (aliases) { + var i, alias, normal0, normal1; + + if (typeof aliases === "string") { + aliases = [aliases]; + } + + for (i = 0; i < aliases.length; i++) { + alias = aliases[i].split('|'); + + normal0 = normalizeName(alias[0]); + normal1 = normalizeName(alias[1]); + + links[normal0] = normal1; + names[normal0] = alias[0]; + + links[normal1] = normal0; + names[normal1] = alias[1]; + } + } + + function loadData (data) { + addZone(data.zones); + addLink(data.links); + tz.dataVersion = data.version; + } + + function zoneExists (name) { + if (!zoneExists.didShowError) { + zoneExists.didShowError = true; + logError("moment.tz.zoneExists('" + name + "') has been deprecated in favor of !moment.tz.zone('" + name + "')"); + } + return !!getZone(name); + } + + function needsOffset (m) { + var isUnixTimestamp = (m._f === 'X' || m._f === 'x'); + return !!(m._a && (m._tzm === undefined) && !isUnixTimestamp); + } + + function logError (message) { + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + } + + /************************************ + moment.tz namespace + ************************************/ + + function tz (input) { + var args = Array.prototype.slice.call(arguments, 0, -1), + name = arguments[arguments.length - 1], + zone = getZone(name), + out = moment.utc.apply(null, args); + + if (zone && !moment.isMoment(input) && needsOffset(out)) { + out.add(zone.parse(out), 'minutes'); + } + + out.tz(name); + + return out; + } + + tz.version = VERSION; + tz.dataVersion = ''; + tz._zones = zones; + tz._links = links; + tz._names = names; + tz.add = addZone; + tz.link = addLink; + tz.load = loadData; + tz.zone = getZone; + tz.zoneExists = zoneExists; // deprecated in 0.1.0 + tz.guess = guess; + tz.names = getNames; + tz.Zone = Zone; + tz.unpack = unpack; + tz.unpackBase60 = unpackBase60; + tz.needsOffset = needsOffset; + tz.moveInvalidForward = true; + tz.moveAmbiguousForward = false; + + /************************************ + Interface with Moment.js + ************************************/ + + var fn = moment.fn; + + moment.tz = tz; + + moment.defaultZone = null; + + moment.updateOffset = function (mom, keepTime) { + var zone = moment.defaultZone, + offset; + + if (mom._z === undefined) { + if (zone && needsOffset(mom) && !mom._isUTC) { + mom._d = moment.utc(mom._a)._d; + mom.utc().add(zone.parse(mom), 'minutes'); + } + mom._z = zone; + } + if (mom._z) { + offset = mom._z.utcOffset(mom); + if (Math.abs(offset) < 16) { + offset = offset / 60; + } + if (mom.utcOffset !== undefined) { + var z = mom._z; + mom.utcOffset(-offset, keepTime); + mom._z = z; + } else { + mom.zone(offset, keepTime); + } + } + }; + + fn.tz = function (name, keepTime) { + if (name) { + if (typeof name !== 'string') { + throw new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']'); + } + this._z = getZone(name); + if (this._z) { + moment.updateOffset(this, keepTime); + } else { + logError("Moment Timezone has no data for " + name + ". See http://momentjs.com/timezone/docs/#/data-loading/."); + } + return this; + } + if (this._z) { return this._z.name; } + }; + + function abbrWrap (old) { + return function () { + if (this._z) { return this._z.abbr(this); } + return old.call(this); + }; + } + + function resetZoneWrap (old) { + return function () { + this._z = null; + return old.apply(this, arguments); + }; + } + + function resetZoneWrap2 (old) { + return function () { + if (arguments.length > 0) this._z = null; + return old.apply(this, arguments); + }; + } + + fn.zoneName = abbrWrap(fn.zoneName); + fn.zoneAbbr = abbrWrap(fn.zoneAbbr); + fn.utc = resetZoneWrap(fn.utc); + fn.local = resetZoneWrap(fn.local); + fn.utcOffset = resetZoneWrap2(fn.utcOffset); + + moment.tz.setDefault = function(name) { + if (major < 2 || (major === 2 && minor < 9)) { + logError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.'); + } + moment.defaultZone = name ? getZone(name) : null; + return moment; + }; + + // Cloning a moment should include the _z property. + var momentProperties = moment.momentProperties; + if (Object.prototype.toString.call(momentProperties) === '[object Array]') { + // moment 2.8.1+ + momentProperties.push('_z'); + momentProperties.push('_a'); + } else if (momentProperties) { + // moment 2.7.0 + momentProperties._z = null; + } + + loadData({ + "version": "2019b", + "zones": [ + "Africa/Abidjan|GMT|0|0||48e5", + "Africa/Nairobi|EAT|-30|0||47e5", + "Africa/Algiers|WET WEST CET CEST|0 -10 -10 -20|01012320102|3bX0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0|26e5", + "Africa/Lagos|WAT|-10|0||17e6", + "Africa/Bissau|-01 GMT|10 0|01|cap0|39e4", + "Africa/Maputo|CAT|-20|0||26e5", + "Africa/Cairo|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|LX0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1WL0 rd0 1Rz0 wp0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1qL0 Xd0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1ny0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 WL0 1qN0 Rb0 1wp0 On0 1zd0 Lz0 1EN0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0|15e6", + "Africa/Casablanca|+00 +01|0 -10|01010101010101010101010101010101010101010101010101010101010101010101010|aS00 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4mn0 SyN0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600|32e5", + "Africa/Ceuta|WET WEST CET CEST|0 -10 -10 -20|0101010102323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|aS00 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4VB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|85e3", + "Africa/El_Aaiun|-01 +00 +01|10 0 -10|01212121212121212121212121212121212121212121212121212121212121212121|fi10 6L0 AL0 1Nd0 XX0 1Cp0 pz0 1cBB0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600|20e4", + "Africa/Johannesburg|SAST|-20|0||84e5", + "Africa/Juba|CAT CAST EAT|-20 -30 -30|0101010101010101010101010101010102|LW0 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0", + "Africa/Khartoum|CAT CAST EAT|-20 -30 -30|01010101010101010101010101010101020|LW0 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 HjL0|51e5", + "Africa/Monrovia|MMT GMT|I.u 0|01|4SoI.u|11e5", + "Africa/Ndjamena|WAT WAST|-10 -20|010|nNb0 Wn0|13e5", + "Africa/Sao_Tome|GMT WAT|0 -10|010|1UQN0 2q00", + "Africa/Tripoli|EET CET CEST|-20 -10 -20|0121212121212121210120120|tda0 A10 1db0 1cN0 1db0 1dd0 1db0 1eN0 1bb0 1e10 1cL0 1c10 1db0 1dd0 1db0 1cN0 1db0 1q10 fAn0 1ep0 1db0 AKq0 TA0 1o00|11e5", + "Africa/Tunis|CET CEST|-10 -20|0101010101010101010|hOn0 WM0 1rA0 11c0 nwo0 Ko0 1cM0 1cM0 1rA0 10M0 zuM0 10N0 1aN0 1qM0 WM0 1qM0 11A0 1o00|20e5", + "Africa/Windhoek|SAST CAT WAT|-20 -20 -10|01212121212121212121212121212121212121212121212121|Ndy0 9Io0 16P0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4", + "America/Adak|BST BDT AHST HST HDT|b0 a0 a0 a0 90|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kd0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326", + "America/Anchorage|AHST AHDT YST AKST AKDT|a0 90 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kc0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4", + "America/Puerto_Rico|AST|40|0||24e5", + "America/Araguaina|-03 -02|30 20|01010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 ny10 Lz0|14e4", + "America/Argentina/Buenos_Aires|-03 -02|30 20|01010101010101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 A4p0 uL0 1qN0 WL0", + "America/Argentina/Catamarca|-03 -02 -04|30 20 40|01010101210102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 7B0 8zb0 uL0", + "America/Argentina/Cordoba|-03 -02 -04|30 20 40|01010101210101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0 1qN0 WL0", + "America/Argentina/Jujuy|-03 -02 -04|30 20 40|010101202101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1ze0 TX0 1ld0 WK0 1wp0 TX0 A4p0 uL0", + "America/Argentina/La_Rioja|-03 -02 -04|30 20 40|010101012010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0", + "America/Argentina/Mendoza|-03 -02 -04|30 20 40|01010120202102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1u20 SL0 1vd0 Tb0 1wp0 TW0 ri10 Op0 7TX0 uL0", + "America/Argentina/Rio_Gallegos|-03 -02 -04|30 20 40|01010101010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0", + "America/Argentina/Salta|-03 -02 -04|30 20 40|010101012101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0", + "America/Argentina/San_Juan|-03 -02 -04|30 20 40|010101012010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rld0 m10 8lb0 uL0", + "America/Argentina/San_Luis|-03 -02 -04|30 20 40|010101202020102020|9Rf0 Db0 zvd0 Bz0 1tB0 XX0 1q20 SL0 AN0 vDb0 m10 8lb0 8L0 jd0 1qN0 WL0 1qN0", + "America/Argentina/Tucuman|-03 -02 -04|30 20 40|0101010121010201010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 4N0 8BX0 uL0 1qN0 WL0", + "America/Argentina/Ushuaia|-03 -02 -04|30 20 40|01010101010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rkN0 8p0 8zb0 uL0", + "America/Asuncion|-04 -03|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|6FE0 3CL0 3Dd0 10L0 1pB0 10n0 1pB0 10n0 1pB0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1lB0 14n0 1dd0 1cL0 1fd0 WL0 1rd0 1aL0 1dB0 Xz0 1qp0 Xb0 1qN0 10L0 1rB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 WN0 1qL0 11B0 1nX0 1ip0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 TX0 1tB0 19X0 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0|28e5", + "America/Panama|EST|50|0||15e5", + "America/Bahia_Banderas|PST MST MDT CDT CST|80 70 60 50 60|012121212121212121212121212121343434343434343434343434343434343434343434|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|84e3", + "America/Bahia|-03 -02|30 20|010101010101010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 l5B0 Rb0|27e5", + "America/Barbados|AST ADT|40 30|010101010|i7G0 IL0 1ip0 17b0 1ip0 17b0 1ld0 13b0|28e4", + "America/Belem|-03 -02|30 20|0101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0|20e5", + "America/Belize|CST CDT|60 50|01010|9xG0 qn0 lxB0 mn0|57e3", + "America/Boa_Vista|-04 -03|40 30|01010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 smp0 WL0 1tB0 2L0|62e2", + "America/Bogota|-05 -04|50 40|010|Snh0 2en0|90e5", + "America/Boise|MST MDT|70 60|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 Dd0 1Kn0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e4", + "America/Cambridge_Bay|MST MDT CST CDT EST|70 60 60 50 50|01010101010101010101010101010101010101012342101010101010101010101010101010101010101010101010101010101010|p7J0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11A0 1nX0 2K0 WQ0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e2", + "America/Campo_Grande|-04 -03|40 30|010101010101010101010101010101010101010101010101010101010101010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4", + "America/Cancun|CST EST EDT CDT|60 50 40 50|012121230303030303030303030303030303030301|t9G0 yLB0 1lb0 14p0 1lb0 14p0 Lz0 xB0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4", + "America/Caracas|-04 -0430|40 4u|010|1wmv0 kqo0|29e5", + "America/Cayenne|-03|30|0||58e3", + "America/Chicago|CST CDT|60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5", + "America/Chihuahua|CST CDT MDT MST|60 50 60 70|01010232323232323232323232323232323232323232323232323232323232323232323|13Vk0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|81e4", + "America/Costa_Rica|CST CDT|60 50|010101010|mgS0 Db0 1Kp0 Db0 pRB0 15b0 1kp0 mL0|12e5", + "America/Phoenix|MST|70|0||42e5", + "America/Cuiaba|-04 -03|40 30|0101010101010101010101010101010101010101010101010101010101010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 4a10 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|54e4", + "America/Danmarkshavn|-03 -02 GMT|30 20 0|0101010101010101010101010101010102|oXh0 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 DC0|8", + "America/Dawson_Creek|PST PDT MST|80 70 70|0101012|Ka0 1cL0 1cN0 1fz0 1cN0 ML0|12e3", + "America/Dawson|YST PST PDT|90 80 70|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|9ix0 fNd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|13e2", + "America/Denver|MST MDT|70 60|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5", + "America/Detroit|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|85H0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e5", + "America/Edmonton|MST MDT|70 60|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|5E90 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|10e5", + "America/Eirunepe|-05 -04|50 40|01010101010|CxF0 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0 yTd0 d5X0|31e3", + "America/El_Salvador|CST CDT|60 50|01010|Gcu0 WL0 1qN0 WL0|11e5", + "America/Tijuana|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|fmy0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|20e5", + "America/Fort_Nelson|PST PDT MST|80 70 70|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010102|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2", + "America/Fort_Wayne|EST EDT|50 40|01010101010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Fortaleza|-03 -02|30 20|01010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 5z0 2mN0 On0|34e5", + "America/Glace_Bay|AST ADT|40 30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|5E60 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3", + "America/Godthab|-03 -02|30 20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXh0 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e3", + "America/Goose_Bay|AST ADT ADDT|40 30 20|010101010101010101010101010101010101020101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2", + "America/Grand_Turk|EST EDT AST|50 40 40|01010101010101010101010101010101010101010101010101010101010101010101010101210101010101010101010101010|mG70 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 5Ip0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2", + "America/Guatemala|CST CDT|60 50|010101010|9tG0 An0 mtd0 Nz0 ifB0 17b0 zDB0 11z0|13e5", + "America/Guayaquil|-05 -04|50 40|010|TKR0 rz0|27e5", + "America/Guyana|-0345 -03 -04|3J 30 40|012|dyPJ Bxbf|80e4", + "America/Halifax|AST ADT|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4", + "America/Havana|CST CDT|50 40|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K50 1cL0 1cN0 1fz0 1cN0 14n0 1ld0 14L0 1kN0 15b0 1kp0 1cL0 1cN0 1fz0 1a10 1fz0 1fB0 11z0 14p0 1nX0 11B0 1nX0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 1a10 1in0 1a10 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 17c0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 11A0 6i00 Rc0 1wo0 U00 1tA0 Rc0 1wo0 U00 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5", + "America/Hermosillo|PST MST MDT|80 70 60|01212121|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0|64e4", + "America/Indiana/Knox|CST CDT EST|60 50 50|01010101010101010101010101010101010101010101210101010101010101010101010101010101010101010101010|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 z8o0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Marengo|EST EDT CDT|50 40 50|010101010201010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1e6p0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Petersburg|CST CDT EST EDT|60 50 50 40|0101010101010101210123232323232323232323232323232323232323232323232|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 19co0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Tell_City|EST EDT CDT CST|50 40 50 60|01023232323232323232323232323232323232323232323232323|K70 1cL0 1qhd0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Vevay|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1lnd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Vincennes|EST EDT CDT CST|50 40 50 60|01023201010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Winamac|EST EDT CDT CST|50 40 50 60|01023101010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1o00 Rd0 1za0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Inuvik|PST MST MDT|80 70 60|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|mGa0 2pz0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|35e2", + "America/Iqaluit|EST EDT CST CDT|50 40 60 50|0101010101010101010101010101010101010101230101010101010101010101010101010101010101010101010101010101010|p7H0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|67e2", + "America/Jamaica|EST EDT|50 40|010101010101010101010|9Kv0 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0|94e4", + "America/Juneau|PST PDT YDT YST AKST AKDT|80 70 80 90 90 80|0101010101010101010102010101345454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cM0 1cM0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|33e3", + "America/Kentucky/Louisville|EST EDT CDT|50 40 50|010101010201010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Kentucky/Monticello|CST CDT EST EDT|60 50 50 40|010101010101010101010101010101010101010101010101010101010101012323232323232323232323232323232323232323232323232323232323232|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/La_Paz|-04|40|0||19e5", + "America/Lima|-05 -04|50 40|010101010|CVF0 zX0 1O10 zX0 6Gp0 zX0 98p0 zX0|11e6", + "America/Los_Angeles|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6", + "America/Maceio|-03 -02|30 20|0101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 8Q10 WL0 1tB0 5z0 2mN0 On0|93e4", + "America/Managua|CST EST CDT|60 50 50|010202010102020|86u0 4mn0 9Up0 Dz0 1K10 Dz0 s3F0 1KH0 DB0 9In0 k8p0 19X0 1o30 11y0|22e5", + "America/Manaus|-04 -03|40 30|010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0|19e5", + "America/Martinique|AST ADT|40 30|010|oXg0 19X0|39e4", + "America/Matamoros|CST CDT|60 50|0101010101010101010101010101010101010101010101010101010101010101010101010|IqU0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|45e4", + "America/Mazatlan|PST MST MDT|80 70 60|012121212121212121212121212121212121212121212121212121212121212121212121|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|44e4", + "America/Menominee|EST CDT CST|50 50 60|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|85H0 1cM0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|85e2", + "America/Merida|CST EST CDT|60 50 50|0102020202020202020202020202020202020202020202020202020202020202020202020|t9G0 2hz0 wu30 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|11e5", + "America/Metlakatla|PST PDT AKST AKDT|80 70 90 80|0101010101010101010101010101023232302323232323232323232323232|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1hU10 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2", + "America/Mexico_City|CST CDT|60 50|01010101010101010101010101010101010101010101010101010101010101010101010|13Vk0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|20e6", + "America/Miquelon|AST -03 -02|40 30 20|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|p9g0 gQ10 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2", + "America/Moncton|AST ADT|40 30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14n1 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 ReX 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|64e3", + "America/Monterrey|CST CDT|60 50|0101010101010101010101010101010101010101010101010101010101010101010101010|IqU0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|41e5", + "America/Montevideo|-03 -02 -0130 -0230|30 20 1u 2u|0101023010101010101010101010101010101010101010101010|JD0 jX0 4vB0 xz0 3Cp0 mmu 1a10 IMu Db0 4c10 uL0 1Nd0 An0 1SN0 uL0 mp0 28L0 iPB0 un0 1SN0 xz0 1zd0 Lz0 1zd0 Rb0 1zd0 On0 1wp0 Rb0 s8p0 1fB0 1ip0 11z0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5", + "America/Toronto|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e5", + "America/New_York|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6", + "America/Nipigon|EST EDT|50 40|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|avj0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|16e2", + "America/Nome|BST BDT YST AKST AKDT|b0 a0 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kd0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cl0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|38e2", + "America/Noronha|-02 -01|20 10|01010101010101010|CxC0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|30e2", + "America/North_Dakota/Beulah|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010123232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/North_Dakota/Center|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010123232323232323232323232323232323232323232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/North_Dakota/New_Salem|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010101010101010101010101012323232323232323232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Ojinaga|CST CDT MDT MST|60 50 60 70|01010232323232323232323232323232323232323232323232323232323232323232323|13Vk0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3", + "America/Pangnirtung|AST ADT EDT EST CST CDT|40 30 40 50 60 50|0101010101010101010101010101010232323232453232323232323232323232323232323232323232323232323232323232323|p7G0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1o00 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2", + "America/Paramaribo|-0330 -03|3u 30|01|zSPu|24e4", + "America/Port-au-Prince|EST EDT|50 40|01010101010101010101010101010101010101010101010101010101010101010101010|wu50 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14q0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 i6n0 1nX0 11B0 1nX0 d430 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5", + "America/Rio_Branco|-05 -04|50 40|010101010|CxF0 Rb0 1tB0 IL0 1Fd0 FX0 NBd0 d5X0|31e4", + "America/Porto_Velho|-04 -03|40 30|0101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0|37e4", + "America/Punta_Arenas|-03 -04|30 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0", + "America/Rainy_River|CST CDT|60 50|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|avk0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|842", + "America/Rankin_Inlet|CST CDT EST|60 50 50|0101010101010101010101010101010101010101012101010101010101010101010101010101010101010101010101010101010|p7I0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e2", + "America/Recife|-03 -02|30 20|01010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|33e5", + "America/Regina|CST|60|0||19e4", + "America/Resolute|CST CDT EST|60 50 50|0101010101010101010101010101010101010101012101010101012101010101010101010101010101010101010101010101010|p7I0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|229", + "America/Santarem|-04 -03|40 30|01010101|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 NBd0|21e4", + "America/Santiago|-03 -04|30 40|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0|62e5", + "America/Santo_Domingo|-0430 EST AST|4u 50 40|0101010101212|ksu 1Cou yLu 1RAu wLu 1QMu xzu 1Q0u xXu 1PAu 13jB0 e00|29e5", + "America/Sao_Paulo|-03 -02|30 20|010101010101010101010101010101010101010101010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6", + "America/Scoresbysund|-02 -01 +00|20 10 0|0102121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|oXg0 1a00 1cK0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|452", + "America/Sitka|PST PDT YST AKST AKDT|80 70 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|90e2", + "America/St_Johns|NST NDT NDDT|3u 2u 1u|010101010101010101010101010101010101020101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K5u 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4", + "America/Swift_Current|MST CST|70 60|01|5E90|16e3", + "America/Tegucigalpa|CST CDT|60 50|0101010|Gcu0 WL0 1qN0 WL0 GRd0 AL0|11e5", + "America/Thule|AST ADT|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010|PHG0 1cL0 1cN0 1cL0 1fB0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|656", + "America/Thunder_Bay|EST EDT|50 40|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4", + "America/Vancouver|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5", + "America/Whitehorse|PST PDT|80 70|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|p7K0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3", + "America/Winnipeg|CST CDT|60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K80 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|66e4", + "America/Yakutat|YST YDT AKST AKDT|90 80 90 80|0101010101010101010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|Kb0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cn0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|642", + "America/Yellowknife|MST MDT|70 60|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|p7J0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3", + "Antarctica/Casey|+08 +11|-80 -b0|0101010|1ARS0 T90 40P0 KL0 blz0 3m10|10", + "Antarctica/Davis|+07 +05|-70 -50|01010|1ART0 VB0 3Wn0 KN0|70", + "Pacific/Port_Moresby|+10|-a0|0||25e4", + "Antarctica/Macquarie|AEDT AEST +11|-b0 -a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010102|qg0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0|1", + "Antarctica/Mawson|+06 +05|-60 -50|01|1ARU0|60", + "Pacific/Auckland|NZST NZDT|-c0 -d0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|bKC0 IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00|14e5", + "Antarctica/Palmer|-03 -02 -04|30 20 40|01020202020202020202020202020202020202020202020202020202020202020202020|9Rf0 Db0 jsN0 14N0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40", + "Antarctica/Rothera|-00 -03|0 30|01|gOo0|130", + "Asia/Riyadh|+03|-30|0||57e5", + "Antarctica/Troll|-00 +00 +02|0 0 -20|012121212121212121212121212121212121212121212121212121|1puo0 hd0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|40", + "Asia/Urumqi|+06|-60|0||32e5", + "Europe/Berlin|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXd0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|41e5", + "Asia/Almaty|+06 +07 +05|-60 -70 -50|0101010101010101010102010101010101010101010101010|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|15e5", + "Asia/Amman|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|8kK0 KL0 1oN0 11b0 1oN0 11b0 1pd0 1dz0 1cp0 11b0 1op0 11b0 fO10 1db0 1e10 1cL0 1cN0 1cL0 1cN0 1fz0 1pd0 10n0 1ld0 14n0 1hB0 15b0 1ip0 19X0 1cN0 1cL0 1cN0 17b0 1ld0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1So0 y00 1fc0 1dc0 1co0 1dc0 1cM0 1cM0 1cM0 1o00 11A0 1lc0 17c0 1cM0 1cM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|25e5", + "Asia/Anadyr|+13 +14 +12 +11|-d0 -e0 -c0 -b0|010202020202020202023202020202020202020202020202020202020232|rmX0 1db0 2q10 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|13e3", + "Asia/Aqtau|+05 +06 +04|-50 -60 -40|0101010101010101010201010120202020202020202020|sAj0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|15e4", + "Asia/Aqtobe|+05 +06 +04|-50 -60 -40|01010101010101010102010101010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|27e4", + "Asia/Ashgabat|+05 +06 +04|-50 -60 -40|01010101010101010101020|rn70 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0|41e4", + "Asia/Atyrau|+05 +06 +04|-50 -60 -40|010101010101010101020101010101010102020202020|sAj0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 2sp0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0", + "Asia/Baghdad|+03 +04|-30 -40|01010101010101010101010101010101010101010101010101010|u190 11b0 1cp0 1dz0 1dd0 1db0 1cN0 1cp0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1de0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0|66e5", + "Asia/Qatar|+04 +03|-40 -30|01|5QI0|96e4", + "Asia/Baku|+04 +05 +03|-40 -50 -30|010101010101010101010201010101010101010101010101010101010101010|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 9Je0 1o00 11z0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5", + "Asia/Bangkok|+07|-70|0||15e6", + "Asia/Barnaul|+07 +08 +06|-70 -80 -60|01010101010101010101020101010102020202020202020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 p90 LE0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0", + "Asia/Beirut|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|61a0 En0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1op0 11b0 dA10 17b0 1iN0 17b0 1iN0 17b0 1iN0 17b0 1vB0 SL0 1mp0 13z0 1iN0 17b0 1iN0 17b0 1jd0 12n0 1a10 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0|22e5", + "Asia/Bishkek|+06 +07 +05|-60 -70 -50|0101010101010101010102020202020202020202020202020|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2e00 1tX0 17b0 1ip0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1cPu 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0|87e4", + "Asia/Brunei|+08|-80|0||42e4", + "Asia/Kolkata|IST|-5u|0||15e6", + "Asia/Chita|+09 +10 +08|-90 -a0 -80|0101010101010101010102010101010101010101010101010101010101010120|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3re0|33e4", + "Asia/Choibalsan|+07 +08 +10 +09|-70 -80 -a0 -90|012323232323232323232323232323232323232323232313131|jsF0 cKn0 1da0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 3Db0 h1f0 1cJ0 1cP0 1cJ0|38e3", + "Asia/Shanghai|CST CDT|-80 -90|0101010101010|DKG0 Rb0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0|23e6", + "Asia/Colombo|+0530 +0630 +06|-5u -6u -60|0120|14giu 11zu n3cu|22e5", + "Asia/Dhaka|+06 +07|-60 -70|010|1A5R0 1i00|16e6", + "Asia/Damascus|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|M00 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 Nb0 1AN0 Nb0 bcp0 19X0 1gp0 19X0 3ld0 1xX0 Vd0 1Bz0 Sp0 1vX0 10p0 1dz0 1cN0 1cL0 1db0 1db0 1g10 1an0 1ap0 1db0 1fd0 1db0 1cN0 1db0 1dd0 1db0 1cp0 1dz0 1c10 1dX0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 19z0 1fB0 1qL0 11B0 1on0 Wp0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0|26e5", + "Asia/Dili|+09 +08|-90 -80|010|fpr0 Xld0|19e4", + "Asia/Dubai|+04|-40|0||39e5", + "Asia/Dushanbe|+06 +07 +05|-60 -70 -50|0101010101010101010102|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2hB0|76e4", + "Asia/Famagusta|EET EEST +03|-20 -30 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101012010101010101010101010101010|cPa0 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00", + "Asia/Gaza|IST IDT EET EEST|-20 -30 -20 -30|010101010101010101010101010101023232323232323232323232323232323232323232323232323232323232323232323232|aXa0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 11z0 1o10 14o0 1lA1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0|18e5", + "Asia/Hebron|IST IDT EET EEST|-20 -30 -20 -30|01010101010101010101010101010102323232323232323232323232323232323232323232323232323232323232323232323232|aXa0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 12L0 1mN0 14o0 1lc0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0|25e4", + "Asia/Ho_Chi_Minh|+08 +07|-80 -70|01|dfs0|90e5", + "Asia/Hong_Kong|HKT HKST|-80 -90|01010101010101010|H7u 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|73e5", + "Asia/Hovd|+06 +07 +08|-60 -70 -80|01212121212121212121212121212121212121212121212121|jsG0 cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|81e3", + "Asia/Irkutsk|+08 +09 +07|-80 -90 -70|010101010101010101010201010101010101010101010101010101010101010|rn40 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4", + "Europe/Istanbul|EET EEST +04 +03|-20 -30 -40 -30|01010101010101010123232323231010101010101010101010101010101010101010101010101010101010101013|MK0 11z0 1o10 11z0 1qN0 11z0 1ze0 11B0 WM0 1qO0 WI0 1nX0 1rB0 10L0 11B0 1in0 17d0 1in0 2pX0 19E0 1fU0 16Q0 1iI0 16Q0 1iI0 1Vd0 pb0 3Kp0 14o0 1de0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1a00 1fA0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WO0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6", + "Asia/Jakarta|WIB|-70|0||31e6", + "Asia/Jayapura|WIT|-90|0||26e4", + "Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|aXa0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 1hB0 1dX0 1ep0 1aL0 1eN0 17X0 1nf0 11z0 1tB0 19W0 1e10 17b0 1ep0 1gL0 18N0 1fz0 1eN0 17b0 1gq0 1gn0 19d0 1dz0 1c10 17X0 1hB0 1gn0 19d0 1dz0 1c10 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0|81e4", + "Asia/Kabul|+0430|-4u|0||46e5", + "Asia/Kamchatka|+12 +13 +11|-c0 -d0 -b0|0101010101010101010102010101010101010101010101010101010101020|rn00 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|18e4", + "Asia/Karachi|+05 PKT PKST|-50 -50 -60|01212121|2Xv0 1fy00 1cL0 dK10 11b0 1610 1jX0|24e6", + "Asia/Kathmandu|+0530 +0545|-5u -5J|01|CVuu|12e5", + "Asia/Khandyga|+09 +10 +08 +11|-90 -a0 -80 -b0|01010101010101010101020101010101010101010101010131313131313131310|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 qK0 yN0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|66e2", + "Asia/Krasnoyarsk|+07 +08 +06|-70 -80 -60|010101010101010101010201010101010101010101010101010101010101010|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|10e5", + "Asia/Kuala_Lumpur|+0730 +08|-7u -80|01|td4u|71e5", + "Asia/Macau|CST CDT|-80 -90|01010101010101010|H7u 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|57e4", + "Asia/Magadan|+11 +12 +10|-b0 -c0 -a0|0101010101010101010102010101010101010101010101010101010101010120|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Cq0|95e3", + "Asia/Makassar|WITA|-80|0||15e5", + "Asia/Manila|PST PDT|-80 -90|010|k0E0 1db0|24e6", + "Asia/Nicosia|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|cPa0 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|32e4", + "Asia/Novokuznetsk|+07 +08 +06|-70 -80 -60|0101010101010101010102010101010101010101010101010101010101020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|55e4", + "Asia/Novosibirsk|+07 +08 +06|-70 -80 -60|01010101010101010101020101020202020202020202020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 ml0 Os0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 4eN0|15e5", + "Asia/Omsk|+06 +07 +05|-60 -70 -50|010101010101010101010201010101010101010101010101010101010101010|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|12e5", + "Asia/Oral|+05 +06 +04|-50 -60 -40|010101010101010202020202020202020202020202020|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 1cM0 IM0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|27e4", + "Asia/Pontianak|WITA WIB|-80 -70|01|HNs0|23e4", + "Asia/Pyongyang|KST KST|-90 -8u|010|1P4D0 6BA0|29e5", + "Asia/Qostanay|+05 +06 +04|-50 -60 -40|0101010101010101010201010101010101010101010101|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0", + "Asia/Qyzylorda|+05 +06|-50 -60|010101010101010101010101010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 3ao0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 zQl0|73e4", + "Asia/Rangoon|+0630|-6u|0||48e5", + "Asia/Sakhalin|+11 +12 +10|-b0 -c0 -a0|010101010101010101010201010101010202020202020202020202020202020|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 2pB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|58e4", + "Asia/Samarkand|+05 +06|-50 -60|010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|36e4", + "Asia/Seoul|KST KDT|-90 -a0|01010|Gf50 11A0 1o00 11A0|23e6", + "Asia/Srednekolymsk|+11 +12 +10|-b0 -c0 -a0|010101010101010101010201010101010101010101010101010101010101010|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|35e2", + "Asia/Taipei|CST CDT|-80 -90|0101010|akg0 1db0 1cN0 1db0 97B0 AL0|74e5", + "Asia/Tashkent|+06 +07 +05|-60 -70 -50|0101010101010101010102|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0|23e5", + "Asia/Tbilisi|+04 +05 +03|-40 -50 -30|01010101010101010101020202010101010101010101020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cK0 1cL0 1cN0 1cL0 1cN0 2pz0 1cL0 1fB0 3Nz0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 An0 Os0 WM0|11e5", + "Asia/Tehran|+0330 +04 +05 +0430|-3u -40 -50 -4u|0121030303030303030303030303030303030303030303030303030303030303030303030303030303030|j4ku TXu 1pz0 sN0 vAu 1cL0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0|14e6", + "Asia/Thimphu|+0530 +06|-5u -60|01|HcGu|79e3", + "Asia/Tokyo|JST|-90|0||38e6", + "Asia/Tomsk|+07 +08 +06|-70 -80 -60|01010101010101010101020101010101010101010101020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 co0 1bB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Qp0|10e5", + "Asia/Ulaanbaatar|+07 +08 +09|-70 -80 -90|01212121212121212121212121212121212121212121212121|jsF0 cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|12e5", + "Asia/Ust-Nera|+09 +12 +11 +10|-90 -c0 -b0 -a0|0121212121212121212123212121212121212121212121212121212121212123|rn30 1d90 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|65e2", + "Asia/Vladivostok|+10 +11 +09|-a0 -b0 -90|010101010101010101010201010101010101010101010101010101010101010|rn20 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4", + "Asia/Yakutsk|+09 +10 +08|-90 -a0 -80|010101010101010101010201010101010101010101010101010101010101010|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|28e4", + "Asia/Yekaterinburg|+05 +06 +04|-50 -60 -40|010101010101010101010201010101010101010101010101010101010101010|rn70 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|14e5", + "Asia/Yerevan|+04 +05 +03|-40 -50 -30|01010101010101010101020202020101010101010101010101010101010|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 4RX0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|13e5", + "Atlantic/Azores|-01 +00 WET|10 0 0|0101010101010101010101010101010121010101010101010101010101010101010101010101010101010101010101010101010101010|hAN0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|25e4", + "Atlantic/Bermuda|AST ADT|40 30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|avi0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e3", + "Atlantic/Canary|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXc0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|54e4", + "Atlantic/Cape_Verde|-02 -01|20 10|01|elE0|50e4", + "Atlantic/Faroe|WET WEST|0 -10|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|49e3", + "Atlantic/Madeira|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hAM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|27e4", + "Atlantic/South_Georgia|-02|20|0||30", + "Atlantic/Stanley|-04 -03 -02|40 30 20|01212101010101010101010101010101010101010101010101010101|wrg0 WL0 1qL0 U10 1tz0 2mN0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 U10 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qN0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 U10 1tz0 U10 1tz0 U10|21e2", + "Australia/Sydney|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r40 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|40e5", + "Australia/Adelaide|ACST ACDT|-9u -au|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r4u LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 WM0 1qM0 Rc0 1zc0 U00 1tA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|11e5", + "Australia/Brisbane|AEST AEDT|-a0 -b0|010101010|4r40 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0|20e5", + "Australia/Broken_Hill|ACST ACDT|-9u -au|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r4u LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|18e3", + "Australia/Currie|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r40 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|746", + "Australia/Darwin|ACST|-9u|0||12e4", + "Australia/Eucla|+0845 +0945|-8J -9J|0101010101010|bHRf Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|368", + "Australia/Hobart|AEDT AEST|-b0 -a0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|qg0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|21e4", + "Australia/Lord_Howe|AEST +1030 +1130 +11|-a0 -au -bu -b0|01212121213131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313|raC0 1zdu Rb0 1zd0 On0 1zd0 On0 1zd0 On0 1zd0 TXu 1qMu WLu 1tAu WLu 1tAu TXu 1tAu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 11Au 1nXu 1qMu 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu 11zu 1o0u WLu 1qMu 14nu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu|347", + "Australia/Lindeman|AEST AEDT|-a0 -b0|0101010101010|4r40 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0|10", + "Australia/Melbourne|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r40 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1qM0 11A0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|39e5", + "Australia/Perth|AWST AWDT|-80 -90|0101010101010|bHS0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|18e5", + "Europe/Brussels|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|21e5", + "Pacific/Easter|-06 -07 -05|60 70 50|010101010101010101010101020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 2pA0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0|30e2", + "EET|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00", + "Europe/Dublin|IST GMT|-10 0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4re0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5", + "Etc/GMT-1|+01|-10|0|", + "Pacific/Guadalcanal|+11|-b0|0||11e4", + "Pacific/Tarawa|+12|-c0|0||29e3", + "Etc/GMT-13|+13|-d0|0|", + "Etc/GMT-14|+14|-e0|0|", + "Etc/GMT-2|+02|-20|0|", + "Indian/Maldives|+05|-50|0||35e4", + "Pacific/Palau|+09|-90|0||21e3", + "Etc/GMT+1|-01|10|0|", + "Pacific/Tahiti|-10|a0|0||18e4", + "Etc/GMT+11|-11|b0|0|", + "Etc/GMT+12|-12|c0|0|", + "Etc/GMT+5|-05|50|0|", + "Etc/GMT+6|-06|60|0|", + "Etc/GMT+7|-07|70|0|", + "Etc/GMT+8|-08|80|0|", + "Pacific/Gambier|-09|90|0||125", + "Etc/UTC|UTC|0|0|", + "Europe/Andorra|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|B7d0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|79e3", + "Europe/Astrakhan|+04 +05 +03|-40 -50 -30|0101010101010101020202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|10e5", + "Europe/Athens|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|cOK0 1vc0 SO0 1cM0 1a00 1ao0 1fc0 1a10 1fG0 1cg0 1dX0 1bX0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|35e5", + "Europe/London|BST GMT|-10 0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4re0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|10e6", + "Europe/Belgrade|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|wdd0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5", + "Europe/Prague|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|muN0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|13e5", + "Europe/Bucharest|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|mRa0 On0 1fA0 1a10 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|19e5", + "Europe/Budapest|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXc0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e5", + "Europe/Zurich|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|38e4", + "Europe/Chisinau|MSK MSD EEST EET|-30 -40 -30 -20|010101010101010101012323232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 gL0 WO0 1cM0 1cM0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11D0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|67e4", + "Europe/Gibraltar|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|tLB0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|30e3", + "Europe/Helsinki|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm00 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5", + "Europe/Kaliningrad|MSK MSD EEST EET +03|-30 -40 -30 -20 -30|010101010101010102323232323232323232323232323232323232323232343|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|44e4", + "Europe/Kiev|MSK MSD EEST EET|-30 -40 -30 -20|0101010101010101010123232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 Db0 3220 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|34e5", + "Europe/Kirov|+04 +05 +03|-40 -50 -30|010101010101010102020202020202020202020202020202020202020202|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|48e4", + "Europe/Lisbon|CET WET WEST CEST|-10 0 -10 -20|01212121212121212121212121212121203030302121212121212121212121212121212121212121212121212121212121212121212121|go00 1cM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|27e5", + "Europe/Madrid|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|apy0 1a10 1fz0 1a10 19X0 1cN0 1fz0 1a10 1fC0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|62e5", + "Europe/Malta|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|XX0 LA0 1zc0 Oo0 1C00 Oo0 1co0 1cM0 1lA0 Xc0 1qq0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1iN0 19z0 1fB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|42e4", + "Europe/Minsk|MSK MSD EEST EET +03|-30 -40 -30 -20 -30|010101010101010101023232323232323232323232323232323232323234|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 3Fc0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0|19e5", + "Europe/Paris|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|fbc0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|11e6", + "Europe/Moscow|MSK MSD EEST EET MSK|-30 -40 -30 -20 -40|0101010101010101010102301010101010101010101010101010101010101040|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|16e6", + "Europe/Riga|MSK MSD EEST EET|-30 -40 -30 -20|010101010101010102323232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 1o00 11A0 1o00 11A0 1qM0 3oo0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|64e4", + "Europe/Rome|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|XX0 LA0 1zc0 Oo0 1C00 Oo0 1C00 LA0 1zc0 Oo0 1C00 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1zc0 Oo0 1fC0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|39e5", + "Europe/Samara|+04 +05 +03|-40 -50 -30|01010101010101010202010101010101010101010101010101010101020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2y10 14m0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|12e5", + "Europe/Saratov|+04 +05 +03|-40 -50 -30|0101010101010102020202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 5810", + "Europe/Simferopol|MSK MSD EET EEST MSK|-30 -40 -20 -30 -40|0101010101010101010232323101010323232323232323232323232323232323240|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 4eL0 1cL0 1cN0 1cL0 1cN0 dX0 WL0 1cN0 1cL0 1fB0 1o30 11B0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4", + "Europe/Sofia|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|muJ0 1dd0 1fb0 1ap0 1fb0 1a20 1fy0 1a30 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5", + "Europe/Tallinn|MSK MSD EEST EET|-30 -40 -30 -20|0101010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o10 11A0 1qM0 5QM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|41e4", + "Europe/Tirane|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|axz0 10n0 1op0 11z0 1pd0 11z0 1qN0 WL0 1qp0 Xb0 1qp0 Xb0 1qp0 11z0 1lB0 11z0 1qN0 11z0 1iN0 16n0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|42e4", + "Europe/Ulyanovsk|+04 +05 +03 +02|-40 -50 -30 -20|010101010101010102023202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|13e5", + "Europe/Uzhgorod|MSK MSD CET EET EEST|-30 -40 -10 -20 -30|010101010101010101023434343434343434343434343434343434343434343434343434343434343434343434343434343|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 1Nf0 2pw0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|11e4", + "Europe/Vienna|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXb0 19X0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|18e5", + "Europe/Vilnius|MSK MSD EEST EET CEST CET|-30 -40 -30 -20 -20 -10|01010101010101010232323232323232323454323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11B0 1o00 11A0 1qM0 8io0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|54e4", + "Europe/Volgograd|+04 +05 +03|-40 -50 -30|0101010101010102020202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 9Jd0|10e5", + "Europe/Warsaw|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e5", + "Europe/Zaporozhye|MSK MSD EEST EET|-30 -40 -30 -20|01010101010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cK0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|77e4", + "Pacific/Honolulu|HST|a0|0||37e4", + "Indian/Chagos|+05 +06|-50 -60|01|13ij0|30e2", + "Indian/Mauritius|+04 +05|-40 -50|01010|v5U0 14L0 12kr0 11z0|15e4", + "Pacific/Kwajalein|-12 +12|c0 -c0|01|Vxo0|14e3", + "MET|MET MEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00", + "Pacific/Chatham|+1245 +1345|-cJ -dJ|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|bKC0 IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00|600", + "Pacific/Apia|-11 -10 +14 +13|b0 a0 -e0 -d0|0101232323232323232323232323232323232323232|1Dbn0 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00|37e3", + "Pacific/Bougainville|+10 +11|-a0 -b0|01|1NwE0|18e4", + "Pacific/Efate|+11 +12|-b0 -c0|010101010101010101010|xpN0 1cL0 1oN0 10L0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 Lz0 1Nd0 An0|66e3", + "Pacific/Enderbury|-12 -11 +13|c0 b0 -d0|012|nIc0 B7X0|1", + "Pacific/Fakaofo|-11 +13|b0 -d0|01|1Gfn0|483", + "Pacific/Fiji|+12 +13|-c0 -d0|010101010101010101010101010101010101010101010101|1ace0 LA0 1EM0 IM0 nJc0 LA0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0|88e4", + "Pacific/Galapagos|-05 -06|50 60|0101|CVF0 gNd0 rz0|25e3", + "Pacific/Guam|GST GDT ChST|-a0 -b0 -a0|010101010102|JQ0 Rb0 1wp0 Rb0 5xd0 rX0 5sN0 zb1 1C0X On0 ULb0|17e4", + "Pacific/Kiritimati|-1040 -10 +14|aE a0 -e0|012|nIaE B7Xk|51e2", + "Pacific/Kosrae|+12 +11|-c0 -b0|01|1aAA0|66e2", + "Pacific/Marquesas|-0930|9u|0||86e2", + "Pacific/Pago_Pago|SST|b0|0||37e2", + "Pacific/Nauru|+1130 +12|-bu -c0|01|maCu|10e3", + "Pacific/Niue|-1130 -11|bu b0|01|libu|12e2", + "Pacific/Norfolk|+1130 +1230 +11|-bu -cu -b0|0102|bHOu On0 1COp0|25e4", + "Pacific/Noumea|+11 +12|-b0 -c0|0101010|jhp0 xX0 1PB0 yn0 HeP0 Ao0|98e3", + "Pacific/Pitcairn|-0830 -08|8u 80|01|18Vku|56", + "Pacific/Rarotonga|-1030 -0930 -10|au 9u a0|012121212121212121212121212|lyWu IL0 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu|13e3", + "Pacific/Tongatapu|+13 +14|-d0 -e0|010101010|1csd0 15A0 1wo0 xz0 1Q10 xz0 zWN0 s00|75e3", + "WET|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00" + ], + "links": [ + "Africa/Abidjan|Africa/Accra", + "Africa/Abidjan|Africa/Bamako", + "Africa/Abidjan|Africa/Banjul", + "Africa/Abidjan|Africa/Conakry", + "Africa/Abidjan|Africa/Dakar", + "Africa/Abidjan|Africa/Freetown", + "Africa/Abidjan|Africa/Lome", + "Africa/Abidjan|Africa/Nouakchott", + "Africa/Abidjan|Africa/Ouagadougou", + "Africa/Abidjan|Africa/Timbuktu", + "Africa/Abidjan|Atlantic/Reykjavik", + "Africa/Abidjan|Atlantic/St_Helena", + "Africa/Abidjan|Etc/GMT", + "Africa/Abidjan|Etc/GMT+0", + "Africa/Abidjan|Etc/GMT-0", + "Africa/Abidjan|Etc/GMT0", + "Africa/Abidjan|Etc/Greenwich", + "Africa/Abidjan|GMT", + "Africa/Abidjan|GMT+0", + "Africa/Abidjan|GMT-0", + "Africa/Abidjan|GMT0", + "Africa/Abidjan|Greenwich", + "Africa/Abidjan|Iceland", + "Africa/Cairo|Egypt", + "Africa/Johannesburg|Africa/Maseru", + "Africa/Johannesburg|Africa/Mbabane", + "Africa/Lagos|Africa/Bangui", + "Africa/Lagos|Africa/Brazzaville", + "Africa/Lagos|Africa/Douala", + "Africa/Lagos|Africa/Kinshasa", + "Africa/Lagos|Africa/Libreville", + "Africa/Lagos|Africa/Luanda", + "Africa/Lagos|Africa/Malabo", + "Africa/Lagos|Africa/Niamey", + "Africa/Lagos|Africa/Porto-Novo", + "Africa/Maputo|Africa/Blantyre", + "Africa/Maputo|Africa/Bujumbura", + "Africa/Maputo|Africa/Gaborone", + "Africa/Maputo|Africa/Harare", + "Africa/Maputo|Africa/Kigali", + "Africa/Maputo|Africa/Lubumbashi", + "Africa/Maputo|Africa/Lusaka", + "Africa/Nairobi|Africa/Addis_Ababa", + "Africa/Nairobi|Africa/Asmara", + "Africa/Nairobi|Africa/Asmera", + "Africa/Nairobi|Africa/Dar_es_Salaam", + "Africa/Nairobi|Africa/Djibouti", + "Africa/Nairobi|Africa/Kampala", + "Africa/Nairobi|Africa/Mogadishu", + "Africa/Nairobi|Indian/Antananarivo", + "Africa/Nairobi|Indian/Comoro", + "Africa/Nairobi|Indian/Mayotte", + "Africa/Tripoli|Libya", + "America/Adak|America/Atka", + "America/Adak|US/Aleutian", + "America/Anchorage|US/Alaska", + "America/Argentina/Buenos_Aires|America/Buenos_Aires", + "America/Argentina/Catamarca|America/Argentina/ComodRivadavia", + "America/Argentina/Catamarca|America/Catamarca", + "America/Argentina/Cordoba|America/Cordoba", + "America/Argentina/Cordoba|America/Rosario", + "America/Argentina/Jujuy|America/Jujuy", + "America/Argentina/Mendoza|America/Mendoza", + "America/Cayenne|Etc/GMT+3", + "America/Chicago|CST6CDT", + "America/Chicago|US/Central", + "America/Denver|America/Shiprock", + "America/Denver|MST7MDT", + "America/Denver|Navajo", + "America/Denver|US/Mountain", + "America/Detroit|US/Michigan", + "America/Edmonton|Canada/Mountain", + "America/Fort_Wayne|America/Indiana/Indianapolis", + "America/Fort_Wayne|America/Indianapolis", + "America/Fort_Wayne|US/East-Indiana", + "America/Halifax|Canada/Atlantic", + "America/Havana|Cuba", + "America/Indiana/Knox|America/Knox_IN", + "America/Indiana/Knox|US/Indiana-Starke", + "America/Jamaica|Jamaica", + "America/Kentucky/Louisville|America/Louisville", + "America/La_Paz|Etc/GMT+4", + "America/Los_Angeles|PST8PDT", + "America/Los_Angeles|US/Pacific", + "America/Los_Angeles|US/Pacific-New", + "America/Manaus|Brazil/West", + "America/Mazatlan|Mexico/BajaSur", + "America/Mexico_City|Mexico/General", + "America/New_York|EST5EDT", + "America/New_York|US/Eastern", + "America/Noronha|Brazil/DeNoronha", + "America/Panama|America/Atikokan", + "America/Panama|America/Cayman", + "America/Panama|America/Coral_Harbour", + "America/Panama|EST", + "America/Phoenix|America/Creston", + "America/Phoenix|MST", + "America/Phoenix|US/Arizona", + "America/Puerto_Rico|America/Anguilla", + "America/Puerto_Rico|America/Antigua", + "America/Puerto_Rico|America/Aruba", + "America/Puerto_Rico|America/Blanc-Sablon", + "America/Puerto_Rico|America/Curacao", + "America/Puerto_Rico|America/Dominica", + "America/Puerto_Rico|America/Grenada", + "America/Puerto_Rico|America/Guadeloupe", + "America/Puerto_Rico|America/Kralendijk", + "America/Puerto_Rico|America/Lower_Princes", + "America/Puerto_Rico|America/Marigot", + "America/Puerto_Rico|America/Montserrat", + "America/Puerto_Rico|America/Port_of_Spain", + "America/Puerto_Rico|America/St_Barthelemy", + "America/Puerto_Rico|America/St_Kitts", + "America/Puerto_Rico|America/St_Lucia", + "America/Puerto_Rico|America/St_Thomas", + "America/Puerto_Rico|America/St_Vincent", + "America/Puerto_Rico|America/Tortola", + "America/Puerto_Rico|America/Virgin", + "America/Regina|Canada/Saskatchewan", + "America/Rio_Branco|America/Porto_Acre", + "America/Rio_Branco|Brazil/Acre", + "America/Santiago|Chile/Continental", + "America/Sao_Paulo|Brazil/East", + "America/St_Johns|Canada/Newfoundland", + "America/Tijuana|America/Ensenada", + "America/Tijuana|America/Santa_Isabel", + "America/Tijuana|Mexico/BajaNorte", + "America/Toronto|America/Montreal", + "America/Toronto|America/Nassau", + "America/Toronto|Canada/Eastern", + "America/Vancouver|Canada/Pacific", + "America/Whitehorse|Canada/Yukon", + "America/Winnipeg|Canada/Central", + "Asia/Ashgabat|Asia/Ashkhabad", + "Asia/Bangkok|Asia/Phnom_Penh", + "Asia/Bangkok|Asia/Vientiane", + "Asia/Bangkok|Etc/GMT-7", + "Asia/Bangkok|Indian/Christmas", + "Asia/Brunei|Asia/Kuching", + "Asia/Brunei|Etc/GMT-8", + "Asia/Dhaka|Asia/Dacca", + "Asia/Dubai|Asia/Muscat", + "Asia/Dubai|Etc/GMT-4", + "Asia/Dubai|Indian/Mahe", + "Asia/Dubai|Indian/Reunion", + "Asia/Ho_Chi_Minh|Asia/Saigon", + "Asia/Hong_Kong|Hongkong", + "Asia/Jerusalem|Asia/Tel_Aviv", + "Asia/Jerusalem|Israel", + "Asia/Kathmandu|Asia/Katmandu", + "Asia/Kolkata|Asia/Calcutta", + "Asia/Kuala_Lumpur|Asia/Singapore", + "Asia/Kuala_Lumpur|Singapore", + "Asia/Macau|Asia/Macao", + "Asia/Makassar|Asia/Ujung_Pandang", + "Asia/Nicosia|Europe/Nicosia", + "Asia/Qatar|Asia/Bahrain", + "Asia/Rangoon|Asia/Yangon", + "Asia/Rangoon|Indian/Cocos", + "Asia/Riyadh|Antarctica/Syowa", + "Asia/Riyadh|Asia/Aden", + "Asia/Riyadh|Asia/Kuwait", + "Asia/Riyadh|Etc/GMT-3", + "Asia/Seoul|ROK", + "Asia/Shanghai|Asia/Chongqing", + "Asia/Shanghai|Asia/Chungking", + "Asia/Shanghai|Asia/Harbin", + "Asia/Shanghai|PRC", + "Asia/Taipei|ROC", + "Asia/Tehran|Iran", + "Asia/Thimphu|Asia/Thimbu", + "Asia/Tokyo|Japan", + "Asia/Ulaanbaatar|Asia/Ulan_Bator", + "Asia/Urumqi|Antarctica/Vostok", + "Asia/Urumqi|Asia/Kashgar", + "Asia/Urumqi|Etc/GMT-6", + "Atlantic/Faroe|Atlantic/Faeroe", + "Atlantic/South_Georgia|Etc/GMT+2", + "Australia/Adelaide|Australia/South", + "Australia/Brisbane|Australia/Queensland", + "Australia/Broken_Hill|Australia/Yancowinna", + "Australia/Darwin|Australia/North", + "Australia/Hobart|Australia/Tasmania", + "Australia/Lord_Howe|Australia/LHI", + "Australia/Melbourne|Australia/Victoria", + "Australia/Perth|Australia/West", + "Australia/Sydney|Australia/ACT", + "Australia/Sydney|Australia/Canberra", + "Australia/Sydney|Australia/NSW", + "Etc/UTC|Etc/UCT", + "Etc/UTC|Etc/Universal", + "Etc/UTC|Etc/Zulu", + "Etc/UTC|UCT", + "Etc/UTC|UTC", + "Etc/UTC|Universal", + "Etc/UTC|Zulu", + "Europe/Belgrade|Europe/Ljubljana", + "Europe/Belgrade|Europe/Podgorica", + "Europe/Belgrade|Europe/Sarajevo", + "Europe/Belgrade|Europe/Skopje", + "Europe/Belgrade|Europe/Zagreb", + "Europe/Berlin|Arctic/Longyearbyen", + "Europe/Berlin|Atlantic/Jan_Mayen", + "Europe/Berlin|Europe/Copenhagen", + "Europe/Berlin|Europe/Oslo", + "Europe/Berlin|Europe/Stockholm", + "Europe/Brussels|CET", + "Europe/Brussels|Europe/Amsterdam", + "Europe/Brussels|Europe/Luxembourg", + "Europe/Chisinau|Europe/Tiraspol", + "Europe/Dublin|Eire", + "Europe/Helsinki|Europe/Mariehamn", + "Europe/Istanbul|Asia/Istanbul", + "Europe/Istanbul|Turkey", + "Europe/Lisbon|Portugal", + "Europe/London|Europe/Belfast", + "Europe/London|Europe/Guernsey", + "Europe/London|Europe/Isle_of_Man", + "Europe/London|Europe/Jersey", + "Europe/London|GB", + "Europe/London|GB-Eire", + "Europe/Moscow|W-SU", + "Europe/Paris|Europe/Monaco", + "Europe/Prague|Europe/Bratislava", + "Europe/Rome|Europe/San_Marino", + "Europe/Rome|Europe/Vatican", + "Europe/Warsaw|Poland", + "Europe/Zurich|Europe/Busingen", + "Europe/Zurich|Europe/Vaduz", + "Indian/Maldives|Etc/GMT-5", + "Indian/Maldives|Indian/Kerguelen", + "Pacific/Auckland|Antarctica/McMurdo", + "Pacific/Auckland|Antarctica/South_Pole", + "Pacific/Auckland|NZ", + "Pacific/Chatham|NZ-CHAT", + "Pacific/Easter|Chile/EasterIsland", + "Pacific/Gambier|Etc/GMT+9", + "Pacific/Guadalcanal|Etc/GMT-11", + "Pacific/Guadalcanal|Pacific/Pohnpei", + "Pacific/Guadalcanal|Pacific/Ponape", + "Pacific/Guam|Pacific/Saipan", + "Pacific/Honolulu|HST", + "Pacific/Honolulu|Pacific/Johnston", + "Pacific/Honolulu|US/Hawaii", + "Pacific/Kwajalein|Kwajalein", + "Pacific/Pago_Pago|Pacific/Midway", + "Pacific/Pago_Pago|Pacific/Samoa", + "Pacific/Pago_Pago|US/Samoa", + "Pacific/Palau|Etc/GMT-9", + "Pacific/Port_Moresby|Antarctica/DumontDUrville", + "Pacific/Port_Moresby|Etc/GMT-10", + "Pacific/Port_Moresby|Pacific/Chuuk", + "Pacific/Port_Moresby|Pacific/Truk", + "Pacific/Port_Moresby|Pacific/Yap", + "Pacific/Tahiti|Etc/GMT+10", + "Pacific/Tarawa|Etc/GMT-12", + "Pacific/Tarawa|Pacific/Funafuti", + "Pacific/Tarawa|Pacific/Majuro", + "Pacific/Tarawa|Pacific/Wake", + "Pacific/Tarawa|Pacific/Wallis" + ] + }); + + + return moment; +})); diff --git a/node_modules/moment-timezone/builds/moment-timezone-with-data-1970-2030.min.js b/node_modules/moment-timezone/builds/moment-timezone-with-data-1970-2030.min.js new file mode 100644 index 00000000..a3d2fb01 --- /dev/null +++ b/node_modules/moment-timezone/builds/moment-timezone-with-data-1970-2030.min.js @@ -0,0 +1 @@ +!function(c,M){"use strict";"object"==typeof module&&module.exports?module.exports=M(require("moment")):"function"==typeof define&&define.amd?define(["moment"],M):M(c.moment)}(this,function(z){"use strict";var M,p={},a={},i={},e={};z&&"string"==typeof z.version||R("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var c=z.version.split("."),A=+c[0],b=+c[1];function n(c){return 96= 2.6.0. You are using Moment.js "+z.version+". See momentjs.com"),d.prototype={_set:function(c){this.name=c.name,this.abbrs=c.abbrs,this.untils=c.untils,this.offsets=c.offsets,this.population=c.population},_index:function(c){var M,A=+c,b=this.untils;for(M=0;M= 2.9.0. You are using Moment.js "+z.version+"."),z.defaultZone=c?u(c):null,z};var g=z.momentProperties;return"[object Array]"===Object.prototype.toString.call(g)?(g.push("_z"),g.push("_a")):g&&(g._z=null),T({version:"2019b",zones:["Africa/Abidjan|GMT|0|0||48e5","Africa/Nairobi|EAT|-30|0||47e5","Africa/Algiers|WET WEST CET CEST|0 -10 -10 -20|01012320102|3bX0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0|26e5","Africa/Lagos|WAT|-10|0||17e6","Africa/Bissau|-01 GMT|10 0|01|cap0|39e4","Africa/Maputo|CAT|-20|0||26e5","Africa/Cairo|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|LX0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1WL0 rd0 1Rz0 wp0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1qL0 Xd0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1ny0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 WL0 1qN0 Rb0 1wp0 On0 1zd0 Lz0 1EN0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0|15e6","Africa/Casablanca|+00 +01|0 -10|01010101010101010101010101010101010101010101010101010101010101010101010|aS00 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4mn0 SyN0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600|32e5","Africa/Ceuta|WET WEST CET CEST|0 -10 -10 -20|0101010102323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|aS00 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4VB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|85e3","Africa/El_Aaiun|-01 +00 +01|10 0 -10|01212121212121212121212121212121212121212121212121212121212121212121|fi10 6L0 AL0 1Nd0 XX0 1Cp0 pz0 1cBB0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600|20e4","Africa/Johannesburg|SAST|-20|0||84e5","Africa/Juba|CAT CAST EAT|-20 -30 -30|0101010101010101010101010101010102|LW0 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0","Africa/Khartoum|CAT CAST EAT|-20 -30 -30|01010101010101010101010101010101020|LW0 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 HjL0|51e5","Africa/Monrovia|MMT GMT|I.u 0|01|4SoI.u|11e5","Africa/Ndjamena|WAT WAST|-10 -20|010|nNb0 Wn0|13e5","Africa/Sao_Tome|GMT WAT|0 -10|010|1UQN0 2q00","Africa/Tripoli|EET CET CEST|-20 -10 -20|0121212121212121210120120|tda0 A10 1db0 1cN0 1db0 1dd0 1db0 1eN0 1bb0 1e10 1cL0 1c10 1db0 1dd0 1db0 1cN0 1db0 1q10 fAn0 1ep0 1db0 AKq0 TA0 1o00|11e5","Africa/Tunis|CET CEST|-10 -20|0101010101010101010|hOn0 WM0 1rA0 11c0 nwo0 Ko0 1cM0 1cM0 1rA0 10M0 zuM0 10N0 1aN0 1qM0 WM0 1qM0 11A0 1o00|20e5","Africa/Windhoek|SAST CAT WAT|-20 -20 -10|01212121212121212121212121212121212121212121212121|Ndy0 9Io0 16P0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4","America/Adak|BST BDT AHST HST HDT|b0 a0 a0 a0 90|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kd0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326","America/Anchorage|AHST AHDT YST AKST AKDT|a0 90 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kc0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4","America/Puerto_Rico|AST|40|0||24e5","America/Araguaina|-03 -02|30 20|01010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 ny10 Lz0|14e4","America/Argentina/Buenos_Aires|-03 -02|30 20|01010101010101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 A4p0 uL0 1qN0 WL0","America/Argentina/Catamarca|-03 -02 -04|30 20 40|01010101210102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 7B0 8zb0 uL0","America/Argentina/Cordoba|-03 -02 -04|30 20 40|01010101210101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0 1qN0 WL0","America/Argentina/Jujuy|-03 -02 -04|30 20 40|010101202101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1ze0 TX0 1ld0 WK0 1wp0 TX0 A4p0 uL0","America/Argentina/La_Rioja|-03 -02 -04|30 20 40|010101012010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0","America/Argentina/Mendoza|-03 -02 -04|30 20 40|01010120202102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1u20 SL0 1vd0 Tb0 1wp0 TW0 ri10 Op0 7TX0 uL0","America/Argentina/Rio_Gallegos|-03 -02 -04|30 20 40|01010101010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0","America/Argentina/Salta|-03 -02 -04|30 20 40|010101012101010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0","America/Argentina/San_Juan|-03 -02 -04|30 20 40|010101012010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rld0 m10 8lb0 uL0","America/Argentina/San_Luis|-03 -02 -04|30 20 40|010101202020102020|9Rf0 Db0 zvd0 Bz0 1tB0 XX0 1q20 SL0 AN0 vDb0 m10 8lb0 8L0 jd0 1qN0 WL0 1qN0","America/Argentina/Tucuman|-03 -02 -04|30 20 40|0101010121010201010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 4N0 8BX0 uL0 1qN0 WL0","America/Argentina/Ushuaia|-03 -02 -04|30 20 40|01010101010102010|9Rf0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rkN0 8p0 8zb0 uL0","America/Asuncion|-04 -03|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|6FE0 3CL0 3Dd0 10L0 1pB0 10n0 1pB0 10n0 1pB0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1lB0 14n0 1dd0 1cL0 1fd0 WL0 1rd0 1aL0 1dB0 Xz0 1qp0 Xb0 1qN0 10L0 1rB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 WN0 1qL0 11B0 1nX0 1ip0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 TX0 1tB0 19X0 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0|28e5","America/Panama|EST|50|0||15e5","America/Bahia_Banderas|PST MST MDT CDT CST|80 70 60 50 60|012121212121212121212121212121343434343434343434343434343434343434343434|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|84e3","America/Bahia|-03 -02|30 20|010101010101010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 l5B0 Rb0|27e5","America/Barbados|AST ADT|40 30|010101010|i7G0 IL0 1ip0 17b0 1ip0 17b0 1ld0 13b0|28e4","America/Belem|-03 -02|30 20|0101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0|20e5","America/Belize|CST CDT|60 50|01010|9xG0 qn0 lxB0 mn0|57e3","America/Boa_Vista|-04 -03|40 30|01010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 smp0 WL0 1tB0 2L0|62e2","America/Bogota|-05 -04|50 40|010|Snh0 2en0|90e5","America/Boise|MST MDT|70 60|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 Dd0 1Kn0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e4","America/Cambridge_Bay|MST MDT CST CDT EST|70 60 60 50 50|01010101010101010101010101010101010101012342101010101010101010101010101010101010101010101010101010101010|p7J0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11A0 1nX0 2K0 WQ0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e2","America/Campo_Grande|-04 -03|40 30|010101010101010101010101010101010101010101010101010101010101010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4","America/Cancun|CST EST EDT CDT|60 50 40 50|012121230303030303030303030303030303030301|t9G0 yLB0 1lb0 14p0 1lb0 14p0 Lz0 xB0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4","America/Caracas|-04 -0430|40 4u|010|1wmv0 kqo0|29e5","America/Cayenne|-03|30|0||58e3","America/Chicago|CST CDT|60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5","America/Chihuahua|CST CDT MDT MST|60 50 60 70|01010232323232323232323232323232323232323232323232323232323232323232323|13Vk0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|81e4","America/Costa_Rica|CST CDT|60 50|010101010|mgS0 Db0 1Kp0 Db0 pRB0 15b0 1kp0 mL0|12e5","America/Phoenix|MST|70|0||42e5","America/Cuiaba|-04 -03|40 30|0101010101010101010101010101010101010101010101010101010101010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 4a10 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|54e4","America/Danmarkshavn|-03 -02 GMT|30 20 0|0101010101010101010101010101010102|oXh0 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 DC0|8","America/Dawson_Creek|PST PDT MST|80 70 70|0101012|Ka0 1cL0 1cN0 1fz0 1cN0 ML0|12e3","America/Dawson|YST PST PDT|90 80 70|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|9ix0 fNd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|13e2","America/Denver|MST MDT|70 60|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5","America/Detroit|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|85H0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e5","America/Edmonton|MST MDT|70 60|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|5E90 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|10e5","America/Eirunepe|-05 -04|50 40|01010101010|CxF0 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0 yTd0 d5X0|31e3","America/El_Salvador|CST CDT|60 50|01010|Gcu0 WL0 1qN0 WL0|11e5","America/Tijuana|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|fmy0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|20e5","America/Fort_Nelson|PST PDT MST|80 70 70|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010102|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2","America/Fort_Wayne|EST EDT|50 40|01010101010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Fortaleza|-03 -02|30 20|01010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 5z0 2mN0 On0|34e5","America/Glace_Bay|AST ADT|40 30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|5E60 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3","America/Godthab|-03 -02|30 20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXh0 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e3","America/Goose_Bay|AST ADT ADDT|40 30 20|010101010101010101010101010101010101020101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2","America/Grand_Turk|EST EDT AST|50 40 40|01010101010101010101010101010101010101010101010101010101010101010101010101210101010101010101010101010|mG70 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 5Ip0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2","America/Guatemala|CST CDT|60 50|010101010|9tG0 An0 mtd0 Nz0 ifB0 17b0 zDB0 11z0|13e5","America/Guayaquil|-05 -04|50 40|010|TKR0 rz0|27e5","America/Guyana|-0345 -03 -04|3J 30 40|012|dyPJ Bxbf|80e4","America/Halifax|AST ADT|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4","America/Havana|CST CDT|50 40|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K50 1cL0 1cN0 1fz0 1cN0 14n0 1ld0 14L0 1kN0 15b0 1kp0 1cL0 1cN0 1fz0 1a10 1fz0 1fB0 11z0 14p0 1nX0 11B0 1nX0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 1a10 1in0 1a10 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 17c0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 11A0 6i00 Rc0 1wo0 U00 1tA0 Rc0 1wo0 U00 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5","America/Hermosillo|PST MST MDT|80 70 60|01212121|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0|64e4","America/Indiana/Knox|CST CDT EST|60 50 50|01010101010101010101010101010101010101010101210101010101010101010101010101010101010101010101010|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 z8o0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Indiana/Marengo|EST EDT CDT|50 40 50|010101010201010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1e6p0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Indiana/Petersburg|CST CDT EST EDT|60 50 50 40|0101010101010101210123232323232323232323232323232323232323232323232|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 19co0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Indiana/Tell_City|EST EDT CDT CST|50 40 50 60|01023232323232323232323232323232323232323232323232323|K70 1cL0 1qhd0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Indiana/Vevay|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1lnd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Indiana/Vincennes|EST EDT CDT CST|50 40 50 60|01023201010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Indiana/Winamac|EST EDT CDT CST|50 40 50 60|01023101010101010101010101010101010101010101010101010|K70 1cL0 1qhd0 1o00 Rd0 1za0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Inuvik|PST MST MDT|80 70 60|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|mGa0 2pz0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|35e2","America/Iqaluit|EST EDT CST CDT|50 40 60 50|0101010101010101010101010101010101010101230101010101010101010101010101010101010101010101010101010101010|p7H0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|67e2","America/Jamaica|EST EDT|50 40|010101010101010101010|9Kv0 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0|94e4","America/Juneau|PST PDT YDT YST AKST AKDT|80 70 80 90 90 80|0101010101010101010102010101345454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cM0 1cM0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|33e3","America/Kentucky/Louisville|EST EDT CDT|50 40 50|010101010201010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Kentucky/Monticello|CST CDT EST EDT|60 50 50 40|010101010101010101010101010101010101010101010101010101010101012323232323232323232323232323232323232323232323232323232323232|K80 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/La_Paz|-04|40|0||19e5","America/Lima|-05 -04|50 40|010101010|CVF0 zX0 1O10 zX0 6Gp0 zX0 98p0 zX0|11e6","America/Los_Angeles|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6","America/Maceio|-03 -02|30 20|0101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 8Q10 WL0 1tB0 5z0 2mN0 On0|93e4","America/Managua|CST EST CDT|60 50 50|010202010102020|86u0 4mn0 9Up0 Dz0 1K10 Dz0 s3F0 1KH0 DB0 9In0 k8p0 19X0 1o30 11y0|22e5","America/Manaus|-04 -03|40 30|010101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0|19e5","America/Martinique|AST ADT|40 30|010|oXg0 19X0|39e4","America/Matamoros|CST CDT|60 50|0101010101010101010101010101010101010101010101010101010101010101010101010|IqU0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|45e4","America/Mazatlan|PST MST MDT|80 70 60|012121212121212121212121212121212121212121212121212121212121212121212121|80 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|44e4","America/Menominee|EST CDT CST|50 50 60|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|85H0 1cM0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|85e2","America/Merida|CST EST CDT|60 50 50|0102020202020202020202020202020202020202020202020202020202020202020202020|t9G0 2hz0 wu30 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|11e5","America/Metlakatla|PST PDT AKST AKDT|80 70 90 80|0101010101010101010101010101023232302323232323232323232323232|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1hU10 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2","America/Mexico_City|CST CDT|60 50|01010101010101010101010101010101010101010101010101010101010101010101010|13Vk0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|20e6","America/Miquelon|AST -03 -02|40 30 20|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|p9g0 gQ10 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2","America/Moncton|AST ADT|40 30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K60 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14n1 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 ReX 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|64e3","America/Monterrey|CST CDT|60 50|0101010101010101010101010101010101010101010101010101010101010101010101010|IqU0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0|41e5","America/Montevideo|-03 -02 -0130 -0230|30 20 1u 2u|0101023010101010101010101010101010101010101010101010|JD0 jX0 4vB0 xz0 3Cp0 mmu 1a10 IMu Db0 4c10 uL0 1Nd0 An0 1SN0 uL0 mp0 28L0 iPB0 un0 1SN0 xz0 1zd0 Lz0 1zd0 Rb0 1zd0 On0 1wp0 Rb0 s8p0 1fB0 1ip0 11z0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5","America/Toronto|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e5","America/New_York|EST EDT|50 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6","America/Nipigon|EST EDT|50 40|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|avj0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|16e2","America/Nome|BST BDT YST AKST AKDT|b0 a0 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Kd0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cl0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|38e2","America/Noronha|-02 -01|20 10|01010101010101010|CxC0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|30e2","America/North_Dakota/Beulah|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010123232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/North_Dakota/Center|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010123232323232323232323232323232323232323232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/North_Dakota/New_Salem|MST MDT CST CDT|70 60 60 50|010101010101010101010101010101010101010101010101010101010101010101012323232323232323232323232323232323232323232323232323232|K90 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Ojinaga|CST CDT MDT MST|60 50 60 70|01010232323232323232323232323232323232323232323232323232323232323232323|13Vk0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3","America/Pangnirtung|AST ADT EDT EST CST CDT|40 30 40 50 60 50|0101010101010101010101010101010232323232453232323232323232323232323232323232323232323232323232323232323|p7G0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1o00 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2","America/Paramaribo|-0330 -03|3u 30|01|zSPu|24e4","America/Port-au-Prince|EST EDT|50 40|01010101010101010101010101010101010101010101010101010101010101010101010|wu50 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14q0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 i6n0 1nX0 11B0 1nX0 d430 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5","America/Rio_Branco|-05 -04|50 40|010101010|CxF0 Rb0 1tB0 IL0 1Fd0 FX0 NBd0 d5X0|31e4","America/Porto_Velho|-04 -03|40 30|0101010|CxE0 Rb0 1tB0 IL0 1Fd0 FX0|37e4","America/Punta_Arenas|-03 -04|30 40|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0","America/Rainy_River|CST CDT|60 50|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|avk0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|842","America/Rankin_Inlet|CST CDT EST|60 50 50|0101010101010101010101010101010101010101012101010101010101010101010101010101010101010101010101010101010|p7I0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e2","America/Recife|-03 -02|30 20|01010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|33e5","America/Regina|CST|60|0||19e4","America/Resolute|CST CDT EST|60 50 50|0101010101010101010101010101010101010101012101010101012101010101010101010101010101010101010101010101010|p7I0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|229","America/Santarem|-04 -03|40 30|01010101|CxE0 Rb0 1tB0 IL0 1Fd0 FX0 NBd0|21e4","America/Santiago|-03 -04|30 40|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0|62e5","America/Santo_Domingo|-0430 EST AST|4u 50 40|0101010101212|ksu 1Cou yLu 1RAu wLu 1QMu xzu 1Q0u xXu 1PAu 13jB0 e00|29e5","America/Sao_Paulo|-03 -02|30 20|010101010101010101010101010101010101010101010101010101010101010101010|CxD0 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6","America/Scoresbysund|-02 -01 +00|20 10 0|0102121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|oXg0 1a00 1cK0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|452","America/Sitka|PST PDT YST AKST AKDT|80 70 90 90 80|0101010101010101010101010101234343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|90e2","America/St_Johns|NST NDT NDDT|3u 2u 1u|010101010101010101010101010101010101020101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K5u 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4","America/Swift_Current|MST CST|70 60|01|5E90|16e3","America/Tegucigalpa|CST CDT|60 50|0101010|Gcu0 WL0 1qN0 WL0 GRd0 AL0|11e5","America/Thule|AST ADT|40 30|010101010101010101010101010101010101010101010101010101010101010101010101010101010|PHG0 1cL0 1cN0 1cL0 1fB0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|656","America/Thunder_Bay|EST EDT|50 40|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K70 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4","America/Vancouver|PST PDT|80 70|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|Ka0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5","America/Whitehorse|PST PDT|80 70|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|p7K0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3","America/Winnipeg|CST CDT|60 50|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|K80 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|66e4","America/Yakutat|YST YDT AKST AKDT|90 80 90 80|0101010101010101010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|Kb0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cn0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|642","America/Yellowknife|MST MDT|70 60|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|p7J0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3","Antarctica/Casey|+08 +11|-80 -b0|0101010|1ARS0 T90 40P0 KL0 blz0 3m10|10","Antarctica/Davis|+07 +05|-70 -50|01010|1ART0 VB0 3Wn0 KN0|70","Pacific/Port_Moresby|+10|-a0|0||25e4","Antarctica/Macquarie|AEDT AEST +11|-b0 -a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010102|qg0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0|1","Antarctica/Mawson|+06 +05|-60 -50|01|1ARU0|60","Pacific/Auckland|NZST NZDT|-c0 -d0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|bKC0 IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00|14e5","Antarctica/Palmer|-03 -02 -04|30 20 40|01020202020202020202020202020202020202020202020202020202020202020202020|9Rf0 Db0 jsN0 14N0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40","Antarctica/Rothera|-00 -03|0 30|01|gOo0|130","Asia/Riyadh|+03|-30|0||57e5","Antarctica/Troll|-00 +00 +02|0 0 -20|012121212121212121212121212121212121212121212121212121|1puo0 hd0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|40","Asia/Urumqi|+06|-60|0||32e5","Europe/Berlin|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXd0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|41e5","Asia/Almaty|+06 +07 +05|-60 -70 -50|0101010101010101010102010101010101010101010101010|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|15e5","Asia/Amman|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|8kK0 KL0 1oN0 11b0 1oN0 11b0 1pd0 1dz0 1cp0 11b0 1op0 11b0 fO10 1db0 1e10 1cL0 1cN0 1cL0 1cN0 1fz0 1pd0 10n0 1ld0 14n0 1hB0 15b0 1ip0 19X0 1cN0 1cL0 1cN0 17b0 1ld0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1So0 y00 1fc0 1dc0 1co0 1dc0 1cM0 1cM0 1cM0 1o00 11A0 1lc0 17c0 1cM0 1cM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|25e5","Asia/Anadyr|+13 +14 +12 +11|-d0 -e0 -c0 -b0|010202020202020202023202020202020202020202020202020202020232|rmX0 1db0 2q10 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|13e3","Asia/Aqtau|+05 +06 +04|-50 -60 -40|0101010101010101010201010120202020202020202020|sAj0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|15e4","Asia/Aqtobe|+05 +06 +04|-50 -60 -40|01010101010101010102010101010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|27e4","Asia/Ashgabat|+05 +06 +04|-50 -60 -40|01010101010101010101020|rn70 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0|41e4","Asia/Atyrau|+05 +06 +04|-50 -60 -40|010101010101010101020101010101010102020202020|sAj0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 2sp0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0","Asia/Baghdad|+03 +04|-30 -40|01010101010101010101010101010101010101010101010101010|u190 11b0 1cp0 1dz0 1dd0 1db0 1cN0 1cp0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1de0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0|66e5","Asia/Qatar|+04 +03|-40 -30|01|5QI0|96e4","Asia/Baku|+04 +05 +03|-40 -50 -30|010101010101010101010201010101010101010101010101010101010101010|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 9Je0 1o00 11z0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5","Asia/Bangkok|+07|-70|0||15e6","Asia/Barnaul|+07 +08 +06|-70 -80 -60|01010101010101010101020101010102020202020202020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 p90 LE0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0","Asia/Beirut|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|61a0 En0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1op0 11b0 dA10 17b0 1iN0 17b0 1iN0 17b0 1iN0 17b0 1vB0 SL0 1mp0 13z0 1iN0 17b0 1iN0 17b0 1jd0 12n0 1a10 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0|22e5","Asia/Bishkek|+06 +07 +05|-60 -70 -50|0101010101010101010102020202020202020202020202020|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2e00 1tX0 17b0 1ip0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1cPu 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0|87e4","Asia/Brunei|+08|-80|0||42e4","Asia/Kolkata|IST|-5u|0||15e6","Asia/Chita|+09 +10 +08|-90 -a0 -80|0101010101010101010102010101010101010101010101010101010101010120|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3re0|33e4","Asia/Choibalsan|+07 +08 +10 +09|-70 -80 -a0 -90|012323232323232323232323232323232323232323232313131|jsF0 cKn0 1da0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 3Db0 h1f0 1cJ0 1cP0 1cJ0|38e3","Asia/Shanghai|CST CDT|-80 -90|0101010101010|DKG0 Rb0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0|23e6","Asia/Colombo|+0530 +0630 +06|-5u -6u -60|0120|14giu 11zu n3cu|22e5","Asia/Dhaka|+06 +07|-60 -70|010|1A5R0 1i00|16e6","Asia/Damascus|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|M00 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 Nb0 1AN0 Nb0 bcp0 19X0 1gp0 19X0 3ld0 1xX0 Vd0 1Bz0 Sp0 1vX0 10p0 1dz0 1cN0 1cL0 1db0 1db0 1g10 1an0 1ap0 1db0 1fd0 1db0 1cN0 1db0 1dd0 1db0 1cp0 1dz0 1c10 1dX0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 19z0 1fB0 1qL0 11B0 1on0 Wp0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0|26e5","Asia/Dili|+09 +08|-90 -80|010|fpr0 Xld0|19e4","Asia/Dubai|+04|-40|0||39e5","Asia/Dushanbe|+06 +07 +05|-60 -70 -50|0101010101010101010102|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2hB0|76e4","Asia/Famagusta|EET EEST +03|-20 -30 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101012010101010101010101010101010|cPa0 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00","Asia/Gaza|IST IDT EET EEST|-20 -30 -20 -30|010101010101010101010101010101023232323232323232323232323232323232323232323232323232323232323232323232|aXa0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 11z0 1o10 14o0 1lA1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0|18e5","Asia/Hebron|IST IDT EET EEST|-20 -30 -20 -30|01010101010101010101010101010102323232323232323232323232323232323232323232323232323232323232323232323232|aXa0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 12L0 1mN0 14o0 1lc0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0|25e4","Asia/Ho_Chi_Minh|+08 +07|-80 -70|01|dfs0|90e5","Asia/Hong_Kong|HKT HKST|-80 -90|01010101010101010|H7u 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|73e5","Asia/Hovd|+06 +07 +08|-60 -70 -80|01212121212121212121212121212121212121212121212121|jsG0 cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|81e3","Asia/Irkutsk|+08 +09 +07|-80 -90 -70|010101010101010101010201010101010101010101010101010101010101010|rn40 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4","Europe/Istanbul|EET EEST +04 +03|-20 -30 -40 -30|01010101010101010123232323231010101010101010101010101010101010101010101010101010101010101013|MK0 11z0 1o10 11z0 1qN0 11z0 1ze0 11B0 WM0 1qO0 WI0 1nX0 1rB0 10L0 11B0 1in0 17d0 1in0 2pX0 19E0 1fU0 16Q0 1iI0 16Q0 1iI0 1Vd0 pb0 3Kp0 14o0 1de0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1a00 1fA0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WO0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6","Asia/Jakarta|WIB|-70|0||31e6","Asia/Jayapura|WIT|-90|0||26e4","Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|aXa0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 1hB0 1dX0 1ep0 1aL0 1eN0 17X0 1nf0 11z0 1tB0 19W0 1e10 17b0 1ep0 1gL0 18N0 1fz0 1eN0 17b0 1gq0 1gn0 19d0 1dz0 1c10 17X0 1hB0 1gn0 19d0 1dz0 1c10 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0|81e4","Asia/Kabul|+0430|-4u|0||46e5","Asia/Kamchatka|+12 +13 +11|-c0 -d0 -b0|0101010101010101010102010101010101010101010101010101010101020|rn00 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|18e4","Asia/Karachi|+05 PKT PKST|-50 -50 -60|01212121|2Xv0 1fy00 1cL0 dK10 11b0 1610 1jX0|24e6","Asia/Kathmandu|+0530 +0545|-5u -5J|01|CVuu|12e5","Asia/Khandyga|+09 +10 +08 +11|-90 -a0 -80 -b0|01010101010101010101020101010101010101010101010131313131313131310|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 qK0 yN0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|66e2","Asia/Krasnoyarsk|+07 +08 +06|-70 -80 -60|010101010101010101010201010101010101010101010101010101010101010|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|10e5","Asia/Kuala_Lumpur|+0730 +08|-7u -80|01|td4u|71e5","Asia/Macau|CST CDT|-80 -90|01010101010101010|H7u 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|57e4","Asia/Magadan|+11 +12 +10|-b0 -c0 -a0|0101010101010101010102010101010101010101010101010101010101010120|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Cq0|95e3","Asia/Makassar|WITA|-80|0||15e5","Asia/Manila|PST PDT|-80 -90|010|k0E0 1db0|24e6","Asia/Nicosia|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|cPa0 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|32e4","Asia/Novokuznetsk|+07 +08 +06|-70 -80 -60|0101010101010101010102010101010101010101010101010101010101020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|55e4","Asia/Novosibirsk|+07 +08 +06|-70 -80 -60|01010101010101010101020101020202020202020202020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 ml0 Os0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 4eN0|15e5","Asia/Omsk|+06 +07 +05|-60 -70 -50|010101010101010101010201010101010101010101010101010101010101010|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|12e5","Asia/Oral|+05 +06 +04|-50 -60 -40|010101010101010202020202020202020202020202020|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 1cM0 IM0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|27e4","Asia/Pontianak|WITA WIB|-80 -70|01|HNs0|23e4","Asia/Pyongyang|KST KST|-90 -8u|010|1P4D0 6BA0|29e5","Asia/Qostanay|+05 +06 +04|-50 -60 -40|0101010101010101010201010101010101010101010101|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0","Asia/Qyzylorda|+05 +06|-50 -60|010101010101010101010101010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 3ao0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 zQl0|73e4","Asia/Rangoon|+0630|-6u|0||48e5","Asia/Sakhalin|+11 +12 +10|-b0 -c0 -a0|010101010101010101010201010101010202020202020202020202020202020|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 2pB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|58e4","Asia/Samarkand|+05 +06|-50 -60|010101010101010101010|rn70 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|36e4","Asia/Seoul|KST KDT|-90 -a0|01010|Gf50 11A0 1o00 11A0|23e6","Asia/Srednekolymsk|+11 +12 +10|-b0 -c0 -a0|010101010101010101010201010101010101010101010101010101010101010|rn10 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|35e2","Asia/Taipei|CST CDT|-80 -90|0101010|akg0 1db0 1cN0 1db0 97B0 AL0|74e5","Asia/Tashkent|+06 +07 +05|-60 -70 -50|0101010101010101010102|rn60 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0|23e5","Asia/Tbilisi|+04 +05 +03|-40 -50 -30|01010101010101010101020202010101010101010101020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cK0 1cL0 1cN0 1cL0 1cN0 2pz0 1cL0 1fB0 3Nz0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 An0 Os0 WM0|11e5","Asia/Tehran|+0330 +04 +05 +0430|-3u -40 -50 -4u|0121030303030303030303030303030303030303030303030303030303030303030303030303030303030|j4ku TXu 1pz0 sN0 vAu 1cL0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0|14e6","Asia/Thimphu|+0530 +06|-5u -60|01|HcGu|79e3","Asia/Tokyo|JST|-90|0||38e6","Asia/Tomsk|+07 +08 +06|-70 -80 -60|01010101010101010101020101010101010101010101020202020202020202020|rn50 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 co0 1bB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Qp0|10e5","Asia/Ulaanbaatar|+07 +08 +09|-70 -80 -90|01212121212121212121212121212121212121212121212121|jsF0 cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|12e5","Asia/Ust-Nera|+09 +12 +11 +10|-90 -c0 -b0 -a0|0121212121212121212123212121212121212121212121212121212121212123|rn30 1d90 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|65e2","Asia/Vladivostok|+10 +11 +09|-a0 -b0 -90|010101010101010101010201010101010101010101010101010101010101010|rn20 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4","Asia/Yakutsk|+09 +10 +08|-90 -a0 -80|010101010101010101010201010101010101010101010101010101010101010|rn30 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|28e4","Asia/Yekaterinburg|+05 +06 +04|-50 -60 -40|010101010101010101010201010101010101010101010101010101010101010|rn70 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|14e5","Asia/Yerevan|+04 +05 +03|-40 -50 -30|01010101010101010101020202020101010101010101010101010101010|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 4RX0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|13e5","Atlantic/Azores|-01 +00 WET|10 0 0|0101010101010101010101010101010121010101010101010101010101010101010101010101010101010101010101010101010101010|hAN0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|25e4","Atlantic/Bermuda|AST ADT|40 30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|avi0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e3","Atlantic/Canary|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXc0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|54e4","Atlantic/Cape_Verde|-02 -01|20 10|01|elE0|50e4","Atlantic/Faroe|WET WEST|0 -10|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|49e3","Atlantic/Madeira|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hAM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|27e4","Atlantic/South_Georgia|-02|20|0||30","Atlantic/Stanley|-04 -03 -02|40 30 20|01212101010101010101010101010101010101010101010101010101|wrg0 WL0 1qL0 U10 1tz0 2mN0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 U10 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qN0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 U10 1tz0 U10 1tz0 U10|21e2","Australia/Sydney|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r40 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|40e5","Australia/Adelaide|ACST ACDT|-9u -au|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r4u LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 WM0 1qM0 Rc0 1zc0 U00 1tA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|11e5","Australia/Brisbane|AEST AEDT|-a0 -b0|010101010|4r40 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0|20e5","Australia/Broken_Hill|ACST ACDT|-9u -au|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r4u LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|18e3","Australia/Currie|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r40 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|746","Australia/Darwin|ACST|-9u|0||12e4","Australia/Eucla|+0845 +0945|-8J -9J|0101010101010|bHRf Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|368","Australia/Hobart|AEDT AEST|-b0 -a0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|qg0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|21e4","Australia/Lord_Howe|AEST +1030 +1130 +11|-a0 -au -bu -b0|01212121213131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313|raC0 1zdu Rb0 1zd0 On0 1zd0 On0 1zd0 On0 1zd0 TXu 1qMu WLu 1tAu WLu 1tAu TXu 1tAu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 11Au 1nXu 1qMu 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu 11zu 1o0u WLu 1qMu 14nu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu|347","Australia/Lindeman|AEST AEDT|-a0 -b0|0101010101010|4r40 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0|10","Australia/Melbourne|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4r40 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1qM0 11A0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|39e5","Australia/Perth|AWST AWDT|-80 -90|0101010101010|bHS0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|18e5","Europe/Brussels|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|21e5","Pacific/Easter|-06 -07 -05|60 70 50|010101010101010101010101020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202|yP0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 2pA0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0|30e2","EET|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00","Europe/Dublin|IST GMT|-10 0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4re0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5","Etc/GMT-1|+01|-10|0|","Pacific/Guadalcanal|+11|-b0|0||11e4","Pacific/Tarawa|+12|-c0|0||29e3","Etc/GMT-13|+13|-d0|0|","Etc/GMT-14|+14|-e0|0|","Etc/GMT-2|+02|-20|0|","Indian/Maldives|+05|-50|0||35e4","Pacific/Palau|+09|-90|0||21e3","Etc/GMT+1|-01|10|0|","Pacific/Tahiti|-10|a0|0||18e4","Etc/GMT+11|-11|b0|0|","Etc/GMT+12|-12|c0|0|","Etc/GMT+5|-05|50|0|","Etc/GMT+6|-06|60|0|","Etc/GMT+7|-07|70|0|","Etc/GMT+8|-08|80|0|","Pacific/Gambier|-09|90|0||125","Etc/UTC|UTC|0|0|","Europe/Andorra|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|B7d0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|79e3","Europe/Astrakhan|+04 +05 +03|-40 -50 -30|0101010101010101020202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|10e5","Europe/Athens|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|cOK0 1vc0 SO0 1cM0 1a00 1ao0 1fc0 1a10 1fG0 1cg0 1dX0 1bX0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|35e5","Europe/London|BST GMT|-10 0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|4re0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|10e6","Europe/Belgrade|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|wdd0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5","Europe/Prague|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|muN0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|13e5","Europe/Bucharest|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|mRa0 On0 1fA0 1a10 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|19e5","Europe/Budapest|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXc0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e5","Europe/Zurich|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|38e4","Europe/Chisinau|MSK MSD EEST EET|-30 -40 -30 -20|010101010101010101012323232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 gL0 WO0 1cM0 1cM0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11D0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|67e4","Europe/Gibraltar|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|tLB0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|30e3","Europe/Helsinki|EET EEST|-20 -30|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|rm00 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5","Europe/Kaliningrad|MSK MSD EEST EET +03|-30 -40 -30 -20 -30|010101010101010102323232323232323232323232323232323232323232343|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|44e4","Europe/Kiev|MSK MSD EEST EET|-30 -40 -30 -20|0101010101010101010123232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 Db0 3220 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|34e5","Europe/Kirov|+04 +05 +03|-40 -50 -30|010101010101010102020202020202020202020202020202020202020202|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|48e4","Europe/Lisbon|CET WET WEST CEST|-10 0 -10 -20|01212121212121212121212121212121203030302121212121212121212121212121212121212121212121212121212121212121212121|go00 1cM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|27e5","Europe/Madrid|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|apy0 1a10 1fz0 1a10 19X0 1cN0 1fz0 1a10 1fC0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|62e5","Europe/Malta|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|XX0 LA0 1zc0 Oo0 1C00 Oo0 1co0 1cM0 1lA0 Xc0 1qq0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1iN0 19z0 1fB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|42e4","Europe/Minsk|MSK MSD EEST EET +03|-30 -40 -30 -20 -30|010101010101010101023232323232323232323232323232323232323234|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 3Fc0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0|19e5","Europe/Paris|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|fbc0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|11e6","Europe/Moscow|MSK MSD EEST EET MSK|-30 -40 -30 -20 -40|0101010101010101010102301010101010101010101010101010101010101040|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|16e6","Europe/Riga|MSK MSD EEST EET|-30 -40 -30 -20|010101010101010102323232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 1o00 11A0 1o00 11A0 1qM0 3oo0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|64e4","Europe/Rome|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|XX0 LA0 1zc0 Oo0 1C00 Oo0 1C00 LA0 1zc0 Oo0 1C00 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1zc0 Oo0 1fC0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|39e5","Europe/Samara|+04 +05 +03|-40 -50 -30|01010101010101010202010101010101010101010101010101010101020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2y10 14m0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|12e5","Europe/Saratov|+04 +05 +03|-40 -50 -30|0101010101010102020202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 5810","Europe/Simferopol|MSK MSD EET EEST MSK|-30 -40 -20 -30 -40|0101010101010101010232323101010323232323232323232323232323232323240|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 4eL0 1cL0 1cN0 1cL0 1cN0 dX0 WL0 1cN0 1cL0 1fB0 1o30 11B0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4","Europe/Sofia|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|muJ0 1dd0 1fb0 1ap0 1fb0 1a20 1fy0 1a30 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|12e5","Europe/Tallinn|MSK MSD EEST EET|-30 -40 -30 -20|0101010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o10 11A0 1qM0 5QM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|41e4","Europe/Tirane|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|axz0 10n0 1op0 11z0 1pd0 11z0 1qN0 WL0 1qp0 Xb0 1qp0 Xb0 1qp0 11z0 1lB0 11z0 1qN0 11z0 1iN0 16n0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|42e4","Europe/Ulyanovsk|+04 +05 +03 +02|-40 -50 -30 -20|010101010101010102023202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|13e5","Europe/Uzhgorod|MSK MSD CET EET EEST|-30 -40 -10 -20 -30|010101010101010101023434343434343434343434343434343434343434343434343434343434343434343434343434343|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 1Nf0 2pw0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|11e4","Europe/Vienna|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|oXb0 19X0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|18e5","Europe/Vilnius|MSK MSD EEST EET CEST CET|-30 -40 -30 -20 -20 -10|01010101010101010232323232323232323454323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11B0 1o00 11A0 1qM0 8io0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|54e4","Europe/Volgograd|+04 +05 +03|-40 -50 -30|0101010101010102020202020202020202020202020202020202020202020|rn80 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 9Jd0|10e5","Europe/Warsaw|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|17e5","Europe/Zaporozhye|MSK MSD EEST EET|-30 -40 -30 -20|01010101010101010101023232323232323232323232323232323232323232323232323232323232323232323232323232323|rn90 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cK0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00|77e4","Pacific/Honolulu|HST|a0|0||37e4","Indian/Chagos|+05 +06|-50 -60|01|13ij0|30e2","Indian/Mauritius|+04 +05|-40 -50|01010|v5U0 14L0 12kr0 11z0|15e4","Pacific/Kwajalein|-12 +12|c0 -c0|01|Vxo0|14e3","MET|MET MEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00","Pacific/Chatham|+1245 +1345|-cJ -dJ|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|bKC0 IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00|600","Pacific/Apia|-11 -10 +14 +13|b0 a0 -e0 -d0|0101232323232323232323232323232323232323232|1Dbn0 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00|37e3","Pacific/Bougainville|+10 +11|-a0 -b0|01|1NwE0|18e4","Pacific/Efate|+11 +12|-b0 -c0|010101010101010101010|xpN0 1cL0 1oN0 10L0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 Lz0 1Nd0 An0|66e3","Pacific/Enderbury|-12 -11 +13|c0 b0 -d0|012|nIc0 B7X0|1","Pacific/Fakaofo|-11 +13|b0 -d0|01|1Gfn0|483","Pacific/Fiji|+12 +13|-c0 -d0|010101010101010101010101010101010101010101010101|1ace0 LA0 1EM0 IM0 nJc0 LA0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0|88e4","Pacific/Galapagos|-05 -06|50 60|0101|CVF0 gNd0 rz0|25e3","Pacific/Guam|GST GDT ChST|-a0 -b0 -a0|010101010102|JQ0 Rb0 1wp0 Rb0 5xd0 rX0 5sN0 zb1 1C0X On0 ULb0|17e4","Pacific/Kiritimati|-1040 -10 +14|aE a0 -e0|012|nIaE B7Xk|51e2","Pacific/Kosrae|+12 +11|-c0 -b0|01|1aAA0|66e2","Pacific/Marquesas|-0930|9u|0||86e2","Pacific/Pago_Pago|SST|b0|0||37e2","Pacific/Nauru|+1130 +12|-bu -c0|01|maCu|10e3","Pacific/Niue|-1130 -11|bu b0|01|libu|12e2","Pacific/Norfolk|+1130 +1230 +11|-bu -cu -b0|0102|bHOu On0 1COp0|25e4","Pacific/Noumea|+11 +12|-b0 -c0|0101010|jhp0 xX0 1PB0 yn0 HeP0 Ao0|98e3","Pacific/Pitcairn|-0830 -08|8u 80|01|18Vku|56","Pacific/Rarotonga|-1030 -0930 -10|au 9u a0|012121212121212121212121212|lyWu IL0 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu|13e3","Pacific/Tongatapu|+13 +14|-d0 -e0|010101010|1csd0 15A0 1wo0 xz0 1Q10 xz0 zWN0 s00|75e3","WET|WET WEST|0 -10|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00"],links:["Africa/Abidjan|Africa/Accra","Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|Atlantic/Reykjavik","Africa/Abidjan|Atlantic/St_Helena","Africa/Abidjan|Etc/GMT","Africa/Abidjan|Etc/GMT+0","Africa/Abidjan|Etc/GMT-0","Africa/Abidjan|Etc/GMT0","Africa/Abidjan|Etc/Greenwich","Africa/Abidjan|GMT","Africa/Abidjan|GMT+0","Africa/Abidjan|GMT-0","Africa/Abidjan|GMT0","Africa/Abidjan|Greenwich","Africa/Abidjan|Iceland","Africa/Cairo|Egypt","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Lagos|Africa/Bangui","Africa/Lagos|Africa/Brazzaville","Africa/Lagos|Africa/Douala","Africa/Lagos|Africa/Kinshasa","Africa/Lagos|Africa/Libreville","Africa/Lagos|Africa/Luanda","Africa/Lagos|Africa/Malabo","Africa/Lagos|Africa/Niamey","Africa/Lagos|Africa/Porto-Novo","Africa/Maputo|Africa/Blantyre","Africa/Maputo|Africa/Bujumbura","Africa/Maputo|Africa/Gaborone","Africa/Maputo|Africa/Harare","Africa/Maputo|Africa/Kigali","Africa/Maputo|Africa/Lubumbashi","Africa/Maputo|Africa/Lusaka","Africa/Nairobi|Africa/Addis_Ababa","Africa/Nairobi|Africa/Asmara","Africa/Nairobi|Africa/Asmera","Africa/Nairobi|Africa/Dar_es_Salaam","Africa/Nairobi|Africa/Djibouti","Africa/Nairobi|Africa/Kampala","Africa/Nairobi|Africa/Mogadishu","Africa/Nairobi|Indian/Antananarivo","Africa/Nairobi|Indian/Comoro","Africa/Nairobi|Indian/Mayotte","Africa/Tripoli|Libya","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|US/Alaska","America/Argentina/Buenos_Aires|America/Buenos_Aires","America/Argentina/Catamarca|America/Argentina/ComodRivadavia","America/Argentina/Catamarca|America/Catamarca","America/Argentina/Cordoba|America/Cordoba","America/Argentina/Cordoba|America/Rosario","America/Argentina/Jujuy|America/Jujuy","America/Argentina/Mendoza|America/Mendoza","America/Cayenne|Etc/GMT+3","America/Chicago|CST6CDT","America/Chicago|US/Central","America/Denver|America/Shiprock","America/Denver|MST7MDT","America/Denver|Navajo","America/Denver|US/Mountain","America/Detroit|US/Michigan","America/Edmonton|Canada/Mountain","America/Fort_Wayne|America/Indiana/Indianapolis","America/Fort_Wayne|America/Indianapolis","America/Fort_Wayne|US/East-Indiana","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/Indiana/Knox|America/Knox_IN","America/Indiana/Knox|US/Indiana-Starke","America/Jamaica|Jamaica","America/Kentucky/Louisville|America/Louisville","America/La_Paz|Etc/GMT+4","America/Los_Angeles|PST8PDT","America/Los_Angeles|US/Pacific","America/Los_Angeles|US/Pacific-New","America/Manaus|Brazil/West","America/Mazatlan|Mexico/BajaSur","America/Mexico_City|Mexico/General","America/New_York|EST5EDT","America/New_York|US/Eastern","America/Noronha|Brazil/DeNoronha","America/Panama|America/Atikokan","America/Panama|America/Cayman","America/Panama|America/Coral_Harbour","America/Panama|EST","America/Phoenix|America/Creston","America/Phoenix|MST","America/Phoenix|US/Arizona","America/Puerto_Rico|America/Anguilla","America/Puerto_Rico|America/Antigua","America/Puerto_Rico|America/Aruba","America/Puerto_Rico|America/Blanc-Sablon","America/Puerto_Rico|America/Curacao","America/Puerto_Rico|America/Dominica","America/Puerto_Rico|America/Grenada","America/Puerto_Rico|America/Guadeloupe","America/Puerto_Rico|America/Kralendijk","America/Puerto_Rico|America/Lower_Princes","America/Puerto_Rico|America/Marigot","America/Puerto_Rico|America/Montserrat","America/Puerto_Rico|America/Port_of_Spain","America/Puerto_Rico|America/St_Barthelemy","America/Puerto_Rico|America/St_Kitts","America/Puerto_Rico|America/St_Lucia","America/Puerto_Rico|America/St_Thomas","America/Puerto_Rico|America/St_Vincent","America/Puerto_Rico|America/Tortola","America/Puerto_Rico|America/Virgin","America/Regina|Canada/Saskatchewan","America/Rio_Branco|America/Porto_Acre","America/Rio_Branco|Brazil/Acre","America/Santiago|Chile/Continental","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","America/Tijuana|America/Ensenada","America/Tijuana|America/Santa_Isabel","America/Tijuana|Mexico/BajaNorte","America/Toronto|America/Montreal","America/Toronto|America/Nassau","America/Toronto|Canada/Eastern","America/Vancouver|Canada/Pacific","America/Whitehorse|Canada/Yukon","America/Winnipeg|Canada/Central","Asia/Ashgabat|Asia/Ashkhabad","Asia/Bangkok|Asia/Phnom_Penh","Asia/Bangkok|Asia/Vientiane","Asia/Bangkok|Etc/GMT-7","Asia/Bangkok|Indian/Christmas","Asia/Brunei|Asia/Kuching","Asia/Brunei|Etc/GMT-8","Asia/Dhaka|Asia/Dacca","Asia/Dubai|Asia/Muscat","Asia/Dubai|Etc/GMT-4","Asia/Dubai|Indian/Mahe","Asia/Dubai|Indian/Reunion","Asia/Ho_Chi_Minh|Asia/Saigon","Asia/Hong_Kong|Hongkong","Asia/Jerusalem|Asia/Tel_Aviv","Asia/Jerusalem|Israel","Asia/Kathmandu|Asia/Katmandu","Asia/Kolkata|Asia/Calcutta","Asia/Kuala_Lumpur|Asia/Singapore","Asia/Kuala_Lumpur|Singapore","Asia/Macau|Asia/Macao","Asia/Makassar|Asia/Ujung_Pandang","Asia/Nicosia|Europe/Nicosia","Asia/Qatar|Asia/Bahrain","Asia/Rangoon|Asia/Yangon","Asia/Rangoon|Indian/Cocos","Asia/Riyadh|Antarctica/Syowa","Asia/Riyadh|Asia/Aden","Asia/Riyadh|Asia/Kuwait","Asia/Riyadh|Etc/GMT-3","Asia/Seoul|ROK","Asia/Shanghai|Asia/Chongqing","Asia/Shanghai|Asia/Chungking","Asia/Shanghai|Asia/Harbin","Asia/Shanghai|PRC","Asia/Taipei|ROC","Asia/Tehran|Iran","Asia/Thimphu|Asia/Thimbu","Asia/Tokyo|Japan","Asia/Ulaanbaatar|Asia/Ulan_Bator","Asia/Urumqi|Antarctica/Vostok","Asia/Urumqi|Asia/Kashgar","Asia/Urumqi|Etc/GMT-6","Atlantic/Faroe|Atlantic/Faeroe","Atlantic/South_Georgia|Etc/GMT+2","Australia/Adelaide|Australia/South","Australia/Brisbane|Australia/Queensland","Australia/Broken_Hill|Australia/Yancowinna","Australia/Darwin|Australia/North","Australia/Hobart|Australia/Tasmania","Australia/Lord_Howe|Australia/LHI","Australia/Melbourne|Australia/Victoria","Australia/Perth|Australia/West","Australia/Sydney|Australia/ACT","Australia/Sydney|Australia/Canberra","Australia/Sydney|Australia/NSW","Etc/UTC|Etc/UCT","Etc/UTC|Etc/Universal","Etc/UTC|Etc/Zulu","Etc/UTC|UCT","Etc/UTC|UTC","Etc/UTC|Universal","Etc/UTC|Zulu","Europe/Belgrade|Europe/Ljubljana","Europe/Belgrade|Europe/Podgorica","Europe/Belgrade|Europe/Sarajevo","Europe/Belgrade|Europe/Skopje","Europe/Belgrade|Europe/Zagreb","Europe/Berlin|Arctic/Longyearbyen","Europe/Berlin|Atlantic/Jan_Mayen","Europe/Berlin|Europe/Copenhagen","Europe/Berlin|Europe/Oslo","Europe/Berlin|Europe/Stockholm","Europe/Brussels|CET","Europe/Brussels|Europe/Amsterdam","Europe/Brussels|Europe/Luxembourg","Europe/Chisinau|Europe/Tiraspol","Europe/Dublin|Eire","Europe/Helsinki|Europe/Mariehamn","Europe/Istanbul|Asia/Istanbul","Europe/Istanbul|Turkey","Europe/Lisbon|Portugal","Europe/London|Europe/Belfast","Europe/London|Europe/Guernsey","Europe/London|Europe/Isle_of_Man","Europe/London|Europe/Jersey","Europe/London|GB","Europe/London|GB-Eire","Europe/Moscow|W-SU","Europe/Paris|Europe/Monaco","Europe/Prague|Europe/Bratislava","Europe/Rome|Europe/San_Marino","Europe/Rome|Europe/Vatican","Europe/Warsaw|Poland","Europe/Zurich|Europe/Busingen","Europe/Zurich|Europe/Vaduz","Indian/Maldives|Etc/GMT-5","Indian/Maldives|Indian/Kerguelen","Pacific/Auckland|Antarctica/McMurdo","Pacific/Auckland|Antarctica/South_Pole","Pacific/Auckland|NZ","Pacific/Chatham|NZ-CHAT","Pacific/Easter|Chile/EasterIsland","Pacific/Gambier|Etc/GMT+9","Pacific/Guadalcanal|Etc/GMT-11","Pacific/Guadalcanal|Pacific/Pohnpei","Pacific/Guadalcanal|Pacific/Ponape","Pacific/Guam|Pacific/Saipan","Pacific/Honolulu|HST","Pacific/Honolulu|Pacific/Johnston","Pacific/Honolulu|US/Hawaii","Pacific/Kwajalein|Kwajalein","Pacific/Pago_Pago|Pacific/Midway","Pacific/Pago_Pago|Pacific/Samoa","Pacific/Pago_Pago|US/Samoa","Pacific/Palau|Etc/GMT-9","Pacific/Port_Moresby|Antarctica/DumontDUrville","Pacific/Port_Moresby|Etc/GMT-10","Pacific/Port_Moresby|Pacific/Chuuk","Pacific/Port_Moresby|Pacific/Truk","Pacific/Port_Moresby|Pacific/Yap","Pacific/Tahiti|Etc/GMT+10","Pacific/Tarawa|Etc/GMT-12","Pacific/Tarawa|Pacific/Funafuti","Pacific/Tarawa|Pacific/Majuro","Pacific/Tarawa|Pacific/Wake","Pacific/Tarawa|Pacific/Wallis"]}),z}); \ No newline at end of file diff --git a/node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.js b/node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.js new file mode 100644 index 00000000..b14a48c2 --- /dev/null +++ b/node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.js @@ -0,0 +1,1224 @@ +//! moment-timezone.js +//! version : 0.5.26 +//! Copyright (c) JS Foundation and other contributors +//! license : MIT +//! github.com/moment/moment-timezone + +(function (root, factory) { + "use strict"; + + /*global define*/ + if (typeof module === 'object' && module.exports) { + module.exports = factory(require('moment')); // Node + } else if (typeof define === 'function' && define.amd) { + define(['moment'], factory); // AMD + } else { + factory(root.moment); // Browser + } +}(this, function (moment) { + "use strict"; + + // Do not load moment-timezone a second time. + // if (moment.tz !== undefined) { + // logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion); + // return moment; + // } + + var VERSION = "0.5.26", + zones = {}, + links = {}, + names = {}, + guesses = {}, + cachedGuess; + + if (!moment || typeof moment.version !== 'string') { + logError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/'); + } + + var momentVersion = moment.version.split('.'), + major = +momentVersion[0], + minor = +momentVersion[1]; + + // Moment.js version check + if (major < 2 || (major === 2 && minor < 6)) { + logError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com'); + } + + /************************************ + Unpacking + ************************************/ + + function charCodeToInt(charCode) { + if (charCode > 96) { + return charCode - 87; + } else if (charCode > 64) { + return charCode - 29; + } + return charCode - 48; + } + + function unpackBase60(string) { + var i = 0, + parts = string.split('.'), + whole = parts[0], + fractional = parts[1] || '', + multiplier = 1, + num, + out = 0, + sign = 1; + + // handle negative numbers + if (string.charCodeAt(0) === 45) { + i = 1; + sign = -1; + } + + // handle digits before the decimal + for (i; i < whole.length; i++) { + num = charCodeToInt(whole.charCodeAt(i)); + out = 60 * out + num; + } + + // handle digits after the decimal + for (i = 0; i < fractional.length; i++) { + multiplier = multiplier / 60; + num = charCodeToInt(fractional.charCodeAt(i)); + out += num * multiplier; + } + + return out * sign; + } + + function arrayToInt (array) { + for (var i = 0; i < array.length; i++) { + array[i] = unpackBase60(array[i]); + } + } + + function intToUntil (array, length) { + for (var i = 0; i < length; i++) { + array[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds + } + + array[length - 1] = Infinity; + } + + function mapIndices (source, indices) { + var out = [], i; + + for (i = 0; i < indices.length; i++) { + out[i] = source[indices[i]]; + } + + return out; + } + + function unpack (string) { + var data = string.split('|'), + offsets = data[2].split(' '), + indices = data[3].split(''), + untils = data[4].split(' '); + + arrayToInt(offsets); + arrayToInt(indices); + arrayToInt(untils); + + intToUntil(untils, indices.length); + + return { + name : data[0], + abbrs : mapIndices(data[1].split(' '), indices), + offsets : mapIndices(offsets, indices), + untils : untils, + population : data[5] | 0 + }; + } + + /************************************ + Zone object + ************************************/ + + function Zone (packedString) { + if (packedString) { + this._set(unpack(packedString)); + } + } + + Zone.prototype = { + _set : function (unpacked) { + this.name = unpacked.name; + this.abbrs = unpacked.abbrs; + this.untils = unpacked.untils; + this.offsets = unpacked.offsets; + this.population = unpacked.population; + }, + + _index : function (timestamp) { + var target = +timestamp, + untils = this.untils, + i; + + for (i = 0; i < untils.length; i++) { + if (target < untils[i]) { + return i; + } + } + }, + + parse : function (timestamp) { + var target = +timestamp, + offsets = this.offsets, + untils = this.untils, + max = untils.length - 1, + offset, offsetNext, offsetPrev, i; + + for (i = 0; i < max; i++) { + offset = offsets[i]; + offsetNext = offsets[i + 1]; + offsetPrev = offsets[i ? i - 1 : i]; + + if (offset < offsetNext && tz.moveAmbiguousForward) { + offset = offsetNext; + } else if (offset > offsetPrev && tz.moveInvalidForward) { + offset = offsetPrev; + } + + if (target < untils[i] - (offset * 60000)) { + return offsets[i]; + } + } + + return offsets[max]; + }, + + abbr : function (mom) { + return this.abbrs[this._index(mom)]; + }, + + offset : function (mom) { + logError("zone.offset has been deprecated in favor of zone.utcOffset"); + return this.offsets[this._index(mom)]; + }, + + utcOffset : function (mom) { + return this.offsets[this._index(mom)]; + } + }; + + /************************************ + Current Timezone + ************************************/ + + function OffsetAt(at) { + var timeString = at.toTimeString(); + var abbr = timeString.match(/\([a-z ]+\)/i); + if (abbr && abbr[0]) { + // 17:56:31 GMT-0600 (CST) + // 17:56:31 GMT-0600 (Central Standard Time) + abbr = abbr[0].match(/[A-Z]/g); + abbr = abbr ? abbr.join('') : undefined; + } else { + // 17:56:31 CST + // 17:56:31 GMT+0800 (台北標準時間) + abbr = timeString.match(/[A-Z]{3,5}/g); + abbr = abbr ? abbr[0] : undefined; + } + + if (abbr === 'GMT') { + abbr = undefined; + } + + this.at = +at; + this.abbr = abbr; + this.offset = at.getTimezoneOffset(); + } + + function ZoneScore(zone) { + this.zone = zone; + this.offsetScore = 0; + this.abbrScore = 0; + } + + ZoneScore.prototype.scoreOffsetAt = function (offsetAt) { + this.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset); + if (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) { + this.abbrScore++; + } + }; + + function findChange(low, high) { + var mid, diff; + + while ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) { + mid = new OffsetAt(new Date(low.at + diff)); + if (mid.offset === low.offset) { + low = mid; + } else { + high = mid; + } + } + + return low; + } + + function userOffsets() { + var startYear = new Date().getFullYear() - 2, + last = new OffsetAt(new Date(startYear, 0, 1)), + offsets = [last], + change, next, i; + + for (i = 1; i < 48; i++) { + next = new OffsetAt(new Date(startYear, i, 1)); + if (next.offset !== last.offset) { + change = findChange(last, next); + offsets.push(change); + offsets.push(new OffsetAt(new Date(change.at + 6e4))); + } + last = next; + } + + for (i = 0; i < 4; i++) { + offsets.push(new OffsetAt(new Date(startYear + i, 0, 1))); + offsets.push(new OffsetAt(new Date(startYear + i, 6, 1))); + } + + return offsets; + } + + function sortZoneScores (a, b) { + if (a.offsetScore !== b.offsetScore) { + return a.offsetScore - b.offsetScore; + } + if (a.abbrScore !== b.abbrScore) { + return a.abbrScore - b.abbrScore; + } + return b.zone.population - a.zone.population; + } + + function addToGuesses (name, offsets) { + var i, offset; + arrayToInt(offsets); + for (i = 0; i < offsets.length; i++) { + offset = offsets[i]; + guesses[offset] = guesses[offset] || {}; + guesses[offset][name] = true; + } + } + + function guessesForUserOffsets (offsets) { + var offsetsLength = offsets.length, + filteredGuesses = {}, + out = [], + i, j, guessesOffset; + + for (i = 0; i < offsetsLength; i++) { + guessesOffset = guesses[offsets[i].offset] || {}; + for (j in guessesOffset) { + if (guessesOffset.hasOwnProperty(j)) { + filteredGuesses[j] = true; + } + } + } + + for (i in filteredGuesses) { + if (filteredGuesses.hasOwnProperty(i)) { + out.push(names[i]); + } + } + + return out; + } + + function rebuildGuess () { + + // use Intl API when available and returning valid time zone + try { + var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone; + if (intlName && intlName.length > 3) { + var name = names[normalizeName(intlName)]; + if (name) { + return name; + } + logError("Moment Timezone found " + intlName + " from the Intl api, but did not have that data loaded."); + } + } catch (e) { + // Intl unavailable, fall back to manual guessing. + } + + var offsets = userOffsets(), + offsetsLength = offsets.length, + guesses = guessesForUserOffsets(offsets), + zoneScores = [], + zoneScore, i, j; + + for (i = 0; i < guesses.length; i++) { + zoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength); + for (j = 0; j < offsetsLength; j++) { + zoneScore.scoreOffsetAt(offsets[j]); + } + zoneScores.push(zoneScore); + } + + zoneScores.sort(sortZoneScores); + + return zoneScores.length > 0 ? zoneScores[0].zone.name : undefined; + } + + function guess (ignoreCache) { + if (!cachedGuess || ignoreCache) { + cachedGuess = rebuildGuess(); + } + return cachedGuess; + } + + /************************************ + Global Methods + ************************************/ + + function normalizeName (name) { + return (name || '').toLowerCase().replace(/\//g, '_'); + } + + function addZone (packed) { + var i, name, split, normalized; + + if (typeof packed === "string") { + packed = [packed]; + } + + for (i = 0; i < packed.length; i++) { + split = packed[i].split('|'); + name = split[0]; + normalized = normalizeName(name); + zones[normalized] = packed[i]; + names[normalized] = name; + addToGuesses(normalized, split[2].split(' ')); + } + } + + function getZone (name, caller) { + + name = normalizeName(name); + + var zone = zones[name]; + var link; + + if (zone instanceof Zone) { + return zone; + } + + if (typeof zone === 'string') { + zone = new Zone(zone); + zones[name] = zone; + return zone; + } + + // Pass getZone to prevent recursion more than 1 level deep + if (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) { + zone = zones[name] = new Zone(); + zone._set(link); + zone.name = names[name]; + return zone; + } + + return null; + } + + function getNames () { + var i, out = []; + + for (i in names) { + if (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) { + out.push(names[i]); + } + } + + return out.sort(); + } + + function addLink (aliases) { + var i, alias, normal0, normal1; + + if (typeof aliases === "string") { + aliases = [aliases]; + } + + for (i = 0; i < aliases.length; i++) { + alias = aliases[i].split('|'); + + normal0 = normalizeName(alias[0]); + normal1 = normalizeName(alias[1]); + + links[normal0] = normal1; + names[normal0] = alias[0]; + + links[normal1] = normal0; + names[normal1] = alias[1]; + } + } + + function loadData (data) { + addZone(data.zones); + addLink(data.links); + tz.dataVersion = data.version; + } + + function zoneExists (name) { + if (!zoneExists.didShowError) { + zoneExists.didShowError = true; + logError("moment.tz.zoneExists('" + name + "') has been deprecated in favor of !moment.tz.zone('" + name + "')"); + } + return !!getZone(name); + } + + function needsOffset (m) { + var isUnixTimestamp = (m._f === 'X' || m._f === 'x'); + return !!(m._a && (m._tzm === undefined) && !isUnixTimestamp); + } + + function logError (message) { + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + } + + /************************************ + moment.tz namespace + ************************************/ + + function tz (input) { + var args = Array.prototype.slice.call(arguments, 0, -1), + name = arguments[arguments.length - 1], + zone = getZone(name), + out = moment.utc.apply(null, args); + + if (zone && !moment.isMoment(input) && needsOffset(out)) { + out.add(zone.parse(out), 'minutes'); + } + + out.tz(name); + + return out; + } + + tz.version = VERSION; + tz.dataVersion = ''; + tz._zones = zones; + tz._links = links; + tz._names = names; + tz.add = addZone; + tz.link = addLink; + tz.load = loadData; + tz.zone = getZone; + tz.zoneExists = zoneExists; // deprecated in 0.1.0 + tz.guess = guess; + tz.names = getNames; + tz.Zone = Zone; + tz.unpack = unpack; + tz.unpackBase60 = unpackBase60; + tz.needsOffset = needsOffset; + tz.moveInvalidForward = true; + tz.moveAmbiguousForward = false; + + /************************************ + Interface with Moment.js + ************************************/ + + var fn = moment.fn; + + moment.tz = tz; + + moment.defaultZone = null; + + moment.updateOffset = function (mom, keepTime) { + var zone = moment.defaultZone, + offset; + + if (mom._z === undefined) { + if (zone && needsOffset(mom) && !mom._isUTC) { + mom._d = moment.utc(mom._a)._d; + mom.utc().add(zone.parse(mom), 'minutes'); + } + mom._z = zone; + } + if (mom._z) { + offset = mom._z.utcOffset(mom); + if (Math.abs(offset) < 16) { + offset = offset / 60; + } + if (mom.utcOffset !== undefined) { + var z = mom._z; + mom.utcOffset(-offset, keepTime); + mom._z = z; + } else { + mom.zone(offset, keepTime); + } + } + }; + + fn.tz = function (name, keepTime) { + if (name) { + if (typeof name !== 'string') { + throw new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']'); + } + this._z = getZone(name); + if (this._z) { + moment.updateOffset(this, keepTime); + } else { + logError("Moment Timezone has no data for " + name + ". See http://momentjs.com/timezone/docs/#/data-loading/."); + } + return this; + } + if (this._z) { return this._z.name; } + }; + + function abbrWrap (old) { + return function () { + if (this._z) { return this._z.abbr(this); } + return old.call(this); + }; + } + + function resetZoneWrap (old) { + return function () { + this._z = null; + return old.apply(this, arguments); + }; + } + + function resetZoneWrap2 (old) { + return function () { + if (arguments.length > 0) this._z = null; + return old.apply(this, arguments); + }; + } + + fn.zoneName = abbrWrap(fn.zoneName); + fn.zoneAbbr = abbrWrap(fn.zoneAbbr); + fn.utc = resetZoneWrap(fn.utc); + fn.local = resetZoneWrap(fn.local); + fn.utcOffset = resetZoneWrap2(fn.utcOffset); + + moment.tz.setDefault = function(name) { + if (major < 2 || (major === 2 && minor < 9)) { + logError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.'); + } + moment.defaultZone = name ? getZone(name) : null; + return moment; + }; + + // Cloning a moment should include the _z property. + var momentProperties = moment.momentProperties; + if (Object.prototype.toString.call(momentProperties) === '[object Array]') { + // moment 2.8.1+ + momentProperties.push('_z'); + momentProperties.push('_a'); + } else if (momentProperties) { + // moment 2.7.0 + momentProperties._z = null; + } + + loadData({ + "version": "2019b", + "zones": [ + "Africa/Abidjan|GMT|0|0||48e5", + "Africa/Nairobi|EAT|-30|0||47e5", + "Africa/Algiers|CET|-10|0||26e5", + "Africa/Lagos|WAT|-10|0||17e6", + "Africa/Maputo|CAT|-20|0||26e5", + "Africa/Cairo|EET EEST|-20 -30|01010|1M2m0 gL0 e10 mn0|15e6", + "Africa/Casablanca|+00 +01|0 -10|010101010101010101010101010101010101|1H3C0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0|32e5", + "Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|11e6", + "Africa/Johannesburg|SAST|-20|0||84e5", + "Africa/Khartoum|EAT CAT|-30 -20|01|1Usl0|51e5", + "Africa/Sao_Tome|GMT WAT|0 -10|010|1UQN0 2q00", + "Africa/Tripoli|EET CET CEST|-20 -10 -20|0120|1IlA0 TA0 1o00|11e5", + "Africa/Windhoek|CAT WAT|-20 -10|0101010101010|1GQo0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4", + "America/Adak|HST HDT|a0 90|01010101010101010101010|1GIc0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|326", + "America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1GIb0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|30e4", + "America/Santo_Domingo|AST|40|0||29e5", + "America/Araguaina|-03 -02|30 20|010|1IdD0 Lz0|14e4", + "America/Fortaleza|-03|30|0||34e5", + "America/Asuncion|-03 -04|30 40|01010101010101010101010|1GTf0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0|28e5", + "America/Panama|EST|50|0||15e5", + "America/Mexico_City|CST CDT|60 50|01010101010101010101010|1GQw0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|20e6", + "America/Bahia|-02 -03|20 30|01|1GCq0|27e5", + "America/Managua|CST|60|0||22e5", + "America/La_Paz|-04|40|0||19e5", + "America/Lima|-05|50|0||11e6", + "America/Denver|MST MDT|70 60|01010101010101010101010|1GI90 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|26e5", + "America/Campo_Grande|-03 -04|30 40|0101010101010101|1GCr0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4", + "America/Cancun|CST CDT EST|60 50 50|01010102|1GQw0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4", + "America/Caracas|-0430 -04|4u 40|01|1QMT0|29e5", + "America/Chicago|CST CDT|60 50|01010101010101010101010|1GI80 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|92e5", + "America/Chihuahua|MST MDT|70 60|01010101010101010101010|1GQx0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|81e4", + "America/Phoenix|MST|70|0||42e5", + "America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1GIa0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|15e6", + "America/New_York|EST EDT|50 40|01010101010101010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|21e6", + "America/Rio_Branco|-04 -05|40 50|01|1KLE0|31e4", + "America/Fort_Nelson|PST PDT MST|80 70 70|01010102|1GIa0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2", + "America/Halifax|AST ADT|40 30|01010101010101010101010|1GI60 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|39e4", + "America/Godthab|-03 -02|30 20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|17e3", + "America/Grand_Turk|EST EDT AST|50 40 40|0101010121010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 5Ip0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|37e2", + "America/Havana|CST CDT|50 40|01010101010101010101010|1GQt0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0|21e5", + "America/Metlakatla|PST AKST AKDT|80 90 80|01212120121212121|1PAa0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|14e2", + "America/Miquelon|-03 -02|30 20|01010101010101010101010|1GI50 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|61e2", + "America/Montevideo|-02 -03|20 30|01010101|1GI40 1o10 11z0 1o10 11z0 1o10 11z0|17e5", + "America/Noronha|-02|20|0||30e2", + "America/Port-au-Prince|EST EDT|50 40|010101010101010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|23e5", + "Antarctica/Palmer|-03 -04|30 40|010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40", + "America/Santiago|-03 -04|30 40|010101010101010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|62e5", + "America/Sao_Paulo|-02 -03|20 30|0101010101010101|1GCq0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6", + "Atlantic/Azores|-01 +00|10 0|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|25e4", + "America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1GI5u 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|11e4", + "Antarctica/Casey|+11 +08|-b0 -80|0101|1GAF0 blz0 3m10|10", + "Antarctica/Davis|+05 +07|-50 -70|01|1GAI0|70", + "Pacific/Port_Moresby|+10|-a0|0||25e4", + "Pacific/Guadalcanal|+11|-b0|0||11e4", + "Asia/Tashkent|+05|-50|0||23e5", + "Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|14e5", + "Asia/Baghdad|+03|-30|0||66e5", + "Antarctica/Troll|+00 +02|0 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|40", + "Asia/Dhaka|+06|-60|0||16e6", + "Asia/Amman|EET EEST|-20 -30|010101010101010101010|1GPy0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00|25e5", + "Asia/Kamchatka|+12|-c0|0||18e4", + "Asia/Baku|+04 +05|-40 -50|010101010|1GNA0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5", + "Asia/Bangkok|+07|-70|0||15e6", + "Asia/Barnaul|+07 +06|-70 -60|010|1N7v0 3rd0", + "Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1GNy0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0|22e5", + "Asia/Kuala_Lumpur|+08|-80|0||71e5", + "Asia/Kolkata|IST|-5u|0||15e6", + "Asia/Chita|+10 +08 +09|-a0 -80 -90|012|1N7s0 3re0|33e4", + "Asia/Ulaanbaatar|+08 +09|-80 -90|01010|1O8G0 1cJ0 1cP0 1cJ0|12e5", + "Asia/Shanghai|CST|-80|0||23e6", + "Asia/Colombo|+0530|-5u|0||22e5", + "Asia/Damascus|EET EEST|-20 -30|01010101010101010101010|1GPy0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0|26e5", + "Asia/Dili|+09|-90|0||19e4", + "Asia/Dubai|+04|-40|0||39e5", + "Asia/Famagusta|EET EEST +03|-20 -30 -30|0101010101201010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0", + "Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1GPy0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0|18e5", + "Asia/Hong_Kong|HKT|-80|0||73e5", + "Asia/Hovd|+07 +08|-70 -80|01010|1O8H0 1cJ0 1cP0 1cJ0|81e3", + "Asia/Irkutsk|+09 +08|-90 -80|01|1N7t0|60e4", + "Europe/Istanbul|EET EEST +03|-20 -30 -30|01010101012|1GNB0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6", + "Asia/Jakarta|WIB|-70|0||31e6", + "Asia/Jayapura|WIT|-90|0||26e4", + "Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1GPA0 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0|81e4", + "Asia/Kabul|+0430|-4u|0||46e5", + "Asia/Karachi|PKT|-50|0||24e6", + "Asia/Kathmandu|+0545|-5J|0||12e5", + "Asia/Yakutsk|+10 +09|-a0 -90|01|1N7s0|28e4", + "Asia/Krasnoyarsk|+08 +07|-80 -70|01|1N7u0|10e5", + "Asia/Magadan|+12 +10 +11|-c0 -a0 -b0|012|1N7q0 3Cq0|95e3", + "Asia/Makassar|WITA|-80|0||15e5", + "Asia/Manila|PST|-80|0||24e6", + "Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|35e5", + "Asia/Novosibirsk|+07 +06|-70 -60|010|1N7v0 4eN0|15e5", + "Asia/Omsk|+07 +06|-70 -60|01|1N7v0|12e5", + "Asia/Pyongyang|KST KST|-90 -8u|010|1P4D0 6BA0|29e5", + "Asia/Qyzylorda|+06 +05|-60 -50|01|1Xei0|73e4", + "Asia/Rangoon|+0630|-6u|0||48e5", + "Asia/Sakhalin|+11 +10|-b0 -a0|010|1N7r0 3rd0|58e4", + "Asia/Seoul|KST|-90|0||23e6", + "Asia/Srednekolymsk|+12 +11|-c0 -b0|01|1N7q0|35e2", + "Asia/Tehran|+0330 +0430|-3u -4u|01010101010101010101010|1GLUu 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0|14e6", + "Asia/Tokyo|JST|-90|0||38e6", + "Asia/Tomsk|+07 +06|-70 -60|010|1N7v0 3Qp0|10e5", + "Asia/Vladivostok|+11 +10|-b0 -a0|01|1N7r0|60e4", + "Asia/Yekaterinburg|+06 +05|-60 -50|01|1N7w0|14e5", + "Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|27e5", + "Atlantic/Cape_Verde|-01|10|0||50e4", + "Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1GQg0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|40e5", + "Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1GQgu 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|11e5", + "Australia/Brisbane|AEST|-a0|0||20e5", + "Australia/Darwin|ACST|-9u|0||12e4", + "Australia/Eucla|+0845|-8J|0||368", + "Australia/Lord_Howe|+11 +1030|-b0 -au|01010101010101010101010|1GQf0 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu|347", + "Australia/Perth|AWST|-80|0||18e5", + "Pacific/Easter|-05 -06|50 60|010101010101010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|30e2", + "Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|12e5", + "Etc/GMT-1|+01|-10|0|", + "Pacific/Fakaofo|+13|-d0|0||483", + "Pacific/Kiritimati|+14|-e0|0||51e2", + "Etc/GMT-2|+02|-20|0|", + "Pacific/Tahiti|-10|a0|0||18e4", + "Pacific/Niue|-11|b0|0||12e2", + "Etc/GMT+12|-12|c0|0|", + "Pacific/Galapagos|-06|60|0||25e3", + "Etc/GMT+7|-07|70|0|", + "Pacific/Pitcairn|-08|80|0||56", + "Pacific/Gambier|-09|90|0||125", + "Etc/UTC|UTC|0|0|", + "Europe/Ulyanovsk|+04 +03|-40 -30|010|1N7y0 3rd0|13e5", + "Europe/London|GMT BST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|10e6", + "Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1GNA0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|67e4", + "Europe/Kaliningrad|+03 EET|-30 -20|01|1N7z0|44e4", + "Europe/Kirov|+04 +03|-40 -30|01|1N7y0|48e4", + "Europe/Moscow|MSK MSK|-40 -30|01|1N7y0|16e6", + "Europe/Saratov|+04 +03|-40 -30|010|1N7y0 5810", + "Europe/Simferopol|EET EEST MSK MSK|-20 -30 -40 -30|0101023|1GNB0 1qM0 11A0 1o00 11z0 1nW0|33e4", + "Europe/Volgograd|+04 +03|-40 -30|010|1N7y0 9Jd0|10e5", + "Pacific/Honolulu|HST|a0|0||37e4", + "MET|MET MEST|-10 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0", + "Pacific/Chatham|+1345 +1245|-dJ -cJ|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|600", + "Pacific/Apia|+14 +13|-e0 -d0|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|37e3", + "Pacific/Bougainville|+10 +11|-a0 -b0|01|1NwE0|18e4", + "Pacific/Fiji|+13 +12|-d0 -c0|01010101010101010101010|1Goe0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1VA0 s00 1VA0|88e4", + "Pacific/Guam|ChST|-a0|0||17e4", + "Pacific/Marquesas|-0930|9u|0||86e2", + "Pacific/Pago_Pago|SST|b0|0||37e2", + "Pacific/Norfolk|+1130 +11|-bu -b0|01|1PoCu|25e4", + "Pacific/Tongatapu|+13 +14|-d0 -e0|010|1S4d0 s00|75e3" + ], + "links": [ + "Africa/Abidjan|Africa/Accra", + "Africa/Abidjan|Africa/Bamako", + "Africa/Abidjan|Africa/Banjul", + "Africa/Abidjan|Africa/Bissau", + "Africa/Abidjan|Africa/Conakry", + "Africa/Abidjan|Africa/Dakar", + "Africa/Abidjan|Africa/Freetown", + "Africa/Abidjan|Africa/Lome", + "Africa/Abidjan|Africa/Monrovia", + "Africa/Abidjan|Africa/Nouakchott", + "Africa/Abidjan|Africa/Ouagadougou", + "Africa/Abidjan|Africa/Timbuktu", + "Africa/Abidjan|America/Danmarkshavn", + "Africa/Abidjan|Atlantic/Reykjavik", + "Africa/Abidjan|Atlantic/St_Helena", + "Africa/Abidjan|Etc/GMT", + "Africa/Abidjan|Etc/GMT+0", + "Africa/Abidjan|Etc/GMT-0", + "Africa/Abidjan|Etc/GMT0", + "Africa/Abidjan|Etc/Greenwich", + "Africa/Abidjan|GMT", + "Africa/Abidjan|GMT+0", + "Africa/Abidjan|GMT-0", + "Africa/Abidjan|GMT0", + "Africa/Abidjan|Greenwich", + "Africa/Abidjan|Iceland", + "Africa/Algiers|Africa/Tunis", + "Africa/Cairo|Egypt", + "Africa/Casablanca|Africa/El_Aaiun", + "Africa/Johannesburg|Africa/Maseru", + "Africa/Johannesburg|Africa/Mbabane", + "Africa/Lagos|Africa/Bangui", + "Africa/Lagos|Africa/Brazzaville", + "Africa/Lagos|Africa/Douala", + "Africa/Lagos|Africa/Kinshasa", + "Africa/Lagos|Africa/Libreville", + "Africa/Lagos|Africa/Luanda", + "Africa/Lagos|Africa/Malabo", + "Africa/Lagos|Africa/Ndjamena", + "Africa/Lagos|Africa/Niamey", + "Africa/Lagos|Africa/Porto-Novo", + "Africa/Maputo|Africa/Blantyre", + "Africa/Maputo|Africa/Bujumbura", + "Africa/Maputo|Africa/Gaborone", + "Africa/Maputo|Africa/Harare", + "Africa/Maputo|Africa/Kigali", + "Africa/Maputo|Africa/Lubumbashi", + "Africa/Maputo|Africa/Lusaka", + "Africa/Nairobi|Africa/Addis_Ababa", + "Africa/Nairobi|Africa/Asmara", + "Africa/Nairobi|Africa/Asmera", + "Africa/Nairobi|Africa/Dar_es_Salaam", + "Africa/Nairobi|Africa/Djibouti", + "Africa/Nairobi|Africa/Juba", + "Africa/Nairobi|Africa/Kampala", + "Africa/Nairobi|Africa/Mogadishu", + "Africa/Nairobi|Indian/Antananarivo", + "Africa/Nairobi|Indian/Comoro", + "Africa/Nairobi|Indian/Mayotte", + "Africa/Tripoli|Libya", + "America/Adak|America/Atka", + "America/Adak|US/Aleutian", + "America/Anchorage|America/Juneau", + "America/Anchorage|America/Nome", + "America/Anchorage|America/Sitka", + "America/Anchorage|America/Yakutat", + "America/Anchorage|US/Alaska", + "America/Campo_Grande|America/Cuiaba", + "America/Chicago|America/Indiana/Knox", + "America/Chicago|America/Indiana/Tell_City", + "America/Chicago|America/Knox_IN", + "America/Chicago|America/Matamoros", + "America/Chicago|America/Menominee", + "America/Chicago|America/North_Dakota/Beulah", + "America/Chicago|America/North_Dakota/Center", + "America/Chicago|America/North_Dakota/New_Salem", + "America/Chicago|America/Rainy_River", + "America/Chicago|America/Rankin_Inlet", + "America/Chicago|America/Resolute", + "America/Chicago|America/Winnipeg", + "America/Chicago|CST6CDT", + "America/Chicago|Canada/Central", + "America/Chicago|US/Central", + "America/Chicago|US/Indiana-Starke", + "America/Chihuahua|America/Mazatlan", + "America/Chihuahua|Mexico/BajaSur", + "America/Denver|America/Boise", + "America/Denver|America/Cambridge_Bay", + "America/Denver|America/Edmonton", + "America/Denver|America/Inuvik", + "America/Denver|America/Ojinaga", + "America/Denver|America/Shiprock", + "America/Denver|America/Yellowknife", + "America/Denver|Canada/Mountain", + "America/Denver|MST7MDT", + "America/Denver|Navajo", + "America/Denver|US/Mountain", + "America/Fortaleza|America/Argentina/Buenos_Aires", + "America/Fortaleza|America/Argentina/Catamarca", + "America/Fortaleza|America/Argentina/ComodRivadavia", + "America/Fortaleza|America/Argentina/Cordoba", + "America/Fortaleza|America/Argentina/Jujuy", + "America/Fortaleza|America/Argentina/La_Rioja", + "America/Fortaleza|America/Argentina/Mendoza", + "America/Fortaleza|America/Argentina/Rio_Gallegos", + "America/Fortaleza|America/Argentina/Salta", + "America/Fortaleza|America/Argentina/San_Juan", + "America/Fortaleza|America/Argentina/San_Luis", + "America/Fortaleza|America/Argentina/Tucuman", + "America/Fortaleza|America/Argentina/Ushuaia", + "America/Fortaleza|America/Belem", + "America/Fortaleza|America/Buenos_Aires", + "America/Fortaleza|America/Catamarca", + "America/Fortaleza|America/Cayenne", + "America/Fortaleza|America/Cordoba", + "America/Fortaleza|America/Jujuy", + "America/Fortaleza|America/Maceio", + "America/Fortaleza|America/Mendoza", + "America/Fortaleza|America/Paramaribo", + "America/Fortaleza|America/Recife", + "America/Fortaleza|America/Rosario", + "America/Fortaleza|America/Santarem", + "America/Fortaleza|Antarctica/Rothera", + "America/Fortaleza|Atlantic/Stanley", + "America/Fortaleza|Etc/GMT+3", + "America/Halifax|America/Glace_Bay", + "America/Halifax|America/Goose_Bay", + "America/Halifax|America/Moncton", + "America/Halifax|America/Thule", + "America/Halifax|Atlantic/Bermuda", + "America/Halifax|Canada/Atlantic", + "America/Havana|Cuba", + "America/La_Paz|America/Boa_Vista", + "America/La_Paz|America/Guyana", + "America/La_Paz|America/Manaus", + "America/La_Paz|America/Porto_Velho", + "America/La_Paz|Brazil/West", + "America/La_Paz|Etc/GMT+4", + "America/Lima|America/Bogota", + "America/Lima|America/Guayaquil", + "America/Lima|Etc/GMT+5", + "America/Los_Angeles|America/Dawson", + "America/Los_Angeles|America/Ensenada", + "America/Los_Angeles|America/Santa_Isabel", + "America/Los_Angeles|America/Tijuana", + "America/Los_Angeles|America/Vancouver", + "America/Los_Angeles|America/Whitehorse", + "America/Los_Angeles|Canada/Pacific", + "America/Los_Angeles|Canada/Yukon", + "America/Los_Angeles|Mexico/BajaNorte", + "America/Los_Angeles|PST8PDT", + "America/Los_Angeles|US/Pacific", + "America/Los_Angeles|US/Pacific-New", + "America/Managua|America/Belize", + "America/Managua|America/Costa_Rica", + "America/Managua|America/El_Salvador", + "America/Managua|America/Guatemala", + "America/Managua|America/Regina", + "America/Managua|America/Swift_Current", + "America/Managua|America/Tegucigalpa", + "America/Managua|Canada/Saskatchewan", + "America/Mexico_City|America/Bahia_Banderas", + "America/Mexico_City|America/Merida", + "America/Mexico_City|America/Monterrey", + "America/Mexico_City|Mexico/General", + "America/New_York|America/Detroit", + "America/New_York|America/Fort_Wayne", + "America/New_York|America/Indiana/Indianapolis", + "America/New_York|America/Indiana/Marengo", + "America/New_York|America/Indiana/Petersburg", + "America/New_York|America/Indiana/Vevay", + "America/New_York|America/Indiana/Vincennes", + "America/New_York|America/Indiana/Winamac", + "America/New_York|America/Indianapolis", + "America/New_York|America/Iqaluit", + "America/New_York|America/Kentucky/Louisville", + "America/New_York|America/Kentucky/Monticello", + "America/New_York|America/Louisville", + "America/New_York|America/Montreal", + "America/New_York|America/Nassau", + "America/New_York|America/Nipigon", + "America/New_York|America/Pangnirtung", + "America/New_York|America/Thunder_Bay", + "America/New_York|America/Toronto", + "America/New_York|Canada/Eastern", + "America/New_York|EST5EDT", + "America/New_York|US/East-Indiana", + "America/New_York|US/Eastern", + "America/New_York|US/Michigan", + "America/Noronha|Atlantic/South_Georgia", + "America/Noronha|Brazil/DeNoronha", + "America/Noronha|Etc/GMT+2", + "America/Panama|America/Atikokan", + "America/Panama|America/Cayman", + "America/Panama|America/Coral_Harbour", + "America/Panama|America/Jamaica", + "America/Panama|EST", + "America/Panama|Jamaica", + "America/Phoenix|America/Creston", + "America/Phoenix|America/Dawson_Creek", + "America/Phoenix|America/Hermosillo", + "America/Phoenix|MST", + "America/Phoenix|US/Arizona", + "America/Rio_Branco|America/Eirunepe", + "America/Rio_Branco|America/Porto_Acre", + "America/Rio_Branco|Brazil/Acre", + "America/Santiago|Chile/Continental", + "America/Santo_Domingo|America/Anguilla", + "America/Santo_Domingo|America/Antigua", + "America/Santo_Domingo|America/Aruba", + "America/Santo_Domingo|America/Barbados", + "America/Santo_Domingo|America/Blanc-Sablon", + "America/Santo_Domingo|America/Curacao", + "America/Santo_Domingo|America/Dominica", + "America/Santo_Domingo|America/Grenada", + "America/Santo_Domingo|America/Guadeloupe", + "America/Santo_Domingo|America/Kralendijk", + "America/Santo_Domingo|America/Lower_Princes", + "America/Santo_Domingo|America/Marigot", + "America/Santo_Domingo|America/Martinique", + "America/Santo_Domingo|America/Montserrat", + "America/Santo_Domingo|America/Port_of_Spain", + "America/Santo_Domingo|America/Puerto_Rico", + "America/Santo_Domingo|America/St_Barthelemy", + "America/Santo_Domingo|America/St_Kitts", + "America/Santo_Domingo|America/St_Lucia", + "America/Santo_Domingo|America/St_Thomas", + "America/Santo_Domingo|America/St_Vincent", + "America/Santo_Domingo|America/Tortola", + "America/Santo_Domingo|America/Virgin", + "America/Sao_Paulo|Brazil/East", + "America/St_Johns|Canada/Newfoundland", + "Antarctica/Palmer|America/Punta_Arenas", + "Asia/Baghdad|Antarctica/Syowa", + "Asia/Baghdad|Asia/Aden", + "Asia/Baghdad|Asia/Bahrain", + "Asia/Baghdad|Asia/Kuwait", + "Asia/Baghdad|Asia/Qatar", + "Asia/Baghdad|Asia/Riyadh", + "Asia/Baghdad|Etc/GMT-3", + "Asia/Baghdad|Europe/Minsk", + "Asia/Bangkok|Asia/Ho_Chi_Minh", + "Asia/Bangkok|Asia/Novokuznetsk", + "Asia/Bangkok|Asia/Phnom_Penh", + "Asia/Bangkok|Asia/Saigon", + "Asia/Bangkok|Asia/Vientiane", + "Asia/Bangkok|Etc/GMT-7", + "Asia/Bangkok|Indian/Christmas", + "Asia/Dhaka|Antarctica/Vostok", + "Asia/Dhaka|Asia/Almaty", + "Asia/Dhaka|Asia/Bishkek", + "Asia/Dhaka|Asia/Dacca", + "Asia/Dhaka|Asia/Kashgar", + "Asia/Dhaka|Asia/Qostanay", + "Asia/Dhaka|Asia/Thimbu", + "Asia/Dhaka|Asia/Thimphu", + "Asia/Dhaka|Asia/Urumqi", + "Asia/Dhaka|Etc/GMT-6", + "Asia/Dhaka|Indian/Chagos", + "Asia/Dili|Etc/GMT-9", + "Asia/Dili|Pacific/Palau", + "Asia/Dubai|Asia/Muscat", + "Asia/Dubai|Asia/Tbilisi", + "Asia/Dubai|Asia/Yerevan", + "Asia/Dubai|Etc/GMT-4", + "Asia/Dubai|Europe/Samara", + "Asia/Dubai|Indian/Mahe", + "Asia/Dubai|Indian/Mauritius", + "Asia/Dubai|Indian/Reunion", + "Asia/Gaza|Asia/Hebron", + "Asia/Hong_Kong|Hongkong", + "Asia/Jakarta|Asia/Pontianak", + "Asia/Jerusalem|Asia/Tel_Aviv", + "Asia/Jerusalem|Israel", + "Asia/Kamchatka|Asia/Anadyr", + "Asia/Kamchatka|Etc/GMT-12", + "Asia/Kamchatka|Kwajalein", + "Asia/Kamchatka|Pacific/Funafuti", + "Asia/Kamchatka|Pacific/Kwajalein", + "Asia/Kamchatka|Pacific/Majuro", + "Asia/Kamchatka|Pacific/Nauru", + "Asia/Kamchatka|Pacific/Tarawa", + "Asia/Kamchatka|Pacific/Wake", + "Asia/Kamchatka|Pacific/Wallis", + "Asia/Kathmandu|Asia/Katmandu", + "Asia/Kolkata|Asia/Calcutta", + "Asia/Kuala_Lumpur|Asia/Brunei", + "Asia/Kuala_Lumpur|Asia/Kuching", + "Asia/Kuala_Lumpur|Asia/Singapore", + "Asia/Kuala_Lumpur|Etc/GMT-8", + "Asia/Kuala_Lumpur|Singapore", + "Asia/Makassar|Asia/Ujung_Pandang", + "Asia/Rangoon|Asia/Yangon", + "Asia/Rangoon|Indian/Cocos", + "Asia/Seoul|ROK", + "Asia/Shanghai|Asia/Chongqing", + "Asia/Shanghai|Asia/Chungking", + "Asia/Shanghai|Asia/Harbin", + "Asia/Shanghai|Asia/Macao", + "Asia/Shanghai|Asia/Macau", + "Asia/Shanghai|Asia/Taipei", + "Asia/Shanghai|PRC", + "Asia/Shanghai|ROC", + "Asia/Tashkent|Antarctica/Mawson", + "Asia/Tashkent|Asia/Aqtau", + "Asia/Tashkent|Asia/Aqtobe", + "Asia/Tashkent|Asia/Ashgabat", + "Asia/Tashkent|Asia/Ashkhabad", + "Asia/Tashkent|Asia/Atyrau", + "Asia/Tashkent|Asia/Dushanbe", + "Asia/Tashkent|Asia/Oral", + "Asia/Tashkent|Asia/Samarkand", + "Asia/Tashkent|Etc/GMT-5", + "Asia/Tashkent|Indian/Kerguelen", + "Asia/Tashkent|Indian/Maldives", + "Asia/Tehran|Iran", + "Asia/Tokyo|Japan", + "Asia/Ulaanbaatar|Asia/Choibalsan", + "Asia/Ulaanbaatar|Asia/Ulan_Bator", + "Asia/Vladivostok|Asia/Ust-Nera", + "Asia/Yakutsk|Asia/Khandyga", + "Atlantic/Azores|America/Scoresbysund", + "Atlantic/Cape_Verde|Etc/GMT+1", + "Australia/Adelaide|Australia/Broken_Hill", + "Australia/Adelaide|Australia/South", + "Australia/Adelaide|Australia/Yancowinna", + "Australia/Brisbane|Australia/Lindeman", + "Australia/Brisbane|Australia/Queensland", + "Australia/Darwin|Australia/North", + "Australia/Lord_Howe|Australia/LHI", + "Australia/Perth|Australia/West", + "Australia/Sydney|Australia/ACT", + "Australia/Sydney|Australia/Canberra", + "Australia/Sydney|Australia/Currie", + "Australia/Sydney|Australia/Hobart", + "Australia/Sydney|Australia/Melbourne", + "Australia/Sydney|Australia/NSW", + "Australia/Sydney|Australia/Tasmania", + "Australia/Sydney|Australia/Victoria", + "Etc/UTC|Etc/UCT", + "Etc/UTC|Etc/Universal", + "Etc/UTC|Etc/Zulu", + "Etc/UTC|UCT", + "Etc/UTC|UTC", + "Etc/UTC|Universal", + "Etc/UTC|Zulu", + "Europe/Athens|Asia/Nicosia", + "Europe/Athens|EET", + "Europe/Athens|Europe/Bucharest", + "Europe/Athens|Europe/Helsinki", + "Europe/Athens|Europe/Kiev", + "Europe/Athens|Europe/Mariehamn", + "Europe/Athens|Europe/Nicosia", + "Europe/Athens|Europe/Riga", + "Europe/Athens|Europe/Sofia", + "Europe/Athens|Europe/Tallinn", + "Europe/Athens|Europe/Uzhgorod", + "Europe/Athens|Europe/Vilnius", + "Europe/Athens|Europe/Zaporozhye", + "Europe/Chisinau|Europe/Tiraspol", + "Europe/Dublin|Eire", + "Europe/Istanbul|Asia/Istanbul", + "Europe/Istanbul|Turkey", + "Europe/Lisbon|Atlantic/Canary", + "Europe/Lisbon|Atlantic/Faeroe", + "Europe/Lisbon|Atlantic/Faroe", + "Europe/Lisbon|Atlantic/Madeira", + "Europe/Lisbon|Portugal", + "Europe/Lisbon|WET", + "Europe/London|Europe/Belfast", + "Europe/London|Europe/Guernsey", + "Europe/London|Europe/Isle_of_Man", + "Europe/London|Europe/Jersey", + "Europe/London|GB", + "Europe/London|GB-Eire", + "Europe/Moscow|W-SU", + "Europe/Paris|Africa/Ceuta", + "Europe/Paris|Arctic/Longyearbyen", + "Europe/Paris|Atlantic/Jan_Mayen", + "Europe/Paris|CET", + "Europe/Paris|Europe/Amsterdam", + "Europe/Paris|Europe/Andorra", + "Europe/Paris|Europe/Belgrade", + "Europe/Paris|Europe/Berlin", + "Europe/Paris|Europe/Bratislava", + "Europe/Paris|Europe/Brussels", + "Europe/Paris|Europe/Budapest", + "Europe/Paris|Europe/Busingen", + "Europe/Paris|Europe/Copenhagen", + "Europe/Paris|Europe/Gibraltar", + "Europe/Paris|Europe/Ljubljana", + "Europe/Paris|Europe/Luxembourg", + "Europe/Paris|Europe/Madrid", + "Europe/Paris|Europe/Malta", + "Europe/Paris|Europe/Monaco", + "Europe/Paris|Europe/Oslo", + "Europe/Paris|Europe/Podgorica", + "Europe/Paris|Europe/Prague", + "Europe/Paris|Europe/Rome", + "Europe/Paris|Europe/San_Marino", + "Europe/Paris|Europe/Sarajevo", + "Europe/Paris|Europe/Skopje", + "Europe/Paris|Europe/Stockholm", + "Europe/Paris|Europe/Tirane", + "Europe/Paris|Europe/Vaduz", + "Europe/Paris|Europe/Vatican", + "Europe/Paris|Europe/Vienna", + "Europe/Paris|Europe/Warsaw", + "Europe/Paris|Europe/Zagreb", + "Europe/Paris|Europe/Zurich", + "Europe/Paris|Poland", + "Europe/Ulyanovsk|Europe/Astrakhan", + "Pacific/Auckland|Antarctica/McMurdo", + "Pacific/Auckland|Antarctica/South_Pole", + "Pacific/Auckland|NZ", + "Pacific/Chatham|NZ-CHAT", + "Pacific/Easter|Chile/EasterIsland", + "Pacific/Fakaofo|Etc/GMT-13", + "Pacific/Fakaofo|Pacific/Enderbury", + "Pacific/Galapagos|Etc/GMT+6", + "Pacific/Gambier|Etc/GMT+9", + "Pacific/Guadalcanal|Antarctica/Macquarie", + "Pacific/Guadalcanal|Etc/GMT-11", + "Pacific/Guadalcanal|Pacific/Efate", + "Pacific/Guadalcanal|Pacific/Kosrae", + "Pacific/Guadalcanal|Pacific/Noumea", + "Pacific/Guadalcanal|Pacific/Pohnpei", + "Pacific/Guadalcanal|Pacific/Ponape", + "Pacific/Guam|Pacific/Saipan", + "Pacific/Honolulu|HST", + "Pacific/Honolulu|Pacific/Johnston", + "Pacific/Honolulu|US/Hawaii", + "Pacific/Kiritimati|Etc/GMT-14", + "Pacific/Niue|Etc/GMT+11", + "Pacific/Pago_Pago|Pacific/Midway", + "Pacific/Pago_Pago|Pacific/Samoa", + "Pacific/Pago_Pago|US/Samoa", + "Pacific/Pitcairn|Etc/GMT+8", + "Pacific/Port_Moresby|Antarctica/DumontDUrville", + "Pacific/Port_Moresby|Etc/GMT-10", + "Pacific/Port_Moresby|Pacific/Chuuk", + "Pacific/Port_Moresby|Pacific/Truk", + "Pacific/Port_Moresby|Pacific/Yap", + "Pacific/Tahiti|Etc/GMT+10", + "Pacific/Tahiti|Pacific/Rarotonga" + ] + }); + + + return moment; +})); diff --git a/node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.min.js b/node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.min.js new file mode 100644 index 00000000..5f725a60 --- /dev/null +++ b/node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.min.js @@ -0,0 +1 @@ +!function(a,i){"use strict";"object"==typeof module&&module.exports?module.exports=i(require("moment")):"function"==typeof define&&define.amd?define(["moment"],i):i(a.moment)}(this,function(c){"use strict";var i,A={},n={},s={},u={};c&&"string"==typeof c.version||C("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var a=c.version.split("."),e=+a[0],r=+a[1];function t(a){return 96= 2.6.0. You are using Moment.js "+c.version+". See momentjs.com"),p.prototype={_set:function(a){this.name=a.name,this.abbrs=a.abbrs,this.untils=a.untils,this.offsets=a.offsets,this.population=a.population},_index:function(a){var i,e=+a,r=this.untils;for(i=0;i= 2.9.0. You are using Moment.js "+c.version+"."),c.defaultZone=a?P(a):null,c};var y=c.momentProperties;return"[object Array]"===Object.prototype.toString.call(y)?(y.push("_z"),y.push("_a")):y&&(y._z=null),_({version:"2019b",zones:["Africa/Abidjan|GMT|0|0||48e5","Africa/Nairobi|EAT|-30|0||47e5","Africa/Algiers|CET|-10|0||26e5","Africa/Lagos|WAT|-10|0||17e6","Africa/Maputo|CAT|-20|0||26e5","Africa/Cairo|EET EEST|-20 -30|01010|1M2m0 gL0 e10 mn0|15e6","Africa/Casablanca|+00 +01|0 -10|010101010101010101010101010101010101|1H3C0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0|32e5","Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|11e6","Africa/Johannesburg|SAST|-20|0||84e5","Africa/Khartoum|EAT CAT|-30 -20|01|1Usl0|51e5","Africa/Sao_Tome|GMT WAT|0 -10|010|1UQN0 2q00","Africa/Tripoli|EET CET CEST|-20 -10 -20|0120|1IlA0 TA0 1o00|11e5","Africa/Windhoek|CAT WAT|-20 -10|0101010101010|1GQo0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4","America/Adak|HST HDT|a0 90|01010101010101010101010|1GIc0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|326","America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1GIb0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|30e4","America/Santo_Domingo|AST|40|0||29e5","America/Araguaina|-03 -02|30 20|010|1IdD0 Lz0|14e4","America/Fortaleza|-03|30|0||34e5","America/Asuncion|-03 -04|30 40|01010101010101010101010|1GTf0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0|28e5","America/Panama|EST|50|0||15e5","America/Mexico_City|CST CDT|60 50|01010101010101010101010|1GQw0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|20e6","America/Bahia|-02 -03|20 30|01|1GCq0|27e5","America/Managua|CST|60|0||22e5","America/La_Paz|-04|40|0||19e5","America/Lima|-05|50|0||11e6","America/Denver|MST MDT|70 60|01010101010101010101010|1GI90 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|26e5","America/Campo_Grande|-03 -04|30 40|0101010101010101|1GCr0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4","America/Cancun|CST CDT EST|60 50 50|01010102|1GQw0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4","America/Caracas|-0430 -04|4u 40|01|1QMT0|29e5","America/Chicago|CST CDT|60 50|01010101010101010101010|1GI80 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|92e5","America/Chihuahua|MST MDT|70 60|01010101010101010101010|1GQx0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|81e4","America/Phoenix|MST|70|0||42e5","America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1GIa0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|15e6","America/New_York|EST EDT|50 40|01010101010101010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|21e6","America/Rio_Branco|-04 -05|40 50|01|1KLE0|31e4","America/Fort_Nelson|PST PDT MST|80 70 70|01010102|1GIa0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2","America/Halifax|AST ADT|40 30|01010101010101010101010|1GI60 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|39e4","America/Godthab|-03 -02|30 20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|17e3","America/Grand_Turk|EST EDT AST|50 40 40|0101010121010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 5Ip0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|37e2","America/Havana|CST CDT|50 40|01010101010101010101010|1GQt0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0|21e5","America/Metlakatla|PST AKST AKDT|80 90 80|01212120121212121|1PAa0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|14e2","America/Miquelon|-03 -02|30 20|01010101010101010101010|1GI50 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|61e2","America/Montevideo|-02 -03|20 30|01010101|1GI40 1o10 11z0 1o10 11z0 1o10 11z0|17e5","America/Noronha|-02|20|0||30e2","America/Port-au-Prince|EST EDT|50 40|010101010101010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|23e5","Antarctica/Palmer|-03 -04|30 40|010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40","America/Santiago|-03 -04|30 40|010101010101010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|62e5","America/Sao_Paulo|-02 -03|20 30|0101010101010101|1GCq0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6","Atlantic/Azores|-01 +00|10 0|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|25e4","America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1GI5u 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|11e4","Antarctica/Casey|+11 +08|-b0 -80|0101|1GAF0 blz0 3m10|10","Antarctica/Davis|+05 +07|-50 -70|01|1GAI0|70","Pacific/Port_Moresby|+10|-a0|0||25e4","Pacific/Guadalcanal|+11|-b0|0||11e4","Asia/Tashkent|+05|-50|0||23e5","Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|14e5","Asia/Baghdad|+03|-30|0||66e5","Antarctica/Troll|+00 +02|0 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|40","Asia/Dhaka|+06|-60|0||16e6","Asia/Amman|EET EEST|-20 -30|010101010101010101010|1GPy0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00|25e5","Asia/Kamchatka|+12|-c0|0||18e4","Asia/Baku|+04 +05|-40 -50|010101010|1GNA0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5","Asia/Bangkok|+07|-70|0||15e6","Asia/Barnaul|+07 +06|-70 -60|010|1N7v0 3rd0","Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1GNy0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0|22e5","Asia/Kuala_Lumpur|+08|-80|0||71e5","Asia/Kolkata|IST|-5u|0||15e6","Asia/Chita|+10 +08 +09|-a0 -80 -90|012|1N7s0 3re0|33e4","Asia/Ulaanbaatar|+08 +09|-80 -90|01010|1O8G0 1cJ0 1cP0 1cJ0|12e5","Asia/Shanghai|CST|-80|0||23e6","Asia/Colombo|+0530|-5u|0||22e5","Asia/Damascus|EET EEST|-20 -30|01010101010101010101010|1GPy0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0|26e5","Asia/Dili|+09|-90|0||19e4","Asia/Dubai|+04|-40|0||39e5","Asia/Famagusta|EET EEST +03|-20 -30 -30|0101010101201010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0","Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1GPy0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0|18e5","Asia/Hong_Kong|HKT|-80|0||73e5","Asia/Hovd|+07 +08|-70 -80|01010|1O8H0 1cJ0 1cP0 1cJ0|81e3","Asia/Irkutsk|+09 +08|-90 -80|01|1N7t0|60e4","Europe/Istanbul|EET EEST +03|-20 -30 -30|01010101012|1GNB0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6","Asia/Jakarta|WIB|-70|0||31e6","Asia/Jayapura|WIT|-90|0||26e4","Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1GPA0 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0|81e4","Asia/Kabul|+0430|-4u|0||46e5","Asia/Karachi|PKT|-50|0||24e6","Asia/Kathmandu|+0545|-5J|0||12e5","Asia/Yakutsk|+10 +09|-a0 -90|01|1N7s0|28e4","Asia/Krasnoyarsk|+08 +07|-80 -70|01|1N7u0|10e5","Asia/Magadan|+12 +10 +11|-c0 -a0 -b0|012|1N7q0 3Cq0|95e3","Asia/Makassar|WITA|-80|0||15e5","Asia/Manila|PST|-80|0||24e6","Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|35e5","Asia/Novosibirsk|+07 +06|-70 -60|010|1N7v0 4eN0|15e5","Asia/Omsk|+07 +06|-70 -60|01|1N7v0|12e5","Asia/Pyongyang|KST KST|-90 -8u|010|1P4D0 6BA0|29e5","Asia/Qyzylorda|+06 +05|-60 -50|01|1Xei0|73e4","Asia/Rangoon|+0630|-6u|0||48e5","Asia/Sakhalin|+11 +10|-b0 -a0|010|1N7r0 3rd0|58e4","Asia/Seoul|KST|-90|0||23e6","Asia/Srednekolymsk|+12 +11|-c0 -b0|01|1N7q0|35e2","Asia/Tehran|+0330 +0430|-3u -4u|01010101010101010101010|1GLUu 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0|14e6","Asia/Tokyo|JST|-90|0||38e6","Asia/Tomsk|+07 +06|-70 -60|010|1N7v0 3Qp0|10e5","Asia/Vladivostok|+11 +10|-b0 -a0|01|1N7r0|60e4","Asia/Yekaterinburg|+06 +05|-60 -50|01|1N7w0|14e5","Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|27e5","Atlantic/Cape_Verde|-01|10|0||50e4","Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1GQg0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|40e5","Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1GQgu 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|11e5","Australia/Brisbane|AEST|-a0|0||20e5","Australia/Darwin|ACST|-9u|0||12e4","Australia/Eucla|+0845|-8J|0||368","Australia/Lord_Howe|+11 +1030|-b0 -au|01010101010101010101010|1GQf0 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu|347","Australia/Perth|AWST|-80|0||18e5","Pacific/Easter|-05 -06|50 60|010101010101010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|30e2","Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|12e5","Etc/GMT-1|+01|-10|0|","Pacific/Fakaofo|+13|-d0|0||483","Pacific/Kiritimati|+14|-e0|0||51e2","Etc/GMT-2|+02|-20|0|","Pacific/Tahiti|-10|a0|0||18e4","Pacific/Niue|-11|b0|0||12e2","Etc/GMT+12|-12|c0|0|","Pacific/Galapagos|-06|60|0||25e3","Etc/GMT+7|-07|70|0|","Pacific/Pitcairn|-08|80|0||56","Pacific/Gambier|-09|90|0||125","Etc/UTC|UTC|0|0|","Europe/Ulyanovsk|+04 +03|-40 -30|010|1N7y0 3rd0|13e5","Europe/London|GMT BST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|10e6","Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1GNA0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|67e4","Europe/Kaliningrad|+03 EET|-30 -20|01|1N7z0|44e4","Europe/Kirov|+04 +03|-40 -30|01|1N7y0|48e4","Europe/Moscow|MSK MSK|-40 -30|01|1N7y0|16e6","Europe/Saratov|+04 +03|-40 -30|010|1N7y0 5810","Europe/Simferopol|EET EEST MSK MSK|-20 -30 -40 -30|0101023|1GNB0 1qM0 11A0 1o00 11z0 1nW0|33e4","Europe/Volgograd|+04 +03|-40 -30|010|1N7y0 9Jd0|10e5","Pacific/Honolulu|HST|a0|0||37e4","MET|MET MEST|-10 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0","Pacific/Chatham|+1345 +1245|-dJ -cJ|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|600","Pacific/Apia|+14 +13|-e0 -d0|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|37e3","Pacific/Bougainville|+10 +11|-a0 -b0|01|1NwE0|18e4","Pacific/Fiji|+13 +12|-d0 -c0|01010101010101010101010|1Goe0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1VA0 s00 1VA0|88e4","Pacific/Guam|ChST|-a0|0||17e4","Pacific/Marquesas|-0930|9u|0||86e2","Pacific/Pago_Pago|SST|b0|0||37e2","Pacific/Norfolk|+1130 +11|-bu -b0|01|1PoCu|25e4","Pacific/Tongatapu|+13 +14|-d0 -e0|010|1S4d0 s00|75e3"],links:["Africa/Abidjan|Africa/Accra","Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Bissau","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Monrovia","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|America/Danmarkshavn","Africa/Abidjan|Atlantic/Reykjavik","Africa/Abidjan|Atlantic/St_Helena","Africa/Abidjan|Etc/GMT","Africa/Abidjan|Etc/GMT+0","Africa/Abidjan|Etc/GMT-0","Africa/Abidjan|Etc/GMT0","Africa/Abidjan|Etc/Greenwich","Africa/Abidjan|GMT","Africa/Abidjan|GMT+0","Africa/Abidjan|GMT-0","Africa/Abidjan|GMT0","Africa/Abidjan|Greenwich","Africa/Abidjan|Iceland","Africa/Algiers|Africa/Tunis","Africa/Cairo|Egypt","Africa/Casablanca|Africa/El_Aaiun","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Lagos|Africa/Bangui","Africa/Lagos|Africa/Brazzaville","Africa/Lagos|Africa/Douala","Africa/Lagos|Africa/Kinshasa","Africa/Lagos|Africa/Libreville","Africa/Lagos|Africa/Luanda","Africa/Lagos|Africa/Malabo","Africa/Lagos|Africa/Ndjamena","Africa/Lagos|Africa/Niamey","Africa/Lagos|Africa/Porto-Novo","Africa/Maputo|Africa/Blantyre","Africa/Maputo|Africa/Bujumbura","Africa/Maputo|Africa/Gaborone","Africa/Maputo|Africa/Harare","Africa/Maputo|Africa/Kigali","Africa/Maputo|Africa/Lubumbashi","Africa/Maputo|Africa/Lusaka","Africa/Nairobi|Africa/Addis_Ababa","Africa/Nairobi|Africa/Asmara","Africa/Nairobi|Africa/Asmera","Africa/Nairobi|Africa/Dar_es_Salaam","Africa/Nairobi|Africa/Djibouti","Africa/Nairobi|Africa/Juba","Africa/Nairobi|Africa/Kampala","Africa/Nairobi|Africa/Mogadishu","Africa/Nairobi|Indian/Antananarivo","Africa/Nairobi|Indian/Comoro","Africa/Nairobi|Indian/Mayotte","Africa/Tripoli|Libya","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|America/Juneau","America/Anchorage|America/Nome","America/Anchorage|America/Sitka","America/Anchorage|America/Yakutat","America/Anchorage|US/Alaska","America/Campo_Grande|America/Cuiaba","America/Chicago|America/Indiana/Knox","America/Chicago|America/Indiana/Tell_City","America/Chicago|America/Knox_IN","America/Chicago|America/Matamoros","America/Chicago|America/Menominee","America/Chicago|America/North_Dakota/Beulah","America/Chicago|America/North_Dakota/Center","America/Chicago|America/North_Dakota/New_Salem","America/Chicago|America/Rainy_River","America/Chicago|America/Rankin_Inlet","America/Chicago|America/Resolute","America/Chicago|America/Winnipeg","America/Chicago|CST6CDT","America/Chicago|Canada/Central","America/Chicago|US/Central","America/Chicago|US/Indiana-Starke","America/Chihuahua|America/Mazatlan","America/Chihuahua|Mexico/BajaSur","America/Denver|America/Boise","America/Denver|America/Cambridge_Bay","America/Denver|America/Edmonton","America/Denver|America/Inuvik","America/Denver|America/Ojinaga","America/Denver|America/Shiprock","America/Denver|America/Yellowknife","America/Denver|Canada/Mountain","America/Denver|MST7MDT","America/Denver|Navajo","America/Denver|US/Mountain","America/Fortaleza|America/Argentina/Buenos_Aires","America/Fortaleza|America/Argentina/Catamarca","America/Fortaleza|America/Argentina/ComodRivadavia","America/Fortaleza|America/Argentina/Cordoba","America/Fortaleza|America/Argentina/Jujuy","America/Fortaleza|America/Argentina/La_Rioja","America/Fortaleza|America/Argentina/Mendoza","America/Fortaleza|America/Argentina/Rio_Gallegos","America/Fortaleza|America/Argentina/Salta","America/Fortaleza|America/Argentina/San_Juan","America/Fortaleza|America/Argentina/San_Luis","America/Fortaleza|America/Argentina/Tucuman","America/Fortaleza|America/Argentina/Ushuaia","America/Fortaleza|America/Belem","America/Fortaleza|America/Buenos_Aires","America/Fortaleza|America/Catamarca","America/Fortaleza|America/Cayenne","America/Fortaleza|America/Cordoba","America/Fortaleza|America/Jujuy","America/Fortaleza|America/Maceio","America/Fortaleza|America/Mendoza","America/Fortaleza|America/Paramaribo","America/Fortaleza|America/Recife","America/Fortaleza|America/Rosario","America/Fortaleza|America/Santarem","America/Fortaleza|Antarctica/Rothera","America/Fortaleza|Atlantic/Stanley","America/Fortaleza|Etc/GMT+3","America/Halifax|America/Glace_Bay","America/Halifax|America/Goose_Bay","America/Halifax|America/Moncton","America/Halifax|America/Thule","America/Halifax|Atlantic/Bermuda","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/La_Paz|America/Boa_Vista","America/La_Paz|America/Guyana","America/La_Paz|America/Manaus","America/La_Paz|America/Porto_Velho","America/La_Paz|Brazil/West","America/La_Paz|Etc/GMT+4","America/Lima|America/Bogota","America/Lima|America/Guayaquil","America/Lima|Etc/GMT+5","America/Los_Angeles|America/Dawson","America/Los_Angeles|America/Ensenada","America/Los_Angeles|America/Santa_Isabel","America/Los_Angeles|America/Tijuana","America/Los_Angeles|America/Vancouver","America/Los_Angeles|America/Whitehorse","America/Los_Angeles|Canada/Pacific","America/Los_Angeles|Canada/Yukon","America/Los_Angeles|Mexico/BajaNorte","America/Los_Angeles|PST8PDT","America/Los_Angeles|US/Pacific","America/Los_Angeles|US/Pacific-New","America/Managua|America/Belize","America/Managua|America/Costa_Rica","America/Managua|America/El_Salvador","America/Managua|America/Guatemala","America/Managua|America/Regina","America/Managua|America/Swift_Current","America/Managua|America/Tegucigalpa","America/Managua|Canada/Saskatchewan","America/Mexico_City|America/Bahia_Banderas","America/Mexico_City|America/Merida","America/Mexico_City|America/Monterrey","America/Mexico_City|Mexico/General","America/New_York|America/Detroit","America/New_York|America/Fort_Wayne","America/New_York|America/Indiana/Indianapolis","America/New_York|America/Indiana/Marengo","America/New_York|America/Indiana/Petersburg","America/New_York|America/Indiana/Vevay","America/New_York|America/Indiana/Vincennes","America/New_York|America/Indiana/Winamac","America/New_York|America/Indianapolis","America/New_York|America/Iqaluit","America/New_York|America/Kentucky/Louisville","America/New_York|America/Kentucky/Monticello","America/New_York|America/Louisville","America/New_York|America/Montreal","America/New_York|America/Nassau","America/New_York|America/Nipigon","America/New_York|America/Pangnirtung","America/New_York|America/Thunder_Bay","America/New_York|America/Toronto","America/New_York|Canada/Eastern","America/New_York|EST5EDT","America/New_York|US/East-Indiana","America/New_York|US/Eastern","America/New_York|US/Michigan","America/Noronha|Atlantic/South_Georgia","America/Noronha|Brazil/DeNoronha","America/Noronha|Etc/GMT+2","America/Panama|America/Atikokan","America/Panama|America/Cayman","America/Panama|America/Coral_Harbour","America/Panama|America/Jamaica","America/Panama|EST","America/Panama|Jamaica","America/Phoenix|America/Creston","America/Phoenix|America/Dawson_Creek","America/Phoenix|America/Hermosillo","America/Phoenix|MST","America/Phoenix|US/Arizona","America/Rio_Branco|America/Eirunepe","America/Rio_Branco|America/Porto_Acre","America/Rio_Branco|Brazil/Acre","America/Santiago|Chile/Continental","America/Santo_Domingo|America/Anguilla","America/Santo_Domingo|America/Antigua","America/Santo_Domingo|America/Aruba","America/Santo_Domingo|America/Barbados","America/Santo_Domingo|America/Blanc-Sablon","America/Santo_Domingo|America/Curacao","America/Santo_Domingo|America/Dominica","America/Santo_Domingo|America/Grenada","America/Santo_Domingo|America/Guadeloupe","America/Santo_Domingo|America/Kralendijk","America/Santo_Domingo|America/Lower_Princes","America/Santo_Domingo|America/Marigot","America/Santo_Domingo|America/Martinique","America/Santo_Domingo|America/Montserrat","America/Santo_Domingo|America/Port_of_Spain","America/Santo_Domingo|America/Puerto_Rico","America/Santo_Domingo|America/St_Barthelemy","America/Santo_Domingo|America/St_Kitts","America/Santo_Domingo|America/St_Lucia","America/Santo_Domingo|America/St_Thomas","America/Santo_Domingo|America/St_Vincent","America/Santo_Domingo|America/Tortola","America/Santo_Domingo|America/Virgin","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","Antarctica/Palmer|America/Punta_Arenas","Asia/Baghdad|Antarctica/Syowa","Asia/Baghdad|Asia/Aden","Asia/Baghdad|Asia/Bahrain","Asia/Baghdad|Asia/Kuwait","Asia/Baghdad|Asia/Qatar","Asia/Baghdad|Asia/Riyadh","Asia/Baghdad|Etc/GMT-3","Asia/Baghdad|Europe/Minsk","Asia/Bangkok|Asia/Ho_Chi_Minh","Asia/Bangkok|Asia/Novokuznetsk","Asia/Bangkok|Asia/Phnom_Penh","Asia/Bangkok|Asia/Saigon","Asia/Bangkok|Asia/Vientiane","Asia/Bangkok|Etc/GMT-7","Asia/Bangkok|Indian/Christmas","Asia/Dhaka|Antarctica/Vostok","Asia/Dhaka|Asia/Almaty","Asia/Dhaka|Asia/Bishkek","Asia/Dhaka|Asia/Dacca","Asia/Dhaka|Asia/Kashgar","Asia/Dhaka|Asia/Qostanay","Asia/Dhaka|Asia/Thimbu","Asia/Dhaka|Asia/Thimphu","Asia/Dhaka|Asia/Urumqi","Asia/Dhaka|Etc/GMT-6","Asia/Dhaka|Indian/Chagos","Asia/Dili|Etc/GMT-9","Asia/Dili|Pacific/Palau","Asia/Dubai|Asia/Muscat","Asia/Dubai|Asia/Tbilisi","Asia/Dubai|Asia/Yerevan","Asia/Dubai|Etc/GMT-4","Asia/Dubai|Europe/Samara","Asia/Dubai|Indian/Mahe","Asia/Dubai|Indian/Mauritius","Asia/Dubai|Indian/Reunion","Asia/Gaza|Asia/Hebron","Asia/Hong_Kong|Hongkong","Asia/Jakarta|Asia/Pontianak","Asia/Jerusalem|Asia/Tel_Aviv","Asia/Jerusalem|Israel","Asia/Kamchatka|Asia/Anadyr","Asia/Kamchatka|Etc/GMT-12","Asia/Kamchatka|Kwajalein","Asia/Kamchatka|Pacific/Funafuti","Asia/Kamchatka|Pacific/Kwajalein","Asia/Kamchatka|Pacific/Majuro","Asia/Kamchatka|Pacific/Nauru","Asia/Kamchatka|Pacific/Tarawa","Asia/Kamchatka|Pacific/Wake","Asia/Kamchatka|Pacific/Wallis","Asia/Kathmandu|Asia/Katmandu","Asia/Kolkata|Asia/Calcutta","Asia/Kuala_Lumpur|Asia/Brunei","Asia/Kuala_Lumpur|Asia/Kuching","Asia/Kuala_Lumpur|Asia/Singapore","Asia/Kuala_Lumpur|Etc/GMT-8","Asia/Kuala_Lumpur|Singapore","Asia/Makassar|Asia/Ujung_Pandang","Asia/Rangoon|Asia/Yangon","Asia/Rangoon|Indian/Cocos","Asia/Seoul|ROK","Asia/Shanghai|Asia/Chongqing","Asia/Shanghai|Asia/Chungking","Asia/Shanghai|Asia/Harbin","Asia/Shanghai|Asia/Macao","Asia/Shanghai|Asia/Macau","Asia/Shanghai|Asia/Taipei","Asia/Shanghai|PRC","Asia/Shanghai|ROC","Asia/Tashkent|Antarctica/Mawson","Asia/Tashkent|Asia/Aqtau","Asia/Tashkent|Asia/Aqtobe","Asia/Tashkent|Asia/Ashgabat","Asia/Tashkent|Asia/Ashkhabad","Asia/Tashkent|Asia/Atyrau","Asia/Tashkent|Asia/Dushanbe","Asia/Tashkent|Asia/Oral","Asia/Tashkent|Asia/Samarkand","Asia/Tashkent|Etc/GMT-5","Asia/Tashkent|Indian/Kerguelen","Asia/Tashkent|Indian/Maldives","Asia/Tehran|Iran","Asia/Tokyo|Japan","Asia/Ulaanbaatar|Asia/Choibalsan","Asia/Ulaanbaatar|Asia/Ulan_Bator","Asia/Vladivostok|Asia/Ust-Nera","Asia/Yakutsk|Asia/Khandyga","Atlantic/Azores|America/Scoresbysund","Atlantic/Cape_Verde|Etc/GMT+1","Australia/Adelaide|Australia/Broken_Hill","Australia/Adelaide|Australia/South","Australia/Adelaide|Australia/Yancowinna","Australia/Brisbane|Australia/Lindeman","Australia/Brisbane|Australia/Queensland","Australia/Darwin|Australia/North","Australia/Lord_Howe|Australia/LHI","Australia/Perth|Australia/West","Australia/Sydney|Australia/ACT","Australia/Sydney|Australia/Canberra","Australia/Sydney|Australia/Currie","Australia/Sydney|Australia/Hobart","Australia/Sydney|Australia/Melbourne","Australia/Sydney|Australia/NSW","Australia/Sydney|Australia/Tasmania","Australia/Sydney|Australia/Victoria","Etc/UTC|Etc/UCT","Etc/UTC|Etc/Universal","Etc/UTC|Etc/Zulu","Etc/UTC|UCT","Etc/UTC|UTC","Etc/UTC|Universal","Etc/UTC|Zulu","Europe/Athens|Asia/Nicosia","Europe/Athens|EET","Europe/Athens|Europe/Bucharest","Europe/Athens|Europe/Helsinki","Europe/Athens|Europe/Kiev","Europe/Athens|Europe/Mariehamn","Europe/Athens|Europe/Nicosia","Europe/Athens|Europe/Riga","Europe/Athens|Europe/Sofia","Europe/Athens|Europe/Tallinn","Europe/Athens|Europe/Uzhgorod","Europe/Athens|Europe/Vilnius","Europe/Athens|Europe/Zaporozhye","Europe/Chisinau|Europe/Tiraspol","Europe/Dublin|Eire","Europe/Istanbul|Asia/Istanbul","Europe/Istanbul|Turkey","Europe/Lisbon|Atlantic/Canary","Europe/Lisbon|Atlantic/Faeroe","Europe/Lisbon|Atlantic/Faroe","Europe/Lisbon|Atlantic/Madeira","Europe/Lisbon|Portugal","Europe/Lisbon|WET","Europe/London|Europe/Belfast","Europe/London|Europe/Guernsey","Europe/London|Europe/Isle_of_Man","Europe/London|Europe/Jersey","Europe/London|GB","Europe/London|GB-Eire","Europe/Moscow|W-SU","Europe/Paris|Africa/Ceuta","Europe/Paris|Arctic/Longyearbyen","Europe/Paris|Atlantic/Jan_Mayen","Europe/Paris|CET","Europe/Paris|Europe/Amsterdam","Europe/Paris|Europe/Andorra","Europe/Paris|Europe/Belgrade","Europe/Paris|Europe/Berlin","Europe/Paris|Europe/Bratislava","Europe/Paris|Europe/Brussels","Europe/Paris|Europe/Budapest","Europe/Paris|Europe/Busingen","Europe/Paris|Europe/Copenhagen","Europe/Paris|Europe/Gibraltar","Europe/Paris|Europe/Ljubljana","Europe/Paris|Europe/Luxembourg","Europe/Paris|Europe/Madrid","Europe/Paris|Europe/Malta","Europe/Paris|Europe/Monaco","Europe/Paris|Europe/Oslo","Europe/Paris|Europe/Podgorica","Europe/Paris|Europe/Prague","Europe/Paris|Europe/Rome","Europe/Paris|Europe/San_Marino","Europe/Paris|Europe/Sarajevo","Europe/Paris|Europe/Skopje","Europe/Paris|Europe/Stockholm","Europe/Paris|Europe/Tirane","Europe/Paris|Europe/Vaduz","Europe/Paris|Europe/Vatican","Europe/Paris|Europe/Vienna","Europe/Paris|Europe/Warsaw","Europe/Paris|Europe/Zagreb","Europe/Paris|Europe/Zurich","Europe/Paris|Poland","Europe/Ulyanovsk|Europe/Astrakhan","Pacific/Auckland|Antarctica/McMurdo","Pacific/Auckland|Antarctica/South_Pole","Pacific/Auckland|NZ","Pacific/Chatham|NZ-CHAT","Pacific/Easter|Chile/EasterIsland","Pacific/Fakaofo|Etc/GMT-13","Pacific/Fakaofo|Pacific/Enderbury","Pacific/Galapagos|Etc/GMT+6","Pacific/Gambier|Etc/GMT+9","Pacific/Guadalcanal|Antarctica/Macquarie","Pacific/Guadalcanal|Etc/GMT-11","Pacific/Guadalcanal|Pacific/Efate","Pacific/Guadalcanal|Pacific/Kosrae","Pacific/Guadalcanal|Pacific/Noumea","Pacific/Guadalcanal|Pacific/Pohnpei","Pacific/Guadalcanal|Pacific/Ponape","Pacific/Guam|Pacific/Saipan","Pacific/Honolulu|HST","Pacific/Honolulu|Pacific/Johnston","Pacific/Honolulu|US/Hawaii","Pacific/Kiritimati|Etc/GMT-14","Pacific/Niue|Etc/GMT+11","Pacific/Pago_Pago|Pacific/Midway","Pacific/Pago_Pago|Pacific/Samoa","Pacific/Pago_Pago|US/Samoa","Pacific/Pitcairn|Etc/GMT+8","Pacific/Port_Moresby|Antarctica/DumontDUrville","Pacific/Port_Moresby|Etc/GMT-10","Pacific/Port_Moresby|Pacific/Chuuk","Pacific/Port_Moresby|Pacific/Truk","Pacific/Port_Moresby|Pacific/Yap","Pacific/Tahiti|Etc/GMT+10","Pacific/Tahiti|Pacific/Rarotonga"]}),c}); \ No newline at end of file diff --git a/node_modules/moment-timezone/builds/moment-timezone-with-data.js b/node_modules/moment-timezone/builds/moment-timezone-with-data.js new file mode 100644 index 00000000..dde57d06 --- /dev/null +++ b/node_modules/moment-timezone/builds/moment-timezone-with-data.js @@ -0,0 +1,1224 @@ +//! moment-timezone.js +//! version : 0.5.26 +//! Copyright (c) JS Foundation and other contributors +//! license : MIT +//! github.com/moment/moment-timezone + +(function (root, factory) { + "use strict"; + + /*global define*/ + if (typeof module === 'object' && module.exports) { + module.exports = factory(require('moment')); // Node + } else if (typeof define === 'function' && define.amd) { + define(['moment'], factory); // AMD + } else { + factory(root.moment); // Browser + } +}(this, function (moment) { + "use strict"; + + // Do not load moment-timezone a second time. + // if (moment.tz !== undefined) { + // logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion); + // return moment; + // } + + var VERSION = "0.5.26", + zones = {}, + links = {}, + names = {}, + guesses = {}, + cachedGuess; + + if (!moment || typeof moment.version !== 'string') { + logError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/'); + } + + var momentVersion = moment.version.split('.'), + major = +momentVersion[0], + minor = +momentVersion[1]; + + // Moment.js version check + if (major < 2 || (major === 2 && minor < 6)) { + logError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com'); + } + + /************************************ + Unpacking + ************************************/ + + function charCodeToInt(charCode) { + if (charCode > 96) { + return charCode - 87; + } else if (charCode > 64) { + return charCode - 29; + } + return charCode - 48; + } + + function unpackBase60(string) { + var i = 0, + parts = string.split('.'), + whole = parts[0], + fractional = parts[1] || '', + multiplier = 1, + num, + out = 0, + sign = 1; + + // handle negative numbers + if (string.charCodeAt(0) === 45) { + i = 1; + sign = -1; + } + + // handle digits before the decimal + for (i; i < whole.length; i++) { + num = charCodeToInt(whole.charCodeAt(i)); + out = 60 * out + num; + } + + // handle digits after the decimal + for (i = 0; i < fractional.length; i++) { + multiplier = multiplier / 60; + num = charCodeToInt(fractional.charCodeAt(i)); + out += num * multiplier; + } + + return out * sign; + } + + function arrayToInt (array) { + for (var i = 0; i < array.length; i++) { + array[i] = unpackBase60(array[i]); + } + } + + function intToUntil (array, length) { + for (var i = 0; i < length; i++) { + array[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds + } + + array[length - 1] = Infinity; + } + + function mapIndices (source, indices) { + var out = [], i; + + for (i = 0; i < indices.length; i++) { + out[i] = source[indices[i]]; + } + + return out; + } + + function unpack (string) { + var data = string.split('|'), + offsets = data[2].split(' '), + indices = data[3].split(''), + untils = data[4].split(' '); + + arrayToInt(offsets); + arrayToInt(indices); + arrayToInt(untils); + + intToUntil(untils, indices.length); + + return { + name : data[0], + abbrs : mapIndices(data[1].split(' '), indices), + offsets : mapIndices(offsets, indices), + untils : untils, + population : data[5] | 0 + }; + } + + /************************************ + Zone object + ************************************/ + + function Zone (packedString) { + if (packedString) { + this._set(unpack(packedString)); + } + } + + Zone.prototype = { + _set : function (unpacked) { + this.name = unpacked.name; + this.abbrs = unpacked.abbrs; + this.untils = unpacked.untils; + this.offsets = unpacked.offsets; + this.population = unpacked.population; + }, + + _index : function (timestamp) { + var target = +timestamp, + untils = this.untils, + i; + + for (i = 0; i < untils.length; i++) { + if (target < untils[i]) { + return i; + } + } + }, + + parse : function (timestamp) { + var target = +timestamp, + offsets = this.offsets, + untils = this.untils, + max = untils.length - 1, + offset, offsetNext, offsetPrev, i; + + for (i = 0; i < max; i++) { + offset = offsets[i]; + offsetNext = offsets[i + 1]; + offsetPrev = offsets[i ? i - 1 : i]; + + if (offset < offsetNext && tz.moveAmbiguousForward) { + offset = offsetNext; + } else if (offset > offsetPrev && tz.moveInvalidForward) { + offset = offsetPrev; + } + + if (target < untils[i] - (offset * 60000)) { + return offsets[i]; + } + } + + return offsets[max]; + }, + + abbr : function (mom) { + return this.abbrs[this._index(mom)]; + }, + + offset : function (mom) { + logError("zone.offset has been deprecated in favor of zone.utcOffset"); + return this.offsets[this._index(mom)]; + }, + + utcOffset : function (mom) { + return this.offsets[this._index(mom)]; + } + }; + + /************************************ + Current Timezone + ************************************/ + + function OffsetAt(at) { + var timeString = at.toTimeString(); + var abbr = timeString.match(/\([a-z ]+\)/i); + if (abbr && abbr[0]) { + // 17:56:31 GMT-0600 (CST) + // 17:56:31 GMT-0600 (Central Standard Time) + abbr = abbr[0].match(/[A-Z]/g); + abbr = abbr ? abbr.join('') : undefined; + } else { + // 17:56:31 CST + // 17:56:31 GMT+0800 (台北標準時間) + abbr = timeString.match(/[A-Z]{3,5}/g); + abbr = abbr ? abbr[0] : undefined; + } + + if (abbr === 'GMT') { + abbr = undefined; + } + + this.at = +at; + this.abbr = abbr; + this.offset = at.getTimezoneOffset(); + } + + function ZoneScore(zone) { + this.zone = zone; + this.offsetScore = 0; + this.abbrScore = 0; + } + + ZoneScore.prototype.scoreOffsetAt = function (offsetAt) { + this.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset); + if (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) { + this.abbrScore++; + } + }; + + function findChange(low, high) { + var mid, diff; + + while ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) { + mid = new OffsetAt(new Date(low.at + diff)); + if (mid.offset === low.offset) { + low = mid; + } else { + high = mid; + } + } + + return low; + } + + function userOffsets() { + var startYear = new Date().getFullYear() - 2, + last = new OffsetAt(new Date(startYear, 0, 1)), + offsets = [last], + change, next, i; + + for (i = 1; i < 48; i++) { + next = new OffsetAt(new Date(startYear, i, 1)); + if (next.offset !== last.offset) { + change = findChange(last, next); + offsets.push(change); + offsets.push(new OffsetAt(new Date(change.at + 6e4))); + } + last = next; + } + + for (i = 0; i < 4; i++) { + offsets.push(new OffsetAt(new Date(startYear + i, 0, 1))); + offsets.push(new OffsetAt(new Date(startYear + i, 6, 1))); + } + + return offsets; + } + + function sortZoneScores (a, b) { + if (a.offsetScore !== b.offsetScore) { + return a.offsetScore - b.offsetScore; + } + if (a.abbrScore !== b.abbrScore) { + return a.abbrScore - b.abbrScore; + } + return b.zone.population - a.zone.population; + } + + function addToGuesses (name, offsets) { + var i, offset; + arrayToInt(offsets); + for (i = 0; i < offsets.length; i++) { + offset = offsets[i]; + guesses[offset] = guesses[offset] || {}; + guesses[offset][name] = true; + } + } + + function guessesForUserOffsets (offsets) { + var offsetsLength = offsets.length, + filteredGuesses = {}, + out = [], + i, j, guessesOffset; + + for (i = 0; i < offsetsLength; i++) { + guessesOffset = guesses[offsets[i].offset] || {}; + for (j in guessesOffset) { + if (guessesOffset.hasOwnProperty(j)) { + filteredGuesses[j] = true; + } + } + } + + for (i in filteredGuesses) { + if (filteredGuesses.hasOwnProperty(i)) { + out.push(names[i]); + } + } + + return out; + } + + function rebuildGuess () { + + // use Intl API when available and returning valid time zone + try { + var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone; + if (intlName && intlName.length > 3) { + var name = names[normalizeName(intlName)]; + if (name) { + return name; + } + logError("Moment Timezone found " + intlName + " from the Intl api, but did not have that data loaded."); + } + } catch (e) { + // Intl unavailable, fall back to manual guessing. + } + + var offsets = userOffsets(), + offsetsLength = offsets.length, + guesses = guessesForUserOffsets(offsets), + zoneScores = [], + zoneScore, i, j; + + for (i = 0; i < guesses.length; i++) { + zoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength); + for (j = 0; j < offsetsLength; j++) { + zoneScore.scoreOffsetAt(offsets[j]); + } + zoneScores.push(zoneScore); + } + + zoneScores.sort(sortZoneScores); + + return zoneScores.length > 0 ? zoneScores[0].zone.name : undefined; + } + + function guess (ignoreCache) { + if (!cachedGuess || ignoreCache) { + cachedGuess = rebuildGuess(); + } + return cachedGuess; + } + + /************************************ + Global Methods + ************************************/ + + function normalizeName (name) { + return (name || '').toLowerCase().replace(/\//g, '_'); + } + + function addZone (packed) { + var i, name, split, normalized; + + if (typeof packed === "string") { + packed = [packed]; + } + + for (i = 0; i < packed.length; i++) { + split = packed[i].split('|'); + name = split[0]; + normalized = normalizeName(name); + zones[normalized] = packed[i]; + names[normalized] = name; + addToGuesses(normalized, split[2].split(' ')); + } + } + + function getZone (name, caller) { + + name = normalizeName(name); + + var zone = zones[name]; + var link; + + if (zone instanceof Zone) { + return zone; + } + + if (typeof zone === 'string') { + zone = new Zone(zone); + zones[name] = zone; + return zone; + } + + // Pass getZone to prevent recursion more than 1 level deep + if (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) { + zone = zones[name] = new Zone(); + zone._set(link); + zone.name = names[name]; + return zone; + } + + return null; + } + + function getNames () { + var i, out = []; + + for (i in names) { + if (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) { + out.push(names[i]); + } + } + + return out.sort(); + } + + function addLink (aliases) { + var i, alias, normal0, normal1; + + if (typeof aliases === "string") { + aliases = [aliases]; + } + + for (i = 0; i < aliases.length; i++) { + alias = aliases[i].split('|'); + + normal0 = normalizeName(alias[0]); + normal1 = normalizeName(alias[1]); + + links[normal0] = normal1; + names[normal0] = alias[0]; + + links[normal1] = normal0; + names[normal1] = alias[1]; + } + } + + function loadData (data) { + addZone(data.zones); + addLink(data.links); + tz.dataVersion = data.version; + } + + function zoneExists (name) { + if (!zoneExists.didShowError) { + zoneExists.didShowError = true; + logError("moment.tz.zoneExists('" + name + "') has been deprecated in favor of !moment.tz.zone('" + name + "')"); + } + return !!getZone(name); + } + + function needsOffset (m) { + var isUnixTimestamp = (m._f === 'X' || m._f === 'x'); + return !!(m._a && (m._tzm === undefined) && !isUnixTimestamp); + } + + function logError (message) { + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + } + + /************************************ + moment.tz namespace + ************************************/ + + function tz (input) { + var args = Array.prototype.slice.call(arguments, 0, -1), + name = arguments[arguments.length - 1], + zone = getZone(name), + out = moment.utc.apply(null, args); + + if (zone && !moment.isMoment(input) && needsOffset(out)) { + out.add(zone.parse(out), 'minutes'); + } + + out.tz(name); + + return out; + } + + tz.version = VERSION; + tz.dataVersion = ''; + tz._zones = zones; + tz._links = links; + tz._names = names; + tz.add = addZone; + tz.link = addLink; + tz.load = loadData; + tz.zone = getZone; + tz.zoneExists = zoneExists; // deprecated in 0.1.0 + tz.guess = guess; + tz.names = getNames; + tz.Zone = Zone; + tz.unpack = unpack; + tz.unpackBase60 = unpackBase60; + tz.needsOffset = needsOffset; + tz.moveInvalidForward = true; + tz.moveAmbiguousForward = false; + + /************************************ + Interface with Moment.js + ************************************/ + + var fn = moment.fn; + + moment.tz = tz; + + moment.defaultZone = null; + + moment.updateOffset = function (mom, keepTime) { + var zone = moment.defaultZone, + offset; + + if (mom._z === undefined) { + if (zone && needsOffset(mom) && !mom._isUTC) { + mom._d = moment.utc(mom._a)._d; + mom.utc().add(zone.parse(mom), 'minutes'); + } + mom._z = zone; + } + if (mom._z) { + offset = mom._z.utcOffset(mom); + if (Math.abs(offset) < 16) { + offset = offset / 60; + } + if (mom.utcOffset !== undefined) { + var z = mom._z; + mom.utcOffset(-offset, keepTime); + mom._z = z; + } else { + mom.zone(offset, keepTime); + } + } + }; + + fn.tz = function (name, keepTime) { + if (name) { + if (typeof name !== 'string') { + throw new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']'); + } + this._z = getZone(name); + if (this._z) { + moment.updateOffset(this, keepTime); + } else { + logError("Moment Timezone has no data for " + name + ". See http://momentjs.com/timezone/docs/#/data-loading/."); + } + return this; + } + if (this._z) { return this._z.name; } + }; + + function abbrWrap (old) { + return function () { + if (this._z) { return this._z.abbr(this); } + return old.call(this); + }; + } + + function resetZoneWrap (old) { + return function () { + this._z = null; + return old.apply(this, arguments); + }; + } + + function resetZoneWrap2 (old) { + return function () { + if (arguments.length > 0) this._z = null; + return old.apply(this, arguments); + }; + } + + fn.zoneName = abbrWrap(fn.zoneName); + fn.zoneAbbr = abbrWrap(fn.zoneAbbr); + fn.utc = resetZoneWrap(fn.utc); + fn.local = resetZoneWrap(fn.local); + fn.utcOffset = resetZoneWrap2(fn.utcOffset); + + moment.tz.setDefault = function(name) { + if (major < 2 || (major === 2 && minor < 9)) { + logError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.'); + } + moment.defaultZone = name ? getZone(name) : null; + return moment; + }; + + // Cloning a moment should include the _z property. + var momentProperties = moment.momentProperties; + if (Object.prototype.toString.call(momentProperties) === '[object Array]') { + // moment 2.8.1+ + momentProperties.push('_z'); + momentProperties.push('_a'); + } else if (momentProperties) { + // moment 2.7.0 + momentProperties._z = null; + } + + loadData({ + "version": "2019b", + "zones": [ + "Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q|48e5", + "Africa/Accra|LMT GMT +0020|.Q 0 -k|012121212121212121212121212121212121212121212121|-26BbX.8 6tzX.8 MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE|41e5", + "Africa/Nairobi|LMT EAT +0230 +0245|-2r.g -30 -2u -2J|01231|-1F3Cr.g 3Dzr.g okMu MFXJ|47e5", + "Africa/Algiers|PMT WET WEST CET CEST|-9.l 0 -10 -10 -20|0121212121212121343431312123431213|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 DA0 Imo0 rd0 De0 9Xz0 1fb0 1ap0 16K0 2yo0 mEp0 hwL0 jxA0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0|26e5", + "Africa/Lagos|LMT WAT|-d.A -10|01|-22y0d.A|17e6", + "Africa/Bissau|LMT -01 GMT|12.k 10 0|012|-2ldX0 2xoo0|39e4", + "Africa/Maputo|LMT CAT|-2a.k -20|01|-2GJea.k|26e5", + "Africa/Cairo|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1bIO0 vb0 1ip0 11z0 1iN0 1nz0 12p0 1pz0 10N0 1pz0 16p0 1jz0 s3d0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1WL0 rd0 1Rz0 wp0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1qL0 Xd0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1ny0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 WL0 1qN0 Rb0 1wp0 On0 1zd0 Lz0 1EN0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0|15e6", + "Africa/Casablanca|LMT +00 +01|u.k 0 -10|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-2gMnt.E 130Lt.E rb0 Dd0 dVb0 b6p0 TX0 EoB0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4mn0 SyN0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0|32e5", + "Africa/Ceuta|WET WEST CET CEST|0 -10 -10 -20|010101010101010101010232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-25KN0 11z0 drd0 18p0 3HX0 17d0 1fz0 1a10 1io0 1a00 1y7o0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4VB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|85e3", + "Africa/El_Aaiun|LMT -01 +00 +01|Q.M 10 0 -10|012323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1rDz7.c 1GVA7.c 6L0 AL0 1Nd0 XX0 1Cp0 pz0 1cBB0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0|20e4", + "Africa/Johannesburg|SAST SAST SAST|-1u -20 -30|012121|-2GJdu 1Ajdu 1cL0 1cN0 1cL0|84e5", + "Africa/Juba|LMT CAT CAST EAT|-26.s -20 -30 -30|01212121212121212121212121212121213|-1yW26.s 1zK06.s 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0", + "Africa/Khartoum|LMT CAT CAST EAT|-2a.8 -20 -30 -30|012121212121212121212121212121212131|-1yW2a.8 1zK0a.8 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 HjL0|51e5", + "Africa/Monrovia|MMT MMT GMT|H.8 I.u 0|012|-23Lzg.Q 28G01.m|11e5", + "Africa/Ndjamena|LMT WAT WAST|-10.c -10 -20|0121|-2le10.c 2J3c0.c Wn0|13e5", + "Africa/Sao_Tome|LMT GMT WAT|A.J 0 -10|0121|-2le00 4i6N0 2q00", + "Africa/Tripoli|LMT CET CEST EET|-Q.I -10 -20 -20|012121213121212121212121213123123|-21JcQ.I 1hnBQ.I vx0 4iP0 xx0 4eN0 Bb0 7ip0 U0n0 A10 1db0 1cN0 1db0 1dd0 1db0 1eN0 1bb0 1e10 1cL0 1c10 1db0 1dd0 1db0 1cN0 1db0 1q10 fAn0 1ep0 1db0 AKq0 TA0 1o00|11e5", + "Africa/Tunis|PMT CET CEST|-9.l -10 -20|0121212121212121212121212121212121|-2nco9.l 18pa9.l 1qM0 DA0 3Tc0 11B0 1ze0 WM0 7z0 3d0 14L0 1cN0 1f90 1ar0 16J0 1gXB0 WM0 1rA0 11c0 nwo0 Ko0 1cM0 1cM0 1rA0 10M0 zuM0 10N0 1aN0 1qM0 WM0 1qM0 11A0 1o00|20e5", + "Africa/Windhoek|+0130 SAST SAST CAT WAT|-1u -20 -30 -20 -10|01213434343434343434343434343434343434343434343434343|-2GJdu 1Ajdu 1cL0 1SqL0 9Io0 16P0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4", + "America/Adak|NST NWT NPT BST BDT AHST HST HDT|b0 a0 a0 b0 a0 a0 a0 90|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17SX0 8wW0 iB0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326", + "America/Anchorage|AST AWT APT AHST AHDT YST AKST AKDT|a0 90 90 a0 90 90 90 80|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17T00 8wX0 iA0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4", + "America/Port_of_Spain|LMT AST|46.4 40|01|-2kNvR.U|43e3", + "America/Araguaina|LMT -03 -02|3c.M 30 20|0121212121212121212121212121212121212121212121212121|-2glwL.c HdKL.c 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 ny10 Lz0|14e4", + "America/Argentina/Buenos_Aires|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 A4p0 uL0 1qN0 WL0", + "America/Argentina/Catamarca|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323132321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 7B0 8zb0 uL0", + "America/Argentina/Cordoba|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323132323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0 1qN0 WL0", + "America/Argentina/Jujuy|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323121323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1ze0 TX0 1ld0 WK0 1wp0 TX0 A4p0 uL0", + "America/Argentina/La_Rioja|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0", + "America/Argentina/Mendoza|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232312121321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1u20 SL0 1vd0 Tb0 1wp0 TW0 ri10 Op0 7TX0 uL0", + "America/Argentina/Rio_Gallegos|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0", + "America/Argentina/Salta|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0", + "America/Argentina/San_Juan|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rld0 m10 8lb0 uL0", + "America/Argentina/San_Luis|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323121212321212|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 XX0 1q20 SL0 AN0 vDb0 m10 8lb0 8L0 jd0 1qN0 WL0 1qN0", + "America/Argentina/Tucuman|CMT -04 -03 -02|4g.M 40 30 20|0121212121212121212121212121212121212121212323232313232123232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 4N0 8BX0 uL0 1qN0 WL0", + "America/Argentina/Ushuaia|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rkN0 8p0 8zb0 uL0", + "America/Curacao|LMT -0430 AST|4z.L 4u 40|012|-2kV7o.d 28KLS.d|15e4", + "America/Asuncion|AMT -04 -03|3O.E 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-1x589.k 1DKM9.k 3CL0 3Dd0 10L0 1pB0 10n0 1pB0 10n0 1pB0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1lB0 14n0 1dd0 1cL0 1fd0 WL0 1rd0 1aL0 1dB0 Xz0 1qp0 Xb0 1qN0 10L0 1rB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 WN0 1qL0 11B0 1nX0 1ip0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 TX0 1tB0 19X0 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0|28e5", + "America/Atikokan|CST CDT CWT CPT EST|60 50 50 50 50|0101234|-25TQ0 1in0 Rnb0 3je0 8x30 iw0|28e2", + "America/Bahia_Banderas|LMT MST CST PST MDT CDT|71 70 60 80 60 50|0121212131414141414141414141414141414152525252525252525252525252525252525252525252525252525252|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|84e3", + "America/Bahia|LMT -03 -02|2y.4 30 20|01212121212121212121212121212121212121212121212121212121212121|-2glxp.U HdLp.U 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 l5B0 Rb0|27e5", + "America/Barbados|LMT BMT AST ADT|3W.t 3W.t 40 30|01232323232|-1Q0I1.v jsM0 1ODC1.v IL0 1ip0 17b0 1ip0 17b0 1ld0 13b0|28e4", + "America/Belem|LMT -03 -02|3d.U 30 20|012121212121212121212121212121|-2glwK.4 HdKK.4 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0|20e5", + "America/Belize|LMT CST -0530 CDT|5Q.M 60 5u 50|01212121212121212121212121212121212121212121212121213131|-2kBu7.c fPA7.c Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1f0Mu qn0 lxB0 mn0|57e3", + "America/Blanc-Sablon|AST ADT AWT APT|40 30 30 30|010230|-25TS0 1in0 UGp0 8x50 iu0|11e2", + "America/Boa_Vista|LMT -04 -03|42.E 40 30|0121212121212121212121212121212121|-2glvV.k HdKV.k 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 smp0 WL0 1tB0 2L0|62e2", + "America/Bogota|BMT -05 -04|4U.g 50 40|0121|-2eb73.I 38yo3.I 2en0|90e5", + "America/Boise|PST PDT MST MWT MPT MDT|80 70 70 60 60 60|0101023425252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-261q0 1nX0 11B0 1nX0 8C10 JCL0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 Dd0 1Kn0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e4", + "America/Cambridge_Bay|-00 MST MWT MPT MDDT MDT CST CDT EST|0 70 60 60 50 60 60 50 50|0123141515151515151515151515151515151515151515678651515151515151515151515151515151515151515151515151515151515151515151515151|-21Jc0 RO90 8x20 ix0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11A0 1nX0 2K0 WQ0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e2", + "America/Campo_Grande|LMT -04 -03|3C.s 40 30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwl.w HdLl.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4", + "America/Cancun|LMT CST EST EDT CDT|5L.4 60 50 40 50|0123232341414141414141414141414141414141412|-1UQG0 2q2o0 yLB0 1lb0 14p0 1lb0 14p0 Lz0 xB0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4", + "America/Caracas|CMT -0430 -04|4r.E 4u 40|01212|-2kV7w.k 28KM2.k 1IwOu kqo0|29e5", + "America/Cayenne|LMT -04 -03|3t.k 40 30|012|-2mrwu.E 2gWou.E|58e3", + "America/Panama|CMT EST|5j.A 50|01|-2uduE.o|15e5", + "America/Chicago|CST CDT EST CWT CPT|60 50 50 50 50|01010101010101010101010101010101010102010101010103401010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 1wp0 TX0 WN0 1qL0 1cN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 11B0 1Hz0 14p0 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5", + "America/Chihuahua|LMT MST CST CDT MDT|74.k 70 60 50 60|0121212323241414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|81e4", + "America/Costa_Rica|SJMT CST CDT|5A.d 60 50|0121212121|-1Xd6n.L 2lu0n.L Db0 1Kp0 Db0 pRB0 15b0 1kp0 mL0|12e5", + "America/Creston|MST PST|70 80|010|-29DR0 43B0|53e2", + "America/Cuiaba|LMT -04 -03|3I.k 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwf.E HdLf.E 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 4a10 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|54e4", + "America/Danmarkshavn|LMT -03 -02 GMT|1e.E 30 20 0|01212121212121212121212121212121213|-2a5WJ.k 2z5fJ.k 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 DC0|8", + "America/Dawson_Creek|PST PDT PWT PPT MST|80 70 70 70 70|0102301010101010101010101010101010101010101010101010101014|-25TO0 1in0 UGp0 8x10 iy0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 ML0|12e3", + "America/Dawson|YST YDT YWT YPT YDDT PST PDT|90 80 80 80 70 80 70|0101023040565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-25TN0 1in0 1o10 13V0 Ser0 8x00 iz0 LCL0 1fA0 jrA0 fNd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|13e2", + "America/Denver|MST MDT MWT MPT|70 60 60 60|01010101023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261r0 1nX0 11B0 1nX0 11B0 1qL0 WN0 mn0 Ord0 8x20 ix0 LCN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5", + "America/Detroit|LMT CST EST EWT EPT EDT|5w.b 60 50 40 40 40|012342525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-2Cgir.N peqr.N 156L0 8x40 iv0 6fd0 11z0 XQp0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e5", + "America/Edmonton|LMT MST MDT MWT MPT|7x.Q 70 60 60 60|01212121212121341212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2yd4q.8 shdq.8 1in0 17d0 hz0 2dB0 1fz0 1a10 11z0 1qN0 WL0 1qN0 11z0 IGN0 8x20 ix0 3NB0 11z0 LFB0 1cL0 3Cp0 1cL0 66N0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|10e5", + "America/Eirunepe|LMT -05 -04|4D.s 50 40|0121212121212121212121212121212121|-2glvk.w HdLk.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0 yTd0 d5X0|31e3", + "America/El_Salvador|LMT CST CDT|5U.M 60 50|012121|-1XiG3.c 2Fvc3.c WL0 1qN0 WL0|11e5", + "America/Tijuana|LMT MST PST PDT PWT PPT|7M.4 70 80 70 70 70|012123245232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQE0 4PX0 8mM0 8lc0 SN0 1cL0 pHB0 83r0 zI0 5O10 1Rz0 cOO0 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 BUp0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|20e5", + "America/Fort_Nelson|PST PDT PWT PPT MST|80 70 70 70 70|01023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010104|-25TO0 1in0 UGp0 8x10 iy0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2", + "America/Fort_Wayne|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|010101023010101010101010101040454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 QI10 Db0 RB0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 5Tz0 1o10 qLb0 1cL0 1cN0 1cL0 1qhd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Fortaleza|LMT -03 -02|2y 30 20|0121212121212121212121212121212121212121|-2glxq HdLq 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 5z0 2mN0 On0|34e5", + "America/Glace_Bay|LMT AST ADT AWT APT|3X.M 40 30 30 30|012134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsI0.c CwO0.c 1in0 UGp0 8x50 iu0 iq10 11z0 Jg10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3", + "America/Godthab|LMT -03 -02|3q.U 30 20|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a5Ux.4 2z5dx.4 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e3", + "America/Goose_Bay|NST NDT NST NDT NWT NPT AST ADT ADDT|3u.Q 2u.Q 3u 2u 2u 2u 40 30 20|010232323232323245232323232323232323232323232323232323232326767676767676767676767676767676767676767676768676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-25TSt.8 1in0 DXb0 2HbX.8 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 WL0 1qN0 WL0 1qN0 7UHu itu 1tB0 WL0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1tB0 WL0 1ld0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 S10 g0u 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2", + "America/Grand_Turk|KMT EST EDT AST|57.a 50 40 40|01212121212121212121212121212121212121212121212121212121212121212121212121232121212121212121212121212121212121212121|-2l1uQ.O 2HHBQ.O 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 5Ip0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2", + "America/Guatemala|LMT CST CDT|62.4 60 50|0121212121|-24KhV.U 2efXV.U An0 mtd0 Nz0 ifB0 17b0 zDB0 11z0|13e5", + "America/Guayaquil|QMT -05 -04|5e 50 40|0121|-1yVSK 2uILK rz0|27e5", + "America/Guyana|LMT -0345 -03 -04|3Q.E 3J 30 40|0123|-2dvU7.k 2r6LQ.k Bxbf|80e4", + "America/Halifax|LMT AST ADT AWT APT|4e.o 40 30 30 30|0121212121212121212121212121212121212121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsHJ.A xzzJ.A 1db0 3I30 1in0 3HX0 IL0 1E10 ML0 1yN0 Pb0 1Bd0 Mn0 1Bd0 Rz0 1w10 Xb0 1w10 LX0 1w10 Xb0 1w10 Lz0 1C10 Jz0 1E10 OL0 1yN0 Un0 1qp0 Xb0 1qp0 11X0 1w10 Lz0 1HB0 LX0 1C10 FX0 1w10 Xb0 1qp0 Xb0 1BB0 LX0 1td0 Xb0 1qp0 Xb0 Rf0 8x50 iu0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 3Qp0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 3Qp0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 6i10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4", + "America/Havana|HMT CST CDT|5t.A 50 40|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1Meuu.o 72zu.o ML0 sld0 An0 1Nd0 Db0 1Nd0 An0 6Ep0 An0 1Nd0 An0 JDd0 Mn0 1Ap0 On0 1fd0 11X0 1qN0 WL0 1wp0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 14n0 1ld0 14L0 1kN0 15b0 1kp0 1cL0 1cN0 1fz0 1a10 1fz0 1fB0 11z0 14p0 1nX0 11B0 1nX0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 1a10 1in0 1a10 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 17c0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 11A0 6i00 Rc0 1wo0 U00 1tA0 Rc0 1wo0 U00 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5", + "America/Hermosillo|LMT MST CST PST MDT|7n.Q 70 60 80 60|0121212131414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0|64e4", + "America/Indiana/Knox|CST CDT CWT CPT EST|60 50 50 50 50|0101023010101010101010101010101010101040101010101010101010101010101010101010101010101010141010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 11z0 1o10 11z0 1o10 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 3Cn0 8wp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 z8o0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Marengo|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101023010101010101010104545454545414545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 dyN0 11z0 6fd0 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 jrz0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1e6p0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Petersburg|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010104010101010101010101010141014545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 njX0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 3Fb0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 19co0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Tell_City|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010454541010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 g0p0 11z0 1o10 11z0 1qL0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 caL0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Vevay|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|010102304545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 kPB0 Awn0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1lnd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Vincennes|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010454541014545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 g0p0 11z0 1o10 11z0 1qL0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 caL0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Winamac|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010101010454541054545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 jrz0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1za0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Inuvik|-00 PST PDDT MST MDT|0 80 60 70 60|0121343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-FnA0 tWU0 1fA0 wPe0 2pz0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|35e2", + "America/Iqaluit|-00 EWT EPT EST EDDT EDT CST CDT|0 40 40 50 30 40 60 50|01234353535353535353535353535353535353535353567353535353535353535353535353535353535353535353535353535353535353535353535353|-16K00 7nX0 iv0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|67e2", + "America/Jamaica|KMT EST EDT|57.a 50 40|0121212121212121212121|-2l1uQ.O 2uM1Q.O 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0|94e4", + "America/Juneau|PST PWT PPT PDT YDT YST AKST AKDT|80 70 70 70 80 90 90 80|01203030303030303030303030403030356767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cM0 1cM0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|33e3", + "America/Kentucky/Louisville|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101010102301010101010101010101010101454545454545414545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 3Fd0 Nb0 LPd0 11z0 RB0 8x30 iw0 Bb0 10N0 2bB0 8in0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 xz0 gso0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Kentucky/Monticello|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101023010101010101010101010101010101010101010101010101010101010101010101454545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 SWp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/La_Paz|CMT BST -04|4w.A 3w.A 40|012|-1x37r.o 13b0|19e5", + "America/Lima|LMT -05 -04|58.A 50 40|0121212121212121|-2tyGP.o 1bDzP.o zX0 1aN0 1cL0 1cN0 1cL0 1PrB0 zX0 1O10 zX0 6Gp0 zX0 98p0 zX0|11e6", + "America/Los_Angeles|PST PDT PWT PPT|80 70 70 70|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261q0 1nX0 11B0 1nX0 SgN0 8x10 iy0 5Wp1 1VaX 3dA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6", + "America/Maceio|LMT -03 -02|2m.Q 30 20|012121212121212121212121212121212121212121|-2glxB.8 HdLB.8 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 8Q10 WL0 1tB0 5z0 2mN0 On0|93e4", + "America/Managua|MMT CST EST CDT|5J.c 60 50 50|0121313121213131|-1quie.M 1yAMe.M 4mn0 9Up0 Dz0 1K10 Dz0 s3F0 1KH0 DB0 9In0 k8p0 19X0 1o30 11y0|22e5", + "America/Manaus|LMT -04 -03|40.4 40 30|01212121212121212121212121212121|-2glvX.U HdKX.U 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0|19e5", + "America/Martinique|FFMT AST ADT|44.k 40 30|0121|-2mPTT.E 2LPbT.E 19X0|39e4", + "America/Matamoros|LMT CST CDT|6E 60 50|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1UQG0 2FjC0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|45e4", + "America/Mazatlan|LMT MST CST PST MDT|75.E 70 60 80 60|0121212131414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|44e4", + "America/Menominee|CST CDT CWT CPT EST|60 50 50 50 50|01010230101041010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 LCN0 1fz0 6410 9Jb0 1cM0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|85e2", + "America/Merida|LMT CST EST CDT|5W.s 60 50 50|0121313131313131313131313131313131313131313131313131313131313131313131313131313131313131|-1UQG0 2q2o0 2hz0 wu30 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|11e5", + "America/Metlakatla|PST PWT PPT PDT AKST AKDT|80 70 70 70 90 80|01203030303030303030303030303030304545450454545454545454545454545454545454545454|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1hU10 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2", + "America/Mexico_City|LMT MST CST CDT CWT|6A.A 70 60 50 50|012121232324232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 gEn0 TX0 3xd0 Jb0 6zB0 SL0 e5d0 17b0 1Pff0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|20e6", + "America/Miquelon|LMT AST -03 -02|3I.E 40 30 20|012323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2mKkf.k 2LTAf.k gQ10 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2", + "America/Moncton|EST AST ADT AWT APT|50 40 30 30 30|012121212121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsH0 CwN0 1in0 zAo0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1K10 Lz0 1zB0 NX0 1u10 Wn0 S20 8x50 iu0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14n1 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 ReX 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|64e3", + "America/Monterrey|LMT CST CDT|6F.g 60 50|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1UQG0 2FjC0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|41e5", + "America/Montevideo|LMT MMT -04 -03 -0330 -0230 -02 -0130|3I.P 3I.P 40 30 3u 2u 20 1u|012343434343434343434343435353636353636375363636363636363636363636363636363636363636363|-2tRUf.9 sVc0 8jcf.9 1db0 1dcu 1cLu 1dcu 1cLu ircu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu WLu 1fAu 1cLu 1o0u 11zu NAu 3jXu zXu Dq0u 19Xu pcu jz0 cm10 19X0 6tB0 1fbu 3o0u jX0 4vB0 xz0 3Cp0 mmu 1a10 IMu Db0 4c10 uL0 1Nd0 An0 1SN0 uL0 mp0 28L0 iPB0 un0 1SN0 xz0 1zd0 Lz0 1zd0 Rb0 1zd0 On0 1wp0 Rb0 s8p0 1fB0 1ip0 11z0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5", + "America/Toronto|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101012301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TR0 1in0 11Wu 1nzu 1fD0 WJ0 1wr0 Nb0 1Ap0 On0 1zd0 On0 1wp0 TX0 1tB0 TX0 1tB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 4kM0 8x40 iv0 1o10 11z0 1nX0 11z0 1o10 11z0 1o10 1qL0 11D0 1nX0 11B0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e5", + "America/Nassau|LMT EST EDT|59.u 50 40|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2kNuO.u 26XdO.u 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|24e4", + "America/New_York|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 11B0 1qL0 1a10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x40 iv0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6", + "America/Nipigon|EST EDT EWT EPT|50 40 40 40|010123010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TR0 1in0 Rnb0 3je0 8x40 iv0 19yN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|16e2", + "America/Nome|NST NWT NPT BST BDT YST AKST AKDT|b0 a0 a0 b0 a0 90 90 80|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17SX0 8wW0 iB0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cl0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|38e2", + "America/Noronha|LMT -02 -01|29.E 20 10|0121212121212121212121212121212121212121|-2glxO.k HdKO.k 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|30e2", + "America/North_Dakota/Beulah|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101014545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/North_Dakota/Center|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101014545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/North_Dakota/New_Salem|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101454545454545454545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Ojinaga|LMT MST CST CDT MDT|6V.E 70 60 50 60|0121212323241414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3", + "America/Pangnirtung|-00 AST AWT APT ADDT ADT EDT EST CST CDT|0 40 30 30 20 30 40 50 60 50|012314151515151515151515151515151515167676767689767676767676767676767676767676767676767676767676767676767676767676767676767|-1XiM0 PnG0 8x50 iu0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1o00 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2", + "America/Paramaribo|LMT PMT PMT -0330 -03|3E.E 3E.Q 3E.A 3u 30|01234|-2nDUj.k Wqo0.c qanX.I 1yVXN.o|24e4", + "America/Phoenix|MST MDT MWT|70 60 60|01010202010|-261r0 1nX0 11B0 1nX0 SgN0 4Al1 Ap0 1db0 SWqX 1cL0|42e5", + "America/Port-au-Prince|PPMT EST EDT|4N 50 40|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-28RHb 2FnMb 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14q0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 i6n0 1nX0 11B0 1nX0 d430 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5", + "America/Rio_Branco|LMT -05 -04|4v.c 50 40|01212121212121212121212121212121|-2glvs.M HdLs.M 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 NBd0 d5X0|31e4", + "America/Porto_Velho|LMT -04 -03|4f.A 40 30|012121212121212121212121212121|-2glvI.o HdKI.o 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0|37e4", + "America/Puerto_Rico|AST AWT APT|40 30 30|0120|-17lU0 7XT0 iu0|24e5", + "America/Punta_Arenas|SMT -05 -04 -03|4G.K 50 40 30|0102021212121212121232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-2q2jh.e fJAh.e 5knG.K 1Vzh.e jRAG.K 1pbh.e 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 blz0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0", + "America/Rainy_River|CST CDT CWT CPT|60 50 50 50|010123010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TQ0 1in0 Rnb0 3je0 8x30 iw0 19yN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|842", + "America/Rankin_Inlet|-00 CST CDDT CDT EST|0 60 40 50 50|012131313131313131313131313131313131313131313431313131313131313131313131313131313131313131313131313131313131313131313131|-vDc0 keu0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e2", + "America/Recife|LMT -03 -02|2j.A 30 20|0121212121212121212121212121212121212121|-2glxE.o HdLE.o 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|33e5", + "America/Regina|LMT MST MDT MWT MPT CST|6W.A 70 60 60 60 60|012121212121212121212121341212121212121212121212121215|-2AD51.o uHe1.o 1in0 s2L0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 66N0 1cL0 1cN0 19X0 1fB0 1cL0 1fB0 1cL0 1cN0 1cL0 M30 8x20 ix0 1ip0 1cL0 1ip0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 3NB0 1cL0 1cN0|19e4", + "America/Resolute|-00 CST CDDT CDT EST|0 60 40 50 50|012131313131313131313131313131313131313131313431313131313431313131313131313131313131313131313131313131313131313131313131|-SnA0 GWS0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|229", + "America/Santarem|LMT -04 -03|3C.M 40 30|0121212121212121212121212121212|-2glwl.c HdLl.c 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 NBd0|21e4", + "America/Santiago|SMT -05 -04 -03|4G.K 50 40 30|010202121212121212321232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-2q2jh.e fJAh.e 5knG.K 1Vzh.e jRAG.K 1pbh.e 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 9Bz0 jb0 1oN0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0|62e5", + "America/Santo_Domingo|SDMT EST EDT -0430 AST|4E 50 40 4u 40|01213131313131414|-1ttjk 1lJMk Mn0 6sp0 Lbu 1Cou yLu 1RAu wLu 1QMu xzu 1Q0u xXu 1PAu 13jB0 e00|29e5", + "America/Sao_Paulo|LMT -03 -02|36.s 30 20|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwR.w HdKR.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 pTd0 PX0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6", + "America/Scoresbysund|LMT -02 -01 +00|1r.Q 20 10 0|0121323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2a5Ww.8 2z5ew.8 1a00 1cK0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|452", + "America/Sitka|PST PWT PPT PDT YST AKST AKDT|80 70 70 70 90 90 80|01203030303030303030303030303030345656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|90e2", + "America/St_Johns|NST NDT NST NDT NWT NPT NDDT|3u.Q 2u.Q 3u 2u 2u 2u 1u|01010101010101010101010101010101010102323232323232324523232323232323232323232323232323232323232323232323232323232323232323232323232323232326232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-28oit.8 14L0 1nB0 1in0 1gm0 Dz0 1JB0 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 1cL0 1fB0 19X0 1fB0 19X0 10O0 eKX.8 19X0 1iq0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 WL0 1qN0 WL0 1qN0 7UHu itu 1tB0 WL0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1tB0 WL0 1ld0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4", + "America/Swift_Current|LMT MST MDT MWT MPT CST|7b.k 70 60 60 60 60|012134121212121212121215|-2AD4M.E uHdM.E 1in0 UGp0 8x20 ix0 1o10 17b0 1ip0 11z0 1o10 11z0 1o10 11z0 isN0 1cL0 3Cp0 1cL0 1cN0 11z0 1qN0 WL0 pMp0|16e3", + "America/Tegucigalpa|LMT CST CDT|5M.Q 60 50|01212121|-1WGGb.8 2ETcb.8 WL0 1qN0 WL0 GRd0 AL0|11e5", + "America/Thule|LMT AST ADT|4z.8 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a5To.Q 31NBo.Q 1cL0 1cN0 1cL0 1fB0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|656", + "America/Thunder_Bay|CST EST EWT EPT EDT|60 50 40 40 40|0123141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-2q5S0 1iaN0 8x40 iv0 XNB0 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4", + "America/Vancouver|PST PDT PWT PPT|80 70 70 70|0102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TO0 1in0 UGp0 8x10 iy0 1o10 17b0 1ip0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5", + "America/Whitehorse|YST YDT YWT YPT YDDT PST PDT|90 80 80 80 70 80 70|0101023040565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-25TN0 1in0 1o10 13V0 Ser0 8x00 iz0 LCL0 1fA0 3NA0 vrd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3", + "America/Winnipeg|CST CDT CWT CPT|60 50 50 50|010101023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aIi0 WL0 3ND0 1in0 Jap0 Rb0 aCN0 8x30 iw0 1tB0 11z0 1ip0 11z0 1o10 11z0 1o10 11z0 1rd0 10L0 1op0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 1cL0 1cN0 11z0 6i10 WL0 6i10 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|66e4", + "America/Yakutat|YST YWT YPT YDT AKST AKDT|90 80 80 80 90 80|01203030303030303030303030303030304545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-17T10 8x00 iz0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cn0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|642", + "America/Yellowknife|-00 MST MWT MPT MDDT MDT|0 70 60 60 50 60|012314151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151|-1pdA0 hix0 8x20 ix0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3", + "Antarctica/Casey|-00 +08 +11|0 -80 -b0|01212121|-2q00 1DjS0 T90 40P0 KL0 blz0 3m10|10", + "Antarctica/Davis|-00 +07 +05|0 -70 -50|01012121|-vyo0 iXt0 alj0 1D7v0 VB0 3Wn0 KN0|70", + "Antarctica/DumontDUrville|-00 +10|0 -a0|0101|-U0o0 cfq0 bFm0|80", + "Antarctica/Macquarie|AEST AEDT -00 +11|-a0 -b0 0 -b0|0102010101010101010101010101010101010101010101010101010101010101010101010101010101010101013|-29E80 19X0 4SL0 1ayy0 Lvs0 1cM0 1o00 Rc0 1wo0 Rc0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0|1", + "Antarctica/Mawson|-00 +06 +05|0 -60 -50|012|-CEo0 2fyk0|60", + "Pacific/Auckland|NZMT NZST NZST NZDT|-bu -cu -c0 -d0|01020202020202020202020202023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1GCVu Lz0 1tB0 11zu 1o0u 11zu 1o0u 11zu 1o0u 14nu 1lcu 14nu 1lcu 1lbu 11Au 1nXu 11Au 1nXu 11Au 1nXu 11Au 1nXu 11Au 1qLu WMu 1qLu 11Au 1n1bu IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|14e5", + "Antarctica/Palmer|-00 -03 -04 -02|0 30 40 20|0121212121213121212121212121212121212121212121212121212121212121212121212121212121|-cao0 nD0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 jsN0 14N0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40", + "Antarctica/Rothera|-00 -03|0 30|01|gOo0|130", + "Antarctica/Syowa|-00 +03|0 -30|01|-vs00|20", + "Antarctica/Troll|-00 +00 +02|0 0 -20|01212121212121212121212121212121212121212121212121212121212121212121|1puo0 hd0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|40", + "Antarctica/Vostok|-00 +06|0 -60|01|-tjA0|25", + "Europe/Oslo|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2awM0 Qm0 W6o0 5pf0 WM0 1fA0 1cM0 1cM0 1cM0 1cM0 wJc0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1qM0 WM0 zpc0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|62e4", + "Asia/Riyadh|LMT +03|-36.Q -30|01|-TvD6.Q|57e5", + "Asia/Almaty|LMT +05 +06 +07|-57.M -50 -60 -70|012323232323232323232321232323232323232323232323232|-1Pc57.M eUo7.M 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|15e5", + "Asia/Amman|LMT EET EEST|-2n.I -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1yW2n.I 1HiMn.I KL0 1oN0 11b0 1oN0 11b0 1pd0 1dz0 1cp0 11b0 1op0 11b0 fO10 1db0 1e10 1cL0 1cN0 1cL0 1cN0 1fz0 1pd0 10n0 1ld0 14n0 1hB0 15b0 1ip0 19X0 1cN0 1cL0 1cN0 17b0 1ld0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1So0 y00 1fc0 1dc0 1co0 1dc0 1cM0 1cM0 1cM0 1o00 11A0 1lc0 17c0 1cM0 1cM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|25e5", + "Asia/Anadyr|LMT +12 +13 +14 +11|-bN.U -c0 -d0 -e0 -b0|01232121212121212121214121212121212121212121212121212121212141|-1PcbN.U eUnN.U 23CL0 1db0 2q10 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|13e3", + "Asia/Aqtau|LMT +04 +05 +06|-3l.4 -40 -50 -60|012323232323232323232123232312121212121212121212|-1Pc3l.4 eUnl.4 24PX0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|15e4", + "Asia/Aqtobe|LMT +04 +05 +06|-3M.E -40 -50 -60|0123232323232323232321232323232323232323232323232|-1Pc3M.E eUnM.E 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|27e4", + "Asia/Ashgabat|LMT +04 +05 +06|-3R.w -40 -50 -60|0123232323232323232323212|-1Pc3R.w eUnR.w 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0|41e4", + "Asia/Atyrau|LMT +03 +05 +06 +04|-3r.I -30 -50 -60 -40|01232323232323232323242323232323232324242424242|-1Pc3r.I eUor.I 24PW0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 2sp0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0", + "Asia/Baghdad|BMT +03 +04|-2V.A -30 -40|012121212121212121212121212121212121212121212121212121|-26BeV.A 2ACnV.A 11b0 1cp0 1dz0 1dd0 1db0 1cN0 1cp0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1de0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0|66e5", + "Asia/Qatar|LMT +04 +03|-3q.8 -40 -30|012|-21Jfq.8 27BXq.8|96e4", + "Asia/Baku|LMT +03 +04 +05|-3j.o -30 -40 -50|01232323232323232323232123232323232323232323232323232323232323232|-1Pc3j.o 1jUoj.o WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 9Je0 1o00 11z0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5", + "Asia/Bangkok|BMT +07|-6G.4 -70|01|-218SG.4|15e6", + "Asia/Barnaul|LMT +06 +07 +08|-5z -60 -70 -80|0123232323232323232323212323232321212121212121212121212121212121212|-21S5z pCnz 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 p90 LE0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0", + "Asia/Beirut|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-21aq0 1on0 1410 1db0 19B0 1in0 1ip0 WL0 1lQp0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 q6N0 En0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1op0 11b0 dA10 17b0 1iN0 17b0 1iN0 17b0 1iN0 17b0 1vB0 SL0 1mp0 13z0 1iN0 17b0 1iN0 17b0 1jd0 12n0 1a10 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0|22e5", + "Asia/Bishkek|LMT +05 +06 +07|-4W.o -50 -60 -70|012323232323232323232321212121212121212121212121212|-1Pc4W.o eUnW.o 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2e00 1tX0 17b0 1ip0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1cPu 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0|87e4", + "Asia/Brunei|LMT +0730 +08|-7D.E -7u -80|012|-1KITD.E gDc9.E|42e4", + "Asia/Kolkata|MMT IST +0630|-5l.a -5u -6u|012121|-2zOtl.a 1r2LP.a 1un0 HB0 7zX0|15e6", + "Asia/Chita|LMT +08 +09 +10|-7x.Q -80 -90 -a0|012323232323232323232321232323232323232323232323232323232323232312|-21Q7x.Q pAnx.Q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3re0|33e4", + "Asia/Choibalsan|LMT +07 +08 +10 +09|-7C -70 -80 -a0 -90|0123434343434343434343434343434343434343434343424242|-2APHC 2UkoC cKn0 1da0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 3Db0 h1f0 1cJ0 1cP0 1cJ0|38e3", + "Asia/Shanghai|CST CDT|-80 -90|010101010101010101010101010|-1c2w0 Rz0 11d0 1wL0 A10 8HX0 1G10 Tz0 1ip0 1jX0 1cN0 11b0 1oN0 aL0 1tU30 Rb0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0|23e6", + "Asia/Colombo|MMT +0530 +06 +0630|-5j.w -5u -60 -6u|01231321|-2zOtj.w 1rFbN.w 1zzu 7Apu 23dz0 11zu n3cu|22e5", + "Asia/Dhaka|HMT +0630 +0530 +06 +07|-5R.k -6u -5u -60 -70|0121343|-18LFR.k 1unn.k HB0 m6n0 2kxbu 1i00|16e6", + "Asia/Damascus|LMT EET EEST|-2p.c -20 -30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-21Jep.c Hep.c 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1xRB0 11X0 1oN0 10L0 1pB0 11b0 1oN0 10L0 1mp0 13X0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 Nb0 1AN0 Nb0 bcp0 19X0 1gp0 19X0 3ld0 1xX0 Vd0 1Bz0 Sp0 1vX0 10p0 1dz0 1cN0 1cL0 1db0 1db0 1g10 1an0 1ap0 1db0 1fd0 1db0 1cN0 1db0 1dd0 1db0 1cp0 1dz0 1c10 1dX0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 19z0 1fB0 1qL0 11B0 1on0 Wp0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0|26e5", + "Asia/Dili|LMT +08 +09|-8m.k -80 -90|01212|-2le8m.k 1dnXm.k 1nfA0 Xld0|19e4", + "Asia/Dubai|LMT +04|-3F.c -40|01|-21JfF.c|39e5", + "Asia/Dushanbe|LMT +05 +06 +07|-4z.c -50 -60 -70|012323232323232323232321|-1Pc4z.c eUnz.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2hB0|76e4", + "Asia/Famagusta|LMT EET EEST +03|-2f.M -20 -30 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212312121212121212121212121212121212121212121|-1Vc2f.M 2a3cf.M 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", + "Asia/Gaza|EET EEST IST IDT|-20 -30 -20 -30|0101010101010101010101010101010123232323232323232323232323232320101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1c2q0 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 pBd0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 dW0 hfB0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 11z0 1o10 14o0 1lA1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0|18e5", + "Asia/Hebron|EET EEST IST IDT|-20 -30 -20 -30|010101010101010101010101010101012323232323232323232323232323232010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1c2q0 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 pBd0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 dW0 hfB0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 12L0 1mN0 14o0 1lc0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0|25e4", + "Asia/Ho_Chi_Minh|LMT PLMT +07 +08 +09|-76.E -76.u -70 -80 -90|0123423232|-2yC76.E bK00.a 1h7b6.u 5lz0 18o0 3Oq0 k5b0 aW00 BAM0|90e5", + "Asia/Hong_Kong|LMT HKT HKST HKT JST|-7A.G -80 -90 -8u -90|0123412121212121212121212121212121212121212121212121212121212121212121|-2CFH0 1taO0 Hc0 xUu 9tBu 11z0 1tDu Rc0 1wo0 11A0 1cM0 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1nX0 U10 1tz0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 Rd0 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 17d0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|73e5", + "Asia/Hovd|LMT +06 +07 +08|-66.A -60 -70 -80|012323232323232323232323232323232323232323232323232|-2APG6.A 2Uko6.A cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|81e3", + "Asia/Irkutsk|IMT +07 +08 +09|-6V.5 -70 -80 -90|01232323232323232323232123232323232323232323232323232323232323232|-21zGV.5 pjXV.5 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4", + "Europe/Istanbul|IMT EET EEST +04 +03|-1U.U -20 -30 -40 -30|012121212121212121212121212121212121212121212121212121234343434342121212121212121212121212121212121212121212121212121212121212124|-2ogNU.U dzzU.U 11b0 8tB0 1on0 1410 1db0 19B0 1in0 3Rd0 Un0 1oN0 11b0 zSp0 CL0 mN0 1Vz0 1gN0 1pz0 5Rd0 1fz0 1yp0 ML0 1kp0 17b0 1ip0 17b0 1fB0 19X0 1jB0 18L0 1ip0 17z0 qdd0 xX0 3S10 Tz0 dA10 11z0 1o10 11z0 1qN0 11z0 1ze0 11B0 WM0 1qO0 WI0 1nX0 1rB0 10L0 11B0 1in0 17d0 1in0 2pX0 19E0 1fU0 16Q0 1iI0 16Q0 1iI0 1Vd0 pb0 3Kp0 14o0 1de0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1a00 1fA0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WO0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6", + "Asia/Jakarta|BMT +0720 +0730 +09 +08 WIB|-77.c -7k -7u -90 -80 -70|01232425|-1Q0Tk luM0 mPzO 8vWu 6kpu 4PXu xhcu|31e6", + "Asia/Jayapura|LMT +09 +0930 WIT|-9m.M -90 -9u -90|0123|-1uu9m.M sMMm.M L4nu|26e4", + "Asia/Jerusalem|JMT IST IDT IDDT|-2k.E -20 -30 -40|012121212121321212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-26Bek.E SyMk.E 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 3LB0 Em0 or0 1cn0 1dB0 16n0 10O0 1ja0 1tC0 14o0 1cM0 1a00 11A0 1Na0 An0 1MP0 AJ0 1Kp0 LC0 1oo0 Wl0 EQN0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 1hB0 1dX0 1ep0 1aL0 1eN0 17X0 1nf0 11z0 1tB0 19W0 1e10 17b0 1ep0 1gL0 18N0 1fz0 1eN0 17b0 1gq0 1gn0 19d0 1dz0 1c10 17X0 1hB0 1gn0 19d0 1dz0 1c10 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0|81e4", + "Asia/Kabul|+04 +0430|-40 -4u|01|-10Qs0|46e5", + "Asia/Kamchatka|LMT +11 +12 +13|-ay.A -b0 -c0 -d0|012323232323232323232321232323232323232323232323232323232323212|-1SLKy.A ivXy.A 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|18e4", + "Asia/Karachi|LMT +0530 +0630 +05 PKT PKST|-4s.c -5u -6u -50 -50 -60|012134545454|-2xoss.c 1qOKW.c 7zX0 eup0 LqMu 1fy00 1cL0 dK10 11b0 1610 1jX0|24e6", + "Asia/Urumqi|LMT +06|-5O.k -60|01|-1GgtO.k|32e5", + "Asia/Kathmandu|LMT +0530 +0545|-5F.g -5u -5J|012|-21JhF.g 2EGMb.g|12e5", + "Asia/Khandyga|LMT +08 +09 +10 +11|-92.d -80 -90 -a0 -b0|0123232323232323232323212323232323232323232323232343434343434343432|-21Q92.d pAp2.d 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 qK0 yN0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|66e2", + "Asia/Krasnoyarsk|LMT +06 +07 +08|-6b.q -60 -70 -80|01232323232323232323232123232323232323232323232323232323232323232|-21Hib.q prAb.q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|10e5", + "Asia/Kuala_Lumpur|SMT +07 +0720 +0730 +09 +08|-6T.p -70 -7k -7u -90 -80|0123435|-2Bg6T.p 17anT.p l5XE 17bO 8Fyu 1so1u|71e5", + "Asia/Kuching|LMT +0730 +08 +0820 +09|-7l.k -7u -80 -8k -90|0123232323232323242|-1KITl.k gDbP.k 6ynu AnE 1O0k AnE 1NAk AnE 1NAk AnE 1NAk AnE 1O0k AnE 1NAk AnE pAk 8Fz0|13e4", + "Asia/Macau|LMT CST +09 +10 CDT|-7y.a -80 -90 -a0 -90|012323214141414141414141414141414141414141414141414141414141414141414141|-2CFHy.a 1uqKy.a PX0 1kn0 15B0 11b0 4Qq0 1oM0 11c0 1ko0 1u00 11A0 1cM0 11c0 1o00 11A0 1o00 11A0 1oo0 1400 1o00 11A0 1o00 U00 1tA0 U00 1wo0 Rc0 1wru U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 Rd0 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 17d0 1cK0 1cO0 1cK0 1cO0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|57e4", + "Asia/Magadan|LMT +10 +11 +12|-a3.c -a0 -b0 -c0|012323232323232323232321232323232323232323232323232323232323232312|-1Pca3.c eUo3.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Cq0|95e3", + "Asia/Makassar|LMT MMT +08 +09 WITA|-7V.A -7V.A -80 -90 -80|01234|-21JjV.A vfc0 myLV.A 8ML0|15e5", + "Asia/Manila|PST PDT JST|-80 -90 -90|010201010|-1kJI0 AL0 cK10 65X0 mXB0 vX0 VK10 1db0|24e6", + "Asia/Nicosia|LMT EET EEST|-2d.s -20 -30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1Vc2d.s 2a3cd.s 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|32e4", + "Asia/Novokuznetsk|LMT +06 +07 +08|-5M.M -60 -70 -80|012323232323232323232321232323232323232323232323232323232323212|-1PctM.M eULM.M 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|55e4", + "Asia/Novosibirsk|LMT +06 +07 +08|-5v.E -60 -70 -80|0123232323232323232323212323212121212121212121212121212121212121212|-21Qnv.E pAFv.E 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 ml0 Os0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 4eN0|15e5", + "Asia/Omsk|LMT +05 +06 +07|-4R.u -50 -60 -70|01232323232323232323232123232323232323232323232323232323232323232|-224sR.u pMLR.u 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|12e5", + "Asia/Oral|LMT +03 +05 +06 +04|-3p.o -30 -50 -60 -40|01232323232323232424242424242424242424242424242|-1Pc3p.o eUop.o 23CK0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 1cM0 IM0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|27e4", + "Asia/Pontianak|LMT PMT +0730 +09 +08 WITA WIB|-7h.k -7h.k -7u -90 -80 -80 -70|012324256|-2ua7h.k XE00 munL.k 8Rau 6kpu 4PXu xhcu Wqnu|23e4", + "Asia/Pyongyang|LMT KST JST KST|-8n -8u -90 -90|012313|-2um8n 97XR 1lTzu 2Onc0 6BA0|29e5", + "Asia/Qostanay|LMT +04 +05 +06|-4e.s -40 -50 -60|012323232323232323232123232323232323232323232323|-1Pc4e.s eUoe.s 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0", + "Asia/Qyzylorda|LMT +04 +05 +06|-4l.Q -40 -50 -60|01232323232323232323232323232323232323232323232|-1Pc4l.Q eUol.Q 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 3ao0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 zQl0|73e4", + "Asia/Rangoon|RMT +0630 +09|-6o.L -6u -90|0121|-21Jio.L SmnS.L 7j9u|48e5", + "Asia/Sakhalin|LMT +09 +11 +12 +10|-9u.M -90 -b0 -c0 -a0|01232323232323232323232423232323232424242424242424242424242424242|-2AGVu.M 1BoMu.M 1qFa0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 2pB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|58e4", + "Asia/Samarkand|LMT +04 +05 +06|-4r.R -40 -50 -60|01232323232323232323232|-1Pc4r.R eUor.R 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|36e4", + "Asia/Seoul|LMT KST JST KST KDT KDT|-8r.Q -8u -90 -90 -9u -a0|0123141414141414135353|-2um8r.Q 97XV.Q 1m1zu kKo0 2I0u OL0 1FB0 Rb0 1qN0 TX0 1tB0 TX0 1tB0 TX0 1tB0 TX0 2ap0 12FBu 11A0 1o00 11A0|23e6", + "Asia/Srednekolymsk|LMT +10 +11 +12|-ae.Q -a0 -b0 -c0|01232323232323232323232123232323232323232323232323232323232323232|-1Pcae.Q eUoe.Q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|35e2", + "Asia/Taipei|CST JST CDT|-80 -90 -90|01020202020202020202020202020202020202020|-1iw80 joM0 1yo0 Tz0 1ip0 1jX0 1cN0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 10N0 1BX0 10p0 1pz0 10p0 1pz0 10p0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1BB0 ML0 1Bd0 ML0 uq10 1db0 1cN0 1db0 97B0 AL0|74e5", + "Asia/Tashkent|LMT +05 +06 +07|-4B.b -50 -60 -70|012323232323232323232321|-1Pc4B.b eUnB.b 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0|23e5", + "Asia/Tbilisi|TBMT +03 +04 +05|-2X.b -30 -40 -50|0123232323232323232323212121232323232323232323212|-1Pc2X.b 1jUnX.b WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cK0 1cL0 1cN0 1cL0 1cN0 2pz0 1cL0 1fB0 3Nz0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 An0 Os0 WM0|11e5", + "Asia/Tehran|LMT TMT +0330 +04 +05 +0430|-3p.I -3p.I -3u -40 -50 -4u|01234325252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-2btDp.I 1d3c0 1huLT.I TXu 1pz0 sN0 vAu 1cL0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0|14e6", + "Asia/Thimphu|LMT +0530 +06|-5W.A -5u -60|012|-Su5W.A 1BGMs.A|79e3", + "Asia/Tokyo|JST JDT|-90 -a0|010101010|-QJJ0 Rb0 1ld0 14n0 1zd0 On0 1zd0 On0|38e6", + "Asia/Tomsk|LMT +06 +07 +08|-5D.P -60 -70 -80|0123232323232323232323212323232323232323232323212121212121212121212|-21NhD.P pxzD.P 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 co0 1bB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Qp0|10e5", + "Asia/Ulaanbaatar|LMT +07 +08 +09|-77.w -70 -80 -90|012323232323232323232323232323232323232323232323232|-2APH7.w 2Uko7.w cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|12e5", + "Asia/Ust-Nera|LMT +08 +09 +12 +11 +10|-9w.S -80 -90 -c0 -b0 -a0|012343434343434343434345434343434343434343434343434343434343434345|-21Q9w.S pApw.S 23CL0 1d90 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|65e2", + "Asia/Vladivostok|LMT +09 +10 +11|-8L.v -90 -a0 -b0|01232323232323232323232123232323232323232323232323232323232323232|-1SJIL.v itXL.v 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4", + "Asia/Yakutsk|LMT +08 +09 +10|-8C.W -80 -90 -a0|01232323232323232323232123232323232323232323232323232323232323232|-21Q8C.W pAoC.W 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|28e4", + "Asia/Yekaterinburg|LMT PMT +04 +05 +06|-42.x -3J.5 -40 -50 -60|012343434343434343434343234343434343434343434343434343434343434343|-2ag42.x 7mQh.s qBvJ.5 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|14e5", + "Asia/Yerevan|LMT +03 +04 +05|-2W -30 -40 -50|0123232323232323232323212121212323232323232323232323232323232|-1Pc2W 1jUnW WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 4RX0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|13e5", + "Atlantic/Azores|HMT -02 -01 +00 WET|1S.w 20 10 0 0|01212121212121212121212121212121212121212121232123212321232121212121212121212121212121212121212121232323232323232323232323232323234323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2ldW0 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 qIl0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|25e4", + "Atlantic/Bermuda|LMT AST ADT|4j.i 40 30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1BnRE.G 1LTbE.G 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e3", + "Atlantic/Canary|LMT -01 WET WEST|11.A 10 0 -10|01232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UtaW.o XPAW.o 1lAK0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4", + "Atlantic/Cape_Verde|LMT -02 -01|1y.4 20 10|01212|-2ldW0 1eEo0 7zX0 1djf0|50e4", + "Atlantic/Faroe|LMT WET WEST|r.4 0 -10|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2uSnw.U 2Wgow.U 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|49e3", + "Atlantic/Madeira|FMT -01 +00 +01 WET WEST|17.A 10 0 -10 0 -10|01212121212121212121212121212121212121212121232123212321232121212121212121212121212121212121212121454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2ldX0 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 qIl0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e4", + "Atlantic/Reykjavik|LMT -01 +00 GMT|1s 10 0 0|012121212121212121212121212121212121212121212121212121212121212121213|-2uWmw mfaw 1Bd0 ML0 1LB0 Cn0 1LB0 3fX0 C10 HrX0 1cO0 LB0 1EL0 LA0 1C00 Oo0 1wo0 Rc0 1wo0 Rc0 1wo0 Rc0 1zc0 Oo0 1zc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0|12e4", + "Atlantic/South_Georgia|-02|20|0||30", + "Atlantic/Stanley|SMT -04 -03 -02|3P.o 40 30 20|012121212121212323212121212121212121212121212121212121212121212121212|-2kJw8.A 12bA8.A 19X0 1fB0 19X0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 Cn0 1Cc10 WL0 1qL0 U10 1tz0 2mN0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 U10 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qN0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 U10 1tz0 U10 1tz0 U10|21e2", + "Australia/Sydney|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|40e5", + "Australia/Adelaide|ACST ACDT|-9u -au|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 WM0 1qM0 Rc0 1zc0 U00 1tA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|11e5", + "Australia/Brisbane|AEST AEDT|-a0 -b0|01010101010101010|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0|20e5", + "Australia/Broken_Hill|ACST ACDT|-9u -au|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|18e3", + "Australia/Currie|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-29E80 19X0 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|746", + "Australia/Darwin|ACST ACDT|-9u -au|010101010|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0|12e4", + "Australia/Eucla|+0845 +0945|-8J -9J|0101010101010101010|-293kI xcX 10jd0 yL0 1cN0 1cL0 1gSp0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|368", + "Australia/Hobart|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-29E80 19X0 10jd0 yL0 1cN0 1cL0 1fB0 19X0 VfB0 1cM0 1o00 Rc0 1wo0 Rc0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|21e4", + "Australia/Lord_Howe|AEST +1030 +1130 +11|-a0 -au -bu -b0|0121212121313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313|raC0 1zdu Rb0 1zd0 On0 1zd0 On0 1zd0 On0 1zd0 TXu 1qMu WLu 1tAu WLu 1tAu TXu 1tAu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 11Au 1nXu 1qMu 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu 11zu 1o0u WLu 1qMu 14nu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu|347", + "Australia/Lindeman|AEST AEDT|-a0 -b0|010101010101010101010|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0|10", + "Australia/Melbourne|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1qM0 11A0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|39e5", + "Australia/Perth|AWST AWDT|-80 -90|0101010101010101010|-293jX xcX 10jd0 yL0 1cN0 1cL0 1gSp0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|18e5", + "CET|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", + "Pacific/Easter|EMT -07 -06 -05|7h.s 70 60 50|012121212121212121212121212123232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1uSgG.w 1s4IG.w WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 2pA0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0|30e2", + "CST6CDT|CST CDT CWT CPT|60 50 50 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "EET|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", + "Europe/Dublin|DMT IST GMT BST IST|p.l -y.D 0 -10 -10|01232323232324242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242|-2ax9y.D Rc0 1fzy.D 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 g600 14o0 1wo0 17c0 1io0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1a00 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1tA0 IM0 90o0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5", + "EST|EST|50|0|", + "EST5EDT|EST EDT EWT EPT|50 40 40 40|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 SgN0 8x40 iv0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "Etc/GMT-0|GMT|0|0|", + "Etc/GMT-1|+01|-10|0|", + "Pacific/Port_Moresby|+10|-a0|0||25e4", + "Etc/GMT-11|+11|-b0|0|", + "Pacific/Tarawa|+12|-c0|0||29e3", + "Etc/GMT-13|+13|-d0|0|", + "Etc/GMT-14|+14|-e0|0|", + "Etc/GMT-2|+02|-20|0|", + "Etc/GMT-3|+03|-30|0|", + "Etc/GMT-4|+04|-40|0|", + "Etc/GMT-5|+05|-50|0|", + "Etc/GMT-6|+06|-60|0|", + "Indian/Christmas|+07|-70|0||21e2", + "Etc/GMT-8|+08|-80|0|", + "Pacific/Palau|+09|-90|0||21e3", + "Etc/GMT+1|-01|10|0|", + "Etc/GMT+10|-10|a0|0|", + "Etc/GMT+11|-11|b0|0|", + "Etc/GMT+12|-12|c0|0|", + "Etc/GMT+3|-03|30|0|", + "Etc/GMT+4|-04|40|0|", + "Etc/GMT+5|-05|50|0|", + "Etc/GMT+6|-06|60|0|", + "Etc/GMT+7|-07|70|0|", + "Etc/GMT+8|-08|80|0|", + "Etc/GMT+9|-09|90|0|", + "Etc/UTC|UTC|0|0|", + "Europe/Amsterdam|AMT NST +0120 +0020 CEST CET|-j.w -1j.w -1k -k -20 -10|010101010101010101010101010101010101010101012323234545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545|-2aFcj.w 11b0 1iP0 11A0 1io0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1co0 1io0 1yo0 Pc0 1a00 1fA0 1Bc0 Mo0 1tc0 Uo0 1tA0 U00 1uo0 W00 1s00 VA0 1so0 Vc0 1sM0 UM0 1wo0 Rc0 1u00 Wo0 1rA0 W00 1s00 VA0 1sM0 UM0 1w00 fV0 BCX.w 1tA0 U00 1u00 Wo0 1sm0 601k WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|16e5", + "Europe/Andorra|WET CET CEST|0 -10 -20|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-UBA0 1xIN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|79e3", + "Europe/Astrakhan|LMT +03 +04 +05|-3c.c -30 -40 -50|012323232323232323212121212121212121212121212121212121212121212|-1Pcrc.c eUMc.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|10e5", + "Europe/Athens|AMT EET EEST CEST CET|-1y.Q -20 -30 -20 -10|012123434121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a61x.Q CNbx.Q mn0 kU10 9b0 3Es0 Xa0 1fb0 1dd0 k3X0 Nz0 SCp0 1vc0 SO0 1cM0 1a00 1ao0 1fc0 1a10 1fG0 1cg0 1dX0 1bX0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|35e5", + "Europe/London|GMT BST BDST|0 -10 -20|0101010101010101010101010101010101010101010101010121212121210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2axa0 Rc0 1fA0 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 2Rz0 Dc0 1zc0 Oo0 1zc0 Rc0 1wo0 17c0 1iM0 FA0 xB0 1fA0 1a00 14o0 bb0 LA0 xB0 Rc0 1wo0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1a00 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1tA0 IM0 90o0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|10e6", + "Europe/Belgrade|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-19RC0 3IP0 WM0 1fA0 1cM0 1cM0 1rc0 Qo0 1vmo0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5", + "Europe/Berlin|CET CEST CEMT|-10 -20 -30|01010101010101210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 kL0 Nc0 m10 WM0 1ao0 1cp0 dX0 jz0 Dd0 1io0 17c0 1fA0 1a00 1ehA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|41e5", + "Europe/Prague|CET CEST GMT|-10 -20 0|01010101010101010201010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 1cM0 1qM0 11c0 mp0 xA0 mn0 17c0 1io0 17c0 1fc0 1ao0 1bNc0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|13e5", + "Europe/Brussels|WET CET CEST WEST|0 -10 -20 -10|0121212103030303030303030303030303030303030303030303212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ehc0 3zX0 11c0 1iO0 11A0 1o00 11A0 my0 Ic0 1qM0 Rc0 1EM0 UM0 1u00 10o0 1io0 1io0 17c0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a30 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 y00 5Wn0 WM0 1fA0 1cM0 16M0 1iM0 16M0 1C00 Uo0 1eeo0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|21e5", + "Europe/Bucharest|BMT EET EEST|-1I.o -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1xApI.o 20LI.o RA0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Axc0 On0 1fA0 1a10 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|19e5", + "Europe/Budapest|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1ip0 17b0 1op0 1tb0 Q2m0 3Ne0 WM0 1fA0 1cM0 1cM0 1oJ0 1dc0 1030 1fA0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1iM0 1fA0 8Ha0 Rb0 1wN0 Rb0 1BB0 Lz0 1C20 LB0 SNX0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e5", + "Europe/Zurich|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-19Lc0 11A0 1o00 11A0 1xG10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|38e4", + "Europe/Chisinau|CMT BMT EET EEST CEST CET MSK MSD|-1T -1I.o -20 -30 -20 -10 -30 -40|012323232323232323234545467676767676767676767323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-26jdT wGMa.A 20LI.o RA0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 27A0 2en0 39g0 WM0 1fA0 1cM0 V90 1t7z0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 gL0 WO0 1cM0 1cM0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11D0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|67e4", + "Europe/Copenhagen|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2azC0 Tz0 VuO0 60q0 WM0 1fA0 1cM0 1cM0 1cM0 S00 1HA0 Nc0 1C00 Dc0 1Nc0 Ao0 1h5A0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5", + "Europe/Gibraltar|GMT BST BDST CET CEST|0 -10 -20 -10 -20|010101010101010101010101010101010101010101010101012121212121010121010101010101010101034343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-2axa0 Rc0 1fA0 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 2Rz0 Dc0 1zc0 Oo0 1zc0 Rc0 1wo0 17c0 1iM0 FA0 xB0 1fA0 1a00 14o0 bb0 LA0 xB0 Rc0 1wo0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 10Jz0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|30e3", + "Europe/Helsinki|HMT EET EEST|-1D.N -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1WuND.N OULD.N 1dA0 1xGq0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5", + "Europe/Kaliningrad|CET CEST CET CEST MSK MSD EEST EET +03|-10 -20 -20 -30 -30 -40 -30 -20 -30|0101010101010232454545454545454546767676767676767676767676767676767676767676787|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 Am0 Lb0 1en0 op0 1pNz0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|44e4", + "Europe/Kiev|KMT EET MSK CEST CET MSD EEST|-22.4 -20 -30 -20 -10 -40 -30|0123434252525252525252525256161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161|-1Pc22.4 eUo2.4 rnz0 2Hg0 WM0 1fA0 da0 1v4m0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 Db0 3220 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|34e5", + "Europe/Kirov|LMT +03 +04 +05|-3i.M -30 -40 -50|01232323232323232321212121212121212121212121212121212121212121|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|48e4", + "Europe/Lisbon|LMT WET WEST WEMT CET CEST|A.J 0 -10 -20 -10 -20|012121212121212121212121212121212121212121212321232123212321212121212121212121212121212121212121214121212121212121212121212121212124545454212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2le00 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 pvy0 1cM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e5", + "Europe/Luxembourg|LMT CET CEST WET WEST WEST WET|-o.A -10 -20 0 -10 -20 -10|0121212134343434343434343434343434343434343434343434565651212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2DG0o.A t6mo.A TB0 1nX0 Up0 1o20 11A0 rW0 CM0 1qP0 R90 1EO0 UK0 1u20 10m0 1ip0 1in0 17e0 19W0 1fB0 1db0 1cp0 1in0 17d0 1fz0 1a10 1in0 1a10 1in0 17f0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 vA0 60L0 WM0 1fA0 1cM0 17c0 1io0 16M0 1C00 Uo0 1eeo0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4", + "Europe/Madrid|WET WEST WEMT CET CEST|0 -10 -20 -10 -20|010101010101010101210343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-25Td0 19B0 1cL0 1dd0 b1z0 18p0 3HX0 17d0 1fz0 1a10 1io0 1a00 1in0 17d0 iIn0 Hd0 1cL0 bb0 1200 2s20 14n0 5aL0 Mp0 1vz0 17d0 1in0 17d0 1in0 17d0 1in0 17d0 6hX0 11B0 XHX0 1a10 1fz0 1a10 19X0 1cN0 1fz0 1a10 1fC0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|62e5", + "Europe/Malta|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2arB0 Lz0 1cN0 1db0 1410 1on0 Wp0 1qL0 17d0 1cL0 M3B0 5M20 WM0 1fA0 1co0 17c0 1iM0 16m0 1de0 1lc0 14m0 1lc0 WO0 1qM0 GTW0 On0 1C10 LA0 1C00 LA0 1EM0 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1co0 1cM0 1lA0 Xc0 1qq0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1iN0 19z0 1fB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|42e4", + "Europe/Minsk|MMT EET MSK CEST CET MSD EEST +03|-1O -20 -30 -20 -10 -40 -30 -30|01234343252525252525252525261616161616161616161616161616161616161617|-1Pc1O eUnO qNX0 3gQ0 WM0 1fA0 1cM0 Al0 1tsn0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 3Fc0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0|19e5", + "Europe/Monaco|PMT WET WEST WEMT CET CEST|-9.l 0 -10 -20 -10 -20|01212121212121212121212121212121212121212121212121232323232345454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 1u00 10o0 1io0 1wo0 Rc0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Df0 2RV0 11z0 11B0 1ze0 WM0 1fA0 1cM0 1fa0 1aq0 16M0 1ekn0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|38e3", + "Europe/Moscow|MMT MMT MST MDST MSD MSK +05 EET EEST MSK|-2u.h -2v.j -3v.j -4v.j -40 -30 -50 -20 -30 -40|012132345464575454545454545454545458754545454545454545454545454545454545454595|-2ag2u.h 2pyW.W 1bA0 11X0 GN0 1Hb0 c4v.j ik0 3DA0 dz0 15A0 c10 2q10 iM10 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|16e6", + "Europe/Paris|PMT WET WEST CEST CET WEMT|-9.l 0 -10 -20 -10 -20|0121212121212121212121212121212121212121212121212123434352543434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434|-2nco8.l cNb8.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 1u00 10o0 1io0 1wo0 Rc0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Df0 Ik0 5M30 WM0 1fA0 1cM0 Vx0 hB0 1aq0 16M0 1ekn0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e6", + "Europe/Riga|RMT LST EET MSK CEST CET MSD EEST|-1A.y -2A.y -20 -30 -20 -10 -40 -30|010102345454536363636363636363727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272|-25TzA.y 11A0 1iM0 ko0 gWm0 yDXA.y 2bX0 3fE0 WM0 1fA0 1cM0 1cM0 4m0 1sLy0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 1o00 11A0 1o00 11A0 1qM0 3oo0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|64e4", + "Europe/Rome|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2arB0 Lz0 1cN0 1db0 1410 1on0 Wp0 1qL0 17d0 1cL0 M3B0 5M20 WM0 1fA0 1cM0 16M0 1iM0 16m0 1de0 1lc0 14m0 1lc0 WO0 1qM0 GTW0 On0 1C10 LA0 1C00 LA0 1EM0 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1C00 LA0 1zc0 Oo0 1C00 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1zc0 Oo0 1fC0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|39e5", + "Europe/Samara|LMT +03 +04 +05|-3k.k -30 -40 -50|0123232323232323232121232323232323232323232323232323232323212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2y10 14m0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|12e5", + "Europe/Saratov|LMT +03 +04 +05|-34.i -30 -40 -50|012323232323232321212121212121212121212121212121212121212121212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 5810", + "Europe/Simferopol|SMT EET MSK CEST CET MSD EEST MSK|-2g -20 -30 -20 -10 -40 -30 -40|012343432525252525252525252161616525252616161616161616161616161616161616172|-1Pc2g eUog rEn0 2qs0 WM0 1fA0 1cM0 3V0 1u0L0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 4eL0 1cL0 1cN0 1cL0 1cN0 dX0 WL0 1cN0 1cL0 1fB0 1o30 11B0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4", + "Europe/Sofia|EET CET CEST EEST|-20 -10 -20 -30|01212103030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030|-168L0 WM0 1fA0 1cM0 1cM0 1cN0 1mKH0 1dd0 1fb0 1ap0 1fb0 1a20 1fy0 1a30 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5", + "Europe/Stockholm|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2azC0 TB0 2yDe0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|15e5", + "Europe/Tallinn|TMT CET CEST EET MSK MSD EEST|-1D -10 -20 -20 -30 -40 -30|012103421212454545454545454546363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363|-26oND teD 11A0 1Ta0 4rXl KSLD 2FX0 2Jg0 WM0 1fA0 1cM0 18J0 1sTX0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o10 11A0 1qM0 5QM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|41e4", + "Europe/Tirane|LMT CET CEST|-1j.k -10 -20|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glBj.k 14pcj.k 5LC0 WM0 4M0 1fCK0 10n0 1op0 11z0 1pd0 11z0 1qN0 WL0 1qp0 Xb0 1qp0 Xb0 1qp0 11z0 1lB0 11z0 1qN0 11z0 1iN0 16n0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|42e4", + "Europe/Ulyanovsk|LMT +03 +04 +05 +02|-3d.A -30 -40 -50 -20|01232323232323232321214121212121212121212121212121212121212121212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|13e5", + "Europe/Uzhgorod|CET CEST MSK MSD EET EEST|-10 -20 -30 -40 -20 -30|010101023232323232323232320454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-1cqL0 6i00 WM0 1fA0 1cM0 1ml0 1Cp0 1r3W0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 1Nf0 2pw0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e4", + "Europe/Vienna|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 3KM0 14o0 LA00 6i00 WM0 1fA0 1cM0 1cM0 1cM0 400 2qM0 1a00 1cM0 1cM0 1io0 17c0 1gHa0 19X0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|18e5", + "Europe/Vilnius|WMT KMT CET EET MSK CEST MSD EEST|-1o -1z.A -10 -20 -30 -20 -40 -30|012324525254646464646464646473737373737373737352537373737373737373737373737373737373737373737373737373737373737373737373|-293do 6ILM.o 1Ooz.A zz0 Mfd0 29W0 3is0 WM0 1fA0 1cM0 LV0 1tgL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11B0 1o00 11A0 1qM0 8io0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4", + "Europe/Volgograd|LMT +03 +04 +05|-2V.E -30 -40 -50|012323232323232321212121212121212121212121212121212121212121212|-21IqV.E psLV.E 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 9Jd0|10e5", + "Europe/Warsaw|WMT CET CEST EET EEST|-1o -10 -20 -20 -30|012121234312121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ctdo 1LXo 11d0 1iO0 11A0 1o00 11A0 1on0 11A0 6zy0 HWP0 5IM0 WM0 1fA0 1cM0 1dz0 1mL0 1en0 15B0 1aq0 1nA0 11A0 1io0 17c0 1fA0 1a00 iDX0 LA0 1cM0 1cM0 1C00 Oo0 1cM0 1cM0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1C00 LA0 uso0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e5", + "Europe/Zaporozhye|+0220 EET MSK CEST CET MSD EEST|-2k -20 -30 -20 -10 -40 -30|01234342525252525252525252526161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161|-1Pc2k eUok rdb0 2RE0 WM0 1fA0 8m0 1v9a0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cK0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|77e4", + "HST|HST|a0|0|", + "Indian/Chagos|LMT +05 +06|-4N.E -50 -60|012|-2xosN.E 3AGLN.E|30e2", + "Indian/Cocos|+0630|-6u|0||596", + "Indian/Kerguelen|-00 +05|0 -50|01|-MG00|130", + "Indian/Mahe|LMT +04|-3F.M -40|01|-2yO3F.M|79e3", + "Indian/Maldives|MMT +05|-4S -50|01|-olgS|35e4", + "Indian/Mauritius|LMT +04 +05|-3O -40 -50|012121|-2xorO 34unO 14L0 12kr0 11z0|15e4", + "Indian/Reunion|LMT +04|-3F.Q -40|01|-2mDDF.Q|84e4", + "Pacific/Kwajalein|+11 +10 +09 -12 +12|-b0 -a0 -90 c0 -c0|012034|-1kln0 akp0 6Up0 12ry0 Wan0|14e3", + "MET|MET MEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", + "MST|MST|70|0|", + "MST7MDT|MST MDT MWT MPT|70 60 60 60|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "Pacific/Chatham|+1215 +1245 +1345|-cf -cJ -dJ|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-WqAf 1adef IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|600", + "Pacific/Apia|LMT -1130 -11 -10 +14 +13|bq.U bu b0 a0 -e0 -d0|01232345454545454545454545454545454545454545454545454545454|-2nDMx.4 1yW03.4 2rRbu 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|37e3", + "Pacific/Bougainville|+10 +09 +11|-a0 -90 -b0|0102|-16Wy0 7CN0 2MQp0|18e4", + "Pacific/Chuuk|+10 +09|-a0 -90|01010|-2ewy0 axB0 RVX0 axd0|49e3", + "Pacific/Efate|LMT +11 +12|-bd.g -b0 -c0|0121212121212121212121|-2l9nd.g 2Szcd.g 1cL0 1oN0 10L0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 Lz0 1Nd0 An0|66e3", + "Pacific/Enderbury|-12 -11 +13|c0 b0 -d0|012|nIc0 B7X0|1", + "Pacific/Fakaofo|-11 +13|b0 -d0|01|1Gfn0|483", + "Pacific/Fiji|LMT +12 +13|-bT.I -c0 -d0|0121212121212121212121212121212121212121212121212121212121212121|-2bUzT.I 3m8NT.I LA0 1EM0 IM0 nJc0 LA0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0|88e4", + "Pacific/Galapagos|LMT -05 -06|5W.o 50 60|01212|-1yVS1.A 2dTz1.A gNd0 rz0|25e3", + "Pacific/Gambier|LMT -09|8X.M 90|01|-2jof0.c|125", + "Pacific/Guadalcanal|LMT +11|-aD.M -b0|01|-2joyD.M|11e4", + "Pacific/Guam|GST +09 GDT ChST|-a0 -90 -b0 -a0|01020202020202020203|-18jK0 6pB0 AhB0 3QL0 g2p0 3p91 WOX rX0 1zd0 Rb0 1wp0 Rb0 5xd0 rX0 5sN0 zb1 1C0X On0 ULb0|17e4", + "Pacific/Honolulu|HST HDT HWT HPT HST|au 9u 9u 9u a0|0102304|-1thLu 8x0 lef0 8wWu iAu 46p0|37e4", + "Pacific/Kiritimati|-1040 -10 +14|aE a0 -e0|012|nIaE B7Xk|51e2", + "Pacific/Kosrae|+11 +09 +10 +12|-b0 -90 -a0 -c0|01021030|-2ewz0 axC0 HBy0 akp0 axd0 WOK0 1bdz0|66e2", + "Pacific/Majuro|+11 +09 +10 +12|-b0 -90 -a0 -c0|0102103|-2ewz0 axC0 HBy0 akp0 6RB0 12um0|28e3", + "Pacific/Marquesas|LMT -0930|9i 9u|01|-2joeG|86e2", + "Pacific/Pago_Pago|LMT SST|bm.M b0|01|-2nDMB.c|37e2", + "Pacific/Nauru|LMT +1130 +09 +12|-b7.E -bu -90 -c0|01213|-1Xdn7.E QCnB.E 7mqu 1lnbu|10e3", + "Pacific/Niue|-1120 -1130 -11|bk bu b0|012|-KfME 17y0a|12e2", + "Pacific/Norfolk|+1112 +1130 +1230 +11|-bc -bu -cu -b0|01213|-Kgbc W01G On0 1COp0|25e4", + "Pacific/Noumea|LMT +11 +12|-b5.M -b0 -c0|01212121|-2l9n5.M 2EqM5.M xX0 1PB0 yn0 HeP0 Ao0|98e3", + "Pacific/Pitcairn|-0830 -08|8u 80|01|18Vku|56", + "Pacific/Pohnpei|+11 +09 +10|-b0 -90 -a0|010210|-2ewz0 axC0 HBy0 akp0 axd0|34e3", + "Pacific/Rarotonga|-1030 -0930 -10|au 9u a0|012121212121212121212121212|lyWu IL0 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu|13e3", + "Pacific/Tahiti|LMT -10|9W.g a0|01|-2joe1.I|18e4", + "Pacific/Tongatapu|+1220 +13 +14|-ck -d0 -e0|0121212121|-1aB0k 2n5dk 15A0 1wo0 xz0 1Q10 xz0 zWN0 s00|75e3", + "PST8PDT|PST PDT PWT PPT|80 70 70 70|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261q0 1nX0 11B0 1nX0 SgN0 8x10 iy0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "WET|WET WEST|0 -10|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00" + ], + "links": [ + "Africa/Abidjan|Africa/Bamako", + "Africa/Abidjan|Africa/Banjul", + "Africa/Abidjan|Africa/Conakry", + "Africa/Abidjan|Africa/Dakar", + "Africa/Abidjan|Africa/Freetown", + "Africa/Abidjan|Africa/Lome", + "Africa/Abidjan|Africa/Nouakchott", + "Africa/Abidjan|Africa/Ouagadougou", + "Africa/Abidjan|Africa/Timbuktu", + "Africa/Abidjan|Atlantic/St_Helena", + "Africa/Cairo|Egypt", + "Africa/Johannesburg|Africa/Maseru", + "Africa/Johannesburg|Africa/Mbabane", + "Africa/Lagos|Africa/Bangui", + "Africa/Lagos|Africa/Brazzaville", + "Africa/Lagos|Africa/Douala", + "Africa/Lagos|Africa/Kinshasa", + "Africa/Lagos|Africa/Libreville", + "Africa/Lagos|Africa/Luanda", + "Africa/Lagos|Africa/Malabo", + "Africa/Lagos|Africa/Niamey", + "Africa/Lagos|Africa/Porto-Novo", + "Africa/Maputo|Africa/Blantyre", + "Africa/Maputo|Africa/Bujumbura", + "Africa/Maputo|Africa/Gaborone", + "Africa/Maputo|Africa/Harare", + "Africa/Maputo|Africa/Kigali", + "Africa/Maputo|Africa/Lubumbashi", + "Africa/Maputo|Africa/Lusaka", + "Africa/Nairobi|Africa/Addis_Ababa", + "Africa/Nairobi|Africa/Asmara", + "Africa/Nairobi|Africa/Asmera", + "Africa/Nairobi|Africa/Dar_es_Salaam", + "Africa/Nairobi|Africa/Djibouti", + "Africa/Nairobi|Africa/Kampala", + "Africa/Nairobi|Africa/Mogadishu", + "Africa/Nairobi|Indian/Antananarivo", + "Africa/Nairobi|Indian/Comoro", + "Africa/Nairobi|Indian/Mayotte", + "Africa/Tripoli|Libya", + "America/Adak|America/Atka", + "America/Adak|US/Aleutian", + "America/Anchorage|US/Alaska", + "America/Argentina/Buenos_Aires|America/Buenos_Aires", + "America/Argentina/Catamarca|America/Argentina/ComodRivadavia", + "America/Argentina/Catamarca|America/Catamarca", + "America/Argentina/Cordoba|America/Cordoba", + "America/Argentina/Cordoba|America/Rosario", + "America/Argentina/Jujuy|America/Jujuy", + "America/Argentina/Mendoza|America/Mendoza", + "America/Atikokan|America/Coral_Harbour", + "America/Chicago|US/Central", + "America/Curacao|America/Aruba", + "America/Curacao|America/Kralendijk", + "America/Curacao|America/Lower_Princes", + "America/Denver|America/Shiprock", + "America/Denver|Navajo", + "America/Denver|US/Mountain", + "America/Detroit|US/Michigan", + "America/Edmonton|Canada/Mountain", + "America/Fort_Wayne|America/Indiana/Indianapolis", + "America/Fort_Wayne|America/Indianapolis", + "America/Fort_Wayne|US/East-Indiana", + "America/Halifax|Canada/Atlantic", + "America/Havana|Cuba", + "America/Indiana/Knox|America/Knox_IN", + "America/Indiana/Knox|US/Indiana-Starke", + "America/Jamaica|Jamaica", + "America/Kentucky/Louisville|America/Louisville", + "America/Los_Angeles|US/Pacific", + "America/Los_Angeles|US/Pacific-New", + "America/Manaus|Brazil/West", + "America/Mazatlan|Mexico/BajaSur", + "America/Mexico_City|Mexico/General", + "America/New_York|US/Eastern", + "America/Noronha|Brazil/DeNoronha", + "America/Panama|America/Cayman", + "America/Phoenix|US/Arizona", + "America/Port_of_Spain|America/Anguilla", + "America/Port_of_Spain|America/Antigua", + "America/Port_of_Spain|America/Dominica", + "America/Port_of_Spain|America/Grenada", + "America/Port_of_Spain|America/Guadeloupe", + "America/Port_of_Spain|America/Marigot", + "America/Port_of_Spain|America/Montserrat", + "America/Port_of_Spain|America/St_Barthelemy", + "America/Port_of_Spain|America/St_Kitts", + "America/Port_of_Spain|America/St_Lucia", + "America/Port_of_Spain|America/St_Thomas", + "America/Port_of_Spain|America/St_Vincent", + "America/Port_of_Spain|America/Tortola", + "America/Port_of_Spain|America/Virgin", + "America/Regina|Canada/Saskatchewan", + "America/Rio_Branco|America/Porto_Acre", + "America/Rio_Branco|Brazil/Acre", + "America/Santiago|Chile/Continental", + "America/Sao_Paulo|Brazil/East", + "America/St_Johns|Canada/Newfoundland", + "America/Tijuana|America/Ensenada", + "America/Tijuana|America/Santa_Isabel", + "America/Tijuana|Mexico/BajaNorte", + "America/Toronto|America/Montreal", + "America/Toronto|Canada/Eastern", + "America/Vancouver|Canada/Pacific", + "America/Whitehorse|Canada/Yukon", + "America/Winnipeg|Canada/Central", + "Asia/Ashgabat|Asia/Ashkhabad", + "Asia/Bangkok|Asia/Phnom_Penh", + "Asia/Bangkok|Asia/Vientiane", + "Asia/Dhaka|Asia/Dacca", + "Asia/Dubai|Asia/Muscat", + "Asia/Ho_Chi_Minh|Asia/Saigon", + "Asia/Hong_Kong|Hongkong", + "Asia/Jerusalem|Asia/Tel_Aviv", + "Asia/Jerusalem|Israel", + "Asia/Kathmandu|Asia/Katmandu", + "Asia/Kolkata|Asia/Calcutta", + "Asia/Kuala_Lumpur|Asia/Singapore", + "Asia/Kuala_Lumpur|Singapore", + "Asia/Macau|Asia/Macao", + "Asia/Makassar|Asia/Ujung_Pandang", + "Asia/Nicosia|Europe/Nicosia", + "Asia/Qatar|Asia/Bahrain", + "Asia/Rangoon|Asia/Yangon", + "Asia/Riyadh|Asia/Aden", + "Asia/Riyadh|Asia/Kuwait", + "Asia/Seoul|ROK", + "Asia/Shanghai|Asia/Chongqing", + "Asia/Shanghai|Asia/Chungking", + "Asia/Shanghai|Asia/Harbin", + "Asia/Shanghai|PRC", + "Asia/Taipei|ROC", + "Asia/Tehran|Iran", + "Asia/Thimphu|Asia/Thimbu", + "Asia/Tokyo|Japan", + "Asia/Ulaanbaatar|Asia/Ulan_Bator", + "Asia/Urumqi|Asia/Kashgar", + "Atlantic/Faroe|Atlantic/Faeroe", + "Atlantic/Reykjavik|Iceland", + "Atlantic/South_Georgia|Etc/GMT+2", + "Australia/Adelaide|Australia/South", + "Australia/Brisbane|Australia/Queensland", + "Australia/Broken_Hill|Australia/Yancowinna", + "Australia/Darwin|Australia/North", + "Australia/Hobart|Australia/Tasmania", + "Australia/Lord_Howe|Australia/LHI", + "Australia/Melbourne|Australia/Victoria", + "Australia/Perth|Australia/West", + "Australia/Sydney|Australia/ACT", + "Australia/Sydney|Australia/Canberra", + "Australia/Sydney|Australia/NSW", + "Etc/GMT-0|Etc/GMT", + "Etc/GMT-0|Etc/GMT+0", + "Etc/GMT-0|Etc/GMT0", + "Etc/GMT-0|Etc/Greenwich", + "Etc/GMT-0|GMT", + "Etc/GMT-0|GMT+0", + "Etc/GMT-0|GMT-0", + "Etc/GMT-0|GMT0", + "Etc/GMT-0|Greenwich", + "Etc/UTC|Etc/UCT", + "Etc/UTC|Etc/Universal", + "Etc/UTC|Etc/Zulu", + "Etc/UTC|UCT", + "Etc/UTC|UTC", + "Etc/UTC|Universal", + "Etc/UTC|Zulu", + "Europe/Belgrade|Europe/Ljubljana", + "Europe/Belgrade|Europe/Podgorica", + "Europe/Belgrade|Europe/Sarajevo", + "Europe/Belgrade|Europe/Skopje", + "Europe/Belgrade|Europe/Zagreb", + "Europe/Chisinau|Europe/Tiraspol", + "Europe/Dublin|Eire", + "Europe/Helsinki|Europe/Mariehamn", + "Europe/Istanbul|Asia/Istanbul", + "Europe/Istanbul|Turkey", + "Europe/Lisbon|Portugal", + "Europe/London|Europe/Belfast", + "Europe/London|Europe/Guernsey", + "Europe/London|Europe/Isle_of_Man", + "Europe/London|Europe/Jersey", + "Europe/London|GB", + "Europe/London|GB-Eire", + "Europe/Moscow|W-SU", + "Europe/Oslo|Arctic/Longyearbyen", + "Europe/Oslo|Atlantic/Jan_Mayen", + "Europe/Prague|Europe/Bratislava", + "Europe/Rome|Europe/San_Marino", + "Europe/Rome|Europe/Vatican", + "Europe/Warsaw|Poland", + "Europe/Zurich|Europe/Busingen", + "Europe/Zurich|Europe/Vaduz", + "Indian/Christmas|Etc/GMT-7", + "Pacific/Auckland|Antarctica/McMurdo", + "Pacific/Auckland|Antarctica/South_Pole", + "Pacific/Auckland|NZ", + "Pacific/Chatham|NZ-CHAT", + "Pacific/Chuuk|Pacific/Truk", + "Pacific/Chuuk|Pacific/Yap", + "Pacific/Easter|Chile/EasterIsland", + "Pacific/Guam|Pacific/Saipan", + "Pacific/Honolulu|Pacific/Johnston", + "Pacific/Honolulu|US/Hawaii", + "Pacific/Kwajalein|Kwajalein", + "Pacific/Pago_Pago|Pacific/Midway", + "Pacific/Pago_Pago|Pacific/Samoa", + "Pacific/Pago_Pago|US/Samoa", + "Pacific/Palau|Etc/GMT-9", + "Pacific/Pohnpei|Pacific/Ponape", + "Pacific/Port_Moresby|Etc/GMT-10", + "Pacific/Tarawa|Etc/GMT-12", + "Pacific/Tarawa|Pacific/Funafuti", + "Pacific/Tarawa|Pacific/Wake", + "Pacific/Tarawa|Pacific/Wallis" + ] + }); + + + return moment; +})); diff --git a/node_modules/moment-timezone/builds/moment-timezone-with-data.min.js b/node_modules/moment-timezone/builds/moment-timezone-with-data.min.js new file mode 100644 index 00000000..f69ea974 --- /dev/null +++ b/node_modules/moment-timezone/builds/moment-timezone-with-data.min.js @@ -0,0 +1 @@ +!function(c,M){"use strict";"object"==typeof module&&module.exports?module.exports=M(require("moment")):"function"==typeof define&&define.amd?define(["moment"],M):M(c.moment)}(this,function(o){"use strict";var M,p={},n={},O={},q={};o&&"string"==typeof o.version||E("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var c=o.version.split("."),z=+c[0],A=+c[1];function a(c){return 96= 2.6.0. You are using Moment.js "+o.version+". See momentjs.com"),W.prototype={_set:function(c){this.name=c.name,this.abbrs=c.abbrs,this.untils=c.untils,this.offsets=c.offsets,this.population=c.population},_index:function(c){var M,z=+c,A=this.untils;for(M=0;M= 2.9.0. You are using Moment.js "+o.version+"."),o.defaultZone=c?u(c):null,o};var P=o.momentProperties;return"[object Array]"===Object.prototype.toString.call(P)?(P.push("_z"),P.push("_a")):P&&(P._z=null),s({version:"2019b",zones:["Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q|48e5","Africa/Accra|LMT GMT +0020|.Q 0 -k|012121212121212121212121212121212121212121212121|-26BbX.8 6tzX.8 MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE|41e5","Africa/Nairobi|LMT EAT +0230 +0245|-2r.g -30 -2u -2J|01231|-1F3Cr.g 3Dzr.g okMu MFXJ|47e5","Africa/Algiers|PMT WET WEST CET CEST|-9.l 0 -10 -10 -20|0121212121212121343431312123431213|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 DA0 Imo0 rd0 De0 9Xz0 1fb0 1ap0 16K0 2yo0 mEp0 hwL0 jxA0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0|26e5","Africa/Lagos|LMT WAT|-d.A -10|01|-22y0d.A|17e6","Africa/Bissau|LMT -01 GMT|12.k 10 0|012|-2ldX0 2xoo0|39e4","Africa/Maputo|LMT CAT|-2a.k -20|01|-2GJea.k|26e5","Africa/Cairo|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1bIO0 vb0 1ip0 11z0 1iN0 1nz0 12p0 1pz0 10N0 1pz0 16p0 1jz0 s3d0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1WL0 rd0 1Rz0 wp0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1qL0 Xd0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1ny0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 WL0 1qN0 Rb0 1wp0 On0 1zd0 Lz0 1EN0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0|15e6","Africa/Casablanca|LMT +00 +01|u.k 0 -10|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-2gMnt.E 130Lt.E rb0 Dd0 dVb0 b6p0 TX0 EoB0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4mn0 SyN0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0|32e5","Africa/Ceuta|WET WEST CET CEST|0 -10 -10 -20|010101010101010101010232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-25KN0 11z0 drd0 18p0 3HX0 17d0 1fz0 1a10 1io0 1a00 1y7o0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4VB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|85e3","Africa/El_Aaiun|LMT -01 +00 +01|Q.M 10 0 -10|012323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1rDz7.c 1GVA7.c 6L0 AL0 1Nd0 XX0 1Cp0 pz0 1cBB0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0|20e4","Africa/Johannesburg|SAST SAST SAST|-1u -20 -30|012121|-2GJdu 1Ajdu 1cL0 1cN0 1cL0|84e5","Africa/Juba|LMT CAT CAST EAT|-26.s -20 -30 -30|01212121212121212121212121212121213|-1yW26.s 1zK06.s 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0","Africa/Khartoum|LMT CAT CAST EAT|-2a.8 -20 -30 -30|012121212121212121212121212121212131|-1yW2a.8 1zK0a.8 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 HjL0|51e5","Africa/Monrovia|MMT MMT GMT|H.8 I.u 0|012|-23Lzg.Q 28G01.m|11e5","Africa/Ndjamena|LMT WAT WAST|-10.c -10 -20|0121|-2le10.c 2J3c0.c Wn0|13e5","Africa/Sao_Tome|LMT GMT WAT|A.J 0 -10|0121|-2le00 4i6N0 2q00","Africa/Tripoli|LMT CET CEST EET|-Q.I -10 -20 -20|012121213121212121212121213123123|-21JcQ.I 1hnBQ.I vx0 4iP0 xx0 4eN0 Bb0 7ip0 U0n0 A10 1db0 1cN0 1db0 1dd0 1db0 1eN0 1bb0 1e10 1cL0 1c10 1db0 1dd0 1db0 1cN0 1db0 1q10 fAn0 1ep0 1db0 AKq0 TA0 1o00|11e5","Africa/Tunis|PMT CET CEST|-9.l -10 -20|0121212121212121212121212121212121|-2nco9.l 18pa9.l 1qM0 DA0 3Tc0 11B0 1ze0 WM0 7z0 3d0 14L0 1cN0 1f90 1ar0 16J0 1gXB0 WM0 1rA0 11c0 nwo0 Ko0 1cM0 1cM0 1rA0 10M0 zuM0 10N0 1aN0 1qM0 WM0 1qM0 11A0 1o00|20e5","Africa/Windhoek|+0130 SAST SAST CAT WAT|-1u -20 -30 -20 -10|01213434343434343434343434343434343434343434343434343|-2GJdu 1Ajdu 1cL0 1SqL0 9Io0 16P0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4","America/Adak|NST NWT NPT BST BDT AHST HST HDT|b0 a0 a0 b0 a0 a0 a0 90|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17SX0 8wW0 iB0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326","America/Anchorage|AST AWT APT AHST AHDT YST AKST AKDT|a0 90 90 a0 90 90 90 80|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17T00 8wX0 iA0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4","America/Port_of_Spain|LMT AST|46.4 40|01|-2kNvR.U|43e3","America/Araguaina|LMT -03 -02|3c.M 30 20|0121212121212121212121212121212121212121212121212121|-2glwL.c HdKL.c 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 ny10 Lz0|14e4","America/Argentina/Buenos_Aires|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 A4p0 uL0 1qN0 WL0","America/Argentina/Catamarca|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323132321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 7B0 8zb0 uL0","America/Argentina/Cordoba|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323132323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0 1qN0 WL0","America/Argentina/Jujuy|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323121323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1ze0 TX0 1ld0 WK0 1wp0 TX0 A4p0 uL0","America/Argentina/La_Rioja|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0","America/Argentina/Mendoza|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232312121321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1u20 SL0 1vd0 Tb0 1wp0 TW0 ri10 Op0 7TX0 uL0","America/Argentina/Rio_Gallegos|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0","America/Argentina/Salta|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0","America/Argentina/San_Juan|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rld0 m10 8lb0 uL0","America/Argentina/San_Luis|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323121212321212|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 XX0 1q20 SL0 AN0 vDb0 m10 8lb0 8L0 jd0 1qN0 WL0 1qN0","America/Argentina/Tucuman|CMT -04 -03 -02|4g.M 40 30 20|0121212121212121212121212121212121212121212323232313232123232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 4N0 8BX0 uL0 1qN0 WL0","America/Argentina/Ushuaia|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rkN0 8p0 8zb0 uL0","America/Curacao|LMT -0430 AST|4z.L 4u 40|012|-2kV7o.d 28KLS.d|15e4","America/Asuncion|AMT -04 -03|3O.E 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-1x589.k 1DKM9.k 3CL0 3Dd0 10L0 1pB0 10n0 1pB0 10n0 1pB0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1lB0 14n0 1dd0 1cL0 1fd0 WL0 1rd0 1aL0 1dB0 Xz0 1qp0 Xb0 1qN0 10L0 1rB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 WN0 1qL0 11B0 1nX0 1ip0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 TX0 1tB0 19X0 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0|28e5","America/Atikokan|CST CDT CWT CPT EST|60 50 50 50 50|0101234|-25TQ0 1in0 Rnb0 3je0 8x30 iw0|28e2","America/Bahia_Banderas|LMT MST CST PST MDT CDT|71 70 60 80 60 50|0121212131414141414141414141414141414152525252525252525252525252525252525252525252525252525252|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|84e3","America/Bahia|LMT -03 -02|2y.4 30 20|01212121212121212121212121212121212121212121212121212121212121|-2glxp.U HdLp.U 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 l5B0 Rb0|27e5","America/Barbados|LMT BMT AST ADT|3W.t 3W.t 40 30|01232323232|-1Q0I1.v jsM0 1ODC1.v IL0 1ip0 17b0 1ip0 17b0 1ld0 13b0|28e4","America/Belem|LMT -03 -02|3d.U 30 20|012121212121212121212121212121|-2glwK.4 HdKK.4 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0|20e5","America/Belize|LMT CST -0530 CDT|5Q.M 60 5u 50|01212121212121212121212121212121212121212121212121213131|-2kBu7.c fPA7.c Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1f0Mu qn0 lxB0 mn0|57e3","America/Blanc-Sablon|AST ADT AWT APT|40 30 30 30|010230|-25TS0 1in0 UGp0 8x50 iu0|11e2","America/Boa_Vista|LMT -04 -03|42.E 40 30|0121212121212121212121212121212121|-2glvV.k HdKV.k 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 smp0 WL0 1tB0 2L0|62e2","America/Bogota|BMT -05 -04|4U.g 50 40|0121|-2eb73.I 38yo3.I 2en0|90e5","America/Boise|PST PDT MST MWT MPT MDT|80 70 70 60 60 60|0101023425252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-261q0 1nX0 11B0 1nX0 8C10 JCL0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 Dd0 1Kn0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e4","America/Cambridge_Bay|-00 MST MWT MPT MDDT MDT CST CDT EST|0 70 60 60 50 60 60 50 50|0123141515151515151515151515151515151515151515678651515151515151515151515151515151515151515151515151515151515151515151515151|-21Jc0 RO90 8x20 ix0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11A0 1nX0 2K0 WQ0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e2","America/Campo_Grande|LMT -04 -03|3C.s 40 30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwl.w HdLl.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4","America/Cancun|LMT CST EST EDT CDT|5L.4 60 50 40 50|0123232341414141414141414141414141414141412|-1UQG0 2q2o0 yLB0 1lb0 14p0 1lb0 14p0 Lz0 xB0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4","America/Caracas|CMT -0430 -04|4r.E 4u 40|01212|-2kV7w.k 28KM2.k 1IwOu kqo0|29e5","America/Cayenne|LMT -04 -03|3t.k 40 30|012|-2mrwu.E 2gWou.E|58e3","America/Panama|CMT EST|5j.A 50|01|-2uduE.o|15e5","America/Chicago|CST CDT EST CWT CPT|60 50 50 50 50|01010101010101010101010101010101010102010101010103401010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 1wp0 TX0 WN0 1qL0 1cN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 11B0 1Hz0 14p0 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5","America/Chihuahua|LMT MST CST CDT MDT|74.k 70 60 50 60|0121212323241414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|81e4","America/Costa_Rica|SJMT CST CDT|5A.d 60 50|0121212121|-1Xd6n.L 2lu0n.L Db0 1Kp0 Db0 pRB0 15b0 1kp0 mL0|12e5","America/Creston|MST PST|70 80|010|-29DR0 43B0|53e2","America/Cuiaba|LMT -04 -03|3I.k 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwf.E HdLf.E 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 4a10 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|54e4","America/Danmarkshavn|LMT -03 -02 GMT|1e.E 30 20 0|01212121212121212121212121212121213|-2a5WJ.k 2z5fJ.k 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 DC0|8","America/Dawson_Creek|PST PDT PWT PPT MST|80 70 70 70 70|0102301010101010101010101010101010101010101010101010101014|-25TO0 1in0 UGp0 8x10 iy0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 ML0|12e3","America/Dawson|YST YDT YWT YPT YDDT PST PDT|90 80 80 80 70 80 70|0101023040565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-25TN0 1in0 1o10 13V0 Ser0 8x00 iz0 LCL0 1fA0 jrA0 fNd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|13e2","America/Denver|MST MDT MWT MPT|70 60 60 60|01010101023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261r0 1nX0 11B0 1nX0 11B0 1qL0 WN0 mn0 Ord0 8x20 ix0 LCN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5","America/Detroit|LMT CST EST EWT EPT EDT|5w.b 60 50 40 40 40|012342525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-2Cgir.N peqr.N 156L0 8x40 iv0 6fd0 11z0 XQp0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e5","America/Edmonton|LMT MST MDT MWT MPT|7x.Q 70 60 60 60|01212121212121341212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2yd4q.8 shdq.8 1in0 17d0 hz0 2dB0 1fz0 1a10 11z0 1qN0 WL0 1qN0 11z0 IGN0 8x20 ix0 3NB0 11z0 LFB0 1cL0 3Cp0 1cL0 66N0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|10e5","America/Eirunepe|LMT -05 -04|4D.s 50 40|0121212121212121212121212121212121|-2glvk.w HdLk.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0 yTd0 d5X0|31e3","America/El_Salvador|LMT CST CDT|5U.M 60 50|012121|-1XiG3.c 2Fvc3.c WL0 1qN0 WL0|11e5","America/Tijuana|LMT MST PST PDT PWT PPT|7M.4 70 80 70 70 70|012123245232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQE0 4PX0 8mM0 8lc0 SN0 1cL0 pHB0 83r0 zI0 5O10 1Rz0 cOO0 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 BUp0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|20e5","America/Fort_Nelson|PST PDT PWT PPT MST|80 70 70 70 70|01023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010104|-25TO0 1in0 UGp0 8x10 iy0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2","America/Fort_Wayne|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|010101023010101010101010101040454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 QI10 Db0 RB0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 5Tz0 1o10 qLb0 1cL0 1cN0 1cL0 1qhd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Fortaleza|LMT -03 -02|2y 30 20|0121212121212121212121212121212121212121|-2glxq HdLq 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 5z0 2mN0 On0|34e5","America/Glace_Bay|LMT AST ADT AWT APT|3X.M 40 30 30 30|012134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsI0.c CwO0.c 1in0 UGp0 8x50 iu0 iq10 11z0 Jg10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3","America/Godthab|LMT -03 -02|3q.U 30 20|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a5Ux.4 2z5dx.4 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e3","America/Goose_Bay|NST NDT NST NDT NWT NPT AST ADT ADDT|3u.Q 2u.Q 3u 2u 2u 2u 40 30 20|010232323232323245232323232323232323232323232323232323232326767676767676767676767676767676767676767676768676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-25TSt.8 1in0 DXb0 2HbX.8 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 WL0 1qN0 WL0 1qN0 7UHu itu 1tB0 WL0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1tB0 WL0 1ld0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 S10 g0u 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2","America/Grand_Turk|KMT EST EDT AST|57.a 50 40 40|01212121212121212121212121212121212121212121212121212121212121212121212121232121212121212121212121212121212121212121|-2l1uQ.O 2HHBQ.O 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 5Ip0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2","America/Guatemala|LMT CST CDT|62.4 60 50|0121212121|-24KhV.U 2efXV.U An0 mtd0 Nz0 ifB0 17b0 zDB0 11z0|13e5","America/Guayaquil|QMT -05 -04|5e 50 40|0121|-1yVSK 2uILK rz0|27e5","America/Guyana|LMT -0345 -03 -04|3Q.E 3J 30 40|0123|-2dvU7.k 2r6LQ.k Bxbf|80e4","America/Halifax|LMT AST ADT AWT APT|4e.o 40 30 30 30|0121212121212121212121212121212121212121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsHJ.A xzzJ.A 1db0 3I30 1in0 3HX0 IL0 1E10 ML0 1yN0 Pb0 1Bd0 Mn0 1Bd0 Rz0 1w10 Xb0 1w10 LX0 1w10 Xb0 1w10 Lz0 1C10 Jz0 1E10 OL0 1yN0 Un0 1qp0 Xb0 1qp0 11X0 1w10 Lz0 1HB0 LX0 1C10 FX0 1w10 Xb0 1qp0 Xb0 1BB0 LX0 1td0 Xb0 1qp0 Xb0 Rf0 8x50 iu0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 3Qp0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 3Qp0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 6i10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4","America/Havana|HMT CST CDT|5t.A 50 40|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1Meuu.o 72zu.o ML0 sld0 An0 1Nd0 Db0 1Nd0 An0 6Ep0 An0 1Nd0 An0 JDd0 Mn0 1Ap0 On0 1fd0 11X0 1qN0 WL0 1wp0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 14n0 1ld0 14L0 1kN0 15b0 1kp0 1cL0 1cN0 1fz0 1a10 1fz0 1fB0 11z0 14p0 1nX0 11B0 1nX0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 1a10 1in0 1a10 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 17c0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 11A0 6i00 Rc0 1wo0 U00 1tA0 Rc0 1wo0 U00 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5","America/Hermosillo|LMT MST CST PST MDT|7n.Q 70 60 80 60|0121212131414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0|64e4","America/Indiana/Knox|CST CDT CWT CPT EST|60 50 50 50 50|0101023010101010101010101010101010101040101010101010101010101010101010101010101010101010141010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 11z0 1o10 11z0 1o10 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 3Cn0 8wp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 z8o0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Indiana/Marengo|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101023010101010101010104545454545414545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 dyN0 11z0 6fd0 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 jrz0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1e6p0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Indiana/Petersburg|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010104010101010101010101010141014545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 njX0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 3Fb0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 19co0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Indiana/Tell_City|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010454541010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 g0p0 11z0 1o10 11z0 1qL0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 caL0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Indiana/Vevay|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|010102304545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 kPB0 Awn0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1lnd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Indiana/Vincennes|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010454541014545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 g0p0 11z0 1o10 11z0 1qL0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 caL0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Indiana/Winamac|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010101010454541054545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 jrz0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1za0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Inuvik|-00 PST PDDT MST MDT|0 80 60 70 60|0121343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-FnA0 tWU0 1fA0 wPe0 2pz0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|35e2","America/Iqaluit|-00 EWT EPT EST EDDT EDT CST CDT|0 40 40 50 30 40 60 50|01234353535353535353535353535353535353535353567353535353535353535353535353535353535353535353535353535353535353535353535353|-16K00 7nX0 iv0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|67e2","America/Jamaica|KMT EST EDT|57.a 50 40|0121212121212121212121|-2l1uQ.O 2uM1Q.O 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0|94e4","America/Juneau|PST PWT PPT PDT YDT YST AKST AKDT|80 70 70 70 80 90 90 80|01203030303030303030303030403030356767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cM0 1cM0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|33e3","America/Kentucky/Louisville|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101010102301010101010101010101010101454545454545414545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 3Fd0 Nb0 LPd0 11z0 RB0 8x30 iw0 Bb0 10N0 2bB0 8in0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 xz0 gso0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Kentucky/Monticello|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101023010101010101010101010101010101010101010101010101010101010101010101454545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 SWp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/La_Paz|CMT BST -04|4w.A 3w.A 40|012|-1x37r.o 13b0|19e5","America/Lima|LMT -05 -04|58.A 50 40|0121212121212121|-2tyGP.o 1bDzP.o zX0 1aN0 1cL0 1cN0 1cL0 1PrB0 zX0 1O10 zX0 6Gp0 zX0 98p0 zX0|11e6","America/Los_Angeles|PST PDT PWT PPT|80 70 70 70|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261q0 1nX0 11B0 1nX0 SgN0 8x10 iy0 5Wp1 1VaX 3dA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6","America/Maceio|LMT -03 -02|2m.Q 30 20|012121212121212121212121212121212121212121|-2glxB.8 HdLB.8 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 8Q10 WL0 1tB0 5z0 2mN0 On0|93e4","America/Managua|MMT CST EST CDT|5J.c 60 50 50|0121313121213131|-1quie.M 1yAMe.M 4mn0 9Up0 Dz0 1K10 Dz0 s3F0 1KH0 DB0 9In0 k8p0 19X0 1o30 11y0|22e5","America/Manaus|LMT -04 -03|40.4 40 30|01212121212121212121212121212121|-2glvX.U HdKX.U 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0|19e5","America/Martinique|FFMT AST ADT|44.k 40 30|0121|-2mPTT.E 2LPbT.E 19X0|39e4","America/Matamoros|LMT CST CDT|6E 60 50|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1UQG0 2FjC0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|45e4","America/Mazatlan|LMT MST CST PST MDT|75.E 70 60 80 60|0121212131414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|44e4","America/Menominee|CST CDT CWT CPT EST|60 50 50 50 50|01010230101041010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 LCN0 1fz0 6410 9Jb0 1cM0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|85e2","America/Merida|LMT CST EST CDT|5W.s 60 50 50|0121313131313131313131313131313131313131313131313131313131313131313131313131313131313131|-1UQG0 2q2o0 2hz0 wu30 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|11e5","America/Metlakatla|PST PWT PPT PDT AKST AKDT|80 70 70 70 90 80|01203030303030303030303030303030304545450454545454545454545454545454545454545454|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1hU10 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2","America/Mexico_City|LMT MST CST CDT CWT|6A.A 70 60 50 50|012121232324232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 gEn0 TX0 3xd0 Jb0 6zB0 SL0 e5d0 17b0 1Pff0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|20e6","America/Miquelon|LMT AST -03 -02|3I.E 40 30 20|012323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2mKkf.k 2LTAf.k gQ10 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2","America/Moncton|EST AST ADT AWT APT|50 40 30 30 30|012121212121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsH0 CwN0 1in0 zAo0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1K10 Lz0 1zB0 NX0 1u10 Wn0 S20 8x50 iu0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14n1 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 ReX 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|64e3","America/Monterrey|LMT CST CDT|6F.g 60 50|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1UQG0 2FjC0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|41e5","America/Montevideo|LMT MMT -04 -03 -0330 -0230 -02 -0130|3I.P 3I.P 40 30 3u 2u 20 1u|012343434343434343434343435353636353636375363636363636363636363636363636363636363636363|-2tRUf.9 sVc0 8jcf.9 1db0 1dcu 1cLu 1dcu 1cLu ircu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu WLu 1fAu 1cLu 1o0u 11zu NAu 3jXu zXu Dq0u 19Xu pcu jz0 cm10 19X0 6tB0 1fbu 3o0u jX0 4vB0 xz0 3Cp0 mmu 1a10 IMu Db0 4c10 uL0 1Nd0 An0 1SN0 uL0 mp0 28L0 iPB0 un0 1SN0 xz0 1zd0 Lz0 1zd0 Rb0 1zd0 On0 1wp0 Rb0 s8p0 1fB0 1ip0 11z0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5","America/Toronto|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101012301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TR0 1in0 11Wu 1nzu 1fD0 WJ0 1wr0 Nb0 1Ap0 On0 1zd0 On0 1wp0 TX0 1tB0 TX0 1tB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 4kM0 8x40 iv0 1o10 11z0 1nX0 11z0 1o10 11z0 1o10 1qL0 11D0 1nX0 11B0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e5","America/Nassau|LMT EST EDT|59.u 50 40|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2kNuO.u 26XdO.u 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|24e4","America/New_York|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 11B0 1qL0 1a10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x40 iv0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6","America/Nipigon|EST EDT EWT EPT|50 40 40 40|010123010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TR0 1in0 Rnb0 3je0 8x40 iv0 19yN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|16e2","America/Nome|NST NWT NPT BST BDT YST AKST AKDT|b0 a0 a0 b0 a0 90 90 80|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17SX0 8wW0 iB0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cl0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|38e2","America/Noronha|LMT -02 -01|29.E 20 10|0121212121212121212121212121212121212121|-2glxO.k HdKO.k 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|30e2","America/North_Dakota/Beulah|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101014545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/North_Dakota/Center|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101014545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/North_Dakota/New_Salem|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101454545454545454545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Ojinaga|LMT MST CST CDT MDT|6V.E 70 60 50 60|0121212323241414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3","America/Pangnirtung|-00 AST AWT APT ADDT ADT EDT EST CST CDT|0 40 30 30 20 30 40 50 60 50|012314151515151515151515151515151515167676767689767676767676767676767676767676767676767676767676767676767676767676767676767|-1XiM0 PnG0 8x50 iu0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1o00 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2","America/Paramaribo|LMT PMT PMT -0330 -03|3E.E 3E.Q 3E.A 3u 30|01234|-2nDUj.k Wqo0.c qanX.I 1yVXN.o|24e4","America/Phoenix|MST MDT MWT|70 60 60|01010202010|-261r0 1nX0 11B0 1nX0 SgN0 4Al1 Ap0 1db0 SWqX 1cL0|42e5","America/Port-au-Prince|PPMT EST EDT|4N 50 40|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-28RHb 2FnMb 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14q0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 i6n0 1nX0 11B0 1nX0 d430 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5","America/Rio_Branco|LMT -05 -04|4v.c 50 40|01212121212121212121212121212121|-2glvs.M HdLs.M 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 NBd0 d5X0|31e4","America/Porto_Velho|LMT -04 -03|4f.A 40 30|012121212121212121212121212121|-2glvI.o HdKI.o 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0|37e4","America/Puerto_Rico|AST AWT APT|40 30 30|0120|-17lU0 7XT0 iu0|24e5","America/Punta_Arenas|SMT -05 -04 -03|4G.K 50 40 30|0102021212121212121232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-2q2jh.e fJAh.e 5knG.K 1Vzh.e jRAG.K 1pbh.e 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 blz0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0","America/Rainy_River|CST CDT CWT CPT|60 50 50 50|010123010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TQ0 1in0 Rnb0 3je0 8x30 iw0 19yN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|842","America/Rankin_Inlet|-00 CST CDDT CDT EST|0 60 40 50 50|012131313131313131313131313131313131313131313431313131313131313131313131313131313131313131313131313131313131313131313131|-vDc0 keu0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e2","America/Recife|LMT -03 -02|2j.A 30 20|0121212121212121212121212121212121212121|-2glxE.o HdLE.o 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|33e5","America/Regina|LMT MST MDT MWT MPT CST|6W.A 70 60 60 60 60|012121212121212121212121341212121212121212121212121215|-2AD51.o uHe1.o 1in0 s2L0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 66N0 1cL0 1cN0 19X0 1fB0 1cL0 1fB0 1cL0 1cN0 1cL0 M30 8x20 ix0 1ip0 1cL0 1ip0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 3NB0 1cL0 1cN0|19e4","America/Resolute|-00 CST CDDT CDT EST|0 60 40 50 50|012131313131313131313131313131313131313131313431313131313431313131313131313131313131313131313131313131313131313131313131|-SnA0 GWS0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|229","America/Santarem|LMT -04 -03|3C.M 40 30|0121212121212121212121212121212|-2glwl.c HdLl.c 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 NBd0|21e4","America/Santiago|SMT -05 -04 -03|4G.K 50 40 30|010202121212121212321232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-2q2jh.e fJAh.e 5knG.K 1Vzh.e jRAG.K 1pbh.e 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 9Bz0 jb0 1oN0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0|62e5","America/Santo_Domingo|SDMT EST EDT -0430 AST|4E 50 40 4u 40|01213131313131414|-1ttjk 1lJMk Mn0 6sp0 Lbu 1Cou yLu 1RAu wLu 1QMu xzu 1Q0u xXu 1PAu 13jB0 e00|29e5","America/Sao_Paulo|LMT -03 -02|36.s 30 20|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwR.w HdKR.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 pTd0 PX0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6","America/Scoresbysund|LMT -02 -01 +00|1r.Q 20 10 0|0121323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2a5Ww.8 2z5ew.8 1a00 1cK0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|452","America/Sitka|PST PWT PPT PDT YST AKST AKDT|80 70 70 70 90 90 80|01203030303030303030303030303030345656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|90e2","America/St_Johns|NST NDT NST NDT NWT NPT NDDT|3u.Q 2u.Q 3u 2u 2u 2u 1u|01010101010101010101010101010101010102323232323232324523232323232323232323232323232323232323232323232323232323232323232323232323232323232326232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-28oit.8 14L0 1nB0 1in0 1gm0 Dz0 1JB0 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 1cL0 1fB0 19X0 1fB0 19X0 10O0 eKX.8 19X0 1iq0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 WL0 1qN0 WL0 1qN0 7UHu itu 1tB0 WL0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1tB0 WL0 1ld0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4","America/Swift_Current|LMT MST MDT MWT MPT CST|7b.k 70 60 60 60 60|012134121212121212121215|-2AD4M.E uHdM.E 1in0 UGp0 8x20 ix0 1o10 17b0 1ip0 11z0 1o10 11z0 1o10 11z0 isN0 1cL0 3Cp0 1cL0 1cN0 11z0 1qN0 WL0 pMp0|16e3","America/Tegucigalpa|LMT CST CDT|5M.Q 60 50|01212121|-1WGGb.8 2ETcb.8 WL0 1qN0 WL0 GRd0 AL0|11e5","America/Thule|LMT AST ADT|4z.8 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a5To.Q 31NBo.Q 1cL0 1cN0 1cL0 1fB0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|656","America/Thunder_Bay|CST EST EWT EPT EDT|60 50 40 40 40|0123141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-2q5S0 1iaN0 8x40 iv0 XNB0 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4","America/Vancouver|PST PDT PWT PPT|80 70 70 70|0102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TO0 1in0 UGp0 8x10 iy0 1o10 17b0 1ip0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5","America/Whitehorse|YST YDT YWT YPT YDDT PST PDT|90 80 80 80 70 80 70|0101023040565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-25TN0 1in0 1o10 13V0 Ser0 8x00 iz0 LCL0 1fA0 3NA0 vrd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3","America/Winnipeg|CST CDT CWT CPT|60 50 50 50|010101023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aIi0 WL0 3ND0 1in0 Jap0 Rb0 aCN0 8x30 iw0 1tB0 11z0 1ip0 11z0 1o10 11z0 1o10 11z0 1rd0 10L0 1op0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 1cL0 1cN0 11z0 6i10 WL0 6i10 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|66e4","America/Yakutat|YST YWT YPT YDT AKST AKDT|90 80 80 80 90 80|01203030303030303030303030303030304545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-17T10 8x00 iz0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cn0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|642","America/Yellowknife|-00 MST MWT MPT MDDT MDT|0 70 60 60 50 60|012314151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151|-1pdA0 hix0 8x20 ix0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3","Antarctica/Casey|-00 +08 +11|0 -80 -b0|01212121|-2q00 1DjS0 T90 40P0 KL0 blz0 3m10|10","Antarctica/Davis|-00 +07 +05|0 -70 -50|01012121|-vyo0 iXt0 alj0 1D7v0 VB0 3Wn0 KN0|70","Antarctica/DumontDUrville|-00 +10|0 -a0|0101|-U0o0 cfq0 bFm0|80","Antarctica/Macquarie|AEST AEDT -00 +11|-a0 -b0 0 -b0|0102010101010101010101010101010101010101010101010101010101010101010101010101010101010101013|-29E80 19X0 4SL0 1ayy0 Lvs0 1cM0 1o00 Rc0 1wo0 Rc0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0|1","Antarctica/Mawson|-00 +06 +05|0 -60 -50|012|-CEo0 2fyk0|60","Pacific/Auckland|NZMT NZST NZST NZDT|-bu -cu -c0 -d0|01020202020202020202020202023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1GCVu Lz0 1tB0 11zu 1o0u 11zu 1o0u 11zu 1o0u 14nu 1lcu 14nu 1lcu 1lbu 11Au 1nXu 11Au 1nXu 11Au 1nXu 11Au 1nXu 11Au 1qLu WMu 1qLu 11Au 1n1bu IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|14e5","Antarctica/Palmer|-00 -03 -04 -02|0 30 40 20|0121212121213121212121212121212121212121212121212121212121212121212121212121212121|-cao0 nD0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 jsN0 14N0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40","Antarctica/Rothera|-00 -03|0 30|01|gOo0|130","Antarctica/Syowa|-00 +03|0 -30|01|-vs00|20","Antarctica/Troll|-00 +00 +02|0 0 -20|01212121212121212121212121212121212121212121212121212121212121212121|1puo0 hd0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|40","Antarctica/Vostok|-00 +06|0 -60|01|-tjA0|25","Europe/Oslo|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2awM0 Qm0 W6o0 5pf0 WM0 1fA0 1cM0 1cM0 1cM0 1cM0 wJc0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1qM0 WM0 zpc0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|62e4","Asia/Riyadh|LMT +03|-36.Q -30|01|-TvD6.Q|57e5","Asia/Almaty|LMT +05 +06 +07|-57.M -50 -60 -70|012323232323232323232321232323232323232323232323232|-1Pc57.M eUo7.M 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|15e5","Asia/Amman|LMT EET EEST|-2n.I -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1yW2n.I 1HiMn.I KL0 1oN0 11b0 1oN0 11b0 1pd0 1dz0 1cp0 11b0 1op0 11b0 fO10 1db0 1e10 1cL0 1cN0 1cL0 1cN0 1fz0 1pd0 10n0 1ld0 14n0 1hB0 15b0 1ip0 19X0 1cN0 1cL0 1cN0 17b0 1ld0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1So0 y00 1fc0 1dc0 1co0 1dc0 1cM0 1cM0 1cM0 1o00 11A0 1lc0 17c0 1cM0 1cM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|25e5","Asia/Anadyr|LMT +12 +13 +14 +11|-bN.U -c0 -d0 -e0 -b0|01232121212121212121214121212121212121212121212121212121212141|-1PcbN.U eUnN.U 23CL0 1db0 2q10 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|13e3","Asia/Aqtau|LMT +04 +05 +06|-3l.4 -40 -50 -60|012323232323232323232123232312121212121212121212|-1Pc3l.4 eUnl.4 24PX0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|15e4","Asia/Aqtobe|LMT +04 +05 +06|-3M.E -40 -50 -60|0123232323232323232321232323232323232323232323232|-1Pc3M.E eUnM.E 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|27e4","Asia/Ashgabat|LMT +04 +05 +06|-3R.w -40 -50 -60|0123232323232323232323212|-1Pc3R.w eUnR.w 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0|41e4","Asia/Atyrau|LMT +03 +05 +06 +04|-3r.I -30 -50 -60 -40|01232323232323232323242323232323232324242424242|-1Pc3r.I eUor.I 24PW0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 2sp0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0","Asia/Baghdad|BMT +03 +04|-2V.A -30 -40|012121212121212121212121212121212121212121212121212121|-26BeV.A 2ACnV.A 11b0 1cp0 1dz0 1dd0 1db0 1cN0 1cp0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1de0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0|66e5","Asia/Qatar|LMT +04 +03|-3q.8 -40 -30|012|-21Jfq.8 27BXq.8|96e4","Asia/Baku|LMT +03 +04 +05|-3j.o -30 -40 -50|01232323232323232323232123232323232323232323232323232323232323232|-1Pc3j.o 1jUoj.o WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 9Je0 1o00 11z0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5","Asia/Bangkok|BMT +07|-6G.4 -70|01|-218SG.4|15e6","Asia/Barnaul|LMT +06 +07 +08|-5z -60 -70 -80|0123232323232323232323212323232321212121212121212121212121212121212|-21S5z pCnz 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 p90 LE0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0","Asia/Beirut|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-21aq0 1on0 1410 1db0 19B0 1in0 1ip0 WL0 1lQp0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 q6N0 En0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1op0 11b0 dA10 17b0 1iN0 17b0 1iN0 17b0 1iN0 17b0 1vB0 SL0 1mp0 13z0 1iN0 17b0 1iN0 17b0 1jd0 12n0 1a10 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0|22e5","Asia/Bishkek|LMT +05 +06 +07|-4W.o -50 -60 -70|012323232323232323232321212121212121212121212121212|-1Pc4W.o eUnW.o 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2e00 1tX0 17b0 1ip0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1cPu 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0|87e4","Asia/Brunei|LMT +0730 +08|-7D.E -7u -80|012|-1KITD.E gDc9.E|42e4","Asia/Kolkata|MMT IST +0630|-5l.a -5u -6u|012121|-2zOtl.a 1r2LP.a 1un0 HB0 7zX0|15e6","Asia/Chita|LMT +08 +09 +10|-7x.Q -80 -90 -a0|012323232323232323232321232323232323232323232323232323232323232312|-21Q7x.Q pAnx.Q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3re0|33e4","Asia/Choibalsan|LMT +07 +08 +10 +09|-7C -70 -80 -a0 -90|0123434343434343434343434343434343434343434343424242|-2APHC 2UkoC cKn0 1da0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 3Db0 h1f0 1cJ0 1cP0 1cJ0|38e3","Asia/Shanghai|CST CDT|-80 -90|010101010101010101010101010|-1c2w0 Rz0 11d0 1wL0 A10 8HX0 1G10 Tz0 1ip0 1jX0 1cN0 11b0 1oN0 aL0 1tU30 Rb0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0|23e6","Asia/Colombo|MMT +0530 +06 +0630|-5j.w -5u -60 -6u|01231321|-2zOtj.w 1rFbN.w 1zzu 7Apu 23dz0 11zu n3cu|22e5","Asia/Dhaka|HMT +0630 +0530 +06 +07|-5R.k -6u -5u -60 -70|0121343|-18LFR.k 1unn.k HB0 m6n0 2kxbu 1i00|16e6","Asia/Damascus|LMT EET EEST|-2p.c -20 -30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-21Jep.c Hep.c 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1xRB0 11X0 1oN0 10L0 1pB0 11b0 1oN0 10L0 1mp0 13X0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 Nb0 1AN0 Nb0 bcp0 19X0 1gp0 19X0 3ld0 1xX0 Vd0 1Bz0 Sp0 1vX0 10p0 1dz0 1cN0 1cL0 1db0 1db0 1g10 1an0 1ap0 1db0 1fd0 1db0 1cN0 1db0 1dd0 1db0 1cp0 1dz0 1c10 1dX0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 19z0 1fB0 1qL0 11B0 1on0 Wp0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0|26e5","Asia/Dili|LMT +08 +09|-8m.k -80 -90|01212|-2le8m.k 1dnXm.k 1nfA0 Xld0|19e4","Asia/Dubai|LMT +04|-3F.c -40|01|-21JfF.c|39e5","Asia/Dushanbe|LMT +05 +06 +07|-4z.c -50 -60 -70|012323232323232323232321|-1Pc4z.c eUnz.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2hB0|76e4","Asia/Famagusta|LMT EET EEST +03|-2f.M -20 -30 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212312121212121212121212121212121212121212121|-1Vc2f.M 2a3cf.M 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00","Asia/Gaza|EET EEST IST IDT|-20 -30 -20 -30|0101010101010101010101010101010123232323232323232323232323232320101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1c2q0 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 pBd0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 dW0 hfB0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 11z0 1o10 14o0 1lA1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0|18e5","Asia/Hebron|EET EEST IST IDT|-20 -30 -20 -30|010101010101010101010101010101012323232323232323232323232323232010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1c2q0 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 pBd0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 dW0 hfB0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 12L0 1mN0 14o0 1lc0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0|25e4","Asia/Ho_Chi_Minh|LMT PLMT +07 +08 +09|-76.E -76.u -70 -80 -90|0123423232|-2yC76.E bK00.a 1h7b6.u 5lz0 18o0 3Oq0 k5b0 aW00 BAM0|90e5","Asia/Hong_Kong|LMT HKT HKST HKT JST|-7A.G -80 -90 -8u -90|0123412121212121212121212121212121212121212121212121212121212121212121|-2CFH0 1taO0 Hc0 xUu 9tBu 11z0 1tDu Rc0 1wo0 11A0 1cM0 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1nX0 U10 1tz0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 Rd0 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 17d0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|73e5","Asia/Hovd|LMT +06 +07 +08|-66.A -60 -70 -80|012323232323232323232323232323232323232323232323232|-2APG6.A 2Uko6.A cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|81e3","Asia/Irkutsk|IMT +07 +08 +09|-6V.5 -70 -80 -90|01232323232323232323232123232323232323232323232323232323232323232|-21zGV.5 pjXV.5 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4","Europe/Istanbul|IMT EET EEST +04 +03|-1U.U -20 -30 -40 -30|012121212121212121212121212121212121212121212121212121234343434342121212121212121212121212121212121212121212121212121212121212124|-2ogNU.U dzzU.U 11b0 8tB0 1on0 1410 1db0 19B0 1in0 3Rd0 Un0 1oN0 11b0 zSp0 CL0 mN0 1Vz0 1gN0 1pz0 5Rd0 1fz0 1yp0 ML0 1kp0 17b0 1ip0 17b0 1fB0 19X0 1jB0 18L0 1ip0 17z0 qdd0 xX0 3S10 Tz0 dA10 11z0 1o10 11z0 1qN0 11z0 1ze0 11B0 WM0 1qO0 WI0 1nX0 1rB0 10L0 11B0 1in0 17d0 1in0 2pX0 19E0 1fU0 16Q0 1iI0 16Q0 1iI0 1Vd0 pb0 3Kp0 14o0 1de0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1a00 1fA0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WO0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6","Asia/Jakarta|BMT +0720 +0730 +09 +08 WIB|-77.c -7k -7u -90 -80 -70|01232425|-1Q0Tk luM0 mPzO 8vWu 6kpu 4PXu xhcu|31e6","Asia/Jayapura|LMT +09 +0930 WIT|-9m.M -90 -9u -90|0123|-1uu9m.M sMMm.M L4nu|26e4","Asia/Jerusalem|JMT IST IDT IDDT|-2k.E -20 -30 -40|012121212121321212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-26Bek.E SyMk.E 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 3LB0 Em0 or0 1cn0 1dB0 16n0 10O0 1ja0 1tC0 14o0 1cM0 1a00 11A0 1Na0 An0 1MP0 AJ0 1Kp0 LC0 1oo0 Wl0 EQN0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 1hB0 1dX0 1ep0 1aL0 1eN0 17X0 1nf0 11z0 1tB0 19W0 1e10 17b0 1ep0 1gL0 18N0 1fz0 1eN0 17b0 1gq0 1gn0 19d0 1dz0 1c10 17X0 1hB0 1gn0 19d0 1dz0 1c10 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0|81e4","Asia/Kabul|+04 +0430|-40 -4u|01|-10Qs0|46e5","Asia/Kamchatka|LMT +11 +12 +13|-ay.A -b0 -c0 -d0|012323232323232323232321232323232323232323232323232323232323212|-1SLKy.A ivXy.A 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|18e4","Asia/Karachi|LMT +0530 +0630 +05 PKT PKST|-4s.c -5u -6u -50 -50 -60|012134545454|-2xoss.c 1qOKW.c 7zX0 eup0 LqMu 1fy00 1cL0 dK10 11b0 1610 1jX0|24e6","Asia/Urumqi|LMT +06|-5O.k -60|01|-1GgtO.k|32e5","Asia/Kathmandu|LMT +0530 +0545|-5F.g -5u -5J|012|-21JhF.g 2EGMb.g|12e5","Asia/Khandyga|LMT +08 +09 +10 +11|-92.d -80 -90 -a0 -b0|0123232323232323232323212323232323232323232323232343434343434343432|-21Q92.d pAp2.d 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 qK0 yN0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|66e2","Asia/Krasnoyarsk|LMT +06 +07 +08|-6b.q -60 -70 -80|01232323232323232323232123232323232323232323232323232323232323232|-21Hib.q prAb.q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|10e5","Asia/Kuala_Lumpur|SMT +07 +0720 +0730 +09 +08|-6T.p -70 -7k -7u -90 -80|0123435|-2Bg6T.p 17anT.p l5XE 17bO 8Fyu 1so1u|71e5","Asia/Kuching|LMT +0730 +08 +0820 +09|-7l.k -7u -80 -8k -90|0123232323232323242|-1KITl.k gDbP.k 6ynu AnE 1O0k AnE 1NAk AnE 1NAk AnE 1NAk AnE 1O0k AnE 1NAk AnE pAk 8Fz0|13e4","Asia/Macau|LMT CST +09 +10 CDT|-7y.a -80 -90 -a0 -90|012323214141414141414141414141414141414141414141414141414141414141414141|-2CFHy.a 1uqKy.a PX0 1kn0 15B0 11b0 4Qq0 1oM0 11c0 1ko0 1u00 11A0 1cM0 11c0 1o00 11A0 1o00 11A0 1oo0 1400 1o00 11A0 1o00 U00 1tA0 U00 1wo0 Rc0 1wru U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 Rd0 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 17d0 1cK0 1cO0 1cK0 1cO0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|57e4","Asia/Magadan|LMT +10 +11 +12|-a3.c -a0 -b0 -c0|012323232323232323232321232323232323232323232323232323232323232312|-1Pca3.c eUo3.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Cq0|95e3","Asia/Makassar|LMT MMT +08 +09 WITA|-7V.A -7V.A -80 -90 -80|01234|-21JjV.A vfc0 myLV.A 8ML0|15e5","Asia/Manila|PST PDT JST|-80 -90 -90|010201010|-1kJI0 AL0 cK10 65X0 mXB0 vX0 VK10 1db0|24e6","Asia/Nicosia|LMT EET EEST|-2d.s -20 -30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1Vc2d.s 2a3cd.s 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|32e4","Asia/Novokuznetsk|LMT +06 +07 +08|-5M.M -60 -70 -80|012323232323232323232321232323232323232323232323232323232323212|-1PctM.M eULM.M 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|55e4","Asia/Novosibirsk|LMT +06 +07 +08|-5v.E -60 -70 -80|0123232323232323232323212323212121212121212121212121212121212121212|-21Qnv.E pAFv.E 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 ml0 Os0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 4eN0|15e5","Asia/Omsk|LMT +05 +06 +07|-4R.u -50 -60 -70|01232323232323232323232123232323232323232323232323232323232323232|-224sR.u pMLR.u 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|12e5","Asia/Oral|LMT +03 +05 +06 +04|-3p.o -30 -50 -60 -40|01232323232323232424242424242424242424242424242|-1Pc3p.o eUop.o 23CK0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 1cM0 IM0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|27e4","Asia/Pontianak|LMT PMT +0730 +09 +08 WITA WIB|-7h.k -7h.k -7u -90 -80 -80 -70|012324256|-2ua7h.k XE00 munL.k 8Rau 6kpu 4PXu xhcu Wqnu|23e4","Asia/Pyongyang|LMT KST JST KST|-8n -8u -90 -90|012313|-2um8n 97XR 1lTzu 2Onc0 6BA0|29e5","Asia/Qostanay|LMT +04 +05 +06|-4e.s -40 -50 -60|012323232323232323232123232323232323232323232323|-1Pc4e.s eUoe.s 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0","Asia/Qyzylorda|LMT +04 +05 +06|-4l.Q -40 -50 -60|01232323232323232323232323232323232323232323232|-1Pc4l.Q eUol.Q 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 3ao0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 zQl0|73e4","Asia/Rangoon|RMT +0630 +09|-6o.L -6u -90|0121|-21Jio.L SmnS.L 7j9u|48e5","Asia/Sakhalin|LMT +09 +11 +12 +10|-9u.M -90 -b0 -c0 -a0|01232323232323232323232423232323232424242424242424242424242424242|-2AGVu.M 1BoMu.M 1qFa0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 2pB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|58e4","Asia/Samarkand|LMT +04 +05 +06|-4r.R -40 -50 -60|01232323232323232323232|-1Pc4r.R eUor.R 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|36e4","Asia/Seoul|LMT KST JST KST KDT KDT|-8r.Q -8u -90 -90 -9u -a0|0123141414141414135353|-2um8r.Q 97XV.Q 1m1zu kKo0 2I0u OL0 1FB0 Rb0 1qN0 TX0 1tB0 TX0 1tB0 TX0 1tB0 TX0 2ap0 12FBu 11A0 1o00 11A0|23e6","Asia/Srednekolymsk|LMT +10 +11 +12|-ae.Q -a0 -b0 -c0|01232323232323232323232123232323232323232323232323232323232323232|-1Pcae.Q eUoe.Q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|35e2","Asia/Taipei|CST JST CDT|-80 -90 -90|01020202020202020202020202020202020202020|-1iw80 joM0 1yo0 Tz0 1ip0 1jX0 1cN0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 10N0 1BX0 10p0 1pz0 10p0 1pz0 10p0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1BB0 ML0 1Bd0 ML0 uq10 1db0 1cN0 1db0 97B0 AL0|74e5","Asia/Tashkent|LMT +05 +06 +07|-4B.b -50 -60 -70|012323232323232323232321|-1Pc4B.b eUnB.b 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0|23e5","Asia/Tbilisi|TBMT +03 +04 +05|-2X.b -30 -40 -50|0123232323232323232323212121232323232323232323212|-1Pc2X.b 1jUnX.b WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cK0 1cL0 1cN0 1cL0 1cN0 2pz0 1cL0 1fB0 3Nz0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 An0 Os0 WM0|11e5","Asia/Tehran|LMT TMT +0330 +04 +05 +0430|-3p.I -3p.I -3u -40 -50 -4u|01234325252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-2btDp.I 1d3c0 1huLT.I TXu 1pz0 sN0 vAu 1cL0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0|14e6","Asia/Thimphu|LMT +0530 +06|-5W.A -5u -60|012|-Su5W.A 1BGMs.A|79e3","Asia/Tokyo|JST JDT|-90 -a0|010101010|-QJJ0 Rb0 1ld0 14n0 1zd0 On0 1zd0 On0|38e6","Asia/Tomsk|LMT +06 +07 +08|-5D.P -60 -70 -80|0123232323232323232323212323232323232323232323212121212121212121212|-21NhD.P pxzD.P 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 co0 1bB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Qp0|10e5","Asia/Ulaanbaatar|LMT +07 +08 +09|-77.w -70 -80 -90|012323232323232323232323232323232323232323232323232|-2APH7.w 2Uko7.w cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|12e5","Asia/Ust-Nera|LMT +08 +09 +12 +11 +10|-9w.S -80 -90 -c0 -b0 -a0|012343434343434343434345434343434343434343434343434343434343434345|-21Q9w.S pApw.S 23CL0 1d90 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|65e2","Asia/Vladivostok|LMT +09 +10 +11|-8L.v -90 -a0 -b0|01232323232323232323232123232323232323232323232323232323232323232|-1SJIL.v itXL.v 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4","Asia/Yakutsk|LMT +08 +09 +10|-8C.W -80 -90 -a0|01232323232323232323232123232323232323232323232323232323232323232|-21Q8C.W pAoC.W 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|28e4","Asia/Yekaterinburg|LMT PMT +04 +05 +06|-42.x -3J.5 -40 -50 -60|012343434343434343434343234343434343434343434343434343434343434343|-2ag42.x 7mQh.s qBvJ.5 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|14e5","Asia/Yerevan|LMT +03 +04 +05|-2W -30 -40 -50|0123232323232323232323212121212323232323232323232323232323232|-1Pc2W 1jUnW WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 4RX0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|13e5","Atlantic/Azores|HMT -02 -01 +00 WET|1S.w 20 10 0 0|01212121212121212121212121212121212121212121232123212321232121212121212121212121212121212121212121232323232323232323232323232323234323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2ldW0 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 qIl0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|25e4","Atlantic/Bermuda|LMT AST ADT|4j.i 40 30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1BnRE.G 1LTbE.G 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e3","Atlantic/Canary|LMT -01 WET WEST|11.A 10 0 -10|01232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UtaW.o XPAW.o 1lAK0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4","Atlantic/Cape_Verde|LMT -02 -01|1y.4 20 10|01212|-2ldW0 1eEo0 7zX0 1djf0|50e4","Atlantic/Faroe|LMT WET WEST|r.4 0 -10|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2uSnw.U 2Wgow.U 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|49e3","Atlantic/Madeira|FMT -01 +00 +01 WET WEST|17.A 10 0 -10 0 -10|01212121212121212121212121212121212121212121232123212321232121212121212121212121212121212121212121454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2ldX0 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 qIl0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e4","Atlantic/Reykjavik|LMT -01 +00 GMT|1s 10 0 0|012121212121212121212121212121212121212121212121212121212121212121213|-2uWmw mfaw 1Bd0 ML0 1LB0 Cn0 1LB0 3fX0 C10 HrX0 1cO0 LB0 1EL0 LA0 1C00 Oo0 1wo0 Rc0 1wo0 Rc0 1wo0 Rc0 1zc0 Oo0 1zc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0|12e4","Atlantic/South_Georgia|-02|20|0||30","Atlantic/Stanley|SMT -04 -03 -02|3P.o 40 30 20|012121212121212323212121212121212121212121212121212121212121212121212|-2kJw8.A 12bA8.A 19X0 1fB0 19X0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 Cn0 1Cc10 WL0 1qL0 U10 1tz0 2mN0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 U10 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qN0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 U10 1tz0 U10 1tz0 U10|21e2","Australia/Sydney|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|40e5","Australia/Adelaide|ACST ACDT|-9u -au|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 WM0 1qM0 Rc0 1zc0 U00 1tA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|11e5","Australia/Brisbane|AEST AEDT|-a0 -b0|01010101010101010|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0|20e5","Australia/Broken_Hill|ACST ACDT|-9u -au|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|18e3","Australia/Currie|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-29E80 19X0 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|746","Australia/Darwin|ACST ACDT|-9u -au|010101010|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0|12e4","Australia/Eucla|+0845 +0945|-8J -9J|0101010101010101010|-293kI xcX 10jd0 yL0 1cN0 1cL0 1gSp0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|368","Australia/Hobart|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-29E80 19X0 10jd0 yL0 1cN0 1cL0 1fB0 19X0 VfB0 1cM0 1o00 Rc0 1wo0 Rc0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|21e4","Australia/Lord_Howe|AEST +1030 +1130 +11|-a0 -au -bu -b0|0121212121313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313|raC0 1zdu Rb0 1zd0 On0 1zd0 On0 1zd0 On0 1zd0 TXu 1qMu WLu 1tAu WLu 1tAu TXu 1tAu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 11Au 1nXu 1qMu 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu 11zu 1o0u WLu 1qMu 14nu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu|347","Australia/Lindeman|AEST AEDT|-a0 -b0|010101010101010101010|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0|10","Australia/Melbourne|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1qM0 11A0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|39e5","Australia/Perth|AWST AWDT|-80 -90|0101010101010101010|-293jX xcX 10jd0 yL0 1cN0 1cL0 1gSp0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|18e5","CET|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00","Pacific/Easter|EMT -07 -06 -05|7h.s 70 60 50|012121212121212121212121212123232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1uSgG.w 1s4IG.w WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 2pA0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0|30e2","CST6CDT|CST CDT CWT CPT|60 50 50 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","EET|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00","Europe/Dublin|DMT IST GMT BST IST|p.l -y.D 0 -10 -10|01232323232324242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242|-2ax9y.D Rc0 1fzy.D 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 g600 14o0 1wo0 17c0 1io0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1a00 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1tA0 IM0 90o0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5","EST|EST|50|0|","EST5EDT|EST EDT EWT EPT|50 40 40 40|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 SgN0 8x40 iv0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","Etc/GMT-0|GMT|0|0|","Etc/GMT-1|+01|-10|0|","Pacific/Port_Moresby|+10|-a0|0||25e4","Etc/GMT-11|+11|-b0|0|","Pacific/Tarawa|+12|-c0|0||29e3","Etc/GMT-13|+13|-d0|0|","Etc/GMT-14|+14|-e0|0|","Etc/GMT-2|+02|-20|0|","Etc/GMT-3|+03|-30|0|","Etc/GMT-4|+04|-40|0|","Etc/GMT-5|+05|-50|0|","Etc/GMT-6|+06|-60|0|","Indian/Christmas|+07|-70|0||21e2","Etc/GMT-8|+08|-80|0|","Pacific/Palau|+09|-90|0||21e3","Etc/GMT+1|-01|10|0|","Etc/GMT+10|-10|a0|0|","Etc/GMT+11|-11|b0|0|","Etc/GMT+12|-12|c0|0|","Etc/GMT+3|-03|30|0|","Etc/GMT+4|-04|40|0|","Etc/GMT+5|-05|50|0|","Etc/GMT+6|-06|60|0|","Etc/GMT+7|-07|70|0|","Etc/GMT+8|-08|80|0|","Etc/GMT+9|-09|90|0|","Etc/UTC|UTC|0|0|","Europe/Amsterdam|AMT NST +0120 +0020 CEST CET|-j.w -1j.w -1k -k -20 -10|010101010101010101010101010101010101010101012323234545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545|-2aFcj.w 11b0 1iP0 11A0 1io0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1co0 1io0 1yo0 Pc0 1a00 1fA0 1Bc0 Mo0 1tc0 Uo0 1tA0 U00 1uo0 W00 1s00 VA0 1so0 Vc0 1sM0 UM0 1wo0 Rc0 1u00 Wo0 1rA0 W00 1s00 VA0 1sM0 UM0 1w00 fV0 BCX.w 1tA0 U00 1u00 Wo0 1sm0 601k WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|16e5","Europe/Andorra|WET CET CEST|0 -10 -20|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-UBA0 1xIN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|79e3","Europe/Astrakhan|LMT +03 +04 +05|-3c.c -30 -40 -50|012323232323232323212121212121212121212121212121212121212121212|-1Pcrc.c eUMc.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|10e5","Europe/Athens|AMT EET EEST CEST CET|-1y.Q -20 -30 -20 -10|012123434121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a61x.Q CNbx.Q mn0 kU10 9b0 3Es0 Xa0 1fb0 1dd0 k3X0 Nz0 SCp0 1vc0 SO0 1cM0 1a00 1ao0 1fc0 1a10 1fG0 1cg0 1dX0 1bX0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|35e5","Europe/London|GMT BST BDST|0 -10 -20|0101010101010101010101010101010101010101010101010121212121210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2axa0 Rc0 1fA0 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 2Rz0 Dc0 1zc0 Oo0 1zc0 Rc0 1wo0 17c0 1iM0 FA0 xB0 1fA0 1a00 14o0 bb0 LA0 xB0 Rc0 1wo0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1a00 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1tA0 IM0 90o0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|10e6","Europe/Belgrade|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-19RC0 3IP0 WM0 1fA0 1cM0 1cM0 1rc0 Qo0 1vmo0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5","Europe/Berlin|CET CEST CEMT|-10 -20 -30|01010101010101210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 kL0 Nc0 m10 WM0 1ao0 1cp0 dX0 jz0 Dd0 1io0 17c0 1fA0 1a00 1ehA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|41e5","Europe/Prague|CET CEST GMT|-10 -20 0|01010101010101010201010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 1cM0 1qM0 11c0 mp0 xA0 mn0 17c0 1io0 17c0 1fc0 1ao0 1bNc0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|13e5","Europe/Brussels|WET CET CEST WEST|0 -10 -20 -10|0121212103030303030303030303030303030303030303030303212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ehc0 3zX0 11c0 1iO0 11A0 1o00 11A0 my0 Ic0 1qM0 Rc0 1EM0 UM0 1u00 10o0 1io0 1io0 17c0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a30 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 y00 5Wn0 WM0 1fA0 1cM0 16M0 1iM0 16M0 1C00 Uo0 1eeo0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|21e5","Europe/Bucharest|BMT EET EEST|-1I.o -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1xApI.o 20LI.o RA0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Axc0 On0 1fA0 1a10 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|19e5","Europe/Budapest|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1ip0 17b0 1op0 1tb0 Q2m0 3Ne0 WM0 1fA0 1cM0 1cM0 1oJ0 1dc0 1030 1fA0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1iM0 1fA0 8Ha0 Rb0 1wN0 Rb0 1BB0 Lz0 1C20 LB0 SNX0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e5","Europe/Zurich|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-19Lc0 11A0 1o00 11A0 1xG10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|38e4","Europe/Chisinau|CMT BMT EET EEST CEST CET MSK MSD|-1T -1I.o -20 -30 -20 -10 -30 -40|012323232323232323234545467676767676767676767323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-26jdT wGMa.A 20LI.o RA0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 27A0 2en0 39g0 WM0 1fA0 1cM0 V90 1t7z0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 gL0 WO0 1cM0 1cM0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11D0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|67e4","Europe/Copenhagen|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2azC0 Tz0 VuO0 60q0 WM0 1fA0 1cM0 1cM0 1cM0 S00 1HA0 Nc0 1C00 Dc0 1Nc0 Ao0 1h5A0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5","Europe/Gibraltar|GMT BST BDST CET CEST|0 -10 -20 -10 -20|010101010101010101010101010101010101010101010101012121212121010121010101010101010101034343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-2axa0 Rc0 1fA0 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 2Rz0 Dc0 1zc0 Oo0 1zc0 Rc0 1wo0 17c0 1iM0 FA0 xB0 1fA0 1a00 14o0 bb0 LA0 xB0 Rc0 1wo0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 10Jz0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|30e3","Europe/Helsinki|HMT EET EEST|-1D.N -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1WuND.N OULD.N 1dA0 1xGq0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5","Europe/Kaliningrad|CET CEST CET CEST MSK MSD EEST EET +03|-10 -20 -20 -30 -30 -40 -30 -20 -30|0101010101010232454545454545454546767676767676767676767676767676767676767676787|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 Am0 Lb0 1en0 op0 1pNz0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|44e4","Europe/Kiev|KMT EET MSK CEST CET MSD EEST|-22.4 -20 -30 -20 -10 -40 -30|0123434252525252525252525256161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161|-1Pc22.4 eUo2.4 rnz0 2Hg0 WM0 1fA0 da0 1v4m0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 Db0 3220 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|34e5","Europe/Kirov|LMT +03 +04 +05|-3i.M -30 -40 -50|01232323232323232321212121212121212121212121212121212121212121|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|48e4","Europe/Lisbon|LMT WET WEST WEMT CET CEST|A.J 0 -10 -20 -10 -20|012121212121212121212121212121212121212121212321232123212321212121212121212121212121212121212121214121212121212121212121212121212124545454212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2le00 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 pvy0 1cM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e5","Europe/Luxembourg|LMT CET CEST WET WEST WEST WET|-o.A -10 -20 0 -10 -20 -10|0121212134343434343434343434343434343434343434343434565651212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2DG0o.A t6mo.A TB0 1nX0 Up0 1o20 11A0 rW0 CM0 1qP0 R90 1EO0 UK0 1u20 10m0 1ip0 1in0 17e0 19W0 1fB0 1db0 1cp0 1in0 17d0 1fz0 1a10 1in0 1a10 1in0 17f0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 vA0 60L0 WM0 1fA0 1cM0 17c0 1io0 16M0 1C00 Uo0 1eeo0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4","Europe/Madrid|WET WEST WEMT CET CEST|0 -10 -20 -10 -20|010101010101010101210343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-25Td0 19B0 1cL0 1dd0 b1z0 18p0 3HX0 17d0 1fz0 1a10 1io0 1a00 1in0 17d0 iIn0 Hd0 1cL0 bb0 1200 2s20 14n0 5aL0 Mp0 1vz0 17d0 1in0 17d0 1in0 17d0 1in0 17d0 6hX0 11B0 XHX0 1a10 1fz0 1a10 19X0 1cN0 1fz0 1a10 1fC0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|62e5","Europe/Malta|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2arB0 Lz0 1cN0 1db0 1410 1on0 Wp0 1qL0 17d0 1cL0 M3B0 5M20 WM0 1fA0 1co0 17c0 1iM0 16m0 1de0 1lc0 14m0 1lc0 WO0 1qM0 GTW0 On0 1C10 LA0 1C00 LA0 1EM0 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1co0 1cM0 1lA0 Xc0 1qq0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1iN0 19z0 1fB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|42e4","Europe/Minsk|MMT EET MSK CEST CET MSD EEST +03|-1O -20 -30 -20 -10 -40 -30 -30|01234343252525252525252525261616161616161616161616161616161616161617|-1Pc1O eUnO qNX0 3gQ0 WM0 1fA0 1cM0 Al0 1tsn0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 3Fc0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0|19e5","Europe/Monaco|PMT WET WEST WEMT CET CEST|-9.l 0 -10 -20 -10 -20|01212121212121212121212121212121212121212121212121232323232345454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 1u00 10o0 1io0 1wo0 Rc0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Df0 2RV0 11z0 11B0 1ze0 WM0 1fA0 1cM0 1fa0 1aq0 16M0 1ekn0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|38e3","Europe/Moscow|MMT MMT MST MDST MSD MSK +05 EET EEST MSK|-2u.h -2v.j -3v.j -4v.j -40 -30 -50 -20 -30 -40|012132345464575454545454545454545458754545454545454545454545454545454545454595|-2ag2u.h 2pyW.W 1bA0 11X0 GN0 1Hb0 c4v.j ik0 3DA0 dz0 15A0 c10 2q10 iM10 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|16e6","Europe/Paris|PMT WET WEST CEST CET WEMT|-9.l 0 -10 -20 -10 -20|0121212121212121212121212121212121212121212121212123434352543434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434|-2nco8.l cNb8.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 1u00 10o0 1io0 1wo0 Rc0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Df0 Ik0 5M30 WM0 1fA0 1cM0 Vx0 hB0 1aq0 16M0 1ekn0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e6","Europe/Riga|RMT LST EET MSK CEST CET MSD EEST|-1A.y -2A.y -20 -30 -20 -10 -40 -30|010102345454536363636363636363727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272|-25TzA.y 11A0 1iM0 ko0 gWm0 yDXA.y 2bX0 3fE0 WM0 1fA0 1cM0 1cM0 4m0 1sLy0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 1o00 11A0 1o00 11A0 1qM0 3oo0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|64e4","Europe/Rome|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2arB0 Lz0 1cN0 1db0 1410 1on0 Wp0 1qL0 17d0 1cL0 M3B0 5M20 WM0 1fA0 1cM0 16M0 1iM0 16m0 1de0 1lc0 14m0 1lc0 WO0 1qM0 GTW0 On0 1C10 LA0 1C00 LA0 1EM0 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1C00 LA0 1zc0 Oo0 1C00 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1zc0 Oo0 1fC0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|39e5","Europe/Samara|LMT +03 +04 +05|-3k.k -30 -40 -50|0123232323232323232121232323232323232323232323232323232323212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2y10 14m0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|12e5","Europe/Saratov|LMT +03 +04 +05|-34.i -30 -40 -50|012323232323232321212121212121212121212121212121212121212121212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 5810","Europe/Simferopol|SMT EET MSK CEST CET MSD EEST MSK|-2g -20 -30 -20 -10 -40 -30 -40|012343432525252525252525252161616525252616161616161616161616161616161616172|-1Pc2g eUog rEn0 2qs0 WM0 1fA0 1cM0 3V0 1u0L0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 4eL0 1cL0 1cN0 1cL0 1cN0 dX0 WL0 1cN0 1cL0 1fB0 1o30 11B0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4","Europe/Sofia|EET CET CEST EEST|-20 -10 -20 -30|01212103030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030|-168L0 WM0 1fA0 1cM0 1cM0 1cN0 1mKH0 1dd0 1fb0 1ap0 1fb0 1a20 1fy0 1a30 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5","Europe/Stockholm|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2azC0 TB0 2yDe0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|15e5","Europe/Tallinn|TMT CET CEST EET MSK MSD EEST|-1D -10 -20 -20 -30 -40 -30|012103421212454545454545454546363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363|-26oND teD 11A0 1Ta0 4rXl KSLD 2FX0 2Jg0 WM0 1fA0 1cM0 18J0 1sTX0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o10 11A0 1qM0 5QM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|41e4","Europe/Tirane|LMT CET CEST|-1j.k -10 -20|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glBj.k 14pcj.k 5LC0 WM0 4M0 1fCK0 10n0 1op0 11z0 1pd0 11z0 1qN0 WL0 1qp0 Xb0 1qp0 Xb0 1qp0 11z0 1lB0 11z0 1qN0 11z0 1iN0 16n0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|42e4","Europe/Ulyanovsk|LMT +03 +04 +05 +02|-3d.A -30 -40 -50 -20|01232323232323232321214121212121212121212121212121212121212121212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|13e5","Europe/Uzhgorod|CET CEST MSK MSD EET EEST|-10 -20 -30 -40 -20 -30|010101023232323232323232320454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-1cqL0 6i00 WM0 1fA0 1cM0 1ml0 1Cp0 1r3W0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 1Nf0 2pw0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e4","Europe/Vienna|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 3KM0 14o0 LA00 6i00 WM0 1fA0 1cM0 1cM0 1cM0 400 2qM0 1a00 1cM0 1cM0 1io0 17c0 1gHa0 19X0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|18e5","Europe/Vilnius|WMT KMT CET EET MSK CEST MSD EEST|-1o -1z.A -10 -20 -30 -20 -40 -30|012324525254646464646464646473737373737373737352537373737373737373737373737373737373737373737373737373737373737373737373|-293do 6ILM.o 1Ooz.A zz0 Mfd0 29W0 3is0 WM0 1fA0 1cM0 LV0 1tgL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11B0 1o00 11A0 1qM0 8io0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4","Europe/Volgograd|LMT +03 +04 +05|-2V.E -30 -40 -50|012323232323232321212121212121212121212121212121212121212121212|-21IqV.E psLV.E 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 9Jd0|10e5","Europe/Warsaw|WMT CET CEST EET EEST|-1o -10 -20 -20 -30|012121234312121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ctdo 1LXo 11d0 1iO0 11A0 1o00 11A0 1on0 11A0 6zy0 HWP0 5IM0 WM0 1fA0 1cM0 1dz0 1mL0 1en0 15B0 1aq0 1nA0 11A0 1io0 17c0 1fA0 1a00 iDX0 LA0 1cM0 1cM0 1C00 Oo0 1cM0 1cM0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1C00 LA0 uso0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e5","Europe/Zaporozhye|+0220 EET MSK CEST CET MSD EEST|-2k -20 -30 -20 -10 -40 -30|01234342525252525252525252526161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161|-1Pc2k eUok rdb0 2RE0 WM0 1fA0 8m0 1v9a0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cK0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|77e4","HST|HST|a0|0|","Indian/Chagos|LMT +05 +06|-4N.E -50 -60|012|-2xosN.E 3AGLN.E|30e2","Indian/Cocos|+0630|-6u|0||596","Indian/Kerguelen|-00 +05|0 -50|01|-MG00|130","Indian/Mahe|LMT +04|-3F.M -40|01|-2yO3F.M|79e3","Indian/Maldives|MMT +05|-4S -50|01|-olgS|35e4","Indian/Mauritius|LMT +04 +05|-3O -40 -50|012121|-2xorO 34unO 14L0 12kr0 11z0|15e4","Indian/Reunion|LMT +04|-3F.Q -40|01|-2mDDF.Q|84e4","Pacific/Kwajalein|+11 +10 +09 -12 +12|-b0 -a0 -90 c0 -c0|012034|-1kln0 akp0 6Up0 12ry0 Wan0|14e3","MET|MET MEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00","MST|MST|70|0|","MST7MDT|MST MDT MWT MPT|70 60 60 60|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","Pacific/Chatham|+1215 +1245 +1345|-cf -cJ -dJ|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-WqAf 1adef IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|600","Pacific/Apia|LMT -1130 -11 -10 +14 +13|bq.U bu b0 a0 -e0 -d0|01232345454545454545454545454545454545454545454545454545454|-2nDMx.4 1yW03.4 2rRbu 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|37e3","Pacific/Bougainville|+10 +09 +11|-a0 -90 -b0|0102|-16Wy0 7CN0 2MQp0|18e4","Pacific/Chuuk|+10 +09|-a0 -90|01010|-2ewy0 axB0 RVX0 axd0|49e3","Pacific/Efate|LMT +11 +12|-bd.g -b0 -c0|0121212121212121212121|-2l9nd.g 2Szcd.g 1cL0 1oN0 10L0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 Lz0 1Nd0 An0|66e3","Pacific/Enderbury|-12 -11 +13|c0 b0 -d0|012|nIc0 B7X0|1","Pacific/Fakaofo|-11 +13|b0 -d0|01|1Gfn0|483","Pacific/Fiji|LMT +12 +13|-bT.I -c0 -d0|0121212121212121212121212121212121212121212121212121212121212121|-2bUzT.I 3m8NT.I LA0 1EM0 IM0 nJc0 LA0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0|88e4","Pacific/Galapagos|LMT -05 -06|5W.o 50 60|01212|-1yVS1.A 2dTz1.A gNd0 rz0|25e3","Pacific/Gambier|LMT -09|8X.M 90|01|-2jof0.c|125","Pacific/Guadalcanal|LMT +11|-aD.M -b0|01|-2joyD.M|11e4","Pacific/Guam|GST +09 GDT ChST|-a0 -90 -b0 -a0|01020202020202020203|-18jK0 6pB0 AhB0 3QL0 g2p0 3p91 WOX rX0 1zd0 Rb0 1wp0 Rb0 5xd0 rX0 5sN0 zb1 1C0X On0 ULb0|17e4","Pacific/Honolulu|HST HDT HWT HPT HST|au 9u 9u 9u a0|0102304|-1thLu 8x0 lef0 8wWu iAu 46p0|37e4","Pacific/Kiritimati|-1040 -10 +14|aE a0 -e0|012|nIaE B7Xk|51e2","Pacific/Kosrae|+11 +09 +10 +12|-b0 -90 -a0 -c0|01021030|-2ewz0 axC0 HBy0 akp0 axd0 WOK0 1bdz0|66e2","Pacific/Majuro|+11 +09 +10 +12|-b0 -90 -a0 -c0|0102103|-2ewz0 axC0 HBy0 akp0 6RB0 12um0|28e3","Pacific/Marquesas|LMT -0930|9i 9u|01|-2joeG|86e2","Pacific/Pago_Pago|LMT SST|bm.M b0|01|-2nDMB.c|37e2","Pacific/Nauru|LMT +1130 +09 +12|-b7.E -bu -90 -c0|01213|-1Xdn7.E QCnB.E 7mqu 1lnbu|10e3","Pacific/Niue|-1120 -1130 -11|bk bu b0|012|-KfME 17y0a|12e2","Pacific/Norfolk|+1112 +1130 +1230 +11|-bc -bu -cu -b0|01213|-Kgbc W01G On0 1COp0|25e4","Pacific/Noumea|LMT +11 +12|-b5.M -b0 -c0|01212121|-2l9n5.M 2EqM5.M xX0 1PB0 yn0 HeP0 Ao0|98e3","Pacific/Pitcairn|-0830 -08|8u 80|01|18Vku|56","Pacific/Pohnpei|+11 +09 +10|-b0 -90 -a0|010210|-2ewz0 axC0 HBy0 akp0 axd0|34e3","Pacific/Rarotonga|-1030 -0930 -10|au 9u a0|012121212121212121212121212|lyWu IL0 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu|13e3","Pacific/Tahiti|LMT -10|9W.g a0|01|-2joe1.I|18e4","Pacific/Tongatapu|+1220 +13 +14|-ck -d0 -e0|0121212121|-1aB0k 2n5dk 15A0 1wo0 xz0 1Q10 xz0 zWN0 s00|75e3","PST8PDT|PST PDT PWT PPT|80 70 70 70|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261q0 1nX0 11B0 1nX0 SgN0 8x10 iy0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","WET|WET WEST|0 -10|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00"],links:["Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|Atlantic/St_Helena","Africa/Cairo|Egypt","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Lagos|Africa/Bangui","Africa/Lagos|Africa/Brazzaville","Africa/Lagos|Africa/Douala","Africa/Lagos|Africa/Kinshasa","Africa/Lagos|Africa/Libreville","Africa/Lagos|Africa/Luanda","Africa/Lagos|Africa/Malabo","Africa/Lagos|Africa/Niamey","Africa/Lagos|Africa/Porto-Novo","Africa/Maputo|Africa/Blantyre","Africa/Maputo|Africa/Bujumbura","Africa/Maputo|Africa/Gaborone","Africa/Maputo|Africa/Harare","Africa/Maputo|Africa/Kigali","Africa/Maputo|Africa/Lubumbashi","Africa/Maputo|Africa/Lusaka","Africa/Nairobi|Africa/Addis_Ababa","Africa/Nairobi|Africa/Asmara","Africa/Nairobi|Africa/Asmera","Africa/Nairobi|Africa/Dar_es_Salaam","Africa/Nairobi|Africa/Djibouti","Africa/Nairobi|Africa/Kampala","Africa/Nairobi|Africa/Mogadishu","Africa/Nairobi|Indian/Antananarivo","Africa/Nairobi|Indian/Comoro","Africa/Nairobi|Indian/Mayotte","Africa/Tripoli|Libya","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|US/Alaska","America/Argentina/Buenos_Aires|America/Buenos_Aires","America/Argentina/Catamarca|America/Argentina/ComodRivadavia","America/Argentina/Catamarca|America/Catamarca","America/Argentina/Cordoba|America/Cordoba","America/Argentina/Cordoba|America/Rosario","America/Argentina/Jujuy|America/Jujuy","America/Argentina/Mendoza|America/Mendoza","America/Atikokan|America/Coral_Harbour","America/Chicago|US/Central","America/Curacao|America/Aruba","America/Curacao|America/Kralendijk","America/Curacao|America/Lower_Princes","America/Denver|America/Shiprock","America/Denver|Navajo","America/Denver|US/Mountain","America/Detroit|US/Michigan","America/Edmonton|Canada/Mountain","America/Fort_Wayne|America/Indiana/Indianapolis","America/Fort_Wayne|America/Indianapolis","America/Fort_Wayne|US/East-Indiana","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/Indiana/Knox|America/Knox_IN","America/Indiana/Knox|US/Indiana-Starke","America/Jamaica|Jamaica","America/Kentucky/Louisville|America/Louisville","America/Los_Angeles|US/Pacific","America/Los_Angeles|US/Pacific-New","America/Manaus|Brazil/West","America/Mazatlan|Mexico/BajaSur","America/Mexico_City|Mexico/General","America/New_York|US/Eastern","America/Noronha|Brazil/DeNoronha","America/Panama|America/Cayman","America/Phoenix|US/Arizona","America/Port_of_Spain|America/Anguilla","America/Port_of_Spain|America/Antigua","America/Port_of_Spain|America/Dominica","America/Port_of_Spain|America/Grenada","America/Port_of_Spain|America/Guadeloupe","America/Port_of_Spain|America/Marigot","America/Port_of_Spain|America/Montserrat","America/Port_of_Spain|America/St_Barthelemy","America/Port_of_Spain|America/St_Kitts","America/Port_of_Spain|America/St_Lucia","America/Port_of_Spain|America/St_Thomas","America/Port_of_Spain|America/St_Vincent","America/Port_of_Spain|America/Tortola","America/Port_of_Spain|America/Virgin","America/Regina|Canada/Saskatchewan","America/Rio_Branco|America/Porto_Acre","America/Rio_Branco|Brazil/Acre","America/Santiago|Chile/Continental","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","America/Tijuana|America/Ensenada","America/Tijuana|America/Santa_Isabel","America/Tijuana|Mexico/BajaNorte","America/Toronto|America/Montreal","America/Toronto|Canada/Eastern","America/Vancouver|Canada/Pacific","America/Whitehorse|Canada/Yukon","America/Winnipeg|Canada/Central","Asia/Ashgabat|Asia/Ashkhabad","Asia/Bangkok|Asia/Phnom_Penh","Asia/Bangkok|Asia/Vientiane","Asia/Dhaka|Asia/Dacca","Asia/Dubai|Asia/Muscat","Asia/Ho_Chi_Minh|Asia/Saigon","Asia/Hong_Kong|Hongkong","Asia/Jerusalem|Asia/Tel_Aviv","Asia/Jerusalem|Israel","Asia/Kathmandu|Asia/Katmandu","Asia/Kolkata|Asia/Calcutta","Asia/Kuala_Lumpur|Asia/Singapore","Asia/Kuala_Lumpur|Singapore","Asia/Macau|Asia/Macao","Asia/Makassar|Asia/Ujung_Pandang","Asia/Nicosia|Europe/Nicosia","Asia/Qatar|Asia/Bahrain","Asia/Rangoon|Asia/Yangon","Asia/Riyadh|Asia/Aden","Asia/Riyadh|Asia/Kuwait","Asia/Seoul|ROK","Asia/Shanghai|Asia/Chongqing","Asia/Shanghai|Asia/Chungking","Asia/Shanghai|Asia/Harbin","Asia/Shanghai|PRC","Asia/Taipei|ROC","Asia/Tehran|Iran","Asia/Thimphu|Asia/Thimbu","Asia/Tokyo|Japan","Asia/Ulaanbaatar|Asia/Ulan_Bator","Asia/Urumqi|Asia/Kashgar","Atlantic/Faroe|Atlantic/Faeroe","Atlantic/Reykjavik|Iceland","Atlantic/South_Georgia|Etc/GMT+2","Australia/Adelaide|Australia/South","Australia/Brisbane|Australia/Queensland","Australia/Broken_Hill|Australia/Yancowinna","Australia/Darwin|Australia/North","Australia/Hobart|Australia/Tasmania","Australia/Lord_Howe|Australia/LHI","Australia/Melbourne|Australia/Victoria","Australia/Perth|Australia/West","Australia/Sydney|Australia/ACT","Australia/Sydney|Australia/Canberra","Australia/Sydney|Australia/NSW","Etc/GMT-0|Etc/GMT","Etc/GMT-0|Etc/GMT+0","Etc/GMT-0|Etc/GMT0","Etc/GMT-0|Etc/Greenwich","Etc/GMT-0|GMT","Etc/GMT-0|GMT+0","Etc/GMT-0|GMT-0","Etc/GMT-0|GMT0","Etc/GMT-0|Greenwich","Etc/UTC|Etc/UCT","Etc/UTC|Etc/Universal","Etc/UTC|Etc/Zulu","Etc/UTC|UCT","Etc/UTC|UTC","Etc/UTC|Universal","Etc/UTC|Zulu","Europe/Belgrade|Europe/Ljubljana","Europe/Belgrade|Europe/Podgorica","Europe/Belgrade|Europe/Sarajevo","Europe/Belgrade|Europe/Skopje","Europe/Belgrade|Europe/Zagreb","Europe/Chisinau|Europe/Tiraspol","Europe/Dublin|Eire","Europe/Helsinki|Europe/Mariehamn","Europe/Istanbul|Asia/Istanbul","Europe/Istanbul|Turkey","Europe/Lisbon|Portugal","Europe/London|Europe/Belfast","Europe/London|Europe/Guernsey","Europe/London|Europe/Isle_of_Man","Europe/London|Europe/Jersey","Europe/London|GB","Europe/London|GB-Eire","Europe/Moscow|W-SU","Europe/Oslo|Arctic/Longyearbyen","Europe/Oslo|Atlantic/Jan_Mayen","Europe/Prague|Europe/Bratislava","Europe/Rome|Europe/San_Marino","Europe/Rome|Europe/Vatican","Europe/Warsaw|Poland","Europe/Zurich|Europe/Busingen","Europe/Zurich|Europe/Vaduz","Indian/Christmas|Etc/GMT-7","Pacific/Auckland|Antarctica/McMurdo","Pacific/Auckland|Antarctica/South_Pole","Pacific/Auckland|NZ","Pacific/Chatham|NZ-CHAT","Pacific/Chuuk|Pacific/Truk","Pacific/Chuuk|Pacific/Yap","Pacific/Easter|Chile/EasterIsland","Pacific/Guam|Pacific/Saipan","Pacific/Honolulu|Pacific/Johnston","Pacific/Honolulu|US/Hawaii","Pacific/Kwajalein|Kwajalein","Pacific/Pago_Pago|Pacific/Midway","Pacific/Pago_Pago|Pacific/Samoa","Pacific/Pago_Pago|US/Samoa","Pacific/Palau|Etc/GMT-9","Pacific/Pohnpei|Pacific/Ponape","Pacific/Port_Moresby|Etc/GMT-10","Pacific/Tarawa|Etc/GMT-12","Pacific/Tarawa|Pacific/Funafuti","Pacific/Tarawa|Pacific/Wake","Pacific/Tarawa|Pacific/Wallis"]}),o}); \ No newline at end of file diff --git a/node_modules/moment-timezone/builds/moment-timezone.min.js b/node_modules/moment-timezone/builds/moment-timezone.min.js new file mode 100644 index 00000000..3a490fd0 --- /dev/null +++ b/node_modules/moment-timezone/builds/moment-timezone.min.js @@ -0,0 +1 @@ +!function(t,e){"use strict";"object"==typeof module&&module.exports?module.exports=e(require("moment")):"function"==typeof define&&define.amd?define(["moment"],e):e(t.moment)}(this,function(s){"use strict";var e,i={},f={},u={},c={};s&&"string"==typeof s.version||A("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var t=s.version.split("."),n=+t[0],o=+t[1];function a(t){return 96= 2.6.0. You are using Moment.js "+s.version+". See momentjs.com"),p.prototype={_set:function(t){this.name=t.name,this.abbrs=t.abbrs,this.untils=t.untils,this.offsets=t.offsets,this.population=t.population},_index:function(t){var e,n=+t,o=this.untils;for(e=0;e= 2.9.0. You are using Moment.js "+s.version+"."),s.defaultZone=t?O(t):null,s};var F=s.momentProperties;return"[object Array]"===Object.prototype.toString.call(F)?(F.push("_z"),F.push("_a")):F&&(F._z=null),s}); \ No newline at end of file diff --git a/node_modules/moment-timezone/changelog.md b/node_modules/moment-timezone/changelog.md new file mode 100644 index 00000000..e9a4c53f --- /dev/null +++ b/node_modules/moment-timezone/changelog.md @@ -0,0 +1,191 @@ +### `0.5.26` _2019-06-06_ +* Updated data to IANA TZDB `2019b` +* Fix: stabilize Array.sort [#762](https://github.com/moment/moment-timezone/pull/762) + +### `0.5.25` _2019-04-17_ +* Fix `moment.tz.dataVersion` to return `2019a` [#742](https://github.com/moment/moment-timezone/issues/742) +* Update path in bower.json + +### `0.5.24` _2019-04-17_ +* Updated data to IANA TZDB `2019a` [#737](https://github.com/moment/moment-timezone/issues/737) +* Start shipping both a 1970-1930 file and a rolling 10-year file [#614](https://github.com/moment/moment-timezone/issues/614) [#697](https://github.com/moment/moment-timezone/issues/697) +* Fixed bug where `_z` time zone name was not cleared with `.local()` or `.utcOffset(offset)` [#738](https://github.com/moment/moment-timezone/issues/738) + +### `0.5.23` _2018-10-28_ +* Fix minor issue with tz guessing in Russia [#691](https://github.com/moment/moment-timezone/pull/691) + +### `0.5.22` _2018-10-28_ +* Updated data to IANA TZDB `2018g` [#689](https://github.com/moment/moment-timezone/pull/689) +* Fix issue with missing LMT entries for some zones, and fix data builds on Linux and Windows [#308](https://github.com/moment/moment-timezone/issues/308) + +### `0.5.21` _2018-06-23_ +* Bugfix: revert breaking change introduced in 0.5.18 + +### `0.5.20` _2018-06-18_ +* Bugfix: accidentally commented code + +### `0.5.19` _2018-06-18_ +* Revert: moved moment to peerDependencies + +### `0.5.18` _2018-06-18_ +* Return error when timezone name is not a string. +* Moved moment to peerDependencies [#628](https://github.com/moment/moment-timezone/pull/628) +* Prefer nodejs to amd declaration [#573](https://github.com/moment/moment-timezone/pull/573) + +### `0.5.17` _2018-05-12_ +* Updated data to IANA TZDB `2018d`. [#616](https://github.com/moment/moment-timezone/pull/616) + +### `0.5.16` _2018-04-18_ +* Fixed Etc/UTC timezone recognition, updated tests. [#599](https://github.com/moment/moment-timezone/pull/599) +* Updated minified files to contain IANA TZDB `2018d` data + +### `0.5.15` _2018-04-17_ +* Updated data to IANA TZDB `2018d`. [#596](https://github.com/moment/moment-timezone/pull/596) + +### `0.5.14` _2017-10-30_ +* Ensure Intl response is valid when guessing time zone. [#553](https://github.com/moment/moment-timezone/pull/553) +* Updated data to IANA TZDB `2017c`. [#552](https://github.com/moment/moment-timezone/pull/552) +* Convert to tz keeping wall time [#505](https://github.com/moment/moment-timezone/pull/505) +* Make all time zones available for guessing. [#483](https://github.com/moment/moment-timezone/pull/483) +* zone.offset has been deprecated in favor of zone.utcOffset [#398](https://github.com/moment/moment-timezone/pull/398) +* Check for timestamp formats when parsing [#348](https://github.com/moment/moment-timezone/pull/348) + +### `0.5.13` _2017-04-04_ +* Bumped version to address Bower cache issues with last release. [#474](https://github.com/moment/moment-timezone/issues/474) +* (No actual changes otherwise) + +### `0.5.12` _2017-04-02_ +* Updated data to IANA TZDB `2017b`. [#422](https://github.com/moment/moment-timezone/pull/460) +* Build the truncated data file as 2012-2022 (+/- 5 years). + +### `0.5.11` _2016-12-23_ +* Remove log statement when data is loaded twice. [#352](https://github.com/moment/moment-timezone/pull/352) + +### `0.5.10` _2016-11-27_ +* Updated data to IANA TZDB `2016j`. [#422](https://github.com/moment/moment-timezone/pull/422) + +### `0.5.9` _2016-11-03_ +* Fixed the output of `moment.tz.version`. [#413](https://github.com/moment/moment-timezone/issues/413) + +### `0.5.8` _2016-11-03_ +* Updated data to IANA TZDB `2016i`. [#411](https://github.com/moment/moment-timezone/pull/411) + +### `0.5.7` _2016-10-21_ +* Updated data to IANA TZDB `2016h`. [#403](https://github.com/moment/moment-timezone/pull/403) + +### `0.5.6` _2016-10-08_ +* Updated data to IANA TZDB `2016g`. [#394](https://github.com/moment/moment-timezone/pull/394) + +### `0.5.5` _2016-07-24_ +* Updated data to IANA TZDB `2016f`. [#360](https://github.com/moment/moment-timezone/pull/360) + +### `0.5.4` _2016-05-03_ +* Updated data to IANA TZDB `2016d`. [#336](https://github.com/moment/moment-timezone/pull/336) +* Ignore the results from `Intl.DateTimeFormat().resolvedOptions().timeZone` if it is undefined. [#322](https://github.com/moment/moment-timezone/pull/322) + +### `0.5.3` _2016-03-24_ +* Updated data to IANA TZDB `2016c`. [#321](https://github.com/moment/moment-timezone/pull/321) + +### `0.5.2` _2016-03-15_ +* Updated data to IANA TZDB `2016b`. [#315](https://github.com/moment/moment-timezone/pull/315) + +### `0.5.1` _2016-03-01_ +* Updated data to IANA TZDB `2016a`. [#299](https://github.com/moment/moment-timezone/pull/299) +* Fixed bug when `Date#toTimeString` did not return a known format. [#302](https://github.com/moment/moment-timezone/pull/302) [#303](https://github.com/moment/moment-timezone/pull/303) +* Added lookup on `Intl.DateTimeFormat().resolvedOptions().timeZone` to `moment.tz.guess()`. [#304](https://github.com/moment/moment-timezone/pull/304) [#291](https://github.com/moment/moment-timezone/pull/291) + +### `0.5.0` _2015-12-28_ +* Added support for guessing the user's timezone via `moment.tz.guess()`. [#285](https://github.com/moment/moment-timezone/pull/285) +* Fixed UMD export issue when there was an html element with `id=exports`. [#275](https://github.com/moment/moment-timezone/pull/275) +* Removed jspm specific dependencies from `package.json`. [#284](https://github.com/moment/moment-timezone/pull/284) + +### `0.4.1` _2015-10-07_ +* Updated data to IANA TZDB `2015e`. [#253](https://github.com/moment/moment-timezone/pull/253) +* Updated data to IANA TZDB `2015f`. [#253](https://github.com/moment/moment-timezone/pull/253) +* Updated data to IANA TZDB `2015g`. [#255](https://github.com/moment/moment-timezone/pull/255) +* Added jspm dependencies for moment. [#234](https://github.com/moment/moment-timezone/pull/234) +* Included builds directory in npm. [#237](https://github.com/moment/moment-timezone/pull/237) +* Removed version field from bower.json. [#230](https://github.com/moment/moment-timezone/pull/230) + +### `0.4.0` _2015-05-30_ +* Updated data to IANA TZDB `2015b`. [#201](https://github.com/moment/moment-timezone/pull/201) +* Updated data to IANA TZDB `2015c`. [#214](https://github.com/moment/moment-timezone/pull/214) +* Updated data to IANA TZDB `2015d`. [#214](https://github.com/moment/moment-timezone/pull/214) +* Updated zone getter to allow lazy unpacking to improve initial page load times. [#216](https://github.com/moment/moment-timezone/pull/216) +* Added a `package.json` `jspm:main` entry point. [#194](https://github.com/moment/moment-timezone/pull/194) +* Added `composer.json`. [#222](https://github.com/moment/moment-timezone/pull/222) +* Added an error message when trying to load moment-timezone twice. [#212](https://github.com/moment/moment-timezone/pull/212) + +### `0.3.1` _2015-03-16_ +* Updated data to IANA TZDB `2015a`. [#183](https://github.com/moment/moment-timezone/pull/183) + +### `0.3.0` _2015-01-13_ + +* *Breaking:* Added country data to the `meta/*.json` files. Restructured the data to support multiple countries per zone. [#162](https://github.com/moment/moment-timezone/pull/162) +* Added the ability to set a default timezone for all new moments. [#152](https://github.com/moment/moment-timezone/pull/152) +* Fixed a bug when passing a moment with an offset to `moment.tz`. [#169](https://github.com/moment/moment-timezone/pull/169) +* Fixed a deprecation in moment core, changing `moment#zone` to `moment#utcOffset`. [#168](https://github.com/moment/moment-timezone/pull/168) + +### `0.2.5` _2014-11-12_ +* Updated data to IANA TZDB `2014j`. [#151](https://github.com/moment/moment-timezone/pull/151) + +### `0.2.4` _2014-10-20_ +* Updated data to IANA TZDB `2014i`. [#142](https://github.com/moment/moment-timezone/pull/142) + +### `0.2.3` _2014-10-20_ +* Updated data to IANA TZDB `2014h`. [#141](https://github.com/moment/moment-timezone/pull/141) + +### `0.2.2` _2014-09-04_ +* Updated data to IANA TZDB `2014g`. [#126](https://github.com/moment/moment-timezone/pull/126) +* Added a warning when using `moment-timezone` with `moment<2.6.0`. + +### `0.2.1` _2014-08-02_ +* Fixed support for `moment@2.8.1+`. + +### `0.2.0` _2014-07-21_ +* Added the ability to configure whether ambiguous or invalid input is rolled forward or backward. [#101](https://github.com/moment/moment-timezone/pull/101) +* Added `moment>=2.6.0` as a dependency in `bower.json`. [#107](https://github.com/moment/moment-timezone/issues/107) +* Fixed getting the name of a zone that was added as a linked zone. [#104](https://github.com/moment/moment-timezone/pull/104) +* Added an error message when a zone was not loaded. [#106](https://github.com/moment/moment-timezone/issues/106) + +### `0.1.0` _2014-06-23_ +* *Breaking:* Changed data format from Zones+Rules to just Zones. [#82](https://github.com/moment/moment-timezone/pull/82) +* *Breaking:* Removed `moment.tz.{addRule,addZone,zoneExists,zones}` as they are no longer relevant with the new data format. +* Made library 20x faster. [JSPerf results](http://jsperf.com/moment-timezone-0-1-0/2) +* Completely rewrote internals to support new data format. +* Updated the data collection process to get data directly from http://www.iana.org/time-zones. +* Updated data to IANA TZDB `2014e`. +* Updated `bower.json` to use a browser specific `main:` entry point. +* Added built files with included data. +* Added support for accurately parsing input around DST changes. [#93](https://github.com/moment/moment-timezone/pull/93) +* Added comprehensive documentation at [momentjs.com/timezone/docs/](http://momentjs.com/timezone/docs/). +* Added `moment.tz.link` for linking two identical zones. +* Added `moment.tz.zone` for getting a loaded zone. +* Added `moment.tz.load` for loading a bundled version of data from the IANA TZDB. +* Added `moment.tz.names` for getting the names of all the loaded timezones. +* Added `moment.tz.unpack` and `moment.tz.unpackBase60` for unpacking data. +* Added `moment-timezone-utils.js` for working with the packed and unpacked data. +* Fixed major memory leak. [#79](https://github.com/moment/moment-timezone/issues/79) +* Fixed global export to allow use in web workers. [#78](https://github.com/moment/moment-timezone/pull/78) +* Fixed global export in browser environments that define `window.module`. [#76](https://github.com/moment/moment-timezone/pull/76) + +### `0.0.6` _2014-04-20_ +* Fixed issue with preventing loading moment-timezone more than once. [#75](https://github.com/moment/moment-timezone/pull/75) + +### `0.0.5` _2014-04-17_ +* Improved performance with memoization. [#39](https://github.com/moment/moment-timezone/issues/39) +* Published only necessary files to npm. [#46](https://github.com/moment/moment-timezone/issues/46) +* Added better handling of timezones around DST. [#53](https://github.com/moment/moment-timezone/issues/53) [#61](https://github.com/moment/moment-timezone/issues/61) [#70](https://github.com/moment/moment-timezone/issues/70) +* Added Browserify support. [#41](https://github.com/moment/moment-timezone/issues/41) +* Added `moment.tz.zoneExists` [#73](https://github.com/moment/moment-timezone/issues/73) +* Fixed cloning moments with a timezone. [#71](https://github.com/moment/moment-timezone/issues/71) +* Prevent loading moment-timezone more than once. [#74](https://github.com/moment/moment-timezone/issues/74) + +### `0.0.3` _2013-10-10_ +* Added Bower support. +* Added support for newer versions of moment. +* Added support for constructing a moment with a string and zone. +* Added more links and timezone names in moment-timezone.json + +### `0.0.1` _2013-07-17_ +* Initial version. diff --git a/node_modules/moment-timezone/composer.json b/node_modules/moment-timezone/composer.json new file mode 100644 index 00000000..c072a49b --- /dev/null +++ b/node_modules/moment-timezone/composer.json @@ -0,0 +1,43 @@ +{ + "name": "moment/moment-timezone", + "description": "Parse and display dates in any timezone", + "version": "0.5.26", + "keywords": [ + "moment", + "date", + "time", + "timezone", + "olson", + "iana", + "zone", + "tz" + ], + "homepage": "http://momentjs.com/timezone/", + "license": "MIT", + "support": { + "issues": "https://github.com/moment/moment-timezone/issues", + "source": "https://github.com/moment/moment-timezone" + }, + "authors": [ + { + "name": "Tim Wood", + "email": "washwithcare@gmail.com", + "homepage": "http://timwoodcreates.com/" + } + ], + "type": "component", + "require": { + "robloach/component-installer": "*", + "moment/moment": ">=2.9.0" + }, + "extra": { + "component": { + "scripts": [ + "moment-timezone.js" + ], + "files": [ + "builds/*.js" + ] + } + } +} diff --git a/node_modules/moment-timezone/data/meta/latest.json b/node_modules/moment-timezone/data/meta/latest.json new file mode 100644 index 00000000..8c603eb9 --- /dev/null +++ b/node_modules/moment-timezone/data/meta/latest.json @@ -0,0 +1,5130 @@ +{ + "countries": { + "AD": { + "name": "Andorra", + "abbr": "AD", + "zones": [ + "Europe/Andorra" + ] + }, + "AE": { + "name": "United Arab Emirates", + "abbr": "AE", + "zones": [ + "Asia/Dubai" + ] + }, + "AF": { + "name": "Afghanistan", + "abbr": "AF", + "zones": [ + "Asia/Kabul" + ] + }, + "AG": { + "name": "Antigua & Barbuda", + "abbr": "AG", + "zones": [ + "America/Port_of_Spain" + ] + }, + "AI": { + "name": "Anguilla", + "abbr": "AI", + "zones": [ + "America/Port_of_Spain" + ] + }, + "AL": { + "name": "Albania", + "abbr": "AL", + "zones": [ + "Europe/Tirane" + ] + }, + "AM": { + "name": "Armenia", + "abbr": "AM", + "zones": [ + "Asia/Yerevan" + ] + }, + "AO": { + "name": "Angola", + "abbr": "AO", + "zones": [ + "Africa/Lagos" + ] + }, + "AQ": { + "name": "Antarctica", + "abbr": "AQ", + "zones": [ + "Antarctica/Casey", + "Antarctica/Davis", + "Antarctica/DumontDUrville", + "Antarctica/Mawson", + "Antarctica/Palmer", + "Antarctica/Rothera", + "Antarctica/Syowa", + "Antarctica/Troll", + "Antarctica/Vostok", + "Pacific/Auckland" + ] + }, + "AR": { + "name": "Argentina", + "abbr": "AR", + "zones": [ + "America/Argentina/Buenos_Aires", + "America/Argentina/Cordoba", + "America/Argentina/Salta", + "America/Argentina/Jujuy", + "America/Argentina/Tucuman", + "America/Argentina/Catamarca", + "America/Argentina/La_Rioja", + "America/Argentina/San_Juan", + "America/Argentina/Mendoza", + "America/Argentina/San_Luis", + "America/Argentina/Rio_Gallegos", + "America/Argentina/Ushuaia" + ] + }, + "AS": { + "name": "Samoa (American)", + "abbr": "AS", + "zones": [ + "Pacific/Pago_Pago" + ] + }, + "AT": { + "name": "Austria", + "abbr": "AT", + "zones": [ + "Europe/Vienna" + ] + }, + "AU": { + "name": "Australia", + "abbr": "AU", + "zones": [ + "Australia/Lord_Howe", + "Antarctica/Macquarie", + "Australia/Hobart", + "Australia/Currie", + "Australia/Melbourne", + "Australia/Sydney", + "Australia/Broken_Hill", + "Australia/Brisbane", + "Australia/Lindeman", + "Australia/Adelaide", + "Australia/Darwin", + "Australia/Perth", + "Australia/Eucla" + ] + }, + "AW": { + "name": "Aruba", + "abbr": "AW", + "zones": [ + "America/Curacao" + ] + }, + "AX": { + "name": "Åland Islands", + "abbr": "AX", + "zones": [ + "Europe/Helsinki" + ] + }, + "AZ": { + "name": "Azerbaijan", + "abbr": "AZ", + "zones": [ + "Asia/Baku" + ] + }, + "BA": { + "name": "Bosnia & Herzegovina", + "abbr": "BA", + "zones": [ + "Europe/Belgrade" + ] + }, + "BB": { + "name": "Barbados", + "abbr": "BB", + "zones": [ + "America/Barbados" + ] + }, + "BD": { + "name": "Bangladesh", + "abbr": "BD", + "zones": [ + "Asia/Dhaka" + ] + }, + "BE": { + "name": "Belgium", + "abbr": "BE", + "zones": [ + "Europe/Brussels" + ] + }, + "BF": { + "name": "Burkina Faso", + "abbr": "BF", + "zones": [ + "Africa/Abidjan" + ] + }, + "BG": { + "name": "Bulgaria", + "abbr": "BG", + "zones": [ + "Europe/Sofia" + ] + }, + "BH": { + "name": "Bahrain", + "abbr": "BH", + "zones": [ + "Asia/Qatar" + ] + }, + "BI": { + "name": "Burundi", + "abbr": "BI", + "zones": [ + "Africa/Maputo" + ] + }, + "BJ": { + "name": "Benin", + "abbr": "BJ", + "zones": [ + "Africa/Lagos" + ] + }, + "BL": { + "name": "St Barthelemy", + "abbr": "BL", + "zones": [ + "America/Port_of_Spain" + ] + }, + "BM": { + "name": "Bermuda", + "abbr": "BM", + "zones": [ + "Atlantic/Bermuda" + ] + }, + "BN": { + "name": "Brunei", + "abbr": "BN", + "zones": [ + "Asia/Brunei" + ] + }, + "BO": { + "name": "Bolivia", + "abbr": "BO", + "zones": [ + "America/La_Paz" + ] + }, + "BQ": { + "name": "Caribbean NL", + "abbr": "BQ", + "zones": [ + "America/Curacao" + ] + }, + "BR": { + "name": "Brazil", + "abbr": "BR", + "zones": [ + "America/Noronha", + "America/Belem", + "America/Fortaleza", + "America/Recife", + "America/Araguaina", + "America/Maceio", + "America/Bahia", + "America/Sao_Paulo", + "America/Campo_Grande", + "America/Cuiaba", + "America/Santarem", + "America/Porto_Velho", + "America/Boa_Vista", + "America/Manaus", + "America/Eirunepe", + "America/Rio_Branco" + ] + }, + "BS": { + "name": "Bahamas", + "abbr": "BS", + "zones": [ + "America/Nassau" + ] + }, + "BT": { + "name": "Bhutan", + "abbr": "BT", + "zones": [ + "Asia/Thimphu" + ] + }, + "BW": { + "name": "Botswana", + "abbr": "BW", + "zones": [ + "Africa/Maputo" + ] + }, + "BY": { + "name": "Belarus", + "abbr": "BY", + "zones": [ + "Europe/Minsk" + ] + }, + "BZ": { + "name": "Belize", + "abbr": "BZ", + "zones": [ + "America/Belize" + ] + }, + "CA": { + "name": "Canada", + "abbr": "CA", + "zones": [ + "America/St_Johns", + "America/Halifax", + "America/Glace_Bay", + "America/Moncton", + "America/Goose_Bay", + "America/Blanc-Sablon", + "America/Toronto", + "America/Nipigon", + "America/Thunder_Bay", + "America/Iqaluit", + "America/Pangnirtung", + "America/Atikokan", + "America/Winnipeg", + "America/Rainy_River", + "America/Resolute", + "America/Rankin_Inlet", + "America/Regina", + "America/Swift_Current", + "America/Edmonton", + "America/Cambridge_Bay", + "America/Yellowknife", + "America/Inuvik", + "America/Creston", + "America/Dawson_Creek", + "America/Fort_Nelson", + "America/Vancouver", + "America/Whitehorse", + "America/Dawson" + ] + }, + "CC": { + "name": "Cocos (Keeling) Islands", + "abbr": "CC", + "zones": [ + "Indian/Cocos" + ] + }, + "CD": { + "name": "Congo (Dem. Rep.)", + "abbr": "CD", + "zones": [ + "Africa/Maputo", + "Africa/Lagos" + ] + }, + "CF": { + "name": "Central African Rep.", + "abbr": "CF", + "zones": [ + "Africa/Lagos" + ] + }, + "CG": { + "name": "Congo (Rep.)", + "abbr": "CG", + "zones": [ + "Africa/Lagos" + ] + }, + "CH": { + "name": "Switzerland", + "abbr": "CH", + "zones": [ + "Europe/Zurich" + ] + }, + "CI": { + "name": "Côte d'Ivoire", + "abbr": "CI", + "zones": [ + "Africa/Abidjan" + ] + }, + "CK": { + "name": "Cook Islands", + "abbr": "CK", + "zones": [ + "Pacific/Rarotonga" + ] + }, + "CL": { + "name": "Chile", + "abbr": "CL", + "zones": [ + "America/Santiago", + "America/Punta_Arenas", + "Pacific/Easter" + ] + }, + "CM": { + "name": "Cameroon", + "abbr": "CM", + "zones": [ + "Africa/Lagos" + ] + }, + "CN": { + "name": "China", + "abbr": "CN", + "zones": [ + "Asia/Shanghai", + "Asia/Urumqi" + ] + }, + "CO": { + "name": "Colombia", + "abbr": "CO", + "zones": [ + "America/Bogota" + ] + }, + "CR": { + "name": "Costa Rica", + "abbr": "CR", + "zones": [ + "America/Costa_Rica" + ] + }, + "CU": { + "name": "Cuba", + "abbr": "CU", + "zones": [ + "America/Havana" + ] + }, + "CV": { + "name": "Cape Verde", + "abbr": "CV", + "zones": [ + "Atlantic/Cape_Verde" + ] + }, + "CW": { + "name": "Curaçao", + "abbr": "CW", + "zones": [ + "America/Curacao" + ] + }, + "CX": { + "name": "Christmas Island", + "abbr": "CX", + "zones": [ + "Indian/Christmas" + ] + }, + "CY": { + "name": "Cyprus", + "abbr": "CY", + "zones": [ + "Asia/Nicosia", + "Asia/Famagusta" + ] + }, + "CZ": { + "name": "Czech Republic", + "abbr": "CZ", + "zones": [ + "Europe/Prague" + ] + }, + "DE": { + "name": "Germany", + "abbr": "DE", + "zones": [ + "Europe/Zurich", + "Europe/Berlin" + ] + }, + "DJ": { + "name": "Djibouti", + "abbr": "DJ", + "zones": [ + "Africa/Nairobi" + ] + }, + "DK": { + "name": "Denmark", + "abbr": "DK", + "zones": [ + "Europe/Copenhagen" + ] + }, + "DM": { + "name": "Dominica", + "abbr": "DM", + "zones": [ + "America/Port_of_Spain" + ] + }, + "DO": { + "name": "Dominican Republic", + "abbr": "DO", + "zones": [ + "America/Santo_Domingo" + ] + }, + "DZ": { + "name": "Algeria", + "abbr": "DZ", + "zones": [ + "Africa/Algiers" + ] + }, + "EC": { + "name": "Ecuador", + "abbr": "EC", + "zones": [ + "America/Guayaquil", + "Pacific/Galapagos" + ] + }, + "EE": { + "name": "Estonia", + "abbr": "EE", + "zones": [ + "Europe/Tallinn" + ] + }, + "EG": { + "name": "Egypt", + "abbr": "EG", + "zones": [ + "Africa/Cairo" + ] + }, + "EH": { + "name": "Western Sahara", + "abbr": "EH", + "zones": [ + "Africa/El_Aaiun" + ] + }, + "ER": { + "name": "Eritrea", + "abbr": "ER", + "zones": [ + "Africa/Nairobi" + ] + }, + "ES": { + "name": "Spain", + "abbr": "ES", + "zones": [ + "Europe/Madrid", + "Africa/Ceuta", + "Atlantic/Canary" + ] + }, + "ET": { + "name": "Ethiopia", + "abbr": "ET", + "zones": [ + "Africa/Nairobi" + ] + }, + "FI": { + "name": "Finland", + "abbr": "FI", + "zones": [ + "Europe/Helsinki" + ] + }, + "FJ": { + "name": "Fiji", + "abbr": "FJ", + "zones": [ + "Pacific/Fiji" + ] + }, + "FK": { + "name": "Falkland Islands", + "abbr": "FK", + "zones": [ + "Atlantic/Stanley" + ] + }, + "FM": { + "name": "Micronesia", + "abbr": "FM", + "zones": [ + "Pacific/Chuuk", + "Pacific/Pohnpei", + "Pacific/Kosrae" + ] + }, + "FO": { + "name": "Faroe Islands", + "abbr": "FO", + "zones": [ + "Atlantic/Faroe" + ] + }, + "FR": { + "name": "France", + "abbr": "FR", + "zones": [ + "Europe/Paris" + ] + }, + "GA": { + "name": "Gabon", + "abbr": "GA", + "zones": [ + "Africa/Lagos" + ] + }, + "GB": { + "name": "Britain (UK)", + "abbr": "GB", + "zones": [ + "Europe/London" + ] + }, + "GD": { + "name": "Grenada", + "abbr": "GD", + "zones": [ + "America/Port_of_Spain" + ] + }, + "GE": { + "name": "Georgia", + "abbr": "GE", + "zones": [ + "Asia/Tbilisi" + ] + }, + "GF": { + "name": "French Guiana", + "abbr": "GF", + "zones": [ + "America/Cayenne" + ] + }, + "GG": { + "name": "Guernsey", + "abbr": "GG", + "zones": [ + "Europe/London" + ] + }, + "GH": { + "name": "Ghana", + "abbr": "GH", + "zones": [ + "Africa/Accra" + ] + }, + "GI": { + "name": "Gibraltar", + "abbr": "GI", + "zones": [ + "Europe/Gibraltar" + ] + }, + "GL": { + "name": "Greenland", + "abbr": "GL", + "zones": [ + "America/Godthab", + "America/Danmarkshavn", + "America/Scoresbysund", + "America/Thule" + ] + }, + "GM": { + "name": "Gambia", + "abbr": "GM", + "zones": [ + "Africa/Abidjan" + ] + }, + "GN": { + "name": "Guinea", + "abbr": "GN", + "zones": [ + "Africa/Abidjan" + ] + }, + "GP": { + "name": "Guadeloupe", + "abbr": "GP", + "zones": [ + "America/Port_of_Spain" + ] + }, + "GQ": { + "name": "Equatorial Guinea", + "abbr": "GQ", + "zones": [ + "Africa/Lagos" + ] + }, + "GR": { + "name": "Greece", + "abbr": "GR", + "zones": [ + "Europe/Athens" + ] + }, + "GS": { + "name": "South Georgia & the South Sandwich Islands", + "abbr": "GS", + "zones": [ + "Atlantic/South_Georgia" + ] + }, + "GT": { + "name": "Guatemala", + "abbr": "GT", + "zones": [ + "America/Guatemala" + ] + }, + "GU": { + "name": "Guam", + "abbr": "GU", + "zones": [ + "Pacific/Guam" + ] + }, + "GW": { + "name": "Guinea-Bissau", + "abbr": "GW", + "zones": [ + "Africa/Bissau" + ] + }, + "GY": { + "name": "Guyana", + "abbr": "GY", + "zones": [ + "America/Guyana" + ] + }, + "HK": { + "name": "Hong Kong", + "abbr": "HK", + "zones": [ + "Asia/Hong_Kong" + ] + }, + "HN": { + "name": "Honduras", + "abbr": "HN", + "zones": [ + "America/Tegucigalpa" + ] + }, + "HR": { + "name": "Croatia", + "abbr": "HR", + "zones": [ + "Europe/Belgrade" + ] + }, + "HT": { + "name": "Haiti", + "abbr": "HT", + "zones": [ + "America/Port-au-Prince" + ] + }, + "HU": { + "name": "Hungary", + "abbr": "HU", + "zones": [ + "Europe/Budapest" + ] + }, + "ID": { + "name": "Indonesia", + "abbr": "ID", + "zones": [ + "Asia/Jakarta", + "Asia/Pontianak", + "Asia/Makassar", + "Asia/Jayapura" + ] + }, + "IE": { + "name": "Ireland", + "abbr": "IE", + "zones": [ + "Europe/Dublin" + ] + }, + "IL": { + "name": "Israel", + "abbr": "IL", + "zones": [ + "Asia/Jerusalem" + ] + }, + "IM": { + "name": "Isle of Man", + "abbr": "IM", + "zones": [ + "Europe/London" + ] + }, + "IN": { + "name": "India", + "abbr": "IN", + "zones": [ + "Asia/Kolkata" + ] + }, + "IO": { + "name": "British Indian Ocean Territory", + "abbr": "IO", + "zones": [ + "Indian/Chagos" + ] + }, + "IQ": { + "name": "Iraq", + "abbr": "IQ", + "zones": [ + "Asia/Baghdad" + ] + }, + "IR": { + "name": "Iran", + "abbr": "IR", + "zones": [ + "Asia/Tehran" + ] + }, + "IS": { + "name": "Iceland", + "abbr": "IS", + "zones": [ + "Atlantic/Reykjavik" + ] + }, + "IT": { + "name": "Italy", + "abbr": "IT", + "zones": [ + "Europe/Rome" + ] + }, + "JE": { + "name": "Jersey", + "abbr": "JE", + "zones": [ + "Europe/London" + ] + }, + "JM": { + "name": "Jamaica", + "abbr": "JM", + "zones": [ + "America/Jamaica" + ] + }, + "JO": { + "name": "Jordan", + "abbr": "JO", + "zones": [ + "Asia/Amman" + ] + }, + "JP": { + "name": "Japan", + "abbr": "JP", + "zones": [ + "Asia/Tokyo" + ] + }, + "KE": { + "name": "Kenya", + "abbr": "KE", + "zones": [ + "Africa/Nairobi" + ] + }, + "KG": { + "name": "Kyrgyzstan", + "abbr": "KG", + "zones": [ + "Asia/Bishkek" + ] + }, + "KH": { + "name": "Cambodia", + "abbr": "KH", + "zones": [ + "Asia/Bangkok" + ] + }, + "KI": { + "name": "Kiribati", + "abbr": "KI", + "zones": [ + "Pacific/Tarawa", + "Pacific/Enderbury", + "Pacific/Kiritimati" + ] + }, + "KM": { + "name": "Comoros", + "abbr": "KM", + "zones": [ + "Africa/Nairobi" + ] + }, + "KN": { + "name": "St Kitts & Nevis", + "abbr": "KN", + "zones": [ + "America/Port_of_Spain" + ] + }, + "KP": { + "name": "Korea (North)", + "abbr": "KP", + "zones": [ + "Asia/Pyongyang" + ] + }, + "KR": { + "name": "Korea (South)", + "abbr": "KR", + "zones": [ + "Asia/Seoul" + ] + }, + "KW": { + "name": "Kuwait", + "abbr": "KW", + "zones": [ + "Asia/Riyadh" + ] + }, + "KY": { + "name": "Cayman Islands", + "abbr": "KY", + "zones": [ + "America/Panama" + ] + }, + "KZ": { + "name": "Kazakhstan", + "abbr": "KZ", + "zones": [ + "Asia/Almaty", + "Asia/Qyzylorda", + "Asia/Qostanay", + "Asia/Aqtobe", + "Asia/Aqtau", + "Asia/Atyrau", + "Asia/Oral" + ] + }, + "LA": { + "name": "Laos", + "abbr": "LA", + "zones": [ + "Asia/Bangkok" + ] + }, + "LB": { + "name": "Lebanon", + "abbr": "LB", + "zones": [ + "Asia/Beirut" + ] + }, + "LC": { + "name": "St Lucia", + "abbr": "LC", + "zones": [ + "America/Port_of_Spain" + ] + }, + "LI": { + "name": "Liechtenstein", + "abbr": "LI", + "zones": [ + "Europe/Zurich" + ] + }, + "LK": { + "name": "Sri Lanka", + "abbr": "LK", + "zones": [ + "Asia/Colombo" + ] + }, + "LR": { + "name": "Liberia", + "abbr": "LR", + "zones": [ + "Africa/Monrovia" + ] + }, + "LS": { + "name": "Lesotho", + "abbr": "LS", + "zones": [ + "Africa/Johannesburg" + ] + }, + "LT": { + "name": "Lithuania", + "abbr": "LT", + "zones": [ + "Europe/Vilnius" + ] + }, + "LU": { + "name": "Luxembourg", + "abbr": "LU", + "zones": [ + "Europe/Luxembourg" + ] + }, + "LV": { + "name": "Latvia", + "abbr": "LV", + "zones": [ + "Europe/Riga" + ] + }, + "LY": { + "name": "Libya", + "abbr": "LY", + "zones": [ + "Africa/Tripoli" + ] + }, + "MA": { + "name": "Morocco", + "abbr": "MA", + "zones": [ + "Africa/Casablanca" + ] + }, + "MC": { + "name": "Monaco", + "abbr": "MC", + "zones": [ + "Europe/Monaco" + ] + }, + "MD": { + "name": "Moldova", + "abbr": "MD", + "zones": [ + "Europe/Chisinau" + ] + }, + "ME": { + "name": "Montenegro", + "abbr": "ME", + "zones": [ + "Europe/Belgrade" + ] + }, + "MF": { + "name": "St Martin (French)", + "abbr": "MF", + "zones": [ + "America/Port_of_Spain" + ] + }, + "MG": { + "name": "Madagascar", + "abbr": "MG", + "zones": [ + "Africa/Nairobi" + ] + }, + "MH": { + "name": "Marshall Islands", + "abbr": "MH", + "zones": [ + "Pacific/Majuro", + "Pacific/Kwajalein" + ] + }, + "MK": { + "name": "North Macedonia", + "abbr": "MK", + "zones": [ + "Europe/Belgrade" + ] + }, + "ML": { + "name": "Mali", + "abbr": "ML", + "zones": [ + "Africa/Abidjan" + ] + }, + "MM": { + "name": "Myanmar (Burma)", + "abbr": "MM", + "zones": [ + "Asia/Yangon" + ] + }, + "MN": { + "name": "Mongolia", + "abbr": "MN", + "zones": [ + "Asia/Ulaanbaatar", + "Asia/Hovd", + "Asia/Choibalsan" + ] + }, + "MO": { + "name": "Macau", + "abbr": "MO", + "zones": [ + "Asia/Macau" + ] + }, + "MP": { + "name": "Northern Mariana Islands", + "abbr": "MP", + "zones": [ + "Pacific/Guam" + ] + }, + "MQ": { + "name": "Martinique", + "abbr": "MQ", + "zones": [ + "America/Martinique" + ] + }, + "MR": { + "name": "Mauritania", + "abbr": "MR", + "zones": [ + "Africa/Abidjan" + ] + }, + "MS": { + "name": "Montserrat", + "abbr": "MS", + "zones": [ + "America/Port_of_Spain" + ] + }, + "MT": { + "name": "Malta", + "abbr": "MT", + "zones": [ + "Europe/Malta" + ] + }, + "MU": { + "name": "Mauritius", + "abbr": "MU", + "zones": [ + "Indian/Mauritius" + ] + }, + "MV": { + "name": "Maldives", + "abbr": "MV", + "zones": [ + "Indian/Maldives" + ] + }, + "MW": { + "name": "Malawi", + "abbr": "MW", + "zones": [ + "Africa/Maputo" + ] + }, + "MX": { + "name": "Mexico", + "abbr": "MX", + "zones": [ + "America/Mexico_City", + "America/Cancun", + "America/Merida", + "America/Monterrey", + "America/Matamoros", + "America/Mazatlan", + "America/Chihuahua", + "America/Ojinaga", + "America/Hermosillo", + "America/Tijuana", + "America/Bahia_Banderas" + ] + }, + "MY": { + "name": "Malaysia", + "abbr": "MY", + "zones": [ + "Asia/Kuala_Lumpur", + "Asia/Kuching" + ] + }, + "MZ": { + "name": "Mozambique", + "abbr": "MZ", + "zones": [ + "Africa/Maputo" + ] + }, + "NA": { + "name": "Namibia", + "abbr": "NA", + "zones": [ + "Africa/Windhoek" + ] + }, + "NC": { + "name": "New Caledonia", + "abbr": "NC", + "zones": [ + "Pacific/Noumea" + ] + }, + "NE": { + "name": "Niger", + "abbr": "NE", + "zones": [ + "Africa/Lagos" + ] + }, + "NF": { + "name": "Norfolk Island", + "abbr": "NF", + "zones": [ + "Pacific/Norfolk" + ] + }, + "NG": { + "name": "Nigeria", + "abbr": "NG", + "zones": [ + "Africa/Lagos" + ] + }, + "NI": { + "name": "Nicaragua", + "abbr": "NI", + "zones": [ + "America/Managua" + ] + }, + "NL": { + "name": "Netherlands", + "abbr": "NL", + "zones": [ + "Europe/Amsterdam" + ] + }, + "NO": { + "name": "Norway", + "abbr": "NO", + "zones": [ + "Europe/Oslo" + ] + }, + "NP": { + "name": "Nepal", + "abbr": "NP", + "zones": [ + "Asia/Kathmandu" + ] + }, + "NR": { + "name": "Nauru", + "abbr": "NR", + "zones": [ + "Pacific/Nauru" + ] + }, + "NU": { + "name": "Niue", + "abbr": "NU", + "zones": [ + "Pacific/Niue" + ] + }, + "NZ": { + "name": "New Zealand", + "abbr": "NZ", + "zones": [ + "Pacific/Auckland", + "Pacific/Chatham" + ] + }, + "OM": { + "name": "Oman", + "abbr": "OM", + "zones": [ + "Asia/Dubai" + ] + }, + "PA": { + "name": "Panama", + "abbr": "PA", + "zones": [ + "America/Panama" + ] + }, + "PE": { + "name": "Peru", + "abbr": "PE", + "zones": [ + "America/Lima" + ] + }, + "PF": { + "name": "French Polynesia", + "abbr": "PF", + "zones": [ + "Pacific/Tahiti", + "Pacific/Marquesas", + "Pacific/Gambier" + ] + }, + "PG": { + "name": "Papua New Guinea", + "abbr": "PG", + "zones": [ + "Pacific/Port_Moresby", + "Pacific/Bougainville" + ] + }, + "PH": { + "name": "Philippines", + "abbr": "PH", + "zones": [ + "Asia/Manila" + ] + }, + "PK": { + "name": "Pakistan", + "abbr": "PK", + "zones": [ + "Asia/Karachi" + ] + }, + "PL": { + "name": "Poland", + "abbr": "PL", + "zones": [ + "Europe/Warsaw" + ] + }, + "PM": { + "name": "St Pierre & Miquelon", + "abbr": "PM", + "zones": [ + "America/Miquelon" + ] + }, + "PN": { + "name": "Pitcairn", + "abbr": "PN", + "zones": [ + "Pacific/Pitcairn" + ] + }, + "PR": { + "name": "Puerto Rico", + "abbr": "PR", + "zones": [ + "America/Puerto_Rico" + ] + }, + "PS": { + "name": "Palestine", + "abbr": "PS", + "zones": [ + "Asia/Gaza", + "Asia/Hebron" + ] + }, + "PT": { + "name": "Portugal", + "abbr": "PT", + "zones": [ + "Europe/Lisbon", + "Atlantic/Madeira", + "Atlantic/Azores" + ] + }, + "PW": { + "name": "Palau", + "abbr": "PW", + "zones": [ + "Pacific/Palau" + ] + }, + "PY": { + "name": "Paraguay", + "abbr": "PY", + "zones": [ + "America/Asuncion" + ] + }, + "QA": { + "name": "Qatar", + "abbr": "QA", + "zones": [ + "Asia/Qatar" + ] + }, + "RE": { + "name": "Réunion", + "abbr": "RE", + "zones": [ + "Indian/Reunion" + ] + }, + "RO": { + "name": "Romania", + "abbr": "RO", + "zones": [ + "Europe/Bucharest" + ] + }, + "RS": { + "name": "Serbia", + "abbr": "RS", + "zones": [ + "Europe/Belgrade" + ] + }, + "RU": { + "name": "Russia", + "abbr": "RU", + "zones": [ + "Europe/Kaliningrad", + "Europe/Moscow", + "Europe/Simferopol", + "Europe/Kirov", + "Europe/Astrakhan", + "Europe/Volgograd", + "Europe/Saratov", + "Europe/Ulyanovsk", + "Europe/Samara", + "Asia/Yekaterinburg", + "Asia/Omsk", + "Asia/Novosibirsk", + "Asia/Barnaul", + "Asia/Tomsk", + "Asia/Novokuznetsk", + "Asia/Krasnoyarsk", + "Asia/Irkutsk", + "Asia/Chita", + "Asia/Yakutsk", + "Asia/Khandyga", + "Asia/Vladivostok", + "Asia/Ust-Nera", + "Asia/Magadan", + "Asia/Sakhalin", + "Asia/Srednekolymsk", + "Asia/Kamchatka", + "Asia/Anadyr" + ] + }, + "RW": { + "name": "Rwanda", + "abbr": "RW", + "zones": [ + "Africa/Maputo" + ] + }, + "SA": { + "name": "Saudi Arabia", + "abbr": "SA", + "zones": [ + "Asia/Riyadh" + ] + }, + "SB": { + "name": "Solomon Islands", + "abbr": "SB", + "zones": [ + "Pacific/Guadalcanal" + ] + }, + "SC": { + "name": "Seychelles", + "abbr": "SC", + "zones": [ + "Indian/Mahe" + ] + }, + "SD": { + "name": "Sudan", + "abbr": "SD", + "zones": [ + "Africa/Khartoum" + ] + }, + "SE": { + "name": "Sweden", + "abbr": "SE", + "zones": [ + "Europe/Stockholm" + ] + }, + "SG": { + "name": "Singapore", + "abbr": "SG", + "zones": [ + "Asia/Singapore" + ] + }, + "SH": { + "name": "St Helena", + "abbr": "SH", + "zones": [ + "Africa/Abidjan" + ] + }, + "SI": { + "name": "Slovenia", + "abbr": "SI", + "zones": [ + "Europe/Belgrade" + ] + }, + "SJ": { + "name": "Svalbard & Jan Mayen", + "abbr": "SJ", + "zones": [ + "Europe/Oslo" + ] + }, + "SK": { + "name": "Slovakia", + "abbr": "SK", + "zones": [ + "Europe/Prague" + ] + }, + "SL": { + "name": "Sierra Leone", + "abbr": "SL", + "zones": [ + "Africa/Abidjan" + ] + }, + "SM": { + "name": "San Marino", + "abbr": "SM", + "zones": [ + "Europe/Rome" + ] + }, + "SN": { + "name": "Senegal", + "abbr": "SN", + "zones": [ + "Africa/Abidjan" + ] + }, + "SO": { + "name": "Somalia", + "abbr": "SO", + "zones": [ + "Africa/Nairobi" + ] + }, + "SR": { + "name": "Suriname", + "abbr": "SR", + "zones": [ + "America/Paramaribo" + ] + }, + "SS": { + "name": "South Sudan", + "abbr": "SS", + "zones": [ + "Africa/Juba" + ] + }, + "ST": { + "name": "Sao Tome & Principe", + "abbr": "ST", + "zones": [ + "Africa/Sao_Tome" + ] + }, + "SV": { + "name": "El Salvador", + "abbr": "SV", + "zones": [ + "America/El_Salvador" + ] + }, + "SX": { + "name": "St Maarten (Dutch)", + "abbr": "SX", + "zones": [ + "America/Curacao" + ] + }, + "SY": { + "name": "Syria", + "abbr": "SY", + "zones": [ + "Asia/Damascus" + ] + }, + "SZ": { + "name": "Eswatini (Swaziland)", + "abbr": "SZ", + "zones": [ + "Africa/Johannesburg" + ] + }, + "TC": { + "name": "Turks & Caicos Is", + "abbr": "TC", + "zones": [ + "America/Grand_Turk" + ] + }, + "TD": { + "name": "Chad", + "abbr": "TD", + "zones": [ + "Africa/Ndjamena" + ] + }, + "TF": { + "name": "French Southern & Antarctic Lands", + "abbr": "TF", + "zones": [ + "Indian/Reunion", + "Indian/Kerguelen" + ] + }, + "TG": { + "name": "Togo", + "abbr": "TG", + "zones": [ + "Africa/Abidjan" + ] + }, + "TH": { + "name": "Thailand", + "abbr": "TH", + "zones": [ + "Asia/Bangkok" + ] + }, + "TJ": { + "name": "Tajikistan", + "abbr": "TJ", + "zones": [ + "Asia/Dushanbe" + ] + }, + "TK": { + "name": "Tokelau", + "abbr": "TK", + "zones": [ + "Pacific/Fakaofo" + ] + }, + "TL": { + "name": "East Timor", + "abbr": "TL", + "zones": [ + "Asia/Dili" + ] + }, + "TM": { + "name": "Turkmenistan", + "abbr": "TM", + "zones": [ + "Asia/Ashgabat" + ] + }, + "TN": { + "name": "Tunisia", + "abbr": "TN", + "zones": [ + "Africa/Tunis" + ] + }, + "TO": { + "name": "Tonga", + "abbr": "TO", + "zones": [ + "Pacific/Tongatapu" + ] + }, + "TR": { + "name": "Turkey", + "abbr": "TR", + "zones": [ + "Europe/Istanbul" + ] + }, + "TT": { + "name": "Trinidad & Tobago", + "abbr": "TT", + "zones": [ + "America/Port_of_Spain" + ] + }, + "TV": { + "name": "Tuvalu", + "abbr": "TV", + "zones": [ + "Pacific/Funafuti" + ] + }, + "TW": { + "name": "Taiwan", + "abbr": "TW", + "zones": [ + "Asia/Taipei" + ] + }, + "TZ": { + "name": "Tanzania", + "abbr": "TZ", + "zones": [ + "Africa/Nairobi" + ] + }, + "UA": { + "name": "Ukraine", + "abbr": "UA", + "zones": [ + "Europe/Simferopol", + "Europe/Kiev", + "Europe/Uzhgorod", + "Europe/Zaporozhye" + ] + }, + "UG": { + "name": "Uganda", + "abbr": "UG", + "zones": [ + "Africa/Nairobi" + ] + }, + "UM": { + "name": "US minor outlying islands", + "abbr": "UM", + "zones": [ + "Pacific/Pago_Pago", + "Pacific/Wake", + "Pacific/Honolulu" + ] + }, + "US": { + "name": "United States", + "abbr": "US", + "zones": [ + "America/New_York", + "America/Detroit", + "America/Kentucky/Louisville", + "America/Kentucky/Monticello", + "America/Indiana/Indianapolis", + "America/Indiana/Vincennes", + "America/Indiana/Winamac", + "America/Indiana/Marengo", + "America/Indiana/Petersburg", + "America/Indiana/Vevay", + "America/Chicago", + "America/Indiana/Tell_City", + "America/Indiana/Knox", + "America/Menominee", + "America/North_Dakota/Center", + "America/North_Dakota/New_Salem", + "America/North_Dakota/Beulah", + "America/Denver", + "America/Boise", + "America/Phoenix", + "America/Los_Angeles", + "America/Anchorage", + "America/Juneau", + "America/Sitka", + "America/Metlakatla", + "America/Yakutat", + "America/Nome", + "America/Adak", + "Pacific/Honolulu" + ] + }, + "UY": { + "name": "Uruguay", + "abbr": "UY", + "zones": [ + "America/Montevideo" + ] + }, + "UZ": { + "name": "Uzbekistan", + "abbr": "UZ", + "zones": [ + "Asia/Samarkand", + "Asia/Tashkent" + ] + }, + "VA": { + "name": "Vatican City", + "abbr": "VA", + "zones": [ + "Europe/Rome" + ] + }, + "VC": { + "name": "St Vincent", + "abbr": "VC", + "zones": [ + "America/Port_of_Spain" + ] + }, + "VE": { + "name": "Venezuela", + "abbr": "VE", + "zones": [ + "America/Caracas" + ] + }, + "VG": { + "name": "Virgin Islands (UK)", + "abbr": "VG", + "zones": [ + "America/Port_of_Spain" + ] + }, + "VI": { + "name": "Virgin Islands (US)", + "abbr": "VI", + "zones": [ + "America/Port_of_Spain" + ] + }, + "VN": { + "name": "Vietnam", + "abbr": "VN", + "zones": [ + "Asia/Bangkok", + "Asia/Ho_Chi_Minh" + ] + }, + "VU": { + "name": "Vanuatu", + "abbr": "VU", + "zones": [ + "Pacific/Efate" + ] + }, + "WF": { + "name": "Wallis & Futuna", + "abbr": "WF", + "zones": [ + "Pacific/Wallis" + ] + }, + "WS": { + "name": "Samoa (western)", + "abbr": "WS", + "zones": [ + "Pacific/Apia" + ] + }, + "YE": { + "name": "Yemen", + "abbr": "YE", + "zones": [ + "Asia/Riyadh" + ] + }, + "YT": { + "name": "Mayotte", + "abbr": "YT", + "zones": [ + "Africa/Nairobi" + ] + }, + "ZA": { + "name": "South Africa", + "abbr": "ZA", + "zones": [ + "Africa/Johannesburg" + ] + }, + "ZM": { + "name": "Zambia", + "abbr": "ZM", + "zones": [ + "Africa/Maputo" + ] + }, + "ZW": { + "name": "Zimbabwe", + "abbr": "ZW", + "zones": [ + "Africa/Maputo" + ] + } + }, + "zones": { + "Europe/Andorra": { + "name": "Europe/Andorra", + "lat": 42.5, + "long": 1.5167, + "countries": [ + "AD" + ], + "comments": "" + }, + "Asia/Dubai": { + "name": "Asia/Dubai", + "lat": 25.3, + "long": 55.3, + "countries": [ + "AE", + "OM" + ], + "comments": "" + }, + "Asia/Kabul": { + "name": "Asia/Kabul", + "lat": 34.5167, + "long": 69.2, + "countries": [ + "AF" + ], + "comments": "" + }, + "Europe/Tirane": { + "name": "Europe/Tirane", + "lat": 41.3333, + "long": 19.8333, + "countries": [ + "AL" + ], + "comments": "" + }, + "Asia/Yerevan": { + "name": "Asia/Yerevan", + "lat": 40.1833, + "long": 44.5, + "countries": [ + "AM" + ], + "comments": "" + }, + "Antarctica/Casey": { + "name": "Antarctica/Casey", + "lat": -65.7167, + "long": 110.5167, + "countries": [ + "AQ" + ], + "comments": "Casey" + }, + "Antarctica/Davis": { + "name": "Antarctica/Davis", + "lat": -67.4167, + "long": 77.9667, + "countries": [ + "AQ" + ], + "comments": "Davis" + }, + "Antarctica/DumontDUrville": { + "name": "Antarctica/DumontDUrville", + "lat": -65.3333, + "long": 140.0167, + "countries": [ + "AQ" + ], + "comments": "Dumont-d'Urville" + }, + "Antarctica/Mawson": { + "name": "Antarctica/Mawson", + "lat": -66.4, + "long": 62.8833, + "countries": [ + "AQ" + ], + "comments": "Mawson" + }, + "Antarctica/Palmer": { + "name": "Antarctica/Palmer", + "lat": -63.2, + "long": -63.9, + "countries": [ + "AQ" + ], + "comments": "Palmer" + }, + "Antarctica/Rothera": { + "name": "Antarctica/Rothera", + "lat": -66.4333, + "long": -67.8667, + "countries": [ + "AQ" + ], + "comments": "Rothera" + }, + "Antarctica/Syowa": { + "name": "Antarctica/Syowa", + "lat": -68.9939, + "long": 39.59, + "countries": [ + "AQ" + ], + "comments": "Syowa" + }, + "Antarctica/Troll": { + "name": "Antarctica/Troll", + "lat": -71.9886, + "long": 2.535, + "countries": [ + "AQ" + ], + "comments": "Troll" + }, + "Antarctica/Vostok": { + "name": "Antarctica/Vostok", + "lat": -77.6, + "long": 106.9, + "countries": [ + "AQ" + ], + "comments": "Vostok" + }, + "America/Argentina/Buenos_Aires": { + "name": "America/Argentina/Buenos_Aires", + "lat": -33.4, + "long": -57.55, + "countries": [ + "AR" + ], + "comments": "Buenos Aires (BA, CF)" + }, + "America/Argentina/Cordoba": { + "name": "America/Argentina/Cordoba", + "lat": -30.6, + "long": -63.8167, + "countries": [ + "AR" + ], + "comments": "Argentina (most areas: CB, CC, CN, ER, FM, MN, SE, SF)" + }, + "America/Argentina/Salta": { + "name": "America/Argentina/Salta", + "lat": -23.2167, + "long": -64.5833, + "countries": [ + "AR" + ], + "comments": "Salta (SA, LP, NQ, RN)" + }, + "America/Argentina/Jujuy": { + "name": "America/Argentina/Jujuy", + "lat": -23.8167, + "long": -64.7, + "countries": [ + "AR" + ], + "comments": "Jujuy (JY)" + }, + "America/Argentina/Tucuman": { + "name": "America/Argentina/Tucuman", + "lat": -25.1833, + "long": -64.7833, + "countries": [ + "AR" + ], + "comments": "Tucumán (TM)" + }, + "America/Argentina/Catamarca": { + "name": "America/Argentina/Catamarca", + "lat": -27.5333, + "long": -64.2167, + "countries": [ + "AR" + ], + "comments": "Catamarca (CT); Chubut (CH)" + }, + "America/Argentina/La_Rioja": { + "name": "America/Argentina/La_Rioja", + "lat": -28.5667, + "long": -65.15, + "countries": [ + "AR" + ], + "comments": "La Rioja (LR)" + }, + "America/Argentina/San_Juan": { + "name": "America/Argentina/San_Juan", + "lat": -30.4667, + "long": -67.4833, + "countries": [ + "AR" + ], + "comments": "San Juan (SJ)" + }, + "America/Argentina/Mendoza": { + "name": "America/Argentina/Mendoza", + "lat": -31.1167, + "long": -67.1833, + "countries": [ + "AR" + ], + "comments": "Mendoza (MZ)" + }, + "America/Argentina/San_Luis": { + "name": "America/Argentina/San_Luis", + "lat": -32.6833, + "long": -65.65, + "countries": [ + "AR" + ], + "comments": "San Luis (SL)" + }, + "America/Argentina/Rio_Gallegos": { + "name": "America/Argentina/Rio_Gallegos", + "lat": -50.3667, + "long": -68.7833, + "countries": [ + "AR" + ], + "comments": "Santa Cruz (SC)" + }, + "America/Argentina/Ushuaia": { + "name": "America/Argentina/Ushuaia", + "lat": -53.2, + "long": -67.7, + "countries": [ + "AR" + ], + "comments": "Tierra del Fuego (TF)" + }, + "Pacific/Pago_Pago": { + "name": "Pacific/Pago_Pago", + "lat": -13.7333, + "long": -169.3, + "countries": [ + "AS", + "UM" + ], + "comments": "Samoa, Midway" + }, + "Europe/Vienna": { + "name": "Europe/Vienna", + "lat": 48.2167, + "long": 16.3333, + "countries": [ + "AT" + ], + "comments": "" + }, + "Australia/Lord_Howe": { + "name": "Australia/Lord_Howe", + "lat": -30.45, + "long": 159.0833, + "countries": [ + "AU" + ], + "comments": "Lord Howe Island" + }, + "Antarctica/Macquarie": { + "name": "Antarctica/Macquarie", + "lat": -53.5, + "long": 158.95, + "countries": [ + "AU" + ], + "comments": "Macquarie Island" + }, + "Australia/Hobart": { + "name": "Australia/Hobart", + "lat": -41.1167, + "long": 147.3167, + "countries": [ + "AU" + ], + "comments": "Tasmania (most areas)" + }, + "Australia/Currie": { + "name": "Australia/Currie", + "lat": -38.0667, + "long": 143.8667, + "countries": [ + "AU" + ], + "comments": "Tasmania (King Island)" + }, + "Australia/Melbourne": { + "name": "Australia/Melbourne", + "lat": -36.1833, + "long": 144.9667, + "countries": [ + "AU" + ], + "comments": "Victoria" + }, + "Australia/Sydney": { + "name": "Australia/Sydney", + "lat": -32.1333, + "long": 151.2167, + "countries": [ + "AU" + ], + "comments": "New South Wales (most areas)" + }, + "Australia/Broken_Hill": { + "name": "Australia/Broken_Hill", + "lat": -30.05, + "long": 141.45, + "countries": [ + "AU" + ], + "comments": "New South Wales (Yancowinna)" + }, + "Australia/Brisbane": { + "name": "Australia/Brisbane", + "lat": -26.5333, + "long": 153.0333, + "countries": [ + "AU" + ], + "comments": "Queensland (most areas)" + }, + "Australia/Lindeman": { + "name": "Australia/Lindeman", + "lat": -19.7333, + "long": 149, + "countries": [ + "AU" + ], + "comments": "Queensland (Whitsunday Islands)" + }, + "Australia/Adelaide": { + "name": "Australia/Adelaide", + "lat": -33.0833, + "long": 138.5833, + "countries": [ + "AU" + ], + "comments": "South Australia" + }, + "Australia/Darwin": { + "name": "Australia/Darwin", + "lat": -11.5333, + "long": 130.8333, + "countries": [ + "AU" + ], + "comments": "Northern Territory" + }, + "Australia/Perth": { + "name": "Australia/Perth", + "lat": -30.05, + "long": 115.85, + "countries": [ + "AU" + ], + "comments": "Western Australia (most areas)" + }, + "Australia/Eucla": { + "name": "Australia/Eucla", + "lat": -30.2833, + "long": 128.8667, + "countries": [ + "AU" + ], + "comments": "Western Australia (Eucla)" + }, + "Asia/Baku": { + "name": "Asia/Baku", + "lat": 40.3833, + "long": 49.85, + "countries": [ + "AZ" + ], + "comments": "" + }, + "America/Barbados": { + "name": "America/Barbados", + "lat": 13.1, + "long": -58.3833, + "countries": [ + "BB" + ], + "comments": "" + }, + "Asia/Dhaka": { + "name": "Asia/Dhaka", + "lat": 23.7167, + "long": 90.4167, + "countries": [ + "BD" + ], + "comments": "" + }, + "Europe/Brussels": { + "name": "Europe/Brussels", + "lat": 50.8333, + "long": 4.3333, + "countries": [ + "BE" + ], + "comments": "" + }, + "Europe/Sofia": { + "name": "Europe/Sofia", + "lat": 42.6833, + "long": 23.3167, + "countries": [ + "BG" + ], + "comments": "" + }, + "Atlantic/Bermuda": { + "name": "Atlantic/Bermuda", + "lat": 32.2833, + "long": -63.2333, + "countries": [ + "BM" + ], + "comments": "" + }, + "Asia/Brunei": { + "name": "Asia/Brunei", + "lat": 4.9333, + "long": 114.9167, + "countries": [ + "BN" + ], + "comments": "" + }, + "America/La_Paz": { + "name": "America/La_Paz", + "lat": -15.5, + "long": -67.85, + "countries": [ + "BO" + ], + "comments": "" + }, + "America/Noronha": { + "name": "America/Noronha", + "lat": -2.15, + "long": -31.5833, + "countries": [ + "BR" + ], + "comments": "Atlantic islands" + }, + "America/Belem": { + "name": "America/Belem", + "lat": -0.55, + "long": -47.5167, + "countries": [ + "BR" + ], + "comments": "Pará (east); Amapá" + }, + "America/Fortaleza": { + "name": "America/Fortaleza", + "lat": -2.2833, + "long": -37.5, + "countries": [ + "BR" + ], + "comments": "Brazil (northeast: MA, PI, CE, RN, PB)" + }, + "America/Recife": { + "name": "America/Recife", + "lat": -7.95, + "long": -33.1, + "countries": [ + "BR" + ], + "comments": "Pernambuco" + }, + "America/Araguaina": { + "name": "America/Araguaina", + "lat": -6.8, + "long": -47.8, + "countries": [ + "BR" + ], + "comments": "Tocantins" + }, + "America/Maceio": { + "name": "America/Maceio", + "lat": -8.3333, + "long": -34.2833, + "countries": [ + "BR" + ], + "comments": "Alagoas, Sergipe" + }, + "America/Bahia": { + "name": "America/Bahia", + "lat": -11.0167, + "long": -37.4833, + "countries": [ + "BR" + ], + "comments": "Bahia" + }, + "America/Sao_Paulo": { + "name": "America/Sao_Paulo", + "lat": -22.4667, + "long": -45.3833, + "countries": [ + "BR" + ], + "comments": "Brazil (southeast: GO, DF, MG, ES, RJ, SP, PR, SC, RS)" + }, + "America/Campo_Grande": { + "name": "America/Campo_Grande", + "lat": -19.55, + "long": -53.3833, + "countries": [ + "BR" + ], + "comments": "Mato Grosso do Sul" + }, + "America/Cuiaba": { + "name": "America/Cuiaba", + "lat": -14.4167, + "long": -55.9167, + "countries": [ + "BR" + ], + "comments": "Mato Grosso" + }, + "America/Santarem": { + "name": "America/Santarem", + "lat": -1.5667, + "long": -53.1333, + "countries": [ + "BR" + ], + "comments": "Pará (west)" + }, + "America/Porto_Velho": { + "name": "America/Porto_Velho", + "lat": -7.2333, + "long": -62.1, + "countries": [ + "BR" + ], + "comments": "Rondônia" + }, + "America/Boa_Vista": { + "name": "America/Boa_Vista", + "lat": 2.8167, + "long": -59.3333, + "countries": [ + "BR" + ], + "comments": "Roraima" + }, + "America/Manaus": { + "name": "America/Manaus", + "lat": -2.8667, + "long": -59.9833, + "countries": [ + "BR" + ], + "comments": "Amazonas (east)" + }, + "America/Eirunepe": { + "name": "America/Eirunepe", + "lat": -5.3333, + "long": -68.1333, + "countries": [ + "BR" + ], + "comments": "Amazonas (west)" + }, + "America/Rio_Branco": { + "name": "America/Rio_Branco", + "lat": -8.0333, + "long": -66.2, + "countries": [ + "BR" + ], + "comments": "Acre" + }, + "America/Nassau": { + "name": "America/Nassau", + "lat": 25.0833, + "long": -76.65, + "countries": [ + "BS" + ], + "comments": "" + }, + "Asia/Thimphu": { + "name": "Asia/Thimphu", + "lat": 27.4667, + "long": 89.65, + "countries": [ + "BT" + ], + "comments": "" + }, + "Europe/Minsk": { + "name": "Europe/Minsk", + "lat": 53.9, + "long": 27.5667, + "countries": [ + "BY" + ], + "comments": "" + }, + "America/Belize": { + "name": "America/Belize", + "lat": 17.5, + "long": -87.8, + "countries": [ + "BZ" + ], + "comments": "" + }, + "America/St_Johns": { + "name": "America/St_Johns", + "lat": 47.5667, + "long": -51.2833, + "countries": [ + "CA" + ], + "comments": "Newfoundland; Labrador (southeast)" + }, + "America/Halifax": { + "name": "America/Halifax", + "lat": 44.65, + "long": -62.4, + "countries": [ + "CA" + ], + "comments": "Atlantic - NS (most areas); PE" + }, + "America/Glace_Bay": { + "name": "America/Glace_Bay", + "lat": 46.2, + "long": -58.05, + "countries": [ + "CA" + ], + "comments": "Atlantic - NS (Cape Breton)" + }, + "America/Moncton": { + "name": "America/Moncton", + "lat": 46.1, + "long": -63.2167, + "countries": [ + "CA" + ], + "comments": "Atlantic - New Brunswick" + }, + "America/Goose_Bay": { + "name": "America/Goose_Bay", + "lat": 53.3333, + "long": -59.5833, + "countries": [ + "CA" + ], + "comments": "Atlantic - Labrador (most areas)" + }, + "America/Blanc-Sablon": { + "name": "America/Blanc-Sablon", + "lat": 51.4167, + "long": -56.8833, + "countries": [ + "CA" + ], + "comments": "AST - QC (Lower North Shore)" + }, + "America/Toronto": { + "name": "America/Toronto", + "lat": 43.65, + "long": -78.6167, + "countries": [ + "CA" + ], + "comments": "Eastern - ON, QC (most areas)" + }, + "America/Nipigon": { + "name": "America/Nipigon", + "lat": 49.0167, + "long": -87.7333, + "countries": [ + "CA" + ], + "comments": "Eastern - ON, QC (no DST 1967-73)" + }, + "America/Thunder_Bay": { + "name": "America/Thunder_Bay", + "lat": 48.3833, + "long": -88.75, + "countries": [ + "CA" + ], + "comments": "Eastern - ON (Thunder Bay)" + }, + "America/Iqaluit": { + "name": "America/Iqaluit", + "lat": 63.7333, + "long": -67.5333, + "countries": [ + "CA" + ], + "comments": "Eastern - NU (most east areas)" + }, + "America/Pangnirtung": { + "name": "America/Pangnirtung", + "lat": 66.1333, + "long": -64.2667, + "countries": [ + "CA" + ], + "comments": "Eastern - NU (Pangnirtung)" + }, + "America/Atikokan": { + "name": "America/Atikokan", + "lat": 48.7586, + "long": -90.3783, + "countries": [ + "CA" + ], + "comments": "EST - ON (Atikokan); NU (Coral H)" + }, + "America/Winnipeg": { + "name": "America/Winnipeg", + "lat": 49.8833, + "long": -96.85, + "countries": [ + "CA" + ], + "comments": "Central - ON (west); Manitoba" + }, + "America/Rainy_River": { + "name": "America/Rainy_River", + "lat": 48.7167, + "long": -93.4333, + "countries": [ + "CA" + ], + "comments": "Central - ON (Rainy R, Ft Frances)" + }, + "America/Resolute": { + "name": "America/Resolute", + "lat": 74.6956, + "long": -93.1708, + "countries": [ + "CA" + ], + "comments": "Central - NU (Resolute)" + }, + "America/Rankin_Inlet": { + "name": "America/Rankin_Inlet", + "lat": 62.8167, + "long": -91.9169, + "countries": [ + "CA" + ], + "comments": "Central - NU (central)" + }, + "America/Regina": { + "name": "America/Regina", + "lat": 50.4, + "long": -103.35, + "countries": [ + "CA" + ], + "comments": "CST - SK (most areas)" + }, + "America/Swift_Current": { + "name": "America/Swift_Current", + "lat": 50.2833, + "long": -106.1667, + "countries": [ + "CA" + ], + "comments": "CST - SK (midwest)" + }, + "America/Edmonton": { + "name": "America/Edmonton", + "lat": 53.55, + "long": -112.5333, + "countries": [ + "CA" + ], + "comments": "Mountain - AB; BC (E); SK (W)" + }, + "America/Cambridge_Bay": { + "name": "America/Cambridge_Bay", + "lat": 69.1139, + "long": -104.9472, + "countries": [ + "CA" + ], + "comments": "Mountain - NU (west)" + }, + "America/Yellowknife": { + "name": "America/Yellowknife", + "lat": 62.45, + "long": -113.65, + "countries": [ + "CA" + ], + "comments": "Mountain - NT (central)" + }, + "America/Inuvik": { + "name": "America/Inuvik", + "lat": 68.3497, + "long": -132.2833, + "countries": [ + "CA" + ], + "comments": "Mountain - NT (west)" + }, + "America/Creston": { + "name": "America/Creston", + "lat": 49.1, + "long": -115.4833, + "countries": [ + "CA" + ], + "comments": "MST - BC (Creston)" + }, + "America/Dawson_Creek": { + "name": "America/Dawson_Creek", + "lat": 59.7667, + "long": -119.7667, + "countries": [ + "CA" + ], + "comments": "MST - BC (Dawson Cr, Ft St John)" + }, + "America/Fort_Nelson": { + "name": "America/Fort_Nelson", + "lat": 58.8, + "long": -121.3, + "countries": [ + "CA" + ], + "comments": "MST - BC (Ft Nelson)" + }, + "America/Vancouver": { + "name": "America/Vancouver", + "lat": 49.2667, + "long": -122.8833, + "countries": [ + "CA" + ], + "comments": "Pacific - BC (most areas)" + }, + "America/Whitehorse": { + "name": "America/Whitehorse", + "lat": 60.7167, + "long": -134.95, + "countries": [ + "CA" + ], + "comments": "Pacific - Yukon (south)" + }, + "America/Dawson": { + "name": "America/Dawson", + "lat": 64.0667, + "long": -138.5833, + "countries": [ + "CA" + ], + "comments": "Pacific - Yukon (north)" + }, + "Indian/Cocos": { + "name": "Indian/Cocos", + "lat": -11.8333, + "long": 96.9167, + "countries": [ + "CC" + ], + "comments": "" + }, + "Europe/Zurich": { + "name": "Europe/Zurich", + "lat": 47.3833, + "long": 8.5333, + "countries": [ + "CH", + "DE", + "LI" + ], + "comments": "Swiss time" + }, + "Africa/Abidjan": { + "name": "Africa/Abidjan", + "lat": 5.3167, + "long": -3.9667, + "countries": [ + "CI", + "BF", + "GM", + "GN", + "ML", + "MR", + "SH", + "SL", + "SN", + "TG" + ], + "comments": "" + }, + "Pacific/Rarotonga": { + "name": "Pacific/Rarotonga", + "lat": -20.7667, + "long": -158.2333, + "countries": [ + "CK" + ], + "comments": "" + }, + "America/Santiago": { + "name": "America/Santiago", + "lat": -32.55, + "long": -69.3333, + "countries": [ + "CL" + ], + "comments": "Chile (most areas)" + }, + "America/Punta_Arenas": { + "name": "America/Punta_Arenas", + "lat": -52.85, + "long": -69.0833, + "countries": [ + "CL" + ], + "comments": "Region of Magallanes" + }, + "Pacific/Easter": { + "name": "Pacific/Easter", + "lat": -26.85, + "long": -108.5667, + "countries": [ + "CL" + ], + "comments": "Easter Island" + }, + "Asia/Shanghai": { + "name": "Asia/Shanghai", + "lat": 31.2333, + "long": 121.4667, + "countries": [ + "CN" + ], + "comments": "Beijing Time" + }, + "Asia/Urumqi": { + "name": "Asia/Urumqi", + "lat": 43.8, + "long": 87.5833, + "countries": [ + "CN" + ], + "comments": "Xinjiang Time" + }, + "America/Bogota": { + "name": "America/Bogota", + "lat": 4.6, + "long": -73.9167, + "countries": [ + "CO" + ], + "comments": "" + }, + "America/Costa_Rica": { + "name": "America/Costa_Rica", + "lat": 9.9333, + "long": -83.9167, + "countries": [ + "CR" + ], + "comments": "" + }, + "America/Havana": { + "name": "America/Havana", + "lat": 23.1333, + "long": -81.6333, + "countries": [ + "CU" + ], + "comments": "" + }, + "Atlantic/Cape_Verde": { + "name": "Atlantic/Cape_Verde", + "lat": 14.9167, + "long": -22.4833, + "countries": [ + "CV" + ], + "comments": "" + }, + "America/Curacao": { + "name": "America/Curacao", + "lat": 12.1833, + "long": -69, + "countries": [ + "CW", + "AW", + "BQ", + "SX" + ], + "comments": "" + }, + "Indian/Christmas": { + "name": "Indian/Christmas", + "lat": -9.5833, + "long": 105.7167, + "countries": [ + "CX" + ], + "comments": "" + }, + "Asia/Nicosia": { + "name": "Asia/Nicosia", + "lat": 35.1667, + "long": 33.3667, + "countries": [ + "CY" + ], + "comments": "Cyprus (most areas)" + }, + "Asia/Famagusta": { + "name": "Asia/Famagusta", + "lat": 35.1167, + "long": 33.95, + "countries": [ + "CY" + ], + "comments": "Northern Cyprus" + }, + "Europe/Prague": { + "name": "Europe/Prague", + "lat": 50.0833, + "long": 14.4333, + "countries": [ + "CZ", + "SK" + ], + "comments": "" + }, + "Europe/Berlin": { + "name": "Europe/Berlin", + "lat": 52.5, + "long": 13.3667, + "countries": [ + "DE" + ], + "comments": "Germany (most areas)" + }, + "Europe/Copenhagen": { + "name": "Europe/Copenhagen", + "lat": 55.6667, + "long": 12.5833, + "countries": [ + "DK" + ], + "comments": "" + }, + "America/Santo_Domingo": { + "name": "America/Santo_Domingo", + "lat": 18.4667, + "long": -68.1, + "countries": [ + "DO" + ], + "comments": "" + }, + "Africa/Algiers": { + "name": "Africa/Algiers", + "lat": 36.7833, + "long": 3.05, + "countries": [ + "DZ" + ], + "comments": "" + }, + "America/Guayaquil": { + "name": "America/Guayaquil", + "lat": -1.8333, + "long": -78.1667, + "countries": [ + "EC" + ], + "comments": "Ecuador (mainland)" + }, + "Pacific/Galapagos": { + "name": "Pacific/Galapagos", + "lat": 0.9, + "long": -88.4, + "countries": [ + "EC" + ], + "comments": "Galápagos Islands" + }, + "Europe/Tallinn": { + "name": "Europe/Tallinn", + "lat": 59.4167, + "long": 24.75, + "countries": [ + "EE" + ], + "comments": "" + }, + "Africa/Cairo": { + "name": "Africa/Cairo", + "lat": 30.05, + "long": 31.25, + "countries": [ + "EG" + ], + "comments": "" + }, + "Africa/El_Aaiun": { + "name": "Africa/El_Aaiun", + "lat": 27.15, + "long": -12.8, + "countries": [ + "EH" + ], + "comments": "" + }, + "Europe/Madrid": { + "name": "Europe/Madrid", + "lat": 40.4, + "long": -2.3167, + "countries": [ + "ES" + ], + "comments": "Spain (mainland)" + }, + "Africa/Ceuta": { + "name": "Africa/Ceuta", + "lat": 35.8833, + "long": -4.6833, + "countries": [ + "ES" + ], + "comments": "Ceuta, Melilla" + }, + "Atlantic/Canary": { + "name": "Atlantic/Canary", + "lat": 28.1, + "long": -14.6, + "countries": [ + "ES" + ], + "comments": "Canary Islands" + }, + "Europe/Helsinki": { + "name": "Europe/Helsinki", + "lat": 60.1667, + "long": 24.9667, + "countries": [ + "FI", + "AX" + ], + "comments": "" + }, + "Pacific/Fiji": { + "name": "Pacific/Fiji", + "lat": -17.8667, + "long": 178.4167, + "countries": [ + "FJ" + ], + "comments": "" + }, + "Atlantic/Stanley": { + "name": "Atlantic/Stanley", + "lat": -50.3, + "long": -56.15, + "countries": [ + "FK" + ], + "comments": "" + }, + "Pacific/Chuuk": { + "name": "Pacific/Chuuk", + "lat": 7.4167, + "long": 151.7833, + "countries": [ + "FM" + ], + "comments": "Chuuk/Truk, Yap" + }, + "Pacific/Pohnpei": { + "name": "Pacific/Pohnpei", + "lat": 6.9667, + "long": 158.2167, + "countries": [ + "FM" + ], + "comments": "Pohnpei/Ponape" + }, + "Pacific/Kosrae": { + "name": "Pacific/Kosrae", + "lat": 5.3167, + "long": 162.9833, + "countries": [ + "FM" + ], + "comments": "Kosrae" + }, + "Atlantic/Faroe": { + "name": "Atlantic/Faroe", + "lat": 62.0167, + "long": -5.2333, + "countries": [ + "FO" + ], + "comments": "" + }, + "Europe/Paris": { + "name": "Europe/Paris", + "lat": 48.8667, + "long": 2.3333, + "countries": [ + "FR" + ], + "comments": "" + }, + "Europe/London": { + "name": "Europe/London", + "lat": 51.5083, + "long": 0.1253, + "countries": [ + "GB", + "GG", + "IM", + "JE" + ], + "comments": "" + }, + "Asia/Tbilisi": { + "name": "Asia/Tbilisi", + "lat": 41.7167, + "long": 44.8167, + "countries": [ + "GE" + ], + "comments": "" + }, + "America/Cayenne": { + "name": "America/Cayenne", + "lat": 4.9333, + "long": -51.6667, + "countries": [ + "GF" + ], + "comments": "" + }, + "Africa/Accra": { + "name": "Africa/Accra", + "lat": 5.55, + "long": 0.2167, + "countries": [ + "GH" + ], + "comments": "" + }, + "Europe/Gibraltar": { + "name": "Europe/Gibraltar", + "lat": 36.1333, + "long": -4.65, + "countries": [ + "GI" + ], + "comments": "" + }, + "America/Godthab": { + "name": "America/Godthab", + "lat": 64.1833, + "long": -50.2667, + "countries": [ + "GL" + ], + "comments": "Greenland (most areas)" + }, + "America/Danmarkshavn": { + "name": "America/Danmarkshavn", + "lat": 76.7667, + "long": -17.3333, + "countries": [ + "GL" + ], + "comments": "National Park (east coast)" + }, + "America/Scoresbysund": { + "name": "America/Scoresbysund", + "lat": 70.4833, + "long": -20.0333, + "countries": [ + "GL" + ], + "comments": "Scoresbysund/Ittoqqortoormiit" + }, + "America/Thule": { + "name": "America/Thule", + "lat": 76.5667, + "long": -67.2167, + "countries": [ + "GL" + ], + "comments": "Thule/Pituffik" + }, + "Europe/Athens": { + "name": "Europe/Athens", + "lat": 37.9667, + "long": 23.7167, + "countries": [ + "GR" + ], + "comments": "" + }, + "Atlantic/South_Georgia": { + "name": "Atlantic/South_Georgia", + "lat": -53.7333, + "long": -35.4667, + "countries": [ + "GS" + ], + "comments": "" + }, + "America/Guatemala": { + "name": "America/Guatemala", + "lat": 14.6333, + "long": -89.4833, + "countries": [ + "GT" + ], + "comments": "" + }, + "Pacific/Guam": { + "name": "Pacific/Guam", + "lat": 13.4667, + "long": 144.75, + "countries": [ + "GU", + "MP" + ], + "comments": "" + }, + "Africa/Bissau": { + "name": "Africa/Bissau", + "lat": 11.85, + "long": -14.4167, + "countries": [ + "GW" + ], + "comments": "" + }, + "America/Guyana": { + "name": "America/Guyana", + "lat": 6.8, + "long": -57.8333, + "countries": [ + "GY" + ], + "comments": "" + }, + "Asia/Hong_Kong": { + "name": "Asia/Hong_Kong", + "lat": 22.2833, + "long": 114.15, + "countries": [ + "HK" + ], + "comments": "" + }, + "America/Tegucigalpa": { + "name": "America/Tegucigalpa", + "lat": 14.1, + "long": -86.7833, + "countries": [ + "HN" + ], + "comments": "" + }, + "America/Port-au-Prince": { + "name": "America/Port-au-Prince", + "lat": 18.5333, + "long": -71.6667, + "countries": [ + "HT" + ], + "comments": "" + }, + "Europe/Budapest": { + "name": "Europe/Budapest", + "lat": 47.5, + "long": 19.0833, + "countries": [ + "HU" + ], + "comments": "" + }, + "Asia/Jakarta": { + "name": "Asia/Jakarta", + "lat": -5.8333, + "long": 106.8, + "countries": [ + "ID" + ], + "comments": "Java, Sumatra" + }, + "Asia/Pontianak": { + "name": "Asia/Pontianak", + "lat": 0.0333, + "long": 109.3333, + "countries": [ + "ID" + ], + "comments": "Borneo (west, central)" + }, + "Asia/Makassar": { + "name": "Asia/Makassar", + "lat": -4.8833, + "long": 119.4, + "countries": [ + "ID" + ], + "comments": "Borneo (east, south); Sulawesi/Celebes, Bali, Nusa Tengarra; Timor (west)" + }, + "Asia/Jayapura": { + "name": "Asia/Jayapura", + "lat": -1.4667, + "long": 140.7, + "countries": [ + "ID" + ], + "comments": "New Guinea (West Papua / Irian Jaya); Malukus/Moluccas" + }, + "Europe/Dublin": { + "name": "Europe/Dublin", + "lat": 53.3333, + "long": -5.75, + "countries": [ + "IE" + ], + "comments": "" + }, + "Asia/Jerusalem": { + "name": "Asia/Jerusalem", + "lat": 31.7806, + "long": 35.2239, + "countries": [ + "IL" + ], + "comments": "" + }, + "Asia/Kolkata": { + "name": "Asia/Kolkata", + "lat": 22.5333, + "long": 88.3667, + "countries": [ + "IN" + ], + "comments": "" + }, + "Indian/Chagos": { + "name": "Indian/Chagos", + "lat": -6.6667, + "long": 72.4167, + "countries": [ + "IO" + ], + "comments": "" + }, + "Asia/Baghdad": { + "name": "Asia/Baghdad", + "lat": 33.35, + "long": 44.4167, + "countries": [ + "IQ" + ], + "comments": "" + }, + "Asia/Tehran": { + "name": "Asia/Tehran", + "lat": 35.6667, + "long": 51.4333, + "countries": [ + "IR" + ], + "comments": "" + }, + "Atlantic/Reykjavik": { + "name": "Atlantic/Reykjavik", + "lat": 64.15, + "long": -20.15, + "countries": [ + "IS" + ], + "comments": "" + }, + "Europe/Rome": { + "name": "Europe/Rome", + "lat": 41.9, + "long": 12.4833, + "countries": [ + "IT", + "SM", + "VA" + ], + "comments": "" + }, + "America/Jamaica": { + "name": "America/Jamaica", + "lat": 17.9681, + "long": -75.2067, + "countries": [ + "JM" + ], + "comments": "" + }, + "Asia/Amman": { + "name": "Asia/Amman", + "lat": 31.95, + "long": 35.9333, + "countries": [ + "JO" + ], + "comments": "" + }, + "Asia/Tokyo": { + "name": "Asia/Tokyo", + "lat": 35.6544, + "long": 139.7447, + "countries": [ + "JP" + ], + "comments": "" + }, + "Africa/Nairobi": { + "name": "Africa/Nairobi", + "lat": -0.7167, + "long": 36.8167, + "countries": [ + "KE", + "DJ", + "ER", + "ET", + "KM", + "MG", + "SO", + "TZ", + "UG", + "YT" + ], + "comments": "" + }, + "Asia/Bishkek": { + "name": "Asia/Bishkek", + "lat": 42.9, + "long": 74.6, + "countries": [ + "KG" + ], + "comments": "" + }, + "Pacific/Tarawa": { + "name": "Pacific/Tarawa", + "lat": 1.4167, + "long": 173, + "countries": [ + "KI" + ], + "comments": "Gilbert Islands" + }, + "Pacific/Enderbury": { + "name": "Pacific/Enderbury", + "lat": -2.8667, + "long": -170.9167, + "countries": [ + "KI" + ], + "comments": "Phoenix Islands" + }, + "Pacific/Kiritimati": { + "name": "Pacific/Kiritimati", + "lat": 1.8667, + "long": -156.6667, + "countries": [ + "KI" + ], + "comments": "Line Islands" + }, + "Asia/Pyongyang": { + "name": "Asia/Pyongyang", + "lat": 39.0167, + "long": 125.75, + "countries": [ + "KP" + ], + "comments": "" + }, + "Asia/Seoul": { + "name": "Asia/Seoul", + "lat": 37.55, + "long": 126.9667, + "countries": [ + "KR" + ], + "comments": "" + }, + "Asia/Almaty": { + "name": "Asia/Almaty", + "lat": 43.25, + "long": 76.95, + "countries": [ + "KZ" + ], + "comments": "Kazakhstan (most areas)" + }, + "Asia/Qyzylorda": { + "name": "Asia/Qyzylorda", + "lat": 44.8, + "long": 65.4667, + "countries": [ + "KZ" + ], + "comments": "Qyzylorda/Kyzylorda/Kzyl-Orda" + }, + "Asia/Qostanay": { + "name": "Asia/Qostanay", + "lat": 53.2, + "long": 63.6167, + "countries": [ + "KZ" + ], + "comments": "Qostanay/Kostanay/Kustanay" + }, + "Asia/Aqtobe": { + "name": "Asia/Aqtobe", + "lat": 50.2833, + "long": 57.1667, + "countries": [ + "KZ" + ], + "comments": "Aqtöbe/Aktobe" + }, + "Asia/Aqtau": { + "name": "Asia/Aqtau", + "lat": 44.5167, + "long": 50.2667, + "countries": [ + "KZ" + ], + "comments": "Mangghystaū/Mankistau" + }, + "Asia/Atyrau": { + "name": "Asia/Atyrau", + "lat": 47.1167, + "long": 51.9333, + "countries": [ + "KZ" + ], + "comments": "Atyraū/Atirau/Gur'yev" + }, + "Asia/Oral": { + "name": "Asia/Oral", + "lat": 51.2167, + "long": 51.35, + "countries": [ + "KZ" + ], + "comments": "West Kazakhstan" + }, + "Asia/Beirut": { + "name": "Asia/Beirut", + "lat": 33.8833, + "long": 35.5, + "countries": [ + "LB" + ], + "comments": "" + }, + "Asia/Colombo": { + "name": "Asia/Colombo", + "lat": 6.9333, + "long": 79.85, + "countries": [ + "LK" + ], + "comments": "" + }, + "Africa/Monrovia": { + "name": "Africa/Monrovia", + "lat": 6.3, + "long": -9.2167, + "countries": [ + "LR" + ], + "comments": "" + }, + "Europe/Vilnius": { + "name": "Europe/Vilnius", + "lat": 54.6833, + "long": 25.3167, + "countries": [ + "LT" + ], + "comments": "" + }, + "Europe/Luxembourg": { + "name": "Europe/Luxembourg", + "lat": 49.6, + "long": 6.15, + "countries": [ + "LU" + ], + "comments": "" + }, + "Europe/Riga": { + "name": "Europe/Riga", + "lat": 56.95, + "long": 24.1, + "countries": [ + "LV" + ], + "comments": "" + }, + "Africa/Tripoli": { + "name": "Africa/Tripoli", + "lat": 32.9, + "long": 13.1833, + "countries": [ + "LY" + ], + "comments": "" + }, + "Africa/Casablanca": { + "name": "Africa/Casablanca", + "lat": 33.65, + "long": -6.4167, + "countries": [ + "MA" + ], + "comments": "" + }, + "Europe/Monaco": { + "name": "Europe/Monaco", + "lat": 43.7, + "long": 7.3833, + "countries": [ + "MC" + ], + "comments": "" + }, + "Europe/Chisinau": { + "name": "Europe/Chisinau", + "lat": 47, + "long": 28.8333, + "countries": [ + "MD" + ], + "comments": "" + }, + "Pacific/Majuro": { + "name": "Pacific/Majuro", + "lat": 7.15, + "long": 171.2, + "countries": [ + "MH" + ], + "comments": "Marshall Islands (most areas)" + }, + "Pacific/Kwajalein": { + "name": "Pacific/Kwajalein", + "lat": 9.0833, + "long": 167.3333, + "countries": [ + "MH" + ], + "comments": "Kwajalein" + }, + "Asia/Yangon": { + "name": "Asia/Yangon", + "lat": 16.7833, + "long": 96.1667, + "countries": [ + "MM" + ], + "comments": "" + }, + "Asia/Ulaanbaatar": { + "name": "Asia/Ulaanbaatar", + "lat": 47.9167, + "long": 106.8833, + "countries": [ + "MN" + ], + "comments": "Mongolia (most areas)" + }, + "Asia/Hovd": { + "name": "Asia/Hovd", + "lat": 48.0167, + "long": 91.65, + "countries": [ + "MN" + ], + "comments": "Bayan-Ölgii, Govi-Altai, Hovd, Uvs, Zavkhan" + }, + "Asia/Choibalsan": { + "name": "Asia/Choibalsan", + "lat": 48.0667, + "long": 114.5, + "countries": [ + "MN" + ], + "comments": "Dornod, Sükhbaatar" + }, + "Asia/Macau": { + "name": "Asia/Macau", + "lat": 22.1972, + "long": 113.5417, + "countries": [ + "MO" + ], + "comments": "" + }, + "America/Martinique": { + "name": "America/Martinique", + "lat": 14.6, + "long": -60.9167, + "countries": [ + "MQ" + ], + "comments": "" + }, + "Europe/Malta": { + "name": "Europe/Malta", + "lat": 35.9, + "long": 14.5167, + "countries": [ + "MT" + ], + "comments": "" + }, + "Indian/Mauritius": { + "name": "Indian/Mauritius", + "lat": -19.8333, + "long": 57.5, + "countries": [ + "MU" + ], + "comments": "" + }, + "Indian/Maldives": { + "name": "Indian/Maldives", + "lat": 4.1667, + "long": 73.5, + "countries": [ + "MV" + ], + "comments": "" + }, + "America/Mexico_City": { + "name": "America/Mexico_City", + "lat": 19.4, + "long": -98.85, + "countries": [ + "MX" + ], + "comments": "Central Time" + }, + "America/Cancun": { + "name": "America/Cancun", + "lat": 21.0833, + "long": -85.2333, + "countries": [ + "MX" + ], + "comments": "Eastern Standard Time - Quintana Roo" + }, + "America/Merida": { + "name": "America/Merida", + "lat": 20.9667, + "long": -88.3833, + "countries": [ + "MX" + ], + "comments": "Central Time - Campeche, Yucatán" + }, + "America/Monterrey": { + "name": "America/Monterrey", + "lat": 25.6667, + "long": -99.6833, + "countries": [ + "MX" + ], + "comments": "Central Time - Durango; Coahuila, Nuevo León, Tamaulipas (most areas)" + }, + "America/Matamoros": { + "name": "America/Matamoros", + "lat": 25.8333, + "long": -96.5, + "countries": [ + "MX" + ], + "comments": "Central Time US - Coahuila, Nuevo León, Tamaulipas (US border)" + }, + "America/Mazatlan": { + "name": "America/Mazatlan", + "lat": 23.2167, + "long": -105.5833, + "countries": [ + "MX" + ], + "comments": "Mountain Time - Baja California Sur, Nayarit, Sinaloa" + }, + "America/Chihuahua": { + "name": "America/Chihuahua", + "lat": 28.6333, + "long": -105.9167, + "countries": [ + "MX" + ], + "comments": "Mountain Time - Chihuahua (most areas)" + }, + "America/Ojinaga": { + "name": "America/Ojinaga", + "lat": 29.5667, + "long": -103.5833, + "countries": [ + "MX" + ], + "comments": "Mountain Time US - Chihuahua (US border)" + }, + "America/Hermosillo": { + "name": "America/Hermosillo", + "lat": 29.0667, + "long": -109.0333, + "countries": [ + "MX" + ], + "comments": "Mountain Standard Time - Sonora" + }, + "America/Tijuana": { + "name": "America/Tijuana", + "lat": 32.5333, + "long": -116.9833, + "countries": [ + "MX" + ], + "comments": "Pacific Time US - Baja California" + }, + "America/Bahia_Banderas": { + "name": "America/Bahia_Banderas", + "lat": 20.8, + "long": -104.75, + "countries": [ + "MX" + ], + "comments": "Central Time - Bahía de Banderas" + }, + "Asia/Kuala_Lumpur": { + "name": "Asia/Kuala_Lumpur", + "lat": 3.1667, + "long": 101.7, + "countries": [ + "MY" + ], + "comments": "Malaysia (peninsula)" + }, + "Asia/Kuching": { + "name": "Asia/Kuching", + "lat": 1.55, + "long": 110.3333, + "countries": [ + "MY" + ], + "comments": "Sabah, Sarawak" + }, + "Africa/Maputo": { + "name": "Africa/Maputo", + "lat": -24.0333, + "long": 32.5833, + "countries": [ + "MZ", + "BI", + "BW", + "CD", + "MW", + "RW", + "ZM", + "ZW" + ], + "comments": "Central Africa Time" + }, + "Africa/Windhoek": { + "name": "Africa/Windhoek", + "lat": -21.4333, + "long": 17.1, + "countries": [ + "NA" + ], + "comments": "" + }, + "Pacific/Noumea": { + "name": "Pacific/Noumea", + "lat": -21.7333, + "long": 166.45, + "countries": [ + "NC" + ], + "comments": "" + }, + "Pacific/Norfolk": { + "name": "Pacific/Norfolk", + "lat": -28.95, + "long": 167.9667, + "countries": [ + "NF" + ], + "comments": "" + }, + "Africa/Lagos": { + "name": "Africa/Lagos", + "lat": 6.45, + "long": 3.4, + "countries": [ + "NG", + "AO", + "BJ", + "CD", + "CF", + "CG", + "CM", + "GA", + "GQ", + "NE" + ], + "comments": "West Africa Time" + }, + "America/Managua": { + "name": "America/Managua", + "lat": 12.15, + "long": -85.7167, + "countries": [ + "NI" + ], + "comments": "" + }, + "Europe/Amsterdam": { + "name": "Europe/Amsterdam", + "lat": 52.3667, + "long": 4.9, + "countries": [ + "NL" + ], + "comments": "" + }, + "Europe/Oslo": { + "name": "Europe/Oslo", + "lat": 59.9167, + "long": 10.75, + "countries": [ + "NO", + "SJ" + ], + "comments": "" + }, + "Asia/Kathmandu": { + "name": "Asia/Kathmandu", + "lat": 27.7167, + "long": 85.3167, + "countries": [ + "NP" + ], + "comments": "" + }, + "Pacific/Nauru": { + "name": "Pacific/Nauru", + "lat": 0.5167, + "long": 166.9167, + "countries": [ + "NR" + ], + "comments": "" + }, + "Pacific/Niue": { + "name": "Pacific/Niue", + "lat": -18.9833, + "long": -168.0833, + "countries": [ + "NU" + ], + "comments": "" + }, + "Pacific/Auckland": { + "name": "Pacific/Auckland", + "lat": -35.1333, + "long": 174.7667, + "countries": [ + "NZ", + "AQ" + ], + "comments": "New Zealand time" + }, + "Pacific/Chatham": { + "name": "Pacific/Chatham", + "lat": -42.05, + "long": -175.45, + "countries": [ + "NZ" + ], + "comments": "Chatham Islands" + }, + "America/Panama": { + "name": "America/Panama", + "lat": 8.9667, + "long": -78.4667, + "countries": [ + "PA", + "KY" + ], + "comments": "" + }, + "America/Lima": { + "name": "America/Lima", + "lat": -11.95, + "long": -76.95, + "countries": [ + "PE" + ], + "comments": "" + }, + "Pacific/Tahiti": { + "name": "Pacific/Tahiti", + "lat": -16.4667, + "long": -148.4333, + "countries": [ + "PF" + ], + "comments": "Society Islands" + }, + "Pacific/Marquesas": { + "name": "Pacific/Marquesas", + "lat": -9, + "long": -138.5, + "countries": [ + "PF" + ], + "comments": "Marquesas Islands" + }, + "Pacific/Gambier": { + "name": "Pacific/Gambier", + "lat": -22.8667, + "long": -133.05, + "countries": [ + "PF" + ], + "comments": "Gambier Islands" + }, + "Pacific/Port_Moresby": { + "name": "Pacific/Port_Moresby", + "lat": -8.5, + "long": 147.1667, + "countries": [ + "PG" + ], + "comments": "Papua New Guinea (most areas)" + }, + "Pacific/Bougainville": { + "name": "Pacific/Bougainville", + "lat": -5.7833, + "long": 155.5667, + "countries": [ + "PG" + ], + "comments": "Bougainville" + }, + "Asia/Manila": { + "name": "Asia/Manila", + "lat": 14.5833, + "long": 121, + "countries": [ + "PH" + ], + "comments": "" + }, + "Asia/Karachi": { + "name": "Asia/Karachi", + "lat": 24.8667, + "long": 67.05, + "countries": [ + "PK" + ], + "comments": "" + }, + "Europe/Warsaw": { + "name": "Europe/Warsaw", + "lat": 52.25, + "long": 21, + "countries": [ + "PL" + ], + "comments": "" + }, + "America/Miquelon": { + "name": "America/Miquelon", + "lat": 47.05, + "long": -55.6667, + "countries": [ + "PM" + ], + "comments": "" + }, + "Pacific/Pitcairn": { + "name": "Pacific/Pitcairn", + "lat": -24.9333, + "long": -129.9167, + "countries": [ + "PN" + ], + "comments": "" + }, + "America/Puerto_Rico": { + "name": "America/Puerto_Rico", + "lat": 18.4683, + "long": -65.8939, + "countries": [ + "PR" + ], + "comments": "" + }, + "Asia/Gaza": { + "name": "Asia/Gaza", + "lat": 31.5, + "long": 34.4667, + "countries": [ + "PS" + ], + "comments": "Gaza Strip" + }, + "Asia/Hebron": { + "name": "Asia/Hebron", + "lat": 31.5333, + "long": 35.095, + "countries": [ + "PS" + ], + "comments": "West Bank" + }, + "Europe/Lisbon": { + "name": "Europe/Lisbon", + "lat": 38.7167, + "long": -8.8667, + "countries": [ + "PT" + ], + "comments": "Portugal (mainland)" + }, + "Atlantic/Madeira": { + "name": "Atlantic/Madeira", + "lat": 32.6333, + "long": -15.1, + "countries": [ + "PT" + ], + "comments": "Madeira Islands" + }, + "Atlantic/Azores": { + "name": "Atlantic/Azores", + "lat": 37.7333, + "long": -24.3333, + "countries": [ + "PT" + ], + "comments": "Azores" + }, + "Pacific/Palau": { + "name": "Pacific/Palau", + "lat": 7.3333, + "long": 134.4833, + "countries": [ + "PW" + ], + "comments": "" + }, + "America/Asuncion": { + "name": "America/Asuncion", + "lat": -24.7333, + "long": -56.3333, + "countries": [ + "PY" + ], + "comments": "" + }, + "Asia/Qatar": { + "name": "Asia/Qatar", + "lat": 25.2833, + "long": 51.5333, + "countries": [ + "QA", + "BH" + ], + "comments": "" + }, + "Indian/Reunion": { + "name": "Indian/Reunion", + "lat": -19.1333, + "long": 55.4667, + "countries": [ + "RE", + "TF" + ], + "comments": "Réunion, Crozet, Scattered Islands" + }, + "Europe/Bucharest": { + "name": "Europe/Bucharest", + "lat": 44.4333, + "long": 26.1, + "countries": [ + "RO" + ], + "comments": "" + }, + "Europe/Belgrade": { + "name": "Europe/Belgrade", + "lat": 44.8333, + "long": 20.5, + "countries": [ + "RS", + "BA", + "HR", + "ME", + "MK", + "SI" + ], + "comments": "" + }, + "Europe/Kaliningrad": { + "name": "Europe/Kaliningrad", + "lat": 54.7167, + "long": 20.5, + "countries": [ + "RU" + ], + "comments": "MSK-01 - Kaliningrad" + }, + "Europe/Moscow": { + "name": "Europe/Moscow", + "lat": 55.7558, + "long": 37.6178, + "countries": [ + "RU" + ], + "comments": "MSK+00 - Moscow area" + }, + "Europe/Simferopol": { + "name": "Europe/Simferopol", + "lat": 44.95, + "long": 34.1, + "countries": [ + "RU", + "UA" + ], + "comments": "MSK+00 - Crimea" + }, + "Europe/Kirov": { + "name": "Europe/Kirov", + "lat": 58.6, + "long": 49.65, + "countries": [ + "RU" + ], + "comments": "MSK+00 - Kirov" + }, + "Europe/Astrakhan": { + "name": "Europe/Astrakhan", + "lat": 46.35, + "long": 48.05, + "countries": [ + "RU" + ], + "comments": "MSK+01 - Astrakhan" + }, + "Europe/Volgograd": { + "name": "Europe/Volgograd", + "lat": 48.7333, + "long": 44.4167, + "countries": [ + "RU" + ], + "comments": "MSK+01 - Volgograd" + }, + "Europe/Saratov": { + "name": "Europe/Saratov", + "lat": 51.5667, + "long": 46.0333, + "countries": [ + "RU" + ], + "comments": "MSK+01 - Saratov" + }, + "Europe/Ulyanovsk": { + "name": "Europe/Ulyanovsk", + "lat": 54.3333, + "long": 48.4, + "countries": [ + "RU" + ], + "comments": "MSK+01 - Ulyanovsk" + }, + "Europe/Samara": { + "name": "Europe/Samara", + "lat": 53.2, + "long": 50.15, + "countries": [ + "RU" + ], + "comments": "MSK+01 - Samara, Udmurtia" + }, + "Asia/Yekaterinburg": { + "name": "Asia/Yekaterinburg", + "lat": 56.85, + "long": 60.6, + "countries": [ + "RU" + ], + "comments": "MSK+02 - Urals" + }, + "Asia/Omsk": { + "name": "Asia/Omsk", + "lat": 55, + "long": 73.4, + "countries": [ + "RU" + ], + "comments": "MSK+03 - Omsk" + }, + "Asia/Novosibirsk": { + "name": "Asia/Novosibirsk", + "lat": 55.0333, + "long": 82.9167, + "countries": [ + "RU" + ], + "comments": "MSK+04 - Novosibirsk" + }, + "Asia/Barnaul": { + "name": "Asia/Barnaul", + "lat": 53.3667, + "long": 83.75, + "countries": [ + "RU" + ], + "comments": "MSK+04 - Altai" + }, + "Asia/Tomsk": { + "name": "Asia/Tomsk", + "lat": 56.5, + "long": 84.9667, + "countries": [ + "RU" + ], + "comments": "MSK+04 - Tomsk" + }, + "Asia/Novokuznetsk": { + "name": "Asia/Novokuznetsk", + "lat": 53.75, + "long": 87.1167, + "countries": [ + "RU" + ], + "comments": "MSK+04 - Kemerovo" + }, + "Asia/Krasnoyarsk": { + "name": "Asia/Krasnoyarsk", + "lat": 56.0167, + "long": 92.8333, + "countries": [ + "RU" + ], + "comments": "MSK+04 - Krasnoyarsk area" + }, + "Asia/Irkutsk": { + "name": "Asia/Irkutsk", + "lat": 52.2667, + "long": 104.3333, + "countries": [ + "RU" + ], + "comments": "MSK+05 - Irkutsk, Buryatia" + }, + "Asia/Chita": { + "name": "Asia/Chita", + "lat": 52.05, + "long": 113.4667, + "countries": [ + "RU" + ], + "comments": "MSK+06 - Zabaykalsky" + }, + "Asia/Yakutsk": { + "name": "Asia/Yakutsk", + "lat": 62, + "long": 129.6667, + "countries": [ + "RU" + ], + "comments": "MSK+06 - Lena River" + }, + "Asia/Khandyga": { + "name": "Asia/Khandyga", + "lat": 62.6564, + "long": 135.5539, + "countries": [ + "RU" + ], + "comments": "MSK+06 - Tomponsky, Ust-Maysky" + }, + "Asia/Vladivostok": { + "name": "Asia/Vladivostok", + "lat": 43.1667, + "long": 131.9333, + "countries": [ + "RU" + ], + "comments": "MSK+07 - Amur River" + }, + "Asia/Ust-Nera": { + "name": "Asia/Ust-Nera", + "lat": 64.5603, + "long": 143.2267, + "countries": [ + "RU" + ], + "comments": "MSK+07 - Oymyakonsky" + }, + "Asia/Magadan": { + "name": "Asia/Magadan", + "lat": 59.5667, + "long": 150.8, + "countries": [ + "RU" + ], + "comments": "MSK+08 - Magadan" + }, + "Asia/Sakhalin": { + "name": "Asia/Sakhalin", + "lat": 46.9667, + "long": 142.7, + "countries": [ + "RU" + ], + "comments": "MSK+08 - Sakhalin Island" + }, + "Asia/Srednekolymsk": { + "name": "Asia/Srednekolymsk", + "lat": 67.4667, + "long": 153.7167, + "countries": [ + "RU" + ], + "comments": "MSK+08 - Sakha (E); North Kuril Is" + }, + "Asia/Kamchatka": { + "name": "Asia/Kamchatka", + "lat": 53.0167, + "long": 158.65, + "countries": [ + "RU" + ], + "comments": "MSK+09 - Kamchatka" + }, + "Asia/Anadyr": { + "name": "Asia/Anadyr", + "lat": 64.75, + "long": 177.4833, + "countries": [ + "RU" + ], + "comments": "MSK+09 - Bering Sea" + }, + "Asia/Riyadh": { + "name": "Asia/Riyadh", + "lat": 24.6333, + "long": 46.7167, + "countries": [ + "SA", + "KW", + "YE" + ], + "comments": "" + }, + "Pacific/Guadalcanal": { + "name": "Pacific/Guadalcanal", + "lat": -8.4667, + "long": 160.2, + "countries": [ + "SB" + ], + "comments": "" + }, + "Indian/Mahe": { + "name": "Indian/Mahe", + "lat": -3.3333, + "long": 55.4667, + "countries": [ + "SC" + ], + "comments": "" + }, + "Africa/Khartoum": { + "name": "Africa/Khartoum", + "lat": 15.6, + "long": 32.5333, + "countries": [ + "SD" + ], + "comments": "" + }, + "Europe/Stockholm": { + "name": "Europe/Stockholm", + "lat": 59.3333, + "long": 18.05, + "countries": [ + "SE" + ], + "comments": "" + }, + "Asia/Singapore": { + "name": "Asia/Singapore", + "lat": 1.2833, + "long": 103.85, + "countries": [ + "SG" + ], + "comments": "" + }, + "America/Paramaribo": { + "name": "America/Paramaribo", + "lat": 5.8333, + "long": -54.8333, + "countries": [ + "SR" + ], + "comments": "" + }, + "Africa/Juba": { + "name": "Africa/Juba", + "lat": 4.85, + "long": 31.6167, + "countries": [ + "SS" + ], + "comments": "" + }, + "Africa/Sao_Tome": { + "name": "Africa/Sao_Tome", + "lat": 0.3333, + "long": 6.7333, + "countries": [ + "ST" + ], + "comments": "" + }, + "America/El_Salvador": { + "name": "America/El_Salvador", + "lat": 13.7, + "long": -88.8, + "countries": [ + "SV" + ], + "comments": "" + }, + "Asia/Damascus": { + "name": "Asia/Damascus", + "lat": 33.5, + "long": 36.3, + "countries": [ + "SY" + ], + "comments": "" + }, + "America/Grand_Turk": { + "name": "America/Grand_Turk", + "lat": 21.4667, + "long": -70.8667, + "countries": [ + "TC" + ], + "comments": "" + }, + "Africa/Ndjamena": { + "name": "Africa/Ndjamena", + "lat": 12.1167, + "long": 15.05, + "countries": [ + "TD" + ], + "comments": "" + }, + "Indian/Kerguelen": { + "name": "Indian/Kerguelen", + "lat": -48.6472, + "long": 70.2175, + "countries": [ + "TF" + ], + "comments": "Kerguelen, St Paul Island, Amsterdam Island" + }, + "Asia/Bangkok": { + "name": "Asia/Bangkok", + "lat": 13.75, + "long": 100.5167, + "countries": [ + "TH", + "KH", + "LA", + "VN" + ], + "comments": "Indochina (most areas)" + }, + "Asia/Dushanbe": { + "name": "Asia/Dushanbe", + "lat": 38.5833, + "long": 68.8, + "countries": [ + "TJ" + ], + "comments": "" + }, + "Pacific/Fakaofo": { + "name": "Pacific/Fakaofo", + "lat": -8.6333, + "long": -170.7667, + "countries": [ + "TK" + ], + "comments": "" + }, + "Asia/Dili": { + "name": "Asia/Dili", + "lat": -7.45, + "long": 125.5833, + "countries": [ + "TL" + ], + "comments": "" + }, + "Asia/Ashgabat": { + "name": "Asia/Ashgabat", + "lat": 37.95, + "long": 58.3833, + "countries": [ + "TM" + ], + "comments": "" + }, + "Africa/Tunis": { + "name": "Africa/Tunis", + "lat": 36.8, + "long": 10.1833, + "countries": [ + "TN" + ], + "comments": "" + }, + "Pacific/Tongatapu": { + "name": "Pacific/Tongatapu", + "lat": -20.8333, + "long": -174.8333, + "countries": [ + "TO" + ], + "comments": "" + }, + "Europe/Istanbul": { + "name": "Europe/Istanbul", + "lat": 41.0167, + "long": 28.9667, + "countries": [ + "TR" + ], + "comments": "" + }, + "America/Port_of_Spain": { + "name": "America/Port_of_Spain", + "lat": 10.65, + "long": -60.4833, + "countries": [ + "TT", + "AG", + "AI", + "BL", + "DM", + "GD", + "GP", + "KN", + "LC", + "MF", + "MS", + "VC", + "VG", + "VI" + ], + "comments": "" + }, + "Pacific/Funafuti": { + "name": "Pacific/Funafuti", + "lat": -7.4833, + "long": 179.2167, + "countries": [ + "TV" + ], + "comments": "" + }, + "Asia/Taipei": { + "name": "Asia/Taipei", + "lat": 25.05, + "long": 121.5, + "countries": [ + "TW" + ], + "comments": "" + }, + "Europe/Kiev": { + "name": "Europe/Kiev", + "lat": 50.4333, + "long": 30.5167, + "countries": [ + "UA" + ], + "comments": "Ukraine (most areas)" + }, + "Europe/Uzhgorod": { + "name": "Europe/Uzhgorod", + "lat": 48.6167, + "long": 22.3, + "countries": [ + "UA" + ], + "comments": "Ruthenia" + }, + "Europe/Zaporozhye": { + "name": "Europe/Zaporozhye", + "lat": 47.8333, + "long": 35.1667, + "countries": [ + "UA" + ], + "comments": "Zaporozh'ye/Zaporizhia; Lugansk/Luhansk (east)" + }, + "Pacific/Wake": { + "name": "Pacific/Wake", + "lat": 19.2833, + "long": 166.6167, + "countries": [ + "UM" + ], + "comments": "Wake Island" + }, + "America/New_York": { + "name": "America/New_York", + "lat": 40.7142, + "long": -73.9936, + "countries": [ + "US" + ], + "comments": "Eastern (most areas)" + }, + "America/Detroit": { + "name": "America/Detroit", + "lat": 42.3314, + "long": -82.9542, + "countries": [ + "US" + ], + "comments": "Eastern - MI (most areas)" + }, + "America/Kentucky/Louisville": { + "name": "America/Kentucky/Louisville", + "lat": 38.2542, + "long": -84.2406, + "countries": [ + "US" + ], + "comments": "Eastern - KY (Louisville area)" + }, + "America/Kentucky/Monticello": { + "name": "America/Kentucky/Monticello", + "lat": 36.8297, + "long": -83.1508, + "countries": [ + "US" + ], + "comments": "Eastern - KY (Wayne)" + }, + "America/Indiana/Indianapolis": { + "name": "America/Indiana/Indianapolis", + "lat": 39.7683, + "long": -85.8419, + "countries": [ + "US" + ], + "comments": "Eastern - IN (most areas)" + }, + "America/Indiana/Vincennes": { + "name": "America/Indiana/Vincennes", + "lat": 38.6772, + "long": -86.4714, + "countries": [ + "US" + ], + "comments": "Eastern - IN (Da, Du, K, Mn)" + }, + "America/Indiana/Winamac": { + "name": "America/Indiana/Winamac", + "lat": 41.0514, + "long": -85.3969, + "countries": [ + "US" + ], + "comments": "Eastern - IN (Pulaski)" + }, + "America/Indiana/Marengo": { + "name": "America/Indiana/Marengo", + "lat": 38.3756, + "long": -85.6553, + "countries": [ + "US" + ], + "comments": "Eastern - IN (Crawford)" + }, + "America/Indiana/Petersburg": { + "name": "America/Indiana/Petersburg", + "lat": 38.4919, + "long": -86.7214, + "countries": [ + "US" + ], + "comments": "Eastern - IN (Pike)" + }, + "America/Indiana/Vevay": { + "name": "America/Indiana/Vevay", + "lat": 38.7478, + "long": -84.9328, + "countries": [ + "US" + ], + "comments": "Eastern - IN (Switzerland)" + }, + "America/Chicago": { + "name": "America/Chicago", + "lat": 41.85, + "long": -86.35, + "countries": [ + "US" + ], + "comments": "Central (most areas)" + }, + "America/Indiana/Tell_City": { + "name": "America/Indiana/Tell_City", + "lat": 37.9531, + "long": -85.2386, + "countries": [ + "US" + ], + "comments": "Central - IN (Perry)" + }, + "America/Indiana/Knox": { + "name": "America/Indiana/Knox", + "lat": 41.2958, + "long": -85.375, + "countries": [ + "US" + ], + "comments": "Central - IN (Starke)" + }, + "America/Menominee": { + "name": "America/Menominee", + "lat": 45.1078, + "long": -86.3858, + "countries": [ + "US" + ], + "comments": "Central - MI (Wisconsin border)" + }, + "America/North_Dakota/Center": { + "name": "America/North_Dakota/Center", + "lat": 47.1164, + "long": -100.7008, + "countries": [ + "US" + ], + "comments": "Central - ND (Oliver)" + }, + "America/North_Dakota/New_Salem": { + "name": "America/North_Dakota/New_Salem", + "lat": 46.845, + "long": -100.5892, + "countries": [ + "US" + ], + "comments": "Central - ND (Morton rural)" + }, + "America/North_Dakota/Beulah": { + "name": "America/North_Dakota/Beulah", + "lat": 47.2642, + "long": -100.2222, + "countries": [ + "US" + ], + "comments": "Central - ND (Mercer)" + }, + "America/Denver": { + "name": "America/Denver", + "lat": 39.7392, + "long": -103.0158, + "countries": [ + "US" + ], + "comments": "Mountain (most areas)" + }, + "America/Boise": { + "name": "America/Boise", + "lat": 43.6136, + "long": -115.7975, + "countries": [ + "US" + ], + "comments": "Mountain - ID (south); OR (east)" + }, + "America/Phoenix": { + "name": "America/Phoenix", + "lat": 33.4483, + "long": -111.9267, + "countries": [ + "US" + ], + "comments": "MST - Arizona (except Navajo)" + }, + "America/Los_Angeles": { + "name": "America/Los_Angeles", + "lat": 34.0522, + "long": -117.7572, + "countries": [ + "US" + ], + "comments": "Pacific" + }, + "America/Anchorage": { + "name": "America/Anchorage", + "lat": 61.2181, + "long": -148.0997, + "countries": [ + "US" + ], + "comments": "Alaska (most areas)" + }, + "America/Juneau": { + "name": "America/Juneau", + "lat": 58.3019, + "long": -133.5803, + "countries": [ + "US" + ], + "comments": "Alaska - Juneau area" + }, + "America/Sitka": { + "name": "America/Sitka", + "lat": 57.1764, + "long": -134.6981, + "countries": [ + "US" + ], + "comments": "Alaska - Sitka area" + }, + "America/Metlakatla": { + "name": "America/Metlakatla", + "lat": 55.1269, + "long": -130.4236, + "countries": [ + "US" + ], + "comments": "Alaska - Annette Island" + }, + "America/Yakutat": { + "name": "America/Yakutat", + "lat": 59.5469, + "long": -138.2728, + "countries": [ + "US" + ], + "comments": "Alaska - Yakutat" + }, + "America/Nome": { + "name": "America/Nome", + "lat": 64.5011, + "long": -164.5936, + "countries": [ + "US" + ], + "comments": "Alaska (west)" + }, + "America/Adak": { + "name": "America/Adak", + "lat": 51.88, + "long": -175.3419, + "countries": [ + "US" + ], + "comments": "Aleutian Islands" + }, + "Pacific/Honolulu": { + "name": "Pacific/Honolulu", + "lat": 21.3069, + "long": -156.1417, + "countries": [ + "US", + "UM" + ], + "comments": "Hawaii" + }, + "America/Montevideo": { + "name": "America/Montevideo", + "lat": -33.0908, + "long": -55.7875, + "countries": [ + "UY" + ], + "comments": "" + }, + "Asia/Samarkand": { + "name": "Asia/Samarkand", + "lat": 39.6667, + "long": 66.8, + "countries": [ + "UZ" + ], + "comments": "Uzbekistan (west)" + }, + "Asia/Tashkent": { + "name": "Asia/Tashkent", + "lat": 41.3333, + "long": 69.3, + "countries": [ + "UZ" + ], + "comments": "Uzbekistan (east)" + }, + "America/Caracas": { + "name": "America/Caracas", + "lat": 10.5, + "long": -65.0667, + "countries": [ + "VE" + ], + "comments": "" + }, + "Asia/Ho_Chi_Minh": { + "name": "Asia/Ho_Chi_Minh", + "lat": 10.75, + "long": 106.6667, + "countries": [ + "VN" + ], + "comments": "Vietnam (south)" + }, + "Pacific/Efate": { + "name": "Pacific/Efate", + "lat": -16.3333, + "long": 168.4167, + "countries": [ + "VU" + ], + "comments": "" + }, + "Pacific/Wallis": { + "name": "Pacific/Wallis", + "lat": -12.7, + "long": -175.8333, + "countries": [ + "WF" + ], + "comments": "" + }, + "Pacific/Apia": { + "name": "Pacific/Apia", + "lat": -12.1667, + "long": -170.2667, + "countries": [ + "WS" + ], + "comments": "" + }, + "Africa/Johannesburg": { + "name": "Africa/Johannesburg", + "lat": -25.75, + "long": 28, + "countries": [ + "ZA", + "LS", + "SZ" + ], + "comments": "" + } + } +} \ No newline at end of file diff --git a/node_modules/moment-timezone/data/packed/latest.json b/node_modules/moment-timezone/data/packed/latest.json new file mode 100644 index 00000000..880cced6 --- /dev/null +++ b/node_modules/moment-timezone/data/packed/latest.json @@ -0,0 +1,600 @@ +{ + "version": "2019b", + "zones": [ + "Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q|48e5", + "Africa/Accra|LMT GMT +0020|.Q 0 -k|012121212121212121212121212121212121212121212121|-26BbX.8 6tzX.8 MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE 1BAk MnE 1C0k MnE 1BAk MnE 1BAk MnE|41e5", + "Africa/Nairobi|LMT EAT +0230 +0245|-2r.g -30 -2u -2J|01231|-1F3Cr.g 3Dzr.g okMu MFXJ|47e5", + "Africa/Algiers|PMT WET WEST CET CEST|-9.l 0 -10 -10 -20|0121212121212121343431312123431213|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 DA0 Imo0 rd0 De0 9Xz0 1fb0 1ap0 16K0 2yo0 mEp0 hwL0 jxA0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0|26e5", + "Africa/Lagos|LMT WAT|-d.A -10|01|-22y0d.A|17e6", + "Africa/Bissau|LMT -01 GMT|12.k 10 0|012|-2ldX0 2xoo0|39e4", + "Africa/Maputo|LMT CAT|-2a.k -20|01|-2GJea.k|26e5", + "Africa/Cairo|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1bIO0 vb0 1ip0 11z0 1iN0 1nz0 12p0 1pz0 10N0 1pz0 16p0 1jz0 s3d0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1WL0 rd0 1Rz0 wp0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1qL0 Xd0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1ny0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 WL0 1qN0 Rb0 1wp0 On0 1zd0 Lz0 1EN0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0|15e6", + "Africa/Casablanca|LMT +00 +01|u.k 0 -10|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-2gMnt.E 130Lt.E rb0 Dd0 dVb0 b6p0 TX0 EoB0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4mn0 SyN0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0|32e5", + "Africa/Ceuta|WET WEST CET CEST|0 -10 -10 -20|010101010101010101010232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-25KN0 11z0 drd0 18p0 3HX0 17d0 1fz0 1a10 1io0 1a00 1y7o0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4VB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|85e3", + "Africa/El_Aaiun|LMT -01 +00 +01|Q.M 10 0 -10|012323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1rDz7.c 1GVA7.c 6L0 AL0 1Nd0 XX0 1Cp0 pz0 1cBB0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 e00 28M0 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0|20e4", + "Africa/Johannesburg|SAST SAST SAST|-1u -20 -30|012121|-2GJdu 1Ajdu 1cL0 1cN0 1cL0|84e5", + "Africa/Juba|LMT CAT CAST EAT|-26.s -20 -30 -30|01212121212121212121212121212121213|-1yW26.s 1zK06.s 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0", + "Africa/Khartoum|LMT CAT CAST EAT|-2a.8 -20 -30 -30|012121212121212121212121212121212131|-1yW2a.8 1zK0a.8 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 HjL0|51e5", + "Africa/Monrovia|MMT MMT GMT|H.8 I.u 0|012|-23Lzg.Q 28G01.m|11e5", + "Africa/Ndjamena|LMT WAT WAST|-10.c -10 -20|0121|-2le10.c 2J3c0.c Wn0|13e5", + "Africa/Sao_Tome|LMT GMT WAT|A.J 0 -10|0121|-2le00 4i6N0 2q00", + "Africa/Tripoli|LMT CET CEST EET|-Q.I -10 -20 -20|012121213121212121212121213123123|-21JcQ.I 1hnBQ.I vx0 4iP0 xx0 4eN0 Bb0 7ip0 U0n0 A10 1db0 1cN0 1db0 1dd0 1db0 1eN0 1bb0 1e10 1cL0 1c10 1db0 1dd0 1db0 1cN0 1db0 1q10 fAn0 1ep0 1db0 AKq0 TA0 1o00|11e5", + "Africa/Tunis|PMT CET CEST|-9.l -10 -20|0121212121212121212121212121212121|-2nco9.l 18pa9.l 1qM0 DA0 3Tc0 11B0 1ze0 WM0 7z0 3d0 14L0 1cN0 1f90 1ar0 16J0 1gXB0 WM0 1rA0 11c0 nwo0 Ko0 1cM0 1cM0 1rA0 10M0 zuM0 10N0 1aN0 1qM0 WM0 1qM0 11A0 1o00|20e5", + "Africa/Windhoek|+0130 SAST SAST CAT WAT|-1u -20 -30 -20 -10|01213434343434343434343434343434343434343434343434343|-2GJdu 1Ajdu 1cL0 1SqL0 9Io0 16P0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4", + "America/Adak|NST NWT NPT BST BDT AHST HST HDT|b0 a0 a0 b0 a0 a0 a0 90|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17SX0 8wW0 iB0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326", + "America/Anchorage|AST AWT APT AHST AHDT YST AKST AKDT|a0 90 90 a0 90 90 90 80|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17T00 8wX0 iA0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4", + "America/Port_of_Spain|LMT AST|46.4 40|01|-2kNvR.U|43e3", + "America/Araguaina|LMT -03 -02|3c.M 30 20|0121212121212121212121212121212121212121212121212121|-2glwL.c HdKL.c 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 ny10 Lz0|14e4", + "America/Argentina/Buenos_Aires|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 A4p0 uL0 1qN0 WL0", + "America/Argentina/Catamarca|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323132321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 7B0 8zb0 uL0", + "America/Argentina/Cordoba|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323132323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0 1qN0 WL0", + "America/Argentina/Jujuy|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323121323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1ze0 TX0 1ld0 WK0 1wp0 TX0 A4p0 uL0", + "America/Argentina/La_Rioja|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0", + "America/Argentina/Mendoza|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232312121321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1u20 SL0 1vd0 Tb0 1wp0 TW0 ri10 Op0 7TX0 uL0", + "America/Argentina/Rio_Gallegos|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0", + "America/Argentina/Salta|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0", + "America/Argentina/San_Juan|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rld0 m10 8lb0 uL0", + "America/Argentina/San_Luis|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323121212321212|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 XX0 1q20 SL0 AN0 vDb0 m10 8lb0 8L0 jd0 1qN0 WL0 1qN0", + "America/Argentina/Tucuman|CMT -04 -03 -02|4g.M 40 30 20|0121212121212121212121212121212121212121212323232313232123232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 4N0 8BX0 uL0 1qN0 WL0", + "America/Argentina/Ushuaia|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rkN0 8p0 8zb0 uL0", + "America/Curacao|LMT -0430 AST|4z.L 4u 40|012|-2kV7o.d 28KLS.d|15e4", + "America/Asuncion|AMT -04 -03|3O.E 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-1x589.k 1DKM9.k 3CL0 3Dd0 10L0 1pB0 10n0 1pB0 10n0 1pB0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1lB0 14n0 1dd0 1cL0 1fd0 WL0 1rd0 1aL0 1dB0 Xz0 1qp0 Xb0 1qN0 10L0 1rB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 WN0 1qL0 11B0 1nX0 1ip0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 TX0 1tB0 19X0 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0|28e5", + "America/Atikokan|CST CDT CWT CPT EST|60 50 50 50 50|0101234|-25TQ0 1in0 Rnb0 3je0 8x30 iw0|28e2", + "America/Bahia_Banderas|LMT MST CST PST MDT CDT|71 70 60 80 60 50|0121212131414141414141414141414141414152525252525252525252525252525252525252525252525252525252|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|84e3", + "America/Bahia|LMT -03 -02|2y.4 30 20|01212121212121212121212121212121212121212121212121212121212121|-2glxp.U HdLp.U 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 l5B0 Rb0|27e5", + "America/Barbados|LMT BMT AST ADT|3W.t 3W.t 40 30|01232323232|-1Q0I1.v jsM0 1ODC1.v IL0 1ip0 17b0 1ip0 17b0 1ld0 13b0|28e4", + "America/Belem|LMT -03 -02|3d.U 30 20|012121212121212121212121212121|-2glwK.4 HdKK.4 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0|20e5", + "America/Belize|LMT CST -0530 CDT|5Q.M 60 5u 50|01212121212121212121212121212121212121212121212121213131|-2kBu7.c fPA7.c Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1f0Mu qn0 lxB0 mn0|57e3", + "America/Blanc-Sablon|AST ADT AWT APT|40 30 30 30|010230|-25TS0 1in0 UGp0 8x50 iu0|11e2", + "America/Boa_Vista|LMT -04 -03|42.E 40 30|0121212121212121212121212121212121|-2glvV.k HdKV.k 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 smp0 WL0 1tB0 2L0|62e2", + "America/Bogota|BMT -05 -04|4U.g 50 40|0121|-2eb73.I 38yo3.I 2en0|90e5", + "America/Boise|PST PDT MST MWT MPT MDT|80 70 70 60 60 60|0101023425252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-261q0 1nX0 11B0 1nX0 8C10 JCL0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 Dd0 1Kn0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e4", + "America/Cambridge_Bay|-00 MST MWT MPT MDDT MDT CST CDT EST|0 70 60 60 50 60 60 50 50|0123141515151515151515151515151515151515151515678651515151515151515151515151515151515151515151515151515151515151515151515151|-21Jc0 RO90 8x20 ix0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11A0 1nX0 2K0 WQ0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e2", + "America/Campo_Grande|LMT -04 -03|3C.s 40 30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwl.w HdLl.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4", + "America/Cancun|LMT CST EST EDT CDT|5L.4 60 50 40 50|0123232341414141414141414141414141414141412|-1UQG0 2q2o0 yLB0 1lb0 14p0 1lb0 14p0 Lz0 xB0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4", + "America/Caracas|CMT -0430 -04|4r.E 4u 40|01212|-2kV7w.k 28KM2.k 1IwOu kqo0|29e5", + "America/Cayenne|LMT -04 -03|3t.k 40 30|012|-2mrwu.E 2gWou.E|58e3", + "America/Panama|CMT EST|5j.A 50|01|-2uduE.o|15e5", + "America/Chicago|CST CDT EST CWT CPT|60 50 50 50 50|01010101010101010101010101010101010102010101010103401010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 1wp0 TX0 WN0 1qL0 1cN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 11B0 1Hz0 14p0 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5", + "America/Chihuahua|LMT MST CST CDT MDT|74.k 70 60 50 60|0121212323241414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|81e4", + "America/Costa_Rica|SJMT CST CDT|5A.d 60 50|0121212121|-1Xd6n.L 2lu0n.L Db0 1Kp0 Db0 pRB0 15b0 1kp0 mL0|12e5", + "America/Creston|MST PST|70 80|010|-29DR0 43B0|53e2", + "America/Cuiaba|LMT -04 -03|3I.k 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwf.E HdLf.E 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 4a10 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|54e4", + "America/Danmarkshavn|LMT -03 -02 GMT|1e.E 30 20 0|01212121212121212121212121212121213|-2a5WJ.k 2z5fJ.k 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 DC0|8", + "America/Dawson_Creek|PST PDT PWT PPT MST|80 70 70 70 70|0102301010101010101010101010101010101010101010101010101014|-25TO0 1in0 UGp0 8x10 iy0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 ML0|12e3", + "America/Dawson|YST YDT YWT YPT YDDT PST PDT|90 80 80 80 70 80 70|0101023040565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-25TN0 1in0 1o10 13V0 Ser0 8x00 iz0 LCL0 1fA0 jrA0 fNd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|13e2", + "America/Denver|MST MDT MWT MPT|70 60 60 60|01010101023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261r0 1nX0 11B0 1nX0 11B0 1qL0 WN0 mn0 Ord0 8x20 ix0 LCN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5", + "America/Detroit|LMT CST EST EWT EPT EDT|5w.b 60 50 40 40 40|012342525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-2Cgir.N peqr.N 156L0 8x40 iv0 6fd0 11z0 XQp0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e5", + "America/Edmonton|LMT MST MDT MWT MPT|7x.Q 70 60 60 60|01212121212121341212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2yd4q.8 shdq.8 1in0 17d0 hz0 2dB0 1fz0 1a10 11z0 1qN0 WL0 1qN0 11z0 IGN0 8x20 ix0 3NB0 11z0 LFB0 1cL0 3Cp0 1cL0 66N0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|10e5", + "America/Eirunepe|LMT -05 -04|4D.s 50 40|0121212121212121212121212121212121|-2glvk.w HdLk.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0 yTd0 d5X0|31e3", + "America/El_Salvador|LMT CST CDT|5U.M 60 50|012121|-1XiG3.c 2Fvc3.c WL0 1qN0 WL0|11e5", + "America/Tijuana|LMT MST PST PDT PWT PPT|7M.4 70 80 70 70 70|012123245232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQE0 4PX0 8mM0 8lc0 SN0 1cL0 pHB0 83r0 zI0 5O10 1Rz0 cOO0 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 BUp0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|20e5", + "America/Fort_Nelson|PST PDT PWT PPT MST|80 70 70 70 70|01023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010104|-25TO0 1in0 UGp0 8x10 iy0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2", + "America/Fort_Wayne|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|010101023010101010101010101040454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 QI10 Db0 RB0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 5Tz0 1o10 qLb0 1cL0 1cN0 1cL0 1qhd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Fortaleza|LMT -03 -02|2y 30 20|0121212121212121212121212121212121212121|-2glxq HdLq 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 5z0 2mN0 On0|34e5", + "America/Glace_Bay|LMT AST ADT AWT APT|3X.M 40 30 30 30|012134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsI0.c CwO0.c 1in0 UGp0 8x50 iu0 iq10 11z0 Jg10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3", + "America/Godthab|LMT -03 -02|3q.U 30 20|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a5Ux.4 2z5dx.4 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e3", + "America/Goose_Bay|NST NDT NST NDT NWT NPT AST ADT ADDT|3u.Q 2u.Q 3u 2u 2u 2u 40 30 20|010232323232323245232323232323232323232323232323232323232326767676767676767676767676767676767676767676768676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-25TSt.8 1in0 DXb0 2HbX.8 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 WL0 1qN0 WL0 1qN0 7UHu itu 1tB0 WL0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1tB0 WL0 1ld0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 S10 g0u 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2", + "America/Grand_Turk|KMT EST EDT AST|57.a 50 40 40|01212121212121212121212121212121212121212121212121212121212121212121212121232121212121212121212121212121212121212121|-2l1uQ.O 2HHBQ.O 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 5Ip0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2", + "America/Guatemala|LMT CST CDT|62.4 60 50|0121212121|-24KhV.U 2efXV.U An0 mtd0 Nz0 ifB0 17b0 zDB0 11z0|13e5", + "America/Guayaquil|QMT -05 -04|5e 50 40|0121|-1yVSK 2uILK rz0|27e5", + "America/Guyana|LMT -0345 -03 -04|3Q.E 3J 30 40|0123|-2dvU7.k 2r6LQ.k Bxbf|80e4", + "America/Halifax|LMT AST ADT AWT APT|4e.o 40 30 30 30|0121212121212121212121212121212121212121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsHJ.A xzzJ.A 1db0 3I30 1in0 3HX0 IL0 1E10 ML0 1yN0 Pb0 1Bd0 Mn0 1Bd0 Rz0 1w10 Xb0 1w10 LX0 1w10 Xb0 1w10 Lz0 1C10 Jz0 1E10 OL0 1yN0 Un0 1qp0 Xb0 1qp0 11X0 1w10 Lz0 1HB0 LX0 1C10 FX0 1w10 Xb0 1qp0 Xb0 1BB0 LX0 1td0 Xb0 1qp0 Xb0 Rf0 8x50 iu0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 3Qp0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 3Qp0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 6i10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4", + "America/Havana|HMT CST CDT|5t.A 50 40|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1Meuu.o 72zu.o ML0 sld0 An0 1Nd0 Db0 1Nd0 An0 6Ep0 An0 1Nd0 An0 JDd0 Mn0 1Ap0 On0 1fd0 11X0 1qN0 WL0 1wp0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 14n0 1ld0 14L0 1kN0 15b0 1kp0 1cL0 1cN0 1fz0 1a10 1fz0 1fB0 11z0 14p0 1nX0 11B0 1nX0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 1a10 1in0 1a10 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 17c0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 11A0 6i00 Rc0 1wo0 U00 1tA0 Rc0 1wo0 U00 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5", + "America/Hermosillo|LMT MST CST PST MDT|7n.Q 70 60 80 60|0121212131414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0|64e4", + "America/Indiana/Knox|CST CDT CWT CPT EST|60 50 50 50 50|0101023010101010101010101010101010101040101010101010101010101010101010101010101010101010141010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 11z0 1o10 11z0 1o10 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 3Cn0 8wp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 z8o0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Marengo|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101023010101010101010104545454545414545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 dyN0 11z0 6fd0 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 jrz0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1e6p0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Petersburg|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010104010101010101010101010141014545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 njX0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 3Fb0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 19co0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Tell_City|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010454541010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 g0p0 11z0 1o10 11z0 1qL0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 caL0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Vevay|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|010102304545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 kPB0 Awn0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1lnd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Vincennes|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010454541014545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 g0p0 11z0 1o10 11z0 1qL0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 caL0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Indiana/Winamac|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010101010454541054545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 jrz0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1za0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Inuvik|-00 PST PDDT MST MDT|0 80 60 70 60|0121343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-FnA0 tWU0 1fA0 wPe0 2pz0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|35e2", + "America/Iqaluit|-00 EWT EPT EST EDDT EDT CST CDT|0 40 40 50 30 40 60 50|01234353535353535353535353535353535353535353567353535353535353535353535353535353535353535353535353535353535353535353535353|-16K00 7nX0 iv0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|67e2", + "America/Jamaica|KMT EST EDT|57.a 50 40|0121212121212121212121|-2l1uQ.O 2uM1Q.O 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0|94e4", + "America/Juneau|PST PWT PPT PDT YDT YST AKST AKDT|80 70 70 70 80 90 90 80|01203030303030303030303030403030356767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cM0 1cM0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|33e3", + "America/Kentucky/Louisville|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101010102301010101010101010101010101454545454545414545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 3Fd0 Nb0 LPd0 11z0 RB0 8x30 iw0 Bb0 10N0 2bB0 8in0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 xz0 gso0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Kentucky/Monticello|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101023010101010101010101010101010101010101010101010101010101010101010101454545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 SWp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/La_Paz|CMT BST -04|4w.A 3w.A 40|012|-1x37r.o 13b0|19e5", + "America/Lima|LMT -05 -04|58.A 50 40|0121212121212121|-2tyGP.o 1bDzP.o zX0 1aN0 1cL0 1cN0 1cL0 1PrB0 zX0 1O10 zX0 6Gp0 zX0 98p0 zX0|11e6", + "America/Los_Angeles|PST PDT PWT PPT|80 70 70 70|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261q0 1nX0 11B0 1nX0 SgN0 8x10 iy0 5Wp1 1VaX 3dA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6", + "America/Maceio|LMT -03 -02|2m.Q 30 20|012121212121212121212121212121212121212121|-2glxB.8 HdLB.8 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 8Q10 WL0 1tB0 5z0 2mN0 On0|93e4", + "America/Managua|MMT CST EST CDT|5J.c 60 50 50|0121313121213131|-1quie.M 1yAMe.M 4mn0 9Up0 Dz0 1K10 Dz0 s3F0 1KH0 DB0 9In0 k8p0 19X0 1o30 11y0|22e5", + "America/Manaus|LMT -04 -03|40.4 40 30|01212121212121212121212121212121|-2glvX.U HdKX.U 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0|19e5", + "America/Martinique|FFMT AST ADT|44.k 40 30|0121|-2mPTT.E 2LPbT.E 19X0|39e4", + "America/Matamoros|LMT CST CDT|6E 60 50|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1UQG0 2FjC0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|45e4", + "America/Mazatlan|LMT MST CST PST MDT|75.E 70 60 80 60|0121212131414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|44e4", + "America/Menominee|CST CDT CWT CPT EST|60 50 50 50 50|01010230101041010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 LCN0 1fz0 6410 9Jb0 1cM0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|85e2", + "America/Merida|LMT CST EST CDT|5W.s 60 50 50|0121313131313131313131313131313131313131313131313131313131313131313131313131313131313131|-1UQG0 2q2o0 2hz0 wu30 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|11e5", + "America/Metlakatla|PST PWT PPT PDT AKST AKDT|80 70 70 70 90 80|01203030303030303030303030303030304545450454545454545454545454545454545454545454|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1hU10 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2", + "America/Mexico_City|LMT MST CST CDT CWT|6A.A 70 60 50 50|012121232324232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 gEn0 TX0 3xd0 Jb0 6zB0 SL0 e5d0 17b0 1Pff0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|20e6", + "America/Miquelon|LMT AST -03 -02|3I.E 40 30 20|012323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2mKkf.k 2LTAf.k gQ10 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2", + "America/Moncton|EST AST ADT AWT APT|50 40 30 30 30|012121212121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsH0 CwN0 1in0 zAo0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1K10 Lz0 1zB0 NX0 1u10 Wn0 S20 8x50 iu0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14n1 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 ReX 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|64e3", + "America/Monterrey|LMT CST CDT|6F.g 60 50|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1UQG0 2FjC0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|41e5", + "America/Montevideo|LMT MMT -04 -03 -0330 -0230 -02 -0130|3I.P 3I.P 40 30 3u 2u 20 1u|012343434343434343434343435353636353636375363636363636363636363636363636363636363636363|-2tRUf.9 sVc0 8jcf.9 1db0 1dcu 1cLu 1dcu 1cLu ircu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu WLu 1fAu 1cLu 1o0u 11zu NAu 3jXu zXu Dq0u 19Xu pcu jz0 cm10 19X0 6tB0 1fbu 3o0u jX0 4vB0 xz0 3Cp0 mmu 1a10 IMu Db0 4c10 uL0 1Nd0 An0 1SN0 uL0 mp0 28L0 iPB0 un0 1SN0 xz0 1zd0 Lz0 1zd0 Rb0 1zd0 On0 1wp0 Rb0 s8p0 1fB0 1ip0 11z0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5", + "America/Toronto|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101012301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TR0 1in0 11Wu 1nzu 1fD0 WJ0 1wr0 Nb0 1Ap0 On0 1zd0 On0 1wp0 TX0 1tB0 TX0 1tB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 4kM0 8x40 iv0 1o10 11z0 1nX0 11z0 1o10 11z0 1o10 1qL0 11D0 1nX0 11B0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e5", + "America/Nassau|LMT EST EDT|59.u 50 40|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2kNuO.u 26XdO.u 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|24e4", + "America/New_York|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 11B0 1qL0 1a10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x40 iv0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6", + "America/Nipigon|EST EDT EWT EPT|50 40 40 40|010123010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TR0 1in0 Rnb0 3je0 8x40 iv0 19yN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|16e2", + "America/Nome|NST NWT NPT BST BDT YST AKST AKDT|b0 a0 a0 b0 a0 90 90 80|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17SX0 8wW0 iB0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cl0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|38e2", + "America/Noronha|LMT -02 -01|29.E 20 10|0121212121212121212121212121212121212121|-2glxO.k HdKO.k 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|30e2", + "America/North_Dakota/Beulah|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101014545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/North_Dakota/Center|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101014545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/North_Dakota/New_Salem|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101454545454545454545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "America/Ojinaga|LMT MST CST CDT MDT|6V.E 70 60 50 60|0121212323241414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3", + "America/Pangnirtung|-00 AST AWT APT ADDT ADT EDT EST CST CDT|0 40 30 30 20 30 40 50 60 50|012314151515151515151515151515151515167676767689767676767676767676767676767676767676767676767676767676767676767676767676767|-1XiM0 PnG0 8x50 iu0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1o00 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2", + "America/Paramaribo|LMT PMT PMT -0330 -03|3E.E 3E.Q 3E.A 3u 30|01234|-2nDUj.k Wqo0.c qanX.I 1yVXN.o|24e4", + "America/Phoenix|MST MDT MWT|70 60 60|01010202010|-261r0 1nX0 11B0 1nX0 SgN0 4Al1 Ap0 1db0 SWqX 1cL0|42e5", + "America/Port-au-Prince|PPMT EST EDT|4N 50 40|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-28RHb 2FnMb 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14q0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 i6n0 1nX0 11B0 1nX0 d430 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5", + "America/Rio_Branco|LMT -05 -04|4v.c 50 40|01212121212121212121212121212121|-2glvs.M HdLs.M 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 NBd0 d5X0|31e4", + "America/Porto_Velho|LMT -04 -03|4f.A 40 30|012121212121212121212121212121|-2glvI.o HdKI.o 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0|37e4", + "America/Puerto_Rico|AST AWT APT|40 30 30|0120|-17lU0 7XT0 iu0|24e5", + "America/Punta_Arenas|SMT -05 -04 -03|4G.K 50 40 30|0102021212121212121232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-2q2jh.e fJAh.e 5knG.K 1Vzh.e jRAG.K 1pbh.e 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 blz0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0", + "America/Rainy_River|CST CDT CWT CPT|60 50 50 50|010123010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TQ0 1in0 Rnb0 3je0 8x30 iw0 19yN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|842", + "America/Rankin_Inlet|-00 CST CDDT CDT EST|0 60 40 50 50|012131313131313131313131313131313131313131313431313131313131313131313131313131313131313131313131313131313131313131313131|-vDc0 keu0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e2", + "America/Recife|LMT -03 -02|2j.A 30 20|0121212121212121212121212121212121212121|-2glxE.o HdLE.o 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|33e5", + "America/Regina|LMT MST MDT MWT MPT CST|6W.A 70 60 60 60 60|012121212121212121212121341212121212121212121212121215|-2AD51.o uHe1.o 1in0 s2L0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 66N0 1cL0 1cN0 19X0 1fB0 1cL0 1fB0 1cL0 1cN0 1cL0 M30 8x20 ix0 1ip0 1cL0 1ip0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 3NB0 1cL0 1cN0|19e4", + "America/Resolute|-00 CST CDDT CDT EST|0 60 40 50 50|012131313131313131313131313131313131313131313431313131313431313131313131313131313131313131313131313131313131313131313131|-SnA0 GWS0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|229", + "America/Santarem|LMT -04 -03|3C.M 40 30|0121212121212121212121212121212|-2glwl.c HdLl.c 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 NBd0|21e4", + "America/Santiago|SMT -05 -04 -03|4G.K 50 40 30|010202121212121212321232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-2q2jh.e fJAh.e 5knG.K 1Vzh.e jRAG.K 1pbh.e 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 9Bz0 jb0 1oN0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0|62e5", + "America/Santo_Domingo|SDMT EST EDT -0430 AST|4E 50 40 4u 40|01213131313131414|-1ttjk 1lJMk Mn0 6sp0 Lbu 1Cou yLu 1RAu wLu 1QMu xzu 1Q0u xXu 1PAu 13jB0 e00|29e5", + "America/Sao_Paulo|LMT -03 -02|36.s 30 20|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwR.w HdKR.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 pTd0 PX0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6", + "America/Scoresbysund|LMT -02 -01 +00|1r.Q 20 10 0|0121323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2a5Ww.8 2z5ew.8 1a00 1cK0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|452", + "America/Sitka|PST PWT PPT PDT YST AKST AKDT|80 70 70 70 90 90 80|01203030303030303030303030303030345656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|90e2", + "America/St_Johns|NST NDT NST NDT NWT NPT NDDT|3u.Q 2u.Q 3u 2u 2u 2u 1u|01010101010101010101010101010101010102323232323232324523232323232323232323232323232323232323232323232323232323232323232323232323232323232326232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-28oit.8 14L0 1nB0 1in0 1gm0 Dz0 1JB0 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 1cL0 1fB0 19X0 1fB0 19X0 10O0 eKX.8 19X0 1iq0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 WL0 1qN0 WL0 1qN0 7UHu itu 1tB0 WL0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1tB0 WL0 1ld0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4", + "America/Swift_Current|LMT MST MDT MWT MPT CST|7b.k 70 60 60 60 60|012134121212121212121215|-2AD4M.E uHdM.E 1in0 UGp0 8x20 ix0 1o10 17b0 1ip0 11z0 1o10 11z0 1o10 11z0 isN0 1cL0 3Cp0 1cL0 1cN0 11z0 1qN0 WL0 pMp0|16e3", + "America/Tegucigalpa|LMT CST CDT|5M.Q 60 50|01212121|-1WGGb.8 2ETcb.8 WL0 1qN0 WL0 GRd0 AL0|11e5", + "America/Thule|LMT AST ADT|4z.8 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a5To.Q 31NBo.Q 1cL0 1cN0 1cL0 1fB0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|656", + "America/Thunder_Bay|CST EST EWT EPT EDT|60 50 40 40 40|0123141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-2q5S0 1iaN0 8x40 iv0 XNB0 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4", + "America/Vancouver|PST PDT PWT PPT|80 70 70 70|0102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TO0 1in0 UGp0 8x10 iy0 1o10 17b0 1ip0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5", + "America/Whitehorse|YST YDT YWT YPT YDDT PST PDT|90 80 80 80 70 80 70|0101023040565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-25TN0 1in0 1o10 13V0 Ser0 8x00 iz0 LCL0 1fA0 3NA0 vrd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3", + "America/Winnipeg|CST CDT CWT CPT|60 50 50 50|010101023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aIi0 WL0 3ND0 1in0 Jap0 Rb0 aCN0 8x30 iw0 1tB0 11z0 1ip0 11z0 1o10 11z0 1o10 11z0 1rd0 10L0 1op0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 1cL0 1cN0 11z0 6i10 WL0 6i10 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|66e4", + "America/Yakutat|YST YWT YPT YDT AKST AKDT|90 80 80 80 90 80|01203030303030303030303030303030304545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-17T10 8x00 iz0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cn0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|642", + "America/Yellowknife|-00 MST MWT MPT MDDT MDT|0 70 60 60 50 60|012314151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151|-1pdA0 hix0 8x20 ix0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3", + "Antarctica/Casey|-00 +08 +11|0 -80 -b0|01212121|-2q00 1DjS0 T90 40P0 KL0 blz0 3m10|10", + "Antarctica/Davis|-00 +07 +05|0 -70 -50|01012121|-vyo0 iXt0 alj0 1D7v0 VB0 3Wn0 KN0|70", + "Antarctica/DumontDUrville|-00 +10|0 -a0|0101|-U0o0 cfq0 bFm0|80", + "Antarctica/Macquarie|AEST AEDT -00 +11|-a0 -b0 0 -b0|0102010101010101010101010101010101010101010101010101010101010101010101010101010101010101013|-29E80 19X0 4SL0 1ayy0 Lvs0 1cM0 1o00 Rc0 1wo0 Rc0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0|1", + "Antarctica/Mawson|-00 +06 +05|0 -60 -50|012|-CEo0 2fyk0|60", + "Pacific/Auckland|NZMT NZST NZST NZDT|-bu -cu -c0 -d0|01020202020202020202020202023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1GCVu Lz0 1tB0 11zu 1o0u 11zu 1o0u 11zu 1o0u 14nu 1lcu 14nu 1lcu 1lbu 11Au 1nXu 11Au 1nXu 11Au 1nXu 11Au 1nXu 11Au 1qLu WMu 1qLu 11Au 1n1bu IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|14e5", + "Antarctica/Palmer|-00 -03 -04 -02|0 30 40 20|0121212121213121212121212121212121212121212121212121212121212121212121212121212121|-cao0 nD0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 jsN0 14N0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40", + "Antarctica/Rothera|-00 -03|0 30|01|gOo0|130", + "Antarctica/Syowa|-00 +03|0 -30|01|-vs00|20", + "Antarctica/Troll|-00 +00 +02|0 0 -20|01212121212121212121212121212121212121212121212121212121212121212121|1puo0 hd0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|40", + "Antarctica/Vostok|-00 +06|0 -60|01|-tjA0|25", + "Europe/Oslo|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2awM0 Qm0 W6o0 5pf0 WM0 1fA0 1cM0 1cM0 1cM0 1cM0 wJc0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1qM0 WM0 zpc0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|62e4", + "Asia/Riyadh|LMT +03|-36.Q -30|01|-TvD6.Q|57e5", + "Asia/Almaty|LMT +05 +06 +07|-57.M -50 -60 -70|012323232323232323232321232323232323232323232323232|-1Pc57.M eUo7.M 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|15e5", + "Asia/Amman|LMT EET EEST|-2n.I -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1yW2n.I 1HiMn.I KL0 1oN0 11b0 1oN0 11b0 1pd0 1dz0 1cp0 11b0 1op0 11b0 fO10 1db0 1e10 1cL0 1cN0 1cL0 1cN0 1fz0 1pd0 10n0 1ld0 14n0 1hB0 15b0 1ip0 19X0 1cN0 1cL0 1cN0 17b0 1ld0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1So0 y00 1fc0 1dc0 1co0 1dc0 1cM0 1cM0 1cM0 1o00 11A0 1lc0 17c0 1cM0 1cM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|25e5", + "Asia/Anadyr|LMT +12 +13 +14 +11|-bN.U -c0 -d0 -e0 -b0|01232121212121212121214121212121212121212121212121212121212141|-1PcbN.U eUnN.U 23CL0 1db0 2q10 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|13e3", + "Asia/Aqtau|LMT +04 +05 +06|-3l.4 -40 -50 -60|012323232323232323232123232312121212121212121212|-1Pc3l.4 eUnl.4 24PX0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|15e4", + "Asia/Aqtobe|LMT +04 +05 +06|-3M.E -40 -50 -60|0123232323232323232321232323232323232323232323232|-1Pc3M.E eUnM.E 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|27e4", + "Asia/Ashgabat|LMT +04 +05 +06|-3R.w -40 -50 -60|0123232323232323232323212|-1Pc3R.w eUnR.w 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0|41e4", + "Asia/Atyrau|LMT +03 +05 +06 +04|-3r.I -30 -50 -60 -40|01232323232323232323242323232323232324242424242|-1Pc3r.I eUor.I 24PW0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 2sp0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0", + "Asia/Baghdad|BMT +03 +04|-2V.A -30 -40|012121212121212121212121212121212121212121212121212121|-26BeV.A 2ACnV.A 11b0 1cp0 1dz0 1dd0 1db0 1cN0 1cp0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1de0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0|66e5", + "Asia/Qatar|LMT +04 +03|-3q.8 -40 -30|012|-21Jfq.8 27BXq.8|96e4", + "Asia/Baku|LMT +03 +04 +05|-3j.o -30 -40 -50|01232323232323232323232123232323232323232323232323232323232323232|-1Pc3j.o 1jUoj.o WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 9Je0 1o00 11z0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5", + "Asia/Bangkok|BMT +07|-6G.4 -70|01|-218SG.4|15e6", + "Asia/Barnaul|LMT +06 +07 +08|-5z -60 -70 -80|0123232323232323232323212323232321212121212121212121212121212121212|-21S5z pCnz 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 p90 LE0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0", + "Asia/Beirut|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-21aq0 1on0 1410 1db0 19B0 1in0 1ip0 WL0 1lQp0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 q6N0 En0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1op0 11b0 dA10 17b0 1iN0 17b0 1iN0 17b0 1iN0 17b0 1vB0 SL0 1mp0 13z0 1iN0 17b0 1iN0 17b0 1jd0 12n0 1a10 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0|22e5", + "Asia/Bishkek|LMT +05 +06 +07|-4W.o -50 -60 -70|012323232323232323232321212121212121212121212121212|-1Pc4W.o eUnW.o 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2e00 1tX0 17b0 1ip0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1cPu 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0|87e4", + "Asia/Brunei|LMT +0730 +08|-7D.E -7u -80|012|-1KITD.E gDc9.E|42e4", + "Asia/Kolkata|MMT IST +0630|-5l.a -5u -6u|012121|-2zOtl.a 1r2LP.a 1un0 HB0 7zX0|15e6", + "Asia/Chita|LMT +08 +09 +10|-7x.Q -80 -90 -a0|012323232323232323232321232323232323232323232323232323232323232312|-21Q7x.Q pAnx.Q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3re0|33e4", + "Asia/Choibalsan|LMT +07 +08 +10 +09|-7C -70 -80 -a0 -90|0123434343434343434343434343434343434343434343424242|-2APHC 2UkoC cKn0 1da0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 3Db0 h1f0 1cJ0 1cP0 1cJ0|38e3", + "Asia/Shanghai|CST CDT|-80 -90|010101010101010101010101010|-1c2w0 Rz0 11d0 1wL0 A10 8HX0 1G10 Tz0 1ip0 1jX0 1cN0 11b0 1oN0 aL0 1tU30 Rb0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0|23e6", + "Asia/Colombo|MMT +0530 +06 +0630|-5j.w -5u -60 -6u|01231321|-2zOtj.w 1rFbN.w 1zzu 7Apu 23dz0 11zu n3cu|22e5", + "Asia/Dhaka|HMT +0630 +0530 +06 +07|-5R.k -6u -5u -60 -70|0121343|-18LFR.k 1unn.k HB0 m6n0 2kxbu 1i00|16e6", + "Asia/Damascus|LMT EET EEST|-2p.c -20 -30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-21Jep.c Hep.c 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1xRB0 11X0 1oN0 10L0 1pB0 11b0 1oN0 10L0 1mp0 13X0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 Nb0 1AN0 Nb0 bcp0 19X0 1gp0 19X0 3ld0 1xX0 Vd0 1Bz0 Sp0 1vX0 10p0 1dz0 1cN0 1cL0 1db0 1db0 1g10 1an0 1ap0 1db0 1fd0 1db0 1cN0 1db0 1dd0 1db0 1cp0 1dz0 1c10 1dX0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 19z0 1fB0 1qL0 11B0 1on0 Wp0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0|26e5", + "Asia/Dili|LMT +08 +09|-8m.k -80 -90|01212|-2le8m.k 1dnXm.k 1nfA0 Xld0|19e4", + "Asia/Dubai|LMT +04|-3F.c -40|01|-21JfF.c|39e5", + "Asia/Dushanbe|LMT +05 +06 +07|-4z.c -50 -60 -70|012323232323232323232321|-1Pc4z.c eUnz.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2hB0|76e4", + "Asia/Famagusta|LMT EET EEST +03|-2f.M -20 -30 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212312121212121212121212121212121212121212121|-1Vc2f.M 2a3cf.M 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", + "Asia/Gaza|EET EEST IST IDT|-20 -30 -20 -30|0101010101010101010101010101010123232323232323232323232323232320101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1c2q0 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 pBd0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 dW0 hfB0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 11z0 1o10 14o0 1lA1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0|18e5", + "Asia/Hebron|EET EEST IST IDT|-20 -30 -20 -30|010101010101010101010101010101012323232323232323232323232323232010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1c2q0 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 pBd0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 dW0 hfB0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 12L0 1mN0 14o0 1lc0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0 11c0 1rc0|25e4", + "Asia/Ho_Chi_Minh|LMT PLMT +07 +08 +09|-76.E -76.u -70 -80 -90|0123423232|-2yC76.E bK00.a 1h7b6.u 5lz0 18o0 3Oq0 k5b0 aW00 BAM0|90e5", + "Asia/Hong_Kong|LMT HKT HKST HKT JST|-7A.G -80 -90 -8u -90|0123412121212121212121212121212121212121212121212121212121212121212121|-2CFH0 1taO0 Hc0 xUu 9tBu 11z0 1tDu Rc0 1wo0 11A0 1cM0 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1nX0 U10 1tz0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 Rd0 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 17d0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|73e5", + "Asia/Hovd|LMT +06 +07 +08|-66.A -60 -70 -80|012323232323232323232323232323232323232323232323232|-2APG6.A 2Uko6.A cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|81e3", + "Asia/Irkutsk|IMT +07 +08 +09|-6V.5 -70 -80 -90|01232323232323232323232123232323232323232323232323232323232323232|-21zGV.5 pjXV.5 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4", + "Europe/Istanbul|IMT EET EEST +04 +03|-1U.U -20 -30 -40 -30|012121212121212121212121212121212121212121212121212121234343434342121212121212121212121212121212121212121212121212121212121212124|-2ogNU.U dzzU.U 11b0 8tB0 1on0 1410 1db0 19B0 1in0 3Rd0 Un0 1oN0 11b0 zSp0 CL0 mN0 1Vz0 1gN0 1pz0 5Rd0 1fz0 1yp0 ML0 1kp0 17b0 1ip0 17b0 1fB0 19X0 1jB0 18L0 1ip0 17z0 qdd0 xX0 3S10 Tz0 dA10 11z0 1o10 11z0 1qN0 11z0 1ze0 11B0 WM0 1qO0 WI0 1nX0 1rB0 10L0 11B0 1in0 17d0 1in0 2pX0 19E0 1fU0 16Q0 1iI0 16Q0 1iI0 1Vd0 pb0 3Kp0 14o0 1de0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1a00 1fA0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WO0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6", + "Asia/Jakarta|BMT +0720 +0730 +09 +08 WIB|-77.c -7k -7u -90 -80 -70|01232425|-1Q0Tk luM0 mPzO 8vWu 6kpu 4PXu xhcu|31e6", + "Asia/Jayapura|LMT +09 +0930 WIT|-9m.M -90 -9u -90|0123|-1uu9m.M sMMm.M L4nu|26e4", + "Asia/Jerusalem|JMT IST IDT IDDT|-2k.E -20 -30 -40|012121212121321212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-26Bek.E SyMk.E 5Rb0 10r0 1px0 10N0 1pz0 16p0 1jB0 16p0 1jx0 3LB0 Em0 or0 1cn0 1dB0 16n0 10O0 1ja0 1tC0 14o0 1cM0 1a00 11A0 1Na0 An0 1MP0 AJ0 1Kp0 LC0 1oo0 Wl0 EQN0 Db0 1fB0 Rb0 bXd0 gM0 8Q00 IM0 1wM0 11z0 1C10 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 1hB0 1dX0 1ep0 1aL0 1eN0 17X0 1nf0 11z0 1tB0 19W0 1e10 17b0 1ep0 1gL0 18N0 1fz0 1eN0 17b0 1gq0 1gn0 19d0 1dz0 1c10 17X0 1hB0 1gn0 19d0 1dz0 1c10 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0|81e4", + "Asia/Kabul|+04 +0430|-40 -4u|01|-10Qs0|46e5", + "Asia/Kamchatka|LMT +11 +12 +13|-ay.A -b0 -c0 -d0|012323232323232323232321232323232323232323232323232323232323212|-1SLKy.A ivXy.A 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|18e4", + "Asia/Karachi|LMT +0530 +0630 +05 PKT PKST|-4s.c -5u -6u -50 -50 -60|012134545454|-2xoss.c 1qOKW.c 7zX0 eup0 LqMu 1fy00 1cL0 dK10 11b0 1610 1jX0|24e6", + "Asia/Urumqi|LMT +06|-5O.k -60|01|-1GgtO.k|32e5", + "Asia/Kathmandu|LMT +0530 +0545|-5F.g -5u -5J|012|-21JhF.g 2EGMb.g|12e5", + "Asia/Khandyga|LMT +08 +09 +10 +11|-92.d -80 -90 -a0 -b0|0123232323232323232323212323232323232323232323232343434343434343432|-21Q92.d pAp2.d 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 qK0 yN0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|66e2", + "Asia/Krasnoyarsk|LMT +06 +07 +08|-6b.q -60 -70 -80|01232323232323232323232123232323232323232323232323232323232323232|-21Hib.q prAb.q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|10e5", + "Asia/Kuala_Lumpur|SMT +07 +0720 +0730 +09 +08|-6T.p -70 -7k -7u -90 -80|0123435|-2Bg6T.p 17anT.p l5XE 17bO 8Fyu 1so1u|71e5", + "Asia/Kuching|LMT +0730 +08 +0820 +09|-7l.k -7u -80 -8k -90|0123232323232323242|-1KITl.k gDbP.k 6ynu AnE 1O0k AnE 1NAk AnE 1NAk AnE 1NAk AnE 1O0k AnE 1NAk AnE pAk 8Fz0|13e4", + "Asia/Macau|LMT CST +09 +10 CDT|-7y.a -80 -90 -a0 -90|012323214141414141414141414141414141414141414141414141414141414141414141|-2CFHy.a 1uqKy.a PX0 1kn0 15B0 11b0 4Qq0 1oM0 11c0 1ko0 1u00 11A0 1cM0 11c0 1o00 11A0 1o00 11A0 1oo0 1400 1o00 11A0 1o00 U00 1tA0 U00 1wo0 Rc0 1wru U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 Rd0 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 17d0 1cK0 1cO0 1cK0 1cO0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|57e4", + "Asia/Magadan|LMT +10 +11 +12|-a3.c -a0 -b0 -c0|012323232323232323232321232323232323232323232323232323232323232312|-1Pca3.c eUo3.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Cq0|95e3", + "Asia/Makassar|LMT MMT +08 +09 WITA|-7V.A -7V.A -80 -90 -80|01234|-21JjV.A vfc0 myLV.A 8ML0|15e5", + "Asia/Manila|PST PDT JST|-80 -90 -90|010201010|-1kJI0 AL0 cK10 65X0 mXB0 vX0 VK10 1db0|24e6", + "Asia/Nicosia|LMT EET EEST|-2d.s -20 -30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1Vc2d.s 2a3cd.s 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|32e4", + "Asia/Novokuznetsk|LMT +06 +07 +08|-5M.M -60 -70 -80|012323232323232323232321232323232323232323232323232323232323212|-1PctM.M eULM.M 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|55e4", + "Asia/Novosibirsk|LMT +06 +07 +08|-5v.E -60 -70 -80|0123232323232323232323212323212121212121212121212121212121212121212|-21Qnv.E pAFv.E 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 ml0 Os0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 4eN0|15e5", + "Asia/Omsk|LMT +05 +06 +07|-4R.u -50 -60 -70|01232323232323232323232123232323232323232323232323232323232323232|-224sR.u pMLR.u 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|12e5", + "Asia/Oral|LMT +03 +05 +06 +04|-3p.o -30 -50 -60 -40|01232323232323232424242424242424242424242424242|-1Pc3p.o eUop.o 23CK0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 1cM0 IM0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|27e4", + "Asia/Pontianak|LMT PMT +0730 +09 +08 WITA WIB|-7h.k -7h.k -7u -90 -80 -80 -70|012324256|-2ua7h.k XE00 munL.k 8Rau 6kpu 4PXu xhcu Wqnu|23e4", + "Asia/Pyongyang|LMT KST JST KST|-8n -8u -90 -90|012313|-2um8n 97XR 1lTzu 2Onc0 6BA0|29e5", + "Asia/Qostanay|LMT +04 +05 +06|-4e.s -40 -50 -60|012323232323232323232123232323232323232323232323|-1Pc4e.s eUoe.s 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0", + "Asia/Qyzylorda|LMT +04 +05 +06|-4l.Q -40 -50 -60|01232323232323232323232323232323232323232323232|-1Pc4l.Q eUol.Q 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 3ao0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 zQl0|73e4", + "Asia/Rangoon|RMT +0630 +09|-6o.L -6u -90|0121|-21Jio.L SmnS.L 7j9u|48e5", + "Asia/Sakhalin|LMT +09 +11 +12 +10|-9u.M -90 -b0 -c0 -a0|01232323232323232323232423232323232424242424242424242424242424242|-2AGVu.M 1BoMu.M 1qFa0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 2pB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|58e4", + "Asia/Samarkand|LMT +04 +05 +06|-4r.R -40 -50 -60|01232323232323232323232|-1Pc4r.R eUor.R 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|36e4", + "Asia/Seoul|LMT KST JST KST KDT KDT|-8r.Q -8u -90 -90 -9u -a0|0123141414141414135353|-2um8r.Q 97XV.Q 1m1zu kKo0 2I0u OL0 1FB0 Rb0 1qN0 TX0 1tB0 TX0 1tB0 TX0 1tB0 TX0 2ap0 12FBu 11A0 1o00 11A0|23e6", + "Asia/Srednekolymsk|LMT +10 +11 +12|-ae.Q -a0 -b0 -c0|01232323232323232323232123232323232323232323232323232323232323232|-1Pcae.Q eUoe.Q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|35e2", + "Asia/Taipei|CST JST CDT|-80 -90 -90|01020202020202020202020202020202020202020|-1iw80 joM0 1yo0 Tz0 1ip0 1jX0 1cN0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 10N0 1BX0 10p0 1pz0 10p0 1pz0 10p0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1BB0 ML0 1Bd0 ML0 uq10 1db0 1cN0 1db0 97B0 AL0|74e5", + "Asia/Tashkent|LMT +05 +06 +07|-4B.b -50 -60 -70|012323232323232323232321|-1Pc4B.b eUnB.b 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0|23e5", + "Asia/Tbilisi|TBMT +03 +04 +05|-2X.b -30 -40 -50|0123232323232323232323212121232323232323232323212|-1Pc2X.b 1jUnX.b WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cK0 1cL0 1cN0 1cL0 1cN0 2pz0 1cL0 1fB0 3Nz0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 An0 Os0 WM0|11e5", + "Asia/Tehran|LMT TMT +0330 +04 +05 +0430|-3p.I -3p.I -3u -40 -50 -4u|01234325252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-2btDp.I 1d3c0 1huLT.I TXu 1pz0 sN0 vAu 1cL0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0|14e6", + "Asia/Thimphu|LMT +0530 +06|-5W.A -5u -60|012|-Su5W.A 1BGMs.A|79e3", + "Asia/Tokyo|JST JDT|-90 -a0|010101010|-QJJ0 Rb0 1ld0 14n0 1zd0 On0 1zd0 On0|38e6", + "Asia/Tomsk|LMT +06 +07 +08|-5D.P -60 -70 -80|0123232323232323232323212323232323232323232323212121212121212121212|-21NhD.P pxzD.P 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 co0 1bB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Qp0|10e5", + "Asia/Ulaanbaatar|LMT +07 +08 +09|-77.w -70 -80 -90|012323232323232323232323232323232323232323232323232|-2APH7.w 2Uko7.w cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|12e5", + "Asia/Ust-Nera|LMT +08 +09 +12 +11 +10|-9w.S -80 -90 -c0 -b0 -a0|012343434343434343434345434343434343434343434343434343434343434345|-21Q9w.S pApw.S 23CL0 1d90 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|65e2", + "Asia/Vladivostok|LMT +09 +10 +11|-8L.v -90 -a0 -b0|01232323232323232323232123232323232323232323232323232323232323232|-1SJIL.v itXL.v 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4", + "Asia/Yakutsk|LMT +08 +09 +10|-8C.W -80 -90 -a0|01232323232323232323232123232323232323232323232323232323232323232|-21Q8C.W pAoC.W 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|28e4", + "Asia/Yekaterinburg|LMT PMT +04 +05 +06|-42.x -3J.5 -40 -50 -60|012343434343434343434343234343434343434343434343434343434343434343|-2ag42.x 7mQh.s qBvJ.5 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|14e5", + "Asia/Yerevan|LMT +03 +04 +05|-2W -30 -40 -50|0123232323232323232323212121212323232323232323232323232323232|-1Pc2W 1jUnW WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 4RX0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|13e5", + "Atlantic/Azores|HMT -02 -01 +00 WET|1S.w 20 10 0 0|01212121212121212121212121212121212121212121232123212321232121212121212121212121212121212121212121232323232323232323232323232323234323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2ldW0 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 qIl0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|25e4", + "Atlantic/Bermuda|LMT AST ADT|4j.i 40 30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1BnRE.G 1LTbE.G 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e3", + "Atlantic/Canary|LMT -01 WET WEST|11.A 10 0 -10|01232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UtaW.o XPAW.o 1lAK0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4", + "Atlantic/Cape_Verde|LMT -02 -01|1y.4 20 10|01212|-2ldW0 1eEo0 7zX0 1djf0|50e4", + "Atlantic/Faroe|LMT WET WEST|r.4 0 -10|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2uSnw.U 2Wgow.U 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|49e3", + "Atlantic/Madeira|FMT -01 +00 +01 WET WEST|17.A 10 0 -10 0 -10|01212121212121212121212121212121212121212121232123212321232121212121212121212121212121212121212121454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2ldX0 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 qIl0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e4", + "Atlantic/Reykjavik|LMT -01 +00 GMT|1s 10 0 0|012121212121212121212121212121212121212121212121212121212121212121213|-2uWmw mfaw 1Bd0 ML0 1LB0 Cn0 1LB0 3fX0 C10 HrX0 1cO0 LB0 1EL0 LA0 1C00 Oo0 1wo0 Rc0 1wo0 Rc0 1wo0 Rc0 1zc0 Oo0 1zc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0|12e4", + "Atlantic/South_Georgia|-02|20|0||30", + "Atlantic/Stanley|SMT -04 -03 -02|3P.o 40 30 20|012121212121212323212121212121212121212121212121212121212121212121212|-2kJw8.A 12bA8.A 19X0 1fB0 19X0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 Cn0 1Cc10 WL0 1qL0 U10 1tz0 2mN0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 U10 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qN0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 U10 1tz0 U10 1tz0 U10|21e2", + "Australia/Sydney|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|40e5", + "Australia/Adelaide|ACST ACDT|-9u -au|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 WM0 1qM0 Rc0 1zc0 U00 1tA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|11e5", + "Australia/Brisbane|AEST AEDT|-a0 -b0|01010101010101010|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0|20e5", + "Australia/Broken_Hill|ACST ACDT|-9u -au|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|18e3", + "Australia/Currie|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-29E80 19X0 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|746", + "Australia/Darwin|ACST ACDT|-9u -au|010101010|-293lt xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0|12e4", + "Australia/Eucla|+0845 +0945|-8J -9J|0101010101010101010|-293kI xcX 10jd0 yL0 1cN0 1cL0 1gSp0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|368", + "Australia/Hobart|AEST AEDT|-a0 -b0|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-29E80 19X0 10jd0 yL0 1cN0 1cL0 1fB0 19X0 VfB0 1cM0 1o00 Rc0 1wo0 Rc0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|21e4", + "Australia/Lord_Howe|AEST +1030 +1130 +11|-a0 -au -bu -b0|0121212121313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313|raC0 1zdu Rb0 1zd0 On0 1zd0 On0 1zd0 On0 1zd0 TXu 1qMu WLu 1tAu WLu 1tAu TXu 1tAu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 11Au 1nXu 1qMu 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu 11zu 1o0u WLu 1qMu 14nu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu|347", + "Australia/Lindeman|AEST AEDT|-a0 -b0|010101010101010101010|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0|10", + "Australia/Melbourne|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293lX xcX 10jd0 yL0 1cN0 1cL0 1fB0 19X0 17c10 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1qM0 11A0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|39e5", + "Australia/Perth|AWST AWDT|-80 -90|0101010101010101010|-293jX xcX 10jd0 yL0 1cN0 1cL0 1gSp0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|18e5", + "CET|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", + "Pacific/Easter|EMT -07 -06 -05|7h.s 70 60 50|012121212121212121212121212123232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1uSgG.w 1s4IG.w WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 2pA0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0|30e2", + "CST6CDT|CST CDT CWT CPT|60 50 50 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "EET|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", + "Europe/Dublin|DMT IST GMT BST IST|p.l -y.D 0 -10 -10|01232323232324242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242|-2ax9y.D Rc0 1fzy.D 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 g600 14o0 1wo0 17c0 1io0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1a00 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1tA0 IM0 90o0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5", + "EST|EST|50|0|", + "EST5EDT|EST EDT EWT EPT|50 40 40 40|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 SgN0 8x40 iv0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "Etc/GMT-0|GMT|0|0|", + "Etc/GMT-1|+01|-10|0|", + "Pacific/Port_Moresby|+10|-a0|0||25e4", + "Etc/GMT-11|+11|-b0|0|", + "Pacific/Tarawa|+12|-c0|0||29e3", + "Etc/GMT-13|+13|-d0|0|", + "Etc/GMT-14|+14|-e0|0|", + "Etc/GMT-2|+02|-20|0|", + "Etc/GMT-3|+03|-30|0|", + "Etc/GMT-4|+04|-40|0|", + "Etc/GMT-5|+05|-50|0|", + "Etc/GMT-6|+06|-60|0|", + "Indian/Christmas|+07|-70|0||21e2", + "Etc/GMT-8|+08|-80|0|", + "Pacific/Palau|+09|-90|0||21e3", + "Etc/GMT+1|-01|10|0|", + "Etc/GMT+10|-10|a0|0|", + "Etc/GMT+11|-11|b0|0|", + "Etc/GMT+12|-12|c0|0|", + "Etc/GMT+3|-03|30|0|", + "Etc/GMT+4|-04|40|0|", + "Etc/GMT+5|-05|50|0|", + "Etc/GMT+6|-06|60|0|", + "Etc/GMT+7|-07|70|0|", + "Etc/GMT+8|-08|80|0|", + "Etc/GMT+9|-09|90|0|", + "Etc/UTC|UTC|0|0|", + "Europe/Amsterdam|AMT NST +0120 +0020 CEST CET|-j.w -1j.w -1k -k -20 -10|010101010101010101010101010101010101010101012323234545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545|-2aFcj.w 11b0 1iP0 11A0 1io0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1co0 1io0 1yo0 Pc0 1a00 1fA0 1Bc0 Mo0 1tc0 Uo0 1tA0 U00 1uo0 W00 1s00 VA0 1so0 Vc0 1sM0 UM0 1wo0 Rc0 1u00 Wo0 1rA0 W00 1s00 VA0 1sM0 UM0 1w00 fV0 BCX.w 1tA0 U00 1u00 Wo0 1sm0 601k WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|16e5", + "Europe/Andorra|WET CET CEST|0 -10 -20|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-UBA0 1xIN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|79e3", + "Europe/Astrakhan|LMT +03 +04 +05|-3c.c -30 -40 -50|012323232323232323212121212121212121212121212121212121212121212|-1Pcrc.c eUMc.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|10e5", + "Europe/Athens|AMT EET EEST CEST CET|-1y.Q -20 -30 -20 -10|012123434121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a61x.Q CNbx.Q mn0 kU10 9b0 3Es0 Xa0 1fb0 1dd0 k3X0 Nz0 SCp0 1vc0 SO0 1cM0 1a00 1ao0 1fc0 1a10 1fG0 1cg0 1dX0 1bX0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|35e5", + "Europe/London|GMT BST BDST|0 -10 -20|0101010101010101010101010101010101010101010101010121212121210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2axa0 Rc0 1fA0 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 2Rz0 Dc0 1zc0 Oo0 1zc0 Rc0 1wo0 17c0 1iM0 FA0 xB0 1fA0 1a00 14o0 bb0 LA0 xB0 Rc0 1wo0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1a00 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1tA0 IM0 90o0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|10e6", + "Europe/Belgrade|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-19RC0 3IP0 WM0 1fA0 1cM0 1cM0 1rc0 Qo0 1vmo0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5", + "Europe/Berlin|CET CEST CEMT|-10 -20 -30|01010101010101210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 kL0 Nc0 m10 WM0 1ao0 1cp0 dX0 jz0 Dd0 1io0 17c0 1fA0 1a00 1ehA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|41e5", + "Europe/Prague|CET CEST GMT|-10 -20 0|01010101010101010201010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 1cM0 1qM0 11c0 mp0 xA0 mn0 17c0 1io0 17c0 1fc0 1ao0 1bNc0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|13e5", + "Europe/Brussels|WET CET CEST WEST|0 -10 -20 -10|0121212103030303030303030303030303030303030303030303212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ehc0 3zX0 11c0 1iO0 11A0 1o00 11A0 my0 Ic0 1qM0 Rc0 1EM0 UM0 1u00 10o0 1io0 1io0 17c0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a30 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 y00 5Wn0 WM0 1fA0 1cM0 16M0 1iM0 16M0 1C00 Uo0 1eeo0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|21e5", + "Europe/Bucharest|BMT EET EEST|-1I.o -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1xApI.o 20LI.o RA0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Axc0 On0 1fA0 1a10 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|19e5", + "Europe/Budapest|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1ip0 17b0 1op0 1tb0 Q2m0 3Ne0 WM0 1fA0 1cM0 1cM0 1oJ0 1dc0 1030 1fA0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1iM0 1fA0 8Ha0 Rb0 1wN0 Rb0 1BB0 Lz0 1C20 LB0 SNX0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e5", + "Europe/Zurich|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-19Lc0 11A0 1o00 11A0 1xG10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|38e4", + "Europe/Chisinau|CMT BMT EET EEST CEST CET MSK MSD|-1T -1I.o -20 -30 -20 -10 -30 -40|012323232323232323234545467676767676767676767323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-26jdT wGMa.A 20LI.o RA0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 27A0 2en0 39g0 WM0 1fA0 1cM0 V90 1t7z0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 gL0 WO0 1cM0 1cM0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11D0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|67e4", + "Europe/Copenhagen|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2azC0 Tz0 VuO0 60q0 WM0 1fA0 1cM0 1cM0 1cM0 S00 1HA0 Nc0 1C00 Dc0 1Nc0 Ao0 1h5A0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5", + "Europe/Gibraltar|GMT BST BDST CET CEST|0 -10 -20 -10 -20|010101010101010101010101010101010101010101010101012121212121010121010101010101010101034343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-2axa0 Rc0 1fA0 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 2Rz0 Dc0 1zc0 Oo0 1zc0 Rc0 1wo0 17c0 1iM0 FA0 xB0 1fA0 1a00 14o0 bb0 LA0 xB0 Rc0 1wo0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 10Jz0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|30e3", + "Europe/Helsinki|HMT EET EEST|-1D.N -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1WuND.N OULD.N 1dA0 1xGq0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5", + "Europe/Kaliningrad|CET CEST CET CEST MSK MSD EEST EET +03|-10 -20 -20 -30 -30 -40 -30 -20 -30|0101010101010232454545454545454546767676767676767676767676767676767676767676787|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 Am0 Lb0 1en0 op0 1pNz0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|44e4", + "Europe/Kiev|KMT EET MSK CEST CET MSD EEST|-22.4 -20 -30 -20 -10 -40 -30|0123434252525252525252525256161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161|-1Pc22.4 eUo2.4 rnz0 2Hg0 WM0 1fA0 da0 1v4m0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 Db0 3220 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|34e5", + "Europe/Kirov|LMT +03 +04 +05|-3i.M -30 -40 -50|01232323232323232321212121212121212121212121212121212121212121|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|48e4", + "Europe/Lisbon|LMT WET WEST WEMT CET CEST|A.J 0 -10 -20 -10 -20|012121212121212121212121212121212121212121212321232123212321212121212121212121212121212121212121214121212121212121212121212121212124545454212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2le00 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 pvy0 1cM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e5", + "Europe/Luxembourg|LMT CET CEST WET WEST WEST WET|-o.A -10 -20 0 -10 -20 -10|0121212134343434343434343434343434343434343434343434565651212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2DG0o.A t6mo.A TB0 1nX0 Up0 1o20 11A0 rW0 CM0 1qP0 R90 1EO0 UK0 1u20 10m0 1ip0 1in0 17e0 19W0 1fB0 1db0 1cp0 1in0 17d0 1fz0 1a10 1in0 1a10 1in0 17f0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 vA0 60L0 WM0 1fA0 1cM0 17c0 1io0 16M0 1C00 Uo0 1eeo0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4", + "Europe/Madrid|WET WEST WEMT CET CEST|0 -10 -20 -10 -20|010101010101010101210343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-25Td0 19B0 1cL0 1dd0 b1z0 18p0 3HX0 17d0 1fz0 1a10 1io0 1a00 1in0 17d0 iIn0 Hd0 1cL0 bb0 1200 2s20 14n0 5aL0 Mp0 1vz0 17d0 1in0 17d0 1in0 17d0 1in0 17d0 6hX0 11B0 XHX0 1a10 1fz0 1a10 19X0 1cN0 1fz0 1a10 1fC0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|62e5", + "Europe/Malta|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2arB0 Lz0 1cN0 1db0 1410 1on0 Wp0 1qL0 17d0 1cL0 M3B0 5M20 WM0 1fA0 1co0 17c0 1iM0 16m0 1de0 1lc0 14m0 1lc0 WO0 1qM0 GTW0 On0 1C10 LA0 1C00 LA0 1EM0 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1co0 1cM0 1lA0 Xc0 1qq0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1iN0 19z0 1fB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|42e4", + "Europe/Minsk|MMT EET MSK CEST CET MSD EEST +03|-1O -20 -30 -20 -10 -40 -30 -30|01234343252525252525252525261616161616161616161616161616161616161617|-1Pc1O eUnO qNX0 3gQ0 WM0 1fA0 1cM0 Al0 1tsn0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 3Fc0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0|19e5", + "Europe/Monaco|PMT WET WEST WEMT CET CEST|-9.l 0 -10 -20 -10 -20|01212121212121212121212121212121212121212121212121232323232345454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 1u00 10o0 1io0 1wo0 Rc0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Df0 2RV0 11z0 11B0 1ze0 WM0 1fA0 1cM0 1fa0 1aq0 16M0 1ekn0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|38e3", + "Europe/Moscow|MMT MMT MST MDST MSD MSK +05 EET EEST MSK|-2u.h -2v.j -3v.j -4v.j -40 -30 -50 -20 -30 -40|012132345464575454545454545454545458754545454545454545454545454545454545454595|-2ag2u.h 2pyW.W 1bA0 11X0 GN0 1Hb0 c4v.j ik0 3DA0 dz0 15A0 c10 2q10 iM10 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|16e6", + "Europe/Paris|PMT WET WEST CEST CET WEMT|-9.l 0 -10 -20 -10 -20|0121212121212121212121212121212121212121212121212123434352543434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434|-2nco8.l cNb8.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 1u00 10o0 1io0 1wo0 Rc0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Df0 Ik0 5M30 WM0 1fA0 1cM0 Vx0 hB0 1aq0 16M0 1ekn0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e6", + "Europe/Riga|RMT LST EET MSK CEST CET MSD EEST|-1A.y -2A.y -20 -30 -20 -10 -40 -30|010102345454536363636363636363727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272|-25TzA.y 11A0 1iM0 ko0 gWm0 yDXA.y 2bX0 3fE0 WM0 1fA0 1cM0 1cM0 4m0 1sLy0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 1o00 11A0 1o00 11A0 1qM0 3oo0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|64e4", + "Europe/Rome|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2arB0 Lz0 1cN0 1db0 1410 1on0 Wp0 1qL0 17d0 1cL0 M3B0 5M20 WM0 1fA0 1cM0 16M0 1iM0 16m0 1de0 1lc0 14m0 1lc0 WO0 1qM0 GTW0 On0 1C10 LA0 1C00 LA0 1EM0 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1C00 LA0 1zc0 Oo0 1C00 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1zc0 Oo0 1fC0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|39e5", + "Europe/Samara|LMT +03 +04 +05|-3k.k -30 -40 -50|0123232323232323232121232323232323232323232323232323232323212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2y10 14m0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|12e5", + "Europe/Saratov|LMT +03 +04 +05|-34.i -30 -40 -50|012323232323232321212121212121212121212121212121212121212121212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 5810", + "Europe/Simferopol|SMT EET MSK CEST CET MSD EEST MSK|-2g -20 -30 -20 -10 -40 -30 -40|012343432525252525252525252161616525252616161616161616161616161616161616172|-1Pc2g eUog rEn0 2qs0 WM0 1fA0 1cM0 3V0 1u0L0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 4eL0 1cL0 1cN0 1cL0 1cN0 dX0 WL0 1cN0 1cL0 1fB0 1o30 11B0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4", + "Europe/Sofia|EET CET CEST EEST|-20 -10 -20 -30|01212103030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030|-168L0 WM0 1fA0 1cM0 1cM0 1cN0 1mKH0 1dd0 1fb0 1ap0 1fb0 1a20 1fy0 1a30 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5", + "Europe/Stockholm|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2azC0 TB0 2yDe0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|15e5", + "Europe/Tallinn|TMT CET CEST EET MSK MSD EEST|-1D -10 -20 -20 -30 -40 -30|012103421212454545454545454546363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363|-26oND teD 11A0 1Ta0 4rXl KSLD 2FX0 2Jg0 WM0 1fA0 1cM0 18J0 1sTX0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o10 11A0 1qM0 5QM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|41e4", + "Europe/Tirane|LMT CET CEST|-1j.k -10 -20|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glBj.k 14pcj.k 5LC0 WM0 4M0 1fCK0 10n0 1op0 11z0 1pd0 11z0 1qN0 WL0 1qp0 Xb0 1qp0 Xb0 1qp0 11z0 1lB0 11z0 1qN0 11z0 1iN0 16n0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|42e4", + "Europe/Ulyanovsk|LMT +03 +04 +05 +02|-3d.A -30 -40 -50 -20|01232323232323232321214121212121212121212121212121212121212121212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|13e5", + "Europe/Uzhgorod|CET CEST MSK MSD EET EEST|-10 -20 -30 -40 -20 -30|010101023232323232323232320454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-1cqL0 6i00 WM0 1fA0 1cM0 1ml0 1Cp0 1r3W0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 1Nf0 2pw0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e4", + "Europe/Vienna|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 3KM0 14o0 LA00 6i00 WM0 1fA0 1cM0 1cM0 1cM0 400 2qM0 1a00 1cM0 1cM0 1io0 17c0 1gHa0 19X0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|18e5", + "Europe/Vilnius|WMT KMT CET EET MSK CEST MSD EEST|-1o -1z.A -10 -20 -30 -20 -40 -30|012324525254646464646464646473737373737373737352537373737373737373737373737373737373737373737373737373737373737373737373|-293do 6ILM.o 1Ooz.A zz0 Mfd0 29W0 3is0 WM0 1fA0 1cM0 LV0 1tgL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11B0 1o00 11A0 1qM0 8io0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4", + "Europe/Volgograd|LMT +03 +04 +05|-2V.E -30 -40 -50|012323232323232321212121212121212121212121212121212121212121212|-21IqV.E psLV.E 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 9Jd0|10e5", + "Europe/Warsaw|WMT CET CEST EET EEST|-1o -10 -20 -20 -30|012121234312121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ctdo 1LXo 11d0 1iO0 11A0 1o00 11A0 1on0 11A0 6zy0 HWP0 5IM0 WM0 1fA0 1cM0 1dz0 1mL0 1en0 15B0 1aq0 1nA0 11A0 1io0 17c0 1fA0 1a00 iDX0 LA0 1cM0 1cM0 1C00 Oo0 1cM0 1cM0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1C00 LA0 uso0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e5", + "Europe/Zaporozhye|+0220 EET MSK CEST CET MSD EEST|-2k -20 -30 -20 -10 -40 -30|01234342525252525252525252526161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161|-1Pc2k eUok rdb0 2RE0 WM0 1fA0 8m0 1v9a0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cK0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|77e4", + "HST|HST|a0|0|", + "Indian/Chagos|LMT +05 +06|-4N.E -50 -60|012|-2xosN.E 3AGLN.E|30e2", + "Indian/Cocos|+0630|-6u|0||596", + "Indian/Kerguelen|-00 +05|0 -50|01|-MG00|130", + "Indian/Mahe|LMT +04|-3F.M -40|01|-2yO3F.M|79e3", + "Indian/Maldives|MMT +05|-4S -50|01|-olgS|35e4", + "Indian/Mauritius|LMT +04 +05|-3O -40 -50|012121|-2xorO 34unO 14L0 12kr0 11z0|15e4", + "Indian/Reunion|LMT +04|-3F.Q -40|01|-2mDDF.Q|84e4", + "Pacific/Kwajalein|+11 +10 +09 -12 +12|-b0 -a0 -90 c0 -c0|012034|-1kln0 akp0 6Up0 12ry0 Wan0|14e3", + "MET|MET MEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00", + "MST|MST|70|0|", + "MST7MDT|MST MDT MWT MPT|70 60 60 60|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "Pacific/Chatham|+1215 +1245 +1345|-cf -cJ -dJ|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-WqAf 1adef IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|600", + "Pacific/Apia|LMT -1130 -11 -10 +14 +13|bq.U bu b0 a0 -e0 -d0|01232345454545454545454545454545454545454545454545454545454|-2nDMx.4 1yW03.4 2rRbu 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|37e3", + "Pacific/Bougainville|+10 +09 +11|-a0 -90 -b0|0102|-16Wy0 7CN0 2MQp0|18e4", + "Pacific/Chuuk|+10 +09|-a0 -90|01010|-2ewy0 axB0 RVX0 axd0|49e3", + "Pacific/Efate|LMT +11 +12|-bd.g -b0 -c0|0121212121212121212121|-2l9nd.g 2Szcd.g 1cL0 1oN0 10L0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 Lz0 1Nd0 An0|66e3", + "Pacific/Enderbury|-12 -11 +13|c0 b0 -d0|012|nIc0 B7X0|1", + "Pacific/Fakaofo|-11 +13|b0 -d0|01|1Gfn0|483", + "Pacific/Fiji|LMT +12 +13|-bT.I -c0 -d0|0121212121212121212121212121212121212121212121212121212121212121|-2bUzT.I 3m8NT.I LA0 1EM0 IM0 nJc0 LA0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0|88e4", + "Pacific/Galapagos|LMT -05 -06|5W.o 50 60|01212|-1yVS1.A 2dTz1.A gNd0 rz0|25e3", + "Pacific/Gambier|LMT -09|8X.M 90|01|-2jof0.c|125", + "Pacific/Guadalcanal|LMT +11|-aD.M -b0|01|-2joyD.M|11e4", + "Pacific/Guam|GST +09 GDT ChST|-a0 -90 -b0 -a0|01020202020202020203|-18jK0 6pB0 AhB0 3QL0 g2p0 3p91 WOX rX0 1zd0 Rb0 1wp0 Rb0 5xd0 rX0 5sN0 zb1 1C0X On0 ULb0|17e4", + "Pacific/Honolulu|HST HDT HWT HPT HST|au 9u 9u 9u a0|0102304|-1thLu 8x0 lef0 8wWu iAu 46p0|37e4", + "Pacific/Kiritimati|-1040 -10 +14|aE a0 -e0|012|nIaE B7Xk|51e2", + "Pacific/Kosrae|+11 +09 +10 +12|-b0 -90 -a0 -c0|01021030|-2ewz0 axC0 HBy0 akp0 axd0 WOK0 1bdz0|66e2", + "Pacific/Majuro|+11 +09 +10 +12|-b0 -90 -a0 -c0|0102103|-2ewz0 axC0 HBy0 akp0 6RB0 12um0|28e3", + "Pacific/Marquesas|LMT -0930|9i 9u|01|-2joeG|86e2", + "Pacific/Pago_Pago|LMT SST|bm.M b0|01|-2nDMB.c|37e2", + "Pacific/Nauru|LMT +1130 +09 +12|-b7.E -bu -90 -c0|01213|-1Xdn7.E QCnB.E 7mqu 1lnbu|10e3", + "Pacific/Niue|-1120 -1130 -11|bk bu b0|012|-KfME 17y0a|12e2", + "Pacific/Norfolk|+1112 +1130 +1230 +11|-bc -bu -cu -b0|01213|-Kgbc W01G On0 1COp0|25e4", + "Pacific/Noumea|LMT +11 +12|-b5.M -b0 -c0|01212121|-2l9n5.M 2EqM5.M xX0 1PB0 yn0 HeP0 Ao0|98e3", + "Pacific/Pitcairn|-0830 -08|8u 80|01|18Vku|56", + "Pacific/Pohnpei|+11 +09 +10|-b0 -90 -a0|010210|-2ewz0 axC0 HBy0 akp0 axd0|34e3", + "Pacific/Rarotonga|-1030 -0930 -10|au 9u a0|012121212121212121212121212|lyWu IL0 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu|13e3", + "Pacific/Tahiti|LMT -10|9W.g a0|01|-2joe1.I|18e4", + "Pacific/Tongatapu|+1220 +13 +14|-ck -d0 -e0|0121212121|-1aB0k 2n5dk 15A0 1wo0 xz0 1Q10 xz0 zWN0 s00|75e3", + "PST8PDT|PST PDT PWT PPT|80 70 70 70|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261q0 1nX0 11B0 1nX0 SgN0 8x10 iy0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0", + "WET|WET WEST|0 -10|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00" + ], + "links": [ + "Africa/Abidjan|Africa/Bamako", + "Africa/Abidjan|Africa/Banjul", + "Africa/Abidjan|Africa/Conakry", + "Africa/Abidjan|Africa/Dakar", + "Africa/Abidjan|Africa/Freetown", + "Africa/Abidjan|Africa/Lome", + "Africa/Abidjan|Africa/Nouakchott", + "Africa/Abidjan|Africa/Ouagadougou", + "Africa/Abidjan|Africa/Timbuktu", + "Africa/Abidjan|Atlantic/St_Helena", + "Africa/Cairo|Egypt", + "Africa/Johannesburg|Africa/Maseru", + "Africa/Johannesburg|Africa/Mbabane", + "Africa/Lagos|Africa/Bangui", + "Africa/Lagos|Africa/Brazzaville", + "Africa/Lagos|Africa/Douala", + "Africa/Lagos|Africa/Kinshasa", + "Africa/Lagos|Africa/Libreville", + "Africa/Lagos|Africa/Luanda", + "Africa/Lagos|Africa/Malabo", + "Africa/Lagos|Africa/Niamey", + "Africa/Lagos|Africa/Porto-Novo", + "Africa/Maputo|Africa/Blantyre", + "Africa/Maputo|Africa/Bujumbura", + "Africa/Maputo|Africa/Gaborone", + "Africa/Maputo|Africa/Harare", + "Africa/Maputo|Africa/Kigali", + "Africa/Maputo|Africa/Lubumbashi", + "Africa/Maputo|Africa/Lusaka", + "Africa/Nairobi|Africa/Addis_Ababa", + "Africa/Nairobi|Africa/Asmara", + "Africa/Nairobi|Africa/Asmera", + "Africa/Nairobi|Africa/Dar_es_Salaam", + "Africa/Nairobi|Africa/Djibouti", + "Africa/Nairobi|Africa/Kampala", + "Africa/Nairobi|Africa/Mogadishu", + "Africa/Nairobi|Indian/Antananarivo", + "Africa/Nairobi|Indian/Comoro", + "Africa/Nairobi|Indian/Mayotte", + "Africa/Tripoli|Libya", + "America/Adak|America/Atka", + "America/Adak|US/Aleutian", + "America/Anchorage|US/Alaska", + "America/Argentina/Buenos_Aires|America/Buenos_Aires", + "America/Argentina/Catamarca|America/Argentina/ComodRivadavia", + "America/Argentina/Catamarca|America/Catamarca", + "America/Argentina/Cordoba|America/Cordoba", + "America/Argentina/Cordoba|America/Rosario", + "America/Argentina/Jujuy|America/Jujuy", + "America/Argentina/Mendoza|America/Mendoza", + "America/Atikokan|America/Coral_Harbour", + "America/Chicago|US/Central", + "America/Curacao|America/Aruba", + "America/Curacao|America/Kralendijk", + "America/Curacao|America/Lower_Princes", + "America/Denver|America/Shiprock", + "America/Denver|Navajo", + "America/Denver|US/Mountain", + "America/Detroit|US/Michigan", + "America/Edmonton|Canada/Mountain", + "America/Fort_Wayne|America/Indiana/Indianapolis", + "America/Fort_Wayne|America/Indianapolis", + "America/Fort_Wayne|US/East-Indiana", + "America/Halifax|Canada/Atlantic", + "America/Havana|Cuba", + "America/Indiana/Knox|America/Knox_IN", + "America/Indiana/Knox|US/Indiana-Starke", + "America/Jamaica|Jamaica", + "America/Kentucky/Louisville|America/Louisville", + "America/Los_Angeles|US/Pacific", + "America/Los_Angeles|US/Pacific-New", + "America/Manaus|Brazil/West", + "America/Mazatlan|Mexico/BajaSur", + "America/Mexico_City|Mexico/General", + "America/New_York|US/Eastern", + "America/Noronha|Brazil/DeNoronha", + "America/Panama|America/Cayman", + "America/Phoenix|US/Arizona", + "America/Port_of_Spain|America/Anguilla", + "America/Port_of_Spain|America/Antigua", + "America/Port_of_Spain|America/Dominica", + "America/Port_of_Spain|America/Grenada", + "America/Port_of_Spain|America/Guadeloupe", + "America/Port_of_Spain|America/Marigot", + "America/Port_of_Spain|America/Montserrat", + "America/Port_of_Spain|America/St_Barthelemy", + "America/Port_of_Spain|America/St_Kitts", + "America/Port_of_Spain|America/St_Lucia", + "America/Port_of_Spain|America/St_Thomas", + "America/Port_of_Spain|America/St_Vincent", + "America/Port_of_Spain|America/Tortola", + "America/Port_of_Spain|America/Virgin", + "America/Regina|Canada/Saskatchewan", + "America/Rio_Branco|America/Porto_Acre", + "America/Rio_Branco|Brazil/Acre", + "America/Santiago|Chile/Continental", + "America/Sao_Paulo|Brazil/East", + "America/St_Johns|Canada/Newfoundland", + "America/Tijuana|America/Ensenada", + "America/Tijuana|America/Santa_Isabel", + "America/Tijuana|Mexico/BajaNorte", + "America/Toronto|America/Montreal", + "America/Toronto|Canada/Eastern", + "America/Vancouver|Canada/Pacific", + "America/Whitehorse|Canada/Yukon", + "America/Winnipeg|Canada/Central", + "Asia/Ashgabat|Asia/Ashkhabad", + "Asia/Bangkok|Asia/Phnom_Penh", + "Asia/Bangkok|Asia/Vientiane", + "Asia/Dhaka|Asia/Dacca", + "Asia/Dubai|Asia/Muscat", + "Asia/Ho_Chi_Minh|Asia/Saigon", + "Asia/Hong_Kong|Hongkong", + "Asia/Jerusalem|Asia/Tel_Aviv", + "Asia/Jerusalem|Israel", + "Asia/Kathmandu|Asia/Katmandu", + "Asia/Kolkata|Asia/Calcutta", + "Asia/Kuala_Lumpur|Asia/Singapore", + "Asia/Kuala_Lumpur|Singapore", + "Asia/Macau|Asia/Macao", + "Asia/Makassar|Asia/Ujung_Pandang", + "Asia/Nicosia|Europe/Nicosia", + "Asia/Qatar|Asia/Bahrain", + "Asia/Rangoon|Asia/Yangon", + "Asia/Riyadh|Asia/Aden", + "Asia/Riyadh|Asia/Kuwait", + "Asia/Seoul|ROK", + "Asia/Shanghai|Asia/Chongqing", + "Asia/Shanghai|Asia/Chungking", + "Asia/Shanghai|Asia/Harbin", + "Asia/Shanghai|PRC", + "Asia/Taipei|ROC", + "Asia/Tehran|Iran", + "Asia/Thimphu|Asia/Thimbu", + "Asia/Tokyo|Japan", + "Asia/Ulaanbaatar|Asia/Ulan_Bator", + "Asia/Urumqi|Asia/Kashgar", + "Atlantic/Faroe|Atlantic/Faeroe", + "Atlantic/Reykjavik|Iceland", + "Atlantic/South_Georgia|Etc/GMT+2", + "Australia/Adelaide|Australia/South", + "Australia/Brisbane|Australia/Queensland", + "Australia/Broken_Hill|Australia/Yancowinna", + "Australia/Darwin|Australia/North", + "Australia/Hobart|Australia/Tasmania", + "Australia/Lord_Howe|Australia/LHI", + "Australia/Melbourne|Australia/Victoria", + "Australia/Perth|Australia/West", + "Australia/Sydney|Australia/ACT", + "Australia/Sydney|Australia/Canberra", + "Australia/Sydney|Australia/NSW", + "Etc/GMT-0|Etc/GMT", + "Etc/GMT-0|Etc/GMT+0", + "Etc/GMT-0|Etc/GMT0", + "Etc/GMT-0|Etc/Greenwich", + "Etc/GMT-0|GMT", + "Etc/GMT-0|GMT+0", + "Etc/GMT-0|GMT-0", + "Etc/GMT-0|GMT0", + "Etc/GMT-0|Greenwich", + "Etc/UTC|Etc/UCT", + "Etc/UTC|Etc/Universal", + "Etc/UTC|Etc/Zulu", + "Etc/UTC|UCT", + "Etc/UTC|UTC", + "Etc/UTC|Universal", + "Etc/UTC|Zulu", + "Europe/Belgrade|Europe/Ljubljana", + "Europe/Belgrade|Europe/Podgorica", + "Europe/Belgrade|Europe/Sarajevo", + "Europe/Belgrade|Europe/Skopje", + "Europe/Belgrade|Europe/Zagreb", + "Europe/Chisinau|Europe/Tiraspol", + "Europe/Dublin|Eire", + "Europe/Helsinki|Europe/Mariehamn", + "Europe/Istanbul|Asia/Istanbul", + "Europe/Istanbul|Turkey", + "Europe/Lisbon|Portugal", + "Europe/London|Europe/Belfast", + "Europe/London|Europe/Guernsey", + "Europe/London|Europe/Isle_of_Man", + "Europe/London|Europe/Jersey", + "Europe/London|GB", + "Europe/London|GB-Eire", + "Europe/Moscow|W-SU", + "Europe/Oslo|Arctic/Longyearbyen", + "Europe/Oslo|Atlantic/Jan_Mayen", + "Europe/Prague|Europe/Bratislava", + "Europe/Rome|Europe/San_Marino", + "Europe/Rome|Europe/Vatican", + "Europe/Warsaw|Poland", + "Europe/Zurich|Europe/Busingen", + "Europe/Zurich|Europe/Vaduz", + "Indian/Christmas|Etc/GMT-7", + "Pacific/Auckland|Antarctica/McMurdo", + "Pacific/Auckland|Antarctica/South_Pole", + "Pacific/Auckland|NZ", + "Pacific/Chatham|NZ-CHAT", + "Pacific/Chuuk|Pacific/Truk", + "Pacific/Chuuk|Pacific/Yap", + "Pacific/Easter|Chile/EasterIsland", + "Pacific/Guam|Pacific/Saipan", + "Pacific/Honolulu|Pacific/Johnston", + "Pacific/Honolulu|US/Hawaii", + "Pacific/Kwajalein|Kwajalein", + "Pacific/Pago_Pago|Pacific/Midway", + "Pacific/Pago_Pago|Pacific/Samoa", + "Pacific/Pago_Pago|US/Samoa", + "Pacific/Palau|Etc/GMT-9", + "Pacific/Pohnpei|Pacific/Ponape", + "Pacific/Port_Moresby|Etc/GMT-10", + "Pacific/Tarawa|Etc/GMT-12", + "Pacific/Tarawa|Pacific/Funafuti", + "Pacific/Tarawa|Pacific/Wake", + "Pacific/Tarawa|Pacific/Wallis" + ] +} \ No newline at end of file diff --git a/node_modules/moment-timezone/index.js b/node_modules/moment-timezone/index.js new file mode 100644 index 00000000..61a6dccc --- /dev/null +++ b/node_modules/moment-timezone/index.js @@ -0,0 +1,2 @@ +var moment = module.exports = require("./moment-timezone"); +moment.tz.load(require('./data/packed/latest.json')); diff --git a/node_modules/moment-timezone/moment-timezone-utils.js b/node_modules/moment-timezone/moment-timezone-utils.js new file mode 100644 index 00000000..fe9e6601 --- /dev/null +++ b/node_modules/moment-timezone/moment-timezone-utils.js @@ -0,0 +1,318 @@ +//! moment-timezone-utils.js +//! version : 0.5.26 +//! Copyright (c) JS Foundation and other contributors +//! license : MIT +//! github.com/moment/moment-timezone + +(function (root, factory) { + "use strict"; + + /*global define*/ + if (typeof module === 'object' && module.exports) { + module.exports = factory(require('./')); // Node + } else if (typeof define === 'function' && define.amd) { + define(['moment'], factory); // AMD + } else { + factory(root.moment); // Browser + } +}(this, function (moment) { + "use strict"; + + if (!moment.tz) { + throw new Error("moment-timezone-utils.js must be loaded after moment-timezone.js"); + } + + /************************************ + Pack Base 60 + ************************************/ + + var BASE60 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX', + EPSILON = 0.000001; // Used to fix floating point rounding errors + + function packBase60Fraction(fraction, precision) { + var buffer = '.', + output = '', + current; + + while (precision > 0) { + precision -= 1; + fraction *= 60; + current = Math.floor(fraction + EPSILON); + buffer += BASE60[current]; + fraction -= current; + + // Only add buffer to output once we have a non-zero value. + // This makes '.000' output '', and '.100' output '.1' + if (current) { + output += buffer; + buffer = ''; + } + } + + return output; + } + + function packBase60(number, precision) { + var output = '', + absolute = Math.abs(number), + whole = Math.floor(absolute), + fraction = packBase60Fraction(absolute - whole, Math.min(~~precision, 10)); + + while (whole > 0) { + output = BASE60[whole % 60] + output; + whole = Math.floor(whole / 60); + } + + if (number < 0) { + output = '-' + output; + } + + if (output && fraction) { + return output + fraction; + } + + if (!fraction && output === '-') { + return '0'; + } + + return output || fraction || '0'; + } + + /************************************ + Pack + ************************************/ + + function packUntils(untils) { + var out = [], + last = 0, + i; + + for (i = 0; i < untils.length - 1; i++) { + out[i] = packBase60(Math.round((untils[i] - last) / 1000) / 60, 1); + last = untils[i]; + } + + return out.join(' '); + } + + function packAbbrsAndOffsets(source) { + var index = 0, + abbrs = [], + offsets = [], + indices = [], + map = {}, + i, key; + + for (i = 0; i < source.abbrs.length; i++) { + key = source.abbrs[i] + '|' + source.offsets[i]; + if (map[key] === undefined) { + map[key] = index; + abbrs[index] = source.abbrs[i]; + offsets[index] = packBase60(Math.round(source.offsets[i] * 60) / 60, 1); + index++; + } + indices[i] = packBase60(map[key], 0); + } + + return abbrs.join(' ') + '|' + offsets.join(' ') + '|' + indices.join(''); + } + + function packPopulation (number) { + if (!number) { + return ''; + } + if (number < 1000) { + return '|' + number; + } + var exponent = String(number | 0).length - 2; + var precision = Math.round(number / Math.pow(10, exponent)); + return '|' + precision + 'e' + exponent; + } + + function validatePackData (source) { + if (!source.name) { throw new Error("Missing name"); } + if (!source.abbrs) { throw new Error("Missing abbrs"); } + if (!source.untils) { throw new Error("Missing untils"); } + if (!source.offsets) { throw new Error("Missing offsets"); } + if ( + source.offsets.length !== source.untils.length || + source.offsets.length !== source.abbrs.length + ) { + throw new Error("Mismatched array lengths"); + } + } + + function pack (source) { + validatePackData(source); + return [ + source.name, + packAbbrsAndOffsets(source), + packUntils(source.untils) + packPopulation(source.population) + ].join('|'); + } + + /************************************ + Create Links + ************************************/ + + function arraysAreEqual(a, b) { + var i; + + if (a.length !== b.length) { return false; } + + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; + } + + function zonesAreEqual(a, b) { + return arraysAreEqual(a.offsets, b.offsets) && arraysAreEqual(a.abbrs, b.abbrs) && arraysAreEqual(a.untils, b.untils); + } + + function findAndCreateLinks (input, output, links, groupLeaders) { + var i, j, a, b, group, foundGroup, groups = []; + + for (i = 0; i < input.length; i++) { + foundGroup = false; + a = input[i]; + + for (j = 0; j < groups.length; j++) { + group = groups[j]; + b = group[0]; + if (zonesAreEqual(a, b)) { + if (a.population > b.population) { + group.unshift(a); + } else if (a.population === b.population && groupLeaders && groupLeaders[a.name]) { + group.unshift(a); + } else { + group.push(a); + } + foundGroup = true; + } + } + + if (!foundGroup) { + groups.push([a]); + } + } + + for (i = 0; i < groups.length; i++) { + group = groups[i]; + output.push(group[0]); + for (j = 1; j < group.length; j++) { + links.push(group[0].name + '|' + group[j].name); + } + } + } + + function createLinks (source, groupLeaders) { + var zones = [], + links = []; + + if (source.links) { + links = source.links.slice(); + } + + findAndCreateLinks(source.zones, zones, links, groupLeaders); + + return { + version : source.version, + zones : zones, + links : links.sort() + }; + } + + /************************************ + Filter Years + ************************************/ + + function findStartAndEndIndex (untils, start, end) { + var startI = 0, + endI = untils.length + 1, + untilYear, + i; + + if (!end) { + end = start; + } + + if (start > end) { + i = start; + start = end; + end = i; + } + + for (i = 0; i < untils.length; i++) { + if (untils[i] == null) { + continue; + } + untilYear = new Date(untils[i]).getUTCFullYear(); + if (untilYear < start) { + startI = i + 1; + } + if (untilYear > end) { + endI = Math.min(endI, i + 1); + } + } + + return [startI, endI]; + } + + function filterYears (source, start, end) { + var slice = Array.prototype.slice, + indices = findStartAndEndIndex(source.untils, start, end), + untils = slice.apply(source.untils, indices); + + untils[untils.length - 1] = null; + + return { + name : source.name, + abbrs : slice.apply(source.abbrs, indices), + untils : untils, + offsets : slice.apply(source.offsets, indices), + population : source.population + }; + } + + /************************************ + Filter, Link, and Pack + ************************************/ + + function filterLinkPack (input, start, end, groupLeaders) { + var i, + inputZones = input.zones, + outputZones = [], + output; + + for (i = 0; i < inputZones.length; i++) { + outputZones[i] = filterYears(inputZones[i], start, end); + } + + output = createLinks({ + zones : outputZones, + links : input.links.slice(), + version : input.version + }, groupLeaders); + + for (i = 0; i < output.zones.length; i++) { + output.zones[i] = pack(output.zones[i]); + } + + return output; + } + + /************************************ + Exports + ************************************/ + + moment.tz.pack = pack; + moment.tz.packBase60 = packBase60; + moment.tz.createLinks = createLinks; + moment.tz.filterYears = filterYears; + moment.tz.filterLinkPack = filterLinkPack; + + return moment; +})); diff --git a/node_modules/moment-timezone/moment-timezone.js b/node_modules/moment-timezone/moment-timezone.js new file mode 100644 index 00000000..b9a0f465 --- /dev/null +++ b/node_modules/moment-timezone/moment-timezone.js @@ -0,0 +1,627 @@ +//! moment-timezone.js +//! version : 0.5.26 +//! Copyright (c) JS Foundation and other contributors +//! license : MIT +//! github.com/moment/moment-timezone + +(function (root, factory) { + "use strict"; + + /*global define*/ + if (typeof module === 'object' && module.exports) { + module.exports = factory(require('moment')); // Node + } else if (typeof define === 'function' && define.amd) { + define(['moment'], factory); // AMD + } else { + factory(root.moment); // Browser + } +}(this, function (moment) { + "use strict"; + + // Do not load moment-timezone a second time. + // if (moment.tz !== undefined) { + // logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion); + // return moment; + // } + + var VERSION = "0.5.26", + zones = {}, + links = {}, + names = {}, + guesses = {}, + cachedGuess; + + if (!moment || typeof moment.version !== 'string') { + logError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/'); + } + + var momentVersion = moment.version.split('.'), + major = +momentVersion[0], + minor = +momentVersion[1]; + + // Moment.js version check + if (major < 2 || (major === 2 && minor < 6)) { + logError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com'); + } + + /************************************ + Unpacking + ************************************/ + + function charCodeToInt(charCode) { + if (charCode > 96) { + return charCode - 87; + } else if (charCode > 64) { + return charCode - 29; + } + return charCode - 48; + } + + function unpackBase60(string) { + var i = 0, + parts = string.split('.'), + whole = parts[0], + fractional = parts[1] || '', + multiplier = 1, + num, + out = 0, + sign = 1; + + // handle negative numbers + if (string.charCodeAt(0) === 45) { + i = 1; + sign = -1; + } + + // handle digits before the decimal + for (i; i < whole.length; i++) { + num = charCodeToInt(whole.charCodeAt(i)); + out = 60 * out + num; + } + + // handle digits after the decimal + for (i = 0; i < fractional.length; i++) { + multiplier = multiplier / 60; + num = charCodeToInt(fractional.charCodeAt(i)); + out += num * multiplier; + } + + return out * sign; + } + + function arrayToInt (array) { + for (var i = 0; i < array.length; i++) { + array[i] = unpackBase60(array[i]); + } + } + + function intToUntil (array, length) { + for (var i = 0; i < length; i++) { + array[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds + } + + array[length - 1] = Infinity; + } + + function mapIndices (source, indices) { + var out = [], i; + + for (i = 0; i < indices.length; i++) { + out[i] = source[indices[i]]; + } + + return out; + } + + function unpack (string) { + var data = string.split('|'), + offsets = data[2].split(' '), + indices = data[3].split(''), + untils = data[4].split(' '); + + arrayToInt(offsets); + arrayToInt(indices); + arrayToInt(untils); + + intToUntil(untils, indices.length); + + return { + name : data[0], + abbrs : mapIndices(data[1].split(' '), indices), + offsets : mapIndices(offsets, indices), + untils : untils, + population : data[5] | 0 + }; + } + + /************************************ + Zone object + ************************************/ + + function Zone (packedString) { + if (packedString) { + this._set(unpack(packedString)); + } + } + + Zone.prototype = { + _set : function (unpacked) { + this.name = unpacked.name; + this.abbrs = unpacked.abbrs; + this.untils = unpacked.untils; + this.offsets = unpacked.offsets; + this.population = unpacked.population; + }, + + _index : function (timestamp) { + var target = +timestamp, + untils = this.untils, + i; + + for (i = 0; i < untils.length; i++) { + if (target < untils[i]) { + return i; + } + } + }, + + parse : function (timestamp) { + var target = +timestamp, + offsets = this.offsets, + untils = this.untils, + max = untils.length - 1, + offset, offsetNext, offsetPrev, i; + + for (i = 0; i < max; i++) { + offset = offsets[i]; + offsetNext = offsets[i + 1]; + offsetPrev = offsets[i ? i - 1 : i]; + + if (offset < offsetNext && tz.moveAmbiguousForward) { + offset = offsetNext; + } else if (offset > offsetPrev && tz.moveInvalidForward) { + offset = offsetPrev; + } + + if (target < untils[i] - (offset * 60000)) { + return offsets[i]; + } + } + + return offsets[max]; + }, + + abbr : function (mom) { + return this.abbrs[this._index(mom)]; + }, + + offset : function (mom) { + logError("zone.offset has been deprecated in favor of zone.utcOffset"); + return this.offsets[this._index(mom)]; + }, + + utcOffset : function (mom) { + return this.offsets[this._index(mom)]; + } + }; + + /************************************ + Current Timezone + ************************************/ + + function OffsetAt(at) { + var timeString = at.toTimeString(); + var abbr = timeString.match(/\([a-z ]+\)/i); + if (abbr && abbr[0]) { + // 17:56:31 GMT-0600 (CST) + // 17:56:31 GMT-0600 (Central Standard Time) + abbr = abbr[0].match(/[A-Z]/g); + abbr = abbr ? abbr.join('') : undefined; + } else { + // 17:56:31 CST + // 17:56:31 GMT+0800 (台北標準時間) + abbr = timeString.match(/[A-Z]{3,5}/g); + abbr = abbr ? abbr[0] : undefined; + } + + if (abbr === 'GMT') { + abbr = undefined; + } + + this.at = +at; + this.abbr = abbr; + this.offset = at.getTimezoneOffset(); + } + + function ZoneScore(zone) { + this.zone = zone; + this.offsetScore = 0; + this.abbrScore = 0; + } + + ZoneScore.prototype.scoreOffsetAt = function (offsetAt) { + this.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset); + if (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) { + this.abbrScore++; + } + }; + + function findChange(low, high) { + var mid, diff; + + while ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) { + mid = new OffsetAt(new Date(low.at + diff)); + if (mid.offset === low.offset) { + low = mid; + } else { + high = mid; + } + } + + return low; + } + + function userOffsets() { + var startYear = new Date().getFullYear() - 2, + last = new OffsetAt(new Date(startYear, 0, 1)), + offsets = [last], + change, next, i; + + for (i = 1; i < 48; i++) { + next = new OffsetAt(new Date(startYear, i, 1)); + if (next.offset !== last.offset) { + change = findChange(last, next); + offsets.push(change); + offsets.push(new OffsetAt(new Date(change.at + 6e4))); + } + last = next; + } + + for (i = 0; i < 4; i++) { + offsets.push(new OffsetAt(new Date(startYear + i, 0, 1))); + offsets.push(new OffsetAt(new Date(startYear + i, 6, 1))); + } + + return offsets; + } + + function sortZoneScores (a, b) { + if (a.offsetScore !== b.offsetScore) { + return a.offsetScore - b.offsetScore; + } + if (a.abbrScore !== b.abbrScore) { + return a.abbrScore - b.abbrScore; + } + if (a.zone.population !== b.zone.population) { + return b.zone.population - a.zone.population; + } + return b.zone.name.localeCompare(a.zone.name); + } + + function addToGuesses (name, offsets) { + var i, offset; + arrayToInt(offsets); + for (i = 0; i < offsets.length; i++) { + offset = offsets[i]; + guesses[offset] = guesses[offset] || {}; + guesses[offset][name] = true; + } + } + + function guessesForUserOffsets (offsets) { + var offsetsLength = offsets.length, + filteredGuesses = {}, + out = [], + i, j, guessesOffset; + + for (i = 0; i < offsetsLength; i++) { + guessesOffset = guesses[offsets[i].offset] || {}; + for (j in guessesOffset) { + if (guessesOffset.hasOwnProperty(j)) { + filteredGuesses[j] = true; + } + } + } + + for (i in filteredGuesses) { + if (filteredGuesses.hasOwnProperty(i)) { + out.push(names[i]); + } + } + + return out; + } + + function rebuildGuess () { + + // use Intl API when available and returning valid time zone + try { + var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone; + if (intlName && intlName.length > 3) { + var name = names[normalizeName(intlName)]; + if (name) { + return name; + } + logError("Moment Timezone found " + intlName + " from the Intl api, but did not have that data loaded."); + } + } catch (e) { + // Intl unavailable, fall back to manual guessing. + } + + var offsets = userOffsets(), + offsetsLength = offsets.length, + guesses = guessesForUserOffsets(offsets), + zoneScores = [], + zoneScore, i, j; + + for (i = 0; i < guesses.length; i++) { + zoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength); + for (j = 0; j < offsetsLength; j++) { + zoneScore.scoreOffsetAt(offsets[j]); + } + zoneScores.push(zoneScore); + } + + zoneScores.sort(sortZoneScores); + + return zoneScores.length > 0 ? zoneScores[0].zone.name : undefined; + } + + function guess (ignoreCache) { + if (!cachedGuess || ignoreCache) { + cachedGuess = rebuildGuess(); + } + return cachedGuess; + } + + /************************************ + Global Methods + ************************************/ + + function normalizeName (name) { + return (name || '').toLowerCase().replace(/\//g, '_'); + } + + function addZone (packed) { + var i, name, split, normalized; + + if (typeof packed === "string") { + packed = [packed]; + } + + for (i = 0; i < packed.length; i++) { + split = packed[i].split('|'); + name = split[0]; + normalized = normalizeName(name); + zones[normalized] = packed[i]; + names[normalized] = name; + addToGuesses(normalized, split[2].split(' ')); + } + } + + function getZone (name, caller) { + + name = normalizeName(name); + + var zone = zones[name]; + var link; + + if (zone instanceof Zone) { + return zone; + } + + if (typeof zone === 'string') { + zone = new Zone(zone); + zones[name] = zone; + return zone; + } + + // Pass getZone to prevent recursion more than 1 level deep + if (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) { + zone = zones[name] = new Zone(); + zone._set(link); + zone.name = names[name]; + return zone; + } + + return null; + } + + function getNames () { + var i, out = []; + + for (i in names) { + if (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) { + out.push(names[i]); + } + } + + return out.sort(); + } + + function addLink (aliases) { + var i, alias, normal0, normal1; + + if (typeof aliases === "string") { + aliases = [aliases]; + } + + for (i = 0; i < aliases.length; i++) { + alias = aliases[i].split('|'); + + normal0 = normalizeName(alias[0]); + normal1 = normalizeName(alias[1]); + + links[normal0] = normal1; + names[normal0] = alias[0]; + + links[normal1] = normal0; + names[normal1] = alias[1]; + } + } + + function loadData (data) { + addZone(data.zones); + addLink(data.links); + tz.dataVersion = data.version; + } + + function zoneExists (name) { + if (!zoneExists.didShowError) { + zoneExists.didShowError = true; + logError("moment.tz.zoneExists('" + name + "') has been deprecated in favor of !moment.tz.zone('" + name + "')"); + } + return !!getZone(name); + } + + function needsOffset (m) { + var isUnixTimestamp = (m._f === 'X' || m._f === 'x'); + return !!(m._a && (m._tzm === undefined) && !isUnixTimestamp); + } + + function logError (message) { + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + } + + /************************************ + moment.tz namespace + ************************************/ + + function tz (input) { + var args = Array.prototype.slice.call(arguments, 0, -1), + name = arguments[arguments.length - 1], + zone = getZone(name), + out = moment.utc.apply(null, args); + + if (zone && !moment.isMoment(input) && needsOffset(out)) { + out.add(zone.parse(out), 'minutes'); + } + + out.tz(name); + + return out; + } + + tz.version = VERSION; + tz.dataVersion = ''; + tz._zones = zones; + tz._links = links; + tz._names = names; + tz.add = addZone; + tz.link = addLink; + tz.load = loadData; + tz.zone = getZone; + tz.zoneExists = zoneExists; // deprecated in 0.1.0 + tz.guess = guess; + tz.names = getNames; + tz.Zone = Zone; + tz.unpack = unpack; + tz.unpackBase60 = unpackBase60; + tz.needsOffset = needsOffset; + tz.moveInvalidForward = true; + tz.moveAmbiguousForward = false; + + /************************************ + Interface with Moment.js + ************************************/ + + var fn = moment.fn; + + moment.tz = tz; + + moment.defaultZone = null; + + moment.updateOffset = function (mom, keepTime) { + var zone = moment.defaultZone, + offset; + + if (mom._z === undefined) { + if (zone && needsOffset(mom) && !mom._isUTC) { + mom._d = moment.utc(mom._a)._d; + mom.utc().add(zone.parse(mom), 'minutes'); + } + mom._z = zone; + } + if (mom._z) { + offset = mom._z.utcOffset(mom); + if (Math.abs(offset) < 16) { + offset = offset / 60; + } + if (mom.utcOffset !== undefined) { + var z = mom._z; + mom.utcOffset(-offset, keepTime); + mom._z = z; + } else { + mom.zone(offset, keepTime); + } + } + }; + + fn.tz = function (name, keepTime) { + if (name) { + if (typeof name !== 'string') { + throw new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']'); + } + this._z = getZone(name); + if (this._z) { + moment.updateOffset(this, keepTime); + } else { + logError("Moment Timezone has no data for " + name + ". See http://momentjs.com/timezone/docs/#/data-loading/."); + } + return this; + } + if (this._z) { return this._z.name; } + }; + + function abbrWrap (old) { + return function () { + if (this._z) { return this._z.abbr(this); } + return old.call(this); + }; + } + + function resetZoneWrap (old) { + return function () { + this._z = null; + return old.apply(this, arguments); + }; + } + + function resetZoneWrap2 (old) { + return function () { + if (arguments.length > 0) this._z = null; + return old.apply(this, arguments); + }; + } + + fn.zoneName = abbrWrap(fn.zoneName); + fn.zoneAbbr = abbrWrap(fn.zoneAbbr); + fn.utc = resetZoneWrap(fn.utc); + fn.local = resetZoneWrap(fn.local); + fn.utcOffset = resetZoneWrap2(fn.utcOffset); + + moment.tz.setDefault = function(name) { + if (major < 2 || (major === 2 && minor < 9)) { + logError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.'); + } + moment.defaultZone = name ? getZone(name) : null; + return moment; + }; + + // Cloning a moment should include the _z property. + var momentProperties = moment.momentProperties; + if (Object.prototype.toString.call(momentProperties) === '[object Array]') { + // moment 2.8.1+ + momentProperties.push('_z'); + momentProperties.push('_a'); + } else if (momentProperties) { + // moment 2.7.0 + momentProperties._z = null; + } + + // INJECT DATA + + return moment; +})); diff --git a/node_modules/moment-timezone/package.json b/node_modules/moment-timezone/package.json new file mode 100644 index 00000000..e69db5dc --- /dev/null +++ b/node_modules/moment-timezone/package.json @@ -0,0 +1,52 @@ +{ + "name": "moment-timezone", + "version": "0.5.26", + "description": "Parse and display moments in any timezone.", + "homepage": "http://momentjs.com/timezone/", + "author": "Tim Wood (http://timwoodcreates.com/)", + "keywords": [ + "moment", + "date", + "time", + "timezone", + "olson", + "iana", + "zone", + "tz" + ], + "main": "./index.js", + "engines": { + "node": "*" + }, + "repository": { + "type": "git", + "url": "https://github.com/moment/moment-timezone.git" + }, + "bugs": { + "url": "https://github.com/moment/moment-timezone/issues" + }, + "license": "MIT", + "dependencies": { + "moment": ">= 2.9.0" + }, + "devDependencies": { + "grunt": "^1.0.4", + "grunt-contrib-clean": "^2.0.0", + "grunt-contrib-jshint": "^2.1.0", + "grunt-contrib-nodeunit": "^2.0.0", + "grunt-contrib-uglify": "^4.0.1" + }, + "jspm": { + "main": "builds/moment-timezone-with-data", + "shim": { + "moment-timezone": { + "deps": [ + "moment" + ] + } + } + }, + "scripts": { + "test": "grunt" + } +} diff --git a/node_modules/moment/CHANGELOG.md b/node_modules/moment/CHANGELOG.md new file mode 100644 index 00000000..aa3aef2a --- /dev/null +++ b/node_modules/moment/CHANGELOG.md @@ -0,0 +1,895 @@ +Changelog +========= + +### 2.24.0 [See full changelog](https://gist.github.com/marwahaha/12366fe45bee328f33acf125d4cd540e) + +* Release Jan 21, 2019 + +* [#4338](https://github.com/moment/moment/pull/4338) [bugfix] Fix startOf/endOf DST issues while boosting performance +* [#4553](https://github.com/moment/moment/pull/4553) [feature] Add localeSort param to Locale weekday methods +* [#4887](https://github.com/moment/moment/pull/4887) [bugfix] Make Duration#as work with quarters +* 3 new locales (it-ch, ga, en-SG) +* Lots of locale improvements + +### 2.23.0 [See full changelog](https://gist.github.com/marwahaha/eadb7ac11b761290399a576f8b2419a5) + +* Release Dec 12, 2018 + +* [#4863](https://github.com/moment/moment/pull/4863) [new locale] added Kurdish language (ku) +* [#4417](https://github.com/moment/moment/pull/4417) [bugfix] isBetween should return false for invalid dates +* [#4700](https://github.com/moment/moment/pull/4700) [bugfix] Fix [#4698](https://github.com/moment/moment/pull/4698): Use ISO WeekYear for HTML5_FMT.WEEK +* [#4563](https://github.com/moment/moment/pull/4563) [feature] Fix [#4518](https://github.com/moment/moment/pull/4518): Add support to add/subtract ISO weeks +* other locale changes, build process changes, typos + +### 2.22.2 [See full changelog](https://gist.github.com/marwahaha/4d992c13c2dbc0f59d4d8acae1dc6d3a) + +* Release May 31, 2018 + +* [#4564](https://github.com/moment/moment/pull/4564) [bugfix] Avoid using trim() +* [#4453](https://github.com/moment/moment/pull/4453) [bugfix] Treat periods as periods, not regex-anything period, for weekday parsing in strict mode. +* Minor locale improvements (pa-in, be, az) + +### 2.22.1 [See full changelog](https://gist.github.com/marwahaha/ff2cd13d0eda08afb7a237b10aae558c) + +* Release Apr 14, 2018 + +* [#4495](https://github.com/moment/moment/pull/4495) [bugfix] Added HTML5_FMT to moment.d.ts +* Minor locale improvements +* QUnit upgrade and coveralls reporting + +### 2.22.0 [See full changelog](https://gist.github.com/marwahaha/ae895025dac3f0641fa9ec2e36d282bb) + +* Release Mar 30, 2018 + +* [#4423](https://github.com/moment/moment/pull/4423) [new locale] Added Mongolian locale mn +* Various locale improvements +* Minor misc changes + +### 2.21.0 [See full changelog](https://gist.github.com/marwahaha/80d19ef882b71df1948df7865efdd40e) + +* Release Mar 2, 2018 + +* [#4391](https://github.com/moment/moment/pull/4391) [bugfix] Fix [#4390](https://github.com/moment/moment/pull/4390): use offset properly in toISOString +* [#4310](https://github.com/moment/moment/pull/4310) [bugfix] Fix [#3883](https://github.com/moment/moment/pull/3883) lazy load parentLocale in defineLocale, fallback to global if missing +* [#4085](https://github.com/moment/moment/pull/4085) [misc] Print console warning when setting non-existent locales +* [#4371](https://github.com/moment/moment/pull/4371) [misc] fix deprecated rollup options +* New locales: ug-cn, en-il, tg +* Various locale improvements + +### 2.20.1 [See changelog](https://gist.github.com/marwahaha/d72c1cb22076373be889b16272cbd187) + +* Release Dec 18, 2017 + +* [#4359](https://github.com/moment/moment/pull/4359) [locale] Fix Arabic locale for months (again) +* [#4357](https://github.com/moment/moment/pull/4357) [misc] Add optional parameter keepOffset to toISOString + +### 2.20.0 [See full changelog](https://gist.github.com/marwahaha/e0d4135fbf8bb75fa85c4aa2bddc5031) + +* Release Dec 16, 2017 + +* [#4312](https://github.com/moment/moment/pull/4312) [bugfix] Fix [#4251](https://github.com/moment/moment/pull/4251): Avoid RFC2822 in utc() test +* [#4240](https://github.com/moment/moment/pull/4240) [bugfix] Fix incorrect strict parsing with full-width parentheses +* [#4341](https://github.com/moment/moment/pull/4341) [feature] Prevent toISOString converting to UTC (issue [#1751](https://github.com/moment/moment/pull/1751)) +* [#4154](https://github.com/moment/moment/pull/4154) [feature] add format constants to support output to HTML5 input type formats (see [#3928](https://github.com/moment/moment/pull/3928)) +* [#4143](https://github.com/moment/moment/pull/4143) [new locale] mt: Maltese language +* [#4183](https://github.com/moment/moment/pull/4183) [locale] Relative seconds i18n +* Various other locale improvements + +### 2.19.4 [See changelog](https://gist.github.com/marwahaha/d3b7b0ddf4bdae512244f16e8cc59efb) + +* Release Dec 10, 2017 + +* [#4332](https://github.com/moment/moment/pull/4332) [bugfix] Fix weekday verification for UTC and offset days (fixes [#4227](https://github.com/moment/moment/pull/4227)) +* [#4336](https://github.com/moment/moment/pull/4336) [bugfix] Fix [#4334](https://github.com/moment/moment/pull/4334): Remove unused function call argument +* [#4246](https://github.com/moment/moment/pull/4246) [misc] Add 'ss' relative time key to typescript definition + +### 2.19.3 [See changelog](https://gist.github.com/marwahaha/3654006bc0c2e522451c08d12c0bfabf) + +* Release Nov 29, 2017 + +* [#4326](https://github.com/moment/moment/pull/4326) [bugfix] Fix for ReDOS vulnerability (see [#4163](https://github.com/moment/moment/issues/4163)) +* [#4289](https://github.com/moment/moment/pull/4289) [misc] Fix spelling and formatting for U.S. for es-us + +### 2.19.2 [See changelog (it's the same >:D)](https://gist.github.com/ichernev/76b1a3f33d3a8ff9665ce434a45221d0) + +* Release Nov 11, 2017 + +* [#4255](https://github.com/moment/moment/pull/4255) [bugfix] Fix year setter for random days in a leap year, fixes [#4238](https://github.com/moment/moment/issues/4238) +* [#4242](https://github.com/moment/moment/pull/4242) [bugfix] updateLocale now tries to load parent, fixes [#3626](https://github.com/moment/moment/issues/3626) + +### 2.19.1 + +* Release Oct 11, 2017 + +Make react native and webpack both work +* #4225 #4226 #4232 + +### 2.19.0 [See full changelog](https://gist.github.com/ichernev/5f3f4eb02761b4f765a0cccf02cec603) + +* Release Oct 10, 2017 + +## Fix React Native 0.49+ crash +* [#4213](https://github.com/moment/moment/pull/4213) [critical] Rename dynamic + require to avoid React Native crash +* [#4214](https://github.com/moment/moment/pull/4214) [fixup] Move require + rename inside try/catch, fixes + [#4213](https://github.com/moment/moment/issues/4213) + +## Features + +* [#3735](https://github.com/moment/moment/pull/3735) [feature] Ignore NaN values in setters +* [#4106](https://github.com/moment/moment/pull/4106) [fixup] Drop isNumeric utility fn, fixes [#3735](https://github.com/moment/moment/issues/3735) +* [#4080](https://github.com/moment/moment/pull/4080) [feature] Implement a clone method for durations, fixes [#4078](https://github.com/moment/moment/issues/4078) +* [#4215](https://github.com/moment/moment/pull/4215) [misc] TS: Add duration.clone(), for [#4080](https://github.com/moment/moment/issues/4080) + +## Packaging + +* [#4003](https://github.com/moment/moment/pull/4003) [pkg] bower: Remove tests from package +* [#3904](https://github.com/moment/moment/pull/3904) [pkg] jsnext:main -> module in package.json +* [#4060](https://github.com/moment/moment/pull/4060) [pkg] Account for new rollup interface + +Bugfixes, new locales, locale fixes etc... + +### 2.18.1 + +* Release Mar 22, 2017 + +* [#3853](https://github.com/moment/moment/pull/3853) [misc] Fix invalid whitespace character causing inability to parse + moment.js + +### 2.18.0 [See full changelog](https://gist.github.com/ichernev/78920c5a1e419fb28c6e4546d1b7235c) + +* Release Mar 18, 2017 + +## Features + +* [#3708](https://github.com/moment/moment/pull/3708) [feature] RFC2822 parsing +* [#3611](https://github.com/moment/moment/pull/3611) [feature] Durations gain validity +* [#3738](https://github.com/moment/moment/pull/3738) [feature] Enable relative time for multiple seconds, request [#2558](https://github.com/moment/moment/issues/2558) +* [#3766](https://github.com/moment/moment/pull/3766) [feature] Add support for k and kk format parsing + +## Bugfixes + +* [#3643](https://github.com/moment/moment/pull/3643) [bugfix] Fixes [#3520](https://github.com/moment/moment/issues/3520), parseZone incorrectly handled minutes under 16 +* [#3710](https://github.com/moment/moment/pull/3710) [bugfix] Fixes [#3632](https://github.com/moment/moment/issues/3632), toISOString returns null for invalid date +* [#3787](https://github.com/moment/moment/pull/3787) [bugfix] Fixes [#3717](https://github.com/moment/moment/issues/3717), ensure day-of-year is non-zero +* [#3780](https://github.com/moment/moment/pull/3780) [bugfix] Fixes [#3765](https://github.com/moment/moment/issues/3765): Ensure year 0 is formatted with YYYY +* [#3806](https://github.com/moment/moment/pull/3806) [bugfix] Fixes [#3805](https://github.com/moment/moment/issues/3805), fix locale month getters for standalone/format cases + +7 new locales, many locale improvements and some misc changes + +### 2.17.1 [Also available here](https://gist.github.com/ichernev/f38280b2b29c4932914a6d3a4e50bfb2) +* Release Dec 03, 2016 + +* [#3638](https://github.com/moment/moment/pull/3638) [misc] TS: Make typescript definitions work with 1.x +* [#3628](https://github.com/moment/moment/pull/3628) [misc] Adds "sign CLA" link to `CONTRIBUTING.md` +* [#3640](https://github.com/moment/moment/pull/3640) [misc] Fix locale issues + +### 2.17.0 [Also available here](https://gist.github.com/ichernev/ed58f76fb95205eeac653d719972b90c) +* Release Nov 22, 2016 + +* [#3435](https://github.com/moment/moment/pull/3435) [new locale] yo: Yoruba (Nigeria) locale +* [#3595](https://github.com/moment/moment/pull/3595) [bugfix] Fix accidental reference to global "value" variable +* [#3506](https://github.com/moment/moment/pull/3506) [bugfix] Fix invalid moments returning valid dates to method calls +* [#3563](https://github.com/moment/moment/pull/3563) [locale] ca: Change future relative time +* [#3504](https://github.com/moment/moment/pull/3504) [tests] Fixes [#3463](https://github.com/moment/moment/issues/3463), parseZone not handling Z correctly (tests only) +* [#3591](https://github.com/moment/moment/pull/3591) [misc] typescript: update typescript to 2.0.8, add strictNullChecks=true +* [#3597](https://github.com/moment/moment/pull/3597) [misc] Fixed capitalization in nuget spec + +### 2.16.0 [See full changelog](https://gist.github.com/ichernev/17bffc1005a032cb1a8ac4c1558b4994) +* Release Nov 9, 2016 + +## Features +* [#3530](https://github.com/moment/moment/pull/3530) [feature] Check whether input is date before checking if format is array +* [#3515](https://github.com/moment/moment/pull/3515) [feature] Fix [#2300](https://github.com/moment/moment/issues/2300): Default to current week. + +## Bugfixes +* [#3546](https://github.com/moment/moment/pull/3546) [bugfix] Implement lazy-loading of child locales with missing prents +* [#3523](https://github.com/moment/moment/pull/3523) [bugfix] parseZone should handle UTC +* [#3502](https://github.com/moment/moment/pull/3502) [bugfix] Fix [#3500](https://github.com/moment/moment/issues/3500): ISO 8601 parsing should match the full string, not the beginning of the string. +* [#3581](https://github.com/moment/moment/pull/3581) [bugfix] Fix parseZone, redo [#3504](https://github.com/moment/moment/issues/3504), fix [#3463](https://github.com/moment/moment/issues/3463) + +## New Locales +* [#3416](https://github.com/moment/moment/pull/3416) [new locale] nl-be: Dutch (Belgium) locale +* [#3393](https://github.com/moment/moment/pull/3393) [new locale] ar-dz: Arabic (Algeria) locale +* [#3342](https://github.com/moment/moment/pull/3342) [new locale] tet: Tetun Dili (East Timor) locale + +And more locale, build and typescript improvements + +### 2.15.2 +* Release Oct 23, 2016 +* [#3525](https://github.com/moment/moment/pull/3525) Speedup month standalone/format regexes **(IMPORTANT)** +* [#3466](https://github.com/moment/moment/pull/3466) Fix typo of Javanese + +### 2.15.1 +* Release Sept 20, 2016 +* [#3438](https://github.com/moment/moment/pull/3438) Fix locale autoload, revert [#3344](https://github.com/moment/moment/pull/3344) + +### 2.15.0 [See full changelog](https://gist.github.com/ichernev/10e1c5bf647545c72ca30e9628a09ed3) +- Release Sept 12, 2016 + +## New Locales +* [#3255](https://github.com/moment/moment/pull/3255) [new locale] mi: Maori language +* [#3267](https://github.com/moment/moment/pull/3267) [new locale] ar-ly: Arabic (Libya) locale +* [#3333](https://github.com/moment/moment/pull/3333) [new locale] zh-hk: Chinese (Hong Kong) locale + +## Bugfixes +* [#3276](https://github.com/moment/moment/pull/3276) [bugfix] duration: parser: Support ms durations in .NET syntax +* [#3312](https://github.com/moment/moment/pull/3312) [bugfix] locales: Enable locale-data getters without moment (fixes [#3284](https://github.com/moment/moment/issues/3284)) +* [#3381](https://github.com/moment/moment/pull/3381) [bugfix] parsing: Fix parseZone without timezone in string, fixes [#3083](https://github.com/moment/moment/issues/3083) +* [#3383](https://github.com/moment/moment/pull/3383) [bugfix] toJSON: Fix isValid so that toJSON works after a moment is frozen +* [#3427](https://github.com/moment/moment/pull/3427) [bugfix] ie8: Fix IE8 (regression in 2.14.x) + +## Packaging +* [#3299](https://github.com/moment/moment/pull/3299) [pkg] npm: Do not include .npmignore in npm package +* [#3273](https://github.com/moment/moment/pull/3273) [pkg] jspm: Include moment.d.ts file in package +* [#3344](https://github.com/moment/moment/pull/3344) [pkg] exports: use module.require for nodejs + +Also some locale and typescript improvements + +### 2.14.1 +- Release July 20, 2016 +* [#3280](https://github.com/moment/moment/pull/3280) Fix typescript definitions + + +### 2.14.0 [See full changelog](https://gist.github.com/ichernev/812e79ac36a7829a22598fe964bfc18a) + +- Release July 20, 2016 + +## New Features +* [#3233](https://github.com/moment/moment/pull/3233) Introduce month.isFormat for format/standalone discovery +* [#2848](https://github.com/moment/moment/pull/2848) Allow user to get/set the rounding method used when calculating relative time +* [#3112](https://github.com/moment/moment/pull/3112) optimize configFromStringAndFormat +* [#3147](https://github.com/moment/moment/pull/3147) Call calendar format function with moment context +* [#3160](https://github.com/moment/moment/pull/3160) deprecate isDSTShifted +* [#3175](https://github.com/moment/moment/pull/3175) make moment calendar extensible with ad-hoc options +* [#3191](https://github.com/moment/moment/pull/3191) toDate returns a copy of the internal date object +* [#3192](https://github.com/moment/moment/pull/3192) Adding support for rollup import. +* [#3238](https://github.com/moment/moment/pull/3238) Handle empty object and empty array for creation as now +* [#3082](https://github.com/moment/moment/pull/3082) Use relative AMD moment dependency + +## Bugfixes +* [#3241](https://github.com/moment/moment/pull/3241) Escape all 24 mixed pieces, not only first 12 in computeMonthsParse +* [#3008](https://github.com/moment/moment/pull/3008) Object setter orders sets based on size of unit +* [#3177](https://github.com/moment/moment/pull/3177) Bug Fix [#2704](https://github.com/moment/moment/pull/2704) - isoWeekday(String) inconsistent with isoWeekday(Number) +* [#3230](https://github.com/moment/moment/pull/3230) fix passing date with format string to ignore format string +* [#3232](https://github.com/moment/moment/pull/3232) Fix negative 0 in certain diff cases +* [#3235](https://github.com/moment/moment/pull/3235) Use proper locale inheritance for the base locale, fixes [#3137](https://github.com/moment/moment/pull/3137) + +Plus es-do locale and locale bugfixes + +### 2.13.0 [See full changelog](https://gist.github.com/ichernev/0132fcf5b61f7fc140b0bb0090480d49) +- Release April 18, 2016 + +## Enhancements: +* [#2982](https://github.com/moment/moment/pull/2982) Add 'date' as alias to 'day' for startOf() and endOf(). +* [#2955](https://github.com/moment/moment/pull/2955) Add parsing negative components in durations when ISO 8601 +* [#2991](https://github.com/moment/moment/pull/2991) isBetween support for both open and closed intervals +* [#3105](https://github.com/moment/moment/pull/3105) Add localeSorted argument to weekday listers +* [#3102](https://github.com/moment/moment/pull/3102) Add k and kk formatting tokens + +## Bugfixes +* [#3109](https://github.com/moment/moment/pull/3109) Fix [#1756](https://github.com/moment/moment/issues/1756) Resolved thread-safe issue on server side. +* [#3078](https://github.com/moment/moment/pull/3078) Fix parsing for months/weekdays with weird characters +* [#3098](https://github.com/moment/moment/pull/3098) Use Z suffix when in UTC mode ([#3020](https://github.com/moment/moment/issues/3020)) +* [#2995](https://github.com/moment/moment/pull/2995) Fix floating point rounding errors in durations +* [#3059](https://github.com/moment/moment/pull/3059) fix bug where diff returns -0 in month-related diffs +* [#3045](https://github.com/moment/moment/pull/3045) Fix mistaking any input for 'a' token +* [#2877](https://github.com/moment/moment/pull/2877) Use explicit .valueOf() calls instead of coercion +* [#3036](https://github.com/moment/moment/pull/3036) Year setter should keep time when DST changes + +Plus 3 new locales and locale fixes. + +### 2.12.0 [See full changelog](https://gist.github.com/ichernev/6e5bfdf8d6522fc4ac73) + +- Release March 7, 2016 + +## Enhancements: +* [#2932](https://github.com/moment/moment/pull/2932) List loaded locales +* [#2818](https://github.com/moment/moment/pull/2818) Parse ISO-8061 duration containing both day and week values +* [#2774](https://github.com/moment/moment/pull/2774) Implement locale inheritance and locale updating + +## Bugfixes: +* [#2970](https://github.com/moment/moment/pull/2970) change add subtract to handle decimal values by rounding +* [#2887](https://github.com/moment/moment/pull/2887) Fix toJSON casting of invalid moment +* [#2897](https://github.com/moment/moment/pull/2897) parse string arguments for month() correctly, closes #2884 +* [#2946](https://github.com/moment/moment/pull/2946) Fix usage suggestions for min and max + +## New locales: +* [#2917](https://github.com/moment/moment/pull/2917) Locale Punjabi(Gurmukhi) India format conversion + +And more + +### 2.11.2 (Fix ReDoS attack vector) + +- Release February 7, 2016 + +* [#2939](https://github.com/moment/moment/pull/2939) use full-string match to speed up aspnet regex match + +### 2.11.1 [See full changelog](https://gist.github.com/ichernev/8ec3ee25b749b4cff3c2) + +- Release January 9, 2016 + +## Bugfixes: +* [#2881](https://github.com/moment/moment/pull/2881) Revert "Merge pull request #2746 from mbad0la:develop" Sep->Sept +* [#2868](https://github.com/moment/moment/pull/2868) Add format and parse token Y, so it actually works +* [#2865](https://github.com/moment/moment/pull/2865) Use typeof checks for undefined for global variables +* [#2858](https://github.com/moment/moment/pull/2858) Fix Date mocking regression introduced in 2.11.0 +* [#2864](https://github.com/moment/moment/pull/2864) Include changelog in npm release +* [#2830](https://github.com/moment/moment/pull/2830) dep: add grunt-cli +* [#2869](https://github.com/moment/moment/pull/2869) Fix months parsing for some locales + +### 2.11.0 [See full changelog](https://gist.github.com/ichernev/6594bc29719dde6b2f66) + +- Release January 4, 2016 + +* [#2624](https://github.com/moment/moment/pull/2624) Proper handling of invalid moments +* [#2634](https://github.com/moment/moment/pull/2634) Fix strict month parsing issue in cs,ru,sk +* [#2735](https://github.com/moment/moment/pull/2735) Reset the locale back to 'en' after defining all locales in min/locales.js +* [#2702](https://github.com/moment/moment/pull/2702) Week rework +* [#2746](https://github.com/moment/moment/pull/2746) Changed September Abbreviation to "Sept" in locale-specific english + files and default locale file +* [#2646](https://github.com/moment/moment/pull/2646) Fix [#2645](https://github.com/moment/moment/pull/2645) - invalid dates pre-1970 + +* [#2641](https://github.com/moment/moment/pull/2641) Implement basic format and comma as ms separator in ISO 8601 +* [#2665](https://github.com/moment/moment/pull/2665) Implement stricter weekday parsing +* [#2700](https://github.com/moment/moment/pull/2700) Add [Hh]mm and [Hh]mmss formatting tokens, so you can parse 123 with + hmm for example +* [#2565](https://github.com/moment/moment/pull/2565) [#2835](https://github.com/moment/moment/pull/2835) Expose arguments used for moment creation with creationData + (fix [#2443](https://github.com/moment/moment/pull/2443)) +* [#2648](https://github.com/moment/moment/pull/2648) fix issue [#2640](https://github.com/moment/moment/pull/2640): support instanceof operator +* [#2709](https://github.com/moment/moment/pull/2709) Add isSameOrAfter and isSameOrBefore comparison methods +* [#2721](https://github.com/moment/moment/pull/2721) Fix moment creation from object with strings values +* [#2740](https://github.com/moment/moment/pull/2740) Enable 'd hh:mm:ss.sss' format for durations +* [#2766](https://github.com/moment/moment/pull/2766) [#2833](https://github.com/moment/moment/pull/2833) Alternate Clock Source Support + +### 2.10.6 + +- Release July 28, 2015 + +[#2515](https://github.com/moment/moment/pull/2515) Fix regression introduced +in `2.10.5` related to `moment.ISO_8601` parsing. + +### 2.10.5 [See full changelog](https://gist.github.com/ichernev/6ec13ac7efc396da44b2) + +- Release July 26, 2015 + +Important changes: +* [#2357](https://github.com/moment/moment/pull/2357) Improve unit bubbling for ISO dates + this fixes day to year conversions to work around end-of-year (~365 days). As + a side effect 365 days is 11 months and 30 days, and 366 days is one year. +* [#2438](https://github.com/moment/moment/pull/2438) Fix inconsistent moment.min and moment.max results + Return invalid result if any of the inputs is invalid +* [#2494](https://github.com/moment/moment/pull/2494) Fix two digit year parsing with YYYY format + This brings the benefits of YY to YYYY +* [#2368](https://github.com/moment/moment/pull/2368) perf: use faster form of copying dates, across the board improvement + + +### 2.10.3 [See full changelog](https://gist.github.com/ichernev/f264b9bed5b00f8b1b7f) + +- Release May 13, 2015 + +* add `moment.fn.to` and `moment.fn.toNow` (similar to `from` and `fromNow`) +* new locales (Sinhalese (si), Montenegrin (me), Javanese (ja)) +* performance improvements + +### 2.10.2 + +- Release April 9, 2015 + +* fixed moment-with-locales in browser env caused by esperanto change + +### 2.10.1 + +* regression: Add moment.duration.fn back + +### 2.10.0 + +Ported code to es6 modules. + +### 2.9.0 [See full changelog](https://gist.github.com/ichernev/0c9a9b49951111a27ce7) + +- Release January 8, 2015 + +languages: +* [2104](https://github.com/moment/moment/issues/2104) Frisian (fy) language file with unit test +* [2097](https://github.com/moment/moment/issues/2097) add ar-tn locale + +deprecations: +* [2074](https://github.com/moment/moment/issues/2074) Implement `moment.fn.utcOffset`, deprecate `moment.fn.zone` + +features: +* [2088](https://github.com/moment/moment/issues/2088) add moment.fn.isBetween +* [2054](https://github.com/moment/moment/issues/2054) Call updateOffset when creating moment (needed for default timezone in + moment-timezone) +* [1893](https://github.com/moment/moment/issues/1893) Add moment.isDate method +* [1825](https://github.com/moment/moment/issues/1825) Implement toJSON function on Duration +* [1809](https://github.com/moment/moment/issues/1809) Allowing moment.set() to accept a hash of units +* [2128](https://github.com/moment/moment/issues/2128) Add firstDayOfWeek, firstDayOfYear locale getters +* [2131](https://github.com/moment/moment/issues/2131) Add quarter diff support + +Some bugfixes and language improvements -- [full changelog](https://gist.github.com/ichernev/0c9a9b49951111a27ce7) + +### 2.8.4 [See full changelog](https://gist.github.com/ichernev/a4fcb0a46d74e4b9b996) + +- Release November 19, 2014 + +Features: + +* [#2000](https://github.com/moment/moment/issues/2000) Add LTS localised format that includes seconds +* [#1960](https://github.com/moment/moment/issues/1960) added formatToken 'x' for unix offset in milliseconds #1938 +* [#1965](https://github.com/moment/moment/issues/1965) Support 24:00:00.000 to mean next day, at midnight. +* [#2002](https://github.com/moment/moment/issues/2002) Accept 'date' key when creating moment with object +* [#2009](https://github.com/moment/moment/issues/2009) Use native toISOString when we can + +Some bugfixes and language improvements -- [full changelog](https://gist.github.com/ichernev/a4fcb0a46d74e4b9b996) + +### 2.8.3 + +- Release September 5, 2014 + +Bugfixes: + +* [#1801](https://github.com/moment/moment/issues/1801) proper pluralization for Arabic +* [#1833](https://github.com/moment/moment/issues/1833) improve spm integration +* [#1871](https://github.com/moment/moment/issues/1871) fix zone bug caused by Firefox 24 +* [#1882](https://github.com/moment/moment/issues/1882) Use hh:mm in Czech +* [#1883](https://github.com/moment/moment/issues/1883) Fix 2.8.0 regression in duration as conversions +* [#1890](https://github.com/moment/moment/issues/1890) Faster travis builds +* [#1892](https://github.com/moment/moment/issues/1892) Faster isBefore/After/Same +* [#1848](https://github.com/moment/moment/issues/1848) Fix flaky month diffs +* [#1895](https://github.com/moment/moment/issues/1895) Fix 2.8.0 regression in moment.utc with format array +* [#1896](https://github.com/moment/moment/issues/1896) Support setting invalid instance locale (noop) +* [#1897](https://github.com/moment/moment/issues/1897) Support moment([str]) in addition to moment([int]) + +### 2.8.2 + +- Release August 22, 2014 + +Minor bugfixes: + +* [#1874](https://github.com/moment/moment/issues/1874) use `Object.prototype.hasOwnProperty` + instead of `obj.hasOwnProperty` (ie8 bug) +* [#1873](https://github.com/moment/moment/issues/1873) add `duration#toString()` +* [#1859](https://github.com/moment/moment/issues/1859) better month/weekday names in norwegian +* [#1812](https://github.com/moment/moment/issues/1812) meridiem parsing for greek +* [#1804](https://github.com/moment/moment/issues/1804) spanish del -> de +* [#1800](https://github.com/moment/moment/issues/1800) korean LT improvement + +### 2.8.1 + +- Release August 1, 2014 + +* bugfix [#1813](https://github.com/moment/moment/issues/1813): fix moment().lang([key]) incompatibility + +### 2.8.0 [See changelog](https://gist.github.com/ichernev/ac3899324a5fa6c8c9b4) + +- Release July 31, 2014 + +* incompatible changes + * [#1761](https://github.com/moment/moment/issues/1761): moments created without a language are no longer following the global language, in case it changes. Only newly created moments take the global language by default. In case you're affected by this, wait, comment on [#1797](https://github.com/moment/moment/issues/1797) and wait for a proper reimplementation + * [#1642](https://github.com/moment/moment/issues/1642): 45 days is no longer "a month" according to humanize, cutoffs for month, and year have changed. Hopefully your code does not depend on a particular answer from humanize (which it shouldn't anyway) + * [#1784](https://github.com/moment/moment/issues/1784): if you use the human readable English datetime format in a weird way (like storing them in a database) that would break when the format changes you're at risk. + +* deprecations (old behavior will be dropped in 3.0) + * [#1761](https://github.com/moment/moment/issues/1761) `lang` is renamed to `locale`, `langData` -> `localeData`. Also there is now `defineLocale` that should be used when creating new locales + * [#1763](https://github.com/moment/moment/issues/1763) `add(unit, value)` and `subtract(unit, value)` are now deprecated. Use `add(value, unit)` and `subtract(value, unit)` instead. + * [#1759](https://github.com/moment/moment/issues/1759) rename `duration.toIsoString` to `duration.toISOString`. The js standard library and moment's `toISOString` follow that convention. + +* new locales + * [#1789](https://github.com/moment/moment/issues/1789) Tibetan (bo) + * [#1786](https://github.com/moment/moment/issues/1786) Africaans (af) + * [#1778](https://github.com/moment/moment/issues/1778) Burmese (my) + * [#1727](https://github.com/moment/moment/issues/1727) Belarusian (be) + +* bugfixes, locale bugfixes, performance improvements, features + +### 2.7.0 [See changelog](https://gist.github.com/ichernev/b0a3d456d5a84c9901d7) + +- Release June 12, 2014 + +* new languages + + * [#1678](https://github.com/moment/moment/issues/1678) Bengali (bn) + * [#1628](https://github.com/moment/moment/issues/1628) Azerbaijani (az) + * [#1633](https://github.com/moment/moment/issues/1633) Arabic, Saudi Arabia (ar-sa) + * [#1648](https://github.com/moment/moment/issues/1648) Austrian German (de-at) + +* features + + * [#1663](https://github.com/moment/moment/issues/1663) configurable relative time thresholds + * [#1554](https://github.com/moment/moment/issues/1554) support anchor time in moment.calendar + * [#1693](https://github.com/moment/moment/issues/1693) support moment.ISO_8601 as parsing format + * [#1637](https://github.com/moment/moment/issues/1637) add moment.min and moment.max and deprecate min/max instance methods + * [#1704](https://github.com/moment/moment/issues/1704) support string value in add/subtract + * [#1647](https://github.com/moment/moment/issues/1647) add spm support (package manager) + +* bugfixes + +### 2.6.0 [See changelog](https://gist.github.com/ichernev/10544682) + +- Release April 12 , 2014 + +* languages + * [#1529](https://github.com/moment/moment/issues/1529) Serbian-Cyrillic (sr-cyr) + * [#1544](https://github.com/moment/moment/issues/1544), [#1546](https://github.com/moment/moment/issues/1546) Khmer Cambodia (km) + +* features + * [#1419](https://github.com/moment/moment/issues/1419), [#1468](https://github.com/moment/moment/issues/1468), [#1467](https://github.com/moment/moment/issues/1467), [#1546](https://github.com/moment/moment/issues/1546) better handling of timezone-d moments around DST + * [#1462](https://github.com/moment/moment/issues/1462) add weeksInYear and isoWeeksInYear + * [#1475](https://github.com/moment/moment/issues/1475) support ordinal parsing + * [#1499](https://github.com/moment/moment/issues/1499) composer support + * [#1577](https://github.com/moment/moment/issues/1577), [#1604](https://github.com/moment/moment/issues/1604) put Date parsing in moment.createFromInputFallback so it can be properly deprecated and controlled in the future + * [#1545](https://github.com/moment/moment/issues/1545) extract two-digit year parsing in moment.parseTwoDigitYear, so it can be overwritten + * [#1590](https://github.com/moment/moment/issues/1590) (see [#1574](https://github.com/moment/moment/issues/1574)) set AMD global before module definition to better support non AMD module dependencies used in AMD environment + * [#1589](https://github.com/moment/moment/issues/1589) remove global in Node.JS environment (was not working before, nobody complained, was scheduled for removal anyway) + * [#1586](https://github.com/moment/moment/issues/1586) support quarter setting and parsing + +* 18 bugs fixed + +### 2.5.1 + +- Release January 22, 2014 + +* languages + * [#1392](https://github.com/moment/moment/issues/1392) Armenian (hy-am) + +* bugfixes + * [#1429](https://github.com/moment/moment/issues/1429) fixes [#1423](https://github.com/moment/moment/issues/1423) weird chrome-32 bug with js object creation + * [#1421](https://github.com/moment/moment/issues/1421) remove html entities from Welsh + * [#1418](https://github.com/moment/moment/issues/1418) fixes [#1401](https://github.com/moment/moment/issues/1401) improved non-padded tokens in strict matching + * [#1417](https://github.com/moment/moment/issues/1417) fixes [#1404](https://github.com/moment/moment/issues/1404) handle buggy moment object created by property cloning + * [#1398](https://github.com/moment/moment/issues/1398) fixes [#1397](https://github.com/moment/moment/issues/1397) fix Arabic-like week number parsing + * [#1396](https://github.com/moment/moment/issues/1396) add leftZeroFill(4) to GGGG and gggg formats + * [#1373](https://github.com/moment/moment/issues/1373) use lowercase for months and days in Catalan + +* testing + * [#1374](https://github.com/moment/moment/issues/1374) run tests on multiple browser/os combos via SauceLabs and Travis + +### 2.5.0 [See changelog](https://gist.github.com/ichernev/8104451) + +- Release Dec 24, 2013 + +* New languages + * Luxemburish (lb) [1247](https://github.com/moment/moment/issues/1247) + * Serbian (rs) [1319](https://github.com/moment/moment/issues/1319) + * Tamil (ta) [1324](https://github.com/moment/moment/issues/1324) + * Macedonian (mk) [1337](https://github.com/moment/moment/issues/1337) + +* Features + * [1311](https://github.com/moment/moment/issues/1311) Add quarter getter and format token `Q` + * [1303](https://github.com/moment/moment/issues/1303) strict parsing now respects number of digits per token (fix [1196](https://github.com/moment/moment/issues/1196)) + * 0d30bb7 add jspm support + * [1347](https://github.com/moment/moment/issues/1347) improve zone parsing + * [1362](https://github.com/moment/moment/issues/1362) support merideam parsing in Korean + +* 22 bugfixes + +### 2.4.0 + +- Release Oct 27, 2013 + +* **Deprecate** globally exported moment, will be removed in next major +* New languages + * Farose (fo) [#1206](https://github.com/moment/moment/issues/1206) + * Tagalog/Filipino (tl-ph) [#1197](https://github.com/moment/moment/issues/1197) + * Welsh (cy) [#1215](https://github.com/moment/moment/issues/1215) +* Bugfixes + * properly handle Z at the end of iso RegExp [#1187](https://github.com/moment/moment/issues/1187) + * chinese meridian time improvements [#1076](https://github.com/moment/moment/issues/1076) + * fix language tests [#1177](https://github.com/moment/moment/issues/1177) + * remove some failing tests (that should have never existed :)) + [#1185](https://github.com/moment/moment/issues/1185) + [#1183](https://github.com/moment/moment/issues/1183) + * handle russian noun cases in weird cases [#1195](https://github.com/moment/moment/issues/1195) + +### 2.3.1 + +- Release Oct 9, 2013 + +Removed a trailing comma [1169] and fixed a bug with `months`, `weekdays` getters [#1171](https://github.com/moment/moment/issues/1171). + +### 2.3.0 [See changelog](https://gist.github.com/ichernev/6864354) + +- Release Oct 7, 2013 + +Changed isValid, added strict parsing. +Week tokens parsing. + +### 2.2.1 + +- Release Sep 12, 2013 + +Fixed bug in string prototype test. +Updated authors and contributors. + +### 2.2.0 [See changelog](https://gist.github.com/ichernev/00f837a9baf46a3565e4) + +- Release Sep 11, 2013 + +Added bower support. + +Language files now use UMD. + +Creating moment defaults to current date/month/year. + +Added a bundle of moment and all language files. + +### 2.1.0 [See changelog](https://gist.github.com/timrwood/b8c2d90d528eddb53ab5) + +- Release Jul 8, 2013 + +Added better week support. + +Added ability to set offset with `moment#zone`. + +Added ability to set month or weekday from a string. + +Added `moment#min` and `moment#max` + +### 2.0.0 [See changelog](https://gist.github.com/timrwood/e72f2eef320ed9e37c51) + +- Release Feb 9, 2013 + +Added short form localized tokens. + +Added ability to define language a string should be parsed in. + +Added support for reversed add/subtract arguments. + +Added support for `endOf('week')` and `startOf('week')`. + +Fixed the logic for `moment#diff(Moment, 'months')` and `moment#diff(Moment, 'years')` + +`moment#diff` now floors instead of rounds. + +Normalized `moment#toString`. + +Added `isSame`, `isAfter`, and `isBefore` methods. + +Added better week support. + +Added `moment#toJSON` + +Bugfix: Fixed parsing of first century dates + +Bugfix: Parsing 10Sep2001 should work as expected + +Bugfix: Fixed weirdness with `moment.utc()` parsing. + +Changed language ordinal method to return the number + ordinal instead of just the ordinal. + +Changed two digit year parsing cutoff to match strptime. + +Removed `moment#sod` and `moment#eod` in favor of `moment#startOf` and `moment#endOf`. + +Removed `moment.humanizeDuration()` in favor of `moment.duration().humanize()`. + +Removed the lang data objects from the top level namespace. + +Duplicate `Date` passed to `moment()` instead of referencing it. + +### 1.7.2 [See discussion](https://github.com/timrwood/moment/issues/456) + +- Release Oct 2, 2012 + +Bugfixes + +### 1.7.1 [See discussion](https://github.com/timrwood/moment/issues/384) + +- Release Oct 1, 2012 + +Bugfixes + +### 1.7.0 [See discussion](https://github.com/timrwood/moment/issues/288) + +- Release Jul 26, 2012 + +Added `moment.fn.endOf()` and `moment.fn.startOf()`. + +Added validation via `moment.fn.isValid()`. + +Made formatting method 3x faster. http://jsperf.com/momentjs-cached-format-functions + +Add support for month/weekday callbacks in `moment.fn.format()` + +Added instance specific languages. + +Added two letter weekday abbreviations with the formatting token `dd`. + +Various language updates. + +Various bugfixes. + +### 1.6.0 [See discussion](https://github.com/timrwood/moment/pull/268) + +- Release Apr 26, 2012 + +Added Durations. + +Revamped parser to support parsing non-separated strings (YYYYMMDD vs YYYY-MM-DD). + +Added support for millisecond parsing and formatting tokens (S SS SSS) + +Added a getter for `moment.lang()` + +Various bugfixes. + +There are a few things deprecated in the 1.6.0 release. + +1. The format tokens `z` and `zz` (timezone abbreviations like EST CST MST etc) will no longer be supported. Due to inconsistent browser support, we are unable to consistently produce this value. See [this issue](https://github.com/timrwood/moment/issues/162) for more background. + +2. The method `moment.fn.native` is deprecated in favor of `moment.fn.toDate`. There continue to be issues with Google Closure Compiler throwing errors when using `native`, even in valid instances. + +3. The way to customize am/pm strings is being changed. This would only affect you if you created a custom language file. For more information, see [this issue](https://github.com/timrwood/moment/pull/222). + +### 1.5.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=10&page=1&state=closed) + +- Release Mar 20, 2012 + +Added UTC mode. + +Added automatic ISO8601 parsing. + +Various bugfixes. + +### 1.4.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=8&state=closed) + +- Release Feb 4, 2012 + +Added `moment.fn.toDate` as a replacement for `moment.fn.native`. + +Added `moment.fn.sod` and `moment.fn.eod` to get the start and end of day. + +Various bugfixes. + +### 1.3.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=7&state=closed) + +- Release Jan 5, 2012 + +Added support for parsing month names in the current language. + +Added escape blocks for parsing tokens. + +Added `moment.fn.calendar` to format strings like 'Today 2:30 PM', 'Tomorrow 1:25 AM', and 'Last Sunday 4:30 AM'. + +Added `moment.fn.day` as a setter. + +Various bugfixes + +### 1.2.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=4&state=closed) + +- Release Dec 7, 2011 + +Added timezones to parser and formatter. + +Added `moment.fn.isDST`. + +Added `moment.fn.zone` to get the timezone offset in minutes. + +### 1.1.2 [See milestone](https://github.com/timrwood/moment/issues?milestone=6&state=closed) + +- Release Nov 18, 2011 + +Various bugfixes + +### 1.1.1 [See milestone](https://github.com/timrwood/moment/issues?milestone=5&state=closed) + +- Release Nov 12, 2011 + +Added time specific diffs (months, days, hours, etc) + +### 1.1.0 + +- Release Oct 28, 2011 + +Added `moment.fn.format` localized masks. 'L LL LLL LLLL' [issue 29](https://github.com/timrwood/moment/pull/29) + +Fixed [issue 31](https://github.com/timrwood/moment/pull/31). + +### 1.0.1 + +- Release Oct 18, 2011 + +Added `moment.version` to get the current version. + +Removed `window !== undefined` when checking if module exists to support browserify. [issue 25](https://github.com/timrwood/moment/pull/25) + +### 1.0.0 + +- Release + +Added convenience methods for getting and setting date parts. + +Added better support for `moment.add()`. + +Added better lang support in NodeJS. + +Renamed library from underscore.date to Moment.js + +### 0.6.1 + +- Release Oct 12, 2011 + +Added Portuguese, Italian, and French language support + +### 0.6.0 + +- Release Sep 21, 2011 + +Added _date.lang() support. +Added support for passing multiple formats to try to parse a date. _date("07-10-1986", ["MM-DD-YYYY", "YYYY-MM-DD"]); +Made parse from string and single format 25% faster. + +### 0.5.2 + +- Release Jul 11, 2011 + +Bugfix for [issue 8](https://github.com/timrwood/underscore.date/pull/8) and [issue 9](https://github.com/timrwood/underscore.date/pull/9). + +### 0.5.1 + +- Release Jun 17, 2011 + +Bugfix for [issue 5](https://github.com/timrwood/underscore.date/pull/5). + +### 0.5.0 + +- Release Jun 13, 2011 + +Dropped the redundant `_date.date()` in favor of `_date()`. +Removed `_date.now()`, as it is a duplicate of `_date()` with no parameters. +Removed `_date.isLeapYear(yearNumber)`. Use `_date([yearNumber]).isLeapYear()` instead. +Exposed customization options through the `_date.relativeTime`, `_date.weekdays`, `_date.weekdaysShort`, `_date.months`, `_date.monthsShort`, and `_date.ordinal` variables instead of the `_date.customize()` function. + +### 0.4.1 + +- Release May 9, 2011 + +Added date input formats for input strings. + +### 0.4.0 + +- Release May 9, 2011 + +Added underscore.date to npm. Removed dependencies on underscore. + +### 0.3.2 + +- Release Apr 9, 2011 + +Added `'z'` and `'zz'` to `_.date().format()`. Cleaned up some redundant code to trim off some bytes. + +### 0.3.1 + +- Release Mar 25, 2011 + +Cleaned up the namespace. Moved all date manipulation and display functions to the _.date() object. + +### 0.3.0 + +- Release Mar 25, 2011 + +Switched to the Underscore methodology of not mucking with the native objects' prototypes. +Made chaining possible. + +### 0.2.1 + +- Release + +Changed date names to be a more pseudo standardized 'dddd, MMMM Do YYYY, h:mm:ss a'. +Added `Date.prototype` functions `add`, `subtract`, `isdst`, and `isleapyear`. + +### 0.2.0 + +- Release + +Changed function names to be more concise. +Changed date format from php date format to custom format. + +### 0.1.0 + +- Release + +Initial release + diff --git a/node_modules/moment/LICENSE b/node_modules/moment/LICENSE new file mode 100644 index 00000000..8618b733 --- /dev/null +++ b/node_modules/moment/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) JS Foundation 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: + +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/moment/README.md b/node_modules/moment/README.md new file mode 100644 index 00000000..a922aea2 --- /dev/null +++ b/node_modules/moment/README.md @@ -0,0 +1,65 @@ +[![Join the chat at https://gitter.im/moment/moment](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/moment/moment?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][downloads-url] [![MIT License][license-image]][license-url] [![Build Status][travis-image]][travis-url] +[![Coverage Status](https://coveralls.io/repos/moment/moment/badge.svg?branch=develop)](https://coveralls.io/r/moment/moment?branch=develop) +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment?ref=badge_shield) +[![SemVer compatibility](https://api.dependabot.com/badges/compatibility_score?dependency-name=moment&package-manager=npm_and_yarn&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=moment&package-manager=npm_and_yarn&version-scheme=semver) + +A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates. + +**[Documentation](http://momentjs.com/docs/)** + +## Port to ECMAScript 6 (version 2.10.0) + +Moment 2.10.0 does not bring any new features, but the code is now written in +ECMAScript 6 modules and placed inside `src/`. Previously `moment.js`, `locale/*.js` and +`test/moment/*.js`, `test/locale/*.js` contained the source of the project. Now +the source is in `src/`, temporary build (ECMAScript 5) files are placed under +`build/umd/` (for running tests during development), and the `moment.js` and +`locale/*.js` files are updated only on release. + +If you want to use a particular revision of the code, make sure to run +`grunt transpile update-index`, so `moment.js` and `locales/*.js` are synced +with `src/*`. We might place that in a commit hook in the future. + +## Upgrading to 2.0.0 + +There are a number of small backwards incompatible changes with version 2.0.0. [See the full descriptions here](https://gist.github.com/timrwood/e72f2eef320ed9e37c51#backwards-incompatible-changes) + + * Changed language ordinal method to return the number + ordinal instead of just the ordinal. + + * Changed two digit year parsing cutoff to match strptime. + + * Removed `moment#sod` and `moment#eod` in favor of `moment#startOf` and `moment#endOf`. + + * Removed `moment.humanizeDuration()` in favor of `moment.duration().humanize()`. + + * Removed the lang data objects from the top level namespace. + + * Duplicate `Date` passed to `moment()` instead of referencing it. + +## [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) + +## [Contributing](https://github.com/moment/moment/blob/develop/CONTRIBUTING.md) [![Open Source Helpers](https://www.codetriage.com/moment/moment/badges/users.svg)](https://www.codetriage.com/moment/moment) + +We're looking for co-maintainers! If you want to become a master of time please +write to [ichernev](https://github.com/ichernev). + +In addition to contributing code, you can help to triage issues. This can include reproducing bug reports, or asking for vital information such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to [subscribe to moment/moment on CodeTriage](https://www.codetriage.com/moment/moment). + +## License + +Moment.js is freely distributable under the terms of the [MIT license](https://github.com/moment/moment/blob/develop/LICENSE). + +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment?ref=badge_large) + +[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat +[license-url]: LICENSE + +[npm-url]: https://npmjs.org/package/moment +[npm-version-image]: http://img.shields.io/npm/v/moment.svg?style=flat +[npm-downloads-image]: http://img.shields.io/npm/dm/moment.svg?style=flat +[downloads-url]: https://npmcharts.com/compare/moment?minimal=true + +[travis-url]: http://travis-ci.org/moment/moment +[travis-image]: http://img.shields.io/travis/moment/moment/develop.svg?style=flat diff --git a/node_modules/moment/ender.js b/node_modules/moment/ender.js new file mode 100644 index 00000000..71462a77 --- /dev/null +++ b/node_modules/moment/ender.js @@ -0,0 +1 @@ +$.ender({ moment: require('moment') }) diff --git a/node_modules/moment/locale/af.js b/node_modules/moment/locale/af.js new file mode 100644 index 00000000..0b2bb26e --- /dev/null +++ b/node_modules/moment/locale/af.js @@ -0,0 +1,72 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var af = moment.defineLocale('af', { + months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'), + monthsShort : 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), + weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'), + weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), + weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), + meridiemParse: /vm|nm/i, + isPM : function (input) { + return /^nm$/i.test(input); + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'vm' : 'VM'; + } else { + return isLower ? 'nm' : 'NM'; + } + }, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Vandag om] LT', + nextDay : '[Môre om] LT', + nextWeek : 'dddd [om] LT', + lastDay : '[Gister om] LT', + lastWeek : '[Laas] dddd [om] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'oor %s', + past : '%s gelede', + s : '\'n paar sekondes', + ss : '%d sekondes', + m : '\'n minuut', + mm : '%d minute', + h : '\'n uur', + hh : '%d ure', + d : '\'n dag', + dd : '%d dae', + M : '\'n maand', + MM : '%d maande', + y : '\'n jaar', + yy : '%d jaar' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter + }, + week : { + dow : 1, // Maandag is die eerste dag van die week. + doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar. + } + }); + + return af; + +}))); diff --git a/node_modules/moment/locale/ar-dz.js b/node_modules/moment/locale/ar-dz.js new file mode 100644 index 00000000..e6efd0a2 --- /dev/null +++ b/node_modules/moment/locale/ar-dz.js @@ -0,0 +1,58 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var arDz = moment.defineLocale('ar-dz', { + months : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + monthsShort : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return arDz; + +}))); diff --git a/node_modules/moment/locale/ar-kw.js b/node_modules/moment/locale/ar-kw.js new file mode 100644 index 00000000..6a72e9ba --- /dev/null +++ b/node_modules/moment/locale/ar-kw.js @@ -0,0 +1,58 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var arKw = moment.defineLocale('ar-kw', { + months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + return arKw; + +}))); diff --git a/node_modules/moment/locale/ar-ly.js b/node_modules/moment/locale/ar-ly.js new file mode 100644 index 00000000..0df68c8b --- /dev/null +++ b/node_modules/moment/locale/ar-ly.js @@ -0,0 +1,121 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '0': '0' + }, pluralForm = function (n) { + return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; + }, plurals = { + s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'], + m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'], + h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'], + d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'], + M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'], + y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام'] + }, pluralize = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm(number), + str = plurals[u][pluralForm(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, months = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر' + ]; + + var arLy = moment.defineLocale('ar-ly', { + months : months, + monthsShort : months, + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'D/\u200FM/\u200FYYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ص|م/, + isPM : function (input) { + return 'م' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar : { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'بعد %s', + past : 'منذ %s', + s : pluralize('s'), + ss : pluralize('s'), + m : pluralize('m'), + mm : pluralize('m'), + h : pluralize('h'), + hh : pluralize('h'), + d : pluralize('d'), + dd : pluralize('d'), + M : pluralize('M'), + MM : pluralize('M'), + y : pluralize('y'), + yy : pluralize('y') + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + return arLy; + +}))); diff --git a/node_modules/moment/locale/ar-ma.js b/node_modules/moment/locale/ar-ma.js new file mode 100644 index 00000000..42db49a7 --- /dev/null +++ b/node_modules/moment/locale/ar-ma.js @@ -0,0 +1,58 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var arMa = moment.defineLocale('ar-ma', { + months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + return arMa; + +}))); diff --git a/node_modules/moment/locale/ar-sa.js b/node_modules/moment/locale/ar-sa.js new file mode 100644 index 00000000..1c6d46d5 --- /dev/null +++ b/node_modules/moment/locale/ar-sa.js @@ -0,0 +1,103 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠' + }, numberMap = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0' + }; + + var arSa = moment.defineLocale('ar-sa', { + months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ص|م/, + isPM : function (input) { + return 'م' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + preparse: function (string) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + return arSa; + +}))); diff --git a/node_modules/moment/locale/ar-tn.js b/node_modules/moment/locale/ar-tn.js new file mode 100644 index 00000000..8437717b --- /dev/null +++ b/node_modules/moment/locale/ar-tn.js @@ -0,0 +1,58 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var arTn = moment.defineLocale('ar-tn', { + months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss : '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات' + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return arTn; + +}))); diff --git a/node_modules/moment/locale/ar.js b/node_modules/moment/locale/ar.js new file mode 100644 index 00000000..1549cc15 --- /dev/null +++ b/node_modules/moment/locale/ar.js @@ -0,0 +1,134 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠' + }, numberMap = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0' + }, pluralForm = function (n) { + return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; + }, plurals = { + s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'], + m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'], + h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'], + d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'], + M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'], + y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام'] + }, pluralize = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm(number), + str = plurals[u][pluralForm(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, months = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر' + ]; + + var ar = moment.defineLocale('ar', { + months : months, + monthsShort : months, + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'D/\u200FM/\u200FYYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ص|م/, + isPM : function (input) { + return 'م' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar : { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'بعد %s', + past : 'منذ %s', + s : pluralize('s'), + ss : pluralize('s'), + m : pluralize('m'), + mm : pluralize('m'), + h : pluralize('h'), + hh : pluralize('h'), + d : pluralize('d'), + dd : pluralize('d'), + M : pluralize('M'), + MM : pluralize('M'), + y : pluralize('y'), + yy : pluralize('y') + }, + preparse: function (string) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + return ar; + +}))); diff --git a/node_modules/moment/locale/az.js b/node_modules/moment/locale/az.js new file mode 100644 index 00000000..348ddffe --- /dev/null +++ b/node_modules/moment/locale/az.js @@ -0,0 +1,104 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var suffixes = { + 1: '-inci', + 5: '-inci', + 8: '-inci', + 70: '-inci', + 80: '-inci', + 2: '-nci', + 7: '-nci', + 20: '-nci', + 50: '-nci', + 3: '-üncü', + 4: '-üncü', + 100: '-üncü', + 6: '-ncı', + 9: '-uncu', + 10: '-uncu', + 30: '-uncu', + 60: '-ıncı', + 90: '-ıncı' + }; + + var az = moment.defineLocale('az', { + months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'), + monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), + weekdays : 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'), + weekdaysShort : 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'), + weekdaysMin : 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[bugün saat] LT', + nextDay : '[sabah saat] LT', + nextWeek : '[gələn həftə] dddd [saat] LT', + lastDay : '[dünən] LT', + lastWeek : '[keçən həftə] dddd [saat] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s sonra', + past : '%s əvvəl', + s : 'birneçə saniyə', + ss : '%d saniyə', + m : 'bir dəqiqə', + mm : '%d dəqiqə', + h : 'bir saat', + hh : '%d saat', + d : 'bir gün', + dd : '%d gün', + M : 'bir ay', + MM : '%d ay', + y : 'bir il', + yy : '%d il' + }, + meridiemParse: /gecə|səhər|gündüz|axşam/, + isPM : function (input) { + return /^(gündüz|axşam)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'gecə'; + } else if (hour < 12) { + return 'səhər'; + } else if (hour < 17) { + return 'gündüz'; + } else { + return 'axşam'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, + ordinal : function (number) { + if (number === 0) { // special case for zero + return number + '-ıncı'; + } + var a = number % 10, + b = number % 100 - a, + c = number >= 100 ? 100 : null; + return number + (suffixes[a] || suffixes[b] || suffixes[c]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return az; + +}))); diff --git a/node_modules/moment/locale/be.js b/node_modules/moment/locale/be.js new file mode 100644 index 00000000..10db1c19 --- /dev/null +++ b/node_modules/moment/locale/be.js @@ -0,0 +1,131 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); + } + function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + 'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін', + 'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін', + 'dd': 'дзень_дні_дзён', + 'MM': 'месяц_месяцы_месяцаў', + 'yy': 'год_гады_гадоў' + }; + if (key === 'm') { + return withoutSuffix ? 'хвіліна' : 'хвіліну'; + } + else if (key === 'h') { + return withoutSuffix ? 'гадзіна' : 'гадзіну'; + } + else { + return number + ' ' + plural(format[key], +number); + } + } + + var be = moment.defineLocale('be', { + months : { + format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'), + standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_') + }, + monthsShort : 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'), + weekdays : { + format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'), + standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'), + isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/ + }, + weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY г.', + LLL : 'D MMMM YYYY г., HH:mm', + LLLL : 'dddd, D MMMM YYYY г., HH:mm' + }, + calendar : { + sameDay: '[Сёння ў] LT', + nextDay: '[Заўтра ў] LT', + lastDay: '[Учора ў] LT', + nextWeek: function () { + return '[У] dddd [ў] LT'; + }, + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return '[У мінулую] dddd [ў] LT'; + case 1: + case 2: + case 4: + return '[У мінулы] dddd [ў] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'праз %s', + past : '%s таму', + s : 'некалькі секунд', + m : relativeTimeWithPlural, + mm : relativeTimeWithPlural, + h : relativeTimeWithPlural, + hh : relativeTimeWithPlural, + d : 'дзень', + dd : relativeTimeWithPlural, + M : 'месяц', + MM : relativeTimeWithPlural, + y : 'год', + yy : relativeTimeWithPlural + }, + meridiemParse: /ночы|раніцы|дня|вечара/, + isPM : function (input) { + return /^(дня|вечара)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ночы'; + } else if (hour < 12) { + return 'раніцы'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечара'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-і' : number + '-ы'; + case 'D': + return number + '-га'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return be; + +}))); diff --git a/node_modules/moment/locale/bg.js b/node_modules/moment/locale/bg.js new file mode 100644 index 00000000..c70ba304 --- /dev/null +++ b/node_modules/moment/locale/bg.js @@ -0,0 +1,89 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var bg = moment.defineLocale('bg', { + months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'), + monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'), + weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'), + weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'), + weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'D.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY H:mm', + LLLL : 'dddd, D MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[Днес в] LT', + nextDay : '[Утре в] LT', + nextWeek : 'dddd [в] LT', + lastDay : '[Вчера в] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[В изминалата] dddd [в] LT'; + case 1: + case 2: + case 4: + case 5: + return '[В изминалия] dddd [в] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'след %s', + past : 'преди %s', + s : 'няколко секунди', + ss : '%d секунди', + m : 'минута', + mm : '%d минути', + h : 'час', + hh : '%d часа', + d : 'ден', + dd : '%d дни', + M : 'месец', + MM : '%d месеца', + y : 'година', + yy : '%d години' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal : function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return bg; + +}))); diff --git a/node_modules/moment/locale/bm.js b/node_modules/moment/locale/bm.js new file mode 100644 index 00000000..2bb50f51 --- /dev/null +++ b/node_modules/moment/locale/bm.js @@ -0,0 +1,57 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var bm = moment.defineLocale('bm', { + months : 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split('_'), + monthsShort : 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'), + weekdays : 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'), + weekdaysShort : 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'), + weekdaysMin : 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'MMMM [tile] D [san] YYYY', + LLL : 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + LLLL : 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm' + }, + calendar : { + sameDay : '[Bi lɛrɛ] LT', + nextDay : '[Sini lɛrɛ] LT', + nextWeek : 'dddd [don lɛrɛ] LT', + lastDay : '[Kunu lɛrɛ] LT', + lastWeek : 'dddd [tɛmɛnen lɛrɛ] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s kɔnɔ', + past : 'a bɛ %s bɔ', + s : 'sanga dama dama', + ss : 'sekondi %d', + m : 'miniti kelen', + mm : 'miniti %d', + h : 'lɛrɛ kelen', + hh : 'lɛrɛ %d', + d : 'tile kelen', + dd : 'tile %d', + M : 'kalo kelen', + MM : 'kalo %d', + y : 'san kelen', + yy : 'san %d' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return bm; + +}))); diff --git a/node_modules/moment/locale/bn.js b/node_modules/moment/locale/bn.js new file mode 100644 index 00000000..8fe71586 --- /dev/null +++ b/node_modules/moment/locale/bn.js @@ -0,0 +1,118 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '১', + '2': '২', + '3': '৩', + '4': '৪', + '5': '৫', + '6': '৬', + '7': '৭', + '8': '৮', + '9': '৯', + '0': '০' + }, + numberMap = { + '১': '1', + '২': '2', + '৩': '3', + '৪': '4', + '৫': '5', + '৬': '6', + '৭': '7', + '৮': '8', + '৯': '9', + '০': '0' + }; + + var bn = moment.defineLocale('bn', { + months : 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'), + monthsShort : 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'), + weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'), + weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'), + weekdaysMin : 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'), + longDateFormat : { + LT : 'A h:mm সময়', + LTS : 'A h:mm:ss সময়', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm সময়', + LLLL : 'dddd, D MMMM YYYY, A h:mm সময়' + }, + calendar : { + sameDay : '[আজ] LT', + nextDay : '[আগামীকাল] LT', + nextWeek : 'dddd, LT', + lastDay : '[গতকাল] LT', + lastWeek : '[গত] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s পরে', + past : '%s আগে', + s : 'কয়েক সেকেন্ড', + ss : '%d সেকেন্ড', + m : 'এক মিনিট', + mm : '%d মিনিট', + h : 'এক ঘন্টা', + hh : '%d ঘন্টা', + d : 'এক দিন', + dd : '%d দিন', + M : 'এক মাস', + MM : '%d মাস', + y : 'এক বছর', + yy : '%d বছর' + }, + preparse: function (string) { + return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ((meridiem === 'রাত' && hour >= 4) || + (meridiem === 'দুপুর' && hour < 5) || + meridiem === 'বিকাল') { + return hour + 12; + } else { + return hour; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'রাত'; + } else if (hour < 10) { + return 'সকাল'; + } else if (hour < 17) { + return 'দুপুর'; + } else if (hour < 20) { + return 'বিকাল'; + } else { + return 'রাত'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + return bn; + +}))); diff --git a/node_modules/moment/locale/bo.js b/node_modules/moment/locale/bo.js new file mode 100644 index 00000000..6a980163 --- /dev/null +++ b/node_modules/moment/locale/bo.js @@ -0,0 +1,118 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '༡', + '2': '༢', + '3': '༣', + '4': '༤', + '5': '༥', + '6': '༦', + '7': '༧', + '8': '༨', + '9': '༩', + '0': '༠' + }, + numberMap = { + '༡': '1', + '༢': '2', + '༣': '3', + '༤': '4', + '༥': '5', + '༦': '6', + '༧': '7', + '༨': '8', + '༩': '9', + '༠': '0' + }; + + var bo = moment.defineLocale('bo', { + months : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), + monthsShort : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), + weekdays : 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'), + weekdaysShort : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), + weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm', + LLLL : 'dddd, D MMMM YYYY, A h:mm' + }, + calendar : { + sameDay : '[དི་རིང] LT', + nextDay : '[སང་ཉིན] LT', + nextWeek : '[བདུན་ཕྲག་རྗེས་མ], LT', + lastDay : '[ཁ་སང] LT', + lastWeek : '[བདུན་ཕྲག་མཐའ་མ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ལ་', + past : '%s སྔན་ལ', + s : 'ལམ་སང', + ss : '%d སྐར་ཆ།', + m : 'སྐར་མ་གཅིག', + mm : '%d སྐར་མ', + h : 'ཆུ་ཚོད་གཅིག', + hh : '%d ཆུ་ཚོད', + d : 'ཉིན་གཅིག', + dd : '%d ཉིན་', + M : 'ཟླ་བ་གཅིག', + MM : '%d ཟླ་བ', + y : 'ལོ་གཅིག', + yy : '%d ལོ' + }, + preparse: function (string) { + return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ((meridiem === 'མཚན་མོ' && hour >= 4) || + (meridiem === 'ཉིན་གུང' && hour < 5) || + meridiem === 'དགོང་དག') { + return hour + 12; + } else { + return hour; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'མཚན་མོ'; + } else if (hour < 10) { + return 'ཞོགས་ཀས'; + } else if (hour < 17) { + return 'ཉིན་གུང'; + } else if (hour < 20) { + return 'དགོང་དག'; + } else { + return 'མཚན་མོ'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + return bo; + +}))); diff --git a/node_modules/moment/locale/br.js b/node_modules/moment/locale/br.js new file mode 100644 index 00000000..42994ca6 --- /dev/null +++ b/node_modules/moment/locale/br.js @@ -0,0 +1,107 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function relativeTimeWithMutation(number, withoutSuffix, key) { + var format = { + 'mm': 'munutenn', + 'MM': 'miz', + 'dd': 'devezh' + }; + return number + ' ' + mutation(format[key], number); + } + function specialMutationForYears(number) { + switch (lastNumber(number)) { + case 1: + case 3: + case 4: + case 5: + case 9: + return number + ' bloaz'; + default: + return number + ' vloaz'; + } + } + function lastNumber(number) { + if (number > 9) { + return lastNumber(number % 10); + } + return number; + } + function mutation(text, number) { + if (number === 2) { + return softMutation(text); + } + return text; + } + function softMutation(text) { + var mutationTable = { + 'm': 'v', + 'b': 'v', + 'd': 'z' + }; + if (mutationTable[text.charAt(0)] === undefined) { + return text; + } + return mutationTable[text.charAt(0)] + text.substring(1); + } + + var br = moment.defineLocale('br', { + months : 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'), + monthsShort : 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), + weekdays : 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'), + weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), + weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h[e]mm A', + LTS : 'h[e]mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D [a viz] MMMM YYYY', + LLL : 'D [a viz] MMMM YYYY h[e]mm A', + LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A' + }, + calendar : { + sameDay : '[Hiziv da] LT', + nextDay : '[Warc\'hoazh da] LT', + nextWeek : 'dddd [da] LT', + lastDay : '[Dec\'h da] LT', + lastWeek : 'dddd [paset da] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'a-benn %s', + past : '%s \'zo', + s : 'un nebeud segondennoù', + ss : '%d eilenn', + m : 'ur vunutenn', + mm : relativeTimeWithMutation, + h : 'un eur', + hh : '%d eur', + d : 'un devezh', + dd : relativeTimeWithMutation, + M : 'ur miz', + MM : relativeTimeWithMutation, + y : 'ur bloaz', + yy : specialMutationForYears + }, + dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/, + ordinal : function (number) { + var output = (number === 1) ? 'añ' : 'vet'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return br; + +}))); diff --git a/node_modules/moment/locale/bs.js b/node_modules/moment/locale/bs.js new file mode 100644 index 00000000..5e3e4286 --- /dev/null +++ b/node_modules/moment/locale/bs.js @@ -0,0 +1,150 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function translate(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } + } + + var bs = moment.defineLocale('bs', { + months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'), + monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[danas u] LT', + nextDay : '[sutra u] LT', + nextWeek : function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[jučer u] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'prije %s', + s : 'par sekundi', + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : 'dan', + dd : translate, + M : 'mjesec', + MM : translate, + y : 'godinu', + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return bs; + +}))); diff --git a/node_modules/moment/locale/ca.js b/node_modules/moment/locale/ca.js new file mode 100644 index 00000000..9a823b93 --- /dev/null +++ b/node_modules/moment/locale/ca.js @@ -0,0 +1,87 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var ca = moment.defineLocale('ca', { + months : { + standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'), + format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'), + isFormat: /D[oD]?(\s)+MMMM/ + }, + monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'), + monthsParseExact : true, + weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'), + weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'), + weekdaysMin : 'dg_dl_dt_dc_dj_dv_ds'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM [de] YYYY', + ll : 'D MMM YYYY', + LLL : 'D MMMM [de] YYYY [a les] H:mm', + lll : 'D MMM YYYY, H:mm', + LLLL : 'dddd D MMMM [de] YYYY [a les] H:mm', + llll : 'ddd D MMM YYYY, H:mm' + }, + calendar : { + sameDay : function () { + return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + nextDay : function () { + return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + lastDay : function () { + return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'd\'aquí %s', + past : 'fa %s', + s : 'uns segons', + ss : '%d segons', + m : 'un minut', + mm : '%d minuts', + h : 'una hora', + hh : '%d hores', + d : 'un dia', + dd : '%d dies', + M : 'un mes', + MM : '%d mesos', + y : 'un any', + yy : '%d anys' + }, + dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, + ordinal : function (number, period) { + var output = (number === 1) ? 'r' : + (number === 2) ? 'n' : + (number === 3) ? 'r' : + (number === 4) ? 't' : 'è'; + if (period === 'w' || period === 'W') { + output = 'a'; + } + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return ca; + +}))); diff --git a/node_modules/moment/locale/cs.js b/node_modules/moment/locale/cs.js new file mode 100644 index 00000000..bb9e3572 --- /dev/null +++ b/node_modules/moment/locale/cs.js @@ -0,0 +1,171 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'), + monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'); + + var monthsParse = [/^led/i, /^úno/i, /^bře/i, /^dub/i, /^kvě/i, /^(čvn|červen$|června)/i, /^(čvc|červenec|července)/i, /^srp/i, /^zář/i, /^říj/i, /^lis/i, /^pro/i]; + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + var monthsRegex = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i; + + function plural(n) { + return (n > 1) && (n < 5) && (~~(n / 10) !== 1); + } + function translate(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'sekundy' : 'sekund'); + } else { + return result + 'sekundami'; + } + break; + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou'); + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'minuty' : 'minut'); + } else { + return result + 'minutami'; + } + break; + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'hodiny' : 'hodin'); + } else { + return result + 'hodinami'; + } + break; + case 'd': // a day / in a day / a day ago + return (withoutSuffix || isFuture) ? 'den' : 'dnem'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'dny' : 'dní'); + } else { + return result + 'dny'; + } + break; + case 'M': // a month / in a month / a month ago + return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'měsíce' : 'měsíců'); + } else { + return result + 'měsíci'; + } + break; + case 'y': // a year / in a year / a year ago + return (withoutSuffix || isFuture) ? 'rok' : 'rokem'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'roky' : 'let'); + } else { + return result + 'lety'; + } + break; + } + } + + var cs = moment.defineLocale('cs', { + months : months, + monthsShort : monthsShort, + monthsRegex : monthsRegex, + monthsShortRegex : monthsRegex, + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + monthsStrictRegex : /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i, + monthsShortStrictRegex : /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i, + monthsParse : monthsParse, + longMonthsParse : monthsParse, + shortMonthsParse : monthsParse, + weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'), + weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'), + weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'), + longDateFormat : { + LT: 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd D. MMMM YYYY H:mm', + l : 'D. M. YYYY' + }, + calendar : { + sameDay: '[dnes v] LT', + nextDay: '[zítra v] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v neděli v] LT'; + case 1: + case 2: + return '[v] dddd [v] LT'; + case 3: + return '[ve středu v] LT'; + case 4: + return '[ve čtvrtek v] LT'; + case 5: + return '[v pátek v] LT'; + case 6: + return '[v sobotu v] LT'; + } + }, + lastDay: '[včera v] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulou neděli v] LT'; + case 1: + case 2: + return '[minulé] dddd [v] LT'; + case 3: + return '[minulou středu v] LT'; + case 4: + case 5: + return '[minulý] dddd [v] LT'; + case 6: + return '[minulou sobotu v] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'za %s', + past : 'před %s', + s : translate, + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate + }, + dayOfMonthOrdinalParse : /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return cs; + +}))); diff --git a/node_modules/moment/locale/cv.js b/node_modules/moment/locale/cv.js new file mode 100644 index 00000000..1db1488c --- /dev/null +++ b/node_modules/moment/locale/cv.js @@ -0,0 +1,62 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var cv = moment.defineLocale('cv', { + months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'), + monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'), + weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'), + weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'), + weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD-MM-YYYY', + LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', + LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm' + }, + calendar : { + sameDay: '[Паян] LT [сехетре]', + nextDay: '[Ыран] LT [сехетре]', + lastDay: '[Ӗнер] LT [сехетре]', + nextWeek: '[Ҫитес] dddd LT [сехетре]', + lastWeek: '[Иртнӗ] dddd LT [сехетре]', + sameElse: 'L' + }, + relativeTime : { + future : function (output) { + var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран'; + return output + affix; + }, + past : '%s каялла', + s : 'пӗр-ик ҫеккунт', + ss : '%d ҫеккунт', + m : 'пӗр минут', + mm : '%d минут', + h : 'пӗр сехет', + hh : '%d сехет', + d : 'пӗр кун', + dd : '%d кун', + M : 'пӗр уйӑх', + MM : '%d уйӑх', + y : 'пӗр ҫул', + yy : '%d ҫул' + }, + dayOfMonthOrdinalParse: /\d{1,2}-мӗш/, + ordinal : '%d-мӗш', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return cv; + +}))); diff --git a/node_modules/moment/locale/cy.js b/node_modules/moment/locale/cy.js new file mode 100644 index 00000000..84cbd463 --- /dev/null +++ b/node_modules/moment/locale/cy.js @@ -0,0 +1,79 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var cy = moment.defineLocale('cy', { + months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'), + monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'), + weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'), + weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), + weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), + weekdaysParseExact : true, + // time formats are the same as en-gb + longDateFormat: { + LT: 'HH:mm', + LTS : 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[Heddiw am] LT', + nextDay: '[Yfory am] LT', + nextWeek: 'dddd [am] LT', + lastDay: '[Ddoe am] LT', + lastWeek: 'dddd [diwethaf am] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'mewn %s', + past: '%s yn ôl', + s: 'ychydig eiliadau', + ss: '%d eiliad', + m: 'munud', + mm: '%d munud', + h: 'awr', + hh: '%d awr', + d: 'diwrnod', + dd: '%d diwrnod', + M: 'mis', + MM: '%d mis', + y: 'blwyddyn', + yy: '%d flynedd' + }, + dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, + // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh + ordinal: function (number) { + var b = number, + output = '', + lookup = [ + '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed + 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed + ]; + if (b > 20) { + if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { + output = 'fed'; // not 30ain, 70ain or 90ain + } else { + output = 'ain'; + } + } else if (b > 0) { + output = lookup[b]; + } + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return cy; + +}))); diff --git a/node_modules/moment/locale/da.js b/node_modules/moment/locale/da.js new file mode 100644 index 00000000..22a1a5b9 --- /dev/null +++ b/node_modules/moment/locale/da.js @@ -0,0 +1,59 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var da = moment.defineLocale('da', { + months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'), + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'), + weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm' + }, + calendar : { + sameDay : '[i dag kl.] LT', + nextDay : '[i morgen kl.] LT', + nextWeek : 'på dddd [kl.] LT', + lastDay : '[i går kl.] LT', + lastWeek : '[i] dddd[s kl.] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'om %s', + past : '%s siden', + s : 'få sekunder', + ss : '%d sekunder', + m : 'et minut', + mm : '%d minutter', + h : 'en time', + hh : '%d timer', + d : 'en dag', + dd : '%d dage', + M : 'en måned', + MM : '%d måneder', + y : 'et år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return da; + +}))); diff --git a/node_modules/moment/locale/de-at.js b/node_modules/moment/locale/de-at.js new file mode 100644 index 00000000..e3ac47b4 --- /dev/null +++ b/node_modules/moment/locale/de-at.js @@ -0,0 +1,75 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eine Minute', 'einer Minute'], + 'h': ['eine Stunde', 'einer Stunde'], + 'd': ['ein Tag', 'einem Tag'], + 'dd': [number + ' Tage', number + ' Tagen'], + 'M': ['ein Monat', 'einem Monat'], + 'MM': [number + ' Monate', number + ' Monaten'], + 'y': ['ein Jahr', 'einem Jahr'], + 'yy': [number + ' Jahre', number + ' Jahren'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + var deAt = moment.defineLocale('de-at', { + months : 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort : 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd, D. MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]' + }, + relativeTime : { + future : 'in %s', + past : 'vor %s', + s : 'ein paar Sekunden', + ss : '%d Sekunden', + m : processRelativeTime, + mm : '%d Minuten', + h : processRelativeTime, + hh : '%d Stunden', + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return deAt; + +}))); diff --git a/node_modules/moment/locale/de-ch.js b/node_modules/moment/locale/de-ch.js new file mode 100644 index 00000000..2676afbc --- /dev/null +++ b/node_modules/moment/locale/de-ch.js @@ -0,0 +1,75 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eine Minute', 'einer Minute'], + 'h': ['eine Stunde', 'einer Stunde'], + 'd': ['ein Tag', 'einem Tag'], + 'dd': [number + ' Tage', number + ' Tagen'], + 'M': ['ein Monat', 'einem Monat'], + 'MM': [number + ' Monate', number + ' Monaten'], + 'y': ['ein Jahr', 'einem Jahr'], + 'yy': [number + ' Jahre', number + ' Jahren'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + var deCh = moment.defineLocale('de-ch', { + months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd, D. MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]' + }, + relativeTime : { + future : 'in %s', + past : 'vor %s', + s : 'ein paar Sekunden', + ss : '%d Sekunden', + m : processRelativeTime, + mm : '%d Minuten', + h : processRelativeTime, + hh : '%d Stunden', + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return deCh; + +}))); diff --git a/node_modules/moment/locale/de.js b/node_modules/moment/locale/de.js new file mode 100644 index 00000000..d5c084a2 --- /dev/null +++ b/node_modules/moment/locale/de.js @@ -0,0 +1,75 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eine Minute', 'einer Minute'], + 'h': ['eine Stunde', 'einer Stunde'], + 'd': ['ein Tag', 'einem Tag'], + 'dd': [number + ' Tage', number + ' Tagen'], + 'M': ['ein Monat', 'einem Monat'], + 'MM': [number + ' Monate', number + ' Monaten'], + 'y': ['ein Jahr', 'einem Jahr'], + 'yy': [number + ' Jahre', number + ' Jahren'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + var de = moment.defineLocale('de', { + months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd, D. MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]' + }, + relativeTime : { + future : 'in %s', + past : 'vor %s', + s : 'ein paar Sekunden', + ss : '%d Sekunden', + m : processRelativeTime, + mm : '%d Minuten', + h : processRelativeTime, + hh : '%d Stunden', + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return de; + +}))); diff --git a/node_modules/moment/locale/dv.js b/node_modules/moment/locale/dv.js new file mode 100644 index 00000000..8729b02c --- /dev/null +++ b/node_modules/moment/locale/dv.js @@ -0,0 +1,98 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var months = [ + 'ޖެނުއަރީ', + 'ފެބްރުއަރީ', + 'މާރިޗު', + 'އޭޕްރީލު', + 'މޭ', + 'ޖޫން', + 'ޖުލައި', + 'އޯގަސްޓު', + 'ސެޕްޓެމްބަރު', + 'އޮކްޓޯބަރު', + 'ނޮވެމްބަރު', + 'ޑިސެމްބަރު' + ], weekdays = [ + 'އާދިއްތަ', + 'ހޯމަ', + 'އަންގާރަ', + 'ބުދަ', + 'ބުރާސްފަތި', + 'ހުކުރު', + 'ހޮނިހިރު' + ]; + + var dv = moment.defineLocale('dv', { + months : months, + monthsShort : months, + weekdays : weekdays, + weekdaysShort : weekdays, + weekdaysMin : 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'), + longDateFormat : { + + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'D/M/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /މކ|މފ/, + isPM : function (input) { + return 'މފ' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'މކ'; + } else { + return 'މފ'; + } + }, + calendar : { + sameDay : '[މިއަދު] LT', + nextDay : '[މާދަމާ] LT', + nextWeek : 'dddd LT', + lastDay : '[އިއްޔެ] LT', + lastWeek : '[ފާއިތުވި] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ތެރޭގައި %s', + past : 'ކުރިން %s', + s : 'ސިކުންތުކޮޅެއް', + ss : 'd% ސިކުންތު', + m : 'މިނިޓެއް', + mm : 'މިނިޓު %d', + h : 'ގަޑިއިރެއް', + hh : 'ގަޑިއިރު %d', + d : 'ދުވަހެއް', + dd : 'ދުވަސް %d', + M : 'މަހެއް', + MM : 'މަސް %d', + y : 'އަހަރެއް', + yy : 'އަހަރު %d' + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week : { + dow : 7, // Sunday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + return dv; + +}))); diff --git a/node_modules/moment/locale/el.js b/node_modules/moment/locale/el.js new file mode 100644 index 00000000..f01fa772 --- /dev/null +++ b/node_modules/moment/locale/el.js @@ -0,0 +1,99 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + + + var el = moment.defineLocale('el', { + monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'), + monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'), + months : function (momentToFormat, format) { + if (!momentToFormat) { + return this._monthsNominativeEl; + } else if (typeof format === 'string' && /D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM' + return this._monthsGenitiveEl[momentToFormat.month()]; + } else { + return this._monthsNominativeEl[momentToFormat.month()]; + } + }, + monthsShort : 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'), + weekdays : 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'), + weekdaysShort : 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'), + weekdaysMin : 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'), + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'μμ' : 'ΜΜ'; + } else { + return isLower ? 'πμ' : 'ΠΜ'; + } + }, + isPM : function (input) { + return ((input + '').toLowerCase()[0] === 'μ'); + }, + meridiemParse : /[ΠΜ]\.?Μ?\.?/i, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendarEl : { + sameDay : '[Σήμερα {}] LT', + nextDay : '[Αύριο {}] LT', + nextWeek : 'dddd [{}] LT', + lastDay : '[Χθες {}] LT', + lastWeek : function () { + switch (this.day()) { + case 6: + return '[το προηγούμενο] dddd [{}] LT'; + default: + return '[την προηγούμενη] dddd [{}] LT'; + } + }, + sameElse : 'L' + }, + calendar : function (key, mom) { + var output = this._calendarEl[key], + hours = mom && mom.hours(); + if (isFunction(output)) { + output = output.apply(mom); + } + return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις')); + }, + relativeTime : { + future : 'σε %s', + past : '%s πριν', + s : 'λίγα δευτερόλεπτα', + ss : '%d δευτερόλεπτα', + m : 'ένα λεπτό', + mm : '%d λεπτά', + h : 'μία ώρα', + hh : '%d ώρες', + d : 'μία μέρα', + dd : '%d μέρες', + M : 'ένας μήνας', + MM : '%d μήνες', + y : 'ένας χρόνος', + yy : '%d χρόνια' + }, + dayOfMonthOrdinalParse: /\d{1,2}η/, + ordinal: '%dη', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4st is the first week of the year. + } + }); + + return el; + +}))); diff --git a/node_modules/moment/locale/en-SG.js b/node_modules/moment/locale/en-SG.js new file mode 100644 index 00000000..4c69f117 --- /dev/null +++ b/node_modules/moment/locale/en-SG.js @@ -0,0 +1,66 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var enSG = moment.defineLocale('en-SG', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return enSG; + +}))); diff --git a/node_modules/moment/locale/en-au.js b/node_modules/moment/locale/en-au.js new file mode 100644 index 00000000..37202378 --- /dev/null +++ b/node_modules/moment/locale/en-au.js @@ -0,0 +1,66 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var enAu = moment.defineLocale('en-au', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return enAu; + +}))); diff --git a/node_modules/moment/locale/en-ca.js b/node_modules/moment/locale/en-ca.js new file mode 100644 index 00000000..5d0dab08 --- /dev/null +++ b/node_modules/moment/locale/en-ca.js @@ -0,0 +1,62 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var enCa = moment.defineLocale('en-ca', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'YYYY-MM-DD', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY h:mm A', + LLLL : 'dddd, MMMM D, YYYY h:mm A' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } + }); + + return enCa; + +}))); diff --git a/node_modules/moment/locale/en-gb.js b/node_modules/moment/locale/en-gb.js new file mode 100644 index 00000000..85302e5d --- /dev/null +++ b/node_modules/moment/locale/en-gb.js @@ -0,0 +1,66 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var enGb = moment.defineLocale('en-gb', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return enGb; + +}))); diff --git a/node_modules/moment/locale/en-ie.js b/node_modules/moment/locale/en-ie.js new file mode 100644 index 00000000..de0984cf --- /dev/null +++ b/node_modules/moment/locale/en-ie.js @@ -0,0 +1,66 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var enIe = moment.defineLocale('en-ie', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return enIe; + +}))); diff --git a/node_modules/moment/locale/en-il.js b/node_modules/moment/locale/en-il.js new file mode 100644 index 00000000..b18eab86 --- /dev/null +++ b/node_modules/moment/locale/en-il.js @@ -0,0 +1,61 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var enIl = moment.defineLocale('en-il', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } + }); + + return enIl; + +}))); diff --git a/node_modules/moment/locale/en-nz.js b/node_modules/moment/locale/en-nz.js new file mode 100644 index 00000000..f4325d4c --- /dev/null +++ b/node_modules/moment/locale/en-nz.js @@ -0,0 +1,66 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var enNz = moment.defineLocale('en-nz', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return enNz; + +}))); diff --git a/node_modules/moment/locale/eo.js b/node_modules/moment/locale/eo.js new file mode 100644 index 00000000..283ebed8 --- /dev/null +++ b/node_modules/moment/locale/eo.js @@ -0,0 +1,70 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var eo = moment.defineLocale('eo', { + months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'), + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'), + weekdays : 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'), + weekdaysShort : 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'), + weekdaysMin : 'di_lu_ma_me_ĵa_ve_sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'D[-a de] MMMM, YYYY', + LLL : 'D[-a de] MMMM, YYYY HH:mm', + LLLL : 'dddd, [la] D[-a de] MMMM, YYYY HH:mm' + }, + meridiemParse: /[ap]\.t\.m/i, + isPM: function (input) { + return input.charAt(0).toLowerCase() === 'p'; + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'p.t.m.' : 'P.T.M.'; + } else { + return isLower ? 'a.t.m.' : 'A.T.M.'; + } + }, + calendar : { + sameDay : '[Hodiaŭ je] LT', + nextDay : '[Morgaŭ je] LT', + nextWeek : 'dddd [je] LT', + lastDay : '[Hieraŭ je] LT', + lastWeek : '[pasinta] dddd [je] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'post %s', + past : 'antaŭ %s', + s : 'sekundoj', + ss : '%d sekundoj', + m : 'minuto', + mm : '%d minutoj', + h : 'horo', + hh : '%d horoj', + d : 'tago',//ne 'diurno', ĉar estas uzita por proksimumo + dd : '%d tagoj', + M : 'monato', + MM : '%d monatoj', + y : 'jaro', + yy : '%d jaroj' + }, + dayOfMonthOrdinalParse: /\d{1,2}a/, + ordinal : '%da', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return eo; + +}))); diff --git a/node_modules/moment/locale/es-do.js b/node_modules/moment/locale/es-do.js new file mode 100644 index 00000000..829c2de8 --- /dev/null +++ b/node_modules/moment/locale/es-do.js @@ -0,0 +1,91 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), + monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); + + var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; + var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + var esDo = moment.defineLocale('es-do', { + months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortDot; + } else if (/-MMM-/.test(format)) { + return monthsShort[m.month()]; + } else { + return monthsShortDot[m.month()]; + } + }, + monthsRegex: monthsRegex, + monthsShortRegex: monthsRegex, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse, + longMonthsParse: monthsParse, + shortMonthsParse: monthsParse, + weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY h:mm A', + LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A' + }, + calendar : { + sameDay : function () { + return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextDay : function () { + return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastDay : function () { + return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'en %s', + past : 'hace %s', + s : 'unos segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'una hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un año', + yy : '%d años' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return esDo; + +}))); diff --git a/node_modules/moment/locale/es-us.js b/node_modules/moment/locale/es-us.js new file mode 100644 index 00000000..8e07d077 --- /dev/null +++ b/node_modules/moment/locale/es-us.js @@ -0,0 +1,91 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), + monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); + + var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; + var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + var esUs = moment.defineLocale('es-us', { + months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortDot; + } else if (/-MMM-/.test(format)) { + return monthsShort[m.month()]; + } else { + return monthsShortDot[m.month()]; + } + }, + monthsRegex: monthsRegex, + monthsShortRegex: monthsRegex, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse, + longMonthsParse: monthsParse, + shortMonthsParse: monthsParse, + weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'MM/DD/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY h:mm A', + LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A' + }, + calendar : { + sameDay : function () { + return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextDay : function () { + return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastDay : function () { + return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'en %s', + past : 'hace %s', + s : 'unos segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'una hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un año', + yy : '%d años' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + return esUs; + +}))); diff --git a/node_modules/moment/locale/es.js b/node_modules/moment/locale/es.js new file mode 100644 index 00000000..aed68026 --- /dev/null +++ b/node_modules/moment/locale/es.js @@ -0,0 +1,91 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), + monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); + + var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; + var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + var es = moment.defineLocale('es', { + months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortDot; + } else if (/-MMM-/.test(format)) { + return monthsShort[m.month()]; + } else { + return monthsShortDot[m.month()]; + } + }, + monthsRegex : monthsRegex, + monthsShortRegex : monthsRegex, + monthsStrictRegex : /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex : /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse : monthsParse, + longMonthsParse : monthsParse, + shortMonthsParse : monthsParse, + weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY H:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm' + }, + calendar : { + sameDay : function () { + return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextDay : function () { + return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastDay : function () { + return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'en %s', + past : 'hace %s', + s : 'unos segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'una hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un año', + yy : '%d años' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return es; + +}))); diff --git a/node_modules/moment/locale/et.js b/node_modules/moment/locale/et.js new file mode 100644 index 00000000..8a81b040 --- /dev/null +++ b/node_modules/moment/locale/et.js @@ -0,0 +1,79 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'], + 'ss': [number + 'sekundi', number + 'sekundit'], + 'm' : ['ühe minuti', 'üks minut'], + 'mm': [number + ' minuti', number + ' minutit'], + 'h' : ['ühe tunni', 'tund aega', 'üks tund'], + 'hh': [number + ' tunni', number + ' tundi'], + 'd' : ['ühe päeva', 'üks päev'], + 'M' : ['kuu aja', 'kuu aega', 'üks kuu'], + 'MM': [number + ' kuu', number + ' kuud'], + 'y' : ['ühe aasta', 'aasta', 'üks aasta'], + 'yy': [number + ' aasta', number + ' aastat'] + }; + if (withoutSuffix) { + return format[key][2] ? format[key][2] : format[key][1]; + } + return isFuture ? format[key][0] : format[key][1]; + } + + var et = moment.defineLocale('et', { + months : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'), + monthsShort : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'), + weekdays : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'), + weekdaysShort : 'P_E_T_K_N_R_L'.split('_'), + weekdaysMin : 'P_E_T_K_N_R_L'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[Täna,] LT', + nextDay : '[Homme,] LT', + nextWeek : '[Järgmine] dddd LT', + lastDay : '[Eile,] LT', + lastWeek : '[Eelmine] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s pärast', + past : '%s tagasi', + s : processRelativeTime, + ss : processRelativeTime, + m : processRelativeTime, + mm : processRelativeTime, + h : processRelativeTime, + hh : processRelativeTime, + d : processRelativeTime, + dd : '%d päeva', + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return et; + +}))); diff --git a/node_modules/moment/locale/eu.js b/node_modules/moment/locale/eu.js new file mode 100644 index 00000000..2c7781b9 --- /dev/null +++ b/node_modules/moment/locale/eu.js @@ -0,0 +1,65 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var eu = moment.defineLocale('eu', { + months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'), + monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'), + monthsParseExact : true, + weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'), + weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'), + weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'YYYY[ko] MMMM[ren] D[a]', + LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm', + LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', + l : 'YYYY-M-D', + ll : 'YYYY[ko] MMM D[a]', + lll : 'YYYY[ko] MMM D[a] HH:mm', + llll : 'ddd, YYYY[ko] MMM D[a] HH:mm' + }, + calendar : { + sameDay : '[gaur] LT[etan]', + nextDay : '[bihar] LT[etan]', + nextWeek : 'dddd LT[etan]', + lastDay : '[atzo] LT[etan]', + lastWeek : '[aurreko] dddd LT[etan]', + sameElse : 'L' + }, + relativeTime : { + future : '%s barru', + past : 'duela %s', + s : 'segundo batzuk', + ss : '%d segundo', + m : 'minutu bat', + mm : '%d minutu', + h : 'ordu bat', + hh : '%d ordu', + d : 'egun bat', + dd : '%d egun', + M : 'hilabete bat', + MM : '%d hilabete', + y : 'urte bat', + yy : '%d urte' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return eu; + +}))); diff --git a/node_modules/moment/locale/fa.js b/node_modules/moment/locale/fa.js new file mode 100644 index 00000000..e84f7ca1 --- /dev/null +++ b/node_modules/moment/locale/fa.js @@ -0,0 +1,105 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '۱', + '2': '۲', + '3': '۳', + '4': '۴', + '5': '۵', + '6': '۶', + '7': '۷', + '8': '۸', + '9': '۹', + '0': '۰' + }, numberMap = { + '۱': '1', + '۲': '2', + '۳': '3', + '۴': '4', + '۵': '5', + '۶': '6', + '۷': '7', + '۸': '8', + '۹': '9', + '۰': '0' + }; + + var fa = moment.defineLocale('fa', { + months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), + monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), + weekdays : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), + weekdaysShort : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), + weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + meridiemParse: /قبل از ظهر|بعد از ظهر/, + isPM: function (input) { + return /بعد از ظهر/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'قبل از ظهر'; + } else { + return 'بعد از ظهر'; + } + }, + calendar : { + sameDay : '[امروز ساعت] LT', + nextDay : '[فردا ساعت] LT', + nextWeek : 'dddd [ساعت] LT', + lastDay : '[دیروز ساعت] LT', + lastWeek : 'dddd [پیش] [ساعت] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'در %s', + past : '%s پیش', + s : 'چند ثانیه', + ss : 'ثانیه d%', + m : 'یک دقیقه', + mm : '%d دقیقه', + h : 'یک ساعت', + hh : '%d ساعت', + d : 'یک روز', + dd : '%d روز', + M : 'یک ماه', + MM : '%d ماه', + y : 'یک سال', + yy : '%d سال' + }, + preparse: function (string) { + return string.replace(/[۰-۹]/g, function (match) { + return numberMap[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }).replace(/,/g, '،'); + }, + dayOfMonthOrdinalParse: /\d{1,2}م/, + ordinal : '%dم', + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + return fa; + +}))); diff --git a/node_modules/moment/locale/fi.js b/node_modules/moment/locale/fi.js new file mode 100644 index 00000000..b0115993 --- /dev/null +++ b/node_modules/moment/locale/fi.js @@ -0,0 +1,108 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '), + numbersFuture = [ + 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden', + numbersPast[7], numbersPast[8], numbersPast[9] + ]; + function translate(number, withoutSuffix, key, isFuture) { + var result = ''; + switch (key) { + case 's': + return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; + case 'ss': + return isFuture ? 'sekunnin' : 'sekuntia'; + case 'm': + return isFuture ? 'minuutin' : 'minuutti'; + case 'mm': + result = isFuture ? 'minuutin' : 'minuuttia'; + break; + case 'h': + return isFuture ? 'tunnin' : 'tunti'; + case 'hh': + result = isFuture ? 'tunnin' : 'tuntia'; + break; + case 'd': + return isFuture ? 'päivän' : 'päivä'; + case 'dd': + result = isFuture ? 'päivän' : 'päivää'; + break; + case 'M': + return isFuture ? 'kuukauden' : 'kuukausi'; + case 'MM': + result = isFuture ? 'kuukauden' : 'kuukautta'; + break; + case 'y': + return isFuture ? 'vuoden' : 'vuosi'; + case 'yy': + result = isFuture ? 'vuoden' : 'vuotta'; + break; + } + result = verbalNumber(number, isFuture) + ' ' + result; + return result; + } + function verbalNumber(number, isFuture) { + return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number; + } + + var fi = moment.defineLocale('fi', { + months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'), + monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'), + weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'), + weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'), + weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD.MM.YYYY', + LL : 'Do MMMM[ta] YYYY', + LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm', + LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm', + l : 'D.M.YYYY', + ll : 'Do MMM YYYY', + lll : 'Do MMM YYYY, [klo] HH.mm', + llll : 'ddd, Do MMM YYYY, [klo] HH.mm' + }, + calendar : { + sameDay : '[tänään] [klo] LT', + nextDay : '[huomenna] [klo] LT', + nextWeek : 'dddd [klo] LT', + lastDay : '[eilen] [klo] LT', + lastWeek : '[viime] dddd[na] [klo] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s päästä', + past : '%s sitten', + s : translate, + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return fi; + +}))); diff --git a/node_modules/moment/locale/fo.js b/node_modules/moment/locale/fo.js new file mode 100644 index 00000000..8e81cfe6 --- /dev/null +++ b/node_modules/moment/locale/fo.js @@ -0,0 +1,59 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var fo = moment.defineLocale('fo', { + months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), + weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'), + weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'), + weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D. MMMM, YYYY HH:mm' + }, + calendar : { + sameDay : '[Í dag kl.] LT', + nextDay : '[Í morgin kl.] LT', + nextWeek : 'dddd [kl.] LT', + lastDay : '[Í gjár kl.] LT', + lastWeek : '[síðstu] dddd [kl] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'um %s', + past : '%s síðani', + s : 'fá sekund', + ss : '%d sekundir', + m : 'ein minuttur', + mm : '%d minuttir', + h : 'ein tími', + hh : '%d tímar', + d : 'ein dagur', + dd : '%d dagar', + M : 'ein mánaður', + MM : '%d mánaðir', + y : 'eitt ár', + yy : '%d ár' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return fo; + +}))); diff --git a/node_modules/moment/locale/fr-ca.js b/node_modules/moment/locale/fr-ca.js new file mode 100644 index 00000000..ad1f77d5 --- /dev/null +++ b/node_modules/moment/locale/fr-ca.js @@ -0,0 +1,73 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var frCa = moment.defineLocale('fr-ca', { + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + monthsParseExact : true, + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Aujourd’hui à] LT', + nextDay : '[Demain à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[Hier à] LT', + lastWeek : 'dddd [dernier à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dans %s', + past : 'il y a %s', + s : 'quelques secondes', + ss : '%d secondes', + m : 'une minute', + mm : '%d minutes', + h : 'une heure', + hh : '%d heures', + d : 'un jour', + dd : '%d jours', + M : 'un mois', + MM : '%d mois', + y : 'un an', + yy : '%d ans' + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal : function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + } + }); + + return frCa; + +}))); diff --git a/node_modules/moment/locale/fr-ch.js b/node_modules/moment/locale/fr-ch.js new file mode 100644 index 00000000..54033d14 --- /dev/null +++ b/node_modules/moment/locale/fr-ch.js @@ -0,0 +1,77 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var frCh = moment.defineLocale('fr-ch', { + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + monthsParseExact : true, + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Aujourd’hui à] LT', + nextDay : '[Demain à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[Hier à] LT', + lastWeek : 'dddd [dernier à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dans %s', + past : 'il y a %s', + s : 'quelques secondes', + ss : '%d secondes', + m : 'une minute', + mm : '%d minutes', + h : 'une heure', + hh : '%d heures', + d : 'un jour', + dd : '%d jours', + M : 'un mois', + MM : '%d mois', + y : 'un an', + yy : '%d ans' + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal : function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return frCh; + +}))); diff --git a/node_modules/moment/locale/fr.js b/node_modules/moment/locale/fr.js new file mode 100644 index 00000000..92867073 --- /dev/null +++ b/node_modules/moment/locale/fr.js @@ -0,0 +1,82 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var fr = moment.defineLocale('fr', { + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + monthsParseExact : true, + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Aujourd’hui à] LT', + nextDay : '[Demain à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[Hier à] LT', + lastWeek : 'dddd [dernier à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dans %s', + past : 'il y a %s', + s : 'quelques secondes', + ss : '%d secondes', + m : 'une minute', + mm : '%d minutes', + h : 'une heure', + hh : '%d heures', + d : 'un jour', + dd : '%d jours', + M : 'un mois', + MM : '%d mois', + y : 'un an', + yy : '%d ans' + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|)/, + ordinal : function (number, period) { + switch (period) { + // TODO: Return 'e' when day of month > 1. Move this case inside + // block for masculine words below. + // See https://github.com/moment/moment/issues/3375 + case 'D': + return number + (number === 1 ? 'er' : ''); + + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return fr; + +}))); diff --git a/node_modules/moment/locale/fy.js b/node_modules/moment/locale/fy.js new file mode 100644 index 00000000..9a672bf4 --- /dev/null +++ b/node_modules/moment/locale/fy.js @@ -0,0 +1,74 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'), + monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'); + + var fy = moment.defineLocale('fy', { + months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortWithDots; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots[m.month()]; + } else { + return monthsShortWithDots[m.month()]; + } + }, + monthsParseExact : true, + weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'), + weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'), + weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD-MM-YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[hjoed om] LT', + nextDay: '[moarn om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[juster om] LT', + lastWeek: '[ôfrûne] dddd [om] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'oer %s', + past : '%s lyn', + s : 'in pear sekonden', + ss : '%d sekonden', + m : 'ien minút', + mm : '%d minuten', + h : 'ien oere', + hh : '%d oeren', + d : 'ien dei', + dd : '%d dagen', + M : 'ien moanne', + MM : '%d moannen', + y : 'ien jier', + yy : '%d jierren' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return fy; + +}))); diff --git a/node_modules/moment/locale/ga.js b/node_modules/moment/locale/ga.js new file mode 100644 index 00000000..a5b92de4 --- /dev/null +++ b/node_modules/moment/locale/ga.js @@ -0,0 +1,76 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + + var months = [ + 'Eanáir', 'Feabhra', 'Márta', 'Aibreán', 'Bealtaine', 'Méitheamh', 'Iúil', 'Lúnasa', 'Meán Fómhair', 'Deaireadh Fómhair', 'Samhain', 'Nollaig' + ]; + + var monthsShort = ['Eaná', 'Feab', 'Márt', 'Aibr', 'Beal', 'Méit', 'Iúil', 'Lúna', 'Meán', 'Deai', 'Samh', 'Noll']; + + var weekdays = ['Dé Domhnaigh', 'Dé Luain', 'Dé Máirt', 'Dé Céadaoin', 'Déardaoin', 'Dé hAoine', 'Dé Satharn']; + + var weekdaysShort = ['Dom', 'Lua', 'Mái', 'Céa', 'Déa', 'hAo', 'Sat']; + + var weekdaysMin = ['Do', 'Lu', 'Má', 'Ce', 'Dé', 'hA', 'Sa']; + + var ga = moment.defineLocale('ga', { + months: months, + monthsShort: monthsShort, + monthsParseExact: true, + weekdays: weekdays, + weekdaysShort: weekdaysShort, + weekdaysMin: weekdaysMin, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[Inniu ag] LT', + nextDay: '[Amárach ag] LT', + nextWeek: 'dddd [ag] LT', + lastDay: '[Inné aig] LT', + lastWeek: 'dddd [seo caite] [ag] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'i %s', + past: '%s ó shin', + s: 'cúpla soicind', + ss: '%d soicind', + m: 'nóiméad', + mm: '%d nóiméad', + h: 'uair an chloig', + hh: '%d uair an chloig', + d: 'lá', + dd: '%d lá', + M: 'mí', + MM: '%d mí', + y: 'bliain', + yy: '%d bliain' + }, + dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, + ordinal: function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return ga; + +}))); diff --git a/node_modules/moment/locale/gd.js b/node_modules/moment/locale/gd.js new file mode 100644 index 00000000..4d0d88a7 --- /dev/null +++ b/node_modules/moment/locale/gd.js @@ -0,0 +1,75 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var months = [ + 'Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd' + ]; + + var monthsShort = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh']; + + var weekdays = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne']; + + var weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis']; + + var weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa']; + + var gd = moment.defineLocale('gd', { + months : months, + monthsShort : monthsShort, + monthsParseExact : true, + weekdays : weekdays, + weekdaysShort : weekdaysShort, + weekdaysMin : weekdaysMin, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[An-diugh aig] LT', + nextDay : '[A-màireach aig] LT', + nextWeek : 'dddd [aig] LT', + lastDay : '[An-dè aig] LT', + lastWeek : 'dddd [seo chaidh] [aig] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ann an %s', + past : 'bho chionn %s', + s : 'beagan diogan', + ss : '%d diogan', + m : 'mionaid', + mm : '%d mionaidean', + h : 'uair', + hh : '%d uairean', + d : 'latha', + dd : '%d latha', + M : 'mìos', + MM : '%d mìosan', + y : 'bliadhna', + yy : '%d bliadhna' + }, + dayOfMonthOrdinalParse : /\d{1,2}(d|na|mh)/, + ordinal : function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return gd; + +}))); diff --git a/node_modules/moment/locale/gl.js b/node_modules/moment/locale/gl.js new file mode 100644 index 00000000..1cc4177c --- /dev/null +++ b/node_modules/moment/locale/gl.js @@ -0,0 +1,76 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var gl = moment.defineLocale('gl', { + months : 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'), + monthsShort : 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mé_xo_ve_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY H:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm' + }, + calendar : { + sameDay : function () { + return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; + }, + nextDay : function () { + return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; + }, + nextWeek : function () { + return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; + }, + lastDay : function () { + return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT'; + }, + lastWeek : function () { + return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : function (str) { + if (str.indexOf('un') === 0) { + return 'n' + str; + } + return 'en ' + str; + }, + past : 'hai %s', + s : 'uns segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'unha hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un ano', + yy : '%d anos' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return gl; + +}))); diff --git a/node_modules/moment/locale/gom-latn.js b/node_modules/moment/locale/gom-latn.js new file mode 100644 index 00000000..bfad12e7 --- /dev/null +++ b/node_modules/moment/locale/gom-latn.js @@ -0,0 +1,122 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 's': ['thodde secondanim', 'thodde second'], + 'ss': [number + ' secondanim', number + ' second'], + 'm': ['eka mintan', 'ek minute'], + 'mm': [number + ' mintanim', number + ' mintam'], + 'h': ['eka voran', 'ek vor'], + 'hh': [number + ' voranim', number + ' voram'], + 'd': ['eka disan', 'ek dis'], + 'dd': [number + ' disanim', number + ' dis'], + 'M': ['eka mhoinean', 'ek mhoino'], + 'MM': [number + ' mhoineanim', number + ' mhoine'], + 'y': ['eka vorsan', 'ek voros'], + 'yy': [number + ' vorsanim', number + ' vorsam'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + var gomLatn = moment.defineLocale('gom-latn', { + months : 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'), + monthsShort : 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\'var'.split('_'), + weekdaysShort : 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'), + weekdaysMin : 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'A h:mm [vazta]', + LTS : 'A h:mm:ss [vazta]', + L : 'DD-MM-YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY A h:mm [vazta]', + LLLL : 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]', + llll: 'ddd, D MMM YYYY, A h:mm [vazta]' + }, + calendar : { + sameDay: '[Aiz] LT', + nextDay: '[Faleam] LT', + nextWeek: '[Ieta to] dddd[,] LT', + lastDay: '[Kal] LT', + lastWeek: '[Fatlo] dddd[,] LT', + sameElse: 'L' + }, + relativeTime : { + future : '%s', + past : '%s adim', + s : processRelativeTime, + ss : processRelativeTime, + m : processRelativeTime, + mm : processRelativeTime, + h : processRelativeTime, + hh : processRelativeTime, + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse : /\d{1,2}(er)/, + ordinal : function (number, period) { + switch (period) { + // the ordinal 'er' only applies to day of the month + case 'D': + return number + 'er'; + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + case 'w': + case 'W': + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + }, + meridiemParse: /rati|sokalli|donparam|sanje/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'rati') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'sokalli') { + return hour; + } else if (meridiem === 'donparam') { + return hour > 12 ? hour : hour + 12; + } else if (meridiem === 'sanje') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'rati'; + } else if (hour < 12) { + return 'sokalli'; + } else if (hour < 16) { + return 'donparam'; + } else if (hour < 20) { + return 'sanje'; + } else { + return 'rati'; + } + } + }); + + return gomLatn; + +}))); diff --git a/node_modules/moment/locale/gu.js b/node_modules/moment/locale/gu.js new file mode 100644 index 00000000..9f80dbd7 --- /dev/null +++ b/node_modules/moment/locale/gu.js @@ -0,0 +1,123 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '૧', + '2': '૨', + '3': '૩', + '4': '૪', + '5': '૫', + '6': '૬', + '7': '૭', + '8': '૮', + '9': '૯', + '0': '૦' + }, + numberMap = { + '૧': '1', + '૨': '2', + '૩': '3', + '૪': '4', + '૫': '5', + '૬': '6', + '૭': '7', + '૮': '8', + '૯': '9', + '૦': '0' + }; + + var gu = moment.defineLocale('gu', { + months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'), + monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'), + monthsParseExact: true, + weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split('_'), + weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'), + weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'), + longDateFormat: { + LT: 'A h:mm વાગ્યે', + LTS: 'A h:mm:ss વાગ્યે', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm વાગ્યે', + LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે' + }, + calendar: { + sameDay: '[આજ] LT', + nextDay: '[કાલે] LT', + nextWeek: 'dddd, LT', + lastDay: '[ગઇકાલે] LT', + lastWeek: '[પાછલા] dddd, LT', + sameElse: 'L' + }, + relativeTime: { + future: '%s મા', + past: '%s પેહલા', + s: 'અમુક પળો', + ss: '%d સેકંડ', + m: 'એક મિનિટ', + mm: '%d મિનિટ', + h: 'એક કલાક', + hh: '%d કલાક', + d: 'એક દિવસ', + dd: '%d દિવસ', + M: 'એક મહિનો', + MM: '%d મહિનો', + y: 'એક વર્ષ', + yy: '%d વર્ષ' + }, + preparse: function (string) { + return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + // Gujarati notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati. + meridiemParse: /રાત|બપોર|સવાર|સાંજ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'રાત') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'સવાર') { + return hour; + } else if (meridiem === 'બપોર') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'સાંજ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'રાત'; + } else if (hour < 10) { + return 'સવાર'; + } else if (hour < 17) { + return 'બપોર'; + } else if (hour < 20) { + return 'સાંજ'; + } else { + return 'રાત'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + return gu; + +}))); diff --git a/node_modules/moment/locale/he.js b/node_modules/moment/locale/he.js new file mode 100644 index 00000000..7a22e8d7 --- /dev/null +++ b/node_modules/moment/locale/he.js @@ -0,0 +1,96 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var he = moment.defineLocale('he', { + months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'), + monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'), + weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'), + weekdaysShort : 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'), + weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [ב]MMMM YYYY', + LLL : 'D [ב]MMMM YYYY HH:mm', + LLLL : 'dddd, D [ב]MMMM YYYY HH:mm', + l : 'D/M/YYYY', + ll : 'D MMM YYYY', + lll : 'D MMM YYYY HH:mm', + llll : 'ddd, D MMM YYYY HH:mm' + }, + calendar : { + sameDay : '[היום ב־]LT', + nextDay : '[מחר ב־]LT', + nextWeek : 'dddd [בשעה] LT', + lastDay : '[אתמול ב־]LT', + lastWeek : '[ביום] dddd [האחרון בשעה] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'בעוד %s', + past : 'לפני %s', + s : 'מספר שניות', + ss : '%d שניות', + m : 'דקה', + mm : '%d דקות', + h : 'שעה', + hh : function (number) { + if (number === 2) { + return 'שעתיים'; + } + return number + ' שעות'; + }, + d : 'יום', + dd : function (number) { + if (number === 2) { + return 'יומיים'; + } + return number + ' ימים'; + }, + M : 'חודש', + MM : function (number) { + if (number === 2) { + return 'חודשיים'; + } + return number + ' חודשים'; + }, + y : 'שנה', + yy : function (number) { + if (number === 2) { + return 'שנתיים'; + } else if (number % 10 === 0 && number !== 10) { + return number + ' שנה'; + } + return number + ' שנים'; + } + }, + meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i, + isPM : function (input) { + return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 5) { + return 'לפנות בוקר'; + } else if (hour < 10) { + return 'בבוקר'; + } else if (hour < 12) { + return isLower ? 'לפנה"צ' : 'לפני הצהריים'; + } else if (hour < 18) { + return isLower ? 'אחה"צ' : 'אחרי הצהריים'; + } else { + return 'בערב'; + } + } + }); + + return he; + +}))); diff --git a/node_modules/moment/locale/hi.js b/node_modules/moment/locale/hi.js new file mode 100644 index 00000000..a07860a0 --- /dev/null +++ b/node_modules/moment/locale/hi.js @@ -0,0 +1,123 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०' + }, + numberMap = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0' + }; + + var hi = moment.defineLocale('hi', { + months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'), + monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'), + monthsParseExact: true, + weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat : { + LT : 'A h:mm बजे', + LTS : 'A h:mm:ss बजे', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm बजे', + LLLL : 'dddd, D MMMM YYYY, A h:mm बजे' + }, + calendar : { + sameDay : '[आज] LT', + nextDay : '[कल] LT', + nextWeek : 'dddd, LT', + lastDay : '[कल] LT', + lastWeek : '[पिछले] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s में', + past : '%s पहले', + s : 'कुछ ही क्षण', + ss : '%d सेकंड', + m : 'एक मिनट', + mm : '%d मिनट', + h : 'एक घंटा', + hh : '%d घंटे', + d : 'एक दिन', + dd : '%d दिन', + M : 'एक महीने', + MM : '%d महीने', + y : 'एक वर्ष', + yy : '%d वर्ष' + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + // Hindi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi. + meridiemParse: /रात|सुबह|दोपहर|शाम/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'रात') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सुबह') { + return hour; + } else if (meridiem === 'दोपहर') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'शाम') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'रात'; + } else if (hour < 10) { + return 'सुबह'; + } else if (hour < 17) { + return 'दोपहर'; + } else if (hour < 20) { + return 'शाम'; + } else { + return 'रात'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + return hi; + +}))); diff --git a/node_modules/moment/locale/hr.js b/node_modules/moment/locale/hr.js new file mode 100644 index 00000000..bf1597b6 --- /dev/null +++ b/node_modules/moment/locale/hr.js @@ -0,0 +1,153 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function translate(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } + } + + var hr = moment.defineLocale('hr', { + months : { + format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'), + standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_') + }, + monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'), + monthsParseExact: true, + weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[danas u] LT', + nextDay : '[sutra u] LT', + nextWeek : function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[jučer u] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'prije %s', + s : 'par sekundi', + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : 'dan', + dd : translate, + M : 'mjesec', + MM : translate, + y : 'godinu', + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return hr; + +}))); diff --git a/node_modules/moment/locale/hu.js b/node_modules/moment/locale/hu.js new file mode 100644 index 00000000..53e9bb6e --- /dev/null +++ b/node_modules/moment/locale/hu.js @@ -0,0 +1,109 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' '); + function translate(number, withoutSuffix, key, isFuture) { + var num = number; + switch (key) { + case 's': + return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce'; + case 'ss': + return num + (isFuture || withoutSuffix) ? ' másodperc' : ' másodperce'; + case 'm': + return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'mm': + return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'h': + return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'hh': + return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'd': + return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'dd': + return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'M': + return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'MM': + return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'y': + return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); + case 'yy': + return num + (isFuture || withoutSuffix ? ' év' : ' éve'); + } + return ''; + } + function week(isFuture) { + return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]'; + } + + var hu = moment.defineLocale('hu', { + months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'), + monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'), + weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'), + weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), + weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'YYYY.MM.DD.', + LL : 'YYYY. MMMM D.', + LLL : 'YYYY. MMMM D. H:mm', + LLLL : 'YYYY. MMMM D., dddd H:mm' + }, + meridiemParse: /de|du/i, + isPM: function (input) { + return input.charAt(1).toLowerCase() === 'u'; + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 12) { + return isLower === true ? 'de' : 'DE'; + } else { + return isLower === true ? 'du' : 'DU'; + } + }, + calendar : { + sameDay : '[ma] LT[-kor]', + nextDay : '[holnap] LT[-kor]', + nextWeek : function () { + return week.call(this, true); + }, + lastDay : '[tegnap] LT[-kor]', + lastWeek : function () { + return week.call(this, false); + }, + sameElse : 'L' + }, + relativeTime : { + future : '%s múlva', + past : '%s', + s : translate, + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return hu; + +}))); diff --git a/node_modules/moment/locale/hy-am.js b/node_modules/moment/locale/hy-am.js new file mode 100644 index 00000000..1be1d85f --- /dev/null +++ b/node_modules/moment/locale/hy-am.js @@ -0,0 +1,94 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var hyAm = moment.defineLocale('hy-am', { + months : { + format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'), + standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_') + }, + monthsShort : 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'), + weekdays : 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'), + weekdaysShort : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY թ.', + LLL : 'D MMMM YYYY թ., HH:mm', + LLLL : 'dddd, D MMMM YYYY թ., HH:mm' + }, + calendar : { + sameDay: '[այսօր] LT', + nextDay: '[վաղը] LT', + lastDay: '[երեկ] LT', + nextWeek: function () { + return 'dddd [օրը ժամը] LT'; + }, + lastWeek: function () { + return '[անցած] dddd [օրը ժամը] LT'; + }, + sameElse: 'L' + }, + relativeTime : { + future : '%s հետո', + past : '%s առաջ', + s : 'մի քանի վայրկյան', + ss : '%d վայրկյան', + m : 'րոպե', + mm : '%d րոպե', + h : 'ժամ', + hh : '%d ժամ', + d : 'օր', + dd : '%d օր', + M : 'ամիս', + MM : '%d ամիս', + y : 'տարի', + yy : '%d տարի' + }, + meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/, + isPM: function (input) { + return /^(ցերեկվա|երեկոյան)$/.test(input); + }, + meridiem : function (hour) { + if (hour < 4) { + return 'գիշերվա'; + } else if (hour < 12) { + return 'առավոտվա'; + } else if (hour < 17) { + return 'ցերեկվա'; + } else { + return 'երեկոյան'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/, + ordinal: function (number, period) { + switch (period) { + case 'DDD': + case 'w': + case 'W': + case 'DDDo': + if (number === 1) { + return number + '-ին'; + } + return number + '-րդ'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return hyAm; + +}))); diff --git a/node_modules/moment/locale/id.js b/node_modules/moment/locale/id.js new file mode 100644 index 00000000..c3e8b9e3 --- /dev/null +++ b/node_modules/moment/locale/id.js @@ -0,0 +1,81 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var id = moment.defineLocale('id', { + months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'), + weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), + weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), + weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /pagi|siang|sore|malam/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'siang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sore' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'siang'; + } else if (hours < 19) { + return 'sore'; + } else { + return 'malam'; + } + }, + calendar : { + sameDay : '[Hari ini pukul] LT', + nextDay : '[Besok pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kemarin pukul] LT', + lastWeek : 'dddd [lalu pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dalam %s', + past : '%s yang lalu', + s : 'beberapa detik', + ss : '%d detik', + m : 'semenit', + mm : '%d menit', + h : 'sejam', + hh : '%d jam', + d : 'sehari', + dd : '%d hari', + M : 'sebulan', + MM : '%d bulan', + y : 'setahun', + yy : '%d tahun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return id; + +}))); diff --git a/node_modules/moment/locale/is.js b/node_modules/moment/locale/is.js new file mode 100644 index 00000000..9856e927 --- /dev/null +++ b/node_modules/moment/locale/is.js @@ -0,0 +1,131 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function plural(n) { + if (n % 100 === 11) { + return true; + } else if (n % 10 === 1) { + return false; + } + return true; + } + function translate(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum'; + case 'ss': + if (plural(number)) { + return result + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum'); + } + return result + 'sekúnda'; + case 'm': + return withoutSuffix ? 'mínúta' : 'mínútu'; + case 'mm': + if (plural(number)) { + return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum'); + } else if (withoutSuffix) { + return result + 'mínúta'; + } + return result + 'mínútu'; + case 'hh': + if (plural(number)) { + return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum'); + } + return result + 'klukkustund'; + case 'd': + if (withoutSuffix) { + return 'dagur'; + } + return isFuture ? 'dag' : 'degi'; + case 'dd': + if (plural(number)) { + if (withoutSuffix) { + return result + 'dagar'; + } + return result + (isFuture ? 'daga' : 'dögum'); + } else if (withoutSuffix) { + return result + 'dagur'; + } + return result + (isFuture ? 'dag' : 'degi'); + case 'M': + if (withoutSuffix) { + return 'mánuður'; + } + return isFuture ? 'mánuð' : 'mánuði'; + case 'MM': + if (plural(number)) { + if (withoutSuffix) { + return result + 'mánuðir'; + } + return result + (isFuture ? 'mánuði' : 'mánuðum'); + } else if (withoutSuffix) { + return result + 'mánuður'; + } + return result + (isFuture ? 'mánuð' : 'mánuði'); + case 'y': + return withoutSuffix || isFuture ? 'ár' : 'ári'; + case 'yy': + if (plural(number)) { + return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); + } + return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); + } + } + + var is = moment.defineLocale('is', { + months : 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'), + monthsShort : 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'), + weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'), + weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'), + weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY [kl.] H:mm', + LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm' + }, + calendar : { + sameDay : '[í dag kl.] LT', + nextDay : '[á morgun kl.] LT', + nextWeek : 'dddd [kl.] LT', + lastDay : '[í gær kl.] LT', + lastWeek : '[síðasta] dddd [kl.] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'eftir %s', + past : 'fyrir %s síðan', + s : translate, + ss : translate, + m : translate, + mm : translate, + h : 'klukkustund', + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return is; + +}))); diff --git a/node_modules/moment/locale/it-ch.js b/node_modules/moment/locale/it-ch.js new file mode 100644 index 00000000..fcf2d4b0 --- /dev/null +++ b/node_modules/moment/locale/it-ch.js @@ -0,0 +1,68 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var itCh = moment.defineLocale('it-ch', { + months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), + monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'), + weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Oggi alle] LT', + nextDay: '[Domani alle] LT', + nextWeek: 'dddd [alle] LT', + lastDay: '[Ieri alle] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[la scorsa] dddd [alle] LT'; + default: + return '[lo scorso] dddd [alle] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : function (s) { + return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s; + }, + past : '%s fa', + s : 'alcuni secondi', + ss : '%d secondi', + m : 'un minuto', + mm : '%d minuti', + h : 'un\'ora', + hh : '%d ore', + d : 'un giorno', + dd : '%d giorni', + M : 'un mese', + MM : '%d mesi', + y : 'un anno', + yy : '%d anni' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return itCh; + +}))); diff --git a/node_modules/moment/locale/it.js b/node_modules/moment/locale/it.js new file mode 100644 index 00000000..f42ff8fa --- /dev/null +++ b/node_modules/moment/locale/it.js @@ -0,0 +1,68 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var it = moment.defineLocale('it', { + months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), + monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'), + weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Oggi alle] LT', + nextDay: '[Domani alle] LT', + nextWeek: 'dddd [alle] LT', + lastDay: '[Ieri alle] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[la scorsa] dddd [alle] LT'; + default: + return '[lo scorso] dddd [alle] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : function (s) { + return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s; + }, + past : '%s fa', + s : 'alcuni secondi', + ss : '%d secondi', + m : 'un minuto', + mm : '%d minuti', + h : 'un\'ora', + hh : '%d ore', + d : 'un giorno', + dd : '%d giorni', + M : 'un mese', + MM : '%d mesi', + y : 'un anno', + yy : '%d anni' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return it; + +}))); diff --git a/node_modules/moment/locale/ja.js b/node_modules/moment/locale/ja.js new file mode 100644 index 00000000..4e4efd6a --- /dev/null +++ b/node_modules/moment/locale/ja.js @@ -0,0 +1,91 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var ja = moment.defineLocale('ja', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'), + weekdaysShort : '日_月_火_水_木_金_土'.split('_'), + weekdaysMin : '日_月_火_水_木_金_土'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日 HH:mm', + LLLL : 'YYYY年M月D日 dddd HH:mm', + l : 'YYYY/MM/DD', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日(ddd) HH:mm' + }, + meridiemParse: /午前|午後/i, + isPM : function (input) { + return input === '午後'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return '午前'; + } else { + return '午後'; + } + }, + calendar : { + sameDay : '[今日] LT', + nextDay : '[明日] LT', + nextWeek : function (now) { + if (now.week() < this.week()) { + return '[来週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + lastDay : '[昨日] LT', + lastWeek : function (now) { + if (this.week() < now.week()) { + return '[先週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + sameElse : 'L' + }, + dayOfMonthOrdinalParse : /\d{1,2}日/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + default: + return number; + } + }, + relativeTime : { + future : '%s後', + past : '%s前', + s : '数秒', + ss : '%d秒', + m : '1分', + mm : '%d分', + h : '1時間', + hh : '%d時間', + d : '1日', + dd : '%d日', + M : '1ヶ月', + MM : '%dヶ月', + y : '1年', + yy : '%d年' + } + }); + + return ja; + +}))); diff --git a/node_modules/moment/locale/jv.js b/node_modules/moment/locale/jv.js new file mode 100644 index 00000000..b2bb4f41 --- /dev/null +++ b/node_modules/moment/locale/jv.js @@ -0,0 +1,81 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var jv = moment.defineLocale('jv', { + months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), + weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), + weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), + weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /enjing|siyang|sonten|ndalu/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'enjing') { + return hour; + } else if (meridiem === 'siyang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sonten' || meridiem === 'ndalu') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'enjing'; + } else if (hours < 15) { + return 'siyang'; + } else if (hours < 19) { + return 'sonten'; + } else { + return 'ndalu'; + } + }, + calendar : { + sameDay : '[Dinten puniko pukul] LT', + nextDay : '[Mbenjang pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kala wingi pukul] LT', + lastWeek : 'dddd [kepengker pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'wonten ing %s', + past : '%s ingkang kepengker', + s : 'sawetawis detik', + ss : '%d detik', + m : 'setunggal menit', + mm : '%d menit', + h : 'setunggal jam', + hh : '%d jam', + d : 'sedinten', + dd : '%d dinten', + M : 'sewulan', + MM : '%d wulan', + y : 'setaun', + yy : '%d taun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return jv; + +}))); diff --git a/node_modules/moment/locale/ka.js b/node_modules/moment/locale/ka.js new file mode 100644 index 00000000..0ec5eb24 --- /dev/null +++ b/node_modules/moment/locale/ka.js @@ -0,0 +1,88 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var ka = moment.defineLocale('ka', { + months : { + standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'), + format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_') + }, + monthsShort : 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'), + weekdays : { + standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'), + format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'), + isFormat: /(წინა|შემდეგ)/ + }, + weekdaysShort : 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'), + weekdaysMin : 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[დღეს] LT[-ზე]', + nextDay : '[ხვალ] LT[-ზე]', + lastDay : '[გუშინ] LT[-ზე]', + nextWeek : '[შემდეგ] dddd LT[-ზე]', + lastWeek : '[წინა] dddd LT-ზე', + sameElse : 'L' + }, + relativeTime : { + future : function (s) { + return (/(წამი|წუთი|საათი|წელი)/).test(s) ? + s.replace(/ი$/, 'ში') : + s + 'ში'; + }, + past : function (s) { + if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) { + return s.replace(/(ი|ე)$/, 'ის წინ'); + } + if ((/წელი/).test(s)) { + return s.replace(/წელი$/, 'წლის წინ'); + } + }, + s : 'რამდენიმე წამი', + ss : '%d წამი', + m : 'წუთი', + mm : '%d წუთი', + h : 'საათი', + hh : '%d საათი', + d : 'დღე', + dd : '%d დღე', + M : 'თვე', + MM : '%d თვე', + y : 'წელი', + yy : '%d წელი' + }, + dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/, + ordinal : function (number) { + if (number === 0) { + return number; + } + if (number === 1) { + return number + '-ლი'; + } + if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) { + return 'მე-' + number; + } + return number + '-ე'; + }, + week : { + dow : 1, + doy : 7 + } + }); + + return ka; + +}))); diff --git a/node_modules/moment/locale/kk.js b/node_modules/moment/locale/kk.js new file mode 100644 index 00000000..c468f670 --- /dev/null +++ b/node_modules/moment/locale/kk.js @@ -0,0 +1,86 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var suffixes = { + 0: '-ші', + 1: '-ші', + 2: '-ші', + 3: '-ші', + 4: '-ші', + 5: '-ші', + 6: '-шы', + 7: '-ші', + 8: '-ші', + 9: '-шы', + 10: '-шы', + 20: '-шы', + 30: '-шы', + 40: '-шы', + 50: '-ші', + 60: '-шы', + 70: '-ші', + 80: '-ші', + 90: '-шы', + 100: '-ші' + }; + + var kk = moment.defineLocale('kk', { + months : 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'), + monthsShort : 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'), + weekdays : 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'), + weekdaysShort : 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'), + weekdaysMin : 'жк_дй_сй_ср_бй_жм_сн'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Бүгін сағат] LT', + nextDay : '[Ертең сағат] LT', + nextWeek : 'dddd [сағат] LT', + lastDay : '[Кеше сағат] LT', + lastWeek : '[Өткен аптаның] dddd [сағат] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ішінде', + past : '%s бұрын', + s : 'бірнеше секунд', + ss : '%d секунд', + m : 'бір минут', + mm : '%d минут', + h : 'бір сағат', + hh : '%d сағат', + d : 'бір күн', + dd : '%d күн', + M : 'бір ай', + MM : '%d ай', + y : 'бір жыл', + yy : '%d жыл' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/, + ordinal : function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes[number] || suffixes[a] || suffixes[b]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return kk; + +}))); diff --git a/node_modules/moment/locale/km.js b/node_modules/moment/locale/km.js new file mode 100644 index 00000000..fee36238 --- /dev/null +++ b/node_modules/moment/locale/km.js @@ -0,0 +1,109 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '១', + '2': '២', + '3': '៣', + '4': '៤', + '5': '៥', + '6': '៦', + '7': '៧', + '8': '៨', + '9': '៩', + '0': '០' + }, numberMap = { + '១': '1', + '២': '2', + '៣': '3', + '៤': '4', + '៥': '5', + '៦': '6', + '៧': '7', + '៨': '8', + '៩': '9', + '០': '0' + }; + + var km = moment.defineLocale('km', { + months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), + weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + meridiemParse: /ព្រឹក|ល្ងាច/, + isPM: function (input) { + return input === 'ល្ងាច'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ព្រឹក'; + } else { + return 'ល្ងាច'; + } + }, + calendar: { + sameDay: '[ថ្ងៃនេះ ម៉ោង] LT', + nextDay: '[ស្អែក ម៉ោង] LT', + nextWeek: 'dddd [ម៉ោង] LT', + lastDay: '[ម្សិលមិញ ម៉ោង] LT', + lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', + sameElse: 'L' + }, + relativeTime: { + future: '%sទៀត', + past: '%sមុន', + s: 'ប៉ុន្មានវិនាទី', + ss: '%d វិនាទី', + m: 'មួយនាទី', + mm: '%d នាទី', + h: 'មួយម៉ោង', + hh: '%d ម៉ោង', + d: 'មួយថ្ងៃ', + dd: '%d ថ្ងៃ', + M: 'មួយខែ', + MM: '%d ខែ', + y: 'មួយឆ្នាំ', + yy: '%d ឆ្នាំ' + }, + dayOfMonthOrdinalParse : /ទី\d{1,2}/, + ordinal : 'ទី%d', + preparse: function (string) { + return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return km; + +}))); diff --git a/node_modules/moment/locale/kn.js b/node_modules/moment/locale/kn.js new file mode 100644 index 00000000..8d0ae9d8 --- /dev/null +++ b/node_modules/moment/locale/kn.js @@ -0,0 +1,125 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '೧', + '2': '೨', + '3': '೩', + '4': '೪', + '5': '೫', + '6': '೬', + '7': '೭', + '8': '೮', + '9': '೯', + '0': '೦' + }, + numberMap = { + '೧': '1', + '೨': '2', + '೩': '3', + '೪': '4', + '೫': '5', + '೬': '6', + '೭': '7', + '೮': '8', + '೯': '9', + '೦': '0' + }; + + var kn = moment.defineLocale('kn', { + months : 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'), + monthsShort : 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split('_'), + monthsParseExact: true, + weekdays : 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'), + weekdaysShort : 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'), + weekdaysMin : 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm', + LLLL : 'dddd, D MMMM YYYY, A h:mm' + }, + calendar : { + sameDay : '[ಇಂದು] LT', + nextDay : '[ನಾಳೆ] LT', + nextWeek : 'dddd, LT', + lastDay : '[ನಿನ್ನೆ] LT', + lastWeek : '[ಕೊನೆಯ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ನಂತರ', + past : '%s ಹಿಂದೆ', + s : 'ಕೆಲವು ಕ್ಷಣಗಳು', + ss : '%d ಸೆಕೆಂಡುಗಳು', + m : 'ಒಂದು ನಿಮಿಷ', + mm : '%d ನಿಮಿಷ', + h : 'ಒಂದು ಗಂಟೆ', + hh : '%d ಗಂಟೆ', + d : 'ಒಂದು ದಿನ', + dd : '%d ದಿನ', + M : 'ಒಂದು ತಿಂಗಳು', + MM : '%d ತಿಂಗಳು', + y : 'ಒಂದು ವರ್ಷ', + yy : '%d ವರ್ಷ' + }, + preparse: function (string) { + return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ರಾತ್ರಿ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') { + return hour; + } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ಸಂಜೆ') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ರಾತ್ರಿ'; + } else if (hour < 10) { + return 'ಬೆಳಿಗ್ಗೆ'; + } else if (hour < 17) { + return 'ಮಧ್ಯಾಹ್ನ'; + } else if (hour < 20) { + return 'ಸಂಜೆ'; + } else { + return 'ರಾತ್ರಿ'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/, + ordinal : function (number) { + return number + 'ನೇ'; + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + return kn; + +}))); diff --git a/node_modules/moment/locale/ko.js b/node_modules/moment/locale/ko.js new file mode 100644 index 00000000..40f1bb5d --- /dev/null +++ b/node_modules/moment/locale/ko.js @@ -0,0 +1,80 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var ko = moment.defineLocale('ko', { + months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), + monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), + weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'), + weekdaysShort : '일_월_화_수_목_금_토'.split('_'), + weekdaysMin : '일_월_화_수_목_금_토'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'YYYY.MM.DD.', + LL : 'YYYY년 MMMM D일', + LLL : 'YYYY년 MMMM D일 A h:mm', + LLLL : 'YYYY년 MMMM D일 dddd A h:mm', + l : 'YYYY.MM.DD.', + ll : 'YYYY년 MMMM D일', + lll : 'YYYY년 MMMM D일 A h:mm', + llll : 'YYYY년 MMMM D일 dddd A h:mm' + }, + calendar : { + sameDay : '오늘 LT', + nextDay : '내일 LT', + nextWeek : 'dddd LT', + lastDay : '어제 LT', + lastWeek : '지난주 dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s 후', + past : '%s 전', + s : '몇 초', + ss : '%d초', + m : '1분', + mm : '%d분', + h : '한 시간', + hh : '%d시간', + d : '하루', + dd : '%d일', + M : '한 달', + MM : '%d달', + y : '일 년', + yy : '%d년' + }, + dayOfMonthOrdinalParse : /\d{1,2}(일|월|주)/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '일'; + case 'M': + return number + '월'; + case 'w': + case 'W': + return number + '주'; + default: + return number; + } + }, + meridiemParse : /오전|오후/, + isPM : function (token) { + return token === '오후'; + }, + meridiem : function (hour, minute, isUpper) { + return hour < 12 ? '오전' : '오후'; + } + }); + + return ko; + +}))); diff --git a/node_modules/moment/locale/ku.js b/node_modules/moment/locale/ku.js new file mode 100644 index 00000000..05b9dbe2 --- /dev/null +++ b/node_modules/moment/locale/ku.js @@ -0,0 +1,118 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠' + }, numberMap = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0' + }, + months = [ + 'کانونی دووەم', + 'شوبات', + 'ئازار', + 'نیسان', + 'ئایار', + 'حوزەیران', + 'تەمموز', + 'ئاب', + 'ئەیلوول', + 'تشرینی یەكەم', + 'تشرینی دووەم', + 'كانونی یەکەم' + ]; + + + var ku = moment.defineLocale('ku', { + months : months, + monthsShort : months, + weekdays : 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split('_'), + weekdaysShort : 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'), + weekdaysMin : 'ی_د_س_چ_پ_ه_ش'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + meridiemParse: /ئێواره‌|به‌یانی/, + isPM: function (input) { + return /ئێواره‌/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'به‌یانی'; + } else { + return 'ئێواره‌'; + } + }, + calendar : { + sameDay : '[ئه‌مرۆ كاتژمێر] LT', + nextDay : '[به‌یانی كاتژمێر] LT', + nextWeek : 'dddd [كاتژمێر] LT', + lastDay : '[دوێنێ كاتژمێر] LT', + lastWeek : 'dddd [كاتژمێر] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'له‌ %s', + past : '%s', + s : 'چه‌ند چركه‌یه‌ك', + ss : 'چركه‌ %d', + m : 'یه‌ك خوله‌ك', + mm : '%d خوله‌ك', + h : 'یه‌ك كاتژمێر', + hh : '%d كاتژمێر', + d : 'یه‌ك ڕۆژ', + dd : '%d ڕۆژ', + M : 'یه‌ك مانگ', + MM : '%d مانگ', + y : 'یه‌ك ساڵ', + yy : '%d ساڵ' + }, + preparse: function (string) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + return ku; + +}))); diff --git a/node_modules/moment/locale/ky.js b/node_modules/moment/locale/ky.js new file mode 100644 index 00000000..8bd29a36 --- /dev/null +++ b/node_modules/moment/locale/ky.js @@ -0,0 +1,86 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var suffixes = { + 0: '-чү', + 1: '-чи', + 2: '-чи', + 3: '-чү', + 4: '-чү', + 5: '-чи', + 6: '-чы', + 7: '-чи', + 8: '-чи', + 9: '-чу', + 10: '-чу', + 20: '-чы', + 30: '-чу', + 40: '-чы', + 50: '-чү', + 60: '-чы', + 70: '-чи', + 80: '-чи', + 90: '-чу', + 100: '-чү' + }; + + var ky = moment.defineLocale('ky', { + months : 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'), + monthsShort : 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'), + weekdays : 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'), + weekdaysShort : 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'), + weekdaysMin : 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Бүгүн саат] LT', + nextDay : '[Эртең саат] LT', + nextWeek : 'dddd [саат] LT', + lastDay : '[Кечээ саат] LT', + lastWeek : '[Өткөн аптанын] dddd [күнү] [саат] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ичинде', + past : '%s мурун', + s : 'бирнече секунд', + ss : '%d секунд', + m : 'бир мүнөт', + mm : '%d мүнөт', + h : 'бир саат', + hh : '%d саат', + d : 'бир күн', + dd : '%d күн', + M : 'бир ай', + MM : '%d ай', + y : 'бир жыл', + yy : '%d жыл' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/, + ordinal : function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes[number] || suffixes[a] || suffixes[b]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return ky; + +}))); diff --git a/node_modules/moment/locale/lb.js b/node_modules/moment/locale/lb.js new file mode 100644 index 00000000..599a6e58 --- /dev/null +++ b/node_modules/moment/locale/lb.js @@ -0,0 +1,135 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eng Minutt', 'enger Minutt'], + 'h': ['eng Stonn', 'enger Stonn'], + 'd': ['een Dag', 'engem Dag'], + 'M': ['ee Mount', 'engem Mount'], + 'y': ['ee Joer', 'engem Joer'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + function processFutureTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'a ' + string; + } + return 'an ' + string; + } + function processPastTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'viru ' + string; + } + return 'virun ' + string; + } + /** + * Returns true if the word before the given number loses the '-n' ending. + * e.g. 'an 10 Deeg' but 'a 5 Deeg' + * + * @param number {integer} + * @returns {boolean} + */ + function eifelerRegelAppliesToNumber(number) { + number = parseInt(number, 10); + if (isNaN(number)) { + return false; + } + if (number < 0) { + // Negative Number --> always true + return true; + } else if (number < 10) { + // Only 1 digit + if (4 <= number && number <= 7) { + return true; + } + return false; + } else if (number < 100) { + // 2 digits + var lastDigit = number % 10, firstDigit = number / 10; + if (lastDigit === 0) { + return eifelerRegelAppliesToNumber(firstDigit); + } + return eifelerRegelAppliesToNumber(lastDigit); + } else if (number < 10000) { + // 3 or 4 digits --> recursively check first digit + while (number >= 10) { + number = number / 10; + } + return eifelerRegelAppliesToNumber(number); + } else { + // Anything larger than 4 digits: recursively check first n-3 digits + number = number / 1000; + return eifelerRegelAppliesToNumber(number); + } + } + + var lb = moment.defineLocale('lb', { + months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'), + weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm [Auer]', + LTS: 'H:mm:ss [Auer]', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm [Auer]', + LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]' + }, + calendar: { + sameDay: '[Haut um] LT', + sameElse: 'L', + nextDay: '[Muer um] LT', + nextWeek: 'dddd [um] LT', + lastDay: '[Gëschter um] LT', + lastWeek: function () { + // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule + switch (this.day()) { + case 2: + case 4: + return '[Leschten] dddd [um] LT'; + default: + return '[Leschte] dddd [um] LT'; + } + } + }, + relativeTime : { + future : processFutureTime, + past : processPastTime, + s : 'e puer Sekonnen', + ss : '%d Sekonnen', + m : processRelativeTime, + mm : '%d Minutten', + h : processRelativeTime, + hh : '%d Stonnen', + d : processRelativeTime, + dd : '%d Deeg', + M : processRelativeTime, + MM : '%d Méint', + y : processRelativeTime, + yy : '%d Joer' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return lb; + +}))); diff --git a/node_modules/moment/locale/lo.js b/node_modules/moment/locale/lo.js new file mode 100644 index 00000000..7cd6cfc8 --- /dev/null +++ b/node_modules/moment/locale/lo.js @@ -0,0 +1,69 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var lo = moment.defineLocale('lo', { + months : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), + monthsShort : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), + weekdays : 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysShort : 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysMin : 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'ວັນdddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/, + isPM: function (input) { + return input === 'ຕອນແລງ'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ຕອນເຊົ້າ'; + } else { + return 'ຕອນແລງ'; + } + }, + calendar : { + sameDay : '[ມື້ນີ້ເວລາ] LT', + nextDay : '[ມື້ອື່ນເວລາ] LT', + nextWeek : '[ວັນ]dddd[ໜ້າເວລາ] LT', + lastDay : '[ມື້ວານນີ້ເວລາ] LT', + lastWeek : '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ອີກ %s', + past : '%sຜ່ານມາ', + s : 'ບໍ່ເທົ່າໃດວິນາທີ', + ss : '%d ວິນາທີ' , + m : '1 ນາທີ', + mm : '%d ນາທີ', + h : '1 ຊົ່ວໂມງ', + hh : '%d ຊົ່ວໂມງ', + d : '1 ມື້', + dd : '%d ມື້', + M : '1 ເດືອນ', + MM : '%d ເດືອນ', + y : '1 ປີ', + yy : '%d ປີ' + }, + dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/, + ordinal : function (number) { + return 'ທີ່' + number; + } + }); + + return lo; + +}))); diff --git a/node_modules/moment/locale/lt.js b/node_modules/moment/locale/lt.js new file mode 100644 index 00000000..bc7d7e7a --- /dev/null +++ b/node_modules/moment/locale/lt.js @@ -0,0 +1,117 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var units = { + 'ss' : 'sekundė_sekundžių_sekundes', + 'm' : 'minutė_minutės_minutę', + 'mm': 'minutės_minučių_minutes', + 'h' : 'valanda_valandos_valandą', + 'hh': 'valandos_valandų_valandas', + 'd' : 'diena_dienos_dieną', + 'dd': 'dienos_dienų_dienas', + 'M' : 'mėnuo_mėnesio_mėnesį', + 'MM': 'mėnesiai_mėnesių_mėnesius', + 'y' : 'metai_metų_metus', + 'yy': 'metai_metų_metus' + }; + function translateSeconds(number, withoutSuffix, key, isFuture) { + if (withoutSuffix) { + return 'kelios sekundės'; + } else { + return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; + } + } + function translateSingular(number, withoutSuffix, key, isFuture) { + return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]); + } + function special(number) { + return number % 10 === 0 || (number > 10 && number < 20); + } + function forms(key) { + return units[key].split('_'); + } + function translate(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + if (number === 1) { + return result + translateSingular(number, withoutSuffix, key[0], isFuture); + } else if (withoutSuffix) { + return result + (special(number) ? forms(key)[1] : forms(key)[0]); + } else { + if (isFuture) { + return result + forms(key)[1]; + } else { + return result + (special(number) ? forms(key)[1] : forms(key)[2]); + } + } + } + var lt = moment.defineLocale('lt', { + months : { + format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'), + standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'), + isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/ + }, + monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), + weekdays : { + format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'), + standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'), + isFormat: /dddd HH:mm/ + }, + weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'), + weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'YYYY [m.] MMMM D [d.]', + LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', + l : 'YYYY-MM-DD', + ll : 'YYYY [m.] MMMM D [d.]', + lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]' + }, + calendar : { + sameDay : '[Šiandien] LT', + nextDay : '[Rytoj] LT', + nextWeek : 'dddd LT', + lastDay : '[Vakar] LT', + lastWeek : '[Praėjusį] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : 'po %s', + past : 'prieš %s', + s : translateSeconds, + ss : translate, + m : translateSingular, + mm : translate, + h : translateSingular, + hh : translate, + d : translateSingular, + dd : translate, + M : translateSingular, + MM : translate, + y : translateSingular, + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}-oji/, + ordinal : function (number) { + return number + '-oji'; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return lt; + +}))); diff --git a/node_modules/moment/locale/lv.js b/node_modules/moment/locale/lv.js new file mode 100644 index 00000000..b5b8ea84 --- /dev/null +++ b/node_modules/moment/locale/lv.js @@ -0,0 +1,96 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var units = { + 'ss': 'sekundes_sekundēm_sekunde_sekundes'.split('_'), + 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), + 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), + 'h': 'stundas_stundām_stunda_stundas'.split('_'), + 'hh': 'stundas_stundām_stunda_stundas'.split('_'), + 'd': 'dienas_dienām_diena_dienas'.split('_'), + 'dd': 'dienas_dienām_diena_dienas'.split('_'), + 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + 'y': 'gada_gadiem_gads_gadi'.split('_'), + 'yy': 'gada_gadiem_gads_gadi'.split('_') + }; + /** + * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. + */ + function format(forms, number, withoutSuffix) { + if (withoutSuffix) { + // E.g. "21 minūte", "3 minūtes". + return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3]; + } else { + // E.g. "21 minūtes" as in "pēc 21 minūtes". + // E.g. "3 minūtēm" as in "pēc 3 minūtēm". + return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1]; + } + } + function relativeTimeWithPlural(number, withoutSuffix, key) { + return number + ' ' + format(units[key], number, withoutSuffix); + } + function relativeTimeWithSingular(number, withoutSuffix, key) { + return format(units[key], number, withoutSuffix); + } + function relativeSeconds(number, withoutSuffix) { + return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm'; + } + + var lv = moment.defineLocale('lv', { + months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'), + monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'), + weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'), + weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY.', + LL : 'YYYY. [gada] D. MMMM', + LLL : 'YYYY. [gada] D. MMMM, HH:mm', + LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm' + }, + calendar : { + sameDay : '[Šodien pulksten] LT', + nextDay : '[Rīt pulksten] LT', + nextWeek : 'dddd [pulksten] LT', + lastDay : '[Vakar pulksten] LT', + lastWeek : '[Pagājušā] dddd [pulksten] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'pēc %s', + past : 'pirms %s', + s : relativeSeconds, + ss : relativeTimeWithPlural, + m : relativeTimeWithSingular, + mm : relativeTimeWithPlural, + h : relativeTimeWithSingular, + hh : relativeTimeWithPlural, + d : relativeTimeWithSingular, + dd : relativeTimeWithPlural, + M : relativeTimeWithSingular, + MM : relativeTimeWithPlural, + y : relativeTimeWithSingular, + yy : relativeTimeWithPlural + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return lv; + +}))); diff --git a/node_modules/moment/locale/me.js b/node_modules/moment/locale/me.js new file mode 100644 index 00000000..6608d095 --- /dev/null +++ b/node_modules/moment/locale/me.js @@ -0,0 +1,111 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var translator = { + words: { //Different grammatical cases + ss: ['sekund', 'sekunda', 'sekundi'], + m: ['jedan minut', 'jednog minuta'], + mm: ['minut', 'minuta', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mjesec', 'mjeseca', 'mjeseci'], + yy: ['godina', 'godine', 'godina'] + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return number + ' ' + translator.correctGrammaticalCase(number, wordKey); + } + } + }; + + var me = moment.defineLocale('me', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), + monthsParseExact : true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm', + LTS : 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sjutra u] LT', + + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[juče u] LT', + lastWeek : function () { + var lastWeekDays = [ + '[prošle] [nedjelje] [u] LT', + '[prošlog] [ponedjeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srijede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT' + ]; + return lastWeekDays[this.day()]; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'prije %s', + s : 'nekoliko sekundi', + ss : translator.translate, + m : translator.translate, + mm : translator.translate, + h : translator.translate, + hh : translator.translate, + d : 'dan', + dd : translator.translate, + M : 'mjesec', + MM : translator.translate, + y : 'godinu', + yy : translator.translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return me; + +}))); diff --git a/node_modules/moment/locale/mi.js b/node_modules/moment/locale/mi.js new file mode 100644 index 00000000..29f1c7a3 --- /dev/null +++ b/node_modules/moment/locale/mi.js @@ -0,0 +1,63 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var mi = moment.defineLocale('mi', { + months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'), + monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'), + monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i, + weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'), + weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [i] HH:mm', + LLLL: 'dddd, D MMMM YYYY [i] HH:mm' + }, + calendar: { + sameDay: '[i teie mahana, i] LT', + nextDay: '[apopo i] LT', + nextWeek: 'dddd [i] LT', + lastDay: '[inanahi i] LT', + lastWeek: 'dddd [whakamutunga i] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'i roto i %s', + past: '%s i mua', + s: 'te hēkona ruarua', + ss: '%d hēkona', + m: 'he meneti', + mm: '%d meneti', + h: 'te haora', + hh: '%d haora', + d: 'he ra', + dd: '%d ra', + M: 'he marama', + MM: '%d marama', + y: 'he tau', + yy: '%d tau' + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return mi; + +}))); diff --git a/node_modules/moment/locale/mk.js b/node_modules/moment/locale/mk.js new file mode 100644 index 00000000..051f683f --- /dev/null +++ b/node_modules/moment/locale/mk.js @@ -0,0 +1,89 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var mk = moment.defineLocale('mk', { + months : 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'), + monthsShort : 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'), + weekdays : 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'), + weekdaysShort : 'нед_пон_вто_сре_чет_пет_саб'.split('_'), + weekdaysMin : 'нe_пo_вт_ср_че_пе_сa'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'D.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY H:mm', + LLLL : 'dddd, D MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[Денес во] LT', + nextDay : '[Утре во] LT', + nextWeek : '[Во] dddd [во] LT', + lastDay : '[Вчера во] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[Изминатата] dddd [во] LT'; + case 1: + case 2: + case 4: + case 5: + return '[Изминатиот] dddd [во] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'после %s', + past : 'пред %s', + s : 'неколку секунди', + ss : '%d секунди', + m : 'минута', + mm : '%d минути', + h : 'час', + hh : '%d часа', + d : 'ден', + dd : '%d дена', + M : 'месец', + MM : '%d месеци', + y : 'година', + yy : '%d години' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal : function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return mk; + +}))); diff --git a/node_modules/moment/locale/ml.js b/node_modules/moment/locale/ml.js new file mode 100644 index 00000000..806db47b --- /dev/null +++ b/node_modules/moment/locale/ml.js @@ -0,0 +1,80 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var ml = moment.defineLocale('ml', { + months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'), + monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'), + monthsParseExact : true, + weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'), + weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'), + weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), + longDateFormat : { + LT : 'A h:mm -നു', + LTS : 'A h:mm:ss -നു', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm -നു', + LLLL : 'dddd, D MMMM YYYY, A h:mm -നു' + }, + calendar : { + sameDay : '[ഇന്ന്] LT', + nextDay : '[നാളെ] LT', + nextWeek : 'dddd, LT', + lastDay : '[ഇന്നലെ] LT', + lastWeek : '[കഴിഞ്ഞ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s കഴിഞ്ഞ്', + past : '%s മുൻപ്', + s : 'അൽപ നിമിഷങ്ങൾ', + ss : '%d സെക്കൻഡ്', + m : 'ഒരു മിനിറ്റ്', + mm : '%d മിനിറ്റ്', + h : 'ഒരു മണിക്കൂർ', + hh : '%d മണിക്കൂർ', + d : 'ഒരു ദിവസം', + dd : '%d ദിവസം', + M : 'ഒരു മാസം', + MM : '%d മാസം', + y : 'ഒരു വർഷം', + yy : '%d വർഷം' + }, + meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ((meridiem === 'രാത്രി' && hour >= 4) || + meridiem === 'ഉച്ച കഴിഞ്ഞ്' || + meridiem === 'വൈകുന്നേരം') { + return hour + 12; + } else { + return hour; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'രാത്രി'; + } else if (hour < 12) { + return 'രാവിലെ'; + } else if (hour < 17) { + return 'ഉച്ച കഴിഞ്ഞ്'; + } else if (hour < 20) { + return 'വൈകുന്നേരം'; + } else { + return 'രാത്രി'; + } + } + }); + + return ml; + +}))); diff --git a/node_modules/moment/locale/mn.js b/node_modules/moment/locale/mn.js new file mode 100644 index 00000000..f4b95c81 --- /dev/null +++ b/node_modules/moment/locale/mn.js @@ -0,0 +1,103 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function translate(number, withoutSuffix, key, isFuture) { + switch (key) { + case 's': + return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын'; + case 'ss': + return number + (withoutSuffix ? ' секунд' : ' секундын'); + case 'm': + case 'mm': + return number + (withoutSuffix ? ' минут' : ' минутын'); + case 'h': + case 'hh': + return number + (withoutSuffix ? ' цаг' : ' цагийн'); + case 'd': + case 'dd': + return number + (withoutSuffix ? ' өдөр' : ' өдрийн'); + case 'M': + case 'MM': + return number + (withoutSuffix ? ' сар' : ' сарын'); + case 'y': + case 'yy': + return number + (withoutSuffix ? ' жил' : ' жилийн'); + default: + return number; + } + } + + var mn = moment.defineLocale('mn', { + months : 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split('_'), + monthsShort : '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split('_'), + monthsParseExact : true, + weekdays : 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'), + weekdaysShort : 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'), + weekdaysMin : 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'YYYY оны MMMMын D', + LLL : 'YYYY оны MMMMын D HH:mm', + LLLL : 'dddd, YYYY оны MMMMын D HH:mm' + }, + meridiemParse: /ҮӨ|ҮХ/i, + isPM : function (input) { + return input === 'ҮХ'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ҮӨ'; + } else { + return 'ҮХ'; + } + }, + calendar : { + sameDay : '[Өнөөдөр] LT', + nextDay : '[Маргааш] LT', + nextWeek : '[Ирэх] dddd LT', + lastDay : '[Өчигдөр] LT', + lastWeek : '[Өнгөрсөн] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s дараа', + past : '%s өмнө', + s : translate, + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2} өдөр/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + ' өдөр'; + default: + return number; + } + } + }); + + return mn; + +}))); diff --git a/node_modules/moment/locale/mr.js b/node_modules/moment/locale/mr.js new file mode 100644 index 00000000..984559fd --- /dev/null +++ b/node_modules/moment/locale/mr.js @@ -0,0 +1,159 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०' + }, + numberMap = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0' + }; + + function relativeTimeMr(number, withoutSuffix, string, isFuture) + { + var output = ''; + if (withoutSuffix) { + switch (string) { + case 's': output = 'काही सेकंद'; break; + case 'ss': output = '%d सेकंद'; break; + case 'm': output = 'एक मिनिट'; break; + case 'mm': output = '%d मिनिटे'; break; + case 'h': output = 'एक तास'; break; + case 'hh': output = '%d तास'; break; + case 'd': output = 'एक दिवस'; break; + case 'dd': output = '%d दिवस'; break; + case 'M': output = 'एक महिना'; break; + case 'MM': output = '%d महिने'; break; + case 'y': output = 'एक वर्ष'; break; + case 'yy': output = '%d वर्षे'; break; + } + } + else { + switch (string) { + case 's': output = 'काही सेकंदां'; break; + case 'ss': output = '%d सेकंदां'; break; + case 'm': output = 'एका मिनिटा'; break; + case 'mm': output = '%d मिनिटां'; break; + case 'h': output = 'एका तासा'; break; + case 'hh': output = '%d तासां'; break; + case 'd': output = 'एका दिवसा'; break; + case 'dd': output = '%d दिवसां'; break; + case 'M': output = 'एका महिन्या'; break; + case 'MM': output = '%d महिन्यां'; break; + case 'y': output = 'एका वर्षा'; break; + case 'yy': output = '%d वर्षां'; break; + } + } + return output.replace(/%d/i, number); + } + + var mr = moment.defineLocale('mr', { + months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'), + monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'), + monthsParseExact : true, + weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat : { + LT : 'A h:mm वाजता', + LTS : 'A h:mm:ss वाजता', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm वाजता', + LLLL : 'dddd, D MMMM YYYY, A h:mm वाजता' + }, + calendar : { + sameDay : '[आज] LT', + nextDay : '[उद्या] LT', + nextWeek : 'dddd, LT', + lastDay : '[काल] LT', + lastWeek: '[मागील] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future: '%sमध्ये', + past: '%sपूर्वी', + s: relativeTimeMr, + ss: relativeTimeMr, + m: relativeTimeMr, + mm: relativeTimeMr, + h: relativeTimeMr, + hh: relativeTimeMr, + d: relativeTimeMr, + dd: relativeTimeMr, + M: relativeTimeMr, + MM: relativeTimeMr, + y: relativeTimeMr, + yy: relativeTimeMr + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'रात्री') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सकाळी') { + return hour; + } else if (meridiem === 'दुपारी') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'सायंकाळी') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'रात्री'; + } else if (hour < 10) { + return 'सकाळी'; + } else if (hour < 17) { + return 'दुपारी'; + } else if (hour < 20) { + return 'सायंकाळी'; + } else { + return 'रात्री'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + return mr; + +}))); diff --git a/node_modules/moment/locale/ms-my.js b/node_modules/moment/locale/ms-my.js new file mode 100644 index 00000000..92014be2 --- /dev/null +++ b/node_modules/moment/locale/ms-my.js @@ -0,0 +1,81 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var msMy = moment.defineLocale('ms-my', { + months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), + monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar : { + sameDay : '[Hari ini pukul] LT', + nextDay : '[Esok pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kelmarin pukul] LT', + lastWeek : 'dddd [lepas pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dalam %s', + past : '%s yang lepas', + s : 'beberapa saat', + ss : '%d saat', + m : 'seminit', + mm : '%d minit', + h : 'sejam', + hh : '%d jam', + d : 'sehari', + dd : '%d hari', + M : 'sebulan', + MM : '%d bulan', + y : 'setahun', + yy : '%d tahun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return msMy; + +}))); diff --git a/node_modules/moment/locale/ms.js b/node_modules/moment/locale/ms.js new file mode 100644 index 00000000..b499b5c5 --- /dev/null +++ b/node_modules/moment/locale/ms.js @@ -0,0 +1,81 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var ms = moment.defineLocale('ms', { + months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), + monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar : { + sameDay : '[Hari ini pukul] LT', + nextDay : '[Esok pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kelmarin pukul] LT', + lastWeek : 'dddd [lepas pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dalam %s', + past : '%s yang lepas', + s : 'beberapa saat', + ss : '%d saat', + m : 'seminit', + mm : '%d minit', + h : 'sejam', + hh : '%d jam', + d : 'sehari', + dd : '%d hari', + M : 'sebulan', + MM : '%d bulan', + y : 'setahun', + yy : '%d tahun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return ms; + +}))); diff --git a/node_modules/moment/locale/mt.js b/node_modules/moment/locale/mt.js new file mode 100644 index 00000000..4a34c5de --- /dev/null +++ b/node_modules/moment/locale/mt.js @@ -0,0 +1,59 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var mt = moment.defineLocale('mt', { + months : 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split('_'), + monthsShort : 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'), + weekdays : 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split('_'), + weekdaysShort : 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'), + weekdaysMin : 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Illum fil-]LT', + nextDay : '[Għada fil-]LT', + nextWeek : 'dddd [fil-]LT', + lastDay : '[Il-bieraħ fil-]LT', + lastWeek : 'dddd [li għadda] [fil-]LT', + sameElse : 'L' + }, + relativeTime : { + future : 'f’ %s', + past : '%s ilu', + s : 'ftit sekondi', + ss : '%d sekondi', + m : 'minuta', + mm : '%d minuti', + h : 'siegħa', + hh : '%d siegħat', + d : 'ġurnata', + dd : '%d ġranet', + M : 'xahar', + MM : '%d xhur', + y : 'sena', + yy : '%d sni' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return mt; + +}))); diff --git a/node_modules/moment/locale/my.js b/node_modules/moment/locale/my.js new file mode 100644 index 00000000..ca3102a4 --- /dev/null +++ b/node_modules/moment/locale/my.js @@ -0,0 +1,92 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '၁', + '2': '၂', + '3': '၃', + '4': '၄', + '5': '၅', + '6': '၆', + '7': '၇', + '8': '၈', + '9': '၉', + '0': '၀' + }, numberMap = { + '၁': '1', + '၂': '2', + '၃': '3', + '၄': '4', + '၅': '5', + '၆': '6', + '၇': '7', + '၈': '8', + '၉': '9', + '၀': '0' + }; + + var my = moment.defineLocale('my', { + months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'), + monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'), + weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'), + weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[ယနေ.] LT [မှာ]', + nextDay: '[မနက်ဖြန်] LT [မှာ]', + nextWeek: 'dddd LT [မှာ]', + lastDay: '[မနေ.က] LT [မှာ]', + lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]', + sameElse: 'L' + }, + relativeTime: { + future: 'လာမည့် %s မှာ', + past: 'လွန်ခဲ့သော %s က', + s: 'စက္ကန်.အနည်းငယ်', + ss : '%d စက္ကန့်', + m: 'တစ်မိနစ်', + mm: '%d မိနစ်', + h: 'တစ်နာရီ', + hh: '%d နာရီ', + d: 'တစ်ရက်', + dd: '%d ရက်', + M: 'တစ်လ', + MM: '%d လ', + y: 'တစ်နှစ်', + yy: '%d နှစ်' + }, + preparse: function (string) { + return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return my; + +}))); diff --git a/node_modules/moment/locale/nb.js b/node_modules/moment/locale/nb.js new file mode 100644 index 00000000..f2298104 --- /dev/null +++ b/node_modules/moment/locale/nb.js @@ -0,0 +1,61 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var nb = moment.defineLocale('nb', { + months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + monthsShort : 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'), + monthsParseExact : true, + weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort : 'sø._ma._ti._on._to._fr._lø.'.split('_'), + weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY [kl.] HH:mm', + LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm' + }, + calendar : { + sameDay: '[i dag kl.] LT', + nextDay: '[i morgen kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[i går kl.] LT', + lastWeek: '[forrige] dddd [kl.] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'om %s', + past : '%s siden', + s : 'noen sekunder', + ss : '%d sekunder', + m : 'ett minutt', + mm : '%d minutter', + h : 'en time', + hh : '%d timer', + d : 'en dag', + dd : '%d dager', + M : 'en måned', + MM : '%d måneder', + y : 'ett år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return nb; + +}))); diff --git a/node_modules/moment/locale/ne.js b/node_modules/moment/locale/ne.js new file mode 100644 index 00000000..21c03a85 --- /dev/null +++ b/node_modules/moment/locale/ne.js @@ -0,0 +1,122 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०' + }, + numberMap = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0' + }; + + var ne = moment.defineLocale('ne', { + months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'), + monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'), + monthsParseExact : true, + weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'), + weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'), + weekdaysMin : 'आ._सो._मं._बु._बि._शु._श.'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'Aको h:mm बजे', + LTS : 'Aको h:mm:ss बजे', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, Aको h:mm बजे', + LLLL : 'dddd, D MMMM YYYY, Aको h:mm बजे' + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + meridiemParse: /राति|बिहान|दिउँसो|साँझ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'राति') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'बिहान') { + return hour; + } else if (meridiem === 'दिउँसो') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'साँझ') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 3) { + return 'राति'; + } else if (hour < 12) { + return 'बिहान'; + } else if (hour < 16) { + return 'दिउँसो'; + } else if (hour < 20) { + return 'साँझ'; + } else { + return 'राति'; + } + }, + calendar : { + sameDay : '[आज] LT', + nextDay : '[भोलि] LT', + nextWeek : '[आउँदो] dddd[,] LT', + lastDay : '[हिजो] LT', + lastWeek : '[गएको] dddd[,] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%sमा', + past : '%s अगाडि', + s : 'केही क्षण', + ss : '%d सेकेण्ड', + m : 'एक मिनेट', + mm : '%d मिनेट', + h : 'एक घण्टा', + hh : '%d घण्टा', + d : 'एक दिन', + dd : '%d दिन', + M : 'एक महिना', + MM : '%d महिना', + y : 'एक बर्ष', + yy : '%d बर्ष' + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + return ne; + +}))); diff --git a/node_modules/moment/locale/nl-be.js b/node_modules/moment/locale/nl-be.js new file mode 100644 index 00000000..479e2913 --- /dev/null +++ b/node_modules/moment/locale/nl-be.js @@ -0,0 +1,86 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), + monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'); + + var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i]; + var monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + + var nlBe = moment.defineLocale('nl-be', { + months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortWithDots; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots[m.month()]; + } else { + return monthsShortWithDots[m.month()]; + } + }, + + monthsRegex: monthsRegex, + monthsShortRegex: monthsRegex, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse : monthsParse, + longMonthsParse : monthsParse, + shortMonthsParse : monthsParse, + + weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), + weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'over %s', + past : '%s geleden', + s : 'een paar seconden', + ss : '%d seconden', + m : 'één minuut', + mm : '%d minuten', + h : 'één uur', + hh : '%d uur', + d : 'één dag', + dd : '%d dagen', + M : 'één maand', + MM : '%d maanden', + y : 'één jaar', + yy : '%d jaar' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return nlBe; + +}))); diff --git a/node_modules/moment/locale/nl.js b/node_modules/moment/locale/nl.js new file mode 100644 index 00000000..11e78b9a --- /dev/null +++ b/node_modules/moment/locale/nl.js @@ -0,0 +1,86 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), + monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'); + + var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i]; + var monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + + var nl = moment.defineLocale('nl', { + months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortWithDots; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots[m.month()]; + } else { + return monthsShortWithDots[m.month()]; + } + }, + + monthsRegex: monthsRegex, + monthsShortRegex: monthsRegex, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse : monthsParse, + longMonthsParse : monthsParse, + shortMonthsParse : monthsParse, + + weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), + weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD-MM-YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'over %s', + past : '%s geleden', + s : 'een paar seconden', + ss : '%d seconden', + m : 'één minuut', + mm : '%d minuten', + h : 'één uur', + hh : '%d uur', + d : 'één dag', + dd : '%d dagen', + M : 'één maand', + MM : '%d maanden', + y : 'één jaar', + yy : '%d jaar' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return nl; + +}))); diff --git a/node_modules/moment/locale/nn.js b/node_modules/moment/locale/nn.js new file mode 100644 index 00000000..5fa35504 --- /dev/null +++ b/node_modules/moment/locale/nn.js @@ -0,0 +1,59 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var nn = moment.defineLocale('nn', { + months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), + weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'), + weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'), + weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY [kl.] H:mm', + LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm' + }, + calendar : { + sameDay: '[I dag klokka] LT', + nextDay: '[I morgon klokka] LT', + nextWeek: 'dddd [klokka] LT', + lastDay: '[I går klokka] LT', + lastWeek: '[Føregåande] dddd [klokka] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'om %s', + past : '%s sidan', + s : 'nokre sekund', + ss : '%d sekund', + m : 'eit minutt', + mm : '%d minutt', + h : 'ein time', + hh : '%d timar', + d : 'ein dag', + dd : '%d dagar', + M : 'ein månad', + MM : '%d månader', + y : 'eit år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return nn; + +}))); diff --git a/node_modules/moment/locale/pa-in.js b/node_modules/moment/locale/pa-in.js new file mode 100644 index 00000000..58ae1283 --- /dev/null +++ b/node_modules/moment/locale/pa-in.js @@ -0,0 +1,123 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '੧', + '2': '੨', + '3': '੩', + '4': '੪', + '5': '੫', + '6': '੬', + '7': '੭', + '8': '੮', + '9': '੯', + '0': '੦' + }, + numberMap = { + '੧': '1', + '੨': '2', + '੩': '3', + '੪': '4', + '੫': '5', + '੬': '6', + '੭': '7', + '੮': '8', + '੯': '9', + '੦': '0' + }; + + var paIn = moment.defineLocale('pa-in', { + // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi. + months : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'), + monthsShort : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'), + weekdays : 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'), + weekdaysShort : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + weekdaysMin : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + longDateFormat : { + LT : 'A h:mm ਵਜੇ', + LTS : 'A h:mm:ss ਵਜੇ', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm ਵਜੇ', + LLLL : 'dddd, D MMMM YYYY, A h:mm ਵਜੇ' + }, + calendar : { + sameDay : '[ਅਜ] LT', + nextDay : '[ਕਲ] LT', + nextWeek : '[ਅਗਲਾ] dddd, LT', + lastDay : '[ਕਲ] LT', + lastWeek : '[ਪਿਛਲੇ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ਵਿੱਚ', + past : '%s ਪਿਛਲੇ', + s : 'ਕੁਝ ਸਕਿੰਟ', + ss : '%d ਸਕਿੰਟ', + m : 'ਇਕ ਮਿੰਟ', + mm : '%d ਮਿੰਟ', + h : 'ਇੱਕ ਘੰਟਾ', + hh : '%d ਘੰਟੇ', + d : 'ਇੱਕ ਦਿਨ', + dd : '%d ਦਿਨ', + M : 'ਇੱਕ ਮਹੀਨਾ', + MM : '%d ਮਹੀਨੇ', + y : 'ਇੱਕ ਸਾਲ', + yy : '%d ਸਾਲ' + }, + preparse: function (string) { + return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + // Punjabi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi. + meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ਰਾਤ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ਸਵੇਰ') { + return hour; + } else if (meridiem === 'ਦੁਪਹਿਰ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ਸ਼ਾਮ') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ਰਾਤ'; + } else if (hour < 10) { + return 'ਸਵੇਰ'; + } else if (hour < 17) { + return 'ਦੁਪਹਿਰ'; + } else if (hour < 20) { + return 'ਸ਼ਾਮ'; + } else { + return 'ਰਾਤ'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + return paIn; + +}))); diff --git a/node_modules/moment/locale/pl.js b/node_modules/moment/locale/pl.js new file mode 100644 index 00000000..4c9c71a0 --- /dev/null +++ b/node_modules/moment/locale/pl.js @@ -0,0 +1,125 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'), + monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_'); + function plural(n) { + return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1); + } + function translate(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + return result + (plural(number) ? 'sekundy' : 'sekund'); + case 'm': + return withoutSuffix ? 'minuta' : 'minutę'; + case 'mm': + return result + (plural(number) ? 'minuty' : 'minut'); + case 'h': + return withoutSuffix ? 'godzina' : 'godzinę'; + case 'hh': + return result + (plural(number) ? 'godziny' : 'godzin'); + case 'MM': + return result + (plural(number) ? 'miesiące' : 'miesięcy'); + case 'yy': + return result + (plural(number) ? 'lata' : 'lat'); + } + } + + var pl = moment.defineLocale('pl', { + months : function (momentToFormat, format) { + if (!momentToFormat) { + return monthsNominative; + } else if (format === '') { + // Hack: if format empty we know this is used to generate + // RegExp by moment. Give then back both valid forms of months + // in RegExp ready format. + return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')'; + } else if (/D MMMM/.test(format)) { + return monthsSubjective[momentToFormat.month()]; + } else { + return monthsNominative[momentToFormat.month()]; + } + }, + monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), + weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'), + weekdaysShort : 'ndz_pon_wt_śr_czw_pt_sob'.split('_'), + weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Dziś o] LT', + nextDay: '[Jutro o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[W niedzielę o] LT'; + + case 2: + return '[We wtorek o] LT'; + + case 3: + return '[W środę o] LT'; + + case 6: + return '[W sobotę o] LT'; + + default: + return '[W] dddd [o] LT'; + } + }, + lastDay: '[Wczoraj o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[W zeszłą niedzielę o] LT'; + case 3: + return '[W zeszłą środę o] LT'; + case 6: + return '[W zeszłą sobotę o] LT'; + default: + return '[W zeszły] dddd [o] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'za %s', + past : '%s temu', + s : 'kilka sekund', + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : '1 dzień', + dd : '%d dni', + M : 'miesiąc', + MM : translate, + y : 'rok', + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return pl; + +}))); diff --git a/node_modules/moment/locale/pt-br.js b/node_modules/moment/locale/pt-br.js new file mode 100644 index 00000000..6cad5911 --- /dev/null +++ b/node_modules/moment/locale/pt-br.js @@ -0,0 +1,60 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var ptBr = moment.defineLocale('pt-br', { + months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'), + monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'), + weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), + weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY [às] HH:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm' + }, + calendar : { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return (this.day() === 0 || this.day() === 6) ? + '[Último] dddd [às] LT' : // Saturday + Sunday + '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L' + }, + relativeTime : { + future : 'em %s', + past : 'há %s', + s : 'poucos segundos', + ss : '%d segundos', + m : 'um minuto', + mm : '%d minutos', + h : 'uma hora', + hh : '%d horas', + d : 'um dia', + dd : '%d dias', + M : 'um mês', + MM : '%d meses', + y : 'um ano', + yy : '%d anos' + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal : '%dº' + }); + + return ptBr; + +}))); diff --git a/node_modules/moment/locale/pt.js b/node_modules/moment/locale/pt.js new file mode 100644 index 00000000..534f1c86 --- /dev/null +++ b/node_modules/moment/locale/pt.js @@ -0,0 +1,64 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var pt = moment.defineLocale('pt', { + months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'), + monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'), + weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), + weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY HH:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm' + }, + calendar : { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return (this.day() === 0 || this.day() === 6) ? + '[Último] dddd [às] LT' : // Saturday + Sunday + '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L' + }, + relativeTime : { + future : 'em %s', + past : 'há %s', + s : 'segundos', + ss : '%d segundos', + m : 'um minuto', + mm : '%d minutos', + h : 'uma hora', + hh : '%d horas', + d : 'um dia', + dd : '%d dias', + M : 'um mês', + MM : '%d meses', + y : 'um ano', + yy : '%d anos' + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return pt; + +}))); diff --git a/node_modules/moment/locale/ro.js b/node_modules/moment/locale/ro.js new file mode 100644 index 00000000..15bea092 --- /dev/null +++ b/node_modules/moment/locale/ro.js @@ -0,0 +1,74 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + 'ss': 'secunde', + 'mm': 'minute', + 'hh': 'ore', + 'dd': 'zile', + 'MM': 'luni', + 'yy': 'ani' + }, + separator = ' '; + if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) { + separator = ' de '; + } + return number + separator + format[key]; + } + + var ro = moment.defineLocale('ro', { + months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'), + monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'), + weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'), + weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY H:mm', + LLLL : 'dddd, D MMMM YYYY H:mm' + }, + calendar : { + sameDay: '[azi la] LT', + nextDay: '[mâine la] LT', + nextWeek: 'dddd [la] LT', + lastDay: '[ieri la] LT', + lastWeek: '[fosta] dddd [la] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'peste %s', + past : '%s în urmă', + s : 'câteva secunde', + ss : relativeTimeWithPlural, + m : 'un minut', + mm : relativeTimeWithPlural, + h : 'o oră', + hh : relativeTimeWithPlural, + d : 'o zi', + dd : relativeTimeWithPlural, + M : 'o lună', + MM : relativeTimeWithPlural, + y : 'un an', + yy : relativeTimeWithPlural + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return ro; + +}))); diff --git a/node_modules/moment/locale/ru.js b/node_modules/moment/locale/ru.js new file mode 100644 index 00000000..7afb7b5d --- /dev/null +++ b/node_modules/moment/locale/ru.js @@ -0,0 +1,181 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); + } + function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + 'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут', + 'hh': 'час_часа_часов', + 'dd': 'день_дня_дней', + 'MM': 'месяц_месяца_месяцев', + 'yy': 'год_года_лет' + }; + if (key === 'm') { + return withoutSuffix ? 'минута' : 'минуту'; + } + else { + return number + ' ' + plural(format[key], +number); + } + } + var monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i]; + + // http://new.gramota.ru/spravka/rules/139-prop : § 103 + // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637 + // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753 + var ru = moment.defineLocale('ru', { + months : { + format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'), + standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_') + }, + monthsShort : { + // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ? + format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'), + standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_') + }, + weekdays : { + standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'), + format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'), + isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/ + }, + weekdaysShort : 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin : 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + monthsParse : monthsParse, + longMonthsParse : monthsParse, + shortMonthsParse : monthsParse, + + // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки + monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // копия предыдущего + monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // полные названия с падежами + monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i, + + // Выражение, которое соотвествует только сокращённым формам + monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY г.', + LLL : 'D MMMM YYYY г., H:mm', + LLLL : 'dddd, D MMMM YYYY г., H:mm' + }, + calendar : { + sameDay: '[Сегодня, в] LT', + nextDay: '[Завтра, в] LT', + lastDay: '[Вчера, в] LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В следующее] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В следующий] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В следующую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + lastWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В прошлое] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В прошлый] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В прошлую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'через %s', + past : '%s назад', + s : 'несколько секунд', + ss : relativeTimeWithPlural, + m : relativeTimeWithPlural, + mm : relativeTimeWithPlural, + h : 'час', + hh : relativeTimeWithPlural, + d : 'день', + dd : relativeTimeWithPlural, + M : 'месяц', + MM : relativeTimeWithPlural, + y : 'год', + yy : relativeTimeWithPlural + }, + meridiemParse: /ночи|утра|дня|вечера/i, + isPM : function (input) { + return /^(дня|вечера)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ночи'; + } else if (hour < 12) { + return 'утра'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечера'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + return number + '-й'; + case 'D': + return number + '-го'; + case 'w': + case 'W': + return number + '-я'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return ru; + +}))); diff --git a/node_modules/moment/locale/sd.js b/node_modules/moment/locale/sd.js new file mode 100644 index 00000000..12992382 --- /dev/null +++ b/node_modules/moment/locale/sd.js @@ -0,0 +1,97 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var months = [ + 'جنوري', + 'فيبروري', + 'مارچ', + 'اپريل', + 'مئي', + 'جون', + 'جولاءِ', + 'آگسٽ', + 'سيپٽمبر', + 'آڪٽوبر', + 'نومبر', + 'ڊسمبر' + ]; + var days = [ + 'آچر', + 'سومر', + 'اڱارو', + 'اربع', + 'خميس', + 'جمع', + 'ڇنڇر' + ]; + + var sd = moment.defineLocale('sd', { + months : months, + monthsShort : months, + weekdays : days, + weekdaysShort : days, + weekdaysMin : days, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd، D MMMM YYYY HH:mm' + }, + meridiemParse: /صبح|شام/, + isPM : function (input) { + return 'شام' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar : { + sameDay : '[اڄ] LT', + nextDay : '[سڀاڻي] LT', + nextWeek : 'dddd [اڳين هفتي تي] LT', + lastDay : '[ڪالهه] LT', + lastWeek : '[گزريل هفتي] dddd [تي] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s پوء', + past : '%s اڳ', + s : 'چند سيڪنڊ', + ss : '%d سيڪنڊ', + m : 'هڪ منٽ', + mm : '%d منٽ', + h : 'هڪ ڪلاڪ', + hh : '%d ڪلاڪ', + d : 'هڪ ڏينهن', + dd : '%d ڏينهن', + M : 'هڪ مهينو', + MM : '%d مهينا', + y : 'هڪ سال', + yy : '%d سال' + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return sd; + +}))); diff --git a/node_modules/moment/locale/se.js b/node_modules/moment/locale/se.js new file mode 100644 index 00000000..4b046780 --- /dev/null +++ b/node_modules/moment/locale/se.js @@ -0,0 +1,59 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var se = moment.defineLocale('se', { + months : 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'), + monthsShort : 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'), + weekdays : 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'), + weekdaysShort : 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'), + weekdaysMin : 's_v_m_g_d_b_L'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'MMMM D. [b.] YYYY', + LLL : 'MMMM D. [b.] YYYY [ti.] HH:mm', + LLLL : 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm' + }, + calendar : { + sameDay: '[otne ti] LT', + nextDay: '[ihttin ti] LT', + nextWeek: 'dddd [ti] LT', + lastDay: '[ikte ti] LT', + lastWeek: '[ovddit] dddd [ti] LT', + sameElse: 'L' + }, + relativeTime : { + future : '%s geažes', + past : 'maŋit %s', + s : 'moadde sekunddat', + ss: '%d sekunddat', + m : 'okta minuhta', + mm : '%d minuhtat', + h : 'okta diimmu', + hh : '%d diimmut', + d : 'okta beaivi', + dd : '%d beaivvit', + M : 'okta mánnu', + MM : '%d mánut', + y : 'okta jahki', + yy : '%d jagit' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return se; + +}))); diff --git a/node_modules/moment/locale/si.js b/node_modules/moment/locale/si.js new file mode 100644 index 00000000..52dc6080 --- /dev/null +++ b/node_modules/moment/locale/si.js @@ -0,0 +1,70 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + /*jshint -W100*/ + var si = moment.defineLocale('si', { + months : 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'), + monthsShort : 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'), + weekdays : 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'), + weekdaysShort : 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'), + weekdaysMin : 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'a h:mm', + LTS : 'a h:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY MMMM D', + LLL : 'YYYY MMMM D, a h:mm', + LLLL : 'YYYY MMMM D [වැනි] dddd, a h:mm:ss' + }, + calendar : { + sameDay : '[අද] LT[ට]', + nextDay : '[හෙට] LT[ට]', + nextWeek : 'dddd LT[ට]', + lastDay : '[ඊයේ] LT[ට]', + lastWeek : '[පසුගිය] dddd LT[ට]', + sameElse : 'L' + }, + relativeTime : { + future : '%sකින්', + past : '%sකට පෙර', + s : 'තත්පර කිහිපය', + ss : 'තත්පර %d', + m : 'මිනිත්තුව', + mm : 'මිනිත්තු %d', + h : 'පැය', + hh : 'පැය %d', + d : 'දිනය', + dd : 'දින %d', + M : 'මාසය', + MM : 'මාස %d', + y : 'වසර', + yy : 'වසර %d' + }, + dayOfMonthOrdinalParse: /\d{1,2} වැනි/, + ordinal : function (number) { + return number + ' වැනි'; + }, + meridiemParse : /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./, + isPM : function (input) { + return input === 'ප.ව.' || input === 'පස් වරු'; + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'ප.ව.' : 'පස් වරු'; + } else { + return isLower ? 'පෙ.ව.' : 'පෙර වරු'; + } + } + }); + + return si; + +}))); diff --git a/node_modules/moment/locale/sk.js b/node_modules/moment/locale/sk.js new file mode 100644 index 00000000..6938f95e --- /dev/null +++ b/node_modules/moment/locale/sk.js @@ -0,0 +1,155 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'), + monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_'); + function plural(n) { + return (n > 1) && (n < 5); + } + function translate(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'sekundy' : 'sekúnd'); + } else { + return result + 'sekundami'; + } + break; + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou'); + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'minúty' : 'minút'); + } else { + return result + 'minútami'; + } + break; + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'hodiny' : 'hodín'); + } else { + return result + 'hodinami'; + } + break; + case 'd': // a day / in a day / a day ago + return (withoutSuffix || isFuture) ? 'deň' : 'dňom'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'dni' : 'dní'); + } else { + return result + 'dňami'; + } + break; + case 'M': // a month / in a month / a month ago + return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'mesiace' : 'mesiacov'); + } else { + return result + 'mesiacmi'; + } + break; + case 'y': // a year / in a year / a year ago + return (withoutSuffix || isFuture) ? 'rok' : 'rokom'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'roky' : 'rokov'); + } else { + return result + 'rokmi'; + } + break; + } + } + + var sk = moment.defineLocale('sk', { + months : months, + monthsShort : monthsShort, + weekdays : 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'), + weekdaysShort : 'ne_po_ut_st_št_pi_so'.split('_'), + weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'), + longDateFormat : { + LT: 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd D. MMMM YYYY H:mm' + }, + calendar : { + sameDay: '[dnes o] LT', + nextDay: '[zajtra o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v nedeľu o] LT'; + case 1: + case 2: + return '[v] dddd [o] LT'; + case 3: + return '[v stredu o] LT'; + case 4: + return '[vo štvrtok o] LT'; + case 5: + return '[v piatok o] LT'; + case 6: + return '[v sobotu o] LT'; + } + }, + lastDay: '[včera o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulú nedeľu o] LT'; + case 1: + case 2: + return '[minulý] dddd [o] LT'; + case 3: + return '[minulú stredu o] LT'; + case 4: + case 5: + return '[minulý] dddd [o] LT'; + case 6: + return '[minulú sobotu o] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'za %s', + past : 'pred %s', + s : translate, + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return sk; + +}))); diff --git a/node_modules/moment/locale/sl.js b/node_modules/moment/locale/sl.js new file mode 100644 index 00000000..ecdd0cb4 --- /dev/null +++ b/node_modules/moment/locale/sl.js @@ -0,0 +1,172 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function processRelativeTime(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami'; + case 'ss': + if (number === 1) { + result += withoutSuffix ? 'sekundo' : 'sekundi'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah'; + } else { + result += 'sekund'; + } + return result; + case 'm': + return withoutSuffix ? 'ena minuta' : 'eno minuto'; + case 'mm': + if (number === 1) { + result += withoutSuffix ? 'minuta' : 'minuto'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'minuti' : 'minutama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'minute' : 'minutami'; + } else { + result += withoutSuffix || isFuture ? 'minut' : 'minutami'; + } + return result; + case 'h': + return withoutSuffix ? 'ena ura' : 'eno uro'; + case 'hh': + if (number === 1) { + result += withoutSuffix ? 'ura' : 'uro'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'uri' : 'urama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'ure' : 'urami'; + } else { + result += withoutSuffix || isFuture ? 'ur' : 'urami'; + } + return result; + case 'd': + return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; + case 'dd': + if (number === 1) { + result += withoutSuffix || isFuture ? 'dan' : 'dnem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'dni' : 'dnevoma'; + } else { + result += withoutSuffix || isFuture ? 'dni' : 'dnevi'; + } + return result; + case 'M': + return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; + case 'MM': + if (number === 1) { + result += withoutSuffix || isFuture ? 'mesec' : 'mesecem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'meseca' : 'mesecema'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'mesece' : 'meseci'; + } else { + result += withoutSuffix || isFuture ? 'mesecev' : 'meseci'; + } + return result; + case 'y': + return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; + case 'yy': + if (number === 1) { + result += withoutSuffix || isFuture ? 'leto' : 'letom'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'leti' : 'letoma'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'leta' : 'leti'; + } else { + result += withoutSuffix || isFuture ? 'let' : 'leti'; + } + return result; + } + } + + var sl = moment.defineLocale('sl', { + months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'), + monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'), + weekdaysShort : 'ned._pon._tor._sre._čet._pet._sob.'.split('_'), + weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[danes ob] LT', + nextDay : '[jutri ob] LT', + + nextWeek : function () { + switch (this.day()) { + case 0: + return '[v] [nedeljo] [ob] LT'; + case 3: + return '[v] [sredo] [ob] LT'; + case 6: + return '[v] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[v] dddd [ob] LT'; + } + }, + lastDay : '[včeraj ob] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + return '[prejšnjo] [nedeljo] [ob] LT'; + case 3: + return '[prejšnjo] [sredo] [ob] LT'; + case 6: + return '[prejšnjo] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prejšnji] dddd [ob] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'čez %s', + past : 'pred %s', + s : processRelativeTime, + ss : processRelativeTime, + m : processRelativeTime, + mm : processRelativeTime, + h : processRelativeTime, + hh : processRelativeTime, + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return sl; + +}))); diff --git a/node_modules/moment/locale/sq.js b/node_modules/moment/locale/sq.js new file mode 100644 index 00000000..eb081df0 --- /dev/null +++ b/node_modules/moment/locale/sq.js @@ -0,0 +1,67 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var sq = moment.defineLocale('sq', { + months : 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'), + monthsShort : 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'), + weekdays : 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'), + weekdaysShort : 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'), + weekdaysMin : 'D_H_Ma_Më_E_P_Sh'.split('_'), + weekdaysParseExact : true, + meridiemParse: /PD|MD/, + isPM: function (input) { + return input.charAt(0) === 'M'; + }, + meridiem : function (hours, minutes, isLower) { + return hours < 12 ? 'PD' : 'MD'; + }, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Sot në] LT', + nextDay : '[Nesër në] LT', + nextWeek : 'dddd [në] LT', + lastDay : '[Dje në] LT', + lastWeek : 'dddd [e kaluar në] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'në %s', + past : '%s më parë', + s : 'disa sekonda', + ss : '%d sekonda', + m : 'një minutë', + mm : '%d minuta', + h : 'një orë', + hh : '%d orë', + d : 'një ditë', + dd : '%d ditë', + M : 'një muaj', + MM : '%d muaj', + y : 'një vit', + yy : '%d vite' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return sq; + +}))); diff --git a/node_modules/moment/locale/sr-cyrl.js b/node_modules/moment/locale/sr-cyrl.js new file mode 100644 index 00000000..e22a22fc --- /dev/null +++ b/node_modules/moment/locale/sr-cyrl.js @@ -0,0 +1,110 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var translator = { + words: { //Different grammatical cases + ss: ['секунда', 'секунде', 'секунди'], + m: ['један минут', 'једне минуте'], + mm: ['минут', 'минуте', 'минута'], + h: ['један сат', 'једног сата'], + hh: ['сат', 'сата', 'сати'], + dd: ['дан', 'дана', 'дана'], + MM: ['месец', 'месеца', 'месеци'], + yy: ['година', 'године', 'година'] + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return number + ' ' + translator.correctGrammaticalCase(number, wordKey); + } + } + }; + + var srCyrl = moment.defineLocale('sr-cyrl', { + months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'), + monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'), + monthsParseExact: true, + weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'), + weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'), + weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm', + LTS : 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + }, + calendar: { + sameDay: '[данас у] LT', + nextDay: '[сутра у] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[у] [недељу] [у] LT'; + case 3: + return '[у] [среду] [у] LT'; + case 6: + return '[у] [суботу] [у] LT'; + case 1: + case 2: + case 4: + case 5: + return '[у] dddd [у] LT'; + } + }, + lastDay : '[јуче у] LT', + lastWeek : function () { + var lastWeekDays = [ + '[прошле] [недеље] [у] LT', + '[прошлог] [понедељка] [у] LT', + '[прошлог] [уторка] [у] LT', + '[прошле] [среде] [у] LT', + '[прошлог] [четвртка] [у] LT', + '[прошлог] [петка] [у] LT', + '[прошле] [суботе] [у] LT' + ]; + return lastWeekDays[this.day()]; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'за %s', + past : 'пре %s', + s : 'неколико секунди', + ss : translator.translate, + m : translator.translate, + mm : translator.translate, + h : translator.translate, + hh : translator.translate, + d : 'дан', + dd : translator.translate, + M : 'месец', + MM : translator.translate, + y : 'годину', + yy : translator.translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return srCyrl; + +}))); diff --git a/node_modules/moment/locale/sr.js b/node_modules/moment/locale/sr.js new file mode 100644 index 00000000..cb0b7ec9 --- /dev/null +++ b/node_modules/moment/locale/sr.js @@ -0,0 +1,110 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var translator = { + words: { //Different grammatical cases + ss: ['sekunda', 'sekunde', 'sekundi'], + m: ['jedan minut', 'jedne minute'], + mm: ['minut', 'minute', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mesec', 'meseca', 'meseci'], + yy: ['godina', 'godine', 'godina'] + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return number + ' ' + translator.correctGrammaticalCase(number, wordKey); + } + } + }; + + var sr = moment.defineLocale('sr', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'), + weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm', + LTS : 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedelju] [u] LT'; + case 3: + return '[u] [sredu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[juče u] LT', + lastWeek : function () { + var lastWeekDays = [ + '[prošle] [nedelje] [u] LT', + '[prošlog] [ponedeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT' + ]; + return lastWeekDays[this.day()]; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'pre %s', + s : 'nekoliko sekundi', + ss : translator.translate, + m : translator.translate, + mm : translator.translate, + h : translator.translate, + hh : translator.translate, + d : 'dan', + dd : translator.translate, + M : 'mesec', + MM : translator.translate, + y : 'godinu', + yy : translator.translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return sr; + +}))); diff --git a/node_modules/moment/locale/ss.js b/node_modules/moment/locale/ss.js new file mode 100644 index 00000000..a401149c --- /dev/null +++ b/node_modules/moment/locale/ss.js @@ -0,0 +1,87 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var ss = moment.defineLocale('ss', { + months : "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split('_'), + monthsShort : 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'), + weekdays : 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'), + weekdaysShort : 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'), + weekdaysMin : 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Namuhla nga] LT', + nextDay : '[Kusasa nga] LT', + nextWeek : 'dddd [nga] LT', + lastDay : '[Itolo nga] LT', + lastWeek : 'dddd [leliphelile] [nga] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'nga %s', + past : 'wenteka nga %s', + s : 'emizuzwana lomcane', + ss : '%d mzuzwana', + m : 'umzuzu', + mm : '%d emizuzu', + h : 'lihora', + hh : '%d emahora', + d : 'lilanga', + dd : '%d emalanga', + M : 'inyanga', + MM : '%d tinyanga', + y : 'umnyaka', + yy : '%d iminyaka' + }, + meridiemParse: /ekuseni|emini|entsambama|ebusuku/, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'ekuseni'; + } else if (hours < 15) { + return 'emini'; + } else if (hours < 19) { + return 'entsambama'; + } else { + return 'ebusuku'; + } + }, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ekuseni') { + return hour; + } else if (meridiem === 'emini') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') { + if (hour === 0) { + return 0; + } + return hour + 12; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal : '%d', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return ss; + +}))); diff --git a/node_modules/moment/locale/sv.js b/node_modules/moment/locale/sv.js new file mode 100644 index 00000000..494fedba --- /dev/null +++ b/node_modules/moment/locale/sv.js @@ -0,0 +1,68 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var sv = moment.defineLocale('sv', { + months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'), + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), + weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'), + weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [kl.] HH:mm', + LLLL : 'dddd D MMMM YYYY [kl.] HH:mm', + lll : 'D MMM YYYY HH:mm', + llll : 'ddd D MMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Idag] LT', + nextDay: '[Imorgon] LT', + lastDay: '[Igår] LT', + nextWeek: '[På] dddd LT', + lastWeek: '[I] dddd[s] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'om %s', + past : 'för %s sedan', + s : 'några sekunder', + ss : '%d sekunder', + m : 'en minut', + mm : '%d minuter', + h : 'en timme', + hh : '%d timmar', + d : 'en dag', + dd : '%d dagar', + M : 'en månad', + MM : '%d månader', + y : 'ett år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}(e|a)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'e' : + (b === 1) ? 'a' : + (b === 2) ? 'a' : + (b === 3) ? 'e' : 'e'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return sv; + +}))); diff --git a/node_modules/moment/locale/sw.js b/node_modules/moment/locale/sw.js new file mode 100644 index 00000000..2c066b64 --- /dev/null +++ b/node_modules/moment/locale/sw.js @@ -0,0 +1,58 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var sw = moment.defineLocale('sw', { + months : 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'), + monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), + weekdays : 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'), + weekdaysShort : 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), + weekdaysMin : 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[leo saa] LT', + nextDay : '[kesho saa] LT', + nextWeek : '[wiki ijayo] dddd [saat] LT', + lastDay : '[jana] LT', + lastWeek : '[wiki iliyopita] dddd [saat] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s baadaye', + past : 'tokea %s', + s : 'hivi punde', + ss : 'sekunde %d', + m : 'dakika moja', + mm : 'dakika %d', + h : 'saa limoja', + hh : 'masaa %d', + d : 'siku moja', + dd : 'masiku %d', + M : 'mwezi mmoja', + MM : 'miezi %d', + y : 'mwaka mmoja', + yy : 'miaka %d' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return sw; + +}))); diff --git a/node_modules/moment/locale/ta.js b/node_modules/moment/locale/ta.js new file mode 100644 index 00000000..f7a87d7b --- /dev/null +++ b/node_modules/moment/locale/ta.js @@ -0,0 +1,128 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var symbolMap = { + '1': '௧', + '2': '௨', + '3': '௩', + '4': '௪', + '5': '௫', + '6': '௬', + '7': '௭', + '8': '௮', + '9': '௯', + '0': '௦' + }, numberMap = { + '௧': '1', + '௨': '2', + '௩': '3', + '௪': '4', + '௫': '5', + '௬': '6', + '௭': '7', + '௮': '8', + '௯': '9', + '௦': '0' + }; + + var ta = moment.defineLocale('ta', { + months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'), + monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'), + weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'), + weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'), + weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, HH:mm', + LLLL : 'dddd, D MMMM YYYY, HH:mm' + }, + calendar : { + sameDay : '[இன்று] LT', + nextDay : '[நாளை] LT', + nextWeek : 'dddd, LT', + lastDay : '[நேற்று] LT', + lastWeek : '[கடந்த வாரம்] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s இல்', + past : '%s முன்', + s : 'ஒரு சில விநாடிகள்', + ss : '%d விநாடிகள்', + m : 'ஒரு நிமிடம்', + mm : '%d நிமிடங்கள்', + h : 'ஒரு மணி நேரம்', + hh : '%d மணி நேரம்', + d : 'ஒரு நாள்', + dd : '%d நாட்கள்', + M : 'ஒரு மாதம்', + MM : '%d மாதங்கள்', + y : 'ஒரு வருடம்', + yy : '%d ஆண்டுகள்' + }, + dayOfMonthOrdinalParse: /\d{1,2}வது/, + ordinal : function (number) { + return number + 'வது'; + }, + preparse: function (string) { + return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + // refer http://ta.wikipedia.org/s/1er1 + meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/, + meridiem : function (hour, minute, isLower) { + if (hour < 2) { + return ' யாமம்'; + } else if (hour < 6) { + return ' வைகறை'; // வைகறை + } else if (hour < 10) { + return ' காலை'; // காலை + } else if (hour < 14) { + return ' நண்பகல்'; // நண்பகல் + } else if (hour < 18) { + return ' எற்பாடு'; // எற்பாடு + } else if (hour < 22) { + return ' மாலை'; // மாலை + } else { + return ' யாமம்'; + } + }, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'யாமம்') { + return hour < 2 ? hour : hour + 12; + } else if (meridiem === 'வைகறை' || meridiem === 'காலை') { + return hour; + } else if (meridiem === 'நண்பகல்') { + return hour >= 10 ? hour : hour + 12; + } else { + return hour + 12; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + return ta; + +}))); diff --git a/node_modules/moment/locale/te.js b/node_modules/moment/locale/te.js new file mode 100644 index 00000000..abb40bf1 --- /dev/null +++ b/node_modules/moment/locale/te.js @@ -0,0 +1,88 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var te = moment.defineLocale('te', { + months : 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'), + monthsShort : 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'), + monthsParseExact : true, + weekdays : 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'), + weekdaysShort : 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'), + weekdaysMin : 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm', + LLLL : 'dddd, D MMMM YYYY, A h:mm' + }, + calendar : { + sameDay : '[నేడు] LT', + nextDay : '[రేపు] LT', + nextWeek : 'dddd, LT', + lastDay : '[నిన్న] LT', + lastWeek : '[గత] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s లో', + past : '%s క్రితం', + s : 'కొన్ని క్షణాలు', + ss : '%d సెకన్లు', + m : 'ఒక నిమిషం', + mm : '%d నిమిషాలు', + h : 'ఒక గంట', + hh : '%d గంటలు', + d : 'ఒక రోజు', + dd : '%d రోజులు', + M : 'ఒక నెల', + MM : '%d నెలలు', + y : 'ఒక సంవత్సరం', + yy : '%d సంవత్సరాలు' + }, + dayOfMonthOrdinalParse : /\d{1,2}వ/, + ordinal : '%dవ', + meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'రాత్రి') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ఉదయం') { + return hour; + } else if (meridiem === 'మధ్యాహ్నం') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'సాయంత్రం') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'రాత్రి'; + } else if (hour < 10) { + return 'ఉదయం'; + } else if (hour < 17) { + return 'మధ్యాహ్నం'; + } else if (hour < 20) { + return 'సాయంత్రం'; + } else { + return 'రాత్రి'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + return te; + +}))); diff --git a/node_modules/moment/locale/tet.js b/node_modules/moment/locale/tet.js new file mode 100644 index 00000000..efa53da1 --- /dev/null +++ b/node_modules/moment/locale/tet.js @@ -0,0 +1,66 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var tet = moment.defineLocale('tet', { + months : 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split('_'), + monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays : 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'), + weekdaysShort : 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'), + weekdaysMin : 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Ohin iha] LT', + nextDay: '[Aban iha] LT', + nextWeek: 'dddd [iha] LT', + lastDay: '[Horiseik iha] LT', + lastWeek: 'dddd [semana kotuk] [iha] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'iha %s', + past : '%s liuba', + s : 'minutu balun', + ss : 'minutu %d', + m : 'minutu ida', + mm : 'minutu %d', + h : 'oras ida', + hh : 'oras %d', + d : 'loron ida', + dd : 'loron %d', + M : 'fulan ida', + MM : 'fulan %d', + y : 'tinan ida', + yy : 'tinan %d' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return tet; + +}))); diff --git a/node_modules/moment/locale/tg.js b/node_modules/moment/locale/tg.js new file mode 100644 index 00000000..c2833680 --- /dev/null +++ b/node_modules/moment/locale/tg.js @@ -0,0 +1,115 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var suffixes = { + 0: '-ум', + 1: '-ум', + 2: '-юм', + 3: '-юм', + 4: '-ум', + 5: '-ум', + 6: '-ум', + 7: '-ум', + 8: '-ум', + 9: '-ум', + 10: '-ум', + 12: '-ум', + 13: '-ум', + 20: '-ум', + 30: '-юм', + 40: '-ум', + 50: '-ум', + 60: '-ум', + 70: '-ум', + 80: '-ум', + 90: '-ум', + 100: '-ум' + }; + + var tg = moment.defineLocale('tg', { + months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), + monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays : 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split('_'), + weekdaysShort : 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'), + weekdaysMin : 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Имрӯз соати] LT', + nextDay : '[Пагоҳ соати] LT', + lastDay : '[Дирӯз соати] LT', + nextWeek : 'dddd[и] [ҳафтаи оянда соати] LT', + lastWeek : 'dddd[и] [ҳафтаи гузашта соати] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'баъди %s', + past : '%s пеш', + s : 'якчанд сония', + m : 'як дақиқа', + mm : '%d дақиқа', + h : 'як соат', + hh : '%d соат', + d : 'як рӯз', + dd : '%d рӯз', + M : 'як моҳ', + MM : '%d моҳ', + y : 'як сол', + yy : '%d сол' + }, + meridiemParse: /шаб|субҳ|рӯз|бегоҳ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'шаб') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'субҳ') { + return hour; + } else if (meridiem === 'рӯз') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'бегоҳ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'шаб'; + } else if (hour < 11) { + return 'субҳ'; + } else if (hour < 16) { + return 'рӯз'; + } else if (hour < 19) { + return 'бегоҳ'; + } else { + return 'шаб'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes[number] || suffixes[a] || suffixes[b]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 1th is the first week of the year. + } + }); + + return tg; + +}))); diff --git a/node_modules/moment/locale/th.js b/node_modules/moment/locale/th.js new file mode 100644 index 00000000..87489a4e --- /dev/null +++ b/node_modules/moment/locale/th.js @@ -0,0 +1,66 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var th = moment.defineLocale('th', { + months : 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'), + monthsShort : 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'), + monthsParseExact: true, + weekdays : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'), + weekdaysShort : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference + weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY เวลา H:mm', + LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm' + }, + meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/, + isPM: function (input) { + return input === 'หลังเที่ยง'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ก่อนเที่ยง'; + } else { + return 'หลังเที่ยง'; + } + }, + calendar : { + sameDay : '[วันนี้ เวลา] LT', + nextDay : '[พรุ่งนี้ เวลา] LT', + nextWeek : 'dddd[หน้า เวลา] LT', + lastDay : '[เมื่อวานนี้ เวลา] LT', + lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'อีก %s', + past : '%sที่แล้ว', + s : 'ไม่กี่วินาที', + ss : '%d วินาที', + m : '1 นาที', + mm : '%d นาที', + h : '1 ชั่วโมง', + hh : '%d ชั่วโมง', + d : '1 วัน', + dd : '%d วัน', + M : '1 เดือน', + MM : '%d เดือน', + y : '1 ปี', + yy : '%d ปี' + } + }); + + return th; + +}))); diff --git a/node_modules/moment/locale/tl-ph.js b/node_modules/moment/locale/tl-ph.js new file mode 100644 index 00000000..3f7e45ee --- /dev/null +++ b/node_modules/moment/locale/tl-ph.js @@ -0,0 +1,61 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var tlPh = moment.defineLocale('tl-ph', { + months : 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'), + monthsShort : 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), + weekdays : 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'), + weekdaysShort : 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), + weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'MM/D/YYYY', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY HH:mm', + LLLL : 'dddd, MMMM DD, YYYY HH:mm' + }, + calendar : { + sameDay: 'LT [ngayong araw]', + nextDay: '[Bukas ng] LT', + nextWeek: 'LT [sa susunod na] dddd', + lastDay: 'LT [kahapon]', + lastWeek: 'LT [noong nakaraang] dddd', + sameElse: 'L' + }, + relativeTime : { + future : 'sa loob ng %s', + past : '%s ang nakalipas', + s : 'ilang segundo', + ss : '%d segundo', + m : 'isang minuto', + mm : '%d minuto', + h : 'isang oras', + hh : '%d oras', + d : 'isang araw', + dd : '%d araw', + M : 'isang buwan', + MM : '%d buwan', + y : 'isang taon', + yy : '%d taon' + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal : function (number) { + return number; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return tlPh; + +}))); diff --git a/node_modules/moment/locale/tlh.js b/node_modules/moment/locale/tlh.js new file mode 100644 index 00000000..7ea953b8 --- /dev/null +++ b/node_modules/moment/locale/tlh.js @@ -0,0 +1,121 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_'); + + function translateFuture(output) { + var time = output; + time = (output.indexOf('jaj') !== -1) ? + time.slice(0, -3) + 'leS' : + (output.indexOf('jar') !== -1) ? + time.slice(0, -3) + 'waQ' : + (output.indexOf('DIS') !== -1) ? + time.slice(0, -3) + 'nem' : + time + ' pIq'; + return time; + } + + function translatePast(output) { + var time = output; + time = (output.indexOf('jaj') !== -1) ? + time.slice(0, -3) + 'Hu’' : + (output.indexOf('jar') !== -1) ? + time.slice(0, -3) + 'wen' : + (output.indexOf('DIS') !== -1) ? + time.slice(0, -3) + 'ben' : + time + ' ret'; + return time; + } + + function translate(number, withoutSuffix, string, isFuture) { + var numberNoun = numberAsNoun(number); + switch (string) { + case 'ss': + return numberNoun + ' lup'; + case 'mm': + return numberNoun + ' tup'; + case 'hh': + return numberNoun + ' rep'; + case 'dd': + return numberNoun + ' jaj'; + case 'MM': + return numberNoun + ' jar'; + case 'yy': + return numberNoun + ' DIS'; + } + } + + function numberAsNoun(number) { + var hundred = Math.floor((number % 1000) / 100), + ten = Math.floor((number % 100) / 10), + one = number % 10, + word = ''; + if (hundred > 0) { + word += numbersNouns[hundred] + 'vatlh'; + } + if (ten > 0) { + word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH'; + } + if (one > 0) { + word += ((word !== '') ? ' ' : '') + numbersNouns[one]; + } + return (word === '') ? 'pagh' : word; + } + + var tlh = moment.defineLocale('tlh', { + months : 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'), + monthsShort : 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'), + monthsParseExact : true, + weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[DaHjaj] LT', + nextDay: '[wa’leS] LT', + nextWeek: 'LLL', + lastDay: '[wa’Hu’] LT', + lastWeek: 'LLL', + sameElse: 'L' + }, + relativeTime : { + future : translateFuture, + past : translatePast, + s : 'puS lup', + ss : translate, + m : 'wa’ tup', + mm : translate, + h : 'wa’ rep', + hh : translate, + d : 'wa’ jaj', + dd : translate, + M : 'wa’ jar', + MM : translate, + y : 'wa’ DIS', + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return tlh; + +}))); diff --git a/node_modules/moment/locale/tr.js b/node_modules/moment/locale/tr.js new file mode 100644 index 00000000..e3fa275a --- /dev/null +++ b/node_modules/moment/locale/tr.js @@ -0,0 +1,93 @@ + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + var suffixes = { + 1: '\'inci', + 5: '\'inci', + 8: '\'inci', + 70: '\'inci', + 80: '\'inci', + 2: '\'nci', + 7: '\'nci', + 20: '\'nci', + 50: '\'nci', + 3: '\'üncü', + 4: '\'üncü', + 100: '\'üncü', + 6: '\'ncı', + 9: '\'uncu', + 10: '\'uncu', + 30: '\'uncu', + 60: '\'ıncı', + 90: '\'ıncı' + }; + + var tr = moment.defineLocale('tr', { + months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'), + monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'), + weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'), + weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'), + weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[bugün saat] LT', + nextDay : '[yarın saat] LT', + nextWeek : '[gelecek] dddd [saat] LT', + lastDay : '[dün] LT', + lastWeek : '[geçen] dddd [saat] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s sonra', + past : '%s önce', + s : 'birkaç saniye', + ss : '%d saniye', + m : 'bir dakika', + mm : '%d dakika', + h : 'bir saat', + hh : '%d saat', + d : 'bir gün', + dd : '%d gün', + M : 'bir ay', + MM : '%d ay', + y : 'bir yıl', + yy : '%d yıl' + }, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'Do': + case 'DD': + return number; + default: + if (number === 0) { // special case for zero + return number + '\'ıncı'; + } + var a = number % 10, + b = number % 100 - a, + c = number >= 100 ? 100 : null; + return number + (suffixes[a] || suffixes[b] || suffixes[c]); + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return tr; + +}))); diff --git a/node_modules/moment/locale/tzl.js b/node_modules/moment/locale/tzl.js new file mode 100644 index 00000000..d32601bc --- /dev/null +++ b/node_modules/moment/locale/tzl.js @@ -0,0 +1,90 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals. + // This is currently too difficult (maybe even impossible) to add. + var tzl = moment.defineLocale('tzl', { + months : 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'), + monthsShort : 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), + weekdays : 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), + weekdaysShort : 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), + weekdaysMin : 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM [dallas] YYYY', + LLL : 'D. MMMM [dallas] YYYY HH.mm', + LLLL : 'dddd, [li] D. MMMM [dallas] YYYY HH.mm' + }, + meridiemParse: /d\'o|d\'a/i, + isPM : function (input) { + return 'd\'o' === input.toLowerCase(); + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'd\'o' : 'D\'O'; + } else { + return isLower ? 'd\'a' : 'D\'A'; + } + }, + calendar : { + sameDay : '[oxhi à] LT', + nextDay : '[demà à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[ieiri à] LT', + lastWeek : '[sür el] dddd [lasteu à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'osprei %s', + past : 'ja%s', + s : processRelativeTime, + ss : processRelativeTime, + m : processRelativeTime, + mm : processRelativeTime, + h : processRelativeTime, + hh : processRelativeTime, + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 's': ['viensas secunds', '\'iensas secunds'], + 'ss': [number + ' secunds', '' + number + ' secunds'], + 'm': ['\'n míut', '\'iens míut'], + 'mm': [number + ' míuts', '' + number + ' míuts'], + 'h': ['\'n þora', '\'iensa þora'], + 'hh': [number + ' þoras', '' + number + ' þoras'], + 'd': ['\'n ziua', '\'iensa ziua'], + 'dd': [number + ' ziuas', '' + number + ' ziuas'], + 'M': ['\'n mes', '\'iens mes'], + 'MM': [number + ' mesen', '' + number + ' mesen'], + 'y': ['\'n ar', '\'iens ar'], + 'yy': [number + ' ars', '' + number + ' ars'] + }; + return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]); + } + + return tzl; + +}))); diff --git a/node_modules/moment/locale/tzm-latn.js b/node_modules/moment/locale/tzm-latn.js new file mode 100644 index 00000000..b7a2aed1 --- /dev/null +++ b/node_modules/moment/locale/tzm-latn.js @@ -0,0 +1,57 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var tzmLatn = moment.defineLocale('tzm-latn', { + months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), + monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), + weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[asdkh g] LT', + nextDay: '[aska g] LT', + nextWeek: 'dddd [g] LT', + lastDay: '[assant g] LT', + lastWeek: 'dddd [g] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'dadkh s yan %s', + past : 'yan %s', + s : 'imik', + ss : '%d imik', + m : 'minuḍ', + mm : '%d minuḍ', + h : 'saɛa', + hh : '%d tassaɛin', + d : 'ass', + dd : '%d ossan', + M : 'ayowr', + MM : '%d iyyirn', + y : 'asgas', + yy : '%d isgasn' + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + return tzmLatn; + +}))); diff --git a/node_modules/moment/locale/tzm.js b/node_modules/moment/locale/tzm.js new file mode 100644 index 00000000..48d71237 --- /dev/null +++ b/node_modules/moment/locale/tzm.js @@ -0,0 +1,57 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var tzm = moment.defineLocale('tzm', { + months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), + monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), + weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[ⴰⵙⴷⵅ ⴴ] LT', + nextDay: '[ⴰⵙⴽⴰ ⴴ] LT', + nextWeek: 'dddd [ⴴ] LT', + lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT', + lastWeek: 'dddd [ⴴ] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s', + past : 'ⵢⴰⵏ %s', + s : 'ⵉⵎⵉⴽ', + ss : '%d ⵉⵎⵉⴽ', + m : 'ⵎⵉⵏⵓⴺ', + mm : '%d ⵎⵉⵏⵓⴺ', + h : 'ⵙⴰⵄⴰ', + hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ', + d : 'ⴰⵙⵙ', + dd : '%d oⵙⵙⴰⵏ', + M : 'ⴰⵢoⵓⵔ', + MM : '%d ⵉⵢⵢⵉⵔⵏ', + y : 'ⴰⵙⴳⴰⵙ', + yy : '%d ⵉⵙⴳⴰⵙⵏ' + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + return tzm; + +}))); diff --git a/node_modules/moment/locale/ug-cn.js b/node_modules/moment/locale/ug-cn.js new file mode 100644 index 00000000..d6c9d654 --- /dev/null +++ b/node_modules/moment/locale/ug-cn.js @@ -0,0 +1,118 @@ +//! moment.js language configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var ugCn = moment.defineLocale('ug-cn', { + months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split( + '_' + ), + weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى', + LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm' + }, + meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + meridiem === 'يېرىم كېچە' || + meridiem === 'سەھەر' || + meridiem === 'چۈشتىن بۇرۇن' + ) { + return hour; + } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') { + return hour + 12; + } else { + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return 'يېرىم كېچە'; + } else if (hm < 900) { + return 'سەھەر'; + } else if (hm < 1130) { + return 'چۈشتىن بۇرۇن'; + } else if (hm < 1230) { + return 'چۈش'; + } else if (hm < 1800) { + return 'چۈشتىن كېيىن'; + } else { + return 'كەچ'; + } + }, + calendar: { + sameDay: '[بۈگۈن سائەت] LT', + nextDay: '[ئەتە سائەت] LT', + nextWeek: '[كېلەركى] dddd [سائەت] LT', + lastDay: '[تۆنۈگۈن] LT', + lastWeek: '[ئالدىنقى] dddd [سائەت] LT', + sameElse: 'L' + }, + relativeTime: { + future: '%s كېيىن', + past: '%s بۇرۇن', + s: 'نەچچە سېكونت', + ss: '%d سېكونت', + m: 'بىر مىنۇت', + mm: '%d مىنۇت', + h: 'بىر سائەت', + hh: '%d سائەت', + d: 'بىر كۈن', + dd: '%d كۈن', + M: 'بىر ئاي', + MM: '%d ئاي', + y: 'بىر يىل', + yy: '%d يىل' + }, + + dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '-كۈنى'; + case 'w': + case 'W': + return number + '-ھەپتە'; + default: + return number; + } + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow: 1, // Monday is the first day of the week. + doy: 7 // The week that contains Jan 1st is the first week of the year. + } + }); + + return ugCn; + +}))); diff --git a/node_modules/moment/locale/uk.js b/node_modules/moment/locale/uk.js new file mode 100644 index 00000000..70761a18 --- /dev/null +++ b/node_modules/moment/locale/uk.js @@ -0,0 +1,153 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); + } + function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + 'ss': withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд', + 'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин', + 'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин', + 'dd': 'день_дні_днів', + 'MM': 'місяць_місяці_місяців', + 'yy': 'рік_роки_років' + }; + if (key === 'm') { + return withoutSuffix ? 'хвилина' : 'хвилину'; + } + else if (key === 'h') { + return withoutSuffix ? 'година' : 'годину'; + } + else { + return number + ' ' + plural(format[key], +number); + } + } + function weekdaysCaseReplace(m, format) { + var weekdays = { + 'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'), + 'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'), + 'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_') + }; + + if (m === true) { + return weekdays['nominative'].slice(1, 7).concat(weekdays['nominative'].slice(0, 1)); + } + if (!m) { + return weekdays['nominative']; + } + + var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ? + 'accusative' : + ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ? + 'genitive' : + 'nominative'); + return weekdays[nounCase][m.day()]; + } + function processHoursFunction(str) { + return function () { + return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT'; + }; + } + + var uk = moment.defineLocale('uk', { + months : { + 'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'), + 'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_') + }, + monthsShort : 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'), + weekdays : weekdaysCaseReplace, + weekdaysShort : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY р.', + LLL : 'D MMMM YYYY р., HH:mm', + LLLL : 'dddd, D MMMM YYYY р., HH:mm' + }, + calendar : { + sameDay: processHoursFunction('[Сьогодні '), + nextDay: processHoursFunction('[Завтра '), + lastDay: processHoursFunction('[Вчора '), + nextWeek: processHoursFunction('[У] dddd ['), + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return processHoursFunction('[Минулої] dddd [').call(this); + case 1: + case 2: + case 4: + return processHoursFunction('[Минулого] dddd [').call(this); + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'за %s', + past : '%s тому', + s : 'декілька секунд', + ss : relativeTimeWithPlural, + m : relativeTimeWithPlural, + mm : relativeTimeWithPlural, + h : 'годину', + hh : relativeTimeWithPlural, + d : 'день', + dd : relativeTimeWithPlural, + M : 'місяць', + MM : relativeTimeWithPlural, + y : 'рік', + yy : relativeTimeWithPlural + }, + // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason + meridiemParse: /ночі|ранку|дня|вечора/, + isPM: function (input) { + return /^(дня|вечора)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ночі'; + } else if (hour < 12) { + return 'ранку'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечора'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return number + '-й'; + case 'D': + return number + '-го'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return uk; + +}))); diff --git a/node_modules/moment/locale/ur.js b/node_modules/moment/locale/ur.js new file mode 100644 index 00000000..16093125 --- /dev/null +++ b/node_modules/moment/locale/ur.js @@ -0,0 +1,97 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var months = [ + 'جنوری', + 'فروری', + 'مارچ', + 'اپریل', + 'مئی', + 'جون', + 'جولائی', + 'اگست', + 'ستمبر', + 'اکتوبر', + 'نومبر', + 'دسمبر' + ]; + var days = [ + 'اتوار', + 'پیر', + 'منگل', + 'بدھ', + 'جمعرات', + 'جمعہ', + 'ہفتہ' + ]; + + var ur = moment.defineLocale('ur', { + months : months, + monthsShort : months, + weekdays : days, + weekdaysShort : days, + weekdaysMin : days, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd، D MMMM YYYY HH:mm' + }, + meridiemParse: /صبح|شام/, + isPM : function (input) { + return 'شام' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar : { + sameDay : '[آج بوقت] LT', + nextDay : '[کل بوقت] LT', + nextWeek : 'dddd [بوقت] LT', + lastDay : '[گذشتہ روز بوقت] LT', + lastWeek : '[گذشتہ] dddd [بوقت] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s بعد', + past : '%s قبل', + s : 'چند سیکنڈ', + ss : '%d سیکنڈ', + m : 'ایک منٹ', + mm : '%d منٹ', + h : 'ایک گھنٹہ', + hh : '%d گھنٹے', + d : 'ایک دن', + dd : '%d دن', + M : 'ایک ماہ', + MM : '%d ماہ', + y : 'ایک سال', + yy : '%d سال' + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return ur; + +}))); diff --git a/node_modules/moment/locale/uz-latn.js b/node_modules/moment/locale/uz-latn.js new file mode 100644 index 00000000..41a348cb --- /dev/null +++ b/node_modules/moment/locale/uz-latn.js @@ -0,0 +1,57 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var uzLatn = moment.defineLocale('uz-latn', { + months : 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'), + monthsShort : 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), + weekdays : 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'), + weekdaysShort : 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), + weekdaysMin : 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'D MMMM YYYY, dddd HH:mm' + }, + calendar : { + sameDay : '[Bugun soat] LT [da]', + nextDay : '[Ertaga] LT [da]', + nextWeek : 'dddd [kuni soat] LT [da]', + lastDay : '[Kecha soat] LT [da]', + lastWeek : '[O\'tgan] dddd [kuni soat] LT [da]', + sameElse : 'L' + }, + relativeTime : { + future : 'Yaqin %s ichida', + past : 'Bir necha %s oldin', + s : 'soniya', + ss : '%d soniya', + m : 'bir daqiqa', + mm : '%d daqiqa', + h : 'bir soat', + hh : '%d soat', + d : 'bir kun', + dd : '%d kun', + M : 'bir oy', + MM : '%d oy', + y : 'bir yil', + yy : '%d yil' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + return uzLatn; + +}))); diff --git a/node_modules/moment/locale/uz.js b/node_modules/moment/locale/uz.js new file mode 100644 index 00000000..0e4ad22d --- /dev/null +++ b/node_modules/moment/locale/uz.js @@ -0,0 +1,57 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var uz = moment.defineLocale('uz', { + months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), + monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'), + weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'), + weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'D MMMM YYYY, dddd HH:mm' + }, + calendar : { + sameDay : '[Бугун соат] LT [да]', + nextDay : '[Эртага] LT [да]', + nextWeek : 'dddd [куни соат] LT [да]', + lastDay : '[Кеча соат] LT [да]', + lastWeek : '[Утган] dddd [куни соат] LT [да]', + sameElse : 'L' + }, + relativeTime : { + future : 'Якин %s ичида', + past : 'Бир неча %s олдин', + s : 'фурсат', + ss : '%d фурсат', + m : 'бир дакика', + mm : '%d дакика', + h : 'бир соат', + hh : '%d соат', + d : 'бир кун', + dd : '%d кун', + M : 'бир ой', + MM : '%d ой', + y : 'бир йил', + yy : '%d йил' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 4th is the first week of the year. + } + }); + + return uz; + +}))); diff --git a/node_modules/moment/locale/vi.js b/node_modules/moment/locale/vi.js new file mode 100644 index 00000000..6fcbeafc --- /dev/null +++ b/node_modules/moment/locale/vi.js @@ -0,0 +1,78 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var vi = moment.defineLocale('vi', { + months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'), + monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'), + monthsParseExact : true, + weekdays : 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'), + weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysParseExact : true, + meridiemParse: /sa|ch/i, + isPM : function (input) { + return /^ch$/i.test(input); + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'sa' : 'SA'; + } else { + return isLower ? 'ch' : 'CH'; + } + }, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM [năm] YYYY', + LLL : 'D MMMM [năm] YYYY HH:mm', + LLLL : 'dddd, D MMMM [năm] YYYY HH:mm', + l : 'DD/M/YYYY', + ll : 'D MMM YYYY', + lll : 'D MMM YYYY HH:mm', + llll : 'ddd, D MMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Hôm nay lúc] LT', + nextDay: '[Ngày mai lúc] LT', + nextWeek: 'dddd [tuần tới lúc] LT', + lastDay: '[Hôm qua lúc] LT', + lastWeek: 'dddd [tuần rồi lúc] LT', + sameElse: 'L' + }, + relativeTime : { + future : '%s tới', + past : '%s trước', + s : 'vài giây', + ss : '%d giây' , + m : 'một phút', + mm : '%d phút', + h : 'một giờ', + hh : '%d giờ', + d : 'một ngày', + dd : '%d ngày', + M : 'một tháng', + MM : '%d tháng', + y : 'một năm', + yy : '%d năm' + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal : function (number) { + return number; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return vi; + +}))); diff --git a/node_modules/moment/locale/x-pseudo.js b/node_modules/moment/locale/x-pseudo.js new file mode 100644 index 00000000..9723c7ba --- /dev/null +++ b/node_modules/moment/locale/x-pseudo.js @@ -0,0 +1,67 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var xPseudo = moment.defineLocale('x-pseudo', { + months : 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'), + monthsShort : 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'), + monthsParseExact : true, + weekdays : 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'), + weekdaysShort : 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'), + weekdaysMin : 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[T~ódá~ý át] LT', + nextDay : '[T~ómó~rró~w át] LT', + nextWeek : 'dddd [át] LT', + lastDay : '[Ý~ést~érdá~ý át] LT', + lastWeek : '[L~ást] dddd [át] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'í~ñ %s', + past : '%s á~gó', + s : 'á ~féw ~sécó~ñds', + ss : '%d s~écóñ~ds', + m : 'á ~míñ~úté', + mm : '%d m~íñú~tés', + h : 'á~ñ hó~úr', + hh : '%d h~óúrs', + d : 'á ~dáý', + dd : '%d d~áýs', + M : 'á ~móñ~th', + MM : '%d m~óñt~hs', + y : 'á ~ýéár', + yy : '%d ý~éárs' + }, + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return xPseudo; + +}))); diff --git a/node_modules/moment/locale/yo.js b/node_modules/moment/locale/yo.js new file mode 100644 index 00000000..1a356dca --- /dev/null +++ b/node_modules/moment/locale/yo.js @@ -0,0 +1,59 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var yo = moment.defineLocale('yo', { + months : 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'), + monthsShort : 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'), + weekdays : 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'), + weekdaysShort : 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'), + weekdaysMin : 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Ònì ni] LT', + nextDay : '[Ọ̀la ni] LT', + nextWeek : 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT', + lastDay : '[Àna ni] LT', + lastWeek : 'dddd [Ọsẹ̀ tólọ́] [ni] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ní %s', + past : '%s kọjá', + s : 'ìsẹjú aayá die', + ss :'aayá %d', + m : 'ìsẹjú kan', + mm : 'ìsẹjú %d', + h : 'wákati kan', + hh : 'wákati %d', + d : 'ọjọ́ kan', + dd : 'ọjọ́ %d', + M : 'osù kan', + MM : 'osù %d', + y : 'ọdún kan', + yy : 'ọdún %d' + }, + dayOfMonthOrdinalParse : /ọjọ́\s\d{1,2}/, + ordinal : 'ọjọ́ %d', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return yo; + +}))); diff --git a/node_modules/moment/locale/zh-cn.js b/node_modules/moment/locale/zh-cn.js new file mode 100644 index 00000000..b051f33c --- /dev/null +++ b/node_modules/moment/locale/zh-cn.js @@ -0,0 +1,109 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var zhCn = moment.defineLocale('zh-cn', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'), + weekdaysMin : '日_一_二_三_四_五_六'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日Ah点mm分', + LLLL : 'YYYY年M月D日ddddAh点mm分', + l : 'YYYY/M/D', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日dddd HH:mm' + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || + meridiem === '上午') { + return hour; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } else { + // '中午' + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar : { + sameDay : '[今天]LT', + nextDay : '[明天]LT', + nextWeek : '[下]ddddLT', + lastDay : '[昨天]LT', + lastWeek : '[上]ddddLT', + sameElse : 'L' + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '周'; + default: + return number; + } + }, + relativeTime : { + future : '%s内', + past : '%s前', + s : '几秒', + ss : '%d 秒', + m : '1 分钟', + mm : '%d 分钟', + h : '1 小时', + hh : '%d 小时', + d : '1 天', + dd : '%d 天', + M : '1 个月', + MM : '%d 个月', + y : '1 年', + yy : '%d 年' + }, + week : { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + return zhCn; + +}))); diff --git a/node_modules/moment/locale/zh-hk.js b/node_modules/moment/locale/zh-hk.js new file mode 100644 index 00000000..0ad0ae31 --- /dev/null +++ b/node_modules/moment/locale/zh-hk.js @@ -0,0 +1,102 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var zhHk = moment.defineLocale('zh-hk', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin : '日_一_二_三_四_五_六'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日 HH:mm', + LLLL : 'YYYY年M月D日dddd HH:mm', + l : 'YYYY/M/D', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日dddd HH:mm' + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar : { + sameDay : '[今天]LT', + nextDay : '[明天]LT', + nextWeek : '[下]ddddLT', + lastDay : '[昨天]LT', + lastWeek : '[上]ddddLT', + sameElse : 'L' + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal : function (number, period) { + switch (period) { + case 'd' : + case 'D' : + case 'DDD' : + return number + '日'; + case 'M' : + return number + '月'; + case 'w' : + case 'W' : + return number + '週'; + default : + return number; + } + }, + relativeTime : { + future : '%s內', + past : '%s前', + s : '幾秒', + ss : '%d 秒', + m : '1 分鐘', + mm : '%d 分鐘', + h : '1 小時', + hh : '%d 小時', + d : '1 天', + dd : '%d 天', + M : '1 個月', + MM : '%d 個月', + y : '1 年', + yy : '%d 年' + } + }); + + return zhHk; + +}))); diff --git a/node_modules/moment/locale/zh-tw.js b/node_modules/moment/locale/zh-tw.js new file mode 100644 index 00000000..6875cfed --- /dev/null +++ b/node_modules/moment/locale/zh-tw.js @@ -0,0 +1,102 @@ +//! moment.js locale configuration + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + + var zhTw = moment.defineLocale('zh-tw', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin : '日_一_二_三_四_五_六'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日 HH:mm', + LLLL : 'YYYY年M月D日dddd HH:mm', + l : 'YYYY/M/D', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日dddd HH:mm' + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar : { + sameDay : '[今天] LT', + nextDay : '[明天] LT', + nextWeek : '[下]dddd LT', + lastDay : '[昨天] LT', + lastWeek : '[上]dddd LT', + sameElse : 'L' + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal : function (number, period) { + switch (period) { + case 'd' : + case 'D' : + case 'DDD' : + return number + '日'; + case 'M' : + return number + '月'; + case 'w' : + case 'W' : + return number + '週'; + default : + return number; + } + }, + relativeTime : { + future : '%s內', + past : '%s前', + s : '幾秒', + ss : '%d 秒', + m : '1 分鐘', + mm : '%d 分鐘', + h : '1 小時', + hh : '%d 小時', + d : '1 天', + dd : '%d 天', + M : '1 個月', + MM : '%d 個月', + y : '1 年', + yy : '%d 年' + } + }); + + return zhTw; + +}))); diff --git a/node_modules/moment/min/locales.js b/node_modules/moment/min/locales.js new file mode 100644 index 00000000..9b8b2061 --- /dev/null +++ b/node_modules/moment/min/locales.js @@ -0,0 +1,10178 @@ +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + //! moment.js locale configuration + + moment.defineLocale('af', { + months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'), + monthsShort : 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), + weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'), + weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), + weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), + meridiemParse: /vm|nm/i, + isPM : function (input) { + return /^nm$/i.test(input); + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'vm' : 'VM'; + } else { + return isLower ? 'nm' : 'NM'; + } + }, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Vandag om] LT', + nextDay : '[Môre om] LT', + nextWeek : 'dddd [om] LT', + lastDay : '[Gister om] LT', + lastWeek : '[Laas] dddd [om] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'oor %s', + past : '%s gelede', + s : '\'n paar sekondes', + ss : '%d sekondes', + m : '\'n minuut', + mm : '%d minute', + h : '\'n uur', + hh : '%d ure', + d : '\'n dag', + dd : '%d dae', + M : '\'n maand', + MM : '%d maande', + y : '\'n jaar', + yy : '%d jaar' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter + }, + week : { + dow : 1, // Maandag is die eerste dag van die week. + doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('ar-dz', { + months : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + monthsShort : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('ar-kw', { + months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '0': '0' + }, pluralForm = function (n) { + return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; + }, plurals = { + s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'], + m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'], + h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'], + d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'], + M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'], + y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام'] + }, pluralize = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm(number), + str = plurals[u][pluralForm(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, months = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر' + ]; + + moment.defineLocale('ar-ly', { + months : months, + monthsShort : months, + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'D/\u200FM/\u200FYYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ص|م/, + isPM : function (input) { + return 'م' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar : { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'بعد %s', + past : 'منذ %s', + s : pluralize('s'), + ss : pluralize('s'), + m : pluralize('m'), + mm : pluralize('m'), + h : pluralize('h'), + hh : pluralize('h'), + d : pluralize('d'), + dd : pluralize('d'), + M : pluralize('M'), + MM : pluralize('M'), + y : pluralize('y'), + yy : pluralize('y') + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('ar-ma', { + months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$1 = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠' + }, numberMap = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0' + }; + + moment.defineLocale('ar-sa', { + months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ص|م/, + isPM : function (input) { + return 'م' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + preparse: function (string) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$1[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('ar-tn', { + months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss : '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات' + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$2 = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠' + }, numberMap$1 = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0' + }, pluralForm$1 = function (n) { + return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; + }, plurals$1 = { + s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'], + m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'], + h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'], + d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'], + M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'], + y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام'] + }, pluralize$1 = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm$1(number), + str = plurals$1[u][pluralForm$1(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, months$1 = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر' + ]; + + moment.defineLocale('ar', { + months : months$1, + monthsShort : months$1, + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'D/\u200FM/\u200FYYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ص|م/, + isPM : function (input) { + return 'م' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar : { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'بعد %s', + past : 'منذ %s', + s : pluralize$1('s'), + ss : pluralize$1('s'), + m : pluralize$1('m'), + mm : pluralize$1('m'), + h : pluralize$1('h'), + hh : pluralize$1('h'), + d : pluralize$1('d'), + dd : pluralize$1('d'), + M : pluralize$1('M'), + MM : pluralize$1('M'), + y : pluralize$1('y'), + yy : pluralize$1('y') + }, + preparse: function (string) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap$1[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$2[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var suffixes = { + 1: '-inci', + 5: '-inci', + 8: '-inci', + 70: '-inci', + 80: '-inci', + 2: '-nci', + 7: '-nci', + 20: '-nci', + 50: '-nci', + 3: '-üncü', + 4: '-üncü', + 100: '-üncü', + 6: '-ncı', + 9: '-uncu', + 10: '-uncu', + 30: '-uncu', + 60: '-ıncı', + 90: '-ıncı' + }; + + moment.defineLocale('az', { + months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'), + monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), + weekdays : 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'), + weekdaysShort : 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'), + weekdaysMin : 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[bugün saat] LT', + nextDay : '[sabah saat] LT', + nextWeek : '[gələn həftə] dddd [saat] LT', + lastDay : '[dünən] LT', + lastWeek : '[keçən həftə] dddd [saat] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s sonra', + past : '%s əvvəl', + s : 'birneçə saniyə', + ss : '%d saniyə', + m : 'bir dəqiqə', + mm : '%d dəqiqə', + h : 'bir saat', + hh : '%d saat', + d : 'bir gün', + dd : '%d gün', + M : 'bir ay', + MM : '%d ay', + y : 'bir il', + yy : '%d il' + }, + meridiemParse: /gecə|səhər|gündüz|axşam/, + isPM : function (input) { + return /^(gündüz|axşam)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'gecə'; + } else if (hour < 12) { + return 'səhər'; + } else if (hour < 17) { + return 'gündüz'; + } else { + return 'axşam'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, + ordinal : function (number) { + if (number === 0) { // special case for zero + return number + '-ıncı'; + } + var a = number % 10, + b = number % 100 - a, + c = number >= 100 ? 100 : null; + return number + (suffixes[a] || suffixes[b] || suffixes[c]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); + } + function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + 'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін', + 'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін', + 'dd': 'дзень_дні_дзён', + 'MM': 'месяц_месяцы_месяцаў', + 'yy': 'год_гады_гадоў' + }; + if (key === 'm') { + return withoutSuffix ? 'хвіліна' : 'хвіліну'; + } + else if (key === 'h') { + return withoutSuffix ? 'гадзіна' : 'гадзіну'; + } + else { + return number + ' ' + plural(format[key], +number); + } + } + + moment.defineLocale('be', { + months : { + format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'), + standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_') + }, + monthsShort : 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'), + weekdays : { + format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'), + standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'), + isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/ + }, + weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY г.', + LLL : 'D MMMM YYYY г., HH:mm', + LLLL : 'dddd, D MMMM YYYY г., HH:mm' + }, + calendar : { + sameDay: '[Сёння ў] LT', + nextDay: '[Заўтра ў] LT', + lastDay: '[Учора ў] LT', + nextWeek: function () { + return '[У] dddd [ў] LT'; + }, + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return '[У мінулую] dddd [ў] LT'; + case 1: + case 2: + case 4: + return '[У мінулы] dddd [ў] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'праз %s', + past : '%s таму', + s : 'некалькі секунд', + m : relativeTimeWithPlural, + mm : relativeTimeWithPlural, + h : relativeTimeWithPlural, + hh : relativeTimeWithPlural, + d : 'дзень', + dd : relativeTimeWithPlural, + M : 'месяц', + MM : relativeTimeWithPlural, + y : 'год', + yy : relativeTimeWithPlural + }, + meridiemParse: /ночы|раніцы|дня|вечара/, + isPM : function (input) { + return /^(дня|вечара)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ночы'; + } else if (hour < 12) { + return 'раніцы'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечара'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-і' : number + '-ы'; + case 'D': + return number + '-га'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('bg', { + months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'), + monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'), + weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'), + weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'), + weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'D.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY H:mm', + LLLL : 'dddd, D MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[Днес в] LT', + nextDay : '[Утре в] LT', + nextWeek : 'dddd [в] LT', + lastDay : '[Вчера в] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[В изминалата] dddd [в] LT'; + case 1: + case 2: + case 4: + case 5: + return '[В изминалия] dddd [в] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'след %s', + past : 'преди %s', + s : 'няколко секунди', + ss : '%d секунди', + m : 'минута', + mm : '%d минути', + h : 'час', + hh : '%d часа', + d : 'ден', + dd : '%d дни', + M : 'месец', + MM : '%d месеца', + y : 'година', + yy : '%d години' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal : function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('bm', { + months : 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split('_'), + monthsShort : 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'), + weekdays : 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'), + weekdaysShort : 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'), + weekdaysMin : 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'MMMM [tile] D [san] YYYY', + LLL : 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + LLLL : 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm' + }, + calendar : { + sameDay : '[Bi lɛrɛ] LT', + nextDay : '[Sini lɛrɛ] LT', + nextWeek : 'dddd [don lɛrɛ] LT', + lastDay : '[Kunu lɛrɛ] LT', + lastWeek : 'dddd [tɛmɛnen lɛrɛ] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s kɔnɔ', + past : 'a bɛ %s bɔ', + s : 'sanga dama dama', + ss : 'sekondi %d', + m : 'miniti kelen', + mm : 'miniti %d', + h : 'lɛrɛ kelen', + hh : 'lɛrɛ %d', + d : 'tile kelen', + dd : 'tile %d', + M : 'kalo kelen', + MM : 'kalo %d', + y : 'san kelen', + yy : 'san %d' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$3 = { + '1': '১', + '2': '২', + '3': '৩', + '4': '৪', + '5': '৫', + '6': '৬', + '7': '৭', + '8': '৮', + '9': '৯', + '0': '০' + }, + numberMap$2 = { + '১': '1', + '২': '2', + '৩': '3', + '৪': '4', + '৫': '5', + '৬': '6', + '৭': '7', + '৮': '8', + '৯': '9', + '০': '0' + }; + + moment.defineLocale('bn', { + months : 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'), + monthsShort : 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'), + weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'), + weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'), + weekdaysMin : 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'), + longDateFormat : { + LT : 'A h:mm সময়', + LTS : 'A h:mm:ss সময়', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm সময়', + LLLL : 'dddd, D MMMM YYYY, A h:mm সময়' + }, + calendar : { + sameDay : '[আজ] LT', + nextDay : '[আগামীকাল] LT', + nextWeek : 'dddd, LT', + lastDay : '[গতকাল] LT', + lastWeek : '[গত] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s পরে', + past : '%s আগে', + s : 'কয়েক সেকেন্ড', + ss : '%d সেকেন্ড', + m : 'এক মিনিট', + mm : '%d মিনিট', + h : 'এক ঘন্টা', + hh : '%d ঘন্টা', + d : 'এক দিন', + dd : '%d দিন', + M : 'এক মাস', + MM : '%d মাস', + y : 'এক বছর', + yy : '%d বছর' + }, + preparse: function (string) { + return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) { + return numberMap$2[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$3[match]; + }); + }, + meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ((meridiem === 'রাত' && hour >= 4) || + (meridiem === 'দুপুর' && hour < 5) || + meridiem === 'বিকাল') { + return hour + 12; + } else { + return hour; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'রাত'; + } else if (hour < 10) { + return 'সকাল'; + } else if (hour < 17) { + return 'দুপুর'; + } else if (hour < 20) { + return 'বিকাল'; + } else { + return 'রাত'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$4 = { + '1': '༡', + '2': '༢', + '3': '༣', + '4': '༤', + '5': '༥', + '6': '༦', + '7': '༧', + '8': '༨', + '9': '༩', + '0': '༠' + }, + numberMap$3 = { + '༡': '1', + '༢': '2', + '༣': '3', + '༤': '4', + '༥': '5', + '༦': '6', + '༧': '7', + '༨': '8', + '༩': '9', + '༠': '0' + }; + + moment.defineLocale('bo', { + months : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), + monthsShort : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), + weekdays : 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'), + weekdaysShort : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), + weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm', + LLLL : 'dddd, D MMMM YYYY, A h:mm' + }, + calendar : { + sameDay : '[དི་རིང] LT', + nextDay : '[སང་ཉིན] LT', + nextWeek : '[བདུན་ཕྲག་རྗེས་མ], LT', + lastDay : '[ཁ་སང] LT', + lastWeek : '[བདུན་ཕྲག་མཐའ་མ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ལ་', + past : '%s སྔན་ལ', + s : 'ལམ་སང', + ss : '%d སྐར་ཆ།', + m : 'སྐར་མ་གཅིག', + mm : '%d སྐར་མ', + h : 'ཆུ་ཚོད་གཅིག', + hh : '%d ཆུ་ཚོད', + d : 'ཉིན་གཅིག', + dd : '%d ཉིན་', + M : 'ཟླ་བ་གཅིག', + MM : '%d ཟླ་བ', + y : 'ལོ་གཅིག', + yy : '%d ལོ' + }, + preparse: function (string) { + return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) { + return numberMap$3[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$4[match]; + }); + }, + meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ((meridiem === 'མཚན་མོ' && hour >= 4) || + (meridiem === 'ཉིན་གུང' && hour < 5) || + meridiem === 'དགོང་དག') { + return hour + 12; + } else { + return hour; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'མཚན་མོ'; + } else if (hour < 10) { + return 'ཞོགས་ཀས'; + } else if (hour < 17) { + return 'ཉིན་གུང'; + } else if (hour < 20) { + return 'དགོང་དག'; + } else { + return 'མཚན་མོ'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function relativeTimeWithMutation(number, withoutSuffix, key) { + var format = { + 'mm': 'munutenn', + 'MM': 'miz', + 'dd': 'devezh' + }; + return number + ' ' + mutation(format[key], number); + } + function specialMutationForYears(number) { + switch (lastNumber(number)) { + case 1: + case 3: + case 4: + case 5: + case 9: + return number + ' bloaz'; + default: + return number + ' vloaz'; + } + } + function lastNumber(number) { + if (number > 9) { + return lastNumber(number % 10); + } + return number; + } + function mutation(text, number) { + if (number === 2) { + return softMutation(text); + } + return text; + } + function softMutation(text) { + var mutationTable = { + 'm': 'v', + 'b': 'v', + 'd': 'z' + }; + if (mutationTable[text.charAt(0)] === undefined) { + return text; + } + return mutationTable[text.charAt(0)] + text.substring(1); + } + + moment.defineLocale('br', { + months : 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'), + monthsShort : 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), + weekdays : 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'), + weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), + weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h[e]mm A', + LTS : 'h[e]mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D [a viz] MMMM YYYY', + LLL : 'D [a viz] MMMM YYYY h[e]mm A', + LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A' + }, + calendar : { + sameDay : '[Hiziv da] LT', + nextDay : '[Warc\'hoazh da] LT', + nextWeek : 'dddd [da] LT', + lastDay : '[Dec\'h da] LT', + lastWeek : 'dddd [paset da] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'a-benn %s', + past : '%s \'zo', + s : 'un nebeud segondennoù', + ss : '%d eilenn', + m : 'ur vunutenn', + mm : relativeTimeWithMutation, + h : 'un eur', + hh : '%d eur', + d : 'un devezh', + dd : relativeTimeWithMutation, + M : 'ur miz', + MM : relativeTimeWithMutation, + y : 'ur bloaz', + yy : specialMutationForYears + }, + dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/, + ordinal : function (number) { + var output = (number === 1) ? 'añ' : 'vet'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function translate(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } + } + + moment.defineLocale('bs', { + months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'), + monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[danas u] LT', + nextDay : '[sutra u] LT', + nextWeek : function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[jučer u] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'prije %s', + s : 'par sekundi', + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : 'dan', + dd : translate, + M : 'mjesec', + MM : translate, + y : 'godinu', + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('ca', { + months : { + standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'), + format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'), + isFormat: /D[oD]?(\s)+MMMM/ + }, + monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'), + monthsParseExact : true, + weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'), + weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'), + weekdaysMin : 'dg_dl_dt_dc_dj_dv_ds'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM [de] YYYY', + ll : 'D MMM YYYY', + LLL : 'D MMMM [de] YYYY [a les] H:mm', + lll : 'D MMM YYYY, H:mm', + LLLL : 'dddd D MMMM [de] YYYY [a les] H:mm', + llll : 'ddd D MMM YYYY, H:mm' + }, + calendar : { + sameDay : function () { + return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + nextDay : function () { + return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + lastDay : function () { + return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'd\'aquí %s', + past : 'fa %s', + s : 'uns segons', + ss : '%d segons', + m : 'un minut', + mm : '%d minuts', + h : 'una hora', + hh : '%d hores', + d : 'un dia', + dd : '%d dies', + M : 'un mes', + MM : '%d mesos', + y : 'un any', + yy : '%d anys' + }, + dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, + ordinal : function (number, period) { + var output = (number === 1) ? 'r' : + (number === 2) ? 'n' : + (number === 3) ? 'r' : + (number === 4) ? 't' : 'è'; + if (period === 'w' || period === 'W') { + output = 'a'; + } + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var months$2 = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'), + monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'); + + var monthsParse = [/^led/i, /^úno/i, /^bře/i, /^dub/i, /^kvě/i, /^(čvn|červen$|června)/i, /^(čvc|červenec|července)/i, /^srp/i, /^zář/i, /^říj/i, /^lis/i, /^pro/i]; + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + var monthsRegex = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i; + + function plural$1(n) { + return (n > 1) && (n < 5) && (~~(n / 10) !== 1); + } + function translate$1(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'sekundy' : 'sekund'); + } else { + return result + 'sekundami'; + } + break; + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou'); + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'minuty' : 'minut'); + } else { + return result + 'minutami'; + } + break; + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'hodiny' : 'hodin'); + } else { + return result + 'hodinami'; + } + break; + case 'd': // a day / in a day / a day ago + return (withoutSuffix || isFuture) ? 'den' : 'dnem'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'dny' : 'dní'); + } else { + return result + 'dny'; + } + break; + case 'M': // a month / in a month / a month ago + return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'měsíce' : 'měsíců'); + } else { + return result + 'měsíci'; + } + break; + case 'y': // a year / in a year / a year ago + return (withoutSuffix || isFuture) ? 'rok' : 'rokem'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'roky' : 'let'); + } else { + return result + 'lety'; + } + break; + } + } + + moment.defineLocale('cs', { + months : months$2, + monthsShort : monthsShort, + monthsRegex : monthsRegex, + monthsShortRegex : monthsRegex, + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + monthsStrictRegex : /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i, + monthsShortStrictRegex : /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i, + monthsParse : monthsParse, + longMonthsParse : monthsParse, + shortMonthsParse : monthsParse, + weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'), + weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'), + weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'), + longDateFormat : { + LT: 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd D. MMMM YYYY H:mm', + l : 'D. M. YYYY' + }, + calendar : { + sameDay: '[dnes v] LT', + nextDay: '[zítra v] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v neděli v] LT'; + case 1: + case 2: + return '[v] dddd [v] LT'; + case 3: + return '[ve středu v] LT'; + case 4: + return '[ve čtvrtek v] LT'; + case 5: + return '[v pátek v] LT'; + case 6: + return '[v sobotu v] LT'; + } + }, + lastDay: '[včera v] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulou neděli v] LT'; + case 1: + case 2: + return '[minulé] dddd [v] LT'; + case 3: + return '[minulou středu v] LT'; + case 4: + case 5: + return '[minulý] dddd [v] LT'; + case 6: + return '[minulou sobotu v] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'za %s', + past : 'před %s', + s : translate$1, + ss : translate$1, + m : translate$1, + mm : translate$1, + h : translate$1, + hh : translate$1, + d : translate$1, + dd : translate$1, + M : translate$1, + MM : translate$1, + y : translate$1, + yy : translate$1 + }, + dayOfMonthOrdinalParse : /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('cv', { + months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'), + monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'), + weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'), + weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'), + weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD-MM-YYYY', + LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', + LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm' + }, + calendar : { + sameDay: '[Паян] LT [сехетре]', + nextDay: '[Ыран] LT [сехетре]', + lastDay: '[Ӗнер] LT [сехетре]', + nextWeek: '[Ҫитес] dddd LT [сехетре]', + lastWeek: '[Иртнӗ] dddd LT [сехетре]', + sameElse: 'L' + }, + relativeTime : { + future : function (output) { + var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран'; + return output + affix; + }, + past : '%s каялла', + s : 'пӗр-ик ҫеккунт', + ss : '%d ҫеккунт', + m : 'пӗр минут', + mm : '%d минут', + h : 'пӗр сехет', + hh : '%d сехет', + d : 'пӗр кун', + dd : '%d кун', + M : 'пӗр уйӑх', + MM : '%d уйӑх', + y : 'пӗр ҫул', + yy : '%d ҫул' + }, + dayOfMonthOrdinalParse: /\d{1,2}-мӗш/, + ordinal : '%d-мӗш', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('cy', { + months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'), + monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'), + weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'), + weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), + weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), + weekdaysParseExact : true, + // time formats are the same as en-gb + longDateFormat: { + LT: 'HH:mm', + LTS : 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[Heddiw am] LT', + nextDay: '[Yfory am] LT', + nextWeek: 'dddd [am] LT', + lastDay: '[Ddoe am] LT', + lastWeek: 'dddd [diwethaf am] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'mewn %s', + past: '%s yn ôl', + s: 'ychydig eiliadau', + ss: '%d eiliad', + m: 'munud', + mm: '%d munud', + h: 'awr', + hh: '%d awr', + d: 'diwrnod', + dd: '%d diwrnod', + M: 'mis', + MM: '%d mis', + y: 'blwyddyn', + yy: '%d flynedd' + }, + dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, + // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh + ordinal: function (number) { + var b = number, + output = '', + lookup = [ + '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed + 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed + ]; + if (b > 20) { + if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { + output = 'fed'; // not 30ain, 70ain or 90ain + } else { + output = 'ain'; + } + } else if (b > 0) { + output = lookup[b]; + } + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('da', { + months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'), + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'), + weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm' + }, + calendar : { + sameDay : '[i dag kl.] LT', + nextDay : '[i morgen kl.] LT', + nextWeek : 'på dddd [kl.] LT', + lastDay : '[i går kl.] LT', + lastWeek : '[i] dddd[s kl.] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'om %s', + past : '%s siden', + s : 'få sekunder', + ss : '%d sekunder', + m : 'et minut', + mm : '%d minutter', + h : 'en time', + hh : '%d timer', + d : 'en dag', + dd : '%d dage', + M : 'en måned', + MM : '%d måneder', + y : 'et år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eine Minute', 'einer Minute'], + 'h': ['eine Stunde', 'einer Stunde'], + 'd': ['ein Tag', 'einem Tag'], + 'dd': [number + ' Tage', number + ' Tagen'], + 'M': ['ein Monat', 'einem Monat'], + 'MM': [number + ' Monate', number + ' Monaten'], + 'y': ['ein Jahr', 'einem Jahr'], + 'yy': [number + ' Jahre', number + ' Jahren'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + moment.defineLocale('de-at', { + months : 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort : 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd, D. MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]' + }, + relativeTime : { + future : 'in %s', + past : 'vor %s', + s : 'ein paar Sekunden', + ss : '%d Sekunden', + m : processRelativeTime, + mm : '%d Minuten', + h : processRelativeTime, + hh : '%d Stunden', + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function processRelativeTime$1(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eine Minute', 'einer Minute'], + 'h': ['eine Stunde', 'einer Stunde'], + 'd': ['ein Tag', 'einem Tag'], + 'dd': [number + ' Tage', number + ' Tagen'], + 'M': ['ein Monat', 'einem Monat'], + 'MM': [number + ' Monate', number + ' Monaten'], + 'y': ['ein Jahr', 'einem Jahr'], + 'yy': [number + ' Jahre', number + ' Jahren'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + moment.defineLocale('de-ch', { + months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd, D. MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]' + }, + relativeTime : { + future : 'in %s', + past : 'vor %s', + s : 'ein paar Sekunden', + ss : '%d Sekunden', + m : processRelativeTime$1, + mm : '%d Minuten', + h : processRelativeTime$1, + hh : '%d Stunden', + d : processRelativeTime$1, + dd : processRelativeTime$1, + M : processRelativeTime$1, + MM : processRelativeTime$1, + y : processRelativeTime$1, + yy : processRelativeTime$1 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function processRelativeTime$2(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eine Minute', 'einer Minute'], + 'h': ['eine Stunde', 'einer Stunde'], + 'd': ['ein Tag', 'einem Tag'], + 'dd': [number + ' Tage', number + ' Tagen'], + 'M': ['ein Monat', 'einem Monat'], + 'MM': [number + ' Monate', number + ' Monaten'], + 'y': ['ein Jahr', 'einem Jahr'], + 'yy': [number + ' Jahre', number + ' Jahren'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + moment.defineLocale('de', { + months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd, D. MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]' + }, + relativeTime : { + future : 'in %s', + past : 'vor %s', + s : 'ein paar Sekunden', + ss : '%d Sekunden', + m : processRelativeTime$2, + mm : '%d Minuten', + h : processRelativeTime$2, + hh : '%d Stunden', + d : processRelativeTime$2, + dd : processRelativeTime$2, + M : processRelativeTime$2, + MM : processRelativeTime$2, + y : processRelativeTime$2, + yy : processRelativeTime$2 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var months$3 = [ + 'ޖެނުއަރީ', + 'ފެބްރުއަރީ', + 'މާރިޗު', + 'އޭޕްރީލު', + 'މޭ', + 'ޖޫން', + 'ޖުލައި', + 'އޯގަސްޓު', + 'ސެޕްޓެމްބަރު', + 'އޮކްޓޯބަރު', + 'ނޮވެމްބަރު', + 'ޑިސެމްބަރު' + ], weekdays = [ + 'އާދިއްތަ', + 'ހޯމަ', + 'އަންގާރަ', + 'ބުދަ', + 'ބުރާސްފަތި', + 'ހުކުރު', + 'ހޮނިހިރު' + ]; + + moment.defineLocale('dv', { + months : months$3, + monthsShort : months$3, + weekdays : weekdays, + weekdaysShort : weekdays, + weekdaysMin : 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'), + longDateFormat : { + + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'D/M/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /މކ|މފ/, + isPM : function (input) { + return 'މފ' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'މކ'; + } else { + return 'މފ'; + } + }, + calendar : { + sameDay : '[މިއަދު] LT', + nextDay : '[މާދަމާ] LT', + nextWeek : 'dddd LT', + lastDay : '[އިއްޔެ] LT', + lastWeek : '[ފާއިތުވި] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ތެރޭގައި %s', + past : 'ކުރިން %s', + s : 'ސިކުންތުކޮޅެއް', + ss : 'd% ސިކުންތު', + m : 'މިނިޓެއް', + mm : 'މިނިޓު %d', + h : 'ގަޑިއިރެއް', + hh : 'ގަޑިއިރު %d', + d : 'ދުވަހެއް', + dd : 'ދުވަސް %d', + M : 'މަހެއް', + MM : 'މަސް %d', + y : 'އަހަރެއް', + yy : 'އަހަރު %d' + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week : { + dow : 7, // Sunday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + + //! moment.js locale configuration + + moment.defineLocale('el', { + monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'), + monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'), + months : function (momentToFormat, format) { + if (!momentToFormat) { + return this._monthsNominativeEl; + } else if (typeof format === 'string' && /D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM' + return this._monthsGenitiveEl[momentToFormat.month()]; + } else { + return this._monthsNominativeEl[momentToFormat.month()]; + } + }, + monthsShort : 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'), + weekdays : 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'), + weekdaysShort : 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'), + weekdaysMin : 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'), + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'μμ' : 'ΜΜ'; + } else { + return isLower ? 'πμ' : 'ΠΜ'; + } + }, + isPM : function (input) { + return ((input + '').toLowerCase()[0] === 'μ'); + }, + meridiemParse : /[ΠΜ]\.?Μ?\.?/i, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendarEl : { + sameDay : '[Σήμερα {}] LT', + nextDay : '[Αύριο {}] LT', + nextWeek : 'dddd [{}] LT', + lastDay : '[Χθες {}] LT', + lastWeek : function () { + switch (this.day()) { + case 6: + return '[το προηγούμενο] dddd [{}] LT'; + default: + return '[την προηγούμενη] dddd [{}] LT'; + } + }, + sameElse : 'L' + }, + calendar : function (key, mom) { + var output = this._calendarEl[key], + hours = mom && mom.hours(); + if (isFunction(output)) { + output = output.apply(mom); + } + return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις')); + }, + relativeTime : { + future : 'σε %s', + past : '%s πριν', + s : 'λίγα δευτερόλεπτα', + ss : '%d δευτερόλεπτα', + m : 'ένα λεπτό', + mm : '%d λεπτά', + h : 'μία ώρα', + hh : '%d ώρες', + d : 'μία μέρα', + dd : '%d μέρες', + M : 'ένας μήνας', + MM : '%d μήνες', + y : 'ένας χρόνος', + yy : '%d χρόνια' + }, + dayOfMonthOrdinalParse: /\d{1,2}η/, + ordinal: '%dη', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4st is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('en-SG', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('en-au', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('en-ca', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'YYYY-MM-DD', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY h:mm A', + LLLL : 'dddd, MMMM D, YYYY h:mm A' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } + }); + + //! moment.js locale configuration + + moment.defineLocale('en-gb', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('en-ie', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('en-il', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } + }); + + //! moment.js locale configuration + + moment.defineLocale('en-nz', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('eo', { + months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'), + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'), + weekdays : 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'), + weekdaysShort : 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'), + weekdaysMin : 'di_lu_ma_me_ĵa_ve_sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'D[-a de] MMMM, YYYY', + LLL : 'D[-a de] MMMM, YYYY HH:mm', + LLLL : 'dddd, [la] D[-a de] MMMM, YYYY HH:mm' + }, + meridiemParse: /[ap]\.t\.m/i, + isPM: function (input) { + return input.charAt(0).toLowerCase() === 'p'; + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'p.t.m.' : 'P.T.M.'; + } else { + return isLower ? 'a.t.m.' : 'A.T.M.'; + } + }, + calendar : { + sameDay : '[Hodiaŭ je] LT', + nextDay : '[Morgaŭ je] LT', + nextWeek : 'dddd [je] LT', + lastDay : '[Hieraŭ je] LT', + lastWeek : '[pasinta] dddd [je] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'post %s', + past : 'antaŭ %s', + s : 'sekundoj', + ss : '%d sekundoj', + m : 'minuto', + mm : '%d minutoj', + h : 'horo', + hh : '%d horoj', + d : 'tago',//ne 'diurno', ĉar estas uzita por proksimumo + dd : '%d tagoj', + M : 'monato', + MM : '%d monatoj', + y : 'jaro', + yy : '%d jaroj' + }, + dayOfMonthOrdinalParse: /\d{1,2}a/, + ordinal : '%da', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), + monthsShort$1 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); + + var monthsParse$1 = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; + var monthsRegex$1 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + moment.defineLocale('es-do', { + months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortDot; + } else if (/-MMM-/.test(format)) { + return monthsShort$1[m.month()]; + } else { + return monthsShortDot[m.month()]; + } + }, + monthsRegex: monthsRegex$1, + monthsShortRegex: monthsRegex$1, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$1, + longMonthsParse: monthsParse$1, + shortMonthsParse: monthsParse$1, + weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY h:mm A', + LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A' + }, + calendar : { + sameDay : function () { + return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextDay : function () { + return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastDay : function () { + return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'en %s', + past : 'hace %s', + s : 'unos segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'una hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un año', + yy : '%d años' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var monthsShortDot$1 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), + monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); + + var monthsParse$2 = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; + var monthsRegex$2 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + moment.defineLocale('es-us', { + months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortDot$1; + } else if (/-MMM-/.test(format)) { + return monthsShort$2[m.month()]; + } else { + return monthsShortDot$1[m.month()]; + } + }, + monthsRegex: monthsRegex$2, + monthsShortRegex: monthsRegex$2, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$2, + longMonthsParse: monthsParse$2, + shortMonthsParse: monthsParse$2, + weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'MM/DD/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY h:mm A', + LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A' + }, + calendar : { + sameDay : function () { + return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextDay : function () { + return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastDay : function () { + return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'en %s', + past : 'hace %s', + s : 'unos segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'una hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un año', + yy : '%d años' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var monthsShortDot$2 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), + monthsShort$3 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); + + var monthsParse$3 = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; + var monthsRegex$3 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + moment.defineLocale('es', { + months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortDot$2; + } else if (/-MMM-/.test(format)) { + return monthsShort$3[m.month()]; + } else { + return monthsShortDot$2[m.month()]; + } + }, + monthsRegex : monthsRegex$3, + monthsShortRegex : monthsRegex$3, + monthsStrictRegex : /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex : /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse : monthsParse$3, + longMonthsParse : monthsParse$3, + shortMonthsParse : monthsParse$3, + weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY H:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm' + }, + calendar : { + sameDay : function () { + return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextDay : function () { + return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastDay : function () { + return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'en %s', + past : 'hace %s', + s : 'unos segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'una hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un año', + yy : '%d años' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function processRelativeTime$3(number, withoutSuffix, key, isFuture) { + var format = { + 's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'], + 'ss': [number + 'sekundi', number + 'sekundit'], + 'm' : ['ühe minuti', 'üks minut'], + 'mm': [number + ' minuti', number + ' minutit'], + 'h' : ['ühe tunni', 'tund aega', 'üks tund'], + 'hh': [number + ' tunni', number + ' tundi'], + 'd' : ['ühe päeva', 'üks päev'], + 'M' : ['kuu aja', 'kuu aega', 'üks kuu'], + 'MM': [number + ' kuu', number + ' kuud'], + 'y' : ['ühe aasta', 'aasta', 'üks aasta'], + 'yy': [number + ' aasta', number + ' aastat'] + }; + if (withoutSuffix) { + return format[key][2] ? format[key][2] : format[key][1]; + } + return isFuture ? format[key][0] : format[key][1]; + } + + moment.defineLocale('et', { + months : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'), + monthsShort : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'), + weekdays : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'), + weekdaysShort : 'P_E_T_K_N_R_L'.split('_'), + weekdaysMin : 'P_E_T_K_N_R_L'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[Täna,] LT', + nextDay : '[Homme,] LT', + nextWeek : '[Järgmine] dddd LT', + lastDay : '[Eile,] LT', + lastWeek : '[Eelmine] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s pärast', + past : '%s tagasi', + s : processRelativeTime$3, + ss : processRelativeTime$3, + m : processRelativeTime$3, + mm : processRelativeTime$3, + h : processRelativeTime$3, + hh : processRelativeTime$3, + d : processRelativeTime$3, + dd : '%d päeva', + M : processRelativeTime$3, + MM : processRelativeTime$3, + y : processRelativeTime$3, + yy : processRelativeTime$3 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('eu', { + months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'), + monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'), + monthsParseExact : true, + weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'), + weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'), + weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'YYYY[ko] MMMM[ren] D[a]', + LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm', + LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', + l : 'YYYY-M-D', + ll : 'YYYY[ko] MMM D[a]', + lll : 'YYYY[ko] MMM D[a] HH:mm', + llll : 'ddd, YYYY[ko] MMM D[a] HH:mm' + }, + calendar : { + sameDay : '[gaur] LT[etan]', + nextDay : '[bihar] LT[etan]', + nextWeek : 'dddd LT[etan]', + lastDay : '[atzo] LT[etan]', + lastWeek : '[aurreko] dddd LT[etan]', + sameElse : 'L' + }, + relativeTime : { + future : '%s barru', + past : 'duela %s', + s : 'segundo batzuk', + ss : '%d segundo', + m : 'minutu bat', + mm : '%d minutu', + h : 'ordu bat', + hh : '%d ordu', + d : 'egun bat', + dd : '%d egun', + M : 'hilabete bat', + MM : '%d hilabete', + y : 'urte bat', + yy : '%d urte' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$5 = { + '1': '۱', + '2': '۲', + '3': '۳', + '4': '۴', + '5': '۵', + '6': '۶', + '7': '۷', + '8': '۸', + '9': '۹', + '0': '۰' + }, numberMap$4 = { + '۱': '1', + '۲': '2', + '۳': '3', + '۴': '4', + '۵': '5', + '۶': '6', + '۷': '7', + '۸': '8', + '۹': '9', + '۰': '0' + }; + + moment.defineLocale('fa', { + months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), + monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), + weekdays : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), + weekdaysShort : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), + weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + meridiemParse: /قبل از ظهر|بعد از ظهر/, + isPM: function (input) { + return /بعد از ظهر/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'قبل از ظهر'; + } else { + return 'بعد از ظهر'; + } + }, + calendar : { + sameDay : '[امروز ساعت] LT', + nextDay : '[فردا ساعت] LT', + nextWeek : 'dddd [ساعت] LT', + lastDay : '[دیروز ساعت] LT', + lastWeek : 'dddd [پیش] [ساعت] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'در %s', + past : '%s پیش', + s : 'چند ثانیه', + ss : 'ثانیه d%', + m : 'یک دقیقه', + mm : '%d دقیقه', + h : 'یک ساعت', + hh : '%d ساعت', + d : 'یک روز', + dd : '%d روز', + M : 'یک ماه', + MM : '%d ماه', + y : 'یک سال', + yy : '%d سال' + }, + preparse: function (string) { + return string.replace(/[۰-۹]/g, function (match) { + return numberMap$4[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$5[match]; + }).replace(/,/g, '،'); + }, + dayOfMonthOrdinalParse: /\d{1,2}م/, + ordinal : '%dم', + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '), + numbersFuture = [ + 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden', + numbersPast[7], numbersPast[8], numbersPast[9] + ]; + function translate$2(number, withoutSuffix, key, isFuture) { + var result = ''; + switch (key) { + case 's': + return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; + case 'ss': + return isFuture ? 'sekunnin' : 'sekuntia'; + case 'm': + return isFuture ? 'minuutin' : 'minuutti'; + case 'mm': + result = isFuture ? 'minuutin' : 'minuuttia'; + break; + case 'h': + return isFuture ? 'tunnin' : 'tunti'; + case 'hh': + result = isFuture ? 'tunnin' : 'tuntia'; + break; + case 'd': + return isFuture ? 'päivän' : 'päivä'; + case 'dd': + result = isFuture ? 'päivän' : 'päivää'; + break; + case 'M': + return isFuture ? 'kuukauden' : 'kuukausi'; + case 'MM': + result = isFuture ? 'kuukauden' : 'kuukautta'; + break; + case 'y': + return isFuture ? 'vuoden' : 'vuosi'; + case 'yy': + result = isFuture ? 'vuoden' : 'vuotta'; + break; + } + result = verbalNumber(number, isFuture) + ' ' + result; + return result; + } + function verbalNumber(number, isFuture) { + return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number; + } + + moment.defineLocale('fi', { + months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'), + monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'), + weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'), + weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'), + weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD.MM.YYYY', + LL : 'Do MMMM[ta] YYYY', + LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm', + LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm', + l : 'D.M.YYYY', + ll : 'Do MMM YYYY', + lll : 'Do MMM YYYY, [klo] HH.mm', + llll : 'ddd, Do MMM YYYY, [klo] HH.mm' + }, + calendar : { + sameDay : '[tänään] [klo] LT', + nextDay : '[huomenna] [klo] LT', + nextWeek : 'dddd [klo] LT', + lastDay : '[eilen] [klo] LT', + lastWeek : '[viime] dddd[na] [klo] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s päästä', + past : '%s sitten', + s : translate$2, + ss : translate$2, + m : translate$2, + mm : translate$2, + h : translate$2, + hh : translate$2, + d : translate$2, + dd : translate$2, + M : translate$2, + MM : translate$2, + y : translate$2, + yy : translate$2 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('fo', { + months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), + weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'), + weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'), + weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D. MMMM, YYYY HH:mm' + }, + calendar : { + sameDay : '[Í dag kl.] LT', + nextDay : '[Í morgin kl.] LT', + nextWeek : 'dddd [kl.] LT', + lastDay : '[Í gjár kl.] LT', + lastWeek : '[síðstu] dddd [kl] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'um %s', + past : '%s síðani', + s : 'fá sekund', + ss : '%d sekundir', + m : 'ein minuttur', + mm : '%d minuttir', + h : 'ein tími', + hh : '%d tímar', + d : 'ein dagur', + dd : '%d dagar', + M : 'ein mánaður', + MM : '%d mánaðir', + y : 'eitt ár', + yy : '%d ár' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('fr-ca', { + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + monthsParseExact : true, + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Aujourd’hui à] LT', + nextDay : '[Demain à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[Hier à] LT', + lastWeek : 'dddd [dernier à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dans %s', + past : 'il y a %s', + s : 'quelques secondes', + ss : '%d secondes', + m : 'une minute', + mm : '%d minutes', + h : 'une heure', + hh : '%d heures', + d : 'un jour', + dd : '%d jours', + M : 'un mois', + MM : '%d mois', + y : 'un an', + yy : '%d ans' + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal : function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + } + }); + + //! moment.js locale configuration + + moment.defineLocale('fr-ch', { + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + monthsParseExact : true, + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Aujourd’hui à] LT', + nextDay : '[Demain à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[Hier à] LT', + lastWeek : 'dddd [dernier à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dans %s', + past : 'il y a %s', + s : 'quelques secondes', + ss : '%d secondes', + m : 'une minute', + mm : '%d minutes', + h : 'une heure', + hh : '%d heures', + d : 'un jour', + dd : '%d jours', + M : 'un mois', + MM : '%d mois', + y : 'un an', + yy : '%d ans' + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal : function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('fr', { + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + monthsParseExact : true, + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Aujourd’hui à] LT', + nextDay : '[Demain à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[Hier à] LT', + lastWeek : 'dddd [dernier à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dans %s', + past : 'il y a %s', + s : 'quelques secondes', + ss : '%d secondes', + m : 'une minute', + mm : '%d minutes', + h : 'une heure', + hh : '%d heures', + d : 'un jour', + dd : '%d jours', + M : 'un mois', + MM : '%d mois', + y : 'un an', + yy : '%d ans' + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|)/, + ordinal : function (number, period) { + switch (period) { + // TODO: Return 'e' when day of month > 1. Move this case inside + // block for masculine words below. + // See https://github.com/moment/moment/issues/3375 + case 'D': + return number + (number === 1 ? 'er' : ''); + + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'), + monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'); + + moment.defineLocale('fy', { + months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortWithDots; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots[m.month()]; + } else { + return monthsShortWithDots[m.month()]; + } + }, + monthsParseExact : true, + weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'), + weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'), + weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD-MM-YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[hjoed om] LT', + nextDay: '[moarn om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[juster om] LT', + lastWeek: '[ôfrûne] dddd [om] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'oer %s', + past : '%s lyn', + s : 'in pear sekonden', + ss : '%d sekonden', + m : 'ien minút', + mm : '%d minuten', + h : 'ien oere', + hh : '%d oeren', + d : 'ien dei', + dd : '%d dagen', + M : 'ien moanne', + MM : '%d moannen', + y : 'ien jier', + yy : '%d jierren' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + + var months$4 = [ + 'Eanáir', 'Feabhra', 'Márta', 'Aibreán', 'Bealtaine', 'Méitheamh', 'Iúil', 'Lúnasa', 'Meán Fómhair', 'Deaireadh Fómhair', 'Samhain', 'Nollaig' + ]; + + var monthsShort$4 = ['Eaná', 'Feab', 'Márt', 'Aibr', 'Beal', 'Méit', 'Iúil', 'Lúna', 'Meán', 'Deai', 'Samh', 'Noll']; + + var weekdays$1 = ['Dé Domhnaigh', 'Dé Luain', 'Dé Máirt', 'Dé Céadaoin', 'Déardaoin', 'Dé hAoine', 'Dé Satharn']; + + var weekdaysShort = ['Dom', 'Lua', 'Mái', 'Céa', 'Déa', 'hAo', 'Sat']; + + var weekdaysMin = ['Do', 'Lu', 'Má', 'Ce', 'Dé', 'hA', 'Sa']; + + moment.defineLocale('ga', { + months: months$4, + monthsShort: monthsShort$4, + monthsParseExact: true, + weekdays: weekdays$1, + weekdaysShort: weekdaysShort, + weekdaysMin: weekdaysMin, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[Inniu ag] LT', + nextDay: '[Amárach ag] LT', + nextWeek: 'dddd [ag] LT', + lastDay: '[Inné aig] LT', + lastWeek: 'dddd [seo caite] [ag] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'i %s', + past: '%s ó shin', + s: 'cúpla soicind', + ss: '%d soicind', + m: 'nóiméad', + mm: '%d nóiméad', + h: 'uair an chloig', + hh: '%d uair an chloig', + d: 'lá', + dd: '%d lá', + M: 'mí', + MM: '%d mí', + y: 'bliain', + yy: '%d bliain' + }, + dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, + ordinal: function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var months$5 = [ + 'Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd' + ]; + + var monthsShort$5 = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh']; + + var weekdays$2 = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne']; + + var weekdaysShort$1 = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis']; + + var weekdaysMin$1 = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa']; + + moment.defineLocale('gd', { + months : months$5, + monthsShort : monthsShort$5, + monthsParseExact : true, + weekdays : weekdays$2, + weekdaysShort : weekdaysShort$1, + weekdaysMin : weekdaysMin$1, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[An-diugh aig] LT', + nextDay : '[A-màireach aig] LT', + nextWeek : 'dddd [aig] LT', + lastDay : '[An-dè aig] LT', + lastWeek : 'dddd [seo chaidh] [aig] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ann an %s', + past : 'bho chionn %s', + s : 'beagan diogan', + ss : '%d diogan', + m : 'mionaid', + mm : '%d mionaidean', + h : 'uair', + hh : '%d uairean', + d : 'latha', + dd : '%d latha', + M : 'mìos', + MM : '%d mìosan', + y : 'bliadhna', + yy : '%d bliadhna' + }, + dayOfMonthOrdinalParse : /\d{1,2}(d|na|mh)/, + ordinal : function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('gl', { + months : 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'), + monthsShort : 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mé_xo_ve_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY H:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm' + }, + calendar : { + sameDay : function () { + return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; + }, + nextDay : function () { + return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; + }, + nextWeek : function () { + return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; + }, + lastDay : function () { + return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT'; + }, + lastWeek : function () { + return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : function (str) { + if (str.indexOf('un') === 0) { + return 'n' + str; + } + return 'en ' + str; + }, + past : 'hai %s', + s : 'uns segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'unha hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un ano', + yy : '%d anos' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function processRelativeTime$4(number, withoutSuffix, key, isFuture) { + var format = { + 's': ['thodde secondanim', 'thodde second'], + 'ss': [number + ' secondanim', number + ' second'], + 'm': ['eka mintan', 'ek minute'], + 'mm': [number + ' mintanim', number + ' mintam'], + 'h': ['eka voran', 'ek vor'], + 'hh': [number + ' voranim', number + ' voram'], + 'd': ['eka disan', 'ek dis'], + 'dd': [number + ' disanim', number + ' dis'], + 'M': ['eka mhoinean', 'ek mhoino'], + 'MM': [number + ' mhoineanim', number + ' mhoine'], + 'y': ['eka vorsan', 'ek voros'], + 'yy': [number + ' vorsanim', number + ' vorsam'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + moment.defineLocale('gom-latn', { + months : 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'), + monthsShort : 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\'var'.split('_'), + weekdaysShort : 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'), + weekdaysMin : 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'A h:mm [vazta]', + LTS : 'A h:mm:ss [vazta]', + L : 'DD-MM-YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY A h:mm [vazta]', + LLLL : 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]', + llll: 'ddd, D MMM YYYY, A h:mm [vazta]' + }, + calendar : { + sameDay: '[Aiz] LT', + nextDay: '[Faleam] LT', + nextWeek: '[Ieta to] dddd[,] LT', + lastDay: '[Kal] LT', + lastWeek: '[Fatlo] dddd[,] LT', + sameElse: 'L' + }, + relativeTime : { + future : '%s', + past : '%s adim', + s : processRelativeTime$4, + ss : processRelativeTime$4, + m : processRelativeTime$4, + mm : processRelativeTime$4, + h : processRelativeTime$4, + hh : processRelativeTime$4, + d : processRelativeTime$4, + dd : processRelativeTime$4, + M : processRelativeTime$4, + MM : processRelativeTime$4, + y : processRelativeTime$4, + yy : processRelativeTime$4 + }, + dayOfMonthOrdinalParse : /\d{1,2}(er)/, + ordinal : function (number, period) { + switch (period) { + // the ordinal 'er' only applies to day of the month + case 'D': + return number + 'er'; + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + case 'w': + case 'W': + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + }, + meridiemParse: /rati|sokalli|donparam|sanje/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'rati') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'sokalli') { + return hour; + } else if (meridiem === 'donparam') { + return hour > 12 ? hour : hour + 12; + } else if (meridiem === 'sanje') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'rati'; + } else if (hour < 12) { + return 'sokalli'; + } else if (hour < 16) { + return 'donparam'; + } else if (hour < 20) { + return 'sanje'; + } else { + return 'rati'; + } + } + }); + + //! moment.js locale configuration + + var symbolMap$6 = { + '1': '૧', + '2': '૨', + '3': '૩', + '4': '૪', + '5': '૫', + '6': '૬', + '7': '૭', + '8': '૮', + '9': '૯', + '0': '૦' + }, + numberMap$5 = { + '૧': '1', + '૨': '2', + '૩': '3', + '૪': '4', + '૫': '5', + '૬': '6', + '૭': '7', + '૮': '8', + '૯': '9', + '૦': '0' + }; + + moment.defineLocale('gu', { + months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'), + monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'), + monthsParseExact: true, + weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split('_'), + weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'), + weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'), + longDateFormat: { + LT: 'A h:mm વાગ્યે', + LTS: 'A h:mm:ss વાગ્યે', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm વાગ્યે', + LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે' + }, + calendar: { + sameDay: '[આજ] LT', + nextDay: '[કાલે] LT', + nextWeek: 'dddd, LT', + lastDay: '[ગઇકાલે] LT', + lastWeek: '[પાછલા] dddd, LT', + sameElse: 'L' + }, + relativeTime: { + future: '%s મા', + past: '%s પેહલા', + s: 'અમુક પળો', + ss: '%d સેકંડ', + m: 'એક મિનિટ', + mm: '%d મિનિટ', + h: 'એક કલાક', + hh: '%d કલાક', + d: 'એક દિવસ', + dd: '%d દિવસ', + M: 'એક મહિનો', + MM: '%d મહિનો', + y: 'એક વર્ષ', + yy: '%d વર્ષ' + }, + preparse: function (string) { + return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) { + return numberMap$5[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$6[match]; + }); + }, + // Gujarati notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati. + meridiemParse: /રાત|બપોર|સવાર|સાંજ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'રાત') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'સવાર') { + return hour; + } else if (meridiem === 'બપોર') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'સાંજ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'રાત'; + } else if (hour < 10) { + return 'સવાર'; + } else if (hour < 17) { + return 'બપોર'; + } else if (hour < 20) { + return 'સાંજ'; + } else { + return 'રાત'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('he', { + months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'), + monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'), + weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'), + weekdaysShort : 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'), + weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [ב]MMMM YYYY', + LLL : 'D [ב]MMMM YYYY HH:mm', + LLLL : 'dddd, D [ב]MMMM YYYY HH:mm', + l : 'D/M/YYYY', + ll : 'D MMM YYYY', + lll : 'D MMM YYYY HH:mm', + llll : 'ddd, D MMM YYYY HH:mm' + }, + calendar : { + sameDay : '[היום ב־]LT', + nextDay : '[מחר ב־]LT', + nextWeek : 'dddd [בשעה] LT', + lastDay : '[אתמול ב־]LT', + lastWeek : '[ביום] dddd [האחרון בשעה] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'בעוד %s', + past : 'לפני %s', + s : 'מספר שניות', + ss : '%d שניות', + m : 'דקה', + mm : '%d דקות', + h : 'שעה', + hh : function (number) { + if (number === 2) { + return 'שעתיים'; + } + return number + ' שעות'; + }, + d : 'יום', + dd : function (number) { + if (number === 2) { + return 'יומיים'; + } + return number + ' ימים'; + }, + M : 'חודש', + MM : function (number) { + if (number === 2) { + return 'חודשיים'; + } + return number + ' חודשים'; + }, + y : 'שנה', + yy : function (number) { + if (number === 2) { + return 'שנתיים'; + } else if (number % 10 === 0 && number !== 10) { + return number + ' שנה'; + } + return number + ' שנים'; + } + }, + meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i, + isPM : function (input) { + return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 5) { + return 'לפנות בוקר'; + } else if (hour < 10) { + return 'בבוקר'; + } else if (hour < 12) { + return isLower ? 'לפנה"צ' : 'לפני הצהריים'; + } else if (hour < 18) { + return isLower ? 'אחה"צ' : 'אחרי הצהריים'; + } else { + return 'בערב'; + } + } + }); + + //! moment.js locale configuration + + var symbolMap$7 = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०' + }, + numberMap$6 = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0' + }; + + moment.defineLocale('hi', { + months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'), + monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'), + monthsParseExact: true, + weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat : { + LT : 'A h:mm बजे', + LTS : 'A h:mm:ss बजे', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm बजे', + LLLL : 'dddd, D MMMM YYYY, A h:mm बजे' + }, + calendar : { + sameDay : '[आज] LT', + nextDay : '[कल] LT', + nextWeek : 'dddd, LT', + lastDay : '[कल] LT', + lastWeek : '[पिछले] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s में', + past : '%s पहले', + s : 'कुछ ही क्षण', + ss : '%d सेकंड', + m : 'एक मिनट', + mm : '%d मिनट', + h : 'एक घंटा', + hh : '%d घंटे', + d : 'एक दिन', + dd : '%d दिन', + M : 'एक महीने', + MM : '%d महीने', + y : 'एक वर्ष', + yy : '%d वर्ष' + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$6[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$7[match]; + }); + }, + // Hindi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi. + meridiemParse: /रात|सुबह|दोपहर|शाम/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'रात') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सुबह') { + return hour; + } else if (meridiem === 'दोपहर') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'शाम') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'रात'; + } else if (hour < 10) { + return 'सुबह'; + } else if (hour < 17) { + return 'दोपहर'; + } else if (hour < 20) { + return 'शाम'; + } else { + return 'रात'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function translate$3(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } + } + + moment.defineLocale('hr', { + months : { + format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'), + standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_') + }, + monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'), + monthsParseExact: true, + weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[danas u] LT', + nextDay : '[sutra u] LT', + nextWeek : function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[jučer u] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'prije %s', + s : 'par sekundi', + ss : translate$3, + m : translate$3, + mm : translate$3, + h : translate$3, + hh : translate$3, + d : 'dan', + dd : translate$3, + M : 'mjesec', + MM : translate$3, + y : 'godinu', + yy : translate$3 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' '); + function translate$4(number, withoutSuffix, key, isFuture) { + var num = number; + switch (key) { + case 's': + return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce'; + case 'ss': + return num + (isFuture || withoutSuffix) ? ' másodperc' : ' másodperce'; + case 'm': + return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'mm': + return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'h': + return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'hh': + return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'd': + return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'dd': + return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'M': + return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'MM': + return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'y': + return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); + case 'yy': + return num + (isFuture || withoutSuffix ? ' év' : ' éve'); + } + return ''; + } + function week(isFuture) { + return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]'; + } + + moment.defineLocale('hu', { + months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'), + monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'), + weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'), + weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), + weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'YYYY.MM.DD.', + LL : 'YYYY. MMMM D.', + LLL : 'YYYY. MMMM D. H:mm', + LLLL : 'YYYY. MMMM D., dddd H:mm' + }, + meridiemParse: /de|du/i, + isPM: function (input) { + return input.charAt(1).toLowerCase() === 'u'; + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 12) { + return isLower === true ? 'de' : 'DE'; + } else { + return isLower === true ? 'du' : 'DU'; + } + }, + calendar : { + sameDay : '[ma] LT[-kor]', + nextDay : '[holnap] LT[-kor]', + nextWeek : function () { + return week.call(this, true); + }, + lastDay : '[tegnap] LT[-kor]', + lastWeek : function () { + return week.call(this, false); + }, + sameElse : 'L' + }, + relativeTime : { + future : '%s múlva', + past : '%s', + s : translate$4, + ss : translate$4, + m : translate$4, + mm : translate$4, + h : translate$4, + hh : translate$4, + d : translate$4, + dd : translate$4, + M : translate$4, + MM : translate$4, + y : translate$4, + yy : translate$4 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('hy-am', { + months : { + format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'), + standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_') + }, + monthsShort : 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'), + weekdays : 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'), + weekdaysShort : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY թ.', + LLL : 'D MMMM YYYY թ., HH:mm', + LLLL : 'dddd, D MMMM YYYY թ., HH:mm' + }, + calendar : { + sameDay: '[այսօր] LT', + nextDay: '[վաղը] LT', + lastDay: '[երեկ] LT', + nextWeek: function () { + return 'dddd [օրը ժամը] LT'; + }, + lastWeek: function () { + return '[անցած] dddd [օրը ժամը] LT'; + }, + sameElse: 'L' + }, + relativeTime : { + future : '%s հետո', + past : '%s առաջ', + s : 'մի քանի վայրկյան', + ss : '%d վայրկյան', + m : 'րոպե', + mm : '%d րոպե', + h : 'ժամ', + hh : '%d ժամ', + d : 'օր', + dd : '%d օր', + M : 'ամիս', + MM : '%d ամիս', + y : 'տարի', + yy : '%d տարի' + }, + meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/, + isPM: function (input) { + return /^(ցերեկվա|երեկոյան)$/.test(input); + }, + meridiem : function (hour) { + if (hour < 4) { + return 'գիշերվա'; + } else if (hour < 12) { + return 'առավոտվա'; + } else if (hour < 17) { + return 'ցերեկվա'; + } else { + return 'երեկոյան'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/, + ordinal: function (number, period) { + switch (period) { + case 'DDD': + case 'w': + case 'W': + case 'DDDo': + if (number === 1) { + return number + '-ին'; + } + return number + '-րդ'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('id', { + months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'), + weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), + weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), + weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /pagi|siang|sore|malam/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'siang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sore' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'siang'; + } else if (hours < 19) { + return 'sore'; + } else { + return 'malam'; + } + }, + calendar : { + sameDay : '[Hari ini pukul] LT', + nextDay : '[Besok pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kemarin pukul] LT', + lastWeek : 'dddd [lalu pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dalam %s', + past : '%s yang lalu', + s : 'beberapa detik', + ss : '%d detik', + m : 'semenit', + mm : '%d menit', + h : 'sejam', + hh : '%d jam', + d : 'sehari', + dd : '%d hari', + M : 'sebulan', + MM : '%d bulan', + y : 'setahun', + yy : '%d tahun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function plural$2(n) { + if (n % 100 === 11) { + return true; + } else if (n % 10 === 1) { + return false; + } + return true; + } + function translate$5(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum'; + case 'ss': + if (plural$2(number)) { + return result + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum'); + } + return result + 'sekúnda'; + case 'm': + return withoutSuffix ? 'mínúta' : 'mínútu'; + case 'mm': + if (plural$2(number)) { + return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum'); + } else if (withoutSuffix) { + return result + 'mínúta'; + } + return result + 'mínútu'; + case 'hh': + if (plural$2(number)) { + return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum'); + } + return result + 'klukkustund'; + case 'd': + if (withoutSuffix) { + return 'dagur'; + } + return isFuture ? 'dag' : 'degi'; + case 'dd': + if (plural$2(number)) { + if (withoutSuffix) { + return result + 'dagar'; + } + return result + (isFuture ? 'daga' : 'dögum'); + } else if (withoutSuffix) { + return result + 'dagur'; + } + return result + (isFuture ? 'dag' : 'degi'); + case 'M': + if (withoutSuffix) { + return 'mánuður'; + } + return isFuture ? 'mánuð' : 'mánuði'; + case 'MM': + if (plural$2(number)) { + if (withoutSuffix) { + return result + 'mánuðir'; + } + return result + (isFuture ? 'mánuði' : 'mánuðum'); + } else if (withoutSuffix) { + return result + 'mánuður'; + } + return result + (isFuture ? 'mánuð' : 'mánuði'); + case 'y': + return withoutSuffix || isFuture ? 'ár' : 'ári'; + case 'yy': + if (plural$2(number)) { + return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); + } + return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); + } + } + + moment.defineLocale('is', { + months : 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'), + monthsShort : 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'), + weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'), + weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'), + weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY [kl.] H:mm', + LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm' + }, + calendar : { + sameDay : '[í dag kl.] LT', + nextDay : '[á morgun kl.] LT', + nextWeek : 'dddd [kl.] LT', + lastDay : '[í gær kl.] LT', + lastWeek : '[síðasta] dddd [kl.] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'eftir %s', + past : 'fyrir %s síðan', + s : translate$5, + ss : translate$5, + m : translate$5, + mm : translate$5, + h : 'klukkustund', + hh : translate$5, + d : translate$5, + dd : translate$5, + M : translate$5, + MM : translate$5, + y : translate$5, + yy : translate$5 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('it-ch', { + months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), + monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'), + weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Oggi alle] LT', + nextDay: '[Domani alle] LT', + nextWeek: 'dddd [alle] LT', + lastDay: '[Ieri alle] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[la scorsa] dddd [alle] LT'; + default: + return '[lo scorso] dddd [alle] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : function (s) { + return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s; + }, + past : '%s fa', + s : 'alcuni secondi', + ss : '%d secondi', + m : 'un minuto', + mm : '%d minuti', + h : 'un\'ora', + hh : '%d ore', + d : 'un giorno', + dd : '%d giorni', + M : 'un mese', + MM : '%d mesi', + y : 'un anno', + yy : '%d anni' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('it', { + months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), + monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'), + weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Oggi alle] LT', + nextDay: '[Domani alle] LT', + nextWeek: 'dddd [alle] LT', + lastDay: '[Ieri alle] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[la scorsa] dddd [alle] LT'; + default: + return '[lo scorso] dddd [alle] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : function (s) { + return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s; + }, + past : '%s fa', + s : 'alcuni secondi', + ss : '%d secondi', + m : 'un minuto', + mm : '%d minuti', + h : 'un\'ora', + hh : '%d ore', + d : 'un giorno', + dd : '%d giorni', + M : 'un mese', + MM : '%d mesi', + y : 'un anno', + yy : '%d anni' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('ja', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'), + weekdaysShort : '日_月_火_水_木_金_土'.split('_'), + weekdaysMin : '日_月_火_水_木_金_土'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日 HH:mm', + LLLL : 'YYYY年M月D日 dddd HH:mm', + l : 'YYYY/MM/DD', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日(ddd) HH:mm' + }, + meridiemParse: /午前|午後/i, + isPM : function (input) { + return input === '午後'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return '午前'; + } else { + return '午後'; + } + }, + calendar : { + sameDay : '[今日] LT', + nextDay : '[明日] LT', + nextWeek : function (now) { + if (now.week() < this.week()) { + return '[来週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + lastDay : '[昨日] LT', + lastWeek : function (now) { + if (this.week() < now.week()) { + return '[先週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + sameElse : 'L' + }, + dayOfMonthOrdinalParse : /\d{1,2}日/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + default: + return number; + } + }, + relativeTime : { + future : '%s後', + past : '%s前', + s : '数秒', + ss : '%d秒', + m : '1分', + mm : '%d分', + h : '1時間', + hh : '%d時間', + d : '1日', + dd : '%d日', + M : '1ヶ月', + MM : '%dヶ月', + y : '1年', + yy : '%d年' + } + }); + + //! moment.js locale configuration + + moment.defineLocale('jv', { + months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), + weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), + weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), + weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /enjing|siyang|sonten|ndalu/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'enjing') { + return hour; + } else if (meridiem === 'siyang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sonten' || meridiem === 'ndalu') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'enjing'; + } else if (hours < 15) { + return 'siyang'; + } else if (hours < 19) { + return 'sonten'; + } else { + return 'ndalu'; + } + }, + calendar : { + sameDay : '[Dinten puniko pukul] LT', + nextDay : '[Mbenjang pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kala wingi pukul] LT', + lastWeek : 'dddd [kepengker pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'wonten ing %s', + past : '%s ingkang kepengker', + s : 'sawetawis detik', + ss : '%d detik', + m : 'setunggal menit', + mm : '%d menit', + h : 'setunggal jam', + hh : '%d jam', + d : 'sedinten', + dd : '%d dinten', + M : 'sewulan', + MM : '%d wulan', + y : 'setaun', + yy : '%d taun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('ka', { + months : { + standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'), + format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_') + }, + monthsShort : 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'), + weekdays : { + standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'), + format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'), + isFormat: /(წინა|შემდეგ)/ + }, + weekdaysShort : 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'), + weekdaysMin : 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[დღეს] LT[-ზე]', + nextDay : '[ხვალ] LT[-ზე]', + lastDay : '[გუშინ] LT[-ზე]', + nextWeek : '[შემდეგ] dddd LT[-ზე]', + lastWeek : '[წინა] dddd LT-ზე', + sameElse : 'L' + }, + relativeTime : { + future : function (s) { + return (/(წამი|წუთი|საათი|წელი)/).test(s) ? + s.replace(/ი$/, 'ში') : + s + 'ში'; + }, + past : function (s) { + if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) { + return s.replace(/(ი|ე)$/, 'ის წინ'); + } + if ((/წელი/).test(s)) { + return s.replace(/წელი$/, 'წლის წინ'); + } + }, + s : 'რამდენიმე წამი', + ss : '%d წამი', + m : 'წუთი', + mm : '%d წუთი', + h : 'საათი', + hh : '%d საათი', + d : 'დღე', + dd : '%d დღე', + M : 'თვე', + MM : '%d თვე', + y : 'წელი', + yy : '%d წელი' + }, + dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/, + ordinal : function (number) { + if (number === 0) { + return number; + } + if (number === 1) { + return number + '-ლი'; + } + if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) { + return 'მე-' + number; + } + return number + '-ე'; + }, + week : { + dow : 1, + doy : 7 + } + }); + + //! moment.js locale configuration + + var suffixes$1 = { + 0: '-ші', + 1: '-ші', + 2: '-ші', + 3: '-ші', + 4: '-ші', + 5: '-ші', + 6: '-шы', + 7: '-ші', + 8: '-ші', + 9: '-шы', + 10: '-шы', + 20: '-шы', + 30: '-шы', + 40: '-шы', + 50: '-ші', + 60: '-шы', + 70: '-ші', + 80: '-ші', + 90: '-шы', + 100: '-ші' + }; + + moment.defineLocale('kk', { + months : 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'), + monthsShort : 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'), + weekdays : 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'), + weekdaysShort : 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'), + weekdaysMin : 'жк_дй_сй_ср_бй_жм_сн'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Бүгін сағат] LT', + nextDay : '[Ертең сағат] LT', + nextWeek : 'dddd [сағат] LT', + lastDay : '[Кеше сағат] LT', + lastWeek : '[Өткен аптаның] dddd [сағат] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ішінде', + past : '%s бұрын', + s : 'бірнеше секунд', + ss : '%d секунд', + m : 'бір минут', + mm : '%d минут', + h : 'бір сағат', + hh : '%d сағат', + d : 'бір күн', + dd : '%d күн', + M : 'бір ай', + MM : '%d ай', + y : 'бір жыл', + yy : '%d жыл' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/, + ordinal : function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$1[number] || suffixes$1[a] || suffixes$1[b]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$8 = { + '1': '១', + '2': '២', + '3': '៣', + '4': '៤', + '5': '៥', + '6': '៦', + '7': '៧', + '8': '៨', + '9': '៩', + '0': '០' + }, numberMap$7 = { + '១': '1', + '២': '2', + '៣': '3', + '៤': '4', + '៥': '5', + '៦': '6', + '៧': '7', + '៨': '8', + '៩': '9', + '០': '0' + }; + + moment.defineLocale('km', { + months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), + weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + meridiemParse: /ព្រឹក|ល្ងាច/, + isPM: function (input) { + return input === 'ល្ងាច'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ព្រឹក'; + } else { + return 'ល្ងាច'; + } + }, + calendar: { + sameDay: '[ថ្ងៃនេះ ម៉ោង] LT', + nextDay: '[ស្អែក ម៉ោង] LT', + nextWeek: 'dddd [ម៉ោង] LT', + lastDay: '[ម្សិលមិញ ម៉ោង] LT', + lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', + sameElse: 'L' + }, + relativeTime: { + future: '%sទៀត', + past: '%sមុន', + s: 'ប៉ុន្មានវិនាទី', + ss: '%d វិនាទី', + m: 'មួយនាទី', + mm: '%d នាទី', + h: 'មួយម៉ោង', + hh: '%d ម៉ោង', + d: 'មួយថ្ងៃ', + dd: '%d ថ្ងៃ', + M: 'មួយខែ', + MM: '%d ខែ', + y: 'មួយឆ្នាំ', + yy: '%d ឆ្នាំ' + }, + dayOfMonthOrdinalParse : /ទី\d{1,2}/, + ordinal : 'ទី%d', + preparse: function (string) { + return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) { + return numberMap$7[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$8[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$9 = { + '1': '೧', + '2': '೨', + '3': '೩', + '4': '೪', + '5': '೫', + '6': '೬', + '7': '೭', + '8': '೮', + '9': '೯', + '0': '೦' + }, + numberMap$8 = { + '೧': '1', + '೨': '2', + '೩': '3', + '೪': '4', + '೫': '5', + '೬': '6', + '೭': '7', + '೮': '8', + '೯': '9', + '೦': '0' + }; + + moment.defineLocale('kn', { + months : 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'), + monthsShort : 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split('_'), + monthsParseExact: true, + weekdays : 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'), + weekdaysShort : 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'), + weekdaysMin : 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm', + LLLL : 'dddd, D MMMM YYYY, A h:mm' + }, + calendar : { + sameDay : '[ಇಂದು] LT', + nextDay : '[ನಾಳೆ] LT', + nextWeek : 'dddd, LT', + lastDay : '[ನಿನ್ನೆ] LT', + lastWeek : '[ಕೊನೆಯ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ನಂತರ', + past : '%s ಹಿಂದೆ', + s : 'ಕೆಲವು ಕ್ಷಣಗಳು', + ss : '%d ಸೆಕೆಂಡುಗಳು', + m : 'ಒಂದು ನಿಮಿಷ', + mm : '%d ನಿಮಿಷ', + h : 'ಒಂದು ಗಂಟೆ', + hh : '%d ಗಂಟೆ', + d : 'ಒಂದು ದಿನ', + dd : '%d ದಿನ', + M : 'ಒಂದು ತಿಂಗಳು', + MM : '%d ತಿಂಗಳು', + y : 'ಒಂದು ವರ್ಷ', + yy : '%d ವರ್ಷ' + }, + preparse: function (string) { + return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) { + return numberMap$8[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$9[match]; + }); + }, + meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ರಾತ್ರಿ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') { + return hour; + } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ಸಂಜೆ') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ರಾತ್ರಿ'; + } else if (hour < 10) { + return 'ಬೆಳಿಗ್ಗೆ'; + } else if (hour < 17) { + return 'ಮಧ್ಯಾಹ್ನ'; + } else if (hour < 20) { + return 'ಸಂಜೆ'; + } else { + return 'ರಾತ್ರಿ'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/, + ordinal : function (number) { + return number + 'ನೇ'; + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('ko', { + months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), + monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), + weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'), + weekdaysShort : '일_월_화_수_목_금_토'.split('_'), + weekdaysMin : '일_월_화_수_목_금_토'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'YYYY.MM.DD.', + LL : 'YYYY년 MMMM D일', + LLL : 'YYYY년 MMMM D일 A h:mm', + LLLL : 'YYYY년 MMMM D일 dddd A h:mm', + l : 'YYYY.MM.DD.', + ll : 'YYYY년 MMMM D일', + lll : 'YYYY년 MMMM D일 A h:mm', + llll : 'YYYY년 MMMM D일 dddd A h:mm' + }, + calendar : { + sameDay : '오늘 LT', + nextDay : '내일 LT', + nextWeek : 'dddd LT', + lastDay : '어제 LT', + lastWeek : '지난주 dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s 후', + past : '%s 전', + s : '몇 초', + ss : '%d초', + m : '1분', + mm : '%d분', + h : '한 시간', + hh : '%d시간', + d : '하루', + dd : '%d일', + M : '한 달', + MM : '%d달', + y : '일 년', + yy : '%d년' + }, + dayOfMonthOrdinalParse : /\d{1,2}(일|월|주)/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '일'; + case 'M': + return number + '월'; + case 'w': + case 'W': + return number + '주'; + default: + return number; + } + }, + meridiemParse : /오전|오후/, + isPM : function (token) { + return token === '오후'; + }, + meridiem : function (hour, minute, isUpper) { + return hour < 12 ? '오전' : '오후'; + } + }); + + //! moment.js locale configuration + + var symbolMap$a = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠' + }, numberMap$9 = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0' + }, + months$6 = [ + 'کانونی دووەم', + 'شوبات', + 'ئازار', + 'نیسان', + 'ئایار', + 'حوزەیران', + 'تەمموز', + 'ئاب', + 'ئەیلوول', + 'تشرینی یەكەم', + 'تشرینی دووەم', + 'كانونی یەکەم' + ]; + + + moment.defineLocale('ku', { + months : months$6, + monthsShort : months$6, + weekdays : 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split('_'), + weekdaysShort : 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'), + weekdaysMin : 'ی_د_س_چ_پ_ه_ش'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + meridiemParse: /ئێواره‌|به‌یانی/, + isPM: function (input) { + return /ئێواره‌/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'به‌یانی'; + } else { + return 'ئێواره‌'; + } + }, + calendar : { + sameDay : '[ئه‌مرۆ كاتژمێر] LT', + nextDay : '[به‌یانی كاتژمێر] LT', + nextWeek : 'dddd [كاتژمێر] LT', + lastDay : '[دوێنێ كاتژمێر] LT', + lastWeek : 'dddd [كاتژمێر] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'له‌ %s', + past : '%s', + s : 'چه‌ند چركه‌یه‌ك', + ss : 'چركه‌ %d', + m : 'یه‌ك خوله‌ك', + mm : '%d خوله‌ك', + h : 'یه‌ك كاتژمێر', + hh : '%d كاتژمێر', + d : 'یه‌ك ڕۆژ', + dd : '%d ڕۆژ', + M : 'یه‌ك مانگ', + MM : '%d مانگ', + y : 'یه‌ك ساڵ', + yy : '%d ساڵ' + }, + preparse: function (string) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap$9[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$a[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var suffixes$2 = { + 0: '-чү', + 1: '-чи', + 2: '-чи', + 3: '-чү', + 4: '-чү', + 5: '-чи', + 6: '-чы', + 7: '-чи', + 8: '-чи', + 9: '-чу', + 10: '-чу', + 20: '-чы', + 30: '-чу', + 40: '-чы', + 50: '-чү', + 60: '-чы', + 70: '-чи', + 80: '-чи', + 90: '-чу', + 100: '-чү' + }; + + moment.defineLocale('ky', { + months : 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'), + monthsShort : 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'), + weekdays : 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'), + weekdaysShort : 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'), + weekdaysMin : 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Бүгүн саат] LT', + nextDay : '[Эртең саат] LT', + nextWeek : 'dddd [саат] LT', + lastDay : '[Кечээ саат] LT', + lastWeek : '[Өткөн аптанын] dddd [күнү] [саат] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ичинде', + past : '%s мурун', + s : 'бирнече секунд', + ss : '%d секунд', + m : 'бир мүнөт', + mm : '%d мүнөт', + h : 'бир саат', + hh : '%d саат', + d : 'бир күн', + dd : '%d күн', + M : 'бир ай', + MM : '%d ай', + y : 'бир жыл', + yy : '%d жыл' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/, + ordinal : function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$2[number] || suffixes$2[a] || suffixes$2[b]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function processRelativeTime$5(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eng Minutt', 'enger Minutt'], + 'h': ['eng Stonn', 'enger Stonn'], + 'd': ['een Dag', 'engem Dag'], + 'M': ['ee Mount', 'engem Mount'], + 'y': ['ee Joer', 'engem Joer'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + function processFutureTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'a ' + string; + } + return 'an ' + string; + } + function processPastTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'viru ' + string; + } + return 'virun ' + string; + } + /** + * Returns true if the word before the given number loses the '-n' ending. + * e.g. 'an 10 Deeg' but 'a 5 Deeg' + * + * @param number {integer} + * @returns {boolean} + */ + function eifelerRegelAppliesToNumber(number) { + number = parseInt(number, 10); + if (isNaN(number)) { + return false; + } + if (number < 0) { + // Negative Number --> always true + return true; + } else if (number < 10) { + // Only 1 digit + if (4 <= number && number <= 7) { + return true; + } + return false; + } else if (number < 100) { + // 2 digits + var lastDigit = number % 10, firstDigit = number / 10; + if (lastDigit === 0) { + return eifelerRegelAppliesToNumber(firstDigit); + } + return eifelerRegelAppliesToNumber(lastDigit); + } else if (number < 10000) { + // 3 or 4 digits --> recursively check first digit + while (number >= 10) { + number = number / 10; + } + return eifelerRegelAppliesToNumber(number); + } else { + // Anything larger than 4 digits: recursively check first n-3 digits + number = number / 1000; + return eifelerRegelAppliesToNumber(number); + } + } + + moment.defineLocale('lb', { + months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'), + weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm [Auer]', + LTS: 'H:mm:ss [Auer]', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm [Auer]', + LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]' + }, + calendar: { + sameDay: '[Haut um] LT', + sameElse: 'L', + nextDay: '[Muer um] LT', + nextWeek: 'dddd [um] LT', + lastDay: '[Gëschter um] LT', + lastWeek: function () { + // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule + switch (this.day()) { + case 2: + case 4: + return '[Leschten] dddd [um] LT'; + default: + return '[Leschte] dddd [um] LT'; + } + } + }, + relativeTime : { + future : processFutureTime, + past : processPastTime, + s : 'e puer Sekonnen', + ss : '%d Sekonnen', + m : processRelativeTime$5, + mm : '%d Minutten', + h : processRelativeTime$5, + hh : '%d Stonnen', + d : processRelativeTime$5, + dd : '%d Deeg', + M : processRelativeTime$5, + MM : '%d Méint', + y : processRelativeTime$5, + yy : '%d Joer' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('lo', { + months : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), + monthsShort : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), + weekdays : 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysShort : 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysMin : 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'ວັນdddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/, + isPM: function (input) { + return input === 'ຕອນແລງ'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ຕອນເຊົ້າ'; + } else { + return 'ຕອນແລງ'; + } + }, + calendar : { + sameDay : '[ມື້ນີ້ເວລາ] LT', + nextDay : '[ມື້ອື່ນເວລາ] LT', + nextWeek : '[ວັນ]dddd[ໜ້າເວລາ] LT', + lastDay : '[ມື້ວານນີ້ເວລາ] LT', + lastWeek : '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ອີກ %s', + past : '%sຜ່ານມາ', + s : 'ບໍ່ເທົ່າໃດວິນາທີ', + ss : '%d ວິນາທີ' , + m : '1 ນາທີ', + mm : '%d ນາທີ', + h : '1 ຊົ່ວໂມງ', + hh : '%d ຊົ່ວໂມງ', + d : '1 ມື້', + dd : '%d ມື້', + M : '1 ເດືອນ', + MM : '%d ເດືອນ', + y : '1 ປີ', + yy : '%d ປີ' + }, + dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/, + ordinal : function (number) { + return 'ທີ່' + number; + } + }); + + //! moment.js locale configuration + + var units = { + 'ss' : 'sekundė_sekundžių_sekundes', + 'm' : 'minutė_minutės_minutę', + 'mm': 'minutės_minučių_minutes', + 'h' : 'valanda_valandos_valandą', + 'hh': 'valandos_valandų_valandas', + 'd' : 'diena_dienos_dieną', + 'dd': 'dienos_dienų_dienas', + 'M' : 'mėnuo_mėnesio_mėnesį', + 'MM': 'mėnesiai_mėnesių_mėnesius', + 'y' : 'metai_metų_metus', + 'yy': 'metai_metų_metus' + }; + function translateSeconds(number, withoutSuffix, key, isFuture) { + if (withoutSuffix) { + return 'kelios sekundės'; + } else { + return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; + } + } + function translateSingular(number, withoutSuffix, key, isFuture) { + return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]); + } + function special(number) { + return number % 10 === 0 || (number > 10 && number < 20); + } + function forms(key) { + return units[key].split('_'); + } + function translate$6(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + if (number === 1) { + return result + translateSingular(number, withoutSuffix, key[0], isFuture); + } else if (withoutSuffix) { + return result + (special(number) ? forms(key)[1] : forms(key)[0]); + } else { + if (isFuture) { + return result + forms(key)[1]; + } else { + return result + (special(number) ? forms(key)[1] : forms(key)[2]); + } + } + } + moment.defineLocale('lt', { + months : { + format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'), + standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'), + isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/ + }, + monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), + weekdays : { + format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'), + standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'), + isFormat: /dddd HH:mm/ + }, + weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'), + weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'YYYY [m.] MMMM D [d.]', + LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', + l : 'YYYY-MM-DD', + ll : 'YYYY [m.] MMMM D [d.]', + lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]' + }, + calendar : { + sameDay : '[Šiandien] LT', + nextDay : '[Rytoj] LT', + nextWeek : 'dddd LT', + lastDay : '[Vakar] LT', + lastWeek : '[Praėjusį] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : 'po %s', + past : 'prieš %s', + s : translateSeconds, + ss : translate$6, + m : translateSingular, + mm : translate$6, + h : translateSingular, + hh : translate$6, + d : translateSingular, + dd : translate$6, + M : translateSingular, + MM : translate$6, + y : translateSingular, + yy : translate$6 + }, + dayOfMonthOrdinalParse: /\d{1,2}-oji/, + ordinal : function (number) { + return number + '-oji'; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var units$1 = { + 'ss': 'sekundes_sekundēm_sekunde_sekundes'.split('_'), + 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), + 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), + 'h': 'stundas_stundām_stunda_stundas'.split('_'), + 'hh': 'stundas_stundām_stunda_stundas'.split('_'), + 'd': 'dienas_dienām_diena_dienas'.split('_'), + 'dd': 'dienas_dienām_diena_dienas'.split('_'), + 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + 'y': 'gada_gadiem_gads_gadi'.split('_'), + 'yy': 'gada_gadiem_gads_gadi'.split('_') + }; + /** + * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. + */ + function format(forms, number, withoutSuffix) { + if (withoutSuffix) { + // E.g. "21 minūte", "3 minūtes". + return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3]; + } else { + // E.g. "21 minūtes" as in "pēc 21 minūtes". + // E.g. "3 minūtēm" as in "pēc 3 minūtēm". + return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1]; + } + } + function relativeTimeWithPlural$1(number, withoutSuffix, key) { + return number + ' ' + format(units$1[key], number, withoutSuffix); + } + function relativeTimeWithSingular(number, withoutSuffix, key) { + return format(units$1[key], number, withoutSuffix); + } + function relativeSeconds(number, withoutSuffix) { + return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm'; + } + + moment.defineLocale('lv', { + months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'), + monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'), + weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'), + weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY.', + LL : 'YYYY. [gada] D. MMMM', + LLL : 'YYYY. [gada] D. MMMM, HH:mm', + LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm' + }, + calendar : { + sameDay : '[Šodien pulksten] LT', + nextDay : '[Rīt pulksten] LT', + nextWeek : 'dddd [pulksten] LT', + lastDay : '[Vakar pulksten] LT', + lastWeek : '[Pagājušā] dddd [pulksten] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'pēc %s', + past : 'pirms %s', + s : relativeSeconds, + ss : relativeTimeWithPlural$1, + m : relativeTimeWithSingular, + mm : relativeTimeWithPlural$1, + h : relativeTimeWithSingular, + hh : relativeTimeWithPlural$1, + d : relativeTimeWithSingular, + dd : relativeTimeWithPlural$1, + M : relativeTimeWithSingular, + MM : relativeTimeWithPlural$1, + y : relativeTimeWithSingular, + yy : relativeTimeWithPlural$1 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var translator = { + words: { //Different grammatical cases + ss: ['sekund', 'sekunda', 'sekundi'], + m: ['jedan minut', 'jednog minuta'], + mm: ['minut', 'minuta', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mjesec', 'mjeseca', 'mjeseci'], + yy: ['godina', 'godine', 'godina'] + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return number + ' ' + translator.correctGrammaticalCase(number, wordKey); + } + } + }; + + moment.defineLocale('me', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), + monthsParseExact : true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm', + LTS : 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sjutra u] LT', + + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[juče u] LT', + lastWeek : function () { + var lastWeekDays = [ + '[prošle] [nedjelje] [u] LT', + '[prošlog] [ponedjeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srijede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT' + ]; + return lastWeekDays[this.day()]; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'prije %s', + s : 'nekoliko sekundi', + ss : translator.translate, + m : translator.translate, + mm : translator.translate, + h : translator.translate, + hh : translator.translate, + d : 'dan', + dd : translator.translate, + M : 'mjesec', + MM : translator.translate, + y : 'godinu', + yy : translator.translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('mi', { + months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'), + monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'), + monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i, + weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'), + weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [i] HH:mm', + LLLL: 'dddd, D MMMM YYYY [i] HH:mm' + }, + calendar: { + sameDay: '[i teie mahana, i] LT', + nextDay: '[apopo i] LT', + nextWeek: 'dddd [i] LT', + lastDay: '[inanahi i] LT', + lastWeek: 'dddd [whakamutunga i] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'i roto i %s', + past: '%s i mua', + s: 'te hēkona ruarua', + ss: '%d hēkona', + m: 'he meneti', + mm: '%d meneti', + h: 'te haora', + hh: '%d haora', + d: 'he ra', + dd: '%d ra', + M: 'he marama', + MM: '%d marama', + y: 'he tau', + yy: '%d tau' + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('mk', { + months : 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'), + monthsShort : 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'), + weekdays : 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'), + weekdaysShort : 'нед_пон_вто_сре_чет_пет_саб'.split('_'), + weekdaysMin : 'нe_пo_вт_ср_че_пе_сa'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'D.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY H:mm', + LLLL : 'dddd, D MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[Денес во] LT', + nextDay : '[Утре во] LT', + nextWeek : '[Во] dddd [во] LT', + lastDay : '[Вчера во] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[Изминатата] dddd [во] LT'; + case 1: + case 2: + case 4: + case 5: + return '[Изминатиот] dddd [во] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'после %s', + past : 'пред %s', + s : 'неколку секунди', + ss : '%d секунди', + m : 'минута', + mm : '%d минути', + h : 'час', + hh : '%d часа', + d : 'ден', + dd : '%d дена', + M : 'месец', + MM : '%d месеци', + y : 'година', + yy : '%d години' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal : function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('ml', { + months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'), + monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'), + monthsParseExact : true, + weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'), + weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'), + weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), + longDateFormat : { + LT : 'A h:mm -നു', + LTS : 'A h:mm:ss -നു', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm -നു', + LLLL : 'dddd, D MMMM YYYY, A h:mm -നു' + }, + calendar : { + sameDay : '[ഇന്ന്] LT', + nextDay : '[നാളെ] LT', + nextWeek : 'dddd, LT', + lastDay : '[ഇന്നലെ] LT', + lastWeek : '[കഴിഞ്ഞ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s കഴിഞ്ഞ്', + past : '%s മുൻപ്', + s : 'അൽപ നിമിഷങ്ങൾ', + ss : '%d സെക്കൻഡ്', + m : 'ഒരു മിനിറ്റ്', + mm : '%d മിനിറ്റ്', + h : 'ഒരു മണിക്കൂർ', + hh : '%d മണിക്കൂർ', + d : 'ഒരു ദിവസം', + dd : '%d ദിവസം', + M : 'ഒരു മാസം', + MM : '%d മാസം', + y : 'ഒരു വർഷം', + yy : '%d വർഷം' + }, + meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ((meridiem === 'രാത്രി' && hour >= 4) || + meridiem === 'ഉച്ച കഴിഞ്ഞ്' || + meridiem === 'വൈകുന്നേരം') { + return hour + 12; + } else { + return hour; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'രാത്രി'; + } else if (hour < 12) { + return 'രാവിലെ'; + } else if (hour < 17) { + return 'ഉച്ച കഴിഞ്ഞ്'; + } else if (hour < 20) { + return 'വൈകുന്നേരം'; + } else { + return 'രാത്രി'; + } + } + }); + + //! moment.js locale configuration + + function translate$7(number, withoutSuffix, key, isFuture) { + switch (key) { + case 's': + return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын'; + case 'ss': + return number + (withoutSuffix ? ' секунд' : ' секундын'); + case 'm': + case 'mm': + return number + (withoutSuffix ? ' минут' : ' минутын'); + case 'h': + case 'hh': + return number + (withoutSuffix ? ' цаг' : ' цагийн'); + case 'd': + case 'dd': + return number + (withoutSuffix ? ' өдөр' : ' өдрийн'); + case 'M': + case 'MM': + return number + (withoutSuffix ? ' сар' : ' сарын'); + case 'y': + case 'yy': + return number + (withoutSuffix ? ' жил' : ' жилийн'); + default: + return number; + } + } + + moment.defineLocale('mn', { + months : 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split('_'), + monthsShort : '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split('_'), + monthsParseExact : true, + weekdays : 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'), + weekdaysShort : 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'), + weekdaysMin : 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'YYYY оны MMMMын D', + LLL : 'YYYY оны MMMMын D HH:mm', + LLLL : 'dddd, YYYY оны MMMMын D HH:mm' + }, + meridiemParse: /ҮӨ|ҮХ/i, + isPM : function (input) { + return input === 'ҮХ'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ҮӨ'; + } else { + return 'ҮХ'; + } + }, + calendar : { + sameDay : '[Өнөөдөр] LT', + nextDay : '[Маргааш] LT', + nextWeek : '[Ирэх] dddd LT', + lastDay : '[Өчигдөр] LT', + lastWeek : '[Өнгөрсөн] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s дараа', + past : '%s өмнө', + s : translate$7, + ss : translate$7, + m : translate$7, + mm : translate$7, + h : translate$7, + hh : translate$7, + d : translate$7, + dd : translate$7, + M : translate$7, + MM : translate$7, + y : translate$7, + yy : translate$7 + }, + dayOfMonthOrdinalParse: /\d{1,2} өдөр/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + ' өдөр'; + default: + return number; + } + } + }); + + //! moment.js locale configuration + + var symbolMap$b = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०' + }, + numberMap$a = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0' + }; + + function relativeTimeMr(number, withoutSuffix, string, isFuture) + { + var output = ''; + if (withoutSuffix) { + switch (string) { + case 's': output = 'काही सेकंद'; break; + case 'ss': output = '%d सेकंद'; break; + case 'm': output = 'एक मिनिट'; break; + case 'mm': output = '%d मिनिटे'; break; + case 'h': output = 'एक तास'; break; + case 'hh': output = '%d तास'; break; + case 'd': output = 'एक दिवस'; break; + case 'dd': output = '%d दिवस'; break; + case 'M': output = 'एक महिना'; break; + case 'MM': output = '%d महिने'; break; + case 'y': output = 'एक वर्ष'; break; + case 'yy': output = '%d वर्षे'; break; + } + } + else { + switch (string) { + case 's': output = 'काही सेकंदां'; break; + case 'ss': output = '%d सेकंदां'; break; + case 'm': output = 'एका मिनिटा'; break; + case 'mm': output = '%d मिनिटां'; break; + case 'h': output = 'एका तासा'; break; + case 'hh': output = '%d तासां'; break; + case 'd': output = 'एका दिवसा'; break; + case 'dd': output = '%d दिवसां'; break; + case 'M': output = 'एका महिन्या'; break; + case 'MM': output = '%d महिन्यां'; break; + case 'y': output = 'एका वर्षा'; break; + case 'yy': output = '%d वर्षां'; break; + } + } + return output.replace(/%d/i, number); + } + + moment.defineLocale('mr', { + months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'), + monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'), + monthsParseExact : true, + weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat : { + LT : 'A h:mm वाजता', + LTS : 'A h:mm:ss वाजता', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm वाजता', + LLLL : 'dddd, D MMMM YYYY, A h:mm वाजता' + }, + calendar : { + sameDay : '[आज] LT', + nextDay : '[उद्या] LT', + nextWeek : 'dddd, LT', + lastDay : '[काल] LT', + lastWeek: '[मागील] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future: '%sमध्ये', + past: '%sपूर्वी', + s: relativeTimeMr, + ss: relativeTimeMr, + m: relativeTimeMr, + mm: relativeTimeMr, + h: relativeTimeMr, + hh: relativeTimeMr, + d: relativeTimeMr, + dd: relativeTimeMr, + M: relativeTimeMr, + MM: relativeTimeMr, + y: relativeTimeMr, + yy: relativeTimeMr + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$a[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$b[match]; + }); + }, + meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'रात्री') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सकाळी') { + return hour; + } else if (meridiem === 'दुपारी') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'सायंकाळी') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'रात्री'; + } else if (hour < 10) { + return 'सकाळी'; + } else if (hour < 17) { + return 'दुपारी'; + } else if (hour < 20) { + return 'सायंकाळी'; + } else { + return 'रात्री'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('ms-my', { + months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), + monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar : { + sameDay : '[Hari ini pukul] LT', + nextDay : '[Esok pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kelmarin pukul] LT', + lastWeek : 'dddd [lepas pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dalam %s', + past : '%s yang lepas', + s : 'beberapa saat', + ss : '%d saat', + m : 'seminit', + mm : '%d minit', + h : 'sejam', + hh : '%d jam', + d : 'sehari', + dd : '%d hari', + M : 'sebulan', + MM : '%d bulan', + y : 'setahun', + yy : '%d tahun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('ms', { + months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), + monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar : { + sameDay : '[Hari ini pukul] LT', + nextDay : '[Esok pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kelmarin pukul] LT', + lastWeek : 'dddd [lepas pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dalam %s', + past : '%s yang lepas', + s : 'beberapa saat', + ss : '%d saat', + m : 'seminit', + mm : '%d minit', + h : 'sejam', + hh : '%d jam', + d : 'sehari', + dd : '%d hari', + M : 'sebulan', + MM : '%d bulan', + y : 'setahun', + yy : '%d tahun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('mt', { + months : 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split('_'), + monthsShort : 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'), + weekdays : 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split('_'), + weekdaysShort : 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'), + weekdaysMin : 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Illum fil-]LT', + nextDay : '[Għada fil-]LT', + nextWeek : 'dddd [fil-]LT', + lastDay : '[Il-bieraħ fil-]LT', + lastWeek : 'dddd [li għadda] [fil-]LT', + sameElse : 'L' + }, + relativeTime : { + future : 'f’ %s', + past : '%s ilu', + s : 'ftit sekondi', + ss : '%d sekondi', + m : 'minuta', + mm : '%d minuti', + h : 'siegħa', + hh : '%d siegħat', + d : 'ġurnata', + dd : '%d ġranet', + M : 'xahar', + MM : '%d xhur', + y : 'sena', + yy : '%d sni' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$c = { + '1': '၁', + '2': '၂', + '3': '၃', + '4': '၄', + '5': '၅', + '6': '၆', + '7': '၇', + '8': '၈', + '9': '၉', + '0': '၀' + }, numberMap$b = { + '၁': '1', + '၂': '2', + '၃': '3', + '၄': '4', + '၅': '5', + '၆': '6', + '၇': '7', + '၈': '8', + '၉': '9', + '၀': '0' + }; + + moment.defineLocale('my', { + months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'), + monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'), + weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'), + weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[ယနေ.] LT [မှာ]', + nextDay: '[မနက်ဖြန်] LT [မှာ]', + nextWeek: 'dddd LT [မှာ]', + lastDay: '[မနေ.က] LT [မှာ]', + lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]', + sameElse: 'L' + }, + relativeTime: { + future: 'လာမည့် %s မှာ', + past: 'လွန်ခဲ့သော %s က', + s: 'စက္ကန်.အနည်းငယ်', + ss : '%d စက္ကန့်', + m: 'တစ်မိနစ်', + mm: '%d မိနစ်', + h: 'တစ်နာရီ', + hh: '%d နာရီ', + d: 'တစ်ရက်', + dd: '%d ရက်', + M: 'တစ်လ', + MM: '%d လ', + y: 'တစ်နှစ်', + yy: '%d နှစ်' + }, + preparse: function (string) { + return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) { + return numberMap$b[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$c[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('nb', { + months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + monthsShort : 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'), + monthsParseExact : true, + weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort : 'sø._ma._ti._on._to._fr._lø.'.split('_'), + weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY [kl.] HH:mm', + LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm' + }, + calendar : { + sameDay: '[i dag kl.] LT', + nextDay: '[i morgen kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[i går kl.] LT', + lastWeek: '[forrige] dddd [kl.] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'om %s', + past : '%s siden', + s : 'noen sekunder', + ss : '%d sekunder', + m : 'ett minutt', + mm : '%d minutter', + h : 'en time', + hh : '%d timer', + d : 'en dag', + dd : '%d dager', + M : 'en måned', + MM : '%d måneder', + y : 'ett år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$d = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०' + }, + numberMap$c = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0' + }; + + moment.defineLocale('ne', { + months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'), + monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'), + monthsParseExact : true, + weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'), + weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'), + weekdaysMin : 'आ._सो._मं._बु._बि._शु._श.'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'Aको h:mm बजे', + LTS : 'Aको h:mm:ss बजे', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, Aको h:mm बजे', + LLLL : 'dddd, D MMMM YYYY, Aको h:mm बजे' + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$c[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$d[match]; + }); + }, + meridiemParse: /राति|बिहान|दिउँसो|साँझ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'राति') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'बिहान') { + return hour; + } else if (meridiem === 'दिउँसो') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'साँझ') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 3) { + return 'राति'; + } else if (hour < 12) { + return 'बिहान'; + } else if (hour < 16) { + return 'दिउँसो'; + } else if (hour < 20) { + return 'साँझ'; + } else { + return 'राति'; + } + }, + calendar : { + sameDay : '[आज] LT', + nextDay : '[भोलि] LT', + nextWeek : '[आउँदो] dddd[,] LT', + lastDay : '[हिजो] LT', + lastWeek : '[गएको] dddd[,] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%sमा', + past : '%s अगाडि', + s : 'केही क्षण', + ss : '%d सेकेण्ड', + m : 'एक मिनेट', + mm : '%d मिनेट', + h : 'एक घण्टा', + hh : '%d घण्टा', + d : 'एक दिन', + dd : '%d दिन', + M : 'एक महिना', + MM : '%d महिना', + y : 'एक बर्ष', + yy : '%d बर्ष' + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var monthsShortWithDots$1 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), + monthsShortWithoutDots$1 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'); + + var monthsParse$4 = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i]; + var monthsRegex$4 = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + + moment.defineLocale('nl-be', { + months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortWithDots$1; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots$1[m.month()]; + } else { + return monthsShortWithDots$1[m.month()]; + } + }, + + monthsRegex: monthsRegex$4, + monthsShortRegex: monthsRegex$4, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse : monthsParse$4, + longMonthsParse : monthsParse$4, + shortMonthsParse : monthsParse$4, + + weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), + weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'over %s', + past : '%s geleden', + s : 'een paar seconden', + ss : '%d seconden', + m : 'één minuut', + mm : '%d minuten', + h : 'één uur', + hh : '%d uur', + d : 'één dag', + dd : '%d dagen', + M : 'één maand', + MM : '%d maanden', + y : 'één jaar', + yy : '%d jaar' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var monthsShortWithDots$2 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), + monthsShortWithoutDots$2 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'); + + var monthsParse$5 = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i]; + var monthsRegex$5 = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + + moment.defineLocale('nl', { + months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortWithDots$2; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots$2[m.month()]; + } else { + return monthsShortWithDots$2[m.month()]; + } + }, + + monthsRegex: monthsRegex$5, + monthsShortRegex: monthsRegex$5, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse : monthsParse$5, + longMonthsParse : monthsParse$5, + shortMonthsParse : monthsParse$5, + + weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), + weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD-MM-YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'over %s', + past : '%s geleden', + s : 'een paar seconden', + ss : '%d seconden', + m : 'één minuut', + mm : '%d minuten', + h : 'één uur', + hh : '%d uur', + d : 'één dag', + dd : '%d dagen', + M : 'één maand', + MM : '%d maanden', + y : 'één jaar', + yy : '%d jaar' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('nn', { + months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), + weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'), + weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'), + weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY [kl.] H:mm', + LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm' + }, + calendar : { + sameDay: '[I dag klokka] LT', + nextDay: '[I morgon klokka] LT', + nextWeek: 'dddd [klokka] LT', + lastDay: '[I går klokka] LT', + lastWeek: '[Føregåande] dddd [klokka] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'om %s', + past : '%s sidan', + s : 'nokre sekund', + ss : '%d sekund', + m : 'eit minutt', + mm : '%d minutt', + h : 'ein time', + hh : '%d timar', + d : 'ein dag', + dd : '%d dagar', + M : 'ein månad', + MM : '%d månader', + y : 'eit år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$e = { + '1': '੧', + '2': '੨', + '3': '੩', + '4': '੪', + '5': '੫', + '6': '੬', + '7': '੭', + '8': '੮', + '9': '੯', + '0': '੦' + }, + numberMap$d = { + '੧': '1', + '੨': '2', + '੩': '3', + '੪': '4', + '੫': '5', + '੬': '6', + '੭': '7', + '੮': '8', + '੯': '9', + '੦': '0' + }; + + moment.defineLocale('pa-in', { + // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi. + months : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'), + monthsShort : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'), + weekdays : 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'), + weekdaysShort : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + weekdaysMin : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + longDateFormat : { + LT : 'A h:mm ਵਜੇ', + LTS : 'A h:mm:ss ਵਜੇ', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm ਵਜੇ', + LLLL : 'dddd, D MMMM YYYY, A h:mm ਵਜੇ' + }, + calendar : { + sameDay : '[ਅਜ] LT', + nextDay : '[ਕਲ] LT', + nextWeek : '[ਅਗਲਾ] dddd, LT', + lastDay : '[ਕਲ] LT', + lastWeek : '[ਪਿਛਲੇ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ਵਿੱਚ', + past : '%s ਪਿਛਲੇ', + s : 'ਕੁਝ ਸਕਿੰਟ', + ss : '%d ਸਕਿੰਟ', + m : 'ਇਕ ਮਿੰਟ', + mm : '%d ਮਿੰਟ', + h : 'ਇੱਕ ਘੰਟਾ', + hh : '%d ਘੰਟੇ', + d : 'ਇੱਕ ਦਿਨ', + dd : '%d ਦਿਨ', + M : 'ਇੱਕ ਮਹੀਨਾ', + MM : '%d ਮਹੀਨੇ', + y : 'ਇੱਕ ਸਾਲ', + yy : '%d ਸਾਲ' + }, + preparse: function (string) { + return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) { + return numberMap$d[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$e[match]; + }); + }, + // Punjabi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi. + meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ਰਾਤ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ਸਵੇਰ') { + return hour; + } else if (meridiem === 'ਦੁਪਹਿਰ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ਸ਼ਾਮ') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ਰਾਤ'; + } else if (hour < 10) { + return 'ਸਵੇਰ'; + } else if (hour < 17) { + return 'ਦੁਪਹਿਰ'; + } else if (hour < 20) { + return 'ਸ਼ਾਮ'; + } else { + return 'ਰਾਤ'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'), + monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_'); + function plural$3(n) { + return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1); + } + function translate$8(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + return result + (plural$3(number) ? 'sekundy' : 'sekund'); + case 'm': + return withoutSuffix ? 'minuta' : 'minutę'; + case 'mm': + return result + (plural$3(number) ? 'minuty' : 'minut'); + case 'h': + return withoutSuffix ? 'godzina' : 'godzinę'; + case 'hh': + return result + (plural$3(number) ? 'godziny' : 'godzin'); + case 'MM': + return result + (plural$3(number) ? 'miesiące' : 'miesięcy'); + case 'yy': + return result + (plural$3(number) ? 'lata' : 'lat'); + } + } + + moment.defineLocale('pl', { + months : function (momentToFormat, format) { + if (!momentToFormat) { + return monthsNominative; + } else if (format === '') { + // Hack: if format empty we know this is used to generate + // RegExp by moment. Give then back both valid forms of months + // in RegExp ready format. + return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')'; + } else if (/D MMMM/.test(format)) { + return monthsSubjective[momentToFormat.month()]; + } else { + return monthsNominative[momentToFormat.month()]; + } + }, + monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), + weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'), + weekdaysShort : 'ndz_pon_wt_śr_czw_pt_sob'.split('_'), + weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Dziś o] LT', + nextDay: '[Jutro o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[W niedzielę o] LT'; + + case 2: + return '[We wtorek o] LT'; + + case 3: + return '[W środę o] LT'; + + case 6: + return '[W sobotę o] LT'; + + default: + return '[W] dddd [o] LT'; + } + }, + lastDay: '[Wczoraj o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[W zeszłą niedzielę o] LT'; + case 3: + return '[W zeszłą środę o] LT'; + case 6: + return '[W zeszłą sobotę o] LT'; + default: + return '[W zeszły] dddd [o] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'za %s', + past : '%s temu', + s : 'kilka sekund', + ss : translate$8, + m : translate$8, + mm : translate$8, + h : translate$8, + hh : translate$8, + d : '1 dzień', + dd : '%d dni', + M : 'miesiąc', + MM : translate$8, + y : 'rok', + yy : translate$8 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('pt-br', { + months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'), + monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'), + weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), + weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY [às] HH:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm' + }, + calendar : { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return (this.day() === 0 || this.day() === 6) ? + '[Último] dddd [às] LT' : // Saturday + Sunday + '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L' + }, + relativeTime : { + future : 'em %s', + past : 'há %s', + s : 'poucos segundos', + ss : '%d segundos', + m : 'um minuto', + mm : '%d minutos', + h : 'uma hora', + hh : '%d horas', + d : 'um dia', + dd : '%d dias', + M : 'um mês', + MM : '%d meses', + y : 'um ano', + yy : '%d anos' + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal : '%dº' + }); + + //! moment.js locale configuration + + moment.defineLocale('pt', { + months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'), + monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'), + weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), + weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY HH:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm' + }, + calendar : { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return (this.day() === 0 || this.day() === 6) ? + '[Último] dddd [às] LT' : // Saturday + Sunday + '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L' + }, + relativeTime : { + future : 'em %s', + past : 'há %s', + s : 'segundos', + ss : '%d segundos', + m : 'um minuto', + mm : '%d minutos', + h : 'uma hora', + hh : '%d horas', + d : 'um dia', + dd : '%d dias', + M : 'um mês', + MM : '%d meses', + y : 'um ano', + yy : '%d anos' + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function relativeTimeWithPlural$2(number, withoutSuffix, key) { + var format = { + 'ss': 'secunde', + 'mm': 'minute', + 'hh': 'ore', + 'dd': 'zile', + 'MM': 'luni', + 'yy': 'ani' + }, + separator = ' '; + if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) { + separator = ' de '; + } + return number + separator + format[key]; + } + + moment.defineLocale('ro', { + months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'), + monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'), + weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'), + weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY H:mm', + LLLL : 'dddd, D MMMM YYYY H:mm' + }, + calendar : { + sameDay: '[azi la] LT', + nextDay: '[mâine la] LT', + nextWeek: 'dddd [la] LT', + lastDay: '[ieri la] LT', + lastWeek: '[fosta] dddd [la] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'peste %s', + past : '%s în urmă', + s : 'câteva secunde', + ss : relativeTimeWithPlural$2, + m : 'un minut', + mm : relativeTimeWithPlural$2, + h : 'o oră', + hh : relativeTimeWithPlural$2, + d : 'o zi', + dd : relativeTimeWithPlural$2, + M : 'o lună', + MM : relativeTimeWithPlural$2, + y : 'un an', + yy : relativeTimeWithPlural$2 + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function plural$4(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); + } + function relativeTimeWithPlural$3(number, withoutSuffix, key) { + var format = { + 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + 'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут', + 'hh': 'час_часа_часов', + 'dd': 'день_дня_дней', + 'MM': 'месяц_месяца_месяцев', + 'yy': 'год_года_лет' + }; + if (key === 'm') { + return withoutSuffix ? 'минута' : 'минуту'; + } + else { + return number + ' ' + plural$4(format[key], +number); + } + } + var monthsParse$6 = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i]; + + // http://new.gramota.ru/spravka/rules/139-prop : § 103 + // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637 + // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753 + moment.defineLocale('ru', { + months : { + format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'), + standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_') + }, + monthsShort : { + // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ? + format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'), + standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_') + }, + weekdays : { + standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'), + format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'), + isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/ + }, + weekdaysShort : 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin : 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + monthsParse : monthsParse$6, + longMonthsParse : monthsParse$6, + shortMonthsParse : monthsParse$6, + + // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки + monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // копия предыдущего + monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // полные названия с падежами + monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i, + + // Выражение, которое соотвествует только сокращённым формам + monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY г.', + LLL : 'D MMMM YYYY г., H:mm', + LLLL : 'dddd, D MMMM YYYY г., H:mm' + }, + calendar : { + sameDay: '[Сегодня, в] LT', + nextDay: '[Завтра, в] LT', + lastDay: '[Вчера, в] LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В следующее] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В следующий] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В следующую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + lastWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В прошлое] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В прошлый] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В прошлую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'через %s', + past : '%s назад', + s : 'несколько секунд', + ss : relativeTimeWithPlural$3, + m : relativeTimeWithPlural$3, + mm : relativeTimeWithPlural$3, + h : 'час', + hh : relativeTimeWithPlural$3, + d : 'день', + dd : relativeTimeWithPlural$3, + M : 'месяц', + MM : relativeTimeWithPlural$3, + y : 'год', + yy : relativeTimeWithPlural$3 + }, + meridiemParse: /ночи|утра|дня|вечера/i, + isPM : function (input) { + return /^(дня|вечера)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ночи'; + } else if (hour < 12) { + return 'утра'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечера'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + return number + '-й'; + case 'D': + return number + '-го'; + case 'w': + case 'W': + return number + '-я'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var months$7 = [ + 'جنوري', + 'فيبروري', + 'مارچ', + 'اپريل', + 'مئي', + 'جون', + 'جولاءِ', + 'آگسٽ', + 'سيپٽمبر', + 'آڪٽوبر', + 'نومبر', + 'ڊسمبر' + ]; + var days = [ + 'آچر', + 'سومر', + 'اڱارو', + 'اربع', + 'خميس', + 'جمع', + 'ڇنڇر' + ]; + + moment.defineLocale('sd', { + months : months$7, + monthsShort : months$7, + weekdays : days, + weekdaysShort : days, + weekdaysMin : days, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd، D MMMM YYYY HH:mm' + }, + meridiemParse: /صبح|شام/, + isPM : function (input) { + return 'شام' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar : { + sameDay : '[اڄ] LT', + nextDay : '[سڀاڻي] LT', + nextWeek : 'dddd [اڳين هفتي تي] LT', + lastDay : '[ڪالهه] LT', + lastWeek : '[گزريل هفتي] dddd [تي] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s پوء', + past : '%s اڳ', + s : 'چند سيڪنڊ', + ss : '%d سيڪنڊ', + m : 'هڪ منٽ', + mm : '%d منٽ', + h : 'هڪ ڪلاڪ', + hh : '%d ڪلاڪ', + d : 'هڪ ڏينهن', + dd : '%d ڏينهن', + M : 'هڪ مهينو', + MM : '%d مهينا', + y : 'هڪ سال', + yy : '%d سال' + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('se', { + months : 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'), + monthsShort : 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'), + weekdays : 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'), + weekdaysShort : 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'), + weekdaysMin : 's_v_m_g_d_b_L'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'MMMM D. [b.] YYYY', + LLL : 'MMMM D. [b.] YYYY [ti.] HH:mm', + LLLL : 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm' + }, + calendar : { + sameDay: '[otne ti] LT', + nextDay: '[ihttin ti] LT', + nextWeek: 'dddd [ti] LT', + lastDay: '[ikte ti] LT', + lastWeek: '[ovddit] dddd [ti] LT', + sameElse: 'L' + }, + relativeTime : { + future : '%s geažes', + past : 'maŋit %s', + s : 'moadde sekunddat', + ss: '%d sekunddat', + m : 'okta minuhta', + mm : '%d minuhtat', + h : 'okta diimmu', + hh : '%d diimmut', + d : 'okta beaivi', + dd : '%d beaivvit', + M : 'okta mánnu', + MM : '%d mánut', + y : 'okta jahki', + yy : '%d jagit' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + /*jshint -W100*/ + moment.defineLocale('si', { + months : 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'), + monthsShort : 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'), + weekdays : 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'), + weekdaysShort : 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'), + weekdaysMin : 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'a h:mm', + LTS : 'a h:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY MMMM D', + LLL : 'YYYY MMMM D, a h:mm', + LLLL : 'YYYY MMMM D [වැනි] dddd, a h:mm:ss' + }, + calendar : { + sameDay : '[අද] LT[ට]', + nextDay : '[හෙට] LT[ට]', + nextWeek : 'dddd LT[ට]', + lastDay : '[ඊයේ] LT[ට]', + lastWeek : '[පසුගිය] dddd LT[ට]', + sameElse : 'L' + }, + relativeTime : { + future : '%sකින්', + past : '%sකට පෙර', + s : 'තත්පර කිහිපය', + ss : 'තත්පර %d', + m : 'මිනිත්තුව', + mm : 'මිනිත්තු %d', + h : 'පැය', + hh : 'පැය %d', + d : 'දිනය', + dd : 'දින %d', + M : 'මාසය', + MM : 'මාස %d', + y : 'වසර', + yy : 'වසර %d' + }, + dayOfMonthOrdinalParse: /\d{1,2} වැනි/, + ordinal : function (number) { + return number + ' වැනි'; + }, + meridiemParse : /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./, + isPM : function (input) { + return input === 'ප.ව.' || input === 'පස් වරු'; + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'ප.ව.' : 'පස් වරු'; + } else { + return isLower ? 'පෙ.ව.' : 'පෙර වරු'; + } + } + }); + + //! moment.js locale configuration + + var months$8 = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'), + monthsShort$6 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_'); + function plural$5(n) { + return (n > 1) && (n < 5); + } + function translate$9(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'sekundy' : 'sekúnd'); + } else { + return result + 'sekundami'; + } + break; + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou'); + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'minúty' : 'minút'); + } else { + return result + 'minútami'; + } + break; + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'hodiny' : 'hodín'); + } else { + return result + 'hodinami'; + } + break; + case 'd': // a day / in a day / a day ago + return (withoutSuffix || isFuture) ? 'deň' : 'dňom'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'dni' : 'dní'); + } else { + return result + 'dňami'; + } + break; + case 'M': // a month / in a month / a month ago + return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'mesiace' : 'mesiacov'); + } else { + return result + 'mesiacmi'; + } + break; + case 'y': // a year / in a year / a year ago + return (withoutSuffix || isFuture) ? 'rok' : 'rokom'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'roky' : 'rokov'); + } else { + return result + 'rokmi'; + } + break; + } + } + + moment.defineLocale('sk', { + months : months$8, + monthsShort : monthsShort$6, + weekdays : 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'), + weekdaysShort : 'ne_po_ut_st_št_pi_so'.split('_'), + weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'), + longDateFormat : { + LT: 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd D. MMMM YYYY H:mm' + }, + calendar : { + sameDay: '[dnes o] LT', + nextDay: '[zajtra o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v nedeľu o] LT'; + case 1: + case 2: + return '[v] dddd [o] LT'; + case 3: + return '[v stredu o] LT'; + case 4: + return '[vo štvrtok o] LT'; + case 5: + return '[v piatok o] LT'; + case 6: + return '[v sobotu o] LT'; + } + }, + lastDay: '[včera o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulú nedeľu o] LT'; + case 1: + case 2: + return '[minulý] dddd [o] LT'; + case 3: + return '[minulú stredu o] LT'; + case 4: + case 5: + return '[minulý] dddd [o] LT'; + case 6: + return '[minulú sobotu o] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'za %s', + past : 'pred %s', + s : translate$9, + ss : translate$9, + m : translate$9, + mm : translate$9, + h : translate$9, + hh : translate$9, + d : translate$9, + dd : translate$9, + M : translate$9, + MM : translate$9, + y : translate$9, + yy : translate$9 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function processRelativeTime$6(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami'; + case 'ss': + if (number === 1) { + result += withoutSuffix ? 'sekundo' : 'sekundi'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah'; + } else { + result += 'sekund'; + } + return result; + case 'm': + return withoutSuffix ? 'ena minuta' : 'eno minuto'; + case 'mm': + if (number === 1) { + result += withoutSuffix ? 'minuta' : 'minuto'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'minuti' : 'minutama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'minute' : 'minutami'; + } else { + result += withoutSuffix || isFuture ? 'minut' : 'minutami'; + } + return result; + case 'h': + return withoutSuffix ? 'ena ura' : 'eno uro'; + case 'hh': + if (number === 1) { + result += withoutSuffix ? 'ura' : 'uro'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'uri' : 'urama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'ure' : 'urami'; + } else { + result += withoutSuffix || isFuture ? 'ur' : 'urami'; + } + return result; + case 'd': + return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; + case 'dd': + if (number === 1) { + result += withoutSuffix || isFuture ? 'dan' : 'dnem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'dni' : 'dnevoma'; + } else { + result += withoutSuffix || isFuture ? 'dni' : 'dnevi'; + } + return result; + case 'M': + return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; + case 'MM': + if (number === 1) { + result += withoutSuffix || isFuture ? 'mesec' : 'mesecem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'meseca' : 'mesecema'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'mesece' : 'meseci'; + } else { + result += withoutSuffix || isFuture ? 'mesecev' : 'meseci'; + } + return result; + case 'y': + return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; + case 'yy': + if (number === 1) { + result += withoutSuffix || isFuture ? 'leto' : 'letom'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'leti' : 'letoma'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'leta' : 'leti'; + } else { + result += withoutSuffix || isFuture ? 'let' : 'leti'; + } + return result; + } + } + + moment.defineLocale('sl', { + months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'), + monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'), + weekdaysShort : 'ned._pon._tor._sre._čet._pet._sob.'.split('_'), + weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[danes ob] LT', + nextDay : '[jutri ob] LT', + + nextWeek : function () { + switch (this.day()) { + case 0: + return '[v] [nedeljo] [ob] LT'; + case 3: + return '[v] [sredo] [ob] LT'; + case 6: + return '[v] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[v] dddd [ob] LT'; + } + }, + lastDay : '[včeraj ob] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + return '[prejšnjo] [nedeljo] [ob] LT'; + case 3: + return '[prejšnjo] [sredo] [ob] LT'; + case 6: + return '[prejšnjo] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prejšnji] dddd [ob] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'čez %s', + past : 'pred %s', + s : processRelativeTime$6, + ss : processRelativeTime$6, + m : processRelativeTime$6, + mm : processRelativeTime$6, + h : processRelativeTime$6, + hh : processRelativeTime$6, + d : processRelativeTime$6, + dd : processRelativeTime$6, + M : processRelativeTime$6, + MM : processRelativeTime$6, + y : processRelativeTime$6, + yy : processRelativeTime$6 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('sq', { + months : 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'), + monthsShort : 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'), + weekdays : 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'), + weekdaysShort : 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'), + weekdaysMin : 'D_H_Ma_Më_E_P_Sh'.split('_'), + weekdaysParseExact : true, + meridiemParse: /PD|MD/, + isPM: function (input) { + return input.charAt(0) === 'M'; + }, + meridiem : function (hours, minutes, isLower) { + return hours < 12 ? 'PD' : 'MD'; + }, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Sot në] LT', + nextDay : '[Nesër në] LT', + nextWeek : 'dddd [në] LT', + lastDay : '[Dje në] LT', + lastWeek : 'dddd [e kaluar në] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'në %s', + past : '%s më parë', + s : 'disa sekonda', + ss : '%d sekonda', + m : 'një minutë', + mm : '%d minuta', + h : 'një orë', + hh : '%d orë', + d : 'një ditë', + dd : '%d ditë', + M : 'një muaj', + MM : '%d muaj', + y : 'një vit', + yy : '%d vite' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var translator$1 = { + words: { //Different grammatical cases + ss: ['секунда', 'секунде', 'секунди'], + m: ['један минут', 'једне минуте'], + mm: ['минут', 'минуте', 'минута'], + h: ['један сат', 'једног сата'], + hh: ['сат', 'сата', 'сати'], + dd: ['дан', 'дана', 'дана'], + MM: ['месец', 'месеца', 'месеци'], + yy: ['година', 'године', 'година'] + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator$1.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return number + ' ' + translator$1.correctGrammaticalCase(number, wordKey); + } + } + }; + + moment.defineLocale('sr-cyrl', { + months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'), + monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'), + monthsParseExact: true, + weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'), + weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'), + weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm', + LTS : 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + }, + calendar: { + sameDay: '[данас у] LT', + nextDay: '[сутра у] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[у] [недељу] [у] LT'; + case 3: + return '[у] [среду] [у] LT'; + case 6: + return '[у] [суботу] [у] LT'; + case 1: + case 2: + case 4: + case 5: + return '[у] dddd [у] LT'; + } + }, + lastDay : '[јуче у] LT', + lastWeek : function () { + var lastWeekDays = [ + '[прошле] [недеље] [у] LT', + '[прошлог] [понедељка] [у] LT', + '[прошлог] [уторка] [у] LT', + '[прошле] [среде] [у] LT', + '[прошлог] [четвртка] [у] LT', + '[прошлог] [петка] [у] LT', + '[прошле] [суботе] [у] LT' + ]; + return lastWeekDays[this.day()]; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'за %s', + past : 'пре %s', + s : 'неколико секунди', + ss : translator$1.translate, + m : translator$1.translate, + mm : translator$1.translate, + h : translator$1.translate, + hh : translator$1.translate, + d : 'дан', + dd : translator$1.translate, + M : 'месец', + MM : translator$1.translate, + y : 'годину', + yy : translator$1.translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var translator$2 = { + words: { //Different grammatical cases + ss: ['sekunda', 'sekunde', 'sekundi'], + m: ['jedan minut', 'jedne minute'], + mm: ['minut', 'minute', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mesec', 'meseca', 'meseci'], + yy: ['godina', 'godine', 'godina'] + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator$2.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return number + ' ' + translator$2.correctGrammaticalCase(number, wordKey); + } + } + }; + + moment.defineLocale('sr', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'), + weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm', + LTS : 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedelju] [u] LT'; + case 3: + return '[u] [sredu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[juče u] LT', + lastWeek : function () { + var lastWeekDays = [ + '[prošle] [nedelje] [u] LT', + '[prošlog] [ponedeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT' + ]; + return lastWeekDays[this.day()]; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'pre %s', + s : 'nekoliko sekundi', + ss : translator$2.translate, + m : translator$2.translate, + mm : translator$2.translate, + h : translator$2.translate, + hh : translator$2.translate, + d : 'dan', + dd : translator$2.translate, + M : 'mesec', + MM : translator$2.translate, + y : 'godinu', + yy : translator$2.translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('ss', { + months : "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split('_'), + monthsShort : 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'), + weekdays : 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'), + weekdaysShort : 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'), + weekdaysMin : 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Namuhla nga] LT', + nextDay : '[Kusasa nga] LT', + nextWeek : 'dddd [nga] LT', + lastDay : '[Itolo nga] LT', + lastWeek : 'dddd [leliphelile] [nga] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'nga %s', + past : 'wenteka nga %s', + s : 'emizuzwana lomcane', + ss : '%d mzuzwana', + m : 'umzuzu', + mm : '%d emizuzu', + h : 'lihora', + hh : '%d emahora', + d : 'lilanga', + dd : '%d emalanga', + M : 'inyanga', + MM : '%d tinyanga', + y : 'umnyaka', + yy : '%d iminyaka' + }, + meridiemParse: /ekuseni|emini|entsambama|ebusuku/, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'ekuseni'; + } else if (hours < 15) { + return 'emini'; + } else if (hours < 19) { + return 'entsambama'; + } else { + return 'ebusuku'; + } + }, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ekuseni') { + return hour; + } else if (meridiem === 'emini') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') { + if (hour === 0) { + return 0; + } + return hour + 12; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal : '%d', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('sv', { + months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'), + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), + weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'), + weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [kl.] HH:mm', + LLLL : 'dddd D MMMM YYYY [kl.] HH:mm', + lll : 'D MMM YYYY HH:mm', + llll : 'ddd D MMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Idag] LT', + nextDay: '[Imorgon] LT', + lastDay: '[Igår] LT', + nextWeek: '[På] dddd LT', + lastWeek: '[I] dddd[s] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'om %s', + past : 'för %s sedan', + s : 'några sekunder', + ss : '%d sekunder', + m : 'en minut', + mm : '%d minuter', + h : 'en timme', + hh : '%d timmar', + d : 'en dag', + dd : '%d dagar', + M : 'en månad', + MM : '%d månader', + y : 'ett år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}(e|a)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'e' : + (b === 1) ? 'a' : + (b === 2) ? 'a' : + (b === 3) ? 'e' : 'e'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('sw', { + months : 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'), + monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), + weekdays : 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'), + weekdaysShort : 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), + weekdaysMin : 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[leo saa] LT', + nextDay : '[kesho saa] LT', + nextWeek : '[wiki ijayo] dddd [saat] LT', + lastDay : '[jana] LT', + lastWeek : '[wiki iliyopita] dddd [saat] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s baadaye', + past : 'tokea %s', + s : 'hivi punde', + ss : 'sekunde %d', + m : 'dakika moja', + mm : 'dakika %d', + h : 'saa limoja', + hh : 'masaa %d', + d : 'siku moja', + dd : 'masiku %d', + M : 'mwezi mmoja', + MM : 'miezi %d', + y : 'mwaka mmoja', + yy : 'miaka %d' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$f = { + '1': '௧', + '2': '௨', + '3': '௩', + '4': '௪', + '5': '௫', + '6': '௬', + '7': '௭', + '8': '௮', + '9': '௯', + '0': '௦' + }, numberMap$e = { + '௧': '1', + '௨': '2', + '௩': '3', + '௪': '4', + '௫': '5', + '௬': '6', + '௭': '7', + '௮': '8', + '௯': '9', + '௦': '0' + }; + + moment.defineLocale('ta', { + months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'), + monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'), + weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'), + weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'), + weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, HH:mm', + LLLL : 'dddd, D MMMM YYYY, HH:mm' + }, + calendar : { + sameDay : '[இன்று] LT', + nextDay : '[நாளை] LT', + nextWeek : 'dddd, LT', + lastDay : '[நேற்று] LT', + lastWeek : '[கடந்த வாரம்] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s இல்', + past : '%s முன்', + s : 'ஒரு சில விநாடிகள்', + ss : '%d விநாடிகள்', + m : 'ஒரு நிமிடம்', + mm : '%d நிமிடங்கள்', + h : 'ஒரு மணி நேரம்', + hh : '%d மணி நேரம்', + d : 'ஒரு நாள்', + dd : '%d நாட்கள்', + M : 'ஒரு மாதம்', + MM : '%d மாதங்கள்', + y : 'ஒரு வருடம்', + yy : '%d ஆண்டுகள்' + }, + dayOfMonthOrdinalParse: /\d{1,2}வது/, + ordinal : function (number) { + return number + 'வது'; + }, + preparse: function (string) { + return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) { + return numberMap$e[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$f[match]; + }); + }, + // refer http://ta.wikipedia.org/s/1er1 + meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/, + meridiem : function (hour, minute, isLower) { + if (hour < 2) { + return ' யாமம்'; + } else if (hour < 6) { + return ' வைகறை'; // வைகறை + } else if (hour < 10) { + return ' காலை'; // காலை + } else if (hour < 14) { + return ' நண்பகல்'; // நண்பகல் + } else if (hour < 18) { + return ' எற்பாடு'; // எற்பாடு + } else if (hour < 22) { + return ' மாலை'; // மாலை + } else { + return ' யாமம்'; + } + }, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'யாமம்') { + return hour < 2 ? hour : hour + 12; + } else if (meridiem === 'வைகறை' || meridiem === 'காலை') { + return hour; + } else if (meridiem === 'நண்பகல்') { + return hour >= 10 ? hour : hour + 12; + } else { + return hour + 12; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('te', { + months : 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'), + monthsShort : 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'), + monthsParseExact : true, + weekdays : 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'), + weekdaysShort : 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'), + weekdaysMin : 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm', + LLLL : 'dddd, D MMMM YYYY, A h:mm' + }, + calendar : { + sameDay : '[నేడు] LT', + nextDay : '[రేపు] LT', + nextWeek : 'dddd, LT', + lastDay : '[నిన్న] LT', + lastWeek : '[గత] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s లో', + past : '%s క్రితం', + s : 'కొన్ని క్షణాలు', + ss : '%d సెకన్లు', + m : 'ఒక నిమిషం', + mm : '%d నిమిషాలు', + h : 'ఒక గంట', + hh : '%d గంటలు', + d : 'ఒక రోజు', + dd : '%d రోజులు', + M : 'ఒక నెల', + MM : '%d నెలలు', + y : 'ఒక సంవత్సరం', + yy : '%d సంవత్సరాలు' + }, + dayOfMonthOrdinalParse : /\d{1,2}వ/, + ordinal : '%dవ', + meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'రాత్రి') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ఉదయం') { + return hour; + } else if (meridiem === 'మధ్యాహ్నం') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'సాయంత్రం') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'రాత్రి'; + } else if (hour < 10) { + return 'ఉదయం'; + } else if (hour < 17) { + return 'మధ్యాహ్నం'; + } else if (hour < 20) { + return 'సాయంత్రం'; + } else { + return 'రాత్రి'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('tet', { + months : 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split('_'), + monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays : 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'), + weekdaysShort : 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'), + weekdaysMin : 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Ohin iha] LT', + nextDay: '[Aban iha] LT', + nextWeek: 'dddd [iha] LT', + lastDay: '[Horiseik iha] LT', + lastWeek: 'dddd [semana kotuk] [iha] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'iha %s', + past : '%s liuba', + s : 'minutu balun', + ss : 'minutu %d', + m : 'minutu ida', + mm : 'minutu %d', + h : 'oras ida', + hh : 'oras %d', + d : 'loron ida', + dd : 'loron %d', + M : 'fulan ida', + MM : 'fulan %d', + y : 'tinan ida', + yy : 'tinan %d' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var suffixes$3 = { + 0: '-ум', + 1: '-ум', + 2: '-юм', + 3: '-юм', + 4: '-ум', + 5: '-ум', + 6: '-ум', + 7: '-ум', + 8: '-ум', + 9: '-ум', + 10: '-ум', + 12: '-ум', + 13: '-ум', + 20: '-ум', + 30: '-юм', + 40: '-ум', + 50: '-ум', + 60: '-ум', + 70: '-ум', + 80: '-ум', + 90: '-ум', + 100: '-ум' + }; + + moment.defineLocale('tg', { + months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), + monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays : 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split('_'), + weekdaysShort : 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'), + weekdaysMin : 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Имрӯз соати] LT', + nextDay : '[Пагоҳ соати] LT', + lastDay : '[Дирӯз соати] LT', + nextWeek : 'dddd[и] [ҳафтаи оянда соати] LT', + lastWeek : 'dddd[и] [ҳафтаи гузашта соати] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'баъди %s', + past : '%s пеш', + s : 'якчанд сония', + m : 'як дақиқа', + mm : '%d дақиқа', + h : 'як соат', + hh : '%d соат', + d : 'як рӯз', + dd : '%d рӯз', + M : 'як моҳ', + MM : '%d моҳ', + y : 'як сол', + yy : '%d сол' + }, + meridiemParse: /шаб|субҳ|рӯз|бегоҳ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'шаб') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'субҳ') { + return hour; + } else if (meridiem === 'рӯз') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'бегоҳ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'шаб'; + } else if (hour < 11) { + return 'субҳ'; + } else if (hour < 16) { + return 'рӯз'; + } else if (hour < 19) { + return 'бегоҳ'; + } else { + return 'шаб'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$3[number] || suffixes$3[a] || suffixes$3[b]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 1th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('th', { + months : 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'), + monthsShort : 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'), + monthsParseExact: true, + weekdays : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'), + weekdaysShort : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference + weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY เวลา H:mm', + LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm' + }, + meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/, + isPM: function (input) { + return input === 'หลังเที่ยง'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ก่อนเที่ยง'; + } else { + return 'หลังเที่ยง'; + } + }, + calendar : { + sameDay : '[วันนี้ เวลา] LT', + nextDay : '[พรุ่งนี้ เวลา] LT', + nextWeek : 'dddd[หน้า เวลา] LT', + lastDay : '[เมื่อวานนี้ เวลา] LT', + lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'อีก %s', + past : '%sที่แล้ว', + s : 'ไม่กี่วินาที', + ss : '%d วินาที', + m : '1 นาที', + mm : '%d นาที', + h : '1 ชั่วโมง', + hh : '%d ชั่วโมง', + d : '1 วัน', + dd : '%d วัน', + M : '1 เดือน', + MM : '%d เดือน', + y : '1 ปี', + yy : '%d ปี' + } + }); + + //! moment.js locale configuration + + moment.defineLocale('tl-ph', { + months : 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'), + monthsShort : 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), + weekdays : 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'), + weekdaysShort : 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), + weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'MM/D/YYYY', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY HH:mm', + LLLL : 'dddd, MMMM DD, YYYY HH:mm' + }, + calendar : { + sameDay: 'LT [ngayong araw]', + nextDay: '[Bukas ng] LT', + nextWeek: 'LT [sa susunod na] dddd', + lastDay: 'LT [kahapon]', + lastWeek: 'LT [noong nakaraang] dddd', + sameElse: 'L' + }, + relativeTime : { + future : 'sa loob ng %s', + past : '%s ang nakalipas', + s : 'ilang segundo', + ss : '%d segundo', + m : 'isang minuto', + mm : '%d minuto', + h : 'isang oras', + hh : '%d oras', + d : 'isang araw', + dd : '%d araw', + M : 'isang buwan', + MM : '%d buwan', + y : 'isang taon', + yy : '%d taon' + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal : function (number) { + return number; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_'); + + function translateFuture(output) { + var time = output; + time = (output.indexOf('jaj') !== -1) ? + time.slice(0, -3) + 'leS' : + (output.indexOf('jar') !== -1) ? + time.slice(0, -3) + 'waQ' : + (output.indexOf('DIS') !== -1) ? + time.slice(0, -3) + 'nem' : + time + ' pIq'; + return time; + } + + function translatePast(output) { + var time = output; + time = (output.indexOf('jaj') !== -1) ? + time.slice(0, -3) + 'Hu’' : + (output.indexOf('jar') !== -1) ? + time.slice(0, -3) + 'wen' : + (output.indexOf('DIS') !== -1) ? + time.slice(0, -3) + 'ben' : + time + ' ret'; + return time; + } + + function translate$a(number, withoutSuffix, string, isFuture) { + var numberNoun = numberAsNoun(number); + switch (string) { + case 'ss': + return numberNoun + ' lup'; + case 'mm': + return numberNoun + ' tup'; + case 'hh': + return numberNoun + ' rep'; + case 'dd': + return numberNoun + ' jaj'; + case 'MM': + return numberNoun + ' jar'; + case 'yy': + return numberNoun + ' DIS'; + } + } + + function numberAsNoun(number) { + var hundred = Math.floor((number % 1000) / 100), + ten = Math.floor((number % 100) / 10), + one = number % 10, + word = ''; + if (hundred > 0) { + word += numbersNouns[hundred] + 'vatlh'; + } + if (ten > 0) { + word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH'; + } + if (one > 0) { + word += ((word !== '') ? ' ' : '') + numbersNouns[one]; + } + return (word === '') ? 'pagh' : word; + } + + moment.defineLocale('tlh', { + months : 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'), + monthsShort : 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'), + monthsParseExact : true, + weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[DaHjaj] LT', + nextDay: '[wa’leS] LT', + nextWeek: 'LLL', + lastDay: '[wa’Hu’] LT', + lastWeek: 'LLL', + sameElse: 'L' + }, + relativeTime : { + future : translateFuture, + past : translatePast, + s : 'puS lup', + ss : translate$a, + m : 'wa’ tup', + mm : translate$a, + h : 'wa’ rep', + hh : translate$a, + d : 'wa’ jaj', + dd : translate$a, + M : 'wa’ jar', + MM : translate$a, + y : 'wa’ DIS', + yy : translate$a + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + var suffixes$4 = { + 1: '\'inci', + 5: '\'inci', + 8: '\'inci', + 70: '\'inci', + 80: '\'inci', + 2: '\'nci', + 7: '\'nci', + 20: '\'nci', + 50: '\'nci', + 3: '\'üncü', + 4: '\'üncü', + 100: '\'üncü', + 6: '\'ncı', + 9: '\'uncu', + 10: '\'uncu', + 30: '\'uncu', + 60: '\'ıncı', + 90: '\'ıncı' + }; + + moment.defineLocale('tr', { + months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'), + monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'), + weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'), + weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'), + weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[bugün saat] LT', + nextDay : '[yarın saat] LT', + nextWeek : '[gelecek] dddd [saat] LT', + lastDay : '[dün] LT', + lastWeek : '[geçen] dddd [saat] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s sonra', + past : '%s önce', + s : 'birkaç saniye', + ss : '%d saniye', + m : 'bir dakika', + mm : '%d dakika', + h : 'bir saat', + hh : '%d saat', + d : 'bir gün', + dd : '%d gün', + M : 'bir ay', + MM : '%d ay', + y : 'bir yıl', + yy : '%d yıl' + }, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'Do': + case 'DD': + return number; + default: + if (number === 0) { // special case for zero + return number + '\'ıncı'; + } + var a = number % 10, + b = number % 100 - a, + c = number >= 100 ? 100 : null; + return number + (suffixes$4[a] || suffixes$4[b] || suffixes$4[c]); + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals. + // This is currently too difficult (maybe even impossible) to add. + moment.defineLocale('tzl', { + months : 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'), + monthsShort : 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), + weekdays : 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), + weekdaysShort : 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), + weekdaysMin : 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM [dallas] YYYY', + LLL : 'D. MMMM [dallas] YYYY HH.mm', + LLLL : 'dddd, [li] D. MMMM [dallas] YYYY HH.mm' + }, + meridiemParse: /d\'o|d\'a/i, + isPM : function (input) { + return 'd\'o' === input.toLowerCase(); + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'd\'o' : 'D\'O'; + } else { + return isLower ? 'd\'a' : 'D\'A'; + } + }, + calendar : { + sameDay : '[oxhi à] LT', + nextDay : '[demà à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[ieiri à] LT', + lastWeek : '[sür el] dddd [lasteu à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'osprei %s', + past : 'ja%s', + s : processRelativeTime$7, + ss : processRelativeTime$7, + m : processRelativeTime$7, + mm : processRelativeTime$7, + h : processRelativeTime$7, + hh : processRelativeTime$7, + d : processRelativeTime$7, + dd : processRelativeTime$7, + M : processRelativeTime$7, + MM : processRelativeTime$7, + y : processRelativeTime$7, + yy : processRelativeTime$7 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + function processRelativeTime$7(number, withoutSuffix, key, isFuture) { + var format = { + 's': ['viensas secunds', '\'iensas secunds'], + 'ss': [number + ' secunds', '' + number + ' secunds'], + 'm': ['\'n míut', '\'iens míut'], + 'mm': [number + ' míuts', '' + number + ' míuts'], + 'h': ['\'n þora', '\'iensa þora'], + 'hh': [number + ' þoras', '' + number + ' þoras'], + 'd': ['\'n ziua', '\'iensa ziua'], + 'dd': [number + ' ziuas', '' + number + ' ziuas'], + 'M': ['\'n mes', '\'iens mes'], + 'MM': [number + ' mesen', '' + number + ' mesen'], + 'y': ['\'n ar', '\'iens ar'], + 'yy': [number + ' ars', '' + number + ' ars'] + }; + return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]); + } + + //! moment.js locale configuration + + moment.defineLocale('tzm-latn', { + months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), + monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), + weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[asdkh g] LT', + nextDay: '[aska g] LT', + nextWeek: 'dddd [g] LT', + lastDay: '[assant g] LT', + lastWeek: 'dddd [g] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'dadkh s yan %s', + past : 'yan %s', + s : 'imik', + ss : '%d imik', + m : 'minuḍ', + mm : '%d minuḍ', + h : 'saɛa', + hh : '%d tassaɛin', + d : 'ass', + dd : '%d ossan', + M : 'ayowr', + MM : '%d iyyirn', + y : 'asgas', + yy : '%d isgasn' + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('tzm', { + months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), + monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), + weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[ⴰⵙⴷⵅ ⴴ] LT', + nextDay: '[ⴰⵙⴽⴰ ⴴ] LT', + nextWeek: 'dddd [ⴴ] LT', + lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT', + lastWeek: 'dddd [ⴴ] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s', + past : 'ⵢⴰⵏ %s', + s : 'ⵉⵎⵉⴽ', + ss : '%d ⵉⵎⵉⴽ', + m : 'ⵎⵉⵏⵓⴺ', + mm : '%d ⵎⵉⵏⵓⴺ', + h : 'ⵙⴰⵄⴰ', + hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ', + d : 'ⴰⵙⵙ', + dd : '%d oⵙⵙⴰⵏ', + M : 'ⴰⵢoⵓⵔ', + MM : '%d ⵉⵢⵢⵉⵔⵏ', + y : 'ⴰⵙⴳⴰⵙ', + yy : '%d ⵉⵙⴳⴰⵙⵏ' + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js language configuration + + moment.defineLocale('ug-cn', { + months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split( + '_' + ), + weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى', + LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm' + }, + meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + meridiem === 'يېرىم كېچە' || + meridiem === 'سەھەر' || + meridiem === 'چۈشتىن بۇرۇن' + ) { + return hour; + } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') { + return hour + 12; + } else { + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return 'يېرىم كېچە'; + } else if (hm < 900) { + return 'سەھەر'; + } else if (hm < 1130) { + return 'چۈشتىن بۇرۇن'; + } else if (hm < 1230) { + return 'چۈش'; + } else if (hm < 1800) { + return 'چۈشتىن كېيىن'; + } else { + return 'كەچ'; + } + }, + calendar: { + sameDay: '[بۈگۈن سائەت] LT', + nextDay: '[ئەتە سائەت] LT', + nextWeek: '[كېلەركى] dddd [سائەت] LT', + lastDay: '[تۆنۈگۈن] LT', + lastWeek: '[ئالدىنقى] dddd [سائەت] LT', + sameElse: 'L' + }, + relativeTime: { + future: '%s كېيىن', + past: '%s بۇرۇن', + s: 'نەچچە سېكونت', + ss: '%d سېكونت', + m: 'بىر مىنۇت', + mm: '%d مىنۇت', + h: 'بىر سائەت', + hh: '%d سائەت', + d: 'بىر كۈن', + dd: '%d كۈن', + M: 'بىر ئاي', + MM: '%d ئاي', + y: 'بىر يىل', + yy: '%d يىل' + }, + + dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '-كۈنى'; + case 'w': + case 'W': + return number + '-ھەپتە'; + default: + return number; + } + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow: 1, // Monday is the first day of the week. + doy: 7 // The week that contains Jan 1st is the first week of the year. + } + }); + + //! moment.js locale configuration + + function plural$6(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); + } + function relativeTimeWithPlural$4(number, withoutSuffix, key) { + var format = { + 'ss': withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд', + 'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин', + 'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин', + 'dd': 'день_дні_днів', + 'MM': 'місяць_місяці_місяців', + 'yy': 'рік_роки_років' + }; + if (key === 'm') { + return withoutSuffix ? 'хвилина' : 'хвилину'; + } + else if (key === 'h') { + return withoutSuffix ? 'година' : 'годину'; + } + else { + return number + ' ' + plural$6(format[key], +number); + } + } + function weekdaysCaseReplace(m, format) { + var weekdays = { + 'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'), + 'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'), + 'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_') + }; + + if (m === true) { + return weekdays['nominative'].slice(1, 7).concat(weekdays['nominative'].slice(0, 1)); + } + if (!m) { + return weekdays['nominative']; + } + + var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ? + 'accusative' : + ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ? + 'genitive' : + 'nominative'); + return weekdays[nounCase][m.day()]; + } + function processHoursFunction(str) { + return function () { + return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT'; + }; + } + + moment.defineLocale('uk', { + months : { + 'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'), + 'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_') + }, + monthsShort : 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'), + weekdays : weekdaysCaseReplace, + weekdaysShort : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY р.', + LLL : 'D MMMM YYYY р., HH:mm', + LLLL : 'dddd, D MMMM YYYY р., HH:mm' + }, + calendar : { + sameDay: processHoursFunction('[Сьогодні '), + nextDay: processHoursFunction('[Завтра '), + lastDay: processHoursFunction('[Вчора '), + nextWeek: processHoursFunction('[У] dddd ['), + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return processHoursFunction('[Минулої] dddd [').call(this); + case 1: + case 2: + case 4: + return processHoursFunction('[Минулого] dddd [').call(this); + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'за %s', + past : '%s тому', + s : 'декілька секунд', + ss : relativeTimeWithPlural$4, + m : relativeTimeWithPlural$4, + mm : relativeTimeWithPlural$4, + h : 'годину', + hh : relativeTimeWithPlural$4, + d : 'день', + dd : relativeTimeWithPlural$4, + M : 'місяць', + MM : relativeTimeWithPlural$4, + y : 'рік', + yy : relativeTimeWithPlural$4 + }, + // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason + meridiemParse: /ночі|ранку|дня|вечора/, + isPM: function (input) { + return /^(дня|вечора)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ночі'; + } else if (hour < 12) { + return 'ранку'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечора'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return number + '-й'; + case 'D': + return number + '-го'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var months$9 = [ + 'جنوری', + 'فروری', + 'مارچ', + 'اپریل', + 'مئی', + 'جون', + 'جولائی', + 'اگست', + 'ستمبر', + 'اکتوبر', + 'نومبر', + 'دسمبر' + ]; + var days$1 = [ + 'اتوار', + 'پیر', + 'منگل', + 'بدھ', + 'جمعرات', + 'جمعہ', + 'ہفتہ' + ]; + + moment.defineLocale('ur', { + months : months$9, + monthsShort : months$9, + weekdays : days$1, + weekdaysShort : days$1, + weekdaysMin : days$1, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd، D MMMM YYYY HH:mm' + }, + meridiemParse: /صبح|شام/, + isPM : function (input) { + return 'شام' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar : { + sameDay : '[آج بوقت] LT', + nextDay : '[کل بوقت] LT', + nextWeek : 'dddd [بوقت] LT', + lastDay : '[گذشتہ روز بوقت] LT', + lastWeek : '[گذشتہ] dddd [بوقت] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s بعد', + past : '%s قبل', + s : 'چند سیکنڈ', + ss : '%d سیکنڈ', + m : 'ایک منٹ', + mm : '%d منٹ', + h : 'ایک گھنٹہ', + hh : '%d گھنٹے', + d : 'ایک دن', + dd : '%d دن', + M : 'ایک ماہ', + MM : '%d ماہ', + y : 'ایک سال', + yy : '%d سال' + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('uz-latn', { + months : 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'), + monthsShort : 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), + weekdays : 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'), + weekdaysShort : 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), + weekdaysMin : 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'D MMMM YYYY, dddd HH:mm' + }, + calendar : { + sameDay : '[Bugun soat] LT [da]', + nextDay : '[Ertaga] LT [da]', + nextWeek : 'dddd [kuni soat] LT [da]', + lastDay : '[Kecha soat] LT [da]', + lastWeek : '[O\'tgan] dddd [kuni soat] LT [da]', + sameElse : 'L' + }, + relativeTime : { + future : 'Yaqin %s ichida', + past : 'Bir necha %s oldin', + s : 'soniya', + ss : '%d soniya', + m : 'bir daqiqa', + mm : '%d daqiqa', + h : 'bir soat', + hh : '%d soat', + d : 'bir kun', + dd : '%d kun', + M : 'bir oy', + MM : '%d oy', + y : 'bir yil', + yy : '%d yil' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('uz', { + months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), + monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'), + weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'), + weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'D MMMM YYYY, dddd HH:mm' + }, + calendar : { + sameDay : '[Бугун соат] LT [да]', + nextDay : '[Эртага] LT [да]', + nextWeek : 'dddd [куни соат] LT [да]', + lastDay : '[Кеча соат] LT [да]', + lastWeek : '[Утган] dddd [куни соат] LT [да]', + sameElse : 'L' + }, + relativeTime : { + future : 'Якин %s ичида', + past : 'Бир неча %s олдин', + s : 'фурсат', + ss : '%d фурсат', + m : 'бир дакика', + mm : '%d дакика', + h : 'бир соат', + hh : '%d соат', + d : 'бир кун', + dd : '%d кун', + M : 'бир ой', + MM : '%d ой', + y : 'бир йил', + yy : '%d йил' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('vi', { + months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'), + monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'), + monthsParseExact : true, + weekdays : 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'), + weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysParseExact : true, + meridiemParse: /sa|ch/i, + isPM : function (input) { + return /^ch$/i.test(input); + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'sa' : 'SA'; + } else { + return isLower ? 'ch' : 'CH'; + } + }, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM [năm] YYYY', + LLL : 'D MMMM [năm] YYYY HH:mm', + LLLL : 'dddd, D MMMM [năm] YYYY HH:mm', + l : 'DD/M/YYYY', + ll : 'D MMM YYYY', + lll : 'D MMM YYYY HH:mm', + llll : 'ddd, D MMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Hôm nay lúc] LT', + nextDay: '[Ngày mai lúc] LT', + nextWeek: 'dddd [tuần tới lúc] LT', + lastDay: '[Hôm qua lúc] LT', + lastWeek: 'dddd [tuần rồi lúc] LT', + sameElse: 'L' + }, + relativeTime : { + future : '%s tới', + past : '%s trước', + s : 'vài giây', + ss : '%d giây' , + m : 'một phút', + mm : '%d phút', + h : 'một giờ', + hh : '%d giờ', + d : 'một ngày', + dd : '%d ngày', + M : 'một tháng', + MM : '%d tháng', + y : 'một năm', + yy : '%d năm' + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal : function (number) { + return number; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('x-pseudo', { + months : 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'), + monthsShort : 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'), + monthsParseExact : true, + weekdays : 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'), + weekdaysShort : 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'), + weekdaysMin : 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[T~ódá~ý át] LT', + nextDay : '[T~ómó~rró~w át] LT', + nextWeek : 'dddd [át] LT', + lastDay : '[Ý~ést~érdá~ý át] LT', + lastWeek : '[L~ást] dddd [át] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'í~ñ %s', + past : '%s á~gó', + s : 'á ~féw ~sécó~ñds', + ss : '%d s~écóñ~ds', + m : 'á ~míñ~úté', + mm : '%d m~íñú~tés', + h : 'á~ñ hó~úr', + hh : '%d h~óúrs', + d : 'á ~dáý', + dd : '%d d~áýs', + M : 'á ~móñ~th', + MM : '%d m~óñt~hs', + y : 'á ~ýéár', + yy : '%d ý~éárs' + }, + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('yo', { + months : 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'), + monthsShort : 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'), + weekdays : 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'), + weekdaysShort : 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'), + weekdaysMin : 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Ònì ni] LT', + nextDay : '[Ọ̀la ni] LT', + nextWeek : 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT', + lastDay : '[Àna ni] LT', + lastWeek : 'dddd [Ọsẹ̀ tólọ́] [ni] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ní %s', + past : '%s kọjá', + s : 'ìsẹjú aayá die', + ss :'aayá %d', + m : 'ìsẹjú kan', + mm : 'ìsẹjú %d', + h : 'wákati kan', + hh : 'wákati %d', + d : 'ọjọ́ kan', + dd : 'ọjọ́ %d', + M : 'osù kan', + MM : 'osù %d', + y : 'ọdún kan', + yy : 'ọdún %d' + }, + dayOfMonthOrdinalParse : /ọjọ́\s\d{1,2}/, + ordinal : 'ọjọ́ %d', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('zh-cn', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'), + weekdaysMin : '日_一_二_三_四_五_六'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日Ah点mm分', + LLLL : 'YYYY年M月D日ddddAh点mm分', + l : 'YYYY/M/D', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日dddd HH:mm' + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || + meridiem === '上午') { + return hour; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } else { + // '中午' + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar : { + sameDay : '[今天]LT', + nextDay : '[明天]LT', + nextWeek : '[下]ddddLT', + lastDay : '[昨天]LT', + lastWeek : '[上]ddddLT', + sameElse : 'L' + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '周'; + default: + return number; + } + }, + relativeTime : { + future : '%s内', + past : '%s前', + s : '几秒', + ss : '%d 秒', + m : '1 分钟', + mm : '%d 分钟', + h : '1 小时', + hh : '%d 小时', + d : '1 天', + dd : '%d 天', + M : '1 个月', + MM : '%d 个月', + y : '1 年', + yy : '%d 年' + }, + week : { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + moment.defineLocale('zh-hk', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin : '日_一_二_三_四_五_六'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日 HH:mm', + LLLL : 'YYYY年M月D日dddd HH:mm', + l : 'YYYY/M/D', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日dddd HH:mm' + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar : { + sameDay : '[今天]LT', + nextDay : '[明天]LT', + nextWeek : '[下]ddddLT', + lastDay : '[昨天]LT', + lastWeek : '[上]ddddLT', + sameElse : 'L' + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal : function (number, period) { + switch (period) { + case 'd' : + case 'D' : + case 'DDD' : + return number + '日'; + case 'M' : + return number + '月'; + case 'w' : + case 'W' : + return number + '週'; + default : + return number; + } + }, + relativeTime : { + future : '%s內', + past : '%s前', + s : '幾秒', + ss : '%d 秒', + m : '1 分鐘', + mm : '%d 分鐘', + h : '1 小時', + hh : '%d 小時', + d : '1 天', + dd : '%d 天', + M : '1 個月', + MM : '%d 個月', + y : '1 年', + yy : '%d 年' + } + }); + + //! moment.js locale configuration + + moment.defineLocale('zh-tw', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin : '日_一_二_三_四_五_六'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日 HH:mm', + LLLL : 'YYYY年M月D日dddd HH:mm', + l : 'YYYY/M/D', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日dddd HH:mm' + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar : { + sameDay : '[今天] LT', + nextDay : '[明天] LT', + nextWeek : '[下]dddd LT', + lastDay : '[昨天] LT', + lastWeek : '[上]dddd LT', + sameElse : 'L' + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal : function (number, period) { + switch (period) { + case 'd' : + case 'D' : + case 'DDD' : + return number + '日'; + case 'M' : + return number + '月'; + case 'w' : + case 'W' : + return number + '週'; + default : + return number; + } + }, + relativeTime : { + future : '%s內', + past : '%s前', + s : '幾秒', + ss : '%d 秒', + m : '1 分鐘', + mm : '%d 分鐘', + h : '1 小時', + hh : '%d 小時', + d : '1 天', + dd : '%d 天', + M : '1 個月', + MM : '%d 個月', + y : '1 年', + yy : '%d 年' + } + }); + + moment.locale('en'); + + return moment; + +}))); diff --git a/node_modules/moment/min/locales.min.js b/node_modules/moment/min/locales.min.js new file mode 100644 index 00000000..c5c34759 --- /dev/null +++ b/node_modules/moment/min/locales.min.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?a(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],a):a(e.moment)}(this,function(e){"use strict";e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,a,_){return e<12?_?"vm":"VM":_?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[M\xf4re om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}}),e.defineLocale("ar-dz",{months:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u0623\u062d_\u0625\u062b_\u062b\u0644\u0627_\u0623\u0631_\u062e\u0645_\u062c\u0645_\u0633\u0628".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:0,doy:4}}),e.defineLocale("ar-kw",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062a\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062a\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:0,doy:12}});var a={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},r=function(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5},i={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},_=function(n){return function(e,a,_,s){var d=r(e),t=i[n][r(e)];return 2===d&&(t=t[a?0:1]),t.replace(/%d/i,e)}},s=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];e.defineLocale("ar-ly",{months:s,monthsShort:s,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,_){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:_("s"),ss:_("s"),m:_("m"),mm:_("m"),h:_("h"),hh:_("h"),d:_("d"),dd:_("d"),M:_("M"),MM:_("M"),y:_("y"),yy:_("y")},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return a[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}}),e.defineLocale("ar-ma",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062a\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062a\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:6,doy:12}});var d={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},t={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"};e.defineLocale("ar-sa",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,_){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return t[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return d[e]}).replace(/,/g,"\u060c")},week:{dow:0,doy:6}}),e.defineLocale("ar-tn",{months:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}});var n={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},m={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},o=function(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5},u={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},l=function(n){return function(e,a,_,s){var d=o(e),t=u[n][o(e)];return 2===d&&(t=t[a?0:1]),t.replace(/%d/i,e)}},M=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];e.defineLocale("ar",{months:M,monthsShort:M,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,_){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:l("s"),ss:l("s"),m:l("m"),mm:l("m"),h:l("h"),hh:l("h"),d:l("d"),dd:l("d"),M:l("M"),MM:l("M"),y:l("y"),yy:l("y")},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return m[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return n[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}});var L={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-\xfcnc\xfc",4:"-\xfcnc\xfc",100:"-\xfcnc\xfc",6:"-nc\u0131",9:"-uncu",10:"-uncu",30:"-uncu",60:"-\u0131nc\u0131",90:"-\u0131nc\u0131"};function Y(e,a,_){var s,d;return"m"===_?a?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443":"h"===_?a?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443":e+" "+(s=+e,d={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d",hh:a?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d",dd:"\u0434\u0437\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u0437\u0451\u043d",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u044b_\u043c\u0435\u0441\u044f\u0446\u0430\u045e",yy:"\u0433\u043e\u0434_\u0433\u0430\u0434\u044b_\u0433\u0430\u0434\u043e\u045e"}[_].split("_"),s%10==1&&s%100!=11?d[0]:2<=s%10&&s%10<=4&&(s%100<10||20<=s%100)?d[1]:d[2])}e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ert\u0259si_\xc7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131_\xc7\u0259r\u015f\u0259nb\u0259_C\xfcm\u0259 ax\u015fam\u0131_C\xfcm\u0259_\u015e\u0259nb\u0259".split("_"),weekdaysShort:"Baz_BzE_\xc7Ax_\xc7\u0259r_CAx_C\xfcm_\u015e\u0259n".split("_"),weekdaysMin:"Bz_BE_\xc7A_\xc7\u0259_CA_C\xfc_\u015e\u0259".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[g\u0259l\u0259n h\u0259ft\u0259] dddd [saat] LT",lastDay:"[d\xfcn\u0259n] LT",lastWeek:"[ke\xe7\u0259n h\u0259ft\u0259] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \u0259vv\u0259l",s:"birne\xe7\u0259 saniy\u0259",ss:"%d saniy\u0259",m:"bir d\u0259qiq\u0259",mm:"%d d\u0259qiq\u0259",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gec\u0259|s\u0259h\u0259r|g\xfcnd\xfcz|ax\u015fam/,isPM:function(e){return/^(g\xfcnd\xfcz|ax\u015fam)$/.test(e)},meridiem:function(e,a,_){return e<4?"gec\u0259":e<12?"s\u0259h\u0259r":e<17?"g\xfcnd\xfcz":"ax\u015fam"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0131nc\u0131|inci|nci|\xfcnc\xfc|nc\u0131|uncu)/,ordinal:function(e){if(0===e)return e+"-\u0131nc\u0131";var a=e%10;return e+(L[a]||L[e%100-a]||L[100<=e?100:null])},week:{dow:1,doy:7}}),e.defineLocale("be",{months:{format:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f_\u043b\u044e\u0442\u0430\u0433\u0430_\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430_\u0442\u0440\u0430\u045e\u043d\u044f_\u0447\u044d\u0440\u0432\u0435\u043d\u044f_\u043b\u0456\u043f\u0435\u043d\u044f_\u0436\u043d\u0456\u045e\u043d\u044f_\u0432\u0435\u0440\u0430\u0441\u043d\u044f_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434\u0430_\u0441\u043d\u0435\u0436\u043d\u044f".split("_"),standalone:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044c_\u043b\u044e\u0442\u044b_\u0441\u0430\u043a\u0430\u0432\u0456\u043a_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u044d\u0440\u0432\u0435\u043d\u044c_\u043b\u0456\u043f\u0435\u043d\u044c_\u0436\u043d\u0456\u0432\u0435\u043d\u044c_\u0432\u0435\u0440\u0430\u0441\u0435\u043d\u044c_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434_\u0441\u043d\u0435\u0436\u0430\u043d\u044c".split("_")},monthsShort:"\u0441\u0442\u0443\u0434_\u043b\u044e\u0442_\u0441\u0430\u043a_\u043a\u0440\u0430\u0441_\u0442\u0440\u0430\u0432_\u0447\u044d\u0440\u0432_\u043b\u0456\u043f_\u0436\u043d\u0456\u0432_\u0432\u0435\u0440_\u043a\u0430\u0441\u0442_\u043b\u0456\u0441\u0442_\u0441\u043d\u0435\u0436".split("_"),weekdays:{format:"\u043d\u044f\u0434\u0437\u0435\u043b\u044e_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0443_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0443_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),standalone:"\u043d\u044f\u0434\u0437\u0435\u043b\u044f_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0430_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0430_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),isFormat:/\[ ?[\u0423\u0443\u045e] ?(?:\u043c\u0456\u043d\u0443\u043b\u0443\u044e|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0443\u044e)? ?\] ?dddd/},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., HH:mm",LLLL:"dddd, D MMMM YYYY \u0433., HH:mm"},calendar:{sameDay:"[\u0421\u0451\u043d\u043d\u044f \u045e] LT",nextDay:"[\u0417\u0430\u045e\u0442\u0440\u0430 \u045e] LT",lastDay:"[\u0423\u0447\u043e\u0440\u0430 \u045e] LT",nextWeek:function(){return"[\u0423] dddd [\u045e] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u0443\u044e] dddd [\u045e] LT";case 1:case 2:case 4:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u044b] dddd [\u045e] LT"}},sameElse:"L"},relativeTime:{future:"\u043f\u0440\u0430\u0437 %s",past:"%s \u0442\u0430\u043c\u0443",s:"\u043d\u0435\u043a\u0430\u043b\u044c\u043a\u0456 \u0441\u0435\u043a\u0443\u043d\u0434",m:Y,mm:Y,h:Y,hh:Y,d:"\u0434\u0437\u0435\u043d\u044c",dd:Y,M:"\u043c\u0435\u0441\u044f\u0446",MM:Y,y:"\u0433\u043e\u0434",yy:Y},meridiemParse:/\u043d\u043e\u0447\u044b|\u0440\u0430\u043d\u0456\u0446\u044b|\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430)$/.test(e)},meridiem:function(e,a,_){return e<4?"\u043d\u043e\u0447\u044b":e<12?"\u0440\u0430\u043d\u0456\u0446\u044b":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0430\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0456|\u044b|\u0433\u0430)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-\u044b":e+"-\u0456";case"D":return e+"-\u0433\u0430";default:return e}},week:{dow:1,doy:7}}),e.defineLocale("bg",{months:"\u044f\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u044f\u043d\u0440_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u044f\u0434\u0430_\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a_\u043f\u0435\u0442\u044a\u043a_\u0441\u044a\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u044f_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u044a\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u043d\u0435\u0441 \u0432] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432] LT",nextWeek:"dddd [\u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u0412 \u0438\u0437\u043c\u0438\u043d\u0430\u043b\u0430\u0442\u0430] dddd [\u0432] LT";case 1:case 2:case 4:case 5:return"[\u0412 \u0438\u0437\u043c\u0438\u043d\u0430\u043b\u0438\u044f] dddd [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0441\u043b\u0435\u0434 %s",past:"\u043f\u0440\u0435\u0434\u0438 %s",s:"\u043d\u044f\u043a\u043e\u043b\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0434\u0435\u043d",dd:"%d \u0434\u043d\u0438",M:"\u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0430",y:"\u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var a=e%10,_=e%100;return 0===e?e+"-\u0435\u0432":0===_?e+"-\u0435\u043d":10<_&&_<20?e+"-\u0442\u0438":1===a?e+"-\u0432\u0438":2===a?e+"-\u0440\u0438":7===a||8===a?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}}),e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_M\u025bkalo_Zuw\u025bnkalo_Zuluyekalo_Utikalo_S\u025btanburukalo_\u0254kut\u0254burukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_M\u025b_Zuw_Zul_Uti_S\u025bt_\u0254ku_Now_Des".split("_"),weekdays:"Kari_Nt\u025bn\u025bn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Nt\u025b_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm"},calendar:{sameDay:"[Bi l\u025br\u025b] LT",nextDay:"[Sini l\u025br\u025b] LT",nextWeek:"dddd [don l\u025br\u025b] LT",lastDay:"[Kunu l\u025br\u025b] LT",lastWeek:"dddd [t\u025bm\u025bnen l\u025br\u025b] LT",sameElse:"L"},relativeTime:{future:"%s k\u0254n\u0254",past:"a b\u025b %s b\u0254",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"l\u025br\u025b kelen",hh:"l\u025br\u025b %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});var h={1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"},y={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"};e.defineLocale("bn",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09c0_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2_\u0986\u0997_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u0983_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,function(e){return y[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return h[e]})},meridiemParse:/\u09b0\u09be\u09a4|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b0\u09be\u09a4/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u09b0\u09be\u09a4"===a&&4<=e||"\u09a6\u09c1\u09aa\u09c1\u09b0"===a&&e<5||"\u09ac\u09bf\u0995\u09be\u09b2"===a?e+12:e},meridiem:function(e,a,_){return e<4?"\u09b0\u09be\u09a4":e<10?"\u09b8\u0995\u09be\u09b2":e<17?"\u09a6\u09c1\u09aa\u09c1\u09b0":e<20?"\u09ac\u09bf\u0995\u09be\u09b2":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}});var c={1:"\u0f21",2:"\u0f22",3:"\u0f23",4:"\u0f24",5:"\u0f25",6:"\u0f26",7:"\u0f27",8:"\u0f28",9:"\u0f29",0:"\u0f20"},k={"\u0f21":"1","\u0f22":"2","\u0f23":"3","\u0f24":"4","\u0f25":"5","\u0f26":"6","\u0f27":"7","\u0f28":"8","\u0f29":"9","\u0f20":"0"};function p(e,a,_){var s,d,t;return e+" "+(s={mm:"munutenn",MM:"miz",dd:"devezh"}[_],2!==e?s:void 0!==(t={m:"v",b:"v",d:"z"})[(d=s).charAt(0)]?t[d.charAt(0)]+d.substring(1):d)}function D(e,a,_){var s=e+" ";switch(_){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return a?"jedna minuta":"jedne minute";case"mm":return s+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return a?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return s+=1===e?"dan":"dana";case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return s+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("bo",{months:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54".split("_"),monthsShort:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54".split("_"),weekdays:"\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysShort:"\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysMin:"\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0f51\u0f72\u0f0b\u0f62\u0f72\u0f44] LT",nextDay:"[\u0f66\u0f44\u0f0b\u0f49\u0f72\u0f53] LT",nextWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f62\u0f97\u0f7a\u0f66\u0f0b\u0f58], LT",lastDay:"[\u0f41\u0f0b\u0f66\u0f44] LT",lastWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f58\u0f50\u0f60\u0f0b\u0f58] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0f63\u0f0b",past:"%s \u0f66\u0f94\u0f53\u0f0b\u0f63",s:"\u0f63\u0f58\u0f0b\u0f66\u0f44",ss:"%d \u0f66\u0f90\u0f62\u0f0b\u0f46\u0f0d",m:"\u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b\u0f42\u0f45\u0f72\u0f42",mm:"%d \u0f66\u0f90\u0f62\u0f0b\u0f58",h:"\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b\u0f42\u0f45\u0f72\u0f42",hh:"%d \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51",d:"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f45\u0f72\u0f42",dd:"%d \u0f49\u0f72\u0f53\u0f0b",M:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f45\u0f72\u0f42",MM:"%d \u0f5f\u0fb3\u0f0b\u0f56",y:"\u0f63\u0f7c\u0f0b\u0f42\u0f45\u0f72\u0f42",yy:"%d \u0f63\u0f7c"},preparse:function(e){return e.replace(/[\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29\u0f20]/g,function(e){return k[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return c[e]})},meridiemParse:/\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c|\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66|\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44|\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42|\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"===a&&4<=e||"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44"===a&&e<5||"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42"===a?e+12:e},meridiem:function(e,a,_){return e<4?"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c":e<10?"\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66":e<17?"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44":e<20?"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42":"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"},week:{dow:0,doy:6}}),e.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondenno\xf9",ss:"%d eilenn",m:"ur vunutenn",mm:p,h:"un eur",hh:"%d eur",d:"un devezh",dd:p,M:"ur miz",MM:p,y:"ur bloaz",yy:function(e){switch(function e(a){return 9>> 0; + + for (var i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m); + var parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }); + var isNowValid = !isNaN(m._d.getTime()) && + flags.overflow < 0 && + !flags.empty && + !flags.invalidMonth && + !flags.invalidWeekday && + !flags.weekdayMismatch && + !flags.nullInput && + !flags.invalidFormat && + !flags.userInvalidated && + (!flags.meridiem || (flags.meridiem && parsedParts)); + + if (m._strict) { + isNowValid = isNowValid && + flags.charsLeftOver === 0 && + flags.unusedTokens.length === 0 && + flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } + else { + return isNowValid; + } + } + return m._isValid; + } + + function createInvalid (flags) { + var m = createUTC(NaN); + if (flags != null) { + extend(getParsingFlags(m), flags); + } + else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } + + // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + var momentProperties = hooks.momentProperties = []; + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + if (!isUndefined(from._i)) { + to._i = from._i; + } + if (!isUndefined(from._f)) { + to._f = from._f; + } + if (!isUndefined(from._l)) { + to._l = from._l; + } + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + var updateInProgress = false; + + // Moment prototype object + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + if (!this.isValid()) { + this._d = new Date(NaN); + } + // Prevent infinite loop in case updateOffset creates new moment + // objects. + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment (obj) { + return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); + } + + function absFloor (number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } + + // compare two arrays, return the number of differences + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + for (i = 0; i < len; i++) { + if ((dontConvert && array1[i] !== array2[i]) || + (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { + diffs++; + } + } + return diffs + lengthDiff; + } + + function warn(msg) { + if (hooks.suppressDeprecationWarnings === false && + (typeof console !== 'undefined') && console.warn) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + if (firstTime) { + var args = []; + var arg; + for (var i = 0; i < arguments.length; i++) { + arg = ''; + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + for (var key in arguments[0]) { + arg += key + ': ' + arguments[0][key] + ', '; + } + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + args.push(arg); + } + warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack); + firstTime = false; + } + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + + function set (config) { + var prop, i; + for (i in config) { + prop = config[i]; + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + this._config = config; + // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + this._dayOfMonthOrdinalParseLenient = new RegExp( + (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + + '|' + (/\d{1,2}/).source); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), prop; + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && + !hasOwnProp(childConfig, prop) && + isObject(parentConfig[prop])) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, res = []; + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + return res; + }; + } + + var defaultCalendar = { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }; + + function calendar (key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + var defaultLongDateFormat = { + LTS : 'h:mm:ss A', + LT : 'h:mm A', + L : 'MM/DD/YYYY', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY h:mm A', + LLLL : 'dddd, MMMM D, YYYY h:mm A' + }; + + function longDateFormat (key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate () { + return this._invalidDate; + } + + var defaultOrdinal = '%d'; + var defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal (number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }; + + function relativeTime (number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return (isFunction(output)) ? + output(number, withoutSuffix, string, isFuture) : + output.replace(/%d/i, number); + } + + function pastFuture (diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias (unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = []; + for (var u in unitsObj) { + units.push({unit: u, priority: priorities[u]}); + } + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return (sign ? (forceSign ? '+' : '') : '-') + + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + + var formatFunctions = {}; + + var formatTokenFunctions = {}; + + // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + function addFormatToken (token, padded, ordinal, callback) { + var func = callback; + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + if (token) { + formatTokenFunctions[token] = func; + } + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), i, length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', i; + for (i = 0; i < length; i++) { + output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; + } + return output; + }; + } + + // format date using native date object + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); + + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var match1 = /\d/; // 0 - 9 + var match2 = /\d\d/; // 00 - 99 + var match3 = /\d{3}/; // 000 - 999 + var match4 = /\d{4}/; // 0000 - 9999 + var match6 = /[+-]?\d{6}/; // -999999 - 999999 + var match1to2 = /\d\d?/; // 0 - 99 + var match3to4 = /\d\d\d\d?/; // 999 - 9999 + var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 + var match1to3 = /\d{1,3}/; // 0 - 999 + var match1to4 = /\d{1,4}/; // 0 - 9999 + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + + var matchUnsigned = /\d+/; // 0 - inf + var matchSigned = /[+-]?\d+/; // -inf - inf + + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z + + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; + + var regexes = {}; + + function addRegexToken (token, regex, strictRegex) { + regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { + return (isStrict && strictRegex) ? strictRegex : regex; + }; + } + + function getParseRegexForToken (token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } + + // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + function unescapeFormat(s) { + return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + })); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken (token, callback) { + var i, func = callback; + if (typeof token === 'string') { + token = [token]; + } + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken (token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0; + var MONTH = 1; + var DATE = 2; + var HOUR = 3; + var MINUTE = 4; + var SECOND = 5; + var MILLISECOND = 6; + var WEEK = 7; + var WEEKDAY = 8; + + // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; + }); + + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); + + // ALIASES + + addUnitAlias('year', 'y'); + + // PRIORITIES + + addUnitPriority('year', 1); + + // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); + + // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + function isLeapYear(year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + } + + // HOOKS + + hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; + + // MOMENTS + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear () { + return isLeapYear(this.year()); + } + + function makeGetSet (unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get (mom, unit) { + return mom.isValid() ? + mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; + } + + function set$1 (mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); + } + else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } + + // MOMENTS + + function stringGet (units) { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](); + } + return this; + } + + + function stringSet (units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units); + for (var i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](value); + } + } + return this; + } + + function mod(n, x) { + return ((n % x) + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2); + } + + // FORMATTING + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); + + // ALIASES + + addUnitAlias('month', 'M'); + + // PRIORITY + + addUnitPriority('month', 8); + + // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); + // if we didn't find a month name, mark the date as invalid. + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); + + // LOCALES + + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); + function localeMonths (m, format) { + if (!m) { + return isArray(this._months) ? this._months : + this._months['standalone']; + } + return isArray(this._months) ? this._months[m.month()] : + this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; + } + + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); + function localeMonthsShort (m, format) { + if (!m) { + return isArray(this._monthsShort) ? this._monthsShort : + this._monthsShort['standalone']; + } + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : + this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, ii, mom, llc = monthName.toLocaleLowerCase(); + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse (monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } + + // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); + } + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } + + // MOMENTS + + function setMonth (mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); + // TODO: Another silent failure? + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + return mom; + } + + function getSetMonth (value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth () { + return daysInMonth(this.year(), this.month()); + } + + var defaultMonthsShortRegex = matchWord; + function monthsShortRegex (isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + return this._monthsShortStrictRegex && isStrict ? + this._monthsShortStrictRegex : this._monthsShortRegex; + } + } + + var defaultMonthsRegex = matchWord; + function monthsRegex (isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + return this._monthsStrictRegex && isStrict ? + this._monthsStrictRegex : this._monthsRegex; + } + } + + function computeMonthsParse () { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], longPieces = [], mixedPieces = [], + i, mom; + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } + // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + } + + function createDate (y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date; + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + date = new Date(y + 400, m, d, h, M, s, ms); + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + + return date; + } + + function createUTCDate (y) { + var date; + // the Date.UTC function remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + var args = Array.prototype.slice.call(arguments); + // preserve leap years using a full 400 year cycle, then reset + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + + return date; + } + + // start-of-first-week - start-of-year + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + + return -fwdlw + fwd - 1; + } + + // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } + + // FORMATTING + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); + + // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); + + // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); + + // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); + + // HELPERS + + // LOCALES + + function localeWeek (mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + }; + + function localeFirstDayOfWeek () { + return this._week.dow; + } + + function localeFirstDayOfYear () { + return this._week.doy; + } + + // MOMENTS + + function getSetWeek (input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek (input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + // FORMATTING + + addFormatToken('d', 0, 'do', 'day'); + + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); + + // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); + + // PRIORITY + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); + + // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); + // if we didn't get a weekday name, mark the date as invalid + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); + + // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + return isNaN(input) ? null : input; + } + + // LOCALES + function shiftWeekdays (ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); + } + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); + function localeWeekdays (m, format) { + var weekdays = isArray(this._weekdays) ? this._weekdays : + this._weekdays[(m && m !== true && this._weekdays.isFormat.test(format)) ? 'format' : 'standalone']; + return (m === true) ? shiftWeekdays(weekdays, this._week.dow) + : (m) ? weekdays[m.day()] : weekdays; + } + + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + function localeWeekdaysShort (m) { + return (m === true) ? shiftWeekdays(this._weekdaysShort, this._week.dow) + : (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + function localeWeekdaysMin (m) { + return (m === true) ? shiftWeekdays(this._weekdaysMin, this._week.dow) + : (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse (weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + + mom = createUTC([2000, 1]).day(i); + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); + } + if (!this._weekdaysParse[i]) { + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } + + // MOMENTS + + function getSetDayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + var defaultWeekdaysRegex = matchWord; + function weekdaysRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + return this._weekdaysStrictRegex && isStrict ? + this._weekdaysStrictRegex : this._weekdaysRegex; + } + } + + var defaultWeekdaysShortRegex = matchWord; + function weekdaysShortRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + return this._weekdaysShortStrictRegex && isStrict ? + this._weekdaysShortStrictRegex : this._weekdaysShortRegex; + } + } + + var defaultWeekdaysMinRegex = matchWord; + function weekdaysMinRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + return this._weekdaysMinStrictRegex && isStrict ? + this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + } + } + + + function computeWeekdaysParse () { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], + i, mom, minp, shortp, longp; + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } + // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + + this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); + } + + // FORMATTING + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + + addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2); + }); + + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + + addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2); + }); + + function meridiem (token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } + + meridiem('a', true); + meridiem('A', false); + + // ALIASES + + addUnitAlias('hour', 'h'); + + // PRIORITY + addUnitPriority('hour', 13); + + // PARSING + + function matchMeridiem (isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); + + // LOCALES + + function localeIsPM (input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return ((input + '').toLowerCase().charAt(0) === 'p'); + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + function localeMeridiem (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } + + + // MOMENTS + + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + var getSetHour = makeGetSet('Hours', true); + + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + + week: defaultLocaleWeek, + + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + + meridiemParse: defaultLocaleMeridiemParse + }; + + // internal storage for locale config files + var locales = {}; + var localeFamilies = {}; + var globalLocale; + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } + + // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + function chooseLocale(names) { + var i = 0, j, next, locale, split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + if (locale) { + return locale; + } + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + j--; + } + i++; + } + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null; + // TODO: Find a better way to register and load all the locales in Node + if (!locales[name] && (typeof module !== 'undefined') && + module && module.exports) { + try { + oldLocale = globalLocale._abbr; + var aliasedRequire = require; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) {} + } + return locales[name]; + } + + // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + function getSetGlobalLocale (key, values) { + var data; + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } + else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } + else { + if ((typeof console !== 'undefined') && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn('Locale ' + key + ' not found. Did you forget to load it?'); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale (name, config) { + if (config !== null) { + var locale, parentConfig = baseConfig; + config.abbr = name; + if (locales[name] != null) { + deprecateSimple('defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change ' + + 'an existing locale. moment.defineLocale(localeName, ' + + 'config) should only be used for creating a new locale ' + + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + localeFamilies[config.parentLocale].push({ + name: name, + config: config + }); + return null; + } + } + } + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } + + // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + getSetGlobalLocale(name); + + + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, tmpLocale, parentConfig = baseConfig; + // MERGE + tmpLocale = loadLocale(name); + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + config = mergeConfigs(parentConfig, config); + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; + + // backwards compat for now: also set the locale + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + return locales[name]; + } + + // returns locale data + function getLocale (key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + if (locale) { + return locale; + } + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } + + function checkOverflow (m) { + var overflow; + var a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = + a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : + a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : + a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : + a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : + a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : + a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : + -1; + + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } + + // Pick the first defined of two or three arguments. + function defaults(a, b, c) { + if (a != null) { + return a; + } + if (b != null) { + return b; + } + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + if (config._useUTC) { + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; + } + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } + + // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + function configFromArray (config) { + var i, date, input = [], currentDate, expectedWeekday, yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); + + //compute day of the year from weeks and weekdays + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } + + //if the day of the year is set, figure out what it is + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } + + // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } + + // Zero out whatever was not defaulted, including time + for (; i < 7; i++) { + config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; + } + + // Check for 24:00:00.000 + if (config._a[HOUR] === 24 && + config._a[MINUTE] === 0 && + config._a[SECOND] === 0 && + config._a[MILLISECOND] === 0) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); + expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); + + // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } + + // check for mismatching day of week + if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; + + w = config._w; + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; + + // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + + var curWeek = weekOfYear(createLocal(), dow, doy); + + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); + + // Default to current week. + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } + + // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + + var isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, false], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, false], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], + // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, false], + ['YYYYDDD', /\d{7}/] + ]; + + // iso time formats and regexes + var isoTimes = [ + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/] + ]; + + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; + + // date from iso format + function configFromISO(config) { + var i, l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, dateFormat, timeFormat, tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + if (dateFormat == null) { + config._isValid = false; + return; + } + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + if (timeFormat == null) { + config._isValid = false; + return; + } + } + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } + + // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + 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{4}))$/; + + function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result = [ + untruncateYear(yearStr), + defaultLocaleMonthsShort.indexOf(monthStr), + parseInt(dayStr, 10), + parseInt(hourStr, 10), + parseInt(minuteStr, 10) + ]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + return year; + } + + 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, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + return true; + } + + var obsOffsets = { + UT: 0, + 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 calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10); + var m = hm % 100, h = (hm - m) / 100; + return h * 60 + m; + } + } + + // date and time from ref 2822 format + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)); + if (match) { + var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + + config._d = createUTCDate.apply(null, config._a); + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } + + // date from iso format or fallback + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + // Final attempt, use Input Fallback + hooks.createFromInputFallback(config); + } + + hooks.createFromInputFallback = deprecate( + 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + + 'discouraged and will be removed in an upcoming major release. Please refer to ' + + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', + function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + } + ); + + // constant that refers to the ISO standard + hooks.ISO_8601 = function () {}; + + // constant that refers to the RFC 2822 form + hooks.RFC_2822 = function () {}; + + // date from string and format string + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + config._a = []; + getParsingFlags(config).empty = true; + + // This array is used to make a Date, either with `new Date` or `Date.UTC` + var string = '' + config._i, + i, parsedInput, tokens, token, skipped, + stringLength = string.length, + totalParsedInputLength = 0; + + tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; + // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); + totalParsedInputLength += parsedInput.length; + } + // don't parse if it's not a known token + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } + else { + getParsingFlags(config).unusedTokens.push(token); + } + addTimeToArrayFromToken(token, parsedInput, config); + } + else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } + + // add remaining unparsed input length to the string + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } + + // clear _12h flag if hour is <= 12 + if (config._a[HOUR] <= 12 && + getParsingFlags(config).bigHour === true && + config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; + // handle meridiem + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + + configFromArray(config); + checkOverflow(config); + } + + + function meridiemFixWrap (locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + if (isPm && hour < 12) { + hour += 12; + } + if (!isPm && hour === 12) { + hour = 0; + } + return hour; + } else { + // this is not supposed to happen + return hour; + } + } + + // date from string and array of format strings + function configFromStringAndArray(config) { + var tempConfig, + bestMoment, + + scoreToBeat, + i, + currentScore; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + tempConfig = copyConfig({}, config); + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (!isValid(tempConfig)) { + continue; + } + + // if there is any input that was not parsed add a penalty for that format + currentScore += getParsingFlags(tempConfig).charsLeftOver; + + //or tokens + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + + getParsingFlags(tempConfig).score = currentScore; + + if (scoreToBeat == null || currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i); + config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { + return obj && parseInt(obj, 10); + }); + + configFromArray(config); + } + + function createFromConfig (config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig (config) { + var input = config._i, + format = config._f; + + config._locale = config._locale || getLocale(config._l); + + if (input === null || (format === undefined && input === '')) { + return createInvalid({nullInput: true}); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC (input, format, locale, strict, isUTC) { + var c = {}; + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if ((isObject(input) && isObjectEmpty(input)) || + (isArray(input) && input.length === 0)) { + input = undefined; + } + // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + + return createFromConfig(c); + } + + function createLocal (input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate( + 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + } + ); + + var prototypeMax = deprecate( + 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + } + ); + + // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + function pickBy(fn, moments) { + var res, i; + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + if (!moments.length) { + return createLocal(); + } + res = moments[0]; + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + return res; + } + + // TODO: Use [].sort instead? + function min () { + var args = [].slice.call(arguments, 0); + + return pickBy('isBefore', args); + } + + function max () { + var args = [].slice.call(arguments, 0); + + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +(new Date()); + }; + + var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; + + function isDurationValid(m) { + for (var key in m) { + if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { + return false; + } + } + + var unitHasDecimal = false; + for (var i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration (duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + + this._isValid = isDurationValid(normalizedInput); + + // representation for dateAddRemove + this._milliseconds = +milliseconds + + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + this._days = +days + + weeks * 7; + // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + this._months = +months + + quarters * 3 + + years * 12; + + this._data = {}; + + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration (obj) { + return obj instanceof Duration; + } + + function absRound (number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } + + // FORMATTING + + function offset (token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + if (offset < 0) { + offset = -offset; + sign = '-'; + } + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); + + // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); + + // HELPERS + + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher); + + if (matches === null) { + return null; + } + + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + + return minutes === 0 ? + 0 : + parts[0] === '+' ? minutes : -minutes; + } + + // Return a moment from input, that is local/utc/zone equivalent to model. + function cloneWithOffset(input, model) { + var res, diff; + if (model._isUTC) { + res = model.clone(); + diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); + // Use low-level api, because this fn is low-level api. + res._d.setTime(res._d.valueOf() + diff); + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset (m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; + } + + // HOOKS + + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + hooks.updateOffset = function () {}; + + // MOMENTS + + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + function getSetOffset (input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + if (!this.isValid()) { + return input != null ? this : NaN; + } + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + this._offset = input; + this._isUTC = true; + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract(this, createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone (input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC (keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal (keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + return this; + } + + function setOffsetToParsedOffset () { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + if (tZone != null) { + this.utcOffset(tZone); + } + else { + this.utcOffset(0, true); + } + } + return this; + } + + function hasAlignedHourOffset (input) { + if (!this.isValid()) { + return false; + } + input = input ? createLocal(input).utcOffset() : 0; + + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime () { + return ( + this.utcOffset() > this.clone().month(0).utcOffset() || + this.utcOffset() > this.clone().month(5).utcOffset() + ); + } + + function isDaylightSavingTimeShifted () { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}; + + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = this.isValid() && + compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal () { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset () { + return this.isValid() ? this._isUTC : false; + } + + function isUtc () { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } + + // ASP.NET json date format regex + var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; + + // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration (input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms : input._milliseconds, + d : input._days, + M : input._months + }; + } else if (isNumber(input)) { + duration = {}; + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } else if (!!(match = aspNetRegex.exec(input))) { + sign = (match[1] === '-') ? -1 : 1; + duration = { + y : 0, + d : toInt(match[DATE]) * sign, + h : toInt(match[HOUR]) * sign, + m : toInt(match[MINUTE]) * sign, + s : toInt(match[SECOND]) * sign, + ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match + }; + } else if (!!(match = isoRegex.exec(input))) { + sign = (match[1] === '-') ? -1 : 1; + duration = { + y : parseIso(match[2], sign), + M : parseIso(match[3], sign), + w : parseIso(match[4], sign), + d : parseIso(match[5], sign), + h : parseIso(match[6], sign), + m : parseIso(match[7], sign), + s : parseIso(match[8], sign) + }; + } else if (duration == null) {// checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); + + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso (inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); + // apply sign while we're at it + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {}; + + res.months = other.month() - base.month() + + (other.year() - base.year()) * 12; + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +(base.clone().add(res.months, 'M')); + + return res; + } + + function momentsDifference(base, other) { + var res; + if (!(base.isValid() && other.isValid())) { + return {milliseconds: 0, months: 0}; + } + + other = cloneWithOffset(other, base); + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } + + // TODO: remove 'name' arg after deprecation is removed + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; + //invert the arguments, but complain about it + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); + tmp = val; val = period; period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract (mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'); + var subtract = createAdder(-1, 'subtract'); + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 ? 'sameElse' : + diff < -1 ? 'lastWeek' : + diff < 0 ? 'lastDay' : + diff < 1 ? 'sameDay' : + diff < 2 ? 'nextDay' : + diff < 7 ? 'nextWeek' : 'sameElse'; + } + + function calendar$1 (time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse'; + + var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); + + return this.format(output || this.localeData().calendar(format, this, createLocal(now))); + } + + function clone () { + return new Moment(this); + } + + function isAfter (input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore (input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween (from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + inclusivity = inclusivity || '()'; + return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && + (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); + } + + function isSame (input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); + } + } + + function isSameOrAfter (input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore (input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff (input, units, asFloat) { + var that, + zoneDelta, + output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + + units = normalizeUnits(units); + + switch (units) { + case 'year': output = monthDiff(this, that) / 12; break; + case 'month': output = monthDiff(this, that); break; + case 'quarter': output = monthDiff(this, that) / 3; break; + case 'second': output = (this - that) / 1e3; break; // 1000 + case 'minute': output = (this - that) / 6e4; break; // 1000 * 60 + case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60 + case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst + case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst + default: output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff (a, b) { + // difference in months + var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor2 - anchor); + } + + //check for negative zero, return zero if negative zero + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString () { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + var utc = keepOffset !== true; + var m = utc ? this.clone().utc() : this; + if (m.year() < 0 || m.year() > 9999) { + return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); + } + } + return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + function inspect () { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + var func = 'moment'; + var zone = ''; + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + var prefix = '[' + func + '("]'; + var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY'; + var datetime = '-MM-DD[T]HH:mm:ss.SSS'; + var suffix = zone + '[")]'; + + return this.format(prefix + year + datetime + suffix); + } + + function format (inputString) { + if (!inputString) { + inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; + } + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from (time, withoutSuffix) { + if (this.isValid() && + ((isMoment(time) && time.isValid()) || + createLocal(time).isValid())) { + return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow (withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to (time, withoutSuffix) { + if (this.isValid() && + ((isMoment(time) && time.isValid()) || + createLocal(time).isValid())) { + return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow (withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } + + // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + function locale (key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + if (newLocaleData != null) { + this._locale = newLocaleData; + } + return this; + } + } + + var lang = deprecate( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + } + ); + + function localeData () { + return this._locale; + } + + var MS_PER_SECOND = 1000; + var MS_PER_MINUTE = 60 * MS_PER_SECOND; + var MS_PER_HOUR = 60 * MS_PER_MINUTE; + var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; + + // actual modulo - handles negative numbers (for dates before 1970): + function mod$1(dividend, divisor) { + return (dividend % divisor + divisor) % divisor; + } + + function localStartOfDate(y, m, d) { + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } + } + + function utcStartOfDate(y, m, d) { + // Date.UTC remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } + } + + function startOf (units) { + var time; + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year(), 0, 1); + break; + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3, 1); + break; + case 'month': + time = startOfDate(this.year(), this.month(), 1); + break; + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); + break; + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); + break; + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date()); + break; + case 'hour': + time = this._d.valueOf(); + time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); + break; + case 'minute': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + case 'second': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + + function endOf (units) { + var time; + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; + break; + case 'month': + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; + break; + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; + break; + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + case 'hour': + time = this._d.valueOf(); + time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; + break; + case 'minute': + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + case 'second': + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + + function valueOf () { + return this._d.valueOf() - ((this._offset || 0) * 60000); + } + + function unix () { + return Math.floor(this.valueOf() / 1000); + } + + function toDate () { + return new Date(this.valueOf()); + } + + function toArray () { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; + } + + function toObject () { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds() + }; + } + + function toJSON () { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2 () { + return isValid(this); + } + + function parsingFlags () { + return extend({}, getParsingFlags(this)); + } + + function invalidAt () { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; + } + + // FORMATTING + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken (token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); + + // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); + + // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); + + + // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); + }); + + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); + + // MOMENTS + + function getSetWeekYear (input) { + return getSetWeekYearHelper.call(this, + input, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy); + } + + function getSetISOWeekYear (input) { + return getSetWeekYearHelper.call(this, + input, this.isoWeek(), this.isoWeekday(), 1, 4); + } + + function getISOWeeksInYear () { + return weeksInYear(this.year(), 1, 4); + } + + function getWeeksInYear () { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + if (week > weeksTarget) { + week = weeksTarget; + } + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } + + // FORMATTING + + addFormatToken('Q', 0, 'Qo', 'quarter'); + + // ALIASES + + addUnitAlias('quarter', 'Q'); + + // PRIORITY + + addUnitPriority('quarter', 7); + + // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); + + // MOMENTS + + function getSetQuarter (input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); + } + + // FORMATTING + + addFormatToken('D', ['DD', 2], 'Do', 'date'); + + // ALIASES + + addUnitAlias('date', 'D'); + + // PRIORITY + addUnitPriority('date', 9); + + // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict ? + (locale._dayOfMonthOrdinalParse || locale._ordinalParse) : + locale._dayOfMonthOrdinalParseLenient; + }); + + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); + + // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); + + // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); + + // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); + + // PRIORITY + addUnitPriority('dayOfYear', 4); + + // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); + + // HELPERS + + // MOMENTS + + function getSetDayOfYear (input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); + } + + // FORMATTING + + addFormatToken('m', ['mm', 2], 0, 'minute'); + + // ALIASES + + addUnitAlias('minute', 'm'); + + // PRIORITY + + addUnitPriority('minute', 14); + + // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); + + // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); + + // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); + + // ALIASES + + addUnitAlias('second', 's'); + + // PRIORITY + + addUnitPriority('second', 15); + + // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); + + // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); + + // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); + + + // ALIASES + + addUnitAlias('millisecond', 'ms'); + + // PRIORITY + + addUnitPriority('millisecond', 16); + + // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + + var token; + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } + // MOMENTS + + var getSetMillisecond = makeGetSet('Milliseconds', false); + + // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); + + // MOMENTS + + function getZoneAbbr () { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName () { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); + proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); + proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); + proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); + proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); + + function createUnix (input) { + return createLocal(input * 1000); + } + + function createInZone () { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat (string) { + return string; + } + + var proto$1 = Locale.prototype; + + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1 (format, index, field, setter) { + var locale = getLocale(); + var utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl (format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i; + var out = []; + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + return out; + } + + // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + function listWeekdaysImpl (localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + var i; + var out = []; + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + return out; + } + + function listMonths (format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort (format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal : function (number) { + var b = number % 10, + output = (toInt(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } + }); + + // Side effect imports + + hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); + hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); + + var mathAbs = Math.abs; + + function abs () { + var data = this._data; + + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + + return this; + } + + function addSubtract$1 (duration, input, value, direction) { + var other = createDuration(input, value); + + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + + return duration._bubble(); + } + + // supports only 2.0-style add(1, 's') or add(duration) + function add$1 (input, value) { + return addSubtract$1(this, input, value, 1); + } + + // supports only 2.0-style subtract(1, 's') or subtract(duration) + function subtract$1 (input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil (number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble () { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years, monthsFromDays; + + // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + if (!((milliseconds >= 0 && days >= 0 && months >= 0) || + (milliseconds <= 0 && days <= 0 && months <= 0))) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } + + // The following code bubbles up values, see the tests for + // examples of what that means. + data.milliseconds = milliseconds % 1000; + + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + + hours = absFloor(minutes / 60); + data.hours = hours % 24; + + days += absFloor(hours / 24); + + // convert days to months + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + data.days = days; + data.months = months; + data.years = years; + + return this; + } + + function daysToMonths (days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return days * 4800 / 146097; + } + + function monthsToDays (months) { + // the reverse of daysToMonths + return months * 146097 / 4800; + } + + function as (units) { + if (!this.isValid()) { + return NaN; + } + var days; + var months; + var milliseconds = this._milliseconds; + + units = normalizeUnits(units); + + if (units === 'month' || units === 'quarter' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + switch (units) { + case 'month': return months; + case 'quarter': return months / 3; + case 'year': return months / 12; + } + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + switch (units) { + case 'week' : return days / 7 + milliseconds / 6048e5; + case 'day' : return days + milliseconds / 864e5; + case 'hour' : return days * 24 + milliseconds / 36e5; + case 'minute' : return days * 1440 + milliseconds / 6e4; + case 'second' : return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + case 'millisecond': return Math.floor(days * 864e5) + milliseconds; + default: throw new Error('Unknown unit ' + units); + } + } + } + + // TODO: Use this.as('ms')? + function valueOf$1 () { + if (!this.isValid()) { + return NaN; + } + return ( + this._milliseconds + + this._days * 864e5 + + (this._months % 12) * 2592e6 + + toInt(this._months / 12) * 31536e6 + ); + } + + function makeAs (alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'); + var asSeconds = makeAs('s'); + var asMinutes = makeAs('m'); + var asHours = makeAs('h'); + var asDays = makeAs('d'); + var asWeeks = makeAs('w'); + var asMonths = makeAs('M'); + var asQuarters = makeAs('Q'); + var asYears = makeAs('y'); + + function clone$1 () { + return createDuration(this); + } + + function get$2 (units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'); + var seconds = makeGetter('seconds'); + var minutes = makeGetter('minutes'); + var hours = makeGetter('hours'); + var days = makeGetter('days'); + var months = makeGetter('months'); + var years = makeGetter('years'); + + function weeks () { + return absFloor(this.days() / 7); + } + + var round = Math.round; + var thresholds = { + ss: 44, // a few seconds to seconds + s : 45, // seconds to minute + m : 45, // minutes to hour + h : 22, // hours to day + d : 26, // days to month + M : 11 // months to year + }; + + // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function relativeTime$1 (posNegDuration, withoutSuffix, locale) { + var duration = createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + + var a = seconds <= thresholds.ss && ['s', seconds] || + seconds < thresholds.s && ['ss', seconds] || + minutes <= 1 && ['m'] || + minutes < thresholds.m && ['mm', minutes] || + hours <= 1 && ['h'] || + hours < thresholds.h && ['hh', hours] || + days <= 1 && ['d'] || + days < thresholds.d && ['dd', days] || + months <= 1 && ['M'] || + months < thresholds.M && ['MM', months] || + years <= 1 && ['y'] || ['yy', years]; + + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } + + // This function allows you to set the rounding function for relative time strings + function getSetRelativeTimeRounding (roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + if (typeof(roundingFunction) === 'function') { + round = roundingFunction; + return true; + } + return false; + } + + // This function allows you to set a threshold for relative time strings + function getSetRelativeTimeThreshold (threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + if (limit === undefined) { + return thresholds[threshold]; + } + thresholds[threshold] = limit; + if (threshold === 's') { + thresholds.ss = limit - 1; + } + return true; + } + + function humanize (withSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var locale = this.localeData(); + var output = relativeTime$1(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return ((x > 0) - (x < 0)) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000; + var days = abs$1(this._days); + var months = abs$1(this._months); + var minutes, hours, years; + + // 3600 seconds -> 60 minutes -> 1 hour + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + + // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + var Y = years; + var M = months; + var D = days; + var h = hours; + var m = minutes; + var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + var totalSign = total < 0 ? '-' : ''; + var ymSign = sign(this._months) !== sign(total) ? '-' : ''; + var daysSign = sign(this._days) !== sign(total) ? '-' : ''; + var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + + return totalSign + 'P' + + (Y ? ymSign + Y + 'Y' : '') + + (M ? ymSign + M + 'M' : '') + + (D ? daysSign + D + 'D' : '') + + ((h || m || s) ? 'T' : '') + + (h ? hmsSign + h + 'H' : '') + + (m ? hmsSign + m + 'M' : '') + + (s ? hmsSign + s + 'S' : ''); + } + + var proto$2 = Duration.prototype; + + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + + proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); + proto$2.lang = lang; + + // Side effect imports + + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); + + // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); + + // Side effect imports + + //! moment.js + + hooks.version = '2.24.0'; + + setHookCallback(createLocal); + + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; + + // currently HTML5 input type only supports 24-hour formats + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // + DATE: 'YYYY-MM-DD', // + TIME: 'HH:mm', // + TIME_SECONDS: 'HH:mm:ss', // + TIME_MS: 'HH:mm:ss.SSS', // + WEEK: 'GGGG-[W]WW', // + MONTH: 'YYYY-MM' // + }; + + //! moment.js locale configuration + + hooks.defineLocale('af', { + months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'), + monthsShort : 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), + weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'), + weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), + weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), + meridiemParse: /vm|nm/i, + isPM : function (input) { + return /^nm$/i.test(input); + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'vm' : 'VM'; + } else { + return isLower ? 'nm' : 'NM'; + } + }, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Vandag om] LT', + nextDay : '[Môre om] LT', + nextWeek : 'dddd [om] LT', + lastDay : '[Gister om] LT', + lastWeek : '[Laas] dddd [om] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'oor %s', + past : '%s gelede', + s : '\'n paar sekondes', + ss : '%d sekondes', + m : '\'n minuut', + mm : '%d minute', + h : '\'n uur', + hh : '%d ure', + d : '\'n dag', + dd : '%d dae', + M : '\'n maand', + MM : '%d maande', + y : '\'n jaar', + yy : '%d jaar' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter + }, + week : { + dow : 1, // Maandag is die eerste dag van die week. + doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('ar-dz', { + months : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + monthsShort : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('ar-kw', { + months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '0': '0' + }, pluralForm = function (n) { + return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; + }, plurals = { + s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'], + m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'], + h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'], + d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'], + M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'], + y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام'] + }, pluralize = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm(number), + str = plurals[u][pluralForm(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, months$1 = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر' + ]; + + hooks.defineLocale('ar-ly', { + months : months$1, + monthsShort : months$1, + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'D/\u200FM/\u200FYYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ص|م/, + isPM : function (input) { + return 'م' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar : { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'بعد %s', + past : 'منذ %s', + s : pluralize('s'), + ss : pluralize('s'), + m : pluralize('m'), + mm : pluralize('m'), + h : pluralize('h'), + hh : pluralize('h'), + d : pluralize('d'), + dd : pluralize('d'), + M : pluralize('M'), + MM : pluralize('M'), + y : pluralize('y'), + yy : pluralize('y') + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('ar-ma', { + months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$1 = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠' + }, numberMap = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0' + }; + + hooks.defineLocale('ar-sa', { + months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ص|م/, + isPM : function (input) { + return 'م' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + preparse: function (string) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$1[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('ar-tn', { + months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss : '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات' + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$2 = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠' + }, numberMap$1 = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0' + }, pluralForm$1 = function (n) { + return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; + }, plurals$1 = { + s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'], + m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'], + h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'], + d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'], + M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'], + y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام'] + }, pluralize$1 = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm$1(number), + str = plurals$1[u][pluralForm$1(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, months$2 = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر' + ]; + + hooks.defineLocale('ar', { + months : months$2, + monthsShort : months$2, + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'D/\u200FM/\u200FYYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ص|م/, + isPM : function (input) { + return 'م' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar : { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'بعد %s', + past : 'منذ %s', + s : pluralize$1('s'), + ss : pluralize$1('s'), + m : pluralize$1('m'), + mm : pluralize$1('m'), + h : pluralize$1('h'), + hh : pluralize$1('h'), + d : pluralize$1('d'), + dd : pluralize$1('d'), + M : pluralize$1('M'), + MM : pluralize$1('M'), + y : pluralize$1('y'), + yy : pluralize$1('y') + }, + preparse: function (string) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap$1[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$2[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var suffixes = { + 1: '-inci', + 5: '-inci', + 8: '-inci', + 70: '-inci', + 80: '-inci', + 2: '-nci', + 7: '-nci', + 20: '-nci', + 50: '-nci', + 3: '-üncü', + 4: '-üncü', + 100: '-üncü', + 6: '-ncı', + 9: '-uncu', + 10: '-uncu', + 30: '-uncu', + 60: '-ıncı', + 90: '-ıncı' + }; + + hooks.defineLocale('az', { + months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'), + monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), + weekdays : 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'), + weekdaysShort : 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'), + weekdaysMin : 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[bugün saat] LT', + nextDay : '[sabah saat] LT', + nextWeek : '[gələn həftə] dddd [saat] LT', + lastDay : '[dünən] LT', + lastWeek : '[keçən həftə] dddd [saat] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s sonra', + past : '%s əvvəl', + s : 'birneçə saniyə', + ss : '%d saniyə', + m : 'bir dəqiqə', + mm : '%d dəqiqə', + h : 'bir saat', + hh : '%d saat', + d : 'bir gün', + dd : '%d gün', + M : 'bir ay', + MM : '%d ay', + y : 'bir il', + yy : '%d il' + }, + meridiemParse: /gecə|səhər|gündüz|axşam/, + isPM : function (input) { + return /^(gündüz|axşam)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'gecə'; + } else if (hour < 12) { + return 'səhər'; + } else if (hour < 17) { + return 'gündüz'; + } else { + return 'axşam'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, + ordinal : function (number) { + if (number === 0) { // special case for zero + return number + '-ıncı'; + } + var a = number % 10, + b = number % 100 - a, + c = number >= 100 ? 100 : null; + return number + (suffixes[a] || suffixes[b] || suffixes[c]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); + } + function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + 'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін', + 'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін', + 'dd': 'дзень_дні_дзён', + 'MM': 'месяц_месяцы_месяцаў', + 'yy': 'год_гады_гадоў' + }; + if (key === 'm') { + return withoutSuffix ? 'хвіліна' : 'хвіліну'; + } + else if (key === 'h') { + return withoutSuffix ? 'гадзіна' : 'гадзіну'; + } + else { + return number + ' ' + plural(format[key], +number); + } + } + + hooks.defineLocale('be', { + months : { + format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'), + standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_') + }, + monthsShort : 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'), + weekdays : { + format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'), + standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'), + isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/ + }, + weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY г.', + LLL : 'D MMMM YYYY г., HH:mm', + LLLL : 'dddd, D MMMM YYYY г., HH:mm' + }, + calendar : { + sameDay: '[Сёння ў] LT', + nextDay: '[Заўтра ў] LT', + lastDay: '[Учора ў] LT', + nextWeek: function () { + return '[У] dddd [ў] LT'; + }, + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return '[У мінулую] dddd [ў] LT'; + case 1: + case 2: + case 4: + return '[У мінулы] dddd [ў] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'праз %s', + past : '%s таму', + s : 'некалькі секунд', + m : relativeTimeWithPlural, + mm : relativeTimeWithPlural, + h : relativeTimeWithPlural, + hh : relativeTimeWithPlural, + d : 'дзень', + dd : relativeTimeWithPlural, + M : 'месяц', + MM : relativeTimeWithPlural, + y : 'год', + yy : relativeTimeWithPlural + }, + meridiemParse: /ночы|раніцы|дня|вечара/, + isPM : function (input) { + return /^(дня|вечара)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ночы'; + } else if (hour < 12) { + return 'раніцы'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечара'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-і' : number + '-ы'; + case 'D': + return number + '-га'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('bg', { + months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'), + monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'), + weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'), + weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'), + weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'D.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY H:mm', + LLLL : 'dddd, D MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[Днес в] LT', + nextDay : '[Утре в] LT', + nextWeek : 'dddd [в] LT', + lastDay : '[Вчера в] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[В изминалата] dddd [в] LT'; + case 1: + case 2: + case 4: + case 5: + return '[В изминалия] dddd [в] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'след %s', + past : 'преди %s', + s : 'няколко секунди', + ss : '%d секунди', + m : 'минута', + mm : '%d минути', + h : 'час', + hh : '%d часа', + d : 'ден', + dd : '%d дни', + M : 'месец', + MM : '%d месеца', + y : 'година', + yy : '%d години' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal : function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('bm', { + months : 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split('_'), + monthsShort : 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'), + weekdays : 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'), + weekdaysShort : 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'), + weekdaysMin : 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'MMMM [tile] D [san] YYYY', + LLL : 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + LLLL : 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm' + }, + calendar : { + sameDay : '[Bi lɛrɛ] LT', + nextDay : '[Sini lɛrɛ] LT', + nextWeek : 'dddd [don lɛrɛ] LT', + lastDay : '[Kunu lɛrɛ] LT', + lastWeek : 'dddd [tɛmɛnen lɛrɛ] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s kɔnɔ', + past : 'a bɛ %s bɔ', + s : 'sanga dama dama', + ss : 'sekondi %d', + m : 'miniti kelen', + mm : 'miniti %d', + h : 'lɛrɛ kelen', + hh : 'lɛrɛ %d', + d : 'tile kelen', + dd : 'tile %d', + M : 'kalo kelen', + MM : 'kalo %d', + y : 'san kelen', + yy : 'san %d' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$3 = { + '1': '১', + '2': '২', + '3': '৩', + '4': '৪', + '5': '৫', + '6': '৬', + '7': '৭', + '8': '৮', + '9': '৯', + '0': '০' + }, + numberMap$2 = { + '১': '1', + '২': '2', + '৩': '3', + '৪': '4', + '৫': '5', + '৬': '6', + '৭': '7', + '৮': '8', + '৯': '9', + '০': '0' + }; + + hooks.defineLocale('bn', { + months : 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'), + monthsShort : 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'), + weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'), + weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'), + weekdaysMin : 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'), + longDateFormat : { + LT : 'A h:mm সময়', + LTS : 'A h:mm:ss সময়', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm সময়', + LLLL : 'dddd, D MMMM YYYY, A h:mm সময়' + }, + calendar : { + sameDay : '[আজ] LT', + nextDay : '[আগামীকাল] LT', + nextWeek : 'dddd, LT', + lastDay : '[গতকাল] LT', + lastWeek : '[গত] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s পরে', + past : '%s আগে', + s : 'কয়েক সেকেন্ড', + ss : '%d সেকেন্ড', + m : 'এক মিনিট', + mm : '%d মিনিট', + h : 'এক ঘন্টা', + hh : '%d ঘন্টা', + d : 'এক দিন', + dd : '%d দিন', + M : 'এক মাস', + MM : '%d মাস', + y : 'এক বছর', + yy : '%d বছর' + }, + preparse: function (string) { + return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) { + return numberMap$2[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$3[match]; + }); + }, + meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ((meridiem === 'রাত' && hour >= 4) || + (meridiem === 'দুপুর' && hour < 5) || + meridiem === 'বিকাল') { + return hour + 12; + } else { + return hour; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'রাত'; + } else if (hour < 10) { + return 'সকাল'; + } else if (hour < 17) { + return 'দুপুর'; + } else if (hour < 20) { + return 'বিকাল'; + } else { + return 'রাত'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$4 = { + '1': '༡', + '2': '༢', + '3': '༣', + '4': '༤', + '5': '༥', + '6': '༦', + '7': '༧', + '8': '༨', + '9': '༩', + '0': '༠' + }, + numberMap$3 = { + '༡': '1', + '༢': '2', + '༣': '3', + '༤': '4', + '༥': '5', + '༦': '6', + '༧': '7', + '༨': '8', + '༩': '9', + '༠': '0' + }; + + hooks.defineLocale('bo', { + months : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), + monthsShort : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), + weekdays : 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'), + weekdaysShort : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), + weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm', + LLLL : 'dddd, D MMMM YYYY, A h:mm' + }, + calendar : { + sameDay : '[དི་རིང] LT', + nextDay : '[སང་ཉིན] LT', + nextWeek : '[བདུན་ཕྲག་རྗེས་མ], LT', + lastDay : '[ཁ་སང] LT', + lastWeek : '[བདུན་ཕྲག་མཐའ་མ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ལ་', + past : '%s སྔན་ལ', + s : 'ལམ་སང', + ss : '%d སྐར་ཆ།', + m : 'སྐར་མ་གཅིག', + mm : '%d སྐར་མ', + h : 'ཆུ་ཚོད་གཅིག', + hh : '%d ཆུ་ཚོད', + d : 'ཉིན་གཅིག', + dd : '%d ཉིན་', + M : 'ཟླ་བ་གཅིག', + MM : '%d ཟླ་བ', + y : 'ལོ་གཅིག', + yy : '%d ལོ' + }, + preparse: function (string) { + return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) { + return numberMap$3[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$4[match]; + }); + }, + meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ((meridiem === 'མཚན་མོ' && hour >= 4) || + (meridiem === 'ཉིན་གུང' && hour < 5) || + meridiem === 'དགོང་དག') { + return hour + 12; + } else { + return hour; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'མཚན་མོ'; + } else if (hour < 10) { + return 'ཞོགས་ཀས'; + } else if (hour < 17) { + return 'ཉིན་གུང'; + } else if (hour < 20) { + return 'དགོང་དག'; + } else { + return 'མཚན་མོ'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function relativeTimeWithMutation(number, withoutSuffix, key) { + var format = { + 'mm': 'munutenn', + 'MM': 'miz', + 'dd': 'devezh' + }; + return number + ' ' + mutation(format[key], number); + } + function specialMutationForYears(number) { + switch (lastNumber(number)) { + case 1: + case 3: + case 4: + case 5: + case 9: + return number + ' bloaz'; + default: + return number + ' vloaz'; + } + } + function lastNumber(number) { + if (number > 9) { + return lastNumber(number % 10); + } + return number; + } + function mutation(text, number) { + if (number === 2) { + return softMutation(text); + } + return text; + } + function softMutation(text) { + var mutationTable = { + 'm': 'v', + 'b': 'v', + 'd': 'z' + }; + if (mutationTable[text.charAt(0)] === undefined) { + return text; + } + return mutationTable[text.charAt(0)] + text.substring(1); + } + + hooks.defineLocale('br', { + months : 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'), + monthsShort : 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), + weekdays : 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'), + weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), + weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h[e]mm A', + LTS : 'h[e]mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D [a viz] MMMM YYYY', + LLL : 'D [a viz] MMMM YYYY h[e]mm A', + LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A' + }, + calendar : { + sameDay : '[Hiziv da] LT', + nextDay : '[Warc\'hoazh da] LT', + nextWeek : 'dddd [da] LT', + lastDay : '[Dec\'h da] LT', + lastWeek : 'dddd [paset da] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'a-benn %s', + past : '%s \'zo', + s : 'un nebeud segondennoù', + ss : '%d eilenn', + m : 'ur vunutenn', + mm : relativeTimeWithMutation, + h : 'un eur', + hh : '%d eur', + d : 'un devezh', + dd : relativeTimeWithMutation, + M : 'ur miz', + MM : relativeTimeWithMutation, + y : 'ur bloaz', + yy : specialMutationForYears + }, + dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/, + ordinal : function (number) { + var output = (number === 1) ? 'añ' : 'vet'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function translate(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } + } + + hooks.defineLocale('bs', { + months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'), + monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[danas u] LT', + nextDay : '[sutra u] LT', + nextWeek : function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[jučer u] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'prije %s', + s : 'par sekundi', + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : 'dan', + dd : translate, + M : 'mjesec', + MM : translate, + y : 'godinu', + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('ca', { + months : { + standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'), + format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'), + isFormat: /D[oD]?(\s)+MMMM/ + }, + monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'), + monthsParseExact : true, + weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'), + weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'), + weekdaysMin : 'dg_dl_dt_dc_dj_dv_ds'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM [de] YYYY', + ll : 'D MMM YYYY', + LLL : 'D MMMM [de] YYYY [a les] H:mm', + lll : 'D MMM YYYY, H:mm', + LLLL : 'dddd D MMMM [de] YYYY [a les] H:mm', + llll : 'ddd D MMM YYYY, H:mm' + }, + calendar : { + sameDay : function () { + return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + nextDay : function () { + return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + lastDay : function () { + return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'd\'aquí %s', + past : 'fa %s', + s : 'uns segons', + ss : '%d segons', + m : 'un minut', + mm : '%d minuts', + h : 'una hora', + hh : '%d hores', + d : 'un dia', + dd : '%d dies', + M : 'un mes', + MM : '%d mesos', + y : 'un any', + yy : '%d anys' + }, + dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, + ordinal : function (number, period) { + var output = (number === 1) ? 'r' : + (number === 2) ? 'n' : + (number === 3) ? 'r' : + (number === 4) ? 't' : 'è'; + if (period === 'w' || period === 'W') { + output = 'a'; + } + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var months$3 = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'), + monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'); + + var monthsParse = [/^led/i, /^úno/i, /^bře/i, /^dub/i, /^kvě/i, /^(čvn|červen$|června)/i, /^(čvc|červenec|července)/i, /^srp/i, /^zář/i, /^říj/i, /^lis/i, /^pro/i]; + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + var monthsRegex$1 = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i; + + function plural$1(n) { + return (n > 1) && (n < 5) && (~~(n / 10) !== 1); + } + function translate$1(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'sekundy' : 'sekund'); + } else { + return result + 'sekundami'; + } + break; + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou'); + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'minuty' : 'minut'); + } else { + return result + 'minutami'; + } + break; + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'hodiny' : 'hodin'); + } else { + return result + 'hodinami'; + } + break; + case 'd': // a day / in a day / a day ago + return (withoutSuffix || isFuture) ? 'den' : 'dnem'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'dny' : 'dní'); + } else { + return result + 'dny'; + } + break; + case 'M': // a month / in a month / a month ago + return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'měsíce' : 'měsíců'); + } else { + return result + 'měsíci'; + } + break; + case 'y': // a year / in a year / a year ago + return (withoutSuffix || isFuture) ? 'rok' : 'rokem'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'roky' : 'let'); + } else { + return result + 'lety'; + } + break; + } + } + + hooks.defineLocale('cs', { + months : months$3, + monthsShort : monthsShort, + monthsRegex : monthsRegex$1, + monthsShortRegex : monthsRegex$1, + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + monthsStrictRegex : /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i, + monthsShortStrictRegex : /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i, + monthsParse : monthsParse, + longMonthsParse : monthsParse, + shortMonthsParse : monthsParse, + weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'), + weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'), + weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'), + longDateFormat : { + LT: 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd D. MMMM YYYY H:mm', + l : 'D. M. YYYY' + }, + calendar : { + sameDay: '[dnes v] LT', + nextDay: '[zítra v] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v neděli v] LT'; + case 1: + case 2: + return '[v] dddd [v] LT'; + case 3: + return '[ve středu v] LT'; + case 4: + return '[ve čtvrtek v] LT'; + case 5: + return '[v pátek v] LT'; + case 6: + return '[v sobotu v] LT'; + } + }, + lastDay: '[včera v] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulou neděli v] LT'; + case 1: + case 2: + return '[minulé] dddd [v] LT'; + case 3: + return '[minulou středu v] LT'; + case 4: + case 5: + return '[minulý] dddd [v] LT'; + case 6: + return '[minulou sobotu v] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'za %s', + past : 'před %s', + s : translate$1, + ss : translate$1, + m : translate$1, + mm : translate$1, + h : translate$1, + hh : translate$1, + d : translate$1, + dd : translate$1, + M : translate$1, + MM : translate$1, + y : translate$1, + yy : translate$1 + }, + dayOfMonthOrdinalParse : /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('cv', { + months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'), + monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'), + weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'), + weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'), + weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD-MM-YYYY', + LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', + LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm' + }, + calendar : { + sameDay: '[Паян] LT [сехетре]', + nextDay: '[Ыран] LT [сехетре]', + lastDay: '[Ӗнер] LT [сехетре]', + nextWeek: '[Ҫитес] dddd LT [сехетре]', + lastWeek: '[Иртнӗ] dddd LT [сехетре]', + sameElse: 'L' + }, + relativeTime : { + future : function (output) { + var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран'; + return output + affix; + }, + past : '%s каялла', + s : 'пӗр-ик ҫеккунт', + ss : '%d ҫеккунт', + m : 'пӗр минут', + mm : '%d минут', + h : 'пӗр сехет', + hh : '%d сехет', + d : 'пӗр кун', + dd : '%d кун', + M : 'пӗр уйӑх', + MM : '%d уйӑх', + y : 'пӗр ҫул', + yy : '%d ҫул' + }, + dayOfMonthOrdinalParse: /\d{1,2}-мӗш/, + ordinal : '%d-мӗш', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('cy', { + months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'), + monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'), + weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'), + weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), + weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), + weekdaysParseExact : true, + // time formats are the same as en-gb + longDateFormat: { + LT: 'HH:mm', + LTS : 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[Heddiw am] LT', + nextDay: '[Yfory am] LT', + nextWeek: 'dddd [am] LT', + lastDay: '[Ddoe am] LT', + lastWeek: 'dddd [diwethaf am] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'mewn %s', + past: '%s yn ôl', + s: 'ychydig eiliadau', + ss: '%d eiliad', + m: 'munud', + mm: '%d munud', + h: 'awr', + hh: '%d awr', + d: 'diwrnod', + dd: '%d diwrnod', + M: 'mis', + MM: '%d mis', + y: 'blwyddyn', + yy: '%d flynedd' + }, + dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, + // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh + ordinal: function (number) { + var b = number, + output = '', + lookup = [ + '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed + 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed + ]; + if (b > 20) { + if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { + output = 'fed'; // not 30ain, 70ain or 90ain + } else { + output = 'ain'; + } + } else if (b > 0) { + output = lookup[b]; + } + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('da', { + months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'), + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'), + weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm' + }, + calendar : { + sameDay : '[i dag kl.] LT', + nextDay : '[i morgen kl.] LT', + nextWeek : 'på dddd [kl.] LT', + lastDay : '[i går kl.] LT', + lastWeek : '[i] dddd[s kl.] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'om %s', + past : '%s siden', + s : 'få sekunder', + ss : '%d sekunder', + m : 'et minut', + mm : '%d minutter', + h : 'en time', + hh : '%d timer', + d : 'en dag', + dd : '%d dage', + M : 'en måned', + MM : '%d måneder', + y : 'et år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eine Minute', 'einer Minute'], + 'h': ['eine Stunde', 'einer Stunde'], + 'd': ['ein Tag', 'einem Tag'], + 'dd': [number + ' Tage', number + ' Tagen'], + 'M': ['ein Monat', 'einem Monat'], + 'MM': [number + ' Monate', number + ' Monaten'], + 'y': ['ein Jahr', 'einem Jahr'], + 'yy': [number + ' Jahre', number + ' Jahren'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('de-at', { + months : 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort : 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd, D. MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]' + }, + relativeTime : { + future : 'in %s', + past : 'vor %s', + s : 'ein paar Sekunden', + ss : '%d Sekunden', + m : processRelativeTime, + mm : '%d Minuten', + h : processRelativeTime, + hh : '%d Stunden', + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function processRelativeTime$1(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eine Minute', 'einer Minute'], + 'h': ['eine Stunde', 'einer Stunde'], + 'd': ['ein Tag', 'einem Tag'], + 'dd': [number + ' Tage', number + ' Tagen'], + 'M': ['ein Monat', 'einem Monat'], + 'MM': [number + ' Monate', number + ' Monaten'], + 'y': ['ein Jahr', 'einem Jahr'], + 'yy': [number + ' Jahre', number + ' Jahren'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('de-ch', { + months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd, D. MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]' + }, + relativeTime : { + future : 'in %s', + past : 'vor %s', + s : 'ein paar Sekunden', + ss : '%d Sekunden', + m : processRelativeTime$1, + mm : '%d Minuten', + h : processRelativeTime$1, + hh : '%d Stunden', + d : processRelativeTime$1, + dd : processRelativeTime$1, + M : processRelativeTime$1, + MM : processRelativeTime$1, + y : processRelativeTime$1, + yy : processRelativeTime$1 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function processRelativeTime$2(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eine Minute', 'einer Minute'], + 'h': ['eine Stunde', 'einer Stunde'], + 'd': ['ein Tag', 'einem Tag'], + 'dd': [number + ' Tage', number + ' Tagen'], + 'M': ['ein Monat', 'einem Monat'], + 'MM': [number + ' Monate', number + ' Monaten'], + 'y': ['ein Jahr', 'einem Jahr'], + 'yy': [number + ' Jahre', number + ' Jahren'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('de', { + months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd, D. MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]' + }, + relativeTime : { + future : 'in %s', + past : 'vor %s', + s : 'ein paar Sekunden', + ss : '%d Sekunden', + m : processRelativeTime$2, + mm : '%d Minuten', + h : processRelativeTime$2, + hh : '%d Stunden', + d : processRelativeTime$2, + dd : processRelativeTime$2, + M : processRelativeTime$2, + MM : processRelativeTime$2, + y : processRelativeTime$2, + yy : processRelativeTime$2 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var months$4 = [ + 'ޖެނުއަރީ', + 'ފެބްރުއަރީ', + 'މާރިޗު', + 'އޭޕްރީލު', + 'މޭ', + 'ޖޫން', + 'ޖުލައި', + 'އޯގަސްޓު', + 'ސެޕްޓެމްބަރު', + 'އޮކްޓޯބަރު', + 'ނޮވެމްބަރު', + 'ޑިސެމްބަރު' + ], weekdays = [ + 'އާދިއްތަ', + 'ހޯމަ', + 'އަންގާރަ', + 'ބުދަ', + 'ބުރާސްފަތި', + 'ހުކުރު', + 'ހޮނިހިރު' + ]; + + hooks.defineLocale('dv', { + months : months$4, + monthsShort : months$4, + weekdays : weekdays, + weekdaysShort : weekdays, + weekdaysMin : 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'), + longDateFormat : { + + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'D/M/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /މކ|މފ/, + isPM : function (input) { + return 'މފ' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'މކ'; + } else { + return 'މފ'; + } + }, + calendar : { + sameDay : '[މިއަދު] LT', + nextDay : '[މާދަމާ] LT', + nextWeek : 'dddd LT', + lastDay : '[އިއްޔެ] LT', + lastWeek : '[ފާއިތުވި] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ތެރޭގައި %s', + past : 'ކުރިން %s', + s : 'ސިކުންތުކޮޅެއް', + ss : 'd% ސިކުންތު', + m : 'މިނިޓެއް', + mm : 'މިނިޓު %d', + h : 'ގަޑިއިރެއް', + hh : 'ގަޑިއިރު %d', + d : 'ދުވަހެއް', + dd : 'ދުވަސް %d', + M : 'މަހެއް', + MM : 'މަސް %d', + y : 'އަހަރެއް', + yy : 'އަހަރު %d' + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week : { + dow : 7, // Sunday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('el', { + monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'), + monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'), + months : function (momentToFormat, format) { + if (!momentToFormat) { + return this._monthsNominativeEl; + } else if (typeof format === 'string' && /D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM' + return this._monthsGenitiveEl[momentToFormat.month()]; + } else { + return this._monthsNominativeEl[momentToFormat.month()]; + } + }, + monthsShort : 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'), + weekdays : 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'), + weekdaysShort : 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'), + weekdaysMin : 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'), + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'μμ' : 'ΜΜ'; + } else { + return isLower ? 'πμ' : 'ΠΜ'; + } + }, + isPM : function (input) { + return ((input + '').toLowerCase()[0] === 'μ'); + }, + meridiemParse : /[ΠΜ]\.?Μ?\.?/i, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendarEl : { + sameDay : '[Σήμερα {}] LT', + nextDay : '[Αύριο {}] LT', + nextWeek : 'dddd [{}] LT', + lastDay : '[Χθες {}] LT', + lastWeek : function () { + switch (this.day()) { + case 6: + return '[το προηγούμενο] dddd [{}] LT'; + default: + return '[την προηγούμενη] dddd [{}] LT'; + } + }, + sameElse : 'L' + }, + calendar : function (key, mom) { + var output = this._calendarEl[key], + hours = mom && mom.hours(); + if (isFunction(output)) { + output = output.apply(mom); + } + return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις')); + }, + relativeTime : { + future : 'σε %s', + past : '%s πριν', + s : 'λίγα δευτερόλεπτα', + ss : '%d δευτερόλεπτα', + m : 'ένα λεπτό', + mm : '%d λεπτά', + h : 'μία ώρα', + hh : '%d ώρες', + d : 'μία μέρα', + dd : '%d μέρες', + M : 'ένας μήνας', + MM : '%d μήνες', + y : 'ένας χρόνος', + yy : '%d χρόνια' + }, + dayOfMonthOrdinalParse: /\d{1,2}η/, + ordinal: '%dη', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4st is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-SG', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-au', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-ca', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'YYYY-MM-DD', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY h:mm A', + LLLL : 'dddd, MMMM D, YYYY h:mm A' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-gb', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-ie', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-il', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-nz', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('eo', { + months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'), + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'), + weekdays : 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'), + weekdaysShort : 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'), + weekdaysMin : 'di_lu_ma_me_ĵa_ve_sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'D[-a de] MMMM, YYYY', + LLL : 'D[-a de] MMMM, YYYY HH:mm', + LLLL : 'dddd, [la] D[-a de] MMMM, YYYY HH:mm' + }, + meridiemParse: /[ap]\.t\.m/i, + isPM: function (input) { + return input.charAt(0).toLowerCase() === 'p'; + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'p.t.m.' : 'P.T.M.'; + } else { + return isLower ? 'a.t.m.' : 'A.T.M.'; + } + }, + calendar : { + sameDay : '[Hodiaŭ je] LT', + nextDay : '[Morgaŭ je] LT', + nextWeek : 'dddd [je] LT', + lastDay : '[Hieraŭ je] LT', + lastWeek : '[pasinta] dddd [je] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'post %s', + past : 'antaŭ %s', + s : 'sekundoj', + ss : '%d sekundoj', + m : 'minuto', + mm : '%d minutoj', + h : 'horo', + hh : '%d horoj', + d : 'tago',//ne 'diurno', ĉar estas uzita por proksimumo + dd : '%d tagoj', + M : 'monato', + MM : '%d monatoj', + y : 'jaro', + yy : '%d jaroj' + }, + dayOfMonthOrdinalParse: /\d{1,2}a/, + ordinal : '%da', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), + monthsShort$1 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); + + var monthsParse$1 = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; + var monthsRegex$2 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + hooks.defineLocale('es-do', { + months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortDot; + } else if (/-MMM-/.test(format)) { + return monthsShort$1[m.month()]; + } else { + return monthsShortDot[m.month()]; + } + }, + monthsRegex: monthsRegex$2, + monthsShortRegex: monthsRegex$2, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$1, + longMonthsParse: monthsParse$1, + shortMonthsParse: monthsParse$1, + weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY h:mm A', + LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A' + }, + calendar : { + sameDay : function () { + return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextDay : function () { + return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastDay : function () { + return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'en %s', + past : 'hace %s', + s : 'unos segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'una hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un año', + yy : '%d años' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var monthsShortDot$1 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), + monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); + + var monthsParse$2 = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; + var monthsRegex$3 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + hooks.defineLocale('es-us', { + months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortDot$1; + } else if (/-MMM-/.test(format)) { + return monthsShort$2[m.month()]; + } else { + return monthsShortDot$1[m.month()]; + } + }, + monthsRegex: monthsRegex$3, + monthsShortRegex: monthsRegex$3, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$2, + longMonthsParse: monthsParse$2, + shortMonthsParse: monthsParse$2, + weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'MM/DD/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY h:mm A', + LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A' + }, + calendar : { + sameDay : function () { + return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextDay : function () { + return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastDay : function () { + return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'en %s', + past : 'hace %s', + s : 'unos segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'una hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un año', + yy : '%d años' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var monthsShortDot$2 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), + monthsShort$3 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); + + var monthsParse$3 = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; + var monthsRegex$4 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + hooks.defineLocale('es', { + months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortDot$2; + } else if (/-MMM-/.test(format)) { + return monthsShort$3[m.month()]; + } else { + return monthsShortDot$2[m.month()]; + } + }, + monthsRegex : monthsRegex$4, + monthsShortRegex : monthsRegex$4, + monthsStrictRegex : /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex : /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse : monthsParse$3, + longMonthsParse : monthsParse$3, + shortMonthsParse : monthsParse$3, + weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY H:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm' + }, + calendar : { + sameDay : function () { + return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextDay : function () { + return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastDay : function () { + return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'en %s', + past : 'hace %s', + s : 'unos segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'una hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un año', + yy : '%d años' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function processRelativeTime$3(number, withoutSuffix, key, isFuture) { + var format = { + 's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'], + 'ss': [number + 'sekundi', number + 'sekundit'], + 'm' : ['ühe minuti', 'üks minut'], + 'mm': [number + ' minuti', number + ' minutit'], + 'h' : ['ühe tunni', 'tund aega', 'üks tund'], + 'hh': [number + ' tunni', number + ' tundi'], + 'd' : ['ühe päeva', 'üks päev'], + 'M' : ['kuu aja', 'kuu aega', 'üks kuu'], + 'MM': [number + ' kuu', number + ' kuud'], + 'y' : ['ühe aasta', 'aasta', 'üks aasta'], + 'yy': [number + ' aasta', number + ' aastat'] + }; + if (withoutSuffix) { + return format[key][2] ? format[key][2] : format[key][1]; + } + return isFuture ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('et', { + months : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'), + monthsShort : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'), + weekdays : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'), + weekdaysShort : 'P_E_T_K_N_R_L'.split('_'), + weekdaysMin : 'P_E_T_K_N_R_L'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[Täna,] LT', + nextDay : '[Homme,] LT', + nextWeek : '[Järgmine] dddd LT', + lastDay : '[Eile,] LT', + lastWeek : '[Eelmine] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s pärast', + past : '%s tagasi', + s : processRelativeTime$3, + ss : processRelativeTime$3, + m : processRelativeTime$3, + mm : processRelativeTime$3, + h : processRelativeTime$3, + hh : processRelativeTime$3, + d : processRelativeTime$3, + dd : '%d päeva', + M : processRelativeTime$3, + MM : processRelativeTime$3, + y : processRelativeTime$3, + yy : processRelativeTime$3 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('eu', { + months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'), + monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'), + monthsParseExact : true, + weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'), + weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'), + weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'YYYY[ko] MMMM[ren] D[a]', + LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm', + LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', + l : 'YYYY-M-D', + ll : 'YYYY[ko] MMM D[a]', + lll : 'YYYY[ko] MMM D[a] HH:mm', + llll : 'ddd, YYYY[ko] MMM D[a] HH:mm' + }, + calendar : { + sameDay : '[gaur] LT[etan]', + nextDay : '[bihar] LT[etan]', + nextWeek : 'dddd LT[etan]', + lastDay : '[atzo] LT[etan]', + lastWeek : '[aurreko] dddd LT[etan]', + sameElse : 'L' + }, + relativeTime : { + future : '%s barru', + past : 'duela %s', + s : 'segundo batzuk', + ss : '%d segundo', + m : 'minutu bat', + mm : '%d minutu', + h : 'ordu bat', + hh : '%d ordu', + d : 'egun bat', + dd : '%d egun', + M : 'hilabete bat', + MM : '%d hilabete', + y : 'urte bat', + yy : '%d urte' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$5 = { + '1': '۱', + '2': '۲', + '3': '۳', + '4': '۴', + '5': '۵', + '6': '۶', + '7': '۷', + '8': '۸', + '9': '۹', + '0': '۰' + }, numberMap$4 = { + '۱': '1', + '۲': '2', + '۳': '3', + '۴': '4', + '۵': '5', + '۶': '6', + '۷': '7', + '۸': '8', + '۹': '9', + '۰': '0' + }; + + hooks.defineLocale('fa', { + months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), + monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), + weekdays : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), + weekdaysShort : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), + weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + meridiemParse: /قبل از ظهر|بعد از ظهر/, + isPM: function (input) { + return /بعد از ظهر/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'قبل از ظهر'; + } else { + return 'بعد از ظهر'; + } + }, + calendar : { + sameDay : '[امروز ساعت] LT', + nextDay : '[فردا ساعت] LT', + nextWeek : 'dddd [ساعت] LT', + lastDay : '[دیروز ساعت] LT', + lastWeek : 'dddd [پیش] [ساعت] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'در %s', + past : '%s پیش', + s : 'چند ثانیه', + ss : 'ثانیه d%', + m : 'یک دقیقه', + mm : '%d دقیقه', + h : 'یک ساعت', + hh : '%d ساعت', + d : 'یک روز', + dd : '%d روز', + M : 'یک ماه', + MM : '%d ماه', + y : 'یک سال', + yy : '%d سال' + }, + preparse: function (string) { + return string.replace(/[۰-۹]/g, function (match) { + return numberMap$4[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$5[match]; + }).replace(/,/g, '،'); + }, + dayOfMonthOrdinalParse: /\d{1,2}م/, + ordinal : '%dم', + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '), + numbersFuture = [ + 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden', + numbersPast[7], numbersPast[8], numbersPast[9] + ]; + function translate$2(number, withoutSuffix, key, isFuture) { + var result = ''; + switch (key) { + case 's': + return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; + case 'ss': + return isFuture ? 'sekunnin' : 'sekuntia'; + case 'm': + return isFuture ? 'minuutin' : 'minuutti'; + case 'mm': + result = isFuture ? 'minuutin' : 'minuuttia'; + break; + case 'h': + return isFuture ? 'tunnin' : 'tunti'; + case 'hh': + result = isFuture ? 'tunnin' : 'tuntia'; + break; + case 'd': + return isFuture ? 'päivän' : 'päivä'; + case 'dd': + result = isFuture ? 'päivän' : 'päivää'; + break; + case 'M': + return isFuture ? 'kuukauden' : 'kuukausi'; + case 'MM': + result = isFuture ? 'kuukauden' : 'kuukautta'; + break; + case 'y': + return isFuture ? 'vuoden' : 'vuosi'; + case 'yy': + result = isFuture ? 'vuoden' : 'vuotta'; + break; + } + result = verbalNumber(number, isFuture) + ' ' + result; + return result; + } + function verbalNumber(number, isFuture) { + return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number; + } + + hooks.defineLocale('fi', { + months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'), + monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'), + weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'), + weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'), + weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD.MM.YYYY', + LL : 'Do MMMM[ta] YYYY', + LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm', + LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm', + l : 'D.M.YYYY', + ll : 'Do MMM YYYY', + lll : 'Do MMM YYYY, [klo] HH.mm', + llll : 'ddd, Do MMM YYYY, [klo] HH.mm' + }, + calendar : { + sameDay : '[tänään] [klo] LT', + nextDay : '[huomenna] [klo] LT', + nextWeek : 'dddd [klo] LT', + lastDay : '[eilen] [klo] LT', + lastWeek : '[viime] dddd[na] [klo] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s päästä', + past : '%s sitten', + s : translate$2, + ss : translate$2, + m : translate$2, + mm : translate$2, + h : translate$2, + hh : translate$2, + d : translate$2, + dd : translate$2, + M : translate$2, + MM : translate$2, + y : translate$2, + yy : translate$2 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('fo', { + months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), + weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'), + weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'), + weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D. MMMM, YYYY HH:mm' + }, + calendar : { + sameDay : '[Í dag kl.] LT', + nextDay : '[Í morgin kl.] LT', + nextWeek : 'dddd [kl.] LT', + lastDay : '[Í gjár kl.] LT', + lastWeek : '[síðstu] dddd [kl] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'um %s', + past : '%s síðani', + s : 'fá sekund', + ss : '%d sekundir', + m : 'ein minuttur', + mm : '%d minuttir', + h : 'ein tími', + hh : '%d tímar', + d : 'ein dagur', + dd : '%d dagar', + M : 'ein mánaður', + MM : '%d mánaðir', + y : 'eitt ár', + yy : '%d ár' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('fr-ca', { + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + monthsParseExact : true, + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Aujourd’hui à] LT', + nextDay : '[Demain à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[Hier à] LT', + lastWeek : 'dddd [dernier à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dans %s', + past : 'il y a %s', + s : 'quelques secondes', + ss : '%d secondes', + m : 'une minute', + mm : '%d minutes', + h : 'une heure', + hh : '%d heures', + d : 'un jour', + dd : '%d jours', + M : 'un mois', + MM : '%d mois', + y : 'un an', + yy : '%d ans' + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal : function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('fr-ch', { + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + monthsParseExact : true, + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Aujourd’hui à] LT', + nextDay : '[Demain à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[Hier à] LT', + lastWeek : 'dddd [dernier à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dans %s', + past : 'il y a %s', + s : 'quelques secondes', + ss : '%d secondes', + m : 'une minute', + mm : '%d minutes', + h : 'une heure', + hh : '%d heures', + d : 'un jour', + dd : '%d jours', + M : 'un mois', + MM : '%d mois', + y : 'un an', + yy : '%d ans' + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal : function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('fr', { + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + monthsParseExact : true, + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Aujourd’hui à] LT', + nextDay : '[Demain à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[Hier à] LT', + lastWeek : 'dddd [dernier à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dans %s', + past : 'il y a %s', + s : 'quelques secondes', + ss : '%d secondes', + m : 'une minute', + mm : '%d minutes', + h : 'une heure', + hh : '%d heures', + d : 'un jour', + dd : '%d jours', + M : 'un mois', + MM : '%d mois', + y : 'un an', + yy : '%d ans' + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|)/, + ordinal : function (number, period) { + switch (period) { + // TODO: Return 'e' when day of month > 1. Move this case inside + // block for masculine words below. + // See https://github.com/moment/moment/issues/3375 + case 'D': + return number + (number === 1 ? 'er' : ''); + + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'), + monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'); + + hooks.defineLocale('fy', { + months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortWithDots; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots[m.month()]; + } else { + return monthsShortWithDots[m.month()]; + } + }, + monthsParseExact : true, + weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'), + weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'), + weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD-MM-YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[hjoed om] LT', + nextDay: '[moarn om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[juster om] LT', + lastWeek: '[ôfrûne] dddd [om] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'oer %s', + past : '%s lyn', + s : 'in pear sekonden', + ss : '%d sekonden', + m : 'ien minút', + mm : '%d minuten', + h : 'ien oere', + hh : '%d oeren', + d : 'ien dei', + dd : '%d dagen', + M : 'ien moanne', + MM : '%d moannen', + y : 'ien jier', + yy : '%d jierren' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + + var months$5 = [ + 'Eanáir', 'Feabhra', 'Márta', 'Aibreán', 'Bealtaine', 'Méitheamh', 'Iúil', 'Lúnasa', 'Meán Fómhair', 'Deaireadh Fómhair', 'Samhain', 'Nollaig' + ]; + + var monthsShort$4 = ['Eaná', 'Feab', 'Márt', 'Aibr', 'Beal', 'Méit', 'Iúil', 'Lúna', 'Meán', 'Deai', 'Samh', 'Noll']; + + var weekdays$1 = ['Dé Domhnaigh', 'Dé Luain', 'Dé Máirt', 'Dé Céadaoin', 'Déardaoin', 'Dé hAoine', 'Dé Satharn']; + + var weekdaysShort = ['Dom', 'Lua', 'Mái', 'Céa', 'Déa', 'hAo', 'Sat']; + + var weekdaysMin = ['Do', 'Lu', 'Má', 'Ce', 'Dé', 'hA', 'Sa']; + + hooks.defineLocale('ga', { + months: months$5, + monthsShort: monthsShort$4, + monthsParseExact: true, + weekdays: weekdays$1, + weekdaysShort: weekdaysShort, + weekdaysMin: weekdaysMin, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[Inniu ag] LT', + nextDay: '[Amárach ag] LT', + nextWeek: 'dddd [ag] LT', + lastDay: '[Inné aig] LT', + lastWeek: 'dddd [seo caite] [ag] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'i %s', + past: '%s ó shin', + s: 'cúpla soicind', + ss: '%d soicind', + m: 'nóiméad', + mm: '%d nóiméad', + h: 'uair an chloig', + hh: '%d uair an chloig', + d: 'lá', + dd: '%d lá', + M: 'mí', + MM: '%d mí', + y: 'bliain', + yy: '%d bliain' + }, + dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, + ordinal: function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var months$6 = [ + 'Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd' + ]; + + var monthsShort$5 = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh']; + + var weekdays$2 = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne']; + + var weekdaysShort$1 = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis']; + + var weekdaysMin$1 = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa']; + + hooks.defineLocale('gd', { + months : months$6, + monthsShort : monthsShort$5, + monthsParseExact : true, + weekdays : weekdays$2, + weekdaysShort : weekdaysShort$1, + weekdaysMin : weekdaysMin$1, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[An-diugh aig] LT', + nextDay : '[A-màireach aig] LT', + nextWeek : 'dddd [aig] LT', + lastDay : '[An-dè aig] LT', + lastWeek : 'dddd [seo chaidh] [aig] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ann an %s', + past : 'bho chionn %s', + s : 'beagan diogan', + ss : '%d diogan', + m : 'mionaid', + mm : '%d mionaidean', + h : 'uair', + hh : '%d uairean', + d : 'latha', + dd : '%d latha', + M : 'mìos', + MM : '%d mìosan', + y : 'bliadhna', + yy : '%d bliadhna' + }, + dayOfMonthOrdinalParse : /\d{1,2}(d|na|mh)/, + ordinal : function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('gl', { + months : 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'), + monthsShort : 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mé_xo_ve_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY H:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm' + }, + calendar : { + sameDay : function () { + return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; + }, + nextDay : function () { + return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; + }, + nextWeek : function () { + return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; + }, + lastDay : function () { + return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT'; + }, + lastWeek : function () { + return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : function (str) { + if (str.indexOf('un') === 0) { + return 'n' + str; + } + return 'en ' + str; + }, + past : 'hai %s', + s : 'uns segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'unha hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un ano', + yy : '%d anos' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function processRelativeTime$4(number, withoutSuffix, key, isFuture) { + var format = { + 's': ['thodde secondanim', 'thodde second'], + 'ss': [number + ' secondanim', number + ' second'], + 'm': ['eka mintan', 'ek minute'], + 'mm': [number + ' mintanim', number + ' mintam'], + 'h': ['eka voran', 'ek vor'], + 'hh': [number + ' voranim', number + ' voram'], + 'd': ['eka disan', 'ek dis'], + 'dd': [number + ' disanim', number + ' dis'], + 'M': ['eka mhoinean', 'ek mhoino'], + 'MM': [number + ' mhoineanim', number + ' mhoine'], + 'y': ['eka vorsan', 'ek voros'], + 'yy': [number + ' vorsanim', number + ' vorsam'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('gom-latn', { + months : 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'), + monthsShort : 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\'var'.split('_'), + weekdaysShort : 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'), + weekdaysMin : 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'A h:mm [vazta]', + LTS : 'A h:mm:ss [vazta]', + L : 'DD-MM-YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY A h:mm [vazta]', + LLLL : 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]', + llll: 'ddd, D MMM YYYY, A h:mm [vazta]' + }, + calendar : { + sameDay: '[Aiz] LT', + nextDay: '[Faleam] LT', + nextWeek: '[Ieta to] dddd[,] LT', + lastDay: '[Kal] LT', + lastWeek: '[Fatlo] dddd[,] LT', + sameElse: 'L' + }, + relativeTime : { + future : '%s', + past : '%s adim', + s : processRelativeTime$4, + ss : processRelativeTime$4, + m : processRelativeTime$4, + mm : processRelativeTime$4, + h : processRelativeTime$4, + hh : processRelativeTime$4, + d : processRelativeTime$4, + dd : processRelativeTime$4, + M : processRelativeTime$4, + MM : processRelativeTime$4, + y : processRelativeTime$4, + yy : processRelativeTime$4 + }, + dayOfMonthOrdinalParse : /\d{1,2}(er)/, + ordinal : function (number, period) { + switch (period) { + // the ordinal 'er' only applies to day of the month + case 'D': + return number + 'er'; + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + case 'w': + case 'W': + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + }, + meridiemParse: /rati|sokalli|donparam|sanje/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'rati') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'sokalli') { + return hour; + } else if (meridiem === 'donparam') { + return hour > 12 ? hour : hour + 12; + } else if (meridiem === 'sanje') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'rati'; + } else if (hour < 12) { + return 'sokalli'; + } else if (hour < 16) { + return 'donparam'; + } else if (hour < 20) { + return 'sanje'; + } else { + return 'rati'; + } + } + }); + + //! moment.js locale configuration + + var symbolMap$6 = { + '1': '૧', + '2': '૨', + '3': '૩', + '4': '૪', + '5': '૫', + '6': '૬', + '7': '૭', + '8': '૮', + '9': '૯', + '0': '૦' + }, + numberMap$5 = { + '૧': '1', + '૨': '2', + '૩': '3', + '૪': '4', + '૫': '5', + '૬': '6', + '૭': '7', + '૮': '8', + '૯': '9', + '૦': '0' + }; + + hooks.defineLocale('gu', { + months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'), + monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'), + monthsParseExact: true, + weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split('_'), + weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'), + weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'), + longDateFormat: { + LT: 'A h:mm વાગ્યે', + LTS: 'A h:mm:ss વાગ્યે', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm વાગ્યે', + LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે' + }, + calendar: { + sameDay: '[આજ] LT', + nextDay: '[કાલે] LT', + nextWeek: 'dddd, LT', + lastDay: '[ગઇકાલે] LT', + lastWeek: '[પાછલા] dddd, LT', + sameElse: 'L' + }, + relativeTime: { + future: '%s મા', + past: '%s પેહલા', + s: 'અમુક પળો', + ss: '%d સેકંડ', + m: 'એક મિનિટ', + mm: '%d મિનિટ', + h: 'એક કલાક', + hh: '%d કલાક', + d: 'એક દિવસ', + dd: '%d દિવસ', + M: 'એક મહિનો', + MM: '%d મહિનો', + y: 'એક વર્ષ', + yy: '%d વર્ષ' + }, + preparse: function (string) { + return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) { + return numberMap$5[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$6[match]; + }); + }, + // Gujarati notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati. + meridiemParse: /રાત|બપોર|સવાર|સાંજ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'રાત') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'સવાર') { + return hour; + } else if (meridiem === 'બપોર') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'સાંજ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'રાત'; + } else if (hour < 10) { + return 'સવાર'; + } else if (hour < 17) { + return 'બપોર'; + } else if (hour < 20) { + return 'સાંજ'; + } else { + return 'રાત'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('he', { + months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'), + monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'), + weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'), + weekdaysShort : 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'), + weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [ב]MMMM YYYY', + LLL : 'D [ב]MMMM YYYY HH:mm', + LLLL : 'dddd, D [ב]MMMM YYYY HH:mm', + l : 'D/M/YYYY', + ll : 'D MMM YYYY', + lll : 'D MMM YYYY HH:mm', + llll : 'ddd, D MMM YYYY HH:mm' + }, + calendar : { + sameDay : '[היום ב־]LT', + nextDay : '[מחר ב־]LT', + nextWeek : 'dddd [בשעה] LT', + lastDay : '[אתמול ב־]LT', + lastWeek : '[ביום] dddd [האחרון בשעה] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'בעוד %s', + past : 'לפני %s', + s : 'מספר שניות', + ss : '%d שניות', + m : 'דקה', + mm : '%d דקות', + h : 'שעה', + hh : function (number) { + if (number === 2) { + return 'שעתיים'; + } + return number + ' שעות'; + }, + d : 'יום', + dd : function (number) { + if (number === 2) { + return 'יומיים'; + } + return number + ' ימים'; + }, + M : 'חודש', + MM : function (number) { + if (number === 2) { + return 'חודשיים'; + } + return number + ' חודשים'; + }, + y : 'שנה', + yy : function (number) { + if (number === 2) { + return 'שנתיים'; + } else if (number % 10 === 0 && number !== 10) { + return number + ' שנה'; + } + return number + ' שנים'; + } + }, + meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i, + isPM : function (input) { + return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 5) { + return 'לפנות בוקר'; + } else if (hour < 10) { + return 'בבוקר'; + } else if (hour < 12) { + return isLower ? 'לפנה"צ' : 'לפני הצהריים'; + } else if (hour < 18) { + return isLower ? 'אחה"צ' : 'אחרי הצהריים'; + } else { + return 'בערב'; + } + } + }); + + //! moment.js locale configuration + + var symbolMap$7 = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०' + }, + numberMap$6 = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0' + }; + + hooks.defineLocale('hi', { + months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'), + monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'), + monthsParseExact: true, + weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat : { + LT : 'A h:mm बजे', + LTS : 'A h:mm:ss बजे', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm बजे', + LLLL : 'dddd, D MMMM YYYY, A h:mm बजे' + }, + calendar : { + sameDay : '[आज] LT', + nextDay : '[कल] LT', + nextWeek : 'dddd, LT', + lastDay : '[कल] LT', + lastWeek : '[पिछले] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s में', + past : '%s पहले', + s : 'कुछ ही क्षण', + ss : '%d सेकंड', + m : 'एक मिनट', + mm : '%d मिनट', + h : 'एक घंटा', + hh : '%d घंटे', + d : 'एक दिन', + dd : '%d दिन', + M : 'एक महीने', + MM : '%d महीने', + y : 'एक वर्ष', + yy : '%d वर्ष' + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$6[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$7[match]; + }); + }, + // Hindi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi. + meridiemParse: /रात|सुबह|दोपहर|शाम/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'रात') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सुबह') { + return hour; + } else if (meridiem === 'दोपहर') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'शाम') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'रात'; + } else if (hour < 10) { + return 'सुबह'; + } else if (hour < 17) { + return 'दोपहर'; + } else if (hour < 20) { + return 'शाम'; + } else { + return 'रात'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function translate$3(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } + } + + hooks.defineLocale('hr', { + months : { + format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'), + standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_') + }, + monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'), + monthsParseExact: true, + weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[danas u] LT', + nextDay : '[sutra u] LT', + nextWeek : function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[jučer u] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'prije %s', + s : 'par sekundi', + ss : translate$3, + m : translate$3, + mm : translate$3, + h : translate$3, + hh : translate$3, + d : 'dan', + dd : translate$3, + M : 'mjesec', + MM : translate$3, + y : 'godinu', + yy : translate$3 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' '); + function translate$4(number, withoutSuffix, key, isFuture) { + var num = number; + switch (key) { + case 's': + return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce'; + case 'ss': + return num + (isFuture || withoutSuffix) ? ' másodperc' : ' másodperce'; + case 'm': + return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'mm': + return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'h': + return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'hh': + return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'd': + return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'dd': + return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'M': + return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'MM': + return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'y': + return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); + case 'yy': + return num + (isFuture || withoutSuffix ? ' év' : ' éve'); + } + return ''; + } + function week(isFuture) { + return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]'; + } + + hooks.defineLocale('hu', { + months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'), + monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'), + weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'), + weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), + weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'YYYY.MM.DD.', + LL : 'YYYY. MMMM D.', + LLL : 'YYYY. MMMM D. H:mm', + LLLL : 'YYYY. MMMM D., dddd H:mm' + }, + meridiemParse: /de|du/i, + isPM: function (input) { + return input.charAt(1).toLowerCase() === 'u'; + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 12) { + return isLower === true ? 'de' : 'DE'; + } else { + return isLower === true ? 'du' : 'DU'; + } + }, + calendar : { + sameDay : '[ma] LT[-kor]', + nextDay : '[holnap] LT[-kor]', + nextWeek : function () { + return week.call(this, true); + }, + lastDay : '[tegnap] LT[-kor]', + lastWeek : function () { + return week.call(this, false); + }, + sameElse : 'L' + }, + relativeTime : { + future : '%s múlva', + past : '%s', + s : translate$4, + ss : translate$4, + m : translate$4, + mm : translate$4, + h : translate$4, + hh : translate$4, + d : translate$4, + dd : translate$4, + M : translate$4, + MM : translate$4, + y : translate$4, + yy : translate$4 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('hy-am', { + months : { + format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'), + standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_') + }, + monthsShort : 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'), + weekdays : 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'), + weekdaysShort : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY թ.', + LLL : 'D MMMM YYYY թ., HH:mm', + LLLL : 'dddd, D MMMM YYYY թ., HH:mm' + }, + calendar : { + sameDay: '[այսօր] LT', + nextDay: '[վաղը] LT', + lastDay: '[երեկ] LT', + nextWeek: function () { + return 'dddd [օրը ժամը] LT'; + }, + lastWeek: function () { + return '[անցած] dddd [օրը ժամը] LT'; + }, + sameElse: 'L' + }, + relativeTime : { + future : '%s հետո', + past : '%s առաջ', + s : 'մի քանի վայրկյան', + ss : '%d վայրկյան', + m : 'րոպե', + mm : '%d րոպե', + h : 'ժամ', + hh : '%d ժամ', + d : 'օր', + dd : '%d օր', + M : 'ամիս', + MM : '%d ամիս', + y : 'տարի', + yy : '%d տարի' + }, + meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/, + isPM: function (input) { + return /^(ցերեկվա|երեկոյան)$/.test(input); + }, + meridiem : function (hour) { + if (hour < 4) { + return 'գիշերվա'; + } else if (hour < 12) { + return 'առավոտվա'; + } else if (hour < 17) { + return 'ցերեկվա'; + } else { + return 'երեկոյան'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/, + ordinal: function (number, period) { + switch (period) { + case 'DDD': + case 'w': + case 'W': + case 'DDDo': + if (number === 1) { + return number + '-ին'; + } + return number + '-րդ'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('id', { + months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'), + weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), + weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), + weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /pagi|siang|sore|malam/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'siang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sore' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'siang'; + } else if (hours < 19) { + return 'sore'; + } else { + return 'malam'; + } + }, + calendar : { + sameDay : '[Hari ini pukul] LT', + nextDay : '[Besok pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kemarin pukul] LT', + lastWeek : 'dddd [lalu pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dalam %s', + past : '%s yang lalu', + s : 'beberapa detik', + ss : '%d detik', + m : 'semenit', + mm : '%d menit', + h : 'sejam', + hh : '%d jam', + d : 'sehari', + dd : '%d hari', + M : 'sebulan', + MM : '%d bulan', + y : 'setahun', + yy : '%d tahun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function plural$2(n) { + if (n % 100 === 11) { + return true; + } else if (n % 10 === 1) { + return false; + } + return true; + } + function translate$5(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum'; + case 'ss': + if (plural$2(number)) { + return result + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum'); + } + return result + 'sekúnda'; + case 'm': + return withoutSuffix ? 'mínúta' : 'mínútu'; + case 'mm': + if (plural$2(number)) { + return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum'); + } else if (withoutSuffix) { + return result + 'mínúta'; + } + return result + 'mínútu'; + case 'hh': + if (plural$2(number)) { + return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum'); + } + return result + 'klukkustund'; + case 'd': + if (withoutSuffix) { + return 'dagur'; + } + return isFuture ? 'dag' : 'degi'; + case 'dd': + if (plural$2(number)) { + if (withoutSuffix) { + return result + 'dagar'; + } + return result + (isFuture ? 'daga' : 'dögum'); + } else if (withoutSuffix) { + return result + 'dagur'; + } + return result + (isFuture ? 'dag' : 'degi'); + case 'M': + if (withoutSuffix) { + return 'mánuður'; + } + return isFuture ? 'mánuð' : 'mánuði'; + case 'MM': + if (plural$2(number)) { + if (withoutSuffix) { + return result + 'mánuðir'; + } + return result + (isFuture ? 'mánuði' : 'mánuðum'); + } else if (withoutSuffix) { + return result + 'mánuður'; + } + return result + (isFuture ? 'mánuð' : 'mánuði'); + case 'y': + return withoutSuffix || isFuture ? 'ár' : 'ári'; + case 'yy': + if (plural$2(number)) { + return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); + } + return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); + } + } + + hooks.defineLocale('is', { + months : 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'), + monthsShort : 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'), + weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'), + weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'), + weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY [kl.] H:mm', + LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm' + }, + calendar : { + sameDay : '[í dag kl.] LT', + nextDay : '[á morgun kl.] LT', + nextWeek : 'dddd [kl.] LT', + lastDay : '[í gær kl.] LT', + lastWeek : '[síðasta] dddd [kl.] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'eftir %s', + past : 'fyrir %s síðan', + s : translate$5, + ss : translate$5, + m : translate$5, + mm : translate$5, + h : 'klukkustund', + hh : translate$5, + d : translate$5, + dd : translate$5, + M : translate$5, + MM : translate$5, + y : translate$5, + yy : translate$5 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('it-ch', { + months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), + monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'), + weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Oggi alle] LT', + nextDay: '[Domani alle] LT', + nextWeek: 'dddd [alle] LT', + lastDay: '[Ieri alle] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[la scorsa] dddd [alle] LT'; + default: + return '[lo scorso] dddd [alle] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : function (s) { + return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s; + }, + past : '%s fa', + s : 'alcuni secondi', + ss : '%d secondi', + m : 'un minuto', + mm : '%d minuti', + h : 'un\'ora', + hh : '%d ore', + d : 'un giorno', + dd : '%d giorni', + M : 'un mese', + MM : '%d mesi', + y : 'un anno', + yy : '%d anni' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('it', { + months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), + monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'), + weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Oggi alle] LT', + nextDay: '[Domani alle] LT', + nextWeek: 'dddd [alle] LT', + lastDay: '[Ieri alle] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[la scorsa] dddd [alle] LT'; + default: + return '[lo scorso] dddd [alle] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : function (s) { + return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s; + }, + past : '%s fa', + s : 'alcuni secondi', + ss : '%d secondi', + m : 'un minuto', + mm : '%d minuti', + h : 'un\'ora', + hh : '%d ore', + d : 'un giorno', + dd : '%d giorni', + M : 'un mese', + MM : '%d mesi', + y : 'un anno', + yy : '%d anni' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('ja', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'), + weekdaysShort : '日_月_火_水_木_金_土'.split('_'), + weekdaysMin : '日_月_火_水_木_金_土'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日 HH:mm', + LLLL : 'YYYY年M月D日 dddd HH:mm', + l : 'YYYY/MM/DD', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日(ddd) HH:mm' + }, + meridiemParse: /午前|午後/i, + isPM : function (input) { + return input === '午後'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return '午前'; + } else { + return '午後'; + } + }, + calendar : { + sameDay : '[今日] LT', + nextDay : '[明日] LT', + nextWeek : function (now) { + if (now.week() < this.week()) { + return '[来週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + lastDay : '[昨日] LT', + lastWeek : function (now) { + if (this.week() < now.week()) { + return '[先週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + sameElse : 'L' + }, + dayOfMonthOrdinalParse : /\d{1,2}日/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + default: + return number; + } + }, + relativeTime : { + future : '%s後', + past : '%s前', + s : '数秒', + ss : '%d秒', + m : '1分', + mm : '%d分', + h : '1時間', + hh : '%d時間', + d : '1日', + dd : '%d日', + M : '1ヶ月', + MM : '%dヶ月', + y : '1年', + yy : '%d年' + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('jv', { + months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), + weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), + weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), + weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /enjing|siyang|sonten|ndalu/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'enjing') { + return hour; + } else if (meridiem === 'siyang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sonten' || meridiem === 'ndalu') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'enjing'; + } else if (hours < 15) { + return 'siyang'; + } else if (hours < 19) { + return 'sonten'; + } else { + return 'ndalu'; + } + }, + calendar : { + sameDay : '[Dinten puniko pukul] LT', + nextDay : '[Mbenjang pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kala wingi pukul] LT', + lastWeek : 'dddd [kepengker pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'wonten ing %s', + past : '%s ingkang kepengker', + s : 'sawetawis detik', + ss : '%d detik', + m : 'setunggal menit', + mm : '%d menit', + h : 'setunggal jam', + hh : '%d jam', + d : 'sedinten', + dd : '%d dinten', + M : 'sewulan', + MM : '%d wulan', + y : 'setaun', + yy : '%d taun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('ka', { + months : { + standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'), + format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_') + }, + monthsShort : 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'), + weekdays : { + standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'), + format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'), + isFormat: /(წინა|შემდეგ)/ + }, + weekdaysShort : 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'), + weekdaysMin : 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[დღეს] LT[-ზე]', + nextDay : '[ხვალ] LT[-ზე]', + lastDay : '[გუშინ] LT[-ზე]', + nextWeek : '[შემდეგ] dddd LT[-ზე]', + lastWeek : '[წინა] dddd LT-ზე', + sameElse : 'L' + }, + relativeTime : { + future : function (s) { + return (/(წამი|წუთი|საათი|წელი)/).test(s) ? + s.replace(/ი$/, 'ში') : + s + 'ში'; + }, + past : function (s) { + if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) { + return s.replace(/(ი|ე)$/, 'ის წინ'); + } + if ((/წელი/).test(s)) { + return s.replace(/წელი$/, 'წლის წინ'); + } + }, + s : 'რამდენიმე წამი', + ss : '%d წამი', + m : 'წუთი', + mm : '%d წუთი', + h : 'საათი', + hh : '%d საათი', + d : 'დღე', + dd : '%d დღე', + M : 'თვე', + MM : '%d თვე', + y : 'წელი', + yy : '%d წელი' + }, + dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/, + ordinal : function (number) { + if (number === 0) { + return number; + } + if (number === 1) { + return number + '-ლი'; + } + if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) { + return 'მე-' + number; + } + return number + '-ე'; + }, + week : { + dow : 1, + doy : 7 + } + }); + + //! moment.js locale configuration + + var suffixes$1 = { + 0: '-ші', + 1: '-ші', + 2: '-ші', + 3: '-ші', + 4: '-ші', + 5: '-ші', + 6: '-шы', + 7: '-ші', + 8: '-ші', + 9: '-шы', + 10: '-шы', + 20: '-шы', + 30: '-шы', + 40: '-шы', + 50: '-ші', + 60: '-шы', + 70: '-ші', + 80: '-ші', + 90: '-шы', + 100: '-ші' + }; + + hooks.defineLocale('kk', { + months : 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'), + monthsShort : 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'), + weekdays : 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'), + weekdaysShort : 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'), + weekdaysMin : 'жк_дй_сй_ср_бй_жм_сн'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Бүгін сағат] LT', + nextDay : '[Ертең сағат] LT', + nextWeek : 'dddd [сағат] LT', + lastDay : '[Кеше сағат] LT', + lastWeek : '[Өткен аптаның] dddd [сағат] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ішінде', + past : '%s бұрын', + s : 'бірнеше секунд', + ss : '%d секунд', + m : 'бір минут', + mm : '%d минут', + h : 'бір сағат', + hh : '%d сағат', + d : 'бір күн', + dd : '%d күн', + M : 'бір ай', + MM : '%d ай', + y : 'бір жыл', + yy : '%d жыл' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/, + ordinal : function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$1[number] || suffixes$1[a] || suffixes$1[b]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$8 = { + '1': '១', + '2': '២', + '3': '៣', + '4': '៤', + '5': '៥', + '6': '៦', + '7': '៧', + '8': '៨', + '9': '៩', + '0': '០' + }, numberMap$7 = { + '១': '1', + '២': '2', + '៣': '3', + '៤': '4', + '៥': '5', + '៦': '6', + '៧': '7', + '៨': '8', + '៩': '9', + '០': '0' + }; + + hooks.defineLocale('km', { + months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), + weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + meridiemParse: /ព្រឹក|ល្ងាច/, + isPM: function (input) { + return input === 'ល្ងាច'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ព្រឹក'; + } else { + return 'ល្ងាច'; + } + }, + calendar: { + sameDay: '[ថ្ងៃនេះ ម៉ោង] LT', + nextDay: '[ស្អែក ម៉ោង] LT', + nextWeek: 'dddd [ម៉ោង] LT', + lastDay: '[ម្សិលមិញ ម៉ោង] LT', + lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', + sameElse: 'L' + }, + relativeTime: { + future: '%sទៀត', + past: '%sមុន', + s: 'ប៉ុន្មានវិនាទី', + ss: '%d វិនាទី', + m: 'មួយនាទី', + mm: '%d នាទី', + h: 'មួយម៉ោង', + hh: '%d ម៉ោង', + d: 'មួយថ្ងៃ', + dd: '%d ថ្ងៃ', + M: 'មួយខែ', + MM: '%d ខែ', + y: 'មួយឆ្នាំ', + yy: '%d ឆ្នាំ' + }, + dayOfMonthOrdinalParse : /ទី\d{1,2}/, + ordinal : 'ទី%d', + preparse: function (string) { + return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) { + return numberMap$7[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$8[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$9 = { + '1': '೧', + '2': '೨', + '3': '೩', + '4': '೪', + '5': '೫', + '6': '೬', + '7': '೭', + '8': '೮', + '9': '೯', + '0': '೦' + }, + numberMap$8 = { + '೧': '1', + '೨': '2', + '೩': '3', + '೪': '4', + '೫': '5', + '೬': '6', + '೭': '7', + '೮': '8', + '೯': '9', + '೦': '0' + }; + + hooks.defineLocale('kn', { + months : 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'), + monthsShort : 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split('_'), + monthsParseExact: true, + weekdays : 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'), + weekdaysShort : 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'), + weekdaysMin : 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm', + LLLL : 'dddd, D MMMM YYYY, A h:mm' + }, + calendar : { + sameDay : '[ಇಂದು] LT', + nextDay : '[ನಾಳೆ] LT', + nextWeek : 'dddd, LT', + lastDay : '[ನಿನ್ನೆ] LT', + lastWeek : '[ಕೊನೆಯ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ನಂತರ', + past : '%s ಹಿಂದೆ', + s : 'ಕೆಲವು ಕ್ಷಣಗಳು', + ss : '%d ಸೆಕೆಂಡುಗಳು', + m : 'ಒಂದು ನಿಮಿಷ', + mm : '%d ನಿಮಿಷ', + h : 'ಒಂದು ಗಂಟೆ', + hh : '%d ಗಂಟೆ', + d : 'ಒಂದು ದಿನ', + dd : '%d ದಿನ', + M : 'ಒಂದು ತಿಂಗಳು', + MM : '%d ತಿಂಗಳು', + y : 'ಒಂದು ವರ್ಷ', + yy : '%d ವರ್ಷ' + }, + preparse: function (string) { + return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) { + return numberMap$8[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$9[match]; + }); + }, + meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ರಾತ್ರಿ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') { + return hour; + } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ಸಂಜೆ') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ರಾತ್ರಿ'; + } else if (hour < 10) { + return 'ಬೆಳಿಗ್ಗೆ'; + } else if (hour < 17) { + return 'ಮಧ್ಯಾಹ್ನ'; + } else if (hour < 20) { + return 'ಸಂಜೆ'; + } else { + return 'ರಾತ್ರಿ'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/, + ordinal : function (number) { + return number + 'ನೇ'; + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('ko', { + months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), + monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), + weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'), + weekdaysShort : '일_월_화_수_목_금_토'.split('_'), + weekdaysMin : '일_월_화_수_목_금_토'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'YYYY.MM.DD.', + LL : 'YYYY년 MMMM D일', + LLL : 'YYYY년 MMMM D일 A h:mm', + LLLL : 'YYYY년 MMMM D일 dddd A h:mm', + l : 'YYYY.MM.DD.', + ll : 'YYYY년 MMMM D일', + lll : 'YYYY년 MMMM D일 A h:mm', + llll : 'YYYY년 MMMM D일 dddd A h:mm' + }, + calendar : { + sameDay : '오늘 LT', + nextDay : '내일 LT', + nextWeek : 'dddd LT', + lastDay : '어제 LT', + lastWeek : '지난주 dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s 후', + past : '%s 전', + s : '몇 초', + ss : '%d초', + m : '1분', + mm : '%d분', + h : '한 시간', + hh : '%d시간', + d : '하루', + dd : '%d일', + M : '한 달', + MM : '%d달', + y : '일 년', + yy : '%d년' + }, + dayOfMonthOrdinalParse : /\d{1,2}(일|월|주)/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '일'; + case 'M': + return number + '월'; + case 'w': + case 'W': + return number + '주'; + default: + return number; + } + }, + meridiemParse : /오전|오후/, + isPM : function (token) { + return token === '오후'; + }, + meridiem : function (hour, minute, isUpper) { + return hour < 12 ? '오전' : '오후'; + } + }); + + //! moment.js locale configuration + + var symbolMap$a = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠' + }, numberMap$9 = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0' + }, + months$7 = [ + 'کانونی دووەم', + 'شوبات', + 'ئازار', + 'نیسان', + 'ئایار', + 'حوزەیران', + 'تەمموز', + 'ئاب', + 'ئەیلوول', + 'تشرینی یەكەم', + 'تشرینی دووەم', + 'كانونی یەکەم' + ]; + + + hooks.defineLocale('ku', { + months : months$7, + monthsShort : months$7, + weekdays : 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split('_'), + weekdaysShort : 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'), + weekdaysMin : 'ی_د_س_چ_پ_ه_ش'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + meridiemParse: /ئێواره‌|به‌یانی/, + isPM: function (input) { + return /ئێواره‌/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'به‌یانی'; + } else { + return 'ئێواره‌'; + } + }, + calendar : { + sameDay : '[ئه‌مرۆ كاتژمێر] LT', + nextDay : '[به‌یانی كاتژمێر] LT', + nextWeek : 'dddd [كاتژمێر] LT', + lastDay : '[دوێنێ كاتژمێر] LT', + lastWeek : 'dddd [كاتژمێر] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'له‌ %s', + past : '%s', + s : 'چه‌ند چركه‌یه‌ك', + ss : 'چركه‌ %d', + m : 'یه‌ك خوله‌ك', + mm : '%d خوله‌ك', + h : 'یه‌ك كاتژمێر', + hh : '%d كاتژمێر', + d : 'یه‌ك ڕۆژ', + dd : '%d ڕۆژ', + M : 'یه‌ك مانگ', + MM : '%d مانگ', + y : 'یه‌ك ساڵ', + yy : '%d ساڵ' + }, + preparse: function (string) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap$9[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$a[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var suffixes$2 = { + 0: '-чү', + 1: '-чи', + 2: '-чи', + 3: '-чү', + 4: '-чү', + 5: '-чи', + 6: '-чы', + 7: '-чи', + 8: '-чи', + 9: '-чу', + 10: '-чу', + 20: '-чы', + 30: '-чу', + 40: '-чы', + 50: '-чү', + 60: '-чы', + 70: '-чи', + 80: '-чи', + 90: '-чу', + 100: '-чү' + }; + + hooks.defineLocale('ky', { + months : 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'), + monthsShort : 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'), + weekdays : 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'), + weekdaysShort : 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'), + weekdaysMin : 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Бүгүн саат] LT', + nextDay : '[Эртең саат] LT', + nextWeek : 'dddd [саат] LT', + lastDay : '[Кечээ саат] LT', + lastWeek : '[Өткөн аптанын] dddd [күнү] [саат] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ичинде', + past : '%s мурун', + s : 'бирнече секунд', + ss : '%d секунд', + m : 'бир мүнөт', + mm : '%d мүнөт', + h : 'бир саат', + hh : '%d саат', + d : 'бир күн', + dd : '%d күн', + M : 'бир ай', + MM : '%d ай', + y : 'бир жыл', + yy : '%d жыл' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/, + ordinal : function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$2[number] || suffixes$2[a] || suffixes$2[b]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function processRelativeTime$5(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eng Minutt', 'enger Minutt'], + 'h': ['eng Stonn', 'enger Stonn'], + 'd': ['een Dag', 'engem Dag'], + 'M': ['ee Mount', 'engem Mount'], + 'y': ['ee Joer', 'engem Joer'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + function processFutureTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'a ' + string; + } + return 'an ' + string; + } + function processPastTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'viru ' + string; + } + return 'virun ' + string; + } + /** + * Returns true if the word before the given number loses the '-n' ending. + * e.g. 'an 10 Deeg' but 'a 5 Deeg' + * + * @param number {integer} + * @returns {boolean} + */ + function eifelerRegelAppliesToNumber(number) { + number = parseInt(number, 10); + if (isNaN(number)) { + return false; + } + if (number < 0) { + // Negative Number --> always true + return true; + } else if (number < 10) { + // Only 1 digit + if (4 <= number && number <= 7) { + return true; + } + return false; + } else if (number < 100) { + // 2 digits + var lastDigit = number % 10, firstDigit = number / 10; + if (lastDigit === 0) { + return eifelerRegelAppliesToNumber(firstDigit); + } + return eifelerRegelAppliesToNumber(lastDigit); + } else if (number < 10000) { + // 3 or 4 digits --> recursively check first digit + while (number >= 10) { + number = number / 10; + } + return eifelerRegelAppliesToNumber(number); + } else { + // Anything larger than 4 digits: recursively check first n-3 digits + number = number / 1000; + return eifelerRegelAppliesToNumber(number); + } + } + + hooks.defineLocale('lb', { + months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'), + weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm [Auer]', + LTS: 'H:mm:ss [Auer]', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm [Auer]', + LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]' + }, + calendar: { + sameDay: '[Haut um] LT', + sameElse: 'L', + nextDay: '[Muer um] LT', + nextWeek: 'dddd [um] LT', + lastDay: '[Gëschter um] LT', + lastWeek: function () { + // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule + switch (this.day()) { + case 2: + case 4: + return '[Leschten] dddd [um] LT'; + default: + return '[Leschte] dddd [um] LT'; + } + } + }, + relativeTime : { + future : processFutureTime, + past : processPastTime, + s : 'e puer Sekonnen', + ss : '%d Sekonnen', + m : processRelativeTime$5, + mm : '%d Minutten', + h : processRelativeTime$5, + hh : '%d Stonnen', + d : processRelativeTime$5, + dd : '%d Deeg', + M : processRelativeTime$5, + MM : '%d Méint', + y : processRelativeTime$5, + yy : '%d Joer' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('lo', { + months : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), + monthsShort : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), + weekdays : 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysShort : 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysMin : 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'ວັນdddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/, + isPM: function (input) { + return input === 'ຕອນແລງ'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ຕອນເຊົ້າ'; + } else { + return 'ຕອນແລງ'; + } + }, + calendar : { + sameDay : '[ມື້ນີ້ເວລາ] LT', + nextDay : '[ມື້ອື່ນເວລາ] LT', + nextWeek : '[ວັນ]dddd[ໜ້າເວລາ] LT', + lastDay : '[ມື້ວານນີ້ເວລາ] LT', + lastWeek : '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ອີກ %s', + past : '%sຜ່ານມາ', + s : 'ບໍ່ເທົ່າໃດວິນາທີ', + ss : '%d ວິນາທີ' , + m : '1 ນາທີ', + mm : '%d ນາທີ', + h : '1 ຊົ່ວໂມງ', + hh : '%d ຊົ່ວໂມງ', + d : '1 ມື້', + dd : '%d ມື້', + M : '1 ເດືອນ', + MM : '%d ເດືອນ', + y : '1 ປີ', + yy : '%d ປີ' + }, + dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/, + ordinal : function (number) { + return 'ທີ່' + number; + } + }); + + //! moment.js locale configuration + + var units = { + 'ss' : 'sekundė_sekundžių_sekundes', + 'm' : 'minutė_minutės_minutę', + 'mm': 'minutės_minučių_minutes', + 'h' : 'valanda_valandos_valandą', + 'hh': 'valandos_valandų_valandas', + 'd' : 'diena_dienos_dieną', + 'dd': 'dienos_dienų_dienas', + 'M' : 'mėnuo_mėnesio_mėnesį', + 'MM': 'mėnesiai_mėnesių_mėnesius', + 'y' : 'metai_metų_metus', + 'yy': 'metai_metų_metus' + }; + function translateSeconds(number, withoutSuffix, key, isFuture) { + if (withoutSuffix) { + return 'kelios sekundės'; + } else { + return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; + } + } + function translateSingular(number, withoutSuffix, key, isFuture) { + return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]); + } + function special(number) { + return number % 10 === 0 || (number > 10 && number < 20); + } + function forms(key) { + return units[key].split('_'); + } + function translate$6(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + if (number === 1) { + return result + translateSingular(number, withoutSuffix, key[0], isFuture); + } else if (withoutSuffix) { + return result + (special(number) ? forms(key)[1] : forms(key)[0]); + } else { + if (isFuture) { + return result + forms(key)[1]; + } else { + return result + (special(number) ? forms(key)[1] : forms(key)[2]); + } + } + } + hooks.defineLocale('lt', { + months : { + format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'), + standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'), + isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/ + }, + monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), + weekdays : { + format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'), + standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'), + isFormat: /dddd HH:mm/ + }, + weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'), + weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'YYYY [m.] MMMM D [d.]', + LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', + l : 'YYYY-MM-DD', + ll : 'YYYY [m.] MMMM D [d.]', + lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]' + }, + calendar : { + sameDay : '[Šiandien] LT', + nextDay : '[Rytoj] LT', + nextWeek : 'dddd LT', + lastDay : '[Vakar] LT', + lastWeek : '[Praėjusį] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : 'po %s', + past : 'prieš %s', + s : translateSeconds, + ss : translate$6, + m : translateSingular, + mm : translate$6, + h : translateSingular, + hh : translate$6, + d : translateSingular, + dd : translate$6, + M : translateSingular, + MM : translate$6, + y : translateSingular, + yy : translate$6 + }, + dayOfMonthOrdinalParse: /\d{1,2}-oji/, + ordinal : function (number) { + return number + '-oji'; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var units$1 = { + 'ss': 'sekundes_sekundēm_sekunde_sekundes'.split('_'), + 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), + 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), + 'h': 'stundas_stundām_stunda_stundas'.split('_'), + 'hh': 'stundas_stundām_stunda_stundas'.split('_'), + 'd': 'dienas_dienām_diena_dienas'.split('_'), + 'dd': 'dienas_dienām_diena_dienas'.split('_'), + 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + 'y': 'gada_gadiem_gads_gadi'.split('_'), + 'yy': 'gada_gadiem_gads_gadi'.split('_') + }; + /** + * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. + */ + function format$1(forms, number, withoutSuffix) { + if (withoutSuffix) { + // E.g. "21 minūte", "3 minūtes". + return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3]; + } else { + // E.g. "21 minūtes" as in "pēc 21 minūtes". + // E.g. "3 minūtēm" as in "pēc 3 minūtēm". + return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1]; + } + } + function relativeTimeWithPlural$1(number, withoutSuffix, key) { + return number + ' ' + format$1(units$1[key], number, withoutSuffix); + } + function relativeTimeWithSingular(number, withoutSuffix, key) { + return format$1(units$1[key], number, withoutSuffix); + } + function relativeSeconds(number, withoutSuffix) { + return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm'; + } + + hooks.defineLocale('lv', { + months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'), + monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'), + weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'), + weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY.', + LL : 'YYYY. [gada] D. MMMM', + LLL : 'YYYY. [gada] D. MMMM, HH:mm', + LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm' + }, + calendar : { + sameDay : '[Šodien pulksten] LT', + nextDay : '[Rīt pulksten] LT', + nextWeek : 'dddd [pulksten] LT', + lastDay : '[Vakar pulksten] LT', + lastWeek : '[Pagājušā] dddd [pulksten] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'pēc %s', + past : 'pirms %s', + s : relativeSeconds, + ss : relativeTimeWithPlural$1, + m : relativeTimeWithSingular, + mm : relativeTimeWithPlural$1, + h : relativeTimeWithSingular, + hh : relativeTimeWithPlural$1, + d : relativeTimeWithSingular, + dd : relativeTimeWithPlural$1, + M : relativeTimeWithSingular, + MM : relativeTimeWithPlural$1, + y : relativeTimeWithSingular, + yy : relativeTimeWithPlural$1 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var translator = { + words: { //Different grammatical cases + ss: ['sekund', 'sekunda', 'sekundi'], + m: ['jedan minut', 'jednog minuta'], + mm: ['minut', 'minuta', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mjesec', 'mjeseca', 'mjeseci'], + yy: ['godina', 'godine', 'godina'] + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return number + ' ' + translator.correctGrammaticalCase(number, wordKey); + } + } + }; + + hooks.defineLocale('me', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), + monthsParseExact : true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm', + LTS : 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sjutra u] LT', + + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[juče u] LT', + lastWeek : function () { + var lastWeekDays = [ + '[prošle] [nedjelje] [u] LT', + '[prošlog] [ponedjeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srijede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT' + ]; + return lastWeekDays[this.day()]; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'prije %s', + s : 'nekoliko sekundi', + ss : translator.translate, + m : translator.translate, + mm : translator.translate, + h : translator.translate, + hh : translator.translate, + d : 'dan', + dd : translator.translate, + M : 'mjesec', + MM : translator.translate, + y : 'godinu', + yy : translator.translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('mi', { + months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'), + monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'), + monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i, + weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'), + weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [i] HH:mm', + LLLL: 'dddd, D MMMM YYYY [i] HH:mm' + }, + calendar: { + sameDay: '[i teie mahana, i] LT', + nextDay: '[apopo i] LT', + nextWeek: 'dddd [i] LT', + lastDay: '[inanahi i] LT', + lastWeek: 'dddd [whakamutunga i] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'i roto i %s', + past: '%s i mua', + s: 'te hēkona ruarua', + ss: '%d hēkona', + m: 'he meneti', + mm: '%d meneti', + h: 'te haora', + hh: '%d haora', + d: 'he ra', + dd: '%d ra', + M: 'he marama', + MM: '%d marama', + y: 'he tau', + yy: '%d tau' + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('mk', { + months : 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'), + monthsShort : 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'), + weekdays : 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'), + weekdaysShort : 'нед_пон_вто_сре_чет_пет_саб'.split('_'), + weekdaysMin : 'нe_пo_вт_ср_че_пе_сa'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'D.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY H:mm', + LLLL : 'dddd, D MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[Денес во] LT', + nextDay : '[Утре во] LT', + nextWeek : '[Во] dddd [во] LT', + lastDay : '[Вчера во] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[Изминатата] dddd [во] LT'; + case 1: + case 2: + case 4: + case 5: + return '[Изминатиот] dddd [во] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'после %s', + past : 'пред %s', + s : 'неколку секунди', + ss : '%d секунди', + m : 'минута', + mm : '%d минути', + h : 'час', + hh : '%d часа', + d : 'ден', + dd : '%d дена', + M : 'месец', + MM : '%d месеци', + y : 'година', + yy : '%d години' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal : function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('ml', { + months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'), + monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'), + monthsParseExact : true, + weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'), + weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'), + weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), + longDateFormat : { + LT : 'A h:mm -നു', + LTS : 'A h:mm:ss -നു', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm -നു', + LLLL : 'dddd, D MMMM YYYY, A h:mm -നു' + }, + calendar : { + sameDay : '[ഇന്ന്] LT', + nextDay : '[നാളെ] LT', + nextWeek : 'dddd, LT', + lastDay : '[ഇന്നലെ] LT', + lastWeek : '[കഴിഞ്ഞ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s കഴിഞ്ഞ്', + past : '%s മുൻപ്', + s : 'അൽപ നിമിഷങ്ങൾ', + ss : '%d സെക്കൻഡ്', + m : 'ഒരു മിനിറ്റ്', + mm : '%d മിനിറ്റ്', + h : 'ഒരു മണിക്കൂർ', + hh : '%d മണിക്കൂർ', + d : 'ഒരു ദിവസം', + dd : '%d ദിവസം', + M : 'ഒരു മാസം', + MM : '%d മാസം', + y : 'ഒരു വർഷം', + yy : '%d വർഷം' + }, + meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ((meridiem === 'രാത്രി' && hour >= 4) || + meridiem === 'ഉച്ച കഴിഞ്ഞ്' || + meridiem === 'വൈകുന്നേരം') { + return hour + 12; + } else { + return hour; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'രാത്രി'; + } else if (hour < 12) { + return 'രാവിലെ'; + } else if (hour < 17) { + return 'ഉച്ച കഴിഞ്ഞ്'; + } else if (hour < 20) { + return 'വൈകുന്നേരം'; + } else { + return 'രാത്രി'; + } + } + }); + + //! moment.js locale configuration + + function translate$7(number, withoutSuffix, key, isFuture) { + switch (key) { + case 's': + return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын'; + case 'ss': + return number + (withoutSuffix ? ' секунд' : ' секундын'); + case 'm': + case 'mm': + return number + (withoutSuffix ? ' минут' : ' минутын'); + case 'h': + case 'hh': + return number + (withoutSuffix ? ' цаг' : ' цагийн'); + case 'd': + case 'dd': + return number + (withoutSuffix ? ' өдөр' : ' өдрийн'); + case 'M': + case 'MM': + return number + (withoutSuffix ? ' сар' : ' сарын'); + case 'y': + case 'yy': + return number + (withoutSuffix ? ' жил' : ' жилийн'); + default: + return number; + } + } + + hooks.defineLocale('mn', { + months : 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split('_'), + monthsShort : '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split('_'), + monthsParseExact : true, + weekdays : 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'), + weekdaysShort : 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'), + weekdaysMin : 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'YYYY оны MMMMын D', + LLL : 'YYYY оны MMMMын D HH:mm', + LLLL : 'dddd, YYYY оны MMMMын D HH:mm' + }, + meridiemParse: /ҮӨ|ҮХ/i, + isPM : function (input) { + return input === 'ҮХ'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ҮӨ'; + } else { + return 'ҮХ'; + } + }, + calendar : { + sameDay : '[Өнөөдөр] LT', + nextDay : '[Маргааш] LT', + nextWeek : '[Ирэх] dddd LT', + lastDay : '[Өчигдөр] LT', + lastWeek : '[Өнгөрсөн] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s дараа', + past : '%s өмнө', + s : translate$7, + ss : translate$7, + m : translate$7, + mm : translate$7, + h : translate$7, + hh : translate$7, + d : translate$7, + dd : translate$7, + M : translate$7, + MM : translate$7, + y : translate$7, + yy : translate$7 + }, + dayOfMonthOrdinalParse: /\d{1,2} өдөр/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + ' өдөр'; + default: + return number; + } + } + }); + + //! moment.js locale configuration + + var symbolMap$b = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०' + }, + numberMap$a = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0' + }; + + function relativeTimeMr(number, withoutSuffix, string, isFuture) + { + var output = ''; + if (withoutSuffix) { + switch (string) { + case 's': output = 'काही सेकंद'; break; + case 'ss': output = '%d सेकंद'; break; + case 'm': output = 'एक मिनिट'; break; + case 'mm': output = '%d मिनिटे'; break; + case 'h': output = 'एक तास'; break; + case 'hh': output = '%d तास'; break; + case 'd': output = 'एक दिवस'; break; + case 'dd': output = '%d दिवस'; break; + case 'M': output = 'एक महिना'; break; + case 'MM': output = '%d महिने'; break; + case 'y': output = 'एक वर्ष'; break; + case 'yy': output = '%d वर्षे'; break; + } + } + else { + switch (string) { + case 's': output = 'काही सेकंदां'; break; + case 'ss': output = '%d सेकंदां'; break; + case 'm': output = 'एका मिनिटा'; break; + case 'mm': output = '%d मिनिटां'; break; + case 'h': output = 'एका तासा'; break; + case 'hh': output = '%d तासां'; break; + case 'd': output = 'एका दिवसा'; break; + case 'dd': output = '%d दिवसां'; break; + case 'M': output = 'एका महिन्या'; break; + case 'MM': output = '%d महिन्यां'; break; + case 'y': output = 'एका वर्षा'; break; + case 'yy': output = '%d वर्षां'; break; + } + } + return output.replace(/%d/i, number); + } + + hooks.defineLocale('mr', { + months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'), + monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'), + monthsParseExact : true, + weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat : { + LT : 'A h:mm वाजता', + LTS : 'A h:mm:ss वाजता', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm वाजता', + LLLL : 'dddd, D MMMM YYYY, A h:mm वाजता' + }, + calendar : { + sameDay : '[आज] LT', + nextDay : '[उद्या] LT', + nextWeek : 'dddd, LT', + lastDay : '[काल] LT', + lastWeek: '[मागील] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future: '%sमध्ये', + past: '%sपूर्वी', + s: relativeTimeMr, + ss: relativeTimeMr, + m: relativeTimeMr, + mm: relativeTimeMr, + h: relativeTimeMr, + hh: relativeTimeMr, + d: relativeTimeMr, + dd: relativeTimeMr, + M: relativeTimeMr, + MM: relativeTimeMr, + y: relativeTimeMr, + yy: relativeTimeMr + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$a[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$b[match]; + }); + }, + meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'रात्री') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सकाळी') { + return hour; + } else if (meridiem === 'दुपारी') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'सायंकाळी') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'रात्री'; + } else if (hour < 10) { + return 'सकाळी'; + } else if (hour < 17) { + return 'दुपारी'; + } else if (hour < 20) { + return 'सायंकाळी'; + } else { + return 'रात्री'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('ms-my', { + months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), + monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar : { + sameDay : '[Hari ini pukul] LT', + nextDay : '[Esok pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kelmarin pukul] LT', + lastWeek : 'dddd [lepas pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dalam %s', + past : '%s yang lepas', + s : 'beberapa saat', + ss : '%d saat', + m : 'seminit', + mm : '%d minit', + h : 'sejam', + hh : '%d jam', + d : 'sehari', + dd : '%d hari', + M : 'sebulan', + MM : '%d bulan', + y : 'setahun', + yy : '%d tahun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('ms', { + months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), + monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar : { + sameDay : '[Hari ini pukul] LT', + nextDay : '[Esok pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kelmarin pukul] LT', + lastWeek : 'dddd [lepas pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dalam %s', + past : '%s yang lepas', + s : 'beberapa saat', + ss : '%d saat', + m : 'seminit', + mm : '%d minit', + h : 'sejam', + hh : '%d jam', + d : 'sehari', + dd : '%d hari', + M : 'sebulan', + MM : '%d bulan', + y : 'setahun', + yy : '%d tahun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('mt', { + months : 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split('_'), + monthsShort : 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'), + weekdays : 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split('_'), + weekdaysShort : 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'), + weekdaysMin : 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Illum fil-]LT', + nextDay : '[Għada fil-]LT', + nextWeek : 'dddd [fil-]LT', + lastDay : '[Il-bieraħ fil-]LT', + lastWeek : 'dddd [li għadda] [fil-]LT', + sameElse : 'L' + }, + relativeTime : { + future : 'f’ %s', + past : '%s ilu', + s : 'ftit sekondi', + ss : '%d sekondi', + m : 'minuta', + mm : '%d minuti', + h : 'siegħa', + hh : '%d siegħat', + d : 'ġurnata', + dd : '%d ġranet', + M : 'xahar', + MM : '%d xhur', + y : 'sena', + yy : '%d sni' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$c = { + '1': '၁', + '2': '၂', + '3': '၃', + '4': '၄', + '5': '၅', + '6': '၆', + '7': '၇', + '8': '၈', + '9': '၉', + '0': '၀' + }, numberMap$b = { + '၁': '1', + '၂': '2', + '၃': '3', + '၄': '4', + '၅': '5', + '၆': '6', + '၇': '7', + '၈': '8', + '၉': '9', + '၀': '0' + }; + + hooks.defineLocale('my', { + months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'), + monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'), + weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'), + weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[ယနေ.] LT [မှာ]', + nextDay: '[မနက်ဖြန်] LT [မှာ]', + nextWeek: 'dddd LT [မှာ]', + lastDay: '[မနေ.က] LT [မှာ]', + lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]', + sameElse: 'L' + }, + relativeTime: { + future: 'လာမည့် %s မှာ', + past: 'လွန်ခဲ့သော %s က', + s: 'စက္ကန်.အနည်းငယ်', + ss : '%d စက္ကန့်', + m: 'တစ်မိနစ်', + mm: '%d မိနစ်', + h: 'တစ်နာရီ', + hh: '%d နာရီ', + d: 'တစ်ရက်', + dd: '%d ရက်', + M: 'တစ်လ', + MM: '%d လ', + y: 'တစ်နှစ်', + yy: '%d နှစ်' + }, + preparse: function (string) { + return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) { + return numberMap$b[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$c[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('nb', { + months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + monthsShort : 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'), + monthsParseExact : true, + weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort : 'sø._ma._ti._on._to._fr._lø.'.split('_'), + weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY [kl.] HH:mm', + LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm' + }, + calendar : { + sameDay: '[i dag kl.] LT', + nextDay: '[i morgen kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[i går kl.] LT', + lastWeek: '[forrige] dddd [kl.] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'om %s', + past : '%s siden', + s : 'noen sekunder', + ss : '%d sekunder', + m : 'ett minutt', + mm : '%d minutter', + h : 'en time', + hh : '%d timer', + d : 'en dag', + dd : '%d dager', + M : 'en måned', + MM : '%d måneder', + y : 'ett år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$d = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०' + }, + numberMap$c = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0' + }; + + hooks.defineLocale('ne', { + months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'), + monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'), + monthsParseExact : true, + weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'), + weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'), + weekdaysMin : 'आ._सो._मं._बु._बि._शु._श.'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'Aको h:mm बजे', + LTS : 'Aको h:mm:ss बजे', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, Aको h:mm बजे', + LLLL : 'dddd, D MMMM YYYY, Aको h:mm बजे' + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$c[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$d[match]; + }); + }, + meridiemParse: /राति|बिहान|दिउँसो|साँझ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'राति') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'बिहान') { + return hour; + } else if (meridiem === 'दिउँसो') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'साँझ') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 3) { + return 'राति'; + } else if (hour < 12) { + return 'बिहान'; + } else if (hour < 16) { + return 'दिउँसो'; + } else if (hour < 20) { + return 'साँझ'; + } else { + return 'राति'; + } + }, + calendar : { + sameDay : '[आज] LT', + nextDay : '[भोलि] LT', + nextWeek : '[आउँदो] dddd[,] LT', + lastDay : '[हिजो] LT', + lastWeek : '[गएको] dddd[,] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%sमा', + past : '%s अगाडि', + s : 'केही क्षण', + ss : '%d सेकेण्ड', + m : 'एक मिनेट', + mm : '%d मिनेट', + h : 'एक घण्टा', + hh : '%d घण्टा', + d : 'एक दिन', + dd : '%d दिन', + M : 'एक महिना', + MM : '%d महिना', + y : 'एक बर्ष', + yy : '%d बर्ष' + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var monthsShortWithDots$1 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), + monthsShortWithoutDots$1 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'); + + var monthsParse$4 = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i]; + var monthsRegex$5 = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + + hooks.defineLocale('nl-be', { + months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortWithDots$1; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots$1[m.month()]; + } else { + return monthsShortWithDots$1[m.month()]; + } + }, + + monthsRegex: monthsRegex$5, + monthsShortRegex: monthsRegex$5, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse : monthsParse$4, + longMonthsParse : monthsParse$4, + shortMonthsParse : monthsParse$4, + + weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), + weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'over %s', + past : '%s geleden', + s : 'een paar seconden', + ss : '%d seconden', + m : 'één minuut', + mm : '%d minuten', + h : 'één uur', + hh : '%d uur', + d : 'één dag', + dd : '%d dagen', + M : 'één maand', + MM : '%d maanden', + y : 'één jaar', + yy : '%d jaar' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var monthsShortWithDots$2 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), + monthsShortWithoutDots$2 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'); + + var monthsParse$5 = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i]; + var monthsRegex$6 = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + + hooks.defineLocale('nl', { + months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortWithDots$2; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots$2[m.month()]; + } else { + return monthsShortWithDots$2[m.month()]; + } + }, + + monthsRegex: monthsRegex$6, + monthsShortRegex: monthsRegex$6, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse : monthsParse$5, + longMonthsParse : monthsParse$5, + shortMonthsParse : monthsParse$5, + + weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), + weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD-MM-YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'over %s', + past : '%s geleden', + s : 'een paar seconden', + ss : '%d seconden', + m : 'één minuut', + mm : '%d minuten', + h : 'één uur', + hh : '%d uur', + d : 'één dag', + dd : '%d dagen', + M : 'één maand', + MM : '%d maanden', + y : 'één jaar', + yy : '%d jaar' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('nn', { + months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), + weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'), + weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'), + weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY [kl.] H:mm', + LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm' + }, + calendar : { + sameDay: '[I dag klokka] LT', + nextDay: '[I morgon klokka] LT', + nextWeek: 'dddd [klokka] LT', + lastDay: '[I går klokka] LT', + lastWeek: '[Føregåande] dddd [klokka] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'om %s', + past : '%s sidan', + s : 'nokre sekund', + ss : '%d sekund', + m : 'eit minutt', + mm : '%d minutt', + h : 'ein time', + hh : '%d timar', + d : 'ein dag', + dd : '%d dagar', + M : 'ein månad', + MM : '%d månader', + y : 'eit år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$e = { + '1': '੧', + '2': '੨', + '3': '੩', + '4': '੪', + '5': '੫', + '6': '੬', + '7': '੭', + '8': '੮', + '9': '੯', + '0': '੦' + }, + numberMap$d = { + '੧': '1', + '੨': '2', + '੩': '3', + '੪': '4', + '੫': '5', + '੬': '6', + '੭': '7', + '੮': '8', + '੯': '9', + '੦': '0' + }; + + hooks.defineLocale('pa-in', { + // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi. + months : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'), + monthsShort : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'), + weekdays : 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'), + weekdaysShort : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + weekdaysMin : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + longDateFormat : { + LT : 'A h:mm ਵਜੇ', + LTS : 'A h:mm:ss ਵਜੇ', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm ਵਜੇ', + LLLL : 'dddd, D MMMM YYYY, A h:mm ਵਜੇ' + }, + calendar : { + sameDay : '[ਅਜ] LT', + nextDay : '[ਕਲ] LT', + nextWeek : '[ਅਗਲਾ] dddd, LT', + lastDay : '[ਕਲ] LT', + lastWeek : '[ਪਿਛਲੇ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ਵਿੱਚ', + past : '%s ਪਿਛਲੇ', + s : 'ਕੁਝ ਸਕਿੰਟ', + ss : '%d ਸਕਿੰਟ', + m : 'ਇਕ ਮਿੰਟ', + mm : '%d ਮਿੰਟ', + h : 'ਇੱਕ ਘੰਟਾ', + hh : '%d ਘੰਟੇ', + d : 'ਇੱਕ ਦਿਨ', + dd : '%d ਦਿਨ', + M : 'ਇੱਕ ਮਹੀਨਾ', + MM : '%d ਮਹੀਨੇ', + y : 'ਇੱਕ ਸਾਲ', + yy : '%d ਸਾਲ' + }, + preparse: function (string) { + return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) { + return numberMap$d[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$e[match]; + }); + }, + // Punjabi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi. + meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ਰਾਤ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ਸਵੇਰ') { + return hour; + } else if (meridiem === 'ਦੁਪਹਿਰ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ਸ਼ਾਮ') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ਰਾਤ'; + } else if (hour < 10) { + return 'ਸਵੇਰ'; + } else if (hour < 17) { + return 'ਦੁਪਹਿਰ'; + } else if (hour < 20) { + return 'ਸ਼ਾਮ'; + } else { + return 'ਰਾਤ'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'), + monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_'); + function plural$3(n) { + return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1); + } + function translate$8(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + return result + (plural$3(number) ? 'sekundy' : 'sekund'); + case 'm': + return withoutSuffix ? 'minuta' : 'minutę'; + case 'mm': + return result + (plural$3(number) ? 'minuty' : 'minut'); + case 'h': + return withoutSuffix ? 'godzina' : 'godzinę'; + case 'hh': + return result + (plural$3(number) ? 'godziny' : 'godzin'); + case 'MM': + return result + (plural$3(number) ? 'miesiące' : 'miesięcy'); + case 'yy': + return result + (plural$3(number) ? 'lata' : 'lat'); + } + } + + hooks.defineLocale('pl', { + months : function (momentToFormat, format) { + if (!momentToFormat) { + return monthsNominative; + } else if (format === '') { + // Hack: if format empty we know this is used to generate + // RegExp by moment. Give then back both valid forms of months + // in RegExp ready format. + return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')'; + } else if (/D MMMM/.test(format)) { + return monthsSubjective[momentToFormat.month()]; + } else { + return monthsNominative[momentToFormat.month()]; + } + }, + monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), + weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'), + weekdaysShort : 'ndz_pon_wt_śr_czw_pt_sob'.split('_'), + weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Dziś o] LT', + nextDay: '[Jutro o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[W niedzielę o] LT'; + + case 2: + return '[We wtorek o] LT'; + + case 3: + return '[W środę o] LT'; + + case 6: + return '[W sobotę o] LT'; + + default: + return '[W] dddd [o] LT'; + } + }, + lastDay: '[Wczoraj o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[W zeszłą niedzielę o] LT'; + case 3: + return '[W zeszłą środę o] LT'; + case 6: + return '[W zeszłą sobotę o] LT'; + default: + return '[W zeszły] dddd [o] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'za %s', + past : '%s temu', + s : 'kilka sekund', + ss : translate$8, + m : translate$8, + mm : translate$8, + h : translate$8, + hh : translate$8, + d : '1 dzień', + dd : '%d dni', + M : 'miesiąc', + MM : translate$8, + y : 'rok', + yy : translate$8 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('pt-br', { + months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'), + monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'), + weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), + weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY [às] HH:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm' + }, + calendar : { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return (this.day() === 0 || this.day() === 6) ? + '[Último] dddd [às] LT' : // Saturday + Sunday + '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L' + }, + relativeTime : { + future : 'em %s', + past : 'há %s', + s : 'poucos segundos', + ss : '%d segundos', + m : 'um minuto', + mm : '%d minutos', + h : 'uma hora', + hh : '%d horas', + d : 'um dia', + dd : '%d dias', + M : 'um mês', + MM : '%d meses', + y : 'um ano', + yy : '%d anos' + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal : '%dº' + }); + + //! moment.js locale configuration + + hooks.defineLocale('pt', { + months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'), + monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'), + weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), + weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY HH:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm' + }, + calendar : { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return (this.day() === 0 || this.day() === 6) ? + '[Último] dddd [às] LT' : // Saturday + Sunday + '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L' + }, + relativeTime : { + future : 'em %s', + past : 'há %s', + s : 'segundos', + ss : '%d segundos', + m : 'um minuto', + mm : '%d minutos', + h : 'uma hora', + hh : '%d horas', + d : 'um dia', + dd : '%d dias', + M : 'um mês', + MM : '%d meses', + y : 'um ano', + yy : '%d anos' + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function relativeTimeWithPlural$2(number, withoutSuffix, key) { + var format = { + 'ss': 'secunde', + 'mm': 'minute', + 'hh': 'ore', + 'dd': 'zile', + 'MM': 'luni', + 'yy': 'ani' + }, + separator = ' '; + if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) { + separator = ' de '; + } + return number + separator + format[key]; + } + + hooks.defineLocale('ro', { + months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'), + monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'), + weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'), + weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY H:mm', + LLLL : 'dddd, D MMMM YYYY H:mm' + }, + calendar : { + sameDay: '[azi la] LT', + nextDay: '[mâine la] LT', + nextWeek: 'dddd [la] LT', + lastDay: '[ieri la] LT', + lastWeek: '[fosta] dddd [la] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'peste %s', + past : '%s în urmă', + s : 'câteva secunde', + ss : relativeTimeWithPlural$2, + m : 'un minut', + mm : relativeTimeWithPlural$2, + h : 'o oră', + hh : relativeTimeWithPlural$2, + d : 'o zi', + dd : relativeTimeWithPlural$2, + M : 'o lună', + MM : relativeTimeWithPlural$2, + y : 'un an', + yy : relativeTimeWithPlural$2 + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function plural$4(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); + } + function relativeTimeWithPlural$3(number, withoutSuffix, key) { + var format = { + 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + 'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут', + 'hh': 'час_часа_часов', + 'dd': 'день_дня_дней', + 'MM': 'месяц_месяца_месяцев', + 'yy': 'год_года_лет' + }; + if (key === 'm') { + return withoutSuffix ? 'минута' : 'минуту'; + } + else { + return number + ' ' + plural$4(format[key], +number); + } + } + var monthsParse$6 = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i]; + + // http://new.gramota.ru/spravka/rules/139-prop : § 103 + // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637 + // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753 + hooks.defineLocale('ru', { + months : { + format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'), + standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_') + }, + monthsShort : { + // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ? + format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'), + standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_') + }, + weekdays : { + standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'), + format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'), + isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/ + }, + weekdaysShort : 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin : 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + monthsParse : monthsParse$6, + longMonthsParse : monthsParse$6, + shortMonthsParse : monthsParse$6, + + // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки + monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // копия предыдущего + monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // полные названия с падежами + monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i, + + // Выражение, которое соотвествует только сокращённым формам + monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY г.', + LLL : 'D MMMM YYYY г., H:mm', + LLLL : 'dddd, D MMMM YYYY г., H:mm' + }, + calendar : { + sameDay: '[Сегодня, в] LT', + nextDay: '[Завтра, в] LT', + lastDay: '[Вчера, в] LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В следующее] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В следующий] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В следующую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + lastWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В прошлое] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В прошлый] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В прошлую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'через %s', + past : '%s назад', + s : 'несколько секунд', + ss : relativeTimeWithPlural$3, + m : relativeTimeWithPlural$3, + mm : relativeTimeWithPlural$3, + h : 'час', + hh : relativeTimeWithPlural$3, + d : 'день', + dd : relativeTimeWithPlural$3, + M : 'месяц', + MM : relativeTimeWithPlural$3, + y : 'год', + yy : relativeTimeWithPlural$3 + }, + meridiemParse: /ночи|утра|дня|вечера/i, + isPM : function (input) { + return /^(дня|вечера)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ночи'; + } else if (hour < 12) { + return 'утра'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечера'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + return number + '-й'; + case 'D': + return number + '-го'; + case 'w': + case 'W': + return number + '-я'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var months$8 = [ + 'جنوري', + 'فيبروري', + 'مارچ', + 'اپريل', + 'مئي', + 'جون', + 'جولاءِ', + 'آگسٽ', + 'سيپٽمبر', + 'آڪٽوبر', + 'نومبر', + 'ڊسمبر' + ]; + var days$1 = [ + 'آچر', + 'سومر', + 'اڱارو', + 'اربع', + 'خميس', + 'جمع', + 'ڇنڇر' + ]; + + hooks.defineLocale('sd', { + months : months$8, + monthsShort : months$8, + weekdays : days$1, + weekdaysShort : days$1, + weekdaysMin : days$1, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd، D MMMM YYYY HH:mm' + }, + meridiemParse: /صبح|شام/, + isPM : function (input) { + return 'شام' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar : { + sameDay : '[اڄ] LT', + nextDay : '[سڀاڻي] LT', + nextWeek : 'dddd [اڳين هفتي تي] LT', + lastDay : '[ڪالهه] LT', + lastWeek : '[گزريل هفتي] dddd [تي] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s پوء', + past : '%s اڳ', + s : 'چند سيڪنڊ', + ss : '%d سيڪنڊ', + m : 'هڪ منٽ', + mm : '%d منٽ', + h : 'هڪ ڪلاڪ', + hh : '%d ڪلاڪ', + d : 'هڪ ڏينهن', + dd : '%d ڏينهن', + M : 'هڪ مهينو', + MM : '%d مهينا', + y : 'هڪ سال', + yy : '%d سال' + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('se', { + months : 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'), + monthsShort : 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'), + weekdays : 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'), + weekdaysShort : 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'), + weekdaysMin : 's_v_m_g_d_b_L'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'MMMM D. [b.] YYYY', + LLL : 'MMMM D. [b.] YYYY [ti.] HH:mm', + LLLL : 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm' + }, + calendar : { + sameDay: '[otne ti] LT', + nextDay: '[ihttin ti] LT', + nextWeek: 'dddd [ti] LT', + lastDay: '[ikte ti] LT', + lastWeek: '[ovddit] dddd [ti] LT', + sameElse: 'L' + }, + relativeTime : { + future : '%s geažes', + past : 'maŋit %s', + s : 'moadde sekunddat', + ss: '%d sekunddat', + m : 'okta minuhta', + mm : '%d minuhtat', + h : 'okta diimmu', + hh : '%d diimmut', + d : 'okta beaivi', + dd : '%d beaivvit', + M : 'okta mánnu', + MM : '%d mánut', + y : 'okta jahki', + yy : '%d jagit' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + /*jshint -W100*/ + hooks.defineLocale('si', { + months : 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'), + monthsShort : 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'), + weekdays : 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'), + weekdaysShort : 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'), + weekdaysMin : 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'a h:mm', + LTS : 'a h:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY MMMM D', + LLL : 'YYYY MMMM D, a h:mm', + LLLL : 'YYYY MMMM D [වැනි] dddd, a h:mm:ss' + }, + calendar : { + sameDay : '[අද] LT[ට]', + nextDay : '[හෙට] LT[ට]', + nextWeek : 'dddd LT[ට]', + lastDay : '[ඊයේ] LT[ට]', + lastWeek : '[පසුගිය] dddd LT[ට]', + sameElse : 'L' + }, + relativeTime : { + future : '%sකින්', + past : '%sකට පෙර', + s : 'තත්පර කිහිපය', + ss : 'තත්පර %d', + m : 'මිනිත්තුව', + mm : 'මිනිත්තු %d', + h : 'පැය', + hh : 'පැය %d', + d : 'දිනය', + dd : 'දින %d', + M : 'මාසය', + MM : 'මාස %d', + y : 'වසර', + yy : 'වසර %d' + }, + dayOfMonthOrdinalParse: /\d{1,2} වැනි/, + ordinal : function (number) { + return number + ' වැනි'; + }, + meridiemParse : /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./, + isPM : function (input) { + return input === 'ප.ව.' || input === 'පස් වරු'; + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'ප.ව.' : 'පස් වරු'; + } else { + return isLower ? 'පෙ.ව.' : 'පෙර වරු'; + } + } + }); + + //! moment.js locale configuration + + var months$9 = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'), + monthsShort$6 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_'); + function plural$5(n) { + return (n > 1) && (n < 5); + } + function translate$9(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'sekundy' : 'sekúnd'); + } else { + return result + 'sekundami'; + } + break; + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou'); + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'minúty' : 'minút'); + } else { + return result + 'minútami'; + } + break; + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'hodiny' : 'hodín'); + } else { + return result + 'hodinami'; + } + break; + case 'd': // a day / in a day / a day ago + return (withoutSuffix || isFuture) ? 'deň' : 'dňom'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'dni' : 'dní'); + } else { + return result + 'dňami'; + } + break; + case 'M': // a month / in a month / a month ago + return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'mesiace' : 'mesiacov'); + } else { + return result + 'mesiacmi'; + } + break; + case 'y': // a year / in a year / a year ago + return (withoutSuffix || isFuture) ? 'rok' : 'rokom'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'roky' : 'rokov'); + } else { + return result + 'rokmi'; + } + break; + } + } + + hooks.defineLocale('sk', { + months : months$9, + monthsShort : monthsShort$6, + weekdays : 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'), + weekdaysShort : 'ne_po_ut_st_št_pi_so'.split('_'), + weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'), + longDateFormat : { + LT: 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd D. MMMM YYYY H:mm' + }, + calendar : { + sameDay: '[dnes o] LT', + nextDay: '[zajtra o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v nedeľu o] LT'; + case 1: + case 2: + return '[v] dddd [o] LT'; + case 3: + return '[v stredu o] LT'; + case 4: + return '[vo štvrtok o] LT'; + case 5: + return '[v piatok o] LT'; + case 6: + return '[v sobotu o] LT'; + } + }, + lastDay: '[včera o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulú nedeľu o] LT'; + case 1: + case 2: + return '[minulý] dddd [o] LT'; + case 3: + return '[minulú stredu o] LT'; + case 4: + case 5: + return '[minulý] dddd [o] LT'; + case 6: + return '[minulú sobotu o] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'za %s', + past : 'pred %s', + s : translate$9, + ss : translate$9, + m : translate$9, + mm : translate$9, + h : translate$9, + hh : translate$9, + d : translate$9, + dd : translate$9, + M : translate$9, + MM : translate$9, + y : translate$9, + yy : translate$9 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + function processRelativeTime$6(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami'; + case 'ss': + if (number === 1) { + result += withoutSuffix ? 'sekundo' : 'sekundi'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah'; + } else { + result += 'sekund'; + } + return result; + case 'm': + return withoutSuffix ? 'ena minuta' : 'eno minuto'; + case 'mm': + if (number === 1) { + result += withoutSuffix ? 'minuta' : 'minuto'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'minuti' : 'minutama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'minute' : 'minutami'; + } else { + result += withoutSuffix || isFuture ? 'minut' : 'minutami'; + } + return result; + case 'h': + return withoutSuffix ? 'ena ura' : 'eno uro'; + case 'hh': + if (number === 1) { + result += withoutSuffix ? 'ura' : 'uro'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'uri' : 'urama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'ure' : 'urami'; + } else { + result += withoutSuffix || isFuture ? 'ur' : 'urami'; + } + return result; + case 'd': + return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; + case 'dd': + if (number === 1) { + result += withoutSuffix || isFuture ? 'dan' : 'dnem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'dni' : 'dnevoma'; + } else { + result += withoutSuffix || isFuture ? 'dni' : 'dnevi'; + } + return result; + case 'M': + return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; + case 'MM': + if (number === 1) { + result += withoutSuffix || isFuture ? 'mesec' : 'mesecem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'meseca' : 'mesecema'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'mesece' : 'meseci'; + } else { + result += withoutSuffix || isFuture ? 'mesecev' : 'meseci'; + } + return result; + case 'y': + return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; + case 'yy': + if (number === 1) { + result += withoutSuffix || isFuture ? 'leto' : 'letom'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'leti' : 'letoma'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'leta' : 'leti'; + } else { + result += withoutSuffix || isFuture ? 'let' : 'leti'; + } + return result; + } + } + + hooks.defineLocale('sl', { + months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'), + monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'), + weekdaysShort : 'ned._pon._tor._sre._čet._pet._sob.'.split('_'), + weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[danes ob] LT', + nextDay : '[jutri ob] LT', + + nextWeek : function () { + switch (this.day()) { + case 0: + return '[v] [nedeljo] [ob] LT'; + case 3: + return '[v] [sredo] [ob] LT'; + case 6: + return '[v] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[v] dddd [ob] LT'; + } + }, + lastDay : '[včeraj ob] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + return '[prejšnjo] [nedeljo] [ob] LT'; + case 3: + return '[prejšnjo] [sredo] [ob] LT'; + case 6: + return '[prejšnjo] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prejšnji] dddd [ob] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'čez %s', + past : 'pred %s', + s : processRelativeTime$6, + ss : processRelativeTime$6, + m : processRelativeTime$6, + mm : processRelativeTime$6, + h : processRelativeTime$6, + hh : processRelativeTime$6, + d : processRelativeTime$6, + dd : processRelativeTime$6, + M : processRelativeTime$6, + MM : processRelativeTime$6, + y : processRelativeTime$6, + yy : processRelativeTime$6 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('sq', { + months : 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'), + monthsShort : 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'), + weekdays : 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'), + weekdaysShort : 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'), + weekdaysMin : 'D_H_Ma_Më_E_P_Sh'.split('_'), + weekdaysParseExact : true, + meridiemParse: /PD|MD/, + isPM: function (input) { + return input.charAt(0) === 'M'; + }, + meridiem : function (hours, minutes, isLower) { + return hours < 12 ? 'PD' : 'MD'; + }, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Sot në] LT', + nextDay : '[Nesër në] LT', + nextWeek : 'dddd [në] LT', + lastDay : '[Dje në] LT', + lastWeek : 'dddd [e kaluar në] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'në %s', + past : '%s më parë', + s : 'disa sekonda', + ss : '%d sekonda', + m : 'një minutë', + mm : '%d minuta', + h : 'një orë', + hh : '%d orë', + d : 'një ditë', + dd : '%d ditë', + M : 'një muaj', + MM : '%d muaj', + y : 'një vit', + yy : '%d vite' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var translator$1 = { + words: { //Different grammatical cases + ss: ['секунда', 'секунде', 'секунди'], + m: ['један минут', 'једне минуте'], + mm: ['минут', 'минуте', 'минута'], + h: ['један сат', 'једног сата'], + hh: ['сат', 'сата', 'сати'], + dd: ['дан', 'дана', 'дана'], + MM: ['месец', 'месеца', 'месеци'], + yy: ['година', 'године', 'година'] + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator$1.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return number + ' ' + translator$1.correctGrammaticalCase(number, wordKey); + } + } + }; + + hooks.defineLocale('sr-cyrl', { + months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'), + monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'), + monthsParseExact: true, + weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'), + weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'), + weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm', + LTS : 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + }, + calendar: { + sameDay: '[данас у] LT', + nextDay: '[сутра у] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[у] [недељу] [у] LT'; + case 3: + return '[у] [среду] [у] LT'; + case 6: + return '[у] [суботу] [у] LT'; + case 1: + case 2: + case 4: + case 5: + return '[у] dddd [у] LT'; + } + }, + lastDay : '[јуче у] LT', + lastWeek : function () { + var lastWeekDays = [ + '[прошле] [недеље] [у] LT', + '[прошлог] [понедељка] [у] LT', + '[прошлог] [уторка] [у] LT', + '[прошле] [среде] [у] LT', + '[прошлог] [четвртка] [у] LT', + '[прошлог] [петка] [у] LT', + '[прошле] [суботе] [у] LT' + ]; + return lastWeekDays[this.day()]; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'за %s', + past : 'пре %s', + s : 'неколико секунди', + ss : translator$1.translate, + m : translator$1.translate, + mm : translator$1.translate, + h : translator$1.translate, + hh : translator$1.translate, + d : 'дан', + dd : translator$1.translate, + M : 'месец', + MM : translator$1.translate, + y : 'годину', + yy : translator$1.translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var translator$2 = { + words: { //Different grammatical cases + ss: ['sekunda', 'sekunde', 'sekundi'], + m: ['jedan minut', 'jedne minute'], + mm: ['minut', 'minute', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mesec', 'meseca', 'meseci'], + yy: ['godina', 'godine', 'godina'] + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator$2.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return number + ' ' + translator$2.correctGrammaticalCase(number, wordKey); + } + } + }; + + hooks.defineLocale('sr', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'), + weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm', + LTS : 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedelju] [u] LT'; + case 3: + return '[u] [sredu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[juče u] LT', + lastWeek : function () { + var lastWeekDays = [ + '[prošle] [nedelje] [u] LT', + '[prošlog] [ponedeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT' + ]; + return lastWeekDays[this.day()]; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'pre %s', + s : 'nekoliko sekundi', + ss : translator$2.translate, + m : translator$2.translate, + mm : translator$2.translate, + h : translator$2.translate, + hh : translator$2.translate, + d : 'dan', + dd : translator$2.translate, + M : 'mesec', + MM : translator$2.translate, + y : 'godinu', + yy : translator$2.translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('ss', { + months : "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split('_'), + monthsShort : 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'), + weekdays : 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'), + weekdaysShort : 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'), + weekdaysMin : 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Namuhla nga] LT', + nextDay : '[Kusasa nga] LT', + nextWeek : 'dddd [nga] LT', + lastDay : '[Itolo nga] LT', + lastWeek : 'dddd [leliphelile] [nga] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'nga %s', + past : 'wenteka nga %s', + s : 'emizuzwana lomcane', + ss : '%d mzuzwana', + m : 'umzuzu', + mm : '%d emizuzu', + h : 'lihora', + hh : '%d emahora', + d : 'lilanga', + dd : '%d emalanga', + M : 'inyanga', + MM : '%d tinyanga', + y : 'umnyaka', + yy : '%d iminyaka' + }, + meridiemParse: /ekuseni|emini|entsambama|ebusuku/, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'ekuseni'; + } else if (hours < 15) { + return 'emini'; + } else if (hours < 19) { + return 'entsambama'; + } else { + return 'ebusuku'; + } + }, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ekuseni') { + return hour; + } else if (meridiem === 'emini') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') { + if (hour === 0) { + return 0; + } + return hour + 12; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal : '%d', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('sv', { + months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'), + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), + weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'), + weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [kl.] HH:mm', + LLLL : 'dddd D MMMM YYYY [kl.] HH:mm', + lll : 'D MMM YYYY HH:mm', + llll : 'ddd D MMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Idag] LT', + nextDay: '[Imorgon] LT', + lastDay: '[Igår] LT', + nextWeek: '[På] dddd LT', + lastWeek: '[I] dddd[s] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'om %s', + past : 'för %s sedan', + s : 'några sekunder', + ss : '%d sekunder', + m : 'en minut', + mm : '%d minuter', + h : 'en timme', + hh : '%d timmar', + d : 'en dag', + dd : '%d dagar', + M : 'en månad', + MM : '%d månader', + y : 'ett år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}(e|a)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'e' : + (b === 1) ? 'a' : + (b === 2) ? 'a' : + (b === 3) ? 'e' : 'e'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('sw', { + months : 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'), + monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), + weekdays : 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'), + weekdaysShort : 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), + weekdaysMin : 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[leo saa] LT', + nextDay : '[kesho saa] LT', + nextWeek : '[wiki ijayo] dddd [saat] LT', + lastDay : '[jana] LT', + lastWeek : '[wiki iliyopita] dddd [saat] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s baadaye', + past : 'tokea %s', + s : 'hivi punde', + ss : 'sekunde %d', + m : 'dakika moja', + mm : 'dakika %d', + h : 'saa limoja', + hh : 'masaa %d', + d : 'siku moja', + dd : 'masiku %d', + M : 'mwezi mmoja', + MM : 'miezi %d', + y : 'mwaka mmoja', + yy : 'miaka %d' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var symbolMap$f = { + '1': '௧', + '2': '௨', + '3': '௩', + '4': '௪', + '5': '௫', + '6': '௬', + '7': '௭', + '8': '௮', + '9': '௯', + '0': '௦' + }, numberMap$e = { + '௧': '1', + '௨': '2', + '௩': '3', + '௪': '4', + '௫': '5', + '௬': '6', + '௭': '7', + '௮': '8', + '௯': '9', + '௦': '0' + }; + + hooks.defineLocale('ta', { + months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'), + monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'), + weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'), + weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'), + weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, HH:mm', + LLLL : 'dddd, D MMMM YYYY, HH:mm' + }, + calendar : { + sameDay : '[இன்று] LT', + nextDay : '[நாளை] LT', + nextWeek : 'dddd, LT', + lastDay : '[நேற்று] LT', + lastWeek : '[கடந்த வாரம்] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s இல்', + past : '%s முன்', + s : 'ஒரு சில விநாடிகள்', + ss : '%d விநாடிகள்', + m : 'ஒரு நிமிடம்', + mm : '%d நிமிடங்கள்', + h : 'ஒரு மணி நேரம்', + hh : '%d மணி நேரம்', + d : 'ஒரு நாள்', + dd : '%d நாட்கள்', + M : 'ஒரு மாதம்', + MM : '%d மாதங்கள்', + y : 'ஒரு வருடம்', + yy : '%d ஆண்டுகள்' + }, + dayOfMonthOrdinalParse: /\d{1,2}வது/, + ordinal : function (number) { + return number + 'வது'; + }, + preparse: function (string) { + return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) { + return numberMap$e[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$f[match]; + }); + }, + // refer http://ta.wikipedia.org/s/1er1 + meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/, + meridiem : function (hour, minute, isLower) { + if (hour < 2) { + return ' யாமம்'; + } else if (hour < 6) { + return ' வைகறை'; // வைகறை + } else if (hour < 10) { + return ' காலை'; // காலை + } else if (hour < 14) { + return ' நண்பகல்'; // நண்பகல் + } else if (hour < 18) { + return ' எற்பாடு'; // எற்பாடு + } else if (hour < 22) { + return ' மாலை'; // மாலை + } else { + return ' யாமம்'; + } + }, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'யாமம்') { + return hour < 2 ? hour : hour + 12; + } else if (meridiem === 'வைகறை' || meridiem === 'காலை') { + return hour; + } else if (meridiem === 'நண்பகல்') { + return hour >= 10 ? hour : hour + 12; + } else { + return hour + 12; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('te', { + months : 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'), + monthsShort : 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'), + monthsParseExact : true, + weekdays : 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'), + weekdaysShort : 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'), + weekdaysMin : 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm', + LLLL : 'dddd, D MMMM YYYY, A h:mm' + }, + calendar : { + sameDay : '[నేడు] LT', + nextDay : '[రేపు] LT', + nextWeek : 'dddd, LT', + lastDay : '[నిన్న] LT', + lastWeek : '[గత] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s లో', + past : '%s క్రితం', + s : 'కొన్ని క్షణాలు', + ss : '%d సెకన్లు', + m : 'ఒక నిమిషం', + mm : '%d నిమిషాలు', + h : 'ఒక గంట', + hh : '%d గంటలు', + d : 'ఒక రోజు', + dd : '%d రోజులు', + M : 'ఒక నెల', + MM : '%d నెలలు', + y : 'ఒక సంవత్సరం', + yy : '%d సంవత్సరాలు' + }, + dayOfMonthOrdinalParse : /\d{1,2}వ/, + ordinal : '%dవ', + meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'రాత్రి') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ఉదయం') { + return hour; + } else if (meridiem === 'మధ్యాహ్నం') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'సాయంత్రం') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'రాత్రి'; + } else if (hour < 10) { + return 'ఉదయం'; + } else if (hour < 17) { + return 'మధ్యాహ్నం'; + } else if (hour < 20) { + return 'సాయంత్రం'; + } else { + return 'రాత్రి'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('tet', { + months : 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split('_'), + monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays : 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'), + weekdaysShort : 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'), + weekdaysMin : 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Ohin iha] LT', + nextDay: '[Aban iha] LT', + nextWeek: 'dddd [iha] LT', + lastDay: '[Horiseik iha] LT', + lastWeek: 'dddd [semana kotuk] [iha] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'iha %s', + past : '%s liuba', + s : 'minutu balun', + ss : 'minutu %d', + m : 'minutu ida', + mm : 'minutu %d', + h : 'oras ida', + hh : 'oras %d', + d : 'loron ida', + dd : 'loron %d', + M : 'fulan ida', + MM : 'fulan %d', + y : 'tinan ida', + yy : 'tinan %d' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var suffixes$3 = { + 0: '-ум', + 1: '-ум', + 2: '-юм', + 3: '-юм', + 4: '-ум', + 5: '-ум', + 6: '-ум', + 7: '-ум', + 8: '-ум', + 9: '-ум', + 10: '-ум', + 12: '-ум', + 13: '-ум', + 20: '-ум', + 30: '-юм', + 40: '-ум', + 50: '-ум', + 60: '-ум', + 70: '-ум', + 80: '-ум', + 90: '-ум', + 100: '-ум' + }; + + hooks.defineLocale('tg', { + months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), + monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays : 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split('_'), + weekdaysShort : 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'), + weekdaysMin : 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Имрӯз соати] LT', + nextDay : '[Пагоҳ соати] LT', + lastDay : '[Дирӯз соати] LT', + nextWeek : 'dddd[и] [ҳафтаи оянда соати] LT', + lastWeek : 'dddd[и] [ҳафтаи гузашта соати] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'баъди %s', + past : '%s пеш', + s : 'якчанд сония', + m : 'як дақиқа', + mm : '%d дақиқа', + h : 'як соат', + hh : '%d соат', + d : 'як рӯз', + dd : '%d рӯз', + M : 'як моҳ', + MM : '%d моҳ', + y : 'як сол', + yy : '%d сол' + }, + meridiemParse: /шаб|субҳ|рӯз|бегоҳ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'шаб') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'субҳ') { + return hour; + } else if (meridiem === 'рӯз') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'бегоҳ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'шаб'; + } else if (hour < 11) { + return 'субҳ'; + } else if (hour < 16) { + return 'рӯз'; + } else if (hour < 19) { + return 'бегоҳ'; + } else { + return 'шаб'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$3[number] || suffixes$3[a] || suffixes$3[b]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 1th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('th', { + months : 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'), + monthsShort : 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'), + monthsParseExact: true, + weekdays : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'), + weekdaysShort : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference + weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY เวลา H:mm', + LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm' + }, + meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/, + isPM: function (input) { + return input === 'หลังเที่ยง'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ก่อนเที่ยง'; + } else { + return 'หลังเที่ยง'; + } + }, + calendar : { + sameDay : '[วันนี้ เวลา] LT', + nextDay : '[พรุ่งนี้ เวลา] LT', + nextWeek : 'dddd[หน้า เวลา] LT', + lastDay : '[เมื่อวานนี้ เวลา] LT', + lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'อีก %s', + past : '%sที่แล้ว', + s : 'ไม่กี่วินาที', + ss : '%d วินาที', + m : '1 นาที', + mm : '%d นาที', + h : '1 ชั่วโมง', + hh : '%d ชั่วโมง', + d : '1 วัน', + dd : '%d วัน', + M : '1 เดือน', + MM : '%d เดือน', + y : '1 ปี', + yy : '%d ปี' + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('tl-ph', { + months : 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'), + monthsShort : 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), + weekdays : 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'), + weekdaysShort : 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), + weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'MM/D/YYYY', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY HH:mm', + LLLL : 'dddd, MMMM DD, YYYY HH:mm' + }, + calendar : { + sameDay: 'LT [ngayong araw]', + nextDay: '[Bukas ng] LT', + nextWeek: 'LT [sa susunod na] dddd', + lastDay: 'LT [kahapon]', + lastWeek: 'LT [noong nakaraang] dddd', + sameElse: 'L' + }, + relativeTime : { + future : 'sa loob ng %s', + past : '%s ang nakalipas', + s : 'ilang segundo', + ss : '%d segundo', + m : 'isang minuto', + mm : '%d minuto', + h : 'isang oras', + hh : '%d oras', + d : 'isang araw', + dd : '%d araw', + M : 'isang buwan', + MM : '%d buwan', + y : 'isang taon', + yy : '%d taon' + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal : function (number) { + return number; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_'); + + function translateFuture(output) { + var time = output; + time = (output.indexOf('jaj') !== -1) ? + time.slice(0, -3) + 'leS' : + (output.indexOf('jar') !== -1) ? + time.slice(0, -3) + 'waQ' : + (output.indexOf('DIS') !== -1) ? + time.slice(0, -3) + 'nem' : + time + ' pIq'; + return time; + } + + function translatePast(output) { + var time = output; + time = (output.indexOf('jaj') !== -1) ? + time.slice(0, -3) + 'Hu’' : + (output.indexOf('jar') !== -1) ? + time.slice(0, -3) + 'wen' : + (output.indexOf('DIS') !== -1) ? + time.slice(0, -3) + 'ben' : + time + ' ret'; + return time; + } + + function translate$a(number, withoutSuffix, string, isFuture) { + var numberNoun = numberAsNoun(number); + switch (string) { + case 'ss': + return numberNoun + ' lup'; + case 'mm': + return numberNoun + ' tup'; + case 'hh': + return numberNoun + ' rep'; + case 'dd': + return numberNoun + ' jaj'; + case 'MM': + return numberNoun + ' jar'; + case 'yy': + return numberNoun + ' DIS'; + } + } + + function numberAsNoun(number) { + var hundred = Math.floor((number % 1000) / 100), + ten = Math.floor((number % 100) / 10), + one = number % 10, + word = ''; + if (hundred > 0) { + word += numbersNouns[hundred] + 'vatlh'; + } + if (ten > 0) { + word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH'; + } + if (one > 0) { + word += ((word !== '') ? ' ' : '') + numbersNouns[one]; + } + return (word === '') ? 'pagh' : word; + } + + hooks.defineLocale('tlh', { + months : 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'), + monthsShort : 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'), + monthsParseExact : true, + weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[DaHjaj] LT', + nextDay: '[wa’leS] LT', + nextWeek: 'LLL', + lastDay: '[wa’Hu’] LT', + lastWeek: 'LLL', + sameElse: 'L' + }, + relativeTime : { + future : translateFuture, + past : translatePast, + s : 'puS lup', + ss : translate$a, + m : 'wa’ tup', + mm : translate$a, + h : 'wa’ rep', + hh : translate$a, + d : 'wa’ jaj', + dd : translate$a, + M : 'wa’ jar', + MM : translate$a, + y : 'wa’ DIS', + yy : translate$a + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + var suffixes$4 = { + 1: '\'inci', + 5: '\'inci', + 8: '\'inci', + 70: '\'inci', + 80: '\'inci', + 2: '\'nci', + 7: '\'nci', + 20: '\'nci', + 50: '\'nci', + 3: '\'üncü', + 4: '\'üncü', + 100: '\'üncü', + 6: '\'ncı', + 9: '\'uncu', + 10: '\'uncu', + 30: '\'uncu', + 60: '\'ıncı', + 90: '\'ıncı' + }; + + hooks.defineLocale('tr', { + months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'), + monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'), + weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'), + weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'), + weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[bugün saat] LT', + nextDay : '[yarın saat] LT', + nextWeek : '[gelecek] dddd [saat] LT', + lastDay : '[dün] LT', + lastWeek : '[geçen] dddd [saat] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s sonra', + past : '%s önce', + s : 'birkaç saniye', + ss : '%d saniye', + m : 'bir dakika', + mm : '%d dakika', + h : 'bir saat', + hh : '%d saat', + d : 'bir gün', + dd : '%d gün', + M : 'bir ay', + MM : '%d ay', + y : 'bir yıl', + yy : '%d yıl' + }, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'Do': + case 'DD': + return number; + default: + if (number === 0) { // special case for zero + return number + '\'ıncı'; + } + var a = number % 10, + b = number % 100 - a, + c = number >= 100 ? 100 : null; + return number + (suffixes$4[a] || suffixes$4[b] || suffixes$4[c]); + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals. + // This is currently too difficult (maybe even impossible) to add. + hooks.defineLocale('tzl', { + months : 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'), + monthsShort : 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), + weekdays : 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), + weekdaysShort : 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), + weekdaysMin : 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM [dallas] YYYY', + LLL : 'D. MMMM [dallas] YYYY HH.mm', + LLLL : 'dddd, [li] D. MMMM [dallas] YYYY HH.mm' + }, + meridiemParse: /d\'o|d\'a/i, + isPM : function (input) { + return 'd\'o' === input.toLowerCase(); + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'd\'o' : 'D\'O'; + } else { + return isLower ? 'd\'a' : 'D\'A'; + } + }, + calendar : { + sameDay : '[oxhi à] LT', + nextDay : '[demà à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[ieiri à] LT', + lastWeek : '[sür el] dddd [lasteu à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'osprei %s', + past : 'ja%s', + s : processRelativeTime$7, + ss : processRelativeTime$7, + m : processRelativeTime$7, + mm : processRelativeTime$7, + h : processRelativeTime$7, + hh : processRelativeTime$7, + d : processRelativeTime$7, + dd : processRelativeTime$7, + M : processRelativeTime$7, + MM : processRelativeTime$7, + y : processRelativeTime$7, + yy : processRelativeTime$7 + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + function processRelativeTime$7(number, withoutSuffix, key, isFuture) { + var format = { + 's': ['viensas secunds', '\'iensas secunds'], + 'ss': [number + ' secunds', '' + number + ' secunds'], + 'm': ['\'n míut', '\'iens míut'], + 'mm': [number + ' míuts', '' + number + ' míuts'], + 'h': ['\'n þora', '\'iensa þora'], + 'hh': [number + ' þoras', '' + number + ' þoras'], + 'd': ['\'n ziua', '\'iensa ziua'], + 'dd': [number + ' ziuas', '' + number + ' ziuas'], + 'M': ['\'n mes', '\'iens mes'], + 'MM': [number + ' mesen', '' + number + ' mesen'], + 'y': ['\'n ar', '\'iens ar'], + 'yy': [number + ' ars', '' + number + ' ars'] + }; + return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]); + } + + //! moment.js locale configuration + + hooks.defineLocale('tzm-latn', { + months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), + monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), + weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[asdkh g] LT', + nextDay: '[aska g] LT', + nextWeek: 'dddd [g] LT', + lastDay: '[assant g] LT', + lastWeek: 'dddd [g] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'dadkh s yan %s', + past : 'yan %s', + s : 'imik', + ss : '%d imik', + m : 'minuḍ', + mm : '%d minuḍ', + h : 'saɛa', + hh : '%d tassaɛin', + d : 'ass', + dd : '%d ossan', + M : 'ayowr', + MM : '%d iyyirn', + y : 'asgas', + yy : '%d isgasn' + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('tzm', { + months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), + monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), + weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[ⴰⵙⴷⵅ ⴴ] LT', + nextDay: '[ⴰⵙⴽⴰ ⴴ] LT', + nextWeek: 'dddd [ⴴ] LT', + lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT', + lastWeek: 'dddd [ⴴ] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s', + past : 'ⵢⴰⵏ %s', + s : 'ⵉⵎⵉⴽ', + ss : '%d ⵉⵎⵉⴽ', + m : 'ⵎⵉⵏⵓⴺ', + mm : '%d ⵎⵉⵏⵓⴺ', + h : 'ⵙⴰⵄⴰ', + hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ', + d : 'ⴰⵙⵙ', + dd : '%d oⵙⵙⴰⵏ', + M : 'ⴰⵢoⵓⵔ', + MM : '%d ⵉⵢⵢⵉⵔⵏ', + y : 'ⴰⵙⴳⴰⵙ', + yy : '%d ⵉⵙⴳⴰⵙⵏ' + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } + }); + + //! moment.js language configuration + + hooks.defineLocale('ug-cn', { + months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split( + '_' + ), + weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى', + LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm' + }, + meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + meridiem === 'يېرىم كېچە' || + meridiem === 'سەھەر' || + meridiem === 'چۈشتىن بۇرۇن' + ) { + return hour; + } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') { + return hour + 12; + } else { + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return 'يېرىم كېچە'; + } else if (hm < 900) { + return 'سەھەر'; + } else if (hm < 1130) { + return 'چۈشتىن بۇرۇن'; + } else if (hm < 1230) { + return 'چۈش'; + } else if (hm < 1800) { + return 'چۈشتىن كېيىن'; + } else { + return 'كەچ'; + } + }, + calendar: { + sameDay: '[بۈگۈن سائەت] LT', + nextDay: '[ئەتە سائەت] LT', + nextWeek: '[كېلەركى] dddd [سائەت] LT', + lastDay: '[تۆنۈگۈن] LT', + lastWeek: '[ئالدىنقى] dddd [سائەت] LT', + sameElse: 'L' + }, + relativeTime: { + future: '%s كېيىن', + past: '%s بۇرۇن', + s: 'نەچچە سېكونت', + ss: '%d سېكونت', + m: 'بىر مىنۇت', + mm: '%d مىنۇت', + h: 'بىر سائەت', + hh: '%d سائەت', + d: 'بىر كۈن', + dd: '%d كۈن', + M: 'بىر ئاي', + MM: '%d ئاي', + y: 'بىر يىل', + yy: '%d يىل' + }, + + dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '-كۈنى'; + case 'w': + case 'W': + return number + '-ھەپتە'; + default: + return number; + } + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow: 1, // Monday is the first day of the week. + doy: 7 // The week that contains Jan 1st is the first week of the year. + } + }); + + //! moment.js locale configuration + + function plural$6(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); + } + function relativeTimeWithPlural$4(number, withoutSuffix, key) { + var format = { + 'ss': withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд', + 'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин', + 'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин', + 'dd': 'день_дні_днів', + 'MM': 'місяць_місяці_місяців', + 'yy': 'рік_роки_років' + }; + if (key === 'm') { + return withoutSuffix ? 'хвилина' : 'хвилину'; + } + else if (key === 'h') { + return withoutSuffix ? 'година' : 'годину'; + } + else { + return number + ' ' + plural$6(format[key], +number); + } + } + function weekdaysCaseReplace(m, format) { + var weekdays = { + 'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'), + 'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'), + 'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_') + }; + + if (m === true) { + return weekdays['nominative'].slice(1, 7).concat(weekdays['nominative'].slice(0, 1)); + } + if (!m) { + return weekdays['nominative']; + } + + var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ? + 'accusative' : + ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ? + 'genitive' : + 'nominative'); + return weekdays[nounCase][m.day()]; + } + function processHoursFunction(str) { + return function () { + return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT'; + }; + } + + hooks.defineLocale('uk', { + months : { + 'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'), + 'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_') + }, + monthsShort : 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'), + weekdays : weekdaysCaseReplace, + weekdaysShort : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY р.', + LLL : 'D MMMM YYYY р., HH:mm', + LLLL : 'dddd, D MMMM YYYY р., HH:mm' + }, + calendar : { + sameDay: processHoursFunction('[Сьогодні '), + nextDay: processHoursFunction('[Завтра '), + lastDay: processHoursFunction('[Вчора '), + nextWeek: processHoursFunction('[У] dddd ['), + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return processHoursFunction('[Минулої] dddd [').call(this); + case 1: + case 2: + case 4: + return processHoursFunction('[Минулого] dddd [').call(this); + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'за %s', + past : '%s тому', + s : 'декілька секунд', + ss : relativeTimeWithPlural$4, + m : relativeTimeWithPlural$4, + mm : relativeTimeWithPlural$4, + h : 'годину', + hh : relativeTimeWithPlural$4, + d : 'день', + dd : relativeTimeWithPlural$4, + M : 'місяць', + MM : relativeTimeWithPlural$4, + y : 'рік', + yy : relativeTimeWithPlural$4 + }, + // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason + meridiemParse: /ночі|ранку|дня|вечора/, + isPM: function (input) { + return /^(дня|вечора)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ночі'; + } else if (hour < 12) { + return 'ранку'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечора'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return number + '-й'; + case 'D': + return number + '-го'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + var months$a = [ + 'جنوری', + 'فروری', + 'مارچ', + 'اپریل', + 'مئی', + 'جون', + 'جولائی', + 'اگست', + 'ستمبر', + 'اکتوبر', + 'نومبر', + 'دسمبر' + ]; + var days$2 = [ + 'اتوار', + 'پیر', + 'منگل', + 'بدھ', + 'جمعرات', + 'جمعہ', + 'ہفتہ' + ]; + + hooks.defineLocale('ur', { + months : months$a, + monthsShort : months$a, + weekdays : days$2, + weekdaysShort : days$2, + weekdaysMin : days$2, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd، D MMMM YYYY HH:mm' + }, + meridiemParse: /صبح|شام/, + isPM : function (input) { + return 'شام' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar : { + sameDay : '[آج بوقت] LT', + nextDay : '[کل بوقت] LT', + nextWeek : 'dddd [بوقت] LT', + lastDay : '[گذشتہ روز بوقت] LT', + lastWeek : '[گذشتہ] dddd [بوقت] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s بعد', + past : '%s قبل', + s : 'چند سیکنڈ', + ss : '%d سیکنڈ', + m : 'ایک منٹ', + mm : '%d منٹ', + h : 'ایک گھنٹہ', + hh : '%d گھنٹے', + d : 'ایک دن', + dd : '%d دن', + M : 'ایک ماہ', + MM : '%d ماہ', + y : 'ایک سال', + yy : '%d سال' + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('uz-latn', { + months : 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'), + monthsShort : 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), + weekdays : 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'), + weekdaysShort : 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), + weekdaysMin : 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'D MMMM YYYY, dddd HH:mm' + }, + calendar : { + sameDay : '[Bugun soat] LT [da]', + nextDay : '[Ertaga] LT [da]', + nextWeek : 'dddd [kuni soat] LT [da]', + lastDay : '[Kecha soat] LT [da]', + lastWeek : '[O\'tgan] dddd [kuni soat] LT [da]', + sameElse : 'L' + }, + relativeTime : { + future : 'Yaqin %s ichida', + past : 'Bir necha %s oldin', + s : 'soniya', + ss : '%d soniya', + m : 'bir daqiqa', + mm : '%d daqiqa', + h : 'bir soat', + hh : '%d soat', + d : 'bir kun', + dd : '%d kun', + M : 'bir oy', + MM : '%d oy', + y : 'bir yil', + yy : '%d yil' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('uz', { + months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), + monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'), + weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'), + weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'D MMMM YYYY, dddd HH:mm' + }, + calendar : { + sameDay : '[Бугун соат] LT [да]', + nextDay : '[Эртага] LT [да]', + nextWeek : 'dddd [куни соат] LT [да]', + lastDay : '[Кеча соат] LT [да]', + lastWeek : '[Утган] dddd [куни соат] LT [да]', + sameElse : 'L' + }, + relativeTime : { + future : 'Якин %s ичида', + past : 'Бир неча %s олдин', + s : 'фурсат', + ss : '%d фурсат', + m : 'бир дакика', + mm : '%d дакика', + h : 'бир соат', + hh : '%d соат', + d : 'бир кун', + dd : '%d кун', + M : 'бир ой', + MM : '%d ой', + y : 'бир йил', + yy : '%d йил' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('vi', { + months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'), + monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'), + monthsParseExact : true, + weekdays : 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'), + weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysParseExact : true, + meridiemParse: /sa|ch/i, + isPM : function (input) { + return /^ch$/i.test(input); + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'sa' : 'SA'; + } else { + return isLower ? 'ch' : 'CH'; + } + }, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM [năm] YYYY', + LLL : 'D MMMM [năm] YYYY HH:mm', + LLLL : 'dddd, D MMMM [năm] YYYY HH:mm', + l : 'DD/M/YYYY', + ll : 'D MMM YYYY', + lll : 'D MMM YYYY HH:mm', + llll : 'ddd, D MMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Hôm nay lúc] LT', + nextDay: '[Ngày mai lúc] LT', + nextWeek: 'dddd [tuần tới lúc] LT', + lastDay: '[Hôm qua lúc] LT', + lastWeek: 'dddd [tuần rồi lúc] LT', + sameElse: 'L' + }, + relativeTime : { + future : '%s tới', + past : '%s trước', + s : 'vài giây', + ss : '%d giây' , + m : 'một phút', + mm : '%d phút', + h : 'một giờ', + hh : '%d giờ', + d : 'một ngày', + dd : '%d ngày', + M : 'một tháng', + MM : '%d tháng', + y : 'một năm', + yy : '%d năm' + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal : function (number) { + return number; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('x-pseudo', { + months : 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'), + monthsShort : 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'), + monthsParseExact : true, + weekdays : 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'), + weekdaysShort : 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'), + weekdaysMin : 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[T~ódá~ý át] LT', + nextDay : '[T~ómó~rró~w át] LT', + nextWeek : 'dddd [át] LT', + lastDay : '[Ý~ést~érdá~ý át] LT', + lastWeek : '[L~ást] dddd [át] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'í~ñ %s', + past : '%s á~gó', + s : 'á ~féw ~sécó~ñds', + ss : '%d s~écóñ~ds', + m : 'á ~míñ~úté', + mm : '%d m~íñú~tés', + h : 'á~ñ hó~úr', + hh : '%d h~óúrs', + d : 'á ~dáý', + dd : '%d d~áýs', + M : 'á ~móñ~th', + MM : '%d m~óñt~hs', + y : 'á ~ýéár', + yy : '%d ý~éárs' + }, + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('yo', { + months : 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'), + monthsShort : 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'), + weekdays : 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'), + weekdaysShort : 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'), + weekdaysMin : 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Ònì ni] LT', + nextDay : '[Ọ̀la ni] LT', + nextWeek : 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT', + lastDay : '[Àna ni] LT', + lastWeek : 'dddd [Ọsẹ̀ tólọ́] [ni] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ní %s', + past : '%s kọjá', + s : 'ìsẹjú aayá die', + ss :'aayá %d', + m : 'ìsẹjú kan', + mm : 'ìsẹjú %d', + h : 'wákati kan', + hh : 'wákati %d', + d : 'ọjọ́ kan', + dd : 'ọjọ́ %d', + M : 'osù kan', + MM : 'osù %d', + y : 'ọdún kan', + yy : 'ọdún %d' + }, + dayOfMonthOrdinalParse : /ọjọ́\s\d{1,2}/, + ordinal : 'ọjọ́ %d', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('zh-cn', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'), + weekdaysMin : '日_一_二_三_四_五_六'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日Ah点mm分', + LLLL : 'YYYY年M月D日ddddAh点mm分', + l : 'YYYY/M/D', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日dddd HH:mm' + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || + meridiem === '上午') { + return hour; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } else { + // '中午' + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar : { + sameDay : '[今天]LT', + nextDay : '[明天]LT', + nextWeek : '[下]ddddLT', + lastDay : '[昨天]LT', + lastWeek : '[上]ddddLT', + sameElse : 'L' + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '周'; + default: + return number; + } + }, + relativeTime : { + future : '%s内', + past : '%s前', + s : '几秒', + ss : '%d 秒', + m : '1 分钟', + mm : '%d 分钟', + h : '1 小时', + hh : '%d 小时', + d : '1 天', + dd : '%d 天', + M : '1 个月', + MM : '%d 个月', + y : '1 年', + yy : '%d 年' + }, + week : { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('zh-hk', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin : '日_一_二_三_四_五_六'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日 HH:mm', + LLLL : 'YYYY年M月D日dddd HH:mm', + l : 'YYYY/M/D', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日dddd HH:mm' + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar : { + sameDay : '[今天]LT', + nextDay : '[明天]LT', + nextWeek : '[下]ddddLT', + lastDay : '[昨天]LT', + lastWeek : '[上]ddddLT', + sameElse : 'L' + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal : function (number, period) { + switch (period) { + case 'd' : + case 'D' : + case 'DDD' : + return number + '日'; + case 'M' : + return number + '月'; + case 'w' : + case 'W' : + return number + '週'; + default : + return number; + } + }, + relativeTime : { + future : '%s內', + past : '%s前', + s : '幾秒', + ss : '%d 秒', + m : '1 分鐘', + mm : '%d 分鐘', + h : '1 小時', + hh : '%d 小時', + d : '1 天', + dd : '%d 天', + M : '1 個月', + MM : '%d 個月', + y : '1 年', + yy : '%d 年' + } + }); + + //! moment.js locale configuration + + hooks.defineLocale('zh-tw', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin : '日_一_二_三_四_五_六'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日 HH:mm', + LLLL : 'YYYY年M月D日dddd HH:mm', + l : 'YYYY/M/D', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日dddd HH:mm' + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar : { + sameDay : '[今天] LT', + nextDay : '[明天] LT', + nextWeek : '[下]dddd LT', + lastDay : '[昨天] LT', + lastWeek : '[上]dddd LT', + sameElse : 'L' + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal : function (number, period) { + switch (period) { + case 'd' : + case 'D' : + case 'DDD' : + return number + '日'; + case 'M' : + return number + '月'; + case 'w' : + case 'W' : + return number + '週'; + default : + return number; + } + }, + relativeTime : { + future : '%s內', + past : '%s前', + s : '幾秒', + ss : '%d 秒', + m : '1 分鐘', + mm : '%d 分鐘', + h : '1 小時', + hh : '%d 小時', + d : '1 天', + dd : '%d 天', + M : '1 個月', + MM : '%d 個月', + y : '1 年', + yy : '%d 年' + } + }); + + hooks.locale('en'); + + return hooks; + +}))); diff --git a/node_modules/moment/min/moment-with-locales.min.js b/node_modules/moment/min/moment-with-locales.min.js new file mode 100644 index 00000000..d81e02ca --- /dev/null +++ b/node_modules/moment/min/moment-with-locales.min.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):e.moment=a()}(this,function(){"use strict";var e,n;function l(){return e.apply(null,arguments)}function _(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){return void 0===e}function m(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function M(e,a){var t,s=[];for(t=0;t>>0,s=0;sTe(e)?(d=e+1,_-Te(e)):(d=e,_),{year:d,dayOfYear:r}}function Ce(e,a,t){var s,n,d=Ne(e.year(),a,t),r=Math.floor((e.dayOfYear()-d-1)/7)+1;return r<1?s=r+Ie(n=e.year()-1,a,t):r>Ie(e.year(),a,t)?(s=r-Ie(e.year(),a,t),n=e.year()+1):(n=e.year(),s=r),{week:s,year:n}}function Ie(e,a,t){var s=Ne(e,a,t),n=Ne(e+1,a,t);return(Te(e)-s+n)/7}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),O("week","w"),O("isoWeek","W"),E("week",5),E("isoWeek",5),ie("w",B),ie("ww",B,V),ie("W",B),ie("WW",B,V),Me(["w","ww","W","WW"],function(e,a,t,s){a[s.substr(0,1)]=g(e)});function Ue(e,a){return e.slice(a,7).concat(e.slice(0,a))}C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),O("day","d"),O("weekday","e"),O("isoWeekday","E"),E("day",11),E("weekday",11),E("isoWeekday",11),ie("d",B),ie("e",B),ie("E",B),ie("dd",function(e,a){return a.weekdaysMinRegex(e)}),ie("ddd",function(e,a){return a.weekdaysShortRegex(e)}),ie("dddd",function(e,a){return a.weekdaysRegex(e)}),Me(["dd","ddd","dddd"],function(e,a,t,s){var n=t._locale.weekdaysParse(e,s,t._strict);null!=n?a.d=n:Y(t).invalidWeekday=e}),Me(["d","e","E"],function(e,a,t,s){a[s]=g(e)});var Ge="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ve="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Ze=re;var $e=re;var Be=re;function qe(){function e(e,a){return a.length-e.length}var a,t,s,n,d,r=[],_=[],i=[],o=[];for(a=0;a<7;a++)t=c([2e3,1]).day(a),s=this.weekdaysMin(t,""),n=this.weekdaysShort(t,""),d=this.weekdays(t,""),r.push(s),_.push(n),i.push(d),o.push(s),o.push(n),o.push(d);for(r.sort(e),_.sort(e),i.sort(e),o.sort(e),a=0;a<7;a++)_[a]=me(_[a]),i[a]=me(i[a]),o[a]=me(o[a]);this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+_.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,a){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)})}function ea(e,a){return a._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,Qe),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+Qe.apply(this)+F(this.minutes(),2)}),C("hmmss",0,0,function(){return""+Qe.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),O("hour","h"),E("hour",13),ie("a",ea),ie("A",ea),ie("H",B),ie("h",B),ie("k",B),ie("HH",B,V),ie("hh",B,V),ie("kk",B,V),ie("hmm",q),ie("hmmss",Q),ie("Hmm",q),ie("Hmmss",Q),le(["H","HH"],Ye),le(["k","kk"],function(e,a,t){var s=g(e);a[Ye]=24===s?0:s}),le(["a","A"],function(e,a,t){t._isPm=t._locale.isPM(e),t._meridiem=e}),le(["h","hh"],function(e,a,t){a[Ye]=g(e),Y(t).bigHour=!0}),le("hmm",function(e,a,t){var s=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s)),Y(t).bigHour=!0}),le("hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s,2)),a[fe]=g(e.substr(n)),Y(t).bigHour=!0}),le("Hmm",function(e,a,t){var s=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s))}),le("Hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s,2)),a[fe]=g(e.substr(n))});var aa,ta=Se("Hours",!0),sa={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Oe,monthsShort:Pe,week:{dow:0,doy:6},weekdays:Ge,weekdaysMin:Ke,weekdaysShort:Ve,meridiemParse:/[ap]\.?m?\.?/i},na={},da={};function ra(e){return e?e.toLowerCase().replace("_","-"):e}function _a(e){var a=null;if(!na[e]&&"undefined"!=typeof module&&module&&module.exports)try{a=aa._abbr,require("./locale/"+e),ia(a)}catch(e){}return na[e]}function ia(e,a){var t;return e&&((t=o(a)?ma(e):oa(e,a))?aa=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),aa._abbr}function oa(e,a){if(null===a)return delete na[e],null;var t,s=sa;if(a.abbr=e,null!=na[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=na[e]._config;else if(null!=a.parentLocale)if(null!=na[a.parentLocale])s=na[a.parentLocale]._config;else{if(null==(t=_a(a.parentLocale)))return da[a.parentLocale]||(da[a.parentLocale]=[]),da[a.parentLocale].push({name:e,config:a}),null;s=t._config}return na[e]=new j(b(s,a)),da[e]&&da[e].forEach(function(e){oa(e.name,e.config)}),ia(e),na[e]}function ma(e){var a;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return aa;if(!_(e)){if(a=_a(e))return a;e=[e]}return function(e){for(var a,t,s,n,d=0;d=a&&r(n,t,!0)>=a-1)break;a--}d++}return aa}(e)}function ua(e){var a,t=e._a;return t&&-2===Y(e).overflow&&(a=t[Le]<0||11je(t[he],t[Le])?ce:t[Ye]<0||24Ie(t,d,r)?Y(e)._overflowWeeks=!0:null!=i?Y(e)._overflowWeekday=!0:(_=Re(t,s,n,d,r),e._a[he]=_.year,e._dayOfYear=_.dayOfYear)}(e),null!=e._dayOfYear&&(d=la(e._a[he],s[he]),(e._dayOfYear>Te(d)||0===e._dayOfYear)&&(Y(e)._overflowDayOfYear=!0),t=Je(d,0,e._dayOfYear),e._a[Le]=t.getUTCMonth(),e._a[ce]=t.getUTCDate()),a=0;a<3&&null==e._a[a];++a)e._a[a]=r[a]=s[a];for(;a<7;a++)e._a[a]=r[a]=null==e._a[a]?2===a?1:0:e._a[a];24===e._a[Ye]&&0===e._a[ye]&&0===e._a[fe]&&0===e._a[ke]&&(e._nextDay=!0,e._a[Ye]=0),e._d=(e._useUTC?Je:function(e,a,t,s,n,d,r){var _;return e<100&&0<=e?(_=new Date(e+400,a,t,s,n,d,r),isFinite(_.getFullYear())&&_.setFullYear(e)):_=new Date(e,a,t,s,n,d,r),_}).apply(null,r),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ye]=24),e._w&&void 0!==e._w.d&&e._w.d!==n&&(Y(e).weekdayMismatch=!0)}}var ha=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,La=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ca=/Z|[+-]\d\d(?::?\d\d)?/,Ya=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ya=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],fa=/^\/?Date\((\-?\d+)/i;function ka(e){var a,t,s,n,d,r,_=e._i,i=ha.exec(_)||La.exec(_);if(i){for(Y(e).iso=!0,a=0,t=Ya.length;at.valueOf():t.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Mt.isLocal=function(){return!!this.isValid()&&!this._isUTC},Mt.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Mt.isUtc=Ra,Mt.isUTC=Ra,Mt.zoneAbbr=function(){return this._isUTC?"UTC":""},Mt.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Mt.dates=t("dates accessor is deprecated. Use date instead.",_t),Mt.months=t("months accessor is deprecated. Use month instead",Ae),Mt.years=t("years accessor is deprecated. Use year instead",ve),Mt.zone=t("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,a){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,a),this):-this.utcOffset()}),Mt.isDSTShifted=t("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e={};if(k(e,this),(e=va(e))._a){var a=e._isUTC?c(e._a):Ha(e._a);this._isDSTShifted=this.isValid()&&0>>0,s=0;sSe(e)?(r=e+1,o-Se(e)):(r=e,o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(Se(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),C("week","w"),C("isoWeek","W"),F("week",5),F("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=D(e)});function je(e,t){return e.slice(t,7).concat(e.slice(0,t))}I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),C("day","d"),C("weekday","e"),C("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=D(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var $e="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var qe=ae;var Je=ae;var Be=ae;function Qe(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=he(o[t]),u[t]=he(u[t]),l[t]=he(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Xe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Xe.apply(this)+L(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Xe.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+L(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),C("hour","h"),F("hour",13),ue("a",et),ue("A",et),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=D(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=D(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i))});var tt,nt=Te("Hours",!0),st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ce,monthsShort:He,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){var t=null;if(!it[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=tt._abbr,require("./locale/"+e),ut(t)}catch(e){}return it[e]}function ut(e,t){var n;return e&&((n=l(t)?ht(e):lt(e,t))?tt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),tt._abbr}function lt(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ot(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new P(x(s,t)),rt[e]&&rt[e].forEach(function(e){lt(e.name,e.config)}),ut(e),it[e]}function ht(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return tt;if(!o(e)){if(t=ot(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r=t&&a(i,n,!0)>=t-1)break;t--}r++}return tt}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11Pe(n[me],n[_e])?ye:n[ge]<0||24Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ct(e._a[me],s[me]),(e._dayOfYear>Se(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[ve]&&0===e._a[pe]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var mt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=/Z|[+-]\d\d(?::?\d\d)?/,gt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],vt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function wt(e){var t,n,s,i,r,a,o=e._i,u=mt.exec(o)||_t.exec(o);if(u){for(g(e).iso=!0,t=0,n=gt.length;tn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},mn.isLocal=function(){return!!this.isValid()&&!this._isUTC},mn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},mn.isUtc=Et,mn.isUTC=Et,mn.zoneAbbr=function(){return this._isUTC?"UTC":""},mn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},mn.dates=n("dates accessor is deprecated. Use date instead.",un),mn.months=n("months accessor is deprecated. Use month instead",Ue),mn.years=n("years accessor is deprecated. Use year instead",Oe),mn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),mn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Ot(e))._a){var t=e._isUTC?y(e._a):bt(e._a);this._isDSTShifted=this.isValid()&&0 string); + interface CalendarSpec { + sameDay?: CalendarSpecVal; + nextDay?: CalendarSpecVal; + lastDay?: CalendarSpecVal; + nextWeek?: CalendarSpecVal; + lastWeek?: CalendarSpecVal; + sameElse?: CalendarSpecVal; + + // any additional properties might be used with moment.calendarFormat + [x: string]: CalendarSpecVal | void; // undefined + } + + type RelativeTimeSpecVal = ( + string | + ((n: number, withoutSuffix: boolean, + key: RelativeTimeKey, isFuture: boolean) => string) + ); + type RelativeTimeFuturePastVal = string | ((relTime: string) => string); + + interface RelativeTimeSpec { + future?: RelativeTimeFuturePastVal; + past?: RelativeTimeFuturePastVal; + s?: RelativeTimeSpecVal; + ss?: RelativeTimeSpecVal; + m?: RelativeTimeSpecVal; + mm?: RelativeTimeSpecVal; + h?: RelativeTimeSpecVal; + hh?: RelativeTimeSpecVal; + d?: RelativeTimeSpecVal; + dd?: RelativeTimeSpecVal; + M?: RelativeTimeSpecVal; + MM?: RelativeTimeSpecVal; + y?: RelativeTimeSpecVal; + yy?: RelativeTimeSpecVal; + } + + interface LongDateFormatSpec { + LTS: string; + LT: string; + L: string; + LL: string; + LLL: string; + LLLL: string; + + // lets forget for a sec that any upper/lower permutation will also work + lts?: string; + lt?: string; + l?: string; + ll?: string; + lll?: string; + llll?: string; + } + + type MonthWeekdayFn = (momentToFormat: Moment, format?: string) => string; + type WeekdaySimpleFn = (momentToFormat: Moment) => string; + + interface LocaleSpecification { + months?: string[] | StandaloneFormatSpec | MonthWeekdayFn; + monthsShort?: string[] | StandaloneFormatSpec | MonthWeekdayFn; + + weekdays?: string[] | StandaloneFormatSpec | MonthWeekdayFn; + weekdaysShort?: string[] | StandaloneFormatSpec | WeekdaySimpleFn; + weekdaysMin?: string[] | StandaloneFormatSpec | WeekdaySimpleFn; + + meridiemParse?: RegExp; + meridiem?: (hour: number, minute:number, isLower: boolean) => string; + + isPM?: (input: string) => boolean; + + longDateFormat?: LongDateFormatSpec; + calendar?: CalendarSpec; + relativeTime?: RelativeTimeSpec; + invalidDate?: string; + ordinal?: (n: number) => string; + ordinalParse?: RegExp; + + week?: WeekSpec; + + // Allow anything: in general any property that is passed as locale spec is + // put in the locale object so it can be used by locale functions + [x: string]: any; + } + + interface MomentObjectOutput { + years: number; + /* One digit */ + months: number; + /* Day of the month */ + date: number; + hours: number; + minutes: number; + seconds: number; + milliseconds: number; + } + + interface Duration { + clone(): Duration; + + humanize(withSuffix?: boolean): string; + + abs(): Duration; + + as(units: unitOfTime.Base): number; + get(units: unitOfTime.Base): number; + + milliseconds(): number; + asMilliseconds(): number; + + seconds(): number; + asSeconds(): number; + + minutes(): number; + asMinutes(): number; + + hours(): number; + asHours(): number; + + days(): number; + asDays(): number; + + weeks(): number; + asWeeks(): number; + + months(): number; + asMonths(): number; + + years(): number; + asYears(): number; + + add(inp?: DurationInputArg1, unit?: DurationInputArg2): Duration; + subtract(inp?: DurationInputArg1, unit?: DurationInputArg2): Duration; + + locale(): string; + locale(locale: LocaleSpecifier): Duration; + localeData(): Locale; + + toISOString(): string; + toJSON(): string; + + isValid(): boolean; + + /** + * @deprecated since version 2.8.0 + */ + lang(locale: LocaleSpecifier): Moment; + /** + * @deprecated since version 2.8.0 + */ + lang(): Locale; + /** + * @deprecated + */ + toIsoString(): string; + } + + interface MomentRelativeTime { + future: any; + past: any; + s: any; + ss: any; + m: any; + mm: any; + h: any; + hh: any; + d: any; + dd: any; + M: any; + MM: any; + y: any; + yy: any; + } + + interface MomentLongDateFormat { + L: string; + LL: string; + LLL: string; + LLLL: string; + LT: string; + LTS: string; + + l?: string; + ll?: string; + lll?: string; + llll?: string; + lt?: string; + lts?: string; + } + + interface MomentParsingFlags { + empty: boolean; + unusedTokens: string[]; + unusedInput: string[]; + overflow: number; + charsLeftOver: number; + nullInput: boolean; + invalidMonth: string | void; // null + invalidFormat: boolean; + userInvalidated: boolean; + iso: boolean; + parsedDateParts: any[]; + meridiem: string | void; // null + } + + interface MomentParsingFlagsOpt { + empty?: boolean; + unusedTokens?: string[]; + unusedInput?: string[]; + overflow?: number; + charsLeftOver?: number; + nullInput?: boolean; + invalidMonth?: string; + invalidFormat?: boolean; + userInvalidated?: boolean; + iso?: boolean; + parsedDateParts?: any[]; + meridiem?: string; + } + + interface MomentBuiltinFormat { + __momentBuiltinFormatBrand: any; + } + + type MomentFormatSpecification = string | MomentBuiltinFormat | (string | MomentBuiltinFormat)[]; + + namespace unitOfTime { + type Base = ( + "year" | "years" | "y" | + "month" | "months" | "M" | + "week" | "weeks" | "w" | + "day" | "days" | "d" | + "hour" | "hours" | "h" | + "minute" | "minutes" | "m" | + "second" | "seconds" | "s" | + "millisecond" | "milliseconds" | "ms" + ); + + type _quarter = "quarter" | "quarters" | "Q"; + type _isoWeek = "isoWeek" | "isoWeeks" | "W"; + type _date = "date" | "dates" | "D"; + type DurationConstructor = Base | _quarter; + + type DurationAs = Base; + + type StartOf = Base | _quarter | _isoWeek | _date | void; // null + + type Diff = Base | _quarter; + + type MomentConstructor = Base | _date; + + type All = Base | _quarter | _isoWeek | _date | + "weekYear" | "weekYears" | "gg" | + "isoWeekYear" | "isoWeekYears" | "GG" | + "dayOfYear" | "dayOfYears" | "DDD" | + "weekday" | "weekdays" | "e" | + "isoWeekday" | "isoWeekdays" | "E"; + } + + interface MomentInputObject { + years?: number; + year?: number; + y?: number; + + months?: number; + month?: number; + M?: number; + + days?: number; + day?: number; + d?: number; + + dates?: number; + date?: number; + D?: number; + + hours?: number; + hour?: number; + h?: number; + + minutes?: number; + minute?: number; + m?: number; + + seconds?: number; + second?: number; + s?: number; + + milliseconds?: number; + millisecond?: number; + ms?: number; + } + + interface DurationInputObject extends MomentInputObject { + quarters?: number; + quarter?: number; + Q?: number; + + weeks?: number; + week?: number; + w?: number; + } + + interface MomentSetObject extends MomentInputObject { + weekYears?: number; + weekYear?: number; + gg?: number; + + isoWeekYears?: number; + isoWeekYear?: number; + GG?: number; + + quarters?: number; + quarter?: number; + Q?: number; + + weeks?: number; + week?: number; + w?: number; + + isoWeeks?: number; + isoWeek?: number; + W?: number; + + dayOfYears?: number; + dayOfYear?: number; + DDD?: number; + + weekdays?: number; + weekday?: number; + e?: number; + + isoWeekdays?: number; + isoWeekday?: number; + E?: number; + } + + interface FromTo { + from: MomentInput; + to: MomentInput; + } + + type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined + type DurationInputArg1 = Duration | number | string | FromTo | DurationInputObject | void; // null | undefined + type DurationInputArg2 = unitOfTime.DurationConstructor; + type LocaleSpecifier = string | Moment | Duration | string[] | boolean; + + interface MomentCreationData { + input: MomentInput; + format?: MomentFormatSpecification; + locale: Locale; + isUTC: boolean; + strict?: boolean; + } + + interface Moment extends Object { + format(format?: string): string; + + startOf(unitOfTime: unitOfTime.StartOf): Moment; + endOf(unitOfTime: unitOfTime.StartOf): Moment; + + add(amount?: DurationInputArg1, unit?: DurationInputArg2): Moment; + /** + * @deprecated reverse syntax + */ + add(unit: unitOfTime.DurationConstructor, amount: number|string): Moment; + + subtract(amount?: DurationInputArg1, unit?: DurationInputArg2): Moment; + /** + * @deprecated reverse syntax + */ + subtract(unit: unitOfTime.DurationConstructor, amount: number|string): Moment; + + calendar(time?: MomentInput, formats?: CalendarSpec): string; + + clone(): Moment; + + /** + * @return Unix timestamp in milliseconds + */ + valueOf(): number; + + // current date/time in local mode + local(keepLocalTime?: boolean): Moment; + isLocal(): boolean; + + // current date/time in UTC mode + utc(keepLocalTime?: boolean): Moment; + isUTC(): boolean; + /** + * @deprecated use isUTC + */ + isUtc(): boolean; + + parseZone(): Moment; + isValid(): boolean; + invalidAt(): number; + + hasAlignedHourOffset(other?: MomentInput): boolean; + + creationData(): MomentCreationData; + parsingFlags(): MomentParsingFlags; + + year(y: number): Moment; + year(): number; + /** + * @deprecated use year(y) + */ + years(y: number): Moment; + /** + * @deprecated use year() + */ + years(): number; + quarter(): number; + quarter(q: number): Moment; + quarters(): number; + quarters(q: number): Moment; + month(M: number|string): Moment; + month(): number; + /** + * @deprecated use month(M) + */ + months(M: number|string): Moment; + /** + * @deprecated use month() + */ + months(): number; + day(d: number|string): Moment; + day(): number; + days(d: number|string): Moment; + days(): number; + date(d: number): Moment; + date(): number; + /** + * @deprecated use date(d) + */ + dates(d: number): Moment; + /** + * @deprecated use date() + */ + dates(): number; + hour(h: number): Moment; + hour(): number; + hours(h: number): Moment; + hours(): number; + minute(m: number): Moment; + minute(): number; + minutes(m: number): Moment; + minutes(): number; + second(s: number): Moment; + second(): number; + seconds(s: number): Moment; + seconds(): number; + millisecond(ms: number): Moment; + millisecond(): number; + milliseconds(ms: number): Moment; + milliseconds(): number; + weekday(): number; + weekday(d: number): Moment; + isoWeekday(): number; + isoWeekday(d: number|string): Moment; + weekYear(): number; + weekYear(d: number): Moment; + isoWeekYear(): number; + isoWeekYear(d: number): Moment; + week(): number; + week(d: number): Moment; + weeks(): number; + weeks(d: number): Moment; + isoWeek(): number; + isoWeek(d: number): Moment; + isoWeeks(): number; + isoWeeks(d: number): Moment; + weeksInYear(): number; + isoWeeksInYear(): number; + dayOfYear(): number; + dayOfYear(d: number): Moment; + + from(inp: MomentInput, suffix?: boolean): string; + to(inp: MomentInput, suffix?: boolean): string; + fromNow(withoutSuffix?: boolean): string; + toNow(withoutPrefix?: boolean): string; + + diff(b: MomentInput, unitOfTime?: unitOfTime.Diff, precise?: boolean): number; + + toArray(): number[]; + toDate(): Date; + toISOString(keepOffset?: boolean): string; + inspect(): string; + toJSON(): string; + unix(): number; + + isLeapYear(): boolean; + /** + * @deprecated in favor of utcOffset + */ + zone(): number; + zone(b: number|string): Moment; + utcOffset(): number; + utcOffset(b: number|string, keepLocalTime?: boolean): Moment; + isUtcOffset(): boolean; + daysInMonth(): number; + isDST(): boolean; + + zoneAbbr(): string; + zoneName(): string; + + isBefore(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean; + isAfter(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean; + isSame(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean; + isSameOrAfter(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean; + isSameOrBefore(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean; + isBetween(a: MomentInput, b: MomentInput, granularity?: unitOfTime.StartOf, inclusivity?: "()" | "[)" | "(]" | "[]"): boolean; + + /** + * @deprecated as of 2.8.0, use locale + */ + lang(language: LocaleSpecifier): Moment; + /** + * @deprecated as of 2.8.0, use locale + */ + lang(): Locale; + + locale(): string; + locale(locale: LocaleSpecifier): Moment; + + localeData(): Locale; + + /** + * @deprecated no reliable implementation + */ + isDSTShifted(): boolean; + + // NOTE(constructor): Same as moment constructor + /** + * @deprecated as of 2.7.0, use moment.min/max + */ + max(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment; + /** + * @deprecated as of 2.7.0, use moment.min/max + */ + max(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment; + + // NOTE(constructor): Same as moment constructor + /** + * @deprecated as of 2.7.0, use moment.min/max + */ + min(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment; + /** + * @deprecated as of 2.7.0, use moment.min/max + */ + min(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment; + + get(unit: unitOfTime.All): number; + set(unit: unitOfTime.All, value: number): Moment; + set(objectLiteral: MomentSetObject): Moment; + + toObject(): MomentObjectOutput; + } + + export var version: string; + export var fn: Moment; + + // NOTE(constructor): Same as moment constructor + export function utc(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment; + export function utc(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment; + + export function unix(timestamp: number): Moment; + + export function invalid(flags?: MomentParsingFlagsOpt): Moment; + export function isMoment(m: any): m is Moment; + export function isDate(m: any): m is Date; + export function isDuration(d: any): d is Duration; + + /** + * @deprecated in 2.8.0 + */ + export function lang(language?: string): string; + /** + * @deprecated in 2.8.0 + */ + export function lang(language?: string, definition?: Locale): string; + + export function locale(language?: string): string; + export function locale(language?: string[]): string; + export function locale(language?: string, definition?: LocaleSpecification | void): string; // null | undefined + + export function localeData(key?: string | string[]): Locale; + + export function duration(inp?: DurationInputArg1, unit?: DurationInputArg2): Duration; + + // NOTE(constructor): Same as moment constructor + export function parseZone(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment; + export function parseZone(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment; + + export function months(): string[]; + export function months(index: number): string; + export function months(format: string): string[]; + export function months(format: string, index: number): string; + export function monthsShort(): string[]; + export function monthsShort(index: number): string; + export function monthsShort(format: string): string[]; + export function monthsShort(format: string, index: number): string; + + export function weekdays(): string[]; + export function weekdays(index: number): string; + export function weekdays(format: string): string[]; + export function weekdays(format: string, index: number): string; + export function weekdays(localeSorted: boolean): string[]; + export function weekdays(localeSorted: boolean, index: number): string; + export function weekdays(localeSorted: boolean, format: string): string[]; + export function weekdays(localeSorted: boolean, format: string, index: number): string; + export function weekdaysShort(): string[]; + export function weekdaysShort(index: number): string; + export function weekdaysShort(format: string): string[]; + export function weekdaysShort(format: string, index: number): string; + export function weekdaysShort(localeSorted: boolean): string[]; + export function weekdaysShort(localeSorted: boolean, index: number): string; + export function weekdaysShort(localeSorted: boolean, format: string): string[]; + export function weekdaysShort(localeSorted: boolean, format: string, index: number): string; + export function weekdaysMin(): string[]; + export function weekdaysMin(index: number): string; + export function weekdaysMin(format: string): string[]; + export function weekdaysMin(format: string, index: number): string; + export function weekdaysMin(localeSorted: boolean): string[]; + export function weekdaysMin(localeSorted: boolean, index: number): string; + export function weekdaysMin(localeSorted: boolean, format: string): string[]; + export function weekdaysMin(localeSorted: boolean, format: string, index: number): string; + + export function min(moments: Moment[]): Moment; + export function min(...moments: Moment[]): Moment; + export function max(moments: Moment[]): Moment; + export function max(...moments: Moment[]): Moment; + + /** + * Returns unix time in milliseconds. Overwrite for profit. + */ + export function now(): number; + + export function defineLocale(language: string, localeSpec: LocaleSpecification | void): Locale; // null + export function updateLocale(language: string, localeSpec: LocaleSpecification | void): Locale; // null + + export function locales(): string[]; + + export function normalizeUnits(unit: unitOfTime.All): string; + export function relativeTimeThreshold(threshold: string): number | boolean; + export function relativeTimeThreshold(threshold: string, limit: number): boolean; + export function relativeTimeRounding(fn: (num: number) => number): boolean; + export function relativeTimeRounding(): (num: number) => number; + export function calendarFormat(m: Moment, now: Moment): string; + + export function parseTwoDigitYear(input: string): number; + + /** + * Constant used to enable explicit ISO_8601 format parsing. + */ + export var ISO_8601: MomentBuiltinFormat; + export var RFC_2822: MomentBuiltinFormat; + + export var defaultFormat: string; + export var defaultFormatUtc: string; + + export var HTML5_FMT: { + DATETIME_LOCAL: string, + DATETIME_LOCAL_SECONDS: string, + DATETIME_LOCAL_MS: string, + DATE: string, + TIME: string, + TIME_SECONDS: string, + TIME_MS: string, + WEEK: string, + MONTH: string + }; + +} + +export = moment; diff --git a/node_modules/moment/moment.js b/node_modules/moment/moment.js new file mode 100644 index 00000000..1b129716 --- /dev/null +++ b/node_modules/moment/moment.js @@ -0,0 +1,4602 @@ +//! moment.js + +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + global.moment = factory() +}(this, (function () { 'use strict'; + + var hookCallback; + + function hooks () { + return hookCallback.apply(null, arguments); + } + + // This is done to register the method called with moment() + // without creating circular dependencies. + function setHookCallback (callback) { + hookCallback = callback; + } + + function isArray(input) { + return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; + } + + function isObject(input) { + // IE8 will treat undefined and null as object if it wasn't for + // input != null + return input != null && Object.prototype.toString.call(input) === '[object Object]'; + } + + function isObjectEmpty(obj) { + if (Object.getOwnPropertyNames) { + return (Object.getOwnPropertyNames(obj).length === 0); + } else { + var k; + for (k in obj) { + if (obj.hasOwnProperty(k)) { + return false; + } + } + return true; + } + } + + function isUndefined(input) { + return input === void 0; + } + + function isNumber(input) { + return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; + } + + function isDate(input) { + return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; + } + + function map(arr, fn) { + var res = [], i; + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); + } + return res; + } + + function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); + } + + function extend(a, b) { + for (var i in b) { + if (hasOwnProp(b, i)) { + a[i] = b[i]; + } + } + + if (hasOwnProp(b, 'toString')) { + a.toString = b.toString; + } + + if (hasOwnProp(b, 'valueOf')) { + a.valueOf = b.valueOf; + } + + return a; + } + + function createUTC (input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); + } + + function defaultParsingFlags() { + // We need to deep clone this object. + return { + empty : false, + unusedTokens : [], + unusedInput : [], + overflow : -2, + charsLeftOver : 0, + nullInput : false, + invalidMonth : null, + invalidFormat : false, + userInvalidated : false, + iso : false, + parsedDateParts : [], + meridiem : null, + rfc2822 : false, + weekdayMismatch : false + }; + } + + function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + return m._pf; + } + + var some; + if (Array.prototype.some) { + some = Array.prototype.some; + } else { + some = function (fun) { + var t = Object(this); + var len = t.length >>> 0; + + for (var i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m); + var parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }); + var isNowValid = !isNaN(m._d.getTime()) && + flags.overflow < 0 && + !flags.empty && + !flags.invalidMonth && + !flags.invalidWeekday && + !flags.weekdayMismatch && + !flags.nullInput && + !flags.invalidFormat && + !flags.userInvalidated && + (!flags.meridiem || (flags.meridiem && parsedParts)); + + if (m._strict) { + isNowValid = isNowValid && + flags.charsLeftOver === 0 && + flags.unusedTokens.length === 0 && + flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } + else { + return isNowValid; + } + } + return m._isValid; + } + + function createInvalid (flags) { + var m = createUTC(NaN); + if (flags != null) { + extend(getParsingFlags(m), flags); + } + else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } + + // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + var momentProperties = hooks.momentProperties = []; + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + if (!isUndefined(from._i)) { + to._i = from._i; + } + if (!isUndefined(from._f)) { + to._f = from._f; + } + if (!isUndefined(from._l)) { + to._l = from._l; + } + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + var updateInProgress = false; + + // Moment prototype object + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + if (!this.isValid()) { + this._d = new Date(NaN); + } + // Prevent infinite loop in case updateOffset creates new moment + // objects. + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment (obj) { + return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); + } + + function absFloor (number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } + + // compare two arrays, return the number of differences + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + for (i = 0; i < len; i++) { + if ((dontConvert && array1[i] !== array2[i]) || + (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { + diffs++; + } + } + return diffs + lengthDiff; + } + + function warn(msg) { + if (hooks.suppressDeprecationWarnings === false && + (typeof console !== 'undefined') && console.warn) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + if (firstTime) { + var args = []; + var arg; + for (var i = 0; i < arguments.length; i++) { + arg = ''; + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + for (var key in arguments[0]) { + arg += key + ': ' + arguments[0][key] + ', '; + } + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + args.push(arg); + } + warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack); + firstTime = false; + } + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + + function set (config) { + var prop, i; + for (i in config) { + prop = config[i]; + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + this._config = config; + // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + this._dayOfMonthOrdinalParseLenient = new RegExp( + (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + + '|' + (/\d{1,2}/).source); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), prop; + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && + !hasOwnProp(childConfig, prop) && + isObject(parentConfig[prop])) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, res = []; + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + return res; + }; + } + + var defaultCalendar = { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }; + + function calendar (key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + var defaultLongDateFormat = { + LTS : 'h:mm:ss A', + LT : 'h:mm A', + L : 'MM/DD/YYYY', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY h:mm A', + LLLL : 'dddd, MMMM D, YYYY h:mm A' + }; + + function longDateFormat (key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate () { + return this._invalidDate; + } + + var defaultOrdinal = '%d'; + var defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal (number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }; + + function relativeTime (number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return (isFunction(output)) ? + output(number, withoutSuffix, string, isFuture) : + output.replace(/%d/i, number); + } + + function pastFuture (diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias (unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = []; + for (var u in unitsObj) { + units.push({unit: u, priority: priorities[u]}); + } + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return (sign ? (forceSign ? '+' : '') : '-') + + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + + var formatFunctions = {}; + + var formatTokenFunctions = {}; + + // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + function addFormatToken (token, padded, ordinal, callback) { + var func = callback; + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + if (token) { + formatTokenFunctions[token] = func; + } + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), i, length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', i; + for (i = 0; i < length; i++) { + output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; + } + return output; + }; + } + + // format date using native date object + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); + + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var match1 = /\d/; // 0 - 9 + var match2 = /\d\d/; // 00 - 99 + var match3 = /\d{3}/; // 000 - 999 + var match4 = /\d{4}/; // 0000 - 9999 + var match6 = /[+-]?\d{6}/; // -999999 - 999999 + var match1to2 = /\d\d?/; // 0 - 99 + var match3to4 = /\d\d\d\d?/; // 999 - 9999 + var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 + var match1to3 = /\d{1,3}/; // 0 - 999 + var match1to4 = /\d{1,4}/; // 0 - 9999 + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + + var matchUnsigned = /\d+/; // 0 - inf + var matchSigned = /[+-]?\d+/; // -inf - inf + + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z + + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; + + var regexes = {}; + + function addRegexToken (token, regex, strictRegex) { + regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { + return (isStrict && strictRegex) ? strictRegex : regex; + }; + } + + function getParseRegexForToken (token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } + + // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + function unescapeFormat(s) { + return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + })); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken (token, callback) { + var i, func = callback; + if (typeof token === 'string') { + token = [token]; + } + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken (token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0; + var MONTH = 1; + var DATE = 2; + var HOUR = 3; + var MINUTE = 4; + var SECOND = 5; + var MILLISECOND = 6; + var WEEK = 7; + var WEEKDAY = 8; + + // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; + }); + + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); + + // ALIASES + + addUnitAlias('year', 'y'); + + // PRIORITIES + + addUnitPriority('year', 1); + + // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); + + // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + function isLeapYear(year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + } + + // HOOKS + + hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; + + // MOMENTS + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear () { + return isLeapYear(this.year()); + } + + function makeGetSet (unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get (mom, unit) { + return mom.isValid() ? + mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; + } + + function set$1 (mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); + } + else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } + + // MOMENTS + + function stringGet (units) { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](); + } + return this; + } + + + function stringSet (units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units); + for (var i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](value); + } + } + return this; + } + + function mod(n, x) { + return ((n % x) + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2); + } + + // FORMATTING + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); + + // ALIASES + + addUnitAlias('month', 'M'); + + // PRIORITY + + addUnitPriority('month', 8); + + // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); + // if we didn't find a month name, mark the date as invalid. + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); + + // LOCALES + + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); + function localeMonths (m, format) { + if (!m) { + return isArray(this._months) ? this._months : + this._months['standalone']; + } + return isArray(this._months) ? this._months[m.month()] : + this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; + } + + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); + function localeMonthsShort (m, format) { + if (!m) { + return isArray(this._monthsShort) ? this._monthsShort : + this._monthsShort['standalone']; + } + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : + this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, ii, mom, llc = monthName.toLocaleLowerCase(); + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse (monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } + + // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); + } + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } + + // MOMENTS + + function setMonth (mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); + // TODO: Another silent failure? + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + return mom; + } + + function getSetMonth (value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth () { + return daysInMonth(this.year(), this.month()); + } + + var defaultMonthsShortRegex = matchWord; + function monthsShortRegex (isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + return this._monthsShortStrictRegex && isStrict ? + this._monthsShortStrictRegex : this._monthsShortRegex; + } + } + + var defaultMonthsRegex = matchWord; + function monthsRegex (isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + return this._monthsStrictRegex && isStrict ? + this._monthsStrictRegex : this._monthsRegex; + } + } + + function computeMonthsParse () { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], longPieces = [], mixedPieces = [], + i, mom; + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } + // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + } + + function createDate (y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date; + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + date = new Date(y + 400, m, d, h, M, s, ms); + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + + return date; + } + + function createUTCDate (y) { + var date; + // the Date.UTC function remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + var args = Array.prototype.slice.call(arguments); + // preserve leap years using a full 400 year cycle, then reset + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + + return date; + } + + // start-of-first-week - start-of-year + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + + return -fwdlw + fwd - 1; + } + + // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } + + // FORMATTING + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); + + // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); + + // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); + + // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); + + // HELPERS + + // LOCALES + + function localeWeek (mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + }; + + function localeFirstDayOfWeek () { + return this._week.dow; + } + + function localeFirstDayOfYear () { + return this._week.doy; + } + + // MOMENTS + + function getSetWeek (input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek (input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + // FORMATTING + + addFormatToken('d', 0, 'do', 'day'); + + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); + + // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); + + // PRIORITY + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); + + // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); + // if we didn't get a weekday name, mark the date as invalid + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); + + // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + return isNaN(input) ? null : input; + } + + // LOCALES + function shiftWeekdays (ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); + } + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); + function localeWeekdays (m, format) { + var weekdays = isArray(this._weekdays) ? this._weekdays : + this._weekdays[(m && m !== true && this._weekdays.isFormat.test(format)) ? 'format' : 'standalone']; + return (m === true) ? shiftWeekdays(weekdays, this._week.dow) + : (m) ? weekdays[m.day()] : weekdays; + } + + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + function localeWeekdaysShort (m) { + return (m === true) ? shiftWeekdays(this._weekdaysShort, this._week.dow) + : (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + function localeWeekdaysMin (m) { + return (m === true) ? shiftWeekdays(this._weekdaysMin, this._week.dow) + : (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse (weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + + mom = createUTC([2000, 1]).day(i); + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); + } + if (!this._weekdaysParse[i]) { + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } + + // MOMENTS + + function getSetDayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + var defaultWeekdaysRegex = matchWord; + function weekdaysRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + return this._weekdaysStrictRegex && isStrict ? + this._weekdaysStrictRegex : this._weekdaysRegex; + } + } + + var defaultWeekdaysShortRegex = matchWord; + function weekdaysShortRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + return this._weekdaysShortStrictRegex && isStrict ? + this._weekdaysShortStrictRegex : this._weekdaysShortRegex; + } + } + + var defaultWeekdaysMinRegex = matchWord; + function weekdaysMinRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + return this._weekdaysMinStrictRegex && isStrict ? + this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + } + } + + + function computeWeekdaysParse () { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], + i, mom, minp, shortp, longp; + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } + // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + + this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); + } + + // FORMATTING + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + + addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2); + }); + + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + + addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2); + }); + + function meridiem (token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } + + meridiem('a', true); + meridiem('A', false); + + // ALIASES + + addUnitAlias('hour', 'h'); + + // PRIORITY + addUnitPriority('hour', 13); + + // PARSING + + function matchMeridiem (isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); + + // LOCALES + + function localeIsPM (input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return ((input + '').toLowerCase().charAt(0) === 'p'); + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + function localeMeridiem (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } + + + // MOMENTS + + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + var getSetHour = makeGetSet('Hours', true); + + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + + week: defaultLocaleWeek, + + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + + meridiemParse: defaultLocaleMeridiemParse + }; + + // internal storage for locale config files + var locales = {}; + var localeFamilies = {}; + var globalLocale; + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } + + // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + function chooseLocale(names) { + var i = 0, j, next, locale, split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + if (locale) { + return locale; + } + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + j--; + } + i++; + } + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null; + // TODO: Find a better way to register and load all the locales in Node + if (!locales[name] && (typeof module !== 'undefined') && + module && module.exports) { + try { + oldLocale = globalLocale._abbr; + var aliasedRequire = require; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) {} + } + return locales[name]; + } + + // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + function getSetGlobalLocale (key, values) { + var data; + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } + else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } + else { + if ((typeof console !== 'undefined') && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn('Locale ' + key + ' not found. Did you forget to load it?'); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale (name, config) { + if (config !== null) { + var locale, parentConfig = baseConfig; + config.abbr = name; + if (locales[name] != null) { + deprecateSimple('defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change ' + + 'an existing locale. moment.defineLocale(localeName, ' + + 'config) should only be used for creating a new locale ' + + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + localeFamilies[config.parentLocale].push({ + name: name, + config: config + }); + return null; + } + } + } + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } + + // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + getSetGlobalLocale(name); + + + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, tmpLocale, parentConfig = baseConfig; + // MERGE + tmpLocale = loadLocale(name); + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + config = mergeConfigs(parentConfig, config); + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; + + // backwards compat for now: also set the locale + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + return locales[name]; + } + + // returns locale data + function getLocale (key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + if (locale) { + return locale; + } + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } + + function checkOverflow (m) { + var overflow; + var a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = + a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : + a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : + a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : + a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : + a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : + a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : + -1; + + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } + + // Pick the first defined of two or three arguments. + function defaults(a, b, c) { + if (a != null) { + return a; + } + if (b != null) { + return b; + } + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + if (config._useUTC) { + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; + } + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } + + // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + function configFromArray (config) { + var i, date, input = [], currentDate, expectedWeekday, yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); + + //compute day of the year from weeks and weekdays + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } + + //if the day of the year is set, figure out what it is + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } + + // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } + + // Zero out whatever was not defaulted, including time + for (; i < 7; i++) { + config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; + } + + // Check for 24:00:00.000 + if (config._a[HOUR] === 24 && + config._a[MINUTE] === 0 && + config._a[SECOND] === 0 && + config._a[MILLISECOND] === 0) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); + expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); + + // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } + + // check for mismatching day of week + if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; + + w = config._w; + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; + + // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + + var curWeek = weekOfYear(createLocal(), dow, doy); + + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); + + // Default to current week. + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } + + // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + + var isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, false], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, false], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], + // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, false], + ['YYYYDDD', /\d{7}/] + ]; + + // iso time formats and regexes + var isoTimes = [ + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/] + ]; + + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; + + // date from iso format + function configFromISO(config) { + var i, l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, dateFormat, timeFormat, tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + if (dateFormat == null) { + config._isValid = false; + return; + } + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + if (timeFormat == null) { + config._isValid = false; + return; + } + } + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } + + // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + 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{4}))$/; + + function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result = [ + untruncateYear(yearStr), + defaultLocaleMonthsShort.indexOf(monthStr), + parseInt(dayStr, 10), + parseInt(hourStr, 10), + parseInt(minuteStr, 10) + ]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + return year; + } + + 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, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + return true; + } + + var obsOffsets = { + UT: 0, + 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 calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10); + var m = hm % 100, h = (hm - m) / 100; + return h * 60 + m; + } + } + + // date and time from ref 2822 format + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)); + if (match) { + var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + + config._d = createUTCDate.apply(null, config._a); + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } + + // date from iso format or fallback + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + // Final attempt, use Input Fallback + hooks.createFromInputFallback(config); + } + + hooks.createFromInputFallback = deprecate( + 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + + 'discouraged and will be removed in an upcoming major release. Please refer to ' + + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', + function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + } + ); + + // constant that refers to the ISO standard + hooks.ISO_8601 = function () {}; + + // constant that refers to the RFC 2822 form + hooks.RFC_2822 = function () {}; + + // date from string and format string + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + config._a = []; + getParsingFlags(config).empty = true; + + // This array is used to make a Date, either with `new Date` or `Date.UTC` + var string = '' + config._i, + i, parsedInput, tokens, token, skipped, + stringLength = string.length, + totalParsedInputLength = 0; + + tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; + // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); + totalParsedInputLength += parsedInput.length; + } + // don't parse if it's not a known token + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } + else { + getParsingFlags(config).unusedTokens.push(token); + } + addTimeToArrayFromToken(token, parsedInput, config); + } + else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } + + // add remaining unparsed input length to the string + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } + + // clear _12h flag if hour is <= 12 + if (config._a[HOUR] <= 12 && + getParsingFlags(config).bigHour === true && + config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; + // handle meridiem + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + + configFromArray(config); + checkOverflow(config); + } + + + function meridiemFixWrap (locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + if (isPm && hour < 12) { + hour += 12; + } + if (!isPm && hour === 12) { + hour = 0; + } + return hour; + } else { + // this is not supposed to happen + return hour; + } + } + + // date from string and array of format strings + function configFromStringAndArray(config) { + var tempConfig, + bestMoment, + + scoreToBeat, + i, + currentScore; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + tempConfig = copyConfig({}, config); + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (!isValid(tempConfig)) { + continue; + } + + // if there is any input that was not parsed add a penalty for that format + currentScore += getParsingFlags(tempConfig).charsLeftOver; + + //or tokens + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + + getParsingFlags(tempConfig).score = currentScore; + + if (scoreToBeat == null || currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i); + config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { + return obj && parseInt(obj, 10); + }); + + configFromArray(config); + } + + function createFromConfig (config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig (config) { + var input = config._i, + format = config._f; + + config._locale = config._locale || getLocale(config._l); + + if (input === null || (format === undefined && input === '')) { + return createInvalid({nullInput: true}); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC (input, format, locale, strict, isUTC) { + var c = {}; + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if ((isObject(input) && isObjectEmpty(input)) || + (isArray(input) && input.length === 0)) { + input = undefined; + } + // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + + return createFromConfig(c); + } + + function createLocal (input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate( + 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + } + ); + + var prototypeMax = deprecate( + 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + } + ); + + // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + function pickBy(fn, moments) { + var res, i; + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + if (!moments.length) { + return createLocal(); + } + res = moments[0]; + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + return res; + } + + // TODO: Use [].sort instead? + function min () { + var args = [].slice.call(arguments, 0); + + return pickBy('isBefore', args); + } + + function max () { + var args = [].slice.call(arguments, 0); + + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +(new Date()); + }; + + var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; + + function isDurationValid(m) { + for (var key in m) { + if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { + return false; + } + } + + var unitHasDecimal = false; + for (var i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration (duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + + this._isValid = isDurationValid(normalizedInput); + + // representation for dateAddRemove + this._milliseconds = +milliseconds + + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + this._days = +days + + weeks * 7; + // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + this._months = +months + + quarters * 3 + + years * 12; + + this._data = {}; + + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration (obj) { + return obj instanceof Duration; + } + + function absRound (number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } + + // FORMATTING + + function offset (token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + if (offset < 0) { + offset = -offset; + sign = '-'; + } + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); + + // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); + + // HELPERS + + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher); + + if (matches === null) { + return null; + } + + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + + return minutes === 0 ? + 0 : + parts[0] === '+' ? minutes : -minutes; + } + + // Return a moment from input, that is local/utc/zone equivalent to model. + function cloneWithOffset(input, model) { + var res, diff; + if (model._isUTC) { + res = model.clone(); + diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); + // Use low-level api, because this fn is low-level api. + res._d.setTime(res._d.valueOf() + diff); + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset (m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; + } + + // HOOKS + + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + hooks.updateOffset = function () {}; + + // MOMENTS + + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + function getSetOffset (input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + if (!this.isValid()) { + return input != null ? this : NaN; + } + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + this._offset = input; + this._isUTC = true; + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract(this, createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone (input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC (keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal (keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + return this; + } + + function setOffsetToParsedOffset () { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + if (tZone != null) { + this.utcOffset(tZone); + } + else { + this.utcOffset(0, true); + } + } + return this; + } + + function hasAlignedHourOffset (input) { + if (!this.isValid()) { + return false; + } + input = input ? createLocal(input).utcOffset() : 0; + + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime () { + return ( + this.utcOffset() > this.clone().month(0).utcOffset() || + this.utcOffset() > this.clone().month(5).utcOffset() + ); + } + + function isDaylightSavingTimeShifted () { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}; + + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = this.isValid() && + compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal () { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset () { + return this.isValid() ? this._isUTC : false; + } + + function isUtc () { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } + + // ASP.NET json date format regex + var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; + + // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration (input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms : input._milliseconds, + d : input._days, + M : input._months + }; + } else if (isNumber(input)) { + duration = {}; + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } else if (!!(match = aspNetRegex.exec(input))) { + sign = (match[1] === '-') ? -1 : 1; + duration = { + y : 0, + d : toInt(match[DATE]) * sign, + h : toInt(match[HOUR]) * sign, + m : toInt(match[MINUTE]) * sign, + s : toInt(match[SECOND]) * sign, + ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match + }; + } else if (!!(match = isoRegex.exec(input))) { + sign = (match[1] === '-') ? -1 : 1; + duration = { + y : parseIso(match[2], sign), + M : parseIso(match[3], sign), + w : parseIso(match[4], sign), + d : parseIso(match[5], sign), + h : parseIso(match[6], sign), + m : parseIso(match[7], sign), + s : parseIso(match[8], sign) + }; + } else if (duration == null) {// checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); + + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso (inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); + // apply sign while we're at it + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {}; + + res.months = other.month() - base.month() + + (other.year() - base.year()) * 12; + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +(base.clone().add(res.months, 'M')); + + return res; + } + + function momentsDifference(base, other) { + var res; + if (!(base.isValid() && other.isValid())) { + return {milliseconds: 0, months: 0}; + } + + other = cloneWithOffset(other, base); + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } + + // TODO: remove 'name' arg after deprecation is removed + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; + //invert the arguments, but complain about it + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); + tmp = val; val = period; period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract (mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'); + var subtract = createAdder(-1, 'subtract'); + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 ? 'sameElse' : + diff < -1 ? 'lastWeek' : + diff < 0 ? 'lastDay' : + diff < 1 ? 'sameDay' : + diff < 2 ? 'nextDay' : + diff < 7 ? 'nextWeek' : 'sameElse'; + } + + function calendar$1 (time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse'; + + var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); + + return this.format(output || this.localeData().calendar(format, this, createLocal(now))); + } + + function clone () { + return new Moment(this); + } + + function isAfter (input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore (input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween (from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + inclusivity = inclusivity || '()'; + return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && + (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); + } + + function isSame (input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); + } + } + + function isSameOrAfter (input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore (input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff (input, units, asFloat) { + var that, + zoneDelta, + output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + + units = normalizeUnits(units); + + switch (units) { + case 'year': output = monthDiff(this, that) / 12; break; + case 'month': output = monthDiff(this, that); break; + case 'quarter': output = monthDiff(this, that) / 3; break; + case 'second': output = (this - that) / 1e3; break; // 1000 + case 'minute': output = (this - that) / 6e4; break; // 1000 * 60 + case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60 + case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst + case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst + default: output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff (a, b) { + // difference in months + var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor2 - anchor); + } + + //check for negative zero, return zero if negative zero + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString () { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + var utc = keepOffset !== true; + var m = utc ? this.clone().utc() : this; + if (m.year() < 0 || m.year() > 9999) { + return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); + } + } + return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + function inspect () { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + var func = 'moment'; + var zone = ''; + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + var prefix = '[' + func + '("]'; + var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY'; + var datetime = '-MM-DD[T]HH:mm:ss.SSS'; + var suffix = zone + '[")]'; + + return this.format(prefix + year + datetime + suffix); + } + + function format (inputString) { + if (!inputString) { + inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; + } + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from (time, withoutSuffix) { + if (this.isValid() && + ((isMoment(time) && time.isValid()) || + createLocal(time).isValid())) { + return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow (withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to (time, withoutSuffix) { + if (this.isValid() && + ((isMoment(time) && time.isValid()) || + createLocal(time).isValid())) { + return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow (withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } + + // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + function locale (key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + if (newLocaleData != null) { + this._locale = newLocaleData; + } + return this; + } + } + + var lang = deprecate( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + } + ); + + function localeData () { + return this._locale; + } + + var MS_PER_SECOND = 1000; + var MS_PER_MINUTE = 60 * MS_PER_SECOND; + var MS_PER_HOUR = 60 * MS_PER_MINUTE; + var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; + + // actual modulo - handles negative numbers (for dates before 1970): + function mod$1(dividend, divisor) { + return (dividend % divisor + divisor) % divisor; + } + + function localStartOfDate(y, m, d) { + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } + } + + function utcStartOfDate(y, m, d) { + // Date.UTC remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } + } + + function startOf (units) { + var time; + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year(), 0, 1); + break; + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3, 1); + break; + case 'month': + time = startOfDate(this.year(), this.month(), 1); + break; + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); + break; + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); + break; + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date()); + break; + case 'hour': + time = this._d.valueOf(); + time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); + break; + case 'minute': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + case 'second': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + + function endOf (units) { + var time; + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; + break; + case 'month': + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; + break; + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; + break; + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + case 'hour': + time = this._d.valueOf(); + time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; + break; + case 'minute': + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + case 'second': + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + + function valueOf () { + return this._d.valueOf() - ((this._offset || 0) * 60000); + } + + function unix () { + return Math.floor(this.valueOf() / 1000); + } + + function toDate () { + return new Date(this.valueOf()); + } + + function toArray () { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; + } + + function toObject () { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds() + }; + } + + function toJSON () { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2 () { + return isValid(this); + } + + function parsingFlags () { + return extend({}, getParsingFlags(this)); + } + + function invalidAt () { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; + } + + // FORMATTING + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken (token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); + + // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); + + // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); + + + // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); + }); + + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); + + // MOMENTS + + function getSetWeekYear (input) { + return getSetWeekYearHelper.call(this, + input, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy); + } + + function getSetISOWeekYear (input) { + return getSetWeekYearHelper.call(this, + input, this.isoWeek(), this.isoWeekday(), 1, 4); + } + + function getISOWeeksInYear () { + return weeksInYear(this.year(), 1, 4); + } + + function getWeeksInYear () { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + if (week > weeksTarget) { + week = weeksTarget; + } + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } + + // FORMATTING + + addFormatToken('Q', 0, 'Qo', 'quarter'); + + // ALIASES + + addUnitAlias('quarter', 'Q'); + + // PRIORITY + + addUnitPriority('quarter', 7); + + // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); + + // MOMENTS + + function getSetQuarter (input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); + } + + // FORMATTING + + addFormatToken('D', ['DD', 2], 'Do', 'date'); + + // ALIASES + + addUnitAlias('date', 'D'); + + // PRIORITY + addUnitPriority('date', 9); + + // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict ? + (locale._dayOfMonthOrdinalParse || locale._ordinalParse) : + locale._dayOfMonthOrdinalParseLenient; + }); + + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); + + // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); + + // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); + + // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); + + // PRIORITY + addUnitPriority('dayOfYear', 4); + + // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); + + // HELPERS + + // MOMENTS + + function getSetDayOfYear (input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); + } + + // FORMATTING + + addFormatToken('m', ['mm', 2], 0, 'minute'); + + // ALIASES + + addUnitAlias('minute', 'm'); + + // PRIORITY + + addUnitPriority('minute', 14); + + // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); + + // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); + + // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); + + // ALIASES + + addUnitAlias('second', 's'); + + // PRIORITY + + addUnitPriority('second', 15); + + // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); + + // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); + + // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); + + + // ALIASES + + addUnitAlias('millisecond', 'ms'); + + // PRIORITY + + addUnitPriority('millisecond', 16); + + // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + + var token; + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } + // MOMENTS + + var getSetMillisecond = makeGetSet('Milliseconds', false); + + // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); + + // MOMENTS + + function getZoneAbbr () { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName () { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); + proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); + proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); + proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); + proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); + + function createUnix (input) { + return createLocal(input * 1000); + } + + function createInZone () { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat (string) { + return string; + } + + var proto$1 = Locale.prototype; + + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1 (format, index, field, setter) { + var locale = getLocale(); + var utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl (format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i; + var out = []; + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + return out; + } + + // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + function listWeekdaysImpl (localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + var i; + var out = []; + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + return out; + } + + function listMonths (format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort (format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal : function (number) { + var b = number % 10, + output = (toInt(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } + }); + + // Side effect imports + + hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); + hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); + + var mathAbs = Math.abs; + + function abs () { + var data = this._data; + + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + + return this; + } + + function addSubtract$1 (duration, input, value, direction) { + var other = createDuration(input, value); + + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + + return duration._bubble(); + } + + // supports only 2.0-style add(1, 's') or add(duration) + function add$1 (input, value) { + return addSubtract$1(this, input, value, 1); + } + + // supports only 2.0-style subtract(1, 's') or subtract(duration) + function subtract$1 (input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil (number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble () { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years, monthsFromDays; + + // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + if (!((milliseconds >= 0 && days >= 0 && months >= 0) || + (milliseconds <= 0 && days <= 0 && months <= 0))) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } + + // The following code bubbles up values, see the tests for + // examples of what that means. + data.milliseconds = milliseconds % 1000; + + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + + hours = absFloor(minutes / 60); + data.hours = hours % 24; + + days += absFloor(hours / 24); + + // convert days to months + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + data.days = days; + data.months = months; + data.years = years; + + return this; + } + + function daysToMonths (days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return days * 4800 / 146097; + } + + function monthsToDays (months) { + // the reverse of daysToMonths + return months * 146097 / 4800; + } + + function as (units) { + if (!this.isValid()) { + return NaN; + } + var days; + var months; + var milliseconds = this._milliseconds; + + units = normalizeUnits(units); + + if (units === 'month' || units === 'quarter' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + switch (units) { + case 'month': return months; + case 'quarter': return months / 3; + case 'year': return months / 12; + } + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + switch (units) { + case 'week' : return days / 7 + milliseconds / 6048e5; + case 'day' : return days + milliseconds / 864e5; + case 'hour' : return days * 24 + milliseconds / 36e5; + case 'minute' : return days * 1440 + milliseconds / 6e4; + case 'second' : return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + case 'millisecond': return Math.floor(days * 864e5) + milliseconds; + default: throw new Error('Unknown unit ' + units); + } + } + } + + // TODO: Use this.as('ms')? + function valueOf$1 () { + if (!this.isValid()) { + return NaN; + } + return ( + this._milliseconds + + this._days * 864e5 + + (this._months % 12) * 2592e6 + + toInt(this._months / 12) * 31536e6 + ); + } + + function makeAs (alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'); + var asSeconds = makeAs('s'); + var asMinutes = makeAs('m'); + var asHours = makeAs('h'); + var asDays = makeAs('d'); + var asWeeks = makeAs('w'); + var asMonths = makeAs('M'); + var asQuarters = makeAs('Q'); + var asYears = makeAs('y'); + + function clone$1 () { + return createDuration(this); + } + + function get$2 (units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'); + var seconds = makeGetter('seconds'); + var minutes = makeGetter('minutes'); + var hours = makeGetter('hours'); + var days = makeGetter('days'); + var months = makeGetter('months'); + var years = makeGetter('years'); + + function weeks () { + return absFloor(this.days() / 7); + } + + var round = Math.round; + var thresholds = { + ss: 44, // a few seconds to seconds + s : 45, // seconds to minute + m : 45, // minutes to hour + h : 22, // hours to day + d : 26, // days to month + M : 11 // months to year + }; + + // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function relativeTime$1 (posNegDuration, withoutSuffix, locale) { + var duration = createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + + var a = seconds <= thresholds.ss && ['s', seconds] || + seconds < thresholds.s && ['ss', seconds] || + minutes <= 1 && ['m'] || + minutes < thresholds.m && ['mm', minutes] || + hours <= 1 && ['h'] || + hours < thresholds.h && ['hh', hours] || + days <= 1 && ['d'] || + days < thresholds.d && ['dd', days] || + months <= 1 && ['M'] || + months < thresholds.M && ['MM', months] || + years <= 1 && ['y'] || ['yy', years]; + + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } + + // This function allows you to set the rounding function for relative time strings + function getSetRelativeTimeRounding (roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + if (typeof(roundingFunction) === 'function') { + round = roundingFunction; + return true; + } + return false; + } + + // This function allows you to set a threshold for relative time strings + function getSetRelativeTimeThreshold (threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + if (limit === undefined) { + return thresholds[threshold]; + } + thresholds[threshold] = limit; + if (threshold === 's') { + thresholds.ss = limit - 1; + } + return true; + } + + function humanize (withSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var locale = this.localeData(); + var output = relativeTime$1(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return ((x > 0) - (x < 0)) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000; + var days = abs$1(this._days); + var months = abs$1(this._months); + var minutes, hours, years; + + // 3600 seconds -> 60 minutes -> 1 hour + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + + // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + var Y = years; + var M = months; + var D = days; + var h = hours; + var m = minutes; + var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + var totalSign = total < 0 ? '-' : ''; + var ymSign = sign(this._months) !== sign(total) ? '-' : ''; + var daysSign = sign(this._days) !== sign(total) ? '-' : ''; + var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + + return totalSign + 'P' + + (Y ? ymSign + Y + 'Y' : '') + + (M ? ymSign + M + 'M' : '') + + (D ? daysSign + D + 'D' : '') + + ((h || m || s) ? 'T' : '') + + (h ? hmsSign + h + 'H' : '') + + (m ? hmsSign + m + 'M' : '') + + (s ? hmsSign + s + 'S' : ''); + } + + var proto$2 = Duration.prototype; + + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + + proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); + proto$2.lang = lang; + + // Side effect imports + + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); + + // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); + + // Side effect imports + + + hooks.version = '2.24.0'; + + setHookCallback(createLocal); + + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; + + // currently HTML5 input type only supports 24-hour formats + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // + DATE: 'YYYY-MM-DD', // + TIME: 'HH:mm', // + TIME_SECONDS: 'HH:mm:ss', // + TIME_MS: 'HH:mm:ss.SSS', // + WEEK: 'GGGG-[W]WW', // + MONTH: 'YYYY-MM' // + }; + + return hooks; + +}))); diff --git a/node_modules/moment/package.js b/node_modules/moment/package.js new file mode 100644 index 00000000..aba8d502 --- /dev/null +++ b/node_modules/moment/package.js @@ -0,0 +1,11 @@ +var profile = { + resourceTags: { + ignore: function(filename, mid){ + // only include moment/moment + return mid != "moment/moment"; + }, + amd: function(filename, mid){ + return /\.js$/.test(filename); + } + } +}; diff --git a/node_modules/moment/package.json b/node_modules/moment/package.json new file mode 100644 index 00000000..aa1890b5 --- /dev/null +++ b/node_modules/moment/package.json @@ -0,0 +1,99 @@ +{ + "name": "moment", + "version": "2.24.0", + "description": "Parse, validate, manipulate, and display dates", + "homepage": "http://momentjs.com", + "author": "Iskren Ivov Chernev (https://github.com/ichernev)", + "contributors": [ + "Tim Wood (http://timwoodcreates.com/)", + "Rocky Meza (http://rockymeza.com)", + "Matt Johnson (http://codeofmatt.com)", + "Isaac Cambron (http://isaaccambron.com)", + "Andre Polykanine (https://github.com/oire)" + ], + "keywords": [ + "moment", + "date", + "time", + "parse", + "format", + "validate", + "i18n", + "l10n", + "ender" + ], + "main": "./moment.js", + "jsnext:main": "./src/moment.js", + "typings": "./moment.d.ts", + "engines": { + "node": "*" + }, + "repository": { + "type": "git", + "url": "https://github.com/moment/moment.git" + }, + "bugs": { + "url": "https://github.com/moment/moment/issues" + }, + "license": "MIT", + "devDependencies": { + "benchmark": "latest", + "coveralls": "^3.0.2", + "es6-promise": "latest", + "grunt": "~0.4", + "grunt-benchmark": "latest", + "grunt-cli": "latest", + "grunt-contrib-clean": "latest", + "grunt-contrib-concat": "latest", + "grunt-contrib-copy": "latest", + "grunt-contrib-jshint": "latest", + "grunt-contrib-uglify": "latest", + "grunt-contrib-watch": "^1.1.0", + "grunt-env": "latest", + "grunt-exec": "latest", + "grunt-jscs": "latest", + "grunt-karma": "latest", + "grunt-nuget": "latest", + "grunt-string-replace": "latest", + "karma": "latest", + "karma-chrome-launcher": "latest", + "karma-firefox-launcher": "latest", + "karma-qunit": "latest", + "karma-sauce-launcher": "latest", + "load-grunt-tasks": "~3.5.2", + "node-qunit": "^1.0.0", + "nyc": "~11.9.0", + "qunit": "^2.7.1", + "rollup": "~0.67.4", + "spacejam": "latest", + "typescript": "^1.8.10", + "uglify-js": "latest" + }, + "ender": "./ender.js", + "dojoBuild": "package.js", + "jspm": { + "files": [ + "moment.js", + "moment.d.ts", + "locale" + ], + "map": { + "moment": "./moment" + }, + "buildConfig": { + "uglify": true + } + }, + "scripts": { + "typescript-test": "tsc --project typing-tests", + "test": "grunt test", + "coverage": "nyc npm test && nyc report", + "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls" + }, + "spm": { + "main": "moment.js", + "output": [ + "locale/*.js" + ] + } +} diff --git a/node_modules/moment/src/lib/create/check-overflow.js b/node_modules/moment/src/lib/create/check-overflow.js new file mode 100644 index 00000000..41b539fb --- /dev/null +++ b/node_modules/moment/src/lib/create/check-overflow.js @@ -0,0 +1,34 @@ +import { daysInMonth } from '../units/month'; +import { YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND, WEEK, WEEKDAY } from '../units/constants'; +import getParsingFlags from '../create/parsing-flags'; + +export default function checkOverflow (m) { + var overflow; + var a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = + a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : + a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : + a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : + a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : + a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : + a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : + -1; + + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; +} + diff --git a/node_modules/moment/src/lib/create/date-from-array.js b/node_modules/moment/src/lib/create/date-from-array.js new file mode 100644 index 00000000..7fabbc05 --- /dev/null +++ b/node_modules/moment/src/lib/create/date-from-array.js @@ -0,0 +1,35 @@ +export function createDate (y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date; + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + date = new Date(y + 400, m, d, h, M, s, ms); + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + + return date; +} + +export function createUTCDate (y) { + var date; + // the Date.UTC function remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + var args = Array.prototype.slice.call(arguments); + // preserve leap years using a full 400 year cycle, then reset + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + + return date; +} diff --git a/node_modules/moment/src/lib/create/from-anything.js b/node_modules/moment/src/lib/create/from-anything.js new file mode 100644 index 00000000..e692679b --- /dev/null +++ b/node_modules/moment/src/lib/create/from-anything.js @@ -0,0 +1,110 @@ +import isArray from '../utils/is-array'; +import isObject from '../utils/is-object'; +import isObjectEmpty from '../utils/is-object-empty'; +import isUndefined from '../utils/is-undefined'; +import isNumber from '../utils/is-number'; +import isDate from '../utils/is-date'; +import map from '../utils/map'; +import { createInvalid } from './valid'; +import { Moment, isMoment } from '../moment/constructor'; +import { getLocale } from '../locale/locales'; +import { hooks } from '../utils/hooks'; +import checkOverflow from './check-overflow'; +import { isValid } from './valid'; + +import { configFromStringAndArray } from './from-string-and-array'; +import { configFromStringAndFormat } from './from-string-and-format'; +import { configFromString } from './from-string'; +import { configFromArray } from './from-array'; +import { configFromObject } from './from-object'; + +function createFromConfig (config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; +} + +export function prepareConfig (config) { + var input = config._i, + format = config._f; + + config._locale = config._locale || getLocale(config._l); + + if (input === null || (format === undefined && input === '')) { + return createInvalid({nullInput: true}); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; +} + +function configFromInput(config) { + var input = config._i; + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } +} + +export function createLocalOrUTC (input, format, locale, strict, isUTC) { + var c = {}; + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if ((isObject(input) && isObjectEmpty(input)) || + (isArray(input) && input.length === 0)) { + input = undefined; + } + // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + + return createFromConfig(c); +} diff --git a/node_modules/moment/src/lib/create/from-array.js b/node_modules/moment/src/lib/create/from-array.js new file mode 100644 index 00000000..548992f7 --- /dev/null +++ b/node_modules/moment/src/lib/create/from-array.js @@ -0,0 +1,147 @@ +import { hooks } from '../utils/hooks'; +import { createDate, createUTCDate } from './date-from-array'; +import { daysInYear } from '../units/year'; +import { weekOfYear, weeksInYear, dayOfYearFromWeeks } from '../units/week-calendar-utils'; +import { YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND } from '../units/constants'; +import { createLocal } from './local'; +import defaults from '../utils/defaults'; +import getParsingFlags from './parsing-flags'; + +function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + if (config._useUTC) { + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; + } + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; +} + +// convert an array to a date. +// the array should mirror the parameters below +// note: all values past the year are optional and will default to the lowest possible value. +// [year, month, day , hour, minute, second, millisecond] +export function configFromArray (config) { + var i, date, input = [], currentDate, expectedWeekday, yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); + + //compute day of the year from weeks and weekdays + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } + + //if the day of the year is set, figure out what it is + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } + + // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } + + // Zero out whatever was not defaulted, including time + for (; i < 7; i++) { + config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; + } + + // Check for 24:00:00.000 + if (config._a[HOUR] === 24 && + config._a[MINUTE] === 0 && + config._a[SECOND] === 0 && + config._a[MILLISECOND] === 0) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); + expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); + + // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } + + // check for mismatching day of week + if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { + getParsingFlags(config).weekdayMismatch = true; + } +} + +function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; + + w = config._w; + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; + + // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + + var curWeek = weekOfYear(createLocal(), dow, doy); + + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); + + // Default to current week. + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } +} diff --git a/node_modules/moment/src/lib/create/from-object.js b/node_modules/moment/src/lib/create/from-object.js new file mode 100644 index 00000000..c0bfe9f8 --- /dev/null +++ b/node_modules/moment/src/lib/create/from-object.js @@ -0,0 +1,16 @@ +import { normalizeObjectUnits } from '../units/aliases'; +import { configFromArray } from './from-array'; +import map from '../utils/map'; + +export function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i); + config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { + return obj && parseInt(obj, 10); + }); + + configFromArray(config); +} diff --git a/node_modules/moment/src/lib/create/from-string-and-array.js b/node_modules/moment/src/lib/create/from-string-and-array.js new file mode 100644 index 00000000..1d8a7a80 --- /dev/null +++ b/node_modules/moment/src/lib/create/from-string-and-array.js @@ -0,0 +1,50 @@ +import { copyConfig } from '../moment/constructor'; +import { configFromStringAndFormat } from './from-string-and-format'; +import getParsingFlags from './parsing-flags'; +import { isValid } from './valid'; +import extend from '../utils/extend'; + +// date from string and array of format strings +export function configFromStringAndArray(config) { + var tempConfig, + bestMoment, + + scoreToBeat, + i, + currentScore; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + tempConfig = copyConfig({}, config); + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (!isValid(tempConfig)) { + continue; + } + + // if there is any input that was not parsed add a penalty for that format + currentScore += getParsingFlags(tempConfig).charsLeftOver; + + //or tokens + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + + getParsingFlags(tempConfig).score = currentScore; + + if (scoreToBeat == null || currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + + extend(config, bestMoment || tempConfig); +} diff --git a/node_modules/moment/src/lib/create/from-string-and-format.js b/node_modules/moment/src/lib/create/from-string-and-format.js new file mode 100644 index 00000000..ed921d5b --- /dev/null +++ b/node_modules/moment/src/lib/create/from-string-and-format.js @@ -0,0 +1,113 @@ +import { configFromISO, configFromRFC2822 } from './from-string'; +import { configFromArray } from './from-array'; +import { getParseRegexForToken } from '../parse/regex'; +import { addTimeToArrayFromToken } from '../parse/token'; +import { expandFormat, formatTokenFunctions, formattingTokens } from '../format/format'; +import checkOverflow from './check-overflow'; +import { HOUR } from '../units/constants'; +import { hooks } from '../utils/hooks'; +import getParsingFlags from './parsing-flags'; + +// constant that refers to the ISO standard +hooks.ISO_8601 = function () {}; + +// constant that refers to the RFC 2822 form +hooks.RFC_2822 = function () {}; + +// date from string and format string +export function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + config._a = []; + getParsingFlags(config).empty = true; + + // This array is used to make a Date, either with `new Date` or `Date.UTC` + var string = '' + config._i, + i, parsedInput, tokens, token, skipped, + stringLength = string.length, + totalParsedInputLength = 0; + + tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; + // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); + totalParsedInputLength += parsedInput.length; + } + // don't parse if it's not a known token + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } + else { + getParsingFlags(config).unusedTokens.push(token); + } + addTimeToArrayFromToken(token, parsedInput, config); + } + else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } + + // add remaining unparsed input length to the string + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } + + // clear _12h flag if hour is <= 12 + if (config._a[HOUR] <= 12 && + getParsingFlags(config).bigHour === true && + config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; + // handle meridiem + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + + configFromArray(config); + checkOverflow(config); +} + + +function meridiemFixWrap (locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + if (isPm && hour < 12) { + hour += 12; + } + if (!isPm && hour === 12) { + hour = 0; + } + return hour; + } else { + // this is not supposed to happen + return hour; + } +} diff --git a/node_modules/moment/src/lib/create/from-string.js b/node_modules/moment/src/lib/create/from-string.js new file mode 100644 index 00000000..c5ad56ba --- /dev/null +++ b/node_modules/moment/src/lib/create/from-string.js @@ -0,0 +1,230 @@ +import { configFromStringAndFormat } from './from-string-and-format'; +import { createUTCDate } from './date-from-array'; +import { configFromArray } from './from-array'; +import { hooks } from '../utils/hooks'; +import { deprecate } from '../utils/deprecate'; +import getParsingFlags from './parsing-flags'; +import {defaultLocaleMonthsShort} from '../units/month'; +import {defaultLocaleWeekdaysShort} from '../units/day-of-week'; + +// iso 8601 regex +// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) +var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; +var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + +var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + +var isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, false], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, false], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], + // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, false], + ['YYYYDDD', /\d{7}/] +]; + +// iso time formats and regexes +var isoTimes = [ + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/] +]; + +var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; + +// date from iso format +export function configFromISO(config) { + var i, l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, dateFormat, timeFormat, tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + if (dateFormat == null) { + config._isValid = false; + return; + } + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + if (timeFormat == null) { + config._isValid = false; + return; + } + } + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } +} + +// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 +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{4}))$/; + +function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result = [ + untruncateYear(yearStr), + defaultLocaleMonthsShort.indexOf(monthStr), + parseInt(dayStr, 10), + parseInt(hourStr, 10), + parseInt(minuteStr, 10) + ]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; +} + +function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + return year; +} + +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, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); +} + +function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + return true; +} + +var obsOffsets = { + UT: 0, + 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 calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10); + var m = hm % 100, h = (hm - m) / 100; + return h * 60 + m; + } +} + +// date and time from ref 2822 format +export function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)); + if (match) { + var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + + config._d = createUTCDate.apply(null, config._a); + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } +} + +// date from iso format or fallback +export function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + // Final attempt, use Input Fallback + hooks.createFromInputFallback(config); +} + +hooks.createFromInputFallback = deprecate( + 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + + 'discouraged and will be removed in an upcoming major release. Please refer to ' + + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', + function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + } +); diff --git a/node_modules/moment/src/lib/create/local.js b/node_modules/moment/src/lib/create/local.js new file mode 100644 index 00000000..88c1e269 --- /dev/null +++ b/node_modules/moment/src/lib/create/local.js @@ -0,0 +1,5 @@ +import { createLocalOrUTC } from './from-anything'; + +export function createLocal (input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); +} diff --git a/node_modules/moment/src/lib/create/parsing-flags.js b/node_modules/moment/src/lib/create/parsing-flags.js new file mode 100644 index 00000000..c47173f0 --- /dev/null +++ b/node_modules/moment/src/lib/create/parsing-flags.js @@ -0,0 +1,26 @@ +function defaultParsingFlags() { + // We need to deep clone this object. + return { + empty : false, + unusedTokens : [], + unusedInput : [], + overflow : -2, + charsLeftOver : 0, + nullInput : false, + invalidMonth : null, + invalidFormat : false, + userInvalidated : false, + iso : false, + parsedDateParts : [], + meridiem : null, + rfc2822 : false, + weekdayMismatch : false + }; +} + +export default function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + return m._pf; +} diff --git a/node_modules/moment/src/lib/create/utc.js b/node_modules/moment/src/lib/create/utc.js new file mode 100644 index 00000000..96139530 --- /dev/null +++ b/node_modules/moment/src/lib/create/utc.js @@ -0,0 +1,5 @@ +import { createLocalOrUTC } from './from-anything'; + +export function createUTC (input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); +} diff --git a/node_modules/moment/src/lib/create/valid.js b/node_modules/moment/src/lib/create/valid.js new file mode 100644 index 00000000..d13f12f8 --- /dev/null +++ b/node_modules/moment/src/lib/create/valid.js @@ -0,0 +1,50 @@ +import extend from '../utils/extend'; +import { createUTC } from './utc'; +import getParsingFlags from '../create/parsing-flags'; +import some from '../utils/some'; + +export function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m); + var parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }); + var isNowValid = !isNaN(m._d.getTime()) && + flags.overflow < 0 && + !flags.empty && + !flags.invalidMonth && + !flags.invalidWeekday && + !flags.weekdayMismatch && + !flags.nullInput && + !flags.invalidFormat && + !flags.userInvalidated && + (!flags.meridiem || (flags.meridiem && parsedParts)); + + if (m._strict) { + isNowValid = isNowValid && + flags.charsLeftOver === 0 && + flags.unusedTokens.length === 0 && + flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } + else { + return isNowValid; + } + } + return m._isValid; +} + +export function createInvalid (flags) { + var m = createUTC(NaN); + if (flags != null) { + extend(getParsingFlags(m), flags); + } + else { + getParsingFlags(m).userInvalidated = true; + } + + return m; +} diff --git a/node_modules/moment/src/lib/duration/abs.js b/node_modules/moment/src/lib/duration/abs.js new file mode 100644 index 00000000..103a4cf9 --- /dev/null +++ b/node_modules/moment/src/lib/duration/abs.js @@ -0,0 +1,18 @@ +var mathAbs = Math.abs; + +export function abs () { + var data = this._data; + + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + + return this; +} diff --git a/node_modules/moment/src/lib/duration/add-subtract.js b/node_modules/moment/src/lib/duration/add-subtract.js new file mode 100644 index 00000000..3b44e186 --- /dev/null +++ b/node_modules/moment/src/lib/duration/add-subtract.js @@ -0,0 +1,21 @@ +import { createDuration } from './create'; + +function addSubtract (duration, input, value, direction) { + var other = createDuration(input, value); + + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + + return duration._bubble(); +} + +// supports only 2.0-style add(1, 's') or add(duration) +export function add (input, value) { + return addSubtract(this, input, value, 1); +} + +// supports only 2.0-style subtract(1, 's') or subtract(duration) +export function subtract (input, value) { + return addSubtract(this, input, value, -1); +} diff --git a/node_modules/moment/src/lib/duration/as.js b/node_modules/moment/src/lib/duration/as.js new file mode 100644 index 00000000..fe51a988 --- /dev/null +++ b/node_modules/moment/src/lib/duration/as.js @@ -0,0 +1,66 @@ +import { daysToMonths, monthsToDays } from './bubble'; +import { normalizeUnits } from '../units/aliases'; +import toInt from '../utils/to-int'; + +export function as (units) { + if (!this.isValid()) { + return NaN; + } + var days; + var months; + var milliseconds = this._milliseconds; + + units = normalizeUnits(units); + + if (units === 'month' || units === 'quarter' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + switch (units) { + case 'month': return months; + case 'quarter': return months / 3; + case 'year': return months / 12; + } + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + switch (units) { + case 'week' : return days / 7 + milliseconds / 6048e5; + case 'day' : return days + milliseconds / 864e5; + case 'hour' : return days * 24 + milliseconds / 36e5; + case 'minute' : return days * 1440 + milliseconds / 6e4; + case 'second' : return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + case 'millisecond': return Math.floor(days * 864e5) + milliseconds; + default: throw new Error('Unknown unit ' + units); + } + } +} + +// TODO: Use this.as('ms')? +export function valueOf () { + if (!this.isValid()) { + return NaN; + } + return ( + this._milliseconds + + this._days * 864e5 + + (this._months % 12) * 2592e6 + + toInt(this._months / 12) * 31536e6 + ); +} + +function makeAs (alias) { + return function () { + return this.as(alias); + }; +} + +export var asMilliseconds = makeAs('ms'); +export var asSeconds = makeAs('s'); +export var asMinutes = makeAs('m'); +export var asHours = makeAs('h'); +export var asDays = makeAs('d'); +export var asWeeks = makeAs('w'); +export var asMonths = makeAs('M'); +export var asQuarters = makeAs('Q'); +export var asYears = makeAs('y'); diff --git a/node_modules/moment/src/lib/duration/bubble.js b/node_modules/moment/src/lib/duration/bubble.js new file mode 100644 index 00000000..0c4a336e --- /dev/null +++ b/node_modules/moment/src/lib/duration/bubble.js @@ -0,0 +1,61 @@ +import absFloor from '../utils/abs-floor'; +import absCeil from '../utils/abs-ceil'; +import { createUTCDate } from '../create/date-from-array'; + +export function bubble () { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years, monthsFromDays; + + // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + if (!((milliseconds >= 0 && days >= 0 && months >= 0) || + (milliseconds <= 0 && days <= 0 && months <= 0))) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } + + // The following code bubbles up values, see the tests for + // examples of what that means. + data.milliseconds = milliseconds % 1000; + + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + + hours = absFloor(minutes / 60); + data.hours = hours % 24; + + days += absFloor(hours / 24); + + // convert days to months + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + data.days = days; + data.months = months; + data.years = years; + + return this; +} + +export function daysToMonths (days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return days * 4800 / 146097; +} + +export function monthsToDays (months) { + // the reverse of daysToMonths + return months * 146097 / 4800; +} diff --git a/node_modules/moment/src/lib/duration/clone.js b/node_modules/moment/src/lib/duration/clone.js new file mode 100644 index 00000000..56008d12 --- /dev/null +++ b/node_modules/moment/src/lib/duration/clone.js @@ -0,0 +1,6 @@ +import { createDuration } from './create'; + +export function clone () { + return createDuration(this); +} + diff --git a/node_modules/moment/src/lib/duration/constructor.js b/node_modules/moment/src/lib/duration/constructor.js new file mode 100644 index 00000000..894ba1dc --- /dev/null +++ b/node_modules/moment/src/lib/duration/constructor.js @@ -0,0 +1,44 @@ +import { normalizeObjectUnits } from '../units/aliases'; +import { getLocale } from '../locale/locales'; +import isDurationValid from './valid.js'; + +export function Duration (duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + + this._isValid = isDurationValid(normalizedInput); + + // representation for dateAddRemove + this._milliseconds = +milliseconds + + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + this._days = +days + + weeks * 7; + // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + this._months = +months + + quarters * 3 + + years * 12; + + this._data = {}; + + this._locale = getLocale(); + + this._bubble(); +} + +export function isDuration (obj) { + return obj instanceof Duration; +} diff --git a/node_modules/moment/src/lib/duration/create.js b/node_modules/moment/src/lib/duration/create.js new file mode 100644 index 00000000..3f00f3aa --- /dev/null +++ b/node_modules/moment/src/lib/duration/create.js @@ -0,0 +1,122 @@ +import { Duration, isDuration } from './constructor'; +import isNumber from '../utils/is-number'; +import toInt from '../utils/to-int'; +import absRound from '../utils/abs-round'; +import hasOwnProp from '../utils/has-own-prop'; +import { DATE, HOUR, MINUTE, SECOND, MILLISECOND } from '../units/constants'; +import { cloneWithOffset } from '../units/offset'; +import { createLocal } from '../create/local'; +import { createInvalid as invalid } from './valid'; + +// ASP.NET json date format regex +var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; + +// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html +// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere +// and further modified to allow for strings containing both week and day +var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + +export function createDuration (input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms : input._milliseconds, + d : input._days, + M : input._months + }; + } else if (isNumber(input)) { + duration = {}; + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } else if (!!(match = aspNetRegex.exec(input))) { + sign = (match[1] === '-') ? -1 : 1; + duration = { + y : 0, + d : toInt(match[DATE]) * sign, + h : toInt(match[HOUR]) * sign, + m : toInt(match[MINUTE]) * sign, + s : toInt(match[SECOND]) * sign, + ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match + }; + } else if (!!(match = isoRegex.exec(input))) { + sign = (match[1] === '-') ? -1 : 1; + duration = { + y : parseIso(match[2], sign), + M : parseIso(match[3], sign), + w : parseIso(match[4], sign), + d : parseIso(match[5], sign), + h : parseIso(match[6], sign), + m : parseIso(match[7], sign), + s : parseIso(match[8], sign) + }; + } else if (duration == null) {// checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); + + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + return ret; +} + +createDuration.fn = Duration.prototype; +createDuration.invalid = invalid; + +function parseIso (inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); + // apply sign while we're at it + return (isNaN(res) ? 0 : res) * sign; +} + +function positiveMomentsDifference(base, other) { + var res = {}; + + res.months = other.month() - base.month() + + (other.year() - base.year()) * 12; + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +(base.clone().add(res.months, 'M')); + + return res; +} + +function momentsDifference(base, other) { + var res; + if (!(base.isValid() && other.isValid())) { + return {milliseconds: 0, months: 0}; + } + + other = cloneWithOffset(other, base); + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; +} diff --git a/node_modules/moment/src/lib/duration/duration.js b/node_modules/moment/src/lib/duration/duration.js new file mode 100644 index 00000000..528b5681 --- /dev/null +++ b/node_modules/moment/src/lib/duration/duration.js @@ -0,0 +1,16 @@ +// Side effect imports +import './prototype'; + +import { createDuration } from './create'; +import { isDuration } from './constructor'; +import { + getSetRelativeTimeRounding, + getSetRelativeTimeThreshold +} from './humanize'; + +export { + createDuration, + isDuration, + getSetRelativeTimeRounding, + getSetRelativeTimeThreshold +}; diff --git a/node_modules/moment/src/lib/duration/get.js b/node_modules/moment/src/lib/duration/get.js new file mode 100644 index 00000000..8993e074 --- /dev/null +++ b/node_modules/moment/src/lib/duration/get.js @@ -0,0 +1,25 @@ +import { normalizeUnits } from '../units/aliases'; +import absFloor from '../utils/abs-floor'; + +export function get (units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; +} + +function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; +} + +export var milliseconds = makeGetter('milliseconds'); +export var seconds = makeGetter('seconds'); +export var minutes = makeGetter('minutes'); +export var hours = makeGetter('hours'); +export var days = makeGetter('days'); +export var months = makeGetter('months'); +export var years = makeGetter('years'); + +export function weeks () { + return absFloor(this.days() / 7); +} diff --git a/node_modules/moment/src/lib/duration/humanize.js b/node_modules/moment/src/lib/duration/humanize.js new file mode 100644 index 00000000..454b01ae --- /dev/null +++ b/node_modules/moment/src/lib/duration/humanize.js @@ -0,0 +1,85 @@ +import { createDuration } from './create'; + +var round = Math.round; +var thresholds = { + ss: 44, // a few seconds to seconds + s : 45, // seconds to minute + m : 45, // minutes to hour + h : 22, // hours to day + d : 26, // days to month + M : 11 // months to year +}; + +// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize +function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); +} + +function relativeTime (posNegDuration, withoutSuffix, locale) { + var duration = createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + + var a = seconds <= thresholds.ss && ['s', seconds] || + seconds < thresholds.s && ['ss', seconds] || + minutes <= 1 && ['m'] || + minutes < thresholds.m && ['mm', minutes] || + hours <= 1 && ['h'] || + hours < thresholds.h && ['hh', hours] || + days <= 1 && ['d'] || + days < thresholds.d && ['dd', days] || + months <= 1 && ['M'] || + months < thresholds.M && ['MM', months] || + years <= 1 && ['y'] || ['yy', years]; + + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); +} + +// This function allows you to set the rounding function for relative time strings +export function getSetRelativeTimeRounding (roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + if (typeof(roundingFunction) === 'function') { + round = roundingFunction; + return true; + } + return false; +} + +// This function allows you to set a threshold for relative time strings +export function getSetRelativeTimeThreshold (threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + if (limit === undefined) { + return thresholds[threshold]; + } + thresholds[threshold] = limit; + if (threshold === 's') { + thresholds.ss = limit - 1; + } + return true; +} + +export function humanize (withSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var locale = this.localeData(); + var output = relativeTime(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); +} diff --git a/node_modules/moment/src/lib/duration/iso-string.js b/node_modules/moment/src/lib/duration/iso-string.js new file mode 100644 index 00000000..419f3638 --- /dev/null +++ b/node_modules/moment/src/lib/duration/iso-string.js @@ -0,0 +1,64 @@ +import absFloor from '../utils/abs-floor'; +var abs = Math.abs; + +function sign(x) { + return ((x > 0) - (x < 0)) || +x; +} + +export function toISOString() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs(this._milliseconds) / 1000; + var days = abs(this._days); + var months = abs(this._months); + var minutes, hours, years; + + // 3600 seconds -> 60 minutes -> 1 hour + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + + // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + var Y = years; + var M = months; + var D = days; + var h = hours; + var m = minutes; + var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + var totalSign = total < 0 ? '-' : ''; + var ymSign = sign(this._months) !== sign(total) ? '-' : ''; + var daysSign = sign(this._days) !== sign(total) ? '-' : ''; + var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + + return totalSign + 'P' + + (Y ? ymSign + Y + 'Y' : '') + + (M ? ymSign + M + 'M' : '') + + (D ? daysSign + D + 'D' : '') + + ((h || m || s) ? 'T' : '') + + (h ? hmsSign + h + 'H' : '') + + (m ? hmsSign + m + 'M' : '') + + (s ? hmsSign + s + 'S' : ''); +} diff --git a/node_modules/moment/src/lib/duration/prototype.js b/node_modules/moment/src/lib/duration/prototype.js new file mode 100644 index 00000000..b62d4a2c --- /dev/null +++ b/node_modules/moment/src/lib/duration/prototype.js @@ -0,0 +1,53 @@ +import { Duration } from './constructor'; + +var proto = Duration.prototype; + +import { abs } from './abs'; +import { add, subtract } from './add-subtract'; +import { as, asMilliseconds, asSeconds, asMinutes, asHours, asDays, asWeeks, asMonths, asQuarters, asYears, valueOf } from './as'; +import { bubble } from './bubble'; +import { clone } from './clone'; +import { get, milliseconds, seconds, minutes, hours, days, months, years, weeks } from './get'; +import { humanize } from './humanize'; +import { toISOString } from './iso-string'; +import { lang, locale, localeData } from '../moment/locale'; +import { isValid } from './valid'; + +proto.isValid = isValid; +proto.abs = abs; +proto.add = add; +proto.subtract = subtract; +proto.as = as; +proto.asMilliseconds = asMilliseconds; +proto.asSeconds = asSeconds; +proto.asMinutes = asMinutes; +proto.asHours = asHours; +proto.asDays = asDays; +proto.asWeeks = asWeeks; +proto.asMonths = asMonths; +proto.asQuarters = asQuarters; +proto.asYears = asYears; +proto.valueOf = valueOf; +proto._bubble = bubble; +proto.clone = clone; +proto.get = get; +proto.milliseconds = milliseconds; +proto.seconds = seconds; +proto.minutes = minutes; +proto.hours = hours; +proto.days = days; +proto.weeks = weeks; +proto.months = months; +proto.years = years; +proto.humanize = humanize; +proto.toISOString = toISOString; +proto.toString = toISOString; +proto.toJSON = toISOString; +proto.locale = locale; +proto.localeData = localeData; + +// Deprecations +import { deprecate } from '../utils/deprecate'; + +proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString); +proto.lang = lang; diff --git a/node_modules/moment/src/lib/duration/valid.js b/node_modules/moment/src/lib/duration/valid.js new file mode 100644 index 00000000..033fd5b0 --- /dev/null +++ b/node_modules/moment/src/lib/duration/valid.js @@ -0,0 +1,36 @@ +import toInt from '../utils/to-int'; +import indexOf from '../utils/index-of'; +import {Duration} from './constructor'; +import {createDuration} from './create'; + +var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; + +export default function isDurationValid(m) { + for (var key in m) { + if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { + return false; + } + } + + var unitHasDecimal = false; + for (var i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; +} + +export function isValid() { + return this._isValid; +} + +export function createInvalid() { + return createDuration(NaN); +} diff --git a/node_modules/moment/src/lib/format/format.js b/node_modules/moment/src/lib/format/format.js new file mode 100644 index 00000000..03f5c584 --- /dev/null +++ b/node_modules/moment/src/lib/format/format.js @@ -0,0 +1,92 @@ +import zeroFill from '../utils/zero-fill'; +import isFunction from '../utils/is-function'; + +export var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + +var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + +var formatFunctions = {}; + +export var formatTokenFunctions = {}; + +// token: 'M' +// padded: ['MM', 2] +// ordinal: 'Mo' +// callback: function () { this.month() + 1 } +export function addFormatToken (token, padded, ordinal, callback) { + var func = callback; + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + if (token) { + formatTokenFunctions[token] = func; + } + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } +} + +function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + return input.replace(/\\/g, ''); +} + +function makeFormatFunction(format) { + var array = format.match(formattingTokens), i, length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', i; + for (i = 0; i < length; i++) { + output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; + } + return output; + }; +} + +// format date using native date object +export function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); + + return formatFunctions[format](m); +} + +export function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; +} diff --git a/node_modules/moment/src/lib/locale/base-config.js b/node_modules/moment/src/lib/locale/base-config.js new file mode 100644 index 00000000..d7a7c66d --- /dev/null +++ b/node_modules/moment/src/lib/locale/base-config.js @@ -0,0 +1,44 @@ +import { defaultCalendar } from './calendar'; +import { defaultLongDateFormat } from './formats'; +import { defaultInvalidDate } from './invalid'; +import { defaultOrdinal, defaultDayOfMonthOrdinalParse } from './ordinal'; +import { defaultRelativeTime } from './relative'; + +// months +import { + defaultLocaleMonths, + defaultLocaleMonthsShort, +} from '../units/month'; + +// week +import { defaultLocaleWeek } from '../units/week'; + +// weekdays +import { + defaultLocaleWeekdays, + defaultLocaleWeekdaysMin, + defaultLocaleWeekdaysShort, +} from '../units/day-of-week'; + +// meridiem +import { defaultLocaleMeridiemParse } from '../units/hour'; + +export var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + + week: defaultLocaleWeek, + + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + + meridiemParse: defaultLocaleMeridiemParse +}; diff --git a/node_modules/moment/src/lib/locale/calendar.js b/node_modules/moment/src/lib/locale/calendar.js new file mode 100644 index 00000000..f12214b8 --- /dev/null +++ b/node_modules/moment/src/lib/locale/calendar.js @@ -0,0 +1,15 @@ +export var defaultCalendar = { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' +}; + +import isFunction from '../utils/is-function'; + +export function calendar (key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; +} diff --git a/node_modules/moment/src/lib/locale/constructor.js b/node_modules/moment/src/lib/locale/constructor.js new file mode 100644 index 00000000..c32b73ee --- /dev/null +++ b/node_modules/moment/src/lib/locale/constructor.js @@ -0,0 +1,5 @@ +export function Locale(config) { + if (config != null) { + this.set(config); + } +} diff --git a/node_modules/moment/src/lib/locale/en.js b/node_modules/moment/src/lib/locale/en.js new file mode 100644 index 00000000..4a7d250b --- /dev/null +++ b/node_modules/moment/src/lib/locale/en.js @@ -0,0 +1,15 @@ +import './prototype'; +import { getSetGlobalLocale } from './locales'; +import toInt from '../utils/to-int'; + +getSetGlobalLocale('en', { + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal : function (number) { + var b = number % 10, + output = (toInt(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } +}); diff --git a/node_modules/moment/src/lib/locale/formats.js b/node_modules/moment/src/lib/locale/formats.js new file mode 100644 index 00000000..6d83b039 --- /dev/null +++ b/node_modules/moment/src/lib/locale/formats.js @@ -0,0 +1,23 @@ +export var defaultLongDateFormat = { + LTS : 'h:mm:ss A', + LT : 'h:mm A', + L : 'MM/DD/YYYY', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY h:mm A', + LLLL : 'dddd, MMMM D, YYYY h:mm A' +}; + +export function longDateFormat (key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + + return this._longDateFormat[key]; +} diff --git a/node_modules/moment/src/lib/locale/invalid.js b/node_modules/moment/src/lib/locale/invalid.js new file mode 100644 index 00000000..e9096339 --- /dev/null +++ b/node_modules/moment/src/lib/locale/invalid.js @@ -0,0 +1,5 @@ +export var defaultInvalidDate = 'Invalid date'; + +export function invalidDate () { + return this._invalidDate; +} diff --git a/node_modules/moment/src/lib/locale/lists.js b/node_modules/moment/src/lib/locale/lists.js new file mode 100644 index 00000000..42f7572e --- /dev/null +++ b/node_modules/moment/src/lib/locale/lists.js @@ -0,0 +1,93 @@ +import isNumber from '../utils/is-number'; +import { getLocale } from './locales'; +import { createUTC } from '../create/utc'; + +function get (format, index, field, setter) { + var locale = getLocale(); + var utc = createUTC().set(setter, index); + return locale[field](utc, format); +} + +function listMonthsImpl (format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get(format, index, field, 'month'); + } + + var i; + var out = []; + for (i = 0; i < 12; i++) { + out[i] = get(format, i, field, 'month'); + } + return out; +} + +// () +// (5) +// (fmt, 5) +// (fmt) +// (true) +// (true, 5) +// (true, fmt, 5) +// (true, fmt) +function listWeekdaysImpl (localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0; + + if (index != null) { + return get(format, (index + shift) % 7, field, 'day'); + } + + var i; + var out = []; + for (i = 0; i < 7; i++) { + out[i] = get(format, (i + shift) % 7, field, 'day'); + } + return out; +} + +export function listMonths (format, index) { + return listMonthsImpl(format, index, 'months'); +} + +export function listMonthsShort (format, index) { + return listMonthsImpl(format, index, 'monthsShort'); +} + +export function listWeekdays (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); +} + +export function listWeekdaysShort (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); +} + +export function listWeekdaysMin (localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); +} diff --git a/node_modules/moment/src/lib/locale/locale.js b/node_modules/moment/src/lib/locale/locale.js new file mode 100644 index 00000000..ac9cebfb --- /dev/null +++ b/node_modules/moment/src/lib/locale/locale.js @@ -0,0 +1,39 @@ +// Side effect imports +import './prototype'; + +import { + getSetGlobalLocale, + defineLocale, + updateLocale, + getLocale, + listLocales +} from './locales'; + +import { + listMonths, + listMonthsShort, + listWeekdays, + listWeekdaysShort, + listWeekdaysMin +} from './lists'; + +export { + getSetGlobalLocale, + defineLocale, + updateLocale, + getLocale, + listLocales, + listMonths, + listMonthsShort, + listWeekdays, + listWeekdaysShort, + listWeekdaysMin +}; + +import { deprecate } from '../utils/deprecate'; +import { hooks } from '../utils/hooks'; + +hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); +hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); + +import './en'; diff --git a/node_modules/moment/src/lib/locale/locales.js b/node_modules/moment/src/lib/locale/locales.js new file mode 100644 index 00000000..af28bfe2 --- /dev/null +++ b/node_modules/moment/src/lib/locale/locales.js @@ -0,0 +1,197 @@ +import isArray from '../utils/is-array'; +import hasOwnProp from '../utils/has-own-prop'; +import isUndefined from '../utils/is-undefined'; +import compareArrays from '../utils/compare-arrays'; +import { deprecateSimple } from '../utils/deprecate'; +import { mergeConfigs } from './set'; +import { Locale } from './constructor'; +import keys from '../utils/keys'; + +import { baseConfig } from './base-config'; + +// internal storage for locale config files +var locales = {}; +var localeFamilies = {}; +var globalLocale; + +function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; +} + +// pick the locale from the array +// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each +// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root +function chooseLocale(names) { + var i = 0, j, next, locale, split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + if (locale) { + return locale; + } + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + j--; + } + i++; + } + return globalLocale; +} + +function loadLocale(name) { + var oldLocale = null; + // TODO: Find a better way to register and load all the locales in Node + if (!locales[name] && (typeof module !== 'undefined') && + module && module.exports) { + try { + oldLocale = globalLocale._abbr; + var aliasedRequire = require; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) {} + } + return locales[name]; +} + +// This function will load locale and then set the global locale. If +// no arguments are passed in, it will simply return the current global +// locale key. +export function getSetGlobalLocale (key, values) { + var data; + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } + else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } + else { + if ((typeof console !== 'undefined') && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn('Locale ' + key + ' not found. Did you forget to load it?'); + } + } + } + + return globalLocale._abbr; +} + +export function defineLocale (name, config) { + if (config !== null) { + var locale, parentConfig = baseConfig; + config.abbr = name; + if (locales[name] != null) { + deprecateSimple('defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change ' + + 'an existing locale. moment.defineLocale(localeName, ' + + 'config) should only be used for creating a new locale ' + + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + localeFamilies[config.parentLocale].push({ + name: name, + config: config + }); + return null; + } + } + } + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } + + // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + getSetGlobalLocale(name); + + + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } +} + +export function updateLocale(name, config) { + if (config != null) { + var locale, tmpLocale, parentConfig = baseConfig; + // MERGE + tmpLocale = loadLocale(name); + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + config = mergeConfigs(parentConfig, config); + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; + + // backwards compat for now: also set the locale + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + return locales[name]; +} + +// returns locale data +export function getLocale (key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + if (locale) { + return locale; + } + key = [key]; + } + + return chooseLocale(key); +} + +export function listLocales() { + return keys(locales); +} diff --git a/node_modules/moment/src/lib/locale/ordinal.js b/node_modules/moment/src/lib/locale/ordinal.js new file mode 100644 index 00000000..e2efc05a --- /dev/null +++ b/node_modules/moment/src/lib/locale/ordinal.js @@ -0,0 +1,7 @@ +export var defaultOrdinal = '%d'; +export var defaultDayOfMonthOrdinalParse = /\d{1,2}/; + +export function ordinal (number) { + return this._ordinal.replace('%d', number); +} + diff --git a/node_modules/moment/src/lib/locale/pre-post-format.js b/node_modules/moment/src/lib/locale/pre-post-format.js new file mode 100644 index 00000000..10ed2058 --- /dev/null +++ b/node_modules/moment/src/lib/locale/pre-post-format.js @@ -0,0 +1,3 @@ +export function preParsePostFormat (string) { + return string; +} diff --git a/node_modules/moment/src/lib/locale/prototype.js b/node_modules/moment/src/lib/locale/prototype.js new file mode 100644 index 00000000..24eef89f --- /dev/null +++ b/node_modules/moment/src/lib/locale/prototype.js @@ -0,0 +1,69 @@ +import { Locale } from './constructor'; + +var proto = Locale.prototype; + +import { calendar } from './calendar'; +import { longDateFormat } from './formats'; +import { invalidDate } from './invalid'; +import { ordinal } from './ordinal'; +import { preParsePostFormat } from './pre-post-format'; +import { relativeTime, pastFuture } from './relative'; +import { set } from './set'; + +proto.calendar = calendar; +proto.longDateFormat = longDateFormat; +proto.invalidDate = invalidDate; +proto.ordinal = ordinal; +proto.preparse = preParsePostFormat; +proto.postformat = preParsePostFormat; +proto.relativeTime = relativeTime; +proto.pastFuture = pastFuture; +proto.set = set; + +// Month +import { + localeMonthsParse, + localeMonths, + localeMonthsShort, + monthsRegex, + monthsShortRegex +} from '../units/month'; + +proto.months = localeMonths; +proto.monthsShort = localeMonthsShort; +proto.monthsParse = localeMonthsParse; +proto.monthsRegex = monthsRegex; +proto.monthsShortRegex = monthsShortRegex; + +// Week +import { localeWeek, localeFirstDayOfYear, localeFirstDayOfWeek } from '../units/week'; +proto.week = localeWeek; +proto.firstDayOfYear = localeFirstDayOfYear; +proto.firstDayOfWeek = localeFirstDayOfWeek; + +// Day of Week +import { + localeWeekdaysParse, + localeWeekdays, + localeWeekdaysMin, + localeWeekdaysShort, + + weekdaysRegex, + weekdaysShortRegex, + weekdaysMinRegex +} from '../units/day-of-week'; + +proto.weekdays = localeWeekdays; +proto.weekdaysMin = localeWeekdaysMin; +proto.weekdaysShort = localeWeekdaysShort; +proto.weekdaysParse = localeWeekdaysParse; + +proto.weekdaysRegex = weekdaysRegex; +proto.weekdaysShortRegex = weekdaysShortRegex; +proto.weekdaysMinRegex = weekdaysMinRegex; + +// Hours +import { localeIsPM, localeMeridiem } from '../units/hour'; + +proto.isPM = localeIsPM; +proto.meridiem = localeMeridiem; diff --git a/node_modules/moment/src/lib/locale/relative.js b/node_modules/moment/src/lib/locale/relative.js new file mode 100644 index 00000000..431466b2 --- /dev/null +++ b/node_modules/moment/src/lib/locale/relative.js @@ -0,0 +1,30 @@ +export var defaultRelativeTime = { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' +}; + +import isFunction from '../utils/is-function'; + +export function relativeTime (number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return (isFunction(output)) ? + output(number, withoutSuffix, string, isFuture) : + output.replace(/%d/i, number); +} + +export function pastFuture (diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); +} diff --git a/node_modules/moment/src/lib/locale/set.js b/node_modules/moment/src/lib/locale/set.js new file mode 100644 index 00000000..c63d5ade --- /dev/null +++ b/node_modules/moment/src/lib/locale/set.js @@ -0,0 +1,49 @@ +import isFunction from '../utils/is-function'; +import extend from '../utils/extend'; +import isObject from '../utils/is-object'; +import hasOwnProp from '../utils/has-own-prop'; + +export function set (config) { + var prop, i; + for (i in config) { + prop = config[i]; + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + this._config = config; + // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + this._dayOfMonthOrdinalParseLenient = new RegExp( + (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + + '|' + (/\d{1,2}/).source); +} + +export function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), prop; + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && + !hasOwnProp(childConfig, prop) && + isObject(parentConfig[prop])) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + return res; +} diff --git a/node_modules/moment/src/lib/moment/add-subtract.js b/node_modules/moment/src/lib/moment/add-subtract.js new file mode 100644 index 00000000..e758b5d4 --- /dev/null +++ b/node_modules/moment/src/lib/moment/add-subtract.js @@ -0,0 +1,55 @@ +import { get, set } from './get-set'; +import { setMonth } from '../units/month'; +import { createDuration } from '../duration/create'; +import { deprecateSimple } from '../utils/deprecate'; +import { hooks } from '../utils/hooks'; +import absRound from '../utils/abs-round'; + + +// TODO: remove 'name' arg after deprecation is removed +function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; + //invert the arguments, but complain about it + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); + tmp = val; val = period; period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; +} + +export function addSubtract (mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + if (days) { + set(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } +} + +export var add = createAdder(1, 'add'); +export var subtract = createAdder(-1, 'subtract'); + diff --git a/node_modules/moment/src/lib/moment/calendar.js b/node_modules/moment/src/lib/moment/calendar.js new file mode 100644 index 00000000..4b5725c5 --- /dev/null +++ b/node_modules/moment/src/lib/moment/calendar.js @@ -0,0 +1,26 @@ +import { createLocal } from '../create/local'; +import { cloneWithOffset } from '../units/offset'; +import isFunction from '../utils/is-function'; +import { hooks } from '../utils/hooks'; + +export function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 ? 'sameElse' : + diff < -1 ? 'lastWeek' : + diff < 0 ? 'lastDay' : + diff < 1 ? 'sameDay' : + diff < 2 ? 'nextDay' : + diff < 7 ? 'nextWeek' : 'sameElse'; +} + +export function calendar (time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse'; + + var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); + + return this.format(output || this.localeData().calendar(format, this, createLocal(now))); +} diff --git a/node_modules/moment/src/lib/moment/clone.js b/node_modules/moment/src/lib/moment/clone.js new file mode 100644 index 00000000..d96b328b --- /dev/null +++ b/node_modules/moment/src/lib/moment/clone.js @@ -0,0 +1,5 @@ +import { Moment } from './constructor'; + +export function clone () { + return new Moment(this); +} diff --git a/node_modules/moment/src/lib/moment/compare.js b/node_modules/moment/src/lib/moment/compare.js new file mode 100644 index 00000000..8b23dba0 --- /dev/null +++ b/node_modules/moment/src/lib/moment/compare.js @@ -0,0 +1,63 @@ +import { isMoment } from './constructor'; +import { normalizeUnits } from '../units/aliases'; +import { createLocal } from '../create/local'; + +export function isAfter (input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } +} + +export function isBefore (input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } +} + +export function isBetween (from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + inclusivity = inclusivity || '()'; + return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && + (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); +} + +export function isSame (input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); + } +} + +export function isSameOrAfter (input, units) { + return this.isSame(input, units) || this.isAfter(input, units); +} + +export function isSameOrBefore (input, units) { + return this.isSame(input, units) || this.isBefore(input, units); +} diff --git a/node_modules/moment/src/lib/moment/constructor.js b/node_modules/moment/src/lib/moment/constructor.js new file mode 100644 index 00000000..bc53f814 --- /dev/null +++ b/node_modules/moment/src/lib/moment/constructor.js @@ -0,0 +1,77 @@ +import { hooks } from '../utils/hooks'; +import hasOwnProp from '../utils/has-own-prop'; +import isUndefined from '../utils/is-undefined'; +import getParsingFlags from '../create/parsing-flags'; + +// Plugins that add properties should also add the key here (null value), +// so we can properly clone ourselves. +var momentProperties = hooks.momentProperties = []; + +export function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + if (!isUndefined(from._i)) { + to._i = from._i; + } + if (!isUndefined(from._f)) { + to._f = from._f; + } + if (!isUndefined(from._l)) { + to._l = from._l; + } + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; +} + +var updateInProgress = false; + +// Moment prototype object +export function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + if (!this.isValid()) { + this._d = new Date(NaN); + } + // Prevent infinite loop in case updateOffset creates new moment + // objects. + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } +} + +export function isMoment (obj) { + return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); +} diff --git a/node_modules/moment/src/lib/moment/creation-data.js b/node_modules/moment/src/lib/moment/creation-data.js new file mode 100644 index 00000000..7e2d69aa --- /dev/null +++ b/node_modules/moment/src/lib/moment/creation-data.js @@ -0,0 +1,9 @@ +export function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; +} diff --git a/node_modules/moment/src/lib/moment/diff.js b/node_modules/moment/src/lib/moment/diff.js new file mode 100644 index 00000000..85254dfc --- /dev/null +++ b/node_modules/moment/src/lib/moment/diff.js @@ -0,0 +1,58 @@ +import absFloor from '../utils/abs-floor'; +import { cloneWithOffset } from '../units/offset'; +import { normalizeUnits } from '../units/aliases'; + +export function diff (input, units, asFloat) { + var that, + zoneDelta, + delta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + + units = normalizeUnits(units); + + switch (units) { + case 'year': output = monthDiff(this, that) / 12; break; + case 'month': output = monthDiff(this, that); break; + case 'quarter': output = monthDiff(this, that) / 3; break; + case 'second': output = (this - that) / 1e3; break; // 1000 + case 'minute': output = (this - that) / 6e4; break; // 1000 * 60 + case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60 + case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst + case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst + default: output = this - that; + } + + return asFloat ? output : absFloor(output); +} + +function monthDiff (a, b) { + // difference in months + var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor2 - anchor); + } + + //check for negative zero, return zero if negative zero + return -(wholeMonthDiff + adjust) || 0; +} diff --git a/node_modules/moment/src/lib/moment/format.js b/node_modules/moment/src/lib/moment/format.js new file mode 100644 index 00000000..9544f517 --- /dev/null +++ b/node_modules/moment/src/lib/moment/format.js @@ -0,0 +1,62 @@ +import { formatMoment } from '../format/format'; +import { hooks } from '../utils/hooks'; +import isFunction from '../utils/is-function'; + +hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; +hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + +export function toString () { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); +} + +export function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + var utc = keepOffset !== true; + var m = utc ? this.clone().utc() : this; + if (m.year() < 0 || m.year() > 9999) { + return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); + } + } + return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); +} + +/** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ +export function inspect () { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + var func = 'moment'; + var zone = ''; + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + var prefix = '[' + func + '("]'; + var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY'; + var datetime = '-MM-DD[T]HH:mm:ss.SSS'; + var suffix = zone + '[")]'; + + return this.format(prefix + year + datetime + suffix); +} + +export function format (inputString) { + if (!inputString) { + inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; + } + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); +} diff --git a/node_modules/moment/src/lib/moment/from.js b/node_modules/moment/src/lib/moment/from.js new file mode 100644 index 00000000..4fbd03e4 --- /dev/null +++ b/node_modules/moment/src/lib/moment/from.js @@ -0,0 +1,17 @@ +import { createDuration } from '../duration/create'; +import { createLocal } from '../create/local'; +import { isMoment } from '../moment/constructor'; + +export function from (time, withoutSuffix) { + if (this.isValid() && + ((isMoment(time) && time.isValid()) || + createLocal(time).isValid())) { + return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } +} + +export function fromNow (withoutSuffix) { + return this.from(createLocal(), withoutSuffix); +} diff --git a/node_modules/moment/src/lib/moment/get-set.js b/node_modules/moment/src/lib/moment/get-set.js new file mode 100644 index 00000000..f5035f1a --- /dev/null +++ b/node_modules/moment/src/lib/moment/get-set.js @@ -0,0 +1,61 @@ +import { normalizeUnits, normalizeObjectUnits } from '../units/aliases'; +import { getPrioritizedUnits } from '../units/priorities'; +import { hooks } from '../utils/hooks'; +import isFunction from '../utils/is-function'; +import { daysInMonth } from '../units/month'; +import { isLeapYear } from '../units/year'; + +export function makeGetSet (unit, keepTime) { + return function (value) { + if (value != null) { + set(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; +} + +export function get (mom, unit) { + return mom.isValid() ? + mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; +} + +export function set (mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); + } + else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } +} + +// MOMENTS + +export function stringGet (units) { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](); + } + return this; +} + + +export function stringSet (units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units); + for (var i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](value); + } + } + return this; +} diff --git a/node_modules/moment/src/lib/moment/locale.js b/node_modules/moment/src/lib/moment/locale.js new file mode 100644 index 00000000..fb46e656 --- /dev/null +++ b/node_modules/moment/src/lib/moment/locale.js @@ -0,0 +1,34 @@ +import { getLocale } from '../locale/locales'; +import { deprecate } from '../utils/deprecate'; + +// If passed a locale key, it will set the locale for this +// instance. Otherwise, it will return the locale configuration +// variables for this instance. +export function locale (key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + if (newLocaleData != null) { + this._locale = newLocaleData; + } + return this; + } +} + +export var lang = deprecate( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + } +); + +export function localeData () { + return this._locale; +} diff --git a/node_modules/moment/src/lib/moment/min-max.js b/node_modules/moment/src/lib/moment/min-max.js new file mode 100644 index 00000000..d76920a7 --- /dev/null +++ b/node_modules/moment/src/lib/moment/min-max.js @@ -0,0 +1,63 @@ +import { deprecate } from '../utils/deprecate'; +import isArray from '../utils/is-array'; +import { createLocal } from '../create/local'; +import { createInvalid } from '../create/valid'; + +export var prototypeMin = deprecate( + 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + } +); + +export var prototypeMax = deprecate( + 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + } +); + +// Pick a moment m from moments so that m[fn](other) is true for all +// other. This relies on the function fn to be transitive. +// +// moments should either be an array of moment objects or an array, whose +// first element is an array of moment objects. +function pickBy(fn, moments) { + var res, i; + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + if (!moments.length) { + return createLocal(); + } + res = moments[0]; + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + return res; +} + +// TODO: Use [].sort instead? +export function min () { + var args = [].slice.call(arguments, 0); + + return pickBy('isBefore', args); +} + +export function max () { + var args = [].slice.call(arguments, 0); + + return pickBy('isAfter', args); +} diff --git a/node_modules/moment/src/lib/moment/moment.js b/node_modules/moment/src/lib/moment/moment.js new file mode 100644 index 00000000..12eb5f15 --- /dev/null +++ b/node_modules/moment/src/lib/moment/moment.js @@ -0,0 +1,28 @@ +import { createLocal } from '../create/local'; +import { createUTC } from '../create/utc'; +import { createInvalid } from '../create/valid'; +import { isMoment } from './constructor'; +import { min, max } from './min-max'; +import { now } from './now'; +import momentPrototype from './prototype'; + +function createUnix (input) { + return createLocal(input * 1000); +} + +function createInZone () { + return createLocal.apply(null, arguments).parseZone(); +} + +export { + now, + min, + max, + isMoment, + createUTC, + createUnix, + createLocal, + createInZone, + createInvalid, + momentPrototype +}; diff --git a/node_modules/moment/src/lib/moment/now.js b/node_modules/moment/src/lib/moment/now.js new file mode 100644 index 00000000..0f4d0aef --- /dev/null +++ b/node_modules/moment/src/lib/moment/now.js @@ -0,0 +1,3 @@ +export var now = function () { + return Date.now ? Date.now() : +(new Date()); +}; diff --git a/node_modules/moment/src/lib/moment/prototype.js b/node_modules/moment/src/lib/moment/prototype.js new file mode 100644 index 00000000..bd8fff79 --- /dev/null +++ b/node_modules/moment/src/lib/moment/prototype.js @@ -0,0 +1,150 @@ +import { Moment } from './constructor'; + +var proto = Moment.prototype; + +import { add, subtract } from './add-subtract'; +import { calendar, getCalendarFormat } from './calendar'; +import { clone } from './clone'; +import { isBefore, isBetween, isSame, isAfter, isSameOrAfter, isSameOrBefore } from './compare'; +import { diff } from './diff'; +import { format, toString, toISOString, inspect } from './format'; +import { from, fromNow } from './from'; +import { to, toNow } from './to'; +import { stringGet, stringSet } from './get-set'; +import { locale, localeData, lang } from './locale'; +import { prototypeMin, prototypeMax } from './min-max'; +import { startOf, endOf } from './start-end-of'; +import { valueOf, toDate, toArray, toObject, toJSON, unix } from './to-type'; +import { isValid, parsingFlags, invalidAt } from './valid'; +import { creationData } from './creation-data'; + +proto.add = add; +proto.calendar = calendar; +proto.clone = clone; +proto.diff = diff; +proto.endOf = endOf; +proto.format = format; +proto.from = from; +proto.fromNow = fromNow; +proto.to = to; +proto.toNow = toNow; +proto.get = stringGet; +proto.invalidAt = invalidAt; +proto.isAfter = isAfter; +proto.isBefore = isBefore; +proto.isBetween = isBetween; +proto.isSame = isSame; +proto.isSameOrAfter = isSameOrAfter; +proto.isSameOrBefore = isSameOrBefore; +proto.isValid = isValid; +proto.lang = lang; +proto.locale = locale; +proto.localeData = localeData; +proto.max = prototypeMax; +proto.min = prototypeMin; +proto.parsingFlags = parsingFlags; +proto.set = stringSet; +proto.startOf = startOf; +proto.subtract = subtract; +proto.toArray = toArray; +proto.toObject = toObject; +proto.toDate = toDate; +proto.toISOString = toISOString; +proto.inspect = inspect; +proto.toJSON = toJSON; +proto.toString = toString; +proto.unix = unix; +proto.valueOf = valueOf; +proto.creationData = creationData; + +// Year +import { getSetYear, getIsLeapYear } from '../units/year'; +proto.year = getSetYear; +proto.isLeapYear = getIsLeapYear; + +// Week Year +import { getSetWeekYear, getSetISOWeekYear, getWeeksInYear, getISOWeeksInYear } from '../units/week-year'; +proto.weekYear = getSetWeekYear; +proto.isoWeekYear = getSetISOWeekYear; + +// Quarter +import { getSetQuarter } from '../units/quarter'; +proto.quarter = proto.quarters = getSetQuarter; + +// Month +import { getSetMonth, getDaysInMonth } from '../units/month'; +proto.month = getSetMonth; +proto.daysInMonth = getDaysInMonth; + +// Week +import { getSetWeek, getSetISOWeek } from '../units/week'; +proto.week = proto.weeks = getSetWeek; +proto.isoWeek = proto.isoWeeks = getSetISOWeek; +proto.weeksInYear = getWeeksInYear; +proto.isoWeeksInYear = getISOWeeksInYear; + +// Day +import { getSetDayOfMonth } from '../units/day-of-month'; +import { getSetDayOfWeek, getSetISODayOfWeek, getSetLocaleDayOfWeek } from '../units/day-of-week'; +import { getSetDayOfYear } from '../units/day-of-year'; +proto.date = getSetDayOfMonth; +proto.day = proto.days = getSetDayOfWeek; +proto.weekday = getSetLocaleDayOfWeek; +proto.isoWeekday = getSetISODayOfWeek; +proto.dayOfYear = getSetDayOfYear; + +// Hour +import { getSetHour } from '../units/hour'; +proto.hour = proto.hours = getSetHour; + +// Minute +import { getSetMinute } from '../units/minute'; +proto.minute = proto.minutes = getSetMinute; + +// Second +import { getSetSecond } from '../units/second'; +proto.second = proto.seconds = getSetSecond; + +// Millisecond +import { getSetMillisecond } from '../units/millisecond'; +proto.millisecond = proto.milliseconds = getSetMillisecond; + +// Offset +import { + getSetOffset, + setOffsetToUTC, + setOffsetToLocal, + setOffsetToParsedOffset, + hasAlignedHourOffset, + isDaylightSavingTime, + isDaylightSavingTimeShifted, + getSetZone, + isLocal, + isUtcOffset, + isUtc +} from '../units/offset'; +proto.utcOffset = getSetOffset; +proto.utc = setOffsetToUTC; +proto.local = setOffsetToLocal; +proto.parseZone = setOffsetToParsedOffset; +proto.hasAlignedHourOffset = hasAlignedHourOffset; +proto.isDST = isDaylightSavingTime; +proto.isLocal = isLocal; +proto.isUtcOffset = isUtcOffset; +proto.isUtc = isUtc; +proto.isUTC = isUtc; + +// Timezone +import { getZoneAbbr, getZoneName } from '../units/timezone'; +proto.zoneAbbr = getZoneAbbr; +proto.zoneName = getZoneName; + +// Deprecations +import { deprecate } from '../utils/deprecate'; +proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); +proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); +proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); +proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); +proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); + +export default proto; diff --git a/node_modules/moment/src/lib/moment/start-end-of.js b/node_modules/moment/src/lib/moment/start-end-of.js new file mode 100644 index 00000000..42c19cbc --- /dev/null +++ b/node_modules/moment/src/lib/moment/start-end-of.js @@ -0,0 +1,128 @@ +import { normalizeUnits } from '../units/aliases'; +import { hooks } from '../utils/hooks'; + +var MS_PER_SECOND = 1000; +var MS_PER_MINUTE = 60 * MS_PER_SECOND; +var MS_PER_HOUR = 60 * MS_PER_MINUTE; +var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; + +// actual modulo - handles negative numbers (for dates before 1970): +function mod(dividend, divisor) { + return (dividend % divisor + divisor) % divisor; +} + +function localStartOfDate(y, m, d) { + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } +} + +function utcStartOfDate(y, m, d) { + // Date.UTC remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } +} + +export function startOf (units) { + var time; + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year(), 0, 1); + break; + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3, 1); + break; + case 'month': + time = startOfDate(this.year(), this.month(), 1); + break; + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); + break; + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); + break; + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date()); + break; + case 'hour': + time = this._d.valueOf(); + time -= mod(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); + break; + case 'minute': + time = this._d.valueOf(); + time -= mod(time, MS_PER_MINUTE); + break; + case 'second': + time = this._d.valueOf(); + time -= mod(time, MS_PER_SECOND); + break; + } + + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; +} + +export function endOf (units) { + var time; + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; + break; + case 'month': + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; + break; + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; + break; + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + case 'hour': + time = this._d.valueOf(); + time += MS_PER_HOUR - mod(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; + break; + case 'minute': + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod(time, MS_PER_MINUTE) - 1; + break; + case 'second': + time = this._d.valueOf(); + time += MS_PER_SECOND - mod(time, MS_PER_SECOND) - 1; + break; + } + + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; +} diff --git a/node_modules/moment/src/lib/moment/to-type.js b/node_modules/moment/src/lib/moment/to-type.js new file mode 100644 index 00000000..a990dd20 --- /dev/null +++ b/node_modules/moment/src/lib/moment/to-type.js @@ -0,0 +1,34 @@ +export function valueOf () { + return this._d.valueOf() - ((this._offset || 0) * 60000); +} + +export function unix () { + return Math.floor(this.valueOf() / 1000); +} + +export function toDate () { + return new Date(this.valueOf()); +} + +export function toArray () { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; +} + +export function toObject () { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds() + }; +} + +export function toJSON () { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; +} diff --git a/node_modules/moment/src/lib/moment/to.js b/node_modules/moment/src/lib/moment/to.js new file mode 100644 index 00000000..7ad667e8 --- /dev/null +++ b/node_modules/moment/src/lib/moment/to.js @@ -0,0 +1,17 @@ +import { createDuration } from '../duration/create'; +import { createLocal } from '../create/local'; +import { isMoment } from '../moment/constructor'; + +export function to (time, withoutSuffix) { + if (this.isValid() && + ((isMoment(time) && time.isValid()) || + createLocal(time).isValid())) { + return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } +} + +export function toNow (withoutSuffix) { + return this.to(createLocal(), withoutSuffix); +} diff --git a/node_modules/moment/src/lib/moment/valid.js b/node_modules/moment/src/lib/moment/valid.js new file mode 100644 index 00000000..6c007429 --- /dev/null +++ b/node_modules/moment/src/lib/moment/valid.js @@ -0,0 +1,15 @@ +import { isValid as _isValid } from '../create/valid'; +import extend from '../utils/extend'; +import getParsingFlags from '../create/parsing-flags'; + +export function isValid () { + return _isValid(this); +} + +export function parsingFlags () { + return extend({}, getParsingFlags(this)); +} + +export function invalidAt () { + return getParsingFlags(this).overflow; +} diff --git a/node_modules/moment/src/lib/parse/regex.js b/node_modules/moment/src/lib/parse/regex.js new file mode 100644 index 00000000..4b86f34c --- /dev/null +++ b/node_modules/moment/src/lib/parse/regex.js @@ -0,0 +1,54 @@ +export var match1 = /\d/; // 0 - 9 +export var match2 = /\d\d/; // 00 - 99 +export var match3 = /\d{3}/; // 000 - 999 +export var match4 = /\d{4}/; // 0000 - 9999 +export var match6 = /[+-]?\d{6}/; // -999999 - 999999 +export var match1to2 = /\d\d?/; // 0 - 99 +export var match3to4 = /\d\d\d\d?/; // 999 - 9999 +export var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 +export var match1to3 = /\d{1,3}/; // 0 - 999 +export var match1to4 = /\d{1,4}/; // 0 - 9999 +export var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + +export var matchUnsigned = /\d+/; // 0 - inf +export var matchSigned = /[+-]?\d+/; // -inf - inf + +export var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z +export var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z + +export var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + +// any word (or two) characters or numbers including two/three word month in arabic. +// includes scottish gaelic two word and hyphenated months +export var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; + + +import hasOwnProp from '../utils/has-own-prop'; +import isFunction from '../utils/is-function'; + +var regexes = {}; + +export function addRegexToken (token, regex, strictRegex) { + regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { + return (isStrict && strictRegex) ? strictRegex : regex; + }; +} + +export function getParseRegexForToken (token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); +} + +// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript +function unescapeFormat(s) { + return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + })); +} + +export function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); +} diff --git a/node_modules/moment/src/lib/parse/token.js b/node_modules/moment/src/lib/parse/token.js new file mode 100644 index 00000000..24b4474f --- /dev/null +++ b/node_modules/moment/src/lib/parse/token.js @@ -0,0 +1,33 @@ +import hasOwnProp from '../utils/has-own-prop'; +import isNumber from '../utils/is-number'; +import toInt from '../utils/to-int'; + +var tokens = {}; + +export function addParseToken (token, callback) { + var i, func = callback; + if (typeof token === 'string') { + token = [token]; + } + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } +} + +export function addWeekParseToken (token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); +} + +export function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } +} diff --git a/node_modules/moment/src/lib/units/aliases.js b/node_modules/moment/src/lib/units/aliases.js new file mode 100644 index 00000000..0d8b88a1 --- /dev/null +++ b/node_modules/moment/src/lib/units/aliases.js @@ -0,0 +1,30 @@ +import hasOwnProp from '../utils/has-own-prop'; + +var aliases = {}; + +export function addUnitAlias (unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; +} + +export function normalizeUnits(units) { + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; +} + +export function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; +} + diff --git a/node_modules/moment/src/lib/units/constants.js b/node_modules/moment/src/lib/units/constants.js new file mode 100644 index 00000000..70bf1b26 --- /dev/null +++ b/node_modules/moment/src/lib/units/constants.js @@ -0,0 +1,9 @@ +export var YEAR = 0; +export var MONTH = 1; +export var DATE = 2; +export var HOUR = 3; +export var MINUTE = 4; +export var SECOND = 5; +export var MILLISECOND = 6; +export var WEEK = 7; +export var WEEKDAY = 8; diff --git a/node_modules/moment/src/lib/units/day-of-month.js b/node_modules/moment/src/lib/units/day-of-month.js new file mode 100644 index 00000000..cbd1e40b --- /dev/null +++ b/node_modules/moment/src/lib/units/day-of-month.js @@ -0,0 +1,39 @@ +import { makeGetSet } from '../moment/get-set'; +import { addFormatToken } from '../format/format'; +import { addUnitAlias } from './aliases'; +import { addUnitPriority } from './priorities'; +import { addRegexToken, match1to2, match2 } from '../parse/regex'; +import { addParseToken } from '../parse/token'; +import { DATE } from './constants'; +import toInt from '../utils/to-int'; + +// FORMATTING + +addFormatToken('D', ['DD', 2], 'Do', 'date'); + +// ALIASES + +addUnitAlias('date', 'D'); + +// PRIORITY +addUnitPriority('date', 9); + +// PARSING + +addRegexToken('D', match1to2); +addRegexToken('DD', match1to2, match2); +addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict ? + (locale._dayOfMonthOrdinalParse || locale._ordinalParse) : + locale._dayOfMonthOrdinalParseLenient; +}); + +addParseToken(['D', 'DD'], DATE); +addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); +}); + +// MOMENTS + +export var getSetDayOfMonth = makeGetSet('Date', true); diff --git a/node_modules/moment/src/lib/units/day-of-week.js b/node_modules/moment/src/lib/units/day-of-week.js new file mode 100644 index 00000000..e4c44982 --- /dev/null +++ b/node_modules/moment/src/lib/units/day-of-week.js @@ -0,0 +1,367 @@ +import { addFormatToken } from '../format/format'; +import { addUnitAlias } from './aliases'; +import { addUnitPriority } from './priorities'; +import { addRegexToken, match1to2, matchWord, regexEscape } from '../parse/regex'; +import { addWeekParseToken } from '../parse/token'; +import toInt from '../utils/to-int'; +import isArray from '../utils/is-array'; +import indexOf from '../utils/index-of'; +import hasOwnProp from '../utils/has-own-prop'; +import { createUTC } from '../create/utc'; +import getParsingFlags from '../create/parsing-flags'; + +// FORMATTING + +addFormatToken('d', 0, 'do', 'day'); + +addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); +}); + +addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); +}); + +addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); +}); + +addFormatToken('e', 0, 0, 'weekday'); +addFormatToken('E', 0, 0, 'isoWeekday'); + +// ALIASES + +addUnitAlias('day', 'd'); +addUnitAlias('weekday', 'e'); +addUnitAlias('isoWeekday', 'E'); + +// PRIORITY +addUnitPriority('day', 11); +addUnitPriority('weekday', 11); +addUnitPriority('isoWeekday', 11); + +// PARSING + +addRegexToken('d', match1to2); +addRegexToken('e', match1to2); +addRegexToken('E', match1to2); +addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); +}); +addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); +}); +addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); +}); + +addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); + // if we didn't get a weekday name, mark the date as invalid + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } +}); + +addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); +}); + +// HELPERS + +function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + if (typeof input === 'number') { + return input; + } + + return null; +} + +function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + return isNaN(input) ? null : input; +} + +// LOCALES +function shiftWeekdays (ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); +} + +export var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); +export function localeWeekdays (m, format) { + var weekdays = isArray(this._weekdays) ? this._weekdays : + this._weekdays[(m && m !== true && this._weekdays.isFormat.test(format)) ? 'format' : 'standalone']; + return (m === true) ? shiftWeekdays(weekdays, this._week.dow) + : (m) ? weekdays[m.day()] : weekdays; +} + +export var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); +export function localeWeekdaysShort (m) { + return (m === true) ? shiftWeekdays(this._weekdaysShort, this._week.dow) + : (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort; +} + +export var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); +export function localeWeekdaysMin (m) { + return (m === true) ? shiftWeekdays(this._weekdaysMin, this._week.dow) + : (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin; +} + +function handleStrictParse(weekdayName, format, strict) { + var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } +} + +export function localeWeekdaysParse (weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + + mom = createUTC([2000, 1]).day(i); + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); + } + if (!this._weekdaysParse[i]) { + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } +} + +// MOMENTS + +export function getSetDayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } +} + +export function getSetLocaleDayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); +} + +export function getSetISODayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } +} + +var defaultWeekdaysRegex = matchWord; +export function weekdaysRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + return this._weekdaysStrictRegex && isStrict ? + this._weekdaysStrictRegex : this._weekdaysRegex; + } +} + +var defaultWeekdaysShortRegex = matchWord; +export function weekdaysShortRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + return this._weekdaysShortStrictRegex && isStrict ? + this._weekdaysShortStrictRegex : this._weekdaysShortRegex; + } +} + +var defaultWeekdaysMinRegex = matchWord; +export function weekdaysMinRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + return this._weekdaysMinStrictRegex && isStrict ? + this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + } +} + + +function computeWeekdaysParse () { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], + i, mom, minp, shortp, longp; + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } + // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + + this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); +} diff --git a/node_modules/moment/src/lib/units/day-of-year.js b/node_modules/moment/src/lib/units/day-of-year.js new file mode 100644 index 00000000..6fe931c1 --- /dev/null +++ b/node_modules/moment/src/lib/units/day-of-year.js @@ -0,0 +1,36 @@ +import { addFormatToken } from '../format/format'; +import { addUnitAlias } from './aliases'; +import { addUnitPriority } from './priorities'; +import { addRegexToken, match3, match1to3 } from '../parse/regex'; +import { daysInYear } from './year'; +import { createUTCDate } from '../create/date-from-array'; +import { addParseToken } from '../parse/token'; +import toInt from '../utils/to-int'; + +// FORMATTING + +addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); + +// ALIASES + +addUnitAlias('dayOfYear', 'DDD'); + +// PRIORITY +addUnitPriority('dayOfYear', 4); + +// PARSING + +addRegexToken('DDD', match1to3); +addRegexToken('DDDD', match3); +addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); +}); + +// HELPERS + +// MOMENTS + +export function getSetDayOfYear (input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); +} diff --git a/node_modules/moment/src/lib/units/hour.js b/node_modules/moment/src/lib/units/hour.js new file mode 100644 index 00000000..d717a799 --- /dev/null +++ b/node_modules/moment/src/lib/units/hour.js @@ -0,0 +1,144 @@ +import { makeGetSet } from '../moment/get-set'; +import { addFormatToken } from '../format/format'; +import { addUnitAlias } from './aliases'; +import { addUnitPriority } from './priorities'; +import { addRegexToken, match1to2, match2, match3to4, match5to6 } from '../parse/regex'; +import { addParseToken } from '../parse/token'; +import { HOUR, MINUTE, SECOND } from './constants'; +import toInt from '../utils/to-int'; +import zeroFill from '../utils/zero-fill'; +import getParsingFlags from '../create/parsing-flags'; + +// FORMATTING + +function hFormat() { + return this.hours() % 12 || 12; +} + +function kFormat() { + return this.hours() || 24; +} + +addFormatToken('H', ['HH', 2], 0, 'hour'); +addFormatToken('h', ['hh', 2], 0, hFormat); +addFormatToken('k', ['kk', 2], 0, kFormat); + +addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); +}); + +addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2); +}); + +addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); +}); + +addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2); +}); + +function meridiem (token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); +} + +meridiem('a', true); +meridiem('A', false); + +// ALIASES + +addUnitAlias('hour', 'h'); + +// PRIORITY +addUnitPriority('hour', 13); + +// PARSING + +function matchMeridiem (isStrict, locale) { + return locale._meridiemParse; +} + +addRegexToken('a', matchMeridiem); +addRegexToken('A', matchMeridiem); +addRegexToken('H', match1to2); +addRegexToken('h', match1to2); +addRegexToken('k', match1to2); +addRegexToken('HH', match1to2, match2); +addRegexToken('hh', match1to2, match2); +addRegexToken('kk', match1to2, match2); + +addRegexToken('hmm', match3to4); +addRegexToken('hmmss', match5to6); +addRegexToken('Hmm', match3to4); +addRegexToken('Hmmss', match5to6); + +addParseToken(['H', 'HH'], HOUR); +addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; +}); +addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; +}); +addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; +}); +addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; +}); +addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; +}); +addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); +}); +addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); +}); + +// LOCALES + +export function localeIsPM (input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return ((input + '').toLowerCase().charAt(0) === 'p'); +} + +export var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; +export function localeMeridiem (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } +} + + +// MOMENTS + +// Setting the hour should keep the time, because the user explicitly +// specified which hour they want. So trying to maintain the same hour (in +// a new timezone) makes sense. Adding/subtracting hours does not follow +// this rule. +export var getSetHour = makeGetSet('Hours', true); diff --git a/node_modules/moment/src/lib/units/millisecond.js b/node_modules/moment/src/lib/units/millisecond.js new file mode 100644 index 00000000..27c95126 --- /dev/null +++ b/node_modules/moment/src/lib/units/millisecond.js @@ -0,0 +1,69 @@ +import { makeGetSet } from '../moment/get-set'; +import { addFormatToken } from '../format/format'; +import { addUnitAlias } from './aliases'; +import { addUnitPriority } from './priorities'; +import { addRegexToken, match1, match2, match3, match1to3, matchUnsigned } from '../parse/regex'; +import { addParseToken } from '../parse/token'; +import { MILLISECOND } from './constants'; +import toInt from '../utils/to-int'; + +// FORMATTING + +addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); +}); + +addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); +}); + +addFormatToken(0, ['SSS', 3], 0, 'millisecond'); +addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; +}); +addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; +}); +addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; +}); +addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; +}); +addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; +}); +addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; +}); + + +// ALIASES + +addUnitAlias('millisecond', 'ms'); + +// PRIORITY + +addUnitPriority('millisecond', 16); + +// PARSING + +addRegexToken('S', match1to3, match1); +addRegexToken('SS', match1to3, match2); +addRegexToken('SSS', match1to3, match3); + +var token; +for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); +} + +function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); +} + +for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); +} +// MOMENTS + +export var getSetMillisecond = makeGetSet('Milliseconds', false); diff --git a/node_modules/moment/src/lib/units/minute.js b/node_modules/moment/src/lib/units/minute.js new file mode 100644 index 00000000..9f760322 --- /dev/null +++ b/node_modules/moment/src/lib/units/minute.js @@ -0,0 +1,29 @@ +import { makeGetSet } from '../moment/get-set'; +import { addFormatToken } from '../format/format'; +import { addUnitAlias } from './aliases'; +import { addUnitPriority } from './priorities'; +import { addRegexToken, match1to2, match2 } from '../parse/regex'; +import { addParseToken } from '../parse/token'; +import { MINUTE } from './constants'; + +// FORMATTING + +addFormatToken('m', ['mm', 2], 0, 'minute'); + +// ALIASES + +addUnitAlias('minute', 'm'); + +// PRIORITY + +addUnitPriority('minute', 14); + +// PARSING + +addRegexToken('m', match1to2); +addRegexToken('mm', match1to2, match2); +addParseToken(['m', 'mm'], MINUTE); + +// MOMENTS + +export var getSetMinute = makeGetSet('Minutes', false); diff --git a/node_modules/moment/src/lib/units/month.js b/node_modules/moment/src/lib/units/month.js new file mode 100644 index 00000000..f504ed35 --- /dev/null +++ b/node_modules/moment/src/lib/units/month.js @@ -0,0 +1,290 @@ +import { get } from '../moment/get-set'; +import hasOwnProp from '../utils/has-own-prop'; +import { addFormatToken } from '../format/format'; +import { addUnitAlias } from './aliases'; +import { addUnitPriority } from './priorities'; +import { addRegexToken, match1to2, match2, matchWord, regexEscape } from '../parse/regex'; +import { addParseToken } from '../parse/token'; +import { hooks } from '../utils/hooks'; +import { MONTH } from './constants'; +import toInt from '../utils/to-int'; +import isArray from '../utils/is-array'; +import isNumber from '../utils/is-number'; +import mod from '../utils/mod'; +import indexOf from '../utils/index-of'; +import { createUTC } from '../create/utc'; +import getParsingFlags from '../create/parsing-flags'; +import { isLeapYear } from '../units/year'; + +export function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2); +} + +// FORMATTING + +addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; +}); + +addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); +}); + +addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); +}); + +// ALIASES + +addUnitAlias('month', 'M'); + +// PRIORITY + +addUnitPriority('month', 8); + +// PARSING + +addRegexToken('M', match1to2); +addRegexToken('MM', match1to2, match2); +addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); +}); +addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); +}); + +addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; +}); + +addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); + // if we didn't find a month name, mark the date as invalid. + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } +}); + +// LOCALES + +var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; +export var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); +export function localeMonths (m, format) { + if (!m) { + return isArray(this._months) ? this._months : + this._months['standalone']; + } + return isArray(this._months) ? this._months[m.month()] : + this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; +} + +export var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); +export function localeMonthsShort (m, format) { + if (!m) { + return isArray(this._monthsShort) ? this._monthsShort : + this._monthsShort['standalone']; + } + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : + this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; +} + +function handleStrictParse(monthName, format, strict) { + var i, ii, mom, llc = monthName.toLocaleLowerCase(); + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } +} + +export function localeMonthsParse (monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } + + // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); + } + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } +} + +// MOMENTS + +export function setMonth (mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); + // TODO: Another silent failure? + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + return mom; +} + +export function getSetMonth (value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } +} + +export function getDaysInMonth () { + return daysInMonth(this.year(), this.month()); +} + +var defaultMonthsShortRegex = matchWord; +export function monthsShortRegex (isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + return this._monthsShortStrictRegex && isStrict ? + this._monthsShortStrictRegex : this._monthsShortRegex; + } +} + +var defaultMonthsRegex = matchWord; +export function monthsRegex (isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + return this._monthsStrictRegex && isStrict ? + this._monthsStrictRegex : this._monthsRegex; + } +} + +function computeMonthsParse () { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], longPieces = [], mixedPieces = [], + i, mom; + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } + // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); +} diff --git a/node_modules/moment/src/lib/units/offset.js b/node_modules/moment/src/lib/units/offset.js new file mode 100644 index 00000000..752358f0 --- /dev/null +++ b/node_modules/moment/src/lib/units/offset.js @@ -0,0 +1,235 @@ +import zeroFill from '../utils/zero-fill'; +import { createDuration } from '../duration/create'; +import { addSubtract } from '../moment/add-subtract'; +import { isMoment, copyConfig } from '../moment/constructor'; +import { addFormatToken } from '../format/format'; +import { addRegexToken, matchOffset, matchShortOffset } from '../parse/regex'; +import { addParseToken } from '../parse/token'; +import { createLocal } from '../create/local'; +import { prepareConfig } from '../create/from-anything'; +import { createUTC } from '../create/utc'; +import isDate from '../utils/is-date'; +import toInt from '../utils/to-int'; +import isUndefined from '../utils/is-undefined'; +import compareArrays from '../utils/compare-arrays'; +import { hooks } from '../utils/hooks'; + +// FORMATTING + +function offset (token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + if (offset < 0) { + offset = -offset; + sign = '-'; + } + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); + }); +} + +offset('Z', ':'); +offset('ZZ', ''); + +// PARSING + +addRegexToken('Z', matchShortOffset); +addRegexToken('ZZ', matchShortOffset); +addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); +}); + +// HELPERS + +// timezone chunker +// '+10:00' > ['10', '00'] +// '-1530' > ['-15', '30'] +var chunkOffset = /([\+\-]|\d\d)/gi; + +function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher); + + if (matches === null) { + return null; + } + + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + + return minutes === 0 ? + 0 : + parts[0] === '+' ? minutes : -minutes; +} + +// Return a moment from input, that is local/utc/zone equivalent to model. +export function cloneWithOffset(input, model) { + var res, diff; + if (model._isUTC) { + res = model.clone(); + diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); + // Use low-level api, because this fn is low-level api. + res._d.setTime(res._d.valueOf() + diff); + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } +} + +function getDateOffset (m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; +} + +// HOOKS + +// This function will be called whenever a moment is mutated. +// It is intended to keep the offset in sync with the timezone. +hooks.updateOffset = function () {}; + +// MOMENTS + +// keepLocalTime = true means only change the timezone, without +// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> +// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset +// +0200, so we adjust the time as needed, to be valid. +// +// Keeping the time actually adds/subtracts (one hour) +// from the actual represented time. That is why we call updateOffset +// a second time. In case it wants us to change the offset again +// _changeInProgress == true case, then we have to adjust, because +// there is no such time in the given timezone. +export function getSetOffset (input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + if (!this.isValid()) { + return input != null ? this : NaN; + } + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + this._offset = input; + this._isUTC = true; + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract(this, createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } +} + +export function getSetZone (input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + + return this; + } else { + return -this.utcOffset(); + } +} + +export function setOffsetToUTC (keepLocalTime) { + return this.utcOffset(0, keepLocalTime); +} + +export function setOffsetToLocal (keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + return this; +} + +export function setOffsetToParsedOffset () { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + if (tZone != null) { + this.utcOffset(tZone); + } + else { + this.utcOffset(0, true); + } + } + return this; +} + +export function hasAlignedHourOffset (input) { + if (!this.isValid()) { + return false; + } + input = input ? createLocal(input).utcOffset() : 0; + + return (this.utcOffset() - input) % 60 === 0; +} + +export function isDaylightSavingTime () { + return ( + this.utcOffset() > this.clone().month(0).utcOffset() || + this.utcOffset() > this.clone().month(5).utcOffset() + ); +} + +export function isDaylightSavingTimeShifted () { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}; + + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = this.isValid() && + compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; +} + +export function isLocal () { + return this.isValid() ? !this._isUTC : false; +} + +export function isUtcOffset () { + return this.isValid() ? this._isUTC : false; +} + +export function isUtc () { + return this.isValid() ? this._isUTC && this._offset === 0 : false; +} diff --git a/node_modules/moment/src/lib/units/priorities.js b/node_modules/moment/src/lib/units/priorities.js new file mode 100644 index 00000000..699017cb --- /dev/null +++ b/node_modules/moment/src/lib/units/priorities.js @@ -0,0 +1,16 @@ +var priorities = {}; + +export function addUnitPriority(unit, priority) { + priorities[unit] = priority; +} + +export function getPrioritizedUnits(unitsObj) { + var units = []; + for (var u in unitsObj) { + units.push({unit: u, priority: priorities[u]}); + } + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; +} diff --git a/node_modules/moment/src/lib/units/quarter.js b/node_modules/moment/src/lib/units/quarter.js new file mode 100644 index 00000000..a6d409a8 --- /dev/null +++ b/node_modules/moment/src/lib/units/quarter.js @@ -0,0 +1,32 @@ +import { addFormatToken } from '../format/format'; +import { addUnitAlias } from './aliases'; +import { addUnitPriority } from './priorities'; +import { addRegexToken, match1 } from '../parse/regex'; +import { addParseToken } from '../parse/token'; +import { MONTH } from './constants'; +import toInt from '../utils/to-int'; + +// FORMATTING + +addFormatToken('Q', 0, 'Qo', 'quarter'); + +// ALIASES + +addUnitAlias('quarter', 'Q'); + +// PRIORITY + +addUnitPriority('quarter', 7); + +// PARSING + +addRegexToken('Q', match1); +addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; +}); + +// MOMENTS + +export function getSetQuarter (input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); +} diff --git a/node_modules/moment/src/lib/units/second.js b/node_modules/moment/src/lib/units/second.js new file mode 100644 index 00000000..17937118 --- /dev/null +++ b/node_modules/moment/src/lib/units/second.js @@ -0,0 +1,29 @@ +import { makeGetSet } from '../moment/get-set'; +import { addFormatToken } from '../format/format'; +import { addUnitAlias } from './aliases'; +import { addUnitPriority } from './priorities'; +import { addRegexToken, match1to2, match2 } from '../parse/regex'; +import { addParseToken } from '../parse/token'; +import { SECOND } from './constants'; + +// FORMATTING + +addFormatToken('s', ['ss', 2], 0, 'second'); + +// ALIASES + +addUnitAlias('second', 's'); + +// PRIORITY + +addUnitPriority('second', 15); + +// PARSING + +addRegexToken('s', match1to2); +addRegexToken('ss', match1to2, match2); +addParseToken(['s', 'ss'], SECOND); + +// MOMENTS + +export var getSetSecond = makeGetSet('Seconds', false); diff --git a/node_modules/moment/src/lib/units/timestamp.js b/node_modules/moment/src/lib/units/timestamp.js new file mode 100644 index 00000000..a49e1e4b --- /dev/null +++ b/node_modules/moment/src/lib/units/timestamp.js @@ -0,0 +1,20 @@ +import { addFormatToken } from '../format/format'; +import { addRegexToken, matchTimestamp, matchSigned } from '../parse/regex'; +import { addParseToken } from '../parse/token'; +import toInt from '../utils/to-int'; + +// FORMATTING + +addFormatToken('X', 0, 0, 'unix'); +addFormatToken('x', 0, 0, 'valueOf'); + +// PARSING + +addRegexToken('x', matchSigned); +addRegexToken('X', matchTimestamp); +addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); +}); +addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); +}); diff --git a/node_modules/moment/src/lib/units/timezone.js b/node_modules/moment/src/lib/units/timezone.js new file mode 100644 index 00000000..20c81cd2 --- /dev/null +++ b/node_modules/moment/src/lib/units/timezone.js @@ -0,0 +1,16 @@ +import { addFormatToken } from '../format/format'; + +// FORMATTING + +addFormatToken('z', 0, 0, 'zoneAbbr'); +addFormatToken('zz', 0, 0, 'zoneName'); + +// MOMENTS + +export function getZoneAbbr () { + return this._isUTC ? 'UTC' : ''; +} + +export function getZoneName () { + return this._isUTC ? 'Coordinated Universal Time' : ''; +} diff --git a/node_modules/moment/src/lib/units/units.js b/node_modules/moment/src/lib/units/units.js new file mode 100644 index 00000000..6f45f1c0 --- /dev/null +++ b/node_modules/moment/src/lib/units/units.js @@ -0,0 +1,20 @@ +// Side effect imports +import './day-of-month'; +import './day-of-week'; +import './day-of-year'; +import './hour'; +import './millisecond'; +import './minute'; +import './month'; +import './offset'; +import './quarter'; +import './second'; +import './timestamp'; +import './timezone'; +import './week-year'; +import './week'; +import './year'; + +import { normalizeUnits } from './aliases'; + +export { normalizeUnits }; diff --git a/node_modules/moment/src/lib/units/week-calendar-utils.js b/node_modules/moment/src/lib/units/week-calendar-utils.js new file mode 100644 index 00000000..5be8a5fa --- /dev/null +++ b/node_modules/moment/src/lib/units/week-calendar-utils.js @@ -0,0 +1,65 @@ +import { daysInYear } from './year'; +import { createLocal } from '../create/local'; +import { createUTCDate } from '../create/date-from-array'; + +// start-of-first-week - start-of-year +function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + + return -fwdlw + fwd - 1; +} + +// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday +export function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear + }; +} + +export function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear + }; +} + +export function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; +} diff --git a/node_modules/moment/src/lib/units/week-year.js b/node_modules/moment/src/lib/units/week-year.js new file mode 100644 index 00000000..7fa5425b --- /dev/null +++ b/node_modules/moment/src/lib/units/week-year.js @@ -0,0 +1,107 @@ +import { addFormatToken } from '../format/format'; +import { addUnitAlias } from './aliases'; +import { addUnitPriority } from './priorities'; +import { addRegexToken, match1to2, match1to4, match1to6, match2, match4, match6, matchSigned } from '../parse/regex'; +import { addWeekParseToken } from '../parse/token'; +import { weekOfYear, weeksInYear, dayOfYearFromWeeks } from './week-calendar-utils'; +import toInt from '../utils/to-int'; +import { hooks } from '../utils/hooks'; +import { createLocal } from '../create/local'; +import { createUTCDate } from '../create/date-from-array'; + +// FORMATTING + +addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; +}); + +addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; +}); + +function addWeekYearFormatToken (token, getter) { + addFormatToken(0, [token, token.length], 0, getter); +} + +addWeekYearFormatToken('gggg', 'weekYear'); +addWeekYearFormatToken('ggggg', 'weekYear'); +addWeekYearFormatToken('GGGG', 'isoWeekYear'); +addWeekYearFormatToken('GGGGG', 'isoWeekYear'); + +// ALIASES + +addUnitAlias('weekYear', 'gg'); +addUnitAlias('isoWeekYear', 'GG'); + +// PRIORITY + +addUnitPriority('weekYear', 1); +addUnitPriority('isoWeekYear', 1); + + +// PARSING + +addRegexToken('G', matchSigned); +addRegexToken('g', matchSigned); +addRegexToken('GG', match1to2, match2); +addRegexToken('gg', match1to2, match2); +addRegexToken('GGGG', match1to4, match4); +addRegexToken('gggg', match1to4, match4); +addRegexToken('GGGGG', match1to6, match6); +addRegexToken('ggggg', match1to6, match6); + +addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); +}); + +addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); +}); + +// MOMENTS + +export function getSetWeekYear (input) { + return getSetWeekYearHelper.call(this, + input, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy); +} + +export function getSetISOWeekYear (input) { + return getSetWeekYearHelper.call(this, + input, this.isoWeek(), this.isoWeekday(), 1, 4); +} + +export function getISOWeeksInYear () { + return weeksInYear(this.year(), 1, 4); +} + +export function getWeeksInYear () { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); +} + +function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + if (week > weeksTarget) { + week = weeksTarget; + } + return setWeekAll.call(this, input, week, weekday, dow, doy); + } +} + +function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; +} diff --git a/node_modules/moment/src/lib/units/week.js b/node_modules/moment/src/lib/units/week.js new file mode 100644 index 00000000..fbb669ea --- /dev/null +++ b/node_modules/moment/src/lib/units/week.js @@ -0,0 +1,67 @@ +import { addFormatToken } from '../format/format'; +import { addUnitAlias } from './aliases'; +import { addUnitPriority } from './priorities'; +import { addRegexToken, match1to2, match2 } from '../parse/regex'; +import { addWeekParseToken } from '../parse/token'; +import toInt from '../utils/to-int'; +import { createLocal } from '../create/local'; +import { weekOfYear } from './week-calendar-utils'; + +// FORMATTING + +addFormatToken('w', ['ww', 2], 'wo', 'week'); +addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); + +// ALIASES + +addUnitAlias('week', 'w'); +addUnitAlias('isoWeek', 'W'); + +// PRIORITIES + +addUnitPriority('week', 5); +addUnitPriority('isoWeek', 5); + +// PARSING + +addRegexToken('w', match1to2); +addRegexToken('ww', match1to2, match2); +addRegexToken('W', match1to2); +addRegexToken('WW', match1to2, match2); + +addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); +}); + +// HELPERS + +// LOCALES + +export function localeWeek (mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; +} + +export var defaultLocaleWeek = { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. +}; + +export function localeFirstDayOfWeek () { + return this._week.dow; +} + +export function localeFirstDayOfYear () { + return this._week.doy; +} + +// MOMENTS + +export function getSetWeek (input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); +} + +export function getSetISOWeek (input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); +} diff --git a/node_modules/moment/src/lib/units/year.js b/node_modules/moment/src/lib/units/year.js new file mode 100644 index 00000000..8f3f94cd --- /dev/null +++ b/node_modules/moment/src/lib/units/year.js @@ -0,0 +1,75 @@ +import { makeGetSet } from '../moment/get-set'; +import { addFormatToken } from '../format/format'; +import { addUnitAlias } from './aliases'; +import { addUnitPriority } from './priorities'; +import { addRegexToken, match1to2, match1to4, match1to6, match2, match4, match6, matchSigned } from '../parse/regex'; +import { addParseToken } from '../parse/token'; +import { hooks } from '../utils/hooks'; +import { YEAR } from './constants'; +import toInt from '../utils/to-int'; + +// FORMATTING + +addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; +}); + +addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; +}); + +addFormatToken(0, ['YYYY', 4], 0, 'year'); +addFormatToken(0, ['YYYYY', 5], 0, 'year'); +addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); + +// ALIASES + +addUnitAlias('year', 'y'); + +// PRIORITIES + +addUnitPriority('year', 1); + +// PARSING + +addRegexToken('Y', matchSigned); +addRegexToken('YY', match1to2, match2); +addRegexToken('YYYY', match1to4, match4); +addRegexToken('YYYYY', match1to6, match6); +addRegexToken('YYYYYY', match1to6, match6); + +addParseToken(['YYYYY', 'YYYYYY'], YEAR); +addParseToken('YYYY', function (input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); +}); +addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); +}); +addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); +}); + +// HELPERS + +export function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; +} + +export function isLeapYear(year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; +} + +// HOOKS + +hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); +}; + +// MOMENTS + +export var getSetYear = makeGetSet('FullYear', true); + +export function getIsLeapYear () { + return isLeapYear(this.year()); +} diff --git a/node_modules/moment/src/lib/utils/abs-ceil.js b/node_modules/moment/src/lib/utils/abs-ceil.js new file mode 100644 index 00000000..7cf93290 --- /dev/null +++ b/node_modules/moment/src/lib/utils/abs-ceil.js @@ -0,0 +1,7 @@ +export default function absCeil (number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } +} diff --git a/node_modules/moment/src/lib/utils/abs-floor.js b/node_modules/moment/src/lib/utils/abs-floor.js new file mode 100644 index 00000000..401c7f04 --- /dev/null +++ b/node_modules/moment/src/lib/utils/abs-floor.js @@ -0,0 +1,8 @@ +export default function absFloor (number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } +} diff --git a/node_modules/moment/src/lib/utils/abs-round.js b/node_modules/moment/src/lib/utils/abs-round.js new file mode 100644 index 00000000..98f54bc6 --- /dev/null +++ b/node_modules/moment/src/lib/utils/abs-round.js @@ -0,0 +1,7 @@ +export default function absRound (number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } +} diff --git a/node_modules/moment/src/lib/utils/compare-arrays.js b/node_modules/moment/src/lib/utils/compare-arrays.js new file mode 100644 index 00000000..2eb274be --- /dev/null +++ b/node_modules/moment/src/lib/utils/compare-arrays.js @@ -0,0 +1,16 @@ +import toInt from './to-int'; + +// compare two arrays, return the number of differences +export default function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + for (i = 0; i < len; i++) { + if ((dontConvert && array1[i] !== array2[i]) || + (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { + diffs++; + } + } + return diffs + lengthDiff; +} diff --git a/node_modules/moment/src/lib/utils/defaults.js b/node_modules/moment/src/lib/utils/defaults.js new file mode 100644 index 00000000..45c5e879 --- /dev/null +++ b/node_modules/moment/src/lib/utils/defaults.js @@ -0,0 +1,10 @@ +// Pick the first defined of two or three arguments. +export default function defaults(a, b, c) { + if (a != null) { + return a; + } + if (b != null) { + return b; + } + return c; +} diff --git a/node_modules/moment/src/lib/utils/deprecate.js b/node_modules/moment/src/lib/utils/deprecate.js new file mode 100644 index 00000000..8b4c87a2 --- /dev/null +++ b/node_modules/moment/src/lib/utils/deprecate.js @@ -0,0 +1,55 @@ +import extend from './extend'; +import { hooks } from './hooks'; +import isUndefined from './is-undefined'; + +function warn(msg) { + if (hooks.suppressDeprecationWarnings === false && + (typeof console !== 'undefined') && console.warn) { + console.warn('Deprecation warning: ' + msg); + } +} + +export function deprecate(msg, fn) { + var firstTime = true; + + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + if (firstTime) { + var args = []; + var arg; + for (var i = 0; i < arguments.length; i++) { + arg = ''; + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + for (var key in arguments[0]) { + arg += key + ': ' + arguments[0][key] + ', '; + } + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + args.push(arg); + } + warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack); + firstTime = false; + } + return fn.apply(this, arguments); + }, fn); +} + +var deprecations = {}; + +export function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } +} + +hooks.suppressDeprecationWarnings = false; +hooks.deprecationHandler = null; diff --git a/node_modules/moment/src/lib/utils/extend.js b/node_modules/moment/src/lib/utils/extend.js new file mode 100644 index 00000000..ba74a0bf --- /dev/null +++ b/node_modules/moment/src/lib/utils/extend.js @@ -0,0 +1,19 @@ +import hasOwnProp from './has-own-prop'; + +export default function extend(a, b) { + for (var i in b) { + if (hasOwnProp(b, i)) { + a[i] = b[i]; + } + } + + if (hasOwnProp(b, 'toString')) { + a.toString = b.toString; + } + + if (hasOwnProp(b, 'valueOf')) { + a.valueOf = b.valueOf; + } + + return a; +} diff --git a/node_modules/moment/src/lib/utils/has-own-prop.js b/node_modules/moment/src/lib/utils/has-own-prop.js new file mode 100644 index 00000000..4d2403cc --- /dev/null +++ b/node_modules/moment/src/lib/utils/has-own-prop.js @@ -0,0 +1,3 @@ +export default function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); +} diff --git a/node_modules/moment/src/lib/utils/hooks.js b/node_modules/moment/src/lib/utils/hooks.js new file mode 100644 index 00000000..02a5bd3d --- /dev/null +++ b/node_modules/moment/src/lib/utils/hooks.js @@ -0,0 +1,13 @@ +export { hooks, setHookCallback }; + +var hookCallback; + +function hooks () { + return hookCallback.apply(null, arguments); +} + +// This is done to register the method called with moment() +// without creating circular dependencies. +function setHookCallback (callback) { + hookCallback = callback; +} diff --git a/node_modules/moment/src/lib/utils/index-of.js b/node_modules/moment/src/lib/utils/index-of.js new file mode 100644 index 00000000..92298cff --- /dev/null +++ b/node_modules/moment/src/lib/utils/index-of.js @@ -0,0 +1,18 @@ +var indexOf; + +if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; +} else { + indexOf = function (o) { + // I know + var i; + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + return -1; + }; +} + +export { indexOf as default }; diff --git a/node_modules/moment/src/lib/utils/is-array.js b/node_modules/moment/src/lib/utils/is-array.js new file mode 100644 index 00000000..2d0e0f3d --- /dev/null +++ b/node_modules/moment/src/lib/utils/is-array.js @@ -0,0 +1,3 @@ +export default function isArray(input) { + return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; +} diff --git a/node_modules/moment/src/lib/utils/is-date.js b/node_modules/moment/src/lib/utils/is-date.js new file mode 100644 index 00000000..69c4d0e9 --- /dev/null +++ b/node_modules/moment/src/lib/utils/is-date.js @@ -0,0 +1,3 @@ +export default function isDate(input) { + return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; +} diff --git a/node_modules/moment/src/lib/utils/is-function.js b/node_modules/moment/src/lib/utils/is-function.js new file mode 100644 index 00000000..12304b1b --- /dev/null +++ b/node_modules/moment/src/lib/utils/is-function.js @@ -0,0 +1,3 @@ +export default function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; +} diff --git a/node_modules/moment/src/lib/utils/is-number.js b/node_modules/moment/src/lib/utils/is-number.js new file mode 100644 index 00000000..74d6137b --- /dev/null +++ b/node_modules/moment/src/lib/utils/is-number.js @@ -0,0 +1,3 @@ +export default function isNumber(input) { + return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; +} diff --git a/node_modules/moment/src/lib/utils/is-object-empty.js b/node_modules/moment/src/lib/utils/is-object-empty.js new file mode 100644 index 00000000..695c3d24 --- /dev/null +++ b/node_modules/moment/src/lib/utils/is-object-empty.js @@ -0,0 +1,13 @@ +export default function isObjectEmpty(obj) { + if (Object.getOwnPropertyNames) { + return (Object.getOwnPropertyNames(obj).length === 0); + } else { + var k; + for (k in obj) { + if (obj.hasOwnProperty(k)) { + return false; + } + } + return true; + } +} diff --git a/node_modules/moment/src/lib/utils/is-object.js b/node_modules/moment/src/lib/utils/is-object.js new file mode 100644 index 00000000..11135389 --- /dev/null +++ b/node_modules/moment/src/lib/utils/is-object.js @@ -0,0 +1,5 @@ +export default function isObject(input) { + // IE8 will treat undefined and null as object if it wasn't for + // input != null + return input != null && Object.prototype.toString.call(input) === '[object Object]'; +} diff --git a/node_modules/moment/src/lib/utils/is-undefined.js b/node_modules/moment/src/lib/utils/is-undefined.js new file mode 100644 index 00000000..de57a8b2 --- /dev/null +++ b/node_modules/moment/src/lib/utils/is-undefined.js @@ -0,0 +1,3 @@ +export default function isUndefined(input) { + return input === void 0; +} diff --git a/node_modules/moment/src/lib/utils/keys.js b/node_modules/moment/src/lib/utils/keys.js new file mode 100644 index 00000000..2da4e322 --- /dev/null +++ b/node_modules/moment/src/lib/utils/keys.js @@ -0,0 +1,19 @@ +import hasOwnProp from './has-own-prop'; + +var keys; + +if (Object.keys) { + keys = Object.keys; +} else { + keys = function (obj) { + var i, res = []; + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + return res; + }; +} + +export { keys as default }; diff --git a/node_modules/moment/src/lib/utils/map.js b/node_modules/moment/src/lib/utils/map.js new file mode 100644 index 00000000..1cbc5639 --- /dev/null +++ b/node_modules/moment/src/lib/utils/map.js @@ -0,0 +1,7 @@ +export default function map(arr, fn) { + var res = [], i; + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); + } + return res; +} diff --git a/node_modules/moment/src/lib/utils/mod.js b/node_modules/moment/src/lib/utils/mod.js new file mode 100644 index 00000000..8046cdac --- /dev/null +++ b/node_modules/moment/src/lib/utils/mod.js @@ -0,0 +1,3 @@ +export default function mod(n, x) { + return ((n % x) + x) % x; +} diff --git a/node_modules/moment/src/lib/utils/some.js b/node_modules/moment/src/lib/utils/some.js new file mode 100644 index 00000000..1bd31867 --- /dev/null +++ b/node_modules/moment/src/lib/utils/some.js @@ -0,0 +1,19 @@ +var some; +if (Array.prototype.some) { + some = Array.prototype.some; +} else { + some = function (fun) { + var t = Object(this); + var len = t.length >>> 0; + + for (var i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; +} + +export { some as default }; diff --git a/node_modules/moment/src/lib/utils/to-int.js b/node_modules/moment/src/lib/utils/to-int.js new file mode 100644 index 00000000..fb489416 --- /dev/null +++ b/node_modules/moment/src/lib/utils/to-int.js @@ -0,0 +1,12 @@ +import absFloor from './abs-floor'; + +export default function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; +} diff --git a/node_modules/moment/src/lib/utils/zero-fill.js b/node_modules/moment/src/lib/utils/zero-fill.js new file mode 100644 index 00000000..7009ec90 --- /dev/null +++ b/node_modules/moment/src/lib/utils/zero-fill.js @@ -0,0 +1,7 @@ +export default function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return (sign ? (forceSign ? '+' : '') : '-') + + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; +} diff --git a/node_modules/moment/src/locale/af.js b/node_modules/moment/src/locale/af.js new file mode 100644 index 00000000..7af03241 --- /dev/null +++ b/node_modules/moment/src/locale/af.js @@ -0,0 +1,64 @@ +//! moment.js locale configuration +//! locale : Afrikaans [af] +//! author : Werner Mollentze : https://github.com/wernerm + +import moment from '../moment'; + +export default moment.defineLocale('af', { + months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'), + monthsShort : 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), + weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'), + weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), + weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), + meridiemParse: /vm|nm/i, + isPM : function (input) { + return /^nm$/i.test(input); + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'vm' : 'VM'; + } else { + return isLower ? 'nm' : 'NM'; + } + }, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Vandag om] LT', + nextDay : '[Môre om] LT', + nextWeek : 'dddd [om] LT', + lastDay : '[Gister om] LT', + lastWeek : '[Laas] dddd [om] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'oor %s', + past : '%s gelede', + s : '\'n paar sekondes', + ss : '%d sekondes', + m : '\'n minuut', + mm : '%d minute', + h : '\'n uur', + hh : '%d ure', + d : '\'n dag', + dd : '%d dae', + M : '\'n maand', + MM : '%d maande', + y : '\'n jaar', + yy : '%d jaar' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter + }, + week : { + dow : 1, // Maandag is die eerste dag van die week. + doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar. + } +}); diff --git a/node_modules/moment/src/locale/ar-dz.js b/node_modules/moment/src/locale/ar-dz.js new file mode 100644 index 00000000..b485b5a7 --- /dev/null +++ b/node_modules/moment/src/locale/ar-dz.js @@ -0,0 +1,51 @@ +//! moment.js locale configuration +//! locale : Arabic (Algeria) [ar-dz] +//! author : Noureddine LOUAHEDJ : https://github.com/noureddineme + +import moment from '../moment'; + +export default moment.defineLocale('ar-dz', { + months : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + monthsShort : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/ar-kw.js b/node_modules/moment/src/locale/ar-kw.js new file mode 100644 index 00000000..90df0edb --- /dev/null +++ b/node_modules/moment/src/locale/ar-kw.js @@ -0,0 +1,50 @@ +//! moment.js locale configuration +//! locale : Arabic (Kuwait) [ar-kw] +//! author : Nusret Parlak: https://github.com/nusretparlak + +import moment from '../moment'; + +export default moment.defineLocale('ar-kw', { + months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/ar-ly.js b/node_modules/moment/src/locale/ar-ly.js new file mode 100644 index 00000000..77fe8d86 --- /dev/null +++ b/node_modules/moment/src/locale/ar-ly.js @@ -0,0 +1,113 @@ +//! moment.js locale configuration +//! locale : Arabic (Lybia) [ar-ly] +//! author : Ali Hmer: https://github.com/kikoanis + +import moment from '../moment'; + +var symbolMap = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '0': '0' +}, pluralForm = function (n) { + return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; +}, plurals = { + s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'], + m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'], + h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'], + d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'], + M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'], + y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام'] +}, pluralize = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm(number), + str = plurals[u][pluralForm(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; +}, months = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر' +]; + +export default moment.defineLocale('ar-ly', { + months : months, + monthsShort : months, + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'D/\u200FM/\u200FYYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ص|م/, + isPM : function (input) { + return 'م' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar : { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'بعد %s', + past : 'منذ %s', + s : pluralize('s'), + ss : pluralize('s'), + m : pluralize('m'), + mm : pluralize('m'), + h : pluralize('h'), + hh : pluralize('h'), + d : pluralize('d'), + dd : pluralize('d'), + M : pluralize('M'), + MM : pluralize('M'), + y : pluralize('y'), + yy : pluralize('y') + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/ar-ma.js b/node_modules/moment/src/locale/ar-ma.js new file mode 100644 index 00000000..fa99b078 --- /dev/null +++ b/node_modules/moment/src/locale/ar-ma.js @@ -0,0 +1,52 @@ +//! moment.js locale configuration +//! locale : Arabic (Morocco) [ar-ma] +//! author : ElFadili Yassine : https://github.com/ElFadiliY +//! author : Abdel Said : https://github.com/abdelsaid + +import moment from '../moment'; + +export default moment.defineLocale('ar-ma', { + months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/ar-sa.js b/node_modules/moment/src/locale/ar-sa.js new file mode 100644 index 00000000..129c367b --- /dev/null +++ b/node_modules/moment/src/locale/ar-sa.js @@ -0,0 +1,96 @@ +//! moment.js locale configuration +//! locale : Arabic (Saudi Arabia) [ar-sa] +//! author : Suhail Alkowaileet : https://github.com/xsoh + +import moment from '../moment'; + +var symbolMap = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠' +}, numberMap = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0' +}; + +export default moment.defineLocale('ar-sa', { + months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ص|م/, + isPM : function (input) { + return 'م' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar : { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'في %s', + past : 'منذ %s', + s : 'ثوان', + ss : '%d ثانية', + m : 'دقيقة', + mm : '%d دقائق', + h : 'ساعة', + hh : '%d ساعات', + d : 'يوم', + dd : '%d أيام', + M : 'شهر', + MM : '%d أشهر', + y : 'سنة', + yy : '%d سنوات' + }, + preparse: function (string) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/ar-tn.js b/node_modules/moment/src/locale/ar-tn.js new file mode 100644 index 00000000..952f3bfd --- /dev/null +++ b/node_modules/moment/src/locale/ar-tn.js @@ -0,0 +1,51 @@ +//! moment.js locale configuration +//! locale : Arabic (Tunisia) [ar-tn] +//! author : Nader Toukabri : https://github.com/naderio + +import moment from '../moment'; + +export default moment.defineLocale('ar-tn', { + months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss : '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات' + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/ar.js b/node_modules/moment/src/locale/ar.js new file mode 100644 index 00000000..bbae8d5e --- /dev/null +++ b/node_modules/moment/src/locale/ar.js @@ -0,0 +1,128 @@ +//! moment.js locale configuration +//! locale : Arabic [ar] +//! author : Abdel Said: https://github.com/abdelsaid +//! author : Ahmed Elkhatib +//! author : forabi https://github.com/forabi + +import moment from '../moment'; + +var symbolMap = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠' +}, numberMap = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0' +}, pluralForm = function (n) { + return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; +}, plurals = { + s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'], + m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'], + h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'], + d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'], + M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'], + y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام'] +}, pluralize = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm(number), + str = plurals[u][pluralForm(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; +}, months = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر' +]; + +export default moment.defineLocale('ar', { + months : months, + monthsShort : months, + weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'D/\u200FM/\u200FYYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ص|م/, + isPM : function (input) { + return 'م' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar : { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'بعد %s', + past : 'منذ %s', + s : pluralize('s'), + ss : pluralize('s'), + m : pluralize('m'), + mm : pluralize('m'), + h : pluralize('h'), + hh : pluralize('h'), + d : pluralize('d'), + dd : pluralize('d'), + M : pluralize('M'), + MM : pluralize('M'), + y : pluralize('y'), + yy : pluralize('y') + }, + preparse: function (string) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/az.js b/node_modules/moment/src/locale/az.js new file mode 100644 index 00000000..09acef76 --- /dev/null +++ b/node_modules/moment/src/locale/az.js @@ -0,0 +1,97 @@ +//! moment.js locale configuration +//! locale : Azerbaijani [az] +//! author : topchiyev : https://github.com/topchiyev + +import moment from '../moment'; + +var suffixes = { + 1: '-inci', + 5: '-inci', + 8: '-inci', + 70: '-inci', + 80: '-inci', + 2: '-nci', + 7: '-nci', + 20: '-nci', + 50: '-nci', + 3: '-üncü', + 4: '-üncü', + 100: '-üncü', + 6: '-ncı', + 9: '-uncu', + 10: '-uncu', + 30: '-uncu', + 60: '-ıncı', + 90: '-ıncı' +}; + +export default moment.defineLocale('az', { + months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'), + monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), + weekdays : 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'), + weekdaysShort : 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'), + weekdaysMin : 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[bugün saat] LT', + nextDay : '[sabah saat] LT', + nextWeek : '[gələn həftə] dddd [saat] LT', + lastDay : '[dünən] LT', + lastWeek : '[keçən həftə] dddd [saat] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s sonra', + past : '%s əvvəl', + s : 'birneçə saniyə', + ss : '%d saniyə', + m : 'bir dəqiqə', + mm : '%d dəqiqə', + h : 'bir saat', + hh : '%d saat', + d : 'bir gün', + dd : '%d gün', + M : 'bir ay', + MM : '%d ay', + y : 'bir il', + yy : '%d il' + }, + meridiemParse: /gecə|səhər|gündüz|axşam/, + isPM : function (input) { + return /^(gündüz|axşam)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'gecə'; + } else if (hour < 12) { + return 'səhər'; + } else if (hour < 17) { + return 'gündüz'; + } else { + return 'axşam'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, + ordinal : function (number) { + if (number === 0) { // special case for zero + return number + '-ıncı'; + } + var a = number % 10, + b = number % 100 - a, + c = number >= 100 ? 100 : null; + return number + (suffixes[a] || suffixes[b] || suffixes[c]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/be.js b/node_modules/moment/src/locale/be.js new file mode 100644 index 00000000..e163c01b --- /dev/null +++ b/node_modules/moment/src/locale/be.js @@ -0,0 +1,126 @@ +//! moment.js locale configuration +//! locale : Belarusian [be] +//! author : Dmitry Demidov : https://github.com/demidov91 +//! author: Praleska: http://praleska.pro/ +//! Author : Menelion Elensúle : https://github.com/Oire + +import moment from '../moment'; + +function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); +} +function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + 'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін', + 'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін', + 'dd': 'дзень_дні_дзён', + 'MM': 'месяц_месяцы_месяцаў', + 'yy': 'год_гады_гадоў' + }; + if (key === 'm') { + return withoutSuffix ? 'хвіліна' : 'хвіліну'; + } + else if (key === 'h') { + return withoutSuffix ? 'гадзіна' : 'гадзіну'; + } + else { + return number + ' ' + plural(format[key], +number); + } +} + +export default moment.defineLocale('be', { + months : { + format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'), + standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_') + }, + monthsShort : 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'), + weekdays : { + format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'), + standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'), + isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/ + }, + weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY г.', + LLL : 'D MMMM YYYY г., HH:mm', + LLLL : 'dddd, D MMMM YYYY г., HH:mm' + }, + calendar : { + sameDay: '[Сёння ў] LT', + nextDay: '[Заўтра ў] LT', + lastDay: '[Учора ў] LT', + nextWeek: function () { + return '[У] dddd [ў] LT'; + }, + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return '[У мінулую] dddd [ў] LT'; + case 1: + case 2: + case 4: + return '[У мінулы] dddd [ў] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'праз %s', + past : '%s таму', + s : 'некалькі секунд', + m : relativeTimeWithPlural, + mm : relativeTimeWithPlural, + h : relativeTimeWithPlural, + hh : relativeTimeWithPlural, + d : 'дзень', + dd : relativeTimeWithPlural, + M : 'месяц', + MM : relativeTimeWithPlural, + y : 'год', + yy : relativeTimeWithPlural + }, + meridiemParse: /ночы|раніцы|дня|вечара/, + isPM : function (input) { + return /^(дня|вечара)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ночы'; + } else if (hour < 12) { + return 'раніцы'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечара'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-і' : number + '-ы'; + case 'D': + return number + '-га'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/bg.js b/node_modules/moment/src/locale/bg.js new file mode 100644 index 00000000..ebe9a903 --- /dev/null +++ b/node_modules/moment/src/locale/bg.js @@ -0,0 +1,82 @@ +//! moment.js locale configuration +//! locale : Bulgarian [bg] +//! author : Krasen Borisov : https://github.com/kraz + +import moment from '../moment'; + +export default moment.defineLocale('bg', { + months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'), + monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'), + weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'), + weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'), + weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'D.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY H:mm', + LLLL : 'dddd, D MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[Днес в] LT', + nextDay : '[Утре в] LT', + nextWeek : 'dddd [в] LT', + lastDay : '[Вчера в] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[В изминалата] dddd [в] LT'; + case 1: + case 2: + case 4: + case 5: + return '[В изминалия] dddd [в] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'след %s', + past : 'преди %s', + s : 'няколко секунди', + ss : '%d секунди', + m : 'минута', + mm : '%d минути', + h : 'час', + hh : '%d часа', + d : 'ден', + dd : '%d дни', + M : 'месец', + MM : '%d месеца', + y : 'година', + yy : '%d години' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal : function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/bm.js b/node_modules/moment/src/locale/bm.js new file mode 100644 index 00000000..887a7503 --- /dev/null +++ b/node_modules/moment/src/locale/bm.js @@ -0,0 +1,50 @@ +//! moment.js locale configuration +//! locale : Bambara [bm] +//! author : Estelle Comment : https://github.com/estellecomment +// Language contact person : Abdoufata Kane : https://github.com/abdoufata + +import moment from '../moment'; + +export default moment.defineLocale('bm', { + months : 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split('_'), + monthsShort : 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'), + weekdays : 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'), + weekdaysShort : 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'), + weekdaysMin : 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'MMMM [tile] D [san] YYYY', + LLL : 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + LLLL : 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm' + }, + calendar : { + sameDay : '[Bi lɛrɛ] LT', + nextDay : '[Sini lɛrɛ] LT', + nextWeek : 'dddd [don lɛrɛ] LT', + lastDay : '[Kunu lɛrɛ] LT', + lastWeek : 'dddd [tɛmɛnen lɛrɛ] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s kɔnɔ', + past : 'a bɛ %s bɔ', + s : 'sanga dama dama', + ss : 'sekondi %d', + m : 'miniti kelen', + mm : 'miniti %d', + h : 'lɛrɛ kelen', + hh : 'lɛrɛ %d', + d : 'tile kelen', + dd : 'tile %d', + M : 'kalo kelen', + MM : 'kalo %d', + y : 'san kelen', + yy : 'san %d' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/bn.js b/node_modules/moment/src/locale/bn.js new file mode 100644 index 00000000..b0db27eb --- /dev/null +++ b/node_modules/moment/src/locale/bn.js @@ -0,0 +1,110 @@ +//! moment.js locale configuration +//! locale : Bengali [bn] +//! author : Kaushik Gandhi : https://github.com/kaushikgandhi + +import moment from '../moment'; + +var symbolMap = { + '1': '১', + '2': '২', + '3': '৩', + '4': '৪', + '5': '৫', + '6': '৬', + '7': '৭', + '8': '৮', + '9': '৯', + '0': '০' +}, +numberMap = { + '১': '1', + '২': '2', + '৩': '3', + '৪': '4', + '৫': '5', + '৬': '6', + '৭': '7', + '৮': '8', + '৯': '9', + '০': '0' +}; + +export default moment.defineLocale('bn', { + months : 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'), + monthsShort : 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'), + weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'), + weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'), + weekdaysMin : 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'), + longDateFormat : { + LT : 'A h:mm সময়', + LTS : 'A h:mm:ss সময়', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm সময়', + LLLL : 'dddd, D MMMM YYYY, A h:mm সময়' + }, + calendar : { + sameDay : '[আজ] LT', + nextDay : '[আগামীকাল] LT', + nextWeek : 'dddd, LT', + lastDay : '[গতকাল] LT', + lastWeek : '[গত] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s পরে', + past : '%s আগে', + s : 'কয়েক সেকেন্ড', + ss : '%d সেকেন্ড', + m : 'এক মিনিট', + mm : '%d মিনিট', + h : 'এক ঘন্টা', + hh : '%d ঘন্টা', + d : 'এক দিন', + dd : '%d দিন', + M : 'এক মাস', + MM : '%d মাস', + y : 'এক বছর', + yy : '%d বছর' + }, + preparse: function (string) { + return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ((meridiem === 'রাত' && hour >= 4) || + (meridiem === 'দুপুর' && hour < 5) || + meridiem === 'বিকাল') { + return hour + 12; + } else { + return hour; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'রাত'; + } else if (hour < 10) { + return 'সকাল'; + } else if (hour < 17) { + return 'দুপুর'; + } else if (hour < 20) { + return 'বিকাল'; + } else { + return 'রাত'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/bo.js b/node_modules/moment/src/locale/bo.js new file mode 100644 index 00000000..b4a04be0 --- /dev/null +++ b/node_modules/moment/src/locale/bo.js @@ -0,0 +1,111 @@ +//! moment.js locale configuration +//! locale : Tibetan [bo] +//! author : Thupten N. Chakrishar : https://github.com/vajradog + +import moment from '../moment'; + +var symbolMap = { + '1': '༡', + '2': '༢', + '3': '༣', + '4': '༤', + '5': '༥', + '6': '༦', + '7': '༧', + '8': '༨', + '9': '༩', + '0': '༠' +}, +numberMap = { + '༡': '1', + '༢': '2', + '༣': '3', + '༤': '4', + '༥': '5', + '༦': '6', + '༧': '7', + '༨': '8', + '༩': '9', + '༠': '0' +}; + +export default moment.defineLocale('bo', { + months : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), + monthsShort : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), + weekdays : 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'), + weekdaysShort : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), + weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm', + LLLL : 'dddd, D MMMM YYYY, A h:mm' + }, + calendar : { + sameDay : '[དི་རིང] LT', + nextDay : '[སང་ཉིན] LT', + nextWeek : '[བདུན་ཕྲག་རྗེས་མ], LT', + lastDay : '[ཁ་སང] LT', + lastWeek : '[བདུན་ཕྲག་མཐའ་མ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ལ་', + past : '%s སྔན་ལ', + s : 'ལམ་སང', + ss : '%d སྐར་ཆ།', + m : 'སྐར་མ་གཅིག', + mm : '%d སྐར་མ', + h : 'ཆུ་ཚོད་གཅིག', + hh : '%d ཆུ་ཚོད', + d : 'ཉིན་གཅིག', + dd : '%d ཉིན་', + M : 'ཟླ་བ་གཅིག', + MM : '%d ཟླ་བ', + y : 'ལོ་གཅིག', + yy : '%d ལོ' + }, + preparse: function (string) { + return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ((meridiem === 'མཚན་མོ' && hour >= 4) || + (meridiem === 'ཉིན་གུང' && hour < 5) || + meridiem === 'དགོང་དག') { + return hour + 12; + } else { + return hour; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'མཚན་མོ'; + } else if (hour < 10) { + return 'ཞོགས་ཀས'; + } else if (hour < 17) { + return 'ཉིན་གུང'; + } else if (hour < 20) { + return 'དགོང་དག'; + } else { + return 'མཚན་མོ'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/br.js b/node_modules/moment/src/locale/br.js new file mode 100644 index 00000000..7208f793 --- /dev/null +++ b/node_modules/moment/src/locale/br.js @@ -0,0 +1,100 @@ +//! moment.js locale configuration +//! locale : Breton [br] +//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou + +import moment from '../moment'; + +function relativeTimeWithMutation(number, withoutSuffix, key) { + var format = { + 'mm': 'munutenn', + 'MM': 'miz', + 'dd': 'devezh' + }; + return number + ' ' + mutation(format[key], number); +} +function specialMutationForYears(number) { + switch (lastNumber(number)) { + case 1: + case 3: + case 4: + case 5: + case 9: + return number + ' bloaz'; + default: + return number + ' vloaz'; + } +} +function lastNumber(number) { + if (number > 9) { + return lastNumber(number % 10); + } + return number; +} +function mutation(text, number) { + if (number === 2) { + return softMutation(text); + } + return text; +} +function softMutation(text) { + var mutationTable = { + 'm': 'v', + 'b': 'v', + 'd': 'z' + }; + if (mutationTable[text.charAt(0)] === undefined) { + return text; + } + return mutationTable[text.charAt(0)] + text.substring(1); +} + +export default moment.defineLocale('br', { + months : 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'), + monthsShort : 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), + weekdays : 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'), + weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), + weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h[e]mm A', + LTS : 'h[e]mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D [a viz] MMMM YYYY', + LLL : 'D [a viz] MMMM YYYY h[e]mm A', + LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A' + }, + calendar : { + sameDay : '[Hiziv da] LT', + nextDay : '[Warc\'hoazh da] LT', + nextWeek : 'dddd [da] LT', + lastDay : '[Dec\'h da] LT', + lastWeek : 'dddd [paset da] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'a-benn %s', + past : '%s \'zo', + s : 'un nebeud segondennoù', + ss : '%d eilenn', + m : 'ur vunutenn', + mm : relativeTimeWithMutation, + h : 'un eur', + hh : '%d eur', + d : 'un devezh', + dd : relativeTimeWithMutation, + M : 'ur miz', + MM : relativeTimeWithMutation, + y : 'ur bloaz', + yy : specialMutationForYears + }, + dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/, + ordinal : function (number) { + var output = (number === 1) ? 'añ' : 'vet'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/bs.js b/node_modules/moment/src/locale/bs.js new file mode 100644 index 00000000..8a0f640d --- /dev/null +++ b/node_modules/moment/src/locale/bs.js @@ -0,0 +1,143 @@ +//! moment.js locale configuration +//! locale : Bosnian [bs] +//! author : Nedim Cholich : https://github.com/frontyard +//! based on (hr) translation by Bojan Marković + +import moment from '../moment'; + +function translate(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } +} + +export default moment.defineLocale('bs', { + months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'), + monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[danas u] LT', + nextDay : '[sutra u] LT', + nextWeek : function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[jučer u] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'prije %s', + s : 'par sekundi', + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : 'dan', + dd : translate, + M : 'mjesec', + MM : translate, + y : 'godinu', + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/ca.js b/node_modules/moment/src/locale/ca.js new file mode 100644 index 00000000..8d1df572 --- /dev/null +++ b/node_modules/moment/src/locale/ca.js @@ -0,0 +1,80 @@ +//! moment.js locale configuration +//! locale : Catalan [ca] +//! author : Juan G. Hurtado : https://github.com/juanghurtado + +import moment from '../moment'; + +export default moment.defineLocale('ca', { + months : { + standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'), + format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'), + isFormat: /D[oD]?(\s)+MMMM/ + }, + monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'), + monthsParseExact : true, + weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'), + weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'), + weekdaysMin : 'dg_dl_dt_dc_dj_dv_ds'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM [de] YYYY', + ll : 'D MMM YYYY', + LLL : 'D MMMM [de] YYYY [a les] H:mm', + lll : 'D MMM YYYY, H:mm', + LLLL : 'dddd D MMMM [de] YYYY [a les] H:mm', + llll : 'ddd D MMM YYYY, H:mm' + }, + calendar : { + sameDay : function () { + return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + nextDay : function () { + return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + lastDay : function () { + return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'd\'aquí %s', + past : 'fa %s', + s : 'uns segons', + ss : '%d segons', + m : 'un minut', + mm : '%d minuts', + h : 'una hora', + hh : '%d hores', + d : 'un dia', + dd : '%d dies', + M : 'un mes', + MM : '%d mesos', + y : 'un any', + yy : '%d anys' + }, + dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, + ordinal : function (number, period) { + var output = (number === 1) ? 'r' : + (number === 2) ? 'n' : + (number === 3) ? 'r' : + (number === 4) ? 't' : 'è'; + if (period === 'w' || period === 'W') { + output = 'a'; + } + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/cs.js b/node_modules/moment/src/locale/cs.js new file mode 100644 index 00000000..143a7095 --- /dev/null +++ b/node_modules/moment/src/locale/cs.js @@ -0,0 +1,164 @@ +//! moment.js locale configuration +//! locale : Czech [cs] +//! author : petrbela : https://github.com/petrbela + +import moment from '../moment'; + +var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'), + monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'); + +var monthsParse = [/^led/i, /^úno/i, /^bře/i, /^dub/i, /^kvě/i, /^(čvn|červen$|června)/i, /^(čvc|červenec|července)/i, /^srp/i, /^zář/i, /^říj/i, /^lis/i, /^pro/i]; +// NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. +// Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. +var monthsRegex = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i; + +function plural(n) { + return (n > 1) && (n < 5) && (~~(n / 10) !== 1); +} +function translate(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'sekundy' : 'sekund'); + } else { + return result + 'sekundami'; + } + break; + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou'); + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'minuty' : 'minut'); + } else { + return result + 'minutami'; + } + break; + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'hodiny' : 'hodin'); + } else { + return result + 'hodinami'; + } + break; + case 'd': // a day / in a day / a day ago + return (withoutSuffix || isFuture) ? 'den' : 'dnem'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'dny' : 'dní'); + } else { + return result + 'dny'; + } + break; + case 'M': // a month / in a month / a month ago + return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'měsíce' : 'měsíců'); + } else { + return result + 'měsíci'; + } + break; + case 'y': // a year / in a year / a year ago + return (withoutSuffix || isFuture) ? 'rok' : 'rokem'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'roky' : 'let'); + } else { + return result + 'lety'; + } + break; + } +} + +export default moment.defineLocale('cs', { + months : months, + monthsShort : monthsShort, + monthsRegex : monthsRegex, + monthsShortRegex : monthsRegex, + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + monthsStrictRegex : /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i, + monthsShortStrictRegex : /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i, + monthsParse : monthsParse, + longMonthsParse : monthsParse, + shortMonthsParse : monthsParse, + weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'), + weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'), + weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'), + longDateFormat : { + LT: 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd D. MMMM YYYY H:mm', + l : 'D. M. YYYY' + }, + calendar : { + sameDay: '[dnes v] LT', + nextDay: '[zítra v] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v neděli v] LT'; + case 1: + case 2: + return '[v] dddd [v] LT'; + case 3: + return '[ve středu v] LT'; + case 4: + return '[ve čtvrtek v] LT'; + case 5: + return '[v pátek v] LT'; + case 6: + return '[v sobotu v] LT'; + } + }, + lastDay: '[včera v] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulou neděli v] LT'; + case 1: + case 2: + return '[minulé] dddd [v] LT'; + case 3: + return '[minulou středu v] LT'; + case 4: + case 5: + return '[minulý] dddd [v] LT'; + case 6: + return '[minulou sobotu v] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'za %s', + past : 'před %s', + s : translate, + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate + }, + dayOfMonthOrdinalParse : /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/cv.js b/node_modules/moment/src/locale/cv.js new file mode 100644 index 00000000..2443f0aa --- /dev/null +++ b/node_modules/moment/src/locale/cv.js @@ -0,0 +1,54 @@ +//! moment.js locale configuration +//! locale : Chuvash [cv] +//! author : Anatoly Mironov : https://github.com/mirontoli + +import moment from '../moment'; + +export default moment.defineLocale('cv', { + months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'), + monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'), + weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'), + weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'), + weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD-MM-YYYY', + LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', + LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm' + }, + calendar : { + sameDay: '[Паян] LT [сехетре]', + nextDay: '[Ыран] LT [сехетре]', + lastDay: '[Ӗнер] LT [сехетре]', + nextWeek: '[Ҫитес] dddd LT [сехетре]', + lastWeek: '[Иртнӗ] dddd LT [сехетре]', + sameElse: 'L' + }, + relativeTime : { + future : function (output) { + var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран'; + return output + affix; + }, + past : '%s каялла', + s : 'пӗр-ик ҫеккунт', + ss : '%d ҫеккунт', + m : 'пӗр минут', + mm : '%d минут', + h : 'пӗр сехет', + hh : '%d сехет', + d : 'пӗр кун', + dd : '%d кун', + M : 'пӗр уйӑх', + MM : '%d уйӑх', + y : 'пӗр ҫул', + yy : '%d ҫул' + }, + dayOfMonthOrdinalParse: /\d{1,2}-мӗш/, + ordinal : '%d-мӗш', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/cy.js b/node_modules/moment/src/locale/cy.js new file mode 100644 index 00000000..eb2e54c9 --- /dev/null +++ b/node_modules/moment/src/locale/cy.js @@ -0,0 +1,73 @@ +//! moment.js locale configuration +//! locale : Welsh [cy] +//! author : Robert Allen : https://github.com/robgallen +//! author : https://github.com/ryangreaves + +import moment from '../moment'; + +export default moment.defineLocale('cy', { + months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'), + monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'), + weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'), + weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), + weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), + weekdaysParseExact : true, + // time formats are the same as en-gb + longDateFormat: { + LT: 'HH:mm', + LTS : 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[Heddiw am] LT', + nextDay: '[Yfory am] LT', + nextWeek: 'dddd [am] LT', + lastDay: '[Ddoe am] LT', + lastWeek: 'dddd [diwethaf am] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'mewn %s', + past: '%s yn ôl', + s: 'ychydig eiliadau', + ss: '%d eiliad', + m: 'munud', + mm: '%d munud', + h: 'awr', + hh: '%d awr', + d: 'diwrnod', + dd: '%d diwrnod', + M: 'mis', + MM: '%d mis', + y: 'blwyddyn', + yy: '%d flynedd' + }, + dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, + // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh + ordinal: function (number) { + var b = number, + output = '', + lookup = [ + '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed + 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed + ]; + if (b > 20) { + if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { + output = 'fed'; // not 30ain, 70ain or 90ain + } else { + output = 'ain'; + } + } else if (b > 0) { + output = lookup[b]; + } + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/da.js b/node_modules/moment/src/locale/da.js new file mode 100644 index 00000000..a06c6e02 --- /dev/null +++ b/node_modules/moment/src/locale/da.js @@ -0,0 +1,51 @@ +//! moment.js locale configuration +//! locale : Danish [da] +//! author : Ulrik Nielsen : https://github.com/mrbase + +import moment from '../moment'; + +export default moment.defineLocale('da', { + months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'), + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'), + weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm' + }, + calendar : { + sameDay : '[i dag kl.] LT', + nextDay : '[i morgen kl.] LT', + nextWeek : 'på dddd [kl.] LT', + lastDay : '[i går kl.] LT', + lastWeek : '[i] dddd[s kl.] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'om %s', + past : '%s siden', + s : 'få sekunder', + ss : '%d sekunder', + m : 'et minut', + mm : '%d minutter', + h : 'en time', + hh : '%d timer', + d : 'en dag', + dd : '%d dage', + M : 'en måned', + MM : '%d måneder', + y : 'et år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/de-at.js b/node_modules/moment/src/locale/de-at.js new file mode 100644 index 00000000..4ed974c9 --- /dev/null +++ b/node_modules/moment/src/locale/de-at.js @@ -0,0 +1,70 @@ +//! moment.js locale configuration +//! locale : German (Austria) [de-at] +//! author : lluchs : https://github.com/lluchs +//! author: Menelion Elensúle: https://github.com/Oire +//! author : Martin Groller : https://github.com/MadMG +//! author : Mikolaj Dadela : https://github.com/mik01aj + +import moment from '../moment'; + +function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eine Minute', 'einer Minute'], + 'h': ['eine Stunde', 'einer Stunde'], + 'd': ['ein Tag', 'einem Tag'], + 'dd': [number + ' Tage', number + ' Tagen'], + 'M': ['ein Monat', 'einem Monat'], + 'MM': [number + ' Monate', number + ' Monaten'], + 'y': ['ein Jahr', 'einem Jahr'], + 'yy': [number + ' Jahre', number + ' Jahren'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; +} + +export default moment.defineLocale('de-at', { + months : 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort : 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd, D. MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]' + }, + relativeTime : { + future : 'in %s', + past : 'vor %s', + s : 'ein paar Sekunden', + ss : '%d Sekunden', + m : processRelativeTime, + mm : '%d Minuten', + h : processRelativeTime, + hh : '%d Stunden', + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/de-ch.js b/node_modules/moment/src/locale/de-ch.js new file mode 100644 index 00000000..c448345a --- /dev/null +++ b/node_modules/moment/src/locale/de-ch.js @@ -0,0 +1,69 @@ +//! moment.js locale configuration +//! locale : German (Switzerland) [de-ch] +//! author : sschueller : https://github.com/sschueller + +// based on: https://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de# + +import moment from '../moment'; + +function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eine Minute', 'einer Minute'], + 'h': ['eine Stunde', 'einer Stunde'], + 'd': ['ein Tag', 'einem Tag'], + 'dd': [number + ' Tage', number + ' Tagen'], + 'M': ['ein Monat', 'einem Monat'], + 'MM': [number + ' Monate', number + ' Monaten'], + 'y': ['ein Jahr', 'einem Jahr'], + 'yy': [number + ' Jahre', number + ' Jahren'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; +} + +export default moment.defineLocale('de-ch', { + months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd, D. MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]' + }, + relativeTime : { + future : 'in %s', + past : 'vor %s', + s : 'ein paar Sekunden', + ss : '%d Sekunden', + m : processRelativeTime, + mm : '%d Minuten', + h : processRelativeTime, + hh : '%d Stunden', + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/de.js b/node_modules/moment/src/locale/de.js new file mode 100644 index 00000000..4574656b --- /dev/null +++ b/node_modules/moment/src/locale/de.js @@ -0,0 +1,69 @@ +//! moment.js locale configuration +//! locale : German [de] +//! author : lluchs : https://github.com/lluchs +//! author: Menelion Elensúle: https://github.com/Oire +//! author : Mikolaj Dadela : https://github.com/mik01aj + +import moment from '../moment'; + +function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eine Minute', 'einer Minute'], + 'h': ['eine Stunde', 'einer Stunde'], + 'd': ['ein Tag', 'einem Tag'], + 'dd': [number + ' Tage', number + ' Tagen'], + 'M': ['ein Monat', 'einem Monat'], + 'MM': [number + ' Monate', number + ' Monaten'], + 'y': ['ein Jahr', 'einem Jahr'], + 'yy': [number + ' Jahre', number + ' Jahren'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; +} + +export default moment.defineLocale('de', { + months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY HH:mm', + LLLL : 'dddd, D. MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]' + }, + relativeTime : { + future : 'in %s', + past : 'vor %s', + s : 'ein paar Sekunden', + ss : '%d Sekunden', + m : processRelativeTime, + mm : '%d Minuten', + h : processRelativeTime, + hh : '%d Stunden', + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/dv.js b/node_modules/moment/src/locale/dv.js new file mode 100644 index 00000000..67c40be3 --- /dev/null +++ b/node_modules/moment/src/locale/dv.js @@ -0,0 +1,90 @@ +//! moment.js locale configuration +//! locale : Maldivian [dv] +//! author : Jawish Hameed : https://github.com/jawish + +import moment from '../moment'; + +var months = [ + 'ޖެނުއަރީ', + 'ފެބްރުއަރީ', + 'މާރިޗު', + 'އޭޕްރީލު', + 'މޭ', + 'ޖޫން', + 'ޖުލައި', + 'އޯގަސްޓު', + 'ސެޕްޓެމްބަރު', + 'އޮކްޓޯބަރު', + 'ނޮވެމްބަރު', + 'ޑިސެމްބަރު' +], weekdays = [ + 'އާދިއްތަ', + 'ހޯމަ', + 'އަންގާރަ', + 'ބުދަ', + 'ބުރާސްފަތި', + 'ހުކުރު', + 'ހޮނިހިރު' +]; + +export default moment.defineLocale('dv', { + months : months, + monthsShort : months, + weekdays : weekdays, + weekdaysShort : weekdays, + weekdaysMin : 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'), + longDateFormat : { + + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'D/M/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + meridiemParse: /މކ|މފ/, + isPM : function (input) { + return 'މފ' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'މކ'; + } else { + return 'މފ'; + } + }, + calendar : { + sameDay : '[މިއަދު] LT', + nextDay : '[މާދަމާ] LT', + nextWeek : 'dddd LT', + lastDay : '[އިއްޔެ] LT', + lastWeek : '[ފާއިތުވި] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ތެރޭގައި %s', + past : 'ކުރިން %s', + s : 'ސިކުންތުކޮޅެއް', + ss : 'd% ސިކުންތު', + m : 'މިނިޓެއް', + mm : 'މިނިޓު %d', + h : 'ގަޑިއިރެއް', + hh : 'ގަޑިއިރު %d', + d : 'ދުވަހެއް', + dd : 'ދުވަސް %d', + M : 'މަހެއް', + MM : 'މަސް %d', + y : 'އަހަރެއް', + yy : 'އަހަރު %d' + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week : { + dow : 7, // Sunday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/el.js b/node_modules/moment/src/locale/el.js new file mode 100644 index 00000000..5e43ae3a --- /dev/null +++ b/node_modules/moment/src/locale/el.js @@ -0,0 +1,89 @@ +//! moment.js locale configuration +//! locale : Greek [el] +//! author : Aggelos Karalias : https://github.com/mehiel + +import moment from '../moment'; +import isFunction from '../lib/utils/is-function'; + +export default moment.defineLocale('el', { + monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'), + monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'), + months : function (momentToFormat, format) { + if (!momentToFormat) { + return this._monthsNominativeEl; + } else if (typeof format === 'string' && /D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM' + return this._monthsGenitiveEl[momentToFormat.month()]; + } else { + return this._monthsNominativeEl[momentToFormat.month()]; + } + }, + monthsShort : 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'), + weekdays : 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'), + weekdaysShort : 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'), + weekdaysMin : 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'), + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'μμ' : 'ΜΜ'; + } else { + return isLower ? 'πμ' : 'ΠΜ'; + } + }, + isPM : function (input) { + return ((input + '').toLowerCase()[0] === 'μ'); + }, + meridiemParse : /[ΠΜ]\.?Μ?\.?/i, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendarEl : { + sameDay : '[Σήμερα {}] LT', + nextDay : '[Αύριο {}] LT', + nextWeek : 'dddd [{}] LT', + lastDay : '[Χθες {}] LT', + lastWeek : function () { + switch (this.day()) { + case 6: + return '[το προηγούμενο] dddd [{}] LT'; + default: + return '[την προηγούμενη] dddd [{}] LT'; + } + }, + sameElse : 'L' + }, + calendar : function (key, mom) { + var output = this._calendarEl[key], + hours = mom && mom.hours(); + if (isFunction(output)) { + output = output.apply(mom); + } + return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις')); + }, + relativeTime : { + future : 'σε %s', + past : '%s πριν', + s : 'λίγα δευτερόλεπτα', + ss : '%d δευτερόλεπτα', + m : 'ένα λεπτό', + mm : '%d λεπτά', + h : 'μία ώρα', + hh : '%d ώρες', + d : 'μία μέρα', + dd : '%d μέρες', + M : 'ένας μήνας', + MM : '%d μήνες', + y : 'ένας χρόνος', + yy : '%d χρόνια' + }, + dayOfMonthOrdinalParse: /\d{1,2}η/, + ordinal: '%dη', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4st is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/en-SG.js b/node_modules/moment/src/locale/en-SG.js new file mode 100644 index 00000000..1cab9d6f --- /dev/null +++ b/node_modules/moment/src/locale/en-SG.js @@ -0,0 +1,59 @@ +//! moment.js locale configuration +//! locale : English (Singapore) [en-SG] +//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension + +import moment from '../moment'; + +export default moment.defineLocale('en-SG', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/en-au.js b/node_modules/moment/src/locale/en-au.js new file mode 100644 index 00000000..0e2e4258 --- /dev/null +++ b/node_modules/moment/src/locale/en-au.js @@ -0,0 +1,58 @@ +//! moment.js locale configuration +//! locale : English (Australia) [en-au] +//! author : Jared Morse : https://github.com/jarcoal + +import moment from '../moment'; + +export default moment.defineLocale('en-au', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/en-ca.js b/node_modules/moment/src/locale/en-ca.js new file mode 100644 index 00000000..008baedf --- /dev/null +++ b/node_modules/moment/src/locale/en-ca.js @@ -0,0 +1,54 @@ +//! moment.js locale configuration +//! locale : English (Canada) [en-ca] +//! author : Jonathan Abourbih : https://github.com/jonbca + +import moment from '../moment'; + +export default moment.defineLocale('en-ca', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'YYYY-MM-DD', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY h:mm A', + LLLL : 'dddd, MMMM D, YYYY h:mm A' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } +}); diff --git a/node_modules/moment/src/locale/en-gb.js b/node_modules/moment/src/locale/en-gb.js new file mode 100644 index 00000000..da235be3 --- /dev/null +++ b/node_modules/moment/src/locale/en-gb.js @@ -0,0 +1,59 @@ +//! moment.js locale configuration +//! locale : English (United Kingdom) [en-gb] +//! author : Chris Gedrim : https://github.com/chrisgedrim + +import moment from '../moment'; + +export default moment.defineLocale('en-gb', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/en-ie.js b/node_modules/moment/src/locale/en-ie.js new file mode 100644 index 00000000..38166ad0 --- /dev/null +++ b/node_modules/moment/src/locale/en-ie.js @@ -0,0 +1,59 @@ +//! moment.js locale configuration +//! locale : English (Ireland) [en-ie] +//! author : Chris Cartlidge : https://github.com/chriscartlidge + +import moment from '../moment'; + +export default moment.defineLocale('en-ie', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/en-il.js b/node_modules/moment/src/locale/en-il.js new file mode 100644 index 00000000..da293eb0 --- /dev/null +++ b/node_modules/moment/src/locale/en-il.js @@ -0,0 +1,54 @@ +//! moment.js locale configuration +//! locale : English (Israel) [en-il] +//! author : Chris Gedrim : https://github.com/chrisgedrim + +import moment from '../moment'; + +export default moment.defineLocale('en-il', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } +}); + diff --git a/node_modules/moment/src/locale/en-nz.js b/node_modules/moment/src/locale/en-nz.js new file mode 100644 index 00000000..ee7c4681 --- /dev/null +++ b/node_modules/moment/src/locale/en-nz.js @@ -0,0 +1,58 @@ +//! moment.js locale configuration +//! locale : English (New Zealand) [en-nz] +//! author : Luke McGregor : https://github.com/lukemcgregor + +import moment from '../moment'; + +export default moment.defineLocale('en-nz', { + months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + ss : '%d seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/eo.js b/node_modules/moment/src/locale/eo.js new file mode 100644 index 00000000..0345d8c2 --- /dev/null +++ b/node_modules/moment/src/locale/eo.js @@ -0,0 +1,65 @@ +//! moment.js locale configuration +//! locale : Esperanto [eo] +//! author : Colin Dean : https://github.com/colindean +//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia +//! comment : miestasmia corrected the translation by colindean + +import moment from '../moment'; + +export default moment.defineLocale('eo', { + months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'), + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'), + weekdays : 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'), + weekdaysShort : 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'), + weekdaysMin : 'di_lu_ma_me_ĵa_ve_sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'D[-a de] MMMM, YYYY', + LLL : 'D[-a de] MMMM, YYYY HH:mm', + LLLL : 'dddd, [la] D[-a de] MMMM, YYYY HH:mm' + }, + meridiemParse: /[ap]\.t\.m/i, + isPM: function (input) { + return input.charAt(0).toLowerCase() === 'p'; + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'p.t.m.' : 'P.T.M.'; + } else { + return isLower ? 'a.t.m.' : 'A.T.M.'; + } + }, + calendar : { + sameDay : '[Hodiaŭ je] LT', + nextDay : '[Morgaŭ je] LT', + nextWeek : 'dddd [je] LT', + lastDay : '[Hieraŭ je] LT', + lastWeek : '[pasinta] dddd [je] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'post %s', + past : 'antaŭ %s', + s : 'sekundoj', + ss : '%d sekundoj', + m : 'minuto', + mm : '%d minutoj', + h : 'horo', + hh : '%d horoj', + d : 'tago',//ne 'diurno', ĉar estas uzita por proksimumo + dd : '%d tagoj', + M : 'monato', + MM : '%d monatoj', + y : 'jaro', + yy : '%d jaroj' + }, + dayOfMonthOrdinalParse: /\d{1,2}a/, + ordinal : '%da', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/es-do.js b/node_modules/moment/src/locale/es-do.js new file mode 100644 index 00000000..c8397850 --- /dev/null +++ b/node_modules/moment/src/locale/es-do.js @@ -0,0 +1,83 @@ +//! moment.js locale configuration +//! locale : Spanish (Dominican Republic) [es-do] + +import moment from '../moment'; + +var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), + monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); + +var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; +var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + +export default moment.defineLocale('es-do', { + months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortDot; + } else if (/-MMM-/.test(format)) { + return monthsShort[m.month()]; + } else { + return monthsShortDot[m.month()]; + } + }, + monthsRegex: monthsRegex, + monthsShortRegex: monthsRegex, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse, + longMonthsParse: monthsParse, + shortMonthsParse: monthsParse, + weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY h:mm A', + LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A' + }, + calendar : { + sameDay : function () { + return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextDay : function () { + return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastDay : function () { + return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'en %s', + past : 'hace %s', + s : 'unos segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'una hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un año', + yy : '%d años' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/es-us.js b/node_modules/moment/src/locale/es-us.js new file mode 100644 index 00000000..498ae673 --- /dev/null +++ b/node_modules/moment/src/locale/es-us.js @@ -0,0 +1,84 @@ +//! moment.js locale configuration +//! locale : Spanish (United States) [es-us] +//! author : bustta : https://github.com/bustta +//! author : chrisrodz : https://github.com/chrisrodz + +import moment from '../moment'; + +var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), + monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); + +var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; +var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + +export default moment.defineLocale('es-us', { + months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortDot; + } else if (/-MMM-/.test(format)) { + return monthsShort[m.month()]; + } else { + return monthsShortDot[m.month()]; + } + }, + monthsRegex: monthsRegex, + monthsShortRegex: monthsRegex, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse, + longMonthsParse: monthsParse, + shortMonthsParse: monthsParse, + weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'MM/DD/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY h:mm A', + LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A' + }, + calendar : { + sameDay : function () { + return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextDay : function () { + return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastDay : function () { + return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'en %s', + past : 'hace %s', + s : 'unos segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'una hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un año', + yy : '%d años' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/es.js b/node_modules/moment/src/locale/es.js new file mode 100644 index 00000000..4dc588a0 --- /dev/null +++ b/node_modules/moment/src/locale/es.js @@ -0,0 +1,83 @@ +//! moment.js locale configuration +//! locale : Spanish [es] +//! author : Julio Napurí : https://github.com/julionc + +import moment from '../moment'; + +var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), + monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); + +var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; +var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + +export default moment.defineLocale('es', { + months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortDot; + } else if (/-MMM-/.test(format)) { + return monthsShort[m.month()]; + } else { + return monthsShortDot[m.month()]; + } + }, + monthsRegex : monthsRegex, + monthsShortRegex : monthsRegex, + monthsStrictRegex : /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex : /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse : monthsParse, + longMonthsParse : monthsParse, + shortMonthsParse : monthsParse, + weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY H:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm' + }, + calendar : { + sameDay : function () { + return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextDay : function () { + return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastDay : function () { + return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'en %s', + past : 'hace %s', + s : 'unos segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'una hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un año', + yy : '%d años' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/et.js b/node_modules/moment/src/locale/et.js new file mode 100644 index 00000000..22415e7c --- /dev/null +++ b/node_modules/moment/src/locale/et.js @@ -0,0 +1,73 @@ +//! moment.js locale configuration +//! locale : Estonian [et] +//! author : Henry Kehlmann : https://github.com/madhenry +//! improvements : Illimar Tambek : https://github.com/ragulka + +import moment from '../moment'; + +function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'], + 'ss': [number + 'sekundi', number + 'sekundit'], + 'm' : ['ühe minuti', 'üks minut'], + 'mm': [number + ' minuti', number + ' minutit'], + 'h' : ['ühe tunni', 'tund aega', 'üks tund'], + 'hh': [number + ' tunni', number + ' tundi'], + 'd' : ['ühe päeva', 'üks päev'], + 'M' : ['kuu aja', 'kuu aega', 'üks kuu'], + 'MM': [number + ' kuu', number + ' kuud'], + 'y' : ['ühe aasta', 'aasta', 'üks aasta'], + 'yy': [number + ' aasta', number + ' aastat'] + }; + if (withoutSuffix) { + return format[key][2] ? format[key][2] : format[key][1]; + } + return isFuture ? format[key][0] : format[key][1]; +} + +export default moment.defineLocale('et', { + months : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'), + monthsShort : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'), + weekdays : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'), + weekdaysShort : 'P_E_T_K_N_R_L'.split('_'), + weekdaysMin : 'P_E_T_K_N_R_L'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[Täna,] LT', + nextDay : '[Homme,] LT', + nextWeek : '[Järgmine] dddd LT', + lastDay : '[Eile,] LT', + lastWeek : '[Eelmine] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s pärast', + past : '%s tagasi', + s : processRelativeTime, + ss : processRelativeTime, + m : processRelativeTime, + mm : processRelativeTime, + h : processRelativeTime, + hh : processRelativeTime, + d : processRelativeTime, + dd : '%d päeva', + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/eu.js b/node_modules/moment/src/locale/eu.js new file mode 100644 index 00000000..d7658de6 --- /dev/null +++ b/node_modules/moment/src/locale/eu.js @@ -0,0 +1,58 @@ +//! moment.js locale configuration +//! locale : Basque [eu] +//! author : Eneko Illarramendi : https://github.com/eillarra + +import moment from '../moment'; + +export default moment.defineLocale('eu', { + months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'), + monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'), + monthsParseExact : true, + weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'), + weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'), + weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'YYYY[ko] MMMM[ren] D[a]', + LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm', + LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', + l : 'YYYY-M-D', + ll : 'YYYY[ko] MMM D[a]', + lll : 'YYYY[ko] MMM D[a] HH:mm', + llll : 'ddd, YYYY[ko] MMM D[a] HH:mm' + }, + calendar : { + sameDay : '[gaur] LT[etan]', + nextDay : '[bihar] LT[etan]', + nextWeek : 'dddd LT[etan]', + lastDay : '[atzo] LT[etan]', + lastWeek : '[aurreko] dddd LT[etan]', + sameElse : 'L' + }, + relativeTime : { + future : '%s barru', + past : 'duela %s', + s : 'segundo batzuk', + ss : '%d segundo', + m : 'minutu bat', + mm : '%d minutu', + h : 'ordu bat', + hh : '%d ordu', + d : 'egun bat', + dd : '%d egun', + M : 'hilabete bat', + MM : '%d hilabete', + y : 'urte bat', + yy : '%d urte' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/fa.js b/node_modules/moment/src/locale/fa.js new file mode 100644 index 00000000..0d377a5d --- /dev/null +++ b/node_modules/moment/src/locale/fa.js @@ -0,0 +1,98 @@ +//! moment.js locale configuration +//! locale : Persian [fa] +//! author : Ebrahim Byagowi : https://github.com/ebraminio + +import moment from '../moment'; + +var symbolMap = { + '1': '۱', + '2': '۲', + '3': '۳', + '4': '۴', + '5': '۵', + '6': '۶', + '7': '۷', + '8': '۸', + '9': '۹', + '0': '۰' +}, numberMap = { + '۱': '1', + '۲': '2', + '۳': '3', + '۴': '4', + '۵': '5', + '۶': '6', + '۷': '7', + '۸': '8', + '۹': '9', + '۰': '0' +}; + +export default moment.defineLocale('fa', { + months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), + monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), + weekdays : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), + weekdaysShort : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), + weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + meridiemParse: /قبل از ظهر|بعد از ظهر/, + isPM: function (input) { + return /بعد از ظهر/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'قبل از ظهر'; + } else { + return 'بعد از ظهر'; + } + }, + calendar : { + sameDay : '[امروز ساعت] LT', + nextDay : '[فردا ساعت] LT', + nextWeek : 'dddd [ساعت] LT', + lastDay : '[دیروز ساعت] LT', + lastWeek : 'dddd [پیش] [ساعت] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'در %s', + past : '%s پیش', + s : 'چند ثانیه', + ss : 'ثانیه d%', + m : 'یک دقیقه', + mm : '%d دقیقه', + h : 'یک ساعت', + hh : '%d ساعت', + d : 'یک روز', + dd : '%d روز', + M : 'یک ماه', + MM : '%d ماه', + y : 'یک سال', + yy : '%d سال' + }, + preparse: function (string) { + return string.replace(/[۰-۹]/g, function (match) { + return numberMap[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }).replace(/,/g, '،'); + }, + dayOfMonthOrdinalParse: /\d{1,2}م/, + ordinal : '%dم', + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/fi.js b/node_modules/moment/src/locale/fi.js new file mode 100644 index 00000000..c505292b --- /dev/null +++ b/node_modules/moment/src/locale/fi.js @@ -0,0 +1,101 @@ +//! moment.js locale configuration +//! locale : Finnish [fi] +//! author : Tarmo Aidantausta : https://github.com/bleadof + +import moment from '../moment'; + +var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '), + numbersFuture = [ + 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden', + numbersPast[7], numbersPast[8], numbersPast[9] + ]; +function translate(number, withoutSuffix, key, isFuture) { + var result = ''; + switch (key) { + case 's': + return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; + case 'ss': + return isFuture ? 'sekunnin' : 'sekuntia'; + case 'm': + return isFuture ? 'minuutin' : 'minuutti'; + case 'mm': + result = isFuture ? 'minuutin' : 'minuuttia'; + break; + case 'h': + return isFuture ? 'tunnin' : 'tunti'; + case 'hh': + result = isFuture ? 'tunnin' : 'tuntia'; + break; + case 'd': + return isFuture ? 'päivän' : 'päivä'; + case 'dd': + result = isFuture ? 'päivän' : 'päivää'; + break; + case 'M': + return isFuture ? 'kuukauden' : 'kuukausi'; + case 'MM': + result = isFuture ? 'kuukauden' : 'kuukautta'; + break; + case 'y': + return isFuture ? 'vuoden' : 'vuosi'; + case 'yy': + result = isFuture ? 'vuoden' : 'vuotta'; + break; + } + result = verbalNumber(number, isFuture) + ' ' + result; + return result; +} +function verbalNumber(number, isFuture) { + return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number; +} + +export default moment.defineLocale('fi', { + months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'), + monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'), + weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'), + weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'), + weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD.MM.YYYY', + LL : 'Do MMMM[ta] YYYY', + LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm', + LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm', + l : 'D.M.YYYY', + ll : 'Do MMM YYYY', + lll : 'Do MMM YYYY, [klo] HH.mm', + llll : 'ddd, Do MMM YYYY, [klo] HH.mm' + }, + calendar : { + sameDay : '[tänään] [klo] LT', + nextDay : '[huomenna] [klo] LT', + nextWeek : 'dddd [klo] LT', + lastDay : '[eilen] [klo] LT', + lastWeek : '[viime] dddd[na] [klo] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s päästä', + past : '%s sitten', + s : translate, + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/fo.js b/node_modules/moment/src/locale/fo.js new file mode 100644 index 00000000..039563f7 --- /dev/null +++ b/node_modules/moment/src/locale/fo.js @@ -0,0 +1,53 @@ +//! moment.js locale configuration +//! locale : Faroese [fo] +//! author : Ragnar Johannesen : https://github.com/ragnar123 +//! author : Kristian Sakarisson : https://github.com/sakarisson + +import moment from '../moment'; + +export default moment.defineLocale('fo', { + months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), + weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'), + weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'), + weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D. MMMM, YYYY HH:mm' + }, + calendar : { + sameDay : '[Í dag kl.] LT', + nextDay : '[Í morgin kl.] LT', + nextWeek : 'dddd [kl.] LT', + lastDay : '[Í gjár kl.] LT', + lastWeek : '[síðstu] dddd [kl] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'um %s', + past : '%s síðani', + s : 'fá sekund', + ss : '%d sekundir', + m : 'ein minuttur', + mm : '%d minuttir', + h : 'ein tími', + hh : '%d tímar', + d : 'ein dagur', + dd : '%d dagar', + M : 'ein mánaður', + MM : '%d mánaðir', + y : 'eitt ár', + yy : '%d ár' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/fr-ca.js b/node_modules/moment/src/locale/fr-ca.js new file mode 100644 index 00000000..4825a6db --- /dev/null +++ b/node_modules/moment/src/locale/fr-ca.js @@ -0,0 +1,66 @@ +//! moment.js locale configuration +//! locale : French (Canada) [fr-ca] +//! author : Jonathan Abourbih : https://github.com/jonbca + +import moment from '../moment'; + +export default moment.defineLocale('fr-ca', { + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + monthsParseExact : true, + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Aujourd’hui à] LT', + nextDay : '[Demain à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[Hier à] LT', + lastWeek : 'dddd [dernier à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dans %s', + past : 'il y a %s', + s : 'quelques secondes', + ss : '%d secondes', + m : 'une minute', + mm : '%d minutes', + h : 'une heure', + hh : '%d heures', + d : 'un jour', + dd : '%d jours', + M : 'un mois', + MM : '%d mois', + y : 'un an', + yy : '%d ans' + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal : function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + } +}); + diff --git a/node_modules/moment/src/locale/fr-ch.js b/node_modules/moment/src/locale/fr-ch.js new file mode 100644 index 00000000..febd401d --- /dev/null +++ b/node_modules/moment/src/locale/fr-ch.js @@ -0,0 +1,70 @@ +//! moment.js locale configuration +//! locale : French (Switzerland) [fr-ch] +//! author : Gaspard Bucher : https://github.com/gaspard + +import moment from '../moment'; + +export default moment.defineLocale('fr-ch', { + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + monthsParseExact : true, + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Aujourd’hui à] LT', + nextDay : '[Demain à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[Hier à] LT', + lastWeek : 'dddd [dernier à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dans %s', + past : 'il y a %s', + s : 'quelques secondes', + ss : '%d secondes', + m : 'une minute', + mm : '%d minutes', + h : 'une heure', + hh : '%d heures', + d : 'un jour', + dd : '%d jours', + M : 'un mois', + MM : '%d mois', + y : 'un an', + yy : '%d ans' + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal : function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/fr.js b/node_modules/moment/src/locale/fr.js new file mode 100644 index 00000000..81399dcf --- /dev/null +++ b/node_modules/moment/src/locale/fr.js @@ -0,0 +1,75 @@ +//! moment.js locale configuration +//! locale : French [fr] +//! author : John Fischer : https://github.com/jfroffice + +import moment from '../moment'; + +export default moment.defineLocale('fr', { + months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + monthsParseExact : true, + weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Aujourd’hui à] LT', + nextDay : '[Demain à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[Hier à] LT', + lastWeek : 'dddd [dernier à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dans %s', + past : 'il y a %s', + s : 'quelques secondes', + ss : '%d secondes', + m : 'une minute', + mm : '%d minutes', + h : 'une heure', + hh : '%d heures', + d : 'un jour', + dd : '%d jours', + M : 'un mois', + MM : '%d mois', + y : 'un an', + yy : '%d ans' + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|)/, + ordinal : function (number, period) { + switch (period) { + // TODO: Return 'e' when day of month > 1. Move this case inside + // block for masculine words below. + // See https://github.com/moment/moment/issues/3375 + case 'D': + return number + (number === 1 ? 'er' : ''); + + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/fy.js b/node_modules/moment/src/locale/fy.js new file mode 100644 index 00000000..b4b20960 --- /dev/null +++ b/node_modules/moment/src/locale/fy.js @@ -0,0 +1,67 @@ +//! moment.js locale configuration +//! locale : Frisian [fy] +//! author : Robin van der Vliet : https://github.com/robin0van0der0v + +import moment from '../moment'; + +var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'), + monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'); + +export default moment.defineLocale('fy', { + months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortWithDots; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots[m.month()]; + } else { + return monthsShortWithDots[m.month()]; + } + }, + monthsParseExact : true, + weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'), + weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'), + weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD-MM-YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[hjoed om] LT', + nextDay: '[moarn om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[juster om] LT', + lastWeek: '[ôfrûne] dddd [om] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'oer %s', + past : '%s lyn', + s : 'in pear sekonden', + ss : '%d sekonden', + m : 'ien minút', + mm : '%d minuten', + h : 'ien oere', + hh : '%d oeren', + d : 'ien dei', + dd : '%d dagen', + M : 'ien moanne', + MM : '%d moannen', + y : 'ien jier', + yy : '%d jierren' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/ga.js b/node_modules/moment/src/locale/ga.js new file mode 100644 index 00000000..b603c417 --- /dev/null +++ b/node_modules/moment/src/locale/ga.js @@ -0,0 +1,68 @@ +//! moment.js locale configuration +//! locale : Irish or Irish Gaelic [gd] +//! author : André Silva : https://github.com/askpt + +import moment from '../moment'; + + +var months = [ + 'Eanáir', 'Feabhra', 'Márta', 'Aibreán', 'Bealtaine', 'Méitheamh', 'Iúil', 'Lúnasa', 'Meán Fómhair', 'Deaireadh Fómhair', 'Samhain', 'Nollaig' +]; + +var monthsShort = ['Eaná', 'Feab', 'Márt', 'Aibr', 'Beal', 'Méit', 'Iúil', 'Lúna', 'Meán', 'Deai', 'Samh', 'Noll']; + +var weekdays = ['Dé Domhnaigh', 'Dé Luain', 'Dé Máirt', 'Dé Céadaoin', 'Déardaoin', 'Dé hAoine', 'Dé Satharn']; + +var weekdaysShort = ['Dom', 'Lua', 'Mái', 'Céa', 'Déa', 'hAo', 'Sat']; + +var weekdaysMin = ['Do', 'Lu', 'Má', 'Ce', 'Dé', 'hA', 'Sa']; + +export default moment.defineLocale('ga', { + months: months, + monthsShort: monthsShort, + monthsParseExact: true, + weekdays: weekdays, + weekdaysShort: weekdaysShort, + weekdaysMin: weekdaysMin, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[Inniu ag] LT', + nextDay: '[Amárach ag] LT', + nextWeek: 'dddd [ag] LT', + lastDay: '[Inné aig] LT', + lastWeek: 'dddd [seo caite] [ag] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'i %s', + past: '%s ó shin', + s: 'cúpla soicind', + ss: '%d soicind', + m: 'nóiméad', + mm: '%d nóiméad', + h: 'uair an chloig', + hh: '%d uair an chloig', + d: 'lá', + dd: '%d lá', + M: 'mí', + MM: '%d mí', + y: 'bliain', + yy: '%d bliain' + }, + dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, + ordinal: function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/gd.js b/node_modules/moment/src/locale/gd.js new file mode 100644 index 00000000..b3653d29 --- /dev/null +++ b/node_modules/moment/src/locale/gd.js @@ -0,0 +1,68 @@ +//! moment.js locale configuration +//! locale : Scottish Gaelic [gd] +//! author : Jon Ashdown : https://github.com/jonashdown + +import moment from '../moment'; + +var months = [ + 'Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd' +]; + +var monthsShort = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh']; + +var weekdays = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne']; + +var weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis']; + +var weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa']; + +export default moment.defineLocale('gd', { + months : months, + monthsShort : monthsShort, + monthsParseExact : true, + weekdays : weekdays, + weekdaysShort : weekdaysShort, + weekdaysMin : weekdaysMin, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[An-diugh aig] LT', + nextDay : '[A-màireach aig] LT', + nextWeek : 'dddd [aig] LT', + lastDay : '[An-dè aig] LT', + lastWeek : 'dddd [seo chaidh] [aig] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ann an %s', + past : 'bho chionn %s', + s : 'beagan diogan', + ss : '%d diogan', + m : 'mionaid', + mm : '%d mionaidean', + h : 'uair', + hh : '%d uairean', + d : 'latha', + dd : '%d latha', + M : 'mìos', + MM : '%d mìosan', + y : 'bliadhna', + yy : '%d bliadhna' + }, + dayOfMonthOrdinalParse : /\d{1,2}(d|na|mh)/, + ordinal : function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/gl.js b/node_modules/moment/src/locale/gl.js new file mode 100644 index 00000000..206a8f6c --- /dev/null +++ b/node_modules/moment/src/locale/gl.js @@ -0,0 +1,69 @@ +//! moment.js locale configuration +//! locale : Galician [gl] +//! author : Juan G. Hurtado : https://github.com/juanghurtado + +import moment from '../moment'; + +export default moment.defineLocale('gl', { + months : 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'), + monthsShort : 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'), + weekdaysShort : 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'), + weekdaysMin : 'do_lu_ma_mé_xo_ve_sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY H:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm' + }, + calendar : { + sameDay : function () { + return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; + }, + nextDay : function () { + return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; + }, + nextWeek : function () { + return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; + }, + lastDay : function () { + return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT'; + }, + lastWeek : function () { + return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : function (str) { + if (str.indexOf('un') === 0) { + return 'n' + str; + } + return 'en ' + str; + }, + past : 'hai %s', + s : 'uns segundos', + ss : '%d segundos', + m : 'un minuto', + mm : '%d minutos', + h : 'unha hora', + hh : '%d horas', + d : 'un día', + dd : '%d días', + M : 'un mes', + MM : '%d meses', + y : 'un ano', + yy : '%d anos' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/gom-latn.js b/node_modules/moment/src/locale/gom-latn.js new file mode 100644 index 00000000..149f8741 --- /dev/null +++ b/node_modules/moment/src/locale/gom-latn.js @@ -0,0 +1,114 @@ +//! moment.js locale configuration +//! locale : Konkani Latin script [gom-latn] +//! author : The Discoverer : https://github.com/WikiDiscoverer + +import moment from '../moment'; + +function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 's': ['thodde secondanim', 'thodde second'], + 'ss': [number + ' secondanim', number + ' second'], + 'm': ['eka mintan', 'ek minute'], + 'mm': [number + ' mintanim', number + ' mintam'], + 'h': ['eka voran', 'ek vor'], + 'hh': [number + ' voranim', number + ' voram'], + 'd': ['eka disan', 'ek dis'], + 'dd': [number + ' disanim', number + ' dis'], + 'M': ['eka mhoinean', 'ek mhoino'], + 'MM': [number + ' mhoineanim', number + ' mhoine'], + 'y': ['eka vorsan', 'ek voros'], + 'yy': [number + ' vorsanim', number + ' vorsam'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; +} + +export default moment.defineLocale('gom-latn', { + months : 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'), + monthsShort : 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays : 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\'var'.split('_'), + weekdaysShort : 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'), + weekdaysMin : 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'A h:mm [vazta]', + LTS : 'A h:mm:ss [vazta]', + L : 'DD-MM-YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY A h:mm [vazta]', + LLLL : 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]', + llll: 'ddd, D MMM YYYY, A h:mm [vazta]' + }, + calendar : { + sameDay: '[Aiz] LT', + nextDay: '[Faleam] LT', + nextWeek: '[Ieta to] dddd[,] LT', + lastDay: '[Kal] LT', + lastWeek: '[Fatlo] dddd[,] LT', + sameElse: 'L' + }, + relativeTime : { + future : '%s', + past : '%s adim', + s : processRelativeTime, + ss : processRelativeTime, + m : processRelativeTime, + mm : processRelativeTime, + h : processRelativeTime, + hh : processRelativeTime, + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse : /\d{1,2}(er)/, + ordinal : function (number, period) { + switch (period) { + // the ordinal 'er' only applies to day of the month + case 'D': + return number + 'er'; + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + case 'w': + case 'W': + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + }, + meridiemParse: /rati|sokalli|donparam|sanje/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'rati') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'sokalli') { + return hour; + } else if (meridiem === 'donparam') { + return hour > 12 ? hour : hour + 12; + } else if (meridiem === 'sanje') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'rati'; + } else if (hour < 12) { + return 'sokalli'; + } else if (hour < 16) { + return 'donparam'; + } else if (hour < 20) { + return 'sanje'; + } else { + return 'rati'; + } + } +}); diff --git a/node_modules/moment/src/locale/gu.js b/node_modules/moment/src/locale/gu.js new file mode 100644 index 00000000..af91dfc3 --- /dev/null +++ b/node_modules/moment/src/locale/gu.js @@ -0,0 +1,115 @@ +//! moment.js locale configuration +//! locale : Gujarati [gu] +//! author : Kaushik Thanki : https://github.com/Kaushik1987 + +import moment from '../moment'; + +var symbolMap = { + '1': '૧', + '2': '૨', + '3': '૩', + '4': '૪', + '5': '૫', + '6': '૬', + '7': '૭', + '8': '૮', + '9': '૯', + '0': '૦' + }, + numberMap = { + '૧': '1', + '૨': '2', + '૩': '3', + '૪': '4', + '૫': '5', + '૬': '6', + '૭': '7', + '૮': '8', + '૯': '9', + '૦': '0' + }; + +export default moment.defineLocale('gu', { + months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'), + monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'), + monthsParseExact: true, + weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split('_'), + weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'), + weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'), + longDateFormat: { + LT: 'A h:mm વાગ્યે', + LTS: 'A h:mm:ss વાગ્યે', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm વાગ્યે', + LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે' + }, + calendar: { + sameDay: '[આજ] LT', + nextDay: '[કાલે] LT', + nextWeek: 'dddd, LT', + lastDay: '[ગઇકાલે] LT', + lastWeek: '[પાછલા] dddd, LT', + sameElse: 'L' + }, + relativeTime: { + future: '%s મા', + past: '%s પેહલા', + s: 'અમુક પળો', + ss: '%d સેકંડ', + m: 'એક મિનિટ', + mm: '%d મિનિટ', + h: 'એક કલાક', + hh: '%d કલાક', + d: 'એક દિવસ', + dd: '%d દિવસ', + M: 'એક મહિનો', + MM: '%d મહિનો', + y: 'એક વર્ષ', + yy: '%d વર્ષ' + }, + preparse: function (string) { + return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + // Gujarati notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati. + meridiemParse: /રાત|બપોર|સવાર|સાંજ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'રાત') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'સવાર') { + return hour; + } else if (meridiem === 'બપોર') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'સાંજ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'રાત'; + } else if (hour < 10) { + return 'સવાર'; + } else if (hour < 17) { + return 'બપોર'; + } else if (hour < 20) { + return 'સાંજ'; + } else { + return 'રાત'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6 // The week that contains Jan 6th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/he.js b/node_modules/moment/src/locale/he.js new file mode 100644 index 00000000..02af6344 --- /dev/null +++ b/node_modules/moment/src/locale/he.js @@ -0,0 +1,91 @@ +//! moment.js locale configuration +//! locale : Hebrew [he] +//! author : Tomer Cohen : https://github.com/tomer +//! author : Moshe Simantov : https://github.com/DevelopmentIL +//! author : Tal Ater : https://github.com/TalAter + +import moment from '../moment'; + +export default moment.defineLocale('he', { + months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'), + monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'), + weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'), + weekdaysShort : 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'), + weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [ב]MMMM YYYY', + LLL : 'D [ב]MMMM YYYY HH:mm', + LLLL : 'dddd, D [ב]MMMM YYYY HH:mm', + l : 'D/M/YYYY', + ll : 'D MMM YYYY', + lll : 'D MMM YYYY HH:mm', + llll : 'ddd, D MMM YYYY HH:mm' + }, + calendar : { + sameDay : '[היום ב־]LT', + nextDay : '[מחר ב־]LT', + nextWeek : 'dddd [בשעה] LT', + lastDay : '[אתמול ב־]LT', + lastWeek : '[ביום] dddd [האחרון בשעה] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'בעוד %s', + past : 'לפני %s', + s : 'מספר שניות', + ss : '%d שניות', + m : 'דקה', + mm : '%d דקות', + h : 'שעה', + hh : function (number) { + if (number === 2) { + return 'שעתיים'; + } + return number + ' שעות'; + }, + d : 'יום', + dd : function (number) { + if (number === 2) { + return 'יומיים'; + } + return number + ' ימים'; + }, + M : 'חודש', + MM : function (number) { + if (number === 2) { + return 'חודשיים'; + } + return number + ' חודשים'; + }, + y : 'שנה', + yy : function (number) { + if (number === 2) { + return 'שנתיים'; + } else if (number % 10 === 0 && number !== 10) { + return number + ' שנה'; + } + return number + ' שנים'; + } + }, + meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i, + isPM : function (input) { + return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 5) { + return 'לפנות בוקר'; + } else if (hour < 10) { + return 'בבוקר'; + } else if (hour < 12) { + return isLower ? 'לפנה"צ' : 'לפני הצהריים'; + } else if (hour < 18) { + return isLower ? 'אחה"צ' : 'אחרי הצהריים'; + } else { + return 'בערב'; + } + } +}); + diff --git a/node_modules/moment/src/locale/hi.js b/node_modules/moment/src/locale/hi.js new file mode 100644 index 00000000..0ac41faf --- /dev/null +++ b/node_modules/moment/src/locale/hi.js @@ -0,0 +1,116 @@ +//! moment.js locale configuration +//! locale : Hindi [hi] +//! author : Mayank Singhal : https://github.com/mayanksinghal + +import moment from '../moment'; + +var symbolMap = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०' +}, +numberMap = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0' +}; + +export default moment.defineLocale('hi', { + months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'), + monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'), + monthsParseExact: true, + weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat : { + LT : 'A h:mm बजे', + LTS : 'A h:mm:ss बजे', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm बजे', + LLLL : 'dddd, D MMMM YYYY, A h:mm बजे' + }, + calendar : { + sameDay : '[आज] LT', + nextDay : '[कल] LT', + nextWeek : 'dddd, LT', + lastDay : '[कल] LT', + lastWeek : '[पिछले] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s में', + past : '%s पहले', + s : 'कुछ ही क्षण', + ss : '%d सेकंड', + m : 'एक मिनट', + mm : '%d मिनट', + h : 'एक घंटा', + hh : '%d घंटे', + d : 'एक दिन', + dd : '%d दिन', + M : 'एक महीने', + MM : '%d महीने', + y : 'एक वर्ष', + yy : '%d वर्ष' + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + // Hindi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi. + meridiemParse: /रात|सुबह|दोपहर|शाम/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'रात') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सुबह') { + return hour; + } else if (meridiem === 'दोपहर') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'शाम') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'रात'; + } else if (hour < 10) { + return 'सुबह'; + } else if (hour < 17) { + return 'दोपहर'; + } else if (hour < 20) { + return 'शाम'; + } else { + return 'रात'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/hr.js b/node_modules/moment/src/locale/hr.js new file mode 100644 index 00000000..188b8c3a --- /dev/null +++ b/node_modules/moment/src/locale/hr.js @@ -0,0 +1,145 @@ +//! moment.js locale configuration +//! locale : Croatian [hr] +//! author : Bojan Marković : https://github.com/bmarkovic + +import moment from '../moment'; + +function translate(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } +} + +export default moment.defineLocale('hr', { + months : { + format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'), + standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_') + }, + monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'), + monthsParseExact: true, + weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[danas u] LT', + nextDay : '[sutra u] LT', + nextWeek : function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[jučer u] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'prije %s', + s : 'par sekundi', + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : 'dan', + dd : translate, + M : 'mjesec', + MM : translate, + y : 'godinu', + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/hu.js b/node_modules/moment/src/locale/hu.js new file mode 100644 index 00000000..1e075de9 --- /dev/null +++ b/node_modules/moment/src/locale/hu.js @@ -0,0 +1,103 @@ +//! moment.js locale configuration +//! locale : Hungarian [hu] +//! author : Adam Brunner : https://github.com/adambrunner + +import moment from '../moment'; + +var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' '); +function translate(number, withoutSuffix, key, isFuture) { + var num = number, + suffix; + switch (key) { + case 's': + return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce'; + case 'ss': + return num + (isFuture || withoutSuffix) ? ' másodperc' : ' másodperce'; + case 'm': + return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'mm': + return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'h': + return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'hh': + return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'd': + return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'dd': + return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'M': + return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'MM': + return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'y': + return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); + case 'yy': + return num + (isFuture || withoutSuffix ? ' év' : ' éve'); + } + return ''; +} +function week(isFuture) { + return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]'; +} + +export default moment.defineLocale('hu', { + months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'), + monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'), + weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'), + weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), + weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'YYYY.MM.DD.', + LL : 'YYYY. MMMM D.', + LLL : 'YYYY. MMMM D. H:mm', + LLLL : 'YYYY. MMMM D., dddd H:mm' + }, + meridiemParse: /de|du/i, + isPM: function (input) { + return input.charAt(1).toLowerCase() === 'u'; + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 12) { + return isLower === true ? 'de' : 'DE'; + } else { + return isLower === true ? 'du' : 'DU'; + } + }, + calendar : { + sameDay : '[ma] LT[-kor]', + nextDay : '[holnap] LT[-kor]', + nextWeek : function () { + return week.call(this, true); + }, + lastDay : '[tegnap] LT[-kor]', + lastWeek : function () { + return week.call(this, false); + }, + sameElse : 'L' + }, + relativeTime : { + future : '%s múlva', + past : '%s', + s : translate, + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/hy-am.js b/node_modules/moment/src/locale/hy-am.js new file mode 100644 index 00000000..6fd533b0 --- /dev/null +++ b/node_modules/moment/src/locale/hy-am.js @@ -0,0 +1,87 @@ +//! moment.js locale configuration +//! locale : Armenian [hy-am] +//! author : Armendarabyan : https://github.com/armendarabyan + +import moment from '../moment'; + +export default moment.defineLocale('hy-am', { + months : { + format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'), + standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_') + }, + monthsShort : 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'), + weekdays : 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'), + weekdaysShort : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY թ.', + LLL : 'D MMMM YYYY թ., HH:mm', + LLLL : 'dddd, D MMMM YYYY թ., HH:mm' + }, + calendar : { + sameDay: '[այսօր] LT', + nextDay: '[վաղը] LT', + lastDay: '[երեկ] LT', + nextWeek: function () { + return 'dddd [օրը ժամը] LT'; + }, + lastWeek: function () { + return '[անցած] dddd [օրը ժամը] LT'; + }, + sameElse: 'L' + }, + relativeTime : { + future : '%s հետո', + past : '%s առաջ', + s : 'մի քանի վայրկյան', + ss : '%d վայրկյան', + m : 'րոպե', + mm : '%d րոպե', + h : 'ժամ', + hh : '%d ժամ', + d : 'օր', + dd : '%d օր', + M : 'ամիս', + MM : '%d ամիս', + y : 'տարի', + yy : '%d տարի' + }, + meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/, + isPM: function (input) { + return /^(ցերեկվա|երեկոյան)$/.test(input); + }, + meridiem : function (hour) { + if (hour < 4) { + return 'գիշերվա'; + } else if (hour < 12) { + return 'առավոտվա'; + } else if (hour < 17) { + return 'ցերեկվա'; + } else { + return 'երեկոյան'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/, + ordinal: function (number, period) { + switch (period) { + case 'DDD': + case 'w': + case 'W': + case 'DDDo': + if (number === 1) { + return number + '-ին'; + } + return number + '-րդ'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/id.js b/node_modules/moment/src/locale/id.js new file mode 100644 index 00000000..9fa7bffa --- /dev/null +++ b/node_modules/moment/src/locale/id.js @@ -0,0 +1,74 @@ +//! moment.js locale configuration +//! locale : Indonesian [id] +//! author : Mohammad Satrio Utomo : https://github.com/tyok +//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan + +import moment from '../moment'; + +export default moment.defineLocale('id', { + months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'), + weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), + weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), + weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /pagi|siang|sore|malam/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'siang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sore' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'siang'; + } else if (hours < 19) { + return 'sore'; + } else { + return 'malam'; + } + }, + calendar : { + sameDay : '[Hari ini pukul] LT', + nextDay : '[Besok pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kemarin pukul] LT', + lastWeek : 'dddd [lalu pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dalam %s', + past : '%s yang lalu', + s : 'beberapa detik', + ss : '%d detik', + m : 'semenit', + mm : '%d menit', + h : 'sejam', + hh : '%d jam', + d : 'sehari', + dd : '%d hari', + M : 'sebulan', + MM : '%d bulan', + y : 'setahun', + yy : '%d tahun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/is.js b/node_modules/moment/src/locale/is.js new file mode 100644 index 00000000..51fb8e66 --- /dev/null +++ b/node_modules/moment/src/locale/is.js @@ -0,0 +1,124 @@ +//! moment.js locale configuration +//! locale : Icelandic [is] +//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik + +import moment from '../moment'; + +function plural(n) { + if (n % 100 === 11) { + return true; + } else if (n % 10 === 1) { + return false; + } + return true; +} +function translate(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum'; + case 'ss': + if (plural(number)) { + return result + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum'); + } + return result + 'sekúnda'; + case 'm': + return withoutSuffix ? 'mínúta' : 'mínútu'; + case 'mm': + if (plural(number)) { + return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum'); + } else if (withoutSuffix) { + return result + 'mínúta'; + } + return result + 'mínútu'; + case 'hh': + if (plural(number)) { + return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum'); + } + return result + 'klukkustund'; + case 'd': + if (withoutSuffix) { + return 'dagur'; + } + return isFuture ? 'dag' : 'degi'; + case 'dd': + if (plural(number)) { + if (withoutSuffix) { + return result + 'dagar'; + } + return result + (isFuture ? 'daga' : 'dögum'); + } else if (withoutSuffix) { + return result + 'dagur'; + } + return result + (isFuture ? 'dag' : 'degi'); + case 'M': + if (withoutSuffix) { + return 'mánuður'; + } + return isFuture ? 'mánuð' : 'mánuði'; + case 'MM': + if (plural(number)) { + if (withoutSuffix) { + return result + 'mánuðir'; + } + return result + (isFuture ? 'mánuði' : 'mánuðum'); + } else if (withoutSuffix) { + return result + 'mánuður'; + } + return result + (isFuture ? 'mánuð' : 'mánuði'); + case 'y': + return withoutSuffix || isFuture ? 'ár' : 'ári'; + case 'yy': + if (plural(number)) { + return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); + } + return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); + } +} + +export default moment.defineLocale('is', { + months : 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'), + monthsShort : 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'), + weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'), + weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'), + weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY [kl.] H:mm', + LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm' + }, + calendar : { + sameDay : '[í dag kl.] LT', + nextDay : '[á morgun kl.] LT', + nextWeek : 'dddd [kl.] LT', + lastDay : '[í gær kl.] LT', + lastWeek : '[síðasta] dddd [kl.] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'eftir %s', + past : 'fyrir %s síðan', + s : translate, + ss : translate, + m : translate, + mm : translate, + h : 'klukkustund', + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/it-ch.js b/node_modules/moment/src/locale/it-ch.js new file mode 100644 index 00000000..bcfe6035 --- /dev/null +++ b/node_modules/moment/src/locale/it-ch.js @@ -0,0 +1,61 @@ +//! moment.js locale configuration +//! locale : Italian (Switzerland) [it-ch] +//! author : xfh : https://github.com/xfh + +import moment from '../moment'; + +export default moment.defineLocale('it-ch', { + months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), + monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'), + weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Oggi alle] LT', + nextDay: '[Domani alle] LT', + nextWeek: 'dddd [alle] LT', + lastDay: '[Ieri alle] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[la scorsa] dddd [alle] LT'; + default: + return '[lo scorso] dddd [alle] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : function (s) { + return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s; + }, + past : '%s fa', + s : 'alcuni secondi', + ss : '%d secondi', + m : 'un minuto', + mm : '%d minuti', + h : 'un\'ora', + hh : '%d ore', + d : 'un giorno', + dd : '%d giorni', + M : 'un mese', + MM : '%d mesi', + y : 'un anno', + yy : '%d anni' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/it.js b/node_modules/moment/src/locale/it.js new file mode 100644 index 00000000..a7ce1173 --- /dev/null +++ b/node_modules/moment/src/locale/it.js @@ -0,0 +1,62 @@ +//! moment.js locale configuration +//! locale : Italian [it] +//! author : Lorenzo : https://github.com/aliem +//! author: Mattia Larentis: https://github.com/nostalgiaz + +import moment from '../moment'; + +export default moment.defineLocale('it', { + months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), + monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'), + weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Oggi alle] LT', + nextDay: '[Domani alle] LT', + nextWeek: 'dddd [alle] LT', + lastDay: '[Ieri alle] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[la scorsa] dddd [alle] LT'; + default: + return '[lo scorso] dddd [alle] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : function (s) { + return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s; + }, + past : '%s fa', + s : 'alcuni secondi', + ss : '%d secondi', + m : 'un minuto', + mm : '%d minuti', + h : 'un\'ora', + hh : '%d ore', + d : 'un giorno', + dd : '%d giorni', + M : 'un mese', + MM : '%d mesi', + y : 'un anno', + yy : '%d anni' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/ja.js b/node_modules/moment/src/locale/ja.js new file mode 100644 index 00000000..af3e1da0 --- /dev/null +++ b/node_modules/moment/src/locale/ja.js @@ -0,0 +1,84 @@ +//! moment.js locale configuration +//! locale : Japanese [ja] +//! author : LI Long : https://github.com/baryon + +import moment from '../moment'; + +export default moment.defineLocale('ja', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'), + weekdaysShort : '日_月_火_水_木_金_土'.split('_'), + weekdaysMin : '日_月_火_水_木_金_土'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日 HH:mm', + LLLL : 'YYYY年M月D日 dddd HH:mm', + l : 'YYYY/MM/DD', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日(ddd) HH:mm' + }, + meridiemParse: /午前|午後/i, + isPM : function (input) { + return input === '午後'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return '午前'; + } else { + return '午後'; + } + }, + calendar : { + sameDay : '[今日] LT', + nextDay : '[明日] LT', + nextWeek : function (now) { + if (now.week() < this.week()) { + return '[来週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + lastDay : '[昨日] LT', + lastWeek : function (now) { + if (this.week() < now.week()) { + return '[先週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + sameElse : 'L' + }, + dayOfMonthOrdinalParse : /\d{1,2}日/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + default: + return number; + } + }, + relativeTime : { + future : '%s後', + past : '%s前', + s : '数秒', + ss : '%d秒', + m : '1分', + mm : '%d分', + h : '1時間', + hh : '%d時間', + d : '1日', + dd : '%d日', + M : '1ヶ月', + MM : '%dヶ月', + y : '1年', + yy : '%d年' + } +}); + diff --git a/node_modules/moment/src/locale/jv.js b/node_modules/moment/src/locale/jv.js new file mode 100644 index 00000000..f648f168 --- /dev/null +++ b/node_modules/moment/src/locale/jv.js @@ -0,0 +1,74 @@ +//! moment.js locale configuration +//! locale : Javanese [jv] +//! author : Rony Lantip : https://github.com/lantip +//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa + +import moment from '../moment'; + +export default moment.defineLocale('jv', { + months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'), + monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), + weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), + weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), + weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /enjing|siyang|sonten|ndalu/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'enjing') { + return hour; + } else if (meridiem === 'siyang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sonten' || meridiem === 'ndalu') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'enjing'; + } else if (hours < 15) { + return 'siyang'; + } else if (hours < 19) { + return 'sonten'; + } else { + return 'ndalu'; + } + }, + calendar : { + sameDay : '[Dinten puniko pukul] LT', + nextDay : '[Mbenjang pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kala wingi pukul] LT', + lastWeek : 'dddd [kepengker pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'wonten ing %s', + past : '%s ingkang kepengker', + s : 'sawetawis detik', + ss : '%d detik', + m : 'setunggal menit', + mm : '%d menit', + h : 'setunggal jam', + hh : '%d jam', + d : 'sedinten', + dd : '%d dinten', + M : 'sewulan', + MM : '%d wulan', + y : 'setaun', + yy : '%d taun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/ka.js b/node_modules/moment/src/locale/ka.js new file mode 100644 index 00000000..169734b1 --- /dev/null +++ b/node_modules/moment/src/locale/ka.js @@ -0,0 +1,81 @@ +//! moment.js locale configuration +//! locale : Georgian [ka] +//! author : Irakli Janiashvili : https://github.com/irakli-janiashvili + +import moment from '../moment'; + +export default moment.defineLocale('ka', { + months : { + standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'), + format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_') + }, + monthsShort : 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'), + weekdays : { + standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'), + format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'), + isFormat: /(წინა|შემდეგ)/ + }, + weekdaysShort : 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'), + weekdaysMin : 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[დღეს] LT[-ზე]', + nextDay : '[ხვალ] LT[-ზე]', + lastDay : '[გუშინ] LT[-ზე]', + nextWeek : '[შემდეგ] dddd LT[-ზე]', + lastWeek : '[წინა] dddd LT-ზე', + sameElse : 'L' + }, + relativeTime : { + future : function (s) { + return (/(წამი|წუთი|საათი|წელი)/).test(s) ? + s.replace(/ი$/, 'ში') : + s + 'ში'; + }, + past : function (s) { + if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) { + return s.replace(/(ი|ე)$/, 'ის წინ'); + } + if ((/წელი/).test(s)) { + return s.replace(/წელი$/, 'წლის წინ'); + } + }, + s : 'რამდენიმე წამი', + ss : '%d წამი', + m : 'წუთი', + mm : '%d წუთი', + h : 'საათი', + hh : '%d საათი', + d : 'დღე', + dd : '%d დღე', + M : 'თვე', + MM : '%d თვე', + y : 'წელი', + yy : '%d წელი' + }, + dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/, + ordinal : function (number) { + if (number === 0) { + return number; + } + if (number === 1) { + return number + '-ლი'; + } + if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) { + return 'მე-' + number; + } + return number + '-ე'; + }, + week : { + dow : 1, + doy : 7 + } +}); + diff --git a/node_modules/moment/src/locale/kk.js b/node_modules/moment/src/locale/kk.js new file mode 100644 index 00000000..ab79a21b --- /dev/null +++ b/node_modules/moment/src/locale/kk.js @@ -0,0 +1,78 @@ +//! moment.js locale configuration +//! locale : Kazakh [kk] +//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan + +import moment from '../moment'; + +var suffixes = { + 0: '-ші', + 1: '-ші', + 2: '-ші', + 3: '-ші', + 4: '-ші', + 5: '-ші', + 6: '-шы', + 7: '-ші', + 8: '-ші', + 9: '-шы', + 10: '-шы', + 20: '-шы', + 30: '-шы', + 40: '-шы', + 50: '-ші', + 60: '-шы', + 70: '-ші', + 80: '-ші', + 90: '-шы', + 100: '-ші' +}; + +export default moment.defineLocale('kk', { + months : 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'), + monthsShort : 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'), + weekdays : 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'), + weekdaysShort : 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'), + weekdaysMin : 'жк_дй_сй_ср_бй_жм_сн'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Бүгін сағат] LT', + nextDay : '[Ертең сағат] LT', + nextWeek : 'dddd [сағат] LT', + lastDay : '[Кеше сағат] LT', + lastWeek : '[Өткен аптаның] dddd [сағат] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ішінде', + past : '%s бұрын', + s : 'бірнеше секунд', + ss : '%d секунд', + m : 'бір минут', + mm : '%d минут', + h : 'бір сағат', + hh : '%d сағат', + d : 'бір күн', + dd : '%d күн', + M : 'бір ай', + MM : '%d ай', + y : 'бір жыл', + yy : '%d жыл' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/, + ordinal : function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes[number] || suffixes[a] || suffixes[b]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/km.js b/node_modules/moment/src/locale/km.js new file mode 100644 index 00000000..b364ffeb --- /dev/null +++ b/node_modules/moment/src/locale/km.js @@ -0,0 +1,101 @@ +//! moment.js locale configuration +//! locale : Cambodian [km] +//! author : Kruy Vanna : https://github.com/kruyvanna + +import moment from '../moment'; + +var symbolMap = { + '1': '១', + '2': '២', + '3': '៣', + '4': '៤', + '5': '៥', + '6': '៦', + '7': '៧', + '8': '៨', + '9': '៩', + '0': '០' +}, numberMap = { + '១': '1', + '២': '2', + '៣': '3', + '៤': '4', + '៥': '5', + '៦': '6', + '៧': '7', + '៨': '8', + '៩': '9', + '០': '0' +}; + +export default moment.defineLocale('km', { + months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), + weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + meridiemParse: /ព្រឹក|ល្ងាច/, + isPM: function (input) { + return input === 'ល្ងាច'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ព្រឹក'; + } else { + return 'ល្ងាច'; + } + }, + calendar: { + sameDay: '[ថ្ងៃនេះ ម៉ោង] LT', + nextDay: '[ស្អែក ម៉ោង] LT', + nextWeek: 'dddd [ម៉ោង] LT', + lastDay: '[ម្សិលមិញ ម៉ោង] LT', + lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', + sameElse: 'L' + }, + relativeTime: { + future: '%sទៀត', + past: '%sមុន', + s: 'ប៉ុន្មានវិនាទី', + ss: '%d វិនាទី', + m: 'មួយនាទី', + mm: '%d នាទី', + h: 'មួយម៉ោង', + hh: '%d ម៉ោង', + d: 'មួយថ្ងៃ', + dd: '%d ថ្ងៃ', + M: 'មួយខែ', + MM: '%d ខែ', + y: 'មួយឆ្នាំ', + yy: '%d ឆ្នាំ' + }, + dayOfMonthOrdinalParse : /ទី\d{1,2}/, + ordinal : 'ទី%d', + preparse: function (string) { + return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/kn.js b/node_modules/moment/src/locale/kn.js new file mode 100644 index 00000000..0228e74b --- /dev/null +++ b/node_modules/moment/src/locale/kn.js @@ -0,0 +1,117 @@ +//! moment.js locale configuration +//! locale : Kannada [kn] +//! author : Rajeev Naik : https://github.com/rajeevnaikte + +import moment from '../moment'; + +var symbolMap = { + '1': '೧', + '2': '೨', + '3': '೩', + '4': '೪', + '5': '೫', + '6': '೬', + '7': '೭', + '8': '೮', + '9': '೯', + '0': '೦' +}, +numberMap = { + '೧': '1', + '೨': '2', + '೩': '3', + '೪': '4', + '೫': '5', + '೬': '6', + '೭': '7', + '೮': '8', + '೯': '9', + '೦': '0' +}; + +export default moment.defineLocale('kn', { + months : 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'), + monthsShort : 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split('_'), + monthsParseExact: true, + weekdays : 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'), + weekdaysShort : 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'), + weekdaysMin : 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm', + LLLL : 'dddd, D MMMM YYYY, A h:mm' + }, + calendar : { + sameDay : '[ಇಂದು] LT', + nextDay : '[ನಾಳೆ] LT', + nextWeek : 'dddd, LT', + lastDay : '[ನಿನ್ನೆ] LT', + lastWeek : '[ಕೊನೆಯ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ನಂತರ', + past : '%s ಹಿಂದೆ', + s : 'ಕೆಲವು ಕ್ಷಣಗಳು', + ss : '%d ಸೆಕೆಂಡುಗಳು', + m : 'ಒಂದು ನಿಮಿಷ', + mm : '%d ನಿಮಿಷ', + h : 'ಒಂದು ಗಂಟೆ', + hh : '%d ಗಂಟೆ', + d : 'ಒಂದು ದಿನ', + dd : '%d ದಿನ', + M : 'ಒಂದು ತಿಂಗಳು', + MM : '%d ತಿಂಗಳು', + y : 'ಒಂದು ವರ್ಷ', + yy : '%d ವರ್ಷ' + }, + preparse: function (string) { + return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ರಾತ್ರಿ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') { + return hour; + } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ಸಂಜೆ') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ರಾತ್ರಿ'; + } else if (hour < 10) { + return 'ಬೆಳಿಗ್ಗೆ'; + } else if (hour < 17) { + return 'ಮಧ್ಯಾಹ್ನ'; + } else if (hour < 20) { + return 'ಸಂಜೆ'; + } else { + return 'ರಾತ್ರಿ'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/, + ordinal : function (number) { + return number + 'ನೇ'; + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/ko.js b/node_modules/moment/src/locale/ko.js new file mode 100644 index 00000000..d2da13d9 --- /dev/null +++ b/node_modules/moment/src/locale/ko.js @@ -0,0 +1,74 @@ +//! moment.js locale configuration +//! locale : Korean [ko] +//! author : Kyungwook, Park : https://github.com/kyungw00k +//! author : Jeeeyul Lee + +import moment from '../moment'; + +export default moment.defineLocale('ko', { + months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), + monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), + weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'), + weekdaysShort : '일_월_화_수_목_금_토'.split('_'), + weekdaysMin : '일_월_화_수_목_금_토'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'YYYY.MM.DD.', + LL : 'YYYY년 MMMM D일', + LLL : 'YYYY년 MMMM D일 A h:mm', + LLLL : 'YYYY년 MMMM D일 dddd A h:mm', + l : 'YYYY.MM.DD.', + ll : 'YYYY년 MMMM D일', + lll : 'YYYY년 MMMM D일 A h:mm', + llll : 'YYYY년 MMMM D일 dddd A h:mm' + }, + calendar : { + sameDay : '오늘 LT', + nextDay : '내일 LT', + nextWeek : 'dddd LT', + lastDay : '어제 LT', + lastWeek : '지난주 dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s 후', + past : '%s 전', + s : '몇 초', + ss : '%d초', + m : '1분', + mm : '%d분', + h : '한 시간', + hh : '%d시간', + d : '하루', + dd : '%d일', + M : '한 달', + MM : '%d달', + y : '일 년', + yy : '%d년' + }, + dayOfMonthOrdinalParse : /\d{1,2}(일|월|주)/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '일'; + case 'M': + return number + '월'; + case 'w': + case 'W': + return number + '주'; + default: + return number; + } + }, + meridiemParse : /오전|오후/, + isPM : function (token) { + return token === '오후'; + }, + meridiem : function (hour, minute, isUpper) { + return hour < 12 ? '오전' : '오후'; + } +}); + diff --git a/node_modules/moment/src/locale/ku.js b/node_modules/moment/src/locale/ku.js new file mode 100644 index 00000000..c31ba059 --- /dev/null +++ b/node_modules/moment/src/locale/ku.js @@ -0,0 +1,110 @@ +//! moment.js locale configuration +//! locale : Kurdish [ku] +//! author : Shahram Mebashar : https://github.com/ShahramMebashar + +import moment from '../moment'; + +var symbolMap = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠' +}, numberMap = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0' +}, +months = [ + 'کانونی دووەم', + 'شوبات', + 'ئازار', + 'نیسان', + 'ئایار', + 'حوزەیران', + 'تەمموز', + 'ئاب', + 'ئەیلوول', + 'تشرینی یەكەم', + 'تشرینی دووەم', + 'كانونی یەکەم' +]; + + +export default moment.defineLocale('ku', { + months : months, + monthsShort : months, + weekdays : 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split('_'), + weekdaysShort : 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'), + weekdaysMin : 'ی_د_س_چ_پ_ه_ش'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + meridiemParse: /ئێواره‌|به‌یانی/, + isPM: function (input) { + return /ئێواره‌/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'به‌یانی'; + } else { + return 'ئێواره‌'; + } + }, + calendar : { + sameDay : '[ئه‌مرۆ كاتژمێر] LT', + nextDay : '[به‌یانی كاتژمێر] LT', + nextWeek : 'dddd [كاتژمێر] LT', + lastDay : '[دوێنێ كاتژمێر] LT', + lastWeek : 'dddd [كاتژمێر] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'له‌ %s', + past : '%s', + s : 'چه‌ند چركه‌یه‌ك', + ss : 'چركه‌ %d', + m : 'یه‌ك خوله‌ك', + mm : '%d خوله‌ك', + h : 'یه‌ك كاتژمێر', + hh : '%d كاتژمێر', + d : 'یه‌ك ڕۆژ', + dd : '%d ڕۆژ', + M : 'یه‌ك مانگ', + MM : '%d مانگ', + y : 'یه‌ك ساڵ', + yy : '%d ساڵ' + }, + preparse: function (string) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap[match]; + }).replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }).replace(/,/g, '،'); + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/ky.js b/node_modules/moment/src/locale/ky.js new file mode 100644 index 00000000..8bd78f7c --- /dev/null +++ b/node_modules/moment/src/locale/ky.js @@ -0,0 +1,79 @@ +//! moment.js locale configuration +//! locale : Kyrgyz [ky] +//! author : Chyngyz Arystan uulu : https://github.com/chyngyz + + +import moment from '../moment'; + +var suffixes = { + 0: '-чү', + 1: '-чи', + 2: '-чи', + 3: '-чү', + 4: '-чү', + 5: '-чи', + 6: '-чы', + 7: '-чи', + 8: '-чи', + 9: '-чу', + 10: '-чу', + 20: '-чы', + 30: '-чу', + 40: '-чы', + 50: '-чү', + 60: '-чы', + 70: '-чи', + 80: '-чи', + 90: '-чу', + 100: '-чү' +}; + +export default moment.defineLocale('ky', { + months : 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'), + monthsShort : 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'), + weekdays : 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'), + weekdaysShort : 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'), + weekdaysMin : 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Бүгүн саат] LT', + nextDay : '[Эртең саат] LT', + nextWeek : 'dddd [саат] LT', + lastDay : '[Кечээ саат] LT', + lastWeek : '[Өткөн аптанын] dddd [күнү] [саат] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ичинде', + past : '%s мурун', + s : 'бирнече секунд', + ss : '%d секунд', + m : 'бир мүнөт', + mm : '%d мүнөт', + h : 'бир саат', + hh : '%d саат', + d : 'бир күн', + dd : '%d күн', + M : 'бир ай', + MM : '%d ай', + y : 'бир жыл', + yy : '%d жыл' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/, + ordinal : function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes[number] || suffixes[a] || suffixes[b]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/lb.js b/node_modules/moment/src/locale/lb.js new file mode 100644 index 00000000..8574277a --- /dev/null +++ b/node_modules/moment/src/locale/lb.js @@ -0,0 +1,129 @@ +//! moment.js locale configuration +//! locale : Luxembourgish [lb] +//! author : mweimerskirch : https://github.com/mweimerskirch +//! author : David Raison : https://github.com/kwisatz + +import moment from '../moment'; + +function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 'm': ['eng Minutt', 'enger Minutt'], + 'h': ['eng Stonn', 'enger Stonn'], + 'd': ['een Dag', 'engem Dag'], + 'M': ['ee Mount', 'engem Mount'], + 'y': ['ee Joer', 'engem Joer'] + }; + return withoutSuffix ? format[key][0] : format[key][1]; +} +function processFutureTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'a ' + string; + } + return 'an ' + string; +} +function processPastTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'viru ' + string; + } + return 'virun ' + string; +} +/** + * Returns true if the word before the given number loses the '-n' ending. + * e.g. 'an 10 Deeg' but 'a 5 Deeg' + * + * @param number {integer} + * @returns {boolean} + */ +function eifelerRegelAppliesToNumber(number) { + number = parseInt(number, 10); + if (isNaN(number)) { + return false; + } + if (number < 0) { + // Negative Number --> always true + return true; + } else if (number < 10) { + // Only 1 digit + if (4 <= number && number <= 7) { + return true; + } + return false; + } else if (number < 100) { + // 2 digits + var lastDigit = number % 10, firstDigit = number / 10; + if (lastDigit === 0) { + return eifelerRegelAppliesToNumber(firstDigit); + } + return eifelerRegelAppliesToNumber(lastDigit); + } else if (number < 10000) { + // 3 or 4 digits --> recursively check first digit + while (number >= 10) { + number = number / 10; + } + return eifelerRegelAppliesToNumber(number); + } else { + // Anything larger than 4 digits: recursively check first n-3 digits + number = number / 1000; + return eifelerRegelAppliesToNumber(number); + } +} + +export default moment.defineLocale('lb', { + months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), + monthsParseExact : true, + weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'), + weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm [Auer]', + LTS: 'H:mm:ss [Auer]', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm [Auer]', + LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]' + }, + calendar: { + sameDay: '[Haut um] LT', + sameElse: 'L', + nextDay: '[Muer um] LT', + nextWeek: 'dddd [um] LT', + lastDay: '[Gëschter um] LT', + lastWeek: function () { + // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule + switch (this.day()) { + case 2: + case 4: + return '[Leschten] dddd [um] LT'; + default: + return '[Leschte] dddd [um] LT'; + } + } + }, + relativeTime : { + future : processFutureTime, + past : processPastTime, + s : 'e puer Sekonnen', + ss : '%d Sekonnen', + m : processRelativeTime, + mm : '%d Minutten', + h : processRelativeTime, + hh : '%d Stonnen', + d : processRelativeTime, + dd : '%d Deeg', + M : processRelativeTime, + MM : '%d Méint', + y : processRelativeTime, + yy : '%d Joer' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/lo.js b/node_modules/moment/src/locale/lo.js new file mode 100644 index 00000000..3226dd5a --- /dev/null +++ b/node_modules/moment/src/locale/lo.js @@ -0,0 +1,62 @@ +//! moment.js locale configuration +//! locale : Lao [lo] +//! author : Ryan Hart : https://github.com/ryanhart2 + +import moment from '../moment'; + +export default moment.defineLocale('lo', { + months : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), + monthsShort : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), + weekdays : 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysShort : 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysMin : 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'ວັນdddd D MMMM YYYY HH:mm' + }, + meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/, + isPM: function (input) { + return input === 'ຕອນແລງ'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ຕອນເຊົ້າ'; + } else { + return 'ຕອນແລງ'; + } + }, + calendar : { + sameDay : '[ມື້ນີ້ເວລາ] LT', + nextDay : '[ມື້ອື່ນເວລາ] LT', + nextWeek : '[ວັນ]dddd[ໜ້າເວລາ] LT', + lastDay : '[ມື້ວານນີ້ເວລາ] LT', + lastWeek : '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ອີກ %s', + past : '%sຜ່ານມາ', + s : 'ບໍ່ເທົ່າໃດວິນາທີ', + ss : '%d ວິນາທີ' , + m : '1 ນາທີ', + mm : '%d ນາທີ', + h : '1 ຊົ່ວໂມງ', + hh : '%d ຊົ່ວໂມງ', + d : '1 ມື້', + dd : '%d ມື້', + M : '1 ເດືອນ', + MM : '%d ເດືອນ', + y : '1 ປີ', + yy : '%d ປີ' + }, + dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/, + ordinal : function (number) { + return 'ທີ່' + number; + } +}); + diff --git a/node_modules/moment/src/locale/lt.js b/node_modules/moment/src/locale/lt.js new file mode 100644 index 00000000..d006e07c --- /dev/null +++ b/node_modules/moment/src/locale/lt.js @@ -0,0 +1,110 @@ +//! moment.js locale configuration +//! locale : Lithuanian [lt] +//! author : Mindaugas Mozūras : https://github.com/mmozuras + +import moment from '../moment'; + +var units = { + 'ss' : 'sekundė_sekundžių_sekundes', + 'm' : 'minutė_minutės_minutę', + 'mm': 'minutės_minučių_minutes', + 'h' : 'valanda_valandos_valandą', + 'hh': 'valandos_valandų_valandas', + 'd' : 'diena_dienos_dieną', + 'dd': 'dienos_dienų_dienas', + 'M' : 'mėnuo_mėnesio_mėnesį', + 'MM': 'mėnesiai_mėnesių_mėnesius', + 'y' : 'metai_metų_metus', + 'yy': 'metai_metų_metus' +}; +function translateSeconds(number, withoutSuffix, key, isFuture) { + if (withoutSuffix) { + return 'kelios sekundės'; + } else { + return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; + } +} +function translateSingular(number, withoutSuffix, key, isFuture) { + return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]); +} +function special(number) { + return number % 10 === 0 || (number > 10 && number < 20); +} +function forms(key) { + return units[key].split('_'); +} +function translate(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + if (number === 1) { + return result + translateSingular(number, withoutSuffix, key[0], isFuture); + } else if (withoutSuffix) { + return result + (special(number) ? forms(key)[1] : forms(key)[0]); + } else { + if (isFuture) { + return result + forms(key)[1]; + } else { + return result + (special(number) ? forms(key)[1] : forms(key)[2]); + } + } +} +export default moment.defineLocale('lt', { + months : { + format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'), + standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'), + isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/ + }, + monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), + weekdays : { + format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'), + standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'), + isFormat: /dddd HH:mm/ + }, + weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'), + weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'YYYY [m.] MMMM D [d.]', + LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', + l : 'YYYY-MM-DD', + ll : 'YYYY [m.] MMMM D [d.]', + lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]' + }, + calendar : { + sameDay : '[Šiandien] LT', + nextDay : '[Rytoj] LT', + nextWeek : 'dddd LT', + lastDay : '[Vakar] LT', + lastWeek : '[Praėjusį] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : 'po %s', + past : 'prieš %s', + s : translateSeconds, + ss : translate, + m : translateSingular, + mm : translate, + h : translateSingular, + hh : translate, + d : translateSingular, + dd : translate, + M : translateSingular, + MM : translate, + y : translateSingular, + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}-oji/, + ordinal : function (number) { + return number + '-oji'; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/lv.js b/node_modules/moment/src/locale/lv.js new file mode 100644 index 00000000..d13b47b2 --- /dev/null +++ b/node_modules/moment/src/locale/lv.js @@ -0,0 +1,90 @@ +//! moment.js locale configuration +//! locale : Latvian [lv] +//! author : Kristaps Karlsons : https://github.com/skakri +//! author : Jānis Elmeris : https://github.com/JanisE + +import moment from '../moment'; + +var units = { + 'ss': 'sekundes_sekundēm_sekunde_sekundes'.split('_'), + 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), + 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), + 'h': 'stundas_stundām_stunda_stundas'.split('_'), + 'hh': 'stundas_stundām_stunda_stundas'.split('_'), + 'd': 'dienas_dienām_diena_dienas'.split('_'), + 'dd': 'dienas_dienām_diena_dienas'.split('_'), + 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + 'y': 'gada_gadiem_gads_gadi'.split('_'), + 'yy': 'gada_gadiem_gads_gadi'.split('_') +}; +/** + * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. + */ +function format(forms, number, withoutSuffix) { + if (withoutSuffix) { + // E.g. "21 minūte", "3 minūtes". + return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3]; + } else { + // E.g. "21 minūtes" as in "pēc 21 minūtes". + // E.g. "3 minūtēm" as in "pēc 3 minūtēm". + return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1]; + } +} +function relativeTimeWithPlural(number, withoutSuffix, key) { + return number + ' ' + format(units[key], number, withoutSuffix); +} +function relativeTimeWithSingular(number, withoutSuffix, key) { + return format(units[key], number, withoutSuffix); +} +function relativeSeconds(number, withoutSuffix) { + return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm'; +} + +export default moment.defineLocale('lv', { + months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'), + monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'), + weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'), + weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY.', + LL : 'YYYY. [gada] D. MMMM', + LLL : 'YYYY. [gada] D. MMMM, HH:mm', + LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm' + }, + calendar : { + sameDay : '[Šodien pulksten] LT', + nextDay : '[Rīt pulksten] LT', + nextWeek : 'dddd [pulksten] LT', + lastDay : '[Vakar pulksten] LT', + lastWeek : '[Pagājušā] dddd [pulksten] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'pēc %s', + past : 'pirms %s', + s : relativeSeconds, + ss : relativeTimeWithPlural, + m : relativeTimeWithSingular, + mm : relativeTimeWithPlural, + h : relativeTimeWithSingular, + hh : relativeTimeWithPlural, + d : relativeTimeWithSingular, + dd : relativeTimeWithPlural, + M : relativeTimeWithSingular, + MM : relativeTimeWithPlural, + y : relativeTimeWithSingular, + yy : relativeTimeWithPlural + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/me.js b/node_modules/moment/src/locale/me.js new file mode 100644 index 00000000..b42e9c80 --- /dev/null +++ b/node_modules/moment/src/locale/me.js @@ -0,0 +1,103 @@ +//! moment.js locale configuration +//! locale : Montenegrin [me] +//! author : Miodrag Nikač : https://github.com/miodragnikac + +import moment from '../moment'; + +var translator = { + words: { //Different grammatical cases + ss: ['sekund', 'sekunda', 'sekundi'], + m: ['jedan minut', 'jednog minuta'], + mm: ['minut', 'minuta', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mjesec', 'mjeseca', 'mjeseci'], + yy: ['godina', 'godine', 'godina'] + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return number + ' ' + translator.correctGrammaticalCase(number, wordKey); + } + } +}; + +export default moment.defineLocale('me', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), + monthsParseExact : true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm', + LTS : 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sjutra u] LT', + + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[juče u] LT', + lastWeek : function () { + var lastWeekDays = [ + '[prošle] [nedjelje] [u] LT', + '[prošlog] [ponedjeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srijede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT' + ]; + return lastWeekDays[this.day()]; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'prije %s', + s : 'nekoliko sekundi', + ss : translator.translate, + m : translator.translate, + mm : translator.translate, + h : translator.translate, + hh : translator.translate, + d : 'dan', + dd : translator.translate, + M : 'mjesec', + MM : translator.translate, + y : 'godinu', + yy : translator.translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/mi.js b/node_modules/moment/src/locale/mi.js new file mode 100644 index 00000000..0c105e5d --- /dev/null +++ b/node_modules/moment/src/locale/mi.js @@ -0,0 +1,55 @@ +//! moment.js locale configuration +//! locale : Maori [mi] +//! author : John Corrigan : https://github.com/johnideal + +import moment from '../moment'; + +export default moment.defineLocale('mi', { + months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'), + monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'), + monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i, + weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'), + weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [i] HH:mm', + LLLL: 'dddd, D MMMM YYYY [i] HH:mm' + }, + calendar: { + sameDay: '[i teie mahana, i] LT', + nextDay: '[apopo i] LT', + nextWeek: 'dddd [i] LT', + lastDay: '[inanahi i] LT', + lastWeek: 'dddd [whakamutunga i] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'i roto i %s', + past: '%s i mua', + s: 'te hēkona ruarua', + ss: '%d hēkona', + m: 'he meneti', + mm: '%d meneti', + h: 'te haora', + hh: '%d haora', + d: 'he ra', + dd: '%d ra', + M: 'he marama', + MM: '%d marama', + y: 'he tau', + yy: '%d tau' + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/mk.js b/node_modules/moment/src/locale/mk.js new file mode 100644 index 00000000..701ab655 --- /dev/null +++ b/node_modules/moment/src/locale/mk.js @@ -0,0 +1,82 @@ +//! moment.js locale configuration +//! locale : Macedonian [mk] +//! author : Borislav Mickov : https://github.com/B0k0 + +import moment from '../moment'; + +export default moment.defineLocale('mk', { + months : 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'), + monthsShort : 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'), + weekdays : 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'), + weekdaysShort : 'нед_пон_вто_сре_чет_пет_саб'.split('_'), + weekdaysMin : 'нe_пo_вт_ср_че_пе_сa'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'D.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY H:mm', + LLLL : 'dddd, D MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[Денес во] LT', + nextDay : '[Утре во] LT', + nextWeek : '[Во] dddd [во] LT', + lastDay : '[Вчера во] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[Изминатата] dddd [во] LT'; + case 1: + case 2: + case 4: + case 5: + return '[Изминатиот] dddd [во] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'после %s', + past : 'пред %s', + s : 'неколку секунди', + ss : '%d секунди', + m : 'минута', + mm : '%d минути', + h : 'час', + hh : '%d часа', + d : 'ден', + dd : '%d дена', + M : 'месец', + MM : '%d месеци', + y : 'година', + yy : '%d години' + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal : function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/ml.js b/node_modules/moment/src/locale/ml.js new file mode 100644 index 00000000..306566d4 --- /dev/null +++ b/node_modules/moment/src/locale/ml.js @@ -0,0 +1,73 @@ +//! moment.js locale configuration +//! locale : Malayalam [ml] +//! author : Floyd Pink : https://github.com/floydpink + +import moment from '../moment'; + +export default moment.defineLocale('ml', { + months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'), + monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'), + monthsParseExact : true, + weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'), + weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'), + weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), + longDateFormat : { + LT : 'A h:mm -നു', + LTS : 'A h:mm:ss -നു', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm -നു', + LLLL : 'dddd, D MMMM YYYY, A h:mm -നു' + }, + calendar : { + sameDay : '[ഇന്ന്] LT', + nextDay : '[നാളെ] LT', + nextWeek : 'dddd, LT', + lastDay : '[ഇന്നലെ] LT', + lastWeek : '[കഴിഞ്ഞ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s കഴിഞ്ഞ്', + past : '%s മുൻപ്', + s : 'അൽപ നിമിഷങ്ങൾ', + ss : '%d സെക്കൻഡ്', + m : 'ഒരു മിനിറ്റ്', + mm : '%d മിനിറ്റ്', + h : 'ഒരു മണിക്കൂർ', + hh : '%d മണിക്കൂർ', + d : 'ഒരു ദിവസം', + dd : '%d ദിവസം', + M : 'ഒരു മാസം', + MM : '%d മാസം', + y : 'ഒരു വർഷം', + yy : '%d വർഷം' + }, + meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ((meridiem === 'രാത്രി' && hour >= 4) || + meridiem === 'ഉച്ച കഴിഞ്ഞ്' || + meridiem === 'വൈകുന്നേരം') { + return hour + 12; + } else { + return hour; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'രാത്രി'; + } else if (hour < 12) { + return 'രാവിലെ'; + } else if (hour < 17) { + return 'ഉച്ച കഴിഞ്ഞ്'; + } else if (hour < 20) { + return 'വൈകുന്നേരം'; + } else { + return 'രാത്രി'; + } + } +}); + diff --git a/node_modules/moment/src/locale/mn.js b/node_modules/moment/src/locale/mn.js new file mode 100644 index 00000000..80a3c2f6 --- /dev/null +++ b/node_modules/moment/src/locale/mn.js @@ -0,0 +1,96 @@ +//! moment.js locale configuration +//! locale : Mongolian [mn] +//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7 + +import moment from '../moment'; + +function translate(number, withoutSuffix, key, isFuture) { + switch (key) { + case 's': + return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын'; + case 'ss': + return number + (withoutSuffix ? ' секунд' : ' секундын'); + case 'm': + case 'mm': + return number + (withoutSuffix ? ' минут' : ' минутын'); + case 'h': + case 'hh': + return number + (withoutSuffix ? ' цаг' : ' цагийн'); + case 'd': + case 'dd': + return number + (withoutSuffix ? ' өдөр' : ' өдрийн'); + case 'M': + case 'MM': + return number + (withoutSuffix ? ' сар' : ' сарын'); + case 'y': + case 'yy': + return number + (withoutSuffix ? ' жил' : ' жилийн'); + default: + return number; + } +} + +export default moment.defineLocale('mn', { + months : 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split('_'), + monthsShort : '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split('_'), + monthsParseExact : true, + weekdays : 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'), + weekdaysShort : 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'), + weekdaysMin : 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'YYYY оны MMMMын D', + LLL : 'YYYY оны MMMMын D HH:mm', + LLLL : 'dddd, YYYY оны MMMMын D HH:mm' + }, + meridiemParse: /ҮӨ|ҮХ/i, + isPM : function (input) { + return input === 'ҮХ'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ҮӨ'; + } else { + return 'ҮХ'; + } + }, + calendar : { + sameDay : '[Өнөөдөр] LT', + nextDay : '[Маргааш] LT', + nextWeek : '[Ирэх] dddd LT', + lastDay : '[Өчигдөр] LT', + lastWeek : '[Өнгөрсөн] dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s дараа', + past : '%s өмнө', + s : translate, + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2} өдөр/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + ' өдөр'; + default: + return number; + } + } +}); + diff --git a/node_modules/moment/src/locale/mr.js b/node_modules/moment/src/locale/mr.js new file mode 100644 index 00000000..8086ba28 --- /dev/null +++ b/node_modules/moment/src/locale/mr.js @@ -0,0 +1,153 @@ +//! moment.js locale configuration +//! locale : Marathi [mr] +//! author : Harshad Kale : https://github.com/kalehv +//! author : Vivek Athalye : https://github.com/vnathalye + +import moment from '../moment'; + +var symbolMap = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०' +}, +numberMap = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0' +}; + +function relativeTimeMr(number, withoutSuffix, string, isFuture) +{ + var output = ''; + if (withoutSuffix) { + switch (string) { + case 's': output = 'काही सेकंद'; break; + case 'ss': output = '%d सेकंद'; break; + case 'm': output = 'एक मिनिट'; break; + case 'mm': output = '%d मिनिटे'; break; + case 'h': output = 'एक तास'; break; + case 'hh': output = '%d तास'; break; + case 'd': output = 'एक दिवस'; break; + case 'dd': output = '%d दिवस'; break; + case 'M': output = 'एक महिना'; break; + case 'MM': output = '%d महिने'; break; + case 'y': output = 'एक वर्ष'; break; + case 'yy': output = '%d वर्षे'; break; + } + } + else { + switch (string) { + case 's': output = 'काही सेकंदां'; break; + case 'ss': output = '%d सेकंदां'; break; + case 'm': output = 'एका मिनिटा'; break; + case 'mm': output = '%d मिनिटां'; break; + case 'h': output = 'एका तासा'; break; + case 'hh': output = '%d तासां'; break; + case 'd': output = 'एका दिवसा'; break; + case 'dd': output = '%d दिवसां'; break; + case 'M': output = 'एका महिन्या'; break; + case 'MM': output = '%d महिन्यां'; break; + case 'y': output = 'एका वर्षा'; break; + case 'yy': output = '%d वर्षां'; break; + } + } + return output.replace(/%d/i, number); +} + +export default moment.defineLocale('mr', { + months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'), + monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'), + monthsParseExact : true, + weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat : { + LT : 'A h:mm वाजता', + LTS : 'A h:mm:ss वाजता', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm वाजता', + LLLL : 'dddd, D MMMM YYYY, A h:mm वाजता' + }, + calendar : { + sameDay : '[आज] LT', + nextDay : '[उद्या] LT', + nextWeek : 'dddd, LT', + lastDay : '[काल] LT', + lastWeek: '[मागील] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future: '%sमध्ये', + past: '%sपूर्वी', + s: relativeTimeMr, + ss: relativeTimeMr, + m: relativeTimeMr, + mm: relativeTimeMr, + h: relativeTimeMr, + hh: relativeTimeMr, + d: relativeTimeMr, + dd: relativeTimeMr, + M: relativeTimeMr, + MM: relativeTimeMr, + y: relativeTimeMr, + yy: relativeTimeMr + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'रात्री') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सकाळी') { + return hour; + } else if (meridiem === 'दुपारी') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'सायंकाळी') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'रात्री'; + } else if (hour < 10) { + return 'सकाळी'; + } else if (hour < 17) { + return 'दुपारी'; + } else if (hour < 20) { + return 'सायंकाळी'; + } else { + return 'रात्री'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/ms-my.js b/node_modules/moment/src/locale/ms-my.js new file mode 100644 index 00000000..bd255aed --- /dev/null +++ b/node_modules/moment/src/locale/ms-my.js @@ -0,0 +1,75 @@ +//! moment.js locale configuration +//! locale : Malay [ms-my] +//! note : DEPRECATED, the correct one is [ms] +//! author : Weldan Jamili : https://github.com/weldan + +import moment from '../moment'; + +export default moment.defineLocale('ms-my', { + months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), + monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar : { + sameDay : '[Hari ini pukul] LT', + nextDay : '[Esok pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kelmarin pukul] LT', + lastWeek : 'dddd [lepas pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dalam %s', + past : '%s yang lepas', + s : 'beberapa saat', + ss : '%d saat', + m : 'seminit', + mm : '%d minit', + h : 'sejam', + hh : '%d jam', + d : 'sehari', + dd : '%d hari', + M : 'sebulan', + MM : '%d bulan', + y : 'setahun', + yy : '%d tahun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/ms.js b/node_modules/moment/src/locale/ms.js new file mode 100644 index 00000000..83ad1ac1 --- /dev/null +++ b/node_modules/moment/src/locale/ms.js @@ -0,0 +1,74 @@ +//! moment.js locale configuration +//! locale : Malay [ms] +//! author : Weldan Jamili : https://github.com/weldan + +import moment from '../moment'; + +export default moment.defineLocale('ms', { + months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), + monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [pukul] HH.mm', + LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar : { + sameDay : '[Hari ini pukul] LT', + nextDay : '[Esok pukul] LT', + nextWeek : 'dddd [pukul] LT', + lastDay : '[Kelmarin pukul] LT', + lastWeek : 'dddd [lepas pukul] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'dalam %s', + past : '%s yang lepas', + s : 'beberapa saat', + ss : '%d saat', + m : 'seminit', + mm : '%d minit', + h : 'sejam', + hh : '%d jam', + d : 'sehari', + dd : '%d hari', + M : 'sebulan', + MM : '%d bulan', + y : 'setahun', + yy : '%d tahun' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/mt.js b/node_modules/moment/src/locale/mt.js new file mode 100644 index 00000000..4953fa22 --- /dev/null +++ b/node_modules/moment/src/locale/mt.js @@ -0,0 +1,51 @@ +//! moment.js locale configuration +//! locale : Maltese (Malta) [mt] +//! author : Alessandro Maruccia : https://github.com/alesma + +import moment from '../moment'; + +export default moment.defineLocale('mt', { + months : 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split('_'), + monthsShort : 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'), + weekdays : 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split('_'), + weekdaysShort : 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'), + weekdaysMin : 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Illum fil-]LT', + nextDay : '[Għada fil-]LT', + nextWeek : 'dddd [fil-]LT', + lastDay : '[Il-bieraħ fil-]LT', + lastWeek : 'dddd [li għadda] [fil-]LT', + sameElse : 'L' + }, + relativeTime : { + future : 'f’ %s', + past : '%s ilu', + s : 'ftit sekondi', + ss : '%d sekondi', + m : 'minuta', + mm : '%d minuti', + h : 'siegħa', + hh : '%d siegħat', + d : 'ġurnata', + dd : '%d ġranet', + M : 'xahar', + MM : '%d xhur', + y : 'sena', + yy : '%d sni' + }, + dayOfMonthOrdinalParse : /\d{1,2}º/, + ordinal: '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/my.js b/node_modules/moment/src/locale/my.js new file mode 100644 index 00000000..b2ba8664 --- /dev/null +++ b/node_modules/moment/src/locale/my.js @@ -0,0 +1,87 @@ +//! moment.js locale configuration +//! locale : Burmese [my] +//! author : Squar team, mysquar.com +//! author : David Rossellat : https://github.com/gholadr +//! author : Tin Aung Lin : https://github.com/thanyawzinmin + +import moment from '../moment'; + +var symbolMap = { + '1': '၁', + '2': '၂', + '3': '၃', + '4': '၄', + '5': '၅', + '6': '၆', + '7': '၇', + '8': '၈', + '9': '၉', + '0': '၀' +}, numberMap = { + '၁': '1', + '၂': '2', + '၃': '3', + '၄': '4', + '၅': '5', + '၆': '6', + '၇': '7', + '၈': '8', + '၉': '9', + '၀': '0' +}; + +export default moment.defineLocale('my', { + months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'), + monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'), + weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'), + weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + calendar: { + sameDay: '[ယနေ.] LT [မှာ]', + nextDay: '[မနက်ဖြန်] LT [မှာ]', + nextWeek: 'dddd LT [မှာ]', + lastDay: '[မနေ.က] LT [မှာ]', + lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]', + sameElse: 'L' + }, + relativeTime: { + future: 'လာမည့် %s မှာ', + past: 'လွန်ခဲ့သော %s က', + s: 'စက္ကန်.အနည်းငယ်', + ss : '%d စက္ကန့်', + m: 'တစ်မိနစ်', + mm: '%d မိနစ်', + h: 'တစ်နာရီ', + hh: '%d နာရီ', + d: 'တစ်ရက်', + dd: '%d ရက်', + M: 'တစ်လ', + MM: '%d လ', + y: 'တစ်နှစ်', + yy: '%d နှစ်' + }, + preparse: function (string) { + return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/nb.js b/node_modules/moment/src/locale/nb.js new file mode 100644 index 00000000..27bb88e8 --- /dev/null +++ b/node_modules/moment/src/locale/nb.js @@ -0,0 +1,55 @@ +//! moment.js locale configuration +//! locale : Norwegian Bokmål [nb] +//! authors : Espen Hovlandsdal : https://github.com/rexxars +//! Sigurd Gartmann : https://github.com/sigurdga + +import moment from '../moment'; + +export default moment.defineLocale('nb', { + months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + monthsShort : 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'), + monthsParseExact : true, + weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort : 'sø._ma._ti._on._to._fr._lø.'.split('_'), + weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY [kl.] HH:mm', + LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm' + }, + calendar : { + sameDay: '[i dag kl.] LT', + nextDay: '[i morgen kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[i går kl.] LT', + lastWeek: '[forrige] dddd [kl.] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'om %s', + past : '%s siden', + s : 'noen sekunder', + ss : '%d sekunder', + m : 'ett minutt', + mm : '%d minutter', + h : 'en time', + hh : '%d timer', + d : 'en dag', + dd : '%d dager', + M : 'en måned', + MM : '%d måneder', + y : 'ett år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/ne.js b/node_modules/moment/src/locale/ne.js new file mode 100644 index 00000000..38e5e821 --- /dev/null +++ b/node_modules/moment/src/locale/ne.js @@ -0,0 +1,115 @@ +//! moment.js locale configuration +//! locale : Nepalese [ne] +//! author : suvash : https://github.com/suvash + +import moment from '../moment'; + +var symbolMap = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०' +}, +numberMap = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0' +}; + +export default moment.defineLocale('ne', { + months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'), + monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'), + monthsParseExact : true, + weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'), + weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'), + weekdaysMin : 'आ._सो._मं._बु._बि._शु._श.'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'Aको h:mm बजे', + LTS : 'Aको h:mm:ss बजे', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, Aको h:mm बजे', + LLLL : 'dddd, D MMMM YYYY, Aको h:mm बजे' + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + meridiemParse: /राति|बिहान|दिउँसो|साँझ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'राति') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'बिहान') { + return hour; + } else if (meridiem === 'दिउँसो') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'साँझ') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 3) { + return 'राति'; + } else if (hour < 12) { + return 'बिहान'; + } else if (hour < 16) { + return 'दिउँसो'; + } else if (hour < 20) { + return 'साँझ'; + } else { + return 'राति'; + } + }, + calendar : { + sameDay : '[आज] LT', + nextDay : '[भोलि] LT', + nextWeek : '[आउँदो] dddd[,] LT', + lastDay : '[हिजो] LT', + lastWeek : '[गएको] dddd[,] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%sमा', + past : '%s अगाडि', + s : 'केही क्षण', + ss : '%d सेकेण्ड', + m : 'एक मिनेट', + mm : '%d मिनेट', + h : 'एक घण्टा', + hh : '%d घण्टा', + d : 'एक दिन', + dd : '%d दिन', + M : 'एक महिना', + MM : '%d महिना', + y : 'एक बर्ष', + yy : '%d बर्ष' + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/nl-be.js b/node_modules/moment/src/locale/nl-be.js new file mode 100644 index 00000000..d0bde093 --- /dev/null +++ b/node_modules/moment/src/locale/nl-be.js @@ -0,0 +1,80 @@ +//! moment.js locale configuration +//! locale : Dutch (Belgium) [nl-be] +//! author : Joris Röling : https://github.com/jorisroling +//! author : Jacob Middag : https://github.com/middagj + +import moment from '../moment'; + +var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), + monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'); + +var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i]; +var monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + +export default moment.defineLocale('nl-be', { + months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortWithDots; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots[m.month()]; + } else { + return monthsShortWithDots[m.month()]; + } + }, + + monthsRegex: monthsRegex, + monthsShortRegex: monthsRegex, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse : monthsParse, + longMonthsParse : monthsParse, + shortMonthsParse : monthsParse, + + weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), + weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'over %s', + past : '%s geleden', + s : 'een paar seconden', + ss : '%d seconden', + m : 'één minuut', + mm : '%d minuten', + h : 'één uur', + hh : '%d uur', + d : 'één dag', + dd : '%d dagen', + M : 'één maand', + MM : '%d maanden', + y : 'één jaar', + yy : '%d jaar' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/nl.js b/node_modules/moment/src/locale/nl.js new file mode 100644 index 00000000..fcd6a404 --- /dev/null +++ b/node_modules/moment/src/locale/nl.js @@ -0,0 +1,80 @@ +//! moment.js locale configuration +//! locale : Dutch [nl] +//! author : Joris Röling : https://github.com/jorisroling +//! author : Jacob Middag : https://github.com/middagj + +import moment from '../moment'; + +var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), + monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'); + +var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i]; +var monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + +export default moment.defineLocale('nl', { + months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), + monthsShort : function (m, format) { + if (!m) { + return monthsShortWithDots; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots[m.month()]; + } else { + return monthsShortWithDots[m.month()]; + } + }, + + monthsRegex: monthsRegex, + monthsShortRegex: monthsRegex, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse : monthsParse, + longMonthsParse : monthsParse, + shortMonthsParse : monthsParse, + + weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), + weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD-MM-YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'over %s', + past : '%s geleden', + s : 'een paar seconden', + ss : '%d seconden', + m : 'één minuut', + mm : '%d minuten', + h : 'één uur', + hh : '%d uur', + d : 'één dag', + dd : '%d dagen', + M : 'één maand', + MM : '%d maanden', + y : 'één jaar', + yy : '%d jaar' + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal : function (number) { + return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/nn.js b/node_modules/moment/src/locale/nn.js new file mode 100644 index 00000000..ea8ca7b8 --- /dev/null +++ b/node_modules/moment/src/locale/nn.js @@ -0,0 +1,52 @@ +//! moment.js locale configuration +//! locale : Nynorsk [nn] +//! author : https://github.com/mechuwind + +import moment from '../moment'; + +export default moment.defineLocale('nn', { + months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), + weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'), + weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'), + weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY [kl.] H:mm', + LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm' + }, + calendar : { + sameDay: '[I dag klokka] LT', + nextDay: '[I morgon klokka] LT', + nextWeek: 'dddd [klokka] LT', + lastDay: '[I går klokka] LT', + lastWeek: '[Føregåande] dddd [klokka] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'om %s', + past : '%s sidan', + s : 'nokre sekund', + ss : '%d sekund', + m : 'eit minutt', + mm : '%d minutt', + h : 'ein time', + hh : '%d timar', + d : 'ein dag', + dd : '%d dagar', + M : 'ein månad', + MM : '%d månader', + y : 'eit år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/pa-in.js b/node_modules/moment/src/locale/pa-in.js new file mode 100644 index 00000000..74b3126f --- /dev/null +++ b/node_modules/moment/src/locale/pa-in.js @@ -0,0 +1,116 @@ +//! moment.js locale configuration +//! locale : Punjabi (India) [pa-in] +//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit + +import moment from '../moment'; + +var symbolMap = { + '1': '੧', + '2': '੨', + '3': '੩', + '4': '੪', + '5': '੫', + '6': '੬', + '7': '੭', + '8': '੮', + '9': '੯', + '0': '੦' +}, +numberMap = { + '੧': '1', + '੨': '2', + '੩': '3', + '੪': '4', + '੫': '5', + '੬': '6', + '੭': '7', + '੮': '8', + '੯': '9', + '੦': '0' +}; + +export default moment.defineLocale('pa-in', { + // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi. + months : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'), + monthsShort : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'), + weekdays : 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'), + weekdaysShort : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + weekdaysMin : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + longDateFormat : { + LT : 'A h:mm ਵਜੇ', + LTS : 'A h:mm:ss ਵਜੇ', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm ਵਜੇ', + LLLL : 'dddd, D MMMM YYYY, A h:mm ਵਜੇ' + }, + calendar : { + sameDay : '[ਅਜ] LT', + nextDay : '[ਕਲ] LT', + nextWeek : '[ਅਗਲਾ] dddd, LT', + lastDay : '[ਕਲ] LT', + lastWeek : '[ਪਿਛਲੇ] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s ਵਿੱਚ', + past : '%s ਪਿਛਲੇ', + s : 'ਕੁਝ ਸਕਿੰਟ', + ss : '%d ਸਕਿੰਟ', + m : 'ਇਕ ਮਿੰਟ', + mm : '%d ਮਿੰਟ', + h : 'ਇੱਕ ਘੰਟਾ', + hh : '%d ਘੰਟੇ', + d : 'ਇੱਕ ਦਿਨ', + dd : '%d ਦਿਨ', + M : 'ਇੱਕ ਮਹੀਨਾ', + MM : '%d ਮਹੀਨੇ', + y : 'ਇੱਕ ਸਾਲ', + yy : '%d ਸਾਲ' + }, + preparse: function (string) { + return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + // Punjabi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi. + meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ਰਾਤ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ਸਵੇਰ') { + return hour; + } else if (meridiem === 'ਦੁਪਹਿਰ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ਸ਼ਾਮ') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ਰਾਤ'; + } else if (hour < 10) { + return 'ਸਵੇਰ'; + } else if (hour < 17) { + return 'ਦੁਪਹਿਰ'; + } else if (hour < 20) { + return 'ਸ਼ਾਮ'; + } else { + return 'ਰਾਤ'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/pl.js b/node_modules/moment/src/locale/pl.js new file mode 100644 index 00000000..4a46277f --- /dev/null +++ b/node_modules/moment/src/locale/pl.js @@ -0,0 +1,117 @@ +//! moment.js locale configuration +//! locale : Polish [pl] +//! author : Rafal Hirsz : https://github.com/evoL + +import moment from '../moment'; + +var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'), + monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_'); +function plural(n) { + return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1); +} +function translate(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + return result + (plural(number) ? 'sekundy' : 'sekund'); + case 'm': + return withoutSuffix ? 'minuta' : 'minutę'; + case 'mm': + return result + (plural(number) ? 'minuty' : 'minut'); + case 'h': + return withoutSuffix ? 'godzina' : 'godzinę'; + case 'hh': + return result + (plural(number) ? 'godziny' : 'godzin'); + case 'MM': + return result + (plural(number) ? 'miesiące' : 'miesięcy'); + case 'yy': + return result + (plural(number) ? 'lata' : 'lat'); + } +} + +export default moment.defineLocale('pl', { + months : function (momentToFormat, format) { + if (!momentToFormat) { + return monthsNominative; + } else if (format === '') { + // Hack: if format empty we know this is used to generate + // RegExp by moment. Give then back both valid forms of months + // in RegExp ready format. + return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')'; + } else if (/D MMMM/.test(format)) { + return monthsSubjective[momentToFormat.month()]; + } else { + return monthsNominative[momentToFormat.month()]; + } + }, + monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), + weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'), + weekdaysShort : 'ndz_pon_wt_śr_czw_pt_sob'.split('_'), + weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Dziś o] LT', + nextDay: '[Jutro o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[W niedzielę o] LT'; + + case 2: + return '[We wtorek o] LT'; + + case 3: + return '[W środę o] LT'; + + case 6: + return '[W sobotę o] LT'; + + default: + return '[W] dddd [o] LT'; + } + }, + lastDay: '[Wczoraj o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[W zeszłą niedzielę o] LT'; + case 3: + return '[W zeszłą środę o] LT'; + case 6: + return '[W zeszłą sobotę o] LT'; + default: + return '[W zeszły] dddd [o] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'za %s', + past : '%s temu', + s : 'kilka sekund', + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : '1 dzień', + dd : '%d dni', + M : 'miesiąc', + MM : translate, + y : 'rok', + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/pt-br.js b/node_modules/moment/src/locale/pt-br.js new file mode 100644 index 00000000..19956d1c --- /dev/null +++ b/node_modules/moment/src/locale/pt-br.js @@ -0,0 +1,53 @@ +//! moment.js locale configuration +//! locale : Portuguese (Brazil) [pt-br] +//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira + +import moment from '../moment'; + +export default moment.defineLocale('pt-br', { + months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'), + monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'), + weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), + weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY [às] HH:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm' + }, + calendar : { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return (this.day() === 0 || this.day() === 6) ? + '[Último] dddd [às] LT' : // Saturday + Sunday + '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L' + }, + relativeTime : { + future : 'em %s', + past : 'há %s', + s : 'poucos segundos', + ss : '%d segundos', + m : 'um minuto', + mm : '%d minutos', + h : 'uma hora', + hh : '%d horas', + d : 'um dia', + dd : '%d dias', + M : 'um mês', + MM : '%d meses', + y : 'um ano', + yy : '%d anos' + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal : '%dº' +}); + diff --git a/node_modules/moment/src/locale/pt.js b/node_modules/moment/src/locale/pt.js new file mode 100644 index 00000000..be58129f --- /dev/null +++ b/node_modules/moment/src/locale/pt.js @@ -0,0 +1,57 @@ +//! moment.js locale configuration +//! locale : Portuguese [pt] +//! author : Jefferson : https://github.com/jalex79 + +import moment from '../moment'; + +export default moment.defineLocale('pt', { + months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'), + monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'), + weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), + weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D [de] MMMM [de] YYYY', + LLL : 'D [de] MMMM [de] YYYY HH:mm', + LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm' + }, + calendar : { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return (this.day() === 0 || this.day() === 6) ? + '[Último] dddd [às] LT' : // Saturday + Sunday + '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L' + }, + relativeTime : { + future : 'em %s', + past : 'há %s', + s : 'segundos', + ss : '%d segundos', + m : 'um minuto', + mm : '%d minutos', + h : 'uma hora', + hh : '%d horas', + d : 'um dia', + dd : '%d dias', + M : 'um mês', + MM : '%d meses', + y : 'um ano', + yy : '%d anos' + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal : '%dº', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/ro.js b/node_modules/moment/src/locale/ro.js new file mode 100644 index 00000000..2d4f19e7 --- /dev/null +++ b/node_modules/moment/src/locale/ro.js @@ -0,0 +1,68 @@ +//! moment.js locale configuration +//! locale : Romanian [ro] +//! author : Vlad Gurdiga : https://github.com/gurdiga +//! author : Valentin Agachi : https://github.com/avaly + +import moment from '../moment'; + +function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + 'ss': 'secunde', + 'mm': 'minute', + 'hh': 'ore', + 'dd': 'zile', + 'MM': 'luni', + 'yy': 'ani' + }, + separator = ' '; + if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) { + separator = ' de '; + } + return number + separator + format[key]; +} + +export default moment.defineLocale('ro', { + months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'), + monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'), + weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'), + weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY H:mm', + LLLL : 'dddd, D MMMM YYYY H:mm' + }, + calendar : { + sameDay: '[azi la] LT', + nextDay: '[mâine la] LT', + nextWeek: 'dddd [la] LT', + lastDay: '[ieri la] LT', + lastWeek: '[fosta] dddd [la] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'peste %s', + past : '%s în urmă', + s : 'câteva secunde', + ss : relativeTimeWithPlural, + m : 'un minut', + mm : relativeTimeWithPlural, + h : 'o oră', + hh : relativeTimeWithPlural, + d : 'o zi', + dd : relativeTimeWithPlural, + M : 'o lună', + MM : relativeTimeWithPlural, + y : 'un an', + yy : relativeTimeWithPlural + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/ru.js b/node_modules/moment/src/locale/ru.js new file mode 100644 index 00000000..29046afb --- /dev/null +++ b/node_modules/moment/src/locale/ru.js @@ -0,0 +1,175 @@ +//! moment.js locale configuration +//! locale : Russian [ru] +//! author : Viktorminator : https://github.com/Viktorminator +//! Author : Menelion Elensúle : https://github.com/Oire +//! author : Коренберг Марк : https://github.com/socketpair + +import moment from '../moment'; + +function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); +} +function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + 'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут', + 'hh': 'час_часа_часов', + 'dd': 'день_дня_дней', + 'MM': 'месяц_месяца_месяцев', + 'yy': 'год_года_лет' + }; + if (key === 'm') { + return withoutSuffix ? 'минута' : 'минуту'; + } + else { + return number + ' ' + plural(format[key], +number); + } +} +var monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i]; + +// http://new.gramota.ru/spravka/rules/139-prop : § 103 +// Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637 +// CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753 +export default moment.defineLocale('ru', { + months : { + format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'), + standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_') + }, + monthsShort : { + // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ? + format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'), + standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_') + }, + weekdays : { + standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'), + format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'), + isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/ + }, + weekdaysShort : 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin : 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + monthsParse : monthsParse, + longMonthsParse : monthsParse, + shortMonthsParse : monthsParse, + + // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки + monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // копия предыдущего + monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // полные названия с падежами + monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i, + + // Выражение, которое соотвествует только сокращённым формам + monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY г.', + LLL : 'D MMMM YYYY г., H:mm', + LLLL : 'dddd, D MMMM YYYY г., H:mm' + }, + calendar : { + sameDay: '[Сегодня, в] LT', + nextDay: '[Завтра, в] LT', + lastDay: '[Вчера, в] LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В следующее] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В следующий] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В следующую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + lastWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В прошлое] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В прошлый] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В прошлую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'через %s', + past : '%s назад', + s : 'несколько секунд', + ss : relativeTimeWithPlural, + m : relativeTimeWithPlural, + mm : relativeTimeWithPlural, + h : 'час', + hh : relativeTimeWithPlural, + d : 'день', + dd : relativeTimeWithPlural, + M : 'месяц', + MM : relativeTimeWithPlural, + y : 'год', + yy : relativeTimeWithPlural + }, + meridiemParse: /ночи|утра|дня|вечера/i, + isPM : function (input) { + return /^(дня|вечера)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ночи'; + } else if (hour < 12) { + return 'утра'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечера'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + return number + '-й'; + case 'D': + return number + '-го'; + case 'w': + case 'W': + return number + '-я'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/sd.js b/node_modules/moment/src/locale/sd.js new file mode 100644 index 00000000..9747ad49 --- /dev/null +++ b/node_modules/moment/src/locale/sd.js @@ -0,0 +1,89 @@ +//! moment.js locale configuration +//! locale : Sindhi [sd] +//! author : Narain Sagar : https://github.com/narainsagar + +import moment from '../moment'; + +var months = [ + 'جنوري', + 'فيبروري', + 'مارچ', + 'اپريل', + 'مئي', + 'جون', + 'جولاءِ', + 'آگسٽ', + 'سيپٽمبر', + 'آڪٽوبر', + 'نومبر', + 'ڊسمبر' +]; +var days = [ + 'آچر', + 'سومر', + 'اڱارو', + 'اربع', + 'خميس', + 'جمع', + 'ڇنڇر' +]; + +export default moment.defineLocale('sd', { + months : months, + monthsShort : months, + weekdays : days, + weekdaysShort : days, + weekdaysMin : days, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd، D MMMM YYYY HH:mm' + }, + meridiemParse: /صبح|شام/, + isPM : function (input) { + return 'شام' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar : { + sameDay : '[اڄ] LT', + nextDay : '[سڀاڻي] LT', + nextWeek : 'dddd [اڳين هفتي تي] LT', + lastDay : '[ڪالهه] LT', + lastWeek : '[گزريل هفتي] dddd [تي] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s پوء', + past : '%s اڳ', + s : 'چند سيڪنڊ', + ss : '%d سيڪنڊ', + m : 'هڪ منٽ', + mm : '%d منٽ', + h : 'هڪ ڪلاڪ', + hh : '%d ڪلاڪ', + d : 'هڪ ڏينهن', + dd : '%d ڏينهن', + M : 'هڪ مهينو', + MM : '%d مهينا', + y : 'هڪ سال', + yy : '%d سال' + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/se.js b/node_modules/moment/src/locale/se.js new file mode 100644 index 00000000..dd10cdaf --- /dev/null +++ b/node_modules/moment/src/locale/se.js @@ -0,0 +1,52 @@ +//! moment.js locale configuration +//! locale : Northern Sami [se] +//! authors : Bård Rolstad Henriksen : https://github.com/karamell + + +import moment from '../moment'; + +export default moment.defineLocale('se', { + months : 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'), + monthsShort : 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'), + weekdays : 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'), + weekdaysShort : 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'), + weekdaysMin : 's_v_m_g_d_b_L'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'MMMM D. [b.] YYYY', + LLL : 'MMMM D. [b.] YYYY [ti.] HH:mm', + LLLL : 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm' + }, + calendar : { + sameDay: '[otne ti] LT', + nextDay: '[ihttin ti] LT', + nextWeek: 'dddd [ti] LT', + lastDay: '[ikte ti] LT', + lastWeek: '[ovddit] dddd [ti] LT', + sameElse: 'L' + }, + relativeTime : { + future : '%s geažes', + past : 'maŋit %s', + s : 'moadde sekunddat', + ss: '%d sekunddat', + m : 'okta minuhta', + mm : '%d minuhtat', + h : 'okta diimmu', + hh : '%d diimmut', + d : 'okta beaivi', + dd : '%d beaivvit', + M : 'okta mánnu', + MM : '%d mánut', + y : 'okta jahki', + yy : '%d jagit' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/si.js b/node_modules/moment/src/locale/si.js new file mode 100644 index 00000000..ed3caf3d --- /dev/null +++ b/node_modules/moment/src/locale/si.js @@ -0,0 +1,62 @@ +//! moment.js locale configuration +//! locale : Sinhalese [si] +//! author : Sampath Sitinamaluwa : https://github.com/sampathsris + +import moment from '../moment'; + +/*jshint -W100*/ +export default moment.defineLocale('si', { + months : 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'), + monthsShort : 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'), + weekdays : 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'), + weekdaysShort : 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'), + weekdaysMin : 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'a h:mm', + LTS : 'a h:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY MMMM D', + LLL : 'YYYY MMMM D, a h:mm', + LLLL : 'YYYY MMMM D [වැනි] dddd, a h:mm:ss' + }, + calendar : { + sameDay : '[අද] LT[ට]', + nextDay : '[හෙට] LT[ට]', + nextWeek : 'dddd LT[ට]', + lastDay : '[ඊයේ] LT[ට]', + lastWeek : '[පසුගිය] dddd LT[ට]', + sameElse : 'L' + }, + relativeTime : { + future : '%sකින්', + past : '%sකට පෙර', + s : 'තත්පර කිහිපය', + ss : 'තත්පර %d', + m : 'මිනිත්තුව', + mm : 'මිනිත්තු %d', + h : 'පැය', + hh : 'පැය %d', + d : 'දිනය', + dd : 'දින %d', + M : 'මාසය', + MM : 'මාස %d', + y : 'වසර', + yy : 'වසර %d' + }, + dayOfMonthOrdinalParse: /\d{1,2} වැනි/, + ordinal : function (number) { + return number + ' වැනි'; + }, + meridiemParse : /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./, + isPM : function (input) { + return input === 'ප.ව.' || input === 'පස් වරු'; + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'ප.ව.' : 'පස් වරු'; + } else { + return isLower ? 'පෙ.ව.' : 'පෙර වරු'; + } + } +}); diff --git a/node_modules/moment/src/locale/sk.js b/node_modules/moment/src/locale/sk.js new file mode 100644 index 00000000..3cd3ee15 --- /dev/null +++ b/node_modules/moment/src/locale/sk.js @@ -0,0 +1,149 @@ +//! moment.js locale configuration +//! locale : Slovak [sk] +//! author : Martin Minka : https://github.com/k2s +//! based on work of petrbela : https://github.com/petrbela + +import moment from '../moment'; + +var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'), + monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_'); +function plural(n) { + return (n > 1) && (n < 5); +} +function translate(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'sekundy' : 'sekúnd'); + } else { + return result + 'sekundami'; + } + break; + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou'); + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'minúty' : 'minút'); + } else { + return result + 'minútami'; + } + break; + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'hodiny' : 'hodín'); + } else { + return result + 'hodinami'; + } + break; + case 'd': // a day / in a day / a day ago + return (withoutSuffix || isFuture) ? 'deň' : 'dňom'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'dni' : 'dní'); + } else { + return result + 'dňami'; + } + break; + case 'M': // a month / in a month / a month ago + return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'mesiace' : 'mesiacov'); + } else { + return result + 'mesiacmi'; + } + break; + case 'y': // a year / in a year / a year ago + return (withoutSuffix || isFuture) ? 'rok' : 'rokom'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'roky' : 'rokov'); + } else { + return result + 'rokmi'; + } + break; + } +} + +export default moment.defineLocale('sk', { + months : months, + monthsShort : monthsShort, + weekdays : 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'), + weekdaysShort : 'ne_po_ut_st_št_pi_so'.split('_'), + weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'), + longDateFormat : { + LT: 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd D. MMMM YYYY H:mm' + }, + calendar : { + sameDay: '[dnes o] LT', + nextDay: '[zajtra o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v nedeľu o] LT'; + case 1: + case 2: + return '[v] dddd [o] LT'; + case 3: + return '[v stredu o] LT'; + case 4: + return '[vo štvrtok o] LT'; + case 5: + return '[v piatok o] LT'; + case 6: + return '[v sobotu o] LT'; + } + }, + lastDay: '[včera o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulú nedeľu o] LT'; + case 1: + case 2: + return '[minulý] dddd [o] LT'; + case 3: + return '[minulú stredu o] LT'; + case 4: + case 5: + return '[minulý] dddd [o] LT'; + case 6: + return '[minulú sobotu o] LT'; + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'za %s', + past : 'pred %s', + s : translate, + ss : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/sl.js b/node_modules/moment/src/locale/sl.js new file mode 100644 index 00000000..0012e15a --- /dev/null +++ b/node_modules/moment/src/locale/sl.js @@ -0,0 +1,164 @@ +//! moment.js locale configuration +//! locale : Slovenian [sl] +//! author : Robert Sedovšek : https://github.com/sedovsek + +import moment from '../moment'; + +function processRelativeTime(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami'; + case 'ss': + if (number === 1) { + result += withoutSuffix ? 'sekundo' : 'sekundi'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah'; + } else { + result += 'sekund'; + } + return result; + case 'm': + return withoutSuffix ? 'ena minuta' : 'eno minuto'; + case 'mm': + if (number === 1) { + result += withoutSuffix ? 'minuta' : 'minuto'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'minuti' : 'minutama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'minute' : 'minutami'; + } else { + result += withoutSuffix || isFuture ? 'minut' : 'minutami'; + } + return result; + case 'h': + return withoutSuffix ? 'ena ura' : 'eno uro'; + case 'hh': + if (number === 1) { + result += withoutSuffix ? 'ura' : 'uro'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'uri' : 'urama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'ure' : 'urami'; + } else { + result += withoutSuffix || isFuture ? 'ur' : 'urami'; + } + return result; + case 'd': + return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; + case 'dd': + if (number === 1) { + result += withoutSuffix || isFuture ? 'dan' : 'dnem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'dni' : 'dnevoma'; + } else { + result += withoutSuffix || isFuture ? 'dni' : 'dnevi'; + } + return result; + case 'M': + return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; + case 'MM': + if (number === 1) { + result += withoutSuffix || isFuture ? 'mesec' : 'mesecem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'meseca' : 'mesecema'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'mesece' : 'meseci'; + } else { + result += withoutSuffix || isFuture ? 'mesecev' : 'meseci'; + } + return result; + case 'y': + return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; + case 'yy': + if (number === 1) { + result += withoutSuffix || isFuture ? 'leto' : 'letom'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'leti' : 'letoma'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'leta' : 'leti'; + } else { + result += withoutSuffix || isFuture ? 'let' : 'leti'; + } + return result; + } +} + +export default moment.defineLocale('sl', { + months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'), + monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'), + weekdaysShort : 'ned._pon._tor._sre._čet._pet._sob.'.split('_'), + weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM YYYY', + LLL : 'D. MMMM YYYY H:mm', + LLLL : 'dddd, D. MMMM YYYY H:mm' + }, + calendar : { + sameDay : '[danes ob] LT', + nextDay : '[jutri ob] LT', + + nextWeek : function () { + switch (this.day()) { + case 0: + return '[v] [nedeljo] [ob] LT'; + case 3: + return '[v] [sredo] [ob] LT'; + case 6: + return '[v] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[v] dddd [ob] LT'; + } + }, + lastDay : '[včeraj ob] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + return '[prejšnjo] [nedeljo] [ob] LT'; + case 3: + return '[prejšnjo] [sredo] [ob] LT'; + case 6: + return '[prejšnjo] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prejšnji] dddd [ob] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : 'čez %s', + past : 'pred %s', + s : processRelativeTime, + ss : processRelativeTime, + m : processRelativeTime, + mm : processRelativeTime, + h : processRelativeTime, + hh : processRelativeTime, + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/sq.js b/node_modules/moment/src/locale/sq.js new file mode 100644 index 00000000..1280db7f --- /dev/null +++ b/node_modules/moment/src/locale/sq.js @@ -0,0 +1,62 @@ +//! moment.js locale configuration +//! locale : Albanian [sq] +//! author : Flakërim Ismani : https://github.com/flakerimi +//! author : Menelion Elensúle : https://github.com/Oire +//! author : Oerd Cukalla : https://github.com/oerd + +import moment from '../moment'; + +export default moment.defineLocale('sq', { + months : 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'), + monthsShort : 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'), + weekdays : 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'), + weekdaysShort : 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'), + weekdaysMin : 'D_H_Ma_Më_E_P_Sh'.split('_'), + weekdaysParseExact : true, + meridiemParse: /PD|MD/, + isPM: function (input) { + return input.charAt(0) === 'M'; + }, + meridiem : function (hours, minutes, isLower) { + return hours < 12 ? 'PD' : 'MD'; + }, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Sot në] LT', + nextDay : '[Nesër në] LT', + nextWeek : 'dddd [në] LT', + lastDay : '[Dje në] LT', + lastWeek : 'dddd [e kaluar në] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'në %s', + past : '%s më parë', + s : 'disa sekonda', + ss : '%d sekonda', + m : 'një minutë', + mm : '%d minuta', + h : 'një orë', + hh : '%d orë', + d : 'një ditë', + dd : '%d ditë', + M : 'një muaj', + MM : '%d muaj', + y : 'një vit', + yy : '%d vite' + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/sr-cyrl.js b/node_modules/moment/src/locale/sr-cyrl.js new file mode 100644 index 00000000..3b9a5734 --- /dev/null +++ b/node_modules/moment/src/locale/sr-cyrl.js @@ -0,0 +1,102 @@ +//! moment.js locale configuration +//! locale : Serbian Cyrillic [sr-cyrl] +//! author : Milan Janačković : https://github.com/milan-j + +import moment from '../moment'; + +var translator = { + words: { //Different grammatical cases + ss: ['секунда', 'секунде', 'секунди'], + m: ['један минут', 'једне минуте'], + mm: ['минут', 'минуте', 'минута'], + h: ['један сат', 'једног сата'], + hh: ['сат', 'сата', 'сати'], + dd: ['дан', 'дана', 'дана'], + MM: ['месец', 'месеца', 'месеци'], + yy: ['година', 'године', 'година'] + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return number + ' ' + translator.correctGrammaticalCase(number, wordKey); + } + } +}; + +export default moment.defineLocale('sr-cyrl', { + months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'), + monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'), + monthsParseExact: true, + weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'), + weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'), + weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm', + LTS : 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + }, + calendar: { + sameDay: '[данас у] LT', + nextDay: '[сутра у] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[у] [недељу] [у] LT'; + case 3: + return '[у] [среду] [у] LT'; + case 6: + return '[у] [суботу] [у] LT'; + case 1: + case 2: + case 4: + case 5: + return '[у] dddd [у] LT'; + } + }, + lastDay : '[јуче у] LT', + lastWeek : function () { + var lastWeekDays = [ + '[прошле] [недеље] [у] LT', + '[прошлог] [понедељка] [у] LT', + '[прошлог] [уторка] [у] LT', + '[прошле] [среде] [у] LT', + '[прошлог] [четвртка] [у] LT', + '[прошлог] [петка] [у] LT', + '[прошле] [суботе] [у] LT' + ]; + return lastWeekDays[this.day()]; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'за %s', + past : 'пре %s', + s : 'неколико секунди', + ss : translator.translate, + m : translator.translate, + mm : translator.translate, + h : translator.translate, + hh : translator.translate, + d : 'дан', + dd : translator.translate, + M : 'месец', + MM : translator.translate, + y : 'годину', + yy : translator.translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/sr.js b/node_modules/moment/src/locale/sr.js new file mode 100644 index 00000000..12c3f246 --- /dev/null +++ b/node_modules/moment/src/locale/sr.js @@ -0,0 +1,102 @@ +//! moment.js locale configuration +//! locale : Serbian [sr] +//! author : Milan Janačković : https://github.com/milan-j + +import moment from '../moment'; + +var translator = { + words: { //Different grammatical cases + ss: ['sekunda', 'sekunde', 'sekundi'], + m: ['jedan minut', 'jedne minute'], + mm: ['minut', 'minute', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mesec', 'meseca', 'meseci'], + yy: ['godina', 'godine', 'godina'] + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return number + ' ' + translator.correctGrammaticalCase(number, wordKey); + } + } +}; + +export default moment.defineLocale('sr', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'), + weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact : true, + longDateFormat: { + LT: 'H:mm', + LTS : 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedelju] [u] LT'; + case 3: + return '[u] [sredu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay : '[juče u] LT', + lastWeek : function () { + var lastWeekDays = [ + '[prošle] [nedelje] [u] LT', + '[prošlog] [ponedeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT' + ]; + return lastWeekDays[this.day()]; + }, + sameElse : 'L' + }, + relativeTime : { + future : 'za %s', + past : 'pre %s', + s : 'nekoliko sekundi', + ss : translator.translate, + m : translator.translate, + mm : translator.translate, + h : translator.translate, + hh : translator.translate, + d : 'dan', + dd : translator.translate, + M : 'mesec', + MM : translator.translate, + y : 'godinu', + yy : translator.translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/ss.js b/node_modules/moment/src/locale/ss.js new file mode 100644 index 00000000..7cc5f24a --- /dev/null +++ b/node_modules/moment/src/locale/ss.js @@ -0,0 +1,81 @@ +//! moment.js locale configuration +//! locale : siSwati [ss] +//! author : Nicolai Davies : https://github.com/nicolaidavies + + +import moment from '../moment'; + +export default moment.defineLocale('ss', { + months : "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split('_'), + monthsShort : 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'), + weekdays : 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'), + weekdaysShort : 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'), + weekdaysMin : 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Namuhla nga] LT', + nextDay : '[Kusasa nga] LT', + nextWeek : 'dddd [nga] LT', + lastDay : '[Itolo nga] LT', + lastWeek : 'dddd [leliphelile] [nga] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'nga %s', + past : 'wenteka nga %s', + s : 'emizuzwana lomcane', + ss : '%d mzuzwana', + m : 'umzuzu', + mm : '%d emizuzu', + h : 'lihora', + hh : '%d emahora', + d : 'lilanga', + dd : '%d emalanga', + M : 'inyanga', + MM : '%d tinyanga', + y : 'umnyaka', + yy : '%d iminyaka' + }, + meridiemParse: /ekuseni|emini|entsambama|ebusuku/, + meridiem : function (hours, minutes, isLower) { + if (hours < 11) { + return 'ekuseni'; + } else if (hours < 15) { + return 'emini'; + } else if (hours < 19) { + return 'entsambama'; + } else { + return 'ebusuku'; + } + }, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ekuseni') { + return hour; + } else if (meridiem === 'emini') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') { + if (hour === 0) { + return 0; + } + return hour + 12; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal : '%d', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/sv.js b/node_modules/moment/src/locale/sv.js new file mode 100644 index 00000000..8afce35a --- /dev/null +++ b/node_modules/moment/src/locale/sv.js @@ -0,0 +1,61 @@ +//! moment.js locale configuration +//! locale : Swedish [sv] +//! author : Jens Alm : https://github.com/ulmus + +import moment from '../moment'; + +export default moment.defineLocale('sv', { + months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'), + monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), + weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'), + weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY-MM-DD', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY [kl.] HH:mm', + LLLL : 'dddd D MMMM YYYY [kl.] HH:mm', + lll : 'D MMM YYYY HH:mm', + llll : 'ddd D MMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Idag] LT', + nextDay: '[Imorgon] LT', + lastDay: '[Igår] LT', + nextWeek: '[På] dddd LT', + lastWeek: '[I] dddd[s] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'om %s', + past : 'för %s sedan', + s : 'några sekunder', + ss : '%d sekunder', + m : 'en minut', + mm : '%d minuter', + h : 'en timme', + hh : '%d timmar', + d : 'en dag', + dd : '%d dagar', + M : 'en månad', + MM : '%d månader', + y : 'ett år', + yy : '%d år' + }, + dayOfMonthOrdinalParse: /\d{1,2}(e|a)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'e' : + (b === 1) ? 'a' : + (b === 2) ? 'a' : + (b === 3) ? 'e' : 'e'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/sw.js b/node_modules/moment/src/locale/sw.js new file mode 100644 index 00000000..ec1e5436 --- /dev/null +++ b/node_modules/moment/src/locale/sw.js @@ -0,0 +1,51 @@ +//! moment.js locale configuration +//! locale : Swahili [sw] +//! author : Fahad Kassim : https://github.com/fadsel + +import moment from '../moment'; + +export default moment.defineLocale('sw', { + months : 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'), + monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), + weekdays : 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'), + weekdaysShort : 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), + weekdaysMin : 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[leo saa] LT', + nextDay : '[kesho saa] LT', + nextWeek : '[wiki ijayo] dddd [saat] LT', + lastDay : '[jana] LT', + lastWeek : '[wiki iliyopita] dddd [saat] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s baadaye', + past : 'tokea %s', + s : 'hivi punde', + ss : 'sekunde %d', + m : 'dakika moja', + mm : 'dakika %d', + h : 'saa limoja', + hh : 'masaa %d', + d : 'siku moja', + dd : 'masiku %d', + M : 'mwezi mmoja', + MM : 'miezi %d', + y : 'mwaka mmoja', + yy : 'miaka %d' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/ta.js b/node_modules/moment/src/locale/ta.js new file mode 100644 index 00000000..5d3d9212 --- /dev/null +++ b/node_modules/moment/src/locale/ta.js @@ -0,0 +1,121 @@ +//! moment.js locale configuration +//! locale : Tamil [ta] +//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404 + +import moment from '../moment'; + +var symbolMap = { + '1': '௧', + '2': '௨', + '3': '௩', + '4': '௪', + '5': '௫', + '6': '௬', + '7': '௭', + '8': '௮', + '9': '௯', + '0': '௦' +}, numberMap = { + '௧': '1', + '௨': '2', + '௩': '3', + '௪': '4', + '௫': '5', + '௬': '6', + '௭': '7', + '௮': '8', + '௯': '9', + '௦': '0' +}; + +export default moment.defineLocale('ta', { + months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'), + monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'), + weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'), + weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'), + weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, HH:mm', + LLLL : 'dddd, D MMMM YYYY, HH:mm' + }, + calendar : { + sameDay : '[இன்று] LT', + nextDay : '[நாளை] LT', + nextWeek : 'dddd, LT', + lastDay : '[நேற்று] LT', + lastWeek : '[கடந்த வாரம்] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s இல்', + past : '%s முன்', + s : 'ஒரு சில விநாடிகள்', + ss : '%d விநாடிகள்', + m : 'ஒரு நிமிடம்', + mm : '%d நிமிடங்கள்', + h : 'ஒரு மணி நேரம்', + hh : '%d மணி நேரம்', + d : 'ஒரு நாள்', + dd : '%d நாட்கள்', + M : 'ஒரு மாதம்', + MM : '%d மாதங்கள்', + y : 'ஒரு வருடம்', + yy : '%d ஆண்டுகள்' + }, + dayOfMonthOrdinalParse: /\d{1,2}வது/, + ordinal : function (number) { + return number + 'வது'; + }, + preparse: function (string) { + return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + // refer http://ta.wikipedia.org/s/1er1 + meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/, + meridiem : function (hour, minute, isLower) { + if (hour < 2) { + return ' யாமம்'; + } else if (hour < 6) { + return ' வைகறை'; // வைகறை + } else if (hour < 10) { + return ' காலை'; // காலை + } else if (hour < 14) { + return ' நண்பகல்'; // நண்பகல் + } else if (hour < 18) { + return ' எற்பாடு'; // எற்பாடு + } else if (hour < 22) { + return ' மாலை'; // மாலை + } else { + return ' யாமம்'; + } + }, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'யாமம்') { + return hour < 2 ? hour : hour + 12; + } else if (meridiem === 'வைகறை' || meridiem === 'காலை') { + return hour; + } else if (meridiem === 'நண்பகல்') { + return hour >= 10 ? hour : hour + 12; + } else { + return hour + 12; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/te.js b/node_modules/moment/src/locale/te.js new file mode 100644 index 00000000..87613cc4 --- /dev/null +++ b/node_modules/moment/src/locale/te.js @@ -0,0 +1,80 @@ +//! moment.js locale configuration +//! locale : Telugu [te] +//! author : Krishna Chaitanya Thota : https://github.com/kcthota + +import moment from '../moment'; + +export default moment.defineLocale('te', { + months : 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'), + monthsShort : 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'), + monthsParseExact : true, + weekdays : 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'), + weekdaysShort : 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'), + weekdaysMin : 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'), + longDateFormat : { + LT : 'A h:mm', + LTS : 'A h:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY, A h:mm', + LLLL : 'dddd, D MMMM YYYY, A h:mm' + }, + calendar : { + sameDay : '[నేడు] LT', + nextDay : '[రేపు] LT', + nextWeek : 'dddd, LT', + lastDay : '[నిన్న] LT', + lastWeek : '[గత] dddd, LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s లో', + past : '%s క్రితం', + s : 'కొన్ని క్షణాలు', + ss : '%d సెకన్లు', + m : 'ఒక నిమిషం', + mm : '%d నిమిషాలు', + h : 'ఒక గంట', + hh : '%d గంటలు', + d : 'ఒక రోజు', + dd : '%d రోజులు', + M : 'ఒక నెల', + MM : '%d నెలలు', + y : 'ఒక సంవత్సరం', + yy : '%d సంవత్సరాలు' + }, + dayOfMonthOrdinalParse : /\d{1,2}వ/, + ordinal : '%dవ', + meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'రాత్రి') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ఉదయం') { + return hour; + } else if (meridiem === 'మధ్యాహ్నం') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'సాయంత్రం') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'రాత్రి'; + } else if (hour < 10) { + return 'ఉదయం'; + } else if (hour < 17) { + return 'మధ్యాహ్నం'; + } else if (hour < 20) { + return 'సాయంత్రం'; + } else { + return 'రాత్రి'; + } + }, + week : { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 6th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/tet.js b/node_modules/moment/src/locale/tet.js new file mode 100644 index 00000000..a4e9e196 --- /dev/null +++ b/node_modules/moment/src/locale/tet.js @@ -0,0 +1,60 @@ +//! moment.js locale configuration +//! locale : Tetun Dili (East Timor) [tet] +//! author : Joshua Brooks : https://github.com/joshbrooks +//! author : Onorio De J. Afonso : https://github.com/marobo +//! author : Sonia Simoes : https://github.com/soniasimoes + +import moment from '../moment'; + +export default moment.defineLocale('tet', { + months : 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split('_'), + monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays : 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'), + weekdaysShort : 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'), + weekdaysMin : 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Ohin iha] LT', + nextDay: '[Aban iha] LT', + nextWeek: 'dddd [iha] LT', + lastDay: '[Horiseik iha] LT', + lastWeek: 'dddd [semana kotuk] [iha] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'iha %s', + past : '%s liuba', + s : 'minutu balun', + ss : 'minutu %d', + m : 'minutu ida', + mm : 'minutu %d', + h : 'oras ida', + hh : 'oras %d', + d : 'loron ida', + dd : 'loron %d', + M : 'fulan ida', + MM : 'fulan %d', + y : 'tinan ida', + yy : 'tinan %d' + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/tg.js b/node_modules/moment/src/locale/tg.js new file mode 100644 index 00000000..9f15e1ac --- /dev/null +++ b/node_modules/moment/src/locale/tg.js @@ -0,0 +1,107 @@ +//! moment.js locale configuration +//! locale : Tajik [tg] +//! author : Orif N. Jr. : https://github.com/orif-jr + +import moment from '../moment'; + +var suffixes = { + 0: '-ум', + 1: '-ум', + 2: '-юм', + 3: '-юм', + 4: '-ум', + 5: '-ум', + 6: '-ум', + 7: '-ум', + 8: '-ум', + 9: '-ум', + 10: '-ум', + 12: '-ум', + 13: '-ум', + 20: '-ум', + 30: '-юм', + 40: '-ум', + 50: '-ум', + 60: '-ум', + 70: '-ум', + 80: '-ум', + 90: '-ум', + 100: '-ум' +}; + +export default moment.defineLocale('tg', { + months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), + monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays : 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split('_'), + weekdaysShort : 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'), + weekdaysMin : 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[Имрӯз соати] LT', + nextDay : '[Пагоҳ соати] LT', + lastDay : '[Дирӯз соати] LT', + nextWeek : 'dddd[и] [ҳафтаи оянда соати] LT', + lastWeek : 'dddd[и] [ҳафтаи гузашта соати] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'баъди %s', + past : '%s пеш', + s : 'якчанд сония', + m : 'як дақиқа', + mm : '%d дақиқа', + h : 'як соат', + hh : '%d соат', + d : 'як рӯз', + dd : '%d рӯз', + M : 'як моҳ', + MM : '%d моҳ', + y : 'як сол', + yy : '%d сол' + }, + meridiemParse: /шаб|субҳ|рӯз|бегоҳ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'шаб') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'субҳ') { + return hour; + } else if (meridiem === 'рӯз') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'бегоҳ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'шаб'; + } else if (hour < 11) { + return 'субҳ'; + } else if (hour < 16) { + return 'рӯз'; + } else if (hour < 19) { + return 'бегоҳ'; + } else { + return 'шаб'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes[number] || suffixes[a] || suffixes[b]); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 1th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/th.js b/node_modules/moment/src/locale/th.js new file mode 100644 index 00000000..9f8771fe --- /dev/null +++ b/node_modules/moment/src/locale/th.js @@ -0,0 +1,58 @@ +//! moment.js locale configuration +//! locale : Thai [th] +//! author : Kridsada Thanabulpong : https://github.com/sirn + +import moment from '../moment'; + +export default moment.defineLocale('th', { + months : 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'), + monthsShort : 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'), + monthsParseExact: true, + weekdays : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'), + weekdaysShort : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference + weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'H:mm', + LTS : 'H:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY เวลา H:mm', + LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm' + }, + meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/, + isPM: function (input) { + return input === 'หลังเที่ยง'; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'ก่อนเที่ยง'; + } else { + return 'หลังเที่ยง'; + } + }, + calendar : { + sameDay : '[วันนี้ เวลา] LT', + nextDay : '[พรุ่งนี้ เวลา] LT', + nextWeek : 'dddd[หน้า เวลา] LT', + lastDay : '[เมื่อวานนี้ เวลา] LT', + lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'อีก %s', + past : '%sที่แล้ว', + s : 'ไม่กี่วินาที', + ss : '%d วินาที', + m : '1 นาที', + mm : '%d นาที', + h : '1 ชั่วโมง', + hh : '%d ชั่วโมง', + d : '1 วัน', + dd : '%d วัน', + M : '1 เดือน', + MM : '%d เดือน', + y : '1 ปี', + yy : '%d ปี' + } +}); diff --git a/node_modules/moment/src/locale/tl-ph.js b/node_modules/moment/src/locale/tl-ph.js new file mode 100644 index 00000000..26c48249 --- /dev/null +++ b/node_modules/moment/src/locale/tl-ph.js @@ -0,0 +1,54 @@ +//! moment.js locale configuration +//! locale : Tagalog (Philippines) [tl-ph] +//! author : Dan Hagman : https://github.com/hagmandan + +import moment from '../moment'; + +export default moment.defineLocale('tl-ph', { + months : 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'), + monthsShort : 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), + weekdays : 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'), + weekdaysShort : 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), + weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'MM/D/YYYY', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY HH:mm', + LLLL : 'dddd, MMMM DD, YYYY HH:mm' + }, + calendar : { + sameDay: 'LT [ngayong araw]', + nextDay: '[Bukas ng] LT', + nextWeek: 'LT [sa susunod na] dddd', + lastDay: 'LT [kahapon]', + lastWeek: 'LT [noong nakaraang] dddd', + sameElse: 'L' + }, + relativeTime : { + future : 'sa loob ng %s', + past : '%s ang nakalipas', + s : 'ilang segundo', + ss : '%d segundo', + m : 'isang minuto', + mm : '%d minuto', + h : 'isang oras', + hh : '%d oras', + d : 'isang araw', + dd : '%d araw', + M : 'isang buwan', + MM : '%d buwan', + y : 'isang taon', + yy : '%d taon' + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal : function (number) { + return number; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/tlh.js b/node_modules/moment/src/locale/tlh.js new file mode 100644 index 00000000..324edc67 --- /dev/null +++ b/node_modules/moment/src/locale/tlh.js @@ -0,0 +1,113 @@ +//! moment.js locale configuration +//! locale : Klingon [tlh] +//! author : Dominika Kruk : https://github.com/amaranthrose + +import moment from '../moment'; + +var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_'); + +function translateFuture(output) { + var time = output; + time = (output.indexOf('jaj') !== -1) ? + time.slice(0, -3) + 'leS' : + (output.indexOf('jar') !== -1) ? + time.slice(0, -3) + 'waQ' : + (output.indexOf('DIS') !== -1) ? + time.slice(0, -3) + 'nem' : + time + ' pIq'; + return time; +} + +function translatePast(output) { + var time = output; + time = (output.indexOf('jaj') !== -1) ? + time.slice(0, -3) + 'Hu’' : + (output.indexOf('jar') !== -1) ? + time.slice(0, -3) + 'wen' : + (output.indexOf('DIS') !== -1) ? + time.slice(0, -3) + 'ben' : + time + ' ret'; + return time; +} + +function translate(number, withoutSuffix, string, isFuture) { + var numberNoun = numberAsNoun(number); + switch (string) { + case 'ss': + return numberNoun + ' lup'; + case 'mm': + return numberNoun + ' tup'; + case 'hh': + return numberNoun + ' rep'; + case 'dd': + return numberNoun + ' jaj'; + case 'MM': + return numberNoun + ' jar'; + case 'yy': + return numberNoun + ' DIS'; + } +} + +function numberAsNoun(number) { + var hundred = Math.floor((number % 1000) / 100), + ten = Math.floor((number % 100) / 10), + one = number % 10, + word = ''; + if (hundred > 0) { + word += numbersNouns[hundred] + 'vatlh'; + } + if (ten > 0) { + word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH'; + } + if (one > 0) { + word += ((word !== '') ? ' ' : '') + numbersNouns[one]; + } + return (word === '') ? 'pagh' : word; +} + +export default moment.defineLocale('tlh', { + months : 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'), + monthsShort : 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'), + monthsParseExact : true, + weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[DaHjaj] LT', + nextDay: '[wa’leS] LT', + nextWeek: 'LLL', + lastDay: '[wa’Hu’] LT', + lastWeek: 'LLL', + sameElse: 'L' + }, + relativeTime : { + future : translateFuture, + past : translatePast, + s : 'puS lup', + ss : translate, + m : 'wa’ tup', + mm : translate, + h : 'wa’ rep', + hh : translate, + d : 'wa’ jaj', + dd : translate, + M : 'wa’ jar', + MM : translate, + y : 'wa’ DIS', + yy : translate + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/tr.js b/node_modules/moment/src/locale/tr.js new file mode 100644 index 00000000..1eaa700d --- /dev/null +++ b/node_modules/moment/src/locale/tr.js @@ -0,0 +1,90 @@ + +//! moment.js locale configuration +//! locale : Turkish [tr] +//! authors : Erhan Gundogan : https://github.com/erhangundogan, +//! Burak Yiğit Kaya: https://github.com/BYK + +import moment from '../moment'; + +var suffixes = { + 1: '\'inci', + 5: '\'inci', + 8: '\'inci', + 70: '\'inci', + 80: '\'inci', + 2: '\'nci', + 7: '\'nci', + 20: '\'nci', + 50: '\'nci', + 3: '\'üncü', + 4: '\'üncü', + 100: '\'üncü', + 6: '\'ncı', + 9: '\'uncu', + 10: '\'uncu', + 30: '\'uncu', + 60: '\'ıncı', + 90: '\'ıncı' +}; + +export default moment.defineLocale('tr', { + months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'), + monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'), + weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'), + weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'), + weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[bugün saat] LT', + nextDay : '[yarın saat] LT', + nextWeek : '[gelecek] dddd [saat] LT', + lastDay : '[dün] LT', + lastWeek : '[geçen] dddd [saat] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s sonra', + past : '%s önce', + s : 'birkaç saniye', + ss : '%d saniye', + m : 'bir dakika', + mm : '%d dakika', + h : 'bir saat', + hh : '%d saat', + d : 'bir gün', + dd : '%d gün', + M : 'bir ay', + MM : '%d ay', + y : 'bir yıl', + yy : '%d yıl' + }, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'Do': + case 'DD': + return number; + default: + if (number === 0) { // special case for zero + return number + '\'ıncı'; + } + var a = number % 10, + b = number % 100 - a, + c = number >= 100 ? 100 : null; + return number + (suffixes[a] || suffixes[b] || suffixes[c]); + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/tzl.js b/node_modules/moment/src/locale/tzl.js new file mode 100644 index 00000000..2a594580 --- /dev/null +++ b/node_modules/moment/src/locale/tzl.js @@ -0,0 +1,84 @@ +//! moment.js locale configuration +//! locale : Talossan [tzl] +//! author : Robin van der Vliet : https://github.com/robin0van0der0v +//! author : Iustì Canun + +import moment from '../moment'; + +// After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals. +// This is currently too difficult (maybe even impossible) to add. +export default moment.defineLocale('tzl', { + months : 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'), + monthsShort : 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), + weekdays : 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), + weekdaysShort : 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), + weekdaysMin : 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), + longDateFormat : { + LT : 'HH.mm', + LTS : 'HH.mm.ss', + L : 'DD.MM.YYYY', + LL : 'D. MMMM [dallas] YYYY', + LLL : 'D. MMMM [dallas] YYYY HH.mm', + LLLL : 'dddd, [li] D. MMMM [dallas] YYYY HH.mm' + }, + meridiemParse: /d\'o|d\'a/i, + isPM : function (input) { + return 'd\'o' === input.toLowerCase(); + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'd\'o' : 'D\'O'; + } else { + return isLower ? 'd\'a' : 'D\'A'; + } + }, + calendar : { + sameDay : '[oxhi à] LT', + nextDay : '[demà à] LT', + nextWeek : 'dddd [à] LT', + lastDay : '[ieiri à] LT', + lastWeek : '[sür el] dddd [lasteu à] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'osprei %s', + past : 'ja%s', + s : processRelativeTime, + ss : processRelativeTime, + m : processRelativeTime, + mm : processRelativeTime, + h : processRelativeTime, + hh : processRelativeTime, + d : processRelativeTime, + dd : processRelativeTime, + M : processRelativeTime, + MM : processRelativeTime, + y : processRelativeTime, + yy : processRelativeTime + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal : '%d.', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + +function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + 's': ['viensas secunds', '\'iensas secunds'], + 'ss': [number + ' secunds', '' + number + ' secunds'], + 'm': ['\'n míut', '\'iens míut'], + 'mm': [number + ' míuts', '' + number + ' míuts'], + 'h': ['\'n þora', '\'iensa þora'], + 'hh': [number + ' þoras', '' + number + ' þoras'], + 'd': ['\'n ziua', '\'iensa ziua'], + 'dd': [number + ' ziuas', '' + number + ' ziuas'], + 'M': ['\'n mes', '\'iens mes'], + 'MM': [number + ' mesen', '' + number + ' mesen'], + 'y': ['\'n ar', '\'iens ar'], + 'yy': [number + ' ars', '' + number + ' ars'] + }; + return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]); +} + diff --git a/node_modules/moment/src/locale/tzm-latn.js b/node_modules/moment/src/locale/tzm-latn.js new file mode 100644 index 00000000..6adf5504 --- /dev/null +++ b/node_modules/moment/src/locale/tzm-latn.js @@ -0,0 +1,50 @@ +//! moment.js locale configuration +//! locale : Central Atlas Tamazight Latin [tzm-latn] +//! author : Abdel Said : https://github.com/abdelsaid + +import moment from '../moment'; + +export default moment.defineLocale('tzm-latn', { + months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), + monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), + weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[asdkh g] LT', + nextDay: '[aska g] LT', + nextWeek: 'dddd [g] LT', + lastDay: '[assant g] LT', + lastWeek: 'dddd [g] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'dadkh s yan %s', + past : 'yan %s', + s : 'imik', + ss : '%d imik', + m : 'minuḍ', + mm : '%d minuḍ', + h : 'saɛa', + hh : '%d tassaɛin', + d : 'ass', + dd : '%d ossan', + M : 'ayowr', + MM : '%d iyyirn', + y : 'asgas', + yy : '%d isgasn' + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/tzm.js b/node_modules/moment/src/locale/tzm.js new file mode 100644 index 00000000..ae7651d7 --- /dev/null +++ b/node_modules/moment/src/locale/tzm.js @@ -0,0 +1,50 @@ +//! moment.js locale configuration +//! locale : Central Atlas Tamazight [tzm] +//! author : Abdel Said : https://github.com/abdelsaid + +import moment from '../moment'; + +export default moment.defineLocale('tzm', { + months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), + monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), + weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS: 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd D MMMM YYYY HH:mm' + }, + calendar : { + sameDay: '[ⴰⵙⴷⵅ ⴴ] LT', + nextDay: '[ⴰⵙⴽⴰ ⴴ] LT', + nextWeek: 'dddd [ⴴ] LT', + lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT', + lastWeek: 'dddd [ⴴ] LT', + sameElse: 'L' + }, + relativeTime : { + future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s', + past : 'ⵢⴰⵏ %s', + s : 'ⵉⵎⵉⴽ', + ss : '%d ⵉⵎⵉⴽ', + m : 'ⵎⵉⵏⵓⴺ', + mm : '%d ⵎⵉⵏⵓⴺ', + h : 'ⵙⴰⵄⴰ', + hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ', + d : 'ⴰⵙⵙ', + dd : '%d oⵙⵙⴰⵏ', + M : 'ⴰⵢoⵓⵔ', + MM : '%d ⵉⵢⵢⵉⵔⵏ', + y : 'ⴰⵙⴳⴰⵙ', + yy : '%d ⵉⵙⴳⴰⵙⵏ' + }, + week : { + dow : 6, // Saturday is the first day of the week. + doy : 12 // The week that contains Jan 12th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/ug-cn.js b/node_modules/moment/src/locale/ug-cn.js new file mode 100644 index 00000000..5a9a9fcf --- /dev/null +++ b/node_modules/moment/src/locale/ug-cn.js @@ -0,0 +1,110 @@ +//! moment.js language configuration +//! locale : Uyghur (China) [ug-cn] +//! author: boyaq : https://github.com/boyaq + +import moment from '../moment'; + +export default moment.defineLocale('ug-cn', { + months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split( + '_' + ), + weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى', + LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm' + }, + meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + meridiem === 'يېرىم كېچە' || + meridiem === 'سەھەر' || + meridiem === 'چۈشتىن بۇرۇن' + ) { + return hour; + } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') { + return hour + 12; + } else { + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return 'يېرىم كېچە'; + } else if (hm < 900) { + return 'سەھەر'; + } else if (hm < 1130) { + return 'چۈشتىن بۇرۇن'; + } else if (hm < 1230) { + return 'چۈش'; + } else if (hm < 1800) { + return 'چۈشتىن كېيىن'; + } else { + return 'كەچ'; + } + }, + calendar: { + sameDay: '[بۈگۈن سائەت] LT', + nextDay: '[ئەتە سائەت] LT', + nextWeek: '[كېلەركى] dddd [سائەت] LT', + lastDay: '[تۆنۈگۈن] LT', + lastWeek: '[ئالدىنقى] dddd [سائەت] LT', + sameElse: 'L' + }, + relativeTime: { + future: '%s كېيىن', + past: '%s بۇرۇن', + s: 'نەچچە سېكونت', + ss: '%d سېكونت', + m: 'بىر مىنۇت', + mm: '%d مىنۇت', + h: 'بىر سائەت', + hh: '%d سائەت', + d: 'بىر كۈن', + dd: '%d كۈن', + M: 'بىر ئاي', + MM: '%d ئاي', + y: 'بىر يىل', + yy: '%d يىل' + }, + + dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '-كۈنى'; + case 'w': + case 'W': + return number + '-ھەپتە'; + default: + return number; + } + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow: 1, // Monday is the first day of the week. + doy: 7 // The week that contains Jan 1st is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/uk.js b/node_modules/moment/src/locale/uk.js new file mode 100644 index 00000000..6b18bed8 --- /dev/null +++ b/node_modules/moment/src/locale/uk.js @@ -0,0 +1,146 @@ +//! moment.js locale configuration +//! locale : Ukrainian [uk] +//! author : zemlanin : https://github.com/zemlanin +//! Author : Menelion Elensúle : https://github.com/Oire + +import moment from '../moment'; + +function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); +} +function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + 'ss': withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд', + 'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин', + 'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин', + 'dd': 'день_дні_днів', + 'MM': 'місяць_місяці_місяців', + 'yy': 'рік_роки_років' + }; + if (key === 'm') { + return withoutSuffix ? 'хвилина' : 'хвилину'; + } + else if (key === 'h') { + return withoutSuffix ? 'година' : 'годину'; + } + else { + return number + ' ' + plural(format[key], +number); + } +} +function weekdaysCaseReplace(m, format) { + var weekdays = { + 'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'), + 'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'), + 'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_') + }; + + if (m === true) { + return weekdays['nominative'].slice(1, 7).concat(weekdays['nominative'].slice(0, 1)); + } + if (!m) { + return weekdays['nominative']; + } + + var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ? + 'accusative' : + ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ? + 'genitive' : + 'nominative'); + return weekdays[nounCase][m.day()]; +} +function processHoursFunction(str) { + return function () { + return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT'; + }; +} + +export default moment.defineLocale('uk', { + months : { + 'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'), + 'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_') + }, + monthsShort : 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'), + weekdays : weekdaysCaseReplace, + weekdaysShort : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD.MM.YYYY', + LL : 'D MMMM YYYY р.', + LLL : 'D MMMM YYYY р., HH:mm', + LLLL : 'dddd, D MMMM YYYY р., HH:mm' + }, + calendar : { + sameDay: processHoursFunction('[Сьогодні '), + nextDay: processHoursFunction('[Завтра '), + lastDay: processHoursFunction('[Вчора '), + nextWeek: processHoursFunction('[У] dddd ['), + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return processHoursFunction('[Минулої] dddd [').call(this); + case 1: + case 2: + case 4: + return processHoursFunction('[Минулого] dddd [').call(this); + } + }, + sameElse: 'L' + }, + relativeTime : { + future : 'за %s', + past : '%s тому', + s : 'декілька секунд', + ss : relativeTimeWithPlural, + m : relativeTimeWithPlural, + mm : relativeTimeWithPlural, + h : 'годину', + hh : relativeTimeWithPlural, + d : 'день', + dd : relativeTimeWithPlural, + M : 'місяць', + MM : relativeTimeWithPlural, + y : 'рік', + yy : relativeTimeWithPlural + }, + // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason + meridiemParse: /ночі|ранку|дня|вечора/, + isPM: function (input) { + return /^(дня|вечора)$/.test(input); + }, + meridiem : function (hour, minute, isLower) { + if (hour < 4) { + return 'ночі'; + } else if (hour < 12) { + return 'ранку'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечора'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return number + '-й'; + case 'D': + return number + '-го'; + default: + return number; + } + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/ur.js b/node_modules/moment/src/locale/ur.js new file mode 100644 index 00000000..56f18184 --- /dev/null +++ b/node_modules/moment/src/locale/ur.js @@ -0,0 +1,90 @@ +//! moment.js locale configuration +//! locale : Urdu [ur] +//! author : Sawood Alam : https://github.com/ibnesayeed +//! author : Zack : https://github.com/ZackVision + +import moment from '../moment'; + +var months = [ + 'جنوری', + 'فروری', + 'مارچ', + 'اپریل', + 'مئی', + 'جون', + 'جولائی', + 'اگست', + 'ستمبر', + 'اکتوبر', + 'نومبر', + 'دسمبر' +]; +var days = [ + 'اتوار', + 'پیر', + 'منگل', + 'بدھ', + 'جمعرات', + 'جمعہ', + 'ہفتہ' +]; + +export default moment.defineLocale('ur', { + months : months, + monthsShort : months, + weekdays : days, + weekdaysShort : days, + weekdaysMin : days, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd، D MMMM YYYY HH:mm' + }, + meridiemParse: /صبح|شام/, + isPM : function (input) { + return 'شام' === input; + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar : { + sameDay : '[آج بوقت] LT', + nextDay : '[کل بوقت] LT', + nextWeek : 'dddd [بوقت] LT', + lastDay : '[گذشتہ روز بوقت] LT', + lastWeek : '[گذشتہ] dddd [بوقت] LT', + sameElse : 'L' + }, + relativeTime : { + future : '%s بعد', + past : '%s قبل', + s : 'چند سیکنڈ', + ss : '%d سیکنڈ', + m : 'ایک منٹ', + mm : '%d منٹ', + h : 'ایک گھنٹہ', + hh : '%d گھنٹے', + d : 'ایک دن', + dd : '%d دن', + M : 'ایک ماہ', + MM : '%d ماہ', + y : 'ایک سال', + yy : '%d سال' + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/uz-latn.js b/node_modules/moment/src/locale/uz-latn.js new file mode 100644 index 00000000..7dda2373 --- /dev/null +++ b/node_modules/moment/src/locale/uz-latn.js @@ -0,0 +1,50 @@ +//! moment.js locale configuration +//! locale : Uzbek Latin [uz-latn] +//! author : Rasulbek Mirzayev : github.com/Rasulbeeek + +import moment from '../moment'; + +export default moment.defineLocale('uz-latn', { + months : 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'), + monthsShort : 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), + weekdays : 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'), + weekdaysShort : 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), + weekdaysMin : 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'D MMMM YYYY, dddd HH:mm' + }, + calendar : { + sameDay : '[Bugun soat] LT [da]', + nextDay : '[Ertaga] LT [da]', + nextWeek : 'dddd [kuni soat] LT [da]', + lastDay : '[Kecha soat] LT [da]', + lastWeek : '[O\'tgan] dddd [kuni soat] LT [da]', + sameElse : 'L' + }, + relativeTime : { + future : 'Yaqin %s ichida', + past : 'Bir necha %s oldin', + s : 'soniya', + ss : '%d soniya', + m : 'bir daqiqa', + mm : '%d daqiqa', + h : 'bir soat', + hh : '%d soat', + d : 'bir kun', + dd : '%d kun', + M : 'bir oy', + MM : '%d oy', + y : 'bir yil', + yy : '%d yil' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 7th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/uz.js b/node_modules/moment/src/locale/uz.js new file mode 100644 index 00000000..ff0f7ca2 --- /dev/null +++ b/node_modules/moment/src/locale/uz.js @@ -0,0 +1,50 @@ +//! moment.js locale configuration +//! locale : Uzbek [uz] +//! author : Sardor Muminov : https://github.com/muminoff + +import moment from '../moment'; + +export default moment.defineLocale('uz', { + months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), + monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'), + weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'), + weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'D MMMM YYYY, dddd HH:mm' + }, + calendar : { + sameDay : '[Бугун соат] LT [да]', + nextDay : '[Эртага] LT [да]', + nextWeek : 'dddd [куни соат] LT [да]', + lastDay : '[Кеча соат] LT [да]', + lastWeek : '[Утган] dddd [куни соат] LT [да]', + sameElse : 'L' + }, + relativeTime : { + future : 'Якин %s ичида', + past : 'Бир неча %s олдин', + s : 'фурсат', + ss : '%d фурсат', + m : 'бир дакика', + mm : '%d дакика', + h : 'бир соат', + hh : '%d соат', + d : 'бир кун', + dd : '%d кун', + M : 'бир ой', + MM : '%d ой', + y : 'бир йил', + yy : '%d йил' + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 7 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/vi.js b/node_modules/moment/src/locale/vi.js new file mode 100644 index 00000000..ad7f4b08 --- /dev/null +++ b/node_modules/moment/src/locale/vi.js @@ -0,0 +1,71 @@ +//! moment.js locale configuration +//! locale : Vietnamese [vi] +//! author : Bang Nguyen : https://github.com/bangnk + +import moment from '../moment'; + +export default moment.defineLocale('vi', { + months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'), + monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'), + monthsParseExact : true, + weekdays : 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'), + weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysParseExact : true, + meridiemParse: /sa|ch/i, + isPM : function (input) { + return /^ch$/i.test(input); + }, + meridiem : function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'sa' : 'SA'; + } else { + return isLower ? 'ch' : 'CH'; + } + }, + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'DD/MM/YYYY', + LL : 'D MMMM [năm] YYYY', + LLL : 'D MMMM [năm] YYYY HH:mm', + LLLL : 'dddd, D MMMM [năm] YYYY HH:mm', + l : 'DD/M/YYYY', + ll : 'D MMM YYYY', + lll : 'D MMM YYYY HH:mm', + llll : 'ddd, D MMM YYYY HH:mm' + }, + calendar : { + sameDay: '[Hôm nay lúc] LT', + nextDay: '[Ngày mai lúc] LT', + nextWeek: 'dddd [tuần tới lúc] LT', + lastDay: '[Hôm qua lúc] LT', + lastWeek: 'dddd [tuần rồi lúc] LT', + sameElse: 'L' + }, + relativeTime : { + future : '%s tới', + past : '%s trước', + s : 'vài giây', + ss : '%d giây' , + m : 'một phút', + mm : '%d phút', + h : 'một giờ', + hh : '%d giờ', + d : 'một ngày', + dd : '%d ngày', + M : 'một tháng', + MM : '%d tháng', + y : 'một năm', + yy : '%d năm' + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal : function (number) { + return number; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); + diff --git a/node_modules/moment/src/locale/x-pseudo.js b/node_modules/moment/src/locale/x-pseudo.js new file mode 100644 index 00000000..c50320d6 --- /dev/null +++ b/node_modules/moment/src/locale/x-pseudo.js @@ -0,0 +1,59 @@ +//! moment.js locale configuration +//! locale : Pseudo [x-pseudo] +//! author : Andrew Hood : https://github.com/andrewhood125 + +import moment from '../moment'; + +export default moment.defineLocale('x-pseudo', { + months : 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'), + monthsShort : 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'), + monthsParseExact : true, + weekdays : 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'), + weekdaysShort : 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'), + weekdaysMin : 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'), + weekdaysParseExact : true, + longDateFormat : { + LT : 'HH:mm', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' + }, + calendar : { + sameDay : '[T~ódá~ý át] LT', + nextDay : '[T~ómó~rró~w át] LT', + nextWeek : 'dddd [át] LT', + lastDay : '[Ý~ést~érdá~ý át] LT', + lastWeek : '[L~ást] dddd [át] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'í~ñ %s', + past : '%s á~gó', + s : 'á ~féw ~sécó~ñds', + ss : '%d s~écóñ~ds', + m : 'á ~míñ~úté', + mm : '%d m~íñú~tés', + h : 'á~ñ hó~úr', + hh : '%d h~óúrs', + d : 'á ~dáý', + dd : '%d d~áýs', + M : 'á ~móñ~th', + MM : '%d m~óñt~hs', + y : 'á ~ýéár', + yy : '%d ý~éárs' + }, + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal : function (number) { + var b = number % 10, + output = (~~(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + }, + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/yo.js b/node_modules/moment/src/locale/yo.js new file mode 100644 index 00000000..dcd6cd24 --- /dev/null +++ b/node_modules/moment/src/locale/yo.js @@ -0,0 +1,51 @@ +//! moment.js locale configuration +//! locale : Yoruba Nigeria [yo] +//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe + +import moment from '../moment'; + +export default moment.defineLocale('yo', { + months : 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'), + monthsShort : 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'), + weekdays : 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'), + weekdaysShort : 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'), + weekdaysMin : 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'), + longDateFormat : { + LT : 'h:mm A', + LTS : 'h:mm:ss A', + L : 'DD/MM/YYYY', + LL : 'D MMMM YYYY', + LLL : 'D MMMM YYYY h:mm A', + LLLL : 'dddd, D MMMM YYYY h:mm A' + }, + calendar : { + sameDay : '[Ònì ni] LT', + nextDay : '[Ọ̀la ni] LT', + nextWeek : 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT', + lastDay : '[Àna ni] LT', + lastWeek : 'dddd [Ọsẹ̀ tólọ́] [ni] LT', + sameElse : 'L' + }, + relativeTime : { + future : 'ní %s', + past : '%s kọjá', + s : 'ìsẹjú aayá die', + ss :'aayá %d', + m : 'ìsẹjú kan', + mm : 'ìsẹjú %d', + h : 'wákati kan', + hh : 'wákati %d', + d : 'ọjọ́ kan', + dd : 'ọjọ́ %d', + M : 'osù kan', + MM : 'osù %d', + y : 'ọdún kan', + yy : 'ọdún %d' + }, + dayOfMonthOrdinalParse : /ọjọ́\s\d{1,2}/, + ordinal : 'ọjọ́ %d', + week : { + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/zh-cn.js b/node_modules/moment/src/locale/zh-cn.js new file mode 100644 index 00000000..d9e6e7e2 --- /dev/null +++ b/node_modules/moment/src/locale/zh-cn.js @@ -0,0 +1,102 @@ +//! moment.js locale configuration +//! locale : Chinese (China) [zh-cn] +//! author : suupic : https://github.com/suupic +//! author : Zeno Zeng : https://github.com/zenozeng + +import moment from '../moment'; + +export default moment.defineLocale('zh-cn', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'), + weekdaysMin : '日_一_二_三_四_五_六'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日Ah点mm分', + LLLL : 'YYYY年M月D日ddddAh点mm分', + l : 'YYYY/M/D', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日dddd HH:mm' + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || + meridiem === '上午') { + return hour; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } else { + // '中午' + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar : { + sameDay : '[今天]LT', + nextDay : '[明天]LT', + nextWeek : '[下]ddddLT', + lastDay : '[昨天]LT', + lastWeek : '[上]ddddLT', + sameElse : 'L' + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/, + ordinal : function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '周'; + default: + return number; + } + }, + relativeTime : { + future : '%s内', + past : '%s前', + s : '几秒', + ss : '%d 秒', + m : '1 分钟', + mm : '%d 分钟', + h : '1 小时', + hh : '%d 小时', + d : '1 天', + dd : '%d 天', + M : '1 个月', + MM : '%d 个月', + y : '1 年', + yy : '%d 年' + }, + week : { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow : 1, // Monday is the first day of the week. + doy : 4 // The week that contains Jan 4th is the first week of the year. + } +}); diff --git a/node_modules/moment/src/locale/zh-hk.js b/node_modules/moment/src/locale/zh-hk.js new file mode 100644 index 00000000..99435414 --- /dev/null +++ b/node_modules/moment/src/locale/zh-hk.js @@ -0,0 +1,96 @@ +//! moment.js locale configuration +//! locale : Chinese (Hong Kong) [zh-hk] +//! author : Ben : https://github.com/ben-lin +//! author : Chris Lam : https://github.com/hehachris +//! author : Konstantin : https://github.com/skfd + +import moment from '../moment'; + +export default moment.defineLocale('zh-hk', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin : '日_一_二_三_四_五_六'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日 HH:mm', + LLLL : 'YYYY年M月D日dddd HH:mm', + l : 'YYYY/M/D', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日dddd HH:mm' + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar : { + sameDay : '[今天]LT', + nextDay : '[明天]LT', + nextWeek : '[下]ddddLT', + lastDay : '[昨天]LT', + lastWeek : '[上]ddddLT', + sameElse : 'L' + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal : function (number, period) { + switch (period) { + case 'd' : + case 'D' : + case 'DDD' : + return number + '日'; + case 'M' : + return number + '月'; + case 'w' : + case 'W' : + return number + '週'; + default : + return number; + } + }, + relativeTime : { + future : '%s內', + past : '%s前', + s : '幾秒', + ss : '%d 秒', + m : '1 分鐘', + mm : '%d 分鐘', + h : '1 小時', + hh : '%d 小時', + d : '1 天', + dd : '%d 天', + M : '1 個月', + MM : '%d 個月', + y : '1 年', + yy : '%d 年' + } +}); diff --git a/node_modules/moment/src/locale/zh-tw.js b/node_modules/moment/src/locale/zh-tw.js new file mode 100644 index 00000000..5ad0d9ca --- /dev/null +++ b/node_modules/moment/src/locale/zh-tw.js @@ -0,0 +1,95 @@ +//! moment.js locale configuration +//! locale : Chinese (Taiwan) [zh-tw] +//! author : Ben : https://github.com/ben-lin +//! author : Chris Lam : https://github.com/hehachris + +import moment from '../moment'; + +export default moment.defineLocale('zh-tw', { + months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin : '日_一_二_三_四_五_六'.split('_'), + longDateFormat : { + LT : 'HH:mm', + LTS : 'HH:mm:ss', + L : 'YYYY/MM/DD', + LL : 'YYYY年M月D日', + LLL : 'YYYY年M月D日 HH:mm', + LLLL : 'YYYY年M月D日dddd HH:mm', + l : 'YYYY/M/D', + ll : 'YYYY年M月D日', + lll : 'YYYY年M月D日 HH:mm', + llll : 'YYYY年M月D日dddd HH:mm' + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem : function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar : { + sameDay : '[今天] LT', + nextDay : '[明天] LT', + nextWeek : '[下]dddd LT', + lastDay : '[昨天] LT', + lastWeek : '[上]dddd LT', + sameElse : 'L' + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal : function (number, period) { + switch (period) { + case 'd' : + case 'D' : + case 'DDD' : + return number + '日'; + case 'M' : + return number + '月'; + case 'w' : + case 'W' : + return number + '週'; + default : + return number; + } + }, + relativeTime : { + future : '%s內', + past : '%s前', + s : '幾秒', + ss : '%d 秒', + m : '1 分鐘', + mm : '%d 分鐘', + h : '1 小時', + hh : '%d 小時', + d : '1 天', + dd : '%d 天', + M : '1 個月', + MM : '%d 個月', + y : '1 年', + yy : '%d 年' + } +}); diff --git a/node_modules/moment/src/moment.js b/node_modules/moment/src/moment.js new file mode 100644 index 00000000..14e64e93 --- /dev/null +++ b/node_modules/moment/src/moment.js @@ -0,0 +1,95 @@ +//! moment.js +//! version : 2.24.0 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com + +import { hooks as moment, setHookCallback } from './lib/utils/hooks'; + +moment.version = '2.24.0'; + +import { + min, + max, + now, + isMoment, + momentPrototype as fn, + createUTC as utc, + createUnix as unix, + createLocal as local, + createInvalid as invalid, + createInZone as parseZone +} from './lib/moment/moment'; + +import { + getCalendarFormat +} from './lib/moment/calendar'; + +import { + defineLocale, + updateLocale, + getSetGlobalLocale as locale, + getLocale as localeData, + listLocales as locales, + listMonths as months, + listMonthsShort as monthsShort, + listWeekdays as weekdays, + listWeekdaysMin as weekdaysMin, + listWeekdaysShort as weekdaysShort +} from './lib/locale/locale'; + +import { + isDuration, + createDuration as duration, + getSetRelativeTimeRounding as relativeTimeRounding, + getSetRelativeTimeThreshold as relativeTimeThreshold +} from './lib/duration/duration'; + +import { normalizeUnits } from './lib/units/units'; + +import isDate from './lib/utils/is-date'; + +setHookCallback(local); + +moment.fn = fn; +moment.min = min; +moment.max = max; +moment.now = now; +moment.utc = utc; +moment.unix = unix; +moment.months = months; +moment.isDate = isDate; +moment.locale = locale; +moment.invalid = invalid; +moment.duration = duration; +moment.isMoment = isMoment; +moment.weekdays = weekdays; +moment.parseZone = parseZone; +moment.localeData = localeData; +moment.isDuration = isDuration; +moment.monthsShort = monthsShort; +moment.weekdaysMin = weekdaysMin; +moment.defineLocale = defineLocale; +moment.updateLocale = updateLocale; +moment.locales = locales; +moment.weekdaysShort = weekdaysShort; +moment.normalizeUnits = normalizeUnits; +moment.relativeTimeRounding = relativeTimeRounding; +moment.relativeTimeThreshold = relativeTimeThreshold; +moment.calendarFormat = getCalendarFormat; +moment.prototype = fn; + +// currently HTML5 input type only supports 24-hour formats +moment.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // + DATE: 'YYYY-MM-DD', // + TIME: 'HH:mm', // + TIME_SECONDS: 'HH:mm:ss', // + TIME_MS: 'HH:mm:ss.SSS', // + WEEK: 'GGGG-[W]WW', // + MONTH: 'YYYY-MM' // +}; + +export default moment; diff --git a/node_modules/next-tick/.lint b/node_modules/next-tick/.lint new file mode 100644 index 00000000..7f0f7f0c --- /dev/null +++ b/node_modules/next-tick/.lint @@ -0,0 +1,14 @@ +@root + +module +es5 + +indent 2 +maxlen 100 +tabs + +ass +bitwise +nomen +plusplus +predef+ process, setImmediate, setTimeout, clearTimeout, document, MutationObserver, WebKitMutationObserver diff --git a/node_modules/next-tick/.npmignore b/node_modules/next-tick/.npmignore new file mode 100644 index 00000000..155e41f6 --- /dev/null +++ b/node_modules/next-tick/.npmignore @@ -0,0 +1,4 @@ +.DS_Store +/node_modules +/npm-debug.log +/.lintcache diff --git a/node_modules/next-tick/.travis.yml b/node_modules/next-tick/.travis.yml new file mode 100644 index 00000000..d867be5f --- /dev/null +++ b/node_modules/next-tick/.travis.yml @@ -0,0 +1,16 @@ +sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +language: node_js +node_js: + - 0.12 + - 4 + - 5 + - 6 + +before_install: + - mkdir node_modules; ln -s ../ node_modules/next-tick + +notifications: + email: + - medikoo+next-tick@medikoo.com + +script: "npm test && npm run lint" diff --git a/node_modules/next-tick/CHANGES b/node_modules/next-tick/CHANGES new file mode 100644 index 00000000..6f59c887 --- /dev/null +++ b/node_modules/next-tick/CHANGES @@ -0,0 +1,24 @@ +v1.0.0 -- 2016.06.09 +* In case MutationObserver based solution ensure all callbacks are propagated + even if any on the way crashes (fixes #3) +* Support older engines (as IE8) which see typeof setTimeout as 'object' +* Fix spelling of LICENSE +* Configure lint scripts + +v0.2.2 -- 2014.04.18 +- Do not rely on es5-ext's valid-callable. Replace it with simple internal function +- In MutationObserver fallback rely on text node instead of attribute and assure + mutation event is invoked by real change of data + +v0.2.1 -- 2014.02.24 +- Fix case in import path + +v0.2.0 -- 2014.02.24 +- Assure microtask resultion if MutationObserver is available (thanks @Raynos) #1 +- Unify validation of callback. TypeError is throw for any non callable input +- Move main module from `lib` to root directory +- Improve documentation +- Remove Makefile (it's environment agnostic pacakge) + +v0.1.0 -- 2012.08.29 +Initial diff --git a/node_modules/next-tick/LICENSE b/node_modules/next-tick/LICENSE new file mode 100644 index 00000000..fa5fffdd --- /dev/null +++ b/node_modules/next-tick/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (C) 2012-2016 Mariusz Nowak + +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/next-tick/README.md b/node_modules/next-tick/README.md new file mode 100644 index 00000000..5e73a8b7 --- /dev/null +++ b/node_modules/next-tick/README.md @@ -0,0 +1,24 @@ +# next-tick +## Environment agnostic nextTick polyfill + +To be used in environment agnostic modules that need nextTick functionality. + +- When run in Node.js `process.nextTick` is used +- In modern browsers microtask resolution is guaranteed by `MutationObserver` +- In other engines `setImmediate` or `setTimeout(fn, 0)` is used as fallback. +- If none of the above is supported module resolves to `null` + +## Installation +### NPM + +In your project path: + + $ npm install next-tick + +#### Browser + +You can easily bundle `next-tick` for browser with any CJS bundler, e.g. [modules-webmake](https://github.com/medikoo/modules-webmake) + +## Tests [![Build Status](https://api.travis-ci.org/medikoo/next-tick.png?branch=master)](https://travis-ci.org/medikoo/next-tick) + + $ npm test diff --git a/node_modules/next-tick/index.js b/node_modules/next-tick/index.js new file mode 100644 index 00000000..ec2138ed --- /dev/null +++ b/node_modules/next-tick/index.js @@ -0,0 +1,71 @@ +'use strict'; + +var callable, byObserver; + +callable = function (fn) { + if (typeof fn !== 'function') throw new TypeError(fn + " is not a function"); + return fn; +}; + +byObserver = function (Observer) { + var node = document.createTextNode(''), queue, currentQueue, i = 0; + new Observer(function () { + var callback; + if (!queue) { + if (!currentQueue) return; + queue = currentQueue; + } else if (currentQueue) { + queue = currentQueue.concat(queue); + } + currentQueue = queue; + queue = null; + if (typeof currentQueue === 'function') { + callback = currentQueue; + currentQueue = null; + callback(); + return; + } + node.data = (i = ++i % 2); // Invoke other batch, to handle leftover callbacks in case of crash + while (currentQueue) { + callback = currentQueue.shift(); + if (!currentQueue.length) currentQueue = null; + callback(); + } + }).observe(node, { characterData: true }); + return function (fn) { + callable(fn); + if (queue) { + if (typeof queue === 'function') queue = [queue, fn]; + else queue.push(fn); + return; + } + queue = fn; + node.data = (i = ++i % 2); + }; +}; + +module.exports = (function () { + // Node.js + if ((typeof process === 'object') && process && (typeof process.nextTick === 'function')) { + return process.nextTick; + } + + // MutationObserver + if ((typeof document === 'object') && document) { + if (typeof MutationObserver === 'function') return byObserver(MutationObserver); + if (typeof WebKitMutationObserver === 'function') return byObserver(WebKitMutationObserver); + } + + // W3C Draft + // http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html + if (typeof setImmediate === 'function') { + return function (cb) { setImmediate(callable(cb)); }; + } + + // Wide available standard + if ((typeof setTimeout === 'function') || (typeof setTimeout === 'object')) { + return function (cb) { setTimeout(callable(cb), 0); }; + } + + return null; +}()); diff --git a/node_modules/next-tick/package.json b/node_modules/next-tick/package.json new file mode 100644 index 00000000..752ba2ea --- /dev/null +++ b/node_modules/next-tick/package.json @@ -0,0 +1,27 @@ +{ + "name": "next-tick", + "version": "1.0.0", + "description": "Environment agnostic nextTick polyfill", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "nexttick", + "setImmediate", + "setTimeout", + "async" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/next-tick.git" + }, + "devDependencies": { + "tad": "^0.2.4", + "xlint": "^0.2.2", + "xlint-jslint-medikoo": "^0.1.4" + }, + "scripts": { + "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", + "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", + "test": "node node_modules/tad/bin/tad" + }, + "license": "MIT" +} diff --git a/node_modules/next-tick/test/index.js b/node_modules/next-tick/test/index.js new file mode 100644 index 00000000..6b22cf48 --- /dev/null +++ b/node_modules/next-tick/test/index.js @@ -0,0 +1,22 @@ +'use strict'; + +module.exports = function (t, a, d) { + var invoked; + + a(t(function () { + a(arguments.length, 0, "Arguments"); + invoked = true; + }), undefined, "Return"); + a(invoked, undefined, "Is not run immediately"); + setTimeout(function () { + a(invoked, true, "Run in next tick"); + invoked = []; + t(function () { invoked.push(0); }); + t(function () { invoked.push(1); }); + t(function () { invoked.push(2); }); + setTimeout(function () { + a.deep(invoked, [0, 1, 2], "Serial"); + d(); + }, 10); + }, 10); +}; diff --git a/node_modules/node-pre-gyp/node_modules/.bin/nopt b/node_modules/node-pre-gyp/node_modules/.bin/nopt index 6b6566ea..d6493b6a 120000 --- a/node_modules/node-pre-gyp/node_modules/.bin/nopt +++ b/node_modules/node-pre-gyp/node_modules/.bin/nopt @@ -1 +1 @@ -../nopt/bin/nopt.js \ No newline at end of file +../../../nopt/bin/nopt.js \ No newline at end of file diff --git a/node_modules/node-pre-gyp/node_modules/nopt/package.json b/node_modules/node-pre-gyp/node_modules/nopt/package.json deleted file mode 100644 index fae2e153..00000000 --- a/node_modules/node-pre-gyp/node_modules/nopt/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "nopt", - "version": "4.0.1", - "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "main": "lib/nopt.js", - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/nopt.git" - }, - "bin": "./bin/nopt.js", - "license": "ISC", - "dependencies": { - "abbrev": "1", - "osenv": "^0.1.4" - }, - "devDependencies": { - "tap": "^8.0.1" - } -} diff --git a/node_modules/node-pre-gyp/node_modules/nopt/.npmignore b/node_modules/nopt/.npmignore similarity index 100% rename from node_modules/node-pre-gyp/node_modules/nopt/.npmignore rename to node_modules/nopt/.npmignore diff --git a/node_modules/node-pre-gyp/node_modules/nopt/.travis.yml b/node_modules/nopt/.travis.yml similarity index 100% rename from node_modules/node-pre-gyp/node_modules/nopt/.travis.yml rename to node_modules/nopt/.travis.yml diff --git a/node_modules/node-pre-gyp/node_modules/nopt/CHANGELOG.md b/node_modules/nopt/CHANGELOG.md similarity index 100% rename from node_modules/node-pre-gyp/node_modules/nopt/CHANGELOG.md rename to node_modules/nopt/CHANGELOG.md diff --git a/node_modules/nopt/LICENSE b/node_modules/nopt/LICENSE index 05a40109..19129e31 100644 --- a/node_modules/nopt/LICENSE +++ b/node_modules/nopt/LICENSE @@ -1,23 +1,15 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. +The ISC 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: +Copyright (c) Isaac Z. Schlueter and Contributors -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -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" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/nopt/README.md b/node_modules/nopt/README.md index eeddfd4f..a99531c0 100644 --- a/node_modules/nopt/README.md +++ b/node_modules/nopt/README.md @@ -5,9 +5,10 @@ The Wrong Way is to sit down and write an option parser. We've all done that. The Right Way is to write some complex configurable program with so many -options that you go half-insane just trying to manage them all, and put -it off with duct-tape solutions until you see exactly to the core of the -problem, and finally snap and write an awesome option parser. +options that you hit the limit of your frustration just trying to +manage them all, and defer it with duct-tape solutions until you see +exactly to the core of the problem, and finally snap and write an +awesome option parser. If you want to write an option parser, don't write an option parser. Write a package manager, or a source control system, or a service @@ -18,34 +19,37 @@ nice option parser. ## USAGE - // my-program.js - var nopt = require("nopt") - , Stream = require("stream").Stream - , path = require("path") - , knownOpts = { "foo" : [String, null] - , "bar" : [Stream, Number] - , "baz" : path - , "bloo" : [ "big", "medium", "small" ] - , "flag" : Boolean - , "pick" : Boolean - , "many" : [String, Array] - } - , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] - , "b7" : ["--bar", "7"] - , "m" : ["--bloo", "medium"] - , "p" : ["--pick"] - , "f" : ["--flag"] - } - // everything is optional. - // knownOpts and shorthands default to {} - // arg list defaults to process.argv - // slice defaults to 2 - , parsed = nopt(knownOpts, shortHands, process.argv, 2) - console.log(parsed) +```javascript +// my-program.js +var nopt = require("nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + , "many1" : [String, Array] + , "many2" : [path, Array] + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag"] + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) +console.log(parsed) +``` This would give you support for any of the following: -```bash +```console $ node my-program.js --foo "blerp" --no-flag { "foo" : "blerp", "flag" : false } @@ -61,12 +65,12 @@ $ node my-program.js -fp --foofoo $ node my-program.js --foofoo -- -fp # -- stops the flag parsing. { foo: "Mr. Foo", argv: { remain: ["-fp"] } } -$ node my-program.js --blatzk 1000 -fp # unknown opts are ok. -{ blatzk: 1000, flag: true, pick: true } - -$ node my-program.js --blatzk true -fp # but they need a value +$ node my-program.js --blatzk -fp # unknown opts are ok. { blatzk: true, flag: true, pick: true } +$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value +{ blatzk: 1000, flag: true, pick: true } + $ node my-program.js --no-blatzk -fp # unless they start with "no-" { blatzk: false, flag: true, pick: true } @@ -77,11 +81,11 @@ $ node my-program.js --baz b/a/z # known paths are resolved. # values, and will always be an array. The other types provided # specify what types are allowed in the list. -$ node my-program.js --many 1 --many null --many foo -{ many: ["1", "null", "foo"] } +$ node my-program.js --many1 5 --many1 null --many1 foo +{ many1: ["5", "null", "foo"] } -$ node my-program.js --many foo -{ many: ["foo"] } +$ node my-program.js --many2 foo --many2 bar +{ many2: ["/path/to/foo", "path/to/bar"] } ``` Read the tests at the bottom of `lib/nopt.js` for more examples of @@ -116,12 +120,13 @@ considered valid values. For instance, in the example above, the and any other value will be rejected. When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be -interpreted as their JavaScript equivalents, and numeric values will be -interpreted as a number. +interpreted as their JavaScript equivalents. You can also mix types and values, or multiple types, in a list. For instance `{ blah: [Number, null] }` would allow a value to be set to -either a Number or null. +either a Number or null. When types are ordered, this implies a +preference, and the first type that can be used to properly interpret +the value will be used. To define a new type, add it to `nopt.typeDefs`. Each item in that hash is an object with a `type` member and a `validate` method. The @@ -136,8 +141,8 @@ config object and remove its invalid properties. ## Error Handling -By default, nopt outputs a warning to standard error when invalid -options are found. You can change this behavior by assigning a method +By default, nopt outputs a warning to standard error when invalid values for +known options are found. You can change this behavior by assigning a method to `nopt.invalidHandler`. This method will be called with the offending `nopt.invalidHandler(key, val, types)`. diff --git a/node_modules/nopt/bin/nopt.js b/node_modules/nopt/bin/nopt.js index df90c729..3232d4c5 100755 --- a/node_modules/nopt/bin/nopt.js +++ b/node_modules/nopt/bin/nopt.js @@ -1,5 +1,6 @@ #!/usr/bin/env node var nopt = require("../lib/nopt") + , path = require("path") , types = { num: Number , bool: Boolean , help: Boolean @@ -7,7 +8,12 @@ var nopt = require("../lib/nopt") , "num-list": [Number, Array] , "str-list": [String, Array] , "bool-list": [Boolean, Array] - , str: String } + , str: String + , clear: Boolean + , config: Boolean + , length: Number + , file: path + } , shorthands = { s: [ "--str", "astring" ] , b: [ "--bool" ] , nb: [ "--no-bool" ] @@ -15,7 +21,11 @@ var nopt = require("../lib/nopt") , "?": ["--help"] , h: ["--help"] , H: ["--help"] - , n: [ "--num", "125" ] } + , n: [ "--num", "125" ] + , c: ["--config"] + , l: ["--length"] + , f: ["--file"] + } , parsed = nopt( types , shorthands , process.argv diff --git a/node_modules/nopt/lib/nopt.js b/node_modules/nopt/lib/nopt.js index ff802daf..1fb11351 100644 --- a/node_modules/nopt/lib/nopt.js +++ b/node_modules/nopt/lib/nopt.js @@ -8,6 +8,7 @@ var url = require("url") , path = require("path") , Stream = require("stream").Stream , abbrev = require("abbrev") + , osenv = require("osenv") module.exports = exports = nopt exports.clean = clean @@ -33,24 +34,26 @@ function nopt (types, shorthands, args, slice) { args = args.slice(slice) var data = {} , key - , remain = [] - , cooked = args - , original = args.slice(0) + , argv = { + remain: [], + cooked: args, + original: args.slice(0) + } - parse(args, data, remain, types, shorthands) + parse(args, data, argv.remain, types, shorthands) // now data is full clean(data, types, exports.typeDefs) - data.argv = {remain:remain,cooked:cooked,original:original} - data.argv.toString = function () { + data.argv = argv + Object.defineProperty(data.argv, 'toString', { value: function () { return this.original.map(JSON.stringify).join(" ") - } + }, enumerable: false }) return data } function clean (data, types, typeDefs) { typeDefs = typeDefs || exports.typeDefs var remove = {} - , typeDefault = [false, true, null, String, Number] + , typeDefault = [false, true, null, String, Array] Object.keys(data).forEach(function (k) { if (k === "argv") return @@ -125,7 +128,20 @@ function validateString (data, k, val) { } function validatePath (data, k, val) { - data[k] = path.resolve(String(val)) + if (val === true) return false + if (val === null) return true + + val = String(val) + + var isWin = process.platform === 'win32' + , homePattern = isWin ? /^~(\/|\\)/ : /^~\// + , home = osenv.home() + + if (home && val.match(homePattern)) { + data[k] = path.resolve(home, val.substr(2)) + } else { + data[k] = path.resolve(val) + } return true } @@ -136,8 +152,8 @@ function validateNumber (data, k, val) { } function validateDate (data, k, val) { - debug("validate Date %j %j %j", k, val, Date.parse(val)) var s = Date.parse(val) + debug("validate Date %j %j %j", k, val, s) if (isNaN(s)) return false data[k] = new Date(val) } @@ -199,7 +215,8 @@ function validate (data, k, val, type, typeDefs) { for (var i = 0, l = types.length; i < l; i ++) { debug("test type %j %j %j", k, val, types[i]) var t = typeDefs[types[i]] - if (t && type === t.type) { + if (t && + ((type && type.name && t.type && t.type.name) ? (type.name === t.type.name) : (type === t.type))) { var d = {} ok = false !== t.validate(d, k, val) val = d[k] @@ -235,13 +252,16 @@ function parse (args, data, remain, types, shorthands) { args[i] = "--" break } - if (arg.charAt(0) === "-") { - if (arg.indexOf("=") !== -1) { - var v = arg.split("=") - arg = v.shift() - v = v.join("=") - args.splice.apply(args, [i, 1].concat([arg, v])) + var hadEq = false + if (arg.charAt(0) === "-" && arg.length > 1) { + var at = arg.indexOf('=') + if (at > -1) { + hadEq = true + var v = arg.substr(at + 1) + arg = arg.substr(0, at) + args.splice(i, 1, arg, v) } + // see if it's a shorthand // if so, splice and back up to re-parse it. var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs) @@ -255,7 +275,7 @@ function parse (args, data, remain, types, shorthands) { } } arg = arg.replace(/^-+/, "") - var no = false + var no = null while (arg.toLowerCase().indexOf("no-") === 0) { no = !no arg = arg.substr(3) @@ -263,18 +283,33 @@ function parse (args, data, remain, types, shorthands) { if (abbrevs[arg]) arg = abbrevs[arg] - var isArray = types[arg] === Array || - Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1 + var argType = types[arg] + var isTypeArray = Array.isArray(argType) + if (isTypeArray && argType.length === 1) { + isTypeArray = false + argType = argType[0] + } + + var isArray = argType === Array || + isTypeArray && argType.indexOf(Array) !== -1 + + // allow unknown things to be arrays if specified multiple times. + if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) { + if (!Array.isArray(data[arg])) + data[arg] = [data[arg]] + isArray = true + } var val , la = args[i + 1] - var isBool = no || - types[arg] === Boolean || - Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 || + var isBool = typeof no === 'boolean' || + argType === Boolean || + isTypeArray && argType.indexOf(Boolean) !== -1 || + (typeof argType === 'undefined' && !hadEq) || (la === "false" && - (types[arg] === null || - Array.isArray(types[arg]) && ~types[arg].indexOf(null))) + (argType === null || + isTypeArray && ~argType.indexOf(null))) if (isBool) { // just set and move along @@ -288,22 +323,22 @@ function parse (args, data, remain, types, shorthands) { } // also support "foo":[Boolean, "bar"] and "--foo bar" - if (Array.isArray(types[arg]) && la) { - if (~types[arg].indexOf(la)) { + if (isTypeArray && la) { + if (~argType.indexOf(la)) { // an explicit type val = la i ++ - } else if ( la === "null" && ~types[arg].indexOf(null) ) { + } else if ( la === "null" && ~argType.indexOf(null) ) { // null allowed val = null i ++ } else if ( !la.match(/^-{2,}[^-]/) && !isNaN(la) && - ~types[arg].indexOf(Number) ) { + ~argType.indexOf(Number) ) { // number val = +la i ++ - } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) { + } else if ( !la.match(/^-[^-]/) && ~argType.indexOf(String) ) { // string val = la i ++ @@ -316,6 +351,15 @@ function parse (args, data, remain, types, shorthands) { continue } + if (argType === String) { + if (la === undefined) { + la = "" + } else if (la.match(/^-{1,2}[^-]+/)) { + la = "" + i -- + } + } + if (la && la.match(/^-{2,}$/)) { la = undefined i -- @@ -338,215 +382,55 @@ function resolveShort (arg, shorthands, shortAbbr, abbrevs) { // all of the chars are single-char shorthands, and it's // not a match to some other abbrev. arg = arg.replace(/^-+/, '') - if (abbrevs[arg] && !shorthands[arg]) { + + // if it's an exact known option, then don't go any further + if (abbrevs[arg] === arg) return null - } - if (shortAbbr[arg]) { - arg = shortAbbr[arg] - } else { - var singles = shorthands.___singles - if (!singles) { - singles = Object.keys(shorthands).filter(function (s) { - return s.length === 1 - }).reduce(function (l,r) { l[r] = true ; return l }, {}) - shorthands.___singles = singles - } - var chrs = arg.split("").filter(function (c) { - return singles[c] - }) - if (chrs.join("") === arg) return chrs.map(function (c) { - return shorthands[c] - }).reduce(function (l, r) { - return l.concat(r) - }, []) + + // if it's an exact known shortopt, same deal + if (shorthands[arg]) { + // make it an array, if it's a list of words + if (shorthands[arg] && !Array.isArray(shorthands[arg])) + shorthands[arg] = shorthands[arg].split(/\s+/) + + return shorthands[arg] } - if (shorthands[arg] && !Array.isArray(shorthands[arg])) { - shorthands[arg] = shorthands[arg].split(/\s+/) + // first check to see if this arg is a set of single-char shorthands + var singles = shorthands.___singles + if (!singles) { + singles = Object.keys(shorthands).filter(function (s) { + return s.length === 1 + }).reduce(function (l,r) { + l[r] = true + return l + }, {}) + shorthands.___singles = singles + debug('shorthand singles', singles) } - return shorthands[arg] -} -if (module === require.main) { -var assert = require("assert") - , util = require("util") - - , shorthands = - { s : ["--loglevel", "silent"] - , d : ["--loglevel", "info"] - , dd : ["--loglevel", "verbose"] - , ddd : ["--loglevel", "silly"] - , noreg : ["--no-registry"] - , reg : ["--registry"] - , "no-reg" : ["--no-registry"] - , silent : ["--loglevel", "silent"] - , verbose : ["--loglevel", "verbose"] - , h : ["--usage"] - , H : ["--usage"] - , "?" : ["--usage"] - , help : ["--usage"] - , v : ["--version"] - , f : ["--force"] - , desc : ["--description"] - , "no-desc" : ["--no-description"] - , "local" : ["--no-global"] - , l : ["--long"] - , p : ["--parseable"] - , porcelain : ["--parseable"] - , g : ["--global"] - } + var chrs = arg.split("").filter(function (c) { + return singles[c] + }) - , types = - { aoa: Array - , nullstream: [null, Stream] - , date: Date - , str: String - , browser : String - , cache : path - , color : ["always", Boolean] - , depth : Number - , description : Boolean - , dev : Boolean - , editor : path - , force : Boolean - , global : Boolean - , globalconfig : path - , group : [String, Number] - , gzipbin : String - , logfd : [Number, Stream] - , loglevel : ["silent","win","error","warn","info","verbose","silly"] - , long : Boolean - , "node-version" : [false, String] - , npaturl : url - , npat : Boolean - , "onload-script" : [false, String] - , outfd : [Number, Stream] - , parseable : Boolean - , pre: Boolean - , prefix: path - , proxy : url - , "rebuild-bundle" : Boolean - , registry : url - , searchopts : String - , searchexclude: [null, String] - , shell : path - , t: [Array, String] - , tag : String - , tar : String - , tmp : path - , "unsafe-perm" : Boolean - , usage : Boolean - , user : String - , username : String - , userconfig : path - , version : Boolean - , viewer: path - , _exit : Boolean - } + if (chrs.join("") === arg) return chrs.map(function (c) { + return shorthands[c] + }).reduce(function (l, r) { + return l.concat(r) + }, []) -; [["-v", {version:true}, []] - ,["---v", {version:true}, []] - ,["ls -s --no-reg connect -d", - {loglevel:"info",registry:null},["ls","connect"]] - ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]] - ,["ls --registry blargle", {}, ["ls"]] - ,["--no-registry", {registry:null}, []] - ,["--no-color true", {color:false}, []] - ,["--no-color false", {color:true}, []] - ,["--no-color", {color:false}, []] - ,["--color false", {color:false}, []] - ,["--color --logfd 7", {logfd:7,color:true}, []] - ,["--color=true", {color:true}, []] - ,["--logfd=10", {logfd:10}, []] - ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]] - ,["--tmp=tmp -tar=gtar", - {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]] - ,["--logfd x", {}, []] - ,["a -true -- -no-false", {true:true},["a","-no-false"]] - ,["a -no-false", {false:false},["a"]] - ,["a -no-no-true", {true:true}, ["a"]] - ,["a -no-no-no-false", {false:false}, ["a"]] - ,["---NO-no-No-no-no-no-nO-no-no"+ - "-No-no-no-no-no-no-no-no-no"+ - "-no-no-no-no-NO-NO-no-no-no-no-no-no"+ - "-no-body-can-do-the-boogaloo-like-I-do" - ,{"body-can-do-the-boogaloo-like-I-do":false}, []] - ,["we are -no-strangers-to-love "+ - "--you-know the-rules --and so-do-i "+ - "---im-thinking-of=a-full-commitment "+ - "--no-you-would-get-this-from-any-other-guy "+ - "--no-gonna-give-you-up "+ - "-no-gonna-let-you-down=true "+ - "--no-no-gonna-run-around false "+ - "--desert-you=false "+ - "--make-you-cry false "+ - "--no-tell-a-lie "+ - "--no-no-and-hurt-you false" - ,{"strangers-to-love":false - ,"you-know":"the-rules" - ,"and":"so-do-i" - ,"you-would-get-this-from-any-other-guy":false - ,"gonna-give-you-up":false - ,"gonna-let-you-down":false - ,"gonna-run-around":false - ,"desert-you":false - ,"make-you-cry":false - ,"tell-a-lie":false - ,"and-hurt-you":false - },["we", "are"]] - ,["-t one -t two -t three" - ,{t: ["one", "two", "three"]} - ,[]] - ,["-t one -t null -t three four five null" - ,{t: ["one", "null", "three"]} - ,["four", "five", "null"]] - ,["-t foo" - ,{t:["foo"]} - ,[]] - ,["--no-t" - ,{t:["false"]} - ,[]] - ,["-no-no-t" - ,{t:["true"]} - ,[]] - ,["-aoa one -aoa null -aoa 100" - ,{aoa:["one", null, 100]} - ,[]] - ,["-str 100" - ,{str:"100"} - ,[]] - ,["--color always" - ,{color:"always"} - ,[]] - ,["--no-nullstream" - ,{nullstream:null} - ,[]] - ,["--nullstream false" - ,{nullstream:null} - ,[]] - ,["--notadate 2011-01-25" - ,{notadate: "2011-01-25"} - ,[]] - ,["--date 2011-01-25" - ,{date: new Date("2011-01-25")} - ,[]] - ].forEach(function (test) { - var argv = test[0].split(/\s+/) - , opts = test[1] - , rem = test[2] - , actual = nopt(types, shorthands, argv, 0) - , parsed = actual.argv - delete actual.argv - console.log(util.inspect(actual, false, 2, true), parsed.remain) - for (var i in opts) { - var e = JSON.stringify(opts[i]) - , a = JSON.stringify(actual[i] === undefined ? null : actual[i]) - if (e && typeof e === "object") { - assert.deepEqual(e, a) - } else { - assert.equal(e, a) - } - } - assert.deepEqual(rem, parsed.remain) - }) + + // if it's an arg abbrev, and not a literal shorthand, then prefer the arg + if (abbrevs[arg] && !shorthands[arg]) + return null + + // if it's an abbr for a shorthand, then use that + if (shortAbbr[arg]) + arg = shortAbbr[arg] + + // make it an array, if it's a list of words + if (shorthands[arg] && !Array.isArray(shorthands[arg])) + shorthands[arg] = shorthands[arg].split(/\s+/) + + return shorthands[arg] } diff --git a/node_modules/nopt/package.json b/node_modules/nopt/package.json index d1118e39..fae2e153 100644 --- a/node_modules/nopt/package.json +++ b/node_modules/nopt/package.json @@ -1,12 +1,23 @@ -{ "name" : "nopt" -, "version" : "1.0.10" -, "description" : "Option parsing for Node, supporting types, shorthands, etc. Used by npm." -, "author" : "Isaac Z. Schlueter (http://blog.izs.me/)" -, "main" : "lib/nopt.js" -, "scripts" : { "test" : "node lib/nopt.js" } -, "repository" : "http://github.com/isaacs/nopt" -, "bin" : "./bin/nopt.js" -, "license" : - { "type" : "MIT" - , "url" : "https://github.com/isaacs/nopt/raw/master/LICENSE" } -, "dependencies" : { "abbrev" : "1" }} +{ + "name": "nopt", + "version": "4.0.1", + "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "main": "lib/nopt.js", + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/nopt.git" + }, + "bin": "./bin/nopt.js", + "license": "ISC", + "dependencies": { + "abbrev": "1", + "osenv": "^0.1.4" + }, + "devDependencies": { + "tap": "^8.0.1" + } +} diff --git a/node_modules/node-pre-gyp/node_modules/nopt/test/basic.js b/node_modules/nopt/test/basic.js similarity index 100% rename from node_modules/node-pre-gyp/node_modules/nopt/test/basic.js rename to node_modules/nopt/test/basic.js diff --git a/node_modules/node-pre-gyp/node_modules/nopt/LICENSE b/node_modules/proto-list/LICENSE similarity index 100% rename from node_modules/node-pre-gyp/node_modules/nopt/LICENSE rename to node_modules/proto-list/LICENSE diff --git a/node_modules/proto-list/README.md b/node_modules/proto-list/README.md new file mode 100644 index 00000000..43cfa358 --- /dev/null +++ b/node_modules/proto-list/README.md @@ -0,0 +1,3 @@ +A list of objects, bound by their prototype chain. + +Used in npm's config stuff. diff --git a/node_modules/proto-list/package.json b/node_modules/proto-list/package.json new file mode 100644 index 00000000..c65b406f --- /dev/null +++ b/node_modules/proto-list/package.json @@ -0,0 +1,18 @@ +{ + "name": "proto-list", + "version": "1.2.4", + "description": "A utility for managing a prototype chain", + "main": "./proto-list.js", + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/isaacs/proto-list" + }, + "license": "ISC", + "devDependencies": { + "tap": "0" + } +} diff --git a/node_modules/proto-list/proto-list.js b/node_modules/proto-list/proto-list.js new file mode 100644 index 00000000..b55c25c0 --- /dev/null +++ b/node_modules/proto-list/proto-list.js @@ -0,0 +1,88 @@ + +module.exports = ProtoList + +function setProto(obj, proto) { + if (typeof Object.setPrototypeOf === "function") + return Object.setPrototypeOf(obj, proto) + else + obj.__proto__ = proto +} + +function ProtoList () { + this.list = [] + var root = null + Object.defineProperty(this, 'root', { + get: function () { return root }, + set: function (r) { + root = r + if (this.list.length) { + setProto(this.list[this.list.length - 1], r) + } + }, + enumerable: true, + configurable: true + }) +} + +ProtoList.prototype = + { get length () { return this.list.length } + , get keys () { + var k = [] + for (var i in this.list[0]) k.push(i) + return k + } + , get snapshot () { + var o = {} + this.keys.forEach(function (k) { o[k] = this.get(k) }, this) + return o + } + , get store () { + return this.list[0] + } + , push : function (obj) { + if (typeof obj !== "object") obj = {valueOf:obj} + if (this.list.length >= 1) { + setProto(this.list[this.list.length - 1], obj) + } + setProto(obj, this.root) + return this.list.push(obj) + } + , pop : function () { + if (this.list.length >= 2) { + setProto(this.list[this.list.length - 2], this.root) + } + return this.list.pop() + } + , unshift : function (obj) { + setProto(obj, this.list[0] || this.root) + return this.list.unshift(obj) + } + , shift : function () { + if (this.list.length === 1) { + setProto(this.list[0], this.root) + } + return this.list.shift() + } + , get : function (key) { + return this.list[0][key] + } + , set : function (key, val, save) { + if (!this.length) this.push({}) + if (save && this.list[0].hasOwnProperty(key)) this.push({}) + return this.list[0][key] = val + } + , forEach : function (fn, thisp) { + for (var key in this.list[0]) fn.call(thisp, key, this.list[0][key]) + } + , slice : function () { + return this.list.slice.apply(this.list, arguments) + } + , splice : function () { + // handle injections + var ret = this.list.splice.apply(this.list, arguments) + for (var i = 0, l = this.list.length; i < l; i++) { + setProto(this.list[i], this.list[i + 1] || this.root) + } + return ret + } + } diff --git a/node_modules/proto-list/test/basic.js b/node_modules/proto-list/test/basic.js new file mode 100644 index 00000000..5cd66bef --- /dev/null +++ b/node_modules/proto-list/test/basic.js @@ -0,0 +1,61 @@ +var tap = require("tap") + , test = tap.test + , ProtoList = require("../proto-list.js") + +tap.plan(1) + +tap.test("protoList tests", function (t) { + var p = new ProtoList + p.push({foo:"bar"}) + p.push({}) + p.set("foo", "baz") + t.equal(p.get("foo"), "baz") + + var p = new ProtoList + p.push({foo:"bar"}) + p.set("foo", "baz") + t.equal(p.get("foo"), "baz") + t.equal(p.length, 1) + p.pop() + t.equal(p.length, 0) + p.set("foo", "asdf") + t.equal(p.length, 1) + t.equal(p.get("foo"), "asdf") + p.push({bar:"baz"}) + t.equal(p.length, 2) + t.equal(p.get("foo"), "asdf") + p.shift() + t.equal(p.length, 1) + t.equal(p.get("foo"), undefined) + + + p.unshift({foo:"blo", bar:"rab"}) + p.unshift({foo:"boo"}) + t.equal(p.length, 3) + t.equal(p.get("foo"), "boo") + t.equal(p.get("bar"), "rab") + + var ret = p.splice(1, 1, {bar:"bar"}) + t.same(ret, [{foo:"blo", bar:"rab"}]) + t.equal(p.get("bar"), "bar") + + // should not inherit default object properties + t.equal(p.get('hasOwnProperty'), undefined) + + // unless we give it those. + p.root = {} + t.equal(p.get('hasOwnProperty'), {}.hasOwnProperty) + + p.root = {default:'monkey'} + t.equal(p.get('default'), 'monkey') + + p.push({red:'blue'}) + p.push({red:'blue'}) + p.push({red:'blue'}) + while (p.length) { + t.equal(p.get('default'), 'monkey') + p.shift() + } + + t.end() +}) diff --git a/node_modules/regenerator-runtime/README.md b/node_modules/regenerator-runtime/README.md new file mode 100644 index 00000000..d93386a3 --- /dev/null +++ b/node_modules/regenerator-runtime/README.md @@ -0,0 +1,31 @@ +# regenerator-runtime + +Standalone runtime for +[Regenerator](https://github.com/facebook/regenerator)-compiled generator +and `async` functions. + +To import the runtime as a module (recommended), either of the following +import styles will work: +```js +// CommonJS +const regeneratorRuntime = require("regenerator-runtime"); + +// ECMAScript 2015 +import regeneratorRuntime from "regenerator-runtime"; +``` + +To ensure that `regeneratorRuntime` is defined globally, either of the +following styles will work: +```js +// CommonJS +require("regenerator-runtime/runtime"); + +// ECMAScript 2015 +import "regenerator-runtime/runtime"; +``` + +To get the absolute file system path of `runtime.js`, evaluate the +following expression: +```js +require("regenerator-runtime/path").path +``` diff --git a/node_modules/regenerator-runtime/package.json b/node_modules/regenerator-runtime/package.json new file mode 100644 index 00000000..db053987 --- /dev/null +++ b/node_modules/regenerator-runtime/package.json @@ -0,0 +1,18 @@ +{ + "name": "regenerator-runtime", + "author": "Ben Newman ", + "description": "Runtime for Regenerator-compiled generator and async functions.", + "version": "0.11.1", + "main": "runtime-module.js", + "keywords": [ + "regenerator", + "runtime", + "generator", + "async" + ], + "repository": { + "type": "git", + "url": "https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime" + }, + "license": "MIT" +} diff --git a/node_modules/regenerator-runtime/path.js b/node_modules/regenerator-runtime/path.js new file mode 100644 index 00000000..ced878b8 --- /dev/null +++ b/node_modules/regenerator-runtime/path.js @@ -0,0 +1,11 @@ +/** + * 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. + */ + +exports.path = require("path").join( + __dirname, + "runtime.js" +); diff --git a/node_modules/regenerator-runtime/runtime-module.js b/node_modules/regenerator-runtime/runtime-module.js new file mode 100644 index 00000000..ed284317 --- /dev/null +++ b/node_modules/regenerator-runtime/runtime-module.js @@ -0,0 +1,35 @@ +/** + * 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. + */ + +// This method of obtaining a reference to the global object needs to be +// kept identical to the way it is obtained in runtime.js +var g = (function() { return this })() || Function("return this")(); + +// Use `getOwnPropertyNames` because not all browsers support calling +// `hasOwnProperty` on the global `self` object in a worker. See #183. +var hadRuntime = g.regeneratorRuntime && + Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; + +// Save the old regeneratorRuntime in case it needs to be restored later. +var oldRuntime = hadRuntime && g.regeneratorRuntime; + +// Force reevalutation of runtime.js. +g.regeneratorRuntime = undefined; + +module.exports = require("./runtime"); + +if (hadRuntime) { + // Restore the original runtime. + g.regeneratorRuntime = oldRuntime; +} else { + // Remove the global property added by runtime.js. + try { + delete g.regeneratorRuntime; + } catch(e) { + g.regeneratorRuntime = undefined; + } +} diff --git a/node_modules/regenerator-runtime/runtime.js b/node_modules/regenerator-runtime/runtime.js new file mode 100644 index 00000000..22e7b005 --- /dev/null +++ b/node_modules/regenerator-runtime/runtime.js @@ -0,0 +1,727 @@ +/** + * 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. + */ + +!(function(global) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // 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"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + 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; + } + runtime.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; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "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) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.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; + }; + + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + 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. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + 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 Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return Promise.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. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(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; + }; + runtime.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. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); + + return runtime.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) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + 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; + 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; + } + + } 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); + + 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); + } + + runtime.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; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, 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; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + 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; + } + } + } + }, + + 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; + } + + 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; + } + + return ContinueSentinel; + } + }; +})( + // In sloppy mode, unbound `this` refers to the global object, fallback to + // Function constructor if we're in global strict mode. That is sadly a form + // of indirect eval which violates Content Security Policy. + (function() { return this })() || Function("return this")() +); diff --git a/node_modules/require-directory/.jshintrc b/node_modules/require-directory/.jshintrc new file mode 100644 index 00000000..e14e4dcb --- /dev/null +++ b/node_modules/require-directory/.jshintrc @@ -0,0 +1,67 @@ +{ + "maxerr" : 50, + "bitwise" : true, + "camelcase" : true, + "curly" : true, + "eqeqeq" : true, + "forin" : true, + "immed" : true, + "indent" : 2, + "latedef" : true, + "newcap" : true, + "noarg" : true, + "noempty" : true, + "nonew" : true, + "plusplus" : true, + "quotmark" : true, + "undef" : true, + "unused" : true, + "strict" : true, + "trailing" : true, + "maxparams" : false, + "maxdepth" : false, + "maxstatements" : false, + "maxcomplexity" : false, + "maxlen" : false, + "asi" : false, + "boss" : false, + "debug" : false, + "eqnull" : true, + "es5" : false, + "esnext" : false, + "moz" : false, + "evil" : false, + "expr" : true, + "funcscope" : true, + "globalstrict" : true, + "iterator" : true, + "lastsemic" : false, + "laxbreak" : false, + "laxcomma" : false, + "loopfunc" : false, + "multistr" : false, + "proto" : false, + "scripturl" : false, + "smarttabs" : false, + "shadow" : false, + "sub" : false, + "supernew" : false, + "validthis" : false, + "browser" : true, + "couch" : false, + "devel" : true, + "dojo" : false, + "jquery" : false, + "mootools" : false, + "node" : true, + "nonstandard" : false, + "prototypejs" : false, + "rhino" : false, + "worker" : false, + "wsh" : false, + "yui" : false, + "nomen" : true, + "onevar" : true, + "passfail" : false, + "white" : true +} diff --git a/node_modules/require-directory/.npmignore b/node_modules/require-directory/.npmignore new file mode 100644 index 00000000..47cf365a --- /dev/null +++ b/node_modules/require-directory/.npmignore @@ -0,0 +1 @@ +test/** diff --git a/node_modules/require-directory/.travis.yml b/node_modules/require-directory/.travis.yml new file mode 100644 index 00000000..20fd86b6 --- /dev/null +++ b/node_modules/require-directory/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - 0.10 diff --git a/node_modules/require-directory/LICENSE b/node_modules/require-directory/LICENSE new file mode 100644 index 00000000..a70f253a --- /dev/null +++ b/node_modules/require-directory/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2011 Troy Goode + +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/require-directory/README.markdown b/node_modules/require-directory/README.markdown new file mode 100644 index 00000000..926a063e --- /dev/null +++ b/node_modules/require-directory/README.markdown @@ -0,0 +1,184 @@ +# require-directory + +Recursively iterates over specified directory, `require()`'ing each file, and returning a nested hash structure containing those modules. + +**[Follow me (@troygoode) on Twitter!](https://twitter.com/intent/user?screen_name=troygoode)** + +[![NPM](https://nodei.co/npm/require-directory.png?downloads=true&stars=true)](https://nodei.co/npm/require-directory/) + +[![build status](https://secure.travis-ci.org/troygoode/node-require-directory.png)](http://travis-ci.org/troygoode/node-require-directory) + +## How To Use + +### Installation (via [npm](https://npmjs.org/package/require-directory)) + +```bash +$ npm install require-directory +``` + +### Usage + +A common pattern in node.js is to include an index file which creates a hash of the files in its current directory. Given a directory structure like so: + +* app.js +* routes/ + * index.js + * home.js + * auth/ + * login.js + * logout.js + * register.js + +`routes/index.js` uses `require-directory` to build the hash (rather than doing so manually) like so: + +```javascript +var requireDirectory = require('require-directory'); +module.exports = requireDirectory(module); +``` + +`app.js` references `routes/index.js` like any other module, but it now has a hash/tree of the exports from the `./routes/` directory: + +```javascript +var routes = require('./routes'); + +// snip + +app.get('/', routes.home); +app.get('/register', routes.auth.register); +app.get('/login', routes.auth.login); +app.get('/logout', routes.auth.logout); +``` + +The `routes` variable above is the equivalent of this: + +```javascript +var routes = { + home: require('routes/home.js'), + auth: { + login: require('routes/auth/login.js'), + logout: require('routes/auth/logout.js'), + register: require('routes/auth/register.js') + } +}; +``` + +*Note that `routes.index` will be `undefined` as you would hope.* + +### Specifying Another Directory + +You can specify which directory you want to build a tree of (if it isn't the current directory for whatever reason) by passing it as the second parameter. Not specifying the path (`requireDirectory(module)`) is the equivelant of `requireDirectory(module, __dirname)`: + +```javascript +var requireDirectory = require('require-directory'); +module.exports = requireDirectory(module, './some/subdirectory'); +``` + +For example, in the [example in the Usage section](#usage) we could have avoided creating `routes/index.js` and instead changed the first lines of `app.js` to: + +```javascript +var requireDirectory = require('require-directory'); +var routes = requireDirectory(module, './routes'); +``` + +## Options + +You can pass an options hash to `require-directory` as the 2nd parameter (or 3rd if you're passing the path to another directory as the 2nd parameter already). Here are the available options: + +### Whitelisting + +Whitelisting (either via RegExp or function) allows you to specify that only certain files be loaded. + +```javascript +var requireDirectory = require('require-directory'), + whitelist = /onlyinclude.js$/, + hash = requireDirectory(module, {include: whitelist}); +``` + +```javascript +var requireDirectory = require('require-directory'), + check = function(path){ + if(/onlyinclude.js$/.test(path)){ + return true; // don't include + }else{ + return false; // go ahead and include + } + }, + hash = requireDirectory(module, {include: check}); +``` + +### Blacklisting + +Blacklisting (either via RegExp or function) allows you to specify that all but certain files should be loaded. + +```javascript +var requireDirectory = require('require-directory'), + blacklist = /dontinclude\.js$/, + hash = requireDirectory(module, {exclude: blacklist}); +``` + +```javascript +var requireDirectory = require('require-directory'), + check = function(path){ + if(/dontinclude\.js$/.test(path)){ + return false; // don't include + }else{ + return true; // go ahead and include + } + }, + hash = requireDirectory(module, {exclude: check}); +``` + +### Visiting Objects As They're Loaded + +`require-directory` takes a function as the `visit` option that will be called for each module that is added to module.exports. + +```javascript +var requireDirectory = require('require-directory'), + visitor = function(obj) { + console.log(obj); // will be called for every module that is loaded + }, + hash = requireDirectory(module, {visit: visitor}); +``` + +The visitor can also transform the objects by returning a value: + +```javascript +var requireDirectory = require('require-directory'), + visitor = function(obj) { + return obj(new Date()); + }, + hash = requireDirectory(module, {visit: visitor}); +``` + +### Renaming Keys + +```javascript +var requireDirectory = require('require-directory'), + renamer = function(name) { + return name.toUpperCase(); + }, + hash = requireDirectory(module, {rename: renamer}); +``` + +### No Recursion + +```javascript +var requireDirectory = require('require-directory'), + hash = requireDirectory(module, {recurse: false}); +``` + +## Run Unit Tests + +```bash +$ npm run lint +$ npm test +``` + +## License + +[MIT License](http://www.opensource.org/licenses/mit-license.php) + +## Author + +[Troy Goode](https://github.com/TroyGoode) ([troygoode@gmail.com](mailto:troygoode@gmail.com)) + diff --git a/node_modules/require-directory/index.js b/node_modules/require-directory/index.js new file mode 100644 index 00000000..cd37da7e --- /dev/null +++ b/node_modules/require-directory/index.js @@ -0,0 +1,86 @@ +'use strict'; + +var fs = require('fs'), + join = require('path').join, + resolve = require('path').resolve, + dirname = require('path').dirname, + defaultOptions = { + extensions: ['js', 'json', 'coffee'], + recurse: true, + rename: function (name) { + return name; + }, + visit: function (obj) { + return obj; + } + }; + +function checkFileInclusion(path, filename, options) { + return ( + // verify file has valid extension + (new RegExp('\\.(' + options.extensions.join('|') + ')$', 'i').test(filename)) && + + // if options.include is a RegExp, evaluate it and make sure the path passes + !(options.include && options.include instanceof RegExp && !options.include.test(path)) && + + // if options.include is a function, evaluate it and make sure the path passes + !(options.include && typeof options.include === 'function' && !options.include(path, filename)) && + + // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass + !(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path)) && + + // if options.exclude is a function, evaluate it and make sure the path doesn't pass + !(options.exclude && typeof options.exclude === 'function' && options.exclude(path, filename)) + ); +} + +function requireDirectory(m, path, options) { + var retval = {}; + + // path is optional + if (path && !options && typeof path !== 'string') { + options = path; + path = null; + } + + // default options + options = options || {}; + for (var prop in defaultOptions) { + if (typeof options[prop] === 'undefined') { + options[prop] = defaultOptions[prop]; + } + } + + // if no path was passed in, assume the equivelant of __dirname from caller + // otherwise, resolve path relative to the equivalent of __dirname + path = !path ? dirname(m.filename) : resolve(dirname(m.filename), path); + + // get the path of each file in specified directory, append to current tree node, recurse + fs.readdirSync(path).forEach(function (filename) { + var joined = join(path, filename), + files, + key, + obj; + + if (fs.statSync(joined).isDirectory() && options.recurse) { + // this node is a directory; recurse + files = requireDirectory(m, joined, options); + // exclude empty directories + if (Object.keys(files).length) { + retval[options.rename(filename, joined, filename)] = files; + } + } else { + if (joined !== m.filename && checkFileInclusion(joined, filename, options)) { + // hash node key shouldn't include file extension + key = filename.substring(0, filename.lastIndexOf('.')); + obj = m.require(joined); + retval[options.rename(key, joined, filename)] = options.visit(obj, joined, filename) || obj; + } + } + }); + + return retval; +} + +module.exports = requireDirectory; +module.exports.defaults = defaultOptions; diff --git a/node_modules/require-directory/package.json b/node_modules/require-directory/package.json new file mode 100644 index 00000000..25ece4b3 --- /dev/null +++ b/node_modules/require-directory/package.json @@ -0,0 +1,40 @@ +{ + "author": "Troy Goode (http://github.com/troygoode/)", + "name": "require-directory", + "version": "2.1.1", + "description": "Recursively iterates over specified directory, require()'ing each file, and returning a nested hash structure containing those modules.", + "keywords": [ + "require", + "directory", + "library", + "recursive" + ], + "homepage": "https://github.com/troygoode/node-require-directory/", + "main": "index.js", + "repository": { + "type": "git", + "url": "git://github.com/troygoode/node-require-directory.git" + }, + "contributors": [ + { + "name": "Troy Goode", + "email": "troygoode@gmail.com", + "web": "http://github.com/troygoode/" + } + ], + "license": "MIT", + "bugs": { + "url": "http://github.com/troygoode/node-require-directory/issues/" + }, + "engines": { + "node": ">=0.10.0" + }, + "devDependencies": { + "jshint": "^2.6.0", + "mocha": "^2.1.0" + }, + "scripts": { + "test": "mocha", + "lint": "jshint index.js test/test.js" + } +} diff --git a/node_modules/require-main-filename/CHANGELOG.md b/node_modules/require-main-filename/CHANGELOG.md new file mode 100644 index 00000000..717d59e3 --- /dev/null +++ b/node_modules/require-main-filename/CHANGELOG.md @@ -0,0 +1,26 @@ +# Change Log + +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. + + +# [2.0.0](https://github.com/yargs/require-main-filename/compare/v1.0.2...v2.0.0) (2019-01-28) + + +### Chores + +* drop support for Node 0.10 ([#11](https://github.com/yargs/require-main-filename/issues/11)) ([87f4e13](https://github.com/yargs/require-main-filename/commit/87f4e13)) + + +### BREAKING CHANGES + +* drop support for Node 0.10/0.12 + + + + +## [1.0.2](https://github.com/yargs/require-main-filename/compare/v1.0.1...v1.0.2) (2017-06-16) + + +### Bug Fixes + +* add files to package.json ([#4](https://github.com/yargs/require-main-filename/issues/4)) ([fa29988](https://github.com/yargs/require-main-filename/commit/fa29988)) diff --git a/node_modules/require-main-filename/LICENSE.txt b/node_modules/require-main-filename/LICENSE.txt new file mode 100644 index 00000000..836440be --- /dev/null +++ b/node_modules/require-main-filename/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/require-main-filename/README.md b/node_modules/require-main-filename/README.md new file mode 100644 index 00000000..820d9f58 --- /dev/null +++ b/node_modules/require-main-filename/README.md @@ -0,0 +1,26 @@ +# require-main-filename + +[![Build Status](https://travis-ci.org/yargs/require-main-filename.png)](https://travis-ci.org/yargs/require-main-filename) +[![Coverage Status](https://coveralls.io/repos/yargs/require-main-filename/badge.svg?branch=master)](https://coveralls.io/r/yargs/require-main-filename?branch=master) +[![NPM version](https://img.shields.io/npm/v/require-main-filename.svg)](https://www.npmjs.com/package/require-main-filename) + +`require.main.filename` is great for figuring out the entry +point for the current application. This can be combined with a module like +[pkg-conf](https://www.npmjs.com/package/pkg-conf) to, _as if by magic_, load +top-level configuration. + +Unfortunately, `require.main.filename` sometimes fails when an application is +executed with an alternative process manager, e.g., [iisnode](https://github.com/tjanczuk/iisnode). + +`require-main-filename` is a shim that addresses this problem. + +## Usage + +```js +var main = require('require-main-filename')() +// use main as an alternative to require.main.filename. +``` + +## License + +ISC diff --git a/node_modules/require-main-filename/index.js b/node_modules/require-main-filename/index.js new file mode 100644 index 00000000..dca7f0cc --- /dev/null +++ b/node_modules/require-main-filename/index.js @@ -0,0 +1,18 @@ +module.exports = function (_require) { + _require = _require || require + var main = _require.main + if (main && isIISNode(main)) return handleIISNode(main) + else return main ? main.filename : process.cwd() +} + +function isIISNode (main) { + return /\\iisnode\\/.test(main.filename) +} + +function handleIISNode (main) { + if (!main.children.length) { + return main.filename + } else { + return main.children[0].filename + } +} diff --git a/node_modules/require-main-filename/package.json b/node_modules/require-main-filename/package.json new file mode 100644 index 00000000..a549822d --- /dev/null +++ b/node_modules/require-main-filename/package.json @@ -0,0 +1,35 @@ +{ + "name": "require-main-filename", + "version": "2.0.0", + "description": "shim for require.main.filename() that works in as many environments as possible", + "main": "index.js", + "scripts": { + "pretest": "standard", + "test": "tap --coverage test.js", + "release": "standard-version" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/yargs/require-main-filename.git" + }, + "keywords": [ + "require", + "shim", + "iisnode" + ], + "files": [ + "index.js" + ], + "author": "Ben Coe ", + "license": "ISC", + "bugs": { + "url": "https://github.com/yargs/require-main-filename/issues" + }, + "homepage": "https://github.com/yargs/require-main-filename#readme", + "devDependencies": { + "chai": "^4.0.0", + "standard": "^10.0.3", + "standard-version": "^4.0.0", + "tap": "^11.0.0" + } +} diff --git a/node_modules/retry-as-promised/LICENSE b/node_modules/retry-as-promised/LICENSE new file mode 100644 index 00000000..d007bfb7 --- /dev/null +++ b/node_modules/retry-as-promised/LICENSE @@ -0,0 +1,23 @@ +The MIT License + +Copyright (c) 2015-2016 Mick Hansen. http://mhansen.io + +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/retry-as-promised/README.md b/node_modules/retry-as-promised/README.md new file mode 100644 index 00000000..60185258 --- /dev/null +++ b/node_modules/retry-as-promised/README.md @@ -0,0 +1,40 @@ +# retry-as-promised + +Retry promises when they fail, based upon [any-promise](https://github.com/kevinbeaty/any-promise). + +## Installation + +```sh +$ npm install --save retry-as-promised +$ yarn add retry-as-promised +``` + +## Configuration + +```js +var retry = require('retry-as-promised'); + +var warningFn = function(msg){ someLoggingFunction(msg, 'notice'); }; + +// Will call the until max retries or the promise is resolved. +return retry(function (options) { + // options.current, times callback has been called including this call + return promise; +}, { + max: 3, // maximum amount of tries + timeout: 10000 // throw if no response or error within millisecond timeout, default: undefined, + match: [ // Must match error signature (ala bluebird catch) to continue + Sequelize.ConnectionError, + 'SQLITE_BUSY' + ], + backoffBase: 1000 // Initial backoff duration in ms. Default: 100, + backoffExponent: 1.5 // Exponent to increase backoff each try. Default: 1.1 + report: warningFn, // the function used for reporting; must have a (string, object) argument signature, where string is the message that will passed in by retry-as-promised, and the object will be this configuration object + the $current property + name: 'SourceX' // if user supplies string, it will be used when composing error/reporting messages; else if retry gets a callback, uses callback name in erroring/reporting; else (default) uses literal string 'unknown' +}); +``` + +## Tested with + +- Bluebird +- Q diff --git a/node_modules/retry-as-promised/index.js b/node_modules/retry-as-promised/index.js new file mode 100644 index 00000000..b9dfd22d --- /dev/null +++ b/node_modules/retry-as-promised/index.js @@ -0,0 +1,117 @@ +'use strict'; + +var Promise = require('any-promise'); +var util = require('util'); +var format = util.format; + +function TimeoutError(message, err) { + Error.call(this); + Error.captureStackTrace(this, TimeoutError); + this.name = 'TimeoutError'; + this.message = message; + this.previous = err; +} + +util.inherits(TimeoutError, Error); + +function matches(match, err) { + if (match === true) return true; + if (typeof match === 'function') { + try { + if (err instanceof match) return true; + } catch (_) { + return !!match(err); + } + } + if (match === err.toString()) return true; + if (match === err.message) return true; + return match instanceof RegExp + && (match.test(err.message) || match.test(err.toString())); +} + +module.exports = function retryAsPromised(callback, options) { + if (!callback || !options) { + throw new Error( + 'retry-as-promised must be passed a callback and a options set or a number' + ); + } + + if (typeof options === 'number') { + options = { + max: options + }; + } + + // Super cheap clone + options = { + $current: options.$current || 1, + max: options.max, + timeout: options.timeout || undefined, + match: options.match || [], + backoffBase: options.backoffBase === undefined ? 100 : options.backoffBase, + backoffExponent: options.backoffExponent || 1.1, + report: options.report || function () {}, + name: options.name || callback.name || 'unknown' + }; + + if (!Array.isArray(options.match)) options.match = [options.match]; + options.report('Trying ' + options.name + ' #' + options.$current + ' at ' + new Date().toLocaleTimeString(), options); + + return new Promise(function(resolve, reject) { + var timeout, backoffTimeout, lastError; + + if (options.timeout) { + timeout = setTimeout(function() { + if (backoffTimeout) clearTimeout(backoffTimeout); + reject(new TimeoutError(options.name + ' timed out', lastError)); + }, options.timeout); + } + + Promise.resolve(callback({ current: options.$current })) + .then(resolve) + .then(function() { + if (timeout) clearTimeout(timeout); + if (backoffTimeout) clearTimeout(backoffTimeout); + }) + .catch(function(err) { + if (timeout) clearTimeout(timeout); + if (backoffTimeout) clearTimeout(backoffTimeout); + + lastError = err; + options.report((err && err.toString()) || err, options); + + // Should not retry if max has been reached + var shouldRetry = options.$current < options.max; + if (!shouldRetry) return reject(err); + shouldRetry = options.match.length === 0 || options.match.some(function (match) { + return matches(match, err) + }); + if (!shouldRetry) return reject(err); + + var retryDelay = Math.pow( + options.backoffBase, + Math.pow(options.backoffExponent, options.$current - 1) + ); + + // Do some accounting + options.$current++; + options.report(format('Retrying %s (%s)', options.name, options.$current), options); + + if (retryDelay) { + // Use backoff function to ease retry rate + options.report(format('Delaying retry of %s by %s', options.name, retryDelay), options); + backoffTimeout = setTimeout(function() { + retryAsPromised(callback, options) + .then(resolve) + .catch(reject); + }, retryDelay); + } else { + retryAsPromised(callback, options) + .then(resolve) + .catch(reject); + } + }); + }); +}; + +module.exports.TimeoutError = TimeoutError; diff --git a/node_modules/retry-as-promised/package.json b/node_modules/retry-as-promised/package.json new file mode 100644 index 00000000..14ea6f6d --- /dev/null +++ b/node_modules/retry-as-promised/package.json @@ -0,0 +1,40 @@ +{ + "name": "retry-as-promised", + "version": "3.2.0", + "description": "Retry a failed promise", + "main": "index.js", + "scripts": { + "test": "PROMISE_TYPE=bluebird npm run test-raw && PROMISE_TYPE=q npm run test-raw", + "test-raw": "cross-env DEBUG=retry-as-promised* ./node_modules/.bin/mocha --check-leaks --colors -t 10000 --reporter spec test/promise.test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/mickhansen/retry-as-promised.git" + }, + "keywords": [ + "retry", + "promise", + "bluebird" + ], + "author": "Mick Hansen ", + "license": "MIT", + "bugs": { + "url": "https://github.com/mickhansen/retry-as-promised/issues" + }, + "homepage": "https://github.com/mickhansen/retry-as-promised", + "dependencies": { + "any-promise": "^1.3.0" + }, + "files": [], + "devDependencies": { + "bluebird": "^3.5.1", + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", + "cross-env": "^5.2.0", + "mocha": "^5.2.0", + "moment": "^2.10.6", + "q": "^1.5.1", + "sinon": "^7.0.0", + "sinon-chai": "^3.2.0" + } +} diff --git a/node_modules/sequelize-cli/.babelrc b/node_modules/sequelize-cli/.babelrc new file mode 100644 index 00000000..3aebe668 --- /dev/null +++ b/node_modules/sequelize-cli/.babelrc @@ -0,0 +1,24 @@ +{ + "presets": [ + ["env", { + "targets": { + "node": "6.0" + }, + "exclude": [ + "transform-async-to-generator", + "transform-regenerator" + ], + "useBuiltIns": true + }] + ], + "plugins": [ + "transform-object-rest-spread", + ["transform-async-to-module-method", { + "module": "bluebird", + "method": "coroutine" + }] + ], + "ignore": [ + "src/assets" + ] +} diff --git a/node_modules/sequelize-cli/.editorconfig b/node_modules/sequelize-cli/.editorconfig new file mode 100644 index 00000000..d2cc0850 --- /dev/null +++ b/node_modules/sequelize-cli/.editorconfig @@ -0,0 +1,21 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] + +# Change these settings to your own preference +indent_style = space +indent_size = 2 + +# We recommend you to keep these unchanged +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false +indent_size = 4 diff --git a/node_modules/sequelize-cli/.eslintrc.json b/node_modules/sequelize-cli/.eslintrc.json new file mode 100644 index 00000000..6a1e0321 --- /dev/null +++ b/node_modules/sequelize-cli/.eslintrc.json @@ -0,0 +1,49 @@ +{ + "rules": { + "no-console": "off", + "no-extra-parens": "warn", + "valid-jsdoc": "off", + "new-cap": ["warn", {"properties": false}], + "comma-spacing": ["error", {"before": false, "after": true}], + "no-extra-boolean-cast": "warn", + "strict": ["warn", "global"], + "no-var": "error", + "prefer-const": "error", + "semi": ["error", "always"], + "space-before-function-paren": ["warn", "always"], + "keyword-spacing": ["warn"], + "prefer-arrow-callback": "error", + "arrow-parens": ["error", "as-needed"], + "comma-style": ["warn", "last"], + "no-bitwise": "off", + "no-cond-assign": ["error", "except-parens"], + "curly": "off", + "eqeqeq": "error", + "no-extend-native": "error", + "wrap-iife": ["error", "any"], + "indent": ["error", 2, {"SwitchCase": 1}], + "no-use-before-define": "off", + "no-caller": "error", + "no-undef": "error", + "no-unused-vars": "error", + "no-irregular-whitespace": "error", + "max-depth": ["error", 8], + "quotes": ["error", "single", {"avoidEscape": true}], + "linebreak-style": "error", + "no-loop-func": "warn", + "object-shorthand": "error", + "one-var-declaration-per-line": "warn", + "comma-dangle": "warn", + "no-shadow": "warn", + "camelcase": "warn" + }, + "parserOptions": { + "ecmaVersion": 2017, + "sourceType": "module" + }, + "env": { + "node": true, + "mocha": true, + "es6": true + } +} diff --git a/node_modules/sequelize-cli/.github/ISSUE_TEMPLATE.md b/node_modules/sequelize-cli/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..0ca43b78 --- /dev/null +++ b/node_modules/sequelize-cli/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,29 @@ + + +## What you are doing? + + +```js +// code here +``` + +## What do you expect to happen? +_I wanted Foo!_ + +## What is actually happening? +_But the output was bar!_ + +_Output, either JSON or SQL_ + + +__Dialect:__ mysql / postgres / sqlite / mssql / any +__Database version:__ XXX +__Sequelize CLI version:__ XXX +__Sequelize version:__ XXX diff --git a/node_modules/sequelize-cli/.travis.yml b/node_modules/sequelize-cli/.travis.yml new file mode 100644 index 00000000..1fc7db7a --- /dev/null +++ b/node_modules/sequelize-cli/.travis.yml @@ -0,0 +1,33 @@ +sudo: true +dist: trusty + +language: node_js + +cache: yarn + +jobs: + include: + - stage: test + node_js: 6 + env: DIALECT=postgres SEQUELIZE=latest SEQ_PORT=54320 + - stage: test + node_js: 6 + env: DIALECT=mysql SEQUELIZE=latest SEQ_PORT=33060 + - stage: test + node_js: 6 + env: DIALECT=sqlite SEQUELIZE=latest + +install: + - npm install -g yarn + - yarn + - yarn add sequelize@$(echo $SEQUELIZE) + - yarn build + +before_script: + - |- + if [ "$DIALECT" = "postgres" ] || [ "$DIALECT" = "mysql" ]; then docker-compose up -d ${DIALECT}; fi + - |- + if [ "$DIALECT" = "postgres" ] || [ "$DIALECT" = "mysql" ]; then docker run --link ${DIALECT}:db -e CHECK_PORT=${SEQ_PORT::-1} -e CHECK_HOST=db --net cli_default giorgos/takis; fi + +script: + - yarn test diff --git a/node_modules/sequelize-cli/CHANGELOG.md b/node_modules/sequelize-cli/CHANGELOG.md new file mode 100644 index 00000000..10a6203d --- /dev/null +++ b/node_modules/sequelize-cli/CHANGELOG.md @@ -0,0 +1,430 @@ +# Change Log +All notable changes to this project will be documented in this file. + +## Future + +## v5.5.0 - 11th, June 2019 + +### Fixed +- fix: special characters in password are not escaped [#722](https://github.com/sequelize/cli/pull/722) +- change: default config for operator aliases [#743](https://github.com/sequelize/cli/pull/743) + +## v5.4.0 - 1st, Dec 2018 + +### Fixed +- fix: show commands with --help [#719](https://github.com/sequelize/cli/pull/719) + +## v5.3.0 - 4th, Nov 2018 + +### Fixed +- fix(db:create): syntax errors with mssql create statement [#711](https://github.com/sequelize/cli/pull/711) +- style: grammar mistake in seeder skeleton [#705](https://github.com/sequelize/cli/pull/705) + +### Feature +- feat(mode:generate) add enum support [#704](https://github.com/sequelize/cli/pull/704) + +## v5.2.0 - 20th, Oct 2018 + +### Feature +- feat(db:create): support options on db:create with sequelize@4 [#700](https://github.com/sequelize/cli/pull/700) + +## v5.1.0 - 14th, Oct 2018 + +### Feature +- feat(postgres): migrationStorageTableSchema [#635](https://github.com/sequelize/cli/pull/635) + +## v5.0.0 - 13th, Oct 2018 + +### Fixed +- fix(init): relative config path for windows [#648](https://github.com/sequelize/cli/pull/648) +- fix(mode:generate): use force arg correctly [#691](https://github.com/sequelize/cli/pull/691) +- updated dependencies + +### Breaking +- Node 6 or up is supported + +## v4.1.0 - 19th, Aug 2018 + +### Fixed +- fix(model:generate) attribute datatype validation [#682](https://github.com/sequelize/cli/issues/682) +- fix: add force flag to model:create [#680](https://github.com/sequelize/cli/issues/680) + +### Changed +- Use const in generated files + + +## v4.0.0 - 15th, Feb 2018 + +### Changed +- Removed warning about v4 +- Support for v4 [#620](https://github.com/sequelize/cli/pull/620) [#441](https://github.com/sequelize/cli/issues/441) + + +## v3.2.0 - 3rd, Dec 2017 + +### Fixed +- Better messages when files/folders already exists [#569](https://github.com/sequelize/cli/issues/569) +- Specify ARRAY type with `model:create` [#155](https://github.com/sequelize/cli/issues/155) + +### Changed +- Revert: safer configuration using environment variables for production [#594](https://github.com/sequelize/cli/pull/594) + + +## v3.1.0 - 18th, Nov 2017 + +### Fixed +- Pass full config to sequelize constructor [#584](https://github.com/sequelize/cli/issues/584) + +### Added +- `db:migrate` support for from / to arguments [#581](https://github.com/sequelize/cli/pull/581) + +### Changed +- Safer configuration using environment variables for production [#579](https://github.com/sequelize/cli/pull/579) + +- Updated dependencies + +## v3.0.0 - 23rd, Sep 2017 + +### Fixed + - `db:create/drop` should properly quote database name [#545](https://github.com/sequelize/cli/issues/545) + +### Added + - `--debug` support, print full stack for errors, when available [#552](https://github.com/sequelize/cli/pull/552) + +### Changed + - All errors are now properly formatted and outputted to `console.error` [#552](https://github.com/sequelize/cli/pull/552) + +### Internal + - Refactor to use centralized `log/error/warn` methods [#552](https://github.com/sequelize/cli/pull/552) + +## v3.0.0-3 - 16th, Sep 2017 + +### Fixed +- Error when creating nested config path [#534](https://github.com/sequelize/cli/issues/534) + +### Added +- `db:create` and `db:drop` for MySQL, Postgres and MSSQL [#70](https://github.com/sequelize/cli/issues/70) + +## v3.0.0-2 - 10th, Sep 2017 + +### Fixed +- `.sequelizerc` is not properly read [#536](https://github.com/sequelize/cli/issues/536) + +## v3.0.0-1 - 9th, Sep 2017 + +### Added +- Warning with Sequelize v4 + +### Changed +- Skeletons are now ES6 based [#482](https://github.com/sequelize/cli/issues/482) + +## v3.0.0-0 - 8th, Sep 2017 + +### Removed +- `db:migrate:old_schema` +- `--coffee` support +- `help:*` commands + +### Fixed +- Drop Gulp [#344](https://github.com/sequelize/cli/issues/344) +- NSP Vulnerability [#466](https://github.com/sequelize/cli/issues/466) +- Non functional with Node 7 [#383](https://github.com/sequelize/cli/issues/383) +- Unable to find Gulp [#138](https://github.com/sequelize/cli/issues/138) +- Reintegrate Gulp [#5](https://github.com/sequelize/cli/issues/5) +- Unable to seed multiple files [#523](https://github.com/sequelize/cli/issues/523) +- No Gulpfile found [#480](https://github.com/sequelize/cli/issues/480) +- Exit Code(1) when migration undo fail [#394](https://github.com/sequelize/cli/issues/394) +- `--coffee` flag dont work with `.rc` file [#244](https://github.com/sequelize/cli/issues/244) +- CLI dont halt on error [#106](https://github.com/sequelize/cli/issues/106) + +### Improvements +- No Gulp, better startup time +- Proper exit codes +- Remove dependency on `moment` , `findup-sync`, `gulp` and `gulp-help` + +## v2.8.0 - 2017-08-04 +### Added +- Timestamps db:migrate:schema:timestamps:add [#460](https://github.com/sequelize/cli/pull/460) +- Support for db:migrate:undo:all with `--to`, which allow reverting to a specific version [#459](https://github.com/sequelize/cli/pull/459) + +### Changed +- Updated dependencies + +### Docs +- FAQ section [#486](https://github.com/sequelize/cli/pull/486) + +## v2.7.0 - 2017-03-25 +### Added +- Named db:migrate:undo [#387](https://github.com/sequelize/cli/pull/387) + +### Changed +- Fixed promise warning in gulp-helper [#439](https://github.com/sequelize/cli/issues/439) + +## v2.6.0 - 2017-03-17 +### Added +- Async configuration support [#359](https://github.com/sequelize/cli/pull/359) + +### Changed +- Print error stack when reporting seeder errors [#411](https://github.com/sequelize/cli/pull/411) +- Fixed seed:undo:all with `none` storage [#433](https://github.com/sequelize/cli/pull/433) +- Updated dependencies + +## v2.5.0 - 2016-12-07 +### Added +- Add underscored option to generated model when created with --underscored [#380](https://github.com/sequelize/cli/issues/380) +- Add db:migrate:status [#385](https://github.com/sequelize/cli/issues/385) + +### Changed +- Make it possible to use ":" in passwords in a DSN [#334](https://github.com/sequelize/cli/issues/334) +- Catch error for db:migrate:undo[:all] [#353](https://github.com/sequelize/cli/issues/353) +- Example usage of raw sql in migration [#363](https://github.com/sequelize/cli/issues/363) +- Fixed typo: containts -> contains [#381](https://github.com/sequelize/cli/issues/381) +- Updated dependencies + +## v2.4.0 - 2016-04-25 +### Added +- Log filtering helper + +### Changed +- Fixed some promises that were not being returned +- Updated dependencies +- Migration and seed filenames now use UTC date instead of local date +- Output filtering + +## v2.3.1 - 2016-01-14 +### Changed +- Update lodash to 4.0.0 + +## v2.3.0 - 2016-01-11 +### Changed +- Default use of `seeder` memorizes nothing +- Update umzug to 1.8.0 + +## v2.2.1 - 2015-11-24 +### Fixed +- Filtering of js files in models/index.js + +## v2.2.0 - 2015-11-23 +### Changed +- Respect `url` property in configuration + +## v2.1.1 - 2015-11-19 +### Changed +- Respect `dialectOptions` property when instantiating sequelize + +## v2.1.0 - 2015-11-01 +### Added +- Option for usage of snake case timestamp columns in migrations (e.g. `sequelize model:create --underscored`) + +## v2.0.0 - 2015-10-14 +### Added +- Read configuration from config.js if available + +### Changed +- Replace deprecated fs.existsSync method + +## v1.9.2 - 2015-10-14 +### Changed +- Make options path process relative + +## v1.9.1 - 2015-09-08 +### Changed +- Move gulp path resolution to function +- Fix handling of duplicate CLI options +- Add options object to seed template + +## v1.9.0 - 2015-09-01 +### Added +- Seeding mechanism + +## v1.8.3 - 2015-08-28 +### Changed +- Cascade package resolution + +### Removed +- Duplicate reference to gulp + +## v1.8.2 - 2015-08-27 +### Changed +- Use node's native module resolution mechanism + +## v1.8.1 - 2015-08-27 +### Changed +- Filter password from parsed URL + +## v1.8.0 - 2015-08-27 +### Added +- Support for env variable usage in model/index.js + +## v1.7.4 - 2015-07-28 +### Changed +- Return exit code 1 when migrations failed + +## v1.7.3 - 2015-07-26 +### Changed +- Fix check of associate method + +## v1.7.2 - 2015-07-16 +### Added +- Sequelize v3 to build matrix + +### Changed +- Compatibility with Sequelize v3 + +## v1.7.1 - 2015-07-09 +### Added +- Documentation about env variable +- Test for use*env*variable + +### Changed +- Fix env variable use for sqlite +- Update available tasks + +## v1.7.0 - 2015-04-19 +### Added +- More gulp tasks + +### Changed +- Generate new migration style +- Adopt new JSHint/JSCS rules +- Update JSHint and JSCS rules + +## v1.6.0 - 2015-04-02 +### Added +- Possibility to use a different table name for the meta data + +## v1.5.0 - 2015-03-24 +### Added +- `sequelize db:migrate:undo:all` that rolls back all migrations. + +## v1.4.0 - 2015-03-13 +### Added +- Possibility to log executed migrations to a JSON file + +## v1.3.2 - 2015-03-13 +### Changed +- Fix gulp resolution for Windows + +## 1.3.1 +### Changed +- Update umzug to 1.6.0 + +## 1.3.0 +### Changed +- Add builds for different sequelize versions +- Fix raw queries in sequelize 2.0 + +## 1.2.0 +### Changed +- Add logging of statements and improve messages + +## 1.1.0 +### Changed +- Update dependencies + +## 1.0.8 +### Changed +- Fix usage of js2coffee 2.0 + +## 1.0.7 +### Changed +- Fix regexp application for non migration files. + +## 1.0.6 +### Changed +- Add support for more fine-granular harmony flags + +## 1.0.5 +### Changed +- Added support for auto-migrate from old schema [#82](https://github.com/sequelize/cli/issues/82) + +## 1.0.4 +### Changed +- Fix output filtering +- Fix EventEmitter deprecation warnings. + +## 1.0.3 +### Changed +- Use the url module to parse database URLs + +## 1.0.1 +### Changed +- Fix global installation of the CLI + +## 1.0.0 +### Changed +- Big migration refactoring which uses a new schema table and the umzug lib. + +## 0.3.3 +### Changed +- Fix for default attributes in generated migrations. +- Auto-generate coffee files with js2coffee. + +## 0.3.2 +### Changed +- Add default attributes to generated migrations. + +## 0.3.1 +### Changed +- Fix alignment of comment in generated model file +- Fix global installation + +## 0.3.0 +### Changed +- Add Node.JS version to the teaser +- Add dialect and the respective version to the teaser + +## 0.2.6 +### Changed +- Do not load lodash in `models/index.js`. + +## 0.2.5 +### Changed +- Prefer `--env` over the environment variable `NODE_ENV`. +- Search by default for a file called `.sequelizerc` and treat it as `--options-path`. + +## 0.2.4 +### Changed +- Fix unqualified sequelize instantiation which enforced the mysql module. + +## 0.2.3 +### Changed +- Fix `--migrations-path` for relative paths. + +## 0.2.2 +### Changed +- Fix for MS Windows. + +## 0.2.1 +### Changed +- Fix `_.includes`. + +## 0.2.0 +### Changed +- `sequelize model:create` creates a model and its respective migration file. + +## 0.1.1 +### Changed +- Fix illegal character. + +## 0.1.0 +### Changed +- `sequelize init` now creates a `models` folder and a `models/index.js` file. [#11](https://github.com/sequelize/cli/pull/11) + +## 0.0.4 +### Changed +- Fix --config flag. [#4](https://github.com/sequelize/cli/pull/4) +- Fix custom logging option. [#3](https://github.com/sequelize/cli/pull/3) + +## 0.0.3 +### Changed +- Fix conflict within projects that are already shipping gulp. [#2](https://github.com/sequelize/cli/pull/2) +- Add harmony support. [#6](https://github.com/sequelize/cli/pull/6) + +## 0.0.2 +### Changed +- Added the binary to the package.json + +## 0.0.1 +### Changed +- First working version diff --git a/node_modules/sequelize-cli/CONTRIBUTING.md b/node_modules/sequelize-cli/CONTRIBUTING.md new file mode 100644 index 00000000..1f1307ad --- /dev/null +++ b/node_modules/sequelize-cli/CONTRIBUTING.md @@ -0,0 +1,64 @@ +# Contributing + +Sequelize CLI is entirely driven by community contributions. Any little contribution with code or documentation work helps us keeping this project running. + +You can help us in various ways + +## Reporting Bugs + +### Security Issues + +Although CLI is never supposed to be web facing, we still want to fix any security issues. Please contact project maintainers **privately**. You can find more information [here](https://github.com/sequelize/sequelize/blob/master/CONTACT.md). + +### General Issues or Feature Requests + +Github issues should follow specified template. When you start creating a new issue, an empty template will be already filled. + +Please make sure issue you are reporting is strictly related to Sequelize CLI. + +If you want to propose new features to Sequelize CLI, you may ignore issue template. You still need to clearly state new feature. Feature request should give various examples, API suggestions and references to support idea behind it. + +## Fixing Bugs or Implementing Features + +### Preparing your environment + +Start with cloning Sequelize CLI repo + +```bash +$ git clone git@github.com:sequelize/cli.git + +$ git clone https://github.com/sequelize/cli.git # Using HTTPS +``` + +Make sure you have all required dependencies, you will need + +- Node v4 or above +- NPM v3 or above + +Now go to cloned repository folder + +```bash +$ cd /path/to/cloned/repository +``` + +Install required modules + +```bash +$ npm install +``` + +### Running tests + +By default CLI use SQLite, which requires no database configuration. We use Babel to build CLI. Running default test command will automatically build it for you. + +```bash +$ npm test +``` + +Test can take about 7 to 10 minutes to finish, subjected to hardware configuration. + +## Improving Documentation + +If you want to improve or expand our documentation you can start with documentation in `/docs` folder of this repository. + +You can also help by improving [Migration section](http://docs.sequelizejs.com/manual/tutorial/migrations.html). Please read more about contributing to Sequelize Docs [here](https://github.com/sequelize/sequelize/blob/master/CONTRIBUTING.DOCS.md) diff --git a/node_modules/sequelize-cli/LICENSE b/node_modules/sequelize-cli/LICENSE new file mode 100644 index 00000000..0afb6c5e --- /dev/null +++ b/node_modules/sequelize-cli/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 sequelize + +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/sequelize-cli/README.md b/node_modules/sequelize-cli/README.md new file mode 100644 index 00000000..8ec82153 --- /dev/null +++ b/node_modules/sequelize-cli/README.md @@ -0,0 +1,78 @@ +# sequelize/cli [![npm version](https://badge.fury.io/js/sequelize-cli.svg)](https://badge.fury.io/js/sequelize-cli) [![Build Status](https://travis-ci.org/sequelize/cli.svg?branch=master)](https://travis-ci.org/sequelize/cli) [![Greenkeeper badge](https://badges.greenkeeper.io/sequelize/cli.svg)](https://greenkeeper.io/) + +The Sequelize Command Line Interface (CLI) + +## Table of Contents +- [Installation](#installation) +- [Contributing](#contributing) +- [Documentation](#documentation) + +## Installation + +### Globally +Install CLI globally with + +```bash +$ npm install -g sequelize-cli +``` + +Now you can run CLI using following command anywhere + +```bash +$ sequelize +``` + +### Locally +Install CLI locally to your `node_modules` folder with + +```bash +$ npm install --save sequelize-cli +``` + +You should be able to run CLI with + +```bash +$ node_modules/.bin/sequelize +``` + +### Usage +``` +Sequelize CLI [Node: 6.11.2, CLI: 3.0.0, ORM: 4.8.0] + +Commands: + db:migrate Run pending migrations + db:migrate:schema:timestamps:add Update migration table to have timestamps + db:migrate:status List the status of all migrations + db:migrate:undo Reverts a migration + db:migrate:undo:all Revert all migrations ran + db:seed Run specified seeder + db:seed:undo Deletes data from the database + db:seed:all Run every seeder + db:seed:undo:all Deletes data from the database + db:create Create database specified by configuration + db:drop Drop database specified by configuration + init Initializes project + init:config Initializes configuration + init:migrations Initializes migrations + init:models Initializes models + init:seeders Initializes seeders + migration:generate Generates a new migration file [aliases: migration:create] + model:generate Generates a model and its migration [aliases: model:create] + seed:generate Generates a new seed file [aliases: seed:create] + +Options: + --version Show version number [boolean] + --help Show help [boolean] +``` + +## Contributing + +Sequelize CLI is always looking for contributions. You can help us with fixing bugs, reporting bugs or improving documentation. + +Please read [contributing documentation](CONTRIBUTING.md) + +## Documentation + +- [Migrations Documentation](http://docs.sequelizejs.com/manual/tutorial/migrations.html) +- [CLI Options](docs/README.md) +- [Frequently Asked Questions](docs/FAQ.md) diff --git a/node_modules/sequelize-cli/docker-compose.yml b/node_modules/sequelize-cli/docker-compose.yml new file mode 100644 index 00000000..cd5cc282 --- /dev/null +++ b/node_modules/sequelize-cli/docker-compose.yml @@ -0,0 +1,28 @@ +version: '2' + +services: + # PostgreSQL + postgres: + image: sushantdhiman/postgres:10 + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: sequelize_test + ports: + - "54320:5432" + container_name: postgres + command: > + bash -c "sed -i -e 's/# \(zh_TW\|en_US\).UTF-8 UTF-8/\1.UTF-8 UTF-8/' /etc/locale.gen + && locale-gen + && docker-entrypoint.sh postgres" + + # MySQL + mysql: + image: mysql:5.7 + environment: + MYSQL_ALLOW_EMPTY_PASSWORD: "yes" + MYSQL_DATABASE: sequelize_test + MYSQL_USER: root + ports: + - "33060:3306" + container_name: mysql diff --git a/node_modules/sequelize-cli/docs/FAQ.md b/node_modules/sequelize-cli/docs/FAQ.md new file mode 100644 index 00000000..16e03ef0 --- /dev/null +++ b/node_modules/sequelize-cli/docs/FAQ.md @@ -0,0 +1,54 @@ +The Sequelize Command Line Interface (CLI) Frequently Asked Question + +## Initialize sequelize to create necessary files in the project +``` +$ sequelize init +``` + +## How can I generate a model? +Specify model name with `--name` argument. List of table fields can be passed with `--attributes` option +``` +$ sequelize model:create --name User --attributes name:string,state:boolean,birth:date,card:integer,role:enum:'{Admin,Guest}' +``` + +## How can I create a migration? +Specify migration name with `--name` argument +``` +$ sequelize migration:create --name +``` + +## What is the command to execute all migrations? +``` +$ sequelize db:migrate +``` +## How can I make a migrations rollback? +``` +$ sequelize db:migrate:undo:all +``` + +## How can I create a seeder? +Specify seeder name with `--name` argument +``` +$ sequelize seed:create --name +``` + +## How can I run the seeders? +``` +$ sequelize db:seed:all +``` + +## How can I make the seeders rollback? +``` +$ sequelize db:seed:undo:all +``` + +## I am getting an error when attempting to create a model with an enum type. +The brackets `{}` likely need to be quoted in your shell +``` +sequelize model:create --name User --attributes role:enum:'{Admin,Guest}' +``` +or possibly +``` +sequelize model:create --name User --attributes role:enum:\{Admin,Guest\} +``` + diff --git a/node_modules/sequelize-cli/docs/README.md b/node_modules/sequelize-cli/docs/README.md new file mode 100644 index 00000000..aaaeefd2 --- /dev/null +++ b/node_modules/sequelize-cli/docs/README.md @@ -0,0 +1,246 @@ +## Options + +The manuals will show all the flags and options which are available for the respective tasks. +If you find yourself in a situation where you always define certain flags in order to +make the CLI compliant to your project, you can move those definitions also into a file called +`.sequelizerc`. The file will get `require`d if available and can therefore be either a JSON file +or a Node.JS script that exports a hash. You can also use the `--options-path` option to declare a +path to another configuration file. + +### Example for a Node.JS script + +```js +var path = require('path') + +module.exports = { + 'config': path.resolve('config', 'database.json'), + 'migrations-path': path.resolve('db', 'migrate') +} +``` + +This will configure the CLI to always treat `config/database.json` as config file and +`db/migrate` as the directory for migrations. + +### Configuration file + +By default the CLI will try to use the file `config/config.js` and `config/config.json`. You can modify that path either via the `--config` flag or via the option mentioned earlier. Here is how a configuration file might look like (this is the one that `sequelize init` generates): + +```json +{ + "development": { + "username": "root", + "password": null, + "database": "database_development", + "host": "127.0.0.1", + "dialect": "mysql" + }, + "test": { + "username": "root", + "password": null, + "database": "database_test", + "host": "127.0.0.1", + "dialect": "mysql" + }, + "production": { + "username": "root", + "password": null, + "database": "database_production", + "host": "127.0.0.1", + "dialect": "mysql" + } +} +``` + +The properties can also be combined to a `url`: + +```json +{ + "development": { + "url": "mysql://root:password@mysql_host.com/database_name", + "dialect": "mysql" + } +} +``` + +In case of a JS file it obviously needs to `module.exports` the object. +Optionally, it's possible to put all the configuration to the `url` option. The format is explained in the section below. + +### Configuration Connection String + +As an alternative to the `--config` option with configuration files defining your database, you can +use the `--url` option to pass in a connection string. For example: + +`sequelize db:migrate --url 'mysql://root:password@mysql_host.com/database_name'` + +### Configuration Connection Environment Variable + +Another possibility is to store the URL in an environment variable and to tell +the CLI to lookup a certain variable during runtime. Let's assume you have an +environment variable called `DB_CONNECTION_STRING` which stores the value +`mysql://root:password@mysql_host.com/database_name`. In order to make the CLI +use it, you have to use declare it in your config file: + +```json +{ + "production": { + "use_env_variable": "DB_CONNECTION_STRING" + } +} +``` + +With v2.0.0 of the CLI you can also just directly access the environment variables inside the `config/config.js`: + +```js +module.exports = { + "production": { + "hostname": process.env.DB_HOSTNAME + } +} +``` + +### Configuration for connecting over SSL + +Ensure ssl is specified in both `dialectOptions` and in the base config. + +``` +{ + "production": { + "use_env_variable":"DB_CONNECTION_STRING", + "dialect":"postgres", + "ssl": true, + "dialectOptions": { + "ssl": true + } + } +} +``` + +### Storage + +There are three types of storage that you can use: `sequelize`, `json`, and `none`. + +- `sequelize` : stores migrations and seeds in a table on the sequelize database +- `json` : stores migrations and seeds on a json file +- `none` : does not store any migration/seed + + +#### Migration + +By default the CLI will create a table in your database called `SequelizeMeta` containing an entry +for each executed migration. To change this behavior, there are three options you can add to the +configuration file. Using `migrationStorage`, you can choose the type of storage to be used for +migrations. If you choose `json`, you can specify the path of the file using `migrationStoragePath` +or the CLI will write to the file `sequelize-meta.json`. If you want to keep the information in the +database, using `sequelize`, but want to use a different table, you can change the table name using +`migrationStorageTableName`. + +```json +{ + "development": { + "username": "root", + "password": null, + "database": "database_development", + "host": "127.0.0.1", + "dialect": "mysql", + + // Use a different storage type. Default: sequelize + "migrationStorage": "json", + + // Use a different file name. Default: sequelize-meta.json + "migrationStoragePath": "sequelizeMeta.json", + + // Use a different table name. Default: SequelizeMeta + "migrationStorageTableName": "sequelize_meta", + + // Use a different schema (Postgres-only). Default: undefined + "migrationStorageTableSchema": "sequelize_schema" + } +} +``` + +NOTE: The `none` storage is not recommended as a migration storage. If you decide to use it, be +aware of the implications of having no record of what migrations did or didn't run. + + +#### Seed + +By default the CLI will not save any seed that is executed. If you choose to change this behavior (!), +you can use `seederStorage` in the configuration file to change the storage type. If you choose `json`, +you can specify the path of the file using `seederStoragePath` or the CLI will write to the file +`sequelize-data.json`. If you want to keep the information in the database, using `sequelize`, you can +specify the table name using `seederStorageTableName`, or it will default to `SequelizeData`. + +```json +{ + "development": { + "username": "root", + "password": null, + "database": "database_development", + "host": "127.0.0.1", + "dialect": "mysql", + // Use a different storage. Default: none + "seederStorage": "json", + // Use a different file name. Default: sequelize-data.json + "seederStoragePath": "sequelizeData.json", + // Use a different table name. Default: SequelizeData + "seederStorageTableName": "sequelize_data" + } +} +``` + + +### Dialect specific options + +In order to pass options to the underlying database connectors, you can add the property `dialectOptions` +to your configuration like this: + +```js +var fs = require('fs'); + +module.exports = { + development: { + dialect: 'mysql', + dialectOptions: { + ssl: { + ca: fs.readFileSync(__dirname + '/mysql-ca.crt') + } + } + } +}; +``` + +### Schema migration + +Sequelize CLI continue to use schema from `v2` and fully compatible with `v2`. If you are still using old schema from pre `v2`, use `v2` to upgrade to current schema with `db:migrate:old_schema` + +#### Timestamps + +Since v2.8.0 the CLI supports a adding timestamps to the schema for saving the executed migrations. You can opt-in for timestamps by running the following command: + +```bash +$ sequelize db:migrate:schema:timestamps:add +``` + +### The migration schema + +The CLI uses [umzug](https://github.com/sequelize/umzug) and its migration schema. This means a migration has to look like this: + +```js +"use strict"; + +module.exports = { + up: function(queryInterface, Sequelize, done) { + done(); + }, + + down: function(queryInterface) { + return new Promise(function (resolve, reject) { + resolve(); + }); + } +}; +``` + +Please note that you can either return a Promise or call the third argument of the function once your asynchronous logic was executed. If you pass something to the callback function (the `done` function) it will be treated as erroneous execution. + +Additional note: If you need to access the sequelize instance, you can easily do that via `queryInterface.sequelize`. For example `queryInterface.sequelize.query('CREATE TABLE mytable();')`. diff --git a/node_modules/sequelize-cli/lib/assets/migrations/create-table.js b/node_modules/sequelize-cli/lib/assets/migrations/create-table.js new file mode 100644 index 00000000..1fd3e92d --- /dev/null +++ b/node_modules/sequelize-cli/lib/assets/migrations/create-table.js @@ -0,0 +1,35 @@ +'use strict'; + +module.exports = { + up: (queryInterface, Sequelize) => { + return queryInterface + .createTable('<%= tableName %>', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + + <% attributes.forEach(function(attribute) { %> + <%= attribute.fieldName %>: { + type: Sequelize.<%= attribute.dataFunction ? `${attribute.dataFunction.toUpperCase()}(Sequelize.${attribute.dataType.toUpperCase()})` : attribute.dataValues ? `${attribute.dataType.toUpperCase()}(${attribute.dataValues})` : attribute.dataType.toUpperCase() %> + }, + <% }) %> + + <%= createdAt %>: { + allowNull: false, + type: Sequelize.DATE + }, + + <%= updatedAt %>: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + + down: (queryInterface, Sequelize) => { + return queryInterface.dropTable('<%= tableName %>'); + } +}; diff --git a/node_modules/sequelize-cli/lib/assets/migrations/skeleton.js b/node_modules/sequelize-cli/lib/assets/migrations/skeleton.js new file mode 100644 index 00000000..9ef68be8 --- /dev/null +++ b/node_modules/sequelize-cli/lib/assets/migrations/skeleton.js @@ -0,0 +1,23 @@ +'use strict'; + +module.exports = { + up: (queryInterface, Sequelize) => { + /* + Add altering commands here. + Return a promise to correctly handle asynchronicity. + + Example: + return queryInterface.createTable('users', { id: Sequelize.INTEGER }); + */ + }, + + down: (queryInterface, Sequelize) => { + /* + Add reverting commands here. + Return a promise to correctly handle asynchronicity. + + Example: + return queryInterface.dropTable('users'); + */ + } +}; diff --git a/node_modules/sequelize-cli/lib/assets/models/index.js b/node_modules/sequelize-cli/lib/assets/models/index.js new file mode 100644 index 00000000..cf736e36 --- /dev/null +++ b/node_modules/sequelize-cli/lib/assets/models/index.js @@ -0,0 +1,37 @@ +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const Sequelize = require('sequelize'); +const basename = path.basename(__filename); +const env = process.env.NODE_ENV || 'development'; +const config = require(<%= configFile %>)[env]; +const db = {}; + +let sequelize; +if (config.use_env_variable) { + sequelize = new Sequelize(process.env[config.use_env_variable], config); +} else { + sequelize = new Sequelize(config.database, config.username, config.password, config); +} + +fs + .readdirSync(__dirname) + .filter(file => { + return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js'); + }) + .forEach(file => { + const model = sequelize['import'](path.join(__dirname, file)); + db[model.name] = model; + }); + +Object.keys(db).forEach(modelName => { + if (db[modelName].associate) { + db[modelName].associate(db); + } +}); + +db.sequelize = sequelize; +db.Sequelize = Sequelize; + +module.exports = db; diff --git a/node_modules/sequelize-cli/lib/assets/models/model.js b/node_modules/sequelize-cli/lib/assets/models/model.js new file mode 100644 index 00000000..70007aa5 --- /dev/null +++ b/node_modules/sequelize-cli/lib/assets/models/model.js @@ -0,0 +1,18 @@ +'use strict'; + +module.exports = (sequelize, DataTypes) => { + const <%= name %> = sequelize.define('<%= name %>', { + <% attributes.forEach(function(attribute, index) { %> + <%= attribute.fieldName %>: DataTypes.<%= attribute.dataFunction ? `${attribute.dataFunction.toUpperCase()}(DataTypes.${attribute.dataType.toUpperCase()})` : attribute.dataValues ? `${attribute.dataType.toUpperCase()}(${attribute.dataValues})` : attribute.dataType.toUpperCase() %> + <%= (Object.keys(attributes).length - 1) > index ? ',' : '' %> + <% }) %> + }, { + <%= underscored ? 'underscored: true,' : '' %> + }); + + <%= name %>.associate = function(models) { + // associations can be defined here + }; + + return <%= name %>; +}; diff --git a/node_modules/sequelize-cli/lib/assets/seeders/skeleton.js b/node_modules/sequelize-cli/lib/assets/seeders/skeleton.js new file mode 100644 index 00000000..989f2229 --- /dev/null +++ b/node_modules/sequelize-cli/lib/assets/seeders/skeleton.js @@ -0,0 +1,26 @@ +'use strict'; + +module.exports = { + up: (queryInterface, Sequelize) => { + /* + Add altering commands here. + Return a promise to correctly handle asynchronicity. + + Example: + return queryInterface.bulkInsert('People', [{ + name: 'John Doe', + isBetaMember: false + }], {}); + */ + }, + + down: (queryInterface, Sequelize) => { + /* + Add reverting commands here. + Return a promise to correctly handle asynchronicity. + + Example: + return queryInterface.bulkDelete('People', null, {}); + */ + } +}; diff --git a/node_modules/sequelize-cli/lib/commands/database.js b/node_modules/sequelize-cli/lib/commands/database.js new file mode 100644 index 00000000..2377e352 --- /dev/null +++ b/node_modules/sequelize-cli/lib/commands/database.js @@ -0,0 +1,139 @@ +'use strict'; + +var _bluebird = require('bluebird'); + +var _yargs = require('../core/yargs'); + +var _migrator = require('../core/migrator'); + +var _helpers = require('../helpers'); + +var _helpers2 = _interopRequireDefault(_helpers); + +var _lodash = require('lodash'); + +var _cliColor = require('cli-color'); + +var _cliColor2 = _interopRequireDefault(_cliColor); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const Sequelize = _helpers2.default.generic.getSequelize(); + +exports.builder = yargs => (0, _yargs._baseOptions)(yargs).option('charset', { + describe: 'Pass charset option to dialect, MYSQL only', + type: 'string' +}).option('collate', { + describe: 'Pass collate option to dialect', + type: 'string' +}).option('encoding', { + describe: 'Pass encoding option to dialect, PostgreSQL only', + type: 'string' +}).option('ctype', { + describe: 'Pass ctype option to dialect, PostgreSQL only', + type: 'string' +}).option('template', { + describe: 'Pass template option to dialect, PostgreSQL only', + type: 'string' +}).argv; + +exports.handler = (() => { + var _ref = (0, _bluebird.coroutine)(function* (args) { + const command = args._[0]; + + // legacy, gulp used to do this + yield _helpers2.default.config.init(); + + const sequelize = getDatabaseLessSequelize(); + const config = _helpers2.default.config.readConfig(); + + switch (command) { + case 'db:create': + const options = (0, _lodash.pick)(args, ['charset', 'collate', 'encoding', 'ctype', 'template']); + + const query = getCreateDatabaseQuery(sequelize, config, options); + + yield sequelize.query(query, { + type: sequelize.QueryTypes.RAW + }).catch(function (e) { + return _helpers2.default.view.error(e); + }); + + _helpers2.default.view.log('Database', _cliColor2.default.blueBright(config.database), 'created.'); + + break; + case 'db:drop': + yield sequelize.query(`DROP DATABASE ${sequelize.getQueryInterface().quoteIdentifier(config.database)}`, { + type: sequelize.QueryTypes.RAW + }).catch(function (e) { + return _helpers2.default.view.error(e); + }); + + _helpers2.default.view.log('Database', _cliColor2.default.blueBright(config.database), 'dropped.'); + + break; + } + + process.exit(0); + }); + + return function (_x) { + return _ref.apply(this, arguments); + }; +})(); + +function getCreateDatabaseQuery(sequelize, config, options) { + switch (config.dialect) { + case 'postgres': + case 'postgres-native': + return 'CREATE DATABASE ' + sequelize.getQueryInterface().quoteIdentifier(config.database) + (options.encoding ? ' ENCODING = ' + sequelize.getQueryInterface().quoteIdentifier(options.encoding) : '') + (options.collate ? ' LC_COLLATE = ' + sequelize.getQueryInterface().quoteIdentifier(options.collate) : '') + (options.ctype ? ' LC_CTYPE = ' + sequelize.getQueryInterface().quoteIdentifier(options.ctype) : '') + (options.template ? ' TEMPLATE = ' + sequelize.getQueryInterface().quoteIdentifier(options.template) : ''); + + case 'mysql': + return 'CREATE DATABASE IF NOT EXISTS ' + sequelize.getQueryInterface().quoteIdentifier(config.database) + (options.charset ? ' DEFAULT CHARACTER SET ' + sequelize.getQueryInterface().quoteIdentifier(options.charset) : '') + (options.collate ? ' DEFAULT COLLATE ' + sequelize.getQueryInterface().quoteIdentifier(options.collate) : ''); + + case 'mssql': + return 'IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = N\'' + config.database + '\')' + ' BEGIN' + ' CREATE DATABASE ' + sequelize.getQueryInterface().quoteIdentifier(config.database) + (options.collate ? ' COLLATE ' + options.collate : '') + ' END;'; + break; + + default: + _helpers2.default.view.error(`Dialect ${config.dialect} does not support db:create / db:drop commands`); + return 'CREATE DATABASE ' + sequelize.getQueryInterface().quoteIdentifier(config.database); + } +} + +function getDatabaseLessSequelize() { + let config = null; + + try { + config = _helpers2.default.config.readConfig(); + } catch (e) { + _helpers2.default.view.error(e); + } + + config = (0, _lodash.cloneDeep)(config); + config = (0, _lodash.defaults)(config, { logging: _migrator.logMigrator }); + + switch (config.dialect) { + case 'postgres': + case 'postgres-native': + config.database = 'postgres'; + break; + + case 'mysql': + delete config.database; + break; + + case 'mssql': + config.database = 'master'; + break; + + default: + _helpers2.default.view.error(`Dialect ${config.dialect} does not support db:create / db:drop commands`); + } + + try { + return new Sequelize(config); + } catch (e) { + _helpers2.default.view.error(e); + } +} \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/commands/init.js b/node_modules/sequelize-cli/lib/commands/init.js new file mode 100644 index 00000000..c9919f7a --- /dev/null +++ b/node_modules/sequelize-cli/lib/commands/init.js @@ -0,0 +1,77 @@ +'use strict'; + +var _bluebird = require('bluebird'); + +var _yargs = require('../core/yargs'); + +var _helpers = require('../helpers'); + +var _helpers2 = _interopRequireDefault(_helpers); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.builder = yargs => (0, _yargs._baseOptions)(yargs).option('force', { + describe: 'Will drop the existing config folder and re-create it', + type: 'boolean', + default: false +}).argv; + +exports.handler = (() => { + var _ref = (0, _bluebird.coroutine)(function* (argv) { + const command = argv._[0]; + + switch (command) { + case 'init': + yield initConfig(argv); + yield initModels(argv); + yield initMigrations(argv); + yield initSeeders(argv); + break; + + case 'init:config': + yield initConfig(argv); + break; + + case 'init:models': + yield initModels(argv); + break; + + case 'init:migrations': + yield initMigrations(argv); + break; + + case 'init:seeders': + yield initSeeders(argv); + break; + } + + process.exit(0); + }); + + return function (_x) { + return _ref.apply(this, arguments); + }; +})(); + +function initConfig(args) { + if (!_helpers2.default.config.configFileExists() || !!args.force) { + _helpers2.default.config.writeDefaultConfig(); + _helpers2.default.view.log('Created "' + _helpers2.default.config.relativeConfigFile() + '"'); + } else { + _helpers2.default.view.notifyAboutExistingFile(_helpers2.default.config.relativeConfigFile()); + process.exit(1); + } +} + +function initModels(args) { + _helpers2.default.init.createModelsFolder(!!args.force); + _helpers2.default.init.createModelsIndexFile(!!args.force); +} + +function initMigrations(args) { + _helpers2.default.init.createMigrationsFolder(!!args.force); +} + +function initSeeders(args) { + _helpers2.default.init.createSeedersFolder(!!args.force); +} \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/commands/migrate.js b/node_modules/sequelize-cli/lib/commands/migrate.js new file mode 100644 index 00000000..6e1e372b --- /dev/null +++ b/node_modules/sequelize-cli/lib/commands/migrate.js @@ -0,0 +1,105 @@ +'use strict'; + +var _bluebird = require('bluebird'); + +var _yargs = require('../core/yargs'); + +var _migrator = require('../core/migrator'); + +var _helpers = require('../helpers'); + +var _helpers2 = _interopRequireDefault(_helpers); + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.builder = yargs => (0, _yargs._baseOptions)(yargs).option('to', { + describe: 'Migration name to run migrations until', + type: 'string' +}).option('from', { + describe: 'Migration name to start migrations from (excluding)', + type: 'string' +}).argv; + +exports.handler = (() => { + var _ref = (0, _bluebird.coroutine)(function* (args) { + const command = args._[0]; + + // legacy, gulp used to do this + yield _helpers2.default.config.init(); + + switch (command) { + case 'db:migrate': + yield migrate(args); + break; + case 'db:migrate:schema:timestamps:add': + yield migrateSchemaTimestampAdd(args); + break; + case 'db:migrate:status': + yield migrationStatus(args); + break; + } + + process.exit(0); + }); + + return function (_x) { + return _ref.apply(this, arguments); + }; +})(); + +function migrate(args) { + return (0, _migrator.getMigrator)('migration', args).then(migrator => { + return (0, _migrator.ensureCurrentMetaSchema)(migrator).then(() => migrator.pending()).then(migrations => { + const options = {}; + if (migrations.length === 0) { + _helpers2.default.view.log('No migrations were executed, database schema was already up to date.'); + process.exit(0); + } + if (args.to) { + if (migrations.filter(migration => migration.file === args.to).length === 0) { + _helpers2.default.view.log('No migrations were executed, database schema was already up to date.'); + process.exit(0); + } + options.to = args.to; + } + if (args.from) { + if (migrations.map(migration => migration.file).lastIndexOf(args.from) === -1) { + _helpers2.default.view.log('No migrations were executed, database schema was already up to date.'); + process.exit(0); + } + options.from = args.from; + } + return options; + }).then(options => migrator.up(options)); + }).catch(e => _helpers2.default.view.error(e)); +} + +function migrationStatus(args) { + return (0, _migrator.getMigrator)('migration', args).then(migrator => { + return (0, _migrator.ensureCurrentMetaSchema)(migrator).then(() => migrator.executed()).then(migrations => { + _lodash2.default.forEach(migrations, migration => { + _helpers2.default.view.log('up', migration.file); + }); + }).then(() => migrator.pending()).then(migrations => { + _lodash2.default.forEach(migrations, migration => { + _helpers2.default.view.log('down', migration.file); + }); + }); + }).catch(e => _helpers2.default.view.error(e)); +} + +function migrateSchemaTimestampAdd(args) { + return (0, _migrator.getMigrator)('migration', args).then(migrator => { + return (0, _migrator.addTimestampsToSchema)(migrator).then(items => { + if (items) { + _helpers2.default.view.log('Successfully added timestamps to MetaTable.'); + } else { + _helpers2.default.view.log('MetaTable already has timestamps.'); + } + }); + }).catch(e => _helpers2.default.view.error(e)); +} \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/commands/migrate_undo.js b/node_modules/sequelize-cli/lib/commands/migrate_undo.js new file mode 100644 index 00000000..448ea4ae --- /dev/null +++ b/node_modules/sequelize-cli/lib/commands/migrate_undo.js @@ -0,0 +1,50 @@ +'use strict'; + +var _bluebird = require('bluebird'); + +var _yargs = require('../core/yargs'); + +var _migrator = require('../core/migrator'); + +var _helpers = require('../helpers'); + +var _helpers2 = _interopRequireDefault(_helpers); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.builder = yargs => (0, _yargs._baseOptions)(yargs).option('name', { + describe: 'Name of the migration to undo', + type: 'string' +}).argv; + +exports.handler = (() => { + var _ref = (0, _bluebird.coroutine)(function* (args) { + // legacy, gulp used to do this + yield _helpers2.default.config.init(); + + yield migrateUndo(args); + + process.exit(0); + }); + + return function (_x) { + return _ref.apply(this, arguments); + }; +})(); + +function migrateUndo(args) { + return (0, _migrator.getMigrator)('migration', args).then(migrator => { + return (0, _migrator.ensureCurrentMetaSchema)(migrator).then(() => migrator.executed()).then(migrations => { + if (migrations.length === 0) { + _helpers2.default.view.log('No executed migrations found.'); + process.exit(0); + } + }).then(() => { + if (args.name) { + return migrator.down(args.name); + } else { + return migrator.down(); + } + }); + }).catch(e => _helpers2.default.view.error(e)); +} \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/commands/migrate_undo_all.js b/node_modules/sequelize-cli/lib/commands/migrate_undo_all.js new file mode 100644 index 00000000..aa308e75 --- /dev/null +++ b/node_modules/sequelize-cli/lib/commands/migrate_undo_all.js @@ -0,0 +1,45 @@ +'use strict'; + +var _bluebird = require('bluebird'); + +var _yargs = require('../core/yargs'); + +var _migrator = require('../core/migrator'); + +var _helpers = require('../helpers'); + +var _helpers2 = _interopRequireDefault(_helpers); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.builder = yargs => (0, _yargs._baseOptions)(yargs).option('to', { + describe: 'Revert to the provided migration', + default: 0, + type: 'string' +}).argv; + +exports.handler = (() => { + var _ref = (0, _bluebird.coroutine)(function* (args) { + // legacy, gulp used to do this + yield _helpers2.default.config.init(); + + yield migrationUndoAll(args); + + process.exit(0); + }); + + return function (_x) { + return _ref.apply(this, arguments); + }; +})(); + +function migrationUndoAll(args) { + return (0, _migrator.getMigrator)('migration', args).then(migrator => { + return (0, _migrator.ensureCurrentMetaSchema)(migrator).then(() => migrator.executed()).then(migrations => { + if (migrations.length === 0) { + _helpers2.default.view.log('No executed migrations found.'); + process.exit(0); + } + }).then(() => migrator.down({ to: args.to || 0 })); + }).catch(e => _helpers2.default.view.error(e)); +} \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/commands/migration_generate.js b/node_modules/sequelize-cli/lib/commands/migration_generate.js new file mode 100644 index 00000000..21926e3d --- /dev/null +++ b/node_modules/sequelize-cli/lib/commands/migration_generate.js @@ -0,0 +1,35 @@ +'use strict'; + +var _yargs = require('../core/yargs'); + +var _helpers = require('../helpers'); + +var _helpers2 = _interopRequireDefault(_helpers); + +var _fs = require('fs'); + +var _fs2 = _interopRequireDefault(_fs); + +var _cliColor = require('cli-color'); + +var _cliColor2 = _interopRequireDefault(_cliColor); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.builder = yargs => (0, _yargs._underscoreOption)((0, _yargs._baseOptions)(yargs).option('name', { + describe: 'Defines the name of the migration', + type: 'string', + demandOption: true +})).argv; + +exports.handler = function (args) { + _helpers2.default.init.createMigrationsFolder(); + + _fs2.default.writeFileSync(_helpers2.default.path.getMigrationPath(args.name), _helpers2.default.template.render('migrations/skeleton.js', {}, { + beautify: false + })); + + _helpers2.default.view.log('New migration was created at', _cliColor2.default.blueBright(_helpers2.default.path.getMigrationPath(args.name)), '.'); + + process.exit(0); +}; \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/commands/model_generate.js b/node_modules/sequelize-cli/lib/commands/model_generate.js new file mode 100644 index 00000000..cd207776 --- /dev/null +++ b/node_modules/sequelize-cli/lib/commands/model_generate.js @@ -0,0 +1,66 @@ +'use strict'; + +var _yargs = require('../core/yargs'); + +var _helpers = require('../helpers'); + +var _helpers2 = _interopRequireDefault(_helpers); + +var _cliColor = require('cli-color'); + +var _cliColor2 = _interopRequireDefault(_cliColor); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.builder = yargs => (0, _yargs._underscoreOption)((0, _yargs._baseOptions)(yargs).option('name', { + describe: 'Defines the name of the new model', + type: 'string', + demandOption: true +}).option('attributes', { + describe: 'A list of attributes', + type: 'string', + demandOption: true +}).option('force', { + describe: 'Forcefully re-creates model with the same name', + type: 'string', + demandOption: false +})).argv; + +exports.handler = function (args) { + ensureModelsFolder(); + ensureMigrationsFolder(); + checkModelFileExistence(args); + + try { + _helpers2.default.model.generateFile(args); + } catch (err) { + _helpers2.default.view.error(err.message); + } + + _helpers2.default.migration.generateTableCreationFile(args); + _helpers2.default.view.log('New model was created at', _cliColor2.default.blueBright(_helpers2.default.path.getModelPath(args.name)), '.'); + _helpers2.default.view.log('New migration was created at', _cliColor2.default.blueBright(_helpers2.default.path.getMigrationPath(args.name)), '.'); + + process.exit(0); +}; + +function ensureModelsFolder() { + if (!_helpers2.default.path.existsSync(_helpers2.default.path.getModelsPath())) { + _helpers2.default.view.error('Unable to find models path (' + _helpers2.default.path.getModelsPath() + '). Did you run ' + _cliColor2.default.blueBright('sequelize init') + '?'); + } +} + +function ensureMigrationsFolder() { + if (!_helpers2.default.path.existsSync(_helpers2.default.path.getPath('migration'))) { + _helpers2.default.view.error('Unable to find migrations path (' + _helpers2.default.path.getPath('migration') + '). Did you run ' + _cliColor2.default.blueBright('sequelize init') + '?'); + } +} + +function checkModelFileExistence(args) { + const modelPath = _helpers2.default.path.getModelPath(args.name); + + if (args.force === undefined && _helpers2.default.model.modelFileExists(modelPath)) { + _helpers2.default.view.notifyAboutExistingFile(modelPath); + process.exit(1); + } +} \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/commands/seed.js b/node_modules/sequelize-cli/lib/commands/seed.js new file mode 100644 index 00000000..64afb50a --- /dev/null +++ b/node_modules/sequelize-cli/lib/commands/seed.js @@ -0,0 +1,69 @@ +'use strict'; + +var _bluebird = require('bluebird'); + +var _yargs = require('../core/yargs'); + +var _migrator = require('../core/migrator'); + +var _helpers = require('../helpers'); + +var _helpers2 = _interopRequireDefault(_helpers); + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.builder = yargs => (0, _yargs._baseOptions)(yargs).argv; +exports.handler = (() => { + var _ref = (0, _bluebird.coroutine)(function* (args) { + const command = args._[0]; + + // legacy, gulp used to do this + yield _helpers2.default.config.init(); + + switch (command) { + case 'db:seed:all': + yield seedAll(args); + break; + + case 'db:seed:undo:all': + yield seedUndoAll(args); + break; + } + + process.exit(0); + }); + + return function (_x) { + return _ref.apply(this, arguments); + }; +})(); + +function seedAll(args) { + return (0, _migrator.getMigrator)('seeder', args).then(migrator => { + return migrator.pending().then(seeders => { + if (seeders.length === 0) { + _helpers2.default.view.log('No seeders found.'); + return; + } + + return migrator.up({ migrations: _lodash2.default.chain(seeders).map('file').value() }); + }); + }).catch(e => _helpers2.default.view.error(e)); +} + +function seedUndoAll(args) { + return (0, _migrator.getMigrator)('seeder', args).then(migrator => { + return (_helpers2.default.umzug.getStorage('seeder') === 'none' ? migrator.pending() : migrator.executed()).then(seeders => { + if (seeders.length === 0) { + _helpers2.default.view.log('No seeders found.'); + return; + } + + return migrator.down({ migrations: _lodash2.default.chain(seeders).map('file').reverse().value() }); + }); + }).catch(e => _helpers2.default.view.error(e)); +} \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/commands/seed_generate.js b/node_modules/sequelize-cli/lib/commands/seed_generate.js new file mode 100644 index 00000000..bbc4eb66 --- /dev/null +++ b/node_modules/sequelize-cli/lib/commands/seed_generate.js @@ -0,0 +1,35 @@ +'use strict'; + +var _yargs = require('../core/yargs'); + +var _helpers = require('../helpers'); + +var _helpers2 = _interopRequireDefault(_helpers); + +var _fs = require('fs'); + +var _fs2 = _interopRequireDefault(_fs); + +var _cliColor = require('cli-color'); + +var _cliColor2 = _interopRequireDefault(_cliColor); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.builder = yargs => (0, _yargs._baseOptions)(yargs).option('name', { + describe: 'Defines the name of the seed', + type: 'string', + demandOption: true +}).argv; + +exports.handler = function (args) { + _helpers2.default.init.createSeedersFolder(); + + _fs2.default.writeFileSync(_helpers2.default.path.getSeederPath(args.name), _helpers2.default.template.render('seeders/skeleton.js', {}, { + beautify: false + })); + + _helpers2.default.view.log('New seed was created at', _cliColor2.default.blueBright(_helpers2.default.path.getSeederPath(args.name)), '.'); + + process.exit(0); +}; \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/commands/seed_one.js b/node_modules/sequelize-cli/lib/commands/seed_one.js new file mode 100644 index 00000000..56a3de0a --- /dev/null +++ b/node_modules/sequelize-cli/lib/commands/seed_one.js @@ -0,0 +1,63 @@ +'use strict'; + +var _bluebird = require('bluebird'); + +var _yargs = require('../core/yargs'); + +var _migrator = require('../core/migrator'); + +var _helpers = require('../helpers'); + +var _helpers2 = _interopRequireDefault(_helpers); + +var _path = require('path'); + +var _path2 = _interopRequireDefault(_path); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.builder = yargs => (0, _yargs._baseOptions)(yargs).option('seed', { + describe: 'List of seed files', + type: 'array' +}).argv; + +exports.handler = (() => { + var _ref = (0, _bluebird.coroutine)(function* (args) { + const command = args._[0]; + + // legacy, gulp used to do this + yield _helpers2.default.config.init(); + + // filter out cmd names + // for case like --seeders-path seeders --seed seedPerson.js db:seed + const seeds = (args.seed || []).filter(function (name) { + return name !== 'db:seed' && name !== 'db:seed:undo'; + }).map(function (file) { + return _path2.default.basename(file); + }); + + switch (command) { + case 'db:seed': + yield (0, _migrator.getMigrator)('seeder', args).then(function (migrator) { + return migrator.up(seeds); + }).catch(function (e) { + return _helpers2.default.view.error(e); + }); + break; + + case 'db:seed:undo': + yield (0, _migrator.getMigrator)('seeder', args).then(function (migrator) { + return migrator.down({ migrations: seeds }); + }).catch(function (e) { + return _helpers2.default.view.error(e); + }); + break; + } + + process.exit(0); + }); + + return function (_x) { + return _ref.apply(this, arguments); + }; +})(); \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/core/migrator.js b/node_modules/sequelize-cli/lib/core/migrator.js new file mode 100644 index 00000000..878454ab --- /dev/null +++ b/node_modules/sequelize-cli/lib/core/migrator.js @@ -0,0 +1,159 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.logMigrator = logMigrator; +exports.getMigrator = getMigrator; +exports.ensureCurrentMetaSchema = ensureCurrentMetaSchema; +exports.addTimestampsToSchema = addTimestampsToSchema; + +var _umzug = require('umzug'); + +var _umzug2 = _interopRequireDefault(_umzug); + +var _bluebird = require('bluebird'); + +var _bluebird2 = _interopRequireDefault(_bluebird); + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _index = require('../helpers/index'); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const Sequelize = _index2.default.generic.getSequelize(); + +function logMigrator(s) { + if (s.indexOf('Executing') !== 0) { + _index2.default.view.log(s); + } +} + +function getSequelizeInstance() { + let config = null; + + try { + config = _index2.default.config.readConfig(); + } catch (e) { + _index2.default.view.error(e); + } + + config = _lodash2.default.defaults(config, { logging: logMigrator }); + + try { + return new Sequelize(config); + } catch (e) { + _index2.default.view.error(e); + } +} + +function getMigrator(type, args) { + return _bluebird2.default.try(() => { + if (!(_index2.default.config.configFileExists() || args.url)) { + _index2.default.view.error('Cannot find "' + _index2.default.config.getConfigFile() + '". Have you run "sequelize init"?'); + process.exit(1); + } + + const sequelize = getSequelizeInstance(); + const migrator = new _umzug2.default({ + storage: _index2.default.umzug.getStorage(type), + storageOptions: _index2.default.umzug.getStorageOptions(type, { sequelize }), + logging: _index2.default.view.log, + migrations: { + params: [sequelize.getQueryInterface(), Sequelize], + path: _index2.default.path.getPath(type), + pattern: /\.js$/, + wrap: fun => { + if (fun.length === 3) { + return _bluebird2.default.promisify(fun); + } else { + return fun; + } + } + } + }); + + return sequelize.authenticate().then(() => { + // Check if this is a PostgreSQL run and if there is a custom schema specified, and if there is, check if it's + // been created. If not, attempt to create it. + if (_index2.default.version.getDialectName() === 'pg') { + const customSchemaName = _index2.default.umzug.getSchema('migration'); + if (customSchemaName && customSchemaName !== 'public') { + return sequelize.createSchema(customSchemaName); + } + } + + return _bluebird2.default.resolve(); + }).then(() => migrator).catch(e => _index2.default.view.error(e)); + }); +} + +function ensureCurrentMetaSchema(migrator) { + const queryInterface = migrator.options.storageOptions.sequelize.getQueryInterface(); + const tableName = migrator.options.storageOptions.tableName; + const columnName = migrator.options.storageOptions.columnName; + + return ensureMetaTable(queryInterface, tableName).then(table => { + const columns = Object.keys(table); + + if (columns.length === 1 && columns[0] === columnName) { + return; + } else if (columns.length === 3 && columns.indexOf('createdAt') >= 0) { + return; + } + }).catch(() => {}); +} + +function ensureMetaTable(queryInterface, tableName) { + return queryInterface.showAllTables().then(tableNames => { + if (tableNames.indexOf(tableName) === -1) { + throw new Error('No MetaTable table found.'); + } + return queryInterface.describeTable(tableName); + }); +} + +/** + * Add timestamps + * + * @return {Promise} + */ +function addTimestampsToSchema(migrator) { + const sequelize = migrator.options.storageOptions.sequelize; + const queryInterface = sequelize.getQueryInterface(); + const tableName = migrator.options.storageOptions.tableName; + + return ensureMetaTable(queryInterface, tableName).then(table => { + if (table.createdAt) { + return; + } + + return ensureCurrentMetaSchema(migrator).then(() => queryInterface.renameTable(tableName, tableName + 'Backup')).then(() => { + const sql = queryInterface.QueryGenerator.selectQuery(tableName + 'Backup'); + return _index2.default.generic.execQuery(sequelize, sql, { type: 'SELECT', raw: true }); + }).then(result => { + const SequelizeMeta = sequelize.define(tableName, { + name: { + type: Sequelize.STRING, + allowNull: false, + unique: true, + primaryKey: true, + autoIncrement: false + } + }, { + tableName, + timestamps: true, + schema: _index2.default.umzug.getSchema() + }); + + return SequelizeMeta.sync().then(() => { + return SequelizeMeta.bulkCreate(result); + }); + }); + }); +} \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/core/yargs.js b/node_modules/sequelize-cli/lib/core/yargs.js new file mode 100644 index 00000000..335668dd --- /dev/null +++ b/node_modules/sequelize-cli/lib/core/yargs.js @@ -0,0 +1,75 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getYArgs; +exports._baseOptions = _baseOptions; +exports._underscoreOption = _underscoreOption; + +var _fs = require('fs'); + +var _fs2 = _interopRequireDefault(_fs); + +var _yargs = require('yargs'); + +var _yargs2 = _interopRequireDefault(_yargs); + +var _path = require('path'); + +var _path2 = _interopRequireDefault(_path); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function loadRCFile(optionsPath) { + const rcFile = optionsPath || _path2.default.resolve(process.cwd(), '.sequelizerc'); + const rcFileResolved = _path2.default.resolve(rcFile); + return _fs2.default.existsSync(rcFileResolved) ? JSON.parse(JSON.stringify(require(rcFileResolved))) : {}; +} + +const args = _yargs2.default.help(false).version(false).config(loadRCFile(_yargs2.default.argv.optionsPath)); + +function getYArgs() { + return args; +} + +function _baseOptions(yargs) { + return yargs.option('env', { + describe: 'The environment to run the command in', + default: 'development', + type: 'string' + }).option('config', { + describe: 'The path to the config file', + type: 'string' + }).option('options-path', { + describe: 'The path to a JSON file with additional options', + type: 'string' + }).option('migrations-path', { + describe: 'The path to the migrations folder', + default: 'migrations', + type: 'string' + }).option('seeders-path', { + describe: 'The path to the seeders folder', + default: 'seeders', + type: 'string' + }).option('models-path', { + describe: 'The path to the models folder', + default: 'models', + type: 'string' + }).option('url', { + describe: 'The database connection string to use. Alternative to using --config files', + type: 'string' + }).option('debug', { + describe: 'When available show various debug information', + default: false, + type: 'boolean' + }); +} + +function _underscoreOption(yargs) { + return yargs.option('underscored', { + describe: "Use snake case for the timestamp's attribute names", + default: false, + type: 'boolean' + }); +} \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/helpers/asset-helper.js b/node_modules/sequelize-cli/lib/helpers/asset-helper.js new file mode 100644 index 00000000..3e3fb2e5 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/asset-helper.js @@ -0,0 +1,41 @@ +'use strict'; + +var _fsExtra = require('fs-extra'); + +var _fsExtra2 = _interopRequireDefault(_fsExtra); + +var _path = require('path'); + +var _path2 = _interopRequireDefault(_path); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const assets = { + copy: (from, to) => { + _fsExtra2.default.copySync(_path2.default.resolve(__dirname, '..', 'assets', from), to); + }, + + read: assetPath => { + return _fsExtra2.default.readFileSync(_path2.default.resolve(__dirname, '..', 'assets', assetPath)).toString(); + }, + + write: (targetPath, content) => { + _fsExtra2.default.writeFileSync(targetPath, content); + }, + + inject: (filePath, token, content) => { + const fileContent = _fsExtra2.default.readFileSync(filePath).toString(); + _fsExtra2.default.writeFileSync(filePath, fileContent.replace(token, content)); + }, + + injectConfigFilePath: (filePath, configPath) => { + undefined.inject(filePath, '__CONFIG_FILE__', configPath); + }, + + mkdirp: pathToCreate => { + _fsExtra2.default.mkdirpSync(pathToCreate); + } +}; + +module.exports = assets; +module.exports.default = assets; \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/helpers/config-helper.js b/node_modules/sequelize-cli/lib/helpers/config-helper.js new file mode 100644 index 00000000..1d377b3b --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/config-helper.js @@ -0,0 +1,213 @@ +'use strict'; + +var _bluebird = require('bluebird'); + +var _bluebird2 = _interopRequireDefault(_bluebird); + +var _path = require('path'); + +var _path2 = _interopRequireDefault(_path); + +var _fs = require('fs'); + +var _fs2 = _interopRequireDefault(_fs); + +var _url = require('url'); + +var _url2 = _interopRequireDefault(_url); + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _index = require('./index'); + +var _index2 = _interopRequireDefault(_index); + +var _yargs = require('../core/yargs'); + +var _yargs2 = _interopRequireDefault(_yargs); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const args = (0, _yargs2.default)().argv; + +const api = { + config: undefined, + rawConfig: undefined, + error: undefined, + init() { + return _bluebird2.default.resolve().then(() => { + let config; + + if (args.url) { + config = api.parseDbUrl(args.url); + } else { + try { + config = require(api.getConfigFile()); + } catch (e) { + api.error = e; + } + } + return config; + }).then(config => { + if (typeof config === 'object' || config === undefined) { + return config; + } else if (config.length === 1) { + return _bluebird2.default.promisify(config)(); + } else { + return config(); + } + }).then(config => { + api.rawConfig = config; + }).then(() => { + // Always return the full config api + return api; + }); + }, + getConfigFile() { + if (args.config) { + return _path2.default.resolve(process.cwd(), args.config); + } + + const defaultPath = _path2.default.resolve(process.cwd(), 'config', 'config.json'); + const alternativePath = defaultPath.replace('.json', '.js'); + + return _index2.default.path.existsSync(alternativePath) ? alternativePath : defaultPath; + }, + + relativeConfigFile() { + return _path2.default.relative(process.cwd(), api.getConfigFile()); + }, + + configFileExists() { + return _index2.default.path.existsSync(api.getConfigFile()); + }, + + getDefaultConfig() { + return JSON.stringify({ + development: { + username: 'root', + password: null, + database: 'database_development', + host: '127.0.0.1', + dialect: 'mysql', + operatorsAliases: false + }, + test: { + username: 'root', + password: null, + database: 'database_test', + host: '127.0.0.1', + dialect: 'mysql', + operatorsAliases: false + }, + production: { + username: 'root', + password: null, + database: 'database_production', + host: '127.0.0.1', + dialect: 'mysql', + operatorsAliases: false + } + }, undefined, 2) + '\n'; + }, + + writeDefaultConfig() { + const configPath = _path2.default.dirname(api.getConfigFile()); + + if (!_index2.default.path.existsSync(configPath)) { + _index2.default.asset.mkdirp(configPath); + } + + _fs2.default.writeFileSync(api.getConfigFile(), api.getDefaultConfig()); + }, + + readConfig() { + if (!api.config) { + const env = _index2.default.generic.getEnvironment(); + + if (api.rawConfig === undefined) { + throw new Error('Error reading "' + api.relativeConfigFile() + '". Error: ' + api.error); + } + + if (typeof api.rawConfig !== 'object') { + throw new Error('Config must be an object or a promise for an object: ' + api.relativeConfigFile()); + } + + if (args.url) { + _index2.default.view.log('Parsed url ' + api.filteredUrl(args.url, api.rawConfig)); + } else { + _index2.default.view.log('Loaded configuration file "' + api.relativeConfigFile() + '".'); + } + + if (api.rawConfig[env]) { + _index2.default.view.log('Using environment "' + env + '".'); + + api.rawConfig = api.rawConfig[env]; + } + + // The Sequelize library needs a function passed in to its logging option + if (api.rawConfig.logging && !_lodash2.default.isFunction(api.rawConfig.logging)) { + api.rawConfig.logging = console.log; + } + + // in case url is present - we overwrite the configuration + if (api.rawConfig.url) { + api.rawConfig = _lodash2.default.merge(api.rawConfig, api.parseDbUrl(api.rawConfig.url)); + } else if (api.rawConfig.use_env_variable) { + api.rawConfig = _lodash2.default.merge(api.rawConfig, api.parseDbUrl(process.env[api.rawConfig.use_env_variable])); + } + + api.config = api.rawConfig; + } + return api.config; + }, + + filteredUrl(uri, config) { + const regExp = new RegExp(':?' + _lodash2.default.escapeRegExp(config.password) + '@'); + return uri.replace(regExp, ':*****@'); + }, + + urlStringToConfigHash(urlString) { + try { + const urlParts = _url2.default.parse(urlString); + let result = { + database: urlParts.pathname.replace(/^\//, ''), + host: urlParts.hostname, + port: urlParts.port, + protocol: urlParts.protocol.replace(/:$/, ''), + ssl: urlParts.query ? urlParts.query.indexOf('ssl=true') >= 0 : false + }; + + if (urlParts.auth) { + result = _lodash2.default.assign(result, { + username: urlParts.auth.split(':')[0], + password: urlParts.auth.split(':')[1] + }); + } + + return result; + } catch (e) { + throw new Error('Error parsing url: ' + urlString); + } + }, + + parseDbUrl(urlString) { + let config = api.urlStringToConfigHash(urlString); + + config = _lodash2.default.assign(config, { + dialect: config.protocol + }); + + if (config.dialect === 'sqlite' && config.database.indexOf(':memory') !== 0) { + config = _lodash2.default.assign(config, { + storage: '/' + config.database + }); + } + + return config; + } +}; + +module.exports = api; \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/helpers/generic-helper.js b/node_modules/sequelize-cli/lib/helpers/generic-helper.js new file mode 100644 index 00000000..87b00d8d --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/generic-helper.js @@ -0,0 +1,53 @@ +'use strict'; + +var _path = require('path'); + +var _path2 = _interopRequireDefault(_path); + +var _yargs = require('../core/yargs'); + +var _yargs2 = _interopRequireDefault(_yargs); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const resolve = require('resolve').sync; + + +const args = (0, _yargs2.default)().argv; + +const generic = { + getEnvironment: () => { + return args.env || process.env.NODE_ENV || 'development'; + }, + + getSequelize: file => { + const resolvePath = file ? _path2.default.join('sequelize', file) : 'sequelize'; + const resolveOptions = { basedir: process.cwd() }; + + let sequelizePath; + + try { + sequelizePath = require.resolve(resolvePath, resolveOptions); + } catch (e) {} + + try { + sequelizePath = sequelizePath || resolve(resolvePath, resolveOptions); + } catch (e) { + console.error('Unable to resolve sequelize package in ' + process.cwd()); + process.exit(1); + } + + return require(sequelizePath); + }, + + execQuery: (sequelize, sql, options) => { + if (sequelize.query.length === 2) { + return sequelize.query(sql, options); + } else { + return sequelize.query(sql, null, options); + } + } +}; + +module.exports = generic; +module.exports.default = generic; \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/helpers/index.js b/node_modules/sequelize-cli/lib/helpers/index.js new file mode 100644 index 00000000..16da6ebf --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/index.js @@ -0,0 +1,19 @@ +'use strict'; + +var _path = require('path'); + +var _path2 = _interopRequireDefault(_path); + +var _fs = require('fs'); + +var _fs2 = _interopRequireDefault(_fs); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = {}; + +_fs2.default.readdirSync(__dirname).filter(file => file.indexOf('.') !== 0 && file.indexOf('index.js') === -1).forEach(file => { + module.exports[file.replace('-helper.js', '')] = require(_path2.default.resolve(__dirname, file)); +}); + +module.exports.default = module.exports; \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/helpers/init-helper.js b/node_modules/sequelize-cli/lib/helpers/init-helper.js new file mode 100644 index 00000000..a3911102 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/init-helper.js @@ -0,0 +1,83 @@ +'use strict'; + +var _index = require('./index'); + +var _index2 = _interopRequireDefault(_index); + +var _path = require('path'); + +var _path2 = _interopRequireDefault(_path); + +var _fs = require('fs'); + +var _fs2 = _interopRequireDefault(_fs); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function createFolder(folderName, folder, force) { + if (force && _fs2.default.existsSync(folder) === true) { + _index2.default.view.log('Deleting the ' + folderName + ' folder. (--force)'); + + try { + _fs2.default.readdirSync(folder).forEach(filename => { + _fs2.default.unlinkSync(_path2.default.resolve(folder, filename)); + }); + } catch (e) { + _index2.default.view.error(e); + } + + try { + _fs2.default.rmdirSync(folder); + _index2.default.view.log('Successfully deleted the ' + folderName + ' folder.'); + } catch (e) { + _index2.default.view.error(e); + } + } + + try { + if (_fs2.default.existsSync(folder) === false) { + _index2.default.asset.mkdirp(folder); + _index2.default.view.log('Successfully created ' + folderName + ' folder at "' + folder + '".'); + } else { + _index2.default.view.log(folderName + ' folder at "' + folder + '" already exists.'); + } + } catch (e) { + _index2.default.view.error(e); + } +}; + +const init = { + createMigrationsFolder: force => { + createFolder('migrations', _index2.default.path.getPath('migration'), force); + }, + + createSeedersFolder: force => { + createFolder('seeders', _index2.default.path.getPath('seeder'), force); + }, + + createModelsFolder: force => { + createFolder('models', _index2.default.path.getModelsPath(), force); + }, + + createModelsIndexFile: force => { + const modelsPath = _index2.default.path.getModelsPath(); + const indexPath = _path2.default.resolve(modelsPath, _index2.default.path.addFileExtension('index')); + + if (!_index2.default.path.existsSync(modelsPath)) { + _index2.default.view.log('Models folder not available.'); + } else if (_index2.default.path.existsSync(indexPath) && !force) { + _index2.default.view.notifyAboutExistingFile(indexPath); + } else { + const relativeConfigPath = _path2.default.relative(_index2.default.path.getModelsPath(), _index2.default.config.getConfigFile()); + + _index2.default.asset.write(indexPath, _index2.default.template.render('models/index.js', { + configFile: '__dirname + \'/' + relativeConfigPath.replace(/\\/g, '/') + '\'' + }, { + beautify: false + })); + } + } +}; + +module.exports = init; +module.exports.default = init; \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/helpers/migration-helper.js b/node_modules/sequelize-cli/lib/helpers/migration-helper.js new file mode 100644 index 00000000..7fe58530 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/migration-helper.js @@ -0,0 +1,39 @@ +'use strict'; + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _index = require('./index'); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const Sequelize = _index2.default.generic.getSequelize(); + +module.exports = { + getTableName(modelName) { + return Sequelize.Utils.pluralize(modelName); + }, + + generateTableCreationFileContent(args) { + return _index2.default.template.render('migrations/create-table.js', { + tableName: this.getTableName(args.name), + attributes: _index2.default.model.transformAttributes(args.attributes), + createdAt: args.underscored ? 'created_at' : 'createdAt', + updatedAt: args.underscored ? 'updated_at' : 'updatedAt' + }); + }, + + generateMigrationName(args) { + return _lodash2.default.trimStart(_lodash2.default.kebabCase('create-' + args.name), '-'); + }, + + generateTableCreationFile(args) { + const migrationName = this.generateMigrationName(args); + const migrationPath = _index2.default.path.getMigrationPath(migrationName); + + _index2.default.asset.write(migrationPath, this.generateTableCreationFileContent(args)); + } +}; \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/helpers/model-helper.js b/node_modules/sequelize-cli/lib/helpers/model-helper.js new file mode 100644 index 00000000..d947e891 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/model-helper.js @@ -0,0 +1,104 @@ +'use strict'; + +var _index = require('./index'); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const Sequelize = _index2.default.generic.getSequelize(); +const validAttributeFunctionType = ['array', 'enum']; + +/** + * Check the given dataType actual exists. + * @param {string} dataType + */ +function validateDataType(dataType) { + if (!Sequelize.DataTypes[dataType.toUpperCase()]) { + throw new Error(`Unknown type '${dataType}'`); + } + + return dataType; +} + +function formatAttributes(attribute) { + let result; + const split = attribute.split(':'); + + if (split.length === 2) { + result = { fieldName: split[0], dataType: split[1], dataFunction: null, dataValues: null }; + } else if (split.length === 3) { + const validValues = /^\{(,? ?[A-z0-9 ]+)+\}$/; + const isValidFunction = validAttributeFunctionType.indexOf(split[1].toLowerCase()) !== -1; + const isValidValue = validAttributeFunctionType.indexOf(split[2].toLowerCase()) === -1 && split[2].match(validValues) === null; + const isValidValues = split[2].match(validValues) !== null; + + if (isValidFunction && isValidValue && !isValidValues) { + result = { fieldName: split[0], dataType: split[2], dataFunction: split[1], dataValues: null }; + } + + if (isValidFunction && !isValidValue && isValidValues) { + result = { fieldName: split[0], dataType: split[1], dataFunction: null, dataValues: split[2].replace(/(^\{|\}$)/g, '').split(/\s*,\s*/).map(s => `'${s}'`).join(', ') }; + } + } + + return result; +} + +module.exports = { + transformAttributes(flag) { + /* + possible flag formats: + - first_name:string,last_name:string,bio:text,role:enum:{Admin, 'Guest User'},reviews:array:string + - 'first_name:string last_name:string bio:text role:enum:{Admin, Guest User} reviews:array:string' + - 'first_name:string, last_name:string, bio:text, role:enum:{Admin, Guest User} reviews:array:string' + */ + const attributeStrings = flag.split('').map((() => { + let openValues = false; + return a => { + if ((a === ',' || a === ' ') && !openValues) { + return ' '; + } + if (a === '{') { + openValues = true; + } + if (a === '}') { + openValues = false; + } + + return a; + }; + })()).join('').split(/\s{2,}/); + + return attributeStrings.map(attribute => { + const formattedAttribute = formatAttributes(attribute); + + try { + validateDataType(formattedAttribute.dataType); + } catch (err) { + throw new Error(`Attribute '${attribute}' cannot be parsed: ${err.message}`); + } + + return formattedAttribute; + }); + }, + + generateFileContent(args) { + + return _index2.default.template.render('models/model.js', { + name: args.name, + attributes: this.transformAttributes(args.attributes), + underscored: args.underscored + }); + }, + + generateFile(args) { + const modelPath = _index2.default.path.getModelPath(args.name); + + _index2.default.asset.write(modelPath, this.generateFileContent(args)); + }, + + modelFileExists(filePath) { + return _index2.default.path.existsSync(filePath); + } +}; \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/helpers/path-helper.js b/node_modules/sequelize-cli/lib/helpers/path-helper.js new file mode 100644 index 00000000..a8782530 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/path-helper.js @@ -0,0 +1,100 @@ +'use strict'; + +var _path = require('path'); + +var _path2 = _interopRequireDefault(_path); + +var _fs = require('fs'); + +var _fs2 = _interopRequireDefault(_fs); + +var _yargs = require('../core/yargs'); + +var _yargs2 = _interopRequireDefault(_yargs); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const resolve = require('resolve').sync; + + +const args = (0, _yargs2.default)().argv; + +function format(i) { + return parseInt(i, 10) < 10 ? '0' + i : i; +}; + +function getCurrentYYYYMMDDHHmms() { + const date = new Date(); + return [date.getUTCFullYear(), format(date.getUTCMonth() + 1), format(date.getUTCDate()), format(date.getUTCHours()), format(date.getUTCMinutes()), format(date.getUTCSeconds())].join(''); +} + +module.exports = { + getPath(type) { + type = type + 's'; + + let result = args[type + 'Path'] || _path2.default.resolve(process.cwd(), type); + + if (_path2.default.normalize(result) !== _path2.default.resolve(result)) { + // the path is relative + result = _path2.default.resolve(process.cwd(), result); + } + + return result; + }, + + getFileName(type, name, options) { + return this.addFileExtension([getCurrentYYYYMMDDHHmms(), name ? name : 'unnamed-' + type].join('-'), options); + }, + + getFileExtension() { + return 'js'; + }, + + addFileExtension(basename, options) { + return [basename, this.getFileExtension(options)].join('.'); + }, + + getMigrationPath(migrationName) { + return _path2.default.resolve(this.getPath('migration'), this.getFileName('migration', migrationName)); + }, + + getSeederPath(seederName) { + return _path2.default.resolve(this.getPath('seeder'), this.getFileName('seeder', seederName)); + }, + + getModelsPath() { + return args.modelsPath || _path2.default.resolve(process.cwd(), 'models'); + }, + + getModelPath(modelName) { + return _path2.default.resolve(this.getModelsPath(), this.addFileExtension(modelName.toLowerCase())); + }, + + resolve(packageName) { + let result; + + try { + result = resolve(packageName, { basedir: process.cwd() }); + result = require(result); + } catch (e) { + try { + result = require(packageName); + } catch (err) {} + } + + return result; + }, + + existsSync(pathToCheck) { + if (_fs2.default.accessSync) { + try { + _fs2.default.accessSync(pathToCheck, _fs2.default.R_OK); + return true; + } catch (e) { + return false; + } + } else { + return _fs2.default.existsSync(pathToCheck); + } + } +}; \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/helpers/template-helper.js b/node_modules/sequelize-cli/lib/helpers/template-helper.js new file mode 100644 index 00000000..6e904751 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/template-helper.js @@ -0,0 +1,34 @@ +'use strict'; + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _jsBeautify = require('js-beautify'); + +var _jsBeautify2 = _interopRequireDefault(_jsBeautify); + +var _index = require('./index'); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = { + render(path, locals, options) { + options = _lodash2.default.assign({ + beautify: true, + indent_size: 2, + preserve_newlines: false + }, options || {}); + + const template = _index2.default.asset.read(path); + let content = _lodash2.default.template(template)(locals || {}); + + if (options.beautify) { + content = (0, _jsBeautify2.default)(content, options); + } + + return content; + } +}; \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/helpers/umzug-helper.js b/node_modules/sequelize-cli/lib/helpers/umzug-helper.js new file mode 100644 index 00000000..bc4e54a1 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/umzug-helper.js @@ -0,0 +1,67 @@ +'use strict'; + +var _path = require('path'); + +var _path2 = _interopRequireDefault(_path); + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _index = require('./index'); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const storage = { + migration: 'sequelize', + seeder: 'none' +}; +const storageTableName = { + migration: 'SequelizeMeta', + seeder: 'SequelizeData' +}; +const storageJsonName = { + migration: 'sequelize-meta.json', + seeder: 'sequelize-data.json' +}; + +module.exports = { + getStorageOption(property, fallback) { + return _index2.default.config.readConfig()[property] || fallback; + }, + + getStorage(type) { + return this.getStorageOption(type + 'Storage', storage[type]); + }, + + getStoragePath(type) { + const fallbackPath = _path2.default.join(process.cwd(), storageJsonName[type]); + + return this.getStorageOption(type + 'StoragePath', fallbackPath); + }, + + getTableName(type) { + return this.getStorageOption(type + 'StorageTableName', storageTableName[type]); + }, + + getSchema(type) { + return this.getStorageOption(type + 'StorageTableSchema', undefined); + }, + + getStorageOptions(type, extraOptions) { + const options = {}; + + if (this.getStorage(type) === 'json') { + options.path = this.getStoragePath(type); + } else if (this.getStorage(type) === 'sequelize') { + options.tableName = this.getTableName(type); + options.schema = this.getSchema(type); + } + + _lodash2.default.assign(options, extraOptions); + + return options; + } +}; \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/helpers/version-helper.js b/node_modules/sequelize-cli/lib/helpers/version-helper.js new file mode 100644 index 00000000..d3f8390b --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/version-helper.js @@ -0,0 +1,50 @@ +'use strict'; + +var _path = require('path'); + +var _path2 = _interopRequireDefault(_path); + +var _index = require('./index'); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const packageJson = require(_path2.default.resolve(__dirname, '..', '..', 'package.json')); + +module.exports = { + getCliVersion() { + return packageJson.version; + }, + + getOrmVersion() { + return _index2.default.generic.getSequelize('package.json').version; + }, + + getDialect() { + try { + return _index2.default.config.readConfig(); + } catch (e) { + return null; + } + }, + + getDialectName() { + const config = this.getDialect(); + + if (config) { + return { + 'sqlite': 'sqlite3', + 'postgres': 'pg', + 'mariadb': 'mariasql', + 'mysql': 'mysql' + }[config.dialect]; + } else { + return null; + } + }, + + getNodeVersion() { + return process.version.replace('v', ''); + } +}; \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/helpers/view-helper.js b/node_modules/sequelize-cli/lib/helpers/view-helper.js new file mode 100644 index 00000000..cdb99a17 --- /dev/null +++ b/node_modules/sequelize-cli/lib/helpers/view-helper.js @@ -0,0 +1,73 @@ +'use strict'; + +var _cliColor = require('cli-color'); + +var _cliColor2 = _interopRequireDefault(_cliColor); + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _index = require('./index'); + +var _index2 = _interopRequireDefault(_index); + +var _yargs = require('../core/yargs'); + +var _yargs2 = _interopRequireDefault(_yargs); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const args = (0, _yargs2.default)().argv; + +module.exports = { + teaser() { + const versions = ['Node: ' + _index2.default.version.getNodeVersion(), 'CLI: ' + _index2.default.version.getCliVersion(), 'ORM: ' + _index2.default.version.getOrmVersion()]; + + this.log(); + this.log(_cliColor2.default.underline('Sequelize CLI [' + versions.join(', ') + ']')); + this.log(); + }, + + log() { + console.log.apply(this, arguments); + }, + + error(error) { + let message = error; + + if (error instanceof Error) { + message = !args.debug ? error.message : error.stack; + } + + this.log(); + console.error(`${_cliColor2.default.red('ERROR:')} ${message}`); + this.log(); + + process.exit(1); + }, + + warn(message) { + this.log(`${_cliColor2.default.yellow('WARNING:')} ${message}`); + }, + + notifyAboutExistingFile(file) { + this.error('The file ' + _cliColor2.default.blueBright(file) + ' already exists. ' + 'Run command with --force to overwrite it.'); + }, + + pad(s, smth) { + let margin = smth; + + if (_lodash2.default.isObject(margin)) { + margin = Object.keys(margin); + } + + if (Array.isArray(margin)) { + margin = Math.max.apply(null, margin.map(o => { + return o.length; + })); + } + + return s + new Array(margin - s.length + 1).join(' '); + } +}; \ No newline at end of file diff --git a/node_modules/sequelize-cli/lib/sequelize b/node_modules/sequelize-cli/lib/sequelize new file mode 100755 index 00000000..dfdf5ec2 --- /dev/null +++ b/node_modules/sequelize-cli/lib/sequelize @@ -0,0 +1,83 @@ +#!/usr/bin/env node +'use strict'; + +var _yargs = require('./core/yargs'); + +var _yargs2 = _interopRequireDefault(_yargs); + +var _bluebird = require('bluebird'); + +var _bluebird2 = _interopRequireDefault(_bluebird); + +var _lodash = require('lodash'); + +var _init = require('./commands/init'); + +var _init2 = _interopRequireDefault(_init); + +var _migrate = require('./commands/migrate'); + +var _migrate2 = _interopRequireDefault(_migrate); + +var _migrate_undo = require('./commands/migrate_undo'); + +var _migrate_undo2 = _interopRequireDefault(_migrate_undo); + +var _migrate_undo_all = require('./commands/migrate_undo_all'); + +var _migrate_undo_all2 = _interopRequireDefault(_migrate_undo_all); + +var _seed = require('./commands/seed'); + +var _seed2 = _interopRequireDefault(_seed); + +var _seed_one = require('./commands/seed_one'); + +var _seed_one2 = _interopRequireDefault(_seed_one); + +var _migration_generate = require('./commands/migration_generate'); + +var _migration_generate2 = _interopRequireDefault(_migration_generate); + +var _model_generate = require('./commands/model_generate'); + +var _model_generate2 = _interopRequireDefault(_model_generate); + +var _seed_generate = require('./commands/seed_generate'); + +var _seed_generate2 = _interopRequireDefault(_seed_generate); + +var _database = require('./commands/database'); + +var _database2 = _interopRequireDefault(_database); + +var _index = require('./helpers/index'); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const yargs = (0, _yargs2.default)(); + +_bluebird2.default.coroutine.addYieldHandler(yieldedValue => { + if (Array.isArray(yieldedValue)) { + return _bluebird2.default.all(yieldedValue); + } +}); + +_bluebird2.default.coroutine.addYieldHandler(yieldedValue => { + if ((0, _lodash.isEmpty)(yieldedValue)) { + return _bluebird2.default.resolve(yieldedValue); + } +}); + +_index2.default.view.teaser(); + +const cli = yargs.help().version().command('db:migrate', 'Run pending migrations', _migrate2.default).command('db:migrate:schema:timestamps:add', 'Update migration table to have timestamps', _migrate2.default).command('db:migrate:status', 'List the status of all migrations', _migrate2.default).command('db:migrate:undo', 'Reverts a migration', _migrate_undo2.default).command('db:migrate:undo:all', 'Revert all migrations ran', _migrate_undo_all2.default).command('db:seed', 'Run specified seeder', _seed_one2.default).command('db:seed:undo', 'Deletes data from the database', _seed_one2.default).command('db:seed:all', 'Run every seeder', _seed2.default).command('db:seed:undo:all', 'Deletes data from the database', _seed2.default).command('db:create', 'Create database specified by configuration', _database2.default).command('db:drop', 'Drop database specified by configuration', _database2.default).command('init', 'Initializes project', _init2.default).command('init:config', 'Initializes configuration', _init2.default).command('init:migrations', 'Initializes migrations', _init2.default).command('init:models', 'Initializes models', _init2.default).command('init:seeders', 'Initializes seeders', _init2.default).command(['migration:generate', 'migration:create'], 'Generates a new migration file', _migration_generate2.default).command(['model:generate', 'model:create'], 'Generates a model and its migration', _model_generate2.default).command(['seed:generate', 'seed:create'], 'Generates a new seed file', _seed_generate2.default).wrap(yargs.terminalWidth()).strict(); + +const args = cli.argv; + +// if no command then show help +if (!args._[0]) { + cli.showHelp(); +} \ No newline at end of file diff --git a/node_modules/sequelize-cli/node_modules/.bin/css-beautify b/node_modules/sequelize-cli/node_modules/.bin/css-beautify new file mode 120000 index 00000000..36fae3ea --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/.bin/css-beautify @@ -0,0 +1 @@ +../../../js-beautify/js/bin/css-beautify.js \ No newline at end of file diff --git a/node_modules/sequelize-cli/node_modules/.bin/html-beautify b/node_modules/sequelize-cli/node_modules/.bin/html-beautify new file mode 120000 index 00000000..7cac3bd8 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/.bin/html-beautify @@ -0,0 +1 @@ +../../../js-beautify/js/bin/html-beautify.js \ No newline at end of file diff --git a/node_modules/sequelize-cli/node_modules/.bin/js-beautify b/node_modules/sequelize-cli/node_modules/.bin/js-beautify new file mode 120000 index 00000000..626d5b97 --- /dev/null +++ b/node_modules/sequelize-cli/node_modules/.bin/js-beautify @@ -0,0 +1 @@ +../../../js-beautify/js/bin/js-beautify.js \ No newline at end of file diff --git a/node_modules/sequelize-cli/package.json b/node_modules/sequelize-cli/package.json new file mode 100644 index 00000000..2eed3a46 --- /dev/null +++ b/node_modules/sequelize-cli/package.json @@ -0,0 +1,82 @@ +{ + "name": "sequelize-cli", + "version": "5.5.0", + "description": "The Sequelize CLI", + "bin": { + "sequelize": "./lib/sequelize" + }, + "dependencies": { + "bluebird": "^3.5.3", + "cli-color": "^1.4.0", + "fs-extra": "^7.0.1", + "js-beautify": "^1.8.8", + "lodash": "^4.17.5", + "resolve": "^1.5.0", + "umzug": "^2.1.0", + "yargs": "^13.1.0" + }, + "devDependencies": { + "babel-cli": "^6.24.1", + "babel-plugin-transform-async-to-module-method": "^6.24.1", + "babel-plugin-transform-object-rest-spread": "^6.23.0", + "babel-preset-env": "^1.6.1", + "babel-register": "^6.24.1", + "eslint": "^5.9.0", + "expect.js": "^0.3.1", + "gulp": "^4.0.0", + "mocha": "^6.0.0", + "mysql2": "^1.6.1", + "nodeify": "^1.0.1", + "pg": "^7.5.0", + "pg-hstore": "^2.3.2", + "sequelize": "^4.x", + "sqlite3": "^4.0.2", + "through2": "^3.0.0" + }, + "options": { + "mocha": "--require scripts/mocha-bootload.js --check-leaks --exit --timeout 30000 --colors --reporter spec" + }, + "eslintIgnore": [ + "test/support", + "src/assets" + ], + "scripts": { + "build": "npm run build-clean && babel src -d lib && npm run build-bin && npm run build-assets", + "build-bin": "mv ./lib/sequelize.js ./lib/sequelize && chmod +x ./lib/sequelize", + "build-assets": "cp -R ./src/assets ./lib/", + "build-clean": "rm -rf ./lib/", + "lint": "eslint test src", + "test-raw": "mocha $npm_package_options_mocha 'test/**/*.test.js'", + "test": "npm run lint && npm run build && npm run test-raw" + }, + "repository": { + "type": "git", + "url": "git://github.com/sequelize/cli.git" + }, + "keywords": [ + "sequelize", + "cli" + ], + "contributors": [ + { + "name": "Sascha Depold", + "email": "sascha@depold.com" + }, + { + "name": "Paulo R Lopes", + "email": "prplopes@gmail.com" + }, + { + "name": "Sushant Dhiman", + "email": "sushantdhiman@outlook.com" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/sequelize/cli/issues" + }, + "homepage": "https://github.com/sequelize/cli", + "engines": { + "node": ">=6.0.0" + } +} diff --git a/node_modules/sequelize-cli/scripts/mocha-bootload.js b/node_modules/sequelize-cli/scripts/mocha-bootload.js new file mode 100644 index 00000000..bf12cab1 --- /dev/null +++ b/node_modules/sequelize-cli/scripts/mocha-bootload.js @@ -0,0 +1 @@ +require('babel-register'); \ No newline at end of file diff --git a/node_modules/sequelize-cli/src/assets/migrations/create-table.js b/node_modules/sequelize-cli/src/assets/migrations/create-table.js new file mode 100644 index 00000000..1fd3e92d --- /dev/null +++ b/node_modules/sequelize-cli/src/assets/migrations/create-table.js @@ -0,0 +1,35 @@ +'use strict'; + +module.exports = { + up: (queryInterface, Sequelize) => { + return queryInterface + .createTable('<%= tableName %>', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + + <% attributes.forEach(function(attribute) { %> + <%= attribute.fieldName %>: { + type: Sequelize.<%= attribute.dataFunction ? `${attribute.dataFunction.toUpperCase()}(Sequelize.${attribute.dataType.toUpperCase()})` : attribute.dataValues ? `${attribute.dataType.toUpperCase()}(${attribute.dataValues})` : attribute.dataType.toUpperCase() %> + }, + <% }) %> + + <%= createdAt %>: { + allowNull: false, + type: Sequelize.DATE + }, + + <%= updatedAt %>: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + + down: (queryInterface, Sequelize) => { + return queryInterface.dropTable('<%= tableName %>'); + } +}; diff --git a/node_modules/sequelize-cli/src/assets/migrations/skeleton.js b/node_modules/sequelize-cli/src/assets/migrations/skeleton.js new file mode 100644 index 00000000..9ef68be8 --- /dev/null +++ b/node_modules/sequelize-cli/src/assets/migrations/skeleton.js @@ -0,0 +1,23 @@ +'use strict'; + +module.exports = { + up: (queryInterface, Sequelize) => { + /* + Add altering commands here. + Return a promise to correctly handle asynchronicity. + + Example: + return queryInterface.createTable('users', { id: Sequelize.INTEGER }); + */ + }, + + down: (queryInterface, Sequelize) => { + /* + Add reverting commands here. + Return a promise to correctly handle asynchronicity. + + Example: + return queryInterface.dropTable('users'); + */ + } +}; diff --git a/node_modules/sequelize-cli/src/assets/models/index.js b/node_modules/sequelize-cli/src/assets/models/index.js new file mode 100644 index 00000000..cf736e36 --- /dev/null +++ b/node_modules/sequelize-cli/src/assets/models/index.js @@ -0,0 +1,37 @@ +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const Sequelize = require('sequelize'); +const basename = path.basename(__filename); +const env = process.env.NODE_ENV || 'development'; +const config = require(<%= configFile %>)[env]; +const db = {}; + +let sequelize; +if (config.use_env_variable) { + sequelize = new Sequelize(process.env[config.use_env_variable], config); +} else { + sequelize = new Sequelize(config.database, config.username, config.password, config); +} + +fs + .readdirSync(__dirname) + .filter(file => { + return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js'); + }) + .forEach(file => { + const model = sequelize['import'](path.join(__dirname, file)); + db[model.name] = model; + }); + +Object.keys(db).forEach(modelName => { + if (db[modelName].associate) { + db[modelName].associate(db); + } +}); + +db.sequelize = sequelize; +db.Sequelize = Sequelize; + +module.exports = db; diff --git a/node_modules/sequelize-cli/src/assets/models/model.js b/node_modules/sequelize-cli/src/assets/models/model.js new file mode 100644 index 00000000..70007aa5 --- /dev/null +++ b/node_modules/sequelize-cli/src/assets/models/model.js @@ -0,0 +1,18 @@ +'use strict'; + +module.exports = (sequelize, DataTypes) => { + const <%= name %> = sequelize.define('<%= name %>', { + <% attributes.forEach(function(attribute, index) { %> + <%= attribute.fieldName %>: DataTypes.<%= attribute.dataFunction ? `${attribute.dataFunction.toUpperCase()}(DataTypes.${attribute.dataType.toUpperCase()})` : attribute.dataValues ? `${attribute.dataType.toUpperCase()}(${attribute.dataValues})` : attribute.dataType.toUpperCase() %> + <%= (Object.keys(attributes).length - 1) > index ? ',' : '' %> + <% }) %> + }, { + <%= underscored ? 'underscored: true,' : '' %> + }); + + <%= name %>.associate = function(models) { + // associations can be defined here + }; + + return <%= name %>; +}; diff --git a/node_modules/sequelize-cli/src/assets/seeders/skeleton.js b/node_modules/sequelize-cli/src/assets/seeders/skeleton.js new file mode 100644 index 00000000..989f2229 --- /dev/null +++ b/node_modules/sequelize-cli/src/assets/seeders/skeleton.js @@ -0,0 +1,26 @@ +'use strict'; + +module.exports = { + up: (queryInterface, Sequelize) => { + /* + Add altering commands here. + Return a promise to correctly handle asynchronicity. + + Example: + return queryInterface.bulkInsert('People', [{ + name: 'John Doe', + isBetaMember: false + }], {}); + */ + }, + + down: (queryInterface, Sequelize) => { + /* + Add reverting commands here. + Return a promise to correctly handle asynchronicity. + + Example: + return queryInterface.bulkDelete('People', null, {}); + */ + } +}; diff --git a/node_modules/sequelize-cli/src/commands/database.js b/node_modules/sequelize-cli/src/commands/database.js new file mode 100644 index 00000000..c8c72df2 --- /dev/null +++ b/node_modules/sequelize-cli/src/commands/database.js @@ -0,0 +1,148 @@ +import { _baseOptions } from '../core/yargs'; +import { logMigrator } from '../core/migrator'; + +import helpers from '../helpers'; +import { cloneDeep, defaults, pick } from 'lodash'; +import clc from 'cli-color'; + +const Sequelize = helpers.generic.getSequelize(); + +exports.builder = + yargs => + _baseOptions(yargs) + .option('charset', { + describe: 'Pass charset option to dialect, MYSQL only', + type: 'string' + }) + .option('collate', { + describe: 'Pass collate option to dialect', + type: 'string' + }) + .option('encoding', { + describe: 'Pass encoding option to dialect, PostgreSQL only', + type: 'string' + }) + .option('ctype', { + describe: 'Pass ctype option to dialect, PostgreSQL only', + type: 'string' + }) + .option('template', { + describe: 'Pass template option to dialect, PostgreSQL only', + type: 'string' + }) + .argv; + +exports.handler = async function (args) { + const command = args._[0]; + + // legacy, gulp used to do this + await helpers.config.init(); + + const sequelize = getDatabaseLessSequelize(); + const config = helpers.config.readConfig(); + + switch (command) { + case 'db:create': + const options = pick(args, [ + 'charset', + 'collate', + 'encoding', + 'ctype', + 'template' + ]); + + const query = getCreateDatabaseQuery(sequelize, config, options); + + await sequelize.query(query, { + type: sequelize.QueryTypes.RAW + }).catch(e => helpers.view.error(e)); + + helpers.view.log( + 'Database', + clc.blueBright(config.database), + 'created.' + ); + + break; + case 'db:drop': + await sequelize.query(`DROP DATABASE ${sequelize.getQueryInterface().quoteIdentifier(config.database)}`, { + type: sequelize.QueryTypes.RAW + }).catch(e => helpers.view.error(e)); + + helpers.view.log( + 'Database', + clc.blueBright(config.database), + 'dropped.' + ); + + break; + } + + process.exit(0); +}; + +function getCreateDatabaseQuery (sequelize, config, options) { + switch (config.dialect) { + case 'postgres': + case 'postgres-native': + return 'CREATE DATABASE ' + sequelize.getQueryInterface().quoteIdentifier(config.database) + + (options.encoding ? ' ENCODING = ' + sequelize.getQueryInterface().quoteIdentifier(options.encoding) : '') + + (options.collate ? ' LC_COLLATE = ' + sequelize.getQueryInterface().quoteIdentifier(options.collate) : '') + + (options.ctype ? ' LC_CTYPE = ' + sequelize.getQueryInterface().quoteIdentifier(options.ctype) : '') + + (options.template ? ' TEMPLATE = ' + sequelize.getQueryInterface().quoteIdentifier(options.template) : ''); + + case 'mysql': + return 'CREATE DATABASE IF NOT EXISTS ' + sequelize.getQueryInterface().quoteIdentifier(config.database) + + (options.charset ? ' DEFAULT CHARACTER SET ' + sequelize.getQueryInterface().quoteIdentifier(options.charset) : '') + + (options.collate ? ' DEFAULT COLLATE ' + sequelize.getQueryInterface().quoteIdentifier(options.collate) : ''); + + case 'mssql': + return 'IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = N\'' + config.database + '\')' + + ' BEGIN' + + ' CREATE DATABASE ' + sequelize.getQueryInterface().quoteIdentifier(config.database) + + (options.collate ? ' COLLATE ' + options.collate : '') + + ' END;'; + break; + + default: + helpers.view.error(`Dialect ${config.dialect} does not support db:create / db:drop commands`); + return 'CREATE DATABASE ' + sequelize.getQueryInterface().quoteIdentifier(config.database); + } +} + +function getDatabaseLessSequelize () { + let config = null; + + try { + config = helpers.config.readConfig(); + } catch (e) { + helpers.view.error(e); + } + + config = cloneDeep(config); + config = defaults(config, { logging: logMigrator }); + + switch (config.dialect) { + case 'postgres': + case 'postgres-native': + config.database = 'postgres'; + break; + + case 'mysql': + delete config.database; + break; + + case 'mssql': + config.database = 'master'; + break; + + default: + helpers.view.error(`Dialect ${config.dialect} does not support db:create / db:drop commands`); + } + + try { + return new Sequelize(config); + } catch (e) { + helpers.view.error(e); + } +} diff --git a/node_modules/sequelize-cli/src/commands/init.js b/node_modules/sequelize-cli/src/commands/init.js new file mode 100644 index 00000000..591c1812 --- /dev/null +++ b/node_modules/sequelize-cli/src/commands/init.js @@ -0,0 +1,64 @@ +import { _baseOptions } from '../core/yargs'; +import helpers from '../helpers'; + +exports.builder = yargs => _baseOptions(yargs) + .option('force', { + describe: 'Will drop the existing config folder and re-create it', + type: 'boolean', + default: false + }) + .argv; + +exports.handler = async function (argv) { + const command = argv._[0]; + + switch (command) { + case 'init': + await initConfig(argv); + await initModels(argv); + await initMigrations(argv); + await initSeeders(argv); + break; + + case 'init:config': + await initConfig(argv); + break; + + case 'init:models': + await initModels(argv); + break; + + case 'init:migrations': + await initMigrations(argv); + break; + + case 'init:seeders': + await initSeeders(argv); + break; + } + + process.exit(0); +}; + +function initConfig (args) { + if (!helpers.config.configFileExists() || !!args.force) { + helpers.config.writeDefaultConfig(); + helpers.view.log('Created "' + helpers.config.relativeConfigFile() + '"'); + } else { + helpers.view.notifyAboutExistingFile(helpers.config.relativeConfigFile()); + process.exit(1); + } +} + +function initModels (args) { + helpers.init.createModelsFolder(!!args.force); + helpers.init.createModelsIndexFile(!!args.force); +} + +function initMigrations (args) { + helpers.init.createMigrationsFolder(!!args.force); +} + +function initSeeders (args) { + helpers.init.createSeedersFolder(!!args.force); +} diff --git a/node_modules/sequelize-cli/src/commands/migrate.js b/node_modules/sequelize-cli/src/commands/migrate.js new file mode 100644 index 00000000..1bce76e1 --- /dev/null +++ b/node_modules/sequelize-cli/src/commands/migrate.js @@ -0,0 +1,97 @@ +import { _baseOptions } from '../core/yargs'; +import { getMigrator, ensureCurrentMetaSchema, addTimestampsToSchema } from '../core/migrator'; + +import helpers from '../helpers'; +import _ from 'lodash'; + +exports.builder = yargs => _baseOptions(yargs) + .option('to', { + describe: 'Migration name to run migrations until', + type: 'string' + }) + .option('from', { + describe: 'Migration name to start migrations from (excluding)', + type: 'string' + }) + .argv; + +exports.handler = async function (args) { + const command = args._[0]; + + // legacy, gulp used to do this + await helpers.config.init(); + + switch (command) { + case 'db:migrate': + await migrate(args); + break; + case 'db:migrate:schema:timestamps:add': + await migrateSchemaTimestampAdd(args); + break; + case 'db:migrate:status': + await migrationStatus(args); + break; + } + + process.exit(0); +}; + +function migrate(args) { + return getMigrator('migration', args).then(migrator => { + return ensureCurrentMetaSchema(migrator) + .then(() => migrator.pending()) + .then(migrations => { + const options = {}; + if (migrations.length === 0) { + helpers.view.log('No migrations were executed, database schema was already up to date.'); + process.exit(0); + } + if (args.to) { + if (migrations.filter(migration => migration.file === args.to).length === 0) { + helpers.view.log('No migrations were executed, database schema was already up to date.'); + process.exit(0); + } + options.to = args.to; + } + if (args.from) { + if (migrations.map(migration => migration.file).lastIndexOf(args.from) === -1) { + helpers.view.log('No migrations were executed, database schema was already up to date.'); + process.exit(0); + } + options.from = args.from; + } + return options; + }) + .then(options => migrator.up(options)); + }).catch(e => helpers.view.error(e)); +} + +function migrationStatus(args) { + return getMigrator('migration', args).then(migrator => { + return ensureCurrentMetaSchema(migrator) + .then(() => migrator.executed()) + .then(migrations => { + _.forEach(migrations, migration => { + helpers.view.log('up', migration.file); + }); + }).then(() => migrator.pending()) + .then(migrations => { + _.forEach(migrations, migration => { + helpers.view.log('down', migration.file); + }); + }); + }).catch(e => helpers.view.error(e)); +} + +function migrateSchemaTimestampAdd(args) { + return getMigrator('migration', args).then(migrator => { + return addTimestampsToSchema(migrator) + .then(items => { + if (items) { + helpers.view.log('Successfully added timestamps to MetaTable.'); + } else { + helpers.view.log('MetaTable already has timestamps.'); + } + }); + }).catch(e => helpers.view.error(e)); +} diff --git a/node_modules/sequelize-cli/src/commands/migrate_undo.js b/node_modules/sequelize-cli/src/commands/migrate_undo.js new file mode 100644 index 00000000..64948426 --- /dev/null +++ b/node_modules/sequelize-cli/src/commands/migrate_undo.js @@ -0,0 +1,41 @@ +import { _baseOptions } from '../core/yargs'; +import { getMigrator, ensureCurrentMetaSchema } from '../core/migrator'; + +import helpers from '../helpers'; + +exports.builder = + yargs => + _baseOptions(yargs) + .option('name', { + describe: 'Name of the migration to undo', + type: 'string' + }) + .argv; + +exports.handler = async function (args) { + // legacy, gulp used to do this + await helpers.config.init(); + + await migrateUndo(args); + + process.exit(0); +}; + +function migrateUndo (args) { + return getMigrator('migration', args).then(migrator => { + return ensureCurrentMetaSchema(migrator).then(() => migrator.executed()) + .then(migrations => { + if (migrations.length === 0) { + helpers.view.log('No executed migrations found.'); + process.exit(0); + } + }) + .then(() => { + if (args.name) { + return migrator.down(args.name); + } else { + return migrator.down(); + } + }); + }).catch(e => helpers.view.error(e)); +} diff --git a/node_modules/sequelize-cli/src/commands/migrate_undo_all.js b/node_modules/sequelize-cli/src/commands/migrate_undo_all.js new file mode 100644 index 00000000..a4efc85f --- /dev/null +++ b/node_modules/sequelize-cli/src/commands/migrate_undo_all.js @@ -0,0 +1,36 @@ +import { _baseOptions } from '../core/yargs'; +import { getMigrator, ensureCurrentMetaSchema } from '../core/migrator'; + +import helpers from '../helpers'; + +exports.builder = + yargs => + _baseOptions(yargs) + .option('to', { + describe: 'Revert to the provided migration', + default: 0, + type: 'string' + }) + .argv; + +exports.handler = async function (args) { + // legacy, gulp used to do this + await helpers.config.init(); + + await migrationUndoAll(args); + + process.exit(0); +}; + +function migrationUndoAll (args) { + return getMigrator('migration', args).then(migrator => { + return ensureCurrentMetaSchema(migrator).then(() => migrator.executed()) + .then(migrations => { + if (migrations.length === 0) { + helpers.view.log('No executed migrations found.'); + process.exit(0); + } + }) + .then(() => migrator.down({ to: args.to || 0 })); + }).catch(e => helpers.view.error(e)); +} diff --git a/node_modules/sequelize-cli/src/commands/migration_generate.js b/node_modules/sequelize-cli/src/commands/migration_generate.js new file mode 100644 index 00000000..2e85376e --- /dev/null +++ b/node_modules/sequelize-cli/src/commands/migration_generate.js @@ -0,0 +1,36 @@ +import { _baseOptions, _underscoreOption } from '../core/yargs'; + +import helpers from '../helpers'; +import fs from 'fs'; +import clc from 'cli-color'; + +exports.builder = + yargs => + _underscoreOption( + _baseOptions(yargs) + .option('name', { + describe: 'Defines the name of the migration', + type: 'string', + demandOption: true + }) + ) + .argv; + +exports.handler = function (args) { + helpers.init.createMigrationsFolder(); + + fs.writeFileSync( + helpers.path.getMigrationPath(args.name), + helpers.template.render('migrations/skeleton.js', {}, { + beautify: false + }) + ); + + helpers.view.log( + 'New migration was created at', + clc.blueBright(helpers.path.getMigrationPath(args.name)), + '.' + ); + + process.exit(0); +}; diff --git a/node_modules/sequelize-cli/src/commands/model_generate.js b/node_modules/sequelize-cli/src/commands/model_generate.js new file mode 100644 index 00000000..22fd5be3 --- /dev/null +++ b/node_modules/sequelize-cli/src/commands/model_generate.js @@ -0,0 +1,82 @@ +import { _baseOptions, _underscoreOption } from '../core/yargs'; + +import helpers from '../helpers'; +import clc from 'cli-color'; + +exports.builder = + yargs => + _underscoreOption( + _baseOptions(yargs) + .option('name', { + describe: 'Defines the name of the new model', + type: 'string', + demandOption: true + }) + .option('attributes', { + describe: 'A list of attributes', + type: 'string', + demandOption: true + }) + .option('force', { + describe: 'Forcefully re-creates model with the same name', + type: 'string', + demandOption: false + }) + ) + .argv; + +exports.handler = function (args) { + ensureModelsFolder(); + ensureMigrationsFolder(); + checkModelFileExistence(args); + + + try { + helpers.model.generateFile(args); + } catch (err) { + helpers.view.error(err.message); + } + + helpers.migration.generateTableCreationFile(args); + helpers.view.log( + 'New model was created at', + clc.blueBright(helpers.path.getModelPath(args.name)), + '.' + ); + helpers.view.log( + 'New migration was created at', + clc.blueBright(helpers.path.getMigrationPath(args.name)), + '.' + ); + + process.exit(0); +}; + +function ensureModelsFolder () { + if (!helpers.path.existsSync(helpers.path.getModelsPath())) { + helpers.view.error( + 'Unable to find models path (' + + helpers.path.getModelsPath() + + '). Did you run ' + clc.blueBright('sequelize init') + '?' + ); + } +} + +function ensureMigrationsFolder () { + if (!helpers.path.existsSync(helpers.path.getPath('migration'))) { + helpers.view.error( + 'Unable to find migrations path (' + + helpers.path.getPath('migration') + + '). Did you run ' + clc.blueBright('sequelize init') + '?' + ); + } +} + +function checkModelFileExistence (args) { + const modelPath = helpers.path.getModelPath(args.name); + + if (args.force === undefined && helpers.model.modelFileExists(modelPath)) { + helpers.view.notifyAboutExistingFile(modelPath); + process.exit(1); + } +} diff --git a/node_modules/sequelize-cli/src/commands/seed.js b/node_modules/sequelize-cli/src/commands/seed.js new file mode 100644 index 00000000..630c210d --- /dev/null +++ b/node_modules/sequelize-cli/src/commands/seed.js @@ -0,0 +1,55 @@ +import { _baseOptions } from '../core/yargs'; +import { getMigrator } from '../core/migrator'; + +import helpers from '../helpers'; +import _ from 'lodash'; + +exports.builder = yargs => _baseOptions(yargs).argv; +exports.handler = async function (args) { + const command = args._[0]; + + // legacy, gulp used to do this + await helpers.config.init(); + + switch (command) { + case 'db:seed:all': + await seedAll(args); + break; + + case 'db:seed:undo:all': + await seedUndoAll(args); + break; + } + + process.exit(0); +}; + +function seedAll (args) { + return getMigrator('seeder', args).then(migrator => { + return migrator.pending() + .then(seeders => { + if (seeders.length === 0) { + helpers.view.log('No seeders found.'); + return; + } + + return migrator.up({ migrations: _.chain(seeders).map('file').value() }); + }); + }).catch(e => helpers.view.error(e)); +} + +function seedUndoAll (args) { + return getMigrator('seeder', args).then(migrator => { + return ( + helpers.umzug.getStorage('seeder') === 'none' ? migrator.pending() : migrator.executed() + ) + .then(seeders => { + if (seeders.length === 0) { + helpers.view.log('No seeders found.'); + return; + } + + return migrator.down({ migrations: _.chain(seeders).map('file').reverse().value() }); + }); + }).catch(e => helpers.view.error(e)); +} diff --git a/node_modules/sequelize-cli/src/commands/seed_generate.js b/node_modules/sequelize-cli/src/commands/seed_generate.js new file mode 100644 index 00000000..be4bc505 --- /dev/null +++ b/node_modules/sequelize-cli/src/commands/seed_generate.js @@ -0,0 +1,34 @@ +import { _baseOptions } from '../core/yargs'; + +import helpers from '../helpers'; +import fs from 'fs'; +import clc from 'cli-color'; + +exports.builder = + yargs => + _baseOptions(yargs) + .option('name', { + describe: 'Defines the name of the seed', + type: 'string', + demandOption: true + }) + .argv; + +exports.handler = function (args) { + helpers.init.createSeedersFolder(); + + fs.writeFileSync( + helpers.path.getSeederPath(args.name), + helpers.template.render('seeders/skeleton.js', {}, { + beautify: false + }) + ); + + helpers.view.log( + 'New seed was created at', + clc.blueBright(helpers.path.getSeederPath(args.name)), + '.' + ); + + process.exit(0); +}; diff --git a/node_modules/sequelize-cli/src/commands/seed_one.js b/node_modules/sequelize-cli/src/commands/seed_one.js new file mode 100644 index 00000000..8b6dcdb2 --- /dev/null +++ b/node_modules/sequelize-cli/src/commands/seed_one.js @@ -0,0 +1,45 @@ +import { _baseOptions } from '../core/yargs'; +import { getMigrator } from '../core/migrator'; + +import helpers from '../helpers'; +import path from 'path'; + +exports.builder = + yargs => + _baseOptions(yargs) + .option('seed', { + describe: 'List of seed files', + type: 'array' + }) + .argv; + +exports.handler = async function (args) { + const command = args._[0]; + + // legacy, gulp used to do this + await helpers.config.init(); + + // filter out cmd names + // for case like --seeders-path seeders --seed seedPerson.js db:seed + const seeds= (args.seed || []) + .filter(name => name !== 'db:seed' && name !== 'db:seed:undo') + .map(file => path.basename(file)); + + + switch (command) { + case 'db:seed': + await getMigrator('seeder', args).then(migrator => { + return migrator.up(seeds); + }).catch(e => helpers.view.error(e)); + break; + + case 'db:seed:undo': + await getMigrator('seeder', args).then(migrator => { + return migrator.down({ migrations: seeds }); + }).catch(e => helpers.view.error(e)); + break; + } + + process.exit(0); +}; + diff --git a/node_modules/sequelize-cli/src/core/migrator.js b/node_modules/sequelize-cli/src/core/migrator.js new file mode 100644 index 00000000..90eaada6 --- /dev/null +++ b/node_modules/sequelize-cli/src/core/migrator.js @@ -0,0 +1,152 @@ +import Umzug from 'umzug'; +import Bluebird from 'bluebird'; +import _ from 'lodash'; + +import helpers from '../helpers/index'; + +const Sequelize = helpers.generic.getSequelize(); + +export function logMigrator (s) { + if (s.indexOf('Executing') !== 0) { + helpers.view.log(s); + } +} + +function getSequelizeInstance () { + let config = null; + + try { + config = helpers.config.readConfig(); + } catch (e) { + helpers.view.error(e); + } + + config = _.defaults(config, { logging: logMigrator }); + + try { + return new Sequelize(config); + } catch (e) { + helpers.view.error(e); + } +} + +export function getMigrator (type, args) { + return Bluebird.try(() => { + if (!(helpers.config.configFileExists() || args.url)) { + helpers.view.error( + 'Cannot find "' + helpers.config.getConfigFile() + + '". Have you run "sequelize init"?' + ); + process.exit(1); + } + + const sequelize = getSequelizeInstance(); + const migrator = new Umzug({ + storage: helpers.umzug.getStorage(type), + storageOptions: helpers.umzug.getStorageOptions(type, { sequelize }), + logging: helpers.view.log, + migrations: { + params: [sequelize.getQueryInterface(), Sequelize], + path: helpers.path.getPath(type), + pattern: /\.js$/, + wrap: fun => { + if (fun.length === 3) { + return Bluebird.promisify(fun); + } else { + return fun; + } + } + } + }); + + return sequelize + .authenticate() + .then(() => { + // Check if this is a PostgreSQL run and if there is a custom schema specified, and if there is, check if it's + // been created. If not, attempt to create it. + if (helpers.version.getDialectName() === 'pg') { + const customSchemaName = helpers.umzug.getSchema('migration'); + if (customSchemaName && customSchemaName !== 'public') { + return sequelize.createSchema(customSchemaName); + } + } + + return Bluebird.resolve(); + }) + .then(() => migrator) + .catch(e => helpers.view.error(e)); + }); +} + +export function ensureCurrentMetaSchema (migrator) { + const queryInterface = migrator.options.storageOptions.sequelize.getQueryInterface(); + const tableName = migrator.options.storageOptions.tableName; + const columnName = migrator.options.storageOptions.columnName; + + return ensureMetaTable(queryInterface, tableName) + .then(table => { + const columns = Object.keys(table); + + if (columns.length === 1 && columns[0] === columnName) { + return; + } else if (columns.length === 3 && columns.indexOf('createdAt') >= 0) { + return; + } + }) + .catch(() => {}); +} + +function ensureMetaTable (queryInterface, tableName) { + return queryInterface.showAllTables() + .then(tableNames => { + if (tableNames.indexOf(tableName) === -1) { + throw new Error('No MetaTable table found.'); + } + return queryInterface.describeTable(tableName); + }); +} + +/** + * Add timestamps + * + * @return {Promise} + */ +export function addTimestampsToSchema (migrator) { + const sequelize = migrator.options.storageOptions.sequelize; + const queryInterface = sequelize.getQueryInterface(); + const tableName = migrator.options.storageOptions.tableName; + + return ensureMetaTable(queryInterface, tableName) + .then(table => { + if (table.createdAt) { + return; + } + + return ensureCurrentMetaSchema(migrator) + .then(() => queryInterface.renameTable(tableName, tableName + 'Backup')) + .then(() => { + const sql = queryInterface.QueryGenerator.selectQuery(tableName + 'Backup'); + return helpers.generic.execQuery(sequelize, sql, { type: 'SELECT', raw: true }); + }) + .then(result => { + const SequelizeMeta = sequelize.define(tableName, { + name: { + type: Sequelize.STRING, + allowNull: false, + unique: true, + primaryKey: true, + autoIncrement: false + } + }, { + tableName, + timestamps: true, + schema: helpers.umzug.getSchema() + }); + + return SequelizeMeta.sync() + .then(() => { + return SequelizeMeta.bulkCreate(result); + }); + }); + }); +} diff --git a/node_modules/sequelize-cli/src/core/yargs.js b/node_modules/sequelize-cli/src/core/yargs.js new file mode 100644 index 00000000..71011b84 --- /dev/null +++ b/node_modules/sequelize-cli/src/core/yargs.js @@ -0,0 +1,70 @@ +import fs from 'fs'; +import yargs from 'yargs'; +import path from 'path'; + +function loadRCFile(optionsPath) { + const rcFile = optionsPath || path.resolve(process.cwd(), '.sequelizerc'); + const rcFileResolved = path.resolve(rcFile); + return fs.existsSync(rcFileResolved) + ? JSON.parse(JSON.stringify(require(rcFileResolved))) + : {}; +} + +const args = yargs + .help(false) + .version(false) + .config(loadRCFile(yargs.argv.optionsPath)); + +export default function getYArgs () { + return args; +} + +export function _baseOptions (yargs) { + return yargs + .option('env', { + describe: 'The environment to run the command in', + default: 'development', + type: 'string' + }) + .option('config', { + describe: 'The path to the config file', + type: 'string' + }) + .option('options-path', { + describe: 'The path to a JSON file with additional options', + type: 'string' + }) + .option('migrations-path', { + describe: 'The path to the migrations folder', + default: 'migrations', + type: 'string' + }) + .option('seeders-path', { + describe: 'The path to the seeders folder', + default: 'seeders', + type: 'string' + }) + .option('models-path', { + describe: 'The path to the models folder', + default: 'models', + type: 'string' + }) + .option('url', { + describe: 'The database connection string to use. Alternative to using --config files', + type: 'string' + }) + .option('debug', { + describe: 'When available show various debug information', + default: false, + type: 'boolean' + }); +} + +export function _underscoreOption (yargs) { + return yargs + .option('underscored', { + describe: "Use snake case for the timestamp's attribute names", + default: false, + type: 'boolean' + }); +} diff --git a/node_modules/sequelize-cli/src/helpers/asset-helper.js b/node_modules/sequelize-cli/src/helpers/asset-helper.js new file mode 100644 index 00000000..a6482b31 --- /dev/null +++ b/node_modules/sequelize-cli/src/helpers/asset-helper.js @@ -0,0 +1,32 @@ +import fs from 'fs-extra'; +import path from 'path'; + +const assets = { + copy: (from, to) => { + fs.copySync(path.resolve(__dirname, '..', 'assets', from), to); + }, + + read: assetPath => { + return fs.readFileSync(path.resolve(__dirname, '..', 'assets', assetPath)).toString(); + }, + + write: (targetPath, content) => { + fs.writeFileSync(targetPath, content); + }, + + inject: (filePath, token, content) => { + const fileContent = fs.readFileSync(filePath).toString(); + fs.writeFileSync(filePath, fileContent.replace(token, content)); + }, + + injectConfigFilePath: (filePath, configPath) => { + this.inject(filePath, '__CONFIG_FILE__', configPath); + }, + + mkdirp: pathToCreate => { + fs.mkdirpSync(pathToCreate); + } +}; + +module.exports = assets; +module.exports.default = assets; \ No newline at end of file diff --git a/node_modules/sequelize-cli/src/helpers/config-helper.js b/node_modules/sequelize-cli/src/helpers/config-helper.js new file mode 100644 index 00000000..9ea7b772 --- /dev/null +++ b/node_modules/sequelize-cli/src/helpers/config-helper.js @@ -0,0 +1,203 @@ +import Bluebird from 'bluebird'; +import path from 'path'; +import fs from 'fs'; +import url from 'url'; +import _ from 'lodash'; +import helpers from './index'; +import getYArgs from '../core/yargs'; + +const args = getYArgs().argv; + +const api = { + config: undefined, + rawConfig: undefined, + error: undefined, + init () { + return Bluebird.resolve() + .then(() => { + let config; + + if (args.url) { + config = api.parseDbUrl(args.url); + } else { + try { + config = require(api.getConfigFile()); + } catch (e) { + api.error = e; + } + } + return config; + }) + .then(config => { + if (typeof config === 'object' || config === undefined) { + return config; + } else if (config.length === 1) { + return Bluebird.promisify(config)(); + } else { + return config(); + } + }) + .then(config => { + api.rawConfig = config; + }) + .then(() => { + // Always return the full config api + return api; + }); + }, + getConfigFile () { + if (args.config) { + return path.resolve(process.cwd(), args.config); + } + + const defaultPath = path.resolve(process.cwd(), 'config', 'config.json'); + const alternativePath = defaultPath.replace('.json', '.js'); + + return helpers.path.existsSync(alternativePath) ? alternativePath : defaultPath; + }, + + relativeConfigFile () { + return path.relative(process.cwd(), api.getConfigFile()); + }, + + configFileExists () { + return helpers.path.existsSync(api.getConfigFile()); + }, + + getDefaultConfig () { + return JSON.stringify({ + development: { + username: 'root', + password: null, + database: 'database_development', + host: '127.0.0.1', + dialect: 'mysql', + operatorsAliases: false + }, + test: { + username: 'root', + password: null, + database: 'database_test', + host: '127.0.0.1', + dialect: 'mysql', + operatorsAliases: false + }, + production: { + username: 'root', + password: null, + database: 'database_production', + host: '127.0.0.1', + dialect: 'mysql', + operatorsAliases: false + } + }, undefined, 2) + '\n'; + }, + + writeDefaultConfig () { + const configPath = path.dirname(api.getConfigFile()); + + if (!helpers.path.existsSync(configPath)) { + helpers.asset.mkdirp(configPath); + } + + fs.writeFileSync(api.getConfigFile(), api.getDefaultConfig()); + }, + + readConfig () { + if (!api.config) { + const env = helpers.generic.getEnvironment(); + + if (api.rawConfig === undefined) { + throw new Error( + 'Error reading "' + + api.relativeConfigFile() + + '". Error: ' + api.error + ); + } + + if (typeof api.rawConfig !== 'object') { + throw new Error( + 'Config must be an object or a promise for an object: ' + + api.relativeConfigFile() + ); + } + + if (args.url) { + helpers.view.log('Parsed url ' + api.filteredUrl(args.url, api.rawConfig)); + } else { + helpers.view.log('Loaded configuration file "' + api.relativeConfigFile() + '".'); + } + + if (api.rawConfig[env]) { + helpers.view.log('Using environment "' + env + '".'); + + api.rawConfig = api.rawConfig[env]; + } + + // The Sequelize library needs a function passed in to its logging option + if (api.rawConfig.logging && !_.isFunction(api.rawConfig.logging)) { + api.rawConfig.logging = console.log; + } + + // in case url is present - we overwrite the configuration + if (api.rawConfig.url) { + api.rawConfig = _.merge(api.rawConfig, api.parseDbUrl(api.rawConfig.url)); + } else if (api.rawConfig.use_env_variable) { + api.rawConfig = _.merge( + api.rawConfig, + api.parseDbUrl(process.env[api.rawConfig.use_env_variable]) + ); + } + + api.config = api.rawConfig; + } + return api.config; + }, + + filteredUrl (uri, config) { + const regExp = new RegExp(':?' + _.escapeRegExp(config.password) + '@'); + return uri.replace(regExp, ':*****@'); + }, + + urlStringToConfigHash (urlString) { + try { + const urlParts = url.parse(urlString); + let result = { + database: urlParts.pathname.replace(/^\//, ''), + host: urlParts.hostname, + port: urlParts.port, + protocol: urlParts.protocol.replace(/:$/, ''), + ssl: urlParts.query ? urlParts.query.indexOf('ssl=true') >= 0 : false + }; + + if (urlParts.auth) { + result = _.assign(result, { + username: urlParts.auth.split(':')[0], + password: urlParts.auth.split(':')[1] + }); + } + + return result; + } catch (e) { + throw new Error('Error parsing url: ' + urlString); + } + }, + + parseDbUrl (urlString) { + let config = api.urlStringToConfigHash(urlString); + + config = _.assign(config, { + dialect: config.protocol + }); + + if (config.dialect === 'sqlite' && config.database.indexOf(':memory') !== 0) { + config = _.assign(config, { + storage: '/' + config.database + }); + } + + return config; + } +}; + +module.exports = api; \ No newline at end of file diff --git a/node_modules/sequelize-cli/src/helpers/generic-helper.js b/node_modules/sequelize-cli/src/helpers/generic-helper.js new file mode 100644 index 00000000..e53df1ca --- /dev/null +++ b/node_modules/sequelize-cli/src/helpers/generic-helper.js @@ -0,0 +1,44 @@ +import path from 'path'; + +const resolve = require('resolve').sync; +import getYArgs from '../core/yargs'; + +const args = getYArgs().argv; + +const generic = { + getEnvironment: () => { + return args.env || process.env.NODE_ENV || 'development'; + }, + + getSequelize: file => { + const resolvePath = file ? path.join('sequelize', file) : 'sequelize'; + const resolveOptions = { basedir: process.cwd() }; + + let sequelizePath; + + try { + sequelizePath = require.resolve(resolvePath, resolveOptions); + } catch (e) { + } + + try { + sequelizePath = sequelizePath || resolve(resolvePath, resolveOptions); + } catch (e) { + console.error('Unable to resolve sequelize package in ' + process.cwd()); + process.exit(1); + } + + return require(sequelizePath); + }, + + execQuery: (sequelize, sql, options) => { + if (sequelize.query.length === 2) { + return sequelize.query(sql, options); + } else { + return sequelize.query(sql, null, options); + } + } +}; + +module.exports = generic; +module.exports.default = generic; diff --git a/node_modules/sequelize-cli/src/helpers/index.js b/node_modules/sequelize-cli/src/helpers/index.js new file mode 100644 index 00000000..a58b5f28 --- /dev/null +++ b/node_modules/sequelize-cli/src/helpers/index.js @@ -0,0 +1,13 @@ +import path from 'path'; +import fs from 'fs'; + +module.exports = {}; + +fs + .readdirSync(__dirname) + .filter(file => file.indexOf('.') !== 0 && file.indexOf('index.js') === -1) + .forEach(file => { + module.exports[file.replace('-helper.js', '')] = require(path.resolve(__dirname, file)); + }); + +module.exports.default = module.exports; diff --git a/node_modules/sequelize-cli/src/helpers/init-helper.js b/node_modules/sequelize-cli/src/helpers/init-helper.js new file mode 100644 index 00000000..fcbf6fcb --- /dev/null +++ b/node_modules/sequelize-cli/src/helpers/init-helper.js @@ -0,0 +1,80 @@ +import helpers from './index'; +import path from 'path'; +import fs from 'fs'; + +function createFolder (folderName, folder, force) { + if (force && fs.existsSync(folder) === true) { + helpers.view.log('Deleting the ' + folderName + ' folder. (--force)'); + + try { + fs.readdirSync(folder).forEach(filename => { + fs.unlinkSync(path.resolve(folder, filename)); + }); + } catch (e) { + helpers.view.error(e); + } + + try { + fs.rmdirSync(folder); + helpers.view.log('Successfully deleted the ' + folderName + ' folder.'); + } catch (e) { + helpers.view.error(e); + } + } + + try { + if (fs.existsSync(folder) === false) { + helpers.asset.mkdirp(folder); + helpers.view.log('Successfully created ' + folderName + ' folder at "' + folder + '".'); + } else { + helpers.view.log(folderName + ' folder at "' + folder + '" already exists.'); + } + } catch (e) { + helpers.view.error(e); + } +}; + +const init = { + createMigrationsFolder: force => { + createFolder('migrations', helpers.path.getPath('migration'), force); + }, + + createSeedersFolder: force => { + createFolder('seeders', helpers.path.getPath('seeder'), force); + }, + + createModelsFolder: force => { + createFolder('models', helpers.path.getModelsPath(), force); + }, + + createModelsIndexFile: force => { + const modelsPath = helpers.path.getModelsPath(); + const indexPath = path.resolve( + modelsPath, + helpers.path.addFileExtension('index') + ); + + if (!helpers.path.existsSync(modelsPath)) { + helpers.view.log('Models folder not available.'); + } else if (helpers.path.existsSync(indexPath) && !force) { + helpers.view.notifyAboutExistingFile(indexPath); + } else { + const relativeConfigPath = path.relative( + helpers.path.getModelsPath(), + helpers.config.getConfigFile() + ); + + helpers.asset.write( + indexPath, + helpers.template.render('models/index.js', { + configFile: '__dirname + \'/' + relativeConfigPath.replace(/\\/g, '/') + '\'' + }, { + beautify: false + }) + ); + } + } +}; + +module.exports = init; +module.exports.default = init; diff --git a/node_modules/sequelize-cli/src/helpers/migration-helper.js b/node_modules/sequelize-cli/src/helpers/migration-helper.js new file mode 100644 index 00000000..1d7e2191 --- /dev/null +++ b/node_modules/sequelize-cli/src/helpers/migration-helper.js @@ -0,0 +1,30 @@ +import _ from 'lodash'; +import helpers from './index'; + +const Sequelize = helpers.generic.getSequelize(); + +module.exports = { + getTableName (modelName) { + return Sequelize.Utils.pluralize(modelName); + }, + + generateTableCreationFileContent (args) { + return helpers.template.render('migrations/create-table.js', { + tableName: this.getTableName(args.name), + attributes: helpers.model.transformAttributes(args.attributes), + createdAt: args.underscored ? 'created_at' : 'createdAt', + updatedAt: args.underscored ? 'updated_at' : 'updatedAt' + }); + }, + + generateMigrationName (args) { + return _.trimStart(_.kebabCase('create-' + args.name), '-'); + }, + + generateTableCreationFile (args) { + const migrationName = this.generateMigrationName(args); + const migrationPath = helpers.path.getMigrationPath(migrationName); + + helpers.asset.write(migrationPath, this.generateTableCreationFileContent(args)); + } +}; diff --git a/node_modules/sequelize-cli/src/helpers/model-helper.js b/node_modules/sequelize-cli/src/helpers/model-helper.js new file mode 100644 index 00000000..7fd5756f --- /dev/null +++ b/node_modules/sequelize-cli/src/helpers/model-helper.js @@ -0,0 +1,98 @@ +import helpers from './index'; + +const Sequelize = helpers.generic.getSequelize(); +const validAttributeFunctionType = ['array', 'enum']; + +/** + * Check the given dataType actual exists. + * @param {string} dataType + */ +function validateDataType (dataType) { + if (!Sequelize.DataTypes[dataType.toUpperCase()]) { + throw new Error(`Unknown type '${dataType}'`); + } + + return dataType; +} + +function formatAttributes (attribute) { + let result; + const split = attribute.split(':'); + + if (split.length === 2) { + result = { fieldName: split[0], dataType: split[1], dataFunction: null, dataValues: null }; + } else if (split.length === 3) { + const validValues = /^\{(,? ?[A-z0-9 ]+)+\}$/; + const isValidFunction = validAttributeFunctionType.indexOf(split[1].toLowerCase()) !== -1; + const isValidValue = validAttributeFunctionType.indexOf(split[2].toLowerCase()) === -1 && split[2].match(validValues) === null; + const isValidValues = split[2].match(validValues) !== null; + + if (isValidFunction && isValidValue && !isValidValues) { + result = { fieldName: split[0], dataType: split[2], dataFunction: split[1], dataValues: null }; + } + + if (isValidFunction && !isValidValue && isValidValues) { + result = { fieldName: split[0], dataType: split[1], dataFunction: null, dataValues: split[2].replace(/(^\{|\}$)/g, '').split(/\s*,\s*/).map(s => `'${s}'`).join(', ') }; + } + } + + return result; +} + +module.exports = { + transformAttributes (flag) { + /* + possible flag formats: + - first_name:string,last_name:string,bio:text,role:enum:{Admin, 'Guest User'},reviews:array:string + - 'first_name:string last_name:string bio:text role:enum:{Admin, Guest User} reviews:array:string' + - 'first_name:string, last_name:string, bio:text, role:enum:{Admin, Guest User} reviews:array:string' + */ + const attributeStrings = flag.split('').map((() => { + let openValues = false; + return a => { + if ((a === ',' || a === ' ') && !openValues) { + return ' '; + } + if (a === '{') { + openValues = true; + } + if (a === '}') { + openValues = false; + } + + return a; + }; + })()).join('').split(/\s{2,}/); + + return attributeStrings.map(attribute => { + const formattedAttribute = formatAttributes(attribute); + + try { + validateDataType(formattedAttribute.dataType); + } catch (err) { + throw new Error(`Attribute '${attribute}' cannot be parsed: ${err.message}`); + } + + return formattedAttribute; + }); + }, + + generateFileContent (args) { + + return helpers.template.render('models/model.js', { + name: args.name, + attributes: this.transformAttributes(args.attributes), + underscored: args.underscored + }); + }, + + generateFile (args) { + const modelPath = helpers.path.getModelPath(args.name); + + helpers.asset.write(modelPath, this.generateFileContent(args)); + }, + + modelFileExists (filePath) { + return helpers.path.existsSync(filePath); + } +}; diff --git a/node_modules/sequelize-cli/src/helpers/path-helper.js b/node_modules/sequelize-cli/src/helpers/path-helper.js new file mode 100644 index 00000000..e3d6ab3e --- /dev/null +++ b/node_modules/sequelize-cli/src/helpers/path-helper.js @@ -0,0 +1,103 @@ +import path from 'path'; +import fs from 'fs'; + +const resolve = require('resolve').sync; +import getYArgs from '../core/yargs'; + +const args = getYArgs().argv; + +function format (i) { + return parseInt(i, 10) < 10 ? '0' + i : i; +}; + +function getCurrentYYYYMMDDHHmms () { + const date = new Date(); + return [ + date.getUTCFullYear(), + format(date.getUTCMonth() + 1), + format(date.getUTCDate()), + format(date.getUTCHours()), + format(date.getUTCMinutes()), + format(date.getUTCSeconds()) + ].join(''); +} + +module.exports = { + getPath (type) { + type = type + 's'; + + let result = args[type + 'Path'] || path.resolve(process.cwd(), type); + + if (path.normalize(result) !== path.resolve(result)) { + // the path is relative + result = path.resolve(process.cwd(), result); + } + + return result; + }, + + getFileName (type, name, options) { + return this.addFileExtension( + [ + getCurrentYYYYMMDDHHmms(), + name ? name : 'unnamed-' + type + ].join('-'), + options + ); + }, + + getFileExtension () { + return 'js'; + }, + + addFileExtension (basename, options) { + return [basename, this.getFileExtension(options)].join('.'); + }, + + getMigrationPath (migrationName) { + return path.resolve(this.getPath('migration'), this.getFileName('migration', migrationName)); + }, + + getSeederPath (seederName) { + return path.resolve(this.getPath('seeder'), this.getFileName('seeder', seederName)); + }, + + getModelsPath () { + return args.modelsPath || path.resolve(process.cwd(), 'models'); + }, + + getModelPath (modelName) { + return path.resolve( + this.getModelsPath(), + this.addFileExtension(modelName.toLowerCase()) + ); + }, + + resolve (packageName) { + let result; + + try { + result = resolve(packageName, { basedir: process.cwd() }); + result = require(result); + } catch (e) { + try { + result = require(packageName); + } catch (err) {} + } + + return result; + }, + + existsSync (pathToCheck) { + if (fs.accessSync) { + try { + fs.accessSync(pathToCheck, fs.R_OK); + return true; + } catch (e) { + return false; + } + } else { + return fs.existsSync(pathToCheck); + } + } +}; diff --git a/node_modules/sequelize-cli/src/helpers/template-helper.js b/node_modules/sequelize-cli/src/helpers/template-helper.js new file mode 100644 index 00000000..c299990b --- /dev/null +++ b/node_modules/sequelize-cli/src/helpers/template-helper.js @@ -0,0 +1,22 @@ +import _ from 'lodash'; +import beautify from 'js-beautify'; +import helpers from './index'; + +module.exports = { + render (path, locals, options) { + options = _.assign({ + beautify: true, + indent_size: 2, + preserve_newlines: false + }, options || {}); + + const template = helpers.asset.read(path); + let content = _.template(template)(locals || {}); + + if (options.beautify) { + content = beautify(content, options); + } + + return content; + } +}; diff --git a/node_modules/sequelize-cli/src/helpers/umzug-helper.js b/node_modules/sequelize-cli/src/helpers/umzug-helper.js new file mode 100644 index 00000000..34c59674 --- /dev/null +++ b/node_modules/sequelize-cli/src/helpers/umzug-helper.js @@ -0,0 +1,55 @@ +import path from 'path'; +import _ from 'lodash'; +import helpers from './index'; + +const storage = { + migration: 'sequelize', + seeder: 'none' +}; +const storageTableName = { + migration: 'SequelizeMeta', + seeder: 'SequelizeData' +}; +const storageJsonName = { + migration: 'sequelize-meta.json', + seeder: 'sequelize-data.json' +}; + +module.exports = { + getStorageOption (property, fallback) { + return helpers.config.readConfig()[property] || fallback; + }, + + getStorage (type) { + return this.getStorageOption(type + 'Storage', storage[type]); + }, + + getStoragePath (type) { + const fallbackPath = path.join(process.cwd(), storageJsonName[type]); + + return this.getStorageOption(type + 'StoragePath', fallbackPath); + }, + + getTableName (type) { + return this.getStorageOption(type + 'StorageTableName', storageTableName[type]); + }, + + getSchema (type) { + return this.getStorageOption(type + 'StorageTableSchema', undefined); + }, + + getStorageOptions (type, extraOptions) { + const options = {}; + + if (this.getStorage(type) === 'json') { + options.path = this.getStoragePath(type); + } else if (this.getStorage(type) === 'sequelize') { + options.tableName = this.getTableName(type); + options.schema = this.getSchema(type); + } + + _.assign(options, extraOptions); + + return options; + } +}; diff --git a/node_modules/sequelize-cli/src/helpers/version-helper.js b/node_modules/sequelize-cli/src/helpers/version-helper.js new file mode 100644 index 00000000..90158964 --- /dev/null +++ b/node_modules/sequelize-cli/src/helpers/version-helper.js @@ -0,0 +1,41 @@ +import path from 'path'; +import helpers from './index'; + +const packageJson = require(path.resolve(__dirname, '..', '..', 'package.json')); + +module.exports = { + getCliVersion () { + return packageJson.version; + }, + + getOrmVersion () { + return helpers.generic.getSequelize('package.json').version; + }, + + getDialect () { + try { + return helpers.config.readConfig(); + } catch (e) { + return null; + } + }, + + getDialectName () { + const config = this.getDialect(); + + if (config) { + return { + 'sqlite': 'sqlite3', + 'postgres': 'pg', + 'mariadb': 'mariasql', + 'mysql': 'mysql' + }[config.dialect]; + } else { + return null; + } + }, + + getNodeVersion () { + return process.version.replace('v', ''); + } +}; diff --git a/node_modules/sequelize-cli/src/helpers/view-helper.js b/node_modules/sequelize-cli/src/helpers/view-helper.js new file mode 100644 index 00000000..c7ba254c --- /dev/null +++ b/node_modules/sequelize-cli/src/helpers/view-helper.js @@ -0,0 +1,67 @@ +import clc from 'cli-color'; +import _ from 'lodash'; +import helpers from './index'; +import getYArgs from '../core/yargs'; + +const args = getYArgs().argv; + +module.exports = { + teaser () { + const versions = [ + 'Node: ' + helpers.version.getNodeVersion(), + 'CLI: ' + helpers.version.getCliVersion(), + 'ORM: ' + helpers.version.getOrmVersion() + ]; + + this.log(); + this.log(clc.underline('Sequelize CLI [' + versions.join(', ') + ']')); + this.log(); + }, + + log () { + console.log.apply(this, arguments); + }, + + error (error) { + let message = error; + + if (error instanceof Error) { + message = !args.debug + ? error.message + : error.stack; + } + + this.log(); + console.error(`${clc.red('ERROR:')} ${message}`); + this.log(); + + process.exit(1); + }, + + warn (message) { + this.log(`${clc.yellow('WARNING:')} ${message}`); + }, + + notifyAboutExistingFile (file) { + this.error( + 'The file ' + clc.blueBright(file) + ' already exists. ' + + 'Run command with --force to overwrite it.' + ); + }, + + pad (s, smth) { + let margin = smth; + + if (_.isObject(margin)) { + margin = Object.keys(margin); + } + + if (Array.isArray(margin)) { + margin = Math.max.apply(null, margin.map(o => { + return o.length; + })); + } + + return s + new Array(margin - s.length + 1).join(' '); + } +}; diff --git a/node_modules/sequelize-cli/src/sequelize.js b/node_modules/sequelize-cli/src/sequelize.js new file mode 100644 index 00000000..35d8f108 --- /dev/null +++ b/node_modules/sequelize-cli/src/sequelize.js @@ -0,0 +1,66 @@ +#!/usr/bin/env node + +import getYArgs from './core/yargs'; +import Promise from 'bluebird'; +import { isEmpty } from 'lodash'; + +const yargs = getYArgs(); + +Promise.coroutine.addYieldHandler(yieldedValue => { + if (Array.isArray(yieldedValue)) { + return Promise.all(yieldedValue); + } +}); + +Promise.coroutine.addYieldHandler(yieldedValue => { + if (isEmpty(yieldedValue)) { + return Promise.resolve(yieldedValue); + } +}); + +import init from './commands/init'; +import migrate from './commands/migrate'; +import migrateUndo from './commands/migrate_undo'; +import migrateUndoAll from './commands/migrate_undo_all'; +import seed from './commands/seed'; +import seedOne from './commands/seed_one'; +import migrationGenerate from './commands/migration_generate'; +import modelGenerate from './commands/model_generate'; +import seedGenerate from './commands/seed_generate'; +import database from './commands/database'; + +import helpers from './helpers/index'; + +helpers.view.teaser(); + +const cli = yargs + .help() + .version() + .command('db:migrate', 'Run pending migrations', migrate) + .command('db:migrate:schema:timestamps:add', 'Update migration table to have timestamps', migrate) + .command('db:migrate:status', 'List the status of all migrations', migrate) + .command('db:migrate:undo', 'Reverts a migration', migrateUndo) + .command('db:migrate:undo:all', 'Revert all migrations ran', migrateUndoAll) + .command('db:seed', 'Run specified seeder', seedOne) + .command('db:seed:undo', 'Deletes data from the database', seedOne) + .command('db:seed:all', 'Run every seeder', seed) + .command('db:seed:undo:all', 'Deletes data from the database', seed) + .command('db:create', 'Create database specified by configuration', database) + .command('db:drop', 'Drop database specified by configuration', database) + .command('init', 'Initializes project', init) + .command('init:config', 'Initializes configuration', init) + .command('init:migrations', 'Initializes migrations', init) + .command('init:models', 'Initializes models', init) + .command('init:seeders', 'Initializes seeders', init) + .command(['migration:generate', 'migration:create'], 'Generates a new migration file', migrationGenerate) + .command(['model:generate', 'model:create'], 'Generates a model and its migration', modelGenerate) + .command(['seed:generate', 'seed:create'], 'Generates a new seed file', seedGenerate) + .wrap(yargs.terminalWidth()) + .strict(); + +const args = cli.argv; + +// if no command then show help +if (!args._[0]) { + cli.showHelp(); +} diff --git a/node_modules/sequelize-cli/test/db/db-create.test.js b/node_modules/sequelize-cli/test/db/db-create.test.js new file mode 100644 index 00000000..b0dc6148 --- /dev/null +++ b/node_modules/sequelize-cli/test/db/db-create.test.js @@ -0,0 +1,197 @@ +const expect = require('expect.js'); +const Support = require(__dirname + '/../support'); +const helpers = require(__dirname + '/../support/helpers'); +const gulp = require('gulp'); +const _ = require('lodash'); + +const prepare = function (flag, callback, options) { + options = _.assign({ config: {} }, options || {}); + + const configPath = 'config/config.json'; + const config = _.assign({}, helpers.getTestConfig(), options.config); + const configContent = JSON.stringify(config); + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.removeFile(configPath)) + .pipe(helpers.overwriteFile(configContent, configPath)) + .pipe(helpers.runCli(flag, { pipeStdout: true })) + .pipe(helpers.teardown(callback)); +}; + +describe(Support.getTestDialectTeaser('db:create'), () => { + if (Support.dialectIsPostgres()) { + it('correctly creates database', function (done) { + const databaseName = `my_test_db_${_.random(10000, 99999)}`; + prepare( + 'db:create', + () => { + this.sequelize.query(`SELECT 1 as exists FROM pg_database WHERE datname = '${databaseName}';`, { + type: this.sequelize.QueryTypes.SELECT + }).then(result => { + expect(result[0].exists).to.eql(1); + done(); + }); + }, { + config: { + database: databaseName + } + }); + }); + + it('correctly creates database with hyphen #545', function (done) { + const databaseName = `my_test-db_${_.random(10000, 99999)}`; + prepare( + 'db:create', + () => { + this.sequelize.query(`SELECT 1 as exists FROM pg_database WHERE datname = '${databaseName}';`, { + type: this.sequelize.QueryTypes.SELECT + }).then(result => { + expect(result[0].exists).to.eql(1); + done(); + }); + }, { + config: { + database: databaseName + } + }); + }); + + it('correctly creates database with encoding, collate and template', function (done) { + const databaseName = `my_test-db_${_.random(10000, 99999)}`; + prepare( + 'db:create --encoding UTF8 --collate zh_TW.UTF-8 --template template0', + () => { + this.sequelize.query(`SELECT + 1 as exists, + pg_encoding_to_char(encoding) as encoding, + datcollate as collate, + datctype as ctype + FROM pg_database WHERE datname = '${databaseName}';`, { + type: this.sequelize.QueryTypes.SELECT + }).then(result => { + expect(result[0].exists).to.eql(1); + expect(result[0].encoding).to.eql('UTF8'); + expect(result[0].collate).to.eql('zh_TW.UTF-8'); + expect(result[0].ctype).to.eql('en_US.utf8'); + done(); + }); + }, { + config: { + database: databaseName + } + }); + }); + + it('correctly creates database with encoding, collate, ctype and template', function (done) { + const databaseName = `my_test-db_${_.random(10000, 99999)}`; + prepare( + 'db:create --encoding UTF8 --collate zh_TW.UTF-8 --ctype zh_TW.UTF-8 --template template0', + () => { + this.sequelize.query(`SELECT + 1 as exists, + pg_encoding_to_char(encoding) as encoding, + datcollate as collate, + datctype as ctype + FROM pg_database WHERE datname = '${databaseName}';`, { + type: this.sequelize.QueryTypes.SELECT + }).then(result => { + expect(result[0].exists).to.eql(1); + expect(result[0].encoding).to.eql('UTF8'); + expect(result[0].collate).to.eql('zh_TW.UTF-8'); + expect(result[0].ctype).to.eql('zh_TW.UTF-8'); + done(); + }); + }, { + config: { + database: databaseName + } + }); + }); + } + + if (Support.dialectIsMySQL()) { + it('correctly creates database', function (done) { + const databaseName = `my_test_db_${_.random(10000, 99999)}`; + prepare( + 'db:create', + () => { + this.sequelize.query(`SELECT IF('${databaseName}' IN(SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA), 1, 0) AS found;`, { + type: this.sequelize.QueryTypes.SELECT + }).then(result => { + expect(result[0].found).to.eql(1); + done(); + }); + }, { + config: { + database: databaseName + } + }); + }); + + it('correctly creates database with hyphen #545', function (done) { + const databaseName = `my_test-db_${_.random(10000, 99999)}`; + prepare( + 'db:create', + () => { + this.sequelize.query(`SELECT IF('${databaseName}' IN(SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA), 1, 0) AS found;`, { + type: this.sequelize.QueryTypes.SELECT + }).then(result => { + expect(result[0].found).to.eql(1); + done(); + }); + }, { + config: { + database: databaseName + } + }); + }); + + it('correctly creates database with charset', function (done) { + const databaseName = `my_test-db_${_.random(10000, 99999)}`; + prepare( + 'db:create --charset utf8mb4', + () => { + this.sequelize.query(`SELECT + DEFAULT_CHARACTER_SET_NAME as charset, + DEFAULT_COLLATION_NAME as collation + FROM information_schema.SCHEMATA WHERE schema_name = '${databaseName}';`, { + type: this.sequelize.QueryTypes.SELECT + }).then(result => { + expect(result[0].charset).to.eql('utf8mb4'); + expect(result[0].collation).to.eql('utf8mb4_general_ci'); + done(); + }); + }, { + config: { + database: databaseName + } + }); + }); + + + it('correctly creates database with charset and collation', function (done) { + const databaseName = `my_test-db_${_.random(10000, 99999)}`; + prepare( + 'db:create --charset utf8mb4 --collate utf8mb4_unicode_ci', + () => { + this.sequelize.query(`SELECT + DEFAULT_CHARACTER_SET_NAME as charset, + DEFAULT_COLLATION_NAME as collation + FROM information_schema.SCHEMATA WHERE schema_name = '${databaseName}';`, { + type: this.sequelize.QueryTypes.SELECT + }).then(result => { + expect(result[0].charset).to.eql('utf8mb4'); + expect(result[0].collation).to.eql('utf8mb4_unicode_ci'); + done(); + }); + }, { + config: { + database: databaseName + } + }); + }); + } +}); diff --git a/node_modules/sequelize-cli/test/db/db-drop.test.js b/node_modules/sequelize-cli/test/db/db-drop.test.js new file mode 100644 index 00000000..05c390ea --- /dev/null +++ b/node_modules/sequelize-cli/test/db/db-drop.test.js @@ -0,0 +1,65 @@ +const expect = require('expect.js'); +const Support = require(__dirname + '/../support'); +const helpers = require(__dirname + '/../support/helpers'); +const gulp = require('gulp'); +const _ = require('lodash'); + +const prepare = function (flag, callback, options) { + options = _.assign({ config: {} }, options || {}); + + const configPath = 'config/config.json'; + const config = _.assign({}, helpers.getTestConfig(), options.config); + const configContent = JSON.stringify(config); + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.removeFile(configPath)) + .pipe(helpers.overwriteFile(configContent, configPath)) + .pipe(helpers.runCli('db:create')) + .pipe(helpers.runCli(flag, { pipeStdout: true })) + .pipe(helpers.teardown(callback)); +}; + +describe(Support.getTestDialectTeaser('db:drop'), () => { + if (Support.dialectIsPostgres()) { + it('correctly drops database', function (done) { + const databaseName = `my_test_db_${_.random(10000, 99999)}`; + prepare( + 'db:drop', + () => { + this.sequelize.query(`SELECT 1 as exists FROM pg_database WHERE datname = '${databaseName}';`, { + type: this.sequelize.QueryTypes.SELECT + }).then(result => { + expect(result).to.be.empty; + done(); + }); + }, { + config: { + database: databaseName + } + }); + }); + } + + if (Support.dialectIsMySQL()) { + it('correctly drops database', function (done) { + const databaseName = `my_test_db_${_.random(10000, 99999)}`; + prepare( + 'db:drop', + () => { + this.sequelize.query(`SELECT IF('${databaseName}' IN(SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA), 1, 0) AS found;`, { + type: this.sequelize.QueryTypes.SELECT + }).then(result => { + expect(result[0].found).to.eql(0); + done(); + }); + }, { + config: { + database: databaseName + } + }); + }); + } +}); diff --git a/node_modules/sequelize-cli/test/db/migrate-json.test.js b/node_modules/sequelize-cli/test/db/migrate-json.test.js new file mode 100644 index 00000000..f2b0d672 --- /dev/null +++ b/node_modules/sequelize-cli/test/db/migrate-json.test.js @@ -0,0 +1,120 @@ +const expect = require('expect.js'); +const Support = require(__dirname + '/../support'); +const helpers = require(__dirname + '/../support/helpers'); +const gulp = require('gulp'); +const fs = require('fs'); +const _ = require('lodash'); + +[ + 'db:migrate', + 'db:migrate --migrations-path migrations', + '--migrations-path migrations db:migrate', + 'db:migrate --migrations-path ./migrations', + 'db:migrate --migrations-path ./migrations/', + 'db:migrate --config ../../support/tmp/config/config.json', + 'db:migrate --config ' + Support.resolveSupportPath('tmp', 'config', 'config.json'), + 'db:migrate --config ../../support/tmp/config/config.js' +].forEach(flag => { + const prepare = function (callback, options) { + options = _.assign({ config: {} }, options || {}); + + let configPath = 'config/'; + let migrationFile = options.migrationFile || 'createPerson'; + const config = _.assign({ + migrationStorage: 'json' + }, helpers.getTestConfig(), options.config); + let configContent = JSON.stringify(config); + + migrationFile = migrationFile + '.js'; + + if (flag.match(/config\.js$/)) { + configPath = configPath + 'config.js'; + configContent = 'module.exports = ' + configContent; + } else { + configPath = configPath + 'config.json'; + } + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.removeFile('config/config.json')) + .pipe(helpers.copyMigration(migrationFile)) + .pipe(helpers.overwriteFile(configContent, configPath)) + .pipe(helpers.runCli(flag, { pipeStdout: true })) + .pipe(helpers.teardown(callback)); + }; + + describe(Support.getTestDialectTeaser(flag) + ' (JSON)', () => { + describe('the migration storage file', () => { + it('should be written to the default location', done => { + const storageFile = Support.resolveSupportPath('tmp', 'sequelize-meta.json'); + + prepare(() => { + expect(fs.statSync(storageFile).isFile()).to.be(true); + expect(fs.readFileSync(storageFile).toString()) + .to.match(/^\[\n "\d{14}-createPerson\.(js)"\n\]$/); + done(); + }); + }); + + it('should be written to the specified location', done => { + const storageFile = Support.resolveSupportPath('tmp', 'custom-meta.json'); + + prepare(() => { + expect(fs.statSync(storageFile).isFile()).to.be(true); + expect(fs.readFileSync(storageFile).toString()) + .to.match(/^\[\n "\d{14}-createPerson\.(js)"\n\]$/); + done(); + }, { config: { migrationStoragePath: storageFile } }); + }); + }); + + it('creates the respective table', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(1); + expect(tables).to.contain('Person'); + done(); + }); + }); + }); + + describe('the logging option', () => { + it('does not print sql queries by default', done => { + prepare((__, stdout) => { + expect(stdout).to.not.contain('Executing'); + done(); + }); + }); + + it('interprets a custom option', done => { + prepare((__, stdout) => { + expect(stdout).to.contain('Executing'); + done(); + }, { config: { logging: true } }); + }); + }); + + describe('promise based migrations', () => { + it('correctly creates two tables', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables.sort()).to.eql([ + 'Person', + 'Task' + ]); + done(); + }); + }, { + migrationFile: 'new/*createPerson', + config: { promisifyMigrations: false } + }); + }); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/db/migrate.test.js b/node_modules/sequelize-cli/test/db/migrate.test.js new file mode 100644 index 00000000..d30a5695 --- /dev/null +++ b/node_modules/sequelize-cli/test/db/migrate.test.js @@ -0,0 +1,434 @@ +const fs = require('fs'); +const expect = require('expect.js'); +const Support = require(__dirname + '/../support'); +const helpers = require(__dirname + '/../support/helpers'); +const gulp = require('gulp'); +const _ = require('lodash'); + +[ + 'db:migrate', + 'db:migrate --migrations-path migrations', + '--migrations-path migrations db:migrate', + 'db:migrate --migrations-path ./migrations', + 'db:migrate --migrations-path ./migrations/', + 'db:migrate --config ../../support/tmp/config/config.json', + 'db:migrate --config ' + Support.resolveSupportPath('tmp', 'config', 'config.json'), + 'db:migrate --config ../../support/tmp/config/config.js', + 'db:migrate --config ../../support/tmp/config/config-promise.js' +].forEach(flag => { + const prepare = function (callback, options) { + options = _.assign({ config: {} }, options || {}); + options.cli = options.cli || {}; + _.defaults(options.cli, { pipeStdout: true }); + + let configPath = 'config/'; + let migrationFile = options.migrationFile || 'createPerson'; + const config = _.assign({}, helpers.getTestConfig(), options.config); + let configContent = JSON.stringify(config); + + migrationFile = migrationFile + '.js'; + if (flag.match(/config\.js$/)) { + configPath = configPath + 'config.js'; + configContent = 'module.exports = ' + configContent; + } else if (flag.match(/config-promise\.js/)) { + configPath = configPath + 'config-promise.js'; + configContent = '' + + 'var b = require("bluebird");' + + 'module.exports = b.resolve(' + configContent + ');'; + } else { + configPath = configPath + 'config.json'; + } + + let result = ''; + + return gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.removeFile('config/config.json')) + .pipe(helpers.copyMigration(migrationFile)) + .pipe(helpers.overwriteFile(configContent, configPath)) + .pipe(helpers.runCli(flag, options.cli)) + .on('error', e => { + callback(e); + }) + .on('data', data => { + result += data.toString(); + }) + .on('end', () => { + callback(null, result); + }); + }; + + describe(Support.getTestDialectTeaser(flag), () => { + it('creates a SequelizeMeta table', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables).to.contain('SequelizeMeta'); + done(); + }); + }); + }); + + it('creates the respective table', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables).to.contain('Person'); + done(); + }); + }); + }); + + it('fails with a not 0 exit code', done => { + prepare(done, { + migrationFile: 'invalid/*createPerson', + cli: { exitCode: 1 } + }); + }); + + describe('the logging option', () => { + it('does not print sql queries by default', done => { + prepare((__, stdout) => { + expect(stdout).to.not.contain('Executing'); + done(); + }); + }); + + it('interpretes a custom option', done => { + prepare((__, stdout) => { + expect(stdout).to.contain('Executing'); + done(); + }, { config: { logging: true } }); + }); + }); + + describe('promise based migrations', () => { + it('correctly creates two tables', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables.sort()).to.eql([ + 'Person', + 'SequelizeMeta', + 'Task' + ]); + done(); + }); + }, { + migrationFile: 'new/*createPerson', + config: { promisifyMigrations: false } + }); + }); + }); + + describe('custom meta table name', () => { + it('correctly uses the defined table name', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables.sort()).to.eql(['Person', 'Task', 'sequelize_meta']); + done(); + }); + }, { + migrationFile: 'new/*createPerson', + config: { migrationStorageTableName: 'sequelize_meta' } + }); + }); + }); + + describe('custom meta schema', () => { + it('correctly uses the defined schema', function (done) { + prepare(() => { + if (Support.dialectIsPostgres()) { + helpers.readSchemas(this.sequelize, schemas => { + expect(schemas.sort()).to.eql(['sequelize_schema']); + + // Tables from public should still be the same. + helpers.readTables(this.sequelize, tables => { + expect(tables.sort()).to.eql(['Person', 'Task']); + done(); + }); + }); + } else { + // If not Postgres, the schema option gets prepended to the table name. + helpers.readTables(this.sequelize, tables => { + expect(tables.sort()).to.eql(['Person', 'Task', 'sequelize_schema.SequelizeMeta']); + done(); + }); + } + }, { + migrationFile: 'new/*createPerson', + config: { migrationStorageTableSchema: 'sequelize_schema' } + }); + }); + }); + }); +}); + +describe(Support.getTestDialectTeaser('db:migrate'), () => { + describe('with config.js', () => { + const prepare = function (callback) { + const config = helpers.getTestConfig(); + const configContent = 'module.exports = ' + JSON.stringify(config); + let result = ''; + + return gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.removeFile('config/config.json')) + .pipe(helpers.copyMigration('createPerson.js')) + .pipe(helpers.overwriteFile(configContent, 'config/config.js')) + .pipe(helpers.runCli('db:migrate')) + .on('error', e => { + callback(e); + }) + .on('data', data => { + result += data.toString(); + }) + .on('end', () => { + callback(null, result); + }); + }; + + it('creates a SequelizeMeta table', function (done) { + prepare(() => { + helpers.readTables(this.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables).to.contain('SequelizeMeta'); + done(); + }); + }); + }); + + it('creates the respective table', function (done) { + prepare(() => { + helpers.readTables(this.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables).to.contain('Person'); + done(); + }); + }); + }); + }); +}); + +describe(Support.getTestDialectTeaser('db:migrate'), () => { + describe('with config.json and url option', () => { + const prepare = function (callback) { + const config = { url: helpers.getTestUrl() }; + const configContent = 'module.exports = ' + JSON.stringify(config); + let result = ''; + + return gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.removeFile('config/config.json')) + .pipe(helpers.copyMigration('createPerson.js')) + .pipe(helpers.overwriteFile(configContent, 'config/config.js')) + .pipe(helpers.runCli('db:migrate')) + .on('error', e => { + callback(e); + }) + .on('data', data => { + result += data.toString(); + }) + .on('end', () => { + callback(null, result); + }); + }; + + it('creates a SequelizeMeta table', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables).to.contain('SequelizeMeta'); + done(); + }); + }); + }); + + it('creates the respective table', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables).to.contain('Person'); + done(); + }); + }); + }); + }); +}); + +describe(Support.getTestDialectTeaser('db:migrate'), () => { + describe('optional migration parameters', () => { + const prepare = function (runArgs = '', callback) { + const config = { url: helpers.getTestUrl() }; + const configContent = 'module.exports = ' + JSON.stringify(config); + let result = ''; + + return gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.removeFile('config/config.json')) + .pipe(helpers.copyMigration('createPerson.js')) + .pipe(helpers.copyMigration('renamePersonToUser.js')) + .pipe(helpers.copyMigration('createTestTableForTrigger.js')) + .pipe(helpers.copyMigration('createPost.js')) + .pipe(helpers.overwriteFile(configContent, 'config/config.js')) + .pipe(helpers.runCli('db:migrate ' + runArgs)) + .on('error', e => { + callback(e); + }) + .on('data', data => { + result += data.toString(); + }) + .on('end', () => { + callback(null, result); + }); + }; + + const runCli = function (cliArgs, callback) { + let result = ''; + // avoid double callbacks + let done = callback; + return gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.runCli(cliArgs, { pipeStdout: true, exitCode: 0 })) + .on('error', e => { + done(e); + done = () => {}; + }) + .on('data', data => { + result += data.toString(); + }) + .on('end', () => { + done(null, result); + }); + }; + + it('--to', function (done) { + const self = this; + const migrationsPath = Support.resolveSupportPath('assets', 'migrations'); + const migrations = fs.readdirSync(migrationsPath); + const createTriggers = migrations.filter(migration => migration.indexOf('createTestTableForTrigger') > -1); + + prepare('--to ' + createTriggers, () => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(3); + expect(tables).to.contain('User'); + expect(tables).to.contain('trigger_test'); + done(); + }); + }); + }); + + it('--to full migration in two parts', function (done) { + const self = this; + const migrationsPath = Support.resolveSupportPath('assets', 'migrations'); + const migrations = fs.readdirSync(migrationsPath); + const createTriggers = migrations.filter(migration => migration.indexOf('createTestTableForTrigger') > -1); + const createPost = migrations.filter(migration => migration.indexOf('createPost') > -1); + + prepare('--to ' + createTriggers, () => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(3); + expect(tables).to.contain('User'); + expect(tables).to.contain('trigger_test'); + runCli('db:migrate --to ' + createPost, () => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(4); + expect(tables).to.contain('Post'); + done(); + }); + }); + }); + }); + }); + + it('--to should exit with 0 when there are no migrations', function (done) { + const self = this; + const migrationsPath = Support.resolveSupportPath('assets', 'migrations'); + const migrations = fs.readdirSync(migrationsPath); + const createTriggers = migrations.filter(migration => migration.indexOf('createTestTableForTrigger') > -1); + + prepare('--to ' + createTriggers, () => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(3); + expect(tables).to.contain('User'); + runCli('db:migrate --to ' + createTriggers, (err, result) => { + expect(result).to.contain('No migrations were executed, database schema was already up to date.'); + done(err); + }); + }); + }); + }); + + it('--from', function (done) { + const self = this; + const migrationsPath = Support.resolveSupportPath('assets', 'migrations'); + const migrations = fs.readdirSync(migrationsPath); + const createPersonMigration = migrations.filter(migration => migration.indexOf('renamePersonToUser') > -1); + + prepare('--from ' + createPersonMigration, () => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(3); + expect(tables).to.contain('Post'); + expect(tables).to.contain('trigger_test'); + done(); + }); + }); + }); + + it('--from should exit with 0 when there are no migrations', function (done) { + const self = this; + const migrationsPath = Support.resolveSupportPath('assets', 'migrations'); + const migrations = fs.readdirSync(migrationsPath); + const createPersonMigration = migrations.filter(migration => migration.indexOf('renamePersonToUser') > -1); + const createPost = migrations.filter(migration => migration.indexOf('createPost') > -1); + + prepare('--from ' + createPersonMigration, () => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(3); + expect(tables).to.contain('Post'); + expect(tables).to.contain('trigger_test'); + runCli('db:migrate --from ' + createPost, (err, result) => { + expect(result).to.contain('No migrations were executed, database schema was already up to date.'); + done(err); + }); + }); + }); + }); + + + it('--to and --from together', function (done) { + const self = this; + const migrationsPath = Support.resolveSupportPath('assets', 'migrations'); + const migrations = fs.readdirSync(migrationsPath); + const createPersonMigration = migrations.filter(migration => migration.indexOf('renamePersonToUser') > -1); + const createPost = migrations.filter(migration => migration.indexOf('createTestTableForTrigger') > -1); + + prepare('--from ' + createPersonMigration + ' --to ' + createPost, () => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables).to.contain('trigger_test'); + done(); + }); + }); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/db/migrate/schema/add_timestamps.test.js b/node_modules/sequelize-cli/test/db/migrate/schema/add_timestamps.test.js new file mode 100644 index 00000000..3b81326b --- /dev/null +++ b/node_modules/sequelize-cli/test/db/migrate/schema/add_timestamps.test.js @@ -0,0 +1,110 @@ + + +const expect = require('expect.js'); +const Support = require(__dirname + '/../../../support'); +const helpers = require(__dirname + '/../../../support/helpers'); +const gulp = require('gulp'); + +[ + 'db:migrate:schema:timestamps:add' +].forEach(flag => { + const prepare = function (config, callback) { + config = helpers.getTestConfig(config); + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.copyMigration('createPerson.js')) + .pipe(helpers.copyMigration('renamePersonToUser.js')) + .pipe(helpers.overwriteFile(JSON.stringify(config), 'config/config.json')) + .pipe(helpers.runCli('db:migrate')) + .pipe(helpers.teardown(callback)); + }; + + describe(Support.getTestDialectTeaser(flag), () => { + beforeEach(function (done) { + prepare.call(this, null, () => { + return gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.runCli(flag)) + .pipe(helpers.teardown(done)); + }); + }); + + it('renames the original table', function (done) { + const self = this; + + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(3); + expect(tables.indexOf('SequelizeMeta')).to.be.above(-1); + expect(tables.indexOf('SequelizeMetaBackup')).to.be.above(-1); + done(); + }); + }); + + it('keeps the data in the original table', function (done) { + helpers.execQuery( + this.sequelize, + this.sequelize.getQueryInterface().QueryGenerator.selectQuery('SequelizeMetaBackup'), + { raw: true } + ).then(items => { + expect(items.length).to.equal(2); + done(); + }); + }); + + it('keeps the structure of the original table', function (done) { + const self = this; + + helpers.readTables(self.sequelize, () => { + return self + .sequelize + .getQueryInterface() + .describeTable('SequelizeMetaBackup') + .then(fields => { + expect(Object.keys(fields).sort()).to.eql(['name']); + done(); + return null; + }); + }); + }); + + it('creates a new SequelizeMeta table with the new structure', function (done) { + this.sequelize.getQueryInterface().describeTable('SequelizeMeta').then(fields => { + expect(Object.keys(fields).sort()).to.eql(['createdAt', 'name', 'updatedAt']); + done(); + }); + }); + + it('copies the entries into the new table', function (done) { + helpers.execQuery( + this.sequelize, + this.sequelize.getQueryInterface().QueryGenerator.selectQuery('SequelizeMeta'), + { raw: true, type: 'SELECT' } + ).then(items => { + expect(items[0].name).to.eql('20111117063700-createPerson.js'); + expect(items[1].name).to.eql('20111205064000-renamePersonToUser.js'); + done(); + }); + }); + + it('is possible to undo one of the already executed migrations', function (done) { + const self = this; + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.runCli('db:migrate:undo')) + .pipe(helpers.teardown(() => { + helpers.execQuery( + self.sequelize, + self.sequelize.getQueryInterface().QueryGenerator.selectQuery('SequelizeMeta'), + { raw: true, type: 'SELECT' } + ).then(items => { + expect(items[0].name).to.eql('20111117063700-createPerson.js'); + done(); + }); + })); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/db/migrate/status.test.js b/node_modules/sequelize-cli/test/db/migrate/status.test.js new file mode 100644 index 00000000..02cd4b63 --- /dev/null +++ b/node_modules/sequelize-cli/test/db/migrate/status.test.js @@ -0,0 +1,26 @@ + + +const Support = require(__dirname + '/../../support'); +const helpers = require(__dirname + '/../../support/helpers'); +const gulp = require('gulp'); + +[ + 'db:migrate:status' +].forEach(flag => { + describe(Support.getTestDialectTeaser(flag), () => { + it('is correctly reports a down and an up migration', done => { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.copyMigration('createPerson.js')) + .pipe(helpers.overwriteFile(JSON.stringify(helpers.getTestConfig()), 'config/config.json')) + .pipe(helpers.runCli('db:migrate', { pipeStdout: false })) + .pipe(helpers.copyMigration('renamePersonToUser.js')) + .pipe(helpers.runCli(flag, { pipeStdout: true })) + .pipe(helpers.ensureContent('up 20111117063700-createPerson.js')) + .pipe(helpers.ensureContent('down 20111205064000-renamePersonToUser.js')) + .pipe(helpers.teardown(done)); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/db/migrate/undo.test.js b/node_modules/sequelize-cli/test/db/migrate/undo.test.js new file mode 100644 index 00000000..23837fc3 --- /dev/null +++ b/node_modules/sequelize-cli/test/db/migrate/undo.test.js @@ -0,0 +1,97 @@ +const expect = require('expect.js'); +const Support = require(__dirname + '/../../support'); +const helpers = require(__dirname + '/../../support/helpers'); +const gulp = require('gulp'); +const fs = require('fs'); + +[ + 'db:migrate:undo' +].forEach(flag => { + const prepare = function (callback, _flag) { + _flag = _flag || flag; + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.copyMigration('createPerson.js')) + .pipe(helpers.overwriteFile(JSON.stringify(helpers.getTestConfig()), 'config/config.json')) + .pipe(helpers.runCli(_flag, { pipeStdout: true })) + .pipe(helpers.teardown(callback)); + }; + + describe(Support.getTestDialectTeaser(flag), () => { + it('creates a SequelizeMeta table', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(1); + expect(tables[0]).to.equal('SequelizeMeta'); + done(); + }); + }); + }); + + it('stops execution if no migrations have been done yet', done => { + prepare((err, output) => { + expect(err).to.equal(null); + expect(output).to.contain('No executed migrations found.'); + done(); + }); + }); + + it('is correctly undoing a migration if they have been done already', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables[0]).to.equal('Person'); + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.runCli(flag, { pipeStdout: true })) + .pipe(helpers.teardown(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(1); + expect(tables[0]).to.equal('SequelizeMeta'); + done(); + }); + })); + }); + }, 'db:migrate'); + }); + + it('correctly undoes a named migration', function (done) { + const self = this; + + prepare(() => { + const migrationsPath = Support.resolveSupportPath('tmp', 'migrations'); + const migrations = fs.readdirSync(migrationsPath); + const createPersonMigration = migrations[0]; + + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables[0]).to.equal('Person'); + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.copyMigration('emptyMigration.js')) + .pipe(helpers.runCli('db:migrate')) + .pipe(helpers.runCli(flag + ' --name ' + createPersonMigration, { pipeStdout: true })) + .pipe(helpers.teardown(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(1); + expect(tables[0]).to.equal('SequelizeMeta'); + helpers.countTable(self.sequelize, 'SequelizeMeta', count => { + expect(count).to.eql([{ count: 1 }]); + done(); + }); + }); + })); + }); + }, 'db:migrate'); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/db/migrate/undo/all.test.js b/node_modules/sequelize-cli/test/db/migrate/undo/all.test.js new file mode 100644 index 00000000..4bd09290 --- /dev/null +++ b/node_modules/sequelize-cli/test/db/migrate/undo/all.test.js @@ -0,0 +1,69 @@ + + +const expect = require('expect.js'); +const Support = require(__dirname + '/../../../support'); +const helpers = require(__dirname + '/../../../support/helpers'); +const gulp = require('gulp'); + +[ + 'db:migrate:undo:all' +].forEach(flag => { + const prepare = function (callback, _flag) { + _flag = _flag || flag; + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.copyMigration('createPerson.js')) + .pipe(helpers.copyMigration('renamePersonToUser.js')) + .pipe(helpers.overwriteFile(JSON.stringify(helpers.getTestConfig()), 'config/config.json')) + .pipe(helpers.runCli(_flag, { pipeStdout: true })) + .pipe(helpers.teardown(callback)); + }; + + describe(Support.getTestDialectTeaser(flag), () => { + it('creates a SequelizeMeta table', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(1); + expect(tables[0]).to.equal('SequelizeMeta'); + done(); + }); + }); + }); + + it('stops execution if no migrations have been done yet', done => { + prepare((err, output) => { + expect(err).to.equal(null); + expect(output).to.contain('No executed migrations found.'); + done(); + }); + }); + + it('is correctly undoing all migrations if they have been done already', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables).to.contain('User'); + expect(tables).to.contain('SequelizeMeta'); + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.runCli(flag, { pipeStdout: true })) + .pipe(helpers.teardown(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(1); + expect(tables[0]).to.equal('SequelizeMeta'); + done(); + }); + })); + }); + }, 'db:migrate'); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/db/migrate/undo/all_to.test.js b/node_modules/sequelize-cli/test/db/migrate/undo/all_to.test.js new file mode 100644 index 00000000..9eef905a --- /dev/null +++ b/node_modules/sequelize-cli/test/db/migrate/undo/all_to.test.js @@ -0,0 +1,81 @@ +const expect = require('expect.js'); +const Support = require(__dirname + '/../../../support'); +const helpers = require(__dirname + '/../../../support/helpers'); +const gulp = require('gulp'); + +[ + 'db:migrate:undo:all --to 20130909175939-createTestTableForTrigger.js' +].forEach(flag => { + const prepare = function (callback, _flag) { + _flag = _flag || flag; + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.copyMigration('createPerson.js')) + .pipe(helpers.copyMigration('renamePersonToUser.js')) + .pipe(helpers.copyMigration('createTestTableForTrigger.js')) + .pipe(helpers.copyMigration('createPost.js')) + .pipe(helpers.overwriteFile(JSON.stringify(helpers.getTestConfig()), 'config/config.json')) + .pipe(helpers.runCli(_flag, { pipeStdout: true })) + .pipe(helpers.teardown(callback)); + }; + + describe(Support.getTestDialectTeaser(flag), () => { + it('creates a SequelizeMeta table', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(1); + expect(tables[0]).to.equal('SequelizeMeta'); + done(); + }); + }); + }); + + it('stops execution if no migrations have been done yet', done => { + prepare((err, output) => { + expect(err).to.equal(null); + expect(output).to.contain('No executed migrations found.'); + done(); + }); + }); + + it('is properly undoing migration with --to option and all migrations after', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(4); + expect(tables).to.contain('User'); + expect(tables).to.contain('SequelizeMeta'); + expect(tables).to.contain('Post'); + expect(tables).to.contain('trigger_test'); + + helpers.countTable(self.sequelize, 'SequelizeMeta', result => { + expect(result[0].count).to.eql(4); + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.runCli(flag, { pipeStdout: true })) + .pipe(helpers.teardown(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables).to.contain('SequelizeMeta'); + expect(tables).to.contain('User'); + + helpers.countTable(self.sequelize, 'SequelizeMeta', result => { + expect(result[0].count).to.eql(2); + done(); + }); + }); + })); + }); + + }); + }, 'db:migrate'); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/db/seed-json.test.js b/node_modules/sequelize-cli/test/db/seed-json.test.js new file mode 100644 index 00000000..f7a8df11 --- /dev/null +++ b/node_modules/sequelize-cli/test/db/seed-json.test.js @@ -0,0 +1,96 @@ + + +const expect = require('expect.js'); +const Support = require(__dirname + '/../support'); +const helpers = require(__dirname + '/../support/helpers'); +const gulp = require('gulp'); +const fs = require('fs'); +const _ = require('lodash'); + +[ + 'db:seed --seed seedPerson.js', + 'db:seed --seed seedPerson.js --seeders-path seeders', + '--seeders-path seeders --seed seedPerson.js db:seed', + 'db:seed --seed seedPerson.js --seeders-path ./seeders', + 'db:seed --seed seedPerson.js --seeders-path ./seeders/', + 'db:seed --seed seedPerson.js --config ../../support/tmp/config/config.json', + 'db:seed --seed seedPerson.js --config ' + + Support.resolveSupportPath('tmp', 'config', 'config.json'), + 'db:seed --seed seedPerson.js --config ../../support/tmp/config/config.js' +].forEach(flag => { + const prepare = function (callback, options) { + options = _.assign({ config: {} }, options || {}); + + let configPath = 'config/'; + let seederFile = options.seederFile || 'seedPerson'; + const config = _.assign({}, helpers.getTestConfig(), options.config); + let configContent = JSON.stringify(config); + const migrationFile = 'createPerson.js'; + + seederFile = seederFile + '.js'; + + if (flag.match(/config\.js$/)) { + configPath = configPath + 'config.js'; + configContent = 'module.exports = ' + configContent; + } else { + configPath = configPath + 'config.json'; + } + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.removeFile('config/config.json')) + .pipe(helpers.copyMigration(migrationFile)) + .pipe(helpers.copySeeder(seederFile)) + .pipe(helpers.overwriteFile(configContent, configPath)) + .pipe(helpers.runCli('db:migrate' + + (flag.indexOf('config') === -1 ? '' : flag.replace('db:seed --seed seedPerson.js', '')) + )) + .pipe(helpers.runCli(flag, { pipeStdout: true })) + .pipe(helpers.teardown(callback)); + }; + + describe(Support.getTestDialectTeaser(flag) + ' (JSON)', () => { + it('populates the respective table', function (done) { + const self = this; + + prepare(() => { + helpers.countTable(self.sequelize, 'Person', result => { + expect(result).to.have.length(1); + expect(result[0].count).to.eql(1); + done(); + }); + }); + }); + + describe('the seeder storage file', () => { + it('should be written to the specified location', done => { + const storageFile = Support.resolveSupportPath('tmp', 'custom-data.json'); + + prepare(() => { + expect(fs.statSync(storageFile).isFile()).to.be(true); + expect(fs.readFileSync(storageFile).toString()) + .to.match(/^\[\n "seedPerson\.(js)"\n\]$/); + done(); + }, { config: { seederStoragePath: storageFile, seederStorage: 'json' } }); + }); + }); + + describe('the logging option', () => { + it('does not print sql queries by default', done => { + prepare((__, stdout) => { + expect(stdout).to.not.contain('Executing'); + done(); + }); + }); + + it('interprets a custom option', done => { + prepare((__, stdout) => { + expect(stdout).to.contain('Executing'); + done(); + }, { config: { logging: true } }); + }); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/db/seed.test.js b/node_modules/sequelize-cli/test/db/seed.test.js new file mode 100644 index 00000000..2aa67f19 --- /dev/null +++ b/node_modules/sequelize-cli/test/db/seed.test.js @@ -0,0 +1,115 @@ + + +const expect = require('expect.js'); +const Support = require(__dirname + '/../support'); +const helpers = require(__dirname + '/../support/helpers'); +const gulp = require('gulp'); +const _ = require('lodash'); + +[ + 'db:seed --seed seedPerson.js', + 'db:seed --seeders-path seeders --seed seedPerson.js', + '--seeders-path seeders db:seed --seed seedPerson.js', + 'db:seed --seeders-path ./seeders --seed seedPerson.js', + 'db:seed --seeders-path ./seeders/ --seed seedPerson.js', + 'db:seed --seed seedPerson.js --config ../../support/tmp/config/config.json', + 'db:seed --seed seedPerson.js --config ' + + Support.resolveSupportPath('tmp', 'config', 'config.json'), + 'db:seed --seed seedPerson.js --config ../../support/tmp/config/config.js', + 'db:seed --seed seedPerson.js --config ../../support/tmp/config/config-promise.js' +].forEach(flag => { + const prepare = function (callback, options) { + options = _.assign({ config: {} }, options || {}); + + let configPath = 'config/'; + let seederFile = 'seedPerson'; + const config = _.assign({}, helpers.getTestConfig(), options.config); + let configContent = JSON.stringify(config); + const migrationFile = 'createPerson.js'; + + seederFile = seederFile + '.js'; + + if (flag.match(/config\.js$/)) { + configPath = configPath + 'config.js'; + configContent = 'module.exports = ' + configContent; + } else if (flag.match(/config-promise\.js/)) { + configPath = configPath + 'config-promise.js'; + configContent = '' + + 'var b = require("bluebird");' + + 'module.exports = b.resolve(' + configContent + ');'; + } else { + configPath = configPath + 'config.json'; + } + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.removeFile('config/config.json')) + .pipe(helpers.copyMigration(migrationFile)) + .pipe(helpers.copySeeder(seederFile)) + .pipe(helpers.overwriteFile(configContent, configPath)) + .pipe(helpers.runCli('db:migrate' + + (flag.indexOf('config') === -1 ? '' : flag.replace('db:seed --seed seedPerson.js', '')) + )) + .pipe(helpers.runCli(flag, { pipeStdout: true })) + .pipe(helpers.teardown(callback)); + }; + + describe(Support.getTestDialectTeaser(flag), () => { + it('creates a SequelizeData table', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(3); + expect(tables).to.contain('SequelizeData'); + done(); + }); + }, { config: { seederStorage: 'sequelize' } }); + }); + + it('populates the respective table', function (done) { + const self = this; + + prepare(() => { + helpers.countTable(self.sequelize, 'Person', result => { + expect(result).to.have.length(1); + expect(result[0].count).to.eql(1); + done(); + }); + }); + }); + + describe('the logging option', () => { + it('does not print sql queries by default', done => { + prepare((__, stdout) => { + expect(stdout).to.not.contain('Executing'); + done(); + }); + }); + + it('interpretes a custom option', done => { + prepare((__, stdout) => { + expect(stdout).to.contain('Executing'); + done(); + }, { config: { logging: true } }); + }); + }); + + describe('custom meta table name', () => { + it('correctly uses the defined table name', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables.sort()).to.eql(['Person', 'SequelizeMeta', 'sequelize_data']); + done(); + }); + }, { + config: { seederStorage: 'sequelize', seederStorageTableName: 'sequelize_data' } + }); + }); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/db/seed/all.test.js b/node_modules/sequelize-cli/test/db/seed/all.test.js new file mode 100644 index 00000000..421a728d --- /dev/null +++ b/node_modules/sequelize-cli/test/db/seed/all.test.js @@ -0,0 +1,106 @@ +const expect = require('expect.js'); +const Support = require(__dirname + '/../../support'); +const helpers = require(__dirname + '/../../support/helpers'); +const gulp = require('gulp'); +const _ = require('lodash'); + +[ + 'db:seed:all', + 'db:seed:all --seeders-path seeders', + '--seeders-path seeders db:seed:all', + 'db:seed:all --seeders-path ./seeders', + 'db:seed:all --seeders-path ./seeders/', + 'db:seed:all --config ../../support/tmp/config/config.json', + 'db:seed:all --config ' + Support.resolveSupportPath('tmp', 'config', 'config.json'), + 'db:seed:all --config ../../support/tmp/config/config.js' +].forEach(flag => { + const prepare = function (callback, options) { + options = _.assign({ config: {} }, options || {}); + + let configPath = 'config/'; + let seederFile = options.seederFile || 'seedPerson'; + const config = _.assign({}, helpers.getTestConfig(), options.config); + let configContent = JSON.stringify(config); + const migrationFile = 'createPerson.js'; + + seederFile = seederFile + '.js'; + + if (flag.match(/config\.js$/)) { + configPath = configPath + 'config.js'; + configContent = 'module.exports = ' + configContent; + } else { + configPath = configPath + 'config.json'; + } + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.removeFile('config/config.json')) + .pipe(helpers.copyMigration(migrationFile)) + .pipe(helpers.copySeeder(seederFile)) + .pipe(helpers.overwriteFile(configContent, configPath)) + .pipe(helpers.runCli('db:migrate' + + (flag.indexOf('config') === -1 ? '' : flag.replace('db:seed:all', '')) + )) + .pipe(helpers.runCli(flag, { pipeStdout: true })) + .pipe(helpers.teardown(callback)); + }; + + describe(Support.getTestDialectTeaser(flag), () => { + it('creates a SequelizeData table', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(3); + expect(tables).to.contain('SequelizeData'); + done(); + }); + }, { config: { seederStorage: 'sequelize' } }); + }); + + it('populates the respective table', function (done) { + const self = this; + + prepare(() => { + helpers.countTable(self.sequelize, 'Person', result => { + expect(result).to.have.length(1); + expect(result[0].count).to.eql(1); + done(); + }); + }); + }); + + describe('the logging option', () => { + it('does not print sql queries by default', done => { + prepare((__, stdout) => { + expect(stdout).to.not.contain('Executing'); + done(); + }); + }); + + it('interpretes a custom option', done => { + prepare((__, stdout) => { + expect(stdout).to.contain('Executing'); + done(); + }, { config: { logging: true } }); + }); + }); + + describe('custom meta table name', () => { + it('correctly uses the defined table name', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables.sort()).to.eql(['Person', 'SequelizeMeta', 'sequelize_data']); + done(); + }); + }, { + config: { seederStorage: 'sequelize', seederStorageTableName: 'sequelize_data' } + }); + }); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/db/seed/undo.test.js b/node_modules/sequelize-cli/test/db/seed/undo.test.js new file mode 100644 index 00000000..ba20109c --- /dev/null +++ b/node_modules/sequelize-cli/test/db/seed/undo.test.js @@ -0,0 +1,59 @@ +const expect = require('expect.js'); +const Support = require(__dirname + '/../../support'); +const helpers = require(__dirname + '/../../support/helpers'); +const gulp = require('gulp'); + +[ + 'db:seed:undo --seed seedPerson.js' +].forEach(flag => { + const prepare = function (callback, options) { + const _flag = options.flag || flag; + + const pipeline = gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.copyMigration('createPerson.js')); + + if ( options.copySeeds ) { + pipeline.pipe(helpers.copySeeder('seedPerson.js')); + } + + pipeline.pipe(helpers.overwriteFile(JSON.stringify(helpers.getTestConfig()), + 'config/config.json')) + .pipe(helpers.runCli('db:migrate')) + .pipe(helpers.runCli(_flag, { pipeStderr: true })) + .pipe(helpers.teardown(callback)); + }; + + describe(Support.getTestDialectTeaser(flag), () => { + it('stops execution if no seeder file is found', done => { + prepare((err, output) => { + expect(output).to.contain('Unable to find migration'); + done(); + }, {copySeeds: false}); + }); + + it('is correctly undoing a seeder if they have been done already', function (done) { + const self = this; + + prepare(() => { + helpers.readTables(self.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables[0]).to.equal('Person'); + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.runCli(flag, { pipeStdout: true })) + .pipe(helpers.teardown(() => { + helpers.countTable(self.sequelize, 'Person', res => { + expect(res).to.have.length(1); + expect(res[0].count).to.eql(0); + done(); + }); + })); + }); + }, {flag: 'db:seed:all', copySeeds: true}); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/db/seed/undo/all.test.js b/node_modules/sequelize-cli/test/db/seed/undo/all.test.js new file mode 100644 index 00000000..1677f09d --- /dev/null +++ b/node_modules/sequelize-cli/test/db/seed/undo/all.test.js @@ -0,0 +1,89 @@ +const expect = require('expect.js'); +const Support = require(__dirname + '/../../../support'); +const helpers = require(__dirname + '/../../../support/helpers'); +const gulp = require('gulp'); +const _ = require('lodash'); + +[ + 'db:seed:undo:all' +].forEach(flag => { + const prepare = function (callback, options) { + const _flag = options.flag || flag; + const config = _.assign({}, helpers.getTestConfig(), options.config || {}); + + const pipeline = gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.copyMigration('createPerson.js')); + + if ( options.copySeeds ) { + pipeline.pipe(helpers.copySeeder('seedPerson.js')) + .pipe(helpers.copySeeder('seedPerson2.js')); + } + + pipeline.pipe(helpers.overwriteFile(JSON.stringify(config), + 'config/config.json')) + .pipe(helpers.runCli('db:migrate')) + .pipe(helpers.runCli(_flag, { pipeStdout: true })) + .pipe(helpers.teardown(callback)); + }; + + describe(Support.getTestDialectTeaser(flag), () => { + it('stops execution if no seeders have been found', done => { + prepare((err, output) => { + expect(err).to.equal(null); + expect(output).to.contain('No seeders found.'); + done(); + }, {copySeeds: false}); + }); + + it('is correctly undoing all seeders if they have been done already', function (done) { + const self = this; + + prepare(() => { + helpers.countTable(self.sequelize, 'Person', res => { + expect(res).to.have.length(1); + expect(res[0].count).to.eql(2); + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.runCli(flag, { pipeStdout: true })) + .pipe(helpers.teardown(() => { + helpers.countTable(self.sequelize, 'Person', res => { + expect(res).to.have.length(1); + expect(res[0].count).to.eql(0); + done(); + }); + })); + }); + }, {flag: 'db:seed:all', copySeeds: true}); + }); + + it('is correctly undoing all seeders when storage is none', function (done) { + const self = this; + + prepare(() => { + helpers.countTable(self.sequelize, 'Person', res => { + expect(res).to.have.length(1); + expect(res[0].count).to.eql(2); + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.runCli(flag, { pipeStdout: true })) + .pipe(helpers.teardown(() => { + helpers.countTable(self.sequelize, 'Person', res => { + expect(res).to.have.length(1); + expect(res[0].count).to.eql(0); + done(); + }); + })); + }); + }, { + flag: 'db:seed:all', + copySeeds: true, + config: { seederStorage: 'none' } + }); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/environment-variable.test.js b/node_modules/sequelize-cli/test/environment-variable.test.js new file mode 100644 index 00000000..8b36cad6 --- /dev/null +++ b/node_modules/sequelize-cli/test/environment-variable.test.js @@ -0,0 +1,32 @@ +const expect = require('expect.js'); +const Support = require(__dirname + '/support'); +const helpers = require(__dirname + '/support/helpers'); +const gulp = require('gulp'); + +const prepare = function (callback) { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.copyMigration('createPerson.js')) + .pipe( + helpers.overwriteFile( + JSON.stringify({ use_env_variable: 'SEQUELIZE_DB_URL' }), + 'config/config.json' + ) + ) + .pipe(helpers.runCli('db:migrate', { env: { SEQUELIZE_DB_URL: helpers.getTestUrl() } })) + .pipe(helpers.teardown(callback)); +}; + +describe(Support.getTestDialectTeaser('use_env_variable'), () => { + beforeEach(prepare); + + it('correctly runs the migration', function (done) { + helpers.readTables(this.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables).to.contain('SequelizeMeta'); + done(); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/init.test.js b/node_modules/sequelize-cli/test/init.test.js new file mode 100644 index 00000000..5636b4c6 --- /dev/null +++ b/node_modules/sequelize-cli/test/init.test.js @@ -0,0 +1,129 @@ +const Support = require(__dirname + '/support'); +const helpers = require(__dirname + '/support/helpers'); +const gulp = require('gulp'); + +[ + 'init' +].forEach(flag => { + describe(Support.getTestDialectTeaser(flag), () => { + (function (folders) { + folders.forEach(folder => { + it('creates "' + folder + '"', done => { + let sourcePath = Support.resolveSupportPath('tmp'); + let file = folder; + + if (folder.indexOf('/') > -1) { + const split = folder.split('/'); + + file = split.pop(); + sourcePath = Support.resolveSupportPath('tmp', split.join('/')); + } + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli(flag)) + .pipe(helpers.teardown(() => { + gulp + .src(sourcePath) + .pipe(helpers.listFiles()) + .pipe(helpers.ensureContent(file)) + .pipe(helpers.teardown(done)); + })); + }); + }); + })([ + 'config', + 'config/config.json', + 'migrations', + 'models', + 'models/index.js' + ]); + + it('creates a custom config folder', done => { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli(flag + ' --config my-config/config/config.json')) + .pipe(helpers.listFiles()) + .pipe(helpers.ensureContent('my-config')) + .pipe(helpers.teardown(done)); + }); + + it('creates a custom migrations folder', done => { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli(flag + ' --migrations-path ./db/migrate')) + .pipe(helpers.listFiles()) + .pipe(helpers.ensureContent('db')) + .pipe(helpers.teardown(done)); + }); + + it('creates a custom config file', done => { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli(flag + ' --config config/database.json')) + .pipe(helpers.teardown(() => { + gulp + .src(Support.resolveSupportPath('tmp', 'config')) + .pipe(helpers.listFiles()) + .pipe(helpers.ensureContent('database.json')) + .pipe(helpers.teardown(done)); + })); + }); + + it('creates a custom models folder', done => { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli(flag + ' --models-path daos')) + .pipe(helpers.listFiles()) + .pipe(helpers.ensureContent('daos')) + .pipe(helpers.teardown(done)); + }); + + describe('models/index.js', () => { + it('correctly injects the reference to the default config file', done => { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli(flag)) + .pipe(helpers.teardown(() => { + gulp + .src(Support.resolveSupportPath('tmp', 'models')) + .pipe(helpers.readFile('index.js')) + .pipe(helpers.ensureContent('__dirname + \'/../config/config.json\'')) + .pipe(helpers.teardown(done)); + })); + }); + + it('correctly injects the reference to the custom config file', done => { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli(flag + ' --config my/configuration-file.json')) + .pipe(helpers.teardown(() => { + gulp + .src(Support.resolveSupportPath('tmp', 'models')) + .pipe(helpers.readFile('index.js')) + .pipe(helpers.ensureContent('__dirname + \'/../my/configuration-file.json\'')) + .pipe(helpers.teardown(done)); + })); + }); + }); + + it('does not overwrite an existing config.json file', done => { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli(flag)) + .pipe(helpers.overwriteFile('foo', 'config/config.json')) + .pipe(helpers.runCli(flag, { exitCode: 1 })) + .pipe(helpers.readFile('config/config.json')) + .pipe(helpers.ensureContent('foo')) + .pipe(helpers.teardown(done)); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/migration/create.test.js b/node_modules/sequelize-cli/test/migration/create.test.js new file mode 100644 index 00000000..af6718ce --- /dev/null +++ b/node_modules/sequelize-cli/test/migration/create.test.js @@ -0,0 +1,56 @@ +const expect = require('expect.js'); +const Support = require(__dirname + '/../support'); +const helpers = require(__dirname + '/../support/helpers'); +const gulp = require('gulp'); + +[ + 'migration:create' +].forEach(flag => { + describe(Support.getTestDialectTeaser(flag), () => { + const migrationFile = 'foo.js'; + const prepare = function (callback) { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.runCli(flag + ' --name=foo')) + .pipe(helpers.teardown(callback)); + }; + + it('creates a new file with the current timestamp', done => { + prepare(() => { + const date = new Date(); + const format = function (i) { + return parseInt(i, 10) < 10 ? '0' + i : i; + }; + const sDate = [ + date.getUTCFullYear(), + format(date.getUTCMonth() + 1), + format(date.getUTCDate()), + format(date.getUTCHours()), + format(date.getUTCMinutes()) + ].join(''); + const expectation = new RegExp(sDate + '..-' + migrationFile); + + gulp + .src(Support.resolveSupportPath('tmp', 'migrations')) + .pipe(helpers.listFiles()) + .pipe(helpers.ensureContent(expectation)) + .pipe(helpers.teardown(done)); + }); + }); + + it('adds a skeleton with an up and a down method', done => { + prepare(() => { + gulp + .src(Support.resolveSupportPath('tmp', 'migrations')) + .pipe(helpers.readFile('*-' + migrationFile)) + .pipe(helpers.expect(stdout => { + expect(stdout).to.contain('up: (queryInterface, Sequelize) => {'); + expect(stdout).to.contain('down: (queryInterface, Sequelize) => {'); + })) + .pipe(helpers.teardown(done)); + }); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/model/create.test.js b/node_modules/sequelize-cli/test/model/create.test.js new file mode 100644 index 00000000..ca44c795 --- /dev/null +++ b/node_modules/sequelize-cli/test/model/create.test.js @@ -0,0 +1,261 @@ + + +const expect = require('expect.js'); +const Support = require(__dirname + '/../support'); +const helpers = require(__dirname + '/../support/helpers'); +const gulp = require('gulp'); +const _ = require('lodash'); + +[ + 'model:create' +].forEach(flag => { + describe(Support.getTestDialectTeaser(flag), () => { + const combineFlags = function (flags) { + let result = flag; + + _.forEach(flags || {}, (value, key) => { + result = result + ' --' + key + ' ' + value; + }); + + return result; + }; + + const prepare = function (options, callback) { + options = _.assign({ + flags: {}, + cli: { pipeStdout: true } + }, options || {}); + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.runCli(combineFlags(options.flags), options.cli)) + .pipe(helpers.teardown(callback)); + }; + + describe('name', () => { + describe('when missing', () => { + it('exits with an error code', done => { + prepare({ + flags: { attributes: 'first_name:string' }, + cli: { exitCode: 1 } + }, done); + }); + + it('notifies the user about a missing name flag', done => { + prepare({ + flags: { attributes: 'first_name:string' }, + cli: { pipeStderr: true } + }, (err, stdout) => { + expect(stdout).to.match(/Missing required argument: name/); + done(); + }); + }); + }); + }); + + describe('attributes', () => { + describe('when missing', () => { + it('exits with an error code', done => { + prepare({ + flags: { name: 'User' }, + cli: { exitCode: 1 } + }, done); + }); + + it('notifies the user about a missing attributes flag', done => { + prepare({ + flags: { name: 'User' }, + cli: { pipeStderr: true } + }, (err, stdout) => { + expect(stdout).to.match(/Missing required argument: attributes/); + done(); + }); + }); + }); + + describe('when passed an invalid data type', () => { + it('exits with an error code', done => { + prepare({ + flags: { name: 'User', attributes: 'badAttribute:datetime' }, + cli: { exitCode: 1 } + }, done); + }); + }) + + ;[ + 'first_name:string,last_name:string,bio:text,role:enum:{Admin,"Guest User"},reviews:array:text', + 'first_name:string,last_name:string,bio:text,role:enum:{Admin,\'Guest User\'},reviews:array:text', + '\'first_name:string last_name:string bio:text role:enum:{Admin,Guest User} reviews:array:text\'', + '\'first_name:string, last_name:string, bio:text, role:enum:{Admin, Guest User}, reviews:array:text\'' + ].forEach(attributes => { + describe('--attributes ' + attributes, () => { + it('exits with exit code 0', done => { + prepare({ + flags: { name: 'User', attributes }, + cli: { exitCode: 0 } + }, done); + }); + + it('creates the model file', done => { + prepare({ + flags: { name: 'User', attributes } + }, () => { + gulp + .src(Support.resolveSupportPath('tmp', 'models')) + .pipe(helpers.listFiles()) + .pipe(helpers.ensureContent('user.js')) + .pipe(helpers.teardown(done)); + }); + }); + + it('generates the model attributes correctly', done => { + prepare({ + flags: { name: 'User', attributes } + }, () => { + gulp + .src(Support.resolveSupportPath('tmp', 'models')) + .pipe(helpers.readFile('user.js')) + .pipe(helpers.ensureContent('sequelize.define(\'User\'')) + .pipe(helpers.ensureContent('first_name: DataTypes.STRING')) + .pipe(helpers.ensureContent('last_name: DataTypes.STRING')) + .pipe(helpers.ensureContent('bio: DataTypes.TEXT')) + .pipe(helpers.ensureContent('role: DataTypes.ENUM(\'Admin\', \'Guest User\')')) + .pipe(helpers.ensureContent('reviews: DataTypes.ARRAY(DataTypes.TEXT)')) + .pipe(helpers.teardown(done)); + }); + }); + + it('creates the migration file', done => { + prepare({ + flags: { name: 'User', attributes } + }, () => { + gulp + .src(Support.resolveSupportPath('tmp', 'migrations')) + .pipe(helpers.listFiles()) + .pipe(helpers.ensureContent(/\d+-create-user.js/)) + .pipe(helpers.teardown(done)); + }); + }); + + [ + { underscored: true, createdAt: 'created_at', updatedAt: 'updated_at'}, + { underscored: false, createdAt: 'createdAt', updatedAt: 'updatedAt'} + ].forEach(attrUnd => { + describe((attrUnd.underscored ? '' : 'without ') + '--underscored', () => { + it('generates the migration content correctly', done => { + const flags = { + name: 'User', + attributes + }; + + if ( attrUnd.underscored ) { + flags.underscored = attrUnd.underscored; + } + + prepare({ + flags + }, () => { + gulp + .src(Support.resolveSupportPath('tmp', 'migrations')) + .pipe(helpers.readFile('*-create-user.js')) + .pipe(helpers.ensureContent('return queryInterface')) + .pipe(helpers.ensureContent('.createTable(\'Users\', {')) + .pipe(helpers.ensureContent( + 'first_name: {\n type: Sequelize.STRING\n },' + )) + .pipe(helpers.ensureContent( + 'last_name: {\n type: Sequelize.STRING\n },' + )) + .pipe(helpers.ensureContent( + 'bio: {\n type: Sequelize.TEXT\n },' + )) + .pipe(helpers.ensureContent( + 'role: {\n type: Sequelize.ENUM(\'Admin\', \'Guest User\')\n },' + )) + .pipe(helpers.ensureContent( + 'reviews: {\n type: Sequelize.ARRAY(Sequelize.TEXT)\n },' + )) + .pipe(helpers.ensureContent([ + ' id: {', + ' allowNull: false,', + ' autoIncrement: true,', + ' primaryKey: true,', + ' type: Sequelize.INTEGER', + ' },' + ].join('\n'))) + .pipe(helpers.ensureContent([ + ' ' + attrUnd.createdAt + ': {', + ' allowNull: false,', + ' type: Sequelize.DATE', + ' },' + ].join('\n'))) + .pipe(helpers.ensureContent([ + ' ' + attrUnd.updatedAt + ': {', + ' allowNull: false,', + ' type: Sequelize.DATE', + ' }' + ].join('\n'))) + .pipe(helpers.ensureContent('});')) + .pipe(helpers.ensureContent('.dropTable(\'Users\')')) + .pipe(helpers.teardown(done)); + }); + }); + + it('generates the model content correctly', done => { + const flags = { + name: 'User', + attributes + }; + + const targetContent = attrUnd.underscored ? + 'underscored: true' + : '{});'; + + if ( attrUnd.underscored ) { + flags.underscored = attrUnd.underscored; + } + + prepare({ + flags + }, () => { + gulp + .src(Support.resolveSupportPath('tmp', 'models')) + .pipe(helpers.readFile('user.js')) + .pipe(helpers.ensureContent(targetContent)) + .pipe(helpers.ensureContent('.associate')) + .pipe(helpers.teardown(done)); + }); + }); + }); + }); + + describe('when called twice', () => { + beforeEach(function (done) { + this.flags = { name: 'User', attributes }; + prepare({ flags: this.flags }, done); + }); + + it('exits with an error code', function (done) { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.runCli(combineFlags(this.flags), { exitCode: 1 })) + .pipe(helpers.teardown(done)); + }); + + it('notifies the user about the possibility of --flags', function (done) { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.runCli(combineFlags(this.flags), { pipeStderr: true })) + .pipe(helpers.teardown((err, stderr) => { + expect(stderr).to.contain('already exists'); + done(); + })); + }); + }); + }); + }); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/options.test.js b/node_modules/sequelize-cli/test/options.test.js new file mode 100644 index 00000000..ee0145ed --- /dev/null +++ b/node_modules/sequelize-cli/test/options.test.js @@ -0,0 +1,60 @@ +const Support = require(__dirname + '/support'); +const helpers = require(__dirname + '/support/helpers'); +const gulp = require('gulp'); +const optionsPath = Support.resolveSupportPath('config', 'options.js'); + +describe(Support.getTestDialectTeaser('options'), () => { + describe('--options-path', () => { + [ + optionsPath, + require('path').relative(Support.resolveSupportPath('tmp'), optionsPath) + ].forEach(path => { + it('using options file instead of cli switches (' + path + ')', done => { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init --options-path ' + path)) + .pipe(helpers.listFiles()) + .pipe(helpers.ensureContent('models')) + .pipe(helpers.teardown(done)); + }); + }); + }); + + describe('.sequelizerc', () => { + it('uses .sequelizerc file', done => { + const configContent = ` + var path = require('path'); + + module.exports = { + 'config': path.resolve('config-new', 'database.json'), + 'migrations-path': path.resolve('migrations-new') + }; + `; + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.copyFile(optionsPath, '.sequelizerc')) + .pipe(helpers.overwriteFile(configContent, '.sequelizerc')) + .pipe(helpers.runCli('init')) + .pipe(helpers.listFiles()) + .pipe(helpers.ensureContent('migrations-new')) + .pipe(helpers.ensureContent('config-new')) + .pipe(helpers.teardown(done)); + }); + + it('prefers CLI arguments over .sequelizerc file', done => { + const configPath = Support.resolveSupportPath('tmp', 'config', 'config.js'); + + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.copyFile(optionsPath, '.sequelizerc')) + .pipe(helpers.runCli('init --config=' + configPath)) + .pipe(helpers.listFiles()) + .pipe(helpers.ensureContent('models')) + .pipe(helpers.teardown(done)); + }); + }); +}); \ No newline at end of file diff --git a/node_modules/sequelize-cli/test/seed/create.test.js b/node_modules/sequelize-cli/test/seed/create.test.js new file mode 100644 index 00000000..a856705a --- /dev/null +++ b/node_modules/sequelize-cli/test/seed/create.test.js @@ -0,0 +1,58 @@ +const expect = require('expect.js'); +const Support = require(__dirname + '/../support'); +const helpers = require(__dirname + '/../support/helpers'); +const gulp = require('gulp'); + +[ + 'seed:create' +].forEach(flag => { + describe(Support.getTestDialectTeaser(flag), () => { + const seedFile = 'foo.js'; + + const prepare = function (callback) { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.runCli(flag + ' --name=foo')) + .pipe(helpers.teardown(callback)); + }; + + it('creates a new file with the current timestamp', done => { + prepare(() => { + const date = new Date(); + const format = function (i) { + return parseInt(i, 10) < 10 ? '0' + i : i; + }; + const sDate = [ + date.getUTCFullYear(), + format(date.getUTCMonth() + 1), + format(date.getUTCDate()), + format(date.getUTCHours()), + format(date.getUTCMinutes()) + ].join(''); + + const expectation = new RegExp(sDate + '..-' + seedFile); + + gulp + .src(Support.resolveSupportPath('tmp', 'seeders')) + .pipe(helpers.listFiles()) + .pipe(helpers.ensureContent(expectation)) + .pipe(helpers.teardown(done)); + }); + }); + + it('adds a skeleton with an up and a down method', done => { + prepare(() => { + gulp + .src(Support.resolveSupportPath('tmp', 'seeders')) + .pipe(helpers.readFile('*-' + seedFile)) + .pipe(helpers.expect(stdout => { + expect(stdout).to.contain('up: (queryInterface, Sequelize) => {'); + expect(stdout).to.contain('down: (queryInterface, Sequelize) => {'); + })) + .pipe(helpers.teardown(done)); + }); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20111117063700-createPerson.js b/node_modules/sequelize-cli/test/support/assets/migrations/20111117063700-createPerson.js new file mode 100644 index 00000000..63d179f4 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20111117063700-createPerson.js @@ -0,0 +1,21 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify(migration + .createTable('Person', { + name: DataTypes.STRING, + isBetaMember: { + type: DataTypes.BOOLEAN, + defaultValue: false, + allowNull: false + } + }), done); + }, + + down: function (migration, DataTypes, done) { + nodeify(migration.dropTable('Person'), done); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20111130161100-emptyMigration.js b/node_modules/sequelize-cli/test/support/assets/migrations/20111130161100-emptyMigration.js new file mode 100644 index 00000000..e4594838 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20111130161100-emptyMigration.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = { + up: function (migration, DataTypes, done) { + done(); + }, + down: function (migration, DataTypes, done) { + done(); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20111205064000-renamePersonToUser.js b/node_modules/sequelize-cli/test/support/assets/migrations/20111205064000-renamePersonToUser.js new file mode 100644 index 00000000..b435a919 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20111205064000-renamePersonToUser.js @@ -0,0 +1,13 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify(migration.renameTable('Person', 'User'), done); + }, + + down: function (migration, DataTypes, done) { + nodeify(migration.renameTable('User', 'Person'), done); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20111205162700-addSignatureColumnToUser.js b/node_modules/sequelize-cli/test/support/assets/migrations/20111205162700-addSignatureColumnToUser.js new file mode 100644 index 00000000..92e54fe6 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20111205162700-addSignatureColumnToUser.js @@ -0,0 +1,50 @@ +'use strict'; + +module.exports = { + up: function (migration, DataTypes, done) { + migration + .addColumn('User', 'isAdmin', { + type: DataTypes.BOOLEAN, + defaultValue: false, + allowNull: false + }) + .done(function (err) { + if (err) { + done(err); + } else { + migration + .addColumn('User', 'signature', DataTypes.TEXT) + .done(function (err) { + if (err) { + done(err); + } else { + migration.addColumn('User', 'shopId', { + type: DataTypes.INTEGER, + allowNull: true + }).done(function () { + done(); + }); + } + }); + } + }); + }, + + down: function (migration, DataTypes, done) { + migration.removeColumn('User', 'signature').done(function (err) { + if (err) { + done(err); + } else { + migration.removeColumn('User', 'shopId').done(function (err) { + if (err) { + done(err); + } else { + migration.removeColumn('User', 'isAdmin').done(function () { + done(); + }); + } + }); + } + }); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20111205167000-addUniqueNameColumnToUser.js b/node_modules/sequelize-cli/test/support/assets/migrations/20111205167000-addUniqueNameColumnToUser.js new file mode 100644 index 00000000..ed569c4e --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20111205167000-addUniqueNameColumnToUser.js @@ -0,0 +1,25 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify( + migration.addColumn('User', 'uniqueName', { type: DataTypes.STRING }), + function () { + nodeify( + migration.changeColumn('User', 'uniqueName', { + type: DataTypes.STRING, + allowNull: false, + unique: true + }), + done + ); + } + ); + }, + + down: function (migration, DataTypes, done) { + nodeify(migration.removeColumn('User', 'uniqueName'), done); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20111206061400-removeShopIdColumnFromUser.js b/node_modules/sequelize-cli/test/support/assets/migrations/20111206061400-removeShopIdColumnFromUser.js new file mode 100644 index 00000000..f62d4b56 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20111206061400-removeShopIdColumnFromUser.js @@ -0,0 +1,16 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify(migration.removeColumn('User', 'shopId'), done); + }, + + down: function (migration, DataTypes, done) { + nodeify(migration.addColumn('User', 'shopId', { + type: DataTypes.INTEGER, + allowNull: true + }), done); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20111206063000-changeSignatureColumnOfUserToMendatory.js b/node_modules/sequelize-cli/test/support/assets/migrations/20111206063000-changeSignatureColumnOfUserToMendatory.js new file mode 100644 index 00000000..93a96c23 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20111206063000-changeSignatureColumnOfUserToMendatory.js @@ -0,0 +1,17 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify(migration.changeColumn('User', 'signature', { + type: DataTypes.STRING, + allowNull: false, + defaultValue: 'Signature' + }), done); + }, + + down: function (migration, DataTypes, done) { + done(); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20111206163300-renameSignatureColumnOfUserToSig.js b/node_modules/sequelize-cli/test/support/assets/migrations/20111206163300-renameSignatureColumnOfUserToSig.js new file mode 100644 index 00000000..5b44f90c --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20111206163300-renameSignatureColumnOfUserToSig.js @@ -0,0 +1,13 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify(migration.renameColumn('User', 'signature', 'sig'), done); + }, + + down: function (migration, DataTypes, done) { + nodeify(migration.renameColumn('User', 'sig', 'signature'), done); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20130909174103-createFunctionGetAnAnswer.js b/node_modules/sequelize-cli/test/support/assets/migrations/20130909174103-createFunctionGetAnAnswer.js new file mode 100644 index 00000000..0543a033 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20130909174103-createFunctionGetAnAnswer.js @@ -0,0 +1,12 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify(migration.createFunction('get_an_answer', [], 'int', 'plpgsql', 'RETURN 42;'), done); + }, + down: function (migration, DataTypes, done) { + nodeify(migration.dropFunction('get_an_answer', []), done); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20130909174253-renameFunctionGetAnAnswerGetTheAnswer.js b/node_modules/sequelize-cli/test/support/assets/migrations/20130909174253-renameFunctionGetAnAnswerGetTheAnswer.js new file mode 100644 index 00000000..c66c224c --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20130909174253-renameFunctionGetAnAnswerGetTheAnswer.js @@ -0,0 +1,12 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify(migration.renameFunction('get_an_answer', [], 'get_the_answer'), done); + }, + down: function (migration, DataTypes, done) { + nodeify(migration.renameFunction('get_the_answer', [], 'get_an_answer'), done); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20130909175000-deleteFunctionGetTheAnswer.js b/node_modules/sequelize-cli/test/support/assets/migrations/20130909175000-deleteFunctionGetTheAnswer.js new file mode 100644 index 00000000..661ec614 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20130909175000-deleteFunctionGetTheAnswer.js @@ -0,0 +1,12 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify(migration.dropFunction('get_the_answer', []), done); + }, + down: function (migration, DataTypes, done) { + nodeify(migration.createFunction('get_the_answer', 'int', 'plpgsql', 'RETURN 42;'), done); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20130909175939-createTestTableForTrigger.js b/node_modules/sequelize-cli/test/support/assets/migrations/20130909175939-createTestTableForTrigger.js new file mode 100644 index 00000000..3131298a --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20130909175939-createTestTableForTrigger.js @@ -0,0 +1,23 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify( + migration.createTable('trigger_test', { + name: DataTypes.STRING, + updated_at: { + type: DataTypes.DATE, + defaultValue: DataTypes.NOW, + allowNull: false + } + }), + done + ); + }, + + down: function (migration, DataTypes, done) { + nodeify(migration.dropTable('trigger_test'), done); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20130909180846-createTriggerOnTriggerTestTable.js b/node_modules/sequelize-cli/test/support/assets/migrations/20130909180846-createTriggerOnTriggerTestTable.js new file mode 100644 index 00000000..b738b7cb --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20130909180846-createTriggerOnTriggerTestTable.js @@ -0,0 +1,22 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify( + migration.createTrigger( + 'trigger_test', + 'updated_at', + 'before', + { update: true }, + 'bump_updated_at', + [] + ), + done + ); + }, + down: function (migration, DataTypes, done) { + nodeify(migration.dropTrigger('trigger_test', 'updated_at'), done); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20130909181148-renameTriggerUpdatedAtToUpdateUpdatedAt.js b/node_modules/sequelize-cli/test/support/assets/migrations/20130909181148-renameTriggerUpdatedAtToUpdateUpdatedAt.js new file mode 100644 index 00000000..858e95bc --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20130909181148-renameTriggerUpdatedAtToUpdateUpdatedAt.js @@ -0,0 +1,12 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify(migration.renameTrigger('trigger_test', 'updated_at', 'update_updated_at'), done); + }, + down: function (migration, DataTypes, done) { + nodeify(migration.renameTrigger('trigger_test', 'update_updated_at', 'updated_at'), done); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20130909185621-deleteTriggerUpdateUpdatedAt.js b/node_modules/sequelize-cli/test/support/assets/migrations/20130909185621-deleteTriggerUpdateUpdatedAt.js new file mode 100644 index 00000000..437495b8 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20130909185621-deleteTriggerUpdateUpdatedAt.js @@ -0,0 +1,23 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify(migration.dropTrigger('trigger_test', 'update_updated_at'), done); + }, + + down: function (migration, DataTypes, done) { + nodeify( + migration.createTrigger( + 'trigger_test', + 'update_updated_at', + 'before', + { update: true }, + 'bump_updated_at', + [] + ), + done + ); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/20170526153000-createPost.js b/node_modules/sequelize-cli/test/support/assets/migrations/20170526153000-createPost.js new file mode 100644 index 00000000..d8d844b3 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/20170526153000-createPost.js @@ -0,0 +1,17 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify(migration + .createTable('Post', { + title: DataTypes.STRING, + body: DataTypes.TEXT + }), done); + }, + + down: function (migration, DataTypes, done) { + nodeify(migration.dropTable('Post'), done); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/invalid/20141208213500-createPerson.js b/node_modules/sequelize-cli/test/support/assets/migrations/invalid/20141208213500-createPerson.js new file mode 100644 index 00000000..388a38cd --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/invalid/20141208213500-createPerson.js @@ -0,0 +1,13 @@ +'use strict'; + +var Bluebird = require('bluebird'); + +module.exports = { + up: function (db) { + return Bluebird + .delay(1000) + .then(function () { + return db.sequelize.query('INVALID QUERY'); + }); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/migrations/new/20141208213500-createPerson.js b/node_modules/sequelize-cli/test/support/assets/migrations/new/20141208213500-createPerson.js new file mode 100644 index 00000000..491e84ca --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/migrations/new/20141208213500-createPerson.js @@ -0,0 +1,17 @@ +'use strict'; + +var Bluebird = require('bluebird'); +var Sequelize = require('sequelize'); + +module.exports = { + up: function (db) { + return Bluebird + .delay(1000) + .then(function () { + return db.createTable('Person', { name: Sequelize.STRING }); + }) + .then(function () { + return db.createTable('Task', { title: Sequelize.STRING }); + }); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/project.js b/node_modules/sequelize-cli/test/support/assets/project.js new file mode 100644 index 00000000..b0bd687a --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/project.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function (sequelize, DataTypes) { + return sequelize.define('Project' + parseInt(Math.random() * 9999999999999999, 10), { + name: DataTypes.STRING + }); +}; diff --git a/node_modules/sequelize-cli/test/support/assets/seeders/20111117063700-seedPerson.js b/node_modules/sequelize-cli/test/support/assets/seeders/20111117063700-seedPerson.js new file mode 100644 index 00000000..fa6c19e1 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/seeders/20111117063700-seedPerson.js @@ -0,0 +1,18 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify(migration.bulkInsert('Person', [{ + name: 'John Doe', + isBetaMember: false + }], { + name: {}, + isBetaMember: {} + }), done); + }, + down: function (migration, DataTypes, done) { + nodeify(migration.bulkDelete('Person', null, {}), done); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/seeders/20111117063900-seedPerson2.js b/node_modules/sequelize-cli/test/support/assets/seeders/20111117063900-seedPerson2.js new file mode 100644 index 00000000..0833991f --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/seeders/20111117063900-seedPerson2.js @@ -0,0 +1,19 @@ +'use strict'; + +var nodeify = require('nodeify'); + +module.exports = { + up: function (migration, DataTypes, done) { + nodeify(migration + .bulkInsert('Person', [{ + name: 'Jane Doe', + isBetaMember: false + }], { + name: {}, + isBetaMember: {} + }), done); + }, + down: function (migration, DataTypes, done) { + nodeify(migration.bulkDelete('Person', null, {}), done); + } +}; diff --git a/node_modules/sequelize-cli/test/support/assets/seeders/new/20141208213500-seedPerson.js b/node_modules/sequelize-cli/test/support/assets/seeders/new/20141208213500-seedPerson.js new file mode 100644 index 00000000..d0723a99 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/assets/seeders/new/20141208213500-seedPerson.js @@ -0,0 +1,16 @@ +'use strict'; + +var Bluebird = require('bluebird'); + +module.exports = { + up: function (db) { + return Bluebird + .delay(1000) + .then(function () { + return db.bulkInsert('Person', [{ name: 'John Doe' }], { name: {} }); + }) + .then(function () { + return db.insert('Task', [{ title: 'Find own identity' }], { name: {} }); + }); + } +}; diff --git a/node_modules/sequelize-cli/test/support/config/config.js b/node_modules/sequelize-cli/test/support/config/config.js new file mode 100644 index 00000000..6185ee72 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/config/config.js @@ -0,0 +1,56 @@ +'use strict'; + +module.exports = { + username: process.env.SEQ_USER || 'root', + password: process.env.SEQ_PW || null, + database: process.env.SEQ_DB || 'sequelize_test', + host: process.env.SEQ_HOST || '127.0.0.1', + pool: { + maxConnections: process.env.SEQ_POOL_MAX || 5, + maxIdleTime: process.env.SEQ_POOL_IDLE || 30000 + }, + + rand: function () { + return parseInt(Math.random() * 999, 10); + }, + + // Make maxIdleTime small so that tests exit promptly + mysql: { + database: process.env.SEQ_MYSQL_DB || process.env.SEQ_DB || 'sequelize_test', + username: process.env.SEQ_MYSQL_USER || process.env.SEQ_USER || 'root', + password: process.env.SEQ_MYSQL_PW || process.env.SEQ_PW || null, + host: process.env.SEQ_MYSQL_HOST || process.env.SEQ_HOST || '127.0.0.1', + port: process.env.SEQ_MYSQL_PORT || process.env.SEQ_PORT || 3306, + pool: { + maxConnections: process.env.SEQ_MYSQL_POOL_MAX || process.env.SEQ_POOL_MAX || 5, + maxIdleTime: process.env.SEQ_MYSQL_POOL_IDLE || process.env.SEQ_POOL_IDLE || 3000 + } + }, + + sqlite: { + }, + + postgres: { + database: process.env.SEQ_PG_DB || process.env.SEQ_DB || 'sequelize_test', + username: process.env.SEQ_PG_USER || process.env.SEQ_USER || 'postgres', + password: process.env.SEQ_PG_PW || process.env.SEQ_PW || 'postgres', + host: process.env.SEQ_PG_HOST || process.env.SEQ_HOST || '127.0.0.1', + port: process.env.SEQ_PG_PORT || process.env.SEQ_PORT || 5432, + pool: { + maxConnections: process.env.SEQ_PG_POOL_MAX || process.env.SEQ_POOL_MAX || 5, + maxIdleTime: process.env.SEQ_PG_POOL_IDLE || process.env.SEQ_POOL_IDLE || 3000 + } + }, + + mariadb: { + database: process.env.SEQ_MYSQL_DB || process.env.SEQ_DB || 'sequelize_test', + username: process.env.SEQ_MYSQL_USER || process.env.SEQ_USER || 'root', + password: process.env.SEQ_MYSQL_PW || process.env.SEQ_PW || null, + host: process.env.SEQ_MYSQL_HOST || process.env.SEQ_HOST || '127.0.0.1', + port: process.env.SEQ_MYSQL_PORT || process.env.SEQ_PORT || 3306, + pool: { + maxConnections: process.env.SEQ_MYSQL_POOL_MAX || process.env.SEQ_POOL_MAX || 5, + maxIdleTime: process.env.SEQ_MYSQL_POOL_IDLE || process.env.SEQ_POOL_IDLE || 3000 + } + } +}; diff --git a/node_modules/sequelize-cli/test/support/config/options.js b/node_modules/sequelize-cli/test/support/config/options.js new file mode 100644 index 00000000..43258132 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/config/options.js @@ -0,0 +1,8 @@ +'use strict'; + +var path = require('path'); + +module.exports = { + 'config': path.resolve('config', 'database.json'), + 'migrations-path': path.resolve('db', 'migrate') +}; diff --git a/node_modules/sequelize-cli/test/support/helpers.js b/node_modules/sequelize-cli/test/support/helpers.js new file mode 100644 index 00000000..7d7d4983 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/helpers.js @@ -0,0 +1,218 @@ +'use strict'; + +var _ = require('lodash'); +var exec = require('child_process').exec; +var support = require('./index'); +var through = require('through2'); +var expect = require('expect.js'); +var path = require('path'); +var fs = require('fs-extra'); + +module.exports = { + getTestConfig: function (mixin) { + var dialect = support.getTestDialect(); + var config = require(support.resolveSupportPath('config', 'config.js')); + + config.sqlite.storage = support.resolveSupportPath('tmp', 'test.sqlite'); + config = _.extend( + config, + config[dialect], + mixin || {}, + { dialect: dialect } + ); + + return config; + }, + + getTestUrl: function () { + return support.getTestUrl(this.getTestConfig()); + }, + + clearDirectory: function () { + return through.obj(function (file, encoding, callback) { + exec('rm -rf ./* && rm -f ./.sequelizerc', { cwd: file.path }, function (err) { + callback(err, file); + }); + }); + }, + + removeFile: function (filePath) { + return through.obj(function (file, encoding, callback) { + exec('rm ' + filePath, { cwd: file.path }, function (err) { + callback(err, file); + }); + }); + }, + + runCli: function (args, options) { + options = options || {}; + + return through.obj(function (file, encoding, callback) { + var command = support.getCliCommand(file.path, args); + var env = _.extend({}, process.env, options.env); + + logToFile(command); + + exec(command, { cwd: file.path, env: env }, function (err, stdout, stderr) { + var result = file; + + logToFile({err: err, stdout: stdout, stderr: stderr}); + + if (stdout) { + expect(stdout).to.not.contain('EventEmitter'); + } + + if (options.pipeStdout) { + result = stdout; + } else if (options.pipeStderr) { + result = stderr; + } + + if (options.exitCode) { + try { + expect(err).to.be.ok(); + expect(err.code).to.equal(1); + callback(null, result); + } catch (e) { + callback(new Error('Expected cli to exit with a non-zero code'), null); + } + } else { + err = options.pipeStderr ? null : err; + callback(err, result); + } + }); + }); + }, + + copyFile: function (from, to) { + return through.obj(function (file, encoding, callback) { + fs.copy(from, path.resolve(file.path, to), function (err) { + callback(err, file); + }); + }); + }, + + listFiles: function (subPath) { + return through.obj(function (file, encoding, callback) { + var cwd = path.resolve(file.path, subPath || ''); + + exec('ls -ila', { cwd: cwd }, callback); + }); + }, + + expect: function (fun) { + return through.obj(function (stdout, encoding, callback) { + try { + fun(stdout); + callback(null, stdout); + } catch (e) { + console.log(e); + callback(e, null); + } + }); + }, + + ensureContent: function (needle) { + return this.expect(function (stdout) { + if (needle instanceof RegExp) { + expect(stdout).to.match(needle); + } else { + expect(stdout).to.contain(needle); + } + }); + }, + + overwriteFile: function (content, pathToFile) { + return through.obj(function (file, encoding, callback) { + var filePath = path.join(file.path, pathToFile); + + fs.writeFile(filePath, content, function (err) { + callback(err, file); + }); + }); + }, + + readFile: function (pathToFile) { + return through.obj(function (file, encoding, callback) { + exec('cat ' + pathToFile, { cwd: file.path }, callback); + }); + }, + + copyMigration: function (fileName, migrationsFolder) { + migrationsFolder = migrationsFolder || 'migrations'; + + return through.obj(function (file, encoding, callback) { + var migrationSource = support.resolveSupportPath('assets', 'migrations'); + var migrationTarget = path.resolve(file.path, migrationsFolder); + + exec('cp ' + migrationSource + '/*' + fileName + ' ' + migrationTarget + '/', function (err) { + callback(err, file); + }); + }); + }, + + copySeeder: function (fileName, seedersFolder) { + seedersFolder = seedersFolder || 'seeders'; + + return through.obj(function (file, encoding, callback) { + var seederSource = support.resolveSupportPath('assets', 'seeders'); + var seederTarget = path.resolve(file.path, seedersFolder); + + exec('cp ' + seederSource + '/*' + fileName + ' ' + seederTarget + '/' + fileName, + function (err) { + callback(err, file); + } + ); + }); + }, + + teardown: function (done) { + return through.obj(function (smth, encoding, callback) { + callback(); + done(null, smth); + }); + }, + + readTables: function (sequelize, callback) { + return sequelize + .getQueryInterface() + .showAllTables() + .then(function (tables) { + return callback(tables.sort()); + }); + }, + + readSchemas: function (sequelize, callback) { + return sequelize + .showAllSchemas() + .then(function (schemas) { + return callback(schemas.sort()); + }); + }, + + countTable: function (sequelize, table, callback) { + var QueryGenerator = sequelize.getQueryInterface().QueryGenerator; + + return sequelize + .query('SELECT count(*) as count FROM ' + QueryGenerator.quoteTable(table)) + .then(function (result) { + return callback((result.length === 2) ? result[0] : result ); + }); + }, + execQuery: function(sequelize, sql, options) { + if (sequelize.query.length === 2) { + return sequelize.query(sql, options); + } else { + return sequelize.query(sql, null, options); + } + } +}; + +function logToFile (thing) { + var text = (typeof thing === 'string') ? thing : JSON.stringify(thing); + var logPath = __dirname + '/../../logs'; + var logFile = logPath + '/test.log'; + + fs.mkdirpSync(logPath); + fs.appendFileSync(logFile, '[' + new Date() + '] ' + text + '\n'); +} diff --git a/node_modules/sequelize-cli/test/support/index.js b/node_modules/sequelize-cli/test/support/index.js new file mode 100644 index 00000000..0beb7d31 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/index.js @@ -0,0 +1,266 @@ +'use strict'; + +var fs = require('fs'); +var path = require('path'); +var Sequelize = require('sequelize'); +var _ = require('lodash'); +var Bluebird = require('bluebird'); +var DataTypes = Sequelize; +var Config = require(__dirname + '/config/config'); +var expect = require('expect.js'); +var execQuery = function (sequelize, sql, options) { + if (sequelize.query.length === 2) { + return sequelize.query(sql, options); + } else { + return sequelize.query(sql, null, options); + } +} + +var Support = { + Sequelize: Sequelize, + + initTests: function (options) { + var sequelize = this.createSequelizeInstance(options); + + this.clearDatabase(sequelize, function () { + if (options.context) { + options.context.sequelize = sequelize; + } + + if (options.beforeComplete) { + options.beforeComplete(sequelize, DataTypes); + } + + if (options.onComplete) { + options.onComplete(sequelize, DataTypes); + } + }); + }, + + prepareTransactionTest: function (sequelize, callback) { + var dialect = Support.getTestDialect(); + + if (dialect === 'sqlite') { + var options = _.extend({}, sequelize.options, { + storage: path.join(__dirname, 'tmp', 'db.sqlite') + }); + var _sequelize = new Sequelize(sequelize.config.datase, null, null, options); + + _sequelize.sync({ force: true }).then(function () { + callback(_sequelize); + }); + } else { + callback(sequelize); + } + }, + + createSequelizeInstance: function (options) { + options = options || {}; + options.dialect = options.dialect || 'sqlite'; + + var config = Config[options.dialect]; + var sequelizeOptions = _.defaults(options, { + host: options.host || config.host, + logging: false, + dialect: options.dialect, + port: options.port || process.env.SEQ_PORT || config.port, + pool: config.pool, + dialectOptions: options.dialectOptions || {} + }); + + if (process.env.DIALECT === 'postgres-native') { + sequelizeOptions.native = true; + } + + if (!!config.storage) { + sequelizeOptions.storage = config.storage; + } + + return this.getSequelizeInstance( + config.database, + config.username, + config.password, + sequelizeOptions + ); + }, + + getSequelizeInstance: function (db, user, pass, options) { + options = options || {}; + options.dialect = options.dialect || this.getTestDialect(); + return new Sequelize(db, user, pass, options); + }, + + clearDatabase: function (sequelize, callback) { + function dropAllTables() { + return sequelize + .getQueryInterface() + .dropAllTables() + .then(function () { + if (sequelize.daoFactoryManager) { + sequelize.daoFactoryManager.daos = []; + } else { + sequelize.modelManager.models = []; + } + + return sequelize + .getQueryInterface() + .dropAllEnums() + .then(callback) + .catch(function (err) { + console.log('Error in support.clearDatabase() dropAllEnums() :: ', err); + }); + }) + .catch(function (err) { + console.log('Error in support.clearDatabase() dropAllTables() :: ', err); + }); + }; + + // If Postgres, loop through each of the non-public schemas and DROP/re-CREATE them. + if (this.dialectIsPostgres()) { + return sequelize + .showAllSchemas() + .then(function (schemas) { + // showAllSchemas() leaves off the public schema. + return Bluebird.mapSeries(schemas, (schema) => { + return sequelize + .dropSchema(schema) + .then(function() { + return sequelize.createSchema(schema) + }); + }).then(dropAllTables); // Drop the public schema tables. + }); + } else { + return dropAllTables(); + } + }, + + getSupportedDialects: function () { + var dir = __dirname + '/../../node_modules/sequelize/lib/dialects'; + + return fs.readdirSync(dir).filter(function (file) { + return ((file.indexOf('.js') === -1) && (file.indexOf('abstract') === -1)); + }); + }, + + checkMatchForDialects: function (dialect, value, expectations) { + if (!!expectations[dialect]) { + expect(value).to.match(expectations[dialect]); + } else { + throw new Error('Undefined expectation for \'' + dialect + '\'!'); + } + }, + + getTestDialect: function () { + var envDialect = process.env.DIALECT || 'sqlite'; + + if (envDialect === 'postgres-native') { + envDialect = 'postgres'; + } + + if (this.getSupportedDialects().indexOf(envDialect) === -1) { + throw new Error('The dialect you have passed is unknown. Did you really mean: ' + envDialect); + } + + return envDialect; + }, + + dialectIsMySQL: function (strict) { + var envDialect = this.getTestDialect(); + + if (strict === undefined) { + strict = false; + } + + if (strict) { + return envDialect === 'mysql'; + } else { + return ['mysql', 'mariadb'].indexOf(envDialect) !== -1; + } + }, + + dialectIsPostgres: function (strict) { + var envDialect = this.getTestDialect(); + return ['postgres', 'postgres-native'].indexOf(envDialect) !== -1; + }, + + getTestDialectTeaser: function (moduleName) { + var dialect = this.getTestDialect(); + + if (process.env.DIALECT === 'postgres-native') { + dialect = 'postgres-native'; + } + + return '[' + dialect.toUpperCase() + '] lib/sequelize ' + moduleName; + }, + + getTestUrl: function (config) { + var url = null; + var dbConfig = config[config.dialect]; + + if (config.dialect === 'sqlite') { + url = 'sqlite://' + dbConfig.storage; + } else { + var credentials = dbConfig.username; + + if (dbConfig.password) { + credentials += ':' + dbConfig.password; + } + + url = config.dialect + '://' + credentials + '@' + dbConfig.host + + ':' + dbConfig.port + '/' + dbConfig.database; + } + + return url; + }, + + getCliPath: function (cwd) { + return path.resolve(cwd, path.resolve(process.cwd(), 'lib', 'sequelize')); + }, + + getCliCommand: function (cwd, flags) { + return this.getCliPath(cwd) + ' ' + flags; + }, + + getSupportDirectoryPath: function () { + return path.resolve(__dirname); + }, + + resolveSupportPath: function () { + var args = [].slice.apply(arguments); + + args = [this.getSupportDirectoryPath()].concat(args); + return path.resolve.apply(path, args); + } +}; + +var sequelize = Support.createSequelizeInstance({ dialect: Support.getTestDialect() }); + +// For Postgres' HSTORE functionality and to properly execute it's commands we'll need this... +before(function (done) { + var dialect = Support.getTestDialect(); + + if (dialect !== 'postgres' && dialect !== 'postgres-native') { + return done(); + } + + execQuery(sequelize, 'CREATE EXTENSION IF NOT EXISTS hstore', {raw: true}).then(function () { + done(); + }); +}); + +beforeEach(function (done) { + Support.clearDatabase(sequelize, function () { + if (sequelize.options.dialect === 'sqlite') { + var options = sequelize.options; + + options.storage = Support.resolveSupportPath('tmp', 'test.sqlite'); + sequelize = new Support.Sequelize('', '', '', options); + } + + this.sequelize = sequelize; + + done(); + }.bind(this)); +}); + +module.exports = Support; diff --git a/node_modules/sequelize-cli/test/support/tmp/.gitkeep b/node_modules/sequelize-cli/test/support/tmp/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/sequelize-cli/test/support/tmp/config/config.js b/node_modules/sequelize-cli/test/support/tmp/config/config.js new file mode 100644 index 00000000..ae5d10ef --- /dev/null +++ b/node_modules/sequelize-cli/test/support/tmp/config/config.js @@ -0,0 +1 @@ +module.exports = {"username":"root","password":null,"database":"sequelize_test","host":"127.0.0.1","pool":{"maxConnections":5,"maxIdleTime":30000},"mysql":{"database":"sequelize_test","username":"root","password":null,"host":"127.0.0.1","port":3306,"pool":{"maxConnections":5,"maxIdleTime":3000}},"sqlite":{"storage":"/var/www/github/cli/test/support/tmp/test.sqlite"},"postgres":{"database":"sequelize_test","username":"postgres","password":"postgres","host":"127.0.0.1","port":5432,"pool":{"maxConnections":5,"maxIdleTime":3000}},"mariadb":{"database":"sequelize_test","username":"root","password":null,"host":"127.0.0.1","port":3306,"pool":{"maxConnections":5,"maxIdleTime":3000}},"storage":"/var/www/github/cli/test/support/tmp/test.sqlite","dialect":"sqlite"} \ No newline at end of file diff --git a/node_modules/sequelize-cli/test/support/tmp/migrations/20141208213500-createPerson.js b/node_modules/sequelize-cli/test/support/tmp/migrations/20141208213500-createPerson.js new file mode 100644 index 00000000..388a38cd --- /dev/null +++ b/node_modules/sequelize-cli/test/support/tmp/migrations/20141208213500-createPerson.js @@ -0,0 +1,13 @@ +'use strict'; + +var Bluebird = require('bluebird'); + +module.exports = { + up: function (db) { + return Bluebird + .delay(1000) + .then(function () { + return db.sequelize.query('INVALID QUERY'); + }); + } +}; diff --git a/node_modules/sequelize-cli/test/support/tmp/models/index.js b/node_modules/sequelize-cli/test/support/tmp/models/index.js new file mode 100644 index 00000000..c1a3d6d5 --- /dev/null +++ b/node_modules/sequelize-cli/test/support/tmp/models/index.js @@ -0,0 +1,37 @@ +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const Sequelize = require('sequelize'); +const basename = path.basename(__filename); +const env = process.env.NODE_ENV || 'development'; +const config = require(__dirname + '/../config/config.json')[env]; +const db = {}; + +let sequelize; +if (config.use_env_variable) { + sequelize = new Sequelize(process.env[config.use_env_variable], config); +} else { + sequelize = new Sequelize(config.database, config.username, config.password, config); +} + +fs + .readdirSync(__dirname) + .filter(file => { + return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js'); + }) + .forEach(file => { + const model = sequelize['import'](path.join(__dirname, file)); + db[model.name] = model; + }); + +Object.keys(db).forEach(modelName => { + if (db[modelName].associate) { + db[modelName].associate(db); + } +}); + +db.sequelize = sequelize; +db.Sequelize = Sequelize; + +module.exports = db; diff --git a/node_modules/sequelize-cli/test/support/tmp/test.sqlite b/node_modules/sequelize-cli/test/support/tmp/test.sqlite new file mode 100644 index 0000000000000000000000000000000000000000..810c695fa3da445828ce9bc051545839fd7c82bc GIT binary patch literal 12288 zcmeI#KTE?v7{~FuDk?%rx3141v{?j|4sOPhVlj<2ZG=uq#1jJjLp1?$(ii6Yax_=y zkg2Pb?*n(okK+#RbJH^!2YF%Sb@jH$3b|4(rM0>dQA+7*98_alHXm+7wc5O^v^qcg zYC6BF;S7{BaDH|jU>^Yl5I_I{1Q0*~0R#|00D=E2Q0n7$r=!2!B72^jiCLFso`0H= zDY9B<^dsM!`ZD!y17FhGUMk&mnJr8zPhQl&^P=u$ujfkmFqJS40*S-nIQHc+8jieZ zCini#y>1+}M;)#5<%{`vU(c&fKFP{rwaH2C_T-`#ZC`(4J)3rF*@;2`0R#|0009IL rKmY**5I_KdeHA#h52OFz*YD+B2q1s}0tg_000IagfB*srYy|!Q!?r_# literal 0 HcmV?d00001 diff --git a/node_modules/sequelize-cli/test/url.test.js b/node_modules/sequelize-cli/test/url.test.js new file mode 100644 index 00000000..961e2863 --- /dev/null +++ b/node_modules/sequelize-cli/test/url.test.js @@ -0,0 +1,61 @@ +const expect = require('expect.js'); +const Support = require(__dirname + '/support'); +const helpers = require(__dirname + '/support/helpers'); +const gulp = require('gulp'); + +[ + '--url' +].forEach(flag => { + const prepare = function (callback) { + gulp + .src(Support.resolveSupportPath('tmp')) + .pipe(helpers.clearDirectory()) + .pipe(helpers.runCli('init')) + .pipe(helpers.copyMigration('createPerson.js')) + .pipe(helpers.overwriteFile(JSON.stringify(helpers.getTestConfig()), 'config/config.json')) + .pipe(helpers.runCli('db:migrate ' + flag + '=' + helpers.getTestUrl(), { pipeStdout: true })) + .pipe(helpers.teardown(callback)); + }; + + describe(Support.getTestDialectTeaser(flag), () => { + beforeEach(function (done) { + prepare((err, stdout) => { + this.stdout = stdout; + done(); + }); + }); + + it('creates a SequelizeMeta table', function (done) { + helpers.readTables(this.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables).to.contain('SequelizeMeta'); + done(); + }); + }); + + it('creates the respective table via url', function (done) { + helpers.readTables(this.sequelize, tables => { + expect(tables).to.have.length(2); + expect(tables).to.contain('Person'); + done(); + }); + }); + + it('prints the parsed URL', function () { + expect(this.stdout).to.contain('Parsed url'); + }); + + it('filters the password', function () { + const config = helpers.getTestConfig(); + + if (Support.getTestDialect() === 'sqlite') { + return; + } + + expect(this.stdout).to.contain( + config.dialect + '://' + config.username + ':*****@' + config.host + + ':' + config.port + '/' + config.database + ); + }); + }); +}); diff --git a/node_modules/sequelize-cli/test/version.test.js b/node_modules/sequelize-cli/test/version.test.js new file mode 100644 index 00000000..71ea078a --- /dev/null +++ b/node_modules/sequelize-cli/test/version.test.js @@ -0,0 +1,21 @@ +const expect = require('expect.js'); +const Support = require(__dirname + '/support'); +const version = (require(__dirname + '/../package.json')).version; +const helpers = require(__dirname + '/support/helpers'); +const gulp = require('gulp'); + +[ + '--version' +].forEach(flag => { + describe(Support.getTestDialectTeaser(flag), () => { + it('prints the version', done => { + expect(version).to.not.be.empty; + + gulp + .src(process.cwd()) + .pipe(helpers.runCli(flag, { pipeStdout: true })) + .pipe(helpers.ensureContent(version)) + .pipe(helpers.teardown(done)); + }); + }); +}); diff --git a/node_modules/sequelize-pool/LICENSE b/node_modules/sequelize-pool/LICENSE new file mode 100644 index 00000000..89de96fb --- /dev/null +++ b/node_modules/sequelize-pool/LICENSE @@ -0,0 +1,50 @@ +(The MIT License) + +Copyright (c) 2018-present Sushant + +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. + + +-------------------------------- + +(Original Fork License) + +[generic-pool@2.5] + +Copyright (c) 2010-2016 James Cooper + +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/sequelize-pool/README.md b/node_modules/sequelize-pool/README.md new file mode 100644 index 00000000..390b868e --- /dev/null +++ b/node_modules/sequelize-pool/README.md @@ -0,0 +1,130 @@ +# sequelize-pool + +[![npm](https://img.shields.io/npm/v/sequelize-pool.svg?style=flat-square)](https://www.npmjs.com/package/sequelize-pool) +[![Travis (.org)](https://img.shields.io/travis/sushantdhiman/sequelize-pool.svg?style=flat-square)](https://travis-ci.org/sushantdhiman/sequelize-pool) + + + Resource pool. Can be used to reuse or throttle expensive resources such as + database connections. + + This is a fork from [generic-pool@v2.5](https://github.com/coopernurse/node-pool/tree/v2.5). + +## Installation + +```bash +$ npm install --save sequelize-pool +$ yarn add sequelize-pool +``` + +## Example + +### Step 1 - Create pool using a factory object + +```js +// Create a MySQL connection pool +var Pool = require('sequelize-pool').Pool; +var mysql2 = require('mysql2/promise'); + +var pool = new Pool({ + name : 'mysql', + create : function() { + // return Promise + return mysql2.createConnection({ + user: 'scott', + password: 'tiger', + database:'mydb' + }); + }, + destroy : function(client) { client.end(); }, + max : 10, + // optional. if you set this, make sure to drain() (see step 3) + min : 2, + // Delay in milliseconds after which available resources in the pool will be destroyed. + idleTimeoutMillis : 30000, + // Delay in milliseconds after which pending acquire request in the pool will be rejected. + acquireTimeoutMillis: 30000, + // Function, defaults to console.log + log : true +}); +``` + +### Step 2 - Use pool in your code to acquire/release resources + +```js +// acquire connection +pool.acquire().then(connection => { + client.query("select * from foo", [], function() { + // return object back to pool + pool.release(client); + }); +}); +``` + +### Step 3 - Drain pool during shutdown (optional) + +If you are shutting down a long-lived process, you may notice +that node fails to exit for 30 seconds or so. This is a side +effect of the idleTimeoutMillis behaviour -- the pool has a +setTimeout() call registered that is in the event loop queue, so +node won't terminate until all resources have timed out, and the pool +stops trying to manage them. + +This behaviour will be more problematic when you set factory.min > 0, +as the pool will never become empty, and the setTimeout calls will +never end. + +In these cases, use the pool.drain() function. This sets the pool +into a "draining" state which will gracefully wait until all +idle resources have timed out. For example, you can call: + +```js +// Only call this once in your application -- at the point you want +// to shutdown and stop using this pool. +pool.drain().then(() => pool.destroyAllNow()); +``` + +If you do this, your node process will exit gracefully. + +## Draining + +If you know would like to terminate all the resources in your pool before +their timeouts have been reached, you can use `destroyAllNow()` in conjunction +with `drain()`: + +```js +pool.drain().then(() => pool.destroyAllNow()); +``` + +One side-effect of calling `drain()` is that subsequent calls to `acquire()` +will throw an Error. + +## Pool info + +The following functions will let you get information about the pool: + +```js +// returns factory.name for this pool +pool.name + +// returns number of resources in the pool regardless of +// whether they are free or in use +pool.size + +// returns number of unused resources in the pool +pool.available + +// returns number of callers waiting to acquire a resource +pool.waiting + +// returns number of maxixmum number of resources allowed by ppol +pool.maxSize + +// returns number of minimum number of resources allowed by ppol +pool.minSize + +``` + +## Run Tests + + $ npm install + $ npm test \ No newline at end of file diff --git a/node_modules/sequelize-pool/lib/Deferred.js b/node_modules/sequelize-pool/lib/Deferred.js new file mode 100644 index 00000000..21dc2e5e --- /dev/null +++ b/node_modules/sequelize-pool/lib/Deferred.js @@ -0,0 +1,45 @@ +"use strict"; + +const { TimeoutError } = require("./TimeoutError"); + +class Deferred { + constructor() { + this._timeout = null; + this._promise = new Promise((resolve, reject) => { + this._reject = reject; + this._resolve = resolve; + }); + } + + registerTimeout(timeoutInMillis, callback) { + if (this._timeout) return; + + this._timeout = setTimeout(() => { + callback(); + this.reject(new TimeoutError("Operation timeout")); + }, timeoutInMillis); + } + + _clearTimeout() { + if (!this._timeout) return; + + clearTimeout(this._timeout); + this._timeout = null; + } + + resolve(value) { + this._clearTimeout(); + this._resolve(value); + } + + reject(error) { + this._clearTimeout(); + this._reject(error); + } + + promise() { + return this._promise; + } +} + +module.exports = Deferred; diff --git a/node_modules/sequelize-pool/lib/Pool.js b/node_modules/sequelize-pool/lib/Pool.js new file mode 100644 index 00000000..ce385667 --- /dev/null +++ b/node_modules/sequelize-pool/lib/Pool.js @@ -0,0 +1,487 @@ +"use strict"; + +const Deferred = require("./Deferred"); + +/** + * Generate an Object pool with a specified `factory`. + * + * @class + * @param {Object} factory + * Factory to be used for generating and destroying the items. + * @param {String} [factory.name] + * Name of the factory. Serves only logging purposes. + * @param {Function} factory.create + * Should create the item to be acquired, + * and call it's first callback argument with the generated item as it's argument. + * @param {Function} factory.destroy + * Should gently close any resources that the item is using. + * Called before the items is destroyed. + * @param {Function} factory.validate + * Should return true if connection is still valid and false + * If it should be removed from pool. Called before item is + * acquired from pool. + * @param {Number} factory.max + * Maximum number of items that can exist at the same time. + * Any further acquire requests will be pushed to the waiting list. + * @param {Number} factory.min + * Minimum number of items in pool (including in-use). + * When the pool is created, or a resource destroyed, this minimum will + * be checked. If the pool resource count is below the minimum, a new + * resource will be created and added to the pool. + * @param {Number} [factory.idleTimeoutMillis=30000] + * Delay in milliseconds after which available resources in the pool will be destroyed. + * This does not affects pending acquire requests. + * @param {Number} [factory.acquireTimeoutMillis=30000] + * Delay in milliseconds after which pending acquire request in the pool will be rejected. + * Pending acquires are acquire calls which are yet to receive an response from factory.create + * @param {Number} [factory.reapIntervalMillis=1000] + * Clean up is scheduled in every `factory.reapIntervalMillis` milliseconds. + * @param {Boolean|Function} [factory.log=false] + * Whether the pool should log activity. If function is specified, + * that will be used instead. The function expects the arguments msg, loglevel + */ +class Pool { + constructor(factory) { + if (!factory.create) { + throw new Error("create function is required"); + } + + if (!factory.destroy) { + throw new Error("destroy function is required"); + } + + if (!factory.validate) { + throw new Error("validate function is required"); + } + + if ( + typeof factory.min !== "number" || + factory.min < 0 || + factory.min !== Math.round(factory.min) + ) { + throw new Error("min must be an integer >= 0"); + } + + if ( + typeof factory.max !== "number" || + factory.max <= 0 || + factory.max !== Math.round(factory.max) + ) { + throw new Error("max must be an integer > 0"); + } + + if (factory.min > factory.max) { + throw new Error("max is smaller than min"); + } + + // defaults + factory.idleTimeoutMillis = factory.idleTimeoutMillis || 30000; + factory.acquireTimeoutMillis = factory.acquireTimeoutMillis || 30000; + factory.reapInterval = factory.reapIntervalMillis || 1000; + factory.max = parseInt(factory.max, 10); + factory.min = parseInt(factory.min, 10); + factory.log = factory.log || false; + + this._factory = factory; + this._count = 0; + this._draining = false; + + // queues + this._pendingAcquires = []; + this._inUseObjects = []; + this._availableObjects = []; + + // timing controls + this._removeIdleTimer = null; + this._removeIdleScheduled = false; + } + + get size() { + return this._count; + } + + get name() { + return this._factory.name; + } + + get available() { + return this._availableObjects.length; + } + + get using() { + return this._inUseObjects.length; + } + + get waiting() { + return this._pendingAcquires.length; + } + + get maxSize() { + return this._factory.max; + } + + get minSize() { + return this._factory.min; + } + + /** + * logs to console or user defined log function + * @private + * @param {string} message + * @param {string} level + */ + _log(message, level) { + if (typeof this._factory.log === "function") { + this._factory.log(message, level); + } else if (this._factory.log) { + console.log(`${level.toUpperCase()} pool ${this.name} - ${message}`); + } + } + + /** + * Checks and removes the available (idle) clients that have timed out. + * @private + */ + _removeIdle() { + const toRemove = []; + const now = Date.now(); + let i; + let available = this._availableObjects.length; + const maxRemovable = this._count - this._factory.min; + let timeout; + + this._removeIdleScheduled = false; + + // Go through the available (idle) items, + // check if they have timed out + for (i = 0; i < available && maxRemovable > toRemove.length; i++) { + timeout = this._availableObjects[i].timeout; + if (now >= timeout) { + // Client timed out, so destroy it. + this._log( + "removeIdle() destroying obj - now:" + now + " timeout:" + timeout, + "verbose" + ); + toRemove.push(this._availableObjects[i].resource); + } + } + + toRemove.forEach(this.destroy, this); + + // NOTE: we are re-calculating this value because it may have changed + // after destroying items above + // Replace the available items with the ones to keep. + available = this._availableObjects.length; + + if (available > 0) { + this._log("this._availableObjects.length=" + available, "verbose"); + this._scheduleRemoveIdle(); + } else { + this._log("removeIdle() all objects removed", "verbose"); + } + } + + /** + * Schedule removal of idle items in the pool. + * + * More schedules cannot run concurrently. + */ + _scheduleRemoveIdle() { + if (!this._removeIdleScheduled) { + this._removeIdleScheduled = true; + this._removeIdleTimer = setTimeout(() => { + this._removeIdle(); + }, this._factory.reapInterval); + } + } + + /** + * Try to get a new client to work, and clean up pool unused (idle) items. + * + * - If there are available clients waiting, pop the first one out (LIFO), + * and call its callback. + * - If there are no waiting clients, try to create one if it won't exceed + * the maximum number of clients. + * - If creating a new client would exceed the maximum, add the client to + * the wait list. + * @private + */ + _dispense() { + let resourceWithTimeout = null; + const waitingCount = this._pendingAcquires.length; + + this._log( + `dispense() clients=${waitingCount} available=${this._availableObjects.length}`, + "info" + ); + + if (waitingCount < 1) { + return; + } + + while (this._availableObjects.length > 0) { + this._log("dispense() - reusing obj", "verbose"); + resourceWithTimeout = this._availableObjects[ + this._availableObjects.length - 1 + ]; + if (!this._factory.validate(resourceWithTimeout.resource)) { + this.destroy(resourceWithTimeout.resource); + continue; + } + + this._availableObjects.pop(); + this._inUseObjects.push(resourceWithTimeout.resource); + + const deferred = this._pendingAcquires.shift(); + return deferred.resolve(resourceWithTimeout.resource); + } + + if (this._count < this._factory.max) { + this._createResource(); + } + } + + /** + * @private + */ + _createResource() { + this._count += 1; + this._log( + `createResource() - creating obj - count=${this._count} min=${this._factory.min} max=${this._factory.max}`, + "verbose" + ); + + this._factory + .create() + .then(resource => { + const deferred = this._pendingAcquires.shift(); + + this._inUseObjects.push(resource); + + if (deferred) { + deferred.resolve(resource); + } else { + this._addResourceToAvailableObjects(resource); + } + }) + .catch(error => { + const deferred = this._pendingAcquires.shift(); + + this._count -= 1; + if (this._count < 0) this._count = 0; + if (deferred) { + deferred.reject(error); + } + process.nextTick(() => { + this._dispense(); + }); + }); + } + + _addResourceToAvailableObjects(resource) { + const resourceWithTimeout = { + resource: resource, + timeout: Date.now() + this._factory.idleTimeoutMillis + }; + + this._availableObjects.push(resourceWithTimeout); + this._dispense(); + this._scheduleRemoveIdle(); + } + + /** + * @private + */ + _ensureMinimum() { + let i, diff; + if (!this._draining && this._count < this._factory.min) { + diff = this._factory.min - this._count; + for (i = 0; i < diff; i++) { + this._createResource(); + } + } + } + + /** + * Requests a new resource. This will call factory.create to request new resource. + * + * It will be rejected with timeout error if `factory.create` didn't respond + * back within specified `acquireTimeoutMillis` + * + * @returns {Promise} + */ + acquire() { + if (this._draining) { + return Promise.reject( + new Error("pool is draining and cannot accept work") + ); + } + + const deferred = new Deferred(); + deferred.registerTimeout(this._factory.acquireTimeoutMillis, () => { + // timeout triggered, promise will be rejected + // remove this object from pending list + this._pendingAcquires = this._pendingAcquires.filter( + pending => pending !== deferred + ); + }); + + this._pendingAcquires.push(deferred); + this._dispense(); + + return deferred.promise(); + } + + /** + * Return the resource to the pool, in case it is no longer required. + * + * @param {Object} resource The acquired object to be put back to the pool. + * + * @returns {void} + */ + release(resource) { + // check to see if this object has already been released + // (i.e., is back in the pool of this._availableObjects) + if ( + this._availableObjects.some( + resourceWithTimeout => resourceWithTimeout.resource === resource + ) + ) { + this._log( + "release called twice for the same resource: " + new Error().stack, + "error" + ); + return; + } + + // check to see if this object exists in the `in use` list and remove it + const index = this._inUseObjects.indexOf(resource); + if (index < 0) { + this._log( + "attempt to release an invalid resource: " + new Error().stack, + "error" + ); + return; + } + + this._inUseObjects.splice(index, 1); + this._addResourceToAvailableObjects(resource); + } + + /** + * Request the client to be destroyed. The factory's destroy handler + * will also be called. + * + * This should be called within an acquire() block as an alternative to release(). + * + * @param {Object} resource The acquired item to be destroyed. + * + * @returns {void} + */ + destroy(resource) { + const available = this._availableObjects.length; + const using = this._inUseObjects.length; + + this._availableObjects = this._availableObjects.filter( + object => object.resource !== resource + ); + this._inUseObjects = this._inUseObjects.filter( + object => object !== resource + ); + + // resource was not removed, then no need to decrement _count + if ( + available === this._availableObjects.length && + using === this._inUseObjects.length + ) { + this._ensureMinimum(); + return; + } + + this._count -= 1; + if (this._count < 0) this._count = 0; + + this._factory.destroy(resource); + this._ensureMinimum(); + } + + /** + * Disallow any new requests and let the request backlog dissipate. + * + * @returns {Promise} + */ + drain() { + this._log("draining", "info"); + + // disable the ability to put more work on the queue. + this._draining = true; + + const check = callback => { + // wait until all client requests have been satisfied. + if (this._pendingAcquires.length > 0) { + // pool is draining so we wont accept new acquires but + // we need to clear pending acquires + this._dispense(); + return setTimeout(() => { + check(callback); + }, 100); + } + + // wait until in use object have been released. + if (this._availableObjects.length !== this._count) { + return setTimeout(() => { + check(callback); + }, 100); + } + + callback(); + }; + + // No error handling needed here. + return new Promise(resolve => check(resolve)); + } + + /** + * Forcibly destroys all clients regardless of timeout. Intended to be + * invoked as part of a drain. Does not prevent the creation of new + * clients as a result of subsequent calls to acquire. + * + * Note that if factory.min > 0, the pool will destroy all idle resources + * in the pool, but replace them with newly created resources up to the + * specified factory.min value. If this is not desired, set factory.min + * to zero before calling destroyAllNow() + * + * @returns {Promise} + */ + destroyAllNow() { + this._log("force destroying all objects", "info"); + + const willDie = this._availableObjects.slice(); + const todo = willDie.length; + + this._removeIdleScheduled = false; + clearTimeout(this._removeIdleTimer); + + return new Promise(resolve => { + if (todo === 0) { + return resolve(); + } + + let resource; + let done = 0; + + while ((resource = willDie.shift())) { + this.destroy(resource.resource); + ++done; + + if (done === todo && resolve) { + return resolve(); + } + } + }); + } +} + +exports.Pool = Pool; +exports.default = Pool; +exports.TimeoutError = require("./TimeoutError").TimeoutError; diff --git a/node_modules/sequelize-pool/lib/TimeoutError.js b/node_modules/sequelize-pool/lib/TimeoutError.js new file mode 100644 index 00000000..6d2bbb96 --- /dev/null +++ b/node_modules/sequelize-pool/lib/TimeoutError.js @@ -0,0 +1,5 @@ +"use strict"; + +class TimeoutError extends Error {} + +exports.TimeoutError = TimeoutError; diff --git a/node_modules/sequelize-pool/package.json b/node_modules/sequelize-pool/package.json new file mode 100644 index 00000000..918fc879 --- /dev/null +++ b/node_modules/sequelize-pool/package.json @@ -0,0 +1,38 @@ +{ + "name": "sequelize-pool", + "description": "Resource pooling for Node.JS", + "version": "2.3.0", + "author": "Sushant ", + "keywords": [ + "pool", + "pooling", + "throttle", + "sequelize" + ], + "main": "lib/Pool.js", + "repository": { + "type": "git", + "url": "http://github.com/sushantdhiman/sequelize-pool.git" + }, + "files": [ + "lib" + ], + "dependencies": {}, + "devDependencies": { + "eslint": "^5.16.0", + "eslint-config-prettier": "^4.3.0", + "eslint-plugin-prettier": "^3.1.0", + "prettier": "1.18.2", + "tap": "^12.7.0" + }, + "engines": { + "node": ">= 6.0.0" + }, + "scripts": { + "test": "npm run lint && npm run test:raw", + "lint": "eslint lib test", + "pretty": "prettier lib/**/*.js test/**/*.js --write", + "test:raw": "tap test/**/*-test.js" + }, + "license": "MIT" +} diff --git a/node_modules/sequelize/LICENSE b/node_modules/sequelize/LICENSE new file mode 100644 index 00000000..82943324 --- /dev/null +++ b/node_modules/sequelize/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2014-present Sequelize 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: + +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/sequelize/README.md b/node_modules/sequelize/README.md new file mode 100644 index 00000000..dd8b0f25 --- /dev/null +++ b/node_modules/sequelize/README.md @@ -0,0 +1,74 @@ +# Sequelize + +[![npm version](https://badgen.net/npm/v/sequelize)](https://www.npmjs.com/package/sequelize) +[![Travis Build Status](https://badgen.net/travis/sequelize/sequelize?icon=travis)](https://travis-ci.org/sequelize/sequelize) +[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/9l1ypgwsp5ij46m3/branch/master?svg=true)](https://ci.appveyor.com/project/sushantdhiman/sequelize/branch/master) +[![npm downloads](https://badgen.net/npm/dm/sequelize)](https://www.npmjs.com/package/sequelize) +[![codecov](https://badgen.net/codecov/c/github/sequelize/sequelize?icon=codecov)](https://codecov.io/gh/sequelize/sequelize) +[![Last commit](https://badgen.net/github/last-commit/sequelize/sequelize)](https://github.com/sequelize/sequelize) +[![Merged PRs](https://badgen.net/github/merged-prs/sequelize/sequelize)](https://github.com/sequelize/sequelize) +[![GitHub stars](https://badgen.net/github/stars/sequelize/sequelize)](https://github.com/sequelize/sequelize) +[![Bountysource](https://www.bountysource.com/badge/team?team_id=955&style=bounties_received)](https://www.bountysource.com/teams/sequelize/issues?utm_source=Sequelize&utm_medium=shield&utm_campaign=bounties_received) +[![Slack Status](http://sequelize-slack.herokuapp.com/badge.svg)](http://sequelize-slack.herokuapp.com/) +[![node](https://badgen.net/npm/node/sequelize)](https://www.npmjs.com/package/sequelize) +[![License](https://badgen.net/github/license/sequelize/sequelize)](https://github.com/sequelize/sequelize/blob/master/LICENSE) +[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) + +Sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. It features solid transaction support, relations, eager and lazy loading, read replication and more. + +Sequelize follows [SEMVER](http://semver.org). Supports Node v6 and above to use ES6 features. + +New to Sequelize? Take a look at the [Tutorials and Guides](http://docs.sequelizejs.com/). You might also be interested in the [API Reference](http://docs.sequelizejs.com/identifiers). + +## v5 Release + +You can find the upgrade guide and changelog [here](http://docs.sequelizejs.com/manual/upgrade-to-v5.html). + +## Table of Contents +- [Installation](#installation) +- [Documentation](#documentation) +- [Responsible disclosure](#responsible-disclosure) +- [Resources](#resources) + +## Installation + +```bash +$ npm install --save sequelize # This will install v5 + +# And one of the following: +$ npm install --save pg pg-hstore # Postgres +$ npm install --save mysql2 +$ npm install --save mariadb +$ npm install --save sqlite3 +$ npm install --save tedious # Microsoft SQL Server +``` + +## Documentation +- [v5 Documentation](http://docs.sequelizejs.com) +- [v4 Documentation](https://github.com/sequelize/sequelize/blob/v4/docs) +- [v3 Documentation](https://sequelize.readthedocs.io/en/v3/) +- [Contributing](https://github.com/sequelize/sequelize/blob/master/CONTRIBUTING.md) + +## Responsible disclosure +If you have any security issue to report, contact project maintainers privately. You can find contact information in [CONTACT.md](https://github.com/sequelize/sequelize/blob/master/CONTACT.md). + +## Resources + +- [Changelog](https://github.com/sequelize/sequelize/releases) +- [Slack](http://sequelize-slack.herokuapp.com/) +- [Stack Overflow](https://stackoverflow.com/questions/tagged/sequelize.js) + +### Tools +- [Sequelize & TypeScript](http://docs.sequelizejs.com/manual/typescript.html) +- [Enhanced TypeScript with decorators](https://github.com/RobinBuschmann/sequelize-typescript) +- [Sequelize & GraphQL](https://github.com/mickhansen/graphql-sequelize) +- [Add-ons & Plugins](http://docs.sequelizejs.com/manual/resources.html) +- [Sequelize CLI](https://github.com/sequelize/cli) + +### Learning +- [Getting Started](http://docs.sequelizejs.com/manual/getting-started) +- [Express Example](https://github.com/sequelize/express-example) + +### Translations +- [English v5](http://docs.sequelizejs.com) (OFFICIAL) +- [中文文档 v4/v5](https://github.com/demopark/sequelize-docs-Zh-CN) (UNOFFICIAL) diff --git a/node_modules/sequelize/index.js b/node_modules/sequelize/index.js new file mode 100644 index 00000000..31e6c23b --- /dev/null +++ b/node_modules/sequelize/index.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * The entry point. + * + * @module Sequelize + */ +module.exports = require('./lib/sequelize'); diff --git a/node_modules/sequelize/lib/associations/base.js b/node_modules/sequelize/lib/associations/base.js new file mode 100644 index 00000000..a440e3ef --- /dev/null +++ b/node_modules/sequelize/lib/associations/base.js @@ -0,0 +1,144 @@ +'use strict'; + +const { AssociationError } = require('./../errors'); + +/** + * Creating associations in sequelize is done by calling one of the belongsTo / hasOne / hasMany / belongsToMany functions on a model (the source), and providing another model as the first argument to the function (the target). + * + * * hasOne - adds a foreign key to the target and singular association mixins to the source. + * * belongsTo - add a foreign key and singular association mixins to the source. + * * hasMany - adds a foreign key to target and plural association mixins to the source. + * * belongsToMany - creates an N:M association with a join table and adds plural association mixins to the source. The junction table is created with sourceId and targetId. + * + * Creating an association will add a foreign key constraint to the attributes. All associations use `CASCADE` on update and `SET NULL` on delete, except for n:m, which also uses `CASCADE` on delete. + * + * When creating associations, you can provide an alias, via the `as` option. This is useful if the same model is associated twice, or you want your association to be called something other than the name of the target model. + * + * As an example, consider the case where users have many pictures, one of which is their profile picture. All pictures have a `userId`, but in addition the user model also has a `profilePictureId`, to be able to easily load the user's profile picture. + * + * ```js + * User.hasMany(Picture) + * User.belongsTo(Picture, { as: 'ProfilePicture', constraints: false }) + * + * user.getPictures() // gets you all pictures + * user.getProfilePicture() // gets you only the profile picture + * + * User.findAll({ + * where: ..., + * include: [ + * { model: Picture }, // load all pictures + * { model: Picture, as: 'ProfilePicture' }, // load the profile picture. + * // Notice that the spelling must be the exact same as the one in the association + * ] + * }) + * ``` + * To get full control over the foreign key column added by sequelize, you can use the `foreignKey` option. It can either be a string, that specifies the name, or and object type definition, + * equivalent to those passed to `sequelize.define`. + * + * ```js + * User.hasMany(Picture, { foreignKey: 'uid' }) + * ``` + * + * The foreign key column in Picture will now be called `uid` instead of the default `userId`. + * + * ```js + * User.hasMany(Picture, { + * foreignKey: { + * name: 'uid', + * allowNull: false + * } + * }) + * ``` + * + * This specifies that the `uid` column cannot be null. In most cases this will already be covered by the foreign key constraints, which sequelize creates automatically, but can be useful in case where the foreign keys are disabled, e.g. due to circular references (see `constraints: false` below). + * + * When fetching associated models, you can limit your query to only load some models. These queries are written in the same way as queries to `find`/`findAll`. To only get pictures in JPG, you can do: + * + * ```js + * user.getPictures({ + * where: { + * format: 'jpg' + * } + * }) + * ``` + * + * There are several ways to update and add new associations. Continuing with our example of users and pictures: + * ```js + * user.addPicture(p) // Add a single picture + * user.setPictures([p1, p2]) // Associate user with ONLY these two picture, all other associations will be deleted + * user.addPictures([p1, p2]) // Associate user with these two pictures, but don't touch any current associations + * ``` + * + * You don't have to pass in a complete object to the association functions, if your associated model has a single primary key: + * + * ```js + * user.addPicture(req.query.pid) // Here pid is just an integer, representing the primary key of the picture + * ``` + * + * In the example above we have specified that a user belongs to his profile picture. Conceptually, this might not make sense, but since we want to add the foreign key to the user model this is the way to do it. + * + * Note how we also specified `constraints: false` for profile picture. This is because we add a foreign key from user to picture (profilePictureId), and from picture to user (userId). If we were to add foreign keys to both, it would create a cyclic dependency, and sequelize would not know which table to create first, since user depends on picture, and picture depends on user. These kinds of problems are detected by sequelize before the models are synced to the database, and you will get an error along the lines of `Error: Cyclic dependency found. 'users' is dependent of itself`. If you encounter this, you should either disable some constraints, or rethink your associations completely. + */ +class Association { + constructor(source, target, options = {}) { + /** + * @type {Model} + */ + this.source = source; + + /** + * @type {Model} + */ + this.target = target; + + this.options = options; + this.scope = options.scope; + this.isSelfAssociation = this.source === this.target; + this.as = options.as; + + /** + * The type of the association. One of `HasMany`, `BelongsTo`, `HasOne`, `BelongsToMany` + * @type {string} + */ + this.associationType = ''; + + if (source.hasAlias(options.as)) { + throw new AssociationError(`You have used the alias ${options.as} in two separate associations. ` + + 'Aliased associations must have unique aliases.' + ); + } + } + + /** + * Normalize input + * + * @param {Array|string} input it may be array or single obj, instance or primary key + * + * @private + * @returns {Array} built objects + */ + toInstanceArray(input) { + if (!Array.isArray(input)) { + input = [input]; + } + + return input.map(element => { + if (element instanceof this.target) return element; + + const tmpInstance = {}; + tmpInstance[this.target.primaryKeyAttribute] = element; + + return this.target.build(tmpInstance, { isNewRecord: false }); + }); + } + + [Symbol.for('nodejs.util.inspect.custom')]() { + return this.as; + } + + inspect() { + return this.as; + } +} + +module.exports = Association; diff --git a/node_modules/sequelize/lib/associations/belongs-to-many.js b/node_modules/sequelize/lib/associations/belongs-to-many.js new file mode 100644 index 00000000..ce267b18 --- /dev/null +++ b/node_modules/sequelize/lib/associations/belongs-to-many.js @@ -0,0 +1,781 @@ +'use strict'; + +const Utils = require('./../utils'); +const Helpers = require('./helpers'); +const _ = require('lodash'); +const Association = require('./base'); +const BelongsTo = require('./belongs-to'); +const HasMany = require('./has-many'); +const HasOne = require('./has-one'); +const AssociationError = require('../errors').AssociationError; +const EmptyResultError = require('../errors').EmptyResultError; +const Op = require('../operators'); + +/** + * Many-to-many association with a join table. + * + * When the join table has additional attributes, these can be passed in the options object: + * + * ```js + * UserProject = sequelize.define('user_project', { + * role: Sequelize.STRING + * }); + * User.belongsToMany(Project, { through: UserProject }); + * Project.belongsToMany(User, { through: UserProject }); + * // through is required! + * + * user.addProject(project, { through: { role: 'manager' }}); + * ``` + * + * All methods allow you to pass either a persisted instance, its primary key, or a mixture: + * + * ```js + * Project.create({ id: 11 }).then(project => { + * user.addProjects([project, 12]); + * }); + * ``` + * + * If you want to set several target instances, but with different attributes you have to set the attributes on the instance, using a property with the name of the through model: + * + * ```js + * p1.UserProjects = { + * started: true + * } + * user.setProjects([p1, p2], { through: { started: false }}) // The default value is false, but p1 overrides that. + * ``` + * + * Similarly, when fetching through a join table with custom attributes, these attributes will be available as an object with the name of the through model. + * ```js + * user.getProjects().then(projects => { + * let p1 = projects[0] + * p1.UserProjects.started // Is this project started yet? + * }) + * ``` + * + * In the API reference below, add the name of the association to the method, e.g. for `User.belongsToMany(Project)` the getter will be `user.getProjects()`. + * + * @see {@link Model.belongsToMany} + */ +class BelongsToMany extends Association { + constructor(source, target, options) { + super(source, target, options); + + if (this.options.through === undefined || this.options.through === true || this.options.through === null) { + throw new AssociationError(`${source.name}.belongsToMany(${target.name}) requires through option, pass either a string or a model`); + } + + if (!this.options.through.model) { + this.options.through = { + model: options.through + }; + } + + this.associationType = 'BelongsToMany'; + this.targetAssociation = null; + this.sequelize = source.sequelize; + this.through = Object.assign({}, this.options.through); + this.isMultiAssociation = true; + this.doubleLinked = false; + + if (!this.as && this.isSelfAssociation) { + throw new AssociationError('\'as\' must be defined for many-to-many self-associations'); + } + + if (this.as) { + this.isAliased = true; + + if (_.isPlainObject(this.as)) { + this.options.name = this.as; + this.as = this.as.plural; + } else { + this.options.name = { + plural: this.as, + singular: Utils.singularize(this.as) + }; + } + } else { + this.as = this.target.options.name.plural; + this.options.name = this.target.options.name; + } + + this.combinedTableName = Utils.combineTableNames( + this.source.tableName, + this.isSelfAssociation ? this.as || this.target.tableName : this.target.tableName + ); + + /* + * If self association, this is the target association - Unless we find a pairing association + */ + if (this.isSelfAssociation) { + this.targetAssociation = this; + } + + /* + * Default/generated foreign/other keys + */ + if (_.isObject(this.options.foreignKey)) { + this.foreignKeyAttribute = this.options.foreignKey; + this.foreignKey = this.foreignKeyAttribute.name || this.foreignKeyAttribute.fieldName; + } else { + if (!this.options.foreignKey) { + this.foreignKeyDefault = true; + } + + this.foreignKeyAttribute = {}; + this.foreignKey = this.options.foreignKey || Utils.camelize( + [ + this.source.options.name.singular, + this.source.primaryKeyAttribute + ].join('_') + ); + } + + if (_.isObject(this.options.otherKey)) { + this.otherKeyAttribute = this.options.otherKey; + this.otherKey = this.otherKeyAttribute.name || this.otherKeyAttribute.fieldName; + } else { + if (!this.options.otherKey) { + this.otherKeyDefault = true; + } + + this.otherKeyAttribute = {}; + this.otherKey = this.options.otherKey || Utils.camelize( + [ + this.isSelfAssociation ? Utils.singularize(this.as) : this.target.options.name.singular, + this.target.primaryKeyAttribute + ].join('_') + ); + } + + /* + * Find paired association (if exists) + */ + _.each(this.target.associations, association => { + if (association.associationType !== 'BelongsToMany') return; + if (association.target !== this.source) return; + + if (this.options.through.model === association.options.through.model) { + this.paired = association; + association.paired = this; + } + }); + + if (typeof this.through.model === 'string') { + if (!this.sequelize.isDefined(this.through.model)) { + this.through.model = this.sequelize.define(this.through.model, {}, Object.assign(this.options, { + tableName: this.through.model, + indexes: [], //we don't want indexes here (as referenced in #2416) + paranoid: false, // A paranoid join table does not make sense + validate: {} // Don't propagate model-level validations + })); + } else { + this.through.model = this.sequelize.model(this.through.model); + } + } + + this.options = Object.assign(this.options, _.pick(this.through.model.options, [ + 'timestamps', 'createdAt', 'updatedAt', 'deletedAt', 'paranoid' + ])); + + if (this.paired) { + if (this.otherKeyDefault) { + this.otherKey = this.paired.foreignKey; + } + if (this.paired.otherKeyDefault) { + // If paired otherKey was inferred we should make sure to clean it up + // before adding a new one that matches the foreignKey + if (this.paired.otherKey !== this.foreignKey) { + delete this.through.model.rawAttributes[this.paired.otherKey]; + this.paired.otherKey = this.foreignKey; + this.paired._injectAttributes(); + } + } + } + + if (this.through) { + this.throughModel = this.through.model; + } + + this.options.tableName = this.combinedName = this.through.model === Object(this.through.model) ? this.through.model.tableName : this.through.model; + + this.associationAccessor = this.as; + + // Get singular and plural names, trying to uppercase the first letter, unless the model forbids it + const plural = _.upperFirst(this.options.name.plural); + const singular = _.upperFirst(this.options.name.singular); + + this.accessors = { + get: `get${plural}`, + set: `set${plural}`, + addMultiple: `add${plural}`, + add: `add${singular}`, + create: `create${singular}`, + remove: `remove${singular}`, + removeMultiple: `remove${plural}`, + hasSingle: `has${singular}`, + hasAll: `has${plural}`, + count: `count${plural}` + }; + } + + // the id is in the target table + // or in an extra table which connects two tables + _injectAttributes() { + this.identifier = this.foreignKey; + this.foreignIdentifier = this.otherKey; + + // remove any PKs previously defined by sequelize + // but ignore any keys that are part of this association (#5865) + _.each(this.through.model.rawAttributes, (attribute, attributeName) => { + if (attribute.primaryKey === true && attribute._autoGenerated === true) { + if (attributeName === this.foreignKey || attributeName === this.otherKey) { + // this key is still needed as it's part of the association + // so just set primaryKey to false + attribute.primaryKey = false; + } + else { + delete this.through.model.rawAttributes[attributeName]; + } + this.primaryKeyDeleted = true; + } + }); + + const sourceKey = this.source.rawAttributes[this.source.primaryKeyAttribute]; + const sourceKeyType = sourceKey.type; + const sourceKeyField = sourceKey.field || this.source.primaryKeyAttribute; + const targetKey = this.target.rawAttributes[this.target.primaryKeyAttribute]; + const targetKeyType = targetKey.type; + const targetKeyField = targetKey.field || this.target.primaryKeyAttribute; + const sourceAttribute = _.defaults({}, this.foreignKeyAttribute, { type: sourceKeyType }); + const targetAttribute = _.defaults({}, this.otherKeyAttribute, { type: targetKeyType }); + + if (this.primaryKeyDeleted === true) { + targetAttribute.primaryKey = sourceAttribute.primaryKey = true; + } else if (this.through.unique !== false) { + let uniqueKey; + if (typeof this.options.uniqueKey === 'string' && this.options.uniqueKey !== '') { + uniqueKey = this.options.uniqueKey; + } else { + uniqueKey = [this.through.model.tableName, this.foreignKey, this.otherKey, 'unique'].join('_'); + } + targetAttribute.unique = sourceAttribute.unique = uniqueKey; + } + + if (!this.through.model.rawAttributes[this.foreignKey]) { + this.through.model.rawAttributes[this.foreignKey] = { + _autoGenerated: true + }; + } + + if (!this.through.model.rawAttributes[this.otherKey]) { + this.through.model.rawAttributes[this.otherKey] = { + _autoGenerated: true + }; + } + + if (this.options.constraints !== false) { + sourceAttribute.references = { + model: this.source.getTableName(), + key: sourceKeyField + }; + // For the source attribute the passed option is the priority + sourceAttribute.onDelete = this.options.onDelete || this.through.model.rawAttributes[this.foreignKey].onDelete; + sourceAttribute.onUpdate = this.options.onUpdate || this.through.model.rawAttributes[this.foreignKey].onUpdate; + + if (!sourceAttribute.onDelete) sourceAttribute.onDelete = 'CASCADE'; + if (!sourceAttribute.onUpdate) sourceAttribute.onUpdate = 'CASCADE'; + + targetAttribute.references = { + model: this.target.getTableName(), + key: targetKeyField + }; + // But the for target attribute the previously defined option is the priority (since it could've been set by another belongsToMany call) + targetAttribute.onDelete = this.through.model.rawAttributes[this.otherKey].onDelete || this.options.onDelete; + targetAttribute.onUpdate = this.through.model.rawAttributes[this.otherKey].onUpdate || this.options.onUpdate; + + if (!targetAttribute.onDelete) targetAttribute.onDelete = 'CASCADE'; + if (!targetAttribute.onUpdate) targetAttribute.onUpdate = 'CASCADE'; + } + + this.through.model.rawAttributes[this.foreignKey] = Object.assign(this.through.model.rawAttributes[this.foreignKey], sourceAttribute); + this.through.model.rawAttributes[this.otherKey] = Object.assign(this.through.model.rawAttributes[this.otherKey], targetAttribute); + + this.through.model.refreshAttributes(); + + this.identifierField = this.through.model.rawAttributes[this.foreignKey].field || this.foreignKey; + this.foreignIdentifierField = this.through.model.rawAttributes[this.otherKey].field || this.otherKey; + + if (this.paired && !this.paired.foreignIdentifierField) { + this.paired.foreignIdentifierField = this.through.model.rawAttributes[this.paired.otherKey].field || this.paired.otherKey; + } + + this.toSource = new BelongsTo(this.through.model, this.source, { + foreignKey: this.foreignKey + }); + this.manyFromSource = new HasMany(this.source, this.through.model, { + foreignKey: this.foreignKey + }); + this.oneFromSource = new HasOne(this.source, this.through.model, { + foreignKey: this.foreignKey, + as: this.through.model.name + }); + + this.toTarget = new BelongsTo(this.through.model, this.target, { + foreignKey: this.otherKey + }); + this.manyFromTarget = new HasMany(this.target, this.through.model, { + foreignKey: this.otherKey + }); + this.oneFromTarget = new HasOne(this.target, this.through.model, { + foreignKey: this.otherKey, + as: this.through.model.name + }); + + if (this.paired && this.paired.otherKeyDefault) { + this.paired.toTarget = new BelongsTo(this.paired.through.model, this.paired.target, { + foreignKey: this.paired.otherKey + }); + + this.paired.oneFromTarget = new HasOne(this.paired.target, this.paired.through.model, { + foreignKey: this.paired.otherKey, + as: this.paired.through.model.name + }); + } + + Helpers.checkNamingCollision(this); + + return this; + } + + mixin(obj) { + const methods = ['get', 'count', 'hasSingle', 'hasAll', 'set', 'add', 'addMultiple', 'remove', 'removeMultiple', 'create']; + const aliases = { + hasSingle: 'has', + hasAll: 'has', + addMultiple: 'add', + removeMultiple: 'remove' + }; + + Helpers.mixinMethods(this, obj, methods, aliases); + } + + /** + * Get everything currently associated with this, using an optional where clause. + * + * @see + * {@link Model} for a full explanation of options + * + * @param {Model} instance instance + * @param {Object} [options] find options + * @param {Object} [options.where] An optional where clause to limit the associated models + * @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false + * @param {string} [options.schema] Apply a schema on the related model + * + * @returns {Promise>} + */ + get(instance, options) { + options = Utils.cloneDeep(options) || {}; + + const through = this.through; + let scopeWhere; + let throughWhere; + + if (this.scope) { + scopeWhere = _.clone(this.scope); + } + + options.where = { + [Op.and]: [ + scopeWhere, + options.where + ] + }; + + if (Object(through.model) === through.model) { + throughWhere = {}; + throughWhere[this.foreignKey] = instance.get(this.source.primaryKeyAttribute); + + if (through.scope) { + Object.assign(throughWhere, through.scope); + } + + //If a user pass a where on the options through options, make an "and" with the current throughWhere + if (options.through && options.through.where) { + throughWhere = { + [Op.and]: [throughWhere, options.through.where] + }; + } + + options.include = options.include || []; + options.include.push({ + association: this.oneFromTarget, + attributes: options.joinTableAttributes, + required: true, + where: throughWhere + }); + } + + let model = this.target; + if (Object.prototype.hasOwnProperty.call(options, 'scope')) { + if (!options.scope) { + model = model.unscoped(); + } else { + model = model.scope(options.scope); + } + } + + if (Object.prototype.hasOwnProperty.call(options, 'schema')) { + model = model.schema(options.schema, options.schemaDelimiter); + } + + return model.findAll(options); + } + + /** + * Count everything currently associated with this, using an optional where clause. + * + * @param {Model} instance instance + * @param {Object} [options] find options + * @param {Object} [options.where] An optional where clause to limit the associated models + * @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false + * + * @returns {Promise} + */ + count(instance, options) { + const model = this.target; + const sequelize = model.sequelize; + + options = Utils.cloneDeep(options); + options.attributes = [ + [sequelize.fn('COUNT', sequelize.col([this.target.name, model.primaryKeyField].join('.'))), 'count'] + ]; + options.joinTableAttributes = []; + options.raw = true; + options.plain = true; + + return this.get(instance, options).then(result => parseInt(result.count, 10)); + } + + /** + * Check if one or more instance(s) are associated with this. If a list of instances is passed, the function returns true if _all_ instances are associated + * + * @param {Model} sourceInstance source instance to check for an association with + * @param {Model|Model[]|string[]|string|number[]|number} [instances] Can be an array of instances or their primary keys + * @param {Object} [options] Options passed to getAssociations + * + * @returns {Promise} + */ + has(sourceInstance, instances, options) { + if (!Array.isArray(instances)) { + instances = [instances]; + } + + options = Object.assign({ + raw: true + }, options, { + scope: false, + attributes: [this.target.primaryKeyAttribute], + joinTableAttributes: [] + }); + + const instancePrimaryKeys = instances.map(instance => { + if (instance instanceof this.target) { + return instance.where(); + } + return { + [this.target.primaryKeyAttribute]: instance + }; + }); + + options.where = { + [Op.and]: [ + { [Op.or]: instancePrimaryKeys }, + options.where + ] + }; + + return this.get(sourceInstance, options).then(associatedObjects => + _.differenceBy(instancePrimaryKeys, associatedObjects, this.target.primaryKeyAttribute).length === 0 + ); + } + + /** + * Set the associated models by passing an array of instances or their primary keys. + * Everything that it not in the passed array will be un-associated. + * + * @param {Model} sourceInstance source instance to associate new instances with + * @param {Model|Model[]|string[]|string|number[]|number} [newAssociatedObjects] A single instance or primary key, or a mixed array of persisted instances or primary keys + * @param {Object} [options] Options passed to `through.findAll`, `bulkCreate`, `update` and `destroy` + * @param {Object} [options.validate] Run validation for the join model + * @param {Object} [options.through] Additional attributes for the join table. + * + * @returns {Promise} + */ + set(sourceInstance, newAssociatedObjects, options) { + options = options || {}; + + const sourceKey = this.source.primaryKeyAttribute; + const targetKey = this.target.primaryKeyAttribute; + const identifier = this.identifier; + const foreignIdentifier = this.foreignIdentifier; + let where = {}; + + if (newAssociatedObjects === null) { + newAssociatedObjects = []; + } else { + newAssociatedObjects = this.toInstanceArray(newAssociatedObjects); + } + + where[identifier] = sourceInstance.get(sourceKey); + where = Object.assign(where, this.through.scope); + + const updateAssociations = currentRows => { + const obsoleteAssociations = []; + const promises = []; + const defaultAttributes = options.through || {}; + + const unassociatedObjects = newAssociatedObjects.filter(obj => + !currentRows.some(currentRow => currentRow[foreignIdentifier] === obj.get(targetKey)) + ); + + for (const currentRow of currentRows) { + const newObj = newAssociatedObjects.find(obj => currentRow[foreignIdentifier] === obj.get(targetKey)); + + if (!newObj) { + obsoleteAssociations.push(currentRow); + } else { + let throughAttributes = newObj[this.through.model.name]; + // Quick-fix for subtle bug when using existing objects that might have the through model attached (not as an attribute object) + if (throughAttributes instanceof this.through.model) { + throughAttributes = {}; + } + + const attributes = _.defaults({}, throughAttributes, defaultAttributes); + + if (Object.keys(attributes).length) { + promises.push( + this.through.model.update(attributes, Object.assign(options, { + where: { + [identifier]: sourceInstance.get(sourceKey), + [foreignIdentifier]: newObj.get(targetKey) + } + } + )) + ); + } + } + } + + if (obsoleteAssociations.length > 0) { + const where = Object.assign({ + [identifier]: sourceInstance.get(sourceKey), + [foreignIdentifier]: obsoleteAssociations.map(obsoleteAssociation => obsoleteAssociation[foreignIdentifier]) + }, this.through.scope); + promises.push( + this.through.model.destroy(_.defaults({ + where + }, options)) + ); + } + + if (unassociatedObjects.length > 0) { + const bulk = unassociatedObjects.map(unassociatedObject => { + let attributes = {}; + + attributes[identifier] = sourceInstance.get(sourceKey); + attributes[foreignIdentifier] = unassociatedObject.get(targetKey); + + attributes = _.defaults(attributes, unassociatedObject[this.through.model.name], defaultAttributes); + + Object.assign(attributes, this.through.scope); + attributes = Object.assign(attributes, this.through.scope); + + return attributes; + }); + + promises.push(this.through.model.bulkCreate(bulk, Object.assign({ validate: true }, options))); + } + + return Utils.Promise.all(promises); + }; + + return this.through.model.findAll(_.defaults({ where, raw: true }, options)) + .then(currentRows => updateAssociations(currentRows)) + .catch(error => { + if (error instanceof EmptyResultError) return updateAssociations([]); + throw error; + }); + } + + /** + * Associate one or several rows with source instance. It will not un-associate any already associated instance + * that may be missing from `newInstances`. + * + * @param {Model} sourceInstance source instance to associate new instances with + * @param {Model|Model[]|string[]|string|number[]|number} [newInstances] A single instance or primary key, or a mixed array of persisted instances or primary keys + * @param {Object} [options] Options passed to `through.findAll`, `bulkCreate` and `update` + * @param {Object} [options.validate] Run validation for the join model. + * @param {Object} [options.through] Additional attributes for the join table. + * + * @returns {Promise} + */ + add(sourceInstance, newInstances, options) { + // If newInstances is null or undefined, no-op + if (!newInstances) return Utils.Promise.resolve(); + + options = _.clone(options) || {}; + + const association = this; + const sourceKey = association.source.primaryKeyAttribute; + const targetKey = association.target.primaryKeyAttribute; + const identifier = association.identifier; + const foreignIdentifier = association.foreignIdentifier; + const defaultAttributes = options.through || {}; + + newInstances = association.toInstanceArray(newInstances); + + const where = { + [identifier]: sourceInstance.get(sourceKey), + [foreignIdentifier]: newInstances.map(newInstance => newInstance.get(targetKey)) + }; + + Object.assign(where, association.through.scope); + + const updateAssociations = currentRows => { + const promises = []; + const unassociatedObjects = []; + const changedAssociations = []; + for (const obj of newInstances) { + const existingAssociation = currentRows && currentRows.find(current => current[foreignIdentifier] === obj.get(targetKey)); + + if (!existingAssociation) { + unassociatedObjects.push(obj); + } else { + const throughAttributes = obj[association.through.model.name]; + const attributes = _.defaults({}, throughAttributes, defaultAttributes); + + if (Object.keys(attributes).some(attribute => attributes[attribute] !== existingAssociation[attribute])) { + changedAssociations.push(obj); + } + } + } + + if (unassociatedObjects.length > 0) { + const bulk = unassociatedObjects.map(unassociatedObject => { + const throughAttributes = unassociatedObject[association.through.model.name]; + const attributes = _.defaults({}, throughAttributes, defaultAttributes); + + attributes[identifier] = sourceInstance.get(sourceKey); + attributes[foreignIdentifier] = unassociatedObject.get(targetKey); + + Object.assign(attributes, association.through.scope); + + return attributes; + }); + + promises.push(association.through.model.bulkCreate(bulk, Object.assign({ validate: true }, options))); + } + + for (const assoc of changedAssociations) { + let throughAttributes = assoc[association.through.model.name]; + const attributes = _.defaults({}, throughAttributes, defaultAttributes); + // Quick-fix for subtle bug when using existing objects that might have the through model attached (not as an attribute object) + if (throughAttributes instanceof association.through.model) { + throughAttributes = {}; + } + const where = { + [identifier]: sourceInstance.get(sourceKey), + [foreignIdentifier]: assoc.get(targetKey) + }; + + + promises.push(association.through.model.update(attributes, Object.assign(options, { where }))); + } + + return Utils.Promise.all(promises); + }; + + return association.through.model.findAll(_.defaults({ where, raw: true }, options)) + .then(currentRows => updateAssociations(currentRows)) + .then(([associations]) => associations) + .catch(error => { + if (error instanceof EmptyResultError) return updateAssociations(); + throw error; + }); + } + + /** + * Un-associate one or more instance(s). + * + * @param {Model} sourceInstance instance to un associate instances with + * @param {Model|Model[]|string|string[]|number|number[]} [oldAssociatedObjects] Can be an Instance or its primary key, or a mixed array of instances and primary keys + * @param {Object} [options] Options passed to `through.destroy` + * + * @returns {Promise} + */ + remove(sourceInstance, oldAssociatedObjects, options) { + const association = this; + + options = options || {}; + + oldAssociatedObjects = association.toInstanceArray(oldAssociatedObjects); + + const where = { + [association.identifier]: sourceInstance.get(association.source.primaryKeyAttribute), + [association.foreignIdentifier]: oldAssociatedObjects.map(newInstance => newInstance.get(association.target.primaryKeyAttribute)) + }; + + return association.through.model.destroy(_.defaults({ where }, options)); + } + + /** + * Create a new instance of the associated model and associate it with this. + * + * @param {Model} sourceInstance source instance + * @param {Object} [values] values for target model + * @param {Object} [options] Options passed to create and add + * @param {Object} [options.through] Additional attributes for the join table + * + * @returns {Promise} + */ + create(sourceInstance, values, options) { + const association = this; + + options = options || {}; + values = values || {}; + + if (Array.isArray(options)) { + options = { + fields: options + }; + } + + if (association.scope) { + Object.assign(values, association.scope); + if (options.fields) { + options.fields = options.fields.concat(Object.keys(association.scope)); + } + } + + // Create the related model instance + return association.target.create(values, options).then(newAssociatedObject => + sourceInstance[association.accessors.add](newAssociatedObject, _.omit(options, ['fields'])).return(newAssociatedObject) + ); + } + + verifyAssociationAlias(alias) { + if (typeof alias === 'string') { + return this.as === alias; + } + + if (alias && alias.plural) { + return this.as === alias.plural; + } + + return !this.isAliased; + } +} + +module.exports = BelongsToMany; +module.exports.BelongsToMany = BelongsToMany; +module.exports.default = BelongsToMany; diff --git a/node_modules/sequelize/lib/associations/belongs-to.js b/node_modules/sequelize/lib/associations/belongs-to.js new file mode 100644 index 00000000..eafeedb4 --- /dev/null +++ b/node_modules/sequelize/lib/associations/belongs-to.js @@ -0,0 +1,252 @@ +'use strict'; + +const Utils = require('./../utils'); +const Helpers = require('./helpers'); +const _ = require('lodash'); +const Association = require('./base'); +const Op = require('../operators'); + +/** + * One-to-one association + * + * In the API reference below, add the name of the association to the method, e.g. for `User.belongsTo(Project)` the getter will be `user.getProject()`. + * + * @see {@link Model.belongsTo} + */ +class BelongsTo extends Association { + constructor(source, target, options) { + super(source, target, options); + + this.associationType = 'BelongsTo'; + this.isSingleAssociation = true; + this.foreignKeyAttribute = {}; + + if (this.as) { + this.isAliased = true; + this.options.name = { + singular: this.as + }; + } else { + this.as = this.target.options.name.singular; + this.options.name = this.target.options.name; + } + + if (_.isObject(this.options.foreignKey)) { + this.foreignKeyAttribute = this.options.foreignKey; + this.foreignKey = this.foreignKeyAttribute.name || this.foreignKeyAttribute.fieldName; + } else if (this.options.foreignKey) { + this.foreignKey = this.options.foreignKey; + } + + if (!this.foreignKey) { + this.foreignKey = Utils.camelize( + [ + this.as, + this.target.primaryKeyAttribute + ].join('_') + ); + } + + this.identifier = this.foreignKey; + if (this.source.rawAttributes[this.identifier]) { + this.identifierField = this.source.rawAttributes[this.identifier].field || this.identifier; + } + + if ( + this.options.targetKey + && !this.target.rawAttributes[this.options.targetKey] + ) { + throw new Error(`Unknown attribute "${this.options.targetKey}" passed as targetKey, define this attribute on model "${this.target.name}" first`); + } + + this.targetKey = this.options.targetKey || this.target.primaryKeyAttribute; + this.targetKeyField = this.target.rawAttributes[this.targetKey].field || this.targetKey; + this.targetKeyIsPrimary = this.targetKey === this.target.primaryKeyAttribute; + this.targetIdentifier = this.targetKey; + + this.associationAccessor = this.as; + this.options.useHooks = options.useHooks; + + // Get singular name, trying to uppercase the first letter, unless the model forbids it + const singular = _.upperFirst(this.options.name.singular); + + this.accessors = { + get: `get${singular}`, + set: `set${singular}`, + create: `create${singular}` + }; + } + + // the id is in the source table + _injectAttributes() { + const newAttributes = {}; + + newAttributes[this.foreignKey] = _.defaults({}, this.foreignKeyAttribute, { + type: this.options.keyType || this.target.rawAttributes[this.targetKey].type, + allowNull: true + }); + + if (this.options.constraints !== false) { + const source = this.source.rawAttributes[this.foreignKey] || newAttributes[this.foreignKey]; + this.options.onDelete = this.options.onDelete || (source.allowNull ? 'SET NULL' : 'NO ACTION'); + this.options.onUpdate = this.options.onUpdate || 'CASCADE'; + } + + Helpers.addForeignKeyConstraints(newAttributes[this.foreignKey], this.target, this.source, this.options, this.targetKeyField); + Utils.mergeDefaults(this.source.rawAttributes, newAttributes); + + this.source.refreshAttributes(); + + this.identifierField = this.source.rawAttributes[this.foreignKey].field || this.foreignKey; + + Helpers.checkNamingCollision(this); + + return this; + } + + mixin(obj) { + const methods = ['get', 'set', 'create']; + + Helpers.mixinMethods(this, obj, methods); + } + + /** + * Get the associated instance. + * + * @param {Model|Array} instances source instances + * @param {Object} [options] find options + * @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false. + * @param {string} [options.schema] Apply a schema on the related model + * + * @see + * {@link Model.findOne} for a full explanation of options + * + * @returns {Promise} + */ + get(instances, options) { + const where = {}; + let Target = this.target; + let instance; + + options = Utils.cloneDeep(options); + + if (Object.prototype.hasOwnProperty.call(options, 'scope')) { + if (!options.scope) { + Target = Target.unscoped(); + } else { + Target = Target.scope(options.scope); + } + } + + if (Object.prototype.hasOwnProperty.call(options, 'schema')) { + Target = Target.schema(options.schema, options.schemaDelimiter); + } + + if (!Array.isArray(instances)) { + instance = instances; + instances = undefined; + } + + if (instances) { + where[this.targetKey] = { + [Op.in]: instances.map(instance => instance.get(this.foreignKey)) + }; + } else { + if (this.targetKeyIsPrimary && !options.where) { + return Target.findByPk(instance.get(this.foreignKey), options); + } + where[this.targetKey] = instance.get(this.foreignKey); + options.limit = null; + } + + options.where = options.where ? + { [Op.and]: [where, options.where] } : + where; + + if (instances) { + return Target.findAll(options).then(results => { + const result = {}; + for (const instance of instances) { + result[instance.get(this.foreignKey, { raw: true })] = null; + } + + for (const instance of results) { + result[instance.get(this.targetKey, { raw: true })] = instance; + } + + return result; + }); + } + + return Target.findOne(options); + } + + /** + * Set the associated model. + * + * @param {Model} sourceInstance the source instance + * @param {?|string|number} [associatedInstance] An persisted instance or the primary key of an instance to associate with this. Pass `null` or `undefined` to remove the association. + * @param {Object} [options={}] options passed to `this.save` + * @param {boolean} [options.save=true] Skip saving this after setting the foreign key if false. + * + * @returns {Promise} + */ + set(sourceInstance, associatedInstance, options = {}) { + let value = associatedInstance; + + if (associatedInstance instanceof this.target) { + value = associatedInstance[this.targetKey]; + } + + sourceInstance.set(this.foreignKey, value); + + if (options.save === false) return; + + options = Object.assign({ + fields: [this.foreignKey], + allowNull: [this.foreignKey], + association: true + }, options); + + // passes the changed field to save, so only that field get updated. + return sourceInstance.save(options); + } + + /** + * Create a new instance of the associated model and associate it with this. + * + * @param {Model} sourceInstance the source instance + * @param {Object} [values={}] values to create associated model instance with + * @param {Object} [options={}] Options passed to `target.create` and setAssociation. + * + * @see + * {@link Model#create} for a full explanation of options + * + * @returns {Promise} The created target model + */ + create(sourceInstance, values, options) { + values = values || {}; + options = options || {}; + + return this.target.create(values, options) + .then(newAssociatedObject => sourceInstance[this.accessors.set](newAssociatedObject, options) + .then(() => newAssociatedObject) + ); + } + + verifyAssociationAlias(alias) { + if (typeof alias === 'string') { + return this.as === alias; + } + + if (alias && alias.singular) { + return this.as === alias.singular; + } + + return !this.isAliased; + } +} + +module.exports = BelongsTo; +module.exports.BelongsTo = BelongsTo; +module.exports.default = BelongsTo; diff --git a/node_modules/sequelize/lib/associations/has-many.js b/node_modules/sequelize/lib/associations/has-many.js new file mode 100644 index 00000000..9bb36fb3 --- /dev/null +++ b/node_modules/sequelize/lib/associations/has-many.js @@ -0,0 +1,487 @@ +'use strict'; + +const Utils = require('./../utils'); +const Helpers = require('./helpers'); +const _ = require('lodash'); +const Association = require('./base'); +const Op = require('../operators'); + +/** + * One-to-many association + * + * In the API reference below, add the name of the association to the method, e.g. for `User.hasMany(Project)` the getter will be `user.getProjects()`. + * If the association is aliased, use the alias instead, e.g. `User.hasMany(Project, { as: 'jobs' })` will be `user.getJobs()`. + * + * @see {@link Model.hasMany} + */ +class HasMany extends Association { + constructor(source, target, options) { + super(source, target, options); + + this.associationType = 'HasMany'; + this.targetAssociation = null; + this.sequelize = source.sequelize; + this.isMultiAssociation = true; + this.foreignKeyAttribute = {}; + + if (this.options.through) { + throw new Error('N:M associations are not supported with hasMany. Use belongsToMany instead'); + } + + /* + * If self association, this is the target association + */ + if (this.isSelfAssociation) { + this.targetAssociation = this; + } + + if (this.as) { + this.isAliased = true; + + if (_.isPlainObject(this.as)) { + this.options.name = this.as; + this.as = this.as.plural; + } else { + this.options.name = { + plural: this.as, + singular: Utils.singularize(this.as) + }; + } + } else { + this.as = this.target.options.name.plural; + this.options.name = this.target.options.name; + } + + /* + * Foreign key setup + */ + if (_.isObject(this.options.foreignKey)) { + this.foreignKeyAttribute = this.options.foreignKey; + this.foreignKey = this.foreignKeyAttribute.name || this.foreignKeyAttribute.fieldName; + } else if (this.options.foreignKey) { + this.foreignKey = this.options.foreignKey; + } + + if (!this.foreignKey) { + this.foreignKey = Utils.camelize( + [ + this.source.options.name.singular, + this.source.primaryKeyAttribute + ].join('_') + ); + } + + if (this.target.rawAttributes[this.foreignKey]) { + this.identifierField = this.target.rawAttributes[this.foreignKey].field || this.foreignKey; + this.foreignKeyField = this.target.rawAttributes[this.foreignKey].field || this.foreignKey; + } + + /* + * Source key setup + */ + this.sourceKey = this.options.sourceKey || this.source.primaryKeyAttribute; + + if (this.source.rawAttributes[this.sourceKey]) { + this.sourceKeyAttribute = this.sourceKey; + this.sourceKeyField = this.source.rawAttributes[this.sourceKey].field || this.sourceKey; + } else { + this.sourceKeyAttribute = this.source.primaryKeyAttribute; + this.sourceKeyField = this.source.primaryKeyField; + } + + // Get singular and plural names + // try to uppercase the first letter, unless the model forbids it + const plural = _.upperFirst(this.options.name.plural); + const singular = _.upperFirst(this.options.name.singular); + + this.associationAccessor = this.as; + this.accessors = { + get: `get${plural}`, + set: `set${plural}`, + addMultiple: `add${plural}`, + add: `add${singular}`, + create: `create${singular}`, + remove: `remove${singular}`, + removeMultiple: `remove${plural}`, + hasSingle: `has${singular}`, + hasAll: `has${plural}`, + count: `count${plural}` + }; + } + + // the id is in the target table + // or in an extra table which connects two tables + _injectAttributes() { + const newAttributes = {}; + // Create a new options object for use with addForeignKeyConstraints, to avoid polluting this.options in case it is later used for a n:m + const constraintOptions = _.clone(this.options); + + newAttributes[this.foreignKey] = _.defaults({}, this.foreignKeyAttribute, { + type: this.options.keyType || this.source.rawAttributes[this.sourceKeyAttribute].type, + allowNull: true + }); + + if (this.options.constraints !== false) { + const target = this.target.rawAttributes[this.foreignKey] || newAttributes[this.foreignKey]; + constraintOptions.onDelete = constraintOptions.onDelete || (target.allowNull ? 'SET NULL' : 'CASCADE'); + constraintOptions.onUpdate = constraintOptions.onUpdate || 'CASCADE'; + } + + Helpers.addForeignKeyConstraints(newAttributes[this.foreignKey], this.source, this.target, constraintOptions, this.sourceKeyField); + Utils.mergeDefaults(this.target.rawAttributes, newAttributes); + + this.target.refreshAttributes(); + this.source.refreshAttributes(); + + this.identifierField = this.target.rawAttributes[this.foreignKey].field || this.foreignKey; + this.foreignKeyField = this.target.rawAttributes[this.foreignKey].field || this.foreignKey; + this.sourceKeyField = this.source.rawAttributes[this.sourceKey].field || this.sourceKey; + + Helpers.checkNamingCollision(this); + + return this; + } + + mixin(obj) { + const methods = ['get', 'count', 'hasSingle', 'hasAll', 'set', 'add', 'addMultiple', 'remove', 'removeMultiple', 'create']; + const aliases = { + hasSingle: 'has', + hasAll: 'has', + addMultiple: 'add', + removeMultiple: 'remove' + }; + + Helpers.mixinMethods(this, obj, methods, aliases); + } + + /** + * Get everything currently associated with this, using an optional where clause. + * + * @param {Model|Array} instances source instances + * @param {Object} [options] find options + * @param {Object} [options.where] An optional where clause to limit the associated models + * @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false + * @param {string} [options.schema] Apply a schema on the related model + * + * @see + * {@link Model.findAll} for a full explanation of options + * + * @returns {Promise>} + */ + get(instances, options = {}) { + const where = {}; + + let Model = this.target; + let instance; + let values; + + if (!Array.isArray(instances)) { + instance = instances; + instances = undefined; + } + + options = Utils.cloneDeep(options); + + if (this.scope) { + Object.assign(where, this.scope); + } + + if (instances) { + values = instances.map(instance => instance.get(this.sourceKey, { raw: true })); + + if (options.limit && instances.length > 1) { + options.groupedLimit = { + limit: options.limit, + on: this, // association + values + }; + + delete options.limit; + } else { + where[this.foreignKey] = { + [Op.in]: values + }; + delete options.groupedLimit; + } + } else { + where[this.foreignKey] = instance.get(this.sourceKey, { raw: true }); + } + + options.where = options.where ? + { [Op.and]: [where, options.where] } : + where; + + if (Object.prototype.hasOwnProperty.call(options, 'scope')) { + if (!options.scope) { + Model = Model.unscoped(); + } else { + Model = Model.scope(options.scope); + } + } + + if (Object.prototype.hasOwnProperty.call(options, 'schema')) { + Model = Model.schema(options.schema, options.schemaDelimiter); + } + + return Model.findAll(options).then(results => { + if (instance) return results; + + const result = {}; + for (const instance of instances) { + result[instance.get(this.sourceKey, { raw: true })] = []; + } + + for (const instance of results) { + result[instance.get(this.foreignKey, { raw: true })].push(instance); + } + + return result; + }); + } + + /** + * Count everything currently associated with this, using an optional where clause. + * + * @param {Model} instance the source instance + * @param {Object} [options] find & count options + * @param {Object} [options.where] An optional where clause to limit the associated models + * @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false + * + * @returns {Promise} + */ + count(instance, options) { + options = Utils.cloneDeep(options); + + options.attributes = [ + [ + this.sequelize.fn( + 'COUNT', + this.sequelize.col(`${this.target.name}.${this.target.primaryKeyField}`) + ), + 'count' + ] + ]; + options.raw = true; + options.plain = true; + + return this.get(instance, options).then(result => parseInt(result.count, 10)); + } + + /** + * Check if one or more rows are associated with `this`. + * + * @param {Model} sourceInstance the source instance + * @param {Model|Model[]|string[]|string|number[]|number} [targetInstances] Can be an array of instances or their primary keys + * @param {Object} [options] Options passed to getAssociations + * + * @returns {Promise} + */ + has(sourceInstance, targetInstances, options) { + const where = {}; + + if (!Array.isArray(targetInstances)) { + targetInstances = [targetInstances]; + } + + options = Object.assign({}, options, { + scope: false, + attributes: [this.target.primaryKeyAttribute], + raw: true + }); + + where[Op.or] = targetInstances.map(instance => { + if (instance instanceof this.target) { + return instance.where(); + } + return { + [this.target.primaryKeyAttribute]: instance + }; + }); + + options.where = { + [Op.and]: [ + where, + options.where + ] + }; + + return this.get(sourceInstance, options).then(associatedObjects => associatedObjects.length === targetInstances.length); + } + + /** + * Set the associated models by passing an array of persisted instances or their primary keys. Everything that is not in the passed array will be un-associated + * + * @param {Model} sourceInstance source instance to associate new instances with + * @param {Model|Model[]|string[]|string|number[]|number} [targetInstances] An array of persisted instances or primary key of instances to associate with this. Pass `null` or `undefined` to remove all associations. + * @param {Object} [options] Options passed to `target.findAll` and `update`. + * @param {Object} [options.validate] Run validation for the join model + * + * @returns {Promise} + */ + set(sourceInstance, targetInstances, options) { + if (targetInstances === null) { + targetInstances = []; + } else { + targetInstances = this.toInstanceArray(targetInstances); + } + + return this.get(sourceInstance, _.defaults({ scope: false, raw: true }, options)).then(oldAssociations => { + const promises = []; + const obsoleteAssociations = oldAssociations.filter(old => + !targetInstances.find(obj => + obj[this.target.primaryKeyAttribute] === old[this.target.primaryKeyAttribute] + ) + ); + const unassociatedObjects = targetInstances.filter(obj => + !oldAssociations.find(old => + obj[this.target.primaryKeyAttribute] === old[this.target.primaryKeyAttribute] + ) + ); + let updateWhere; + let update; + + if (obsoleteAssociations.length > 0) { + update = {}; + update[this.foreignKey] = null; + + updateWhere = { + [this.target.primaryKeyAttribute]: obsoleteAssociations.map(associatedObject => + associatedObject[this.target.primaryKeyAttribute] + ) + }; + + + promises.push(this.target.unscoped().update( + update, + _.defaults({ + where: updateWhere + }, options) + )); + } + + if (unassociatedObjects.length > 0) { + updateWhere = {}; + + update = {}; + update[this.foreignKey] = sourceInstance.get(this.sourceKey); + + Object.assign(update, this.scope); + updateWhere[this.target.primaryKeyAttribute] = unassociatedObjects.map(unassociatedObject => + unassociatedObject[this.target.primaryKeyAttribute] + ); + + promises.push(this.target.unscoped().update( + update, + _.defaults({ + where: updateWhere + }, options) + )); + } + + return Utils.Promise.all(promises).return(sourceInstance); + }); + } + + /** + * Associate one or more target rows with `this`. This method accepts a Model / string / number to associate a single row, + * or a mixed array of Model / string / numbers to associate multiple rows. + * + * @param {Model} sourceInstance the source instance + * @param {Model|Model[]|string[]|string|number[]|number} [targetInstances] A single instance or primary key, or a mixed array of persisted instances or primary keys + * @param {Object} [options] Options passed to `target.update`. + * + * @returns {Promise} + */ + add(sourceInstance, targetInstances, options = {}) { + if (!targetInstances) return Utils.Promise.resolve(); + + const update = {}; + + targetInstances = this.toInstanceArray(targetInstances); + + update[this.foreignKey] = sourceInstance.get(this.sourceKey); + Object.assign(update, this.scope); + + const where = { + [this.target.primaryKeyAttribute]: targetInstances.map(unassociatedObject => + unassociatedObject.get(this.target.primaryKeyAttribute) + ) + }; + + return this.target.unscoped().update(update, _.defaults({ where }, options)).return(sourceInstance); + } + + /** + * Un-associate one or several target rows. + * + * @param {Model} sourceInstance instance to un associate instances with + * @param {Model|Model[]|string|string[]|number|number[]} [targetInstances] Can be an Instance or its primary key, or a mixed array of instances and primary keys + * @param {Object} [options] Options passed to `target.update` + * + * @returns {Promise} + */ + remove(sourceInstance, targetInstances, options = {}) { + const update = { + [this.foreignKey]: null + }; + + targetInstances = this.toInstanceArray(targetInstances); + + const where = { + [this.foreignKey]: sourceInstance.get(this.sourceKey), + [this.target.primaryKeyAttribute]: targetInstances.map(targetInstance => + targetInstance.get(this.target.primaryKeyAttribute) + ) + }; + + return this.target.unscoped().update(update, _.defaults({ where }, options)).return(this); + } + + /** + * Create a new instance of the associated model and associate it with this. + * + * @param {Model} sourceInstance source instance + * @param {Object} [values] values for target model instance + * @param {Object} [options] Options passed to `target.create` + * + * @returns {Promise} + */ + create(sourceInstance, values, options = {}) { + if (Array.isArray(options)) { + options = { + fields: options + }; + } + + if (values === undefined) { + values = {}; + } + + if (this.scope) { + for (const attribute of Object.keys(this.scope)) { + values[attribute] = this.scope[attribute]; + if (options.fields) options.fields.push(attribute); + } + } + + values[this.foreignKey] = sourceInstance.get(this.sourceKey); + if (options.fields) options.fields.push(this.foreignKey); + return this.target.create(values, options); + } + + verifyAssociationAlias(alias) { + if (typeof alias === 'string') { + return this.as === alias; + } + + if (alias && alias.plural) { + return this.as === alias.plural; + } + + return !this.isAliased; + } +} + +module.exports = HasMany; +module.exports.HasMany = HasMany; +module.exports.default = HasMany; diff --git a/node_modules/sequelize/lib/associations/has-one.js b/node_modules/sequelize/lib/associations/has-one.js new file mode 100644 index 00000000..b955fb5a --- /dev/null +++ b/node_modules/sequelize/lib/associations/has-one.js @@ -0,0 +1,280 @@ +'use strict'; + +const Utils = require('./../utils'); +const Helpers = require('./helpers'); +const _ = require('lodash'); +const Association = require('./base'); +const Op = require('../operators'); + +/** + * One-to-one association + * + * In the API reference below, add the name of the association to the method, e.g. for `User.hasOne(Project)` the getter will be `user.getProject()`. + * This is almost the same as `belongsTo` with one exception - The foreign key will be defined on the target model. + * + * @see {@link Model.hasOne} + */ +class HasOne extends Association { + constructor(source, target, options) { + super(source, target, options); + + this.associationType = 'HasOne'; + this.isSingleAssociation = true; + this.foreignKeyAttribute = {}; + + if (this.as) { + this.isAliased = true; + this.options.name = { + singular: this.as + }; + } else { + this.as = this.target.options.name.singular; + this.options.name = this.target.options.name; + } + + if (_.isObject(this.options.foreignKey)) { + this.foreignKeyAttribute = this.options.foreignKey; + this.foreignKey = this.foreignKeyAttribute.name || this.foreignKeyAttribute.fieldName; + } else if (this.options.foreignKey) { + this.foreignKey = this.options.foreignKey; + } + + if (!this.foreignKey) { + this.foreignKey = Utils.camelize( + [ + Utils.singularize(this.options.as || this.source.name), + this.source.primaryKeyAttribute + ].join('_') + ); + } + + if ( + this.options.sourceKey + && !this.source.rawAttributes[this.options.sourceKey] + ) { + throw new Error(`Unknown attribute "${this.options.sourceKey}" passed as sourceKey, define this attribute on model "${this.source.name}" first`); + } + + this.sourceKey = this.sourceKeyAttribute = this.options.sourceKey || this.source.primaryKeyAttribute; + this.sourceKeyField = this.source.rawAttributes[this.sourceKey].field || this.sourceKey; + this.sourceKeyIsPrimary = this.sourceKey === this.source.primaryKeyAttribute; + + this.associationAccessor = this.as; + this.options.useHooks = options.useHooks; + + if (this.target.rawAttributes[this.foreignKey]) { + this.identifierField = this.target.rawAttributes[this.foreignKey].field || this.foreignKey; + } + + // Get singular name, trying to uppercase the first letter, unless the model forbids it + const singular = _.upperFirst(this.options.name.singular); + + this.accessors = { + get: `get${singular}`, + set: `set${singular}`, + create: `create${singular}` + }; + } + + // the id is in the target table + _injectAttributes() { + const newAttributes = {}; + + newAttributes[this.foreignKey] = _.defaults({}, this.foreignKeyAttribute, { + type: this.options.keyType || this.source.rawAttributes[this.sourceKey].type, + allowNull: true + }); + + if (this.options.constraints !== false) { + const target = this.target.rawAttributes[this.foreignKey] || newAttributes[this.foreignKey]; + this.options.onDelete = this.options.onDelete || (target.allowNull ? 'SET NULL' : 'CASCADE'); + this.options.onUpdate = this.options.onUpdate || 'CASCADE'; + } + + Helpers.addForeignKeyConstraints(newAttributes[this.foreignKey], this.source, this.target, this.options, this.sourceKeyField); + Utils.mergeDefaults(this.target.rawAttributes, newAttributes); + + this.target.refreshAttributes(); + + this.identifierField = this.target.rawAttributes[this.foreignKey].field || this.foreignKey; + + Helpers.checkNamingCollision(this); + + return this; + } + + mixin(obj) { + const methods = ['get', 'set', 'create']; + + Helpers.mixinMethods(this, obj, methods); + } + + /** + * Get the associated instance. + * + * @param {Model|Array} instances source instances + * @param {Object} [options] find options + * @param {string|boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false + * @param {string} [options.schema] Apply a schema on the related model + * + * @see + * {@link Model.findOne} for a full explanation of options + * + * @returns {Promise} + */ + get(instances, options) { + const where = {}; + + let Target = this.target; + let instance; + + options = Utils.cloneDeep(options); + + if (Object.prototype.hasOwnProperty.call(options, 'scope')) { + if (!options.scope) { + Target = Target.unscoped(); + } else { + Target = Target.scope(options.scope); + } + } + + if (Object.prototype.hasOwnProperty.call(options, 'schema')) { + Target = Target.schema(options.schema, options.schemaDelimiter); + } + + if (!Array.isArray(instances)) { + instance = instances; + instances = undefined; + } + + if (instances) { + where[this.foreignKey] = { + [Op.in]: instances.map(instance => instance.get(this.sourceKey)) + }; + } else { + where[this.foreignKey] = instance.get(this.sourceKey); + } + + if (this.scope) { + Object.assign(where, this.scope); + } + + options.where = options.where ? + { [Op.and]: [where, options.where] } : + where; + + if (instances) { + return Target.findAll(options).then(results => { + const result = {}; + for (const instance of instances) { + result[instance.get(this.sourceKey, { raw: true })] = null; + } + + for (const instance of results) { + result[instance.get(this.foreignKey, { raw: true })] = instance; + } + + return result; + }); + } + + return Target.findOne(options); + } + + /** + * Set the associated model. + * + * @param {Model} sourceInstance the source instance + * @param {?|string|number} [associatedInstance] An persisted instance or the primary key of an instance to associate with this. Pass `null` or `undefined` to remove the association. + * @param {Object} [options] Options passed to getAssociation and `target.save` + * + * @returns {Promise} + */ + set(sourceInstance, associatedInstance, options) { + let alreadyAssociated; + + options = Object.assign({}, options, { + scope: false + }); + + return sourceInstance[this.accessors.get](options).then(oldInstance => { + // TODO Use equals method once #5605 is resolved + alreadyAssociated = oldInstance && associatedInstance && this.target.primaryKeyAttributes.every(attribute => + oldInstance.get(attribute, { raw: true }) === (associatedInstance.get ? associatedInstance.get(attribute, { raw: true }) : associatedInstance) + ); + + if (oldInstance && !alreadyAssociated) { + oldInstance[this.foreignKey] = null; + return oldInstance.save(Object.assign({}, options, { + fields: [this.foreignKey], + allowNull: [this.foreignKey], + association: true + })); + } + }).then(() => { + if (associatedInstance && !alreadyAssociated) { + if (!(associatedInstance instanceof this.target)) { + const tmpInstance = {}; + tmpInstance[this.target.primaryKeyAttribute] = associatedInstance; + associatedInstance = this.target.build(tmpInstance, { + isNewRecord: false + }); + } + + Object.assign(associatedInstance, this.scope); + associatedInstance.set(this.foreignKey, sourceInstance.get(this.sourceKeyAttribute)); + + return associatedInstance.save(options); + } + + return null; + }); + } + + /** + * Create a new instance of the associated model and associate it with this. + * + * @param {Model} sourceInstance the source instance + * @param {Object} [values={}] values to create associated model instance with + * @param {Object} [options] Options passed to `target.create` and setAssociation. + * + * @see + * {@link Model#create} for a full explanation of options + * + * @returns {Promise} The created target model + */ + create(sourceInstance, values, options) { + values = values || {}; + options = options || {}; + + if (this.scope) { + for (const attribute of Object.keys(this.scope)) { + values[attribute] = this.scope[attribute]; + if (options.fields) { + options.fields.push(attribute); + } + } + } + + values[this.foreignKey] = sourceInstance.get(this.sourceKeyAttribute); + if (options.fields) { + options.fields.push(this.foreignKey); + } + + return this.target.create(values, options); + } + + verifyAssociationAlias(alias) { + if (typeof alias === 'string') { + return this.as === alias; + } + + if (alias && alias.singular) { + return this.as === alias.singular; + } + + return !this.isAliased; + } +} + +module.exports = HasOne; diff --git a/node_modules/sequelize/lib/associations/helpers.js b/node_modules/sequelize/lib/associations/helpers.js new file mode 100644 index 00000000..45c68915 --- /dev/null +++ b/node_modules/sequelize/lib/associations/helpers.js @@ -0,0 +1,69 @@ +'use strict'; + +function checkNamingCollision(association) { + if (Object.prototype.hasOwnProperty.call(association.source.rawAttributes, association.as)) { + throw new Error( + `Naming collision between attribute '${association.as}'` + + ` and association '${association.as}' on model ${association.source.name}` + + '. To remedy this, change either foreignKey or as in your association definition' + ); + } +} +exports.checkNamingCollision = checkNamingCollision; + +function addForeignKeyConstraints(newAttribute, source, target, options, key) { + // FK constraints are opt-in: users must either set `foreignKeyConstraints` + // on the association, or request an `onDelete` or `onUpdate` behavior + + if (options.foreignKeyConstraint || options.onDelete || options.onUpdate) { + // Find primary keys: composite keys not supported with this approach + const primaryKeys = Object.keys(source.primaryKeys) + .map(primaryKeyAttribute => source.rawAttributes[primaryKeyAttribute].field || primaryKeyAttribute); + + if (primaryKeys.length === 1 || !primaryKeys.includes(key)) { + if (source._schema) { + newAttribute.references = { + model: source.sequelize.getQueryInterface().QueryGenerator.addSchema({ + tableName: source.tableName, + _schema: source._schema, + _schemaDelimiter: source._schemaDelimiter + }) + }; + } else { + newAttribute.references = { model: source.tableName }; + } + + newAttribute.references.key = key || primaryKeys[0]; + newAttribute.onDelete = options.onDelete; + newAttribute.onUpdate = options.onUpdate; + } + } +} +exports.addForeignKeyConstraints = addForeignKeyConstraints; + +/** + * Mixin (inject) association methods to model prototype + * + * @private + * + * @param {Object} association instance + * @param {Object} obj Model prototype + * @param {Array} methods Method names to inject + * @param {Object} aliases Mapping between model and association method names + * + */ +function mixinMethods(association, obj, methods, aliases) { + aliases = aliases || {}; + + for (const method of methods) { + // don't override custom methods + if (!Object.prototype.hasOwnProperty.call(obj, association.accessors[method])) { + const realMethod = aliases[method] || method; + + obj[association.accessors[method]] = function() { + return association[realMethod](this, ...Array.from(arguments)); + }; + } + } +} +exports.mixinMethods = mixinMethods; diff --git a/node_modules/sequelize/lib/associations/index.js b/node_modules/sequelize/lib/associations/index.js new file mode 100644 index 00000000..f7f2a2b5 --- /dev/null +++ b/node_modules/sequelize/lib/associations/index.js @@ -0,0 +1,12 @@ +'use strict'; + +const Association = require('./base'); + +Association.BelongsTo = require('./belongs-to'); +Association.HasOne = require('./has-one'); +Association.HasMany = require('./has-many'); +Association.BelongsToMany = require('./belongs-to-many'); + +module.exports = Association; +module.exports.default = Association; +module.exports.Association = Association; diff --git a/node_modules/sequelize/lib/associations/mixin.js b/node_modules/sequelize/lib/associations/mixin.js new file mode 100644 index 00000000..60601d77 --- /dev/null +++ b/node_modules/sequelize/lib/associations/mixin.js @@ -0,0 +1,124 @@ +'use strict'; + +const _ = require('lodash'); +const HasOne = require('./has-one'); +const HasMany = require('./has-many'); +const BelongsToMany = require('./belongs-to-many'); +const BelongsTo = require('./belongs-to'); + +function isModel(model, sequelize) { + return model + && model.prototype + && model.prototype instanceof sequelize.Sequelize.Model; +} + +const Mixin = { + hasMany(target, options = {}) { + if (!isModel(target, this.sequelize)) { + throw new Error(`${this.name}.hasMany called with something that's not a subclass of Sequelize.Model`); + } + + const source = this; + + // Since this is a mixin, we'll need a unique letiable name for hooks (since Model will override our hooks option) + options.hooks = options.hooks === undefined ? false : Boolean(options.hooks); + options.useHooks = options.hooks; + + options = Object.assign(options, _.omit(source.options, ['hooks'])); + + if (options.useHooks) { + this.runHooks('beforeAssociate', { source, target, type: HasMany }, options); + } + + // the id is in the foreign table or in a connecting table + const association = new HasMany(source, target, options); + source.associations[association.associationAccessor] = association; + + association._injectAttributes(); + association.mixin(source.prototype); + + if (options.useHooks) { + this.runHooks('afterAssociate', { source, target, type: HasMany, association }, options); + } + + return association; + }, + + belongsToMany(target, options = {}) { + if (!isModel(target, this.sequelize)) { + throw new Error(`${this.name}.belongsToMany called with something that's not a subclass of Sequelize.Model`); + } + + const source = this; + + // Since this is a mixin, we'll need a unique letiable name for hooks (since Model will override our hooks option) + options.hooks = options.hooks === undefined ? false : Boolean(options.hooks); + options.useHooks = options.hooks; + options.timestamps = options.timestamps === undefined ? this.sequelize.options.timestamps : options.timestamps; + options = Object.assign(options, _.omit(source.options, ['hooks', 'timestamps', 'scopes', 'defaultScope'])); + + if (options.useHooks) { + this.runHooks('beforeAssociate', { source, target, type: BelongsToMany }, options); + } + // the id is in the foreign table or in a connecting table + const association = new BelongsToMany(source, target, options); + source.associations[association.associationAccessor] = association; + + association._injectAttributes(); + association.mixin(source.prototype); + + if (options.useHooks) { + this.runHooks('afterAssociate', { source, target, type: BelongsToMany, association }, options); + } + + return association; + }, + + getAssociations(target) { + return _.values(this.associations).filter(association => association.target.name === target.name); + }, + + getAssociationForAlias(target, alias) { + // Two associations cannot have the same alias, so we can use find instead of filter + return this.getAssociations(target).find(association => association.verifyAssociationAlias(alias)) || null; + } +}; + +// The logic for hasOne and belongsTo is exactly the same +function singleLinked(Type) { + return function(target, options = {}) { + // eslint-disable-next-line no-invalid-this + const source = this; + if (!isModel(target, source.sequelize)) { + throw new Error(`${source.name}.${_.lowerFirst(Type.name)} called with something that's not a subclass of Sequelize.Model`); + } + + + // Since this is a mixin, we'll need a unique letiable name for hooks (since Model will override our hooks option) + options.hooks = options.hooks === undefined ? false : Boolean(options.hooks); + options.useHooks = options.hooks; + + if (options.useHooks) { + source.runHooks('beforeAssociate', { source, target, type: Type }, options); + } + // the id is in the foreign table + const association = new Type(source, target, Object.assign(options, source.options)); + source.associations[association.associationAccessor] = association; + + association._injectAttributes(); + association.mixin(source.prototype); + + if (options.useHooks) { + source.runHooks('afterAssociate', { source, target, type: Type, association }, options); + } + + return association; + }; +} + +Mixin.hasOne = singleLinked(HasOne); +Mixin.belongsTo = singleLinked(BelongsTo); + +module.exports = Mixin; +module.exports.Mixin = Mixin; +module.exports.default = Mixin; diff --git a/node_modules/sequelize/lib/data-types.js b/node_modules/sequelize/lib/data-types.js new file mode 100644 index 00000000..19337744 --- /dev/null +++ b/node_modules/sequelize/lib/data-types.js @@ -0,0 +1,1052 @@ +'use strict'; + +const util = require('util'); +const _ = require('lodash'); +const wkx = require('wkx'); +const sequelizeErrors = require('./errors'); +const Validator = require('./utils/validator-extras').validator; +const momentTz = require('moment-timezone'); +const moment = require('moment'); +const { logger } = require('./utils/logger'); +const warnings = {}; +const { classToInvokable } = require('./utils/classToInvokable'); + +class ABSTRACT { + toString(options) { + return this.toSql(options); + } + toSql() { + return this.key; + } + stringify(value, options) { + if (this._stringify) { + return this._stringify(value, options); + } + return value; + } + bindParam(value, options) { + if (this._bindParam) { + return this._bindParam(value, options); + } + return options.bindParam(this.stringify(value, options)); + } + static toString() { + return this.name; + } + static warn(link, text) { + if (!warnings[text]) { + warnings[text] = true; + logger.warn(`${text} \n>> Check: ${link}`); + } + } + static extend(oldType) { + return new this(oldType.options); + } +} + +ABSTRACT.prototype.dialectTypes = ''; + +/** + * STRING A variable length string + */ +class STRING extends ABSTRACT { + /** + * @param {number} [length=255] length of string + * @param {boolean} [binary=false] Is this binary? + */ + constructor(length, binary) { + super(); + const options = typeof length === 'object' && length || { length, binary }; + this.options = options; + this._binary = options.binary; + this._length = options.length || 255; + } + toSql() { + return `VARCHAR(${this._length})${this._binary ? ' BINARY' : ''}`; + } + validate(value) { + if (Object.prototype.toString.call(value) !== '[object String]') { + if (this.options.binary && Buffer.isBuffer(value) || typeof value === 'number') { + return true; + } + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid string', value)); + } + return true; + } + + get BINARY() { + this._binary = true; + this.options.binary = true; + return this; + } + + static get BINARY() { + return new this().BINARY; + } +} + +/** + * CHAR A fixed length string + */ +class CHAR extends STRING { + /** + * @param {number} [length=255] length of string + * @param {boolean} [binary=false] Is this binary? + */ + constructor(length, binary) { + super(typeof length === 'object' && length || { length, binary }); + } + toSql() { + return `CHAR(${this._length})${this._binary ? ' BINARY' : ''}`; + } +} + +/** + * Unlimited length TEXT column + */ +class TEXT extends ABSTRACT { + /** + * @param {string} [length=''] could be tiny, medium, long. + */ + constructor(length) { + super(); + const options = typeof length === 'object' && length || { length }; + this.options = options; + this._length = options.length || ''; + } + toSql() { + switch (this._length.toLowerCase()) { + case 'tiny': + return 'TINYTEXT'; + case 'medium': + return 'MEDIUMTEXT'; + case 'long': + return 'LONGTEXT'; + default: + return this.key; + } + } + validate(value) { + if (typeof value !== 'string') { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid string', value)); + } + return true; + } +} + +/** + * An unlimited length case-insensitive text column. + * Original case is preserved but acts case-insensitive when comparing values (such as when finding or unique constraints). + * Only available in Postgres and SQLite. + * + */ +class CITEXT extends ABSTRACT { + toSql() { + return 'CITEXT'; + } + validate(value) { + if (typeof value !== 'string') { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid string', value)); + } + return true; + } +} + +/** + * Base number type which is used to build other types + */ +class NUMBER extends ABSTRACT { + /** + * @param {Object} options type options + * @param {string|number} [options.length] length of type, like `INT(4)` + * @param {boolean} [options.zerofill] Is zero filled? + * @param {boolean} [options.unsigned] Is unsigned? + * @param {string|number} [options.decimals] number of decimal points, used with length `FLOAT(5, 4)` + * @param {string|number} [options.precision] defines precision for decimal type + * @param {string|number} [options.scale] defines scale for decimal type + */ + constructor(options = {}) { + super(); + if (typeof options === 'number') { + options = { + length: options + }; + } + this.options = options; + this._length = options.length; + this._zerofill = options.zerofill; + this._decimals = options.decimals; + this._precision = options.precision; + this._scale = options.scale; + this._unsigned = options.unsigned; + } + toSql() { + let result = this.key; + if (this._length) { + result += `(${this._length}`; + if (typeof this._decimals === 'number') { + result += `,${this._decimals}`; + } + result += ')'; + } + if (this._unsigned) { + result += ' UNSIGNED'; + } + if (this._zerofill) { + result += ' ZEROFILL'; + } + return result; + } + validate(value) { + if (!Validator.isFloat(String(value))) { + throw new sequelizeErrors.ValidationError(util.format(`%j is not a valid ${this.key.toLowerCase()}`, value)); + } + return true; + } + _stringify(number) { + if (typeof number === 'number' || typeof number === 'boolean' || number === null || number === undefined) { + return number; + } + if (typeof number.toString === 'function') { + return number.toString(); + } + return number; + } + + get UNSIGNED() { + this._unsigned = true; + this.options.unsigned = true; + return this; + } + + get ZEROFILL() { + this._zerofill = true; + this.options.zerofill = true; + return this; + } + + static get UNSIGNED() { + return new this().UNSIGNED; + } + + static get ZEROFILL() { + return new this().ZEROFILL; + } +} + +/** + * A 32 bit integer + */ +class INTEGER extends NUMBER { + validate(value) { + if (!Validator.isInt(String(value))) { + throw new sequelizeErrors.ValidationError(util.format(`%j is not a valid ${this.key.toLowerCase()}`, value)); + } + return true; + } +} + +/** + * A 8 bit integer + */ +class TINYINT extends INTEGER { +} + +/** + * A 16 bit integer + */ +class SMALLINT extends INTEGER { +} + +/** + * A 24 bit integer + */ +class MEDIUMINT extends INTEGER { +} + +/** + * A 64 bit integer + */ +class BIGINT extends INTEGER { +} + +/** + * Floating point number (4-byte precision). + */ +class FLOAT extends NUMBER { + /** + * @param {string|number} [length] length of type, like `FLOAT(4)` + * @param {string|number} [decimals] number of decimal points, used with length `FLOAT(5, 4)` + */ + constructor(length, decimals) { + super(typeof length === 'object' && length || { length, decimals }); + } + validate(value) { + if (!Validator.isFloat(String(value))) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid float', value)); + } + return true; + } +} + +/** + * Floating point number (4-byte precision). + */ +class REAL extends NUMBER { + /** + * @param {string|number} [length] length of type, like `REAL(4)` + * @param {string|number} [decimals] number of decimal points, used with length `REAL(5, 4)` + */ + constructor(length, decimals) { + super(typeof length === 'object' && length || { length, decimals }); + } +} + +/** + * Floating point number (8-byte precision). + */ +class DOUBLE extends NUMBER { + /** + * @param {string|number} [length] length of type, like `DOUBLE PRECISION(25)` + * @param {string|number} [decimals] number of decimal points, used with length `DOUBLE PRECISION(25, 10)` + */ + constructor(length, decimals) { + super(typeof length === 'object' && length || { length, decimals }); + } +} + +/** + * Decimal type, variable precision, take length as specified by user + */ +class DECIMAL extends NUMBER { + /** + * @param {string|number} [precision] defines precision + * @param {string|number} [scale] defines scale + */ + constructor(precision, scale) { + super(typeof precision === 'object' && precision || { precision, scale }); + } + toSql() { + if (this._precision || this._scale) { + return `DECIMAL(${[this._precision, this._scale].filter(_.identity).join(',')})`; + } + return 'DECIMAL'; + } + validate(value) { + if (!Validator.isDecimal(String(value))) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid decimal', value)); + } + return true; + } +} + +// TODO: Create intermediate class +const protoExtensions = { + escape: false, + _value(value) { + if (isNaN(value)) { + return 'NaN'; + } + if (!isFinite(value)) { + const sign = value < 0 ? '-' : ''; + return `${sign}Infinity`; + } + + return value; + }, + _stringify(value) { + return `'${this._value(value)}'`; + }, + _bindParam(value, options) { + return options.bindParam(this._value(value)); + } +}; + +for (const floating of [FLOAT, DOUBLE, REAL]) { + Object.assign(floating.prototype, protoExtensions); +} + +/** + * A boolean / tinyint column, depending on dialect + */ +class BOOLEAN extends ABSTRACT { + toSql() { + return 'TINYINT(1)'; + } + validate(value) { + if (!Validator.isBoolean(String(value))) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid boolean', value)); + } + return true; + } + _sanitize(value) { + if (value !== null && value !== undefined) { + if (Buffer.isBuffer(value) && value.length === 1) { + // Bit fields are returned as buffers + value = value[0]; + } + const type = typeof value; + if (type === 'string') { + // Only take action on valid boolean strings. + return value === 'true' ? true : value === 'false' ? false : value; + } + if (type === 'number') { + // Only take action on valid boolean integers. + return value === 1 ? true : value === 0 ? false : value; + } + } + return value; + } +} + + +BOOLEAN.parse = BOOLEAN.prototype._sanitize; + +/** + * A time column + * + */ +class TIME extends ABSTRACT { + toSql() { + return 'TIME'; + } +} + +/** + * Date column with timezone, default is UTC + */ +class DATE extends ABSTRACT { + /** + * @param {string|number} [length] precision to allow storing milliseconds + */ + constructor(length) { + super(); + const options = typeof length === 'object' && length || { length }; + this.options = options; + this._length = options.length || ''; + } + toSql() { + return 'DATETIME'; + } + validate(value) { + if (!Validator.isDate(String(value))) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid date', value)); + } + return true; + } + _sanitize(value, options) { + if ((!options || options && !options.raw) && !(value instanceof Date) && !!value) { + return new Date(value); + } + return value; + } + _isChanged(value, originalValue) { + if (originalValue && !!value && + (value === originalValue || + value instanceof Date && originalValue instanceof Date && value.getTime() === originalValue.getTime())) { + return false; + } + // not changed when set to same empty value + if (!originalValue && !value && originalValue === value) { + return false; + } + return true; + } + _applyTimezone(date, options) { + if (options.timezone) { + if (momentTz.tz.zone(options.timezone)) { + return momentTz(date).tz(options.timezone); + } + return date = moment(date).utcOffset(options.timezone); + } + return momentTz(date); + } + _stringify(date, options) { + date = this._applyTimezone(date, options); + // Z here means current timezone, _not_ UTC + return date.format('YYYY-MM-DD HH:mm:ss.SSS Z'); + } +} + +/** + * A date only column (no timestamp) + */ +class DATEONLY extends ABSTRACT { + toSql() { + return 'DATE'; + } + _stringify(date) { + return moment(date).format('YYYY-MM-DD'); + } + _sanitize(value, options) { + if ((!options || options && !options.raw) && !!value) { + return moment(value).format('YYYY-MM-DD'); + } + return value; + } + _isChanged(value, originalValue) { + if (originalValue && !!value && originalValue === value) { + return false; + } + // not changed when set to same empty value + if (!originalValue && !value && originalValue === value) { + return false; + } + return true; + } +} + +/** + * A key / value store column. Only available in Postgres. + */ +class HSTORE extends ABSTRACT { + validate(value) { + if (!_.isPlainObject(value)) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid hstore', value)); + } + return true; + } +} + +/** + * A JSON string column. Available in MySQL, Postgres and SQLite + */ +class JSONTYPE extends ABSTRACT { + validate() { + return true; + } + _stringify(value) { + return JSON.stringify(value); + } +} + +/** + * A binary storage JSON column. Only available in Postgres. + */ +class JSONB extends JSONTYPE { +} + +/** + * A default value of the current timestamp + */ +class NOW extends ABSTRACT { +} + +/** + * Binary storage + */ +class BLOB extends ABSTRACT { + /** + * @param {string} [length=''] could be tiny, medium, long. + */ + constructor(length) { + super(); + const options = typeof length === 'object' && length || { length }; + this.options = options; + this._length = options.length || ''; + } + toSql() { + switch (this._length.toLowerCase()) { + case 'tiny': + return 'TINYBLOB'; + case 'medium': + return 'MEDIUMBLOB'; + case 'long': + return 'LONGBLOB'; + default: + return this.key; + } + } + validate(value) { + if (typeof value !== 'string' && !Buffer.isBuffer(value)) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid blob', value)); + } + return true; + } + _stringify(value) { + if (!Buffer.isBuffer(value)) { + if (Array.isArray(value)) { + value = Buffer.from(value); + } + else { + value = Buffer.from(value.toString()); + } + } + const hex = value.toString('hex'); + return this._hexify(hex); + } + _hexify(hex) { + return `X'${hex}'`; + } + _bindParam(value, options) { + if (!Buffer.isBuffer(value)) { + if (Array.isArray(value)) { + value = Buffer.from(value); + } + else { + value = Buffer.from(value.toString()); + } + } + return options.bindParam(value); + } +} + + +BLOB.prototype.escape = false; + +/** + * Range types are data types representing a range of values of some element type (called the range's subtype). + * Only available in Postgres. See [the Postgres documentation](http://www.postgresql.org/docs/9.4/static/rangetypes.html) for more details + */ +class RANGE extends ABSTRACT { + /** + * @param {ABSTRACT} subtype A subtype for range, like RANGE(DATE) + */ + constructor(subtype) { + super(); + const options = _.isPlainObject(subtype) ? subtype : { subtype }; + if (!options.subtype) + options.subtype = new INTEGER(); + if (typeof options.subtype === 'function') { + options.subtype = new options.subtype(); + } + this._subtype = options.subtype.key; + this.options = options; + } + validate(value) { + if (!Array.isArray(value)) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid range', value)); + } + if (value.length !== 2) { + throw new sequelizeErrors.ValidationError('A range must be an array with two elements'); + } + return true; + } +} + +/** + * A column storing a unique universal identifier. + * Use with `UUIDV1` or `UUIDV4` for default values. + */ +class UUID extends ABSTRACT { + validate(value, options) { + if (typeof value !== 'string' || !Validator.isUUID(value) && (!options || !options.acceptStrings)) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid uuid', value)); + } + return true; + } +} + +/** + * A default unique universal identifier generated following the UUID v1 standard + */ +class UUIDV1 extends ABSTRACT { + validate(value, options) { + if (typeof value !== 'string' || !Validator.isUUID(value) && (!options || !options.acceptStrings)) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid uuid', value)); + } + return true; + } +} + +/** + * A default unique universal identifier generated following the UUID v4 standard + */ +class UUIDV4 extends ABSTRACT { + validate(value, options) { + if (typeof value !== 'string' || !Validator.isUUID(value, 4) && (!options || !options.acceptStrings)) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid uuidv4', value)); + } + return true; + } +} + +/** + * A virtual value that is not stored in the DB. This could for example be useful if you want to provide a default value in your model that is returned to the user but not stored in the DB. + * + * You could also use it to validate a value before permuting and storing it. VIRTUAL also takes a return type and dependency fields as arguments + * If a virtual attribute is present in `attributes` it will automatically pull in the extra fields as well. + * Return type is mostly useful for setups that rely on types like GraphQL. + * + * @example Checking password length before hashing it + * sequelize.define('user', { + * password_hash: DataTypes.STRING, + * password: { + * type: DataTypes.VIRTUAL, + * set: function (val) { + * // Remember to set the data value, otherwise it won't be validated + * this.setDataValue('password', val); + * this.setDataValue('password_hash', this.salt + val); + * }, + * validate: { + * isLongEnough: function (val) { + * if (val.length < 7) { + * throw new Error("Please choose a longer password") + * } + * } + * } + * } + * }) + * + * # In the above code the password is stored plainly in the password field so it can be validated, but is never stored in the DB. + * + * @example Virtual with dependency fields + * { + * active: { + * type: new DataTypes.VIRTUAL(DataTypes.BOOLEAN, ['createdAt']), + * get: function() { + * return this.get('createdAt') > Date.now() - (7 * 24 * 60 * 60 * 1000) + * } + * } + * } + * + */ +class VIRTUAL extends ABSTRACT { + /** + * @param {ABSTRACT} [ReturnType] return type for virtual type + * @param {Array} [fields] array of fields this virtual type is dependent on + */ + constructor(ReturnType, fields) { + super(); + if (typeof ReturnType === 'function') + ReturnType = new ReturnType(); + this.returnType = ReturnType; + this.fields = fields; + } +} + +/** + * An enumeration, Postgres Only + * + * @example + * DataTypes.ENUM('value', 'another value') + * DataTypes.ENUM(['value', 'another value']) + * DataTypes.ENUM({ + * values: ['value', 'another value'] + * }) + */ +class ENUM extends ABSTRACT { + /** + * @param {...any|{ values: any[] }|any[]} args either array of values or options object with values array. It also supports variadic values + */ + constructor(...args) { + super(); + const value = args[0]; + const options = typeof value === 'object' && !Array.isArray(value) && value || { + values: args.reduce((result, element) => { + return result.concat(Array.isArray(element) ? element : [element]); + }, []) + }; + this.values = options.values; + this.options = options; + } + validate(value) { + if (!this.values.includes(value)) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid choice in %j', value, this.values)); + } + return true; + } +} + +/** + * An array of `type`. Only available in Postgres. + * + * @example + * DataTypes.ARRAY(DataTypes.DECIMAL) + */ +class ARRAY extends ABSTRACT { + /** + * @param {ABSTRACT} type type of array values + */ + constructor(type) { + super(); + const options = _.isPlainObject(type) ? type : { type }; + this.options = options; + this.type = typeof options.type === 'function' ? new options.type() : options.type; + } + toSql() { + return `${this.type.toSql()}[]`; + } + validate(value) { + if (!Array.isArray(value)) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid array', value)); + } + return true; + } + static is(obj, type) { + return obj instanceof ARRAY && obj.type instanceof type; + } +} + +/** + * A column storing Geometry information. + * It is only available in PostgreSQL (with PostGIS), MariaDB or MySQL. + * + * GeoJSON is accepted as input and returned as output. + * + * In PostGIS, the GeoJSON is parsed using the PostGIS function `ST_GeomFromGeoJSON`. + * In MySQL it is parsed using the function `GeomFromText`. + * + * Therefore, one can just follow the [GeoJSON spec](http://geojson.org/geojson-spec.html) for handling geometry objects. See the following examples: + * + * @example Defining a Geometry type attribute + * DataTypes.GEOMETRY + * DataTypes.GEOMETRY('POINT') + * DataTypes.GEOMETRY('POINT', 4326) + * + * @example Create a new point + * const point = { type: 'Point', coordinates: [39.807222,-76.984722]}; + * + * User.create({username: 'username', geometry: point }); + * + * @example Create a new linestring + * const line = { type: 'LineString', 'coordinates': [ [100.0, 0.0], [101.0, 1.0] ] }; + * + * User.create({username: 'username', geometry: line }); + * + * @example Create a new polygon + * const polygon = { type: 'Polygon', coordinates: [ + * [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], + * [100.0, 1.0], [100.0, 0.0] ] + * ]}; + * + * User.create({username: 'username', geometry: polygon }); + * + * @example Create a new point with a custom SRID + * const point = { + * type: 'Point', + * coordinates: [39.807222,-76.984722], + * crs: { type: 'name', properties: { name: 'EPSG:4326'} } + * }; + * + * User.create({username: 'username', geometry: point }) + * + * + * @see {@link DataTypes.GEOGRAPHY} + */ +class GEOMETRY extends ABSTRACT { + /** + * @param {string} [type] Type of geometry data + * @param {string} [srid] SRID of type + */ + constructor(type, srid) { + super(); + const options = _.isPlainObject(type) ? type : { type, srid }; + this.options = options; + this.type = options.type; + this.srid = options.srid; + } + _stringify(value, options) { + return `GeomFromText(${options.escape(wkx.Geometry.parseGeoJSON(value).toWkt())})`; + } + _bindParam(value, options) { + return `GeomFromText(${options.bindParam(wkx.Geometry.parseGeoJSON(value).toWkt())})`; + } +} + +GEOMETRY.prototype.escape = false; + +/** + * A geography datatype represents two dimensional spacial objects in an elliptic coord system. + * + * __The difference from geometry and geography type:__ + * + * PostGIS 1.5 introduced a new spatial type called geography, which uses geodetic measurement instead of Cartesian measurement. + * Coordinate points in the geography type are always represented in WGS 84 lon lat degrees (SRID 4326), + * but measurement functions and relationships ST_Distance, ST_DWithin, ST_Length, and ST_Area always return answers in meters or assume inputs in meters. + * + * __What is best to use? It depends:__ + * + * When choosing between the geometry and geography type for data storage, you should consider what you’ll be using it for. + * If all you do are simple measurements and relationship checks on your data, and your data covers a fairly large area, then most likely you’ll be better off storing your data using the new geography type. + * Although the new geography data type can cover the globe, the geometry type is far from obsolete. + * The geometry type has a much richer set of functions than geography, relationship checks are generally faster, and it has wider support currently across desktop and web-mapping tools + * + * @example Defining a Geography type attribute + * DataTypes.GEOGRAPHY + * DataTypes.GEOGRAPHY('POINT') + * DataTypes.GEOGRAPHY('POINT', 4326) + */ +class GEOGRAPHY extends ABSTRACT { + /** + * @param {string} [type] Type of geography data + * @param {string} [srid] SRID of type + */ + constructor(type, srid) { + super(); + const options = _.isPlainObject(type) ? type : { type, srid }; + this.options = options; + this.type = options.type; + this.srid = options.srid; + } + _stringify(value, options) { + return `GeomFromText(${options.escape(wkx.Geometry.parseGeoJSON(value).toWkt())})`; + } + _bindParam(value, options) { + return `GeomFromText(${options.bindParam(wkx.Geometry.parseGeoJSON(value).toWkt())})`; + } +} + + +GEOGRAPHY.prototype.escape = false; + +/** + * The cidr type holds an IPv4 or IPv6 network specification. Takes 7 or 19 bytes. + * + * Only available for Postgres + */ +class CIDR extends ABSTRACT { + validate(value) { + if (typeof value !== 'string' || !Validator.isIPRange(value)) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid CIDR', value)); + } + return true; + } +} + +/** + * The INET type holds an IPv4 or IPv6 host address, and optionally its subnet. Takes 7 or 19 bytes + * + * Only available for Postgres + */ +class INET extends ABSTRACT { + validate(value) { + if (typeof value !== 'string' || !Validator.isIP(value)) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid INET', value)); + } + return true; + } +} + +/** + * The MACADDR type stores MAC addresses. Takes 6 bytes + * + * Only available for Postgres + * + */ +class MACADDR extends ABSTRACT { + validate(value) { + if (typeof value !== 'string' || !Validator.isMACAddress(value)) { + throw new sequelizeErrors.ValidationError(util.format('%j is not a valid MACADDR', value)); + } + return true; + } +} + +/** + * A convenience class holding commonly used data types. The data types are used when defining a new model using `Sequelize.define`, like this: + * ```js + * sequelize.define('model', { + * column: DataTypes.INTEGER + * }) + * ``` + * When defining a model you can just as easily pass a string as type, but often using the types defined here is beneficial. For example, using `DataTypes.BLOB`, mean + * that that column will be returned as an instance of `Buffer` when being fetched by sequelize. + * + * To provide a length for the data type, you can invoke it like a function: `INTEGER(2)` + * + * Some data types have special properties that can be accessed in order to change the data type. + * For example, to get an unsigned integer with zerofill you can do `DataTypes.INTEGER.UNSIGNED.ZEROFILL`. + * The order you access the properties in do not matter, so `DataTypes.INTEGER.ZEROFILL.UNSIGNED` is fine as well. + * + * * All number types (`INTEGER`, `BIGINT`, `FLOAT`, `DOUBLE`, `REAL`, `DECIMAL`) expose the properties `UNSIGNED` and `ZEROFILL` + * * The `CHAR` and `STRING` types expose the `BINARY` property + * + * Three of the values provided here (`NOW`, `UUIDV1` and `UUIDV4`) are special default values, that should not be used to define types. Instead they are used as shorthands for + * defining default values. For example, to get a uuid field with a default value generated following v1 of the UUID standard: + * ```js` + * sequelize.define('model',` { + * uuid: { + * type: DataTypes.UUID, + * defaultValue: DataTypes.UUIDV1, + * primaryKey: true + * } + * }) + * ``` + * There may be times when you want to generate your own UUID conforming to some other algorithm. This is accomplished + * using the defaultValue property as well, but instead of specifying one of the supplied UUID types, you return a value + * from a function. + * ```js + * sequelize.define('model', { + * uuid: { + * type: DataTypes.UUID, + * defaultValue: function() { + * return generateMyId() + * }, + * primaryKey: true + * } + * }) + * ``` + */ +const DataTypes = module.exports = { + ABSTRACT, + STRING, + CHAR, + TEXT, + NUMBER, + TINYINT, + SMALLINT, + MEDIUMINT, + INTEGER, + BIGINT, + FLOAT, + TIME, + DATE, + DATEONLY, + BOOLEAN, + NOW, + BLOB, + DECIMAL, + NUMERIC: DECIMAL, + UUID, + UUIDV1, + UUIDV4, + HSTORE, + JSON: JSONTYPE, + JSONB, + VIRTUAL, + ARRAY, + ENUM, + RANGE, + REAL, + 'DOUBLE PRECISION': DOUBLE, + DOUBLE, + GEOMETRY, + GEOGRAPHY, + CIDR, + INET, + MACADDR, + CITEXT +}; + +_.each(DataTypes, (dataType, name) => { + // guard for aliases + if (!Object.prototype.hasOwnProperty.call(dataType, 'key')) { + dataType.types = {}; + dataType.key = dataType.prototype.key = name; + } +}); + +const dialectNames = ['postgres', 'mysql', 'mariadb', 'sqlite', 'mssql']; +const dialectMap = {}; +for (const d of dialectNames) { + dialectMap[d] = require(`./dialects/${d}/data-types`)(DataTypes); +} +const dialectList = _.values(dialectMap); + +for (const dataTypes of dialectList) { + _.each(dataTypes, (DataType, key) => { + if (!DataType.key) { + DataType.key = DataType.prototype.key = key; + } + }); +} + +// Wrap all data types to not require `new` +for (const dataTypes of [DataTypes, ...dialectList]) { + _.each(dataTypes, (DataType, key) => { + dataTypes[key] = classToInvokable(DataType); + }); +} + +Object.assign(DataTypes, dialectMap); diff --git a/node_modules/sequelize/lib/deferrable.js b/node_modules/sequelize/lib/deferrable.js new file mode 100644 index 00000000..84dce479 --- /dev/null +++ b/node_modules/sequelize/lib/deferrable.js @@ -0,0 +1,103 @@ +'use strict'; + +const { classToInvokable } = require('./utils'); + +class ABSTRACT { + static toString(...args) { + return new this().toString(...args); + } + + toString(...args) { + return this.toSql(...args); + } + + toSql() { + throw new Error('toSql implementation missing'); + } +} + +class INITIALLY_DEFERRED extends ABSTRACT { + toSql() { + return 'DEFERRABLE INITIALLY DEFERRED'; + } +} + +class INITIALLY_IMMEDIATE extends ABSTRACT { + toSql() { + return 'DEFERRABLE INITIALLY IMMEDIATE'; + } +} + +class NOT extends ABSTRACT { + toSql() { + return 'NOT DEFERRABLE'; + } +} + +class SET_DEFERRED extends ABSTRACT { + constructor(constraints) { + super(); + this.constraints = constraints; + } + + toSql(queryGenerator) { + return queryGenerator.setDeferredQuery(this.constraints); + } +} + +class SET_IMMEDIATE extends ABSTRACT { + constructor(constraints) { + super(); + this.constraints = constraints; + } + + toSql(queryGenerator) { + return queryGenerator.setImmediateQuery(this.constraints); + } +} + +/** + * A collection of properties related to deferrable constraints. It can be used to + * make foreign key constraints deferrable and to set the constraints within a + * transaction. This is only supported in PostgreSQL. + * + * The foreign keys can be configured like this. It will create a foreign key + * that will check the constraints immediately when the data was inserted. + * + * ```js + * sequelize.define('Model', { + * foreign_id: { + * type: Sequelize.INTEGER, + * references: { + * model: OtherModel, + * key: 'id', + * deferrable: Sequelize.Deferrable.INITIALLY_IMMEDIATE + * } + * } + * }); + * ``` + * + * The constraints can be configured in a transaction like this. It will + * trigger a query once the transaction has been started and set the constraints + * to be checked at the very end of the transaction. + * + * ```js + * sequelize.transaction({ + * deferrable: Sequelize.Deferrable.SET_DEFERRED + * }); + * ``` + * + * @property INITIALLY_DEFERRED Defer constraints checks to the end of transactions. + * @property INITIALLY_IMMEDIATE Trigger the constraint checks immediately + * @property NOT Set the constraints to not deferred. This is the default in PostgreSQL and it make it impossible to dynamically defer the constraints within a transaction. + * @property SET_DEFERRED + * @property SET_IMMEDIATE + */ + +const Deferrable = module.exports = { // eslint-disable-line + INITIALLY_DEFERRED: classToInvokable(INITIALLY_DEFERRED), + INITIALLY_IMMEDIATE: classToInvokable(INITIALLY_IMMEDIATE), + NOT: classToInvokable(NOT), + SET_DEFERRED: classToInvokable(SET_DEFERRED), + SET_IMMEDIATE: classToInvokable(SET_IMMEDIATE) +}; diff --git a/node_modules/sequelize/lib/dialects/abstract/connection-manager.js b/node_modules/sequelize/lib/dialects/abstract/connection-manager.js new file mode 100644 index 00000000..b37d412e --- /dev/null +++ b/node_modules/sequelize/lib/dialects/abstract/connection-manager.js @@ -0,0 +1,346 @@ +'use strict'; + +const { Pool, TimeoutError } = require('sequelize-pool'); +const _ = require('lodash'); +const semver = require('semver'); +const Promise = require('../../promise'); +const errors = require('../../errors'); +const { logger } = require('../../utils/logger'); +const debug = logger.debugContext('pool'); + +/** + * Abstract Connection Manager + * + * Connection manager which handles pooling & replication. + * Uses sequelize-pool for pooling + * + * @private + */ +class ConnectionManager { + constructor(dialect, sequelize) { + const config = _.cloneDeep(sequelize.config); + + this.sequelize = sequelize; + this.config = config; + this.dialect = dialect; + this.versionPromise = null; + this.dialectName = this.sequelize.options.dialect; + + if (config.pool === false) { + throw new Error('Support for pool:false was removed in v4.0'); + } + + config.pool = _.defaults(config.pool || {}, { + max: 5, + min: 0, + idle: 10000, + acquire: 60000, + evict: 1000, + validate: this._validate.bind(this) + }); + + this.initPools(); + } + + refreshTypeParser(dataTypes) { + _.each(dataTypes, dataType => { + if (Object.prototype.hasOwnProperty.call(dataType, 'parse')) { + if (dataType.types[this.dialectName]) { + this._refreshTypeParser(dataType); + } else { + throw new Error(`Parse function not supported for type ${dataType.key} in dialect ${this.dialectName}`); + } + } + }); + } + + /** + * Try to load dialect module from various configured options. + * Priority goes like dialectModulePath > dialectModule > require(default) + * + * @param {string} moduleName Name of dialect module to lookup + * + * @private + * @returns {Object} + */ + _loadDialectModule(moduleName) { + try { + if (this.sequelize.config.dialectModulePath) { + return require(this.sequelize.config.dialectModulePath); + } + if (this.sequelize.config.dialectModule) { + return this.sequelize.config.dialectModule; + } + return require(moduleName); + + } catch (err) { + if (err.code === 'MODULE_NOT_FOUND') { + if (this.sequelize.config.dialectModulePath) { + throw new Error(`Unable to find dialect at ${this.sequelize.config.dialectModulePath}`); + } + throw new Error(`Please install ${moduleName} package manually`); + } + + throw err; + } + } + + /** + * Handler which executes on process exit or connection manager shutdown + * + * @private + * @returns {Promise} + */ + _onProcessExit() { + if (!this.pool) { + return Promise.resolve(); + } + + return this.pool.drain().then(() => { + debug('connection drain due to process exit'); + return this.pool.destroyAllNow(); + }); + } + + /** + * Drain the pool and close it permanently + * + * @returns {Promise} + */ + close() { + // Mark close of pool + this.getConnection = function getConnection() { + return Promise.reject(new Error('ConnectionManager.getConnection was called after the connection manager was closed!')); + }; + + return this._onProcessExit(); + } + + /** + * Initialize connection pool. By default pool autostart is set to false, so no connection will be + * be created unless `pool.acquire` is called. + */ + initPools() { + const config = this.config; + + if (!config.replication) { + this.pool = new Pool({ + name: 'sequelize', + create: () => this._connect(config), + destroy: connection => { + return this._disconnect(connection) + .tap(() => { debug('connection destroy'); }); + }, + validate: config.pool.validate, + max: config.pool.max, + min: config.pool.min, + acquireTimeoutMillis: config.pool.acquire, + idleTimeoutMillis: config.pool.idle, + reapIntervalMillis: config.pool.evict + }); + + debug(`pool created with max/min: ${config.pool.max}/${config.pool.min}, no replication`); + + return; + } + + if (!Array.isArray(config.replication.read)) { + config.replication.read = [config.replication.read]; + } + + // Map main connection config + config.replication.write = _.defaults(config.replication.write, _.omit(config, 'replication')); + + // Apply defaults to each read config + config.replication.read = config.replication.read.map(readConfig => + _.defaults(readConfig, _.omit(this.config, 'replication')) + ); + + // custom pooling for replication (original author @janmeier) + let reads = 0; + this.pool = { + release: client => { + if (client.queryType === 'read') { + this.pool.read.release(client); + } else { + this.pool.write.release(client); + } + }, + acquire: (queryType, useMaster) => { + useMaster = useMaster === undefined ? false : useMaster; + if (queryType === 'SELECT' && !useMaster) { + return this.pool.read.acquire(); + } + return this.pool.write.acquire(); + }, + destroy: connection => { + this.pool[connection.queryType].destroy(connection); + debug('connection destroy'); + }, + destroyAllNow: () => { + return Promise.join( + this.pool.read.destroyAllNow(), + this.pool.write.destroyAllNow() + ).tap(() => { debug('all connections destroyed'); }); + }, + drain: () => { + return Promise.join( + this.pool.write.drain(), + this.pool.read.drain() + ); + }, + read: new Pool({ + name: 'sequelize:read', + create: () => { + // round robin config + const nextRead = reads++ % config.replication.read.length; + return this._connect(config.replication.read[nextRead]).tap(connection => { + connection.queryType = 'read'; + }); + }, + destroy: connection => this._disconnect(connection), + validate: config.pool.validate, + max: config.pool.max, + min: config.pool.min, + acquireTimeoutMillis: config.pool.acquire, + idleTimeoutMillis: config.pool.idle, + reapIntervalMillis: config.pool.evict + }), + write: new Pool({ + name: 'sequelize:write', + create: () => { + return this._connect(config.replication.write).tap(connection => { + connection.queryType = 'write'; + }); + }, + destroy: connection => this._disconnect(connection), + validate: config.pool.validate, + max: config.pool.max, + min: config.pool.min, + acquireTimeoutMillis: config.pool.acquire, + idleTimeoutMillis: config.pool.idle, + reapIntervalMillis: config.pool.evict + }) + }; + + debug(`pool created with max/min: ${config.pool.max}/${config.pool.min}, with replication`); + } + + /** + * Get connection from pool. It sets database version if it's not already set. + * Call pool.acquire to get a connection + * + * @param {Object} [options] Pool options + * @param {string} [options.type] Set which replica to use. Available options are `read` and `write` + * @param {boolean} [options.useMaster=false] Force master or write replica to get connection from + * + * @returns {Promise} + */ + getConnection(options) { + options = options || {}; + + let promise; + if (this.sequelize.options.databaseVersion === 0) { + if (this.versionPromise) { + promise = this.versionPromise; + } else { + promise = this.versionPromise = this._connect(this.config.replication.write || this.config) + .then(connection => { + const _options = {}; + + _options.transaction = { connection }; // Cheat .query to use our private connection + _options.logging = () => {}; + _options.logging.__testLoggingFn = true; + + //connection might have set databaseVersion value at initialization, + //avoiding a useless round trip + if (this.sequelize.options.databaseVersion === 0) { + return this.sequelize.databaseVersion(_options).then(version => { + const parsedVersion = _.get(semver.coerce(version), 'version') || version; + this.sequelize.options.databaseVersion = semver.valid(parsedVersion) + ? parsedVersion + : this.defaultVersion; + this.versionPromise = null; + return this._disconnect(connection); + }); + } + + this.versionPromise = null; + return this._disconnect(connection); + }).catch(err => { + this.versionPromise = null; + throw err; + }); + } + } else { + promise = Promise.resolve(); + } + + return promise.then(() => { + return this.pool.acquire(options.type, options.useMaster) + .catch(error => { + if (error instanceof TimeoutError) throw new errors.ConnectionAcquireTimeoutError(error); + throw error; + }); + }).tap(() => { debug('connection acquired'); }); + } + + /** + * Release a pooled connection so it can be utilized by other connection requests + * + * @param {Connection} connection + * + * @returns {Promise} + */ + releaseConnection(connection) { + return Promise.try(() => { + this.pool.release(connection); + debug('connection released'); + }); + } + + /** + * Call dialect library to get connection + * + * @param {*} config Connection config + * @private + * @returns {Promise} + */ + _connect(config) { + return this.sequelize.runHooks('beforeConnect', config) + .then(() => this.dialect.connectionManager.connect(config)) + .then(connection => this.sequelize.runHooks('afterConnect', connection, config).return(connection)); + } + + /** + * Call dialect library to disconnect a connection + * + * @param {Connection} connection + * @private + * @returns {Promise} + */ + _disconnect(connection) { + return this.sequelize.runHooks('beforeDisconnect', connection) + .then(() => this.dialect.connectionManager.disconnect(connection)) + .then(() => this.sequelize.runHooks('afterDisconnect', connection)); + } + + /** + * Determine if a connection is still valid or not + * + * @param {Connection} connection + * + * @returns {boolean} + */ + _validate(connection) { + if (!this.dialect.connectionManager.validate) { + return true; + } + + return this.dialect.connectionManager.validate(connection); + } +} + +module.exports = ConnectionManager; +module.exports.ConnectionManager = ConnectionManager; +module.exports.default = ConnectionManager; diff --git a/node_modules/sequelize/lib/dialects/abstract/index.js b/node_modules/sequelize/lib/dialects/abstract/index.js new file mode 100644 index 00000000..c558b60d --- /dev/null +++ b/node_modules/sequelize/lib/dialects/abstract/index.js @@ -0,0 +1,71 @@ +'use strict'; + +class AbstractDialect {} + +AbstractDialect.prototype.supports = { + 'DEFAULT': true, + 'DEFAULT VALUES': false, + 'VALUES ()': false, + 'LIMIT ON UPDATE': false, + 'ON DUPLICATE KEY': true, + 'ORDER NULLS': false, + 'UNION': true, + 'UNION ALL': true, + + /* does the dialect support returning values for inserted/updated fields */ + returnValues: false, + + /* features specific to autoIncrement values */ + autoIncrement: { + /* does the dialect require modification of insert queries when inserting auto increment fields */ + identityInsert: false, + + /* does the dialect support inserting default/null values for autoincrement fields */ + defaultValue: true, + + /* does the dialect support updating autoincrement fields */ + update: true + }, + /* Do we need to say DEFAULT for bulk insert */ + bulkDefault: false, + schemas: false, + transactions: true, + transactionOptions: { + type: false + }, + migrations: true, + upserts: true, + inserts: { + ignoreDuplicates: '', /* dialect specific words for INSERT IGNORE or DO NOTHING */ + updateOnDuplicate: false, /* whether dialect supports ON DUPLICATE KEY UPDATE */ + onConflictDoNothing: '' /* dialect specific words for ON CONFLICT DO NOTHING */ + }, + constraints: { + restrict: true, + addConstraint: true, + dropConstraint: true, + unique: true, + default: false, + check: true, + foreignKey: true, + primaryKey: true + }, + index: { + collate: true, + length: false, + parser: false, + concurrently: false, + type: false, + using: true, + functionBased: false + }, + joinTableDependent: true, + groupedLimit: true, + indexViaAlter: false, + JSON: false, + deferrableConstraints: false +}; + +module.exports = AbstractDialect; +module.exports.AbstractDialect = AbstractDialect; +module.exports.default = AbstractDialect; diff --git a/node_modules/sequelize/lib/dialects/abstract/query-generator.js b/node_modules/sequelize/lib/dialects/abstract/query-generator.js new file mode 100755 index 00000000..1258863b --- /dev/null +++ b/node_modules/sequelize/lib/dialects/abstract/query-generator.js @@ -0,0 +1,2532 @@ +'use strict'; + +const util = require('util'); +const _ = require('lodash'); +const uuidv4 = require('uuid/v4'); +const semver = require('semver'); + +const Utils = require('../../utils'); +const deprecations = require('../../utils/deprecations'); +const SqlString = require('../../sql-string'); +const DataTypes = require('../../data-types'); +const Model = require('../../model'); +const Association = require('../../associations/base'); +const BelongsTo = require('../../associations/belongs-to'); +const BelongsToMany = require('../../associations/belongs-to-many'); +const HasMany = require('../../associations/has-many'); +const Op = require('../../operators'); +const sequelizeError = require('../../errors'); +const IndexHints = require('../../index-hints'); + +const QuoteHelper = require('./query-generator/helpers/quote'); + +/** + * Abstract Query Generator + * + * @private + */ +class QueryGenerator { + constructor(options) { + if (!options.sequelize) throw new Error('QueryGenerator initialized without options.sequelize'); + if (!options._dialect) throw new Error('QueryGenerator initialized without options._dialect'); + + this.sequelize = options.sequelize; + this.options = options.sequelize.options; + + // dialect name + this.dialect = options._dialect.name; + this._dialect = options._dialect; + } + + extractTableDetails(tableName, options) { + options = options || {}; + tableName = tableName || {}; + return { + schema: tableName.schema || options.schema || 'public', + tableName: _.isPlainObject(tableName) ? tableName.tableName : tableName, + delimiter: tableName.delimiter || options.delimiter || '.' + }; + } + + addSchema(param) { + if (!param._schema) return param.tableName || param; + const self = this; + return { + tableName: param.tableName || param, + table: param.tableName || param, + name: param.name || param, + schema: param._schema, + delimiter: param._schemaDelimiter || '.', + toString() { + return self.quoteTable(this); + } + }; + } + + dropSchema(tableName, options) { + return this.dropTableQuery(tableName, options); + } + + describeTableQuery(tableName, schema, schemaDelimiter) { + const table = this.quoteTable( + this.addSchema({ + tableName, + _schema: schema, + _schemaDelimiter: schemaDelimiter + }) + ); + + return `DESCRIBE ${table};`; + } + + dropTableQuery(tableName) { + return `DROP TABLE IF EXISTS ${this.quoteTable(tableName)};`; + } + + renameTableQuery(before, after) { + return `ALTER TABLE ${this.quoteTable(before)} RENAME TO ${this.quoteTable(after)};`; + } + + /** + * Returns an insert into command + * + * @param {string} table + * @param {Object} valueHash attribute value pairs + * @param {Object} modelAttributes + * @param {Object} [options] + * + * @private + */ + insertQuery(table, valueHash, modelAttributes, options) { + options = options || {}; + _.defaults(options, this.options); + + const modelAttributeMap = {}; + const fields = []; + const values = []; + const bind = []; + const quotedTable = this.quoteTable(table); + const bindParam = options.bindParam === undefined ? this.bindParam(bind) : options.bindParam; + let query; + let valueQuery = ''; + let emptyQuery = ''; + let outputFragment = ''; + let identityWrapperRequired = false; + let tmpTable = ''; //tmpTable declaration for trigger + + if (modelAttributes) { + _.each(modelAttributes, (attribute, key) => { + modelAttributeMap[key] = attribute; + if (attribute.field) { + modelAttributeMap[attribute.field] = attribute; + } + }); + } + + if (this._dialect.supports['DEFAULT VALUES']) { + emptyQuery += ' DEFAULT VALUES'; + } else if (this._dialect.supports['VALUES ()']) { + emptyQuery += ' VALUES ()'; + } + + if (this._dialect.supports.returnValues && options.returning) { + if (this._dialect.supports.returnValues.returning) { + valueQuery += ' RETURNING *'; + emptyQuery += ' RETURNING *'; + } else if (this._dialect.supports.returnValues.output) { + outputFragment = ' OUTPUT INSERTED.*'; + + //To capture output rows when there is a trigger on MSSQL DB + if (modelAttributes && options.hasTrigger && this._dialect.supports.tmpTableTrigger) { + + let tmpColumns = ''; + let outputColumns = ''; + + for (const modelKey in modelAttributes) { + const attribute = modelAttributes[modelKey]; + if (!(attribute.type instanceof DataTypes.VIRTUAL)) { + if (tmpColumns.length > 0) { + tmpColumns += ','; + outputColumns += ','; + } + + tmpColumns += `${this.quoteIdentifier(attribute.field)} ${attribute.type.toSql()}`; + outputColumns += `INSERTED.${this.quoteIdentifier(attribute.field)}`; + } + } + + tmpTable = `declare @tmp table (${tmpColumns});`; + outputFragment = ` OUTPUT ${outputColumns} into @tmp`; + const selectFromTmp = ';select * from @tmp'; + + valueQuery += selectFromTmp; + emptyQuery += selectFromTmp; + } + } + } + + if (_.get(this, ['sequelize', 'options', 'dialectOptions', 'prependSearchPath']) || options.searchPath) { + // Not currently supported with search path (requires output of multiple queries) + options.bindParam = false; + } + + if (this._dialect.supports.EXCEPTION && options.exception) { + // Not currently supported with bind parameters (requires output of multiple queries) + options.bindParam = false; + } + + valueHash = Utils.removeNullValuesFromHash(valueHash, this.options.omitNull); + for (const key in valueHash) { + if (Object.prototype.hasOwnProperty.call(valueHash, key)) { + const value = valueHash[key]; + fields.push(this.quoteIdentifier(key)); + + // SERIALS' can't be NULL in postgresql, use DEFAULT where supported + if (modelAttributeMap && modelAttributeMap[key] && modelAttributeMap[key].autoIncrement === true && !value) { + if (!this._dialect.supports.autoIncrement.defaultValue) { + fields.splice(-1, 1); + } else if (this._dialect.supports.DEFAULT) { + values.push('DEFAULT'); + } else { + values.push(this.escape(null)); + } + } else { + if (modelAttributeMap && modelAttributeMap[key] && modelAttributeMap[key].autoIncrement === true) { + identityWrapperRequired = true; + } + + if (value instanceof Utils.SequelizeMethod || options.bindParam === false) { + values.push(this.escape(value, modelAttributeMap && modelAttributeMap[key] || undefined, { context: 'INSERT' })); + } else { + values.push(this.format(value, modelAttributeMap && modelAttributeMap[key] || undefined, { context: 'INSERT' }, bindParam)); + } + } + } + } + + const replacements = { + ignoreDuplicates: options.ignoreDuplicates ? this._dialect.supports.inserts.ignoreDuplicates : '', + onConflictDoNothing: options.ignoreDuplicates ? this._dialect.supports.inserts.onConflictDoNothing : '', + attributes: fields.join(','), + output: outputFragment, + values: values.join(','), + tmpTable + }; + + valueQuery = `${tmpTable}INSERT${replacements.ignoreDuplicates} INTO ${quotedTable} (${replacements.attributes})${replacements.output} VALUES (${replacements.values})${replacements.onConflictDoNothing}${valueQuery}`; + emptyQuery = `${tmpTable}INSERT${replacements.ignoreDuplicates} INTO ${quotedTable}${replacements.output}${replacements.onConflictDoNothing}${emptyQuery}`; + + if (this._dialect.supports.EXCEPTION && options.exception) { + // Mostly for internal use, so we expect the user to know what he's doing! + // pg_temp functions are private per connection, so we never risk this function interfering with another one. + if (semver.gte(this.sequelize.options.databaseVersion, '9.2.0')) { + // >= 9.2 - Use a UUID but prefix with 'func_' (numbers first not allowed) + const delimiter = `$func_${uuidv4().replace(/-/g, '')}$`; + + options.exception = 'WHEN unique_violation THEN GET STACKED DIAGNOSTICS sequelize_caught_exception = PG_EXCEPTION_DETAIL;'; + valueQuery = `${`CREATE OR REPLACE FUNCTION pg_temp.testfunc(OUT response ${quotedTable}, OUT sequelize_caught_exception text) RETURNS RECORD AS ${delimiter}` + + ' BEGIN '}${valueQuery} INTO response; EXCEPTION ${options.exception} END ${delimiter + } LANGUAGE plpgsql; SELECT (testfunc.response).*, testfunc.sequelize_caught_exception FROM pg_temp.testfunc(); DROP FUNCTION IF EXISTS pg_temp.testfunc()`; + } else { + options.exception = 'WHEN unique_violation THEN NULL;'; + valueQuery = `CREATE OR REPLACE FUNCTION pg_temp.testfunc() RETURNS SETOF ${quotedTable} AS $body$ BEGIN RETURN QUERY ${valueQuery}; EXCEPTION ${options.exception} END; $body$ LANGUAGE plpgsql; SELECT * FROM pg_temp.testfunc(); DROP FUNCTION IF EXISTS pg_temp.testfunc();`; + } + } + + if (this._dialect.supports['ON DUPLICATE KEY'] && options.onDuplicate) { + valueQuery += ` ON DUPLICATE KEY ${options.onDuplicate}`; + emptyQuery += ` ON DUPLICATE KEY ${options.onDuplicate}`; + } + + query = `${replacements.attributes.length ? valueQuery : emptyQuery};`; + if (identityWrapperRequired && this._dialect.supports.autoIncrement.identityInsert) { + query = `SET IDENTITY_INSERT ${quotedTable} ON; ${query} SET IDENTITY_INSERT ${quotedTable} OFF;`; + } + + // Used by Postgres upsertQuery and calls to here with options.exception set to true + const result = { query }; + if (options.bindParam !== false) { + result.bind = bind; + } + return result; + } + + /** + * Returns an insert into command for multiple values. + * + * @param {string} tableName + * @param {Object} fieldValueHashes + * @param {Object} options + * @param {Object} fieldMappedAttributes + * + * @private + */ + bulkInsertQuery(tableName, fieldValueHashes, options, fieldMappedAttributes) { + options = options || {}; + fieldMappedAttributes = fieldMappedAttributes || {}; + + const tuples = []; + const serials = {}; + const allAttributes = []; + let onDuplicateKeyUpdate = ''; + + for (const fieldValueHash of fieldValueHashes) { + _.forOwn(fieldValueHash, (value, key) => { + if (!allAttributes.includes(key)) { + allAttributes.push(key); + } + if ( + fieldMappedAttributes[key] + && fieldMappedAttributes[key].autoIncrement === true + ) { + serials[key] = true; + } + }); + } + + for (const fieldValueHash of fieldValueHashes) { + const values = allAttributes.map(key => { + if ( + this._dialect.supports.bulkDefault + && serials[key] === true + ) { + return fieldValueHash[key] || 'DEFAULT'; + } + + return this.escape(fieldValueHash[key], fieldMappedAttributes[key], { context: 'INSERT' }); + }); + + tuples.push(`(${values.join(',')})`); + } + + if (this._dialect.supports.inserts.updateOnDuplicate && options.updateOnDuplicate) { + onDuplicateKeyUpdate = ` ON DUPLICATE KEY UPDATE ${options.updateOnDuplicate.map(attr => { + const key = this.quoteIdentifier(attr); + return `${key}=VALUES(${key})`; + }).join(',')}`; + } + + const ignoreDuplicates = options.ignoreDuplicates ? this._dialect.supports.inserts.ignoreDuplicates : ''; + const attributes = allAttributes.map(attr => this.quoteIdentifier(attr)).join(','); + const returning = this._dialect.supports.returnValues && options.returning ? ' RETURNING *' : ''; + const onConflictDoNothing = options.ignoreDuplicates ? this._dialect.supports.inserts.onConflictDoNothing : ''; + + return `INSERT${ignoreDuplicates} INTO ${this.quoteTable(tableName)} (${attributes}) VALUES ${tuples.join(',')}${onDuplicateKeyUpdate}${onConflictDoNothing}${returning};`; + } + + /** + * Returns an update query + * + * @param {string} tableName + * @param {Object} attrValueHash + * @param {Object} where A hash with conditions (e.g. {name: 'foo'}) OR an ID as integer + * @param {Object} options + * @param {Object} attributes + * + * @private + */ + updateQuery(tableName, attrValueHash, where, options, attributes) { + options = options || {}; + _.defaults(options, this.options); + + attrValueHash = Utils.removeNullValuesFromHash(attrValueHash, options.omitNull, options); + + const values = []; + const bind = []; + const bindParam = options.bindParam === undefined ? this.bindParam(bind) : options.bindParam; + const modelAttributeMap = {}; + let outputFragment =''; + let tmpTable = ''; // tmpTable declaration for trigger + let selectFromTmp = ''; // Select statement for trigger + let suffix = ''; + + if (this._dialect.supports['LIMIT ON UPDATE'] && options.limit) { + if (this.dialect !== 'mssql') { + suffix = ` LIMIT ${this.escape(options.limit)} `; + } + } + + if (this._dialect.supports.returnValues) { + if (this._dialect.supports.returnValues.output) { + // we always need this for mssql + outputFragment = ' OUTPUT INSERTED.*'; + + //To capture output rows when there is a trigger on MSSQL DB + if (attributes && options.hasTrigger && this._dialect.supports.tmpTableTrigger) { + let tmpColumns = ''; + let outputColumns = ''; + + for (const modelKey in attributes) { + const attribute = attributes[modelKey]; + if (!(attribute.type instanceof DataTypes.VIRTUAL)) { + if (tmpColumns.length > 0) { + tmpColumns += ','; + outputColumns += ','; + } + + tmpColumns += `${this.quoteIdentifier(attribute.field)} ${attribute.type.toSql()}`; + outputColumns += `INSERTED.${this.quoteIdentifier(attribute.field)}`; + } + } + + tmpTable = `declare @tmp table (${tmpColumns}); `; + outputFragment = ` OUTPUT ${outputColumns} into @tmp`; + selectFromTmp = ';select * from @tmp'; + + suffix += selectFromTmp; + } + } else if (this._dialect.supports.returnValues && options.returning) { + // ensure that the return output is properly mapped to model fields. + options.mapToModel = true; + suffix += ' RETURNING *'; + } + } + + if (attributes) { + _.each(attributes, (attribute, key) => { + modelAttributeMap[key] = attribute; + if (attribute.field) { + modelAttributeMap[attribute.field] = attribute; + } + }); + } + + for (const key in attrValueHash) { + if (modelAttributeMap && modelAttributeMap[key] && + modelAttributeMap[key].autoIncrement === true && + !this._dialect.supports.autoIncrement.update) { + // not allowed to update identity column + continue; + } + + const value = attrValueHash[key]; + + if (value instanceof Utils.SequelizeMethod || options.bindParam === false) { + values.push(`${this.quoteIdentifier(key)}=${this.escape(value, modelAttributeMap && modelAttributeMap[key] || undefined, { context: 'UPDATE' })}`); + } else { + values.push(`${this.quoteIdentifier(key)}=${this.format(value, modelAttributeMap && modelAttributeMap[key] || undefined, { context: 'UPDATE' }, bindParam)}`); + } + } + + const whereOptions = _.defaults({ bindParam }, options); + + if (values.length === 0) { + return ''; + } + + const query = `${tmpTable}UPDATE ${this.quoteTable(tableName)} SET ${values.join(',')}${outputFragment} ${this.whereQuery(where, whereOptions)}${suffix}`.trim(); + // Used by Postgres upsertQuery and calls to here with options.exception set to true + const result = { query }; + if (options.bindParam !== false) { + result.bind = bind; + } + return result; + } + + /** + * Returns an update query using arithmetic operator + * + * @param {string} operator String with the arithmetic operator (e.g. '+' or '-') + * @param {string} tableName Name of the table + * @param {Object} attrValueHash A hash with attribute-value-pairs + * @param {Object} where A hash with conditions (e.g. {name: 'foo'}) OR an ID as integer + * @param {Object} options + * @param {Object} attributes + */ + arithmeticQuery(operator, tableName, attrValueHash, where, options, attributes) { + options = options || {}; + _.defaults(options, { returning: true }); + + attrValueHash = Utils.removeNullValuesFromHash(attrValueHash, this.options.omitNull); + + const values = []; + let outputFragment = ''; + let returningFragment = ''; + + if (this._dialect.supports.returnValues && options.returning) { + if (this._dialect.supports.returnValues.returning) { + options.mapToModel = true; + returningFragment = 'RETURNING *'; + } else if (this._dialect.supports.returnValues.output) { + outputFragment = ' OUTPUT INSERTED.*'; + } + } + + for (const key in attrValueHash) { + const value = attrValueHash[key]; + values.push(`${this.quoteIdentifier(key)}=${this.quoteIdentifier(key)}${operator} ${this.escape(value)}`); + } + + attributes = attributes || {}; + for (const key in attributes) { + const value = attributes[key]; + values.push(`${this.quoteIdentifier(key)}=${this.escape(value)}`); + } + + return `UPDATE ${this.quoteTable(tableName)} SET ${values.join(',')}${outputFragment} ${this.whereQuery(where)} ${returningFragment}`.trim(); + } + + /* + Returns an add index query. + Parameters: + - tableName -> Name of an existing table, possibly with schema. + - options: + - type: UNIQUE|FULLTEXT|SPATIAL + - name: The name of the index. Default is __ + - fields: An array of attributes as string or as hash. + If the attribute is a hash, it must have the following content: + - name: The name of the attribute/column + - length: An integer. Optional + - order: 'ASC' or 'DESC'. Optional + - parser + - using + - operator + - concurrently: Pass CONCURRENT so other operations run while the index is created + - rawTablename, the name of the table, without schema. Used to create the name of the index + @private + */ + addIndexQuery(tableName, attributes, options, rawTablename) { + options = options || {}; + + if (!Array.isArray(attributes)) { + options = attributes; + attributes = undefined; + } else { + options.fields = attributes; + } + + options.prefix = options.prefix || rawTablename || tableName; + if (options.prefix && typeof options.prefix === 'string') { + options.prefix = options.prefix.replace(/\./g, '_'); + options.prefix = options.prefix.replace(/("|')/g, ''); + } + + const fieldsSql = options.fields.map(field => { + if (typeof field === 'string') { + return this.quoteIdentifier(field); + } + if (field instanceof Utils.SequelizeMethod) { + return this.handleSequelizeMethod(field); + } + let result = ''; + + if (field.attribute) { + field.name = field.attribute; + } + + if (!field.name) { + throw new Error(`The following index field has no name: ${util.inspect(field)}`); + } + + result += this.quoteIdentifier(field.name); + + if (this._dialect.supports.index.collate && field.collate) { + result += ` COLLATE ${this.quoteIdentifier(field.collate)}`; + } + + if (this._dialect.supports.index.length && field.length) { + result += `(${field.length})`; + } + + if (field.order) { + result += ` ${field.order}`; + } + + return result; + }); + + if (!options.name) { + // Mostly for cases where addIndex is called directly by the user without an options object (for example in migrations) + // All calls that go through sequelize should already have a name + options = Utils.nameIndex(options, options.prefix); + } + + options = Model._conformIndex(options); + + if (!this._dialect.supports.index.type) { + delete options.type; + } + + if (options.where) { + options.where = this.whereQuery(options.where); + } + + if (typeof tableName === 'string') { + tableName = this.quoteIdentifiers(tableName); + } else { + tableName = this.quoteTable(tableName); + } + + const concurrently = this._dialect.supports.index.concurrently && options.concurrently ? 'CONCURRENTLY' : undefined; + let ind; + if (this._dialect.supports.indexViaAlter) { + ind = [ + 'ALTER TABLE', + tableName, + concurrently, + 'ADD' + ]; + } else { + ind = ['CREATE']; + } + + ind = ind.concat( + options.unique ? 'UNIQUE' : '', + options.type, 'INDEX', + !this._dialect.supports.indexViaAlter ? concurrently : undefined, + this.quoteIdentifiers(options.name), + this._dialect.supports.index.using === 1 && options.using ? `USING ${options.using}` : '', + !this._dialect.supports.indexViaAlter ? `ON ${tableName}` : undefined, + this._dialect.supports.index.using === 2 && options.using ? `USING ${options.using}` : '', + `(${fieldsSql.join(', ')}${options.operator ? ` ${options.operator}` : ''})`, + this._dialect.supports.index.parser && options.parser ? `WITH PARSER ${options.parser}` : undefined, + this._dialect.supports.index.where && options.where ? options.where : undefined + ); + + return _.compact(ind).join(' '); + } + + addConstraintQuery(tableName, options) { + options = options || {}; + const constraintSnippet = this.getConstraintSnippet(tableName, options); + + if (typeof tableName === 'string') { + tableName = this.quoteIdentifiers(tableName); + } else { + tableName = this.quoteTable(tableName); + } + + return `ALTER TABLE ${tableName} ADD ${constraintSnippet};`; + } + + getConstraintSnippet(tableName, options) { + let constraintSnippet, constraintName; + + const fieldsSql = options.fields.map(field => { + if (typeof field === 'string') { + return this.quoteIdentifier(field); + } + if (field instanceof Utils.SequelizeMethod) { + return this.handleSequelizeMethod(field); + } + if (field.attribute) { + field.name = field.attribute; + } + + if (!field.name) { + throw new Error(`The following index field has no name: ${field}`); + } + + return this.quoteIdentifier(field.name); + }); + + const fieldsSqlQuotedString = fieldsSql.join(', '); + const fieldsSqlString = fieldsSql.join('_'); + + switch (options.type.toUpperCase()) { + case 'UNIQUE': + constraintName = this.quoteIdentifier(options.name || `${tableName}_${fieldsSqlString}_uk`); + constraintSnippet = `CONSTRAINT ${constraintName} UNIQUE (${fieldsSqlQuotedString})`; + break; + case 'CHECK': + options.where = this.whereItemsQuery(options.where); + constraintName = this.quoteIdentifier(options.name || `${tableName}_${fieldsSqlString}_ck`); + constraintSnippet = `CONSTRAINT ${constraintName} CHECK (${options.where})`; + break; + case 'DEFAULT': + if (options.defaultValue === undefined) { + throw new Error('Default value must be specifed for DEFAULT CONSTRAINT'); + } + + if (this._dialect.name !== 'mssql') { + throw new Error('Default constraints are supported only for MSSQL dialect.'); + } + + constraintName = this.quoteIdentifier(options.name || `${tableName}_${fieldsSqlString}_df`); + constraintSnippet = `CONSTRAINT ${constraintName} DEFAULT (${this.escape(options.defaultValue)}) FOR ${fieldsSql[0]}`; + break; + case 'PRIMARY KEY': + constraintName = this.quoteIdentifier(options.name || `${tableName}_${fieldsSqlString}_pk`); + constraintSnippet = `CONSTRAINT ${constraintName} PRIMARY KEY (${fieldsSqlQuotedString})`; + break; + case 'FOREIGN KEY': + const references = options.references; + if (!references || !references.table || !references.field) { + throw new Error('references object with table and field must be specified'); + } + constraintName = this.quoteIdentifier(options.name || `${tableName}_${fieldsSqlString}_${references.table}_fk`); + const referencesSnippet = `${this.quoteTable(references.table)} (${this.quoteIdentifier(references.field)})`; + constraintSnippet = `CONSTRAINT ${constraintName} `; + constraintSnippet += `FOREIGN KEY (${fieldsSqlQuotedString}) REFERENCES ${referencesSnippet}`; + if (options.onUpdate) { + constraintSnippet += ` ON UPDATE ${options.onUpdate.toUpperCase()}`; + } + if (options.onDelete) { + constraintSnippet += ` ON DELETE ${options.onDelete.toUpperCase()}`; + } + break; + default: throw new Error(`${options.type} is invalid.`); + } + return constraintSnippet; + } + + removeConstraintQuery(tableName, constraintName) { + if (typeof tableName === 'string') { + tableName = this.quoteIdentifiers(tableName); + } else { + tableName = this.quoteTable(tableName); + } + + return `ALTER TABLE ${tableName} DROP CONSTRAINT ${this.quoteIdentifiers(constraintName)}`; + } + + /* + Quote an object based on its type. This is a more general version of quoteIdentifiers + Strings: should proxy to quoteIdentifiers + Arrays: + * Expects array in the form: [ (optional), (optional),... String, String (optional)] + Each can be a model, or an object {model: Model, as: String}, matching include, or an + association object, or the name of an association. + * Zero or more models can be included in the array and are used to trace a path through the tree of + included nested associations. This produces the correct table name for the ORDER BY/GROUP BY SQL + and quotes it. + * If a single string is appended to end of array, it is quoted. + If two strings appended, the 1st string is quoted, the 2nd string unquoted. + Objects: + * If raw is set, that value should be returned verbatim, without quoting + * If fn is set, the string should start with the value of fn, starting paren, followed by + the values of cols (which is assumed to be an array), quoted and joined with ', ', + unless they are themselves objects + * If direction is set, should be prepended + + Currently this function is only used for ordering / grouping columns and Sequelize.col(), but it could + potentially also be used for other places where we want to be able to call SQL functions (e.g. as default values) + @private + */ + quote(collection, parent, connector) { + // init + const validOrderOptions = [ + 'ASC', + 'DESC', + 'ASC NULLS LAST', + 'DESC NULLS LAST', + 'ASC NULLS FIRST', + 'DESC NULLS FIRST', + 'NULLS FIRST', + 'NULLS LAST' + ]; + + // default + connector = connector || '.'; + + // just quote as identifiers if string + if (typeof collection === 'string') { + return this.quoteIdentifiers(collection); + } + if (Array.isArray(collection)) { + // iterate through the collection and mutate objects into associations + collection.forEach((item, index) => { + const previous = collection[index - 1]; + let previousAssociation; + let previousModel; + + // set the previous as the parent when previous is undefined or the target of the association + if (!previous && parent !== undefined) { + previousModel = parent; + } else if (previous && previous instanceof Association) { + previousAssociation = previous; + previousModel = previous.target; + } + + // if the previous item is a model, then attempt getting an association + if (previousModel && previousModel.prototype instanceof Model) { + let model; + let as; + + if (typeof item === 'function' && item.prototype instanceof Model) { + // set + model = item; + } else if (_.isPlainObject(item) && item.model && item.model.prototype instanceof Model) { + // set + model = item.model; + as = item.as; + } + + if (model) { + // set the as to either the through name or the model name + if (!as && previousAssociation && previousAssociation instanceof Association && previousAssociation.through && previousAssociation.through.model === model) { + // get from previous association + item = new Association(previousModel, model, { + as: model.name + }); + } else { + // get association from previous model + item = previousModel.getAssociationForAlias(model, as); + + // attempt to use the model name if the item is still null + if (!item) { + item = previousModel.getAssociationForAlias(model, model.name); + } + } + + // make sure we have an association + if (!(item instanceof Association)) { + throw new Error(util.format('Unable to find a valid association for model, \'%s\'', model.name)); + } + } + } + + if (typeof item === 'string') { + // get order index + const orderIndex = validOrderOptions.indexOf(item.toUpperCase()); + + // see if this is an order + if (index > 0 && orderIndex !== -1) { + item = this.sequelize.literal(` ${validOrderOptions[orderIndex]}`); + } else if (previousModel && previousModel.prototype instanceof Model) { + // only go down this path if we have preivous model and check only once + if (previousModel.associations !== undefined && previousModel.associations[item]) { + // convert the item to an association + item = previousModel.associations[item]; + } else if (previousModel.rawAttributes !== undefined && previousModel.rawAttributes[item] && item !== previousModel.rawAttributes[item].field) { + // convert the item attribute from its alias + item = previousModel.rawAttributes[item].field; + } else if ( + item.includes('.') + && previousModel.rawAttributes !== undefined + ) { + const itemSplit = item.split('.'); + + if (previousModel.rawAttributes[itemSplit[0]].type instanceof DataTypes.JSON) { + // just quote identifiers for now + const identifier = this.quoteIdentifiers(`${previousModel.name}.${previousModel.rawAttributes[itemSplit[0]].field}`); + + // get path + const path = itemSplit.slice(1); + + // extract path + item = this.jsonPathExtractionQuery(identifier, path); + + // literal because we don't want to append the model name when string + item = this.sequelize.literal(item); + } + } + } + } + + collection[index] = item; + }, this); + + // loop through array, adding table names of models to quoted + const collectionLength = collection.length; + const tableNames = []; + let item; + let i = 0; + + for (i = 0; i < collectionLength - 1; i++) { + item = collection[i]; + if (typeof item === 'string' || item._modelAttribute || item instanceof Utils.SequelizeMethod) { + break; + } else if (item instanceof Association) { + tableNames[i] = item.as; + } + } + + // start building sql + let sql = ''; + + if (i > 0) { + sql += `${this.quoteIdentifier(tableNames.join(connector))}.`; + } else if (typeof collection[0] === 'string' && parent) { + sql += `${this.quoteIdentifier(parent.name)}.`; + } + + // loop through everything past i and append to the sql + collection.slice(i).forEach(collectionItem => { + sql += this.quote(collectionItem, parent, connector); + }, this); + + return sql; + } + if (collection._modelAttribute) { + return `${this.quoteTable(collection.Model.name)}.${this.quoteIdentifier(collection.fieldName)}`; + } + if (collection instanceof Utils.SequelizeMethod) { + return this.handleSequelizeMethod(collection); + } + if (_.isPlainObject(collection) && collection.raw) { + // simple objects with raw is no longer supported + throw new Error('The `{raw: "..."}` syntax is no longer supported. Use `sequelize.literal` instead.'); + } + throw new Error(`Unknown structure passed to order / group: ${util.inspect(collection)}`); + } + + /** + * Split a list of identifiers by "." and quote each part + * + * @param {string} identifier + * @param {boolean} force + * + * @returns {string} + */ + quoteIdentifier(identifier, force) { + return QuoteHelper.quoteIdentifier(this.dialect, identifier, { + force, + quoteIdentifiers: this.options.quoteIdentifiers + }); + } + + quoteIdentifiers(identifiers) { + if (identifiers.includes('.')) { + identifiers = identifiers.split('.'); + + const head = identifiers.slice(0, identifiers.length - 1).join('.'); + const tail = identifiers[identifiers.length - 1]; + + return `${this.quoteIdentifier(head)}.${this.quoteIdentifier(tail)}`; + } + + return this.quoteIdentifier(identifiers); + } + + quoteAttribute(attribute, model) { + if (model && attribute in model.rawAttributes) { + return this.quoteIdentifier(attribute); + } + return this.quoteIdentifiers(attribute); + } + + /** + * Quote table name with optional alias and schema attribution + * + * @param {string|Object} param table string or object + * @param {string|boolean} alias alias name + * + * @returns {string} + */ + quoteTable(param, alias) { + let table = ''; + + if (alias === true) { + alias = param.as || param.name || param; + } + + if (_.isObject(param)) { + if (this._dialect.supports.schemas) { + if (param.schema) { + table += `${this.quoteIdentifier(param.schema)}.`; + } + + table += this.quoteIdentifier(param.tableName); + } else { + if (param.schema) { + table += param.schema + (param.delimiter || '.'); + } + + table += param.tableName; + table = this.quoteIdentifier(table); + } + } else { + table = this.quoteIdentifier(param); + } + + if (alias) { + table += ` AS ${this.quoteIdentifier(alias)}`; + } + + return table; + } + + /* + Escape a value (e.g. a string, number or date) + @private + */ + escape(value, field, options) { + options = options || {}; + + if (value !== null && value !== undefined) { + if (value instanceof Utils.SequelizeMethod) { + return this.handleSequelizeMethod(value); + } + if (field && field.type) { + this.validate(value, field, options); + + if (field.type.stringify) { + // Users shouldn't have to worry about these args - just give them a function that takes a single arg + const simpleEscape = escVal => SqlString.escape(escVal, this.options.timezone, this.dialect); + + value = field.type.stringify(value, { escape: simpleEscape, field, timezone: this.options.timezone, operation: options.operation }); + + if (field.type.escape === false) { + // The data-type already did the required escaping + return value; + } + } + } + } + + return SqlString.escape(value, this.options.timezone, this.dialect); + } + + bindParam(bind) { + return value => { + bind.push(value); + return `$${bind.length}`; + }; + } + + /* + Returns a bind parameter representation of a value (e.g. a string, number or date) + @private + */ + format(value, field, options, bindParam) { + options = options || {}; + + if (value !== null && value !== undefined) { + if (value instanceof Utils.SequelizeMethod) { + throw new Error('Cannot pass SequelizeMethod as a bind parameter - use escape instead'); + } + if (field && field.type) { + this.validate(value, field, options); + + if (field.type.bindParam) { + return field.type.bindParam(value, { escape: _.identity, field, timezone: this.options.timezone, operation: options.operation, bindParam }); + } + } + } + + return bindParam(value); + } + + /* + Validate a value against a field specification + @private + */ + validate(value, field, options) { + if (this.typeValidation && field.type.validate && value) { + try { + if (options.isList && Array.isArray(value)) { + for (const item of value) { + field.type.validate(item, options); + } + } else { + field.type.validate(value, options); + } + } catch (error) { + if (error instanceof sequelizeError.ValidationError) { + error.errors.push(new sequelizeError.ValidationErrorItem( + error.message, + 'Validation error', + field.fieldName, + value, + null, + `${field.type.key} validator` + )); + } + + throw error; + } + } + } + + isIdentifierQuoted(identifier) { + return QuoteHelper.isIdentifierQuoted(identifier); + } + + /** + * Generates an SQL query that extract JSON property of given path. + * + * @param {string} column The JSON column + * @param {string|Array} [path] The path to extract (optional) + * @returns {string} The generated sql query + * @private + */ + jsonPathExtractionQuery(column, path) { + let paths = _.toPath(path); + let pathStr; + const quotedColumn = this.isIdentifierQuoted(column) + ? column + : this.quoteIdentifier(column); + + switch (this.dialect) { + case 'mysql': + /** + * Sub paths need to be quoted as ECMAScript identifiers + * https://bugs.mysql.com/bug.php?id=81896 + */ + paths = paths.map(subPath => Utils.addTicks(subPath, '"')); + pathStr = this.escape(['$'].concat(paths).join('.')); + return `(${quotedColumn}->>${pathStr})`; + + case 'mariadb': + pathStr = this.escape(['$'].concat(paths).join('.')); + return `json_unquote(json_extract(${quotedColumn},${pathStr}))`; + + case 'sqlite': + pathStr = this.escape(['$'] + .concat(paths) + .join('.') + .replace(/\.(\d+)(?:(?=\.)|$)/g, (_, digit) => `[${digit}]`)); + return `json_extract(${quotedColumn}, ${pathStr})`; + + case 'postgres': + pathStr = this.escape(`{${paths.join(',')}}`); + return `(${quotedColumn}#>>${pathStr})`; + + default: + throw new Error(`Unsupported ${this.dialect} for JSON operations`); + } + } + + /* + Returns a query for selecting elements in the table . + Options: + - attributes -> An array of attributes (e.g. ['name', 'birthday']). Default: * + - where -> A hash with conditions (e.g. {name: 'foo'}) + OR an ID as integer + - order -> e.g. 'id DESC' + - group + - limit -> The maximum count you want to get. + - offset -> An offset value to start from. Only useable with limit! + @private + */ + selectQuery(tableName, options, model) { + options = options || {}; + const limit = options.limit; + const mainQueryItems = []; + const subQueryItems = []; + const subQuery = options.subQuery === undefined ? limit && options.hasMultiAssociation : options.subQuery; + const attributes = { + main: options.attributes && options.attributes.slice(), + subQuery: null + }; + const mainTable = { + name: tableName, + quotedName: null, + as: null, + model + }; + const topLevelInfo = { + names: mainTable, + options, + subQuery + }; + let mainJoinQueries = []; + let subJoinQueries = []; + let query; + + // resolve table name options + if (options.tableAs) { + mainTable.as = this.quoteIdentifier(options.tableAs); + } else if (!Array.isArray(mainTable.name) && mainTable.model) { + mainTable.as = this.quoteIdentifier(mainTable.model.name); + } + + mainTable.quotedName = !Array.isArray(mainTable.name) ? this.quoteTable(mainTable.name) : tableName.map(t => { + return Array.isArray(t) ? this.quoteTable(t[0], t[1]) : this.quoteTable(t, true); + }).join(', '); + + if (subQuery && attributes.main) { + for (const keyAtt of mainTable.model.primaryKeyAttributes) { + // Check if mainAttributes contain the primary key of the model either as a field or an aliased field + if (!attributes.main.some(attr => keyAtt === attr || keyAtt === attr[0] || keyAtt === attr[1])) { + attributes.main.push(mainTable.model.rawAttributes[keyAtt].field ? [keyAtt, mainTable.model.rawAttributes[keyAtt].field] : keyAtt); + } + } + } + + attributes.main = this.escapeAttributes(attributes.main, options, mainTable.as); + attributes.main = attributes.main || (options.include ? [`${mainTable.as}.*`] : ['*']); + + // If subquery, we add the mainAttributes to the subQuery and set the mainAttributes to select * from subquery + if (subQuery || options.groupedLimit) { + // We need primary keys + attributes.subQuery = attributes.main; + attributes.main = [`${mainTable.as || mainTable.quotedName}.*`]; + } + + if (options.include) { + for (const include of options.include) { + if (include.separate) { + continue; + } + const joinQueries = this.generateInclude(include, { externalAs: mainTable.as, internalAs: mainTable.as }, topLevelInfo); + + subJoinQueries = subJoinQueries.concat(joinQueries.subQuery); + mainJoinQueries = mainJoinQueries.concat(joinQueries.mainQuery); + + if (joinQueries.attributes.main.length > 0) { + attributes.main = attributes.main.concat(joinQueries.attributes.main); + } + if (joinQueries.attributes.subQuery.length > 0) { + attributes.subQuery = attributes.subQuery.concat(joinQueries.attributes.subQuery); + } + } + } + + if (subQuery) { + subQueryItems.push(this.selectFromTableFragment(options, mainTable.model, attributes.subQuery, mainTable.quotedName, mainTable.as)); + subQueryItems.push(subJoinQueries.join('')); + } else { + if (options.groupedLimit) { + if (!mainTable.as) { + mainTable.as = mainTable.quotedName; + } + const where = Object.assign({}, options.where); + let groupedLimitOrder, + whereKey, + include, + groupedTableName = mainTable.as; + + if (typeof options.groupedLimit.on === 'string') { + whereKey = options.groupedLimit.on; + } else if (options.groupedLimit.on instanceof HasMany) { + whereKey = options.groupedLimit.on.foreignKeyField; + } + + if (options.groupedLimit.on instanceof BelongsToMany) { + // BTM includes needs to join the through table on to check ID + groupedTableName = options.groupedLimit.on.manyFromSource.as; + const groupedLimitOptions = Model._validateIncludedElements({ + include: [{ + association: options.groupedLimit.on.manyFromSource, + duplicating: false, // The UNION'ed query may contain duplicates, but each sub-query cannot + required: true, + where: Object.assign({ + [Op.placeholder]: true + }, options.groupedLimit.through && options.groupedLimit.through.where) + }], + model + }); + + // Make sure attributes from the join table are mapped back to models + options.hasJoin = true; + options.hasMultiAssociation = true; + options.includeMap = Object.assign(groupedLimitOptions.includeMap, options.includeMap); + options.includeNames = groupedLimitOptions.includeNames.concat(options.includeNames || []); + include = groupedLimitOptions.include; + + if (Array.isArray(options.order)) { + // We need to make sure the order by attributes are available to the parent query + options.order.forEach((order, i) => { + if (Array.isArray(order)) { + order = order[0]; + } + + let alias = `subquery_order_${i}`; + options.attributes.push([order, alias]); + + // We don't want to prepend model name when we alias the attributes, so quote them here + alias = this.sequelize.literal(this.quote(alias)); + + if (Array.isArray(options.order[i])) { + options.order[i][0] = alias; + } else { + options.order[i] = alias; + } + }); + groupedLimitOrder = options.order; + } + } else { + // Ordering is handled by the subqueries, so ordering the UNION'ed result is not needed + groupedLimitOrder = options.order; + delete options.order; + where[Op.placeholder] = true; + } + + // Caching the base query and splicing the where part into it is consistently > twice + // as fast than generating from scratch each time for values.length >= 5 + const baseQuery = `SELECT * FROM (${this.selectQuery( + tableName, + { + attributes: options.attributes, + offset: options.offset, + limit: options.groupedLimit.limit, + order: groupedLimitOrder, + where, + include, + model + }, + model + ).replace(/;$/, '') }) AS sub`; // Every derived table must have its own alias + const placeHolder = this.whereItemQuery(Op.placeholder, true, { model }); + const splicePos = baseQuery.indexOf(placeHolder); + + mainQueryItems.push(this.selectFromTableFragment(options, mainTable.model, attributes.main, `(${ + options.groupedLimit.values.map(value => { + let groupWhere; + if (whereKey) { + groupWhere = { + [whereKey]: value + }; + } + if (include) { + groupWhere = { + [options.groupedLimit.on.foreignIdentifierField]: value + }; + } + + return Utils.spliceStr(baseQuery, splicePos, placeHolder.length, this.getWhereConditions(groupWhere, groupedTableName)); + }).join( + this._dialect.supports['UNION ALL'] ? ' UNION ALL ' : ' UNION ' + ) + })`, mainTable.as)); + } else { + mainQueryItems.push(this.selectFromTableFragment(options, mainTable.model, attributes.main, mainTable.quotedName, mainTable.as)); + } + + mainQueryItems.push(mainJoinQueries.join('')); + } + + // Add WHERE to sub or main query + if (Object.prototype.hasOwnProperty.call(options, 'where') && !options.groupedLimit) { + options.where = this.getWhereConditions(options.where, mainTable.as || tableName, model, options); + if (options.where) { + if (subQuery) { + subQueryItems.push(` WHERE ${options.where}`); + } else { + mainQueryItems.push(` WHERE ${options.where}`); + // Walk the main query to update all selects + mainQueryItems.forEach((value, key) => { + if (value.startsWith('SELECT')) { + mainQueryItems[key] = this.selectFromTableFragment(options, model, attributes.main, mainTable.quotedName, mainTable.as, options.where); + } + }); + } + } + } + + // Add GROUP BY to sub or main query + if (options.group) { + options.group = Array.isArray(options.group) ? options.group.map(t => this.quote(t, model)).join(', ') : this.quote(options.group, model); + if (subQuery) { + subQueryItems.push(` GROUP BY ${options.group}`); + } else { + mainQueryItems.push(` GROUP BY ${options.group}`); + } + } + + // Add HAVING to sub or main query + if (Object.prototype.hasOwnProperty.call(options, 'having')) { + options.having = this.getWhereConditions(options.having, tableName, model, options, false); + if (options.having) { + if (subQuery) { + subQueryItems.push(` HAVING ${options.having}`); + } else { + mainQueryItems.push(` HAVING ${options.having}`); + } + } + } + + // Add ORDER to sub or main query + if (options.order) { + const orders = this.getQueryOrders(options, model, subQuery); + if (orders.mainQueryOrder.length) { + mainQueryItems.push(` ORDER BY ${orders.mainQueryOrder.join(', ')}`); + } + if (orders.subQueryOrder.length) { + subQueryItems.push(` ORDER BY ${orders.subQueryOrder.join(', ')}`); + } + } + + // Add LIMIT, OFFSET to sub or main query + const limitOrder = this.addLimitAndOffset(options, mainTable.model); + if (limitOrder && !options.groupedLimit) { + if (subQuery) { + subQueryItems.push(limitOrder); + } else { + mainQueryItems.push(limitOrder); + } + } + + if (subQuery) { + query = `SELECT ${attributes.main.join(', ')} FROM (${subQueryItems.join('')}) AS ${mainTable.as}${mainJoinQueries.join('')}${mainQueryItems.join('')}`; + } else { + query = mainQueryItems.join(''); + } + + if (options.lock && this._dialect.supports.lock) { + let lock = options.lock; + if (typeof options.lock === 'object') { + lock = options.lock.level; + } + if (this._dialect.supports.lockKey && (lock === 'KEY SHARE' || lock === 'NO KEY UPDATE')) { + query += ` FOR ${lock}`; + } else if (lock === 'SHARE') { + query += ` ${this._dialect.supports.forShare}`; + } else { + query += ' FOR UPDATE'; + } + if (this._dialect.supports.lockOf && options.lock.of && options.lock.of.prototype instanceof Model) { + query += ` OF ${this.quoteTable(options.lock.of.name)}`; + } + if (this._dialect.supports.skipLocked && options.skipLocked) { + query += ' SKIP LOCKED'; + } + } + + return `${query};`; + } + + escapeAttributes(attributes, options, mainTableAs) { + return attributes && attributes.map(attr => { + let addTable = true; + + if (attr instanceof Utils.SequelizeMethod) { + return this.handleSequelizeMethod(attr); + } + if (Array.isArray(attr)) { + if (attr.length !== 2) { + throw new Error(`${JSON.stringify(attr)} is not a valid attribute definition. Please use the following format: ['attribute definition', 'alias']`); + } + attr = attr.slice(); + + if (attr[0] instanceof Utils.SequelizeMethod) { + attr[0] = this.handleSequelizeMethod(attr[0]); + addTable = false; + } else if (!attr[0].includes('(') && !attr[0].includes(')')) { + attr[0] = this.quoteIdentifier(attr[0]); + } else { + deprecations.noRawAttributes(); + } + attr = [attr[0], this.quoteIdentifier(attr[1])].join(' AS '); + } else { + attr = !attr.includes(Utils.TICK_CHAR) && !attr.includes('"') + ? this.quoteAttribute(attr, options.model) + : this.escape(attr); + } + if (!_.isEmpty(options.include) && !attr.includes('.') && addTable) { + attr = `${mainTableAs}.${attr}`; + } + + return attr; + }); + } + + generateInclude(include, parentTableName, topLevelInfo) { + const joinQueries = { + mainQuery: [], + subQuery: [] + }; + const mainChildIncludes = []; + const subChildIncludes = []; + let requiredMismatch = false; + const includeAs = { + internalAs: include.as, + externalAs: include.as + }; + const attributes = { + main: [], + subQuery: [] + }; + let joinQuery; + + topLevelInfo.options.keysEscaped = true; + + if (topLevelInfo.names.name !== parentTableName.externalAs && topLevelInfo.names.as !== parentTableName.externalAs) { + includeAs.internalAs = `${parentTableName.internalAs}->${include.as}`; + includeAs.externalAs = `${parentTableName.externalAs}.${include.as}`; + } + + // includeIgnoreAttributes is used by aggregate functions + if (topLevelInfo.options.includeIgnoreAttributes !== false) { + include.model._expandAttributes(include); + Utils.mapOptionFieldNames(include, include.model); + + const includeAttributes = include.attributes.map(attr => { + let attrAs = attr; + let verbatim = false; + + if (Array.isArray(attr) && attr.length === 2) { + if (attr[0] instanceof Utils.SequelizeMethod && ( + attr[0] instanceof Utils.Literal || + attr[0] instanceof Utils.Cast || + attr[0] instanceof Utils.Fn + )) { + verbatim = true; + } + + attr = attr.map(attr => attr instanceof Utils.SequelizeMethod ? this.handleSequelizeMethod(attr) : attr); + + attrAs = attr[1]; + attr = attr[0]; + } + if (attr instanceof Utils.Literal) { + return attr.val; // We trust the user to rename the field correctly + } + if (attr instanceof Utils.Cast || attr instanceof Utils.Fn) { + throw new Error( + 'Tried to select attributes using Sequelize.cast or Sequelize.fn without specifying an alias for the result, during eager loading. ' + + 'This means the attribute will not be added to the returned instance' + ); + } + + let prefix; + if (verbatim === true) { + prefix = attr; + } else if (/#>>|->>/.test(attr)) { + prefix = `(${this.quoteIdentifier(includeAs.internalAs)}.${attr.replace(/\(|\)/g, '')})`; + } else if (/json_extract\(/.test(attr)) { + prefix = attr.replace(/json_extract\(/i, `json_extract(${this.quoteIdentifier(includeAs.internalAs)}.`); + } else { + prefix = `${this.quoteIdentifier(includeAs.internalAs)}.${this.quoteIdentifier(attr)}`; + } + return `${prefix} AS ${this.quoteIdentifier(`${includeAs.externalAs}.${attrAs}`, true)}`; + }); + if (include.subQuery && topLevelInfo.subQuery) { + for (const attr of includeAttributes) { + attributes.subQuery.push(attr); + } + } else { + for (const attr of includeAttributes) { + attributes.main.push(attr); + } + } + } + + //through + if (include.through) { + joinQuery = this.generateThroughJoin(include, includeAs, parentTableName.internalAs, topLevelInfo); + } else { + this._generateSubQueryFilter(include, includeAs, topLevelInfo); + joinQuery = this.generateJoin(include, topLevelInfo); + } + + // handle possible new attributes created in join + if (joinQuery.attributes.main.length > 0) { + attributes.main = attributes.main.concat(joinQuery.attributes.main); + } + + if (joinQuery.attributes.subQuery.length > 0) { + attributes.subQuery = attributes.subQuery.concat(joinQuery.attributes.subQuery); + } + + if (include.include) { + for (const childInclude of include.include) { + if (childInclude.separate || childInclude._pseudo) { + continue; + } + + const childJoinQueries = this.generateInclude(childInclude, includeAs, topLevelInfo); + + if (include.required === false && childInclude.required === true) { + requiredMismatch = true; + } + // if the child is a sub query we just give it to the + if (childInclude.subQuery && topLevelInfo.subQuery) { + subChildIncludes.push(childJoinQueries.subQuery); + } + if (childJoinQueries.mainQuery) { + mainChildIncludes.push(childJoinQueries.mainQuery); + } + if (childJoinQueries.attributes.main.length > 0) { + attributes.main = attributes.main.concat(childJoinQueries.attributes.main); + } + if (childJoinQueries.attributes.subQuery.length > 0) { + attributes.subQuery = attributes.subQuery.concat(childJoinQueries.attributes.subQuery); + } + } + } + + if (include.subQuery && topLevelInfo.subQuery) { + if (requiredMismatch && subChildIncludes.length > 0) { + joinQueries.subQuery.push(` ${joinQuery.join} ( ${joinQuery.body}${subChildIncludes.join('')} ) ON ${joinQuery.condition}`); + } else { + joinQueries.subQuery.push(` ${joinQuery.join} ${joinQuery.body} ON ${joinQuery.condition}`); + if (subChildIncludes.length > 0) { + joinQueries.subQuery.push(subChildIncludes.join('')); + } + } + joinQueries.mainQuery.push(mainChildIncludes.join('')); + } else { + if (requiredMismatch && mainChildIncludes.length > 0) { + joinQueries.mainQuery.push(` ${joinQuery.join} ( ${joinQuery.body}${mainChildIncludes.join('')} ) ON ${joinQuery.condition}`); + } else { + joinQueries.mainQuery.push(` ${joinQuery.join} ${joinQuery.body} ON ${joinQuery.condition}`); + if (mainChildIncludes.length > 0) { + joinQueries.mainQuery.push(mainChildIncludes.join('')); + } + } + joinQueries.subQuery.push(subChildIncludes.join('')); + } + + return { + mainQuery: joinQueries.mainQuery.join(''), + subQuery: joinQueries.subQuery.join(''), + attributes + }; + } + + generateJoin(include, topLevelInfo) { + const association = include.association; + const parent = include.parent; + const parentIsTop = !!parent && !include.parent.association && include.parent.model.name === topLevelInfo.options.model.name; + let $parent; + let joinWhere; + /* Attributes for the left side */ + const left = association.source; + const attrLeft = association instanceof BelongsTo ? + association.identifier : + association.sourceKeyAttribute || left.primaryKeyAttribute; + const fieldLeft = association instanceof BelongsTo ? + association.identifierField : + left.rawAttributes[association.sourceKeyAttribute || left.primaryKeyAttribute].field; + let asLeft; + /* Attributes for the right side */ + const right = include.model; + const tableRight = right.getTableName(); + const fieldRight = association instanceof BelongsTo ? + right.rawAttributes[association.targetIdentifier || right.primaryKeyAttribute].field : + association.identifierField; + let asRight = include.as; + + while (($parent = $parent && $parent.parent || include.parent) && $parent.association) { + if (asLeft) { + asLeft = `${$parent.as}->${asLeft}`; + } else { + asLeft = $parent.as; + } + } + + if (!asLeft) asLeft = parent.as || parent.model.name; + else asRight = `${asLeft}->${asRight}`; + + let joinOn = `${this.quoteTable(asLeft)}.${this.quoteIdentifier(fieldLeft)}`; + + if (topLevelInfo.options.groupedLimit && parentIsTop || topLevelInfo.subQuery && include.parent.subQuery && !include.subQuery) { + if (parentIsTop) { + // The main model attributes is not aliased to a prefix + joinOn = `${this.quoteTable(parent.as || parent.model.name)}.${this.quoteIdentifier(attrLeft)}`; + } else { + joinOn = this.quoteIdentifier(`${asLeft.replace(/->/g, '.')}.${attrLeft}`); + } + } + + joinOn += ` = ${this.quoteIdentifier(asRight)}.${this.quoteIdentifier(fieldRight)}`; + + if (include.on) { + joinOn = this.whereItemsQuery(include.on, { + prefix: this.sequelize.literal(this.quoteIdentifier(asRight)), + model: include.model + }); + } + + if (include.where) { + joinWhere = this.whereItemsQuery(include.where, { + prefix: this.sequelize.literal(this.quoteIdentifier(asRight)), + model: include.model + }); + if (joinWhere) { + if (include.or) { + joinOn += ` OR ${joinWhere}`; + } else { + joinOn += ` AND ${joinWhere}`; + } + } + } + + return { + join: include.required ? 'INNER JOIN' : 'LEFT OUTER JOIN', + body: this.quoteTable(tableRight, asRight), + condition: joinOn, + attributes: { + main: [], + subQuery: [] + } + }; + } + + generateThroughJoin(include, includeAs, parentTableName, topLevelInfo) { + const through = include.through; + const throughTable = through.model.getTableName(); + const throughAs = `${includeAs.internalAs}->${through.as}`; + const externalThroughAs = `${includeAs.externalAs}.${through.as}`; + const throughAttributes = through.attributes.map(attr => + `${this.quoteIdentifier(throughAs)}.${this.quoteIdentifier(Array.isArray(attr) ? attr[0] : attr) + } AS ${ + this.quoteIdentifier(`${externalThroughAs}.${Array.isArray(attr) ? attr[1] : attr}`)}` + ); + const association = include.association; + const parentIsTop = !include.parent.association && include.parent.model.name === topLevelInfo.options.model.name; + const primaryKeysSource = association.source.primaryKeyAttributes; + const tableSource = parentTableName; + const identSource = association.identifierField; + const primaryKeysTarget = association.target.primaryKeyAttributes; + const tableTarget = includeAs.internalAs; + const identTarget = association.foreignIdentifierField; + const attrTarget = association.target.rawAttributes[primaryKeysTarget[0]].field || primaryKeysTarget[0]; + + const joinType = include.required ? 'INNER JOIN' : 'LEFT OUTER JOIN'; + let joinBody; + let joinCondition; + const attributes = { + main: [], + subQuery: [] + }; + let attrSource = primaryKeysSource[0]; + let sourceJoinOn; + let targetJoinOn; + let throughWhere; + let targetWhere; + + if (topLevelInfo.options.includeIgnoreAttributes !== false) { + // Through includes are always hasMany, so we need to add the attributes to the mainAttributes no matter what (Real join will never be executed in subquery) + for (const attr of throughAttributes) { + attributes.main.push(attr); + } + } + + // Figure out if we need to use field or attribute + if (!topLevelInfo.subQuery) { + attrSource = association.source.rawAttributes[primaryKeysSource[0]].field; + } + if (topLevelInfo.subQuery && !include.subQuery && !include.parent.subQuery && include.parent.model !== topLevelInfo.options.mainModel) { + attrSource = association.source.rawAttributes[primaryKeysSource[0]].field; + } + + // Filter statement for left side of through + // Used by both join and subquery where + // If parent include was in a subquery need to join on the aliased attribute + if (topLevelInfo.subQuery && !include.subQuery && include.parent.subQuery && !parentIsTop) { + sourceJoinOn = `${this.quoteIdentifier(`${tableSource}.${attrSource}`)} = `; + } else { + sourceJoinOn = `${this.quoteTable(tableSource)}.${this.quoteIdentifier(attrSource)} = `; + } + sourceJoinOn += `${this.quoteIdentifier(throughAs)}.${this.quoteIdentifier(identSource)}`; + + // Filter statement for right side of through + // Used by both join and subquery where + targetJoinOn = `${this.quoteIdentifier(tableTarget)}.${this.quoteIdentifier(attrTarget)} = `; + targetJoinOn += `${this.quoteIdentifier(throughAs)}.${this.quoteIdentifier(identTarget)}`; + + if (through.where) { + throughWhere = this.getWhereConditions(through.where, this.sequelize.literal(this.quoteIdentifier(throughAs)), through.model); + } + + if (this._dialect.supports.joinTableDependent) { + // Generate a wrapped join so that the through table join can be dependent on the target join + joinBody = `( ${this.quoteTable(throughTable, throughAs)} INNER JOIN ${this.quoteTable(include.model.getTableName(), includeAs.internalAs)} ON ${targetJoinOn}`; + if (throughWhere) { + joinBody += ` AND ${throughWhere}`; + } + joinBody += ')'; + joinCondition = sourceJoinOn; + } else { + // Generate join SQL for left side of through + joinBody = `${this.quoteTable(throughTable, throughAs)} ON ${sourceJoinOn} ${joinType} ${this.quoteTable(include.model.getTableName(), includeAs.internalAs)}`; + joinCondition = targetJoinOn; + if (throughWhere) { + joinCondition += ` AND ${throughWhere}`; + } + } + + if (include.where || include.through.where) { + if (include.where) { + targetWhere = this.getWhereConditions(include.where, this.sequelize.literal(this.quoteIdentifier(includeAs.internalAs)), include.model, topLevelInfo.options); + if (targetWhere) { + joinCondition += ` AND ${targetWhere}`; + } + } + } + + this._generateSubQueryFilter(include, includeAs, topLevelInfo); + + return { + join: joinType, + body: joinBody, + condition: joinCondition, + attributes + }; + } + + /* + * Generates subQueryFilter - a select nested in the where clause of the subQuery. + * For a given include a query is generated that contains all the way from the subQuery + * table to the include table plus everything that's in required transitive closure of the + * given include. + */ + _generateSubQueryFilter(include, includeAs, topLevelInfo) { + if (!topLevelInfo.subQuery || !include.subQueryFilter) { + return; + } + + if (!topLevelInfo.options.where) { + topLevelInfo.options.where = {}; + } + let parent = include; + let child = include; + let nestedIncludes = this._getRequiredClosure(include).include; + let query; + + while ((parent = parent.parent)) { // eslint-disable-line + if (parent.parent && !parent.required) { + return; // only generate subQueryFilter if all the parents of this include are required + } + + if (parent.subQueryFilter) { + // the include is already handled as this parent has the include on its required closure + // skip to prevent duplicate subQueryFilter + return; + } + + nestedIncludes = [Object.assign({}, child, { include: nestedIncludes, attributes: [] })]; + child = parent; + } + + const topInclude = nestedIncludes[0]; + const topParent = topInclude.parent; + const topAssociation = topInclude.association; + topInclude.association = undefined; + + if (topInclude.through && Object(topInclude.through.model) === topInclude.through.model) { + query = this.selectQuery(topInclude.through.model.getTableName(), { + attributes: [topInclude.through.model.primaryKeyField], + include: Model._validateIncludedElements({ + model: topInclude.through.model, + include: [{ + association: topAssociation.toTarget, + required: true, + where: topInclude.where, + include: topInclude.include + }] + }).include, + model: topInclude.through.model, + where: { + [Op.and]: [ + this.sequelize.literal([ + `${this.quoteTable(topParent.model.name)}.${this.quoteIdentifier(topParent.model.primaryKeyField)}`, + `${this.quoteIdentifier(topInclude.through.model.name)}.${this.quoteIdentifier(topAssociation.identifierField)}` + ].join(' = ')), + topInclude.through.where + ] + }, + limit: 1, + includeIgnoreAttributes: false + }, topInclude.through.model); + } else { + const isBelongsTo = topAssociation.associationType === 'BelongsTo'; + const sourceField = isBelongsTo ? topAssociation.identifierField : topAssociation.sourceKeyField || topParent.model.primaryKeyField; + const targetField = isBelongsTo ? topAssociation.sourceKeyField || topInclude.model.primaryKeyField : topAssociation.identifierField; + + const join = [ + `${this.quoteIdentifier(topInclude.as)}.${this.quoteIdentifier(targetField)}`, + `${this.quoteTable(topParent.as || topParent.model.name)}.${this.quoteIdentifier(sourceField)}` + ].join(' = '); + + query = this.selectQuery(topInclude.model.getTableName(), { + attributes: [targetField], + include: Model._validateIncludedElements(topInclude).include, + model: topInclude.model, + where: { + [Op.and]: [ + topInclude.where, + { [Op.join]: this.sequelize.literal(join) } + ] + }, + limit: 1, + tableAs: topInclude.as, + includeIgnoreAttributes: false + }, topInclude.model); + } + + if (!topLevelInfo.options.where[Op.and]) { + topLevelInfo.options.where[Op.and] = []; + } + + topLevelInfo.options.where[`__${includeAs.internalAs}`] = this.sequelize.literal([ + '(', + query.replace(/;$/, ''), + ')', + 'IS NOT NULL' + ].join(' ')); + } + + /* + * For a given include hierarchy creates a copy of it where only the required includes + * are preserved. + */ + _getRequiredClosure(include) { + const copy = Object.assign({}, include, { attributes: [], include: [] }); + + if (Array.isArray(include.include)) { + copy.include = include.include + .filter(i => i.required) + .map(inc => this._getRequiredClosure(inc)); + } + + return copy; + } + + getQueryOrders(options, model, subQuery) { + const mainQueryOrder = []; + const subQueryOrder = []; + + if (Array.isArray(options.order)) { + for (let order of options.order) { + // wrap if not array + if (!Array.isArray(order)) { + order = [order]; + } + + if ( + subQuery + && Array.isArray(order) + && order[0] + && !(order[0] instanceof Association) + && !(typeof order[0] === 'function' && order[0].prototype instanceof Model) + && !(typeof order[0].model === 'function' && order[0].model.prototype instanceof Model) + && !(typeof order[0] === 'string' && model && model.associations !== undefined && model.associations[order[0]]) + ) { + subQueryOrder.push(this.quote(order, model, '->')); + } + + if (subQuery) { + // Handle case where sub-query renames attribute we want to order by, + // see https://github.com/sequelize/sequelize/issues/8739 + const subQueryAttribute = options.attributes.find(a => Array.isArray(a) && a[0] === order[0] && a[1]); + if (subQueryAttribute) { + order[0] = new Utils.Col(subQueryAttribute[1]); + } + } + + mainQueryOrder.push(this.quote(order, model, '->')); + } + } else if (options.order instanceof Utils.SequelizeMethod) { + const sql = this.quote(options.order, model, '->'); + if (subQuery) { + subQueryOrder.push(sql); + } + mainQueryOrder.push(sql); + } else { + throw new Error('Order must be type of array or instance of a valid sequelize method.'); + } + + return { mainQueryOrder, subQueryOrder }; + } + + selectFromTableFragment(options, model, attributes, tables, mainTableAs) { + let fragment = `SELECT ${attributes.join(', ')} FROM ${tables}`; + + if (mainTableAs) { + fragment += ` AS ${mainTableAs}`; + } + + if (options.indexHints && this._dialect.supports.indexHints) { + for (const hint of options.indexHints) { + if (IndexHints[hint.type]) { + fragment += ` ${IndexHints[hint.type]} INDEX (${hint.values.map(indexName => this.quoteIdentifiers(indexName)).join(',')})`; + } + } + } + + return fragment; + } + + /** + * Returns an SQL fragment for adding result constraints. + * + * @param {Object} options An object with selectQuery options. + * @returns {string} The generated sql query. + * @private + */ + addLimitAndOffset(options) { + let fragment = ''; + + /* eslint-disable */ + if (options.offset != null && options.limit == null) { + fragment += ' LIMIT ' + this.escape(options.offset) + ', ' + 10000000000000; + } else if (options.limit != null) { + if (options.offset != null) { + fragment += ' LIMIT ' + this.escape(options.offset) + ', ' + this.escape(options.limit); + } else { + fragment += ' LIMIT ' + this.escape(options.limit); + } + } + /* eslint-enable */ + + return fragment; + } + + handleSequelizeMethod(smth, tableName, factory, options, prepend) { + let result; + + if (Object.prototype.hasOwnProperty.call(this.OperatorMap, smth.comparator)) { + smth.comparator = this.OperatorMap[smth.comparator]; + } + + if (smth instanceof Utils.Where) { + let value = smth.logic; + let key; + + if (smth.attribute instanceof Utils.SequelizeMethod) { + key = this.getWhereConditions(smth.attribute, tableName, factory, options, prepend); + } else { + key = `${this.quoteTable(smth.attribute.Model.name)}.${this.quoteIdentifier(smth.attribute.field || smth.attribute.fieldName)}`; + } + + if (value && value instanceof Utils.SequelizeMethod) { + value = this.getWhereConditions(value, tableName, factory, options, prepend); + + return value === 'NULL' ? `${key} IS NULL` : [key, value].join(` ${smth.comparator} `); + } + if (_.isPlainObject(value)) { + return this.whereItemQuery(smth.attribute, value, { + model: factory + }); + } + if (typeof value === 'boolean') { + value = this.booleanValue(value); + } else { + value = this.escape(value); + } + + return value === 'NULL' ? `${key} IS NULL` : [key, value].join(` ${smth.comparator} `); + } + if (smth instanceof Utils.Literal) { + return smth.val; + } + if (smth instanceof Utils.Cast) { + if (smth.val instanceof Utils.SequelizeMethod) { + result = this.handleSequelizeMethod(smth.val, tableName, factory, options, prepend); + } else if (_.isPlainObject(smth.val)) { + result = this.whereItemsQuery(smth.val); + } else { + result = this.escape(smth.val); + } + + return `CAST(${result} AS ${smth.type.toUpperCase()})`; + } + if (smth instanceof Utils.Fn) { + return `${smth.fn}(${smth.args.map(arg => { + if (arg instanceof Utils.SequelizeMethod) { + return this.handleSequelizeMethod(arg, tableName, factory, options, prepend); + } + if (_.isPlainObject(arg)) { + return this.whereItemsQuery(arg); + } + return this.escape(arg); + }).join(', ') })`; + } + if (smth instanceof Utils.Col) { + if (Array.isArray(smth.col) && !factory) { + throw new Error('Cannot call Sequelize.col() with array outside of order / group clause'); + } + if (smth.col.startsWith('*')) { + return '*'; + } + return this.quote(smth.col, factory); + } + return smth.toString(this, factory); + } + + whereQuery(where, options) { + const query = this.whereItemsQuery(where, options); + if (query && query.length) { + return `WHERE ${query}`; + } + return ''; + } + + whereItemsQuery(where, options, binding) { + if ( + where === null || + where === undefined || + Utils.getComplexSize(where) === 0 + ) { + // NO OP + return ''; + } + + if (typeof where === 'string') { + throw new Error('Support for `{where: \'raw query\'}` has been removed.'); + } + + const items = []; + + binding = binding || 'AND'; + if (binding[0] !== ' ') binding = ` ${binding} `; + + if (_.isPlainObject(where)) { + Utils.getComplexKeys(where).forEach(prop => { + const item = where[prop]; + items.push(this.whereItemQuery(prop, item, options)); + }); + } else { + items.push(this.whereItemQuery(undefined, where, options)); + } + + return items.length && items.filter(item => item && item.length).join(binding) || ''; + } + + whereItemQuery(key, value, options = {}) { + if (value === undefined) { + throw new Error(`WHERE parameter "${key}" has invalid "undefined" value`); + } + + if (typeof key === 'string' && key.includes('.') && options.model) { + const keyParts = key.split('.'); + if (options.model.rawAttributes[keyParts[0]] && options.model.rawAttributes[keyParts[0]].type instanceof DataTypes.JSON) { + const tmp = {}; + const field = options.model.rawAttributes[keyParts[0]]; + _.set(tmp, keyParts.slice(1), value); + return this.whereItemQuery(field.field || keyParts[0], tmp, Object.assign({ field }, options)); + } + } + + const field = this._findField(key, options); + const fieldType = field && field.type || options.type; + + const isPlainObject = _.isPlainObject(value); + const isArray = !isPlainObject && Array.isArray(value); + key = this.OperatorsAliasMap && this.OperatorsAliasMap[key] || key; + if (isPlainObject) { + value = this._replaceAliases(value); + } + const valueKeys = isPlainObject && Utils.getComplexKeys(value); + + if (key === undefined) { + if (typeof value === 'string') { + return value; + } + + if (isPlainObject && valueKeys.length === 1) { + return this.whereItemQuery(valueKeys[0], value[valueKeys[0]], options); + } + } + + if (value === null) { + const opValue = options.bindParam ? 'NULL' : this.escape(value, field); + return this._joinKeyValue(key, opValue, this.OperatorMap[Op.is], options.prefix); + } + + if (!value) { + const opValue = options.bindParam ? this.format(value, field, options, options.bindParam) : this.escape(value, field); + return this._joinKeyValue(key, opValue, this.OperatorMap[Op.eq], options.prefix); + } + + if (value instanceof Utils.SequelizeMethod && !(key !== undefined && value instanceof Utils.Fn)) { + return this.handleSequelizeMethod(value); + } + + // Convert where: [] to Op.and if possible, else treat as literal/replacements + if (key === undefined && isArray) { + if (Utils.canTreatArrayAsAnd(value)) { + key = Op.and; + } else { + throw new Error('Support for literal replacements in the `where` object has been removed.'); + } + } + + if (key === Op.or || key === Op.and || key === Op.not) { + return this._whereGroupBind(key, value, options); + } + + + if (value[Op.or]) { + return this._whereBind(this.OperatorMap[Op.or], key, value[Op.or], options); + } + + if (value[Op.and]) { + return this._whereBind(this.OperatorMap[Op.and], key, value[Op.and], options); + } + + if (isArray && fieldType instanceof DataTypes.ARRAY) { + const opValue = options.bindParam ? this.format(value, field, options, options.bindParam) : this.escape(value, field); + return this._joinKeyValue(key, opValue, this.OperatorMap[Op.eq], options.prefix); + } + + if (isPlainObject && fieldType instanceof DataTypes.JSON && options.json !== false) { + return this._whereJSON(key, value, options); + } + // If multiple keys we combine the different logic conditions + if (isPlainObject && valueKeys.length > 1) { + return this._whereBind(this.OperatorMap[Op.and], key, value, options); + } + + if (isArray) { + return this._whereParseSingleValueObject(key, field, Op.in, value, options); + } + if (isPlainObject) { + if (this.OperatorMap[valueKeys[0]]) { + return this._whereParseSingleValueObject(key, field, valueKeys[0], value[valueKeys[0]], options); + } + return this._whereParseSingleValueObject(key, field, this.OperatorMap[Op.eq], value, options); + } + + if (key === Op.placeholder) { + const opValue = options.bindParam ? this.format(value, field, options, options.bindParam) : this.escape(value, field); + return this._joinKeyValue(this.OperatorMap[key], opValue, this.OperatorMap[Op.eq], options.prefix); + } + + const opValue = options.bindParam ? this.format(value, field, options, options.bindParam) : this.escape(value, field); + return this._joinKeyValue(key, opValue, this.OperatorMap[Op.eq], options.prefix); + } + + _findField(key, options) { + if (options.field) { + return options.field; + } + + if (options.model && options.model.rawAttributes && options.model.rawAttributes[key]) { + return options.model.rawAttributes[key]; + } + + if (options.model && options.model.fieldRawAttributesMap && options.model.fieldRawAttributesMap[key]) { + return options.model.fieldRawAttributesMap[key]; + } + } + + // OR/AND/NOT grouping logic + _whereGroupBind(key, value, options) { + const binding = key === Op.or ? this.OperatorMap[Op.or] : this.OperatorMap[Op.and]; + const outerBinding = key === Op.not ? 'NOT ': ''; + + if (Array.isArray(value)) { + value = value.map(item => { + let itemQuery = this.whereItemsQuery(item, options, this.OperatorMap[Op.and]); + if (itemQuery && itemQuery.length && (Array.isArray(item) || _.isPlainObject(item)) && Utils.getComplexSize(item) > 1) { + itemQuery = `(${itemQuery})`; + } + return itemQuery; + }).filter(item => item && item.length); + + value = value.length && value.join(binding); + } else { + value = this.whereItemsQuery(value, options, binding); + } + // Op.or: [] should return no data. + // Op.not of no restriction should also return no data + if ((key === Op.or || key === Op.not) && !value) { + return '0 = 1'; + } + + return value ? `${outerBinding}(${value})` : undefined; + } + + _whereBind(binding, key, value, options) { + if (_.isPlainObject(value)) { + value = Utils.getComplexKeys(value).map(prop => { + const item = value[prop]; + return this.whereItemQuery(key, { [prop]: item }, options); + }); + } else { + value = value.map(item => this.whereItemQuery(key, item, options)); + } + + value = value.filter(item => item && item.length); + + return value.length ? `(${value.join(binding)})` : undefined; + } + + _whereJSON(key, value, options) { + const items = []; + let baseKey = this.quoteIdentifier(key); + if (options.prefix) { + if (options.prefix instanceof Utils.Literal) { + baseKey = `${this.handleSequelizeMethod(options.prefix)}.${baseKey}`; + } else { + baseKey = `${this.quoteTable(options.prefix)}.${baseKey}`; + } + } + + Utils.getOperators(value).forEach(op => { + const where = { + [op]: value[op] + }; + items.push(this.whereItemQuery(key, where, Object.assign({}, options, { json: false }))); + }); + + _.forOwn(value, (item, prop) => { + this._traverseJSON(items, baseKey, prop, item, [prop]); + }); + + const result = items.join(this.OperatorMap[Op.and]); + return items.length > 1 ? `(${result})` : result; + } + + _traverseJSON(items, baseKey, prop, item, path) { + let cast; + + if (path[path.length - 1].includes('::')) { + const tmp = path[path.length - 1].split('::'); + cast = tmp[1]; + path[path.length - 1] = tmp[0]; + } + + const pathKey = this.jsonPathExtractionQuery(baseKey, path); + + if (_.isPlainObject(item)) { + Utils.getOperators(item).forEach(op => { + const value = this._toJSONValue(item[op]); + items.push(this.whereItemQuery(this._castKey(pathKey, value, cast), { [op]: value })); + }); + _.forOwn(item, (value, itemProp) => { + this._traverseJSON(items, baseKey, itemProp, value, path.concat([itemProp])); + }); + + return; + } + + item = this._toJSONValue(item); + items.push(this.whereItemQuery(this._castKey(pathKey, item, cast), { [Op.eq]: item })); + } + + _toJSONValue(value) { + return value; + } + + _castKey(key, value, cast, json) { + cast = cast || this._getJsonCast(Array.isArray(value) ? value[0] : value); + if (cast) { + return new Utils.Literal(this.handleSequelizeMethod(new Utils.Cast(new Utils.Literal(key), cast, json))); + } + + return new Utils.Literal(key); + } + + _getJsonCast(value) { + if (typeof value === 'number') { + return 'double precision'; + } + if (value instanceof Date) { + return 'timestamptz'; + } + if (typeof value === 'boolean') { + return 'boolean'; + } + return; + } + + _joinKeyValue(key, value, comparator, prefix) { + if (!key) { + return value; + } + if (comparator === undefined) { + throw new Error(`${key} and ${value} has no comparator`); + } + key = this._getSafeKey(key, prefix); + return [key, value].join(` ${comparator} `); + } + + _getSafeKey(key, prefix) { + if (key instanceof Utils.SequelizeMethod) { + key = this.handleSequelizeMethod(key); + return this._prefixKey(this.handleSequelizeMethod(key), prefix); + } + + if (Utils.isColString(key)) { + key = key.substr(1, key.length - 2).split('.'); + + if (key.length > 2) { + key = [ + // join the tables by -> to match out internal namings + key.slice(0, -1).join('->'), + key[key.length - 1] + ]; + } + + return key.map(identifier => this.quoteIdentifier(identifier)).join('.'); + } + + return this._prefixKey(this.quoteIdentifier(key), prefix); + } + + _prefixKey(key, prefix) { + if (prefix) { + if (prefix instanceof Utils.Literal) { + return [this.handleSequelizeMethod(prefix), key].join('.'); + } + + return [this.quoteTable(prefix), key].join('.'); + } + + return key; + } + + _whereParseSingleValueObject(key, field, prop, value, options) { + if (prop === Op.not) { + if (Array.isArray(value)) { + prop = Op.notIn; + } else if (value !== null && value !== true && value !== false) { + prop = Op.ne; + } + } + + let comparator = this.OperatorMap[prop] || this.OperatorMap[Op.eq]; + + switch (prop) { + case Op.in: + case Op.notIn: + if (value instanceof Utils.Literal) { + return this._joinKeyValue(key, value.val, comparator, options.prefix); + } + + if (value.length) { + return this._joinKeyValue(key, `(${value.map(item => this.escape(item, field)).join(', ')})`, comparator, options.prefix); + } + + if (comparator === this.OperatorMap[Op.in]) { + return this._joinKeyValue(key, '(NULL)', comparator, options.prefix); + } + + return ''; + case Op.any: + case Op.all: + comparator = `${this.OperatorMap[Op.eq]} ${comparator}`; + if (value[Op.values]) { + return this._joinKeyValue(key, `(VALUES ${value[Op.values].map(item => `(${this.escape(item)})`).join(', ')})`, comparator, options.prefix); + } + + return this._joinKeyValue(key, `(${this.escape(value, field)})`, comparator, options.prefix); + case Op.between: + case Op.notBetween: + return this._joinKeyValue(key, `${this.escape(value[0], field)} AND ${this.escape(value[1], field)}`, comparator, options.prefix); + case Op.raw: + throw new Error('The `$raw` where property is no longer supported. Use `sequelize.literal` instead.'); + case Op.col: + comparator = this.OperatorMap[Op.eq]; + value = value.split('.'); + + if (value.length > 2) { + value = [ + // join the tables by -> to match out internal namings + value.slice(0, -1).join('->'), + value[value.length - 1] + ]; + } + + return this._joinKeyValue(key, value.map(identifier => this.quoteIdentifier(identifier)).join('.'), comparator, options.prefix); + case Op.startsWith: + comparator = this.OperatorMap[Op.like]; + return this._joinKeyValue(key, this.escape(`${value}%`), comparator, options.prefix); + case Op.endsWith: + comparator = this.OperatorMap[Op.like]; + return this._joinKeyValue(key, this.escape(`%${value}`), comparator, options.prefix); + case Op.substring: + comparator = this.OperatorMap[Op.like]; + return this._joinKeyValue(key, this.escape(`%${value}%`), comparator, options.prefix); + } + + const escapeOptions = { + acceptStrings: comparator.includes(this.OperatorMap[Op.like]) + }; + + if (_.isPlainObject(value)) { + if (value[Op.col]) { + return this._joinKeyValue(key, this.whereItemQuery(null, value), comparator, options.prefix); + } + if (value[Op.any]) { + escapeOptions.isList = true; + return this._joinKeyValue(key, `(${this.escape(value[Op.any], field, escapeOptions)})`, `${comparator} ${this.OperatorMap[Op.any]}`, options.prefix); + } + if (value[Op.all]) { + escapeOptions.isList = true; + return this._joinKeyValue(key, `(${this.escape(value[Op.all], field, escapeOptions)})`, `${comparator} ${this.OperatorMap[Op.all]}`, options.prefix); + } + } + + if (value === null && comparator === this.OperatorMap[Op.eq]) { + return this._joinKeyValue(key, this.escape(value, field, escapeOptions), this.OperatorMap[Op.is], options.prefix); + } + if (value === null && comparator === this.OperatorMap[Op.ne]) { + return this._joinKeyValue(key, this.escape(value, field, escapeOptions), this.OperatorMap[Op.not], options.prefix); + } + + return this._joinKeyValue(key, this.escape(value, field, escapeOptions), comparator, options.prefix); + } + + /* + Takes something and transforms it into values of a where condition. + @private + */ + getWhereConditions(smth, tableName, factory, options, prepend) { + const where = {}; + + if (Array.isArray(tableName)) { + tableName = tableName[0]; + if (Array.isArray(tableName)) { + tableName = tableName[1]; + } + } + + options = options || {}; + + if (prepend === undefined) { + prepend = true; + } + + if (smth && smth instanceof Utils.SequelizeMethod) { // Checking a property is cheaper than a lot of instanceof calls + return this.handleSequelizeMethod(smth, tableName, factory, options, prepend); + } + if (_.isPlainObject(smth)) { + return this.whereItemsQuery(smth, { + model: factory, + prefix: prepend && tableName, + type: options.type + }); + } + if (typeof smth === 'number') { + let primaryKeys = factory ? Object.keys(factory.primaryKeys) : []; + + if (primaryKeys.length > 0) { + // Since we're just a number, assume only the first key + primaryKeys = primaryKeys[0]; + } else { + primaryKeys = 'id'; + } + + where[primaryKeys] = smth; + + return this.whereItemsQuery(where, { + model: factory, + prefix: prepend && tableName + }); + } + if (typeof smth === 'string') { + return this.whereItemsQuery(smth, { + model: factory, + prefix: prepend && tableName + }); + } + if (Buffer.isBuffer(smth)) { + return this.escape(smth); + } + if (Array.isArray(smth)) { + if (smth.length === 0 || smth.length > 0 && smth[0].length === 0) return '1=1'; + if (Utils.canTreatArrayAsAnd(smth)) { + const _smth = { [Op.and]: smth }; + return this.getWhereConditions(_smth, tableName, factory, options, prepend); + } + throw new Error('Support for literal replacements in the `where` object has been removed.'); + } + if (smth === null) { + return this.whereItemsQuery(smth, { + model: factory, + prefix: prepend && tableName + }); + } + + return '1=1'; + } + + // A recursive parser for nested where conditions + parseConditionObject(conditions, path) { + path = path || []; + return _.reduce(conditions, (result, value, key) => { + if (_.isObject(value)) { + return result.concat(this.parseConditionObject(value, path.concat(key))); // Recursively parse objects + } + result.push({ path: path.concat(key), value }); + return result; + }, []); + } + + booleanValue(value) { + return value; + } +} + +Object.assign(QueryGenerator.prototype, require('./query-generator/operators')); +Object.assign(QueryGenerator.prototype, require('./query-generator/transaction')); + +module.exports = QueryGenerator; diff --git a/node_modules/sequelize/lib/dialects/abstract/query-generator/helpers/quote.js b/node_modules/sequelize/lib/dialects/abstract/query-generator/helpers/quote.js new file mode 100644 index 00000000..0c1561d2 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/abstract/query-generator/helpers/quote.js @@ -0,0 +1,87 @@ +/** + * Quote helpers implement quote ability for all dialects. + * These are basic block of query building + * + * Its better to implement all dialect implementation together here. Which will allow + * even abstract generator to use them by just specifying dialect type. + * + * Defining these helpers in each query dialect will leave + * code in dual dependency of abstract <-> specific dialect + */ + +'use strict'; + +const Utils = require('../../../../utils'); + +/** + * list of reserved words in PostgreSQL 10 + * source: https://www.postgresql.org/docs/10/static/sql-keywords-appendix.html + * + * @private + */ +const postgresReservedWords = 'all,analyse,analyze,and,any,array,as,asc,asymmetric,authorization,binary,both,case,cast,check,collate,collation,column,concurrently,constraint,create,cross,current_catalog,current_date,current_role,current_schema,current_time,current_timestamp,current_user,default,deferrable,desc,distinct,do,else,end,except,false,fetch,for,foreign,freeze,from,full,grant,group,having,ilike,in,initially,inner,intersect,into,is,isnull,join,lateral,leading,left,like,limit,localtime,localtimestamp,natural,not,notnull,null,offset,on,only,or,order,outer,overlaps,placing,primary,references,returning,right,select,session_user,similar,some,symmetric,table,tablesample,then,to,trailing,true,union,unique,user,using,variadic,verbose,when,where,window,with'.split(','); + +/** + * + * @param {string} dialect Dialect name + * @param {string} identifier Identifier to quote + * @param {Object} [options] + * @param {boolean} [options.force=false] + * @param {boolean} [options.quoteIdentifiers=true] + * + * @returns {string} + * @private + */ +function quoteIdentifier(dialect, identifier, options) { + if (identifier === '*') return identifier; + + options = Utils.defaults(options || {}, { + force: false, + quoteIdentifiers: true + }); + + switch (dialect) { + case 'sqlite': + case 'mariadb': + case 'mysql': + return Utils.addTicks(Utils.removeTicks(identifier, '`'), '`'); + + case 'postgres': + const rawIdentifier = Utils.removeTicks(identifier, '"'); + + if ( + options.force !== true && + options.quoteIdentifiers === false && + !identifier.includes('.') && + !identifier.includes('->') && + !postgresReservedWords.includes(rawIdentifier.toLowerCase()) + ) { + // In Postgres, if tables or attributes are created double-quoted, + // they are also case sensitive. If they contain any uppercase + // characters, they must always be double-quoted. This makes it + // impossible to write queries in portable SQL if tables are created in + // this way. Hence, we strip quotes if we don't want case sensitivity. + return rawIdentifier; + } + return Utils.addTicks(rawIdentifier, '"'); + case 'mssql': + return `[${identifier.replace(/[[\]']+/g, '')}]`; + + default: + throw new Error(`Dialect "${dialect}" is not supported`); + } +} +module.exports.quoteIdentifier = quoteIdentifier; + +/** + * Test if a give string is already quoted + * + * @param {string} identifier + * + * @returns {boolean} + * @private + */ +function isIdentifierQuoted(identifier) { + return /^\s*(?:([`"'])(?:(?!\1).|\1{2})*\1\.?)+\s*$/i.test(identifier); +} +module.exports.isIdentifierQuoted = isIdentifierQuoted; diff --git a/node_modules/sequelize/lib/dialects/abstract/query-generator/operators.js b/node_modules/sequelize/lib/dialects/abstract/query-generator/operators.js new file mode 100644 index 00000000..0bff9bad --- /dev/null +++ b/node_modules/sequelize/lib/dialects/abstract/query-generator/operators.js @@ -0,0 +1,84 @@ +'use strict'; + +const _ = require('lodash'); +const Op = require('../../../operators'); +const Utils = require('../../../utils'); + +const OperatorHelpers = { + OperatorMap: { + [Op.eq]: '=', + [Op.ne]: '!=', + [Op.gte]: '>=', + [Op.gt]: '>', + [Op.lte]: '<=', + [Op.lt]: '<', + [Op.not]: 'IS NOT', + [Op.is]: 'IS', + [Op.in]: 'IN', + [Op.notIn]: 'NOT IN', + [Op.like]: 'LIKE', + [Op.notLike]: 'NOT LIKE', + [Op.iLike]: 'ILIKE', + [Op.notILike]: 'NOT ILIKE', + [Op.startsWith]: 'LIKE', + [Op.endsWith]: 'LIKE', + [Op.substring]: 'LIKE', + [Op.regexp]: '~', + [Op.notRegexp]: '!~', + [Op.iRegexp]: '~*', + [Op.notIRegexp]: '!~*', + [Op.between]: 'BETWEEN', + [Op.notBetween]: 'NOT BETWEEN', + [Op.overlap]: '&&', + [Op.contains]: '@>', + [Op.contained]: '<@', + [Op.adjacent]: '-|-', + [Op.strictLeft]: '<<', + [Op.strictRight]: '>>', + [Op.noExtendRight]: '&<', + [Op.noExtendLeft]: '&>', + [Op.any]: 'ANY', + [Op.all]: 'ALL', + [Op.and]: ' AND ', + [Op.or]: ' OR ', + [Op.col]: 'COL', + [Op.placeholder]: '$$PLACEHOLDER$$' + }, + + OperatorsAliasMap: {}, + + setOperatorsAliases(aliases) { + if (!aliases || _.isEmpty(aliases)) { + this.OperatorsAliasMap = false; + } else { + this.OperatorsAliasMap = Object.assign({}, aliases); + } + }, + + _replaceAliases(orig) { + const obj = {}; + if (!this.OperatorsAliasMap) { + return orig; + } + + Utils.getOperators(orig).forEach(op => { + const item = orig[op]; + if (_.isPlainObject(item)) { + obj[op] = this._replaceAliases(item); + } else { + obj[op] = item; + } + }); + + _.forOwn(orig, (item, prop) => { + prop = this.OperatorsAliasMap[prop] || prop; + if (_.isPlainObject(item)) { + item = this._replaceAliases(item); + } + obj[prop] = item; + }); + return obj; + } +}; + +module.exports = OperatorHelpers; diff --git a/node_modules/sequelize/lib/dialects/abstract/query-generator/transaction.js b/node_modules/sequelize/lib/dialects/abstract/query-generator/transaction.js new file mode 100644 index 00000000..5557ce33 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/abstract/query-generator/transaction.js @@ -0,0 +1,80 @@ +'use strict'; + +const uuidv4 = require('uuid/v4'); + +const TransactionQueries = { + /** + * Returns a query that sets the transaction isolation level. + * + * @param {string} value The isolation level. + * @param {Object} options An object with options. + * @returns {string} The generated sql query. + * @private + */ + setIsolationLevelQuery(value, options) { + if (options.parent) { + return; + } + + return `SET SESSION TRANSACTION ISOLATION LEVEL ${value};`; + }, + + generateTransactionId() { + return uuidv4(); + }, + + /** + * Returns a query that starts a transaction. + * + * @param {Transaction} transaction + * @returns {string} The generated sql query. + * @private + */ + startTransactionQuery(transaction) { + if (transaction.parent) { + // force quoting of savepoint identifiers for postgres + return `SAVEPOINT ${this.quoteIdentifier(transaction.name, true)};`; + } + + return 'START TRANSACTION;'; + }, + + deferConstraintsQuery() {}, + + setConstraintQuery() {}, + setDeferredQuery() {}, + setImmediateQuery() {}, + + /** + * Returns a query that commits a transaction. + * + * @param {Transaction} transaction An object with options. + * @returns {string} The generated sql query. + * @private + */ + commitTransactionQuery(transaction) { + if (transaction.parent) { + return; + } + + return 'COMMIT;'; + }, + + /** + * Returns a query that rollbacks a transaction. + * + * @param {Transaction} transaction + * @returns {string} The generated sql query. + * @private + */ + rollbackTransactionQuery(transaction) { + if (transaction.parent) { + // force quoting of savepoint identifiers for postgres + return `ROLLBACK TO SAVEPOINT ${this.quoteIdentifier(transaction.name, true)};`; + } + + return 'ROLLBACK;'; + } +}; + +module.exports = TransactionQueries; diff --git a/node_modules/sequelize/lib/dialects/abstract/query.js b/node_modules/sequelize/lib/dialects/abstract/query.js new file mode 100755 index 00000000..bcba0531 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/abstract/query.js @@ -0,0 +1,727 @@ +'use strict'; + +const _ = require('lodash'); +const SqlString = require('../../sql-string'); +const QueryTypes = require('../../query-types'); +const Dot = require('dottie'); +const deprecations = require('../../utils/deprecations'); +const uuid = require('uuid/v4'); + +class AbstractQuery { + + constructor(connection, sequelize, options) { + this.uuid = uuid(); + this.connection = connection; + this.instance = options.instance; + this.model = options.model; + this.sequelize = sequelize; + this.options = Object.assign({ + plain: false, + raw: false, + // eslint-disable-next-line no-console + logging: console.log + }, options || {}); + this.checkLoggingOption(); + } + + /** + * rewrite query with parameters + * + * Examples: + * + * query.formatBindParameters('select $1 as foo', ['fooval']); + * + * query.formatBindParameters('select $foo as foo', { foo: 'fooval' }); + * + * Options + * skipUnescape: bool, skip unescaping $$ + * skipValueReplace: bool, do not replace (but do unescape $$). Check correct syntax and if all values are available + * + * @param {string} sql + * @param {Object|Array} values + * @param {string} dialect + * @param {Function} [replacementFunc] + * @param {Object} [options] + * @private + */ + static formatBindParameters(sql, values, dialect, replacementFunc, options) { + if (!values) { + return [sql, []]; + } + + options = options || {}; + if (typeof replacementFunc !== 'function') { + options = replacementFunc || {}; + replacementFunc = undefined; + } + + if (!replacementFunc) { + if (options.skipValueReplace) { + replacementFunc = (match, key, values) => { + if (values[key] !== undefined) { + return match; + } + return undefined; + }; + } else { + replacementFunc = (match, key, values, timeZone, dialect) => { + if (values[key] !== undefined) { + return SqlString.escape(values[key], timeZone, dialect); + } + return undefined; + }; + } + } else if (options.skipValueReplace) { + const origReplacementFunc = replacementFunc; + replacementFunc = (match, key, values, timeZone, dialect, options) => { + if (origReplacementFunc(match, key, values, timeZone, dialect, options) !== undefined) { + return match; + } + return undefined; + }; + } + + const timeZone = null; + const list = Array.isArray(values); + + sql = sql.replace(/\$(\$|\w+)/g, (match, key) => { + if ('$' === key) { + return options.skipUnescape ? match : key; + } + + let replVal; + if (list) { + if (key.match(/^[1-9]\d*$/)) { + key = key - 1; + replVal = replacementFunc(match, key, values, timeZone, dialect, options); + } + } else if (!key.match(/^\d*$/)) { + replVal = replacementFunc(match, key, values, timeZone, dialect, options); + } + if (replVal === undefined) { + throw new Error(`Named bind parameter "${match}" has no value in the given object.`); + } + return replVal; + }); + return [sql, []]; + } + + /** + * Execute the passed sql query. + * + * Examples: + * + * query.run('SELECT 1') + * + * @private + */ + run() { + throw new Error('The run method wasn\'t overwritten!'); + } + + /** + * Check the logging option of the instance and print deprecation warnings. + * + * @private + */ + checkLoggingOption() { + if (this.options.logging === true) { + deprecations.noTrueLogging(); + // eslint-disable-next-line no-console + this.options.logging = console.log; + } + } + + /** + * Get the attributes of an insert query, which contains the just inserted id. + * + * @returns {string} The field name. + * @private + */ + getInsertIdField() { + return 'insertId'; + } + + getUniqueConstraintErrorMessage(field) { + let message = field ? `${field} must be unique` : 'Must be unique'; + + if (field && this.model) { + for (const key of Object.keys(this.model.uniqueKeys)) { + if (this.model.uniqueKeys[key].fields.includes(field.replace(/"/g, ''))) { + if (this.model.uniqueKeys[key].msg) { + message = this.model.uniqueKeys[key].msg; + } + } + } + } + return message; + } + + isRawQuery() { + return this.options.type === QueryTypes.RAW; + } + + isVersionQuery() { + return this.options.type === QueryTypes.VERSION; + } + + isUpsertQuery() { + return this.options.type === QueryTypes.UPSERT; + } + + isInsertQuery(results, metaData) { + let result = true; + + if (this.options.type === QueryTypes.INSERT) { + return true; + } + + // is insert query if sql contains insert into + result = result && this.sql.toLowerCase().startsWith('insert into'); + + // is insert query if no results are passed or if the result has the inserted id + result = result && (!results || Object.prototype.hasOwnProperty.call(results, this.getInsertIdField())); + + // is insert query if no metadata are passed or if the metadata has the inserted id + result = result && (!metaData || Object.prototype.hasOwnProperty.call(metaData, this.getInsertIdField())); + + return result; + } + + handleInsertQuery(results, metaData) { + if (this.instance) { + // add the inserted row id to the instance + const autoIncrementAttribute = this.model.autoIncrementAttribute; + let id = null; + + id = id || results && results[this.getInsertIdField()]; + id = id || metaData && metaData[this.getInsertIdField()]; + + this.instance[autoIncrementAttribute] = id; + } + } + + isShowTablesQuery() { + return this.options.type === QueryTypes.SHOWTABLES; + } + + handleShowTablesQuery(results) { + return _.flatten(results.map(resultSet => _.values(resultSet))); + } + + isShowIndexesQuery() { + return this.options.type === QueryTypes.SHOWINDEXES; + } + + isShowConstraintsQuery() { + return this.options.type === QueryTypes.SHOWCONSTRAINTS; + } + + isDescribeQuery() { + return this.options.type === QueryTypes.DESCRIBE; + } + + isSelectQuery() { + return this.options.type === QueryTypes.SELECT; + } + + isBulkUpdateQuery() { + return this.options.type === QueryTypes.BULKUPDATE; + } + + isBulkDeleteQuery() { + return this.options.type === QueryTypes.BULKDELETE; + } + + isForeignKeysQuery() { + return this.options.type === QueryTypes.FOREIGNKEYS; + } + + isUpdateQuery() { + return this.options.type === QueryTypes.UPDATE; + } + + handleSelectQuery(results) { + let result = null; + + // Map raw fields to names if a mapping is provided + if (this.options.fieldMap) { + const fieldMap = this.options.fieldMap; + results = results.map(result => _.reduce(fieldMap, (result, name, field) => { + if (result[field] !== undefined) { + result[name] = result[field]; + delete result[field]; + } + return result; + }, result)); + } + + // Raw queries + if (this.options.raw) { + result = results.map(result => { + let o = {}; + + for (const key in result) { + if (Object.prototype.hasOwnProperty.call(result, key)) { + o[key] = result[key]; + } + } + + if (this.options.nest) { + o = Dot.transform(o); + } + + return o; + }); + // Queries with include + } else if (this.options.hasJoin === true) { + results = AbstractQuery._groupJoinData(results, { + model: this.model, + includeMap: this.options.includeMap, + includeNames: this.options.includeNames + }, { + checkExisting: this.options.hasMultiAssociation + }); + + result = this.model.bulkBuild(results, { + isNewRecord: false, + include: this.options.include, + includeNames: this.options.includeNames, + includeMap: this.options.includeMap, + includeValidated: true, + attributes: this.options.originalAttributes || this.options.attributes, + raw: true + }); + // Regular queries + } else { + result = this.model.bulkBuild(results, { + isNewRecord: false, + raw: true, + attributes: this.options.originalAttributes || this.options.attributes + }); + } + + // return the first real model instance if options.plain is set (e.g. Model.find) + if (this.options.plain) { + result = result.length === 0 ? null : result[0]; + } + return result; + } + + isShowOrDescribeQuery() { + let result = false; + + result = result || this.sql.toLowerCase().startsWith('show'); + result = result || this.sql.toLowerCase().startsWith('describe'); + + return result; + } + + isCallQuery() { + return this.sql.toLowerCase().startsWith('call'); + } + + /** + * @param {string} sql + * @param {Function} debugContext + * @protected + * @returns {Function} A function to call after the query was completed. + */ + _logQuery(sql, debugContext) { + const { connection, options } = this; + const benchmark = this.sequelize.options.benchmark || options.benchmark; + const startTime = Date.now(); + const fmt = `(${connection.uuid || 'default'}): ${sql}`; + const msg = `Executing ${fmt}`; + debugContext(msg); + if (!benchmark) { + this.sequelize.log(`Executing ${fmt}`, options); + } + return () => { + const afterMsg = `Executed ${fmt}`; + debugContext(afterMsg); + if (benchmark) { + this.sequelize.log(afterMsg, Date.now() - startTime, options); + } + }; + } + + /** + * The function takes the result of the query execution and groups + * the associated data by the callee. + * + * Example: + * groupJoinData([ + * { + * some: 'data', + * id: 1, + * association: { foo: 'bar', id: 1 } + * }, { + * some: 'data', + * id: 1, + * association: { foo: 'bar', id: 2 } + * }, { + * some: 'data', + * id: 1, + * association: { foo: 'bar', id: 3 } + * } + * ]) + * + * Result: + * Something like this: + * + * [ + * { + * some: 'data', + * id: 1, + * association: [ + * { foo: 'bar', id: 1 }, + * { foo: 'bar', id: 2 }, + * { foo: 'bar', id: 3 } + * ] + * } + * ] + * + * @param {Array} rows + * @param {Object} includeOptions + * @param {Object} options + * @private + */ + static _groupJoinData(rows, includeOptions, options) { + + /* + * Assumptions + * ID is not necessarily the first field + * All fields for a level is grouped in the same set (i.e. Panel.id, Task.id, Panel.title is not possible) + * Parent keys will be seen before any include/child keys + * Previous set won't necessarily be parent set (one parent could have two children, one child would then be previous set for the other) + */ + + /* + * Author (MH) comment: This code is an unreadable mess, but it's performant. + * groupJoinData is a performance critical function so we prioritize perf over readability. + */ + if (!rows.length) { + return []; + } + + // Generic looping + let i; + let length; + let $i; + let $length; + // Row specific looping + let rowsI; + let row; + const rowsLength = rows.length; + // Key specific looping + let keys; + let key; + let keyI; + let keyLength; + let prevKey; + let values; + let topValues; + let topExists; + const checkExisting = options.checkExisting; + // If we don't have to deduplicate we can pre-allocate the resulting array + let itemHash; + let parentHash; + let topHash; + const results = checkExisting ? [] : new Array(rowsLength); + const resultMap = {}; + const includeMap = {}; + // Result variables for the respective functions + let $keyPrefix; + let $keyPrefixString; + let $prevKeyPrefixString; // eslint-disable-line + let $prevKeyPrefix; + let $lastKeyPrefix; + let $current; + let $parent; + // Map each key to an include option + let previousPiece; + const buildIncludeMap = piece => { + if (Object.prototype.hasOwnProperty.call($current.includeMap, piece)) { + includeMap[key] = $current = $current.includeMap[piece]; + if (previousPiece) { + previousPiece = `${previousPiece}.${piece}`; + } else { + previousPiece = piece; + } + includeMap[previousPiece] = $current; + } + }; + // Calculate the string prefix of a key ('User.Results' for 'User.Results.id') + const keyPrefixStringMemo = {}; + const keyPrefixString = (key, memo) => { + if (!Object.prototype.hasOwnProperty.call(memo, key)) { + memo[key] = key.substr(0, key.lastIndexOf('.')); + } + return memo[key]; + }; + // Removes the prefix from a key ('id' for 'User.Results.id') + const removeKeyPrefixMemo = {}; + const removeKeyPrefix = key => { + if (!Object.prototype.hasOwnProperty.call(removeKeyPrefixMemo, key)) { + const index = key.lastIndexOf('.'); + removeKeyPrefixMemo[key] = key.substr(index === -1 ? 0 : index + 1); + } + return removeKeyPrefixMemo[key]; + }; + // Calculates the array prefix of a key (['User', 'Results'] for 'User.Results.id') + const keyPrefixMemo = {}; + const keyPrefix = key => { + // We use a double memo and keyPrefixString so that different keys with the same prefix will receive the same array instead of differnet arrays with equal values + if (!Object.prototype.hasOwnProperty.call(keyPrefixMemo, key)) { + const prefixString = keyPrefixString(key, keyPrefixStringMemo); + if (!Object.prototype.hasOwnProperty.call(keyPrefixMemo, prefixString)) { + keyPrefixMemo[prefixString] = prefixString ? prefixString.split('.') : []; + } + keyPrefixMemo[key] = keyPrefixMemo[prefixString]; + } + return keyPrefixMemo[key]; + }; + // Calcuate the last item in the array prefix ('Results' for 'User.Results.id') + const lastKeyPrefixMemo = {}; + const lastKeyPrefix = key => { + if (!Object.prototype.hasOwnProperty.call(lastKeyPrefixMemo, key)) { + const prefix = keyPrefix(key); + const length = prefix.length; + + lastKeyPrefixMemo[key] = !length ? '' : prefix[length - 1]; + } + return lastKeyPrefixMemo[key]; + }; + const getUniqueKeyAttributes = model => { + let uniqueKeyAttributes = _.chain(model.uniqueKeys); + uniqueKeyAttributes = uniqueKeyAttributes + .result(`${uniqueKeyAttributes.findKey()}.fields`) + .map(field => _.findKey(model.attributes, chr => chr.field === field)) + .value(); + + return uniqueKeyAttributes; + }; + const stringify = obj => obj instanceof Buffer ? obj.toString('hex') : obj; + let primaryKeyAttributes; + let uniqueKeyAttributes; + let prefix; + + for (rowsI = 0; rowsI < rowsLength; rowsI++) { + row = rows[rowsI]; + + // Keys are the same for all rows, so only need to compute them on the first row + if (rowsI === 0) { + keys = Object.keys(row); + keyLength = keys.length; + } + + if (checkExisting) { + topExists = false; + + // Compute top level hash key (this is usually just the primary key values) + $length = includeOptions.model.primaryKeyAttributes.length; + topHash = ''; + if ($length === 1) { + topHash = stringify(row[includeOptions.model.primaryKeyAttributes[0]]); + } + else if ($length > 1) { + for ($i = 0; $i < $length; $i++) { + topHash += stringify(row[includeOptions.model.primaryKeyAttributes[$i]]); + } + } + else if (!_.isEmpty(includeOptions.model.uniqueKeys)) { + uniqueKeyAttributes = getUniqueKeyAttributes(includeOptions.model); + for ($i = 0; $i < uniqueKeyAttributes.length; $i++) { + topHash += row[uniqueKeyAttributes[$i]]; + } + } + } + + topValues = values = {}; + $prevKeyPrefix = undefined; + for (keyI = 0; keyI < keyLength; keyI++) { + key = keys[keyI]; + + // The string prefix isn't actualy needed + // We use it so keyPrefix for different keys will resolve to the same array if they have the same prefix + // TODO: Find a better way? + $keyPrefixString = keyPrefixString(key, keyPrefixStringMemo); + $keyPrefix = keyPrefix(key); + + // On the first row we compute the includeMap + if (rowsI === 0 && !Object.prototype.hasOwnProperty.call(includeMap, key)) { + if (!$keyPrefix.length) { + includeMap[key] = includeMap[''] = includeOptions; + } else { + $current = includeOptions; + previousPiece = undefined; + $keyPrefix.forEach(buildIncludeMap); + } + } + // End of key set + if ($prevKeyPrefix !== undefined && $prevKeyPrefix !== $keyPrefix) { + if (checkExisting) { + // Compute hash key for this set instance + // TODO: Optimize + length = $prevKeyPrefix.length; + $parent = null; + parentHash = null; + + if (length) { + for (i = 0; i < length; i++) { + prefix = $parent ? `${$parent}.${$prevKeyPrefix[i]}` : $prevKeyPrefix[i]; + primaryKeyAttributes = includeMap[prefix].model.primaryKeyAttributes; + $length = primaryKeyAttributes.length; + itemHash = prefix; + if ($length === 1) { + itemHash += stringify(row[`${prefix}.${primaryKeyAttributes[0]}`]); + } + else if ($length > 1) { + for ($i = 0; $i < $length; $i++) { + itemHash += stringify(row[`${prefix}.${primaryKeyAttributes[$i]}`]); + } + } + else if (!_.isEmpty(includeMap[prefix].model.uniqueKeys)) { + uniqueKeyAttributes = getUniqueKeyAttributes(includeMap[prefix].model); + for ($i = 0; $i < uniqueKeyAttributes.length; $i++) { + itemHash += row[`${prefix}.${uniqueKeyAttributes[$i]}`]; + } + } + if (!parentHash) { + parentHash = topHash; + } + + itemHash = parentHash + itemHash; + $parent = prefix; + if (i < length - 1) { + parentHash = itemHash; + } + } + } else { + itemHash = topHash; + } + + if (itemHash === topHash) { + if (!resultMap[itemHash]) { + resultMap[itemHash] = values; + } else { + topExists = true; + } + } else if (!resultMap[itemHash]) { + $parent = resultMap[parentHash]; + $lastKeyPrefix = lastKeyPrefix(prevKey); + + if (includeMap[prevKey].association.isSingleAssociation) { + if ($parent) { + $parent[$lastKeyPrefix] = resultMap[itemHash] = values; + } + } else { + if (!$parent[$lastKeyPrefix]) { + $parent[$lastKeyPrefix] = []; + } + $parent[$lastKeyPrefix].push(resultMap[itemHash] = values); + } + } + + // Reset values + values = {}; + } else { + // If checkExisting is false it's because there's only 1:1 associations in this query + // However we still need to map onto the appropriate parent + // For 1:1 we map forward, initializing the value object on the parent to be filled in the next iterations of the loop + $current = topValues; + length = $keyPrefix.length; + if (length) { + for (i = 0; i < length; i++) { + if (i === length - 1) { + values = $current[$keyPrefix[i]] = {}; + } + $current = $current[$keyPrefix[i]] || {}; + } + } + } + } + + // End of iteration, set value and set prev values (for next iteration) + values[removeKeyPrefix(key)] = row[key]; + prevKey = key; + $prevKeyPrefix = $keyPrefix; + $prevKeyPrefixString = $keyPrefixString; + } + + if (checkExisting) { + length = $prevKeyPrefix.length; + $parent = null; + parentHash = null; + + if (length) { + for (i = 0; i < length; i++) { + prefix = $parent ? `${$parent}.${$prevKeyPrefix[i]}` : $prevKeyPrefix[i]; + primaryKeyAttributes = includeMap[prefix].model.primaryKeyAttributes; + $length = primaryKeyAttributes.length; + itemHash = prefix; + if ($length === 1) { + itemHash += stringify(row[`${prefix}.${primaryKeyAttributes[0]}`]); + } + else if ($length > 0) { + for ($i = 0; $i < $length; $i++) { + itemHash += stringify(row[`${prefix}.${primaryKeyAttributes[$i]}`]); + } + } + else if (!_.isEmpty(includeMap[prefix].model.uniqueKeys)) { + uniqueKeyAttributes = getUniqueKeyAttributes(includeMap[prefix].model); + for ($i = 0; $i < uniqueKeyAttributes.length; $i++) { + itemHash += row[`${prefix}.${uniqueKeyAttributes[$i]}`]; + } + } + if (!parentHash) { + parentHash = topHash; + } + + itemHash = parentHash + itemHash; + $parent = prefix; + if (i < length - 1) { + parentHash = itemHash; + } + } + } else { + itemHash = topHash; + } + + if (itemHash === topHash) { + if (!resultMap[itemHash]) { + resultMap[itemHash] = values; + } else { + topExists = true; + } + } else if (!resultMap[itemHash]) { + $parent = resultMap[parentHash]; + $lastKeyPrefix = lastKeyPrefix(prevKey); + + if (includeMap[prevKey].association.isSingleAssociation) { + if ($parent) { + $parent[$lastKeyPrefix] = resultMap[itemHash] = values; + } + } else { + if (!$parent[$lastKeyPrefix]) { + $parent[$lastKeyPrefix] = []; + } + $parent[$lastKeyPrefix].push(resultMap[itemHash] = values); + } + } + if (!topExists) { + results.push(topValues); + } + } else { + results[rowsI] = topValues; + } + } + + return results; + } +} + +module.exports = AbstractQuery; +module.exports.AbstractQuery = AbstractQuery; +module.exports.default = AbstractQuery; diff --git a/node_modules/sequelize/lib/dialects/mariadb/connection-manager.js b/node_modules/sequelize/lib/dialects/mariadb/connection-manager.js new file mode 100644 index 00000000..f6533cde --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mariadb/connection-manager.js @@ -0,0 +1,145 @@ +'use strict'; + +const AbstractConnectionManager = require('../abstract/connection-manager'); +const SequelizeErrors = require('../../errors'); +const Promise = require('../../promise'); +const { logger } = require('../../utils/logger'); +const DataTypes = require('../../data-types').mariadb; +const momentTz = require('moment-timezone'); +const debug = logger.debugContext('connection:mariadb'); +const parserStore = require('../parserStore')('mariadb'); + +/** + * MariaDB Connection Manager + * + * Get connections, validate and disconnect them. + * AbstractConnectionManager pooling use it to handle MariaDB specific connections + * Use https://github.com/MariaDB/mariadb-connector-nodejs to connect with MariaDB server + * + * @extends AbstractConnectionManager + * @returns Class + * @private + */ + +class ConnectionManager extends AbstractConnectionManager { + constructor(dialect, sequelize) { + sequelize.config.port = sequelize.config.port || 3306; + super(dialect, sequelize); + this.lib = this._loadDialectModule('mariadb'); + this.refreshTypeParser(DataTypes); + } + + static _typecast(field, next) { + if (parserStore.get(field.type)) { + return parserStore.get(field.type)(field, this.sequelize.options, next); + } + return next(); + } + + _refreshTypeParser(dataType) { + parserStore.refresh(dataType); + } + + _clearTypeParser() { + parserStore.clear(); + } + + /** + * Connect with MariaDB database based on config, Handle any errors in connection + * Set the pool handlers on connection.error + * Also set proper timezone once connection is connected. + * + * @param {Object} config + * @returns {Promise} + * @private + */ + connect(config) { + // Named timezone is not supported in mariadb, convert to offset + let tzOffset = this.sequelize.options.timezone; + tzOffset = /\//.test(tzOffset) ? momentTz.tz(tzOffset).format('Z') + : tzOffset; + + const connectionConfig = { + host: config.host, + port: config.port, + user: config.username, + password: config.password, + database: config.database, + timezone: tzOffset, + typeCast: ConnectionManager._typecast.bind(this), + bigNumberStrings: false, + supportBigNumbers: true, + foundRows: false + }; + + if (config.dialectOptions) { + Object.assign(connectionConfig, config.dialectOptions); + } + + if (!this.sequelize.config.keepDefaultTimezone) { + // set timezone for this connection + if (connectionConfig.initSql) { + if (!Array.isArray( + connectionConfig.initSql)) { + connectionConfig.initSql = [connectionConfig.initSql]; + } + connectionConfig.initSql.push(`SET time_zone = '${tzOffset}'`); + } else { + connectionConfig.initSql = `SET time_zone = '${tzOffset}'`; + } + } + + return this.lib.createConnection(connectionConfig) + .then(connection => { + this.sequelize.options.databaseVersion = connection.serverVersion(); + debug('connection acquired'); + connection.on('error', error => { + switch (error.code) { + case 'ESOCKET': + case 'ECONNRESET': + case 'EPIPE': + case 'PROTOCOL_CONNECTION_LOST': + this.pool.destroy(connection); + } + }); + return connection; + }) + .catch(err => { + switch (err.code) { + case 'ECONNREFUSED': + throw new SequelizeErrors.ConnectionRefusedError(err); + case 'ER_ACCESS_DENIED_ERROR': + case 'ER_ACCESS_DENIED_NO_PASSWORD_ERROR': + throw new SequelizeErrors.AccessDeniedError(err); + case 'ENOTFOUND': + throw new SequelizeErrors.HostNotFoundError(err); + case 'EHOSTUNREACH': + case 'ENETUNREACH': + case 'EADDRNOTAVAIL': + throw new SequelizeErrors.HostNotReachableError(err); + case 'EINVAL': + throw new SequelizeErrors.InvalidConnectionError(err); + default: + throw new SequelizeErrors.ConnectionError(err); + } + }); + } + + disconnect(connection) { + // Don't disconnect connections with CLOSED state + if (!connection.isValid()) { + debug('connection tried to disconnect but was already at CLOSED state'); + return Promise.resolve(); + } + //wrap native Promise into bluebird + return Promise.resolve(connection.end()); + } + + validate(connection) { + return connection && connection.isValid(); + } +} + +module.exports = ConnectionManager; +module.exports.ConnectionManager = ConnectionManager; +module.exports.default = ConnectionManager; diff --git a/node_modules/sequelize/lib/dialects/mariadb/data-types.js b/node_modules/sequelize/lib/dialects/mariadb/data-types.js new file mode 100644 index 00000000..5979fa28 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mariadb/data-types.js @@ -0,0 +1,122 @@ +'use strict'; + +const _ = require('lodash'); +const moment = require('moment-timezone'); + +module.exports = BaseTypes => { + BaseTypes.ABSTRACT.prototype.dialectTypes = 'https://mariadb.com/kb/en/library/resultset/#field-types'; + + /** + * types: [buffer_type, ...] + * @see documentation : https://mariadb.com/kb/en/library/resultset/#field-types + * @see connector implementation : https://github.com/MariaDB/mariadb-connector-nodejs/blob/master/lib/const/field-type.js + */ + + BaseTypes.DATE.types.mariadb = ['DATETIME']; + BaseTypes.STRING.types.mariadb = ['VAR_STRING']; + BaseTypes.CHAR.types.mariadb = ['STRING']; + BaseTypes.TEXT.types.mariadb = ['BLOB']; + BaseTypes.TINYINT.types.mariadb = ['TINY']; + BaseTypes.SMALLINT.types.mariadb = ['SHORT']; + BaseTypes.MEDIUMINT.types.mariadb = ['INT24']; + BaseTypes.INTEGER.types.mariadb = ['LONG']; + BaseTypes.BIGINT.types.mariadb = ['LONGLONG']; + BaseTypes.FLOAT.types.mariadb = ['FLOAT']; + BaseTypes.TIME.types.mariadb = ['TIME']; + BaseTypes.DATEONLY.types.mariadb = ['DATE']; + BaseTypes.BOOLEAN.types.mariadb = ['TINY']; + BaseTypes.BLOB.types.mariadb = ['TINYBLOB', 'BLOB', 'LONGBLOB']; + BaseTypes.DECIMAL.types.mariadb = ['NEWDECIMAL']; + BaseTypes.UUID.types.mariadb = false; + BaseTypes.ENUM.types.mariadb = false; + BaseTypes.REAL.types.mariadb = ['DOUBLE']; + BaseTypes.DOUBLE.types.mariadb = ['DOUBLE']; + BaseTypes.GEOMETRY.types.mariadb = ['GEOMETRY']; + BaseTypes.JSON.types.mariadb = ['JSON']; + + class DECIMAL extends BaseTypes.DECIMAL { + toSql() { + let definition = super.toSql(); + if (this._unsigned) { + definition += ' UNSIGNED'; + } + if (this._zerofill) { + definition += ' ZEROFILL'; + } + return definition; + } + } + + class DATE extends BaseTypes.DATE { + toSql() { + return `DATETIME${this._length ? `(${this._length})` : ''}`; + } + _stringify(date, options) { + date = this._applyTimezone(date, options); + return date.format('YYYY-MM-DD HH:mm:ss.SSS'); + } + static parse(value, options) { + value = value.string(); + if (value === null) { + return value; + } + if (moment.tz.zone(options.timezone)) { + value = moment.tz(value, options.timezone).toDate(); + } + else { + value = new Date(`${value} ${options.timezone}`); + } + return value; + } + } + + class DATEONLY extends BaseTypes.DATEONLY { + static parse(value) { + return value.string(); + } + } + + class UUID extends BaseTypes.UUID { + toSql() { + return 'CHAR(36) BINARY'; + } + } + + class GEOMETRY extends BaseTypes.GEOMETRY { + constructor(type, srid) { + super(type, srid); + if (_.isEmpty(this.type)) { + this.sqlType = this.key; + } + else { + this.sqlType = this.type; + } + } + toSql() { + return this.sqlType; + } + } + + class ENUM extends BaseTypes.ENUM { + toSql(options) { + return `ENUM(${this.values.map(value => options.escape(value)).join(', ')})`; + } + } + + class JSONTYPE extends BaseTypes.JSON { + _stringify(value, options) { + return options.operation === 'where' && typeof value === 'string' ? value + : JSON.stringify(value); + } + } + + return { + ENUM, + DATE, + DATEONLY, + UUID, + GEOMETRY, + DECIMAL, + JSON: JSONTYPE + }; +}; diff --git a/node_modules/sequelize/lib/dialects/mariadb/index.js b/node_modules/sequelize/lib/dialects/mariadb/index.js new file mode 100644 index 00000000..baba1e95 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mariadb/index.js @@ -0,0 +1,60 @@ +'use strict'; + +const _ = require('lodash'); +const AbstractDialect = require('../abstract'); +const ConnectionManager = require('./connection-manager'); +const Query = require('./query'); +const QueryGenerator = require('./query-generator'); +const DataTypes = require('../../data-types').mariadb; + +class MariadbDialect extends AbstractDialect { + constructor(sequelize) { + super(); + this.sequelize = sequelize; + this.connectionManager = new ConnectionManager(this, sequelize); + this.QueryGenerator = new QueryGenerator({ + _dialect: this, + sequelize + }); + } +} + +MariadbDialect.prototype.supports = _.merge( + _.cloneDeep(AbstractDialect.prototype.supports), { + 'VALUES ()': true, + 'LIMIT ON UPDATE': true, + lock: true, + forShare: 'LOCK IN SHARE MODE', + schemas: true, + inserts: { + ignoreDuplicates: ' IGNORE', + updateOnDuplicate: true + }, + index: { + collate: false, + length: true, + parser: true, + type: true, + using: 1 + }, + constraints: { + dropConstraint: false, + check: false + }, + indexViaAlter: true, + NUMERIC: true, + GEOMETRY: true, + JSON: true, + REGEXP: true + }); + +ConnectionManager.prototype.defaultVersion = '5.5.3'; +MariadbDialect.prototype.Query = Query; +MariadbDialect.prototype.QueryGenerator = QueryGenerator; +MariadbDialect.prototype.DataTypes = DataTypes; +MariadbDialect.prototype.name = 'mariadb'; +MariadbDialect.prototype.TICK_CHAR = '`'; +MariadbDialect.prototype.TICK_CHAR_LEFT = MariadbDialect.prototype.TICK_CHAR; +MariadbDialect.prototype.TICK_CHAR_RIGHT = MariadbDialect.prototype.TICK_CHAR; + +module.exports = MariadbDialect; diff --git a/node_modules/sequelize/lib/dialects/mariadb/query-generator.js b/node_modules/sequelize/lib/dialects/mariadb/query-generator.js new file mode 100644 index 00000000..8f0ce5f6 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mariadb/query-generator.js @@ -0,0 +1,104 @@ +'use strict'; + +const _ = require('lodash'); +const Utils = require('../../utils'); +const MySQLQueryGenerator = require('../mysql/query-generator'); +const util = require('util'); + +class MariaDBQueryGenerator extends MySQLQueryGenerator { + + createSchema(schema, options) { + options = Object.assign({ + charset: null, + collate: null + }, options || {}); + + const charset = options.charset ? ` DEFAULT CHARACTER SET ${this.escape(options.charset)}` : ''; + const collate = options.collate ? ` DEFAULT COLLATE ${this.escape(options.collate)}` : ''; + + return `CREATE SCHEMA IF NOT EXISTS ${this.quoteIdentifier(schema)}${charset}${collate};`; + } + + dropSchema(schema) { + return `DROP SCHEMA IF EXISTS ${this.quoteIdentifier(schema)};`; + } + + showSchemasQuery(options) { + const skip = options.skip && Array.isArray(options.skip) && options.skip.length > 0 ? options.skip : null; + return `SELECT SCHEMA_NAME as schema_name FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('MYSQL', 'INFORMATION_SCHEMA', 'PERFORMANCE_SCHEMA'${skip ? skip.reduce( (sql, schemaName) => sql += `,${this.escape(schemaName)}`, '') : ''});`; + } + + showTablesQuery() { + return 'SELECT TABLE_NAME, TABLE_SCHEMA FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA NOT IN (\'MYSQL\', \'INFORMATION_SCHEMA\', \'PERFORMANCE_SCHEMA\') AND TABLE_TYPE = \'BASE TABLE\''; + } + + handleSequelizeMethod(smth, tableName, factory, options, prepend) { + if (smth instanceof Utils.Json) { + // Parse nested object + if (smth.conditions) { + const conditions = this.parseConditionObject(smth.conditions).map( + condition => + `json_unquote(json_extract(${this.quoteIdentifier( + condition.path[0])},'$.${_.tail(condition.path).join( + '.')}')) = '${condition.value}'` + ); + + return conditions.join(' and '); + } + if (smth.path) { + let str; + + // Allow specifying conditions using the sqlite json functions + if (this._checkValidJsonStatement(smth.path)) { + str = smth.path; + } else { + // Also support json dot notation + let path = smth.path; + let startWithDot = true; + + // Convert .number. to [number]. + path = path.replace(/\.(\d+)\./g, '[$1].'); + // Convert .number$ to [number] + path = path.replace(/\.(\d+)$/, '[$1]'); + + path = path.split('.'); + + let columnName = path.shift(); + const match = columnName.match(/\[\d+\]$/); + // If columnName ends with [\d+] + if (match !== null) { + path.unshift(columnName.substr(match.index)); + columnName = columnName.substr(0, match.index); + startWithDot = false; + } + + str = `json_unquote(json_extract(${this.quoteIdentifier( + columnName)},'$${startWithDot ? '.' : ''}${path.join('.')}'))`; + } + + if (smth.value) { + str += util.format(' = %s', this.escape(smth.value)); + } + + return str; + } + } else if (smth instanceof Utils.Cast) { + const lowType = smth.type.toLowerCase(); + if (lowType.includes('timestamp')) { + smth.type = 'datetime'; + } else if (smth.json && lowType.includes('boolean')) { + // true or false cannot be casted as booleans within a JSON structure + smth.type = 'char'; + } else if (lowType.includes('double precision') || lowType.includes('boolean') || lowType.includes('integer')) { + smth.type = 'decimal'; + } else if (lowType.includes('text')) { + smth.type = 'char'; + } + } + + return super.handleSequelizeMethod(smth, tableName, factory, options, prepend); + } + +} + +module.exports = MariaDBQueryGenerator; diff --git a/node_modules/sequelize/lib/dialects/mariadb/query.js b/node_modules/sequelize/lib/dialects/mariadb/query.js new file mode 100644 index 00000000..4ea0fc5d --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mariadb/query.js @@ -0,0 +1,324 @@ +'use strict'; + +const AbstractQuery = require('../abstract/query'); +const sequelizeErrors = require('../../errors'); +const _ = require('lodash'); +const DataTypes = require('../../data-types'); +const Promise = require('../../promise'); +const { logger } = require('../../utils/logger'); + +const ER_DUP_ENTRY = 1062; +const ER_ROW_IS_REFERENCED = 1451; +const ER_NO_REFERENCED_ROW = 1452; + +const debug = logger.debugContext('sql:mariadb'); + +class Query extends AbstractQuery { + constructor(connection, sequelize, options) { + super(connection, sequelize, Object.assign({ showWarnings: false }, options)); + } + + static formatBindParameters(sql, values, dialect) { + const bindParam = []; + const replacementFunc = (match, key, val) => { + if (val[key] !== undefined) { + bindParam.push(val[key]); + return '?'; + } + return undefined; + }; + sql = AbstractQuery.formatBindParameters(sql, values, dialect, + replacementFunc)[0]; + return [sql, bindParam.length > 0 ? bindParam : undefined]; + } + + run(sql, parameters) { + this.sql = sql; + const { connection, options } = this; + + const showWarnings = this.sequelize.options.showWarnings + || options.showWarnings; + + const complete = this._logQuery(sql, debug); + + if (parameters) { + debug('parameters(%j)', parameters); + } + return Promise.resolve( + connection.query(this.sql, parameters) + .then(results => { + complete(); + + // Log warnings if we've got them. + if (showWarnings && results && results.warningStatus > 0) { + return this.logWarnings(results); + } + return results; + }) + .catch(err => { + // MariaDB automatically rolls-back transactions in the event of a deadlock + if (options.transaction && err.errno === 1213) { + options.transaction.finished = 'rollback'; + } + + complete(); + + err.sql = sql; + throw this.formatError(err); + }) + ) + // Log warnings if we've got them. + .then(results => { + if (showWarnings && results && results.warningStatus > 0) { + return this.logWarnings(results); + } + return results; + }) + // Return formatted results... + .then(results => this.formatResults(results)); + } + + /** + * High level function that handles the results of a query execution. + * + * + * Example: + * query.formatResults([ + * { + * id: 1, // this is from the main table + * attr2: 'snafu', // this is from the main table + * Tasks.id: 1, // this is from the associated table + * Tasks.title: 'task' // this is from the associated table + * } + * ]) + * + * @param {Array} data - The result of the query execution. + * @private + */ + formatResults(data) { + let result = this.instance; + + if (this.isBulkUpdateQuery() || this.isBulkDeleteQuery() + || this.isUpsertQuery()) { + return data.affectedRows; + } + if (this.isInsertQuery(data)) { + this.handleInsertQuery(data); + + if (!this.instance) { + // handle bulkCreate AI primary key + if (this.model + && this.model.autoIncrementAttribute + && this.model.autoIncrementAttribute === this.model.primaryKeyAttribute + && this.model.rawAttributes[this.model.primaryKeyAttribute] + ) { + //ONLY TRUE IF @auto_increment_increment is set to 1 !! + //Doesn't work with GALERA => each node will reserve increment (x for first server, x+1 for next node ... + const startId = data[this.getInsertIdField()]; + result = new Array(data.affectedRows); + const pkField = this.model.rawAttributes[this.model.primaryKeyAttribute].field; + for (let i = 0; i < data.affectedRows; i++) { + result[i] = { [pkField]: startId + i }; + } + return [result, data.affectedRows]; + } + return [data[this.getInsertIdField()], data.affectedRows]; + } + } + + if (this.isSelectQuery()) { + this.handleJsonSelectQuery(data); + return this.handleSelectQuery(data); + } + if (this.isInsertQuery() || this.isUpdateQuery()) { + return [result, data.affectedRows]; + } + if (this.isCallQuery()) { + return data[0]; + } + if (this.isRawQuery()) { + const meta = data.meta; + delete data.meta; + return [data, meta]; + } + if (this.isShowIndexesQuery()) { + return this.handleShowIndexesQuery(data); + } + if (this.isForeignKeysQuery() || this.isShowConstraintsQuery()) { + return data; + } + if (this.isShowTablesQuery()) { + return this.handleShowTablesQuery(data); + } + if (this.isDescribeQuery()) { + result = {}; + + for (const _result of data) { + result[_result.Field] = { + type: _result.Type.toLowerCase().startsWith('enum') ? _result.Type.replace(/^enum/i, + 'ENUM') : _result.Type.toUpperCase(), + allowNull: _result.Null === 'YES', + defaultValue: _result.Default, + primaryKey: _result.Key === 'PRI', + autoIncrement: Object.prototype.hasOwnProperty.call(_result, 'Extra') + && _result.Extra.toLowerCase() === 'auto_increment', + comment: _result.Comment ? _result.Comment : null + }; + } + return result; + } + if (this.isVersionQuery()) { + return data[0].version; + } + + return result; + } + + handleJsonSelectQuery(rows) { + if (!this.model || !this.model.fieldRawAttributesMap) { + return; + } + for (const _field of Object.keys(this.model.fieldRawAttributesMap)) { + const modelField = this.model.fieldRawAttributesMap[_field]; + if (modelField.type instanceof DataTypes.JSON) { + //value is return as String, no JSON + rows = rows.map(row => { + row[modelField.fieldName] = row[modelField.fieldName] ? JSON.parse( + row[modelField.fieldName]) : null; + if (DataTypes.JSON.parse) { + return DataTypes.JSON.parse(modelField, this.sequelize.options, + row[modelField.fieldName]); + } + return row; + }); + } + } + } + + logWarnings(results) { + return this.run('SHOW WARNINGS').then(warningResults => { + const warningMessage = `MariaDB Warnings (${this.connection.uuid + || 'default'}): `; + const messages = []; + for (const _warningRow of warningResults) { + if (_warningRow === undefined || typeof _warningRow[Symbol.iterator] + !== 'function') { + continue; + } + for (const _warningResult of _warningRow) { + if (Object.prototype.hasOwnProperty.call(_warningResult, 'Message')) { + messages.push(_warningResult.Message); + } else { + for (const _objectKey of _warningResult.keys()) { + messages.push( + [_objectKey, _warningResult[_objectKey]].join(': ')); + } + } + } + } + + this.sequelize.log(warningMessage + messages.join('; '), this.options); + + return results; + }); + } + + formatError(err) { + switch (err.errno) { + case ER_DUP_ENTRY: { + const match = err.message.match( + /Duplicate entry '([\s\S]*)' for key '?((.|\s)*?)'?\s.*$/); + + let fields = {}; + let message = 'Validation error'; + const values = match ? match[1].split('-') : undefined; + const fieldKey = match ? match[2] : undefined; + const fieldVal = match ? match[1] : undefined; + const uniqueKey = this.model && this.model.uniqueKeys[fieldKey]; + + if (uniqueKey) { + if (uniqueKey.msg) { + message = uniqueKey.msg; + } + fields = _.zipObject(uniqueKey.fields, values); + } else { + fields[fieldKey] = fieldVal; + } + + const errors = []; + _.forOwn(fields, (value, field) => { + errors.push(new sequelizeErrors.ValidationErrorItem( + this.getUniqueConstraintErrorMessage(field), + 'unique violation', // sequelizeErrors.ValidationErrorItem.Origins.DB, + field, + value, + this.instance, + 'not_unique' + )); + }); + + return new sequelizeErrors.UniqueConstraintError( + { message, errors, parent: err, fields }); + } + + case ER_ROW_IS_REFERENCED: + case ER_NO_REFERENCED_ROW: { + // e.g. CONSTRAINT `example_constraint_name` FOREIGN KEY (`example_id`) REFERENCES `examples` (`id`) + const match = err.message.match( + /CONSTRAINT ([`"])(.*)\1 FOREIGN KEY \(\1(.*)\1\) REFERENCES \1(.*)\1 \(\1(.*)\1\)/); + const quoteChar = match ? match[1] : '`'; + const fields = match ? match[3].split( + new RegExp(`${quoteChar}, *${quoteChar}`)) : undefined; + return new sequelizeErrors.ForeignKeyConstraintError({ + reltype: err.errno === 1451 ? 'parent' : 'child', + table: match ? match[4] : undefined, + fields, + value: fields && fields.length && this.instance + && this.instance[fields[0]] || undefined, + index: match ? match[2] : undefined, + parent: err + }); + } + + default: + return new sequelizeErrors.DatabaseError(err); + } + } + + handleShowTablesQuery(results) { + return results.map(resultSet => ({ + tableName: resultSet.TABLE_NAME, + schema: resultSet.TABLE_SCHEMA + })); + } + + handleShowIndexesQuery(data) { + + let currItem; + const result = []; + + data.forEach(item => { + if (!currItem || currItem.name !== item.Key_name) { + currItem = { + primary: item.Key_name === 'PRIMARY', + fields: [], + name: item.Key_name, + tableName: item.Table, + unique: item.Non_unique !== 1, + type: item.Index_type + }; + result.push(currItem); + } + + currItem.fields[item.Seq_in_index - 1] = { + attribute: item.Column_name, + length: item.Sub_part || undefined, + order: item.Collation === 'A' ? 'ASC' : undefined + }; + }); + + return result; + } +} + +module.exports = Query; diff --git a/node_modules/sequelize/lib/dialects/mssql/connection-manager.js b/node_modules/sequelize/lib/dialects/mssql/connection-manager.js new file mode 100644 index 00000000..9960f0d9 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mssql/connection-manager.js @@ -0,0 +1,180 @@ +'use strict'; + +const AbstractConnectionManager = require('../abstract/connection-manager'); +const ResourceLock = require('./resource-lock'); +const Promise = require('../../promise'); +const { logger } = require('../../utils/logger'); +const sequelizeErrors = require('../../errors'); +const DataTypes = require('../../data-types').mssql; +const parserStore = require('../parserStore')('mssql'); +const debug = logger.debugContext('connection:mssql'); +const debugTedious = logger.debugContext('connection:mssql:tedious'); + +class ConnectionManager extends AbstractConnectionManager { + constructor(dialect, sequelize) { + sequelize.config.port = sequelize.config.port || 1433; + super(dialect, sequelize); + this.lib = this._loadDialectModule('tedious'); + this.refreshTypeParser(DataTypes); + } + + _refreshTypeParser(dataType) { + parserStore.refresh(dataType); + } + + _clearTypeParser() { + parserStore.clear(); + } + + connect(config) { + const connectionConfig = { + server: config.host, + authentication: { + type: 'default', + options: { + userName: config.username || undefined, + password: config.password || undefined + } + }, + options: { + port: parseInt(config.port, 10), + database: config.database, + encrypt: false + } + }; + + if (config.dialectOptions) { + // only set port if no instance name was provided + if ( + config.dialectOptions.options && + config.dialectOptions.options.instanceName + ) { + delete connectionConfig.options.port; + } + + if (config.dialectOptions.authentication) { + Object.assign(connectionConfig.authentication, config.dialectOptions.authentication); + } + + Object.assign(connectionConfig.options, config.dialectOptions.options); + } + + return new Promise((resolve, reject) => { + const connection = new this.lib.Connection(connectionConfig); + connection.lib = this.lib; + const resourceLock = new ResourceLock(connection); + + const connectHandler = error => { + connection.removeListener('end', endHandler); + connection.removeListener('error', errorHandler); + + if (error) return reject(error); + + debug('connection acquired'); + resolve(resourceLock); + }; + + const endHandler = () => { + connection.removeListener('connect', connectHandler); + connection.removeListener('error', errorHandler); + reject(new Error('Connection was closed by remote server')); + }; + + const errorHandler = error => { + connection.removeListener('connect', connectHandler); + connection.removeListener('end', endHandler); + reject(error); + }; + + connection.once('error', errorHandler); + connection.once('end', endHandler); + connection.once('connect', connectHandler); + + /* + * Permanently attach this event before connection is even acquired + * tedious sometime emits error even after connect(with error). + * + * If we dont attach this even that unexpected error event will crash node process + * + * E.g. connectTimeout is set higher than requestTimeout + */ + connection.on('error', error => { + switch (error.code) { + case 'ESOCKET': + case 'ECONNRESET': + this.pool.destroy(resourceLock); + } + }); + + if (config.dialectOptions && config.dialectOptions.debug) { + connection.on('debug', debugTedious.log.bind(debugTedious)); + } + }).catch(error => { + if (!error.code) { + throw new sequelizeErrors.ConnectionError(error); + } + + switch (error.code) { + case 'ESOCKET': + if (error.message.includes('connect EHOSTUNREACH')) { + throw new sequelizeErrors.HostNotReachableError(error); + } + if (error.message.includes('connect ENETUNREACH')) { + throw new sequelizeErrors.HostNotReachableError(error); + } + if (error.message.includes('connect EADDRNOTAVAIL')) { + throw new sequelizeErrors.HostNotReachableError(error); + } + if (error.message.includes('getaddrinfo ENOTFOUND')) { + throw new sequelizeErrors.HostNotFoundError(error); + } + if (error.message.includes('connect ECONNREFUSED')) { + throw new sequelizeErrors.ConnectionRefusedError(error); + } + throw new sequelizeErrors.ConnectionError(error); + case 'ER_ACCESS_DENIED_ERROR': + case 'ELOGIN': + throw new sequelizeErrors.AccessDeniedError(error); + case 'EINVAL': + throw new sequelizeErrors.InvalidConnectionError(error); + default: + throw new sequelizeErrors.ConnectionError(error); + } + }); + } + + disconnect(connectionLock) { + /** + * Abstract connection may try to disconnect raw connection used for fetching version + */ + const connection = connectionLock.unwrap + ? connectionLock.unwrap() + : connectionLock; + + // Don't disconnect a connection that is already disconnected + if (connection.closed) { + return Promise.resolve(); + } + + return new Promise(resolve => { + connection.on('end', resolve); + connection.close(); + debug('connection closed'); + }); + } + + validate(connectionLock) { + /** + * Abstract connection may try to validate raw connection used for fetching version + */ + const connection = connectionLock.unwrap + ? connectionLock.unwrap() + : connectionLock; + + return connection && connection.loggedIn; + } +} + +module.exports = ConnectionManager; +module.exports.ConnectionManager = ConnectionManager; +module.exports.default = ConnectionManager; diff --git a/node_modules/sequelize/lib/dialects/mssql/data-types.js b/node_modules/sequelize/lib/dialects/mssql/data-types.js new file mode 100644 index 00000000..48adfe9e --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mssql/data-types.js @@ -0,0 +1,216 @@ +'use strict'; + +const moment = require('moment'); + +module.exports = BaseTypes => { + const warn = BaseTypes.ABSTRACT.warn.bind(undefined, 'https://msdn.microsoft.com/en-us/library/ms187752%28v=sql.110%29.aspx'); + + /** + * Removes unsupported MSSQL options, i.e., LENGTH, UNSIGNED and ZEROFILL, for the integer data types. + * + * @param {Object} dataType The base integer data type. + * @private + */ + function removeUnsupportedIntegerOptions(dataType) { + if (dataType._length || dataType.options.length || dataType._unsigned || dataType._zerofill) { + warn(`MSSQL does not support '${dataType.key}' with options. Plain '${dataType.key}' will be used instead.`); + dataType._length = undefined; + dataType.options.length = undefined; + dataType._unsigned = undefined; + dataType._zerofill = undefined; + } + } + + /** + * types: [hex, ...] + * @see hex here https://github.com/tediousjs/tedious/blob/master/src/data-type.js + */ + + BaseTypes.DATE.types.mssql = [43]; + BaseTypes.STRING.types.mssql = [231, 173]; + BaseTypes.CHAR.types.mssql = [175]; + BaseTypes.TEXT.types.mssql = false; + // https://msdn.microsoft.com/en-us/library/ms187745(v=sql.110).aspx + BaseTypes.TINYINT.types.mssql = [30]; + BaseTypes.SMALLINT.types.mssql = [34]; + BaseTypes.MEDIUMINT.types.mssql = false; + BaseTypes.INTEGER.types.mssql = [38]; + BaseTypes.BIGINT.types.mssql = false; + BaseTypes.FLOAT.types.mssql = [109]; + BaseTypes.TIME.types.mssql = [41]; + BaseTypes.DATEONLY.types.mssql = [40]; + BaseTypes.BOOLEAN.types.mssql = [104]; + BaseTypes.BLOB.types.mssql = [165]; + BaseTypes.DECIMAL.types.mssql = [106]; + BaseTypes.UUID.types.mssql = false; + BaseTypes.ENUM.types.mssql = false; + BaseTypes.REAL.types.mssql = [109]; + BaseTypes.DOUBLE.types.mssql = [109]; + // BaseTypes.GEOMETRY.types.mssql = [240]; // not yet supported + BaseTypes.GEOMETRY.types.mssql = false; + + class BLOB extends BaseTypes.BLOB { + toSql() { + if (this._length) { + if (this._length.toLowerCase() === 'tiny') { // tiny = 2^8 + warn('MSSQL does not support BLOB with the `length` = `tiny` option. `VARBINARY(256)` will be used instead.'); + return 'VARBINARY(256)'; + } + warn('MSSQL does not support BLOB with the `length` option. `VARBINARY(MAX)` will be used instead.'); + } + return 'VARBINARY(MAX)'; + } + _hexify(hex) { + return `0x${hex}`; + } + } + + + class STRING extends BaseTypes.STRING { + toSql() { + if (!this._binary) { + return `NVARCHAR(${this._length})`; + } + return `BINARY(${this._length})`; + } + _stringify(value, options) { + if (this._binary) { + return BLOB.prototype._stringify(value); + } + return options.escape(value); + } + _bindParam(value, options) { + return options.bindParam(this._binary ? Buffer.from(value) : value); + } + } + + STRING.prototype.escape = false; + + class TEXT extends BaseTypes.TEXT { + toSql() { + // TEXT is deprecated in mssql and it would normally be saved as a non-unicode string. + // Using unicode is just future proof + if (this._length) { + if (this._length.toLowerCase() === 'tiny') { // tiny = 2^8 + warn('MSSQL does not support TEXT with the `length` = `tiny` option. `NVARCHAR(256)` will be used instead.'); + return 'NVARCHAR(256)'; + } + warn('MSSQL does not support TEXT with the `length` option. `NVARCHAR(MAX)` will be used instead.'); + } + return 'NVARCHAR(MAX)'; + } + } + + class BOOLEAN extends BaseTypes.BOOLEAN { + toSql() { + return 'BIT'; + } + } + + class UUID extends BaseTypes.UUID { + toSql() { + return 'CHAR(36)'; + } + } + + class NOW extends BaseTypes.NOW { + toSql() { + return 'GETDATE()'; + } + } + + class DATE extends BaseTypes.DATE { + toSql() { + return 'DATETIMEOFFSET'; + } + } + + class DATEONLY extends BaseTypes.DATEONLY { + static parse(value) { + return moment(value).format('YYYY-MM-DD'); + } + } + + class INTEGER extends BaseTypes.INTEGER { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + class TINYINT extends BaseTypes.TINYINT { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + class SMALLINT extends BaseTypes.SMALLINT { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + class BIGINT extends BaseTypes.BIGINT { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + class REAL extends BaseTypes.REAL { + constructor(length, decimals) { + super(length, decimals); + // MSSQL does not support any options for real + if (this._length || this.options.length || this._unsigned || this._zerofill) { + warn('MSSQL does not support REAL with options. Plain `REAL` will be used instead.'); + this._length = undefined; + this.options.length = undefined; + this._unsigned = undefined; + this._zerofill = undefined; + } + } + } + class FLOAT extends BaseTypes.FLOAT { + constructor(length, decimals) { + super(length, decimals); + // MSSQL does only support lengths as option. + // Values between 1-24 result in 7 digits precision (4 bytes storage size) + // Values between 25-53 result in 15 digits precision (8 bytes storage size) + // If decimals are provided remove these and print a warning + if (this._decimals) { + warn('MSSQL does not support Float with decimals. Plain `FLOAT` will be used instead.'); + this._length = undefined; + this.options.length = undefined; + } + if (this._unsigned) { + warn('MSSQL does not support Float unsigned. `UNSIGNED` was removed.'); + this._unsigned = undefined; + } + if (this._zerofill) { + warn('MSSQL does not support Float zerofill. `ZEROFILL` was removed.'); + this._zerofill = undefined; + } + } + } + class ENUM extends BaseTypes.ENUM { + toSql() { + return 'VARCHAR(255)'; + } + } + + return { + BLOB, + BOOLEAN, + ENUM, + STRING, + UUID, + DATE, + DATEONLY, + NOW, + TINYINT, + SMALLINT, + INTEGER, + BIGINT, + REAL, + FLOAT, + TEXT + }; +}; diff --git a/node_modules/sequelize/lib/dialects/mssql/index.js b/node_modules/sequelize/lib/dialects/mssql/index.js new file mode 100644 index 00000000..28c0889a --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mssql/index.js @@ -0,0 +1,63 @@ +'use strict'; + +const _ = require('lodash'); +const AbstractDialect = require('../abstract'); +const ConnectionManager = require('./connection-manager'); +const Query = require('./query'); +const QueryGenerator = require('./query-generator'); +const DataTypes = require('../../data-types').mssql; + +class MssqlDialect extends AbstractDialect { + constructor(sequelize) { + super(); + this.sequelize = sequelize; + this.connectionManager = new ConnectionManager(this, sequelize); + this.QueryGenerator = new QueryGenerator({ + _dialect: this, + sequelize + }); + } +} + +MssqlDialect.prototype.supports = _.merge(_.cloneDeep(AbstractDialect.prototype.supports), { + 'DEFAULT': true, + 'DEFAULT VALUES': true, + 'LIMIT ON UPDATE': true, + 'ORDER NULLS': false, + lock: false, + transactions: true, + migrations: false, + returnValues: { + output: true + }, + schemas: true, + autoIncrement: { + identityInsert: true, + defaultValue: false, + update: false + }, + constraints: { + restrict: false, + default: true + }, + index: { + collate: false, + length: false, + parser: false, + type: true, + using: false, + where: true + }, + NUMERIC: true, + tmpTableTrigger: true +}); + +ConnectionManager.prototype.defaultVersion = '12.0.2000'; // SQL Server 2014 Express +MssqlDialect.prototype.Query = Query; +MssqlDialect.prototype.name = 'mssql'; +MssqlDialect.prototype.TICK_CHAR = '"'; +MssqlDialect.prototype.TICK_CHAR_LEFT = '['; +MssqlDialect.prototype.TICK_CHAR_RIGHT = ']'; +MssqlDialect.prototype.DataTypes = DataTypes; + +module.exports = MssqlDialect; diff --git a/node_modules/sequelize/lib/dialects/mssql/query-generator.js b/node_modules/sequelize/lib/dialects/mssql/query-generator.js new file mode 100644 index 00000000..439b920d --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mssql/query-generator.js @@ -0,0 +1,899 @@ +'use strict'; + +const _ = require('lodash'); +const Utils = require('../../utils'); +const DataTypes = require('../../data-types'); +const TableHints = require('../../table-hints'); +const AbstractQueryGenerator = require('../abstract/query-generator'); +const randomBytes = require('crypto').randomBytes; +const semver = require('semver'); +const Op = require('../../operators'); + +/* istanbul ignore next */ +const throwMethodUndefined = function(methodName) { + throw new Error(`The method "${methodName}" is not defined! Please add it to your sql dialect.`); +}; + +class MSSQLQueryGenerator extends AbstractQueryGenerator { + createDatabaseQuery(databaseName, options) { + options = Object.assign({ + collate: null + }, options || {}); + + const collation = options.collate ? `COLLATE ${this.escape(options.collate)}` : ''; + + return [ + 'IF NOT EXISTS (SELECT * FROM sys.databases WHERE name =', wrapSingleQuote(databaseName), ')', + 'BEGIN', + 'CREATE DATABASE', this.quoteIdentifier(databaseName), + `${collation};`, + 'END;' + ].join(' '); + } + + dropDatabaseQuery(databaseName) { + return [ + 'IF EXISTS (SELECT * FROM sys.databases WHERE name =', wrapSingleQuote(databaseName), ')', + 'BEGIN', + 'DROP DATABASE', this.quoteIdentifier(databaseName), ';', + 'END;' + ].join(' '); + } + + createSchema(schema) { + return [ + 'IF NOT EXISTS (SELECT schema_name', + 'FROM information_schema.schemata', + 'WHERE schema_name =', wrapSingleQuote(schema), ')', + 'BEGIN', + "EXEC sp_executesql N'CREATE SCHEMA", + this.quoteIdentifier(schema), + ";'", + 'END;' + ].join(' '); + } + + dropSchema(schema) { + // Mimics Postgres CASCADE, will drop objects belonging to the schema + const quotedSchema = wrapSingleQuote(schema); + return [ + 'IF EXISTS (SELECT schema_name', + 'FROM information_schema.schemata', + 'WHERE schema_name =', quotedSchema, ')', + 'BEGIN', + 'DECLARE @id INT, @ms_sql NVARCHAR(2000);', + 'DECLARE @cascade TABLE (', + 'id INT NOT NULL IDENTITY PRIMARY KEY,', + 'ms_sql NVARCHAR(2000) NOT NULL );', + 'INSERT INTO @cascade ( ms_sql )', + "SELECT CASE WHEN o.type IN ('F','PK')", + "THEN N'ALTER TABLE ['+ s.name + N'].[' + p.name + N'] DROP CONSTRAINT [' + o.name + N']'", + "ELSE N'DROP TABLE ['+ s.name + N'].[' + o.name + N']' END", + 'FROM sys.objects o', + 'JOIN sys.schemas s on o.schema_id = s.schema_id', + 'LEFT OUTER JOIN sys.objects p on o.parent_object_id = p.object_id', + "WHERE o.type IN ('F', 'PK', 'U') AND s.name = ", quotedSchema, + 'ORDER BY o.type ASC;', + 'SELECT TOP 1 @id = id, @ms_sql = ms_sql FROM @cascade ORDER BY id;', + 'WHILE @id IS NOT NULL', + 'BEGIN', + 'BEGIN TRY EXEC sp_executesql @ms_sql; END TRY', + 'BEGIN CATCH BREAK; THROW; END CATCH;', + 'DELETE FROM @cascade WHERE id = @id;', + 'SELECT @id = NULL, @ms_sql = NULL;', + 'SELECT TOP 1 @id = id, @ms_sql = ms_sql FROM @cascade ORDER BY id;', + 'END', + "EXEC sp_executesql N'DROP SCHEMA", this.quoteIdentifier(schema), ";'", + 'END;' + ].join(' '); + } + + showSchemasQuery() { + return [ + 'SELECT "name" as "schema_name" FROM sys.schemas as s', + 'WHERE "s"."name" NOT IN (', + "'INFORMATION_SCHEMA', 'dbo', 'guest', 'sys', 'archive'", + ')', 'AND', '"s"."name" NOT LIKE', "'db_%'" + ].join(' '); + } + + versionQuery() { + // Uses string manipulation to convert the MS Maj.Min.Patch.Build to semver Maj.Min.Patch + return [ + 'DECLARE @ms_ver NVARCHAR(20);', + "SET @ms_ver = REVERSE(CONVERT(NVARCHAR(20), SERVERPROPERTY('ProductVersion')));", + "SELECT REVERSE(SUBSTRING(@ms_ver, CHARINDEX('.', @ms_ver)+1, 20)) AS 'version'" + ].join(' '); + } + + createTableQuery(tableName, attributes, options) { + const query = (table, attrs) => `IF OBJECT_ID('${table}', 'U') IS NULL CREATE TABLE ${table} (${attrs})`, + primaryKeys = [], + foreignKeys = {}, + attrStr = []; + + let commentStr = ''; + + for (const attr in attributes) { + if (Object.prototype.hasOwnProperty.call(attributes, attr)) { + let dataType = attributes[attr]; + let match; + + if (dataType.includes('COMMENT ')) { + const commentMatch = dataType.match(/^(.+) (COMMENT.*)$/); + const commentText = commentMatch[2].replace('COMMENT', '').trim(); + commentStr += this.commentTemplate(commentText, tableName, attr); + // remove comment related substring from dataType + dataType = commentMatch[1]; + } + + if (dataType.includes('PRIMARY KEY')) { + primaryKeys.push(attr); + + if (dataType.includes('REFERENCES')) { + // MSSQL doesn't support inline REFERENCES declarations: move to the end + match = dataType.match(/^(.+) (REFERENCES.*)$/); + attrStr.push(`${this.quoteIdentifier(attr)} ${match[1].replace('PRIMARY KEY', '')}`); + foreignKeys[attr] = match[2]; + } else { + attrStr.push(`${this.quoteIdentifier(attr)} ${dataType.replace('PRIMARY KEY', '')}`); + } + } else if (dataType.includes('REFERENCES')) { + // MSSQL doesn't support inline REFERENCES declarations: move to the end + match = dataType.match(/^(.+) (REFERENCES.*)$/); + attrStr.push(`${this.quoteIdentifier(attr)} ${match[1]}`); + foreignKeys[attr] = match[2]; + } else { + attrStr.push(`${this.quoteIdentifier(attr)} ${dataType}`); + } + } + } + + + let attributesClause = attrStr.join(', '); + const pkString = primaryKeys.map(pk => this.quoteIdentifier(pk)).join(', '); + + if (options.uniqueKeys) { + _.each(options.uniqueKeys, (columns, indexName) => { + if (columns.customIndex) { + if (typeof indexName !== 'string') { + indexName = `uniq_${tableName}_${columns.fields.join('_')}`; + } + attributesClause += `, CONSTRAINT ${this.quoteIdentifier(indexName)} UNIQUE (${columns.fields.map(field => this.quoteIdentifier(field)).join(', ')})`; + } + }); + } + + if (pkString.length > 0) { + attributesClause += `, PRIMARY KEY (${pkString})`; + } + + for (const fkey in foreignKeys) { + if (Object.prototype.hasOwnProperty.call(foreignKeys, fkey)) { + attributesClause += `, FOREIGN KEY (${this.quoteIdentifier(fkey)}) ${foreignKeys[fkey]}`; + } + } + + return `${query(this.quoteTable(tableName), attributesClause)};${commentStr}`; + } + + describeTableQuery(tableName, schema) { + let sql = [ + 'SELECT', + "c.COLUMN_NAME AS 'Name',", + "c.DATA_TYPE AS 'Type',", + "c.CHARACTER_MAXIMUM_LENGTH AS 'Length',", + "c.IS_NULLABLE as 'IsNull',", + "COLUMN_DEFAULT AS 'Default',", + "pk.CONSTRAINT_TYPE AS 'Constraint',", + "COLUMNPROPERTY(OBJECT_ID(c.TABLE_SCHEMA+'.'+c.TABLE_NAME), c.COLUMN_NAME, 'IsIdentity') as 'IsIdentity',", + "prop.value AS 'Comment'", + 'FROM', + 'INFORMATION_SCHEMA.TABLES t', + 'INNER JOIN', + 'INFORMATION_SCHEMA.COLUMNS c ON t.TABLE_NAME = c.TABLE_NAME AND t.TABLE_SCHEMA = c.TABLE_SCHEMA', + 'LEFT JOIN (SELECT tc.table_schema, tc.table_name, ', + 'cu.column_name, tc.constraint_type ', + 'FROM information_schema.TABLE_CONSTRAINTS tc ', + 'JOIN information_schema.KEY_COLUMN_USAGE cu ', + 'ON tc.table_schema=cu.table_schema and tc.table_name=cu.table_name ', + 'and tc.constraint_name=cu.constraint_name ', + 'and tc.constraint_type=\'PRIMARY KEY\') pk ', + 'ON pk.table_schema=c.table_schema ', + 'AND pk.table_name=c.table_name ', + 'AND pk.column_name=c.column_name ', + 'INNER JOIN sys.columns AS sc', + "ON sc.object_id = object_id(t.table_schema + '.' + t.table_name) AND sc.name = c.column_name", + 'LEFT JOIN sys.extended_properties prop ON prop.major_id = sc.object_id', + 'AND prop.minor_id = sc.column_id', + "AND prop.name = 'MS_Description'", + 'WHERE t.TABLE_NAME =', wrapSingleQuote(tableName) + ].join(' '); + + if (schema) { + sql += `AND t.TABLE_SCHEMA =${wrapSingleQuote(schema)}`; + } + + return sql; + } + + renameTableQuery(before, after) { + return `EXEC sp_rename ${this.quoteTable(before)}, ${this.quoteTable(after)};`; + } + + showTablesQuery() { + return 'SELECT TABLE_NAME, TABLE_SCHEMA FROM INFORMATION_SCHEMA.TABLES;'; + } + + dropTableQuery(tableName) { + const qouteTbl = this.quoteTable(tableName); + return `IF OBJECT_ID('${qouteTbl}', 'U') IS NOT NULL DROP TABLE ${qouteTbl};`; + } + + addColumnQuery(table, key, dataType) { + // FIXME: attributeToSQL SHOULD be using attributes in addColumnQuery + // but instead we need to pass the key along as the field here + dataType.field = key; + let commentStr = ''; + + if (dataType.comment && _.isString(dataType.comment)) { + commentStr = this.commentTemplate(dataType.comment, table, key); + // attributeToSQL will try to include `COMMENT 'Comment Text'` when it returns if the comment key + // is present. This is needed for createTable statement where that part is extracted with regex. + // Here we can intercept the object and remove comment property since we have the original object. + delete dataType['comment']; + } + + const def = this.attributeToSQL(dataType, { + context: 'addColumn' + }); + return `ALTER TABLE ${this.quoteTable(table)} ADD ${this.quoteIdentifier(key)} ${def};${commentStr}`; + } + + commentTemplate(comment, table, column) { + return ' EXEC sp_addextendedproperty ' + + `@name = N'MS_Description', @value = ${this.escape(comment)}, ` + + '@level0type = N\'Schema\', @level0name = \'dbo\', ' + + `@level1type = N'Table', @level1name = ${this.quoteIdentifier(table)}, ` + + `@level2type = N'Column', @level2name = ${this.quoteIdentifier(column)};`; + } + + removeColumnQuery(tableName, attributeName) { + return `ALTER TABLE ${this.quoteTable(tableName)} DROP COLUMN ${this.quoteIdentifier(attributeName)};`; + } + + changeColumnQuery(tableName, attributes) { + const attrString = [], + constraintString = []; + let commentString = ''; + + for (const attributeName in attributes) { + const quotedAttrName = this.quoteIdentifier(attributeName); + let definition = attributes[attributeName]; + if (definition.includes('COMMENT ')) { + const commentMatch = definition.match(/^(.+) (COMMENT.*)$/); + const commentText = commentMatch[2].replace('COMMENT', '').trim(); + commentString += this.commentTemplate(commentText, tableName, attributeName); + // remove comment related substring from dataType + definition = commentMatch[1]; + } + if (definition.includes('REFERENCES')) { + constraintString.push(`FOREIGN KEY (${quotedAttrName}) ${definition.replace(/.+?(?=REFERENCES)/, '')}`); + } else { + attrString.push(`${quotedAttrName} ${definition}`); + } + } + + let finalQuery = ''; + if (attrString.length) { + finalQuery += `ALTER COLUMN ${attrString.join(', ')}`; + finalQuery += constraintString.length ? ' ' : ''; + } + if (constraintString.length) { + finalQuery += `ADD ${constraintString.join(', ')}`; + } + + return `ALTER TABLE ${this.quoteTable(tableName)} ${finalQuery};${commentString}`; + } + + renameColumnQuery(tableName, attrBefore, attributes) { + const newName = Object.keys(attributes)[0]; + return `EXEC sp_rename '${this.quoteTable(tableName)}.${attrBefore}', '${newName}', 'COLUMN';`; + } + + bulkInsertQuery(tableName, attrValueHashes, options, attributes) { + const quotedTable = this.quoteTable(tableName); + options = options || {}; + attributes = attributes || {}; + + const tuples = []; + const allAttributes = []; + const allQueries = []; + + + + let needIdentityInsertWrapper = false, + outputFragment = ''; + + if (options.returning) { + outputFragment = ' OUTPUT INSERTED.*'; + } + + const emptyQuery = `INSERT INTO ${quotedTable}${outputFragment} DEFAULT VALUES`; + + attrValueHashes.forEach(attrValueHash => { + // special case for empty objects with primary keys + const fields = Object.keys(attrValueHash); + const firstAttr = attributes[fields[0]]; + if (fields.length === 1 && firstAttr && firstAttr.autoIncrement && attrValueHash[fields[0]] === null) { + allQueries.push(emptyQuery); + return; + } + + // normal case + _.forOwn(attrValueHash, (value, key) => { + if (value !== null && attributes[key] && attributes[key].autoIncrement) { + needIdentityInsertWrapper = true; + } + + if (!allAttributes.includes(key)) { + if (value === null && attributes[key] && attributes[key].autoIncrement) + return; + + allAttributes.push(key); + } + }); + }); + + if (allAttributes.length > 0) { + attrValueHashes.forEach(attrValueHash => { + tuples.push(`(${ + allAttributes.map(key => + this.escape(attrValueHash[key])).join(',') + })`); + }); + + const quotedAttributes = allAttributes.map(attr => this.quoteIdentifier(attr)).join(','); + allQueries.push(tupleStr => `INSERT INTO ${quotedTable} (${quotedAttributes})${outputFragment} VALUES ${tupleStr};`); + } + const commands = []; + let offset = 0; + const batch = Math.floor(250 / (allAttributes.length + 1)) + 1; + while (offset < Math.max(tuples.length, 1)) { + const tupleStr = tuples.slice(offset, Math.min(tuples.length, offset + batch)); + let generatedQuery = allQueries.map(v => typeof v === 'string' ? v : v(tupleStr)).join(';'); + if (needIdentityInsertWrapper) { + generatedQuery = `SET IDENTITY_INSERT ${quotedTable} ON; ${generatedQuery}; SET IDENTITY_INSERT ${quotedTable} OFF;`; + } + commands.push(generatedQuery); + offset += batch; + } + return commands.join(';'); + } + + updateQuery(tableName, attrValueHash, where, options, attributes) { + const sql = super.updateQuery(tableName, attrValueHash, where, options, attributes); + if (options.limit) { + const updateArgs = `UPDATE TOP(${this.escape(options.limit)})`; + sql.query = sql.query.replace('UPDATE', updateArgs); + } + return sql; + } + + upsertQuery(tableName, insertValues, updateValues, where, model) { + const targetTableAlias = this.quoteTable(`${tableName}_target`); + const sourceTableAlias = this.quoteTable(`${tableName}_source`); + const primaryKeysAttrs = []; + const identityAttrs = []; + const uniqueAttrs = []; + const tableNameQuoted = this.quoteTable(tableName); + let needIdentityInsertWrapper = false; + + //Obtain primaryKeys, uniquekeys and identity attrs from rawAttributes as model is not passed + for (const key in model.rawAttributes) { + if (model.rawAttributes[key].primaryKey) { + primaryKeysAttrs.push(model.rawAttributes[key].field || key); + } + if (model.rawAttributes[key].unique) { + uniqueAttrs.push(model.rawAttributes[key].field || key); + } + if (model.rawAttributes[key].autoIncrement) { + identityAttrs.push(model.rawAttributes[key].field || key); + } + } + + //Add unique indexes defined by indexes option to uniqueAttrs + for (const index of model._indexes) { + if (index.unique && index.fields) { + for (const field of index.fields) { + const fieldName = typeof field === 'string' ? field : field.name || field.attribute; + if (!uniqueAttrs.includes(fieldName) && model.rawAttributes[fieldName]) { + uniqueAttrs.push(fieldName); + } + } + } + } + + const updateKeys = Object.keys(updateValues); + const insertKeys = Object.keys(insertValues); + const insertKeysQuoted = insertKeys.map(key => this.quoteIdentifier(key)).join(', '); + const insertValuesEscaped = insertKeys.map(key => this.escape(insertValues[key])).join(', '); + const sourceTableQuery = `VALUES(${insertValuesEscaped})`; //Virtual Table + let joinCondition; + + //IDENTITY_INSERT Condition + identityAttrs.forEach(key => { + if (updateValues[key] && updateValues[key] !== null) { + needIdentityInsertWrapper = true; + /* + * IDENTITY_INSERT Column Cannot be updated, only inserted + * http://stackoverflow.com/a/30176254/2254360 + */ + } + }); + + //Filter NULL Clauses + const clauses = where[Op.or].filter(clause => { + let valid = true; + /* + * Exclude NULL Composite PK/UK. Partial Composite clauses should also be excluded as it doesn't guarantee a single row + */ + for (const key in clause) { + if (!clause[key]) { + valid = false; + break; + } + } + return valid; + }); + + /* + * Generate ON condition using PK(s). + * If not, generate using UK(s). Else throw error + */ + const getJoinSnippet = array => { + return array.map(key => { + key = this.quoteIdentifier(key); + return `${targetTableAlias}.${key} = ${sourceTableAlias}.${key}`; + }); + }; + + if (clauses.length === 0) { + throw new Error('Primary Key or Unique key should be passed to upsert query'); + } else { + // Search for primary key attribute in clauses -- Model can have two separate unique keys + for (const key in clauses) { + const keys = Object.keys(clauses[key]); + if (primaryKeysAttrs.includes(keys[0])) { + joinCondition = getJoinSnippet(primaryKeysAttrs).join(' AND '); + break; + } + } + if (!joinCondition) { + joinCondition = getJoinSnippet(uniqueAttrs).join(' AND '); + } + } + + // Remove the IDENTITY_INSERT Column from update + const updateSnippet = updateKeys.filter(key => !identityAttrs.includes(key)) + .map(key => { + const value = this.escape(updateValues[key]); + key = this.quoteIdentifier(key); + return `${targetTableAlias}.${key} = ${value}`; + }).join(', '); + + const insertSnippet = `(${insertKeysQuoted}) VALUES(${insertValuesEscaped})`; + let query = `MERGE INTO ${tableNameQuoted} WITH(HOLDLOCK) AS ${targetTableAlias} USING (${sourceTableQuery}) AS ${sourceTableAlias}(${insertKeysQuoted}) ON ${joinCondition}`; + query += ` WHEN MATCHED THEN UPDATE SET ${updateSnippet} WHEN NOT MATCHED THEN INSERT ${insertSnippet} OUTPUT $action, INSERTED.*;`; + if (needIdentityInsertWrapper) { + query = `SET IDENTITY_INSERT ${tableNameQuoted} ON; ${query} SET IDENTITY_INSERT ${tableNameQuoted} OFF;`; + } + return query; + } + + truncateTableQuery(tableName) { + return `TRUNCATE TABLE ${this.quoteTable(tableName)}`; + } + + deleteQuery(tableName, where, options = {}, model) { + const table = this.quoteTable(tableName); + + let whereClause = this.getWhereConditions(where, null, model, options); + let limit = ''; + + if (options.limit) { + limit = ` TOP(${this.escape(options.limit)})`; + } + + if (whereClause) { + whereClause = ` WHERE ${whereClause}`; + } + + return `DELETE${limit} FROM ${table}${whereClause}; SELECT @@ROWCOUNT AS AFFECTEDROWS;`; + } + + showIndexesQuery(tableName) { + return `EXEC sys.sp_helpindex @objname = N'${this.quoteTable(tableName)}';`; + } + + showConstraintsQuery(tableName) { + return `EXEC sp_helpconstraint @objname = ${this.escape(this.quoteTable(tableName))};`; + } + + removeIndexQuery(tableName, indexNameOrAttributes) { + let indexName = indexNameOrAttributes; + + if (typeof indexName !== 'string') { + indexName = Utils.underscore(`${tableName}_${indexNameOrAttributes.join('_')}`); + } + + return `DROP INDEX ${this.quoteIdentifiers(indexName)} ON ${this.quoteIdentifiers(tableName)}`; + } + + attributeToSQL(attribute) { + if (!_.isPlainObject(attribute)) { + attribute = { + type: attribute + }; + } + + // handle self referential constraints + if (attribute.references) { + + if (attribute.Model && attribute.Model.tableName === attribute.references.model) { + this.sequelize.log('MSSQL does not support self referencial constraints, ' + + 'we will remove it but we recommend restructuring your query'); + attribute.onDelete = ''; + attribute.onUpdate = ''; + } + } + + let template; + + if (attribute.type instanceof DataTypes.ENUM) { + if (attribute.type.values && !attribute.values) attribute.values = attribute.type.values; + + // enums are a special case + template = attribute.type.toSql(); + template += ` CHECK (${this.quoteIdentifier(attribute.field)} IN(${attribute.values.map(value => { + return this.escape(value); + }).join(', ') }))`; + return template; + } + template = attribute.type.toString(); + + if (attribute.allowNull === false) { + template += ' NOT NULL'; + } else if (!attribute.primaryKey && !Utils.defaultValueSchemable(attribute.defaultValue)) { + template += ' NULL'; + } + + if (attribute.autoIncrement) { + template += ' IDENTITY(1,1)'; + } + + // Blobs/texts cannot have a defaultValue + if (attribute.type !== 'TEXT' && attribute.type._binary !== true && + Utils.defaultValueSchemable(attribute.defaultValue)) { + template += ` DEFAULT ${this.escape(attribute.defaultValue)}`; + } + + if (attribute.unique === true) { + template += ' UNIQUE'; + } + + if (attribute.primaryKey) { + template += ' PRIMARY KEY'; + } + + if (attribute.references) { + template += ` REFERENCES ${this.quoteTable(attribute.references.model)}`; + + if (attribute.references.key) { + template += ` (${this.quoteIdentifier(attribute.references.key)})`; + } else { + template += ` (${this.quoteIdentifier('id')})`; + } + + if (attribute.onDelete) { + template += ` ON DELETE ${attribute.onDelete.toUpperCase()}`; + } + + if (attribute.onUpdate) { + template += ` ON UPDATE ${attribute.onUpdate.toUpperCase()}`; + } + } + + if (attribute.comment && typeof attribute.comment === 'string') { + template += ` COMMENT ${attribute.comment}`; + } + + return template; + } + + attributesToSQL(attributes, options) { + const result = {}, + existingConstraints = []; + let key, + attribute; + + for (key in attributes) { + attribute = attributes[key]; + + if (attribute.references) { + + if (existingConstraints.includes(attribute.references.model.toString())) { + // no cascading constraints to a table more than once + attribute.onDelete = ''; + attribute.onUpdate = ''; + } else { + existingConstraints.push(attribute.references.model.toString()); + + // NOTE: this really just disables cascading updates for all + // definitions. Can be made more robust to support the + // few cases where MSSQL actually supports them + attribute.onUpdate = ''; + } + + } + + if (key && !attribute.field) attribute.field = key; + result[attribute.field || key] = this.attributeToSQL(attribute, options); + } + + return result; + } + + createTrigger() { + throwMethodUndefined('createTrigger'); + } + + dropTrigger() { + throwMethodUndefined('dropTrigger'); + } + + renameTrigger() { + throwMethodUndefined('renameTrigger'); + } + + createFunction() { + throwMethodUndefined('createFunction'); + } + + dropFunction() { + throwMethodUndefined('dropFunction'); + } + + renameFunction() { + throwMethodUndefined('renameFunction'); + } + + /** + * Generate common SQL prefix for ForeignKeysQuery. + * + * @param {string} catalogName + * @returns {string} + */ + _getForeignKeysQueryPrefix(catalogName) { + return `${'SELECT ' + + 'constraint_name = OBJ.NAME, ' + + 'constraintName = OBJ.NAME, '}${ + catalogName ? `constraintCatalog = '${catalogName}', ` : '' + }constraintSchema = SCHEMA_NAME(OBJ.SCHEMA_ID), ` + + 'tableName = TB.NAME, ' + + `tableSchema = SCHEMA_NAME(TB.SCHEMA_ID), ${ + catalogName ? `tableCatalog = '${catalogName}', ` : '' + }columnName = COL.NAME, ` + + `referencedTableSchema = SCHEMA_NAME(RTB.SCHEMA_ID), ${ + catalogName ? `referencedCatalog = '${catalogName}', ` : '' + }referencedTableName = RTB.NAME, ` + + 'referencedColumnName = RCOL.NAME ' + + 'FROM sys.foreign_key_columns FKC ' + + 'INNER JOIN sys.objects OBJ ON OBJ.OBJECT_ID = FKC.CONSTRAINT_OBJECT_ID ' + + 'INNER JOIN sys.tables TB ON TB.OBJECT_ID = FKC.PARENT_OBJECT_ID ' + + 'INNER JOIN sys.columns COL ON COL.COLUMN_ID = PARENT_COLUMN_ID AND COL.OBJECT_ID = TB.OBJECT_ID ' + + 'INNER JOIN sys.tables RTB ON RTB.OBJECT_ID = FKC.REFERENCED_OBJECT_ID ' + + 'INNER JOIN sys.columns RCOL ON RCOL.COLUMN_ID = REFERENCED_COLUMN_ID AND RCOL.OBJECT_ID = RTB.OBJECT_ID'; + } + + /** + * Generates an SQL query that returns all foreign keys details of a table. + * + * @param {string|Object} table + * @param {string} catalogName database name + * @returns {string} + */ + getForeignKeysQuery(table, catalogName) { + const tableName = table.tableName || table; + let sql = `${this._getForeignKeysQueryPrefix(catalogName) + } WHERE TB.NAME =${wrapSingleQuote(tableName)}`; + + if (table.schema) { + sql += ` AND SCHEMA_NAME(TB.SCHEMA_ID) =${wrapSingleQuote(table.schema)}`; + } + return sql; + } + + getForeignKeyQuery(table, attributeName) { + const tableName = table.tableName || table; + let sql = `${this._getForeignKeysQueryPrefix() + } WHERE TB.NAME =${wrapSingleQuote(tableName) + } AND COL.NAME =${wrapSingleQuote(attributeName)}`; + + if (table.schema) { + sql += ` AND SCHEMA_NAME(TB.SCHEMA_ID) =${wrapSingleQuote(table.schema)}`; + } + + return sql; + } + + getPrimaryKeyConstraintQuery(table, attributeName) { + const tableName = wrapSingleQuote(table.tableName || table); + return [ + 'SELECT K.TABLE_NAME AS tableName,', + 'K.COLUMN_NAME AS columnName,', + 'K.CONSTRAINT_NAME AS constraintName', + 'FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS C', + 'JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS K', + 'ON C.TABLE_NAME = K.TABLE_NAME', + 'AND C.CONSTRAINT_CATALOG = K.CONSTRAINT_CATALOG', + 'AND C.CONSTRAINT_SCHEMA = K.CONSTRAINT_SCHEMA', + 'AND C.CONSTRAINT_NAME = K.CONSTRAINT_NAME', + 'WHERE C.CONSTRAINT_TYPE = \'PRIMARY KEY\'', + `AND K.COLUMN_NAME = ${wrapSingleQuote(attributeName)}`, + `AND K.TABLE_NAME = ${tableName};` + ].join(' '); + } + + dropForeignKeyQuery(tableName, foreignKey) { + return `ALTER TABLE ${this.quoteTable(tableName)} DROP ${this.quoteIdentifier(foreignKey)}`; + } + + getDefaultConstraintQuery(tableName, attributeName) { + const quotedTable = this.quoteTable(tableName); + return 'SELECT name FROM sys.default_constraints ' + + `WHERE PARENT_OBJECT_ID = OBJECT_ID('${quotedTable}', 'U') ` + + `AND PARENT_COLUMN_ID = (SELECT column_id FROM sys.columns WHERE NAME = ('${attributeName}') ` + + `AND object_id = OBJECT_ID('${quotedTable}', 'U'));`; + } + + dropConstraintQuery(tableName, constraintName) { + return `ALTER TABLE ${this.quoteTable(tableName)} DROP CONSTRAINT ${this.quoteIdentifier(constraintName)};`; + } + + setIsolationLevelQuery() { + + } + + generateTransactionId() { + return randomBytes(10).toString('hex'); + } + + startTransactionQuery(transaction) { + if (transaction.parent) { + return `SAVE TRANSACTION ${this.quoteIdentifier(transaction.name)};`; + } + + return 'BEGIN TRANSACTION;'; + } + + commitTransactionQuery(transaction) { + if (transaction.parent) { + return; + } + + return 'COMMIT TRANSACTION;'; + } + + rollbackTransactionQuery(transaction) { + if (transaction.parent) { + return `ROLLBACK TRANSACTION ${this.quoteIdentifier(transaction.name)};`; + } + + return 'ROLLBACK TRANSACTION;'; + } + + selectFromTableFragment(options, model, attributes, tables, mainTableAs, where) { + let topFragment = ''; + let mainFragment = `SELECT ${attributes.join(', ')} FROM ${tables}`; + + // Handle SQL Server 2008 with TOP instead of LIMIT + if (semver.valid(this.sequelize.options.databaseVersion) && semver.lt(this.sequelize.options.databaseVersion, '11.0.0')) { + if (options.limit) { + topFragment = `TOP ${options.limit} `; + } + if (options.offset) { + const offset = options.offset || 0, + isSubQuery = options.hasIncludeWhere || options.hasIncludeRequired || options.hasMultiAssociation; + let orders = { mainQueryOrder: [] }; + if (options.order) { + orders = this.getQueryOrders(options, model, isSubQuery); + } + + if (!orders.mainQueryOrder.length) { + orders.mainQueryOrder.push(this.quoteIdentifier(model.primaryKeyField)); + } + + const tmpTable = mainTableAs ? mainTableAs : 'OffsetTable'; + const whereFragment = where ? ` WHERE ${where}` : ''; + + /* + * For earlier versions of SQL server, we need to nest several queries + * in order to emulate the OFFSET behavior. + * + * 1. The outermost query selects all items from the inner query block. + * This is due to a limitation in SQL server with the use of computed + * columns (e.g. SELECT ROW_NUMBER()...AS x) in WHERE clauses. + * 2. The next query handles the LIMIT and OFFSET behavior by getting + * the TOP N rows of the query where the row number is > OFFSET + * 3. The innermost query is the actual set we want information from + */ + const fragment = `SELECT TOP 100 PERCENT ${attributes.join(', ')} FROM ` + + `(SELECT ${topFragment}*` + + ` FROM (SELECT ROW_NUMBER() OVER (ORDER BY ${orders.mainQueryOrder.join(', ')}) as row_num, * ` + + ` FROM ${tables} AS ${tmpTable}${whereFragment})` + + ` AS ${tmpTable} WHERE row_num > ${offset})` + + ` AS ${tmpTable}`; + return fragment; + } + mainFragment = `SELECT ${topFragment}${attributes.join(', ')} FROM ${tables}`; + } + + if (mainTableAs) { + mainFragment += ` AS ${mainTableAs}`; + } + + if (options.tableHint && TableHints[options.tableHint]) { + mainFragment += ` WITH (${TableHints[options.tableHint]})`; + } + + return mainFragment; + } + + addLimitAndOffset(options, model) { + // Skip handling of limit and offset as postfixes for older SQL Server versions + if (semver.valid(this.sequelize.options.databaseVersion) && semver.lt(this.sequelize.options.databaseVersion, '11.0.0')) { + return ''; + } + + const offset = options.offset || 0; + const isSubQuery = options.subQuery === undefined + ? options.hasIncludeWhere || options.hasIncludeRequired || options.hasMultiAssociation + : options.subQuery; + + let fragment = ''; + let orders = {}; + + if (options.order) { + orders = this.getQueryOrders(options, model, isSubQuery); + } + + if (options.limit || options.offset) { + if (!options.order || options.include && !orders.subQueryOrder.length) { + fragment += options.order && !isSubQuery ? ', ' : ' ORDER BY '; + fragment += `${this.quoteTable(options.tableAs || model.name)}.${this.quoteIdentifier(model.primaryKeyField)}`; + } + + if (options.offset || options.limit) { + fragment += ` OFFSET ${this.escape(offset)} ROWS`; + } + + if (options.limit) { + fragment += ` FETCH NEXT ${this.escape(options.limit)} ROWS ONLY`; + } + } + + return fragment; + } + + booleanValue(value) { + return value ? 1 : 0; + } +} + +// private methods +function wrapSingleQuote(identifier) { + return Utils.addTicks(Utils.removeTicks(identifier, "'"), "'"); +} + +module.exports = MSSQLQueryGenerator; diff --git a/node_modules/sequelize/lib/dialects/mssql/query-interface.js b/node_modules/sequelize/lib/dialects/mssql/query-interface.js new file mode 100644 index 00000000..631cd19c --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mssql/query-interface.js @@ -0,0 +1,68 @@ +'use strict'; + +/** + Returns an object that treats MSSQL's inabilities to do certain queries. + + @class QueryInterface + @static + @private + */ + +/** + A wrapper that fixes MSSQL's inability to cleanly remove columns from existing tables if they have a default constraint. + + + @param {QueryInterface} qi + @param {string} tableName The name of the table. + @param {string} attributeName The name of the attribute that we want to remove. + @param {Object} options + @param {boolean|Function} [options.logging] A function that logs the sql queries, or false for explicitly not logging these queries + + @private + */ +const removeColumn = function(qi, tableName, attributeName, options) { + options = Object.assign({ raw: true }, options || {}); + + const findConstraintSql = qi.QueryGenerator.getDefaultConstraintQuery(tableName, attributeName); + return qi.sequelize.query(findConstraintSql, options) + .then(([results]) => { + if (!results.length) { + // No default constraint found -- we can cleanly remove the column + return; + } + const dropConstraintSql = qi.QueryGenerator.dropConstraintQuery(tableName, results[0].name); + return qi.sequelize.query(dropConstraintSql, options); + }) + .then(() => { + const findForeignKeySql = qi.QueryGenerator.getForeignKeyQuery(tableName, attributeName); + return qi.sequelize.query(findForeignKeySql, options); + }) + .then(([results]) => { + if (!results.length) { + // No foreign key constraints found, so we can remove the column + return; + } + const dropForeignKeySql = qi.QueryGenerator.dropForeignKeyQuery(tableName, results[0].constraint_name); + return qi.sequelize.query(dropForeignKeySql, options); + }) + .then(() => { + //Check if the current column is a primaryKey + const primaryKeyConstraintSql = qi.QueryGenerator.getPrimaryKeyConstraintQuery(tableName, attributeName); + return qi.sequelize.query(primaryKeyConstraintSql, options); + }) + .then(([result]) => { + if (!result.length) { + return; + } + const dropConstraintSql = qi.QueryGenerator.dropConstraintQuery(tableName, result[0].constraintName); + return qi.sequelize.query(dropConstraintSql, options); + }) + .then(() => { + const removeSql = qi.QueryGenerator.removeColumnQuery(tableName, attributeName); + return qi.sequelize.query(removeSql, options); + }); +}; + +module.exports = { + removeColumn +}; diff --git a/node_modules/sequelize/lib/dialects/mssql/query.js b/node_modules/sequelize/lib/dialects/mssql/query.js new file mode 100644 index 00000000..50ba691e --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mssql/query.js @@ -0,0 +1,384 @@ +'use strict'; + +const Promise = require('../../promise'); +const AbstractQuery = require('../abstract/query'); +const sequelizeErrors = require('../../errors'); +const parserStore = require('../parserStore')('mssql'); +const _ = require('lodash'); +const { logger } = require('../../utils/logger'); + +const debug = logger.debugContext('sql:mssql'); + +class Query extends AbstractQuery { + getInsertIdField() { + return 'id'; + } + + getSQLTypeFromJsType(value, TYPES) { + const paramType = { type: TYPES.VarChar, typeOptions: {} }; + paramType.type = TYPES.NVarChar; + if (typeof value === 'number') { + if (Number.isInteger(value)) { + paramType.type = TYPES.Int; + } else { + paramType.type = TYPES.Numeric; + //Default to a reasonable numeric precision/scale pending more sophisticated logic + paramType.typeOptions = { precision: 30, scale: 15 }; + } + } + if (Buffer.isBuffer(value)) { + paramType.type = TYPES.VarBinary; + } + return paramType; + } + + _run(connection, sql, parameters) { + this.sql = sql; + const { options } = this; + + const complete = this._logQuery(sql, debug); + + return new Promise((resolve, reject) => { + const handleTransaction = err => { + if (err) { + reject(this.formatError(err)); + return; + } + resolve(this.formatResults()); + }; + // TRANSACTION SUPPORT + if (sql.startsWith('BEGIN TRANSACTION')) { + return connection.beginTransaction(handleTransaction, options.transaction.name, connection.lib.ISOLATION_LEVEL[options.isolationLevel]); + } + if (sql.startsWith('COMMIT TRANSACTION')) { + return connection.commitTransaction(handleTransaction); + } + if (sql.startsWith('ROLLBACK TRANSACTION')) { + return connection.rollbackTransaction(handleTransaction, options.transaction.name); + } + if (sql.startsWith('SAVE TRANSACTION')) { + return connection.saveTransaction(handleTransaction, options.transaction.name); + } + const results = []; + const request = new connection.lib.Request(sql, (err, rowCount) => { + + complete(); + + if (err) { + err.sql = sql; + reject(this.formatError(err)); + } else { + resolve(this.formatResults(results, rowCount)); + } + }); + + if (parameters) { + _.forOwn(parameters, (value, key) => { + const paramType = this.getSQLTypeFromJsType(value, connection.lib.TYPES); + request.addParameter(key, paramType.type, value, paramType.typeOptions); + }); + } + + request.on('row', columns => { + const row = {}; + for (const column of columns) { + const typeid = column.metadata.type.id; + const parse = parserStore.get(typeid); + let value = column.value; + + if (value !== null & !!parse) { + value = parse(value); + } + row[column.metadata.colName] = value; + } + + results.push(row); + }); + + connection.execSql(request); + }); + } + + run(sql, parameters) { + return Promise.using(this.connection.lock(), connection => this._run(connection, sql, parameters)); + } + + static formatBindParameters(sql, values, dialect) { + const bindParam = {}; + const replacementFunc = (match, key, values) => { + if (values[key] !== undefined) { + bindParam[key] = values[key]; + return `@${key}`; + } + return undefined; + }; + sql = AbstractQuery.formatBindParameters(sql, values, dialect, replacementFunc)[0]; + + return [sql, bindParam]; + } + + /** + * High level function that handles the results of a query execution. + * + * @param {Array} data - The result of the query execution. + * @param {number} rowCount + * @private + * @example + * Example: + * query.formatResults([ + * { + * id: 1, // this is from the main table + * attr2: 'snafu', // this is from the main table + * Tasks.id: 1, // this is from the associated table + * Tasks.title: 'task' // this is from the associated table + * } + * ]) + */ + formatResults(data, rowCount) { + let result = this.instance; + if (this.isInsertQuery(data)) { + this.handleInsertQuery(data); + + if (!this.instance) { + if (this.options.plain) { + // NOTE: super contrived. This just passes the newly added query-interface + // test returning only the PK. There isn't a way in MSSQL to identify + // that a given return value is the PK, and we have no schema information + // because there was no calling Model. + const record = data[0]; + result = record[Object.keys(record)[0]]; + } else { + result = data; + } + } + } + + if (this.isShowTablesQuery()) { + return this.handleShowTablesQuery(data); + } + if (this.isDescribeQuery()) { + result = {}; + for (const _result of data) { + if (_result.Default) { + _result.Default = _result.Default.replace("('", '').replace("')", '').replace(/'/g, ''); + } + + result[_result.Name] = { + type: _result.Type.toUpperCase(), + allowNull: _result.IsNull === 'YES' ? true : false, + defaultValue: _result.Default, + primaryKey: _result.Constraint === 'PRIMARY KEY', + autoIncrement: _result.IsIdentity === 1, + comment: _result.Comment + }; + + if ( + result[_result.Name].type.includes('VARCHAR') + && _result.Length + ) { + if (_result.Length === -1) { + result[_result.Name].type += '(MAX)'; + } else { + result[_result.Name].type += `(${_result.Length})`; + } + } + + } + } + if (this.isSelectQuery()) { + return this.handleSelectQuery(data); + } + if (this.isShowIndexesQuery()) { + return this.handleShowIndexesQuery(data); + } + if (this.isUpsertQuery()) { + return data[0]; + } + if (this.isCallQuery()) { + return data[0]; + } + if (this.isBulkUpdateQuery()) { + return data.length; + } + if (this.isBulkDeleteQuery()) { + return data[0] && data[0].AFFECTEDROWS; + } + if (this.isVersionQuery()) { + return data[0].version; + } + if (this.isForeignKeysQuery()) { + return data; + } + if (this.isInsertQuery() || this.isUpdateQuery()) { + return [result, rowCount]; + } + if (this.isShowConstraintsQuery()) { + return this.handleShowConstraintsQuery(data); + } + if (this.isRawQuery()) { + // MSSQL returns row data and metadata (affected rows etc) in a single object - let's standarize it, sorta + return [data, data]; + } + + return result; + } + + handleShowTablesQuery(results) { + return results.map(resultSet => { + return { + tableName: resultSet.TABLE_NAME, + schema: resultSet.TABLE_SCHEMA + }; + }); + } + + handleShowConstraintsQuery(data) { + //Convert snake_case keys to camelCase as it's generated by stored procedure + return data.slice(1).map(result => { + const constraint = {}; + for (const key in result) { + constraint[_.camelCase(key)] = result[key]; + } + return constraint; + }); + } + + formatError(err) { + let match; + + match = err.message.match(/Violation of (?:UNIQUE|PRIMARY) KEY constraint '((.|\s)*)'. Cannot insert duplicate key in object '.*'.(:? The duplicate key value is \((.*)\).)?/); + match = match || err.message.match(/Cannot insert duplicate key row in object .* with unique index '(.*)'/); + if (match && match.length > 1) { + let fields = {}; + const uniqueKey = this.model && this.model.uniqueKeys[match[1]]; + let message = 'Validation error'; + + if (uniqueKey && !!uniqueKey.msg) { + message = uniqueKey.msg; + } + if (match[4]) { + const values = match[4].split(',').map(part => part.trim()); + if (uniqueKey) { + fields = _.zipObject(uniqueKey.fields, values); + } else { + fields[match[1]] = match[4]; + } + } + + const errors = []; + _.forOwn(fields, (value, field) => { + errors.push(new sequelizeErrors.ValidationErrorItem( + this.getUniqueConstraintErrorMessage(field), + 'unique violation', // sequelizeErrors.ValidationErrorItem.Origins.DB, + field, + value, + this.instance, + 'not_unique' + )); + }); + + return new sequelizeErrors.UniqueConstraintError({ message, errors, parent: err, fields }); + } + + match = err.message.match(/Failed on step '(.*)'.Could not create constraint. See previous errors./) || + err.message.match(/The DELETE statement conflicted with the REFERENCE constraint "(.*)". The conflict occurred in database "(.*)", table "(.*)", column '(.*)'./) || + err.message.match(/The (?:INSERT|MERGE|UPDATE) statement conflicted with the FOREIGN KEY constraint "(.*)". The conflict occurred in database "(.*)", table "(.*)", column '(.*)'./); + if (match && match.length > 0) { + return new sequelizeErrors.ForeignKeyConstraintError({ + fields: null, + index: match[1], + parent: err + }); + } + + match = err.message.match(/Could not drop constraint. See previous errors./); + if (match && match.length > 0) { + let constraint = err.sql.match(/(?:constraint|index) \[(.+?)\]/i); + constraint = constraint ? constraint[1] : undefined; + let table = err.sql.match(/table \[(.+?)\]/i); + table = table ? table[1] : undefined; + + return new sequelizeErrors.UnknownConstraintError({ + message: match[1], + constraint, + table, + parent: err + }); + } + + return new sequelizeErrors.DatabaseError(err); + } + + isShowOrDescribeQuery() { + let result = false; + + result = result || this.sql.toLowerCase().startsWith("select c.column_name as 'name', c.data_type as 'type', c.is_nullable as 'isnull'"); + result = result || this.sql.toLowerCase().startsWith('select tablename = t.name, name = ind.name,'); + result = result || this.sql.toLowerCase().startsWith('exec sys.sp_helpindex @objname'); + + return result; + } + + isShowIndexesQuery() { + return this.sql.toLowerCase().startsWith('exec sys.sp_helpindex @objname'); + } + + handleShowIndexesQuery(data) { + // Group by index name, and collect all fields + data = data.reduce((acc, item) => { + if (!(item.index_name in acc)) { + acc[item.index_name] = item; + item.fields = []; + } + + item.index_keys.split(',').forEach(column => { + let columnName = column.trim(); + if (columnName.includes('(-)')) { + columnName = columnName.replace('(-)', ''); + } + + acc[item.index_name].fields.push({ + attribute: columnName, + length: undefined, + order: column.includes('(-)') ? 'DESC' : 'ASC', + collate: undefined + }); + }); + delete item.index_keys; + return acc; + }, {}); + + return _.map(data, item => ({ + primary: item.index_name.toLowerCase().startsWith('pk'), + fields: item.fields, + name: item.index_name, + tableName: undefined, + unique: item.index_description.toLowerCase().includes('unique'), + type: undefined + })); + } + + handleInsertQuery(results, metaData) { + if (this.instance) { + // add the inserted row id to the instance + const autoIncrementAttribute = this.model.autoIncrementAttribute; + let id = null; + let autoIncrementAttributeAlias = null; + + if (Object.prototype.hasOwnProperty.call(this.model.rawAttributes, autoIncrementAttribute) && + this.model.rawAttributes[autoIncrementAttribute].field !== undefined) + autoIncrementAttributeAlias = this.model.rawAttributes[autoIncrementAttribute].field; + + id = id || results && results[0][this.getInsertIdField()]; + id = id || metaData && metaData[this.getInsertIdField()]; + id = id || results && results[0][autoIncrementAttribute]; + id = id || autoIncrementAttributeAlias && results && results[0][autoIncrementAttributeAlias]; + + this.instance[autoIncrementAttribute] = id; + } + } +} + +module.exports = Query; +module.exports.Query = Query; +module.exports.default = Query; diff --git a/node_modules/sequelize/lib/dialects/mssql/resource-lock.js b/node_modules/sequelize/lib/dialects/mssql/resource-lock.js new file mode 100644 index 00000000..53f4229a --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mssql/resource-lock.js @@ -0,0 +1,25 @@ +'use strict'; + +const Promise = require('../../promise'); + +class ResourceLock { + constructor(resource) { + this.resource = resource; + this.previous = Promise.resolve(resource); + } + + unwrap() { + return this.resource; + } + + lock() { + const lock = this.previous; + let resolve; + this.previous = new Promise(r => { + resolve = r; + }); + return lock.disposer(resolve); + } +} + +module.exports = ResourceLock; diff --git a/node_modules/sequelize/lib/dialects/mysql/connection-manager.js b/node_modules/sequelize/lib/dialects/mysql/connection-manager.js new file mode 100644 index 00000000..8a1414c3 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mysql/connection-manager.js @@ -0,0 +1,159 @@ +'use strict'; + +const AbstractConnectionManager = require('../abstract/connection-manager'); +const SequelizeErrors = require('../../errors'); +const Promise = require('../../promise'); +const { logger } = require('../../utils/logger'); +const DataTypes = require('../../data-types').mysql; +const momentTz = require('moment-timezone'); +const debug = logger.debugContext('connection:mysql'); +const parserStore = require('../parserStore')('mysql'); + +/** + * MySQL Connection Manager + * + * Get connections, validate and disconnect them. + * AbstractConnectionManager pooling use it to handle MySQL specific connections + * Use https://github.com/sidorares/node-mysql2 to connect with MySQL server + * + * @extends AbstractConnectionManager + * @returns Class + * @private + */ + +class ConnectionManager extends AbstractConnectionManager { + constructor(dialect, sequelize) { + sequelize.config.port = sequelize.config.port || 3306; + super(dialect, sequelize); + this.lib = this._loadDialectModule('mysql2'); + this.refreshTypeParser(DataTypes); + } + + _refreshTypeParser(dataType) { + parserStore.refresh(dataType); + } + + _clearTypeParser() { + parserStore.clear(); + } + + static _typecast(field, next) { + if (parserStore.get(field.type)) { + return parserStore.get(field.type)(field, this.sequelize.options, next); + } + return next(); + } + + /** + * Connect with MySQL database based on config, Handle any errors in connection + * Set the pool handlers on connection.error + * Also set proper timezone once connection is connected. + * + * @param {Object} config + * @returns {Promise} + * @private + */ + connect(config) { + const connectionConfig = Object.assign({ + host: config.host, + port: config.port, + user: config.username, + flags: '-FOUND_ROWS', + password: config.password, + database: config.database, + timezone: this.sequelize.options.timezone, + typeCast: ConnectionManager._typecast.bind(this), + bigNumberStrings: false, + supportBigNumbers: true + }, config.dialectOptions); + + return new Promise((resolve, reject) => { + const connection = this.lib.createConnection(connectionConfig); + + const errorHandler = e => { + // clean up connect & error event if there is error + connection.removeListener('connect', connectHandler); + connection.removeListener('error', connectHandler); + reject(e); + }; + + const connectHandler = () => { + // clean up error event if connected + connection.removeListener('error', errorHandler); + resolve(connection); + }; + + // don't use connection.once for error event handling here + // mysql2 emit error two times in case handshake was failed + // first error is protocol_lost and second is timeout + // if we will use `once.error` node process will crash on 2nd error emit + connection.on('error', errorHandler); + connection.once('connect', connectHandler); + }) + .tap(() => { debug('connection acquired'); }) + .then(connection => { + connection.on('error', error => { + switch (error.code) { + case 'ESOCKET': + case 'ECONNRESET': + case 'EPIPE': + case 'PROTOCOL_CONNECTION_LOST': + this.pool.destroy(connection); + } + }); + + return new Promise((resolve, reject) => { + if (!this.sequelize.config.keepDefaultTimezone) { + // set timezone for this connection + // but named timezone are not directly supported in mysql, so get its offset first + let tzOffset = this.sequelize.options.timezone; + tzOffset = /\//.test(tzOffset) ? momentTz.tz(tzOffset).format('Z') : tzOffset; + return connection.query(`SET time_zone = '${tzOffset}'`, err => { + if (err) { reject(err); } else { resolve(connection); } + }); + } + + // return connection without executing SET time_zone query + resolve(connection); + }); + }) + .catch(err => { + switch (err.code) { + case 'ECONNREFUSED': + throw new SequelizeErrors.ConnectionRefusedError(err); + case 'ER_ACCESS_DENIED_ERROR': + throw new SequelizeErrors.AccessDeniedError(err); + case 'ENOTFOUND': + throw new SequelizeErrors.HostNotFoundError(err); + case 'EHOSTUNREACH': + throw new SequelizeErrors.HostNotReachableError(err); + case 'EINVAL': + throw new SequelizeErrors.InvalidConnectionError(err); + default: + throw new SequelizeErrors.ConnectionError(err); + } + }); + } + + disconnect(connection) { + // Don't disconnect connections with CLOSED state + if (connection._closing) { + debug('connection tried to disconnect but was already at CLOSED state'); + return Promise.resolve(); + } + + return Promise.fromCallback(callback => connection.end(callback)); + } + + validate(connection) { + return connection + && !connection._fatalError + && !connection._protocolError + && !connection._closing + && !connection.stream.destroyed; + } +} + +module.exports = ConnectionManager; +module.exports.ConnectionManager = ConnectionManager; +module.exports.default = ConnectionManager; diff --git a/node_modules/sequelize/lib/dialects/mysql/data-types.js b/node_modules/sequelize/lib/dialects/mysql/data-types.js new file mode 100644 index 00000000..98e8aa0a --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mysql/data-types.js @@ -0,0 +1,140 @@ +'use strict'; + +const wkx = require('wkx'); +const _ = require('lodash'); +const moment = require('moment-timezone'); +module.exports = BaseTypes => { + BaseTypes.ABSTRACT.prototype.dialectTypes = 'https://dev.mysql.com/doc/refman/5.7/en/data-types.html'; + + /** + * types: [buffer_type, ...] + * @see buffer_type here https://dev.mysql.com/doc/refman/5.7/en/c-api-prepared-statement-type-codes.html + * @see hex here https://github.com/sidorares/node-mysql2/blob/master/lib/constants/types.js + */ + + BaseTypes.DATE.types.mysql = ['DATETIME']; + BaseTypes.STRING.types.mysql = ['VAR_STRING']; + BaseTypes.CHAR.types.mysql = ['STRING']; + BaseTypes.TEXT.types.mysql = ['BLOB']; + BaseTypes.TINYINT.types.mysql = ['TINY']; + BaseTypes.SMALLINT.types.mysql = ['SHORT']; + BaseTypes.MEDIUMINT.types.mysql = ['INT24']; + BaseTypes.INTEGER.types.mysql = ['LONG']; + BaseTypes.BIGINT.types.mysql = ['LONGLONG']; + BaseTypes.FLOAT.types.mysql = ['FLOAT']; + BaseTypes.TIME.types.mysql = ['TIME']; + BaseTypes.DATEONLY.types.mysql = ['DATE']; + BaseTypes.BOOLEAN.types.mysql = ['TINY']; + BaseTypes.BLOB.types.mysql = ['TINYBLOB', 'BLOB', 'LONGBLOB']; + BaseTypes.DECIMAL.types.mysql = ['NEWDECIMAL']; + BaseTypes.UUID.types.mysql = false; + BaseTypes.ENUM.types.mysql = false; + BaseTypes.REAL.types.mysql = ['DOUBLE']; + BaseTypes.DOUBLE.types.mysql = ['DOUBLE']; + BaseTypes.GEOMETRY.types.mysql = ['GEOMETRY']; + BaseTypes.JSON.types.mysql = ['JSON']; + + class DECIMAL extends BaseTypes.DECIMAL { + toSql() { + let definition = super.toSql(); + if (this._unsigned) { + definition += ' UNSIGNED'; + } + if (this._zerofill) { + definition += ' ZEROFILL'; + } + return definition; + } + } + + class DATE extends BaseTypes.DATE { + toSql() { + return `DATETIME${this._length ? `(${this._length})` : ''}`; + } + _stringify(date, options) { + date = this._applyTimezone(date, options); + // Fractional DATETIMEs only supported on MySQL 5.6.4+ + if (this._length) { + return date.format('YYYY-MM-DD HH:mm:ss.SSS'); + } + return date.format('YYYY-MM-DD HH:mm:ss'); + } + static parse(value, options) { + value = value.string(); + if (value === null) { + return value; + } + if (moment.tz.zone(options.timezone)) { + value = moment.tz(value, options.timezone).toDate(); + } + else { + value = new Date(`${value} ${options.timezone}`); + } + return value; + } + } + + class DATEONLY extends BaseTypes.DATEONLY { + static parse(value) { + return value.string(); + } + } + class UUID extends BaseTypes.UUID { + toSql() { + return 'CHAR(36) BINARY'; + } + } + + const SUPPORTED_GEOMETRY_TYPES = ['POINT', 'LINESTRING', 'POLYGON']; + + class GEOMETRY extends BaseTypes.GEOMETRY { + constructor(type, srid) { + super(type, srid); + if (_.isEmpty(this.type)) { + this.sqlType = this.key; + return; + } + if (SUPPORTED_GEOMETRY_TYPES.includes(this.type)) { + this.sqlType = this.type; + return; + } + throw new Error(`Supported geometry types are: ${SUPPORTED_GEOMETRY_TYPES.join(', ')}`); + } + static parse(value) { + value = value.buffer(); + // Empty buffer, MySQL doesn't support POINT EMPTY + // check, https://dev.mysql.com/worklog/task/?id=2381 + if (!value || value.length === 0) { + return null; + } + // For some reason, discard the first 4 bytes + value = value.slice(4); + return wkx.Geometry.parse(value).toGeoJSON(); + } + toSql() { + return this.sqlType; + } + } + + class ENUM extends BaseTypes.ENUM { + toSql(options) { + return `ENUM(${this.values.map(value => options.escape(value)).join(', ')})`; + } + } + + class JSONTYPE extends BaseTypes.JSON { + _stringify(value, options) { + return options.operation === 'where' && typeof value === 'string' ? value : JSON.stringify(value); + } + } + + return { + ENUM, + DATE, + DATEONLY, + UUID, + GEOMETRY, + DECIMAL, + JSON: JSONTYPE + }; +}; diff --git a/node_modules/sequelize/lib/dialects/mysql/index.js b/node_modules/sequelize/lib/dialects/mysql/index.js new file mode 100644 index 00000000..dcd0e4c1 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mysql/index.js @@ -0,0 +1,59 @@ +'use strict'; + +const _ = require('lodash'); +const AbstractDialect = require('../abstract'); +const ConnectionManager = require('./connection-manager'); +const Query = require('./query'); +const QueryGenerator = require('./query-generator'); +const DataTypes = require('../../data-types').mysql; + +class MysqlDialect extends AbstractDialect { + constructor(sequelize) { + super(); + this.sequelize = sequelize; + this.connectionManager = new ConnectionManager(this, sequelize); + this.QueryGenerator = new QueryGenerator({ + _dialect: this, + sequelize + }); + } +} + +MysqlDialect.prototype.supports = _.merge(_.cloneDeep(AbstractDialect.prototype.supports), { + 'VALUES ()': true, + 'LIMIT ON UPDATE': true, + lock: true, + forShare: 'LOCK IN SHARE MODE', + inserts: { + ignoreDuplicates: ' IGNORE', + updateOnDuplicate: true + }, + index: { + collate: false, + length: true, + parser: true, + type: true, + using: 1 + }, + constraints: { + dropConstraint: false, + check: false + }, + indexViaAlter: true, + indexHints: true, + NUMERIC: true, + GEOMETRY: true, + JSON: true, + REGEXP: true +}); + +ConnectionManager.prototype.defaultVersion = '5.6.0'; +MysqlDialect.prototype.Query = Query; +MysqlDialect.prototype.QueryGenerator = QueryGenerator; +MysqlDialect.prototype.DataTypes = DataTypes; +MysqlDialect.prototype.name = 'mysql'; +MysqlDialect.prototype.TICK_CHAR = '`'; +MysqlDialect.prototype.TICK_CHAR_LEFT = MysqlDialect.prototype.TICK_CHAR; +MysqlDialect.prototype.TICK_CHAR_RIGHT = MysqlDialect.prototype.TICK_CHAR; + +module.exports = MysqlDialect; diff --git a/node_modules/sequelize/lib/dialects/mysql/query-generator.js b/node_modules/sequelize/lib/dialects/mysql/query-generator.js new file mode 100644 index 00000000..91458ef3 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mysql/query-generator.js @@ -0,0 +1,552 @@ +'use strict'; + +const _ = require('lodash'); +const Utils = require('../../utils'); +const AbstractQueryGenerator = require('../abstract/query-generator'); +const util = require('util'); +const Op = require('../../operators'); + + +const jsonFunctionRegex = /^\s*((?:[a-z]+_){0,2}jsonb?(?:_[a-z]+){0,2})\([^)]*\)/i; +const jsonOperatorRegex = /^\s*(->>?|@>|<@|\?[|&]?|\|{2}|#-)/i; +const tokenCaptureRegex = /^\s*((?:([`"'])(?:(?!\2).|\2{2})*\2)|[\w\d\s]+|[().,;+-])/i; +const foreignKeyFields = 'CONSTRAINT_NAME as constraint_name,' + + 'CONSTRAINT_NAME as constraintName,' + + 'CONSTRAINT_SCHEMA as constraintSchema,' + + 'CONSTRAINT_SCHEMA as constraintCatalog,' + + 'TABLE_NAME as tableName,' + + 'TABLE_SCHEMA as tableSchema,' + + 'TABLE_SCHEMA as tableCatalog,' + + 'COLUMN_NAME as columnName,' + + 'REFERENCED_TABLE_SCHEMA as referencedTableSchema,' + + 'REFERENCED_TABLE_SCHEMA as referencedTableCatalog,' + + 'REFERENCED_TABLE_NAME as referencedTableName,' + + 'REFERENCED_COLUMN_NAME as referencedColumnName'; + +const typeWithoutDefault = new Set(['BLOB', 'TEXT', 'GEOMETRY', 'JSON']); + +class MySQLQueryGenerator extends AbstractQueryGenerator { + constructor(options) { + super(options); + + this.OperatorMap = Object.assign({}, this.OperatorMap, { + [Op.regexp]: 'REGEXP', + [Op.notRegexp]: 'NOT REGEXP' + }); + } + + createDatabaseQuery(databaseName, options) { + options = Object.assign({ + charset: null, + collate: null + }, options || {}); + + const database = this.quoteIdentifier(databaseName); + const charset = options.charset ? ` DEFAULT CHARACTER SET ${this.escape(options.charset)}` : ''; + const collate = options.collate ? ` DEFAULT COLLATE ${this.escape(options.collate)}` : ''; + + return `${`CREATE DATABASE IF NOT EXISTS ${database}${charset}${collate}`.trim()};`; + } + + dropDatabaseQuery(databaseName) { + return `DROP DATABASE IF EXISTS ${this.quoteIdentifier(databaseName).trim()};`; + } + + createSchema() { + return 'SHOW TABLES'; + } + + showSchemasQuery() { + return 'SHOW TABLES'; + } + + versionQuery() { + return 'SELECT VERSION() as `version`'; + } + + createTableQuery(tableName, attributes, options) { + options = Object.assign({ + engine: 'InnoDB', + charset: null, + rowFormat: null + }, options || {}); + + const primaryKeys = []; + const foreignKeys = {}; + const attrStr = []; + + for (const attr in attributes) { + if (!Object.prototype.hasOwnProperty.call(attributes, attr)) continue; + const dataType = attributes[attr]; + let match; + + if (dataType.includes('PRIMARY KEY')) { + primaryKeys.push(attr); + + if (dataType.includes('REFERENCES')) { + // MySQL doesn't support inline REFERENCES declarations: move to the end + match = dataType.match(/^(.+) (REFERENCES.*)$/); + attrStr.push(`${this.quoteIdentifier(attr)} ${match[1].replace('PRIMARY KEY', '')}`); + foreignKeys[attr] = match[2]; + } else { + attrStr.push(`${this.quoteIdentifier(attr)} ${dataType.replace('PRIMARY KEY', '')}`); + } + } else if (dataType.includes('REFERENCES')) { + // MySQL doesn't support inline REFERENCES declarations: move to the end + match = dataType.match(/^(.+) (REFERENCES.*)$/); + attrStr.push(`${this.quoteIdentifier(attr)} ${match[1]}`); + foreignKeys[attr] = match[2]; + } else { + attrStr.push(`${this.quoteIdentifier(attr)} ${dataType}`); + } + } + + const table = this.quoteTable(tableName); + let attributesClause = attrStr.join(', '); + const comment = options.comment && typeof options.comment === 'string' ? ` COMMENT ${this.escape(options.comment)}` : ''; + const engine = options.engine; + const charset = options.charset ? ` DEFAULT CHARSET=${options.charset}` : ''; + const collation = options.collate ? ` COLLATE ${options.collate}` : ''; + const rowFormat = options.rowFormat ? ` ROW_FORMAT=${options.rowFormat}` : ''; + const initialAutoIncrement = options.initialAutoIncrement ? ` AUTO_INCREMENT=${options.initialAutoIncrement}` : ''; + const pkString = primaryKeys.map(pk => this.quoteIdentifier(pk)).join(', '); + + if (options.uniqueKeys) { + _.each(options.uniqueKeys, (columns, indexName) => { + if (columns.customIndex) { + if (typeof indexName !== 'string') { + indexName = `uniq_${tableName}_${columns.fields.join('_')}`; + } + attributesClause += `, UNIQUE ${this.quoteIdentifier(indexName)} (${columns.fields.map(field => this.quoteIdentifier(field)).join(', ')})`; + } + }); + } + + if (pkString.length > 0) { + attributesClause += `, PRIMARY KEY (${pkString})`; + } + + for (const fkey in foreignKeys) { + if (Object.prototype.hasOwnProperty.call(foreignKeys, fkey)) { + attributesClause += `, FOREIGN KEY (${this.quoteIdentifier(fkey)}) ${foreignKeys[fkey]}`; + } + } + + return `CREATE TABLE IF NOT EXISTS ${table} (${attributesClause}) ENGINE=${engine}${comment}${charset}${collation}${initialAutoIncrement}${rowFormat};`; + } + + + describeTableQuery(tableName, schema, schemaDelimiter) { + const table = this.quoteTable( + this.addSchema({ + tableName, + _schema: schema, + _schemaDelimiter: schemaDelimiter + }) + ); + + return `SHOW FULL COLUMNS FROM ${table};`; + } + + showTablesQuery() { + return 'SHOW TABLES;'; + } + + addColumnQuery(table, key, dataType) { + const definition = this.attributeToSQL(dataType, { + context: 'addColumn', + tableName: table, + foreignKey: key + }); + + return `ALTER TABLE ${this.quoteTable(table)} ADD ${this.quoteIdentifier(key)} ${definition};`; + } + + removeColumnQuery(tableName, attributeName) { + return `ALTER TABLE ${this.quoteTable(tableName)} DROP ${this.quoteIdentifier(attributeName)};`; + } + + changeColumnQuery(tableName, attributes) { + const attrString = []; + const constraintString = []; + + for (const attributeName in attributes) { + let definition = attributes[attributeName]; + if (definition.includes('REFERENCES')) { + const attrName = this.quoteIdentifier(attributeName); + definition = definition.replace(/.+?(?=REFERENCES)/, ''); + constraintString.push(`FOREIGN KEY (${attrName}) ${definition}`); + } else { + attrString.push(`\`${attributeName}\` \`${attributeName}\` ${definition}`); + } + } + + let finalQuery = ''; + if (attrString.length) { + finalQuery += `CHANGE ${attrString.join(', ')}`; + finalQuery += constraintString.length ? ' ' : ''; + } + if (constraintString.length) { + finalQuery += `ADD ${constraintString.join(', ')}`; + } + + return `ALTER TABLE ${this.quoteTable(tableName)} ${finalQuery};`; + } + + renameColumnQuery(tableName, attrBefore, attributes) { + const attrString = []; + + for (const attrName in attributes) { + const definition = attributes[attrName]; + attrString.push(`\`${attrBefore}\` \`${attrName}\` ${definition}`); + } + + return `ALTER TABLE ${this.quoteTable(tableName)} CHANGE ${attrString.join(', ')};`; + } + + handleSequelizeMethod(smth, tableName, factory, options, prepend) { + if (smth instanceof Utils.Json) { + // Parse nested object + if (smth.conditions) { + const conditions = this.parseConditionObject(smth.conditions).map(condition => + `${this.quoteIdentifier(condition.path[0])}->>'$.${_.tail(condition.path).join('.')}' = '${condition.value}'` + ); + + return conditions.join(' and '); + } + if (smth.path) { + let str; + + // Allow specifying conditions using the sqlite json functions + if (this._checkValidJsonStatement(smth.path)) { + str = smth.path; + } else { + // Also support json dot notation + let path = smth.path; + let startWithDot = true; + + // Convert .number. to [number]. + path = path.replace(/\.(\d+)\./g, '[$1].'); + // Convert .number$ to [number] + path = path.replace(/\.(\d+)$/, '[$1]'); + + path = path.split('.'); + + let columnName = path.shift(); + const match = columnName.match(/\[\d+\]$/); + // If columnName ends with [\d+] + if (match !== null) { + path.unshift(columnName.substr(match.index)); + columnName = columnName.substr(0, match.index); + startWithDot = false; + } + + str = `${this.quoteIdentifier(columnName)}->>'$${startWithDot ? '.' : ''}${path.join('.')}'`; + } + + if (smth.value) { + str += util.format(' = %s', this.escape(smth.value)); + } + + return str; + } + } else if (smth instanceof Utils.Cast) { + if (/timestamp/i.test(smth.type)) { + smth.type = 'datetime'; + } else if (smth.json && /boolean/i.test(smth.type)) { + // true or false cannot be casted as booleans within a JSON structure + smth.type = 'char'; + } else if (/double precision/i.test(smth.type) || /boolean/i.test(smth.type) || /integer/i.test(smth.type)) { + smth.type = 'decimal'; + } else if (/text/i.test(smth.type)) { + smth.type = 'char'; + } + } + + return super.handleSequelizeMethod(smth, tableName, factory, options, prepend); + } + + _toJSONValue(value) { + // true/false are stored as strings in mysql + if (typeof value === 'boolean') { + return value.toString(); + } + // null is stored as a string in mysql + if (value === null) { + return 'null'; + } + return value; + } + + upsertQuery(tableName, insertValues, updateValues, where, model, options) { + options.onDuplicate = 'UPDATE '; + + options.onDuplicate += Object.keys(updateValues).map(key => { + key = this.quoteIdentifier(key); + return `${key}=VALUES(${key})`; + }).join(', '); + + return this.insertQuery(tableName, insertValues, model.rawAttributes, options); + } + + truncateTableQuery(tableName) { + return `TRUNCATE ${this.quoteTable(tableName)}`; + } + + deleteQuery(tableName, where, options = {}, model) { + let limit = ''; + let query = `DELETE FROM ${this.quoteTable(tableName)}`; + + if (options.limit) { + limit = ` LIMIT ${this.escape(options.limit)}`; + } + + where = this.getWhereConditions(where, null, model, options); + + if (where) { + query += ` WHERE ${where}`; + } + + return query + limit; + } + + showIndexesQuery(tableName, options) { + return `SHOW INDEX FROM ${this.quoteTable(tableName)}${(options || {}).database ? ` FROM \`${options.database}\`` : ''}`; + } + + showConstraintsQuery(table, constraintName) { + const tableName = table.tableName || table; + const schemaName = table.schema; + + let sql = [ + 'SELECT CONSTRAINT_CATALOG AS constraintCatalog,', + 'CONSTRAINT_NAME AS constraintName,', + 'CONSTRAINT_SCHEMA AS constraintSchema,', + 'CONSTRAINT_TYPE AS constraintType,', + 'TABLE_NAME AS tableName,', + 'TABLE_SCHEMA AS tableSchema', + 'from INFORMATION_SCHEMA.TABLE_CONSTRAINTS', + `WHERE table_name='${tableName}'` + ].join(' '); + + if (constraintName) { + sql += ` AND constraint_name = '${constraintName}'`; + } + + if (schemaName) { + sql += ` AND TABLE_SCHEMA = '${schemaName}'`; + } + + return `${sql};`; + } + + removeIndexQuery(tableName, indexNameOrAttributes) { + let indexName = indexNameOrAttributes; + + if (typeof indexName !== 'string') { + indexName = Utils.underscore(`${tableName}_${indexNameOrAttributes.join('_')}`); + } + + return `DROP INDEX ${this.quoteIdentifier(indexName)} ON ${this.quoteTable(tableName)}`; + } + + attributeToSQL(attribute, options) { + if (!_.isPlainObject(attribute)) { + attribute = { + type: attribute + }; + } + + const attributeString = attribute.type.toString({ escape: this.escape.bind(this) }); + let template = attributeString; + + if (attribute.allowNull === false) { + template += ' NOT NULL'; + } + + if (attribute.autoIncrement) { + template += ' auto_increment'; + } + + // BLOB/TEXT/GEOMETRY/JSON cannot have a default value + if (!typeWithoutDefault.has(attributeString) + && attribute.type._binary !== true + && Utils.defaultValueSchemable(attribute.defaultValue)) { + template += ` DEFAULT ${this.escape(attribute.defaultValue)}`; + } + + if (attribute.unique === true) { + template += ' UNIQUE'; + } + + if (attribute.primaryKey) { + template += ' PRIMARY KEY'; + } + + if (attribute.comment) { + template += ` COMMENT ${this.escape(attribute.comment)}`; + } + + if (attribute.first) { + template += ' FIRST'; + } + if (attribute.after) { + template += ` AFTER ${this.quoteIdentifier(attribute.after)}`; + } + + if (attribute.references) { + + if (options && options.context === 'addColumn' && options.foreignKey) { + const attrName = this.quoteIdentifier(options.foreignKey); + const fkName = this.quoteIdentifier(`${options.tableName}_${attrName}_foreign_idx`); + + template += `, ADD CONSTRAINT ${fkName} FOREIGN KEY (${attrName})`; + } + + template += ` REFERENCES ${this.quoteTable(attribute.references.model)}`; + + if (attribute.references.key) { + template += ` (${this.quoteIdentifier(attribute.references.key)})`; + } else { + template += ` (${this.quoteIdentifier('id')})`; + } + + if (attribute.onDelete) { + template += ` ON DELETE ${attribute.onDelete.toUpperCase()}`; + } + + if (attribute.onUpdate) { + template += ` ON UPDATE ${attribute.onUpdate.toUpperCase()}`; + } + } + + return template; + } + + attributesToSQL(attributes, options) { + const result = {}; + + for (const key in attributes) { + const attribute = attributes[key]; + result[attribute.field || key] = this.attributeToSQL(attribute, options); + } + + return result; + } + + /** + * Check whether the statmement is json function or simple path + * + * @param {string} stmt The statement to validate + * @returns {boolean} true if the given statement is json function + * @throws {Error} throw if the statement looks like json function but has invalid token + * @private + */ + _checkValidJsonStatement(stmt) { + if (typeof stmt !== 'string') { + return false; + } + + let currentIndex = 0; + let openingBrackets = 0; + let closingBrackets = 0; + let hasJsonFunction = false; + let hasInvalidToken = false; + + while (currentIndex < stmt.length) { + const string = stmt.substr(currentIndex); + const functionMatches = jsonFunctionRegex.exec(string); + if (functionMatches) { + currentIndex += functionMatches[0].indexOf('('); + hasJsonFunction = true; + continue; + } + + const operatorMatches = jsonOperatorRegex.exec(string); + if (operatorMatches) { + currentIndex += operatorMatches[0].length; + hasJsonFunction = true; + continue; + } + + const tokenMatches = tokenCaptureRegex.exec(string); + if (tokenMatches) { + const capturedToken = tokenMatches[1]; + if (capturedToken === '(') { + openingBrackets++; + } else if (capturedToken === ')') { + closingBrackets++; + } else if (capturedToken === ';') { + hasInvalidToken = true; + break; + } + currentIndex += tokenMatches[0].length; + continue; + } + + break; + } + + // Check invalid json statement + if (hasJsonFunction && (hasInvalidToken || openingBrackets !== closingBrackets)) { + throw new Error(`Invalid json statement: ${stmt}`); + } + + // return true if the statement has valid json function + return hasJsonFunction; + } + + /** + * Generates an SQL query that returns all foreign keys of a table. + * + * @param {Object} table The table. + * @param {string} schemaName The name of the schema. + * @returns {string} The generated sql query. + * @private + */ + getForeignKeysQuery(table, schemaName) { + const tableName = table.tableName || table; + return `SELECT ${foreignKeyFields} FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = '${tableName}' AND CONSTRAINT_NAME!='PRIMARY' AND CONSTRAINT_SCHEMA='${schemaName}' AND REFERENCED_TABLE_NAME IS NOT NULL;`; + } + + /** + * Generates an SQL query that returns the foreign key constraint of a given column. + * + * @param {Object} table The table. + * @param {string} columnName The name of the column. + * @returns {string} The generated sql query. + * @private + */ + getForeignKeyQuery(table, columnName) { + const quotedSchemaName = table.schema ? wrapSingleQuote(table.schema) : ''; + const quotedTableName = wrapSingleQuote(table.tableName || table); + const quotedColumnName = wrapSingleQuote(columnName); + + return `SELECT ${foreignKeyFields} FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE` + + ` WHERE (REFERENCED_TABLE_NAME = ${quotedTableName}${table.schema + ? ` AND REFERENCED_TABLE_SCHEMA = ${quotedSchemaName}` + : ''} AND REFERENCED_COLUMN_NAME = ${quotedColumnName})` + + ` OR (TABLE_NAME = ${quotedTableName}${table.schema ? + ` AND TABLE_SCHEMA = ${quotedSchemaName}` : ''} AND COLUMN_NAME = ${quotedColumnName} AND REFERENCED_TABLE_NAME IS NOT NULL)`; + } + + /** + * Generates an SQL query that removes a foreign key from a table. + * + * @param {string} tableName The name of the table. + * @param {string} foreignKey The name of the foreign key constraint. + * @returns {string} The generated sql query. + * @private + */ + dropForeignKeyQuery(tableName, foreignKey) { + return `ALTER TABLE ${this.quoteTable(tableName)} + DROP FOREIGN KEY ${this.quoteIdentifier(foreignKey)};`; + } +} + +// private methods +function wrapSingleQuote(identifier) { + return Utils.addTicks(identifier, '\''); +} + +module.exports = MySQLQueryGenerator; diff --git a/node_modules/sequelize/lib/dialects/mysql/query-interface.js b/node_modules/sequelize/lib/dialects/mysql/query-interface.js new file mode 100644 index 00000000..48e4aba3 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mysql/query-interface.js @@ -0,0 +1,91 @@ +'use strict'; + +/** + Returns an object that treats MySQL's inabilities to do certain queries. + + @class QueryInterface + @static + @private + */ + +const Promise = require('../../promise'); +const sequelizeErrors = require('../../errors'); + +/** + A wrapper that fixes MySQL's inability to cleanly remove columns from existing tables if they have a foreign key constraint. + + @param {QueryInterface} qi + @param {string} tableName The name of the table. + @param {string} columnName The name of the attribute that we want to remove. + @param {Object} options + + @private + */ +function removeColumn(qi, tableName, columnName, options) { + options = options || {}; + + return qi.sequelize.query( + qi.QueryGenerator.getForeignKeyQuery(tableName.tableName ? tableName : { + tableName, + schema: qi.sequelize.config.database + }, columnName), + Object.assign({ raw: true }, options) + ) + .then(([results]) => { + //Exclude primary key constraint + if (!results.length || results[0].constraint_name === 'PRIMARY') { + // No foreign key constraints found, so we can remove the column + return; + } + return Promise.map(results, constraint => qi.sequelize.query( + qi.QueryGenerator.dropForeignKeyQuery(tableName, constraint.constraint_name), + Object.assign({ raw: true }, options) + )); + }) + .then(() => qi.sequelize.query( + qi.QueryGenerator.removeColumnQuery(tableName, columnName), + Object.assign({ raw: true }, options) + )); +} + +/** + * @param {QueryInterface} qi + * @param {string} tableName + * @param {string} constraintName + * @param {Object} options + * + * @private + */ +function removeConstraint(qi, tableName, constraintName, options) { + const sql = qi.QueryGenerator.showConstraintsQuery( + tableName.tableName ? tableName : { + tableName, + schema: qi.sequelize.config.database + }, constraintName); + + return qi.sequelize.query(sql, Object.assign({}, options, + { type: qi.sequelize.QueryTypes.SHOWCONSTRAINTS })) + .then(constraints => { + const constraint = constraints[0]; + let query; + if (!constraint || !constraint.constraintType) { + throw new sequelizeErrors.UnknownConstraintError( + { + message: `Constraint ${constraintName} on table ${tableName} does not exist`, + constraint: constraintName, + table: tableName + }); + } + + if (constraint.constraintType === 'FOREIGN KEY') { + query = qi.QueryGenerator.dropForeignKeyQuery(tableName, constraintName); + } else { + query = qi.QueryGenerator.removeIndexQuery(constraint.tableName, constraint.constraintName); + } + + return qi.sequelize.query(query, options); + }); +} + +exports.removeConstraint = removeConstraint; +exports.removeColumn = removeColumn; diff --git a/node_modules/sequelize/lib/dialects/mysql/query.js b/node_modules/sequelize/lib/dialects/mysql/query.js new file mode 100644 index 00000000..65935d1f --- /dev/null +++ b/node_modules/sequelize/lib/dialects/mysql/query.js @@ -0,0 +1,278 @@ +'use strict'; + +const Utils = require('../../utils'); +const AbstractQuery = require('../abstract/query'); +const sequelizeErrors = require('../../errors'); +const _ = require('lodash'); +const { logger } = require('../../utils/logger'); + +const debug = logger.debugContext('sql:mysql'); + + +class Query extends AbstractQuery { + constructor(connection, sequelize, options) { + super(connection, sequelize, Object.assign({ showWarnings: false }, options)); + } + + static formatBindParameters(sql, values, dialect) { + const bindParam = []; + const replacementFunc = (match, key, values) => { + if (values[key] !== undefined) { + bindParam.push(values[key]); + return '?'; + } + return undefined; + }; + sql = AbstractQuery.formatBindParameters(sql, values, dialect, replacementFunc)[0]; + return [sql, bindParam.length > 0 ? bindParam : undefined]; + } + + run(sql, parameters) { + this.sql = sql; + const { connection, options } = this; + + //do we need benchmark for this query execution + const showWarnings = this.sequelize.options.showWarnings || options.showWarnings; + + const complete = this._logQuery(sql, debug); + + return new Utils.Promise((resolve, reject) => { + const handler = (err, results) => { + complete(); + + if (err) { + // MySQL automatically rolls-back transactions in the event of a deadlock + if (options.transaction && err.errno === 1213) { + options.transaction.finished = 'rollback'; + } + err.sql = sql; + + reject(this.formatError(err)); + } else { + resolve(results); + } + }; + if (parameters) { + debug('parameters(%j)', parameters); + connection.execute(sql, parameters, handler).setMaxListeners(100); + } else { + connection.query({ sql }, handler).setMaxListeners(100); + } + }) + // Log warnings if we've got them. + .then(results => { + if (showWarnings && results && results.warningStatus > 0) { + return this.logWarnings(results); + } + return results; + }) + // Return formatted results... + .then(results => this.formatResults(results)); + } + + /** + * High level function that handles the results of a query execution. + * + * + * Example: + * query.formatResults([ + * { + * id: 1, // this is from the main table + * attr2: 'snafu', // this is from the main table + * Tasks.id: 1, // this is from the associated table + * Tasks.title: 'task' // this is from the associated table + * } + * ]) + * + * @param {Array} data - The result of the query execution. + * @private + */ + formatResults(data) { + let result = this.instance; + + if (this.isInsertQuery(data)) { + this.handleInsertQuery(data); + + if (!this.instance) { + // handle bulkCreate AI primiary key + if ( + data.constructor.name === 'ResultSetHeader' + && this.model + && this.model.autoIncrementAttribute + && this.model.autoIncrementAttribute === this.model.primaryKeyAttribute + && this.model.rawAttributes[this.model.primaryKeyAttribute] + ) { + const startId = data[this.getInsertIdField()]; + result = []; + for (let i = startId; i < startId + data.affectedRows; i++) { + result.push({ [this.model.rawAttributes[this.model.primaryKeyAttribute].field]: i }); + } + } else { + result = data[this.getInsertIdField()]; + } + } + } + + if (this.isSelectQuery()) { + return this.handleSelectQuery(data); + } + if (this.isShowTablesQuery()) { + return this.handleShowTablesQuery(data); + } + if (this.isDescribeQuery()) { + result = {}; + + for (const _result of data) { + const enumRegex = /^enum/i; + result[_result.Field] = { + type: enumRegex.test(_result.Type) ? _result.Type.replace(enumRegex, 'ENUM') : _result.Type.toUpperCase(), + allowNull: _result.Null === 'YES', + defaultValue: _result.Default, + primaryKey: _result.Key === 'PRI', + autoIncrement: Object.prototype.hasOwnProperty.call(_result, 'Extra') && _result.Extra.toLowerCase() === 'auto_increment', + comment: _result.Comment ? _result.Comment : null + }; + } + return result; + } + if (this.isShowIndexesQuery()) { + return this.handleShowIndexesQuery(data); + } + if (this.isCallQuery()) { + return data[0]; + } + if (this.isBulkUpdateQuery() || this.isBulkDeleteQuery() || this.isUpsertQuery()) { + return data.affectedRows; + } + if (this.isVersionQuery()) { + return data[0].version; + } + if (this.isForeignKeysQuery()) { + return data; + } + if (this.isInsertQuery() || this.isUpdateQuery()) { + return [result, data.affectedRows]; + } + if (this.isShowConstraintsQuery()) { + return data; + } + if (this.isRawQuery()) { + // MySQL returns row data and metadata (affected rows etc) in a single object - let's standarize it, sorta + return [data, data]; + } + + return result; + } + + logWarnings(results) { + return this.run('SHOW WARNINGS').then(warningResults => { + const warningMessage = `MySQL Warnings (${this.connection.uuid||'default'}): `; + const messages = []; + for (const _warningRow of warningResults) { + if (_warningRow === undefined || typeof _warningRow[Symbol.iterator] !== 'function') continue; + for (const _warningResult of _warningRow) { + if (Object.prototype.hasOwnProperty.call(_warningResult, 'Message')) { + messages.push(_warningResult.Message); + } else { + for (const _objectKey of _warningResult.keys()) { + messages.push([_objectKey, _warningResult[_objectKey]].join(': ')); + } + } + } + } + + this.sequelize.log(warningMessage + messages.join('; '), this.options); + + return results; + }); + } + + formatError(err) { + const errCode = err.errno || err.code; + + switch (errCode) { + case 1062: { + const match = err.message.match(/Duplicate entry '([\s\S]*)' for key '?((.|\s)*?)'?$/); + let fields = {}; + let message = 'Validation error'; + const values = match ? match[1].split('-') : undefined; + const fieldKey = match ? match[2] : undefined; + const fieldVal = match ? match[1] : undefined; + const uniqueKey = this.model && this.model.uniqueKeys[fieldKey]; + + if (uniqueKey) { + if (uniqueKey.msg) message = uniqueKey.msg; + fields = _.zipObject(uniqueKey.fields, values); + } else { + fields[fieldKey] = fieldVal; + } + + const errors = []; + _.forOwn(fields, (value, field) => { + errors.push(new sequelizeErrors.ValidationErrorItem( + this.getUniqueConstraintErrorMessage(field), + 'unique violation', // sequelizeErrors.ValidationErrorItem.Origins.DB, + field, + value, + this.instance, + 'not_unique' + )); + }); + + return new sequelizeErrors.UniqueConstraintError({ message, errors, parent: err, fields }); + } + + case 1451: + case 1452: { + // e.g. CONSTRAINT `example_constraint_name` FOREIGN KEY (`example_id`) REFERENCES `examples` (`id`) + const match = err.message.match(/CONSTRAINT ([`"])(.*)\1 FOREIGN KEY \(\1(.*)\1\) REFERENCES \1(.*)\1 \(\1(.*)\1\)/); + const quoteChar = match ? match[1] : '`'; + const fields = match ? match[3].split(new RegExp(`${quoteChar}, *${quoteChar}`)) : undefined; + + return new sequelizeErrors.ForeignKeyConstraintError({ + reltype: String(errCode) === '1451' ? 'parent' : 'child', + table: match ? match[4] : undefined, + fields, + value: fields && fields.length && this.instance && this.instance[fields[0]] || undefined, + index: match ? match[2] : undefined, + parent: err + }); + } + + default: + return new sequelizeErrors.DatabaseError(err); + } + } + + handleShowIndexesQuery(data) { + // Group by index name, and collect all fields + data = data.reduce((acc, item) => { + if (!(item.Key_name in acc)) { + acc[item.Key_name] = item; + item.fields = []; + } + + acc[item.Key_name].fields[item.Seq_in_index - 1] = { + attribute: item.Column_name, + length: item.Sub_part || undefined, + order: item.Collation === 'A' ? 'ASC' : undefined + }; + delete item.column_name; + + return acc; + }, {}); + + return _.map(data, item => ({ + primary: item.Key_name === 'PRIMARY', + fields: item.fields, + name: item.Key_name, + tableName: item.Table, + unique: item.Non_unique !== 1, + type: item.Index_type + })); + } +} + +module.exports = Query; +module.exports.Query = Query; +module.exports.default = Query; diff --git a/node_modules/sequelize/lib/dialects/parserStore.js b/node_modules/sequelize/lib/dialects/parserStore.js new file mode 100644 index 00000000..b8bbb8df --- /dev/null +++ b/node_modules/sequelize/lib/dialects/parserStore.js @@ -0,0 +1,23 @@ +'use strict'; + +const stores = new Map(); + +module.exports = dialect => { + if (!stores.has(dialect)) { + stores.set(dialect, new Map()); + } + + return { + clear() { + stores.get(dialect).clear(); + }, + refresh(dataType) { + for (const type of dataType.types[dialect]) { + stores.get(dialect).set(type, dataType.parse); + } + }, + get(type) { + return stores.get(dialect).get(type); + } + }; +}; diff --git a/node_modules/sequelize/lib/dialects/postgres/connection-manager.js b/node_modules/sequelize/lib/dialects/postgres/connection-manager.js new file mode 100644 index 00000000..6e000b46 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/postgres/connection-manager.js @@ -0,0 +1,320 @@ +'use strict'; + +const _ = require('lodash'); +const AbstractConnectionManager = require('../abstract/connection-manager'); +const { logger } = require('../../utils/logger'); +const debug = logger.debugContext('connection:pg'); +const Promise = require('../../promise'); +const sequelizeErrors = require('../../errors'); +const semver = require('semver'); +const dataTypes = require('../../data-types'); +const moment = require('moment-timezone'); + +class ConnectionManager extends AbstractConnectionManager { + constructor(dialect, sequelize) { + sequelize.config.port = sequelize.config.port || 5432; + super(dialect, sequelize); + + const pgLib = this._loadDialectModule('pg'); + this.lib = this.sequelize.config.native ? pgLib.native : pgLib; + + this._clearDynamicOIDs(); + this._clearTypeParser(); + this.refreshTypeParser(dataTypes.postgres); + } + + // Expose this as a method so that the parsing may be updated when the user has added additional, custom types + _refreshTypeParser(dataType) { + const arrayParserBuilder = parser => { + return value => this.lib.types.arrayParser.create(value, parser).parse(); + }; + const rangeParserBuilder = parser => { + return value => dataType.parse(value, { parser }); + }; + + // Set range parsers + if (dataType.key.toLowerCase() === 'range') { + for (const name in this.nameOidMap) { + const entry = this.nameOidMap[name]; + if (! entry.rangeOid) continue; + + const rangeParser = rangeParserBuilder(this.getTypeParser(entry.oid)); + const arrayRangeParser = arrayParserBuilder(rangeParser); + + this.oidParserMap.set(entry.rangeOid, rangeParser); + if (! entry.arrayRangeOid) continue; + this.oidParserMap.set(entry.arrayRangeOid, arrayRangeParser); + } + return; + } + + // Create parsers for normal or enum data types + const parser = value => dataType.parse(value); + const arrayParser = arrayParserBuilder(parser); + + // Set enum parsers + if (dataType.key.toLowerCase() === 'enum') { + this.enumOids.oids.forEach(oid => { + this.oidParserMap.set(oid, parser); + }); + this.enumOids.arrayOids.forEach(arrayOid => { + this.oidParserMap.set(arrayOid, arrayParser); + }); + return; + } + + // Set parsers for normal data types + dataType.types.postgres.forEach(name => { + if (! this.nameOidMap[name]) return; + this.oidParserMap.set(this.nameOidMap[name].oid, parser); + + if (! this.nameOidMap[name].arrayOid) return; + this.oidParserMap.set(this.nameOidMap[name].arrayOid, arrayParser); + }); + } + + _clearTypeParser() { + this.oidParserMap = new Map(); + } + + getTypeParser(oid, ...args) { + if (this.oidParserMap.get(oid)) return this.oidParserMap.get(oid); + + return this.lib.types.getTypeParser(oid, ...args); + } + + connect(config) { + config.user = config.username; + const connectionConfig = _.pick(config, [ + 'user', 'password', 'host', 'database', 'port' + ]); + + connectionConfig.types = { + getTypeParser: ConnectionManager.prototype.getTypeParser.bind(this) + }; + + if (config.dialectOptions) { + _.merge(connectionConfig, + _.pick(config.dialectOptions, [ + // see [http://www.postgresql.org/docs/9.3/static/runtime-config-logging.html#GUC-APPLICATION-NAME] + 'application_name', + // choose the SSL mode with the PGSSLMODE environment variable + // object format: [https://github.com/brianc/node-postgres/blob/master/lib/connection.js#L79] + // see also [http://www.postgresql.org/docs/9.3/static/libpq-ssl.html] + 'ssl', + // In addition to the values accepted by the corresponding server, + // you can use "auto" to determine the right encoding from the + // current locale in the client (LC_CTYPE environment variable on Unix systems) + 'client_encoding', + // !! DO NOT SET THIS TO TRUE !! + // (unless you know what you're doing) + // see [http://www.postgresql.org/message-id/flat/bc9549a50706040852u27633f41ib1e6b09f8339d845@mail.gmail.com#bc9549a50706040852u27633f41ib1e6b09f8339d845@mail.gmail.com] + 'binary', + // This should help with backends incorrectly considering idle clients to be dead and prematurely disconnecting them. + // this feature has been added in pg module v6.0.0, check pg/CHANGELOG.md + 'keepAlive', + // Times out queries after a set time in milliseconds. Added in pg v7.3 + 'statement_timeout' + ])); + } + + return new Promise((resolve, reject) => { + let responded = false; + + const connection = new this.lib.Client(connectionConfig); + + const parameterHandler = message => { + switch (message.parameterName) { + case 'server_version': + if (this.sequelize.options.databaseVersion === 0) { + const version = semver.coerce(message.parameterValue).version; + this.sequelize.options.databaseVersion = semver.valid(version) + ? version + : this.defaultVersion; + } + break; + case 'standard_conforming_strings': + connection['standard_conforming_strings'] = message.parameterValue; + break; + } + }; + + const endHandler = () => { + debug('connection timeout'); + if (!responded) { + reject(new sequelizeErrors.ConnectionTimedOutError(new Error('Connection timed out'))); + } + }; + + // If we didn't ever hear from the client.connect() callback the connection timeout + // node-postgres does not treat this as an error since no active query was ever emitted + connection.once('end', endHandler); + + if (!this.sequelize.config.native) { + // Receive various server parameters for further configuration + connection.connection.on('parameterStatus', parameterHandler); + } + + connection.connect(err => { + responded = true; + + if (!this.sequelize.config.native) { + // remove parameter handler + connection.connection.removeListener('parameterStatus', parameterHandler); + } + + if (err) { + if (err.code) { + switch (err.code) { + case 'ECONNREFUSED': + reject(new sequelizeErrors.ConnectionRefusedError(err)); + break; + case 'ENOTFOUND': + reject(new sequelizeErrors.HostNotFoundError(err)); + break; + case 'EHOSTUNREACH': + reject(new sequelizeErrors.HostNotReachableError(err)); + break; + case 'EINVAL': + reject(new sequelizeErrors.InvalidConnectionError(err)); + break; + default: + reject(new sequelizeErrors.ConnectionError(err)); + break; + } + } else { + reject(new sequelizeErrors.ConnectionError(err)); + } + } else { + debug('connection acquired'); + connection.removeListener('end', endHandler); + resolve(connection); + } + }); + }).tap(connection => { + let query = ''; + + if (this.sequelize.options.standardConformingStrings !== false && connection['standard_conforming_strings'] !== 'on') { + // Disable escape characters in strings + // see https://github.com/sequelize/sequelize/issues/3545 (security issue) + // see https://www.postgresql.org/docs/current/static/runtime-config-compatible.html#GUC-STANDARD-CONFORMING-STRINGS + query += 'SET standard_conforming_strings=on;'; + } + + if (this.sequelize.options.clientMinMessages !== false) { + query += `SET client_min_messages TO ${this.sequelize.options.clientMinMessages};`; + } + + if (!this.sequelize.config.keepDefaultTimezone) { + const isZone = !!moment.tz.zone(this.sequelize.options.timezone); + if (isZone) { + query += `SET TIME ZONE '${this.sequelize.options.timezone}';`; + } else { + query += `SET TIME ZONE INTERVAL '${this.sequelize.options.timezone}' HOUR TO MINUTE;`; + } + } + + if (query) { + return connection.query(query); + } + }).tap(connection => { + if (Object.keys(this.nameOidMap).length === 0 && + this.enumOids.oids.length === 0 && + this.enumOids.arrayOids.length === 0) { + return this._refreshDynamicOIDs(connection); + } + }).tap(connection => { + // Don't let a Postgres restart (or error) to take down the whole app + connection.on('error', error => { + connection._invalid = true; + debug(`connection error ${error.code || error.message}`); + this.pool.destroy(connection); + }); + }); + } + + disconnect(connection) { + if (connection._ending) { + debug('connection tried to disconnect but was already at ENDING state'); + return Promise.resolve(); + } + + return Promise.fromCallback(callback => connection.end(callback)); + } + + validate(connection) { + return !connection._invalid && !connection._ending; + } + + _refreshDynamicOIDs(connection) { + const databaseVersion = this.sequelize.options.databaseVersion; + const supportedVersion = '8.3.0'; + + // Check for supported version + if ( (databaseVersion && semver.gte(databaseVersion, supportedVersion)) === false) { + return Promise.resolve(); + } + + // Refresh dynamic OIDs for some types + // These include Geometry / Geography / HStore / Enum / Citext / Range + return (connection || this.sequelize).query( + 'WITH ranges AS (' + + ' SELECT pg_range.rngtypid, pg_type.typname AS rngtypname,' + + ' pg_type.typarray AS rngtyparray, pg_range.rngsubtype' + + ' FROM pg_range LEFT OUTER JOIN pg_type ON pg_type.oid = pg_range.rngtypid' + + ')' + + 'SELECT pg_type.typname, pg_type.typtype, pg_type.oid, pg_type.typarray,' + + ' ranges.rngtypname, ranges.rngtypid, ranges.rngtyparray' + + ' FROM pg_type LEFT OUTER JOIN ranges ON pg_type.oid = ranges.rngsubtype' + + ' WHERE (pg_type.typtype IN(\'b\', \'e\'));' + ).then(results => { + let result = Array.isArray(results) ? results.pop() : results; + + // When searchPath is prepended then two statements are executed and the result is + // an array of those two statements. First one is the SET search_path and second is + // the SELECT query result. + if (Array.isArray(result)) { + if (result[0].command === 'SET') { + result = result.pop(); + } + } + + const newNameOidMap = {}; + const newEnumOids = { oids: [], arrayOids: [] }; + + for (const row of result.rows) { + // Mapping enums, handled separatedly + if (row.typtype === 'e') { + newEnumOids.oids.push(row.oid); + if (row.typarray) newEnumOids.arrayOids.push(row.typarray); + continue; + } + + // Mapping base types and their arrays + newNameOidMap[row.typname] = { oid: row.oid }; + if (row.typarray) newNameOidMap[row.typname].arrayOid = row.typarray; + + // Mapping ranges(of base types) and their arrays + if (row.rngtypid) { + newNameOidMap[row.typname].rangeOid = row.rngtypid; + if (row.rngtyparray) newNameOidMap[row.typname].arrayRangeOid = row.rngtyparray; + } + } + + // Replace all OID mappings. Avoids temporary empty OID mappings. + this.nameOidMap = newNameOidMap; + this.enumOids = newEnumOids; + + this.refreshTypeParser(dataTypes.postgres); + }); + } + + _clearDynamicOIDs() { + this.nameOidMap = {}; + this.enumOids = { oids: [], arrayOids: [] }; + } +} + +module.exports = ConnectionManager; +module.exports.ConnectionManager = ConnectionManager; +module.exports.default = ConnectionManager; diff --git a/node_modules/sequelize/lib/dialects/postgres/data-types.js b/node_modules/sequelize/lib/dialects/postgres/data-types.js new file mode 100644 index 00000000..c084e9b3 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/postgres/data-types.js @@ -0,0 +1,526 @@ +'use strict'; + +const _ = require('lodash'); +const wkx = require('wkx'); + +module.exports = BaseTypes => { + const warn = BaseTypes.ABSTRACT.warn.bind(undefined, 'http://www.postgresql.org/docs/9.4/static/datatype.html'); + + /** + * Removes unsupported Postgres options, i.e., LENGTH, UNSIGNED and ZEROFILL, for the integer data types. + * + * @param {Object} dataType The base integer data type. + * @private + */ + function removeUnsupportedIntegerOptions(dataType) { + if (dataType._length || dataType.options.length || dataType._unsigned || dataType._zerofill) { + warn(`PostgresSQL does not support '${dataType.key}' with LENGTH, UNSIGNED or ZEROFILL. Plain '${dataType.key}' will be used instead.`); + dataType._length = undefined; + dataType.options.length = undefined; + dataType._unsigned = undefined; + dataType._zerofill = undefined; + } + } + + /** + * types: + * { + * oids: [oid], + * array_oids: [oid] + * } + * @see oid here https://github.com/lib/pq/blob/master/oid/types.go + */ + + BaseTypes.UUID.types.postgres = ['uuid']; + BaseTypes.CIDR.types.postgres = ['cidr']; + BaseTypes.INET.types.postgres = ['inet']; + BaseTypes.MACADDR.types.postgres = ['macaddr']; + BaseTypes.JSON.types.postgres = ['json']; + BaseTypes.JSONB.types.postgres = ['jsonb']; + BaseTypes.TIME.types.postgres = ['time']; + + class DATEONLY extends BaseTypes.DATEONLY { + _stringify(value, options) { + if (value === Infinity) { + return 'Infinity'; + } + if (value === -Infinity) { + return '-Infinity'; + } + return super._stringify(value, options); + } + _sanitize(value, options) { + if ((!options || options && !options.raw) && value !== Infinity && value !== -Infinity) { + if (typeof value === 'string') { + const lower = value.toLowerCase(); + if (lower === 'infinity') { + return Infinity; + } + if (lower === '-infinity') { + return -Infinity; + } + } + return super._sanitize(value); + } + return value; + } + static parse(value) { + if (value === 'infinity') { + return Infinity; + } + if (value === '-infinity') { + return -Infinity; + } + return value; + } + } + + BaseTypes.DATEONLY.types.postgres = ['date']; + + class DECIMAL extends BaseTypes.DECIMAL { + static parse(value) { + return value; + } + } + + // numeric + BaseTypes.DECIMAL.types.postgres = ['numeric']; + + class STRING extends BaseTypes.STRING { + toSql() { + if (this._binary) { + return 'BYTEA'; + } + return super.toSql(); + } + } + + BaseTypes.STRING.types.postgres = ['varchar']; + + class TEXT extends BaseTypes.TEXT { + toSql() { + if (this._length) { + warn('PostgreSQL does not support TEXT with options. Plain `TEXT` will be used instead.'); + this._length = undefined; + } + return 'TEXT'; + } + } + + BaseTypes.TEXT.types.postgres = ['text']; + + class CITEXT extends BaseTypes.CITEXT { + static parse(value) { + return value; + } + } + + BaseTypes.CITEXT.types.postgres = ['citext']; + + class CHAR extends BaseTypes.CHAR { + toSql() { + if (this._binary) { + return 'BYTEA'; + } + return super.toSql(); + } + } + + BaseTypes.CHAR.types.postgres = ['char', 'bpchar']; + + class BOOLEAN extends BaseTypes.BOOLEAN { + toSql() { + return 'BOOLEAN'; + } + _sanitize(value) { + if (value !== null && value !== undefined) { + if (Buffer.isBuffer(value) && value.length === 1) { + // Bit fields are returned as buffers + value = value[0]; + } + if (typeof value === 'string') { + // Only take action on valid boolean strings. + return value === 'true' || value === 't' ? true : value === 'false' || value === 'f' ? false : value; + } + if (typeof value === 'number') { + // Only take action on valid boolean integers. + return value === 1 ? true : value === 0 ? false : value; + } + } + return value; + } + } + + BOOLEAN.parse = BOOLEAN.prototype._sanitize; + + BaseTypes.BOOLEAN.types.postgres = ['bool']; + + class DATE extends BaseTypes.DATE { + toSql() { + return 'TIMESTAMP WITH TIME ZONE'; + } + validate(value) { + if (value !== Infinity && value !== -Infinity) { + return super.validate(value); + } + return true; + } + _stringify(value, options) { + if (value === Infinity) { + return 'Infinity'; + } + if (value === -Infinity) { + return '-Infinity'; + } + return super._stringify(value, options); + } + _sanitize(value, options) { + if ((!options || options && !options.raw) && !(value instanceof Date) && !!value && value !== Infinity && value !== -Infinity) { + if (typeof value === 'string') { + const lower = value.toLowerCase(); + if (lower === 'infinity') { + return Infinity; + } + if (lower === '-infinity') { + return -Infinity; + } + } + return new Date(value); + } + return value; + } + } + + BaseTypes.DATE.types.postgres = ['timestamptz']; + + class TINYINT extends BaseTypes.TINYINT { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + // int2 + BaseTypes.TINYINT.types.postgres = ['int2']; + + class SMALLINT extends BaseTypes.SMALLINT { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + // int2 + BaseTypes.SMALLINT.types.postgres = ['int2']; + + class INTEGER extends BaseTypes.INTEGER { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + INTEGER.parse = function parse(value) { + return parseInt(value, 10); + }; + + // int4 + BaseTypes.INTEGER.types.postgres = ['int4']; + + class BIGINT extends BaseTypes.BIGINT { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + // int8 + BaseTypes.BIGINT.types.postgres = ['int8']; + + class REAL extends BaseTypes.REAL { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + // float4 + BaseTypes.REAL.types.postgres = ['float4']; + + class DOUBLE extends BaseTypes.DOUBLE { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + // float8 + BaseTypes.DOUBLE.types.postgres = ['float8']; + + class FLOAT extends BaseTypes.FLOAT { + constructor(length, decimals) { + super(length, decimals); + // POSTGRES does only support lengths as parameter. + // Values between 1-24 result in REAL + // Values between 25-53 result in DOUBLE PRECISION + // If decimals are provided remove these and print a warning + if (this._decimals) { + warn('PostgreSQL does not support FLOAT with decimals. Plain `FLOAT` will be used instead.'); + this._length = undefined; + this.options.length = undefined; + this._decimals = undefined; + } + if (this._unsigned) { + warn('PostgreSQL does not support FLOAT unsigned. `UNSIGNED` was removed.'); + this._unsigned = undefined; + } + if (this._zerofill) { + warn('PostgreSQL does not support FLOAT zerofill. `ZEROFILL` was removed.'); + this._zerofill = undefined; + } + } + } + delete FLOAT.parse; // Float has no separate type in PG + + class BLOB extends BaseTypes.BLOB { + toSql() { + if (this._length) { + warn('PostgreSQL does not support BLOB (BYTEA) with options. Plain `BYTEA` will be used instead.'); + this._length = undefined; + } + return 'BYTEA'; + } + _hexify(hex) { + // bytea hex format http://www.postgresql.org/docs/current/static/datatype-binary.html + return `E'\\\\x${hex}'`; + } + } + + BaseTypes.BLOB.types.postgres = ['bytea']; + + class GEOMETRY extends BaseTypes.GEOMETRY { + toSql() { + let result = this.key; + if (this.type) { + result += `(${this.type}`; + if (this.srid) { + result += `,${this.srid}`; + } + result += ')'; + } + return result; + } + static parse(value) { + const b = Buffer.from(value, 'hex'); + return wkx.Geometry.parse(b).toGeoJSON(); + } + _stringify(value, options) { + return `ST_GeomFromGeoJSON(${options.escape(JSON.stringify(value))})`; + } + _bindParam(value, options) { + return `ST_GeomFromGeoJSON(${options.bindParam(value)})`; + } + } + + BaseTypes.GEOMETRY.types.postgres = ['geometry']; + + + class GEOGRAPHY extends BaseTypes.GEOGRAPHY { + toSql() { + let result = 'GEOGRAPHY'; + if (this.type) { + result += `(${this.type}`; + if (this.srid) { + result += `,${this.srid}`; + } + result += ')'; + } + return result; + } + static parse(value) { + const b = Buffer.from(value, 'hex'); + return wkx.Geometry.parse(b).toGeoJSON(); + } + _stringify(value, options) { + return `ST_GeomFromGeoJSON(${options.escape(JSON.stringify(value))})`; + } + bindParam(value, options) { + return `ST_GeomFromGeoJSON(${options.bindParam(value)})`; + } + } + + BaseTypes.GEOGRAPHY.types.postgres = ['geography']; + + let hstore; + + class HSTORE extends BaseTypes.HSTORE { + constructor() { + super(); + if (!hstore) { + // All datatype files are loaded at import - make sure we don't load the hstore parser before a hstore is instantiated + hstore = require('./hstore'); + } + } + _value(value) { + if (!hstore) { + // All datatype files are loaded at import - make sure we don't load the hstore parser before a hstore is instantiated + hstore = require('./hstore'); + } + return hstore.stringify(value); + } + _stringify(value) { + return `'${this._value(value)}'`; + } + _bindParam(value, options) { + return options.bindParam(this._value(value)); + } + static parse(value) { + if (!hstore) { + // All datatype files are loaded at import - make sure we don't load the hstore parser before a hstore is instantiated + hstore = require('./hstore'); + } + return hstore.parse(value); + } + } + + HSTORE.prototype.escape = false; + + BaseTypes.HSTORE.types.postgres = ['hstore']; + + class RANGE extends BaseTypes.RANGE { + _value(values, options) { + if (!Array.isArray(values)) { + return this.options.subtype.stringify(values, options); + } + const valueInclusivity = [true, false]; + const valuesStringified = values.map((value, index) => { + if (_.isObject(value) && Object.prototype.hasOwnProperty.call(value, 'value')) { + if (Object.prototype.hasOwnProperty.call(value, 'inclusive')) { + valueInclusivity[index] = value.inclusive; + } + value = value.value; + } + if (value === null || value === -Infinity || value === Infinity) { + // Pass through "unbounded" bounds unchanged + return value; + } + if (this.options.subtype.stringify) { + return this.options.subtype.stringify(value, options); + } + return options.escape(value); + }); + // Array.map does not preserve extra array properties + valuesStringified.inclusive = valueInclusivity; + return range.stringify(valuesStringified); + } + _stringify(values, options) { + const value = this._value(values, options); + if (!Array.isArray(values)) { + return `'${value}'::${this.toCastType()}`; + } + return `'${value}'`; + } + _bindParam(values, options) { + const value = this._value(values, options); + if (!Array.isArray(values)) { + return `${options.bindParam(value)}::${this.toCastType()}`; + } + return options.bindParam(value); + } + toSql() { + return BaseTypes.RANGE.types.postgres.subtypes[this._subtype.toLowerCase()]; + } + toCastType() { + return BaseTypes.RANGE.types.postgres.castTypes[this._subtype.toLowerCase()]; + } + static parse(value, options = { parser: val => val }) { + return range.parse(value, options.parser); + } + } + const range = require('./range'); + + RANGE.prototype.escape = false; + + BaseTypes.RANGE.types.postgres = { + subtypes: { + integer: 'int4range', + decimal: 'numrange', + date: 'tstzrange', + dateonly: 'daterange', + bigint: 'int8range' + }, + castTypes: { + integer: 'int4', + decimal: 'numeric', + date: 'timestamptz', + dateonly: 'date', + bigint: 'int8' + } + }; + + // TODO: Why are base types being manipulated?? + BaseTypes.ARRAY.prototype.escape = false; + BaseTypes.ARRAY.prototype._value = function _value(values, options) { + return values.map(value => { + if (options && options.bindParam && this.type && this.type._value) { + return this.type._value(value, options); + } + if (this.type && this.type.stringify) { + value = this.type.stringify(value, options); + + if (this.type.escape === false) { + return value; + } + } + return options.escape(value); + }, this); + }; + BaseTypes.ARRAY.prototype._stringify = function _stringify(values, options) { + let str = `ARRAY[${this._value(values, options).join(',')}]`; + + if (this.type) { + const Utils = require('../../utils'); + let castKey = this.toSql(); + + if (this.type instanceof BaseTypes.ENUM) { + castKey = `${Utils.addTicks( + Utils.generateEnumName(options.field.Model.getTableName(), options.field.fieldName), + '"' + ) }[]`; + } + + str += `::${castKey}`; + } + + return str; + }; + BaseTypes.ARRAY.prototype._bindParam = function _bindParam(values, options) { + return options.bindParam(this._value(values, options)); + }; + + class ENUM extends BaseTypes.ENUM { + static parse(value) { + return value; + } + } + + BaseTypes.ENUM.types.postgres = [null]; + + return { + DECIMAL, + BLOB, + STRING, + CHAR, + TEXT, + CITEXT, + TINYINT, + SMALLINT, + INTEGER, + BIGINT, + BOOLEAN, + DATE, + DATEONLY, + REAL, + 'DOUBLE PRECISION': DOUBLE, + FLOAT, + GEOMETRY, + GEOGRAPHY, + HSTORE, + RANGE, + ENUM + }; +}; diff --git a/node_modules/sequelize/lib/dialects/postgres/hstore.js b/node_modules/sequelize/lib/dialects/postgres/hstore.js new file mode 100644 index 00000000..77a03468 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/postgres/hstore.js @@ -0,0 +1,15 @@ +'use strict'; + +const hstore = require('pg-hstore')({ sanitize: true }); + +function stringify(data) { + if (data === null) return null; + return hstore.stringify(data); +} +exports.stringify = stringify; + +function parse(value) { + if (value === null) return null; + return hstore.parse(value); +} +exports.parse = parse; diff --git a/node_modules/sequelize/lib/dialects/postgres/index.js b/node_modules/sequelize/lib/dialects/postgres/index.js new file mode 100644 index 00000000..f7626a6b --- /dev/null +++ b/node_modules/sequelize/lib/dialects/postgres/index.js @@ -0,0 +1,70 @@ +'use strict'; + +const _ = require('lodash'); +const AbstractDialect = require('../abstract'); +const ConnectionManager = require('./connection-manager'); +const Query = require('./query'); +const QueryGenerator = require('./query-generator'); +const DataTypes = require('../../data-types').postgres; + +class PostgresDialect extends AbstractDialect { + constructor(sequelize) { + super(); + this.sequelize = sequelize; + this.connectionManager = new ConnectionManager(this, sequelize); + this.QueryGenerator = new QueryGenerator({ + _dialect: this, + sequelize + }); + } +} + +PostgresDialect.prototype.supports = _.merge(_.cloneDeep(AbstractDialect.prototype.supports), { + 'DEFAULT VALUES': true, + 'EXCEPTION': true, + 'ON DUPLICATE KEY': false, + 'ORDER NULLS': true, + returnValues: { + returning: true + }, + bulkDefault: true, + schemas: true, + lock: true, + lockOf: true, + lockKey: true, + lockOuterJoinFailure: true, + skipLocked: true, + forShare: 'FOR SHARE', + index: { + concurrently: true, + using: 2, + where: true, + functionBased: true + }, + inserts: { + onConflictDoNothing: ' ON CONFLICT DO NOTHING' + }, + NUMERIC: true, + ARRAY: true, + RANGE: true, + GEOMETRY: true, + REGEXP: true, + GEOGRAPHY: true, + JSON: true, + JSONB: true, + HSTORE: true, + deferrableConstraints: true, + searchPath: true +}); + +ConnectionManager.prototype.defaultVersion = '9.4.0'; +PostgresDialect.prototype.Query = Query; +PostgresDialect.prototype.DataTypes = DataTypes; +PostgresDialect.prototype.name = 'postgres'; +PostgresDialect.prototype.TICK_CHAR = '"'; +PostgresDialect.prototype.TICK_CHAR_LEFT = PostgresDialect.prototype.TICK_CHAR; +PostgresDialect.prototype.TICK_CHAR_RIGHT = PostgresDialect.prototype.TICK_CHAR; + +module.exports = PostgresDialect; +module.exports.default = PostgresDialect; +module.exports.PostgresDialect = PostgresDialect; diff --git a/node_modules/sequelize/lib/dialects/postgres/query-generator.js b/node_modules/sequelize/lib/dialects/postgres/query-generator.js new file mode 100755 index 00000000..54a5efd1 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/postgres/query-generator.js @@ -0,0 +1,902 @@ +'use strict'; + +const Utils = require('../../utils'); +const util = require('util'); +const DataTypes = require('../../data-types'); +const AbstractQueryGenerator = require('../abstract/query-generator'); +const semver = require('semver'); +const _ = require('lodash'); + +class PostgresQueryGenerator extends AbstractQueryGenerator { + setSearchPath(searchPath) { + return `SET search_path to ${searchPath};`; + } + + createDatabaseQuery(databaseName, options) { + options = Object.assign({ + encoding: null, + collate: null + }, options || {}); + + const values = { + database: this.quoteTable(databaseName), + encoding: options.encoding ? ` ENCODING = ${this.escape(options.encoding)}` : '', + collation: options.collate ? ` LC_COLLATE = ${this.escape(options.collate)}` : '', + ctype: options.ctype ? ` LC_CTYPE = ${this.escape(options.ctype)}` : '', + template: options.template ? ` TEMPLATE = ${this.escape(options.template)}` : '' + }; + + return `CREATE DATABASE ${values.database}${values.encoding}${values.collation}${values.ctype}${values.template};`; + } + + dropDatabaseQuery(databaseName) { + return `DROP DATABASE IF EXISTS ${this.quoteTable(databaseName)};`; + } + + createSchema(schema) { + const databaseVersion = _.get(this, 'sequelize.options.databaseVersion', 0); + + if (databaseVersion && semver.gte(databaseVersion, '9.2.0')) { + return `CREATE SCHEMA IF NOT EXISTS ${schema};`; + } + + return `CREATE SCHEMA ${schema};`; + } + + dropSchema(schema) { + return `DROP SCHEMA IF EXISTS ${schema} CASCADE;`; + } + + showSchemasQuery() { + return "SELECT schema_name FROM information_schema.schemata WHERE schema_name <> 'information_schema' AND schema_name != 'public' AND schema_name !~ E'^pg_';"; + } + + versionQuery() { + return 'SHOW SERVER_VERSION'; + } + + createTableQuery(tableName, attributes, options) { + options = Object.assign({}, options || {}); + + //Postgres 9.0 does not support CREATE TABLE IF NOT EXISTS, 9.1 and above do + const databaseVersion = _.get(this, 'sequelize.options.databaseVersion', 0); + const attrStr = []; + let comments = ''; + let columnComments = ''; + + const quotedTable = this.quoteTable(tableName); + + if (options.comment && typeof options.comment === 'string') { + comments += `; COMMENT ON TABLE ${quotedTable} IS ${this.escape(options.comment)}`; + } + + for (const attr in attributes) { + const quotedAttr = this.quoteIdentifier(attr); + const i = attributes[attr].indexOf('COMMENT '); + if (i !== -1) { + // Move comment to a separate query + const escapedCommentText = this.escape(attributes[attr].substring(i + 8)); + columnComments += `; COMMENT ON COLUMN ${quotedTable}.${quotedAttr} IS ${escapedCommentText}`; + attributes[attr] = attributes[attr].substring(0, i); + } + + const dataType = this.dataTypeMapping(tableName, attr, attributes[attr]); + attrStr.push(`${quotedAttr} ${dataType}`); + } + + + let attributesClause = attrStr.join(', '); + + if (options.uniqueKeys) { + _.each(options.uniqueKeys, columns => { + if (columns.customIndex) { + attributesClause += `, UNIQUE (${columns.fields.map(field => this.quoteIdentifier(field)).join(', ')})`; + } + }); + } + + const pks = _.reduce(attributes, (acc, attribute, key) => { + if (attribute.includes('PRIMARY KEY')) { + acc.push(this.quoteIdentifier(key)); + } + return acc; + }, []).join(','); + + if (pks.length > 0) { + attributesClause += `, PRIMARY KEY (${pks})`; + } + + return `CREATE TABLE ${databaseVersion === 0 || semver.gte(databaseVersion, '9.1.0') ? 'IF NOT EXISTS ' : ''}${quotedTable} (${attributesClause})${comments}${columnComments};`; + } + + dropTableQuery(tableName, options) { + options = options || {}; + return `DROP TABLE IF EXISTS ${this.quoteTable(tableName)}${options.cascade ? ' CASCADE' : ''};`; + } + + showTablesQuery() { + return "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_type LIKE '%TABLE' AND table_name != 'spatial_ref_sys';"; + } + + describeTableQuery(tableName, schema) { + if (!schema) schema = 'public'; + + return 'SELECT ' + + 'pk.constraint_type as "Constraint",' + + 'c.column_name as "Field", ' + + 'c.column_default as "Default",' + + 'c.is_nullable as "Null", ' + + '(CASE WHEN c.udt_name = \'hstore\' THEN c.udt_name ELSE c.data_type END) || (CASE WHEN c.character_maximum_length IS NOT NULL THEN \'(\' || c.character_maximum_length || \')\' ELSE \'\' END) as "Type", ' + + '(SELECT array_agg(e.enumlabel) FROM pg_catalog.pg_type t JOIN pg_catalog.pg_enum e ON t.oid=e.enumtypid WHERE t.typname=c.udt_name) AS "special", ' + + '(SELECT pgd.description FROM pg_catalog.pg_statio_all_tables AS st INNER JOIN pg_catalog.pg_description pgd on (pgd.objoid=st.relid) WHERE c.ordinal_position=pgd.objsubid AND c.table_name=st.relname) AS "Comment" ' + + 'FROM information_schema.columns c ' + + 'LEFT JOIN (SELECT tc.table_schema, tc.table_name, ' + + 'cu.column_name, tc.constraint_type ' + + 'FROM information_schema.TABLE_CONSTRAINTS tc ' + + 'JOIN information_schema.KEY_COLUMN_USAGE cu ' + + 'ON tc.table_schema=cu.table_schema and tc.table_name=cu.table_name ' + + 'and tc.constraint_name=cu.constraint_name ' + + 'and tc.constraint_type=\'PRIMARY KEY\') pk ' + + 'ON pk.table_schema=c.table_schema ' + + 'AND pk.table_name=c.table_name ' + + 'AND pk.column_name=c.column_name ' + + `WHERE c.table_name = ${this.escape(tableName)} AND c.table_schema = ${this.escape(schema)} `; + } + + /** + * Check whether the statmement is json function or simple path + * + * @param {string} stmt The statement to validate + * @returns {boolean} true if the given statement is json function + * @throws {Error} throw if the statement looks like json function but has invalid token + */ + _checkValidJsonStatement(stmt) { + if (typeof stmt !== 'string') { + return false; + } + + // https://www.postgresql.org/docs/current/static/functions-json.html + const jsonFunctionRegex = /^\s*((?:[a-z]+_){0,2}jsonb?(?:_[a-z]+){0,2})\([^)]*\)/i; + const jsonOperatorRegex = /^\s*(->>?|#>>?|@>|<@|\?[|&]?|\|{2}|#-)/i; + const tokenCaptureRegex = /^\s*((?:([`"'])(?:(?!\2).|\2{2})*\2)|[\w\d\s]+|[().,;+-])/i; + + let currentIndex = 0; + let openingBrackets = 0; + let closingBrackets = 0; + let hasJsonFunction = false; + let hasInvalidToken = false; + + while (currentIndex < stmt.length) { + const string = stmt.substr(currentIndex); + const functionMatches = jsonFunctionRegex.exec(string); + if (functionMatches) { + currentIndex += functionMatches[0].indexOf('('); + hasJsonFunction = true; + continue; + } + + const operatorMatches = jsonOperatorRegex.exec(string); + if (operatorMatches) { + currentIndex += operatorMatches[0].length; + hasJsonFunction = true; + continue; + } + + const tokenMatches = tokenCaptureRegex.exec(string); + if (tokenMatches) { + const capturedToken = tokenMatches[1]; + if (capturedToken === '(') { + openingBrackets++; + } else if (capturedToken === ')') { + closingBrackets++; + } else if (capturedToken === ';') { + hasInvalidToken = true; + break; + } + currentIndex += tokenMatches[0].length; + continue; + } + + break; + } + + // Check invalid json statement + hasInvalidToken |= openingBrackets !== closingBrackets; + if (hasJsonFunction && hasInvalidToken) { + throw new Error(`Invalid json statement: ${stmt}`); + } + + // return true if the statement has valid json function + return hasJsonFunction; + } + + handleSequelizeMethod(smth, tableName, factory, options, prepend) { + if (smth instanceof Utils.Json) { + // Parse nested object + if (smth.conditions) { + const conditions = this.parseConditionObject(smth.conditions).map(condition => + `${this.jsonPathExtractionQuery(condition.path[0], _.tail(condition.path))} = '${condition.value}'` + ); + + return conditions.join(' AND '); + } + if (smth.path) { + let str; + + // Allow specifying conditions using the postgres json syntax + if (this._checkValidJsonStatement(smth.path)) { + str = smth.path; + } else { + // Also support json property accessors + const paths = _.toPath(smth.path); + const column = paths.shift(); + str = this.jsonPathExtractionQuery(column, paths); + } + + if (smth.value) { + str += util.format(' = %s', this.escape(smth.value)); + } + + return str; + } + } + return super.handleSequelizeMethod.call(this, smth, tableName, factory, options, prepend); + } + + addColumnQuery(table, key, dataType) { + + const dbDataType = this.attributeToSQL(dataType, { context: 'addColumn', table, key }); + const definition = this.dataTypeMapping(table, key, dbDataType); + const quotedKey = this.quoteIdentifier(key); + const quotedTable = this.quoteTable(this.extractTableDetails(table)); + + let query = `ALTER TABLE ${quotedTable} ADD COLUMN ${quotedKey} ${definition};`; + + if (dataType.type && dataType.type instanceof DataTypes.ENUM || dataType instanceof DataTypes.ENUM) { + query = this.pgEnum(table, key, dataType) + query; + } + + return query; + } + + removeColumnQuery(tableName, attributeName) { + const quotedTableName = this.quoteTable(this.extractTableDetails(tableName)); + const quotedAttributeName = this.quoteIdentifier(attributeName); + return `ALTER TABLE ${quotedTableName} DROP COLUMN ${quotedAttributeName};`; + } + + changeColumnQuery(tableName, attributes) { + const query = subQuery => `ALTER TABLE ${this.quoteTable(tableName)} ALTER COLUMN ${subQuery};`; + const sql = []; + for (const attributeName in attributes) { + let definition = this.dataTypeMapping(tableName, attributeName, attributes[attributeName]); + let attrSql = ''; + + if (definition.includes('NOT NULL')) { + attrSql += query(`${this.quoteIdentifier(attributeName)} SET NOT NULL`); + + definition = definition.replace('NOT NULL', '').trim(); + } else if (!definition.includes('REFERENCES')) { + attrSql += query(`${this.quoteIdentifier(attributeName)} DROP NOT NULL`); + } + + if (definition.includes('DEFAULT')) { + attrSql += query(`${this.quoteIdentifier(attributeName)} SET DEFAULT ${definition.match(/DEFAULT ([^;]+)/)[1]}`); + + definition = definition.replace(/(DEFAULT[^;]+)/, '').trim(); + } else if (!definition.includes('REFERENCES')) { + attrSql += query(`${this.quoteIdentifier(attributeName)} DROP DEFAULT`); + } + + if (attributes[attributeName].startsWith('ENUM(')) { + attrSql += this.pgEnum(tableName, attributeName, attributes[attributeName]); + definition = definition.replace(/^ENUM\(.+\)/, this.pgEnumName(tableName, attributeName, { schema: false })); + definition += ` USING (${this.quoteIdentifier(attributeName)}::${this.pgEnumName(tableName, attributeName)})`; + } + + if (definition.match(/UNIQUE;*$/)) { + definition = definition.replace(/UNIQUE;*$/, ''); + attrSql += query(`ADD UNIQUE (${this.quoteIdentifier(attributeName)})`).replace('ALTER COLUMN', ''); + } + + if (definition.includes('REFERENCES')) { + definition = definition.replace(/.+?(?=REFERENCES)/, ''); + attrSql += query(`ADD FOREIGN KEY (${this.quoteIdentifier(attributeName)}) ${definition}`).replace('ALTER COLUMN', ''); + } else { + attrSql += query(`${this.quoteIdentifier(attributeName)} TYPE ${definition}`); + } + + sql.push(attrSql); + } + + return sql.join(''); + } + + renameColumnQuery(tableName, attrBefore, attributes) { + + const attrString = []; + + for (const attributeName in attributes) { + attrString.push(`${this.quoteIdentifier(attrBefore)} TO ${this.quoteIdentifier(attributeName)}`); + } + + return `ALTER TABLE ${this.quoteTable(tableName)} RENAME COLUMN ${attrString.join(', ')};`; + } + + fn(fnName, tableName, parameters, body, returns, language) { + fnName = fnName || 'testfunc'; + language = language || 'plpgsql'; + returns = returns ? `RETURNS ${returns}` : ''; + parameters = parameters || ''; + + return `CREATE OR REPLACE FUNCTION pg_temp.${fnName}(${parameters}) ${returns} AS $func$ BEGIN ${body} END; $func$ LANGUAGE ${language}; SELECT * FROM pg_temp.${fnName}();`; + } + + exceptionFn(fnName, tableName, parameters, main, then, when, returns, language) { + when = when || 'unique_violation'; + + const body = `${main} EXCEPTION WHEN ${when} THEN ${then};`; + + return this.fn(fnName, tableName, parameters, body, returns, language); + } + + upsertQuery(tableName, insertValues, updateValues, where, model, options) { + const primaryField = this.quoteIdentifier(model.primaryKeyField); + + const upsertOptions = _.defaults({ bindParam: false }, options); + const insert = this.insertQuery(tableName, insertValues, model.rawAttributes, upsertOptions); + const update = this.updateQuery(tableName, updateValues, where, upsertOptions, model.rawAttributes); + + insert.query = insert.query.replace('RETURNING *', `RETURNING ${primaryField} INTO primary_key`); + update.query = update.query.replace('RETURNING *', `RETURNING ${primaryField} INTO primary_key`); + + return this.exceptionFn( + 'sequelize_upsert', + tableName, + 'OUT created boolean, OUT primary_key text', + `${insert.query} created := true;`, + `${update.query}; created := false` + ); + } + + truncateTableQuery(tableName, options = {}) { + return [ + `TRUNCATE ${this.quoteTable(tableName)}`, + options.restartIdentity ? ' RESTART IDENTITY' : '', + options.cascade ? ' CASCADE' : '' + ].join(''); + } + + deleteQuery(tableName, where, options = {}, model) { + const table = this.quoteTable(tableName); + let whereClause = this.getWhereConditions(where, null, model, options); + const limit = options.limit ? ` LIMIT ${this.escape(options.limit)}` : ''; + let primaryKeys = ''; + let primaryKeysSelection = ''; + + if (whereClause) { + whereClause = ` WHERE ${whereClause}`; + } + + if (options.limit) { + if (!model) { + throw new Error('Cannot LIMIT delete without a model.'); + } + + const pks = _.values(model.primaryKeys).map(pk => this.quoteIdentifier(pk.field)).join(','); + + primaryKeys = model.primaryKeyAttributes.length > 1 ? `(${pks})` : pks; + primaryKeysSelection = pks; + + return `DELETE FROM ${table} WHERE ${primaryKeys} IN (SELECT ${primaryKeysSelection} FROM ${table}${whereClause}${limit})`; + } + return `DELETE FROM ${table}${whereClause}`; + } + + showIndexesQuery(tableName) { + let schemaJoin = ''; + let schemaWhere = ''; + if (typeof tableName !== 'string') { + schemaJoin = ', pg_namespace s'; + schemaWhere = ` AND s.oid = t.relnamespace AND s.nspname = '${tableName.schema}'`; + tableName = tableName.tableName; + } + + // This is ARCANE! + return 'SELECT i.relname AS name, ix.indisprimary AS primary, ix.indisunique AS unique, ix.indkey AS indkey, ' + + 'array_agg(a.attnum) as column_indexes, array_agg(a.attname) AS column_names, pg_get_indexdef(ix.indexrelid) ' + + `AS definition FROM pg_class t, pg_class i, pg_index ix, pg_attribute a${schemaJoin} ` + + 'WHERE t.oid = ix.indrelid AND i.oid = ix.indexrelid AND a.attrelid = t.oid AND ' + + `t.relkind = 'r' and t.relname = '${tableName}'${schemaWhere} ` + + 'GROUP BY i.relname, ix.indexrelid, ix.indisprimary, ix.indisunique, ix.indkey ORDER BY i.relname;'; + } + + showConstraintsQuery(tableName) { + //Postgres converts camelCased alias to lowercase unless quoted + return [ + 'SELECT constraint_catalog AS "constraintCatalog",', + 'constraint_schema AS "constraintSchema",', + 'constraint_name AS "constraintName",', + 'table_catalog AS "tableCatalog",', + 'table_schema AS "tableSchema",', + 'table_name AS "tableName",', + 'constraint_type AS "constraintType",', + 'is_deferrable AS "isDeferrable",', + 'initially_deferred AS "initiallyDeferred"', + 'from INFORMATION_SCHEMA.table_constraints', + `WHERE table_name='${tableName}';` + ].join(' '); + } + + removeIndexQuery(tableName, indexNameOrAttributes) { + let indexName = indexNameOrAttributes; + + if (typeof indexName !== 'string') { + indexName = Utils.underscore(`${tableName}_${indexNameOrAttributes.join('_')}`); + } + + return `DROP INDEX IF EXISTS ${this.quoteIdentifiers(indexName)}`; + } + + addLimitAndOffset(options) { + let fragment = ''; + /* eslint-disable */ + if (options.limit != null) { + fragment += ' LIMIT ' + this.escape(options.limit); + } + if (options.offset != null) { + fragment += ' OFFSET ' + this.escape(options.offset); + } + /* eslint-enable */ + + return fragment; + } + + attributeToSQL(attribute, options) { + if (!_.isPlainObject(attribute)) { + attribute = { + type: attribute + }; + } + + let type; + if ( + attribute.type instanceof DataTypes.ENUM || + attribute.type instanceof DataTypes.ARRAY && attribute.type.type instanceof DataTypes.ENUM + ) { + const enumType = attribute.type.type || attribute.type; + let values = attribute.values; + + if (enumType.values && !attribute.values) { + values = enumType.values; + } + + if (Array.isArray(values) && values.length > 0) { + type = `ENUM(${values.map(value => this.escape(value)).join(', ')})`; + + if (attribute.type instanceof DataTypes.ARRAY) { + type += '[]'; + } + + } else { + throw new Error("Values for ENUM haven't been defined."); + } + } + + if (!type) { + type = attribute.type; + } + + let sql = type.toString(); + + if (Object.prototype.hasOwnProperty.call(attribute, 'allowNull') && !attribute.allowNull) { + sql += ' NOT NULL'; + } + + if (attribute.autoIncrement) { + sql += ' SERIAL'; + } + + if (Utils.defaultValueSchemable(attribute.defaultValue)) { + sql += ` DEFAULT ${this.escape(attribute.defaultValue, attribute)}`; + } + + if (attribute.unique === true) { + sql += ' UNIQUE'; + } + + if (attribute.primaryKey) { + sql += ' PRIMARY KEY'; + } + + if (attribute.references) { + const referencesTable = this.quoteTable(attribute.references.model); + let referencesKey; + + if (attribute.references.key) { + referencesKey = this.quoteIdentifiers(attribute.references.key); + } else { + referencesKey = this.quoteIdentifier('id'); + } + + sql += ` REFERENCES ${referencesTable} (${referencesKey})`; + + if (attribute.onDelete) { + sql += ` ON DELETE ${attribute.onDelete.toUpperCase()}`; + } + + if (attribute.onUpdate) { + sql += ` ON UPDATE ${attribute.onUpdate.toUpperCase()}`; + } + + if (attribute.references.deferrable) { + sql += ` ${attribute.references.deferrable.toString(this)}`; + } + } + + if (attribute.comment && typeof attribute.comment === 'string') { + if (options && (options.context === 'addColumn' || options.context === 'changeColumn')) { + const quotedAttr = this.quoteIdentifier(options.key); + const escapedCommentText = this.escape(attribute.comment); + sql += `; COMMENT ON COLUMN ${this.quoteTable(options.table)}.${quotedAttr} IS ${escapedCommentText}`; + } else { + // for createTable event which does it's own parsing + // TODO: centralize creation of comment statements here + sql += ` COMMENT ${attribute.comment}`; + } + } + + return sql; + } + + deferConstraintsQuery(options) { + return options.deferrable.toString(this); + } + + setConstraintQuery(columns, type) { + let columnFragment = 'ALL'; + + if (columns) { + columnFragment = columns.map(column => this.quoteIdentifier(column)).join(', '); + } + + return `SET CONSTRAINTS ${columnFragment} ${type}`; + } + + setDeferredQuery(columns) { + return this.setConstraintQuery(columns, 'DEFERRED'); + } + + setImmediateQuery(columns) { + return this.setConstraintQuery(columns, 'IMMEDIATE'); + } + + attributesToSQL(attributes, options) { + const result = {}; + + for (const key in attributes) { + const attribute = attributes[key]; + result[attribute.field || key] = this.attributeToSQL(attribute, Object.assign({ key }, options || {})); + } + + return result; + } + + createTrigger(tableName, triggerName, eventType, fireOnSpec, functionName, functionParams, optionsArray) { + const decodedEventType = this.decodeTriggerEventType(eventType); + const eventSpec = this.expandTriggerEventSpec(fireOnSpec); + const expandedOptions = this.expandOptions(optionsArray); + const paramList = this.expandFunctionParamList(functionParams); + + return `CREATE ${this.triggerEventTypeIsConstraint(eventType)}TRIGGER ${this.quoteIdentifier(triggerName)} ${decodedEventType} ${ + eventSpec} ON ${this.quoteTable(tableName)}${expandedOptions ? ` ${expandedOptions}` : ''} EXECUTE PROCEDURE ${functionName}(${paramList});`; + } + + dropTrigger(tableName, triggerName) { + return `DROP TRIGGER ${this.quoteIdentifier(triggerName)} ON ${this.quoteTable(tableName)} RESTRICT;`; + } + + renameTrigger(tableName, oldTriggerName, newTriggerName) { + return `ALTER TRIGGER ${this.quoteIdentifier(oldTriggerName)} ON ${this.quoteTable(tableName)} RENAME TO ${this.quoteIdentifier(newTriggerName)};`; + } + + createFunction(functionName, params, returnType, language, body, optionsArray, options) { + if (!functionName || !returnType || !language || !body) throw new Error('createFunction missing some parameters. Did you pass functionName, returnType, language and body?'); + + const paramList = this.expandFunctionParamList(params); + const expandedOptionsArray = this.expandOptions(optionsArray); + + const statement = options && options.force ? 'CREATE OR REPLACE FUNCTION' : 'CREATE FUNCTION'; + + return `${statement} ${functionName}(${paramList}) RETURNS ${returnType} AS $func$ BEGIN ${body} END; $func$ language '${language}'${expandedOptionsArray};`; + } + + dropFunction(functionName, params) { + if (!functionName) throw new Error('requires functionName'); + // RESTRICT is (currently, as of 9.2) default but we'll be explicit + const paramList = this.expandFunctionParamList(params); + return `DROP FUNCTION ${functionName}(${paramList}) RESTRICT;`; + } + + renameFunction(oldFunctionName, params, newFunctionName) { + const paramList = this.expandFunctionParamList(params); + return `ALTER FUNCTION ${oldFunctionName}(${paramList}) RENAME TO ${newFunctionName};`; + } + + databaseConnectionUri(config) { + let uri = `${config.protocol}://${config.user}:${config.password}@${config.host}`; + if (config.port) { + uri += `:${config.port}`; + } + uri += `/${config.database}`; + if (config.ssl) { + uri += `?ssl=${config.ssl}`; + } + return uri; + } + + pgEscapeAndQuote(val) { + return this.quoteIdentifier(Utils.removeTicks(this.escape(val), "'")); + } + + expandFunctionParamList(params) { + if (params === undefined || !Array.isArray(params)) { + throw new Error('expandFunctionParamList: function parameters array required, including an empty one for no arguments'); + } + + const paramList = []; + params.forEach(curParam => { + const paramDef = []; + if (curParam.type) { + if (curParam.direction) { paramDef.push(curParam.direction); } + if (curParam.name) { paramDef.push(curParam.name); } + paramDef.push(curParam.type); + } else { + throw new Error('function or trigger used with a parameter without any type'); + } + + const joined = paramDef.join(' '); + if (joined) paramList.push(joined); + + }); + + return paramList.join(', '); + } + + expandOptions(options) { + return options === undefined || _.isEmpty(options) ? + '' : options.join(' '); + } + + decodeTriggerEventType(eventSpecifier) { + const EVENT_DECODER = { + 'after': 'AFTER', + 'before': 'BEFORE', + 'instead_of': 'INSTEAD OF', + 'after_constraint': 'AFTER' + }; + + if (!EVENT_DECODER[eventSpecifier]) { + throw new Error(`Invalid trigger event specified: ${eventSpecifier}`); + } + + return EVENT_DECODER[eventSpecifier]; + } + + triggerEventTypeIsConstraint(eventSpecifier) { + return eventSpecifier === 'after_constraint' ? 'CONSTRAINT ' : ''; + } + + expandTriggerEventSpec(fireOnSpec) { + if (_.isEmpty(fireOnSpec)) { + throw new Error('no table change events specified to trigger on'); + } + + return _.map(fireOnSpec, (fireValue, fireKey) => { + const EVENT_MAP = { + 'insert': 'INSERT', + 'update': 'UPDATE', + 'delete': 'DELETE', + 'truncate': 'TRUNCATE' + }; + + if (!EVENT_MAP[fireValue]) { + throw new Error(`parseTriggerEventSpec: undefined trigger event ${fireKey}`); + } + + let eventSpec = EVENT_MAP[fireValue]; + if (eventSpec === 'UPDATE') { + if (Array.isArray(fireValue) && fireValue.length > 0) { + eventSpec += ` OF ${fireValue.join(', ')}`; + } + } + + return eventSpec; + }).join(' OR '); + } + + pgEnumName(tableName, attr, options) { + options = options || {}; + + const tableDetails = this.extractTableDetails(tableName, options); + let enumName = Utils.addTicks(Utils.generateEnumName(tableDetails.tableName, attr), '"'); + + // pgListEnums requires the enum name only, without the schema + if (options.schema !== false && tableDetails.schema) { + enumName = this.quoteIdentifier(tableDetails.schema) + tableDetails.delimiter + enumName; + } + + return enumName; + } + + pgListEnums(tableName, attrName, options) { + let enumName = ''; + const tableDetails = this.extractTableDetails(tableName, options); + + if (tableDetails.tableName && attrName) { + enumName = ` AND t.typname=${this.pgEnumName(tableDetails.tableName, attrName, { schema: false }).replace(/"/g, "'")}`; + } + + return 'SELECT t.typname enum_name, array_agg(e.enumlabel ORDER BY enumsortorder) enum_value FROM pg_type t ' + + 'JOIN pg_enum e ON t.oid = e.enumtypid ' + + 'JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace ' + + `WHERE n.nspname = '${tableDetails.schema}'${enumName} GROUP BY 1`; + } + + pgEnum(tableName, attr, dataType, options) { + const enumName = this.pgEnumName(tableName, attr, options); + let values; + + if (dataType.values) { + values = `ENUM('${dataType.values.join("', '")}')`; + } else { + values = dataType.toString().match(/^ENUM\(.+\)/)[0]; + } + + let sql = `CREATE TYPE ${enumName} AS ${values};`; + if (!!options && options.force === true) { + sql = this.pgEnumDrop(tableName, attr) + sql; + } + return sql; + } + + pgEnumAdd(tableName, attr, value, options) { + const enumName = this.pgEnumName(tableName, attr); + let sql = `ALTER TYPE ${enumName} ADD VALUE `; + + if (semver.gte(this.sequelize.options.databaseVersion, '9.3.0')) { + sql += 'IF NOT EXISTS '; + } + sql += this.escape(value); + + if (options.before) { + sql += ` BEFORE ${this.escape(options.before)}`; + } else if (options.after) { + sql += ` AFTER ${this.escape(options.after)}`; + } + + return sql; + } + + pgEnumDrop(tableName, attr, enumName) { + enumName = enumName || this.pgEnumName(tableName, attr); + return `DROP TYPE IF EXISTS ${enumName}; `; + } + + fromArray(text) { + text = text.replace(/^{/, '').replace(/}$/, ''); + let matches = text.match(/("(?:\\.|[^"\\\\])*"|[^,]*)(?:\s*,\s*|\s*$)/ig); + + if (matches.length < 1) { + return []; + } + + matches = matches.map(m => m.replace(/",$/, '').replace(/,$/, '').replace(/(^"|"$)/, '')); + + return matches.slice(0, -1); + } + + padInt(i) { + return i < 10 ? `0${i.toString()}` : i.toString(); + } + + dataTypeMapping(tableName, attr, dataType) { + if (dataType.includes('PRIMARY KEY')) { + dataType = dataType.replace('PRIMARY KEY', ''); + } + + if (dataType.includes('SERIAL')) { + if (dataType.includes('BIGINT')) { + dataType = dataType.replace('SERIAL', 'BIGSERIAL'); + dataType = dataType.replace('BIGINT', ''); + } else if (dataType.includes('SMALLINT')) { + dataType = dataType.replace('SERIAL', 'SMALLSERIAL'); + dataType = dataType.replace('SMALLINT', ''); + } else { + dataType = dataType.replace('INTEGER', ''); + } + dataType = dataType.replace('NOT NULL', ''); + } + + if (dataType.startsWith('ENUM(')) { + dataType = dataType.replace(/^ENUM\(.+\)/, this.pgEnumName(tableName, attr)); + } + + return dataType; + } + + /** + * Generates an SQL query that returns all foreign keys of a table. + * + * @param {string} tableName The name of the table. + * @returns {string} The generated sql query. + * @private + */ + getForeignKeysQuery(tableName) { + return 'SELECT conname as constraint_name, pg_catalog.pg_get_constraintdef(r.oid, true) as condef FROM pg_catalog.pg_constraint r ' + + `WHERE r.conrelid = (SELECT oid FROM pg_class WHERE relname = '${tableName}' LIMIT 1) AND r.contype = 'f' ORDER BY 1;`; + } + + /** + * Generate common SQL prefix for getForeignKeyReferencesQuery. + * + * @returns {string} + */ + _getForeignKeyReferencesQueryPrefix() { + return 'SELECT ' + + 'DISTINCT tc.constraint_name as constraint_name, ' + + 'tc.constraint_schema as constraint_schema, ' + + 'tc.constraint_catalog as constraint_catalog, ' + + 'tc.table_name as table_name,' + + 'tc.table_schema as table_schema,' + + 'tc.table_catalog as table_catalog,' + + 'kcu.column_name as column_name,' + + 'ccu.table_schema AS referenced_table_schema,' + + 'ccu.table_catalog AS referenced_table_catalog,' + + 'ccu.table_name AS referenced_table_name,' + + 'ccu.column_name AS referenced_column_name ' + + 'FROM information_schema.table_constraints AS tc ' + + 'JOIN information_schema.key_column_usage AS kcu ' + + 'ON tc.constraint_name = kcu.constraint_name ' + + 'JOIN information_schema.constraint_column_usage AS ccu ' + + 'ON ccu.constraint_name = tc.constraint_name '; + } + + /** + * Generates an SQL query that returns all foreign keys details of a table. + * + * As for getForeignKeysQuery is not compatible with getForeignKeyReferencesQuery, so add a new function. + * + * @param {string} tableName + * @param {string} catalogName + * @param {string} schemaName + */ + getForeignKeyReferencesQuery(tableName, catalogName, schemaName) { + return `${this._getForeignKeyReferencesQueryPrefix() + }WHERE constraint_type = 'FOREIGN KEY' AND tc.table_name = '${tableName}'${ + catalogName ? ` AND tc.table_catalog = '${catalogName}'` : '' + }${schemaName ? ` AND tc.table_schema = '${schemaName}'` : ''}`; + } + + getForeignKeyReferenceQuery(table, columnName) { + const tableName = table.tableName || table; + const schema = table.schema; + return `${this._getForeignKeyReferencesQueryPrefix() + }WHERE constraint_type = 'FOREIGN KEY' AND tc.table_name='${tableName}' AND kcu.column_name = '${columnName}'${ + schema ? ` AND tc.table_schema = '${schema}'` : ''}`; + } + + /** + * Generates an SQL query that removes a foreign key from a table. + * + * @param {string} tableName The name of the table. + * @param {string} foreignKey The name of the foreign key constraint. + * @returns {string} The generated sql query. + * @private + */ + dropForeignKeyQuery(tableName, foreignKey) { + return `ALTER TABLE ${this.quoteTable(tableName)} DROP CONSTRAINT ${this.quoteIdentifier(foreignKey)};`; + } +} + +module.exports = PostgresQueryGenerator; diff --git a/node_modules/sequelize/lib/dialects/postgres/query-interface.js b/node_modules/sequelize/lib/dialects/postgres/query-interface.js new file mode 100644 index 00000000..9a5399e4 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/postgres/query-interface.js @@ -0,0 +1,110 @@ +'use strict'; + +const DataTypes = require('../../data-types'); +const Promise = require('../../promise'); +const QueryTypes = require('../../query-types'); +const _ = require('lodash'); + + +/** + Returns an object that handles Postgres special needs to do certain queries. + + @class QueryInterface + @static + @private + */ + +/** + * Ensure enum and their values. + * + * @param {QueryInterface} qi + * @param {string} tableName Name of table to create + * @param {Object} attributes Object representing a list of normalized table attributes + * @param {Object} [options] + * @param {Model} [model] + * + * @returns {Promise} + * @private + */ +function ensureEnums(qi, tableName, attributes, options, model) { + const keys = Object.keys(attributes); + const keyLen = keys.length; + + let sql = ''; + let promises = []; + let i = 0; + + for (i = 0; i < keyLen; i++) { + const attribute = attributes[keys[i]]; + const type = attribute.type; + + if ( + type instanceof DataTypes.ENUM || + type instanceof DataTypes.ARRAY && type.type instanceof DataTypes.ENUM //ARRAY sub type is ENUM + ) { + sql = qi.QueryGenerator.pgListEnums(tableName, attribute.field || keys[i], options); + promises.push(qi.sequelize.query( + sql, + Object.assign({}, options, { plain: true, raw: true, type: QueryTypes.SELECT }) + )); + } + } + + return Promise.all(promises).then(results => { + promises = []; + let enumIdx = 0; + + for (i = 0; i < keyLen; i++) { + const attribute = attributes[keys[i]]; + const type = attribute.type; + const enumType = type.type || type; + + if ( + type instanceof DataTypes.ENUM || + type instanceof DataTypes.ARRAY && enumType instanceof DataTypes.ENUM //ARRAY sub type is ENUM + ) { + // If the enum type doesn't exist then create it + if (!results[enumIdx]) { + sql = qi.QueryGenerator.pgEnum(tableName, attribute.field || keys[i], enumType, options); + promises.push(qi.sequelize.query( + sql, + Object.assign({}, options, { raw: true }) + )); + } else if (!!results[enumIdx] && !!model) { + const enumVals = qi.QueryGenerator.fromArray(results[enumIdx].enum_value); + const vals = enumType.values; + + vals.forEach((value, idx) => { + // reset out after/before options since it's for every enum value + const valueOptions = _.clone(options); + valueOptions.before = null; + valueOptions.after = null; + + if (!enumVals.includes(value)) { + if (vals[idx + 1]) { + valueOptions.before = vals[idx + 1]; + } + else if (vals[idx - 1]) { + valueOptions.after = vals[idx - 1]; + } + valueOptions.supportsSearchPath = false; + promises.push(qi.sequelize.query(qi.QueryGenerator.pgEnumAdd(tableName, attribute.field || keys[i], value, valueOptions), valueOptions)); + } + }); + enumIdx++; + } + } + } + + return Promise.all(promises) + .tap(() => { + // If ENUM processed, then refresh OIDs + if (promises.length) { + return qi.sequelize.dialect.connectionManager._refreshDynamicOIDs(); + } + }); + }); +} + + +exports.ensureEnums = ensureEnums; diff --git a/node_modules/sequelize/lib/dialects/postgres/query.js b/node_modules/sequelize/lib/dialects/postgres/query.js new file mode 100644 index 00000000..364cb43e --- /dev/null +++ b/node_modules/sequelize/lib/dialects/postgres/query.js @@ -0,0 +1,370 @@ +'use strict'; + +const AbstractQuery = require('../abstract/query'); +const QueryTypes = require('../../query-types'); +const Promise = require('../../promise'); +const sequelizeErrors = require('../../errors'); +const _ = require('lodash'); +const { logger } = require('../../utils/logger'); + +const debug = logger.debugContext('sql:pg'); + + +class Query extends AbstractQuery { + /** + * Rewrite query with parameters. + * + * @param {string} sql + * @param {Array|Object} values + * @param {string} dialect + * @private + */ + static formatBindParameters(sql, values, dialect) { + const stringReplaceFunc = value => typeof value === 'string' ? value.replace(/\0/g, '\\0') : value; + + let bindParam; + if (Array.isArray(values)) { + bindParam = values.map(stringReplaceFunc); + sql = AbstractQuery.formatBindParameters(sql, values, dialect, { skipValueReplace: true })[0]; + } else { + bindParam = []; + let i = 0; + const seen = {}; + const replacementFunc = (match, key, values) => { + if (seen[key] !== undefined) { + return seen[key]; + } + if (values[key] !== undefined) { + i = i + 1; + bindParam.push(stringReplaceFunc(values[key])); + seen[key] = `$${i}`; + return `$${i}`; + } + return undefined; + }; + sql = AbstractQuery.formatBindParameters(sql, values, dialect, replacementFunc)[0]; + } + return [sql, bindParam]; + } + + run(sql, parameters) { + const { connection } = this; + + if (!_.isEmpty(this.options.searchPath)) { + sql = this.sequelize.getQueryInterface().QueryGenerator.setSearchPath(this.options.searchPath) + sql; + } + this.sql = sql; + + const query = parameters && parameters.length + ? new Promise((resolve, reject) => connection.query(sql, parameters, (error, result) => error ? reject(error) : resolve(result))) + : new Promise((resolve, reject) => connection.query(sql, (error, result) => error ? reject(error) : resolve(result))); + + const complete = this._logQuery(sql, debug); + + return query.catch(err => { + // set the client so that it will be reaped if the connection resets while executing + if (err.code === 'ECONNRESET') { + connection._invalid = true; + } + + err.sql = sql; + throw this.formatError(err); + }) + .then(queryResult => { + complete(); + + const rows = Array.isArray(queryResult) + ? queryResult.reduce((allRows, r) => allRows.concat(r.rows || []), []) + : queryResult.rows; + const rowCount = Array.isArray(queryResult) + ? queryResult.reduce( + (count, r) => Number.isFinite(r.rowCount) ? count + r.rowCount : count, + 0 + ) + : queryResult.rowCount; + + const isTableNameQuery = sql.startsWith('SELECT table_name FROM information_schema.tables'); + const isRelNameQuery = sql.startsWith('SELECT relname FROM pg_class WHERE oid IN'); + + if (isRelNameQuery) { + return rows.map(row => ({ + name: row.relname, + tableName: row.relname.split('_')[0] + })); + } + if (isTableNameQuery) { + return rows.map(row => _.values(row)); + } + + if (rows[0] && rows[0].sequelize_caught_exception !== undefined) { + if (rows[0].sequelize_caught_exception !== null) { + throw this.formatError({ + code: '23505', + detail: rows[0].sequelize_caught_exception + }); + } + for (const row of rows) { + delete row.sequelize_caught_exception; + } + } + + if (this.isShowIndexesQuery()) { + for (const row of rows) { + const attributes = /ON .*? (?:USING .*?\s)?\(([^]*)\)/gi.exec(row.definition)[1].split(','); + + // Map column index in table to column name + const columns = _.zipObject( + row.column_indexes, + this.sequelize.getQueryInterface().QueryGenerator.fromArray(row.column_names) + ); + delete row.column_indexes; + delete row.column_names; + + let field; + let attribute; + + // Indkey is the order of attributes in the index, specified by a string of attribute indexes + row.fields = row.indkey.split(' ').map((indKey, index) => { + field = columns[indKey]; + // for functional indices indKey = 0 + if (!field) { + return null; + } + attribute = attributes[index]; + return { + attribute: field, + collate: attribute.match(/COLLATE "(.*?)"/) ? /COLLATE "(.*?)"/.exec(attribute)[1] : undefined, + order: attribute.includes('DESC') ? 'DESC' : attribute.includes('ASC') ? 'ASC': undefined, + length: undefined + }; + }).filter(n => n !== null); + delete row.columns; + } + return rows; + } + if (this.isForeignKeysQuery()) { + const result = []; + for (const row of rows) { + let defParts; + if (row.condef !== undefined && (defParts = row.condef.match(/FOREIGN KEY \((.+)\) REFERENCES (.+)\((.+)\)( ON (UPDATE|DELETE) (CASCADE|RESTRICT))?( ON (UPDATE|DELETE) (CASCADE|RESTRICT))?/))) { + row.id = row.constraint_name; + row.table = defParts[2]; + row.from = defParts[1]; + row.to = defParts[3]; + let i; + for (i=5;i<=8;i+=3) { + if (/(UPDATE|DELETE)/.test(defParts[i])) { + row[`on_${defParts[i].toLowerCase()}`] = defParts[i+1]; + } + } + } + result.push(row); + } + return result; + } + if (this.isSelectQuery()) { + let result = rows; + // Postgres will treat tables as case-insensitive, so fix the case + // of the returned values to match attributes + if (this.options.raw === false && this.sequelize.options.quoteIdentifiers === false) { + const attrsMap = _.reduce(this.model.rawAttributes, (m, v, k) => { + m[k.toLowerCase()] = k; + return m; + }, {}); + result = rows.map(row => { + return _.mapKeys(row, (value, key)=> { + const targetAttr = attrsMap[key]; + if (typeof targetAttr === 'string' && targetAttr !== key) { + return targetAttr; + } + return key; + }); + }); + } + return this.handleSelectQuery(result); + } + if (QueryTypes.DESCRIBE === this.options.type) { + const result = {}; + + for (const row of rows) { + result[row.Field] = { + type: row.Type.toUpperCase(), + allowNull: row.Null === 'YES', + defaultValue: row.Default, + comment: row.Comment, + special: row.special ? this.sequelize.getQueryInterface().QueryGenerator.fromArray(row.special) : [], + primaryKey: row.Constraint === 'PRIMARY KEY' + }; + + if (result[row.Field].type === 'BOOLEAN') { + result[row.Field].defaultValue = { 'false': false, 'true': true }[result[row.Field].defaultValue]; + + if (result[row.Field].defaultValue === undefined) { + result[row.Field].defaultValue = null; + } + } + + if (typeof result[row.Field].defaultValue === 'string') { + result[row.Field].defaultValue = result[row.Field].defaultValue.replace(/'/g, ''); + + if (result[row.Field].defaultValue.includes('::')) { + const split = result[row.Field].defaultValue.split('::'); + if (split[1].toLowerCase() !== 'regclass)') { + result[row.Field].defaultValue = split[0]; + } + } + } + } + + return result; + } + if (this.isVersionQuery()) { + return rows[0].server_version; + } + if (this.isShowOrDescribeQuery()) { + return rows; + } + if (QueryTypes.BULKUPDATE === this.options.type) { + if (!this.options.returning) { + return parseInt(rowCount, 10); + } + return this.handleSelectQuery(rows); + } + if (QueryTypes.BULKDELETE === this.options.type) { + return parseInt(rowCount, 10); + } + if (this.isUpsertQuery()) { + return rows[0]; + } + if (this.isInsertQuery() || this.isUpdateQuery()) { + if (this.instance && this.instance.dataValues) { + for (const key in rows[0]) { + if (Object.prototype.hasOwnProperty.call(rows[0], key)) { + const record = rows[0][key]; + + const attr = _.find(this.model.rawAttributes, attribute => attribute.fieldName === key || attribute.field === key); + + this.instance.dataValues[attr && attr.fieldName || key] = record; + } + } + } + + return [ + this.instance || rows && (this.options.plain && rows[0] || rows) || undefined, + rowCount + ]; + } + if (this.isRawQuery()) { + return [rows, queryResult]; + } + return rows; + }); + } + + formatError(err) { + let match; + let table; + let index; + let fields; + let errors; + let message; + + const code = err.code || err.sqlState; + const errMessage = err.message || err.messagePrimary; + const errDetail = err.detail || err.messageDetail; + + switch (code) { + case '23503': + index = errMessage.match(/violates foreign key constraint "(.+?)"/); + index = index ? index[1] : undefined; + table = errMessage.match(/on table "(.+?)"/); + table = table ? table[1] : undefined; + + return new sequelizeErrors.ForeignKeyConstraintError({ message: errMessage, fields: null, index, table, parent: err }); + case '23505': + // there are multiple different formats of error messages for this error code + // this regex should check at least two + if (errDetail && (match = errDetail.replace(/"/g, '').match(/Key \((.*?)\)=\((.*?)\)/))) { + fields = _.zipObject(match[1].split(', '), match[2].split(', ')); + errors = []; + message = 'Validation error'; + + _.forOwn(fields, (value, field) => { + errors.push(new sequelizeErrors.ValidationErrorItem( + this.getUniqueConstraintErrorMessage(field), + 'unique violation', // sequelizeErrors.ValidationErrorItem.Origins.DB, + field, + value, + this.instance, + 'not_unique' + )); + }); + + if (this.model && this.model.uniqueKeys) { + _.forOwn(this.model.uniqueKeys, constraint => { + if (_.isEqual(constraint.fields, Object.keys(fields)) && !!constraint.msg) { + message = constraint.msg; + return false; + } + }); + } + + return new sequelizeErrors.UniqueConstraintError({ message, errors, parent: err, fields }); + } + + return new sequelizeErrors.UniqueConstraintError({ + message: errMessage, + parent: err + }); + + case '23P01': + match = errDetail.match(/Key \((.*?)\)=\((.*?)\)/); + + if (match) { + fields = _.zipObject(match[1].split(', '), match[2].split(', ')); + } + message = 'Exclusion constraint error'; + + return new sequelizeErrors.ExclusionConstraintError({ + message, + constraint: err.constraint, + fields, + table: err.table, + parent: err + }); + + case '42704': + if (err.sql && /(CONSTRAINT|INDEX)/gi.test(err.sql)) { + message = 'Unknown constraint error'; + index = errMessage.match(/(?:constraint|index) "(.+?)"/i); + index = index ? index[1] : undefined; + table = errMessage.match(/relation "(.+?)"/i); + table = table ? table[1] : undefined; + + throw new sequelizeErrors.UnknownConstraintError({ + message, + constraint: index, + fields, + table, + parent: err + }); + } + // falls through + default: + return new sequelizeErrors.DatabaseError(err); + } + } + + isForeignKeysQuery() { + return /SELECT conname as constraint_name, pg_catalog\.pg_get_constraintdef\(r\.oid, true\) as condef FROM pg_catalog\.pg_constraint r WHERE r\.conrelid = \(SELECT oid FROM pg_class WHERE relname = '.*' LIMIT 1\) AND r\.contype = 'f' ORDER BY 1;/.test(this.sql); + } + + getInsertIdField() { + return 'id'; + } +} + + +module.exports = Query; +module.exports.Query = Query; +module.exports.default = Query; diff --git a/node_modules/sequelize/lib/dialects/postgres/range.js b/node_modules/sequelize/lib/dialects/postgres/range.js new file mode 100644 index 00000000..dd078467 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/postgres/range.js @@ -0,0 +1,79 @@ +'use strict'; + +const _ = require('lodash'); + +function stringifyRangeBound(bound) { + if (bound === null) { + return '' ; + } + if (bound === Infinity || bound === -Infinity) { + return bound.toString().toLowerCase(); + } + return JSON.stringify(bound); +} + +function parseRangeBound(bound, parseType) { + if (!bound) { + return null; + } + if (bound === 'infinity') { + return Infinity; + } + if (bound === '-infinity') { + return -Infinity; + } + return parseType(bound); + +} + +function stringify(data) { + if (data === null) return null; + + if (!Array.isArray(data)) throw new Error('range must be an array'); + if (!data.length) return 'empty'; + if (data.length !== 2) throw new Error('range array length must be 0 (empty) or 2 (lower and upper bounds)'); + + if (Object.prototype.hasOwnProperty.call(data, 'inclusive')) { + if (data.inclusive === false) data.inclusive = [false, false]; + else if (!data.inclusive) data.inclusive = [true, false]; + else if (data.inclusive === true) data.inclusive = [true, true]; + } else { + data.inclusive = [true, false]; + } + + _.each(data, (value, index) => { + if (_.isObject(value)) { + if (Object.prototype.hasOwnProperty.call(value, 'inclusive')) data.inclusive[index] = !!value.inclusive; + if (Object.prototype.hasOwnProperty.call(value, 'value')) data[index] = value.value; + } + }); + + const lowerBound = stringifyRangeBound(data[0]); + const upperBound = stringifyRangeBound(data[1]); + + return `${(data.inclusive[0] ? '[' : '(') + lowerBound},${upperBound}${data.inclusive[1] ? ']' : ')'}`; +} +exports.stringify = stringify; + +function parse(value, parser) { + if (value === null) return null; + if (value === 'empty') { + return []; + } + + let result = value + .substring(1, value.length - 1) + .split(',', 2); + + if (result.length !== 2) return value; + + result = result.map((item, index) => { + return { + value: parseRangeBound(item, parser), + inclusive: index === 0 ? value[0] === '[' : value[value.length - 1] === ']' + }; + }); + + return result; +} +exports.parse = parse; diff --git a/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js b/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js new file mode 100644 index 00000000..5c7f1167 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js @@ -0,0 +1,92 @@ +'use strict'; + +const AbstractConnectionManager = require('../abstract/connection-manager'); +const Promise = require('../../promise'); +const { logger } = require('../../utils/logger'); +const debug = logger.debugContext('connection:sqlite'); +const dataTypes = require('../../data-types').sqlite; +const sequelizeErrors = require('../../errors'); +const parserStore = require('../parserStore')('sqlite'); + +class ConnectionManager extends AbstractConnectionManager { + constructor(dialect, sequelize) { + super(dialect, sequelize); + + // We attempt to parse file location from a connection uri + // but we shouldn't match sequelize default host. + if (this.sequelize.options.host === 'localhost') { + delete this.sequelize.options.host; + } + + this.connections = {}; + this.lib = this._loadDialectModule('sqlite3').verbose(); + this.refreshTypeParser(dataTypes); + } + + _onProcessExit() { + const promises = Object.getOwnPropertyNames(this.connections) + .map(connection => Promise.fromCallback(callback => this.connections[connection].close(callback))); + + return Promise + .all(promises) + .then(() => super._onProcessExit.call(this)); + } + + // Expose this as a method so that the parsing may be updated when the user has added additional, custom types + _refreshTypeParser(dataType) { + parserStore.refresh(dataType); + } + + _clearTypeParser() { + parserStore.clear(); + } + + getConnection(options) { + options = options || {}; + options.uuid = options.uuid || 'default'; + options.inMemory = (this.sequelize.options.storage || this.sequelize.options.host || ':memory:') === ':memory:' ? 1 : 0; + + const dialectOptions = this.sequelize.options.dialectOptions; + options.readWriteMode = dialectOptions && dialectOptions.mode; + + if (this.connections[options.inMemory || options.uuid]) { + return Promise.resolve(this.connections[options.inMemory || options.uuid]); + } + + return new Promise((resolve, reject) => { + this.connections[options.inMemory || options.uuid] = new this.lib.Database( + this.sequelize.options.storage || this.sequelize.options.host || ':memory:', + options.readWriteMode || this.lib.OPEN_READWRITE | this.lib.OPEN_CREATE, // default mode + err => { + if (err) return reject(new sequelizeErrors.ConnectionError(err)); + debug(`connection acquired ${options.uuid}`); + resolve(this.connections[options.inMemory || options.uuid]); + } + ); + }).tap(connection => { + if (this.sequelize.config.password) { + // Make it possible to define and use password for sqlite encryption plugin like sqlcipher + connection.run(`PRAGMA KEY=${this.sequelize.escape(this.sequelize.config.password)}`); + } + if (this.sequelize.options.foreignKeys !== false) { + // Make it possible to define and use foreign key constraints unless + // explicitly disallowed. It's still opt-in per relation + connection.run('PRAGMA FOREIGN_KEYS=ON'); + } + }); + } + + releaseConnection(connection, force) { + if (connection.filename === ':memory:' && force !== true) return; + + if (connection.uuid) { + connection.close(); + debug(`connection released ${connection.uuid}`); + delete this.connections[connection.uuid]; + } + } +} + +module.exports = ConnectionManager; +module.exports.ConnectionManager = ConnectionManager; +module.exports.default = ConnectionManager; diff --git a/node_modules/sequelize/lib/dialects/sqlite/data-types.js b/node_modules/sequelize/lib/dialects/sqlite/data-types.js new file mode 100644 index 00000000..765d5efa --- /dev/null +++ b/node_modules/sequelize/lib/dialects/sqlite/data-types.js @@ -0,0 +1,213 @@ +'use strict'; + +module.exports = BaseTypes => { + const warn = BaseTypes.ABSTRACT.warn.bind(undefined, 'https://www.sqlite.org/datatype3.html'); + + /** + * Removes unsupported SQLite options, i.e., UNSIGNED and ZEROFILL, for the integer data types. + * + * @param {Object} dataType The base integer data type. + * @private + */ + function removeUnsupportedIntegerOptions(dataType) { + if (dataType._zerofill || dataType._unsigned) { + warn(`SQLite does not support '${dataType.key}' with UNSIGNED or ZEROFILL. Plain '${dataType.key}' will be used instead.`); + dataType._unsigned = undefined; + dataType._zerofill = undefined; + } + } + + /** + * @see https://sqlite.org/datatype3.html + */ + + BaseTypes.DATE.types.sqlite = ['DATETIME']; + BaseTypes.STRING.types.sqlite = ['VARCHAR', 'VARCHAR BINARY']; + BaseTypes.CHAR.types.sqlite = ['CHAR', 'CHAR BINARY']; + BaseTypes.TEXT.types.sqlite = ['TEXT']; + BaseTypes.TINYINT.types.sqlite = ['TINYINT']; + BaseTypes.SMALLINT.types.sqlite = ['SMALLINT']; + BaseTypes.MEDIUMINT.types.sqlite = ['MEDIUMINT']; + BaseTypes.INTEGER.types.sqlite = ['INTEGER']; + BaseTypes.BIGINT.types.sqlite = ['BIGINT']; + BaseTypes.FLOAT.types.sqlite = ['FLOAT']; + BaseTypes.TIME.types.sqlite = ['TIME']; + BaseTypes.DATEONLY.types.sqlite = ['DATE']; + BaseTypes.BOOLEAN.types.sqlite = ['TINYINT']; + BaseTypes.BLOB.types.sqlite = ['TINYBLOB', 'BLOB', 'LONGBLOB']; + BaseTypes.DECIMAL.types.sqlite = ['DECIMAL']; + BaseTypes.UUID.types.sqlite = ['UUID']; + BaseTypes.ENUM.types.sqlite = false; + BaseTypes.REAL.types.sqlite = ['REAL']; + BaseTypes.DOUBLE.types.sqlite = ['DOUBLE PRECISION']; + BaseTypes.GEOMETRY.types.sqlite = false; + BaseTypes.JSON.types.sqlite = ['JSON', 'JSONB']; + + class JSONTYPE extends BaseTypes.JSON { + static parse(data) { + return JSON.parse(data); + } + } + + class DATE extends BaseTypes.DATE { + static parse(date, options) { + if (!date.includes('+')) { + // For backwards compat. Dates inserted by sequelize < 2.0dev12 will not have a timestamp set + return new Date(date + options.timezone); + } + return new Date(date); // We already have a timezone stored in the string + } + } + + class DATEONLY extends BaseTypes.DATEONLY { + static parse(date) { + return date; + } + } + + class STRING extends BaseTypes.STRING { + toSql() { + if (this._binary) { + return `VARCHAR BINARY(${this._length})`; + } + return super.toSql(this); + } + } + + class TEXT extends BaseTypes.TEXT { + toSql() { + if (this._length) { + warn('SQLite does not support TEXT with options. Plain `TEXT` will be used instead.'); + this._length = undefined; + } + return 'TEXT'; + } + } + + class CITEXT extends BaseTypes.CITEXT { + toSql() { + return 'TEXT COLLATE NOCASE'; + } + } + + class CHAR extends BaseTypes.CHAR { + toSql() { + if (this._binary) { + return `CHAR BINARY(${this._length})`; + } + return super.toSql(); + } + } + + class NUMBER extends BaseTypes.NUMBER { + toSql() { + let result = this.key; + if (this._unsigned) { + result += ' UNSIGNED'; + } + if (this._zerofill) { + result += ' ZEROFILL'; + } + if (this._length) { + result += `(${this._length}`; + if (typeof this._decimals === 'number') { + result += `,${this._decimals}`; + } + result += ')'; + } + return result; + } + } + + class TINYINT extends BaseTypes.TINYINT { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + + class SMALLINT extends BaseTypes.SMALLINT { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + + class MEDIUMINT extends BaseTypes.MEDIUMINT { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + + class INTEGER extends BaseTypes.INTEGER { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + + class BIGINT extends BaseTypes.BIGINT { + constructor(length) { + super(length); + removeUnsupportedIntegerOptions(this); + } + } + + class FLOAT extends BaseTypes.FLOAT { + } + + class DOUBLE extends BaseTypes.DOUBLE { + } + + class REAL extends BaseTypes.REAL { } + + function parseFloating(value) { + if (typeof value !== 'string') { + return value; + } + if (value === 'NaN') { + return NaN; + } + if (value === 'Infinity') { + return Infinity; + } + if (value === '-Infinity') { + return -Infinity; + } + } + for (const floating of [FLOAT, DOUBLE, REAL]) { + floating.parse = parseFloating; + } + + + for (const num of [FLOAT, DOUBLE, REAL, TINYINT, SMALLINT, MEDIUMINT, INTEGER, BIGINT]) { + num.prototype.toSql = NUMBER.prototype.toSql; + } + + class ENUM extends BaseTypes.ENUM { + toSql() { + return 'TEXT'; + } + } + + return { + DATE, + DATEONLY, + STRING, + CHAR, + NUMBER, + FLOAT, + REAL, + 'DOUBLE PRECISION': DOUBLE, + TINYINT, + SMALLINT, + MEDIUMINT, + INTEGER, + BIGINT, + TEXT, + ENUM, + JSON: JSONTYPE, + CITEXT + }; +}; diff --git a/node_modules/sequelize/lib/dialects/sqlite/index.js b/node_modules/sequelize/lib/dialects/sqlite/index.js new file mode 100644 index 00000000..328a01f6 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/sqlite/index.js @@ -0,0 +1,56 @@ +'use strict'; + +const _ = require('lodash'); +const AbstractDialect = require('../abstract'); +const ConnectionManager = require('./connection-manager'); +const Query = require('./query'); +const QueryGenerator = require('./query-generator'); +const DataTypes = require('../../data-types').sqlite; + +class SqliteDialect extends AbstractDialect { + constructor(sequelize) { + super(); + this.sequelize = sequelize; + this.connectionManager = new ConnectionManager(this, sequelize); + this.QueryGenerator = new QueryGenerator({ + _dialect: this, + sequelize + }); + } +} + +SqliteDialect.prototype.supports = _.merge(_.cloneDeep(AbstractDialect.prototype.supports), { + 'DEFAULT': false, + 'DEFAULT VALUES': true, + 'UNION ALL': false, + inserts: { + ignoreDuplicates: ' OR IGNORE' + }, + index: { + using: false, + where: true, + functionBased: true + }, + transactionOptions: { + type: true + }, + constraints: { + addConstraint: false, + dropConstraint: false + }, + joinTableDependent: false, + groupedLimit: false, + JSON: true +}); + +ConnectionManager.prototype.defaultVersion = '3.8.0'; +SqliteDialect.prototype.Query = Query; +SqliteDialect.prototype.DataTypes = DataTypes; +SqliteDialect.prototype.name = 'sqlite'; +SqliteDialect.prototype.TICK_CHAR = '`'; +SqliteDialect.prototype.TICK_CHAR_LEFT = SqliteDialect.prototype.TICK_CHAR; +SqliteDialect.prototype.TICK_CHAR_RIGHT = SqliteDialect.prototype.TICK_CHAR; + +module.exports = SqliteDialect; +module.exports.SqliteDialect = SqliteDialect; +module.exports.default = SqliteDialect; diff --git a/node_modules/sequelize/lib/dialects/sqlite/query-generator.js b/node_modules/sequelize/lib/dialects/sqlite/query-generator.js new file mode 100644 index 00000000..4d43ab4f --- /dev/null +++ b/node_modules/sequelize/lib/dialects/sqlite/query-generator.js @@ -0,0 +1,503 @@ +'use strict'; + +const Utils = require('../../utils'); +const util = require('util'); +const Transaction = require('../../transaction'); +const _ = require('lodash'); +const MySqlQueryGenerator = require('../mysql/query-generator'); +const AbstractQueryGenerator = require('../abstract/query-generator'); + +class SQLiteQueryGenerator extends MySqlQueryGenerator { + createSchema() { + return "SELECT name FROM `sqlite_master` WHERE type='table' and name!='sqlite_sequence';"; + } + + showSchemasQuery() { + return "SELECT name FROM `sqlite_master` WHERE type='table' and name!='sqlite_sequence';"; + } + + versionQuery() { + return 'SELECT sqlite_version() as `version`'; + } + + createTableQuery(tableName, attributes, options) { + options = options || {}; + + const primaryKeys = []; + const needsMultiplePrimaryKeys = _.values(attributes).filter(definition => definition.includes('PRIMARY KEY')).length > 1; + const attrArray = []; + + for (const attr in attributes) { + if (Object.prototype.hasOwnProperty.call(attributes, attr)) { + const dataType = attributes[attr]; + const containsAutoIncrement = dataType.includes('AUTOINCREMENT'); + + let dataTypeString = dataType; + if (dataType.includes('PRIMARY KEY')) { + if (dataType.includes('INT')) { + // Only INTEGER is allowed for primary key, see https://github.com/sequelize/sequelize/issues/969 (no lenght, unsigned etc) + dataTypeString = containsAutoIncrement ? 'INTEGER PRIMARY KEY AUTOINCREMENT' : 'INTEGER PRIMARY KEY'; + + if (dataType.includes(' REFERENCES')) { + dataTypeString += dataType.substr(dataType.indexOf(' REFERENCES')); + } + } + + if (needsMultiplePrimaryKeys) { + primaryKeys.push(attr); + dataTypeString = dataType.replace('PRIMARY KEY', 'NOT NULL'); + } + } + attrArray.push(`${this.quoteIdentifier(attr)} ${dataTypeString}`); + } + } + + const table = this.quoteTable(tableName); + let attrStr = attrArray.join(', '); + const pkString = primaryKeys.map(pk => this.quoteIdentifier(pk)).join(', '); + + if (options.uniqueKeys) { + _.each(options.uniqueKeys, columns => { + if (columns.customIndex) { + attrStr += `, UNIQUE (${columns.fields.map(field => this.quoteIdentifier(field)).join(', ')})`; + } + }); + } + + if (pkString.length > 0) { + attrStr += `, PRIMARY KEY (${pkString})`; + } + + const sql = `CREATE TABLE IF NOT EXISTS ${table} (${attrStr});`; + return this.replaceBooleanDefaults(sql); + } + + booleanValue(value) { + return value ? 1 : 0; + } + + /** + * Check whether the statmement is json function or simple path + * + * @param {string} stmt The statement to validate + * @returns {boolean} true if the given statement is json function + * @throws {Error} throw if the statement looks like json function but has invalid token + */ + _checkValidJsonStatement(stmt) { + if (typeof stmt !== 'string') { + return false; + } + + // https://sqlite.org/json1.html + const jsonFunctionRegex = /^\s*(json(?:_[a-z]+){0,2})\([^)]*\)/i; + const tokenCaptureRegex = /^\s*((?:([`"'])(?:(?!\2).|\2{2})*\2)|[\w\d\s]+|[().,;+-])/i; + + let currentIndex = 0; + let openingBrackets = 0; + let closingBrackets = 0; + let hasJsonFunction = false; + let hasInvalidToken = false; + + while (currentIndex < stmt.length) { + const string = stmt.substr(currentIndex); + const functionMatches = jsonFunctionRegex.exec(string); + if (functionMatches) { + currentIndex += functionMatches[0].indexOf('('); + hasJsonFunction = true; + continue; + } + + const tokenMatches = tokenCaptureRegex.exec(string); + if (tokenMatches) { + const capturedToken = tokenMatches[1]; + if (capturedToken === '(') { + openingBrackets++; + } else if (capturedToken === ')') { + closingBrackets++; + } else if (capturedToken === ';') { + hasInvalidToken = true; + break; + } + currentIndex += tokenMatches[0].length; + continue; + } + + break; + } + + // Check invalid json statement + hasInvalidToken |= openingBrackets !== closingBrackets; + if (hasJsonFunction && hasInvalidToken) { + throw new Error(`Invalid json statement: ${stmt}`); + } + + // return true if the statement has valid json function + return hasJsonFunction; + } + + //sqlite can't cast to datetime so we need to convert date values to their ISO strings + _toJSONValue(value) { + if (value instanceof Date) { + return value.toISOString(); + } + if (Array.isArray(value) && value[0] instanceof Date) { + return value.map(val => val.toISOString()); + } + return value; + } + + + handleSequelizeMethod(smth, tableName, factory, options, prepend) { + if (smth instanceof Utils.Json) { + // Parse nested object + if (smth.conditions) { + const conditions = this.parseConditionObject(smth.conditions).map(condition => + `${this.jsonPathExtractionQuery(condition.path[0], _.tail(condition.path))} = '${condition.value}'` + ); + + return conditions.join(' AND '); + } + if (smth.path) { + let str; + + // Allow specifying conditions using the sqlite json functions + if (this._checkValidJsonStatement(smth.path)) { + str = smth.path; + } else { + // Also support json property accessors + const paths = _.toPath(smth.path); + const column = paths.shift(); + str = this.jsonPathExtractionQuery(column, paths); + } + + if (smth.value) { + str += util.format(' = %s', this.escape(smth.value)); + } + + return str; + } + } else if (smth instanceof Utils.Cast) { + if (/timestamp/i.test(smth.type)) { + smth.type = 'datetime'; + } + } + + return AbstractQueryGenerator.prototype.handleSequelizeMethod.call(this, smth, tableName, factory, options, prepend); + } + + addColumnQuery(table, key, dataType) { + const attributes = {}; + attributes[key] = dataType; + const fields = this.attributesToSQL(attributes, { context: 'addColumn' }); + const attribute = `${this.quoteIdentifier(key)} ${fields[key]}`; + + const sql = `ALTER TABLE ${this.quoteTable(table)} ADD ${attribute};`; + + return this.replaceBooleanDefaults(sql); + } + + showTablesQuery() { + return 'SELECT name FROM `sqlite_master` WHERE type=\'table\' and name!=\'sqlite_sequence\';'; + } + + upsertQuery(tableName, insertValues, updateValues, where, model, options) { + options.ignoreDuplicates = true; + + const bind = []; + const bindParam = this.bindParam(bind); + + const upsertOptions = _.defaults({ bindParam }, options); + const insert = this.insertQuery(tableName, insertValues, model.rawAttributes, upsertOptions); + const update = this.updateQuery(tableName, updateValues, where, upsertOptions, model.rawAttributes); + + const query = `${insert.query} ${update.query}`; + + return { query, bind }; + } + + updateQuery(tableName, attrValueHash, where, options, attributes) { + options = options || {}; + _.defaults(options, this.options); + + attrValueHash = Utils.removeNullValuesFromHash(attrValueHash, options.omitNull, options); + + const modelAttributeMap = {}; + const values = []; + const bind = []; + const bindParam = options.bindParam || this.bindParam(bind); + + if (attributes) { + _.each(attributes, (attribute, key) => { + modelAttributeMap[key] = attribute; + if (attribute.field) { + modelAttributeMap[attribute.field] = attribute; + } + }); + } + + for (const key in attrValueHash) { + const value = attrValueHash[key]; + + if (value instanceof Utils.SequelizeMethod || options.bindParam === false) { + values.push(`${this.quoteIdentifier(key)}=${this.escape(value, modelAttributeMap && modelAttributeMap[key] || undefined, { context: 'UPDATE' })}`); + } else { + values.push(`${this.quoteIdentifier(key)}=${this.format(value, modelAttributeMap && modelAttributeMap[key] || undefined, { context: 'UPDATE' }, bindParam)}`); + } + } + + let query; + const whereOptions = _.defaults({ bindParam }, options); + + if (options.limit) { + query = `UPDATE ${this.quoteTable(tableName)} SET ${values.join(',')} WHERE rowid IN (SELECT rowid FROM ${this.quoteTable(tableName)} ${this.whereQuery(where, whereOptions)} LIMIT ${this.escape(options.limit)})`; + } else { + query = `UPDATE ${this.quoteTable(tableName)} SET ${values.join(',')} ${this.whereQuery(where, whereOptions)}`; + } + + return { query, bind }; + } + + truncateTableQuery(tableName, options = {}) { + return [ + `DELETE FROM ${this.quoteTable(tableName)}`, + options.restartIdentity ? `; DELETE FROM ${this.quoteTable('sqlite_sequence')} WHERE ${this.quoteIdentifier('name')} = ${Utils.addTicks(Utils.removeTicks(this.quoteTable(tableName), '`'), "'")};` : '' + ].join(''); + } + + deleteQuery(tableName, where, options = {}, model) { + _.defaults(options, this.options); + + let whereClause = this.getWhereConditions(where, null, model, options); + + if (whereClause) { + whereClause = `WHERE ${whereClause}`; + } + + if (options.limit) { + whereClause = `WHERE rowid IN (SELECT rowid FROM ${this.quoteTable(tableName)} ${whereClause} LIMIT ${this.escape(options.limit)})`; + } + + return `DELETE FROM ${this.quoteTable(tableName)} ${whereClause}`; + } + + attributesToSQL(attributes) { + const result = {}; + + for (const name in attributes) { + const dataType = attributes[name]; + const fieldName = dataType.field || name; + + if (_.isObject(dataType)) { + let sql = dataType.type.toString(); + + if (Object.prototype.hasOwnProperty.call(dataType, 'allowNull') && !dataType.allowNull) { + sql += ' NOT NULL'; + } + + if (Utils.defaultValueSchemable(dataType.defaultValue)) { + // TODO thoroughly check that DataTypes.NOW will properly + // get populated on all databases as DEFAULT value + // i.e. mysql requires: DEFAULT CURRENT_TIMESTAMP + sql += ` DEFAULT ${this.escape(dataType.defaultValue, dataType)}`; + } + + if (dataType.unique === true) { + sql += ' UNIQUE'; + } + + if (dataType.primaryKey) { + sql += ' PRIMARY KEY'; + + if (dataType.autoIncrement) { + sql += ' AUTOINCREMENT'; + } + } + + if (dataType.references) { + const referencesTable = this.quoteTable(dataType.references.model); + + let referencesKey; + if (dataType.references.key) { + referencesKey = this.quoteIdentifier(dataType.references.key); + } else { + referencesKey = this.quoteIdentifier('id'); + } + + sql += ` REFERENCES ${referencesTable} (${referencesKey})`; + + if (dataType.onDelete) { + sql += ` ON DELETE ${dataType.onDelete.toUpperCase()}`; + } + + if (dataType.onUpdate) { + sql += ` ON UPDATE ${dataType.onUpdate.toUpperCase()}`; + } + + } + + result[fieldName] = sql; + } else { + result[fieldName] = dataType; + } + } + + return result; + } + + showIndexesQuery(tableName) { + return `PRAGMA INDEX_LIST(${this.quoteTable(tableName)})`; + } + + showConstraintsQuery(tableName, constraintName) { + let sql = `SELECT sql FROM sqlite_master WHERE tbl_name='${tableName}'`; + + if (constraintName) { + sql += ` AND sql LIKE '%${constraintName}%'`; + } + + return `${sql};`; + } + + removeIndexQuery(tableName, indexNameOrAttributes) { + let indexName = indexNameOrAttributes; + + if (typeof indexName !== 'string') { + indexName = Utils.underscore(`${tableName}_${indexNameOrAttributes.join('_')}`); + } + + return `DROP INDEX IF EXISTS ${this.quoteIdentifier(indexName)}`; + } + + describeTableQuery(tableName, schema, schemaDelimiter) { + const table = { + _schema: schema, + _schemaDelimiter: schemaDelimiter, + tableName + }; + return `PRAGMA TABLE_INFO(${this.quoteTable(this.addSchema(table))});`; + } + + describeCreateTableQuery(tableName) { + return `SELECT sql FROM sqlite_master WHERE tbl_name='${tableName}';`; + } + + removeColumnQuery(tableName, attributes) { + + attributes = this.attributesToSQL(attributes); + + let backupTableName; + if (typeof tableName === 'object') { + backupTableName = { + tableName: `${tableName.tableName}_backup`, + schema: tableName.schema + }; + } else { + backupTableName = `${tableName}_backup`; + } + + const quotedTableName = this.quoteTable(tableName); + const quotedBackupTableName = this.quoteTable(backupTableName); + const attributeNames = Object.keys(attributes).map(attr => this.quoteIdentifier(attr)).join(', '); + + // Temporary table cannot work for foreign keys. + return `${this.createTableQuery(backupTableName, attributes) + }INSERT INTO ${quotedBackupTableName} SELECT ${attributeNames} FROM ${quotedTableName};` + + `DROP TABLE ${quotedTableName};${ + this.createTableQuery(tableName, attributes) + }INSERT INTO ${quotedTableName} SELECT ${attributeNames} FROM ${quotedBackupTableName};` + + `DROP TABLE ${quotedBackupTableName};`; + } + + _alterConstraintQuery(tableName, attributes, createTableSql) { + let backupTableName; + + attributes = this.attributesToSQL(attributes); + + if (typeof tableName === 'object') { + backupTableName = { + tableName: `${tableName.tableName}_backup`, + schema: tableName.schema + }; + } else { + backupTableName = `${tableName}_backup`; + } + const quotedTableName = this.quoteTable(tableName); + const quotedBackupTableName = this.quoteTable(backupTableName); + const attributeNames = Object.keys(attributes).map(attr => this.quoteIdentifier(attr)).join(', '); + + return `${createTableSql.replace(`CREATE TABLE ${quotedTableName}`, `CREATE TABLE ${quotedBackupTableName}`) + }INSERT INTO ${quotedBackupTableName} SELECT ${attributeNames} FROM ${quotedTableName};` + + `DROP TABLE ${quotedTableName};` + + `ALTER TABLE ${quotedBackupTableName} RENAME TO ${quotedTableName};`; + } + + renameColumnQuery(tableName, attrNameBefore, attrNameAfter, attributes) { + + let backupTableName; + + attributes = this.attributesToSQL(attributes); + + if (typeof tableName === 'object') { + backupTableName = { + tableName: `${tableName.tableName}_backup`, + schema: tableName.schema + }; + } else { + backupTableName = `${tableName}_backup`; + } + + const quotedTableName = this.quoteTable(tableName); + const quotedBackupTableName = this.quoteTable(backupTableName); + const attributeNamesImport = Object.keys(attributes).map(attr => + attrNameAfter === attr ? `${this.quoteIdentifier(attrNameBefore)} AS ${this.quoteIdentifier(attr)}` : this.quoteIdentifier(attr) + ).join(', '); + const attributeNamesExport = Object.keys(attributes).map(attr => this.quoteIdentifier(attr)).join(', '); + + return `${this.createTableQuery(backupTableName, attributes).replace('CREATE TABLE', 'CREATE TEMPORARY TABLE') + }INSERT INTO ${quotedBackupTableName} SELECT ${attributeNamesImport} FROM ${quotedTableName};` + + `DROP TABLE ${quotedTableName};${ + this.createTableQuery(tableName, attributes) + }INSERT INTO ${quotedTableName} SELECT ${attributeNamesExport} FROM ${quotedBackupTableName};` + + `DROP TABLE ${quotedBackupTableName};`; + } + + startTransactionQuery(transaction) { + if (transaction.parent) { + return `SAVEPOINT ${this.quoteIdentifier(transaction.name)};`; + } + + return `BEGIN ${transaction.options.type} TRANSACTION;`; + } + + setIsolationLevelQuery(value) { + switch (value) { + case Transaction.ISOLATION_LEVELS.REPEATABLE_READ: + return '-- SQLite is not able to choose the isolation level REPEATABLE READ.'; + case Transaction.ISOLATION_LEVELS.READ_UNCOMMITTED: + return 'PRAGMA read_uncommitted = ON;'; + case Transaction.ISOLATION_LEVELS.READ_COMMITTED: + return 'PRAGMA read_uncommitted = OFF;'; + case Transaction.ISOLATION_LEVELS.SERIALIZABLE: + return '-- SQLite\'s default isolation level is SERIALIZABLE. Nothing to do.'; + default: + throw new Error(`Unknown isolation level: ${value}`); + } + } + + replaceBooleanDefaults(sql) { + return sql.replace(/DEFAULT '?false'?/g, 'DEFAULT 0').replace(/DEFAULT '?true'?/g, 'DEFAULT 1'); + } + + /** + * Generates an SQL query that returns all foreign keys of a table. + * + * @param {string} tableName The name of the table. + * @returns {string} The generated sql query. + * @private + */ + getForeignKeysQuery(tableName) { + return `PRAGMA foreign_key_list(${tableName})`; + } +} + +module.exports = SQLiteQueryGenerator; diff --git a/node_modules/sequelize/lib/dialects/sqlite/query-interface.js b/node_modules/sequelize/lib/dialects/sqlite/query-interface.js new file mode 100644 index 00000000..7a9ae764 --- /dev/null +++ b/node_modules/sequelize/lib/dialects/sqlite/query-interface.js @@ -0,0 +1,207 @@ +'use strict'; + +const _ = require('lodash'); +const Promise = require('../../promise'); +const sequelizeErrors = require('../../errors'); +const QueryTypes = require('../../query-types'); + +/** + Returns an object that treats SQLite's inabilities to do certain queries. + + @class QueryInterface + @static + @private + */ + +/** + A wrapper that fixes SQLite's inability to remove columns from existing tables. + It will create a backup of the table, drop the table afterwards and create a + new table with the same name but without the obsolete column. + + @param {QueryInterface} qi + @param {string} tableName The name of the table. + @param {string} attributeName The name of the attribute that we want to remove. + @param {Object} options + @param {boolean|Function} [options.logging] A function that logs the sql queries, or false for explicitly not logging these queries + + @since 1.6.0 + @private + */ +function removeColumn(qi, tableName, attributeName, options) { + options = options || {}; + + return qi.describeTable(tableName, options).then(fields => { + delete fields[attributeName]; + + const sql = qi.QueryGenerator.removeColumnQuery(tableName, fields); + const subQueries = sql.split(';').filter(q => q !== ''); + + return Promise.each(subQueries, subQuery => qi.sequelize.query(`${subQuery};`, Object.assign({ raw: true }, options))); + }); +} +exports.removeColumn = removeColumn; + +/** + A wrapper that fixes SQLite's inability to change columns from existing tables. + It will create a backup of the table, drop the table afterwards and create a + new table with the same name but with a modified version of the respective column. + + @param {QueryInterface} qi + @param {string} tableName The name of the table. + @param {Object} attributes An object with the attribute's name as key and its options as value object. + @param {Object} options + @param {boolean|Function} [options.logging] A function that logs the sql queries, or false for explicitly not logging these queries + + @since 1.6.0 + @private + */ +function changeColumn(qi, tableName, attributes, options) { + const attributeName = Object.keys(attributes)[0]; + options = options || {}; + + return qi.describeTable(tableName, options).then(fields => { + fields[attributeName] = attributes[attributeName]; + + const sql = qi.QueryGenerator.removeColumnQuery(tableName, fields); + const subQueries = sql.split(';').filter(q => q !== ''); + + return Promise.each(subQueries, subQuery => qi.sequelize.query(`${subQuery};`, Object.assign({ raw: true }, options))); + }); +} +exports.changeColumn = changeColumn; + +/** + A wrapper that fixes SQLite's inability to rename columns from existing tables. + It will create a backup of the table, drop the table afterwards and create a + new table with the same name but with a renamed version of the respective column. + + @param {QueryInterface} qi + @param {string} tableName The name of the table. + @param {string} attrNameBefore The name of the attribute before it was renamed. + @param {string} attrNameAfter The name of the attribute after it was renamed. + @param {Object} options + @param {boolean|Function} [options.logging] A function that logs the sql queries, or false for explicitly not logging these queries + + @since 1.6.0 + @private + */ +function renameColumn(qi, tableName, attrNameBefore, attrNameAfter, options) { + options = options || {}; + + return qi.describeTable(tableName, options).then(fields => { + fields[attrNameAfter] = _.clone(fields[attrNameBefore]); + delete fields[attrNameBefore]; + + const sql = qi.QueryGenerator.renameColumnQuery(tableName, attrNameBefore, attrNameAfter, fields); + const subQueries = sql.split(';').filter(q => q !== ''); + + return Promise.each(subQueries, subQuery => qi.sequelize.query(`${subQuery};`, Object.assign({ raw: true }, options))); + }); +} +exports.renameColumn = renameColumn; + +/** + * @param {QueryInterface} qi + * @param {string} tableName + * @param {string} constraintName + * @param {Object} options + * + * @private + */ +function removeConstraint(qi, tableName, constraintName, options) { + let createTableSql; + + return qi.showConstraint(tableName, constraintName) + .then(constraints => { + const constraint = constraints[0]; + + if (constraint) { + createTableSql = constraint.sql; + constraint.constraintName = qi.QueryGenerator.quoteIdentifier(constraint.constraintName); + let constraintSnippet = `, CONSTRAINT ${constraint.constraintName} ${constraint.constraintType} ${constraint.constraintCondition}`; + + if (constraint.constraintType === 'FOREIGN KEY') { + const referenceTableName = qi.QueryGenerator.quoteTable(constraint.referenceTableName); + constraint.referenceTableKeys = constraint.referenceTableKeys.map(columnName => qi.QueryGenerator.quoteIdentifier(columnName)); + const referenceTableKeys = constraint.referenceTableKeys.join(', '); + constraintSnippet += ` REFERENCES ${referenceTableName} (${referenceTableKeys})`; + constraintSnippet += ` ON UPDATE ${constraint.updateAction}`; + constraintSnippet += ` ON DELETE ${constraint.deleteAction}`; + } + + createTableSql = createTableSql.replace(constraintSnippet, ''); + createTableSql += ';'; + + return qi.describeTable(tableName, options); + } + throw new sequelizeErrors.UnknownConstraintError({ + message: `Constraint ${constraintName} on table ${tableName} does not exist`, + constraint: constraintName, + table: tableName + }); + }) + .then(fields => { + const sql = qi.QueryGenerator._alterConstraintQuery(tableName, fields, createTableSql); + const subQueries = sql.split(';').filter(q => q !== ''); + + return Promise.each(subQueries, subQuery => qi.sequelize.query(`${subQuery};`, Object.assign({ raw: true }, options))); + }); +} +exports.removeConstraint = removeConstraint; + +/** + * @param {QueryInterface} qi + * @param {string} tableName + * @param {Object} options + * + * @private + */ +function addConstraint(qi, tableName, options) { + const constraintSnippet = qi.QueryGenerator.getConstraintSnippet(tableName, options); + const describeCreateTableSql = qi.QueryGenerator.describeCreateTableQuery(tableName); + let createTableSql; + + return qi.sequelize.query(describeCreateTableSql, Object.assign({}, options, { type: QueryTypes.SELECT, raw: true })) + .then(constraints => { + const sql = constraints[0].sql; + const index = sql.length - 1; + //Replace ending ')' with constraint snippet - Simulates String.replaceAt + //http://stackoverflow.com/questions/1431094 + createTableSql = `${sql.substr(0, index)}, ${constraintSnippet})${sql.substr(index + 1)};`; + + return qi.describeTable(tableName, options); + }) + .then(fields => { + const sql = qi.QueryGenerator._alterConstraintQuery(tableName, fields, createTableSql); + const subQueries = sql.split(';').filter(q => q !== ''); + + return Promise.each(subQueries, subQuery => qi.sequelize.query(`${subQuery};`, Object.assign({ raw: true }, options))); + }); +} +exports.addConstraint = addConstraint; + +/** + * @param {QueryInterface} qi + * @param {string} tableName + * @param {Object} options Query Options + * + * @private + * @returns {Promise} + */ +function getForeignKeyReferencesForTable(qi, tableName, options) { + const database = qi.sequelize.config.database; + const query = qi.QueryGenerator.getForeignKeysQuery(tableName, database); + return qi.sequelize.query(query, options) + .then(result => { + return result.map(row => ({ + tableName, + columnName: row.from, + referencedTableName: row.table, + referencedColumnName: row.to, + tableCatalog: database, + referencedTableCatalog: database + })); + }); +} + +exports.getForeignKeyReferencesForTable = getForeignKeyReferencesForTable; diff --git a/node_modules/sequelize/lib/dialects/sqlite/query.js b/node_modules/sequelize/lib/dialects/sqlite/query.js new file mode 100644 index 00000000..324a519e --- /dev/null +++ b/node_modules/sequelize/lib/dialects/sqlite/query.js @@ -0,0 +1,457 @@ +'use strict'; + +const _ = require('lodash'); +const Utils = require('../../utils'); +const Promise = require('../../promise'); +const AbstractQuery = require('../abstract/query'); +const QueryTypes = require('../../query-types'); +const sequelizeErrors = require('../../errors'); +const parserStore = require('../parserStore')('sqlite'); +const { logger } = require('../../utils/logger'); + +const debug = logger.debugContext('sql:sqlite'); + + +class Query extends AbstractQuery { + getInsertIdField() { + return 'lastID'; + } + + /** + * rewrite query with parameters. + * + * @param {string} sql + * @param {Array|Object} values + * @param {string} dialect + * @private + */ + static formatBindParameters(sql, values, dialect) { + let bindParam; + if (Array.isArray(values)) { + bindParam = {}; + values.forEach((v, i) => { + bindParam[`$${i+1}`] = v; + }); + sql = AbstractQuery.formatBindParameters(sql, values, dialect, { skipValueReplace: true })[0]; + } else { + bindParam = {}; + if (typeof values === 'object') { + for (const k of Object.keys(values)) { + bindParam[`$${k}`] = values[k]; + } + } + sql = AbstractQuery.formatBindParameters(sql, values, dialect, { skipValueReplace: true })[0]; + } + return [sql, bindParam]; + } + + _collectModels(include, prefix) { + const ret = {}; + + if (include) { + for (const _include of include) { + let key; + if (!prefix) { + key = _include.as; + } else { + key = `${prefix}.${_include.as}`; + } + ret[key] = _include.model; + + if (_include.include) { + _.merge(ret, this._collectModels(_include.include, key)); + } + } + } + + return ret; + } + + _handleQueryResponse(metaData, columnTypes, err, results) { + if (err) { + err.sql = this.sql; + throw this.formatError(err); + } + let result = this.instance; + + // add the inserted row id to the instance + if (this.isInsertQuery(results, metaData)) { + this.handleInsertQuery(results, metaData); + if (!this.instance) { + // handle bulkCreate AI primary key + if ( + metaData.constructor.name === 'Statement' + && this.model + && this.model.autoIncrementAttribute + && this.model.autoIncrementAttribute === this.model.primaryKeyAttribute + && this.model.rawAttributes[this.model.primaryKeyAttribute] + ) { + const startId = metaData[this.getInsertIdField()] - metaData.changes + 1; + result = []; + for (let i = startId; i < startId + metaData.changes; i++) { + result.push({ [this.model.rawAttributes[this.model.primaryKeyAttribute].field]: i }); + } + } else { + result = metaData[this.getInsertIdField()]; + } + } + } + + if (this.isShowTablesQuery()) { + return results.map(row => row.name); + } + if (this.isShowConstraintsQuery()) { + result = results; + if (results && results[0] && results[0].sql) { + result = this.parseConstraintsFromSql(results[0].sql); + } + return result; + } + if (this.isSelectQuery()) { + if (this.options.raw) { + return this.handleSelectQuery(results); + } + // This is a map of prefix strings to models, e.g. user.projects -> Project model + const prefixes = this._collectModels(this.options.include); + + results = results.map(result => { + return _.mapValues(result, (value, name) => { + let model; + if (name.includes('.')) { + const lastind = name.lastIndexOf('.'); + + model = prefixes[name.substr(0, lastind)]; + + name = name.substr(lastind + 1); + } else { + model = this.options.model; + } + + const tableName = model.getTableName().toString().replace(/`/g, ''); + const tableTypes = columnTypes[tableName] || {}; + + if (tableTypes && !(name in tableTypes)) { + // The column is aliased + _.forOwn(model.rawAttributes, (attribute, key) => { + if (name === key && attribute.field) { + name = attribute.field; + return false; + } + }); + } + + return Object.prototype.hasOwnProperty.call(tableTypes, name) + ? this.applyParsers(tableTypes[name], value) + : value; + }); + }); + + return this.handleSelectQuery(results); + } + if (this.isShowOrDescribeQuery()) { + return results; + } + if (this.sql.includes('PRAGMA INDEX_LIST')) { + return this.handleShowIndexesQuery(results); + } + if (this.sql.includes('PRAGMA INDEX_INFO')) { + return results; + } + if (this.sql.includes('PRAGMA TABLE_INFO')) { + // this is the sqlite way of getting the metadata of a table + result = {}; + + let defaultValue; + for (const _result of results) { + if (_result.dflt_value === null) { + // Column schema omits any "DEFAULT ..." + defaultValue = undefined; + } else if (_result.dflt_value === 'NULL') { + // Column schema is a "DEFAULT NULL" + defaultValue = null; + } else { + defaultValue = _result.dflt_value; + } + + result[_result.name] = { + type: _result.type, + allowNull: _result.notnull === 0, + defaultValue, + primaryKey: _result.pk !== 0 + }; + + if (result[_result.name].type === 'TINYINT(1)') { + result[_result.name].defaultValue = { '0': false, '1': true }[result[_result.name].defaultValue]; + } + + if (typeof result[_result.name].defaultValue === 'string') { + result[_result.name].defaultValue = result[_result.name].defaultValue.replace(/'/g, ''); + } + } + return result; + } + if (this.sql.includes('PRAGMA foreign_keys;')) { + return results[0]; + } + if (this.sql.includes('PRAGMA foreign_keys')) { + return results; + } + if (this.sql.includes('PRAGMA foreign_key_list')) { + return results; + } + if ([QueryTypes.BULKUPDATE, QueryTypes.BULKDELETE].includes(this.options.type)) { + return metaData.changes; + } + if (this.options.type === QueryTypes.UPSERT) { + return undefined; + } + if (this.options.type === QueryTypes.VERSION) { + return results[0].version; + } + if (this.options.type === QueryTypes.RAW) { + return [results, metaData]; + } + if (this.isUpdateQuery() || this.isInsertQuery()) { + return [result, metaData.changes]; + } + return result; + } + + run(sql, parameters) { + const conn = this.connection; + this.sql = sql; + const method = this.getDatabaseMethod(); + if (method === 'exec') { + // exec does not support bind parameter + sql = AbstractQuery.formatBindParameters(sql, this.options.bind, this.options.dialect || 'sqlite', { skipUnescape: true })[0]; + this.sql = sql; + } + + const complete = this._logQuery(sql, debug); + + return new Promise(resolve => { + const columnTypes = {}; + conn.serialize(() => { + const executeSql = () => { + if (sql.startsWith('-- ')) { + return resolve(); + } + resolve(new Promise((resolve, reject) => { + const query = this; + // cannot use arrow function here because the function is bound to the statement + function afterExecute(executionError, results) { + try { + complete(); + // `this` is passed from sqlite, we have no control over this. + // eslint-disable-next-line no-invalid-this + resolve(query._handleQueryResponse(this, columnTypes, executionError, results)); + return; + } catch (error) { + reject(error); + } + } + + if (method === 'exec') { + // exec does not support bind parameter + conn[method](sql, afterExecute); + } else { + if (!parameters) parameters = []; + conn[method](sql, parameters, afterExecute); + } + })); + return null; + }; + + if (this.getDatabaseMethod() === 'all') { + let tableNames = []; + if (this.options && this.options.tableNames) { + tableNames = this.options.tableNames; + } else if (/FROM `(.*?)`/i.exec(this.sql)) { + tableNames.push(/FROM `(.*?)`/i.exec(this.sql)[1]); + } + + // If we already have the metadata for the table, there's no need to ask for it again + tableNames = tableNames.filter(tableName => !(tableName in columnTypes) && tableName !== 'sqlite_master'); + + if (!tableNames.length) { + return executeSql(); + } + return Promise.map(tableNames, tableName => + new Promise(resolve => { + tableName = tableName.replace(/`/g, ''); + columnTypes[tableName] = {}; + + conn.all(`PRAGMA table_info(\`${tableName}\`)`, (err, results) => { + if (!err) { + for (const result of results) { + columnTypes[tableName][result.name] = result.type; + } + } + resolve(); + }); + }) + ).then(executeSql); + } + return executeSql(); + }); + }); + } + + parseConstraintsFromSql(sql) { + let constraints = sql.split('CONSTRAINT '); + let referenceTableName, referenceTableKeys, updateAction, deleteAction; + constraints.splice(0, 1); + constraints = constraints.map(constraintSql => { + //Parse foreign key snippets + if (constraintSql.includes('REFERENCES')) { + //Parse out the constraint condition form sql string + updateAction = constraintSql.match(/ON UPDATE (CASCADE|SET NULL|RESTRICT|NO ACTION|SET DEFAULT){1}/); + deleteAction = constraintSql.match(/ON DELETE (CASCADE|SET NULL|RESTRICT|NO ACTION|SET DEFAULT){1}/); + + if (updateAction) { + updateAction = updateAction[1]; + } + + if (deleteAction) { + deleteAction = deleteAction[1]; + } + + const referencesRegex = /REFERENCES.+\((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\)/; + const referenceConditions = constraintSql.match(referencesRegex)[0].split(' '); + referenceTableName = Utils.removeTicks(referenceConditions[1]); + let columnNames = referenceConditions[2]; + columnNames = columnNames.replace(/\(|\)/g, '').split(', '); + referenceTableKeys = columnNames.map(column => Utils.removeTicks(column)); + } + + const constraintCondition = constraintSql.match(/\((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\)/)[0]; + constraintSql = constraintSql.replace(/\(.+\)/, ''); + const constraint = constraintSql.split(' '); + + if (constraint[1] === 'PRIMARY' || constraint[1] === 'FOREIGN') { + constraint[1]+= ' KEY'; + } + + return { + constraintName: Utils.removeTicks(constraint[0]), + constraintType: constraint[1], + updateAction, + deleteAction, + sql: sql.replace(/"/g, '`'), //Sqlite returns double quotes for table name + constraintCondition, + referenceTableName, + referenceTableKeys + }; + }); + + return constraints; + } + + applyParsers(type, value) { + if (type.includes('(')) { + // Remove the length part + type = type.substr(0, type.indexOf('(')); + } + type = type.replace('UNSIGNED', '').replace('ZEROFILL', ''); + type = type.trim().toUpperCase(); + const parse = parserStore.get(type); + + if (value !== null && parse) { + return parse(value, { timezone: this.sequelize.options.timezone }); + } + return value; + } + + formatError(err) { + + switch (err.code) { + case 'SQLITE_CONSTRAINT': { + if (err.message.includes('FOREIGN KEY constraint failed')) { + return new sequelizeErrors.ForeignKeyConstraintError({ + parent: err + }); + } + + let fields = []; + + // Sqlite pre 2.2 behavior - Error: SQLITE_CONSTRAINT: columns x, y are not unique + let match = err.message.match(/columns (.*?) are/); + if (match !== null && match.length >= 2) { + fields = match[1].split(', '); + } else { + + // Sqlite post 2.2 behavior - Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: table.x, table.y + match = err.message.match(/UNIQUE constraint failed: (.*)/); + if (match !== null && match.length >= 2) { + fields = match[1].split(', ').map(columnWithTable => columnWithTable.split('.')[1]); + } + } + + const errors = []; + let message = 'Validation error'; + + for (const field of fields) { + errors.push(new sequelizeErrors.ValidationErrorItem( + this.getUniqueConstraintErrorMessage(field), + 'unique violation', // sequelizeErrors.ValidationErrorItem.Origins.DB, + field, + this.instance && this.instance[field], + this.instance, + 'not_unique' + )); + } + + if (this.model) { + _.forOwn(this.model.uniqueKeys, constraint => { + if (_.isEqual(constraint.fields, fields) && !!constraint.msg) { + message = constraint.msg; + return false; + } + }); + } + + return new sequelizeErrors.UniqueConstraintError({ message, errors, parent: err, fields }); + } + case 'SQLITE_BUSY': + return new sequelizeErrors.TimeoutError(err); + + default: + return new sequelizeErrors.DatabaseError(err); + } + } + + handleShowIndexesQuery(data) { + // Sqlite returns indexes so the one that was defined last is returned first. Lets reverse that! + return Promise.map(data.reverse(), item => { + item.fields = []; + item.primary = false; + item.unique = !!item.unique; + item.constraintName = item.name; + return this.run(`PRAGMA INDEX_INFO(\`${item.name}\`)`).then(columns => { + for (const column of columns) { + item.fields[column.seqno] = { + attribute: column.name, + length: undefined, + order: undefined + }; + } + + return item; + }); + }); + } + + getDatabaseMethod() { + if (this.isUpsertQuery()) { + return 'exec'; // Needed to run multiple queries in one + } + if (this.isInsertQuery() || this.isUpdateQuery() || this.isBulkUpdateQuery() || this.sql.toLowerCase().includes('CREATE TEMPORARY TABLE'.toLowerCase()) || this.options.type === QueryTypes.BULKDELETE) { + return 'run'; + } + return 'all'; + } +} + +module.exports = Query; +module.exports.Query = Query; +module.exports.default = Query; diff --git a/node_modules/sequelize/lib/errors/association-error.js b/node_modules/sequelize/lib/errors/association-error.js new file mode 100644 index 00000000..0a273d7c --- /dev/null +++ b/node_modules/sequelize/lib/errors/association-error.js @@ -0,0 +1,16 @@ +'use strict'; + +const BaseError = require('./base-error'); + +/** + * Thrown when an association is improperly constructed (see message for details) + */ +class AssociationError extends BaseError { + constructor(message) { + super(message); + this.name = 'SequelizeAssociationError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = AssociationError; diff --git a/node_modules/sequelize/lib/errors/base-error.js b/node_modules/sequelize/lib/errors/base-error.js new file mode 100644 index 00000000..15f0cd80 --- /dev/null +++ b/node_modules/sequelize/lib/errors/base-error.js @@ -0,0 +1,18 @@ +'use strict'; + +/** + * Sequelize provides a host of custom error classes, to allow you to do easier debugging. All of these errors are exposed on the sequelize object and the sequelize constructor. + * All sequelize errors inherit from the base JS error object. + * + * This means that errors can be accessed using `Sequelize.ValidationError` + * The Base Error all Sequelize Errors inherit from. + */ +class BaseError extends Error { + constructor(message) { + super(message); + this.name = 'SequelizeBaseError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = BaseError; diff --git a/node_modules/sequelize/lib/errors/bulk-record-error.js b/node_modules/sequelize/lib/errors/bulk-record-error.js new file mode 100644 index 00000000..51d1494f --- /dev/null +++ b/node_modules/sequelize/lib/errors/bulk-record-error.js @@ -0,0 +1,22 @@ +'use strict'; + +const BaseError = require('./base-error'); + +/** + * Thrown when bulk operation fails, it represent per record level error. + * Used with Promise.AggregateError + * + * @param {Error} error Error for a given record/instance + * @param {Object} record DAO instance that error belongs to + */ +class BulkRecordError extends BaseError { + constructor(error, record) { + super(error.message); + this.name = 'SequelizeBulkRecordError'; + this.errors = error; + this.record = record; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = BulkRecordError; diff --git a/node_modules/sequelize/lib/errors/connection-error.js b/node_modules/sequelize/lib/errors/connection-error.js new file mode 100644 index 00000000..2d34ce85 --- /dev/null +++ b/node_modules/sequelize/lib/errors/connection-error.js @@ -0,0 +1,22 @@ +'use strict'; + +const BaseError = require('./base-error'); + +/** + * A base class for all connection related errors. + */ +class ConnectionError extends BaseError { + constructor(parent) { + super(parent ? parent.message : ''); + this.name = 'SequelizeConnectionError'; + /** + * The connection specific error which triggered this one + * @type {Error} + */ + this.parent = parent; + this.original = parent; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ConnectionError; diff --git a/node_modules/sequelize/lib/errors/connection/access-denied-error.js b/node_modules/sequelize/lib/errors/connection/access-denied-error.js new file mode 100644 index 00000000..bfa5f8e8 --- /dev/null +++ b/node_modules/sequelize/lib/errors/connection/access-denied-error.js @@ -0,0 +1,16 @@ +'use strict'; + +const ConnectionError = require('./../connection-error'); + +/** + * Thrown when a connection to a database is refused due to insufficient privileges + */ +class AccessDeniedError extends ConnectionError { + constructor(parent) { + super(parent); + this.name = 'SequelizeAccessDeniedError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = AccessDeniedError; diff --git a/node_modules/sequelize/lib/errors/connection/connection-acquire-timeout-error.js b/node_modules/sequelize/lib/errors/connection/connection-acquire-timeout-error.js new file mode 100644 index 00000000..0d9e63b1 --- /dev/null +++ b/node_modules/sequelize/lib/errors/connection/connection-acquire-timeout-error.js @@ -0,0 +1,16 @@ +'use strict'; + +const ConnectionError = require('./../connection-error'); + +/** + * Thrown when connection is not acquired due to timeout + */ +class ConnectionAcquireTimeoutError extends ConnectionError { + constructor(parent) { + super(parent); + this.name = 'SequelizeConnectionAcquireTimeoutError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ConnectionAcquireTimeoutError; diff --git a/node_modules/sequelize/lib/errors/connection/connection-refused-error.js b/node_modules/sequelize/lib/errors/connection/connection-refused-error.js new file mode 100644 index 00000000..9b121b82 --- /dev/null +++ b/node_modules/sequelize/lib/errors/connection/connection-refused-error.js @@ -0,0 +1,16 @@ +'use strict'; + +const ConnectionError = require('./../connection-error'); + +/** + * Thrown when a connection to a database is refused + */ +class ConnectionRefusedError extends ConnectionError { + constructor(parent) { + super(parent); + this.name = 'SequelizeConnectionRefusedError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ConnectionRefusedError; diff --git a/node_modules/sequelize/lib/errors/connection/connection-timed-out-error.js b/node_modules/sequelize/lib/errors/connection/connection-timed-out-error.js new file mode 100644 index 00000000..84171801 --- /dev/null +++ b/node_modules/sequelize/lib/errors/connection/connection-timed-out-error.js @@ -0,0 +1,16 @@ +'use strict'; + +const ConnectionError = require('./../connection-error'); + +/** + * Thrown when a connection to a database times out + */ +class ConnectionTimedOutError extends ConnectionError { + constructor(parent) { + super(parent); + this.name = 'SequelizeConnectionTimedOutError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ConnectionTimedOutError; diff --git a/node_modules/sequelize/lib/errors/connection/host-not-found-error.js b/node_modules/sequelize/lib/errors/connection/host-not-found-error.js new file mode 100644 index 00000000..ac260013 --- /dev/null +++ b/node_modules/sequelize/lib/errors/connection/host-not-found-error.js @@ -0,0 +1,16 @@ +'use strict'; + +const ConnectionError = require('./../connection-error'); + +/** + * Thrown when a connection to a database has a hostname that was not found + */ +class HostNotFoundError extends ConnectionError { + constructor(parent) { + super(parent); + this.name = 'SequelizeHostNotFoundError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = HostNotFoundError; diff --git a/node_modules/sequelize/lib/errors/connection/host-not-reachable-error.js b/node_modules/sequelize/lib/errors/connection/host-not-reachable-error.js new file mode 100644 index 00000000..eee27beb --- /dev/null +++ b/node_modules/sequelize/lib/errors/connection/host-not-reachable-error.js @@ -0,0 +1,16 @@ +'use strict'; + +const ConnectionError = require('./../connection-error'); + +/** + * Thrown when a connection to a database has a hostname that was not reachable + */ +class HostNotReachableError extends ConnectionError { + constructor(parent) { + super(parent); + this.name = 'SequelizeHostNotReachableError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = HostNotReachableError; diff --git a/node_modules/sequelize/lib/errors/connection/invalid-connection-error.js b/node_modules/sequelize/lib/errors/connection/invalid-connection-error.js new file mode 100644 index 00000000..21c50973 --- /dev/null +++ b/node_modules/sequelize/lib/errors/connection/invalid-connection-error.js @@ -0,0 +1,16 @@ +'use strict'; + +const ConnectionError = require('./../connection-error'); + +/** + * Thrown when a connection to a database has invalid values for any of the connection parameters + */ +class InvalidConnectionError extends ConnectionError { + constructor(parent) { + super(parent); + this.name = 'SequelizeInvalidConnectionError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = InvalidConnectionError; diff --git a/node_modules/sequelize/lib/errors/database-error.js b/node_modules/sequelize/lib/errors/database-error.js new file mode 100644 index 00000000..fe763187 --- /dev/null +++ b/node_modules/sequelize/lib/errors/database-error.js @@ -0,0 +1,29 @@ +'use strict'; + +const BaseError = require('./base-error'); + +/** + * A base class for all database related errors. + */ +class DatabaseError extends BaseError { + constructor(parent) { + super(parent.message); + this.name = 'SequelizeDatabaseError'; + /** + * @type {Error} + */ + this.parent = parent; + /** + * @type {Error} + */ + this.original = parent; + /** + * The SQL that triggered the error + * @type {string} + */ + this.sql = parent.sql; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = DatabaseError; diff --git a/node_modules/sequelize/lib/errors/database/exclusion-constraint-error.js b/node_modules/sequelize/lib/errors/database/exclusion-constraint-error.js new file mode 100644 index 00000000..581b36ef --- /dev/null +++ b/node_modules/sequelize/lib/errors/database/exclusion-constraint-error.js @@ -0,0 +1,24 @@ +'use strict'; + +const DatabaseError = require('./../database-error'); + +/** + * Thrown when an exclusion constraint is violated in the database + */ +class ExclusionConstraintError extends DatabaseError { + constructor(options) { + options = options || {}; + options.parent = options.parent || { sql: '' }; + + super(options.parent); + this.name = 'SequelizeExclusionConstraintError'; + + this.message = options.message || options.parent.message || ''; + this.constraint = options.constraint; + this.fields = options.fields; + this.table = options.table; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ExclusionConstraintError; diff --git a/node_modules/sequelize/lib/errors/database/foreign-key-constraint-error.js b/node_modules/sequelize/lib/errors/database/foreign-key-constraint-error.js new file mode 100644 index 00000000..ba50973c --- /dev/null +++ b/node_modules/sequelize/lib/errors/database/foreign-key-constraint-error.js @@ -0,0 +1,26 @@ +'use strict'; + +const DatabaseError = require('./../database-error'); + +/** + * Thrown when a foreign key constraint is violated in the database + */ +class ForeignKeyConstraintError extends DatabaseError { + constructor(options) { + options = options || {}; + options.parent = options.parent || { sql: '' }; + + super(options.parent); + this.name = 'SequelizeForeignKeyConstraintError'; + + this.message = options.message || options.parent.message || 'Database Error'; + this.fields = options.fields; + this.table = options.table; + this.value = options.value; + this.index = options.index; + this.reltype = options.reltype; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = ForeignKeyConstraintError; diff --git a/node_modules/sequelize/lib/errors/database/timeout-error.js b/node_modules/sequelize/lib/errors/database/timeout-error.js new file mode 100644 index 00000000..59dc600a --- /dev/null +++ b/node_modules/sequelize/lib/errors/database/timeout-error.js @@ -0,0 +1,16 @@ +'use strict'; + +const DatabaseError = require('./../database-error'); + +/** + * Thrown when a database query times out because of a deadlock + */ +class TimeoutError extends DatabaseError { + constructor(parent) { + super(parent); + this.name = 'SequelizeTimeoutError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = TimeoutError; diff --git a/node_modules/sequelize/lib/errors/database/unknown-constraint-error.js b/node_modules/sequelize/lib/errors/database/unknown-constraint-error.js new file mode 100644 index 00000000..33d6f429 --- /dev/null +++ b/node_modules/sequelize/lib/errors/database/unknown-constraint-error.js @@ -0,0 +1,24 @@ +'use strict'; + +const DatabaseError = require('./../database-error'); + +/** + * Thrown when constraint name is not found in the database + */ +class UnknownConstraintError extends DatabaseError { + constructor(options) { + options = options || {}; + options.parent = options.parent || { sql: '' }; + + super(options.parent); + this.name = 'SequelizeUnknownConstraintError'; + + this.message = options.message || 'The specified constraint does not exist'; + this.constraint = options.constraint; + this.fields = options.fields; + this.table = options.table; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = UnknownConstraintError; diff --git a/node_modules/sequelize/lib/errors/eager-loading-error.js b/node_modules/sequelize/lib/errors/eager-loading-error.js new file mode 100644 index 00000000..6963e21d --- /dev/null +++ b/node_modules/sequelize/lib/errors/eager-loading-error.js @@ -0,0 +1,16 @@ +'use strict'; + +const BaseError = require('./base-error'); + +/** + * Thrown when an include statement is improperly constructed (see message for details) + */ +class EagerLoadingError extends BaseError { + constructor(message) { + super(message); + this.name = 'SequelizeEagerLoadingError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = EagerLoadingError; diff --git a/node_modules/sequelize/lib/errors/empty-result-error.js b/node_modules/sequelize/lib/errors/empty-result-error.js new file mode 100644 index 00000000..ffb2fd1b --- /dev/null +++ b/node_modules/sequelize/lib/errors/empty-result-error.js @@ -0,0 +1,16 @@ +'use strict'; + +const BaseError = require('./base-error'); + +/** + * Thrown when a record was not found, Usually used with rejectOnEmpty mode (see message for details) + */ +class EmptyResultError extends BaseError { + constructor(message) { + super(message); + this.name = 'SequelizeEmptyResultError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = EmptyResultError; diff --git a/node_modules/sequelize/lib/errors/index.js b/node_modules/sequelize/lib/errors/index.js new file mode 100644 index 00000000..8ada8c76 --- /dev/null +++ b/node_modules/sequelize/lib/errors/index.js @@ -0,0 +1,31 @@ +'use strict'; + +exports.BaseError = require('./base-error'); + +exports.AssociationError = require('./association-error'); +exports.BulkRecordError = require('./bulk-record-error'); +exports.ConnectionError = require('./connection-error'); +exports.DatabaseError = require('./database-error'); +exports.EagerLoadingError = require('./eager-loading-error'); +exports.EmptyResultError = require('./empty-result-error'); +exports.InstanceError = require('./instance-error'); +exports.OptimisticLockError = require('./optimistic-lock-error'); +exports.QueryError = require('./query-error'); +exports.SequelizeScopeError = require('./sequelize-scope-error'); +exports.ValidationError = require('./validation-error'); +exports.ValidationErrorItem = exports.ValidationError.ValidationErrorItem; + +exports.AccessDeniedError = require('./connection/access-denied-error'); +exports.ConnectionAcquireTimeoutError = require('./connection/connection-acquire-timeout-error'); +exports.ConnectionRefusedError = require('./connection/connection-refused-error'); +exports.ConnectionTimedOutError = require('./connection/connection-timed-out-error'); +exports.HostNotFoundError = require('./connection/host-not-found-error'); +exports.HostNotReachableError = require('./connection/host-not-reachable-error'); +exports.InvalidConnectionError = require('./connection/invalid-connection-error'); + +exports.ExclusionConstraintError = require('./database/exclusion-constraint-error'); +exports.ForeignKeyConstraintError = require('./database/foreign-key-constraint-error'); +exports.TimeoutError = require('./database/timeout-error'); +exports.UnknownConstraintError = require('./database/unknown-constraint-error'); + +exports.UniqueConstraintError = require('./validation/unique-constraint-error'); diff --git a/node_modules/sequelize/lib/errors/instance-error.js b/node_modules/sequelize/lib/errors/instance-error.js new file mode 100644 index 00000000..6f20e36e --- /dev/null +++ b/node_modules/sequelize/lib/errors/instance-error.js @@ -0,0 +1,16 @@ +'use strict'; + +const BaseError = require('./base-error'); + +/** + * Thrown when a some problem occurred with Instance methods (see message for details) + */ +class InstanceError extends BaseError { + constructor(message) { + super(message); + this.name = 'SequelizeInstanceError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = InstanceError; diff --git a/node_modules/sequelize/lib/errors/optimistic-lock-error.js b/node_modules/sequelize/lib/errors/optimistic-lock-error.js new file mode 100644 index 00000000..a745028b --- /dev/null +++ b/node_modules/sequelize/lib/errors/optimistic-lock-error.js @@ -0,0 +1,33 @@ +'use strict'; + +const BaseError = require('./base-error'); + +/** + * Thrown when attempting to update a stale model instance + */ +class OptimisticLockError extends BaseError { + constructor(options) { + options = options || {}; + options.message = options.message || `Attempting to update a stale model instance: ${options.modelName}`; + super(options.message); + this.name = 'SequelizeOptimisticLockError'; + /** + * The name of the model on which the update was attempted + * @type {string} + */ + this.modelName = options.modelName; + /** + * The values of the attempted update + * @type {object} + */ + this.values = options.values; + /** + * + * @type {object} + */ + this.where = options.where; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = OptimisticLockError; diff --git a/node_modules/sequelize/lib/errors/query-error.js b/node_modules/sequelize/lib/errors/query-error.js new file mode 100644 index 00000000..c48617ac --- /dev/null +++ b/node_modules/sequelize/lib/errors/query-error.js @@ -0,0 +1,16 @@ +'use strict'; + +const BaseError = require('./base-error'); + +/** + * Thrown when a query is passed invalid options (see message for details) + */ +class QueryError extends BaseError { + constructor(message) { + super(message); + this.name = 'SequelizeQueryError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = QueryError; diff --git a/node_modules/sequelize/lib/errors/sequelize-scope-error.js b/node_modules/sequelize/lib/errors/sequelize-scope-error.js new file mode 100644 index 00000000..f3ffd58e --- /dev/null +++ b/node_modules/sequelize/lib/errors/sequelize-scope-error.js @@ -0,0 +1,16 @@ +'use strict'; + +const BaseError = require('./base-error'); + +/** + * Scope Error. Thrown when the sequelize cannot query the specified scope. + */ +class SequelizeScopeError extends BaseError { + constructor(parent) { + super(parent); + this.name = 'SequelizeScopeError'; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = SequelizeScopeError; diff --git a/node_modules/sequelize/lib/errors/validation-error.js b/node_modules/sequelize/lib/errors/validation-error.js new file mode 100644 index 00000000..f354e410 --- /dev/null +++ b/node_modules/sequelize/lib/errors/validation-error.js @@ -0,0 +1,209 @@ +'use strict'; + +const BaseError = require('./base-error'); + +/** + * Validation Error. Thrown when the sequelize validation has failed. The error contains an `errors` property, + * which is an array with 1 or more ValidationErrorItems, one for each validation that failed. + * + * @param {string} message Error message + * @param {Array} [errors] Array of ValidationErrorItem objects describing the validation errors + * + * @property errors {ValidationErrorItems[]} + */ +class ValidationError extends BaseError { + constructor(message, errors) { + super(message); + this.name = 'SequelizeValidationError'; + this.message = 'Validation Error'; + /** + * + * @type {ValidationErrorItem[]} + */ + this.errors = errors || []; + + // Use provided error message if available... + if (message) { + this.message = message; + + // ... otherwise create a concatenated message out of existing errors. + } else if (this.errors.length > 0 && this.errors[0].message) { + this.message = this.errors.map(err => `${err.type || err.origin}: ${err.message}`).join(',\n'); + } + Error.captureStackTrace(this, this.constructor); + } + + /** + * Gets all validation error items for the path / field specified. + * + * @param {string} path The path to be checked for error items + * + * @returns {Array} Validation error items for the specified path + */ + get(path) { + return this.errors.reduce((reduced, error) => { + if (error.path === path) { + reduced.push(error); + } + return reduced; + }, []); + } +} + +/** + * Validation Error Item + * Instances of this class are included in the `ValidationError.errors` property. + */ +class ValidationErrorItem { + /** + * Creates new validation error item + * + * @param {string} message An error message + * @param {string} type The type/origin of the validation error + * @param {string} path The field that triggered the validation error + * @param {string} value The value that generated the error + * @param {Object} [inst] the DAO instance that caused the validation error + * @param {Object} [validatorKey] a validation "key", used for identification + * @param {string} [fnName] property name of the BUILT-IN validator function that caused the validation error (e.g. "in" or "len"), if applicable + * @param {string} [fnArgs] parameters used with the BUILT-IN validator function, if applicable + */ + constructor(message, type, path, value, inst, validatorKey, fnName, fnArgs) { + /** + * An error message + * + * @type {string} message + */ + this.message = message || ''; + + /** + * The type/origin of the validation error + * + * @type {string} + */ + this.type = null; + + /** + * The field that triggered the validation error + * + * @type {string} + */ + this.path = path || null; + + /** + * The value that generated the error + * + * @type {string} + */ + this.value = value !== undefined ? value : null; + + this.origin = null; + + /** + * The DAO instance that caused the validation error + * + * @type {Model} + */ + this.instance = inst || null; + + /** + * A validation "key", used for identification + * + * @type {string} + */ + this.validatorKey = validatorKey || null; + + /** + * Property name of the BUILT-IN validator function that caused the validation error (e.g. "in" or "len"), if applicable + * + * @type {string} + */ + this.validatorName = fnName || null; + + /** + * Parameters used with the BUILT-IN validator function, if applicable + * + * @type {string} + */ + this.validatorArgs = fnArgs || []; + + if (type) { + if (ValidationErrorItem.Origins[ type ]) { + this.origin = type; + } else { + const lowercaseType = `${type}`.toLowerCase().trim(); + const realType = ValidationErrorItem.TypeStringMap[ lowercaseType ]; + + if (realType && ValidationErrorItem.Origins[ realType ]) { + this.origin = realType; + this.type = type; + } + } + } + + // This doesn't need captureStackTrace because it's not a subclass of Error + } + + /** + * return a lowercase, trimmed string "key" that identifies the validator. + * + * Note: the string will be empty if the instance has neither a valid `validatorKey` property nor a valid `validatorName` property + * + * @param {boolean} [useTypeAsNS=true] controls whether the returned value is "namespace", + * this parameter is ignored if the validator's `type` is not one of ValidationErrorItem.Origins + * @param {string} [NSSeparator='.'] a separator string for concatenating the namespace, must be not be empty, + * defaults to "." (fullstop). only used and validated if useTypeAsNS is TRUE. + * @throws {Error} thrown if NSSeparator is found to be invalid. + * @returns {string} + * + * @private + */ + getValidatorKey(useTypeAsNS, NSSeparator) { + const useTANS = useTypeAsNS === undefined || !!useTypeAsNS; + const NSSep = NSSeparator === undefined ? '.' : NSSeparator; + + const type = this.origin; + const key = this.validatorKey || this.validatorName; + const useNS = useTANS && type && ValidationErrorItem.Origins[ type ]; + + if (useNS && (typeof NSSep !== 'string' || !NSSep.length)) { + throw new Error('Invalid namespace separator given, must be a non-empty string'); + } + + if (!(typeof key === 'string' && key.length)) { + return ''; + } + + return (useNS ? [type, key].join(NSSep) : key).toLowerCase().trim(); + } +} + +/** + * An enum that defines valid ValidationErrorItem `origin` values + * + * @type {Object} + * @property CORE {string} specifies errors that originate from the sequelize "core" + * @property DB {string} specifies validation errors that originate from the storage engine + * @property FUNCTION {string} specifies validation errors that originate from validator functions (both built-in and custom) defined for a given attribute + */ +ValidationErrorItem.Origins = { + CORE: 'CORE', + DB: 'DB', + FUNCTION: 'FUNCTION' +}; + +/** + * An object that is used internally by the `ValidationErrorItem` class + * that maps current `type` strings (as given to ValidationErrorItem.constructor()) to + * our new `origin` values. + * + * @type {Object} + */ +ValidationErrorItem.TypeStringMap = { + 'notnull violation': 'CORE', + 'string violation': 'CORE', + 'unique violation': 'DB', + 'validation error': 'FUNCTION' +}; + +module.exports = ValidationError; +module.exports.ValidationErrorItem = ValidationErrorItem; diff --git a/node_modules/sequelize/lib/errors/validation/unique-constraint-error.js b/node_modules/sequelize/lib/errors/validation/unique-constraint-error.js new file mode 100644 index 00000000..c02f842e --- /dev/null +++ b/node_modules/sequelize/lib/errors/validation/unique-constraint-error.js @@ -0,0 +1,26 @@ +'use strict'; + +const ValidationError = require('./../validation-error'); + +/** + * Thrown when a unique constraint is violated in the database + */ +class UniqueConstraintError extends ValidationError { + constructor(options) { + options = options || {}; + options.parent = options.parent || { sql: '' }; + options.message = options.message || options.parent.message || 'Validation Error'; + options.errors = options.errors || {}; + super(options.message, options.errors); + + this.name = 'SequelizeUniqueConstraintError'; + this.errors = options.errors; + this.fields = options.fields; + this.parent = options.parent; + this.original = options.parent; + this.sql = options.parent.sql; + Error.captureStackTrace(this, this.constructor); + } +} + +module.exports = UniqueConstraintError; diff --git a/node_modules/sequelize/lib/hooks.js b/node_modules/sequelize/lib/hooks.js new file mode 100644 index 00000000..2599bf44 --- /dev/null +++ b/node_modules/sequelize/lib/hooks.js @@ -0,0 +1,557 @@ +'use strict'; + +const _ = require('lodash'); +const { logger } = require('./utils/logger'); +const Promise = require('./promise'); +const debug = logger.debugContext('hooks'); + +const hookTypes = { + beforeValidate: { params: 2 }, + afterValidate: { params: 2 }, + validationFailed: { params: 3 }, + beforeCreate: { params: 2 }, + afterCreate: { params: 2 }, + beforeDestroy: { params: 2 }, + afterDestroy: { params: 2 }, + beforeRestore: { params: 2 }, + afterRestore: { params: 2 }, + beforeUpdate: { params: 2 }, + afterUpdate: { params: 2 }, + beforeSave: { params: 2, proxies: ['beforeUpdate', 'beforeCreate'] }, + afterSave: { params: 2, proxies: ['afterUpdate', 'afterCreate'] }, + beforeUpsert: { params: 2 }, + afterUpsert: { params: 2 }, + beforeBulkCreate: { params: 2 }, + afterBulkCreate: { params: 2 }, + beforeBulkDestroy: { params: 1 }, + afterBulkDestroy: { params: 1 }, + beforeBulkRestore: { params: 1 }, + afterBulkRestore: { params: 1 }, + beforeBulkUpdate: { params: 1 }, + afterBulkUpdate: { params: 1 }, + beforeFind: { params: 1 }, + beforeFindAfterExpandIncludeAll: { params: 1 }, + beforeFindAfterOptions: { params: 1 }, + afterFind: { params: 2 }, + beforeCount: { params: 1 }, + beforeDefine: { params: 2, sync: true, noModel: true }, + afterDefine: { params: 1, sync: true, noModel: true }, + beforeInit: { params: 2, sync: true, noModel: true }, + afterInit: { params: 1, sync: true, noModel: true }, + beforeAssociate: { params: 2, sync: true }, + afterAssociate: { params: 2, sync: true }, + beforeConnect: { params: 1, noModel: true }, + afterConnect: { params: 2, noModel: true }, + beforeDisconnect: { params: 1, noModel: true }, + afterDisconnect: { params: 1, noModel: true }, + beforeSync: { params: 1 }, + afterSync: { params: 1 }, + beforeBulkSync: { params: 1 }, + afterBulkSync: { params: 1 }, + beforeQuery: { params: 2 }, + afterQuery: { params: 2 } +}; +exports.hooks = hookTypes; + + +/** + * get array of current hook and its proxies combined + * + * @param {string} hookType any hook type @see {@link hookTypes} + * + * @private + */ +const getProxiedHooks = hookType => + hookTypes[hookType].proxies + ? hookTypes[hookType].proxies.concat(hookType) + : [hookType] +; + +function getHooks(hooked, hookType) { + return (hooked.options.hooks || {})[hookType] || []; +} + +const Hooks = { + /** + * Process user supplied hooks definition + * + * @param {Object} hooks hooks definition + * + * @private + * @memberof Sequelize + * @memberof Sequelize.Model + */ + _setupHooks(hooks) { + this.options.hooks = {}; + _.map(hooks || {}, (hooksArray, hookName) => { + if (!Array.isArray(hooksArray)) hooksArray = [hooksArray]; + hooksArray.forEach(hookFn => this.addHook(hookName, hookFn)); + }); + }, + + runHooks(hooks, ...hookArgs) { + if (!hooks) throw new Error('runHooks requires at least 1 argument'); + + let hookType; + + if (typeof hooks === 'string') { + hookType = hooks; + hooks = getHooks(this, hookType); + + if (this.sequelize) { + hooks = hooks.concat(getHooks(this.sequelize, hookType)); + } + } + + if (!Array.isArray(hooks)) { + hooks = [hooks]; + } + + // synchronous hooks + if (hookTypes[hookType] && hookTypes[hookType].sync) { + for (let hook of hooks) { + if (typeof hook === 'object') { + hook = hook.fn; + } + + debug(`running hook(sync) ${hookType}`); + hook.apply(this, hookArgs); + } + return; + } + + // asynchronous hooks (default) + return Promise.each(hooks, hook => { + if (typeof hook === 'object') { + hook = hook.fn; + } + + debug(`running hook ${hookType}`); + return hook.apply(this, hookArgs); + }).return(); + }, + + /** + * Add a hook to the model + * + * @param {string} hookType hook name @see {@link hookTypes} + * @param {string|Function} [name] Provide a name for the hook function. It can be used to remove the hook later or to order hooks based on some sort of priority system in the future. + * @param {Function} fn The hook function + * + * @memberof Sequelize + * @memberof Sequelize.Model + */ + addHook(hookType, name, fn) { + if (typeof name === 'function') { + fn = name; + name = null; + } + + debug(`adding hook ${hookType}`); + // check for proxies, add them too + hookType = getProxiedHooks(hookType); + + hookType.forEach(type => { + const hooks = getHooks(this, type); + hooks.push(name ? { name, fn } : fn); + this.options.hooks[type] = hooks; + }); + + return this; + }, + + /** + * Remove hook from the model + * + * @param {string} hookType @see {@link hookTypes} + * @param {string|Function} name name of hook or function reference which was attached + * + * @memberof Sequelize + * @memberof Sequelize.Model + */ + removeHook(hookType, name) { + const isReference = typeof name === 'function' ? true : false; + + if (!this.hasHook(hookType)) { + return this; + } + + debug(`removing hook ${hookType}`); + + // check for proxies, add them too + hookType = getProxiedHooks(hookType); + + for (const type of hookType) { + this.options.hooks[type] = this.options.hooks[type].filter(hook => { + if (isReference && typeof hook === 'function') { + return hook !== name; // check if same method + } + if (!isReference && typeof hook === 'object') { + return hook.name !== name; + } + return true; + }); + } + + return this; + }, + + /** + * Check whether the mode has any hooks of this type + * + * @param {string} hookType @see {@link hookTypes} + * + * @alias hasHooks + * + * @memberof Sequelize + * @memberof Sequelize.Model + */ + hasHook(hookType) { + return this.options.hooks[hookType] && !!this.options.hooks[hookType].length; + } +}; +Hooks.hasHooks = Hooks.hasHook; + + +function applyTo(target, isModel = false) { + _.mixin(target, Hooks); + + for (const hook of Object.keys(hookTypes)) { + if (isModel && hookTypes[hook].noModel) { + continue; + } + target[hook] = function(name, callback) { + return this.addHook(hook, name, callback); + }; + } +} +exports.applyTo = applyTo; + +/** + * A hook that is run before validation + * @param {string} name + * @param {Function} fn A callback function that is called with instance, options + * @name beforeValidate + * @memberof Sequelize.Model + */ + +/** + * A hook that is run after validation + * @param {string} name + * @param {Function} fn A callback function that is called with instance, options + * @name afterValidate + * @memberof Sequelize.Model + */ + +/** + * A hook that is run when validation fails + * @param {string} name + * @param {Function} fn A callback function that is called with instance, options, error. Error is the + * SequelizeValidationError. If the callback throws an error, it will replace the original validation error. + * @name validationFailed + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before creating a single instance + * @param {string} name + * @param {Function} fn A callback function that is called with attributes, options + * @name beforeCreate + * @memberof Sequelize.Model + */ + +/** + * A hook that is run after creating a single instance + * @param {string} name + * @param {Function} fn A callback function that is called with attributes, options + * @name afterCreate + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before creating or updating a single instance, It proxies `beforeCreate` and `beforeUpdate` + * @param {string} name + * @param {Function} fn A callback function that is called with attributes, options + * @name beforeSave + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before upserting + * @param {string} name + * @param {Function} fn A callback function that is called with attributes, options + * @name beforeUpsert + * @memberof Sequelize.Model + */ + +/** + * A hook that is run after upserting + * @param {string} name + * @param {Function} fn A callback function that is called with the result of upsert(), options + * @name afterUpsert + * @memberof Sequelize.Model + */ + +/** + * A hook that is run after creating or updating a single instance, It proxies `afterCreate` and `afterUpdate` + * @param {string} name + * @param {Function} fn A callback function that is called with attributes, options + * @name afterSave + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before destroying a single instance + * @param {string} name + * @param {Function} fn A callback function that is called with instance, options + * + * @name beforeDestroy + * @memberof Sequelize.Model + */ + +/** + * A hook that is run after destroying a single instance + * @param {string} name + * @param {Function} fn A callback function that is called with instance, options + * + * @name afterDestroy + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before restoring a single instance + * @param {string} name + * @param {Function} fn A callback function that is called with instance, options + * + * @name beforeRestore + * @memberof Sequelize.Model + */ + +/** + * A hook that is run after restoring a single instance + * @param {string} name + * @param {Function} fn A callback function that is called with instance, options + * + * @name afterRestore + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before updating a single instance + * @param {string} name + * @param {Function} fn A callback function that is called with instance, options + * @name beforeUpdate + * @memberof Sequelize.Model + */ + +/** + * A hook that is run after updating a single instance + * @param {string} name + * @param {Function} fn A callback function that is called with instance, options + * @name afterUpdate + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before creating instances in bulk + * @param {string} name + * @param {Function} fn A callback function that is called with instances, options + * @name beforeBulkCreate + * @memberof Sequelize.Model + */ + +/** + * A hook that is run after creating instances in bulk + * @param {string} name + * @param {Function} fn A callback function that is called with instances, options + * @name afterBulkCreate + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before destroying instances in bulk + * @param {string} name + * @param {Function} fn A callback function that is called with options + * + * @name beforeBulkDestroy + * @memberof Sequelize.Model + */ + +/** + * A hook that is run after destroying instances in bulk + * @param {string} name + * @param {Function} fn A callback function that is called with options + * + * @name afterBulkDestroy + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before restoring instances in bulk + * @param {string} name + * @param {Function} fn A callback function that is called with options + * + * @name beforeBulkRestore + * @memberof Sequelize.Model + */ + +/** + * A hook that is run after restoring instances in bulk + * @param {string} name + * @param {Function} fn A callback function that is called with options + * + * @name afterBulkRestore + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before updating instances in bulk + * @param {string} name + * @param {Function} fn A callback function that is called with options + * @name beforeBulkUpdate + * @memberof Sequelize.Model + */ + +/** + * A hook that is run after updating instances in bulk + * @param {string} name + * @param {Function} fn A callback function that is called with options + * @name afterBulkUpdate + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before a find (select) query + * @param {string} name + * @param {Function} fn A callback function that is called with options + * @name beforeFind + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before a find (select) query, after any { include: {all: ...} } options are expanded + * @param {string} name + * @param {Function} fn A callback function that is called with options + * @name beforeFindAfterExpandIncludeAll + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before a find (select) query, after all option parsing is complete + * @param {string} name + * @param {Function} fn A callback function that is called with options + * @name beforeFindAfterOptions + * @memberof Sequelize.Model + */ + +/** + * A hook that is run after a find (select) query + * @param {string} name + * @param {Function} fn A callback function that is called with instance(s), options + * @name afterFind + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before a count query + * @param {string} name + * @param {Function} fn A callback function that is called with options + * @name beforeCount + * @memberof Sequelize.Model + */ + +/** + * A hook that is run before a define call + * @param {string} name + * @param {Function} fn A callback function that is called with attributes, options + * @name beforeDefine + * @memberof Sequelize + */ + +/** + * A hook that is run after a define call + * @param {string} name + * @param {Function} fn A callback function that is called with factory + * @name afterDefine + * @memberof Sequelize + */ + +/** + * A hook that is run before Sequelize() call + * @param {string} name + * @param {Function} fn A callback function that is called with config, options + * @name beforeInit + * @memberof Sequelize + */ + +/** + * A hook that is run after Sequelize() call + * @param {string} name + * @param {Function} fn A callback function that is called with sequelize + * @name afterInit + * @memberof Sequelize + */ + +/** + * A hook that is run before a connection is created + * @param {string} name + * @param {Function} fn A callback function that is called with config passed to connection + * @name beforeConnect + * @memberof Sequelize + */ + +/** + * A hook that is run after a connection is created + * @param {string} name + * @param {Function} fn A callback function that is called with the connection object and the config passed to connection + * @name afterConnect + * @memberof Sequelize + */ + +/** + * A hook that is run before a connection is disconnected + * @param {string} name + * @param {Function} fn A callback function that is called with the connection object + * @name beforeDisconnect + * @memberof Sequelize + */ + +/** + * A hook that is run after a connection is disconnected + * @param {string} name + * @param {Function} fn A callback function that is called with the connection object + * @name afterDisconnect + * @memberof Sequelize + */ + +/** + * A hook that is run before Model.sync call + * @param {string} name + * @param {Function} fn A callback function that is called with options passed to Model.sync + * @name beforeSync + * @memberof Sequelize + */ + +/** + * A hook that is run after Model.sync call + * @param {string} name + * @param {Function} fn A callback function that is called with options passed to Model.sync + * @name afterSync + * @memberof Sequelize + */ + +/** + * A hook that is run before sequelize.sync call + * @param {string} name + * @param {Function} fn A callback function that is called with options passed to sequelize.sync + * @name beforeBulkSync + * @memberof Sequelize + */ + +/** + * A hook that is run after sequelize.sync call + * @param {string} name + * @param {Function} fn A callback function that is called with options passed to sequelize.sync + * @name afterBulkSync + * @memberof Sequelize + */ diff --git a/node_modules/sequelize/lib/index-hints.js b/node_modules/sequelize/lib/index-hints.js new file mode 100644 index 00000000..9ecf4d64 --- /dev/null +++ b/node_modules/sequelize/lib/index-hints.js @@ -0,0 +1,14 @@ +'use strict'; + +/** + * An enum of index hints to be used in mysql for querying with index hints + * + * @property USE + * @property FORCE + * @property IGNORE + */ +const IndexHints = module.exports = { // eslint-disable-line + USE: 'USE', + FORCE: 'FORCE', + IGNORE: 'IGNORE' +}; diff --git a/node_modules/sequelize/lib/instance-validator.js b/node_modules/sequelize/lib/instance-validator.js new file mode 100644 index 00000000..ad14acc2 --- /dev/null +++ b/node_modules/sequelize/lib/instance-validator.js @@ -0,0 +1,431 @@ +'use strict'; + +const _ = require('lodash'); +const Utils = require('./utils'); +const sequelizeError = require('./errors'); +const Promise = require('./promise'); +const DataTypes = require('./data-types'); +const BelongsTo = require('./associations/belongs-to'); +const validator = require('./utils/validator-extras').validator; + +/** + * Instance Validator. + * + * @param {Instance} modelInstance The model instance. + * @param {Object} options A dictionary with options. + * + * @private + */ +class InstanceValidator { + constructor(modelInstance, options) { + options = _.clone(options) || {}; + + if (options.fields && !options.skip) { + options.skip = _.difference(Object.keys(modelInstance.constructor.rawAttributes), options.fields); + } + + // assign defined and default options + this.options = _.defaults(options, { + skip: [], + hooks: true + }); + + this.modelInstance = modelInstance; + + /** + * Exposes a reference to validator.js. This allows you to add custom validations using `validator.extend` + * @name validator + * @private + */ + this.validator = validator; + + /** + * All errors will be stored here from the validations. + * + * @type {Array} Will contain keys that correspond to attributes which will + * be Arrays of Errors. + * @private + */ + this.errors = []; + + /** + * @type {boolean} Indicates if validations are in progress + * @private + */ + this.inProgress = false; + } + + /** + * The main entry point for the Validation module, invoke to start the dance. + * + * @returns {Promise} + * @private + */ + _validate() { + if (this.inProgress) throw new Error('Validations already in progress.'); + + this.inProgress = true; + + return Promise.all([ + this._perAttributeValidators().reflect(), + this._customValidators().reflect() + ]).then(() => { + if (this.errors.length) { + throw new sequelizeError.ValidationError(null, this.errors); + } + }); + } + + /** + * Invoke the Validation sequence and run validation hooks if defined + * - Before Validation Model Hooks + * - Validation + * - On validation success: After Validation Model Hooks + * - On validation failure: Validation Failed Model Hooks + * + * @returns {Promise} + * @private + */ + validate() { + return this.options.hooks ? this._validateAndRunHooks() : this._validate(); + } + + /** + * Invoke the Validation sequence and run hooks + * - Before Validation Model Hooks + * - Validation + * - On validation success: After Validation Model Hooks + * - On validation failure: Validation Failed Model Hooks + * + * @returns {Promise} + * @private + */ + _validateAndRunHooks() { + const runHooks = this.modelInstance.constructor.runHooks.bind(this.modelInstance.constructor); + return runHooks('beforeValidate', this.modelInstance, this.options) + .then(() => + this._validate() + .catch(error => runHooks('validationFailed', this.modelInstance, this.options, error) + .then(newError => { throw newError || error; })) + ) + .then(() => runHooks('afterValidate', this.modelInstance, this.options)) + .return(this.modelInstance); + } + + /** + * Will run all the validators defined per attribute (built-in validators and custom validators) + * + * @returns {Promise>} A promise from .reflect(). + * @private + */ + _perAttributeValidators() { + // promisify all attribute invocations + const validators = []; + + _.forIn(this.modelInstance.rawAttributes, (rawAttribute, field) => { + if (this.options.skip.includes(field)) { + return; + } + + const value = this.modelInstance.dataValues[field]; + + if (value instanceof Utils.SequelizeMethod) { + return; + } + + if (!rawAttribute._autoGenerated && !rawAttribute.autoIncrement) { + // perform validations based on schema + this._validateSchema(rawAttribute, field, value); + } + + if (Object.prototype.hasOwnProperty.call(this.modelInstance.validators, field)) { + validators.push(this._singleAttrValidate(value, field, rawAttribute.allowNull).reflect()); + } + }); + + return Promise.all(validators); + } + + /** + * Will run all the custom validators defined in the model's options. + * + * @returns {Promise>} A promise from .reflect(). + * @private + */ + _customValidators() { + const validators = []; + _.each(this.modelInstance._modelOptions.validate, (validator, validatorType) => { + if (this.options.skip.includes(validatorType)) { + return; + } + + const valprom = this._invokeCustomValidator(validator, validatorType) + // errors are handled in settling, stub this + .catch(() => {}) + .reflect(); + + validators.push(valprom); + }); + + return Promise.all(validators); + } + + /** + * Validate a single attribute with all the defined built-in validators and custom validators. + * + * @private + * + * @param {*} value Anything. + * @param {string} field The field name. + * @param {boolean} allowNull Whether or not the schema allows null values + * + * @returns {Promise} A promise, will always resolve, auto populates error on this.error local object. + */ + _singleAttrValidate(value, field, allowNull) { + // If value is null and allowNull is false, no validators should run (see #9143) + if ((value === null || value === undefined) && !allowNull) { + // The schema validator (_validateSchema) has already generated the validation error. Nothing to do here. + return Promise.resolve(); + } + + // Promisify each validator + const validators = []; + _.forIn(this.modelInstance.validators[field], (test, validatorType) => { + + if (validatorType === 'isUrl' || validatorType === 'isURL' || validatorType === 'isEmail') { + // Preserve backwards compat. Validator.js now expects the second param to isURL and isEmail to be an object + if (typeof test === 'object' && test !== null && test.msg) { + test = { + msg: test.msg + }; + } else if (test === true) { + test = {}; + } + } + + // Custom validators should always run, except if value is null and allowNull is false (see #9143) + if (typeof test === 'function') { + validators.push(this._invokeCustomValidator(test, validatorType, true, value, field).reflect()); + return; + } + + // If value is null, built-in validators should not run (only custom validators have to run) (see #9134). + if (value === null || value === undefined) { + return; + } + + const validatorPromise = this._invokeBuiltinValidator(value, test, validatorType, field); + // errors are handled in settling, stub this + validatorPromise.catch(() => {}); + validators.push(validatorPromise.reflect()); + }); + + return Promise + .all(validators) + .then(results => this._handleReflectedResult(field, value, results)); + } + + /** + * Prepare and invoke a custom validator. + * + * @private + * + * @param {Function} validator The custom validator. + * @param {string} validatorType the custom validator type (name). + * @param {boolean} optAttrDefined Set to true if custom validator was defined from the attribute + * @param {*} optValue value for attribute + * @param {string} optField field for attribute + * + * @returns {Promise} A promise. + */ + _invokeCustomValidator(validator, validatorType, optAttrDefined, optValue, optField) { + let validatorFunction = null; // the validation function to call + let isAsync = false; + + const validatorArity = validator.length; + // check if validator is async and requires a callback + let asyncArity = 1; + let errorKey = validatorType; + let invokeArgs; + if (optAttrDefined) { + asyncArity = 2; + invokeArgs = optValue; + errorKey = optField; + } + if (validatorArity === asyncArity) { + isAsync = true; + } + + if (isAsync) { + if (optAttrDefined) { + validatorFunction = Promise.promisify(validator.bind(this.modelInstance, invokeArgs)); + } else { + validatorFunction = Promise.promisify(validator.bind(this.modelInstance)); + } + return validatorFunction() + .catch(e => this._pushError(false, errorKey, e, optValue, validatorType)); + } + return Promise + .try(() => validator.call(this.modelInstance, invokeArgs)) + .catch(e => this._pushError(false, errorKey, e, optValue, validatorType)); + } + + /** + * Prepare and invoke a build-in validator. + * + * @private + * + * @param {*} value Anything. + * @param {*} test The test case. + * @param {string} validatorType One of known to Sequelize validators. + * @param {string} field The field that is being validated + * + * @returns {Object} An object with specific keys to invoke the validator. + */ + _invokeBuiltinValidator(value, test, validatorType, field) { + return Promise.try(() => { + // Cast value as string to pass new Validator.js string requirement + const valueString = String(value); + // check if Validator knows that kind of validation test + if (typeof validator[validatorType] !== 'function') { + throw new Error(`Invalid validator function: ${validatorType}`); + } + + const validatorArgs = this._extractValidatorArgs(test, validatorType, field); + + if (!validator[validatorType](valueString, ...validatorArgs)) { + throw Object.assign(new Error(test.msg || `Validation ${validatorType} on ${field} failed`), { validatorName: validatorType, validatorArgs }); + } + }); + } + + /** + * Will extract arguments for the validator. + * + * @param {*} test The test case. + * @param {string} validatorType One of known to Sequelize validators. + * @param {string} field The field that is being validated. + * + * @private + */ + _extractValidatorArgs(test, validatorType, field) { + let validatorArgs = test.args || test; + const isLocalizedValidator = typeof validatorArgs !== 'string' && (validatorType === 'isAlpha' || validatorType === 'isAlphanumeric' || validatorType === 'isMobilePhone'); + + if (!Array.isArray(validatorArgs)) { + if (validatorType === 'isImmutable') { + validatorArgs = [validatorArgs, field, this.modelInstance]; + } else if (isLocalizedValidator || validatorType === 'isIP') { + validatorArgs = []; + } else { + validatorArgs = [validatorArgs]; + } + } else { + validatorArgs = validatorArgs.slice(0); + } + return validatorArgs; + } + + /** + * Will validate a single field against its schema definition (isnull). + * + * @param {Object} rawAttribute As defined in the Schema. + * @param {string} field The field name. + * @param {*} value anything. + * + * @private + */ + _validateSchema(rawAttribute, field, value) { + if (rawAttribute.allowNull === false && (value === null || value === undefined)) { + const association = _.values(this.modelInstance.constructor.associations).find(association => association instanceof BelongsTo && association.foreignKey === rawAttribute.fieldName); + if (!association || !this.modelInstance.get(association.associationAccessor)) { + const validators = this.modelInstance.validators[field]; + const errMsg = _.get(validators, 'notNull.msg', `${this.modelInstance.constructor.name}.${field} cannot be null`); + + this.errors.push(new sequelizeError.ValidationErrorItem( + errMsg, + 'notNull Violation', // sequelizeError.ValidationErrorItem.Origins.CORE, + field, + value, + this.modelInstance, + 'is_null' + )); + } + } + + if (rawAttribute.type instanceof DataTypes.STRING || rawAttribute.type instanceof DataTypes.TEXT || rawAttribute.type instanceof DataTypes.CITEXT) { + if (Array.isArray(value) || _.isObject(value) && !(value instanceof Utils.SequelizeMethod) && !Buffer.isBuffer(value)) { + this.errors.push(new sequelizeError.ValidationErrorItem( + `${field} cannot be an array or an object`, + 'string violation', // sequelizeError.ValidationErrorItem.Origins.CORE, + field, + value, + this.modelInstance, + 'not_a_string' + )); + } + } + } + + + /** + * Handles the returned result of a Promise.reflect. + * + * If errors are found it populates this.error. + * + * @param {string} field The attribute name. + * @param {string|number} value The data value. + * @param {Array} promiseInspections objects. + * + * @private + */ + _handleReflectedResult(field, value, promiseInspections) { + for (const promiseInspection of promiseInspections) { + if (promiseInspection.isRejected()) { + const rejection = promiseInspection.error(); + const isBuiltIn = !!rejection.validatorName; + + this._pushError(isBuiltIn, field, rejection, value, rejection.validatorName, rejection.validatorArgs); + } + } + } + + /** + * Signs all errors retaining the original. + * + * @param {boolean} isBuiltin - Determines if error is from builtin validator. + * @param {string} errorKey - name of invalid attribute. + * @param {Error|string} rawError - The original error. + * @param {string|number} value - The data that triggered the error. + * @param {string} fnName - Name of the validator, if any + * @param {Array} fnArgs - Arguments for the validator [function], if any + * + * @private + */ + _pushError(isBuiltin, errorKey, rawError, value, fnName, fnArgs) { + const message = rawError.message || rawError || 'Validation error'; + const error = new sequelizeError.ValidationErrorItem( + message, + 'Validation error', // sequelizeError.ValidationErrorItem.Origins.FUNCTION, + errorKey, + value, + this.modelInstance, + fnName, + isBuiltin ? fnName : undefined, + isBuiltin ? fnArgs : undefined + ); + + error[InstanceValidator.RAW_KEY_NAME] = rawError; + + this.errors.push(error); + } +} +/** + * @define {string} The error key for arguments as passed by custom validators + * @private + */ +InstanceValidator.RAW_KEY_NAME = 'original'; + +module.exports = InstanceValidator; +module.exports.InstanceValidator = InstanceValidator; +module.exports.default = InstanceValidator; diff --git a/node_modules/sequelize/lib/model-manager.js b/node_modules/sequelize/lib/model-manager.js new file mode 100644 index 00000000..383735e5 --- /dev/null +++ b/node_modules/sequelize/lib/model-manager.js @@ -0,0 +1,98 @@ +'use strict'; + +const Toposort = require('toposort-class'); +const _ = require('lodash'); + +class ModelManager { + constructor(sequelize) { + this.models = []; + this.sequelize = sequelize; + } + + addModel(model) { + this.models.push(model); + this.sequelize.models[model.name] = model; + + return model; + } + + removeModel(modelToRemove) { + this.models = this.models.filter(model => model.name !== modelToRemove.name); + + delete this.sequelize.models[modelToRemove.name]; + } + + getModel(against, options) { + options = _.defaults(options || {}, { + attribute: 'name' + }); + + return this.models.find(model => model[options.attribute] === against); + } + + get all() { + return this.models; + } + + /** + * Iterate over Models in an order suitable for e.g. creating tables. + * Will take foreign key constraints into account so that dependencies are visited before dependents. + * + * @param {Function} iterator method to execute on each model + * @param {Object} [options] iterator options + * @private + */ + forEachModel(iterator, options) { + const models = {}; + const sorter = new Toposort(); + let sorted; + let dep; + + options = _.defaults(options || {}, { + reverse: true + }); + + for (const model of this.models) { + let deps = []; + let tableName = model.getTableName(); + + if (_.isObject(tableName)) { + tableName = `${tableName.schema}.${tableName.tableName}`; + } + + models[tableName] = model; + + for (const attrName in model.rawAttributes) { + if (Object.prototype.hasOwnProperty.call(model.rawAttributes, attrName)) { + const attribute = model.rawAttributes[attrName]; + + if (attribute.references) { + dep = attribute.references.model; + + if (_.isObject(dep)) { + dep = `${dep.schema}.${dep.tableName}`; + } + + deps.push(dep); + } + } + } + + deps = deps.filter(dep => tableName !== dep); + + sorter.add(tableName, deps); + } + + sorted = sorter.sort(); + if (options.reverse) { + sorted = sorted.reverse(); + } + for (const name of sorted) { + iterator(models[name], name); + } + } +} + +module.exports = ModelManager; +module.exports.ModelManager = ModelManager; +module.exports.default = ModelManager; diff --git a/node_modules/sequelize/lib/model.js b/node_modules/sequelize/lib/model.js new file mode 100644 index 00000000..d1dd734d --- /dev/null +++ b/node_modules/sequelize/lib/model.js @@ -0,0 +1,4366 @@ +'use strict'; + +const assert = require('assert'); +const _ = require('lodash'); +const Dottie = require('dottie'); + +const Utils = require('./utils'); +const { logger } = require('./utils/logger'); +const BelongsTo = require('./associations/belongs-to'); +const BelongsToMany = require('./associations/belongs-to-many'); +const InstanceValidator = require('./instance-validator'); +const QueryTypes = require('./query-types'); +const sequelizeErrors = require('./errors'); +const Promise = require('./promise'); +const Association = require('./associations/base'); +const HasMany = require('./associations/has-many'); +const DataTypes = require('./data-types'); +const Hooks = require('./hooks'); +const associationsMixin = require('./associations/mixin'); +const Op = require('./operators'); +const { noDoubleNestedGroup } = require('./utils/deprecations'); + + +// This list will quickly become dated, but failing to maintain this list just means +// we won't throw a warning when we should. At least most common cases will forever be covered +// so we stop throwing erroneous warnings when we shouldn't. +const validQueryKeywords = new Set(['where', 'attributes', 'paranoid', 'include', 'order', 'limit', 'offset', + 'transaction', 'lock', 'raw', 'logging', 'benchmark', 'having', 'searchPath', 'rejectOnEmpty', 'plain', + 'scope', 'group', 'through', 'defaults', 'distinct', 'primary', 'exception', 'type', 'hooks', 'force', + 'name']); + +// List of attributes that should not be implicitly passed into subqueries/includes. +const nonCascadingOptions = ['include', 'attributes', 'originalAttributes', 'order', 'where', 'limit', 'offset', 'plain', 'group', 'having']; + +/** + * A Model represents a table in the database. Instances of this class represent a database row. + * + * Model instances operate with the concept of a `dataValues` property, which stores the actual values represented by the instance. + * By default, the values from dataValues can also be accessed directly from the Instance, that is: + * ```js + * instance.field + * // is the same as + * instance.get('field') + * // is the same as + * instance.getDataValue('field') + * ``` + * However, if getters and/or setters are defined for `field` they will be invoked, instead of returning the value from `dataValues`. + * Accessing properties directly or using `get` is preferred for regular use, `getDataValue` should only be used for custom getters. + * + * @see + * {@link Sequelize#define} for more information about getters and setters + * @mixes Hooks + */ +class Model { + static get QueryInterface() { + return this.sequelize.getQueryInterface(); + } + + static get QueryGenerator() { + return this.QueryInterface.QueryGenerator; + } + + /** + * A reference to the sequelize instance + * + * @see + * {@link Sequelize} + * + * @property sequelize + * + * @returns {Sequelize} + */ + get sequelize() { + return this.constructor.sequelize; + } + + /** + * Builds a new model instance. + * + * @param {Object} [values={}] an object of key value pairs + * @param {Object} [options] instance construction options + * @param {boolean} [options.raw=false] If set to true, values will ignore field and virtual setters. + * @param {boolean} [options.isNewRecord=true] Is this a new record + * @param {Array} [options.include] an array of include options - Used to build prefetched/included model instances. See `set` + */ + constructor(values = {}, options = {}) { + options = Object.assign({ + isNewRecord: true, + _schema: this.constructor._schema, + _schemaDelimiter: this.constructor._schemaDelimiter + }, options || {}); + + if (options.attributes) { + options.attributes = options.attributes.map(attribute => Array.isArray(attribute) ? attribute[1] : attribute); + } + + if (!options.includeValidated) { + this.constructor._conformIncludes(options, this.constructor); + if (options.include) { + this.constructor._expandIncludeAll(options); + this.constructor._validateIncludedElements(options); + } + } + + this.dataValues = {}; + this._previousDataValues = {}; + this._changed = {}; + this._modelOptions = this.constructor.options; + this._options = options || {}; + + /** + * Returns true if this instance has not yet been persisted to the database + * @property isNewRecord + * @returns {boolean} + */ + this.isNewRecord = options.isNewRecord; + + this._initValues(values, options); + } + + _initValues(values, options) { + let defaults; + let key; + + values = values && _.clone(values) || {}; + + if (options.isNewRecord) { + defaults = {}; + + if (this.constructor._hasDefaultValues) { + defaults = _.mapValues(this.constructor._defaultValues, valueFn => { + const value = valueFn(); + return value && value instanceof Utils.SequelizeMethod ? value : _.cloneDeep(value); + }); + } + + // set id to null if not passed as value, a newly created dao has no id + // removing this breaks bulkCreate + // do after default values since it might have UUID as a default value + if (this.constructor.primaryKeyAttributes.length) { + this.constructor.primaryKeyAttributes.forEach(primaryKeyAttribute => { + if (!Object.prototype.hasOwnProperty.call(defaults, primaryKeyAttribute)) { + defaults[primaryKeyAttribute] = null; + } + }); + } + + if (this.constructor._timestampAttributes.createdAt && defaults[this.constructor._timestampAttributes.createdAt]) { + this.dataValues[this.constructor._timestampAttributes.createdAt] = Utils.toDefaultValue(defaults[this.constructor._timestampAttributes.createdAt], this.sequelize.options.dialect); + delete defaults[this.constructor._timestampAttributes.createdAt]; + } + + if (this.constructor._timestampAttributes.updatedAt && defaults[this.constructor._timestampAttributes.updatedAt]) { + this.dataValues[this.constructor._timestampAttributes.updatedAt] = Utils.toDefaultValue(defaults[this.constructor._timestampAttributes.updatedAt], this.sequelize.options.dialect); + delete defaults[this.constructor._timestampAttributes.updatedAt]; + } + + if (this.constructor._timestampAttributes.deletedAt && defaults[this.constructor._timestampAttributes.deletedAt]) { + this.dataValues[this.constructor._timestampAttributes.deletedAt] = Utils.toDefaultValue(defaults[this.constructor._timestampAttributes.deletedAt], this.sequelize.options.dialect); + delete defaults[this.constructor._timestampAttributes.deletedAt]; + } + + if (Object.keys(defaults).length) { + for (key in defaults) { + if (values[key] === undefined) { + this.set(key, Utils.toDefaultValue(defaults[key], this.sequelize.options.dialect), { raw: true }); + delete values[key]; + } + } + } + } + + this.set(values, options); + } + + // validateIncludedElements should have been called before this method + static _paranoidClause(model, options = {}) { + // Apply on each include + // This should be handled before handling where conditions because of logic with returns + // otherwise this code will never run on includes of a already conditionable where + if (options.include) { + for (const include of options.include) { + this._paranoidClause(include.model, include); + } + } + + // apply paranoid when groupedLimit is used + if (_.get(options, 'groupedLimit.on.options.paranoid')) { + const throughModel = _.get(options, 'groupedLimit.on.through.model'); + if (throughModel) { + options.groupedLimit.through = this._paranoidClause(throughModel, options.groupedLimit.through); + } + } + + if (!model.options.timestamps || !model.options.paranoid || options.paranoid === false) { + // This model is not paranoid, nothing to do here; + return options; + } + + const deletedAtCol = model._timestampAttributes.deletedAt; + const deletedAtAttribute = model.rawAttributes[deletedAtCol]; + const deletedAtObject = {}; + + let deletedAtDefaultValue = Object.prototype.hasOwnProperty.call(deletedAtAttribute, 'defaultValue') ? deletedAtAttribute.defaultValue : null; + + deletedAtDefaultValue = deletedAtDefaultValue || { + [Op.eq]: null + }; + + deletedAtObject[deletedAtAttribute.field || deletedAtCol] = deletedAtDefaultValue; + + if (Utils.isWhereEmpty(options.where)) { + options.where = deletedAtObject; + } else { + options.where = { [Op.and]: [deletedAtObject, options.where] }; + } + + return options; + } + + static _addDefaultAttributes() { + const tail = {}; + let head = {}; + + // Add id if no primary key was manually added to definition + // Can't use this.primaryKeys here, since this function is called before PKs are identified + if (!_.some(this.rawAttributes, 'primaryKey')) { + if ('id' in this.rawAttributes) { + // Something is fishy here! + throw new Error(`A column called 'id' was added to the attributes of '${this.tableName}' but not marked with 'primaryKey: true'`); + } + + head = { + id: { + type: new DataTypes.INTEGER(), + allowNull: false, + primaryKey: true, + autoIncrement: true, + _autoGenerated: true + } + }; + } + + if (this._timestampAttributes.createdAt) { + tail[this._timestampAttributes.createdAt] = { + type: DataTypes.DATE, + allowNull: false, + _autoGenerated: true + }; + } + + if (this._timestampAttributes.updatedAt) { + tail[this._timestampAttributes.updatedAt] = { + type: DataTypes.DATE, + allowNull: false, + _autoGenerated: true + }; + } + + if (this._timestampAttributes.deletedAt) { + tail[this._timestampAttributes.deletedAt] = { + type: DataTypes.DATE, + _autoGenerated: true + }; + } + + if (this._versionAttribute) { + tail[this._versionAttribute] = { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: 0, + _autoGenerated: true + }; + } + + const existingAttributes = _.clone(this.rawAttributes); + this.rawAttributes = {}; + + _.each(head, (value, attr) => { + this.rawAttributes[attr] = value; + }); + + _.each(existingAttributes, (value, attr) => { + this.rawAttributes[attr] = value; + }); + + _.each(tail, (value, attr) => { + if (this.rawAttributes[attr] === undefined) { + this.rawAttributes[attr] = value; + } + }); + + if (!Object.keys(this.primaryKeys).length) { + this.primaryKeys.id = this.rawAttributes.id; + } + } + + static _findAutoIncrementAttribute() { + this.autoIncrementAttribute = null; + + for (const name in this.rawAttributes) { + if (Object.prototype.hasOwnProperty.call(this.rawAttributes, name)) { + const definition = this.rawAttributes[name]; + if (definition && definition.autoIncrement) { + if (this.autoIncrementAttribute) { + throw new Error('Invalid Instance definition. Only one autoincrement field allowed.'); + } + this.autoIncrementAttribute = name; + } + } + } + } + + static _conformIncludes(options, self) { + if (!options.include) return; + + // if include is not an array, wrap in an array + if (!Array.isArray(options.include)) { + options.include = [options.include]; + } else if (!options.include.length) { + delete options.include; + return; + } + + // convert all included elements to { model: Model } form + options.include = options.include.map(include => this._conformInclude(include, self)); + } + + static _transformStringAssociation(include, self) { + if (self && typeof include === 'string') { + if (!Object.prototype.hasOwnProperty.call(self.associations, include)) { + throw new Error(`Association with alias "${include}" does not exist`); + } + return self.associations[include]; + } + return include; + } + + static _conformInclude(include, self) { + if (include) { + let model; + + if (include._pseudo) return include; + + include = this._transformStringAssociation(include, self); + + if (include instanceof Association) { + if (self && include.target.name === self.name) { + model = include.source; + } else { + model = include.target; + } + + return { model, association: include, as: include.as }; + } + + if (include.prototype && include.prototype instanceof Model) { + return { model: include }; + } + + if (_.isPlainObject(include)) { + if (include.association) { + include.association = this._transformStringAssociation(include.association, self); + + if (self && include.association.target.name === self.name) { + model = include.association.source; + } else { + model = include.association.target; + } + + if (!include.model) include.model = model; + if (!include.as) include.as = include.association.as; + + this._conformIncludes(include, model); + return include; + } + + if (include.model) { + this._conformIncludes(include, include.model); + return include; + } + + if (include.all) { + this._conformIncludes(include); + return include; + } + } + } + + throw new Error('Include unexpected. Element has to be either a Model, an Association or an object.'); + } + + static _expandIncludeAllElement(includes, include) { + // check 'all' attribute provided is valid + let all = include.all; + delete include.all; + + if (all !== true) { + if (!Array.isArray(all)) { + all = [all]; + } + + const validTypes = { + BelongsTo: true, + HasOne: true, + HasMany: true, + One: ['BelongsTo', 'HasOne'], + Has: ['HasOne', 'HasMany'], + Many: ['HasMany'] + }; + + for (let i = 0; i < all.length; i++) { + const type = all[i]; + if (type === 'All') { + all = true; + break; + } + + const types = validTypes[type]; + if (!types) { + throw new sequelizeErrors.EagerLoadingError(`include all '${type}' is not valid - must be BelongsTo, HasOne, HasMany, One, Has, Many or All`); + } + + if (types !== true) { + // replace type placeholder e.g. 'One' with its constituent types e.g. 'HasOne', 'BelongsTo' + all.splice(i, 1); + i--; + for (let j = 0; j < types.length; j++) { + if (!all.includes(types[j])) { + all.unshift(types[j]); + i++; + } + } + } + } + } + + // add all associations of types specified to includes + const nested = include.nested; + if (nested) { + delete include.nested; + + if (!include.include) { + include.include = []; + } else if (!Array.isArray(include.include)) { + include.include = [include.include]; + } + } + + const used = []; + (function addAllIncludes(parent, includes) { + _.forEach(parent.associations, association => { + if (all !== true && !all.includes(association.associationType)) { + return; + } + + // check if model already included, and skip if so + const model = association.target; + const as = association.options.as; + + const predicate = { model }; + if (as) { + // We only add 'as' to the predicate if it actually exists + predicate.as = as; + } + + if (_.some(includes, predicate)) { + return; + } + + // skip if recursing over a model already nested + if (nested && used.includes(model)) { + return; + } + used.push(parent); + + // include this model + const thisInclude = Utils.cloneDeep(include); + thisInclude.model = model; + if (as) { + thisInclude.as = as; + } + includes.push(thisInclude); + + // run recursively if nested + if (nested) { + addAllIncludes(model, thisInclude.include); + if (thisInclude.include.length === 0) delete thisInclude.include; + } + }); + used.pop(); + })(this, includes); + } + + static _validateIncludedElements(options, tableNames) { + if (!options.model) options.model = this; + + tableNames = tableNames || {}; + options.includeNames = []; + options.includeMap = {}; + + /* Legacy */ + options.hasSingleAssociation = false; + options.hasMultiAssociation = false; + + if (!options.parent) { + options.topModel = options.model; + options.topLimit = options.limit; + } + + options.include = options.include.map(include => { + include = this._conformInclude(include); + include.parent = options; + include.topLimit = options.topLimit; + + this._validateIncludedElement.call(options.model, include, tableNames, options); + + if (include.duplicating === undefined) { + include.duplicating = include.association.isMultiAssociation; + } + + include.hasDuplicating = include.hasDuplicating || include.duplicating; + include.hasRequired = include.hasRequired || include.required; + + options.hasDuplicating = options.hasDuplicating || include.hasDuplicating; + options.hasRequired = options.hasRequired || include.required; + + options.hasWhere = options.hasWhere || include.hasWhere || !!include.where; + return include; + }); + + for (const include of options.include) { + include.hasParentWhere = options.hasParentWhere || !!options.where; + include.hasParentRequired = options.hasParentRequired || !!options.required; + + if (include.subQuery !== false && options.hasDuplicating && options.topLimit) { + if (include.duplicating) { + include.subQuery = false; + include.subQueryFilter = include.hasRequired; + } else { + include.subQuery = include.hasRequired; + include.subQueryFilter = false; + } + } else { + include.subQuery = include.subQuery || false; + if (include.duplicating) { + include.subQueryFilter = include.subQuery; + include.subQuery = false; + } else { + include.subQueryFilter = false; + include.subQuery = include.subQuery || include.hasParentRequired && include.hasRequired; + } + } + + options.includeMap[include.as] = include; + options.includeNames.push(include.as); + + // Set top level options + if (options.topModel === options.model && options.subQuery === undefined && options.topLimit) { + if (include.subQuery) { + options.subQuery = include.subQuery; + } else if (include.hasDuplicating) { + options.subQuery = true; + } + } + + /* Legacy */ + options.hasIncludeWhere = options.hasIncludeWhere || include.hasIncludeWhere || !!include.where; + options.hasIncludeRequired = options.hasIncludeRequired || include.hasIncludeRequired || !!include.required; + + if (include.association.isMultiAssociation || include.hasMultiAssociation) { + options.hasMultiAssociation = true; + } + if (include.association.isSingleAssociation || include.hasSingleAssociation) { + options.hasSingleAssociation = true; + } + } + + if (options.topModel === options.model && options.subQuery === undefined) { + options.subQuery = false; + } + return options; + } + + static _validateIncludedElement(include, tableNames, options) { + tableNames[include.model.getTableName()] = true; + + if (include.attributes && !options.raw) { + include.model._expandAttributes(include); + + include.originalAttributes = this._injectDependentVirtualAttributes(include.attributes); + + include = Utils.mapFinderOptions(include, include.model); + + if (include.attributes.length) { + _.each(include.model.primaryKeys, (attr, key) => { + // Include the primary key if it's not already included - take into account that the pk might be aliased (due to a .field prop) + if (!include.attributes.some(includeAttr => { + if (attr.field !== key) { + return Array.isArray(includeAttr) && includeAttr[0] === attr.field && includeAttr[1] === key; + } + return includeAttr === key; + })) { + include.attributes.unshift(key); + } + }); + } + } else { + include = Utils.mapFinderOptions(include, include.model); + } + + // pseudo include just needed the attribute logic, return + if (include._pseudo) { + include.attributes = Object.keys(include.model.tableAttributes); + return Utils.mapFinderOptions(include, include.model); + } + + // check if the current Model is actually associated with the passed Model - or it's a pseudo include + const association = include.association || this._getIncludedAssociation(include.model, include.as); + + include.association = association; + include.as = association.as; + + // If through, we create a pseudo child include, to ease our parsing later on + if (include.association.through && Object(include.association.through.model) === include.association.through.model) { + if (!include.include) include.include = []; + const through = include.association.through; + + include.through = _.defaults(include.through || {}, { + model: through.model, + as: through.model.name, + association: { + isSingleAssociation: true + }, + _pseudo: true, + parent: include + }); + + + if (through.scope) { + include.through.where = include.through.where ? { [Op.and]: [include.through.where, through.scope] } : through.scope; + } + + include.include.push(include.through); + tableNames[through.tableName] = true; + } + + // include.model may be the main model, while the association target may be scoped - thus we need to look at association.target/source + let model; + if (include.model.scoped === true) { + // If the passed model is already scoped, keep that + model = include.model; + } else { + // Otherwise use the model that was originally passed to the association + model = include.association.target.name === include.model.name ? include.association.target : include.association.source; + } + + model._injectScope(include); + + // This check should happen after injecting the scope, since the scope may contain a .attributes + if (!include.attributes) { + include.attributes = Object.keys(include.model.tableAttributes); + } + + include = Utils.mapFinderOptions(include, include.model); + + if (include.required === undefined) { + include.required = !!include.where; + } + + if (include.association.scope) { + include.where = include.where ? { [Op.and]: [include.where, include.association.scope] }: include.association.scope; + } + + if (include.limit && include.separate === undefined) { + include.separate = true; + } + + if (include.separate === true) { + if (!(include.association instanceof HasMany)) { + throw new Error('Only HasMany associations support include.separate'); + } + + include.duplicating = false; + + if ( + options.attributes + && options.attributes.length + && !_.flattenDepth(options.attributes, 2).includes(association.sourceKey) + ) { + options.attributes.push(association.sourceKey); + } + + if ( + include.attributes + && include.attributes.length + && !_.flattenDepth(include.attributes, 2).includes(association.foreignKey) + ) { + include.attributes.push(association.foreignKey); + } + } + + // Validate child includes + if (Object.prototype.hasOwnProperty.call(include, 'include')) { + this._validateIncludedElements.call(include.model, include, tableNames); + } + + return include; + } + + static _getIncludedAssociation(targetModel, targetAlias) { + const associations = this.getAssociations(targetModel); + let association = null; + if (associations.length === 0) { + throw new sequelizeErrors.EagerLoadingError(`${targetModel.name} is not associated to ${this.name}!`); + } + if (associations.length === 1) { + association = this.getAssociationForAlias(targetModel, targetAlias); + if (association) { + return association; + } + if (targetAlias) { + const existingAliases = this.getAssociations(targetModel).map(association => association.as); + throw new sequelizeErrors.EagerLoadingError(`${targetModel.name} is associated to ${this.name} using an alias. ` + + `You've included an alias (${targetAlias}), but it does not match the alias(es) defined in your association (${existingAliases.join(', ')}).`); + } + throw new sequelizeErrors.EagerLoadingError(`${targetModel.name} is associated to ${this.name} using an alias. ` + + 'You must use the \'as\' keyword to specify the alias within your include statement.'); + } + association = this.getAssociationForAlias(targetModel, targetAlias); + if (!association) { + throw new sequelizeErrors.EagerLoadingError(`${targetModel.name} is associated to ${this.name} multiple times. ` + + 'To identify the correct association, you must use the \'as\' keyword to specify the alias of the association you want to include.'); + } + return association; + } + + + static _expandIncludeAll(options) { + const includes = options.include; + if (!includes) { + return; + } + + for (let index = 0; index < includes.length; index++) { + const include = includes[index]; + + if (include.all) { + includes.splice(index, 1); + index--; + + this._expandIncludeAllElement(includes, include); + } + } + + includes.forEach(include => { + this._expandIncludeAll.call(include.model, include); + }); + } + + static _conformIndex(index) { + if (!index.fields) { + throw new Error('Missing "fields" property for index definition'); + } + + index = _.defaults(index, { + type: '', + parser: null + }); + + if (index.type && index.type.toLowerCase() === 'unique') { + index.unique = true; + delete index.type; + } + + return index; + } + + + static _uniqIncludes(options) { + if (!options.include) return; + + options.include = _(options.include) + .groupBy(include => `${include.model && include.model.name}-${include.as}`) + .map(includes => this._assignOptions(...includes)) + .value(); + } + + static _baseMerge(...args) { + _.assignWith(...args); + this._conformIncludes(args[0], this); + this._uniqIncludes(args[0]); + return args[0]; + } + + static _mergeFunction(objValue, srcValue, key) { + if (Array.isArray(objValue) && Array.isArray(srcValue)) { + return _.union(objValue, srcValue); + } + if (key === 'where' || key === 'having') { + if (srcValue instanceof Utils.SequelizeMethod) { + srcValue = { [Op.and]: srcValue }; + } + if (_.isPlainObject(objValue) && _.isPlainObject(srcValue)) { + return Object.assign(objValue, srcValue); + } + } else if (key === 'attributes' && _.isPlainObject(objValue) && _.isPlainObject(srcValue)) { + return _.assignWith(objValue, srcValue, (objValue, srcValue) => { + if (Array.isArray(objValue) && Array.isArray(srcValue)) { + return _.union(objValue, srcValue); + } + }); + } + // If we have a possible object/array to clone, we try it. + // Otherwise, we return the original value when it's not undefined, + // or the resulting object in that case. + if (srcValue) { + return Utils.cloneDeep(srcValue, true); + } + return srcValue === undefined ? objValue : srcValue; + } + + static _assignOptions(...args) { + return this._baseMerge(...args, this._mergeFunction); + } + + static _defaultsOptions(target, opts) { + return this._baseMerge(target, opts, (srcValue, objValue, key) => { + return this._mergeFunction(objValue, srcValue, key); + }); + } + + /** + * Initialize a model, representing a table in the DB, with attributes and options. + * + * The table columns are defined by the hash that is given as the first argument. + * Each attribute of the hash represents a column. + * + * For more about Validations + * + * More examples, Model Definition + * + * @example + * Project.init({ + * columnA: { + * type: Sequelize.BOOLEAN, + * validate: { + * is: ['[a-z]','i'], // will only allow letters + * max: 23, // only allow values <= 23 + * isIn: { + * args: [['en', 'zh']], + * msg: "Must be English or Chinese" + * } + * }, + * field: 'column_a' + * // Other attributes here + * }, + * columnB: Sequelize.STRING, + * columnC: 'MY VERY OWN COLUMN TYPE' + * }, {sequelize}) + * + * sequelize.models.modelName // The model will now be available in models under the class name + * + * @see + * {@link DataTypes} + * @see + * {@link Hooks} + * + * @param {Object} attributes An object, where each attribute is a column of the table. Each column can be either a DataType, a string or a type-description object, with the properties described below: + * @param {string|DataTypes|Object} attributes.column The description of a database column + * @param {string|DataTypes} attributes.column.type A string or a data type + * @param {boolean} [attributes.column.allowNull=true] If false, the column will have a NOT NULL constraint, and a not null validation will be run before an instance is saved. + * @param {any} [attributes.column.defaultValue=null] A literal default value, a JavaScript function, or an SQL function (see `sequelize.fn`) + * @param {string|boolean} [attributes.column.unique=false] If true, the column will get a unique constraint. If a string is provided, the column will be part of a composite unique index. If multiple columns have the same string, they will be part of the same unique index + * @param {boolean} [attributes.column.primaryKey=false] If true, this attribute will be marked as primary key + * @param {string} [attributes.column.field=null] If set, sequelize will map the attribute name to a different name in the database + * @param {boolean} [attributes.column.autoIncrement=false] If true, this column will be set to auto increment + * @param {string} [attributes.column.comment=null] Comment for this column + * @param {string|Model} [attributes.column.references=null] An object with reference configurations + * @param {string|Model} [attributes.column.references.model] If this column references another table, provide it here as a Model, or a string + * @param {string} [attributes.column.references.key='id'] The column of the foreign table that this column references + * @param {string} [attributes.column.onUpdate] What should happen when the referenced key is updated. One of CASCADE, RESTRICT, SET DEFAULT, SET NULL or NO ACTION + * @param {string} [attributes.column.onDelete] What should happen when the referenced key is deleted. One of CASCADE, RESTRICT, SET DEFAULT, SET NULL or NO ACTION + * @param {Function} [attributes.column.get] Provide a custom getter for this column. Use `this.getDataValue(String)` to manipulate the underlying values. + * @param {Function} [attributes.column.set] Provide a custom setter for this column. Use `this.setDataValue(String, Value)` to manipulate the underlying values. + * @param {Object} [attributes.column.validate] An object of validations to execute for this column every time the model is saved. Can be either the name of a validation provided by validator.js, a validation function provided by extending validator.js (see the `DAOValidator` property for more details), or a custom validation function. Custom validation functions are called with the value of the field and the instance itself as the `this` binding, and can possibly take a second callback argument, to signal that they are asynchronous. If the validator is sync, it should throw in the case of a failed validation; if it is async, the callback should be called with the error text. + * @param {Object} options These options are merged with the default define options provided to the Sequelize constructor + * @param {Object} options.sequelize Define the sequelize instance to attach to the new Model. Throw error if none is provided. + * @param {string} [options.modelName] Set name of the model. By default its same as Class name. + * @param {Object} [options.defaultScope={}] Define the default search scope to use for this model. Scopes have the same form as the options passed to find / findAll + * @param {Object} [options.scopes] More scopes, defined in the same way as defaultScope above. See `Model.scope` for more information about how scopes are defined, and what you can do with them + * @param {boolean} [options.omitNull] Don't persist null values. This means that all columns with null values will not be saved + * @param {boolean} [options.timestamps=true] Adds createdAt and updatedAt timestamps to the model. + * @param {boolean} [options.paranoid=false] Calling `destroy` will not delete the model, but instead set a `deletedAt` timestamp if this is true. Needs `timestamps=true` to work + * @param {boolean} [options.underscored=false] Add underscored field to all attributes, this covers user defined attributes, timestamps and foreign keys. Will not affect attributes with explicitly set `field` option + * @param {boolean} [options.freezeTableName=false] If freezeTableName is true, sequelize will not try to alter the model name to get the table name. Otherwise, the model name will be pluralized + * @param {Object} [options.name] An object with two attributes, `singular` and `plural`, which are used when this model is associated to others. + * @param {string} [options.name.singular=Utils.singularize(modelName)] Singular name for model + * @param {string} [options.name.plural=Utils.pluralize(modelName)] Plural name for model + * @param {Array} [options.indexes] indexes definitions + * @param {string} [options.indexes[].name] The name of the index. Defaults to model name + _ + fields concatenated + * @param {string} [options.indexes[].type] Index type. Only used by mysql. One of `UNIQUE`, `FULLTEXT` and `SPATIAL` + * @param {string} [options.indexes[].using] The method to create the index by (`USING` statement in SQL). BTREE and HASH are supported by mysql and postgres, and postgres additionally supports GIST and GIN. + * @param {string} [options.indexes[].operator] Specify index operator. + * @param {boolean} [options.indexes[].unique=false] Should the index by unique? Can also be triggered by setting type to `UNIQUE` + * @param {boolean} [options.indexes[].concurrently=false] PostgresSQL will build the index without taking any write locks. Postgres only + * @param {Array} [options.indexes[].fields] An array of the fields to index. Each field can either be a string containing the name of the field, a sequelize object (e.g `sequelize.fn`), or an object with the following attributes: `attribute` (field name), `length` (create a prefix index of length chars), `order` (the direction the column should be sorted in), `collate` (the collation (sort order) for the column) + * @param {string|boolean} [options.createdAt] Override the name of the createdAt attribute if a string is provided, or disable it if false. Timestamps must be true. Underscored field will be set with underscored setting. + * @param {string|boolean} [options.updatedAt] Override the name of the updatedAt attribute if a string is provided, or disable it if false. Timestamps must be true. Underscored field will be set with underscored setting. + * @param {string|boolean} [options.deletedAt] Override the name of the deletedAt attribute if a string is provided, or disable it if false. Timestamps must be true. Underscored field will be set with underscored setting. + * @param {string} [options.tableName] Defaults to pluralized model name, unless freezeTableName is true, in which case it uses model name verbatim + * @param {string} [options.schema='public'] schema + * @param {string} [options.engine] Specify engine for model's table + * @param {string} [options.charset] Specify charset for model's table + * @param {string} [options.comment] Specify comment for model's table + * @param {string} [options.collate] Specify collation for model's table + * @param {string} [options.initialAutoIncrement] Set the initial AUTO_INCREMENT value for the table in MySQL. + * @param {Object} [options.hooks] An object of hook function that are called before and after certain lifecycle events. The possible hooks are: beforeValidate, afterValidate, validationFailed, beforeBulkCreate, beforeBulkDestroy, beforeBulkUpdate, beforeCreate, beforeDestroy, beforeUpdate, afterCreate, beforeSave, afterDestroy, afterUpdate, afterBulkCreate, afterSave, afterBulkDestroy and afterBulkUpdate. See Hooks for more information about hook functions and their signatures. Each property can either be a function, or an array of functions. + * @param {Object} [options.validate] An object of model wide validations. Validations have access to all model values via `this`. If the validator function takes an argument, it is assumed to be async, and is called with a callback that accepts an optional error. + * + * @returns {Model} + */ + static init(attributes, options = {}) { + if (!options.sequelize) { + throw new Error('No Sequelize instance passed'); + } + + this.sequelize = options.sequelize; + + const globalOptions = this.sequelize.options; + + options = Utils.merge(_.cloneDeep(globalOptions.define), options); + + if (!options.modelName) { + options.modelName = this.name; + } + + options = Utils.merge({ + name: { + plural: Utils.pluralize(options.modelName), + singular: Utils.singularize(options.modelName) + }, + indexes: [], + omitNull: globalOptions.omitNull, + schema: globalOptions.schema + }, options); + + this.sequelize.runHooks('beforeDefine', attributes, options); + + if (options.modelName !== this.name) { + Object.defineProperty(this, 'name', { value: options.modelName }); + } + delete options.modelName; + + this.options = Object.assign({ + timestamps: true, + validate: {}, + freezeTableName: false, + underscored: false, + paranoid: false, + rejectOnEmpty: false, + whereCollection: null, + schema: null, + schemaDelimiter: '', + defaultScope: {}, + scopes: {}, + indexes: [] + }, options); + + // if you call "define" multiple times for the same modelName, do not clutter the factory + if (this.sequelize.isDefined(this.name)) { + this.sequelize.modelManager.removeModel(this.sequelize.modelManager.getModel(this.name)); + } + + this.associations = {}; + this._setupHooks(options.hooks); + + this.underscored = this.options.underscored; + + if (!this.options.tableName) { + this.tableName = this.options.freezeTableName ? this.name : Utils.underscoredIf(Utils.pluralize(this.name), this.underscored); + } else { + this.tableName = this.options.tableName; + } + + this._schema = this.options.schema; + this._schemaDelimiter = this.options.schemaDelimiter; + + // error check options + _.each(options.validate, (validator, validatorType) => { + if (Object.prototype.hasOwnProperty.call(attributes, validatorType)) { + throw new Error(`A model validator function must not have the same name as a field. Model: ${this.name}, field/validation name: ${validatorType}`); + } + + if (typeof validator !== 'function') { + throw new Error(`Members of the validate option must be functions. Model: ${this.name}, error with validate member ${validatorType}`); + } + }); + + this.rawAttributes = _.mapValues(attributes, (attribute, name) => { + attribute = this.sequelize.normalizeAttribute(attribute); + + if (attribute.type === undefined) { + throw new Error(`Unrecognized datatype for attribute "${this.name}.${name}"`); + } + + if (attribute.allowNull !== false && _.get(attribute, 'validate.notNull')) { + throw new Error(`Invalid definition for "${this.name}.${name}", "notNull" validator is only allowed with "allowNull:false"`); + } + + if (_.get(attribute, 'references.model.prototype') instanceof Model) { + attribute.references.model = attribute.references.model.getTableName(); + } + + return attribute; + }); + + const tableName = this.getTableName(); + this._indexes = this.options.indexes + .map(index => Utils.nameIndex(this._conformIndex(index), tableName)); + + this.primaryKeys = {}; + this._readOnlyAttributes = new Set(); + this._timestampAttributes = {}; + + // setup names of timestamp attributes + if (this.options.timestamps) { + if (this.options.createdAt !== false) { + this._timestampAttributes.createdAt = this.options.createdAt || 'createdAt'; + this._readOnlyAttributes.add(this._timestampAttributes.createdAt); + } + if (this.options.updatedAt !== false) { + this._timestampAttributes.updatedAt = this.options.updatedAt || 'updatedAt'; + this._readOnlyAttributes.add(this._timestampAttributes.updatedAt); + } + if (this.options.paranoid && this.options.deletedAt !== false) { + this._timestampAttributes.deletedAt = this.options.deletedAt || 'deletedAt'; + this._readOnlyAttributes.add(this._timestampAttributes.deletedAt); + } + } + + // setup name for version attribute + if (this.options.version) { + this._versionAttribute = typeof this.options.version === 'string' ? this.options.version : 'version'; + this._readOnlyAttributes.add(this._versionAttribute); + } + + this._hasReadOnlyAttributes = this._readOnlyAttributes.size > 0; + + // Add head and tail default attributes (id, timestamps) + this._addDefaultAttributes(); + this.refreshAttributes(); + this._findAutoIncrementAttribute(); + + this._scope = this.options.defaultScope; + this._scopeNames = ['defaultScope']; + + this.sequelize.modelManager.addModel(this); + this.sequelize.runHooks('afterDefine', this); + + return this; + } + + static refreshAttributes() { + const attributeManipulation = {}; + + this.prototype._customGetters = {}; + this.prototype._customSetters = {}; + + ['get', 'set'].forEach(type => { + const opt = `${type}terMethods`; + const funcs = _.clone(_.isObject(this.options[opt]) ? this.options[opt] : {}); + const _custom = type === 'get' ? this.prototype._customGetters : this.prototype._customSetters; + + _.each(funcs, (method, attribute) => { + _custom[attribute] = method; + + if (type === 'get') { + funcs[attribute] = function() { + return this.get(attribute); + }; + } + if (type === 'set') { + funcs[attribute] = function(value) { + return this.set(attribute, value); + }; + } + }); + + _.each(this.rawAttributes, (options, attribute) => { + if (Object.prototype.hasOwnProperty.call(options, type)) { + _custom[attribute] = options[type]; + } + + if (type === 'get') { + funcs[attribute] = function() { + return this.get(attribute); + }; + } + if (type === 'set') { + funcs[attribute] = function(value) { + return this.set(attribute, value); + }; + } + }); + + _.each(funcs, (fct, name) => { + if (!attributeManipulation[name]) { + attributeManipulation[name] = { + configurable: true + }; + } + attributeManipulation[name][type] = fct; + }); + }); + + this._dataTypeChanges = {}; + this._dataTypeSanitizers = {}; + + this._hasBooleanAttributes = false; + this._hasDateAttributes = false; + this._jsonAttributes = new Set(); + this._virtualAttributes = new Set(); + this._defaultValues = {}; + this.prototype.validators = {}; + + this.fieldRawAttributesMap = {}; + + this.primaryKeys = {}; + this.uniqueKeys = {}; + + _.each(this.rawAttributes, (definition, name) => { + definition.type = this.sequelize.normalizeDataType(definition.type); + + definition.Model = this; + definition.fieldName = name; + definition._modelAttribute = true; + + if (definition.field === undefined) { + definition.field = Utils.underscoredIf(name, this.underscored); + } + + if (definition.primaryKey === true) { + this.primaryKeys[name] = definition; + } + + this.fieldRawAttributesMap[definition.field] = definition; + + if (definition.type._sanitize) { + this._dataTypeSanitizers[name] = definition.type._sanitize; + } + + if (definition.type._isChanged) { + this._dataTypeChanges[name] = definition.type._isChanged; + } + + if (definition.type instanceof DataTypes.BOOLEAN) { + this._hasBooleanAttributes = true; + } else if (definition.type instanceof DataTypes.DATE || definition.type instanceof DataTypes.DATEONLY) { + this._hasDateAttributes = true; + } else if (definition.type instanceof DataTypes.JSON) { + this._jsonAttributes.add(name); + } else if (definition.type instanceof DataTypes.VIRTUAL) { + this._virtualAttributes.add(name); + } + + if (Object.prototype.hasOwnProperty.call(definition, 'defaultValue')) { + this._defaultValues[name] = () => Utils.toDefaultValue(definition.defaultValue, this.sequelize.options.dialect); + } + + if (Object.prototype.hasOwnProperty.call(definition, 'unique') && definition.unique) { + let idxName; + if ( + typeof definition.unique === 'object' && + Object.prototype.hasOwnProperty.call(definition.unique, 'name') + ) { + idxName = definition.unique.name; + } else if (typeof definition.unique === 'string') { + idxName = definition.unique; + } else { + idxName = `${this.tableName}_${name}_unique`; + } + + const idx = this.uniqueKeys[idxName] || { fields: [] }; + + idx.fields.push(definition.field); + idx.msg = idx.msg || definition.unique.msg || null; + idx.name = idxName || false; + idx.column = name; + idx.customIndex = definition.unique !== true; + + this.uniqueKeys[idxName] = idx; + } + + if (Object.prototype.hasOwnProperty.call(definition, 'validate')) { + this.prototype.validators[name] = definition.validate; + } + + if (definition.index === true && definition.type instanceof DataTypes.JSONB) { + this._indexes.push( + Utils.nameIndex( + this._conformIndex({ + fields: [definition.field || name], + using: 'gin' + }), + this.getTableName() + ) + ); + + delete definition.index; + } + }); + + // Create a map of field to attribute names + this.fieldAttributeMap = _.reduce(this.fieldRawAttributesMap, (map, value, key) => { + if (key !== value.fieldName) { + map[key] = value.fieldName; + } + return map; + }, {}); + + this._hasJsonAttributes = !!this._jsonAttributes.size; + + this._hasVirtualAttributes = !!this._virtualAttributes.size; + + this._hasDefaultValues = !_.isEmpty(this._defaultValues); + + this.tableAttributes = _.omitBy(this.rawAttributes, (_a, key) => this._virtualAttributes.has(key)); + + this.prototype._hasCustomGetters = Object.keys(this.prototype._customGetters).length; + this.prototype._hasCustomSetters = Object.keys(this.prototype._customSetters).length; + + for (const key of Object.keys(attributeManipulation)) { + if (Object.prototype.hasOwnProperty.call(Model.prototype, key)) { + this.sequelize.log(`Not overriding built-in method from model attribute: ${key}`); + continue; + } + Object.defineProperty(this.prototype, key, attributeManipulation[key]); + } + + this.prototype.rawAttributes = this.rawAttributes; + this.prototype._isAttribute = key => Object.prototype.hasOwnProperty.call(this.prototype.rawAttributes, key); + + // Primary key convenience constiables + this.primaryKeyAttributes = Object.keys(this.primaryKeys); + this.primaryKeyAttribute = this.primaryKeyAttributes[0]; + if (this.primaryKeyAttribute) { + this.primaryKeyField = this.rawAttributes[this.primaryKeyAttribute].field || this.primaryKeyAttribute; + } + + this._hasPrimaryKeys = this.primaryKeyAttributes.length > 0; + this._isPrimaryKey = key => this.primaryKeyAttributes.includes(key); + } + + /** + * Remove attribute from model definition + * + * @param {string} attribute name of attribute to remove + */ + static removeAttribute(attribute) { + delete this.rawAttributes[attribute]; + this.refreshAttributes(); + } + + /** + * Sync this Model to the DB, that is create the table. + * + * @param {Object} [options] sync options + * + * @see + * {@link Sequelize#sync} for options + * + * @returns {Promise} + */ + static sync(options) { + options = Object.assign({}, this.options, options); + options.hooks = options.hooks === undefined ? true : !!options.hooks; + + const attributes = this.tableAttributes; + const rawAttributes = this.fieldRawAttributesMap; + + return Promise.try(() => { + if (options.hooks) { + return this.runHooks('beforeSync', options); + } + }).then(() => { + if (options.force) { + return this.drop(options); + } + }) + .then(() => this.QueryInterface.createTable(this.getTableName(options), attributes, options, this)) + .then(() => { + if (!options.alter) { + return; + } + return Promise.all([ + this.QueryInterface.describeTable(this.getTableName(options)), + this.QueryInterface.getForeignKeyReferencesForTable(this.getTableName(options)) + ]) + .then(tableInfos => { + const columns = tableInfos[0]; + // Use for alter foreign keys + const foreignKeyReferences = tableInfos[1]; + + const changes = []; // array of promises to run + const removedConstraints = {}; + + _.each(attributes, (columnDesc, columnName) => { + if (!columns[columnName] && !columns[attributes[columnName].field]) { + changes.push(() => this.QueryInterface.addColumn(this.getTableName(options), attributes[columnName].field || columnName, attributes[columnName])); + } + }); + _.each(columns, (columnDesc, columnName) => { + const currentAttribute = rawAttributes[columnName]; + if (!currentAttribute) { + changes.push(() => this.QueryInterface.removeColumn(this.getTableName(options), columnName, options)); + } else if (!currentAttribute.primaryKey) { + // Check foreign keys. If it's a foreign key, it should remove constraint first. + const references = currentAttribute.references; + if (currentAttribute.references) { + const database = this.sequelize.config.database; + const schema = this.sequelize.config.schema; + // Find existed foreign keys + _.each(foreignKeyReferences, foreignKeyReference => { + const constraintName = foreignKeyReference.constraintName; + if (!!constraintName + && foreignKeyReference.tableCatalog === database + && (schema ? foreignKeyReference.tableSchema === schema : true) + && foreignKeyReference.referencedTableName === references.model + && foreignKeyReference.referencedColumnName === references.key + && (schema ? foreignKeyReference.referencedTableSchema === schema : true) + && !removedConstraints[constraintName]) { + // Remove constraint on foreign keys. + changes.push(() => this.QueryInterface.removeConstraint(this.getTableName(options), constraintName, options)); + removedConstraints[constraintName] = true; + } + }); + } + changes.push(() => this.QueryInterface.changeColumn(this.getTableName(options), columnName, currentAttribute)); + } + }); + return Promise.each(changes, f => f()); + }); + }) + .then(() => this.QueryInterface.showIndex(this.getTableName(options), options)) + .then(indexes => { + indexes = this._indexes.filter(item1 => + !indexes.some(item2 => item1.name === item2.name) + ).sort((index1, index2) => { + if (this.sequelize.options.dialect === 'postgres') { + // move concurrent indexes to the bottom to avoid weird deadlocks + if (index1.concurrently === true) return 1; + if (index2.concurrently === true) return -1; + } + + return 0; + }); + + return Promise.each(indexes, index => this.QueryInterface.addIndex( + this.getTableName(options), + Object.assign({ + logging: options.logging, + benchmark: options.benchmark, + transaction: options.transaction + }, index), + this.tableName + )); + }).then(() => { + if (options.hooks) { + return this.runHooks('afterSync', options); + } + }).return(this); + } + + /** + * Drop the table represented by this Model + * + * @param {Object} [options] drop options + * @param {boolean} [options.cascade=false] Also drop all objects depending on this table, such as views. Only works in postgres + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging). + * + * @returns {Promise} + */ + static drop(options) { + return this.QueryInterface.dropTable(this.getTableName(options), options); + } + + static dropSchema(schema) { + return this.QueryInterface.dropSchema(schema); + } + + /** + * Apply a schema to this model. For postgres, this will actually place the schema in front of the table name - `"schema"."tableName"`, + * while the schema will be prepended to the table name for mysql and sqlite - `'schema.tablename'`. + * + * This method is intended for use cases where the same model is needed in multiple schemas. In such a use case it is important + * to call `model.schema(schema, [options]).sync()` for each model to ensure the models are created in the correct schema. + * + * If a single default schema per model is needed, set the `options.schema='schema'` parameter during the `define()` call + * for the model. + * + * @param {string} schema The name of the schema + * @param {Object} [options] schema options + * @param {string} [options.schemaDelimiter='.'] The character(s) that separates the schema name from the table name + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging). + * + * @see + * {@link Sequelize#define} for more information about setting a default schema. + * + * @returns {Model} + */ + static schema(schema, options) { + + const clone = class extends this {}; + Object.defineProperty(clone, 'name', { value: this.name }); + + clone._schema = schema; + + if (options) { + if (typeof options === 'string') { + clone._schemaDelimiter = options; + } else if (options.schemaDelimiter) { + clone._schemaDelimiter = options.schemaDelimiter; + } + } + + return clone; + } + + /** + * Get the table name of the model, taking schema into account. The method will return The name as a string if the model has no schema, + * or an object with `tableName`, `schema` and `delimiter` properties. + * + * @returns {string|Object} + */ + static getTableName() { + return this.QueryGenerator.addSchema(this); + } + + /** + * Get un-scoped model + * + * @returns {Model} + */ + static unscoped() { + return this.scope(); + } + + /** + * Add a new scope to the model. This is especially useful for adding scopes with includes, when the model you want to include is not available at the time this model is defined. + * + * By default this will throw an error if a scope with that name already exists. Pass `override: true` in the options object to silence this error. + * + * @param {string} name The name of the scope. Use `defaultScope` to override the default scope + * @param {Object|Function} scope scope or options + * @param {Object} [options] scope options + * @param {boolean} [options.override=false] override old scope if already defined + */ + static addScope(name, scope, options) { + options = Object.assign({ + override: false + }, options); + + if ((name === 'defaultScope' && Object.keys(this.options.defaultScope).length > 0 || name in this.options.scopes) && options.override === false) { + throw new Error(`The scope ${name} already exists. Pass { override: true } as options to silence this error`); + } + + if (name === 'defaultScope') { + this.options.defaultScope = this._scope = scope; + } else { + this.options.scopes[name] = scope; + } + } + + /** + * Apply a scope created in `define` to the model. + * + * @example + * const Model = sequelize.define('model', attributes, { + * defaultScope: { + * where: { + * username: 'dan' + * }, + * limit: 12 + * }, + * scopes: { + * isALie: { + * where: { + * stuff: 'cake' + * } + * }, + * complexFunction: function(email, accessLevel) { + * return { + * where: { + * email: { + * [Op.like]: email + * }, + * access_level { + * [Op.gte]: accessLevel + * } + * } + * } + * } + * } + * }) + * + * # As you have defined a default scope, every time you do Model.find, the default scope is appended to your query. Here's a couple of examples: + * + * Model.findAll() // WHERE username = 'dan' + * Model.findAll({ where: { age: { [Op.gt]: 12 } } }) // WHERE age > 12 AND username = 'dan' + * + * @example + * Model.scope({ method: ['complexFunction', 'dan@sequelize.com', 42]}).findAll() + * // WHERE email like 'dan@sequelize.com%' AND access_level >= 42 + * + * @param {?Array|Object|string} [option] The scope(s) to apply. Scopes can either be passed as consecutive arguments, or as an array of arguments. To apply simple scopes and scope functions with no arguments, pass them as strings. For scope function, pass an object, with a `method` property. The value can either be a string, if the method does not take any arguments, or an array, where the first element is the name of the method, and consecutive elements are arguments to that method. Pass null to remove all scopes, including the default. + * + * @returns {Model} A reference to the model, with the scope(s) applied. Calling scope again on the returned model will clear the previous scope. + */ + static scope(option) { + const self = class extends this {}; + let scope; + let scopeName; + + Object.defineProperty(self, 'name', { value: this.name }); + + self._scope = {}; + self._scopeNames = []; + self.scoped = true; + + if (!option) { + return self; + } + + const options = _.flatten(arguments); + + for (const option of options) { + scope = null; + scopeName = null; + + if (_.isPlainObject(option)) { + if (option.method) { + if (Array.isArray(option.method) && !!self.options.scopes[option.method[0]]) { + scopeName = option.method[0]; + scope = self.options.scopes[scopeName].apply(self, option.method.slice(1)); + } + else if (self.options.scopes[option.method]) { + scopeName = option.method; + scope = self.options.scopes[scopeName].apply(self); + } + } else { + scope = option; + } + } else if (option === 'defaultScope' && _.isPlainObject(self.options.defaultScope)) { + scope = self.options.defaultScope; + } else { + scopeName = option; + scope = self.options.scopes[scopeName]; + if (typeof scope === 'function') { + scope = scope(); + } + } + + if (scope) { + this._conformIncludes(scope, this); + this._assignOptions(self._scope, scope); + self._scopeNames.push(scopeName ? scopeName : 'defaultScope'); + } else { + throw new sequelizeErrors.SequelizeScopeError(`Invalid scope ${scopeName} called.`); + } + } + + return self; + } + + /** + * Search for multiple instances. + * + * @example + * Model.findAll({ + * where: { + * attr1: 42, + * attr2: 'cake' + * } + * }) + * + * # WHERE attr1 = 42 AND attr2 = 'cake' + * + * @example + * const {gt, lte, ne, in: opIn} = Sequelize.Op; + * + * Model.findAll({ + * where: { + * attr1: { + * [gt]: 50 + * }, + * attr2: { + * [lte]: 45 + * }, + * attr3: { + * [opIn]: [1,2,3] + * }, + * attr4: { + * [ne]: 5 + * } + * } + * }) + * + * # WHERE attr1 > 50 AND attr2 <= 45 AND attr3 IN (1,2,3) AND attr4 != 5 + * + * @example + * const {or, and, gt, lt} = Sequelize.Op; + * + * Model.findAll({ + * where: { + * name: 'a project', + * [or]: [ + * {id: [1, 2, 3]}, + * { + * [and]: [ + * {id: {[gt]: 10}}, + * {id: {[lt]: 100}} + * ] + * } + * ] + * } + * }); + * + * # WHERE `Model`.`name` = 'a project' AND (`Model`.`id` IN (1, 2, 3) OR (`Model`.`id` > 10 AND `Model`.`id` < 100)); + * + * @see + * {@link Operators} for possible operators + * __Alias__: _all_ + * + * The promise is resolved with an array of Model instances if the query succeeds._ + * + * @param {Object} [options] A hash of options to describe the scope of the search + * @param {Object} [options.where] A hash of attributes to describe your search. See above for examples. + * @param {Array|Object} [options.attributes] A list of the attributes that you want to select, or an object with `include` and `exclude` keys. To rename an attribute, you can pass an array, with two elements - the first is the name of the attribute in the DB (or some kind of expression such as `Sequelize.literal`, `Sequelize.fn` and so on), and the second is the name you want the attribute to have in the returned instance + * @param {Array} [options.attributes.include] Select all the attributes of the model, plus some additional ones. Useful for aggregations, e.g. `{ attributes: { include: [[sequelize.fn('COUNT', sequelize.col('id')), 'total']] }` + * @param {Array} [options.attributes.exclude] Select all the attributes of the model, except some few. Useful for security purposes e.g. `{ attributes: { exclude: ['password'] } }` + * @param {boolean} [options.paranoid=true] If true, only non-deleted records will be returned. If false, both deleted and non-deleted records will be returned. Only applies if `options.paranoid` is true for the model. + * @param {Array} [options.include] A list of associations to eagerly load using a left join. Supported is either `{ include: [ Model1, Model2, ...]}` or `{ include: [{ model: Model1, as: 'Alias' }]}` or `{ include: ['Alias']}`. If your association are set up with an `as` (eg. `X.hasMany(Y, { as: 'Z }`, you need to specify Z in the as attribute when eager loading Y). + * @param {Model} [options.include[].model] The model you want to eagerly load + * @param {string} [options.include[].as] The alias of the relation, in case the model you want to eagerly load is aliased. For `hasOne` / `belongsTo`, this should be the singular name, and for `hasMany`, it should be the plural + * @param {Association} [options.include[].association] The association you want to eagerly load. (This can be used instead of providing a model/as pair) + * @param {Object} [options.include[].where] Where clauses to apply to the child models. Note that this converts the eager load to an inner join, unless you explicitly set `required: false` + * @param {boolean} [options.include[].or=false] Whether to bind the ON and WHERE clause together by OR instead of AND. + * @param {Object} [options.include[].on] Supply your own ON condition for the join. + * @param {Array} [options.include[].attributes] A list of attributes to select from the child model + * @param {boolean} [options.include[].required] If true, converts to an inner join, which means that the parent model will only be loaded if it has any matching children. True if `include.where` is set, false otherwise. + * @param {boolean} [options.include[].separate] If true, runs a separate query to fetch the associated instances, only supported for hasMany associations + * @param {number} [options.include[].limit] Limit the joined rows, only supported with include.separate=true + * @param {Object} [options.include[].through.where] Filter on the join model for belongsToMany relations + * @param {Array} [options.include[].through.attributes] A list of attributes to select from the join model for belongsToMany relations + * @param {Array} [options.include[].include] Load further nested related models + * @param {boolean} [options.include[].duplicating] Mark the include as duplicating, will prevent a subquery from being used. + * @param {Array|Sequelize.fn|Sequelize.col|Sequelize.literal} [options.order] Specifies an ordering. Using an array, you can provide several columns / functions to order by. Each element can be further wrapped in a two-element array. The first element is the column / function to order by, the second is the direction. For example: `order: [['name', 'DESC']]`. In this way the column will be escaped, but the direction will not. + * @param {number} [options.limit] Limit for result + * @param {number} [options.offset] Offset for result + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {string|Object} [options.lock] Lock the selected rows. Possible options are transaction.LOCK.UPDATE and transaction.LOCK.SHARE. Postgres also supports transaction.LOCK.KEY_SHARE, transaction.LOCK.NO_KEY_UPDATE and specific model locks with joins. See [transaction.LOCK for an example](transaction#lock) + * @param {boolean} [options.raw] Return raw result. See sequelize.query for more information. + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging). + * @param {Object} [options.having] Having options + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * @param {boolean|Error} [options.rejectOnEmpty=false] Throws an error when no records found + * + * @see + * {@link Sequelize#query} + * + * @returns {Promise>} + */ + static findAll(options) { + if (options !== undefined && !_.isPlainObject(options)) { + throw new sequelizeErrors.QueryError('The argument passed to findAll must be an options object, use findByPk if you wish to pass a single primary key value'); + } + + if (options !== undefined && options.attributes) { + if (!Array.isArray(options.attributes) && !_.isPlainObject(options.attributes)) { + throw new sequelizeErrors.QueryError('The attributes option must be an array of column names or an object'); + } + } + + this.warnOnInvalidOptions(options, Object.keys(this.rawAttributes)); + + const tableNames = {}; + let originalOptions; + + tableNames[this.getTableName(options)] = true; + options = Utils.cloneDeep(options); + + _.defaults(options, { hooks: true }); + + // set rejectOnEmpty option, defaults to model options + options.rejectOnEmpty = Object.prototype.hasOwnProperty.call(options, 'rejectOnEmpty') + ? options.rejectOnEmpty + : this.options.rejectOnEmpty; + + return Promise.try(() => { + this._injectScope(options); + + if (options.hooks) { + return this.runHooks('beforeFind', options); + } + }).then(() => { + this._conformIncludes(options, this); + this._expandAttributes(options); + this._expandIncludeAll(options); + + if (options.hooks) { + return this.runHooks('beforeFindAfterExpandIncludeAll', options); + } + }).then(() => { + options.originalAttributes = this._injectDependentVirtualAttributes(options.attributes); + + if (options.include) { + options.hasJoin = true; + + this._validateIncludedElements(options, tableNames); + + // If we're not raw, we have to make sure we include the primary key for de-duplication + if ( + options.attributes + && !options.raw + && this.primaryKeyAttribute + && !options.attributes.includes(this.primaryKeyAttribute) + && (!options.group || !options.hasSingleAssociation || options.hasMultiAssociation) + ) { + options.attributes = [this.primaryKeyAttribute].concat(options.attributes); + } + } + + if (!options.attributes) { + options.attributes = Object.keys(this.rawAttributes); + options.originalAttributes = this._injectDependentVirtualAttributes(options.attributes); + } + + // whereCollection is used for non-primary key updates + this.options.whereCollection = options.where || null; + + Utils.mapFinderOptions(options, this); + + options = this._paranoidClause(this, options); + + if (options.hooks) { + return this.runHooks('beforeFindAfterOptions', options); + } + }).then(() => { + originalOptions = Utils.cloneDeep(options); + options.tableNames = Object.keys(tableNames); + return this.QueryInterface.select(this, this.getTableName(options), options); + }).tap(results => { + if (options.hooks) { + return this.runHooks('afterFind', results, options); + } + }).then(results => { + + //rejectOnEmpty mode + if (_.isEmpty(results) && options.rejectOnEmpty) { + if (typeof options.rejectOnEmpty === 'function') { + throw new options.rejectOnEmpty(); + } + if (typeof options.rejectOnEmpty === 'object') { + throw options.rejectOnEmpty; + } + throw new sequelizeErrors.EmptyResultError(); + } + + return Model._findSeparate(results, originalOptions); + }); + } + + static warnOnInvalidOptions(options, validColumnNames) { + if (!_.isPlainObject(options)) { + return; + } + + const unrecognizedOptions = Object.keys(options).filter(k => !validQueryKeywords.has(k)); + const unexpectedModelAttributes = _.intersection(unrecognizedOptions, validColumnNames); + if (!options.where && unexpectedModelAttributes.length > 0) { + logger.warn(`Model attributes (${unexpectedModelAttributes.join(', ')}) passed into finder method options of model ${this.name}, but the options.where object is empty. Did you forget to use options.where?`); + } + } + + static _injectDependentVirtualAttributes(attributes) { + if (!this._hasVirtualAttributes) return attributes; + if (!attributes || !Array.isArray(attributes)) return attributes; + + for (const attribute of attributes) { + if ( + this._virtualAttributes.has(attribute) + && this.rawAttributes[attribute].type.fields + ) { + attributes = attributes.concat(this.rawAttributes[attribute].type.fields); + } + } + + attributes = _.uniq(attributes); + + return attributes; + } + + static _findSeparate(results, options) { + if (!options.include || options.raw || !results) return Promise.resolve(results); + + const original = results; + if (options.plain) results = [results]; + + if (!results.length) return original; + + return Promise.map(options.include, include => { + if (!include.separate) { + return Model._findSeparate( + results.reduce((memo, result) => { + let associations = result.get(include.association.as); + + // Might be an empty belongsTo relation + if (!associations) return memo; + + // Force array so we can concat no matter if it's 1:1 or :M + if (!Array.isArray(associations)) associations = [associations]; + + for (let i = 0, len = associations.length; i !== len; ++i) { + memo.push(associations[i]); + } + return memo; + }, []), + Object.assign( + {}, + _.omit(options, 'include', 'attributes', 'order', 'where', 'limit', 'offset', 'plain', 'scope'), + { include: include.include || [] } + ) + ); + } + + return include.association.get(results, Object.assign( + {}, + _.omit(options, nonCascadingOptions), + _.omit(include, ['parent', 'association', 'as', 'originalAttributes']) + )).then(map => { + for (const result of results) { + result.set( + include.association.as, + map[result.get(include.association.sourceKey)], + { raw: true } + ); + } + }); + }).return(original); + } + + /** + * Search for a single instance by its primary key._ + * + * @param {number|string|Buffer} param The value of the desired instance's primary key. + * @param {Object} [options] find options + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * + * @see + * {@link Model.findAll} for a full explanation of options, Note that options.where is not supported. + * + * @returns {Promise} + */ + static findByPk(param, options) { + // return Promise resolved with null if no arguments are passed + if ([null, undefined].includes(param)) { + return Promise.resolve(null); + } + + options = Utils.cloneDeep(options) || {}; + + if (typeof param === 'number' || typeof param === 'string' || Buffer.isBuffer(param)) { + options.where = { + [this.primaryKeyAttribute]: param + }; + } else { + throw new Error(`Argument passed to findByPk is invalid: ${param}`); + } + + // Bypass a possible overloaded findOne + return this.findOne(options); + } + + /** + * Search for a single instance. This applies LIMIT 1, so the listener will always be called with a single instance. + * + * __Alias__: _find_ + * + * @param {Object} [options] A hash of options to describe the scope of the search + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * + * @see + * {@link Model.findAll} for an explanation of options + * + * @returns {Promise} + */ + static findOne(options) { + if (options !== undefined && !_.isPlainObject(options)) { + throw new Error('The argument passed to findOne must be an options object, use findByPk if you wish to pass a single primary key value'); + } + options = Utils.cloneDeep(options); + + if (options.limit === undefined) { + const uniqueSingleColumns = _.chain(this.uniqueKeys).values().filter(c => c.fields.length === 1).map('column').value(); + + // Don't add limit if querying directly on the pk or a unique column + if (!options.where || !_.some(options.where, (value, key) => + (key === this.primaryKeyAttribute || uniqueSingleColumns.includes(key)) && + (Utils.isPrimitive(value) || Buffer.isBuffer(value)) + )) { + options.limit = 1; + } + } + + // Bypass a possible overloaded findAll. + return this.findAll(_.defaults(options, { + plain: true + })); + } + + /** + * Run an aggregation method on the specified field + * + * @param {string} attribute The attribute to aggregate over. Can be a field name or * + * @param {string} aggregateFunction The function to use for aggregation, e.g. sum, max etc. + * @param {Object} [options] Query options. See sequelize.query for full options + * @param {Object} [options.where] A hash of search attributes. + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging). + * @param {DataTypes|string} [options.dataType] The type of the result. If `field` is a field in this Model, the default will be the type of that field, otherwise defaults to float. + * @param {boolean} [options.distinct] Applies DISTINCT to the field being aggregated over + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {boolean} [options.plain] When `true`, the first returned value of `aggregateFunction` is cast to `dataType` and returned. If additional attributes are specified, along with `group` clauses, set `plain` to `false` to return all values of all returned rows. Defaults to `true` + * + * @returns {Promise} Returns the aggregate result cast to `options.dataType`, unless `options.plain` is false, in which case the complete data result is returned. + */ + static aggregate(attribute, aggregateFunction, options) { + options = Utils.cloneDeep(options); + + // We need to preserve attributes here as the `injectScope` call would inject non aggregate columns. + const prevAttributes = options.attributes; + this._injectScope(options); + options.attributes = prevAttributes; + this._conformIncludes(options, this); + + if (options.include) { + this._expandIncludeAll(options); + this._validateIncludedElements(options); + } + + const attrOptions = this.rawAttributes[attribute]; + const field = attrOptions && attrOptions.field || attribute; + let aggregateColumn = this.sequelize.col(field); + + if (options.distinct) { + aggregateColumn = this.sequelize.fn('DISTINCT', aggregateColumn); + } + + let { group } = options; + if (Array.isArray(group) && Array.isArray(group[0])) { + noDoubleNestedGroup(); + group = _.flatten(group); + } + options.attributes = _.unionBy( + options.attributes, + group, + [[this.sequelize.fn(aggregateFunction, aggregateColumn), aggregateFunction]], + a => Array.isArray(a) ? a[1] : a + ); + + if (!options.dataType) { + if (attrOptions) { + options.dataType = attrOptions.type; + } else { + // Use FLOAT as fallback + options.dataType = new DataTypes.FLOAT(); + } + } else { + options.dataType = this.sequelize.normalizeDataType(options.dataType); + } + + Utils.mapOptionFieldNames(options, this); + options = this._paranoidClause(this, options); + + return this.QueryInterface.rawSelect(this.getTableName(options), options, aggregateFunction, this).then( value => { + if (value === null) { + return 0; + } + return value; + }); + } + + /** + * Count the number of records matching the provided where clause. + * + * If you provide an `include` option, the number of matching associations will be counted instead. + * + * @param {Object} [options] options + * @param {Object} [options.where] A hash of search attributes. + * @param {Object} [options.include] Include options. See `find` for details + * @param {boolean} [options.paranoid=true] Set `true` to count only non-deleted records. Can be used on models with `paranoid` enabled + * @param {boolean} [options.distinct] Apply COUNT(DISTINCT(col)) on primary key or on options.col. + * @param {string} [options.col] Column on which COUNT() should be applied + * @param {Array} [options.attributes] Used in conjunction with `group` + * @param {Array} [options.group] For creating complex counts. Will return multiple rows as needed. + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging). + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * + * @returns {Promise} + */ + static count(options) { + return Promise.try(() => { + options = _.defaults(Utils.cloneDeep(options), { hooks: true }); + if (options.hooks) { + return this.runHooks('beforeCount', options); + } + }).then(() => { + let col = options.col || '*'; + if (options.include) { + col = `${this.name}.${options.col || this.primaryKeyField}`; + } + + options.plain = !options.group; + options.dataType = new DataTypes.INTEGER(); + options.includeIgnoreAttributes = false; + + // No limit, offset or order for the options max be given to count() + // Set them to null to prevent scopes setting those values + options.limit = null; + options.offset = null; + options.order = null; + + return this.aggregate(col, 'count', options); + }); + } + + /** + * Find all the rows matching your query, within a specified offset / limit, and get the total number of rows matching your query. This is very useful for paging + * + * @example + * Model.findAndCountAll({ + * where: ..., + * limit: 12, + * offset: 12 + * }).then(result => { + * ... + * }) + * + * # In the above example, `result.rows` will contain rows 13 through 24, while `result.count` will return the total number of rows that matched your query. + * + * # When you add includes, only those which are required (either because they have a where clause, or because `required` is explicitly set to true on the include) will be added to the count part. + * + * # Suppose you want to find all users who have a profile attached: + * + * User.findAndCountAll({ + * include: [ + * { model: Profile, required: true} + * ], + * limit 3 + * }); + * + * # Because the include for `Profile` has `required` set it will result in an inner join, and only the users who have a profile will be counted. If we remove `required` from the include, both users with and without profiles will be counted + * + * @param {Object} [options] See findAll options + * + * @see + * {@link Model.findAll} for a specification of find and query options + * @see + * {@link Model.count} for a specification of count options + * + * @returns {Promise<{count: number, rows: Model[]}>} + */ + static findAndCountAll(options) { + if (options !== undefined && !_.isPlainObject(options)) { + throw new Error('The argument passed to findAndCountAll must be an options object, use findByPk if you wish to pass a single primary key value'); + } + + const countOptions = Utils.cloneDeep(options); + + if (countOptions.attributes) { + countOptions.attributes = undefined; + } + + return Promise.all([ + this.count(countOptions), + this.findAll(options) + ]) + .then(([count, rows]) => ({ + count, + rows: count === 0 ? [] : rows + })); + } + + /** + * Find the maximum value of field + * + * @param {string} field attribute / field name + * @param {Object} [options] See aggregate + * + * @see + * {@link Model.aggregate} for options + * + * @returns {Promise<*>} + */ + static max(field, options) { + return this.aggregate(field, 'max', options); + } + + /** + * Find the minimum value of field + * + * @param {string} field attribute / field name + * @param {Object} [options] See aggregate + * + * @see + * {@link Model.aggregate} for options + * + * @returns {Promise<*>} + */ + static min(field, options) { + return this.aggregate(field, 'min', options); + } + + /** + * Find the sum of field + * + * @param {string} field attribute / field name + * @param {Object} [options] See aggregate + * + * @see + * {@link Model.aggregate} for options + * + * @returns {Promise} + */ + static sum(field, options) { + return this.aggregate(field, 'sum', options); + } + + /** + * Builds a new model instance. + * + * @param {Object|Array} values An object of key value pairs or an array of such. If an array, the function will return an array of instances. + * @param {Object} [options] Instance build options + * @param {boolean} [options.raw=false] If set to true, values will ignore field and virtual setters. + * @param {boolean} [options.isNewRecord=true] Is this new record + * @param {Array} [options.include] an array of include options - Used to build prefetched/included model instances. See `set` + * + * @returns {Model|Array} + */ + static build(values, options) { + if (Array.isArray(values)) { + return this.bulkBuild(values, options); + } + + return new this(values, options); + } + + static bulkBuild(valueSets, options) { + options = Object.assign({ + isNewRecord: true + }, options || {}); + + if (!options.includeValidated) { + this._conformIncludes(options, this); + if (options.include) { + this._expandIncludeAll(options); + this._validateIncludedElements(options); + } + } + + if (options.attributes) { + options.attributes = options.attributes.map(attribute => Array.isArray(attribute) ? attribute[1] : attribute); + } + + return valueSets.map(values => this.build(values, options)); + } + + /** + * Builds a new model instance and calls save on it. + + * @see + * {@link Model.build} + * @see + * {@link Model.save} + * + * @param {Object} values hash of data values to create new record with + * @param {Object} [options] build and query options + * @param {boolean} [options.raw=false] If set to true, values will ignore field and virtual setters. + * @param {boolean} [options.isNewRecord=true] Is this new record + * @param {Array} [options.include] an array of include options - Used to build prefetched/included model instances. See `set` + * @param {Array} [options.fields] If set, only columns matching those in fields will be saved + * @param {string[]} [options.fields] An optional array of strings, representing database columns. If fields is provided, only those columns will be validated and saved. + * @param {boolean} [options.silent=false] If true, the updatedAt timestamp will not be updated. + * @param {boolean} [options.validate=true] If false, validations won't be run. + * @param {boolean} [options.hooks=true] Run before and after create / update + validate hooks + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging). + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * @param {boolean} [options.returning=true] Return the affected rows (only for postgres) + * + * @returns {Promise} + * + */ + static create(values, options) { + options = Utils.cloneDeep(options || {}); + + return this.build(values, { + isNewRecord: true, + attributes: options.fields, + include: options.include, + raw: options.raw, + silent: options.silent + }).save(options); + } + + /** + * Find a row that matches the query, or build (but don't save) the row if none is found. + * The successful result of the promise will be (instance, built) + * + * @param {Object} options find options + * @param {Object} options.where A hash of search attributes. If `where` is a plain object it will be appended with defaults to build a new instance. + * @param {Object} [options.defaults] Default values to use if building a new instance + * @param {Object} [options.transaction] Transaction to run query under + * + * @returns {Promise} + */ + static findOrBuild(options) { + if (!options || !options.where || arguments.length > 1) { + throw new Error( + 'Missing where attribute in the options parameter passed to findOrBuild. ' + + 'Please note that the API has changed, and is now options only (an object with where, defaults keys, transaction etc.)' + ); + } + + let values; + + return this.findOne(options).then(instance => { + if (instance === null) { + values = _.clone(options.defaults) || {}; + if (_.isPlainObject(options.where)) { + values = Utils.defaults(values, options.where); + } + + instance = this.build(values, options); + + return Promise.resolve([instance, true]); + } + + return Promise.resolve([instance, false]); + }); + } + + /** + * Find a row that matches the query, or build and save the row if none is found + * The successful result of the promise will be (instance, created) + * + * If no transaction is passed in the `options` object, a new transaction will be created internally, to prevent the race condition where a matching row is created by another connection after the find but before the insert call. + * However, it is not always possible to handle this case in SQLite, specifically if one transaction inserts and another tries to select before the first one has committed. In this case, an instance of sequelize. TimeoutError will be thrown instead. + * If a transaction is created, a savepoint will be created instead, and any unique constraint violation will be handled internally. + * + * @see + * {@link Model.findAll} for a full specification of find and options + * + * @param {Object} options find and create options + * @param {Object} options.where where A hash of search attributes. If `where` is a plain object it will be appended with defaults to build a new instance. + * @param {Object} [options.defaults] Default values to use if creating a new instance + * @param {Transaction} [options.transaction] Transaction to run query under + * + * @returns {Promise} + */ + static findOrCreate(options) { + if (!options || !options.where || arguments.length > 1) { + throw new Error( + 'Missing where attribute in the options parameter passed to findOrCreate. '+ + 'Please note that the API has changed, and is now options only (an object with where, defaults keys, transaction etc.)' + ); + } + + options = Object.assign({}, options); + + if (options.defaults) { + const defaults = Object.keys(options.defaults); + const unknownDefaults = defaults.filter(name => !this.rawAttributes[name]); + + if (unknownDefaults.length) { + logger.warn(`Unknown attributes (${unknownDefaults}) passed to defaults option of findOrCreate`); + } + } + + if (options.transaction === undefined && this.sequelize.constructor._cls) { + const t = this.sequelize.constructor._cls.get('transaction'); + if (t) { + options.transaction = t; + } + } + + const internalTransaction = !options.transaction; + let values; + let transaction; + + // Create a transaction or a savepoint, depending on whether a transaction was passed in + return this.sequelize.transaction(options).then(t => { + transaction = t; + options.transaction = t; + + return this.findOne(Utils.defaults({ transaction }, options)); + }).then(instance => { + if (instance !== null) { + return [instance, false]; + } + + values = _.clone(options.defaults) || {}; + if (_.isPlainObject(options.where)) { + values = Utils.defaults(values, options.where); + } + + options.exception = true; + + return this.create(values, options).then(instance => { + if (instance.get(this.primaryKeyAttribute, { raw: true }) === null) { + // If the query returned an empty result for the primary key, we know that this was actually a unique constraint violation + throw new sequelizeErrors.UniqueConstraintError(); + } + + return [instance, true]; + }).catch(sequelizeErrors.UniqueConstraintError, err => { + const flattenedWhere = Utils.flattenObjectDeep(options.where); + const flattenedWhereKeys = Object.keys(flattenedWhere).map(name => _.last(name.split('.'))); + const whereFields = flattenedWhereKeys.map(name => _.get(this.rawAttributes, `${name}.field`, name)); + const defaultFields = options.defaults && Object.keys(options.defaults) + .filter(name => this.rawAttributes[name]) + .map(name => this.rawAttributes[name].field || name); + + const errFieldKeys = Object.keys(err.fields); + const errFieldsWhereIntersects = Utils.intersects(errFieldKeys, whereFields); + if (defaultFields && !errFieldsWhereIntersects && Utils.intersects(errFieldKeys, defaultFields)) { + throw err; + } + + if (errFieldsWhereIntersects) { + _.each(err.fields, (value, key) => { + const name = this.fieldRawAttributesMap[key].fieldName; + if (value.toString() !== options.where[name].toString()) { + throw new Error(`${this.name}#findOrCreate: value used for ${name} was not equal for both the find and the create calls, '${options.where[name]}' vs '${value}'`); + } + }); + } + + // Someone must have created a matching instance inside the same transaction since we last did a find. Let's find it! + return this.findOne(Utils.defaults({ + transaction: internalTransaction ? null : transaction + }, options)).then(instance => { + // Sanity check, ideally we caught this at the defaultFeilds/err.fields check + // But if we didn't and instance is null, we will throw + if (instance === null) throw err; + return [instance, false]; + }); + }); + }).finally(() => { + if (internalTransaction && transaction) { + // If we created a transaction internally (and not just a savepoint), we should clean it up + return transaction.commit(); + } + }); + } + + /** + * A more performant findOrCreate that will not work under a transaction (at least not in postgres) + * Will execute a find call, if empty then attempt to create, if unique constraint then attempt to find again + * + * @see + * {@link Model.findAll} for a full specification of find and options + * + * @param {Object} options find options + * @param {Object} options.where A hash of search attributes. If `where` is a plain object it will be appended with defaults to build a new instance. + * @param {Object} [options.defaults] Default values to use if creating a new instance + * + * @returns {Promise} + */ + static findCreateFind(options) { + if (!options || !options.where) { + throw new Error( + 'Missing where attribute in the options parameter passed to findCreateFind.' + ); + } + + let values = _.clone(options.defaults) || {}; + if (_.isPlainObject(options.where)) { + values = Utils.defaults(values, options.where); + } + + + return this.findOne(options).then(result => { + if (result) return [result, false]; + + return this.create(values, options) + .then(result => [result, true]) + .catch(sequelizeErrors.UniqueConstraintError, () => this.findOne(options).then(result => [result, false])); + }); + } + + /** + * Insert or update a single row. An update will be executed if a row which matches the supplied values on either the primary key or a unique key is found. Note that the unique index must be defined in your sequelize model and not just in the table. Otherwise you may experience a unique constraint violation, because sequelize fails to identify the row that should be updated. + * + * **Implementation details:** + * + * * MySQL - Implemented as a single query `INSERT values ON DUPLICATE KEY UPDATE values` + * * PostgreSQL - Implemented as a temporary function with exception handling: INSERT EXCEPTION WHEN unique_constraint UPDATE + * * SQLite - Implemented as two queries `INSERT; UPDATE`. This means that the update is executed regardless of whether the row already existed or not + * * MSSQL - Implemented as a single query using `MERGE` and `WHEN (NOT) MATCHED THEN` + * **Note** that SQLite returns undefined for created, no matter if the row was created or updated. This is because SQLite always runs INSERT OR IGNORE + UPDATE, in a single query, so there is no way to know whether the row was inserted or not. + * + * @param {Object} values hash of values to upsert + * @param {Object} [options] upsert options + * @param {boolean} [options.validate=true] Run validations before the row is inserted + * @param {Array} [options.fields=Object.keys(this.attributes)] The fields to insert / update. Defaults to all changed fields + * @param {boolean} [options.hooks=true] Run before / after upsert hooks? + * @param {boolean} [options.returning=false] Append RETURNING * to get back auto generated values (Postgres only) + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging). + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * + * @returns {Promise} Returns a boolean indicating whether the row was created or updated. For MySQL/MariaDB, it returns `true` when inserted and `false` when updated. For Postgres/MSSQL with (options.returning=true), it returns record and created boolean with signature ``. + */ + static upsert(values, options) { + options = Object.assign({ + hooks: true, + returning: false, + validate: true + }, Utils.cloneDeep(options || {})); + + options.model = this; + + const createdAtAttr = this._timestampAttributes.createdAt; + const updatedAtAttr = this._timestampAttributes.updatedAt; + const hasPrimary = this.primaryKeyField in values || this.primaryKeyAttribute in values; + const instance = this.build(values); + + if (!options.fields) { + options.fields = Object.keys(instance._changed); + } + + return Promise.try(() => { + if (options.validate) { + return instance.validate(options); + } + }).then(() => { + // Map field names + const updatedDataValues = _.pick(instance.dataValues, Object.keys(instance._changed)); + const insertValues = Utils.mapValueFieldNames(instance.dataValues, Object.keys(instance.rawAttributes), this); + const updateValues = Utils.mapValueFieldNames(updatedDataValues, options.fields, this); + const now = Utils.now(this.sequelize.options.dialect); + + // Attach createdAt + if (createdAtAttr && !updateValues[createdAtAttr]) { + const field = this.rawAttributes[createdAtAttr].field || createdAtAttr; + insertValues[field] = this._getDefaultTimestamp(createdAtAttr) || now; + } + if (updatedAtAttr && !insertValues[updatedAtAttr]) { + const field = this.rawAttributes[updatedAtAttr].field || updatedAtAttr; + insertValues[field] = updateValues[field] = this._getDefaultTimestamp(updatedAtAttr) || now; + } + + // Build adds a null value for the primary key, if none was given by the user. + // We need to remove that because of some Postgres technicalities. + if (!hasPrimary && this.primaryKeyAttribute && !this.rawAttributes[this.primaryKeyAttribute].defaultValue) { + delete insertValues[this.primaryKeyField]; + delete updateValues[this.primaryKeyField]; + } + + return Promise.try(() => { + if (options.hooks) { + return this.runHooks('beforeUpsert', values, options); + } + }) + .then(() => { + return this.QueryInterface.upsert(this.getTableName(options), insertValues, updateValues, instance.where(), this, options); + }) + .then(([created, primaryKey]) => { + if (options.returning === true && primaryKey) { + return this.findByPk(primaryKey, options).then(record => [record, created]); + } + + return created; + }) + .tap(result => { + if (options.hooks) { + return this.runHooks('afterUpsert', result, options); + } + }); + }); + } + + /** + * Create and insert multiple instances in bulk. + * + * The success handler is passed an array of instances, but please notice that these may not completely represent the state of the rows in the DB. This is because MySQL + * and SQLite do not make it easy to obtain back automatically generated IDs and other default values in a way that can be mapped to multiple records. + * To obtain Instances for the newly created values, you will need to query for them again. + * + * If validation fails, the promise is rejected with an array-like [AggregateError](http://bluebirdjs.com/docs/api/aggregateerror.html) + * + * @param {Array} records List of objects (key/value pairs) to create instances from + * @param {Object} [options] Bulk create options + * @param {Array} [options.fields] Fields to insert (defaults to all fields) + * @param {boolean} [options.validate=false] Should each row be subject to validation before it is inserted. The whole insert will fail if one row fails validation + * @param {boolean} [options.hooks=true] Run before / after bulk create hooks? + * @param {boolean} [options.individualHooks=false] Run before / after create hooks for each individual Instance? BulkCreate hooks will still be run if options.hooks is true. + * @param {boolean} [options.ignoreDuplicates=false] Ignore duplicate values for primary keys? (not supported by MSSQL or Postgres < 9.5) + * @param {Array} [options.updateOnDuplicate] Fields to update if row key already exists (on duplicate key update)? (only supported by MySQL). By default, all fields are updated. + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging). + * @param {boolean} [options.returning=false] Append RETURNING * to get back auto generated values (Postgres only) + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * + * @returns {Promise>} + */ + static bulkCreate(records, options = {}) { + if (!records.length) { + return Promise.resolve([]); + } + + options = Object.assign({ + validate: false, + hooks: true, + individualHooks: false, + ignoreDuplicates: false + }, options); + + options.fields = options.fields || Object.keys(this.rawAttributes); + + const dialect = this.sequelize.options.dialect; + + if (options.ignoreDuplicates && ['mssql'].includes(dialect)) { + return Promise.reject(new Error(`${dialect} does not support the ignoreDuplicates option.`)); + } + if (options.updateOnDuplicate && (dialect !== 'mysql' && dialect !== 'mariadb')) { + return Promise.reject(new Error(`${dialect} does not support the updateOnDuplicate option.`)); + } + + if (options.updateOnDuplicate !== undefined) { + if (Array.isArray(options.updateOnDuplicate) && options.updateOnDuplicate.length) { + options.updateOnDuplicate = _.intersection( + _.without(Object.keys(this.tableAttributes), this._timestampAttributes.createdAt), + options.updateOnDuplicate + ); + } else { + return Promise.reject(new Error('updateOnDuplicate option only supports non-empty array.')); + } + } + + options.model = this; + + const createdAtAttr = this._timestampAttributes.createdAt; + const updatedAtAttr = this._timestampAttributes.updatedAt; + const now = Utils.now(this.sequelize.options.dialect); + + let instances = records.map(values => this.build(values, { isNewRecord: true })); + + return Promise.try(() => { + // Run before hook + if (options.hooks) { + return this.runHooks('beforeBulkCreate', instances, options); + } + }).then(() => { + // Validate + if (options.validate) { + const errors = new Promise.AggregateError(); + const validateOptions = _.clone(options); + validateOptions.hooks = options.individualHooks; + + return Promise.map(instances, instance => + instance.validate(validateOptions).catch(err => { + errors.push(new sequelizeErrors.BulkRecordError(err, instance)); + }) + ).then(() => { + delete options.skip; + if (errors.length) { + throw errors; + } + }); + } + }).then(() => { + if (options.individualHooks) { + // Create each instance individually + return Promise.map(instances, instance => { + const individualOptions = _.clone(options); + delete individualOptions.fields; + delete individualOptions.individualHooks; + delete individualOptions.ignoreDuplicates; + individualOptions.validate = false; + individualOptions.hooks = true; + + return instance.save(individualOptions); + }).then(_instances => { + instances = _instances; + }); + } + // Create all in one query + // Recreate records from instances to represent any changes made in hooks or validation + records = instances.map(instance => { + const values = instance.dataValues; + + // set createdAt/updatedAt attributes + if (createdAtAttr && !values[createdAtAttr]) { + values[createdAtAttr] = now; + if (!options.fields.includes(createdAtAttr)) { + options.fields.push(createdAtAttr); + } + } + if (updatedAtAttr && !values[updatedAtAttr]) { + values[updatedAtAttr] = now; + if (!options.fields.includes(updatedAtAttr)) { + options.fields.push(updatedAtAttr); + } + } + + instance.dataValues = Utils.mapValueFieldNames(values, options.fields, this); + + const out = Object.assign({}, instance.dataValues); + for (const key of this._virtualAttributes) { + delete out[key]; + } + return out; + }); + + // Map attributes to fields for serial identification + const fieldMappedAttributes = {}; + for (const attr in this.tableAttributes) { + fieldMappedAttributes[this.rawAttributes[attr].field || attr] = this.rawAttributes[attr]; + } + + // Map updateOnDuplicate attributes to fields + if (options.updateOnDuplicate) { + options.updateOnDuplicate = options.updateOnDuplicate.map(attr => this.rawAttributes[attr].field || attr); + } + + return this.QueryInterface.bulkInsert(this.getTableName(options), records, options, fieldMappedAttributes).then(results => { + if (Array.isArray(results)) { + results.forEach((result, i) => { + if (instances[i] && !instances[i].get(this.primaryKeyAttribute)) { + instances[i].dataValues[this.primaryKeyField] = result[this.primaryKeyField]; + } + }); + } + return results; + }); + }).then(() => { + // map fields back to attributes + instances.forEach(instance => { + for (const attr in this.rawAttributes) { + if (this.rawAttributes[attr].field && + instance.dataValues[this.rawAttributes[attr].field] !== undefined && + this.rawAttributes[attr].field !== attr + ) { + instance.dataValues[attr] = instance.dataValues[this.rawAttributes[attr].field]; + delete instance.dataValues[this.rawAttributes[attr].field]; + } + instance._previousDataValues[attr] = instance.dataValues[attr]; + instance.changed(attr, false); + } + instance.isNewRecord = false; + }); + + // Run after hook + if (options.hooks) { + return this.runHooks('afterBulkCreate', instances, options); + } + }).then(() => instances); + } + + /** + * Truncate all instances of the model. This is a convenient method for Model.destroy({ truncate: true }). + * + * @param {Object} [options] The options passed to Model.destroy in addition to truncate + * @param {boolean|Function} [options.cascade = false] Truncates all tables that have foreign-key references to the named table, or to any tables added to the group due to CASCADE. + * @param {boolean} [options.restartIdentity=false] Automatically restart sequences owned by columns of the truncated table. + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {boolean|Function} [options.logging] A function that logs sql queries, or false for no logging + * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging). + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * + * @returns {Promise} + * + * @see + * {@link Model.destroy} for more information + */ + static truncate(options) { + options = Utils.cloneDeep(options) || {}; + options.truncate = true; + return this.destroy(options); + } + + /** + * Delete multiple instances, or set their deletedAt timestamp to the current time if `paranoid` is enabled. + * + * @param {Object} options destroy options + * @param {Object} [options.where] Filter the destroy + * @param {boolean} [options.hooks=true] Run before / after bulk destroy hooks? + * @param {boolean} [options.individualHooks=false] If set to true, destroy will SELECT all records matching the where parameter and will execute before / after destroy hooks on each row + * @param {number} [options.limit] How many rows to delete + * @param {boolean} [options.force=false] Delete instead of setting deletedAt to current timestamp (only applicable if `paranoid` is enabled) + * @param {boolean} [options.truncate=false] If set to true, dialects that support it will use TRUNCATE instead of DELETE FROM. If a table is truncated the where and limit options are ignored + * @param {boolean} [options.cascade=false] Only used in conjunction with TRUNCATE. Truncates all tables that have foreign-key references to the named table, or to any tables added to the group due to CASCADE. + * @param {boolean} [options.restartIdentity=false] Only used in conjunction with TRUNCATE. Automatically restart sequences owned by columns of the truncated table. + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging). + * + * @returns {Promise} The number of destroyed rows + */ + static destroy(options) { + options = Utils.cloneDeep(options); + + this._injectScope(options); + + if (!options || !(options.where || options.truncate)) { + throw new Error('Missing where or truncate attribute in the options parameter of model.destroy.'); + } + + if (!options.truncate && !_.isPlainObject(options.where) && !Array.isArray(options.where) && !(options.where instanceof Utils.SequelizeMethod)) { + throw new Error('Expected plain object, array or sequelize method in the options.where parameter of model.destroy.'); + } + + options = _.defaults(options, { + hooks: true, + individualHooks: false, + force: false, + cascade: false, + restartIdentity: false + }); + + options.type = QueryTypes.BULKDELETE; + + Utils.mapOptionFieldNames(options, this); + options.model = this; + + let instances; + + return Promise.try(() => { + // Run before hook + if (options.hooks) { + return this.runHooks('beforeBulkDestroy', options); + } + }).then(() => { + // Get daos and run beforeDestroy hook on each record individually + if (options.individualHooks) { + return this.findAll({ where: options.where, transaction: options.transaction, logging: options.logging, benchmark: options.benchmark }) + .map(instance => this.runHooks('beforeDestroy', instance, options).then(() => instance)) + .then(_instances => { + instances = _instances; + }); + } + }).then(() => { + // Run delete query (or update if paranoid) + if (this._timestampAttributes.deletedAt && !options.force) { + // Set query type appropriately when running soft delete + options.type = QueryTypes.BULKUPDATE; + + const attrValueHash = {}; + const deletedAtAttribute = this.rawAttributes[this._timestampAttributes.deletedAt]; + const field = this.rawAttributes[this._timestampAttributes.deletedAt].field; + const where = { + [field]: Object.prototype.hasOwnProperty.call(deletedAtAttribute, 'defaultValue') ? deletedAtAttribute.defaultValue : null + }; + + + attrValueHash[field] = Utils.now(this.sequelize.options.dialect); + return this.QueryInterface.bulkUpdate(this.getTableName(options), attrValueHash, Object.assign(where, options.where), options, this.rawAttributes); + } + return this.QueryInterface.bulkDelete(this.getTableName(options), options.where, options, this); + }).tap(() => { + // Run afterDestroy hook on each record individually + if (options.individualHooks) { + return Promise.map(instances, instance => this.runHooks('afterDestroy', instance, options)); + } + }).tap(() => { + // Run after hook + if (options.hooks) { + return this.runHooks('afterBulkDestroy', options); + } + }); + } + + /** + * Restore multiple instances if `paranoid` is enabled. + * + * @param {Object} options restore options + * @param {Object} [options.where] Filter the restore + * @param {boolean} [options.hooks=true] Run before / after bulk restore hooks? + * @param {boolean} [options.individualHooks=false] If set to true, restore will find all records within the where parameter and will execute before / after bulkRestore hooks on each row + * @param {number} [options.limit] How many rows to undelete (only for mysql) + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging). + * @param {Transaction} [options.transaction] Transaction to run query under + * + * @returns {Promise} + */ + static restore(options) { + if (!this._timestampAttributes.deletedAt) throw new Error('Model is not paranoid'); + + options = Object.assign({ + hooks: true, + individualHooks: false + }, options || {}); + + options.type = QueryTypes.RAW; + options.model = this; + + let instances; + + Utils.mapOptionFieldNames(options, this); + + return Promise.try(() => { + // Run before hook + if (options.hooks) { + return this.runHooks('beforeBulkRestore', options); + } + }).then(() => { + // Get daos and run beforeRestore hook on each record individually + if (options.individualHooks) { + return this.findAll({ where: options.where, transaction: options.transaction, logging: options.logging, benchmark: options.benchmark, paranoid: false }) + .map(instance => this.runHooks('beforeRestore', instance, options).then(() => instance)) + .then(_instances => { + instances = _instances; + }); + } + }).then(() => { + // Run undelete query + const attrValueHash = {}; + const deletedAtCol = this._timestampAttributes.deletedAt; + const deletedAtAttribute = this.rawAttributes[deletedAtCol]; + const deletedAtDefaultValue = Object.prototype.hasOwnProperty.call(deletedAtAttribute, 'defaultValue') ? deletedAtAttribute.defaultValue : null; + + attrValueHash[deletedAtAttribute.field || deletedAtCol] = deletedAtDefaultValue; + options.omitNull = false; + return this.QueryInterface.bulkUpdate(this.getTableName(options), attrValueHash, options.where, options, this.rawAttributes); + }).tap(() => { + // Run afterDestroy hook on each record individually + if (options.individualHooks) { + return Promise.map(instances, instance => this.runHooks('afterRestore', instance, options)); + } + }).tap(() => { + // Run after hook + if (options.hooks) { + return this.runHooks('afterBulkRestore', options); + } + }); + } + + /** + * Update multiple instances that match the where options. + * + * @param {Object} values hash of values to update + * @param {Object} options update options + * @param {Object} options.where Options to describe the scope of the search. + * @param {boolean} [options.paranoid=true] If true, only non-deleted records will be updated. If false, both deleted and non-deleted records will be updated. Only applies if `options.paranoid` is true for the model. + * @param {Array} [options.fields] Fields to update (defaults to all fields) + * @param {boolean} [options.validate=true] Should each row be subject to validation before it is inserted. The whole insert will fail if one row fails validation + * @param {boolean} [options.hooks=true] Run before / after bulk update hooks? + * @param {boolean} [options.sideEffects=true] Whether or not to update the side effects of any virtual setters. + * @param {boolean} [options.individualHooks=false] Run before / after update hooks?. If true, this will execute a SELECT followed by individual UPDATEs. A select is needed, because the row data needs to be passed to the hooks + * @param {boolean} [options.returning=false] Return the affected rows (only for postgres) + * @param {number} [options.limit] How many rows to update (only for mysql and mariadb, implemented as TOP(n) for MSSQL; for sqlite it is supported only when rowid is present) + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging). + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {boolean} [options.silent=false] If true, the updatedAt timestamp will not be updated. + * + * @returns {Promise>} The promise returns an array with one or two elements. The first element is always the number + * of affected rows, while the second element is the actual affected rows (only supported in postgres with `options.returning` true.) + * + */ + static update(values, options) { + options = Utils.cloneDeep(options); + + this._injectScope(options); + this._optionsMustContainWhere(options); + + options = this._paranoidClause(this, _.defaults(options, { + validate: true, + hooks: true, + individualHooks: false, + returning: false, + force: false, + sideEffects: true + })); + + options.type = QueryTypes.BULKUPDATE; + + // Clone values so it doesn't get modified for caller scope and ignore undefined values + values = _.omitBy(values, value => value === undefined); + + // Remove values that are not in the options.fields + if (options.fields && options.fields instanceof Array) { + for (const key of Object.keys(values)) { + if (!options.fields.includes(key)) { + delete values[key]; + } + } + } else { + const updatedAtAttr = this._timestampAttributes.updatedAt; + options.fields = _.intersection(Object.keys(values), Object.keys(this.tableAttributes)); + if (updatedAtAttr && !options.fields.includes(updatedAtAttr)) { + options.fields.push(updatedAtAttr); + } + } + + if (this._timestampAttributes.updatedAt && !options.silent) { + values[this._timestampAttributes.updatedAt] = this._getDefaultTimestamp(this._timestampAttributes.updatedAt) || Utils.now(this.sequelize.options.dialect); + } + + options.model = this; + + let instances; + let valuesUse; + + return Promise.try(() => { + // Validate + if (options.validate) { + const build = this.build(values); + build.set(this._timestampAttributes.updatedAt, values[this._timestampAttributes.updatedAt], { raw: true }); + + if (options.sideEffects) { + values = Object.assign(values, _.pick(build.get(), build.changed())); + options.fields = _.union(options.fields, Object.keys(values)); + } + + // We want to skip validations for all other fields + options.skip = _.difference(Object.keys(this.rawAttributes), Object.keys(values)); + return build.validate(options).then(attributes => { + options.skip = undefined; + if (attributes && attributes.dataValues) { + values = _.pick(attributes.dataValues, Object.keys(values)); + } + }); + } + return null; + }).then(() => { + // Run before hook + if (options.hooks) { + options.attributes = values; + return this.runHooks('beforeBulkUpdate', options).then(() => { + values = options.attributes; + delete options.attributes; + }); + } + return null; + }).then(() => { + valuesUse = values; + + // Get instances and run beforeUpdate hook on each record individually + if (options.individualHooks) { + return this.findAll({ + where: options.where, + transaction: options.transaction, + logging: options.logging, + benchmark: options.benchmark, + paranoid: options.paranoid + }).then(_instances => { + instances = _instances; + if (!instances.length) { + return []; + } + + // Run beforeUpdate hooks on each record and check whether beforeUpdate hook changes values uniformly + // i.e. whether they change values for each record in the same way + let changedValues; + let different = false; + + return Promise.map(instances, instance => { + // Record updates in instances dataValues + Object.assign(instance.dataValues, values); + // Set the changed fields on the instance + _.forIn(valuesUse, (newValue, attr) => { + if (newValue !== instance._previousDataValues[attr]) { + instance.setDataValue(attr, newValue); + } + }); + + // Run beforeUpdate hook + return this.runHooks('beforeUpdate', instance, options).then(() => { + if (!different) { + const thisChangedValues = {}; + _.forIn(instance.dataValues, (newValue, attr) => { + if (newValue !== instance._previousDataValues[attr]) { + thisChangedValues[attr] = newValue; + } + }); + + if (!changedValues) { + changedValues = thisChangedValues; + } else { + different = !_.isEqual(changedValues, thisChangedValues); + } + } + + return instance; + }); + }).then(_instances => { + instances = _instances; + + if (!different) { + const keys = Object.keys(changedValues); + // Hooks do not change values or change them uniformly + if (keys.length) { + // Hooks change values - record changes in valuesUse so they are executed + valuesUse = changedValues; + options.fields = _.union(options.fields, keys); + } + return; + } + // Hooks change values in a different way for each record + // Do not run original query but save each record individually + return Promise.map(instances, instance => { + const individualOptions = _.clone(options); + delete individualOptions.individualHooks; + individualOptions.hooks = false; + individualOptions.validate = false; + + return instance.save(individualOptions); + }).tap(_instances => { + instances = _instances; + }); + }); + }); + } + }).then(results => { + // Update already done row-by-row - exit + if (results) { + return [results.length, results]; + } + + // only updatedAt is being passed, then skip update + if ( + _.isEmpty(valuesUse) + || Object.keys(valuesUse).length === 1 && valuesUse[this._timestampAttributes.updatedAt] + ) { + return [0]; + } + + valuesUse = Utils.mapValueFieldNames(valuesUse, options.fields, this); + options = Utils.mapOptionFieldNames(options, this); + options.hasTrigger = this.options ? this.options.hasTrigger : false; + + // Run query to update all rows + return this.QueryInterface.bulkUpdate(this.getTableName(options), valuesUse, options.where, options, this.tableAttributes).then(affectedRows => { + if (options.returning) { + instances = affectedRows; + return [affectedRows.length, affectedRows]; + } + + return [affectedRows]; + }); + }).tap(result => { + if (options.individualHooks) { + return Promise.map(instances, instance => { + return this.runHooks('afterUpdate', instance, options); + }).then(() => { + result[1] = instances; + }); + } + }).tap(() => { + // Run after hook + if (options.hooks) { + options.attributes = values; + return this.runHooks('afterBulkUpdate', options).then(() => { + delete options.attributes; + }); + } + }); + } + + /** + * Run a describe query on the table. + * + * @param {string} [schema] schema name to search table in + * @param {Object} [options] query options + * + * @returns {Promise} hash of attributes and their types + */ + static describe(schema, options) { + return this.QueryInterface.describeTable(this.tableName, Object.assign({ schema: schema || this._schema || undefined }, options)); + } + + static _getDefaultTimestamp(attr) { + if (!!this.rawAttributes[attr] && !!this.rawAttributes[attr].defaultValue) { + return Utils.toDefaultValue(this.rawAttributes[attr].defaultValue, this.sequelize.options.dialect); + } + return undefined; + } + + static _expandAttributes(options) { + if (!_.isPlainObject(options.attributes)) { + return; + } + let attributes = Object.keys(this.rawAttributes); + + if (options.attributes.exclude) { + attributes = attributes.filter(elem => !options.attributes.exclude.includes(elem)); + } + + if (options.attributes.include) { + attributes = attributes.concat(options.attributes.include); + } + + options.attributes = attributes; + } + + // Inject _scope into options. + static _injectScope(options) { + const scope = Utils.cloneDeep(this._scope); + this._defaultsOptions(options, scope); + } + + static [Symbol.for('nodejs.util.inspect.custom')]() { + return this.name; + } + + static inspect() { + return this.name; + } + + static hasAlias(alias) { + return Object.prototype.hasOwnProperty.call(this.associations, alias); + } + + /** + * Increment the value of one or more columns. This is done in the database, which means it does not use the values currently stored on the Instance. The increment is done using a + * ``` SET column = column + X WHERE foo = 'bar' ``` query. To get the correct value after an increment into the Instance you should do a reload. + * + * @example + * Model.increment('number', { where: { foo: 'bar' }); + * + * @example + * Model.increment(['number', 'count'], { by: 2, where: { foo: 'bar' } }); + * + * @example + * // `by` is ignored, as each column has its own value + * Model.increment({ answer: 42, tries: -1}, { by: 2, where: { foo: 'bar' } }); + * + * @see + * {@link Model#reload} + * + * @param {string|Array|Object} fields If a string is provided, that column is incremented by the value of `by` given in options. If an array is provided, the same is true for each column. If and object is provided, each column is incremented by the value given. + * @param {Object} options increment options + * @param {Object} options.where conditions hash + * @param {number} [options.by=1] The number to increment by + * @param {boolean} [options.silent=false] If true, the updatedAt timestamp will not be updated. + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * + * @returns {Promise} returns an array of affected rows and affected count with `options.returning: true`, whenever supported by dialect + */ + static increment(fields, options) { + options = options || {}; + + this._injectScope(options); + this._optionsMustContainWhere(options); + + const updatedAtAttr = this._timestampAttributes.updatedAt; + const versionAttr = this._versionAttribute; + const updatedAtAttribute = this.rawAttributes[updatedAtAttr]; + options = Utils.defaults({}, options, { + by: 1, + attributes: {}, + where: {}, + increment: true + }); + + Utils.mapOptionFieldNames(options, this); + + const where = Object.assign({}, options.where); + let values = {}; + + if (typeof fields === 'string') { + values[fields] = options.by; + } else if (Array.isArray(fields)) { + fields.forEach(field => { + values[field] = options.by; + }); + } else { // Assume fields is key-value pairs + values = fields; + } + + if (!options.silent && updatedAtAttr && !values[updatedAtAttr]) { + options.attributes[updatedAtAttribute.field || updatedAtAttr] = this._getDefaultTimestamp(updatedAtAttr) || Utils.now(this.sequelize.options.dialect); + } + if (versionAttr) { + values[versionAttr] = options.increment ? 1 : -1; + } + + for (const attr of Object.keys(values)) { + // Field name mapping + if (this.rawAttributes[attr] && this.rawAttributes[attr].field && this.rawAttributes[attr].field !== attr) { + values[this.rawAttributes[attr].field] = values[attr]; + delete values[attr]; + } + } + + let promise; + if (!options.increment) { + promise = this.QueryInterface.decrement(this, this.getTableName(options), values, where, options); + } else { + promise = this.QueryInterface.increment(this, this.getTableName(options), values, where, options); + } + + return promise.then(affectedRows => { + if (options.returning) { + return [affectedRows, affectedRows.length]; + } + + return [affectedRows]; + }); + } + + /** + * Decrement the value of one or more columns. This is done in the database, which means it does not use the values currently stored on the Instance. The decrement is done using a + * ```sql SET column = column - X WHERE foo = 'bar'``` query. To get the correct value after a decrement into the Instance you should do a reload. + * + * @example + * Model.decrement('number', { where: { foo: 'bar' }); + * + * @example + * Model.decrement(['number', 'count'], { by: 2, where: { foo: 'bar' } }); + * + * @example + * // `by` is ignored, since each column has its own value + * Model.decrement({ answer: 42, tries: -1}, { by: 2, where: { foo: 'bar' } }); + * + * @param {string|Array|Object} fields If a string is provided, that column is incremented by the value of `by` given in options. If an array is provided, the same is true for each column. If and object is provided, each column is incremented by the value given. + * @param {Object} options decrement options, similar to increment + * + * @see + * {@link Model.increment} + * @see + * {@link Model#reload} + * @since 4.36.0 + + * @returns {Promise} returns an array of affected rows and affected count with `options.returning: true`, whenever supported by dialect + */ + static decrement(fields, options) { + options = _.defaults({ increment: false }, options, { + by: 1 + }); + + return this.increment(fields, options); + } + + static _optionsMustContainWhere(options) { + assert(options && options.where, 'Missing where attribute in the options parameter'); + assert(_.isPlainObject(options.where) || Array.isArray(options.where) || options.where instanceof Utils.SequelizeMethod, + 'Expected plain object, array or sequelize method in the options.where parameter'); + } + + /** + * Get an object representing the query for this instance, use with `options.where` + * + * @param {boolean} [checkVersion=false] include version attribute in where hash + * + * @returns {Object} + */ + where(checkVersion) { + const where = this.constructor.primaryKeyAttributes.reduce((result, attribute) => { + result[attribute] = this.get(attribute, { raw: true }); + return result; + }, {}); + + if (_.size(where) === 0) { + return this._modelOptions.whereCollection; + } + const versionAttr = this.constructor._versionAttribute; + if (checkVersion && versionAttr) { + where[versionAttr] = this.get(versionAttr, { raw: true }); + } + return Utils.mapWhereFieldNames(where, this.constructor); + } + + toString() { + return `[object SequelizeInstance:${this.constructor.name}]`; + } + + /** + * Get the value of the underlying data value + * + * @param {string} key key to look in instance data store + * + * @returns {any} + */ + getDataValue(key) { + return this.dataValues[key]; + } + + /** + * Update the underlying data value + * + * @param {string} key key to set in instance data store + * @param {any} value new value for given key + * + */ + setDataValue(key, value) { + const originalValue = this._previousDataValues[key]; + + if (!Utils.isPrimitive(value) && value !== null || value !== originalValue) { + this.changed(key, true); + } + + this.dataValues[key] = value; + } + + /** + * If no key is given, returns all values of the instance, also invoking virtual getters. + * + * If key is given and a field or virtual getter is present for the key it will call that getter - else it will return the value for key. + * + * @param {string} [key] key to get value of + * @param {Object} [options] get options + * @param {boolean} [options.plain=false] If set to true, included instances will be returned as plain objects + * @param {boolean} [options.raw=false] If set to true, field and virtual setters will be ignored + * + * @returns {Object|any} + */ + get(key, options) { + if (options === undefined && typeof key === 'object') { + options = key; + key = undefined; + } + + options = options || {}; + + if (key) { + if (Object.prototype.hasOwnProperty.call(this._customGetters, key) && !options.raw) { + return this._customGetters[key].call(this, key, options); + } + + if (options.plain && this._options.include && this._options.includeNames.includes(key)) { + if (Array.isArray(this.dataValues[key])) { + return this.dataValues[key].map(instance => instance.get(options)); + } + if (this.dataValues[key] instanceof Model) { + return this.dataValues[key].get(options); + } + return this.dataValues[key]; + } + + return this.dataValues[key]; + } + + if ( + this._hasCustomGetters + || options.plain && this._options.include + || options.clone + ) { + const values = {}; + let _key; + + if (this._hasCustomGetters) { + for (_key in this._customGetters) { + if ( + this._options.attributes + && !this._options.attributes.includes(_key) + ) { + continue; + } + + if (Object.prototype.hasOwnProperty.call(this._customGetters, _key)) { + values[_key] = this.get(_key, options); + } + } + } + + for (_key in this.dataValues) { + if ( + !Object.prototype.hasOwnProperty.call(values, _key) + && Object.prototype.hasOwnProperty.call(this.dataValues, _key) + ) { + values[_key] = this.get(_key, options); + } + } + + return values; + } + + return this.dataValues; + } + + /** + * Set is used to update values on the instance (the sequelize representation of the instance that is, remember that nothing will be persisted before you actually call `save`). + * In its most basic form `set` will update a value stored in the underlying `dataValues` object. However, if a custom setter function is defined for the key, that function + * will be called instead. To bypass the setter, you can pass `raw: true` in the options object. + * + * If set is called with an object, it will loop over the object, and call set recursively for each key, value pair. If you set raw to true, the underlying dataValues will either be + * set directly to the object passed, or used to extend dataValues, if dataValues already contain values. + * + * When set is called, the previous value of the field is stored and sets a changed flag(see `changed`). + * + * Set can also be used to build instances for associations, if you have values for those. + * When using set with associations you need to make sure the property key matches the alias of the association + * while also making sure that the proper include options have been set (from .build() or .findOne()) + * + * If called with a dot.separated key on a JSON/JSONB attribute it will set the value nested and flag the entire object as changed. + * + * @see + * {@link Model.findAll} for more information about includes + * + * @param {string|Object} key key to set, it can be string or object. When string it will set that key, for object it will loop over all object properties nd set them. + * @param {any} value value to set + * @param {Object} [options] set options + * @param {boolean} [options.raw=false] If set to true, field and virtual setters will be ignored + * @param {boolean} [options.reset=false] Clear all previously set data values + * + * @returns {Model} + */ + set(key, value, options) { + let values; + let originalValue; + + if (typeof key === 'object' && key !== null) { + values = key; + options = value || {}; + + if (options.reset) { + this.dataValues = {}; + for (const key in values) { + this.changed(key, false); + } + } + + // If raw, and we're not dealing with includes or special attributes, just set it straight on the dataValues object + if (options.raw && !(this._options && this._options.include) && !(options && options.attributes) && !this.constructor._hasDateAttributes && !this.constructor._hasBooleanAttributes) { + if (Object.keys(this.dataValues).length) { + this.dataValues = Object.assign(this.dataValues, values); + } else { + this.dataValues = values; + } + // If raw, .changed() shouldn't be true + this._previousDataValues = _.clone(this.dataValues); + } else { + // Loop and call set + if (options.attributes) { + const setKeys = data => { + for (const k of data) { + if (values[k] === undefined) { + continue; + } + this.set(k, values[k], options); + } + }; + setKeys(options.attributes); + if (this.constructor._hasVirtualAttributes) { + setKeys(this.constructor._virtualAttributes); + } + if (this._options.includeNames) { + setKeys(this._options.includeNames); + } + } else { + for (const key in values) { + this.set(key, values[key], options); + } + } + + if (options.raw) { + // If raw, .changed() shouldn't be true + this._previousDataValues = _.clone(this.dataValues); + } + } + return this; + } + if (!options) + options = {}; + if (!options.raw) { + originalValue = this.dataValues[key]; + } + + // If not raw, and there's a custom setter + if (!options.raw && this._customSetters[key]) { + this._customSetters[key].call(this, value, key); + // custom setter should have changed value, get that changed value + // TODO: v5 make setters return new value instead of changing internal store + const newValue = this.dataValues[key]; + if (!Utils.isPrimitive(newValue) && newValue !== null || newValue !== originalValue) { + this._previousDataValues[key] = originalValue; + this.changed(key, true); + } + } else { + // Check if we have included models, and if this key matches the include model names/aliases + if (this._options && this._options.include && this._options.includeNames.includes(key)) { + // Pass it on to the include handler + this._setInclude(key, value, options); + return this; + } + // Bunch of stuff we won't do when it's raw + if (!options.raw) { + // If attribute is not in model definition, return + if (!this._isAttribute(key)) { + if (key.includes('.') && this.constructor._jsonAttributes.has(key.split('.')[0])) { + const previousNestedValue = Dottie.get(this.dataValues, key); + if (!_.isEqual(previousNestedValue, value)) { + Dottie.set(this.dataValues, key, value); + this.changed(key.split('.')[0], true); + } + } + return this; + } + + // If attempting to set primary key and primary key is already defined, return + if (this.constructor._hasPrimaryKeys && originalValue && this.constructor._isPrimaryKey(key)) { + return this; + } + + // If attempting to set read only attributes, return + if (!this.isNewRecord && this.constructor._hasReadOnlyAttributes && this.constructor._readOnlyAttributes.has(key)) { + return this; + } + } + + // If there's a data type sanitizer + if ( + !(value instanceof Utils.SequelizeMethod) + && Object.prototype.hasOwnProperty.call(this.constructor._dataTypeSanitizers, key) + ) { + value = this.constructor._dataTypeSanitizers[key].call(this, value, options); + } + + // Set when the value has changed and not raw + if ( + !options.raw && + ( + // True when sequelize method + value instanceof Utils.SequelizeMethod || + // Check for data type type comparators + !(value instanceof Utils.SequelizeMethod) && this.constructor._dataTypeChanges[key] && this.constructor._dataTypeChanges[key].call(this, value, originalValue, options) || + // Check default + !this.constructor._dataTypeChanges[key] && (!Utils.isPrimitive(value) && value !== null || value !== originalValue) + ) + ) { + this._previousDataValues[key] = originalValue; + this.changed(key, true); + } + + // set data value + this.dataValues[key] = value; + } + return this; + } + + setAttributes(updates) { + return this.set(updates); + } + + /** + * If changed is called with a string it will return a boolean indicating whether the value of that key in `dataValues` is different from the value in `_previousDataValues`. + * + * If changed is called without an argument, it will return an array of keys that have changed. + * + * If changed is called without an argument and no keys have changed, it will return `false`. + * + * @param {string} [key] key to check or change status of + * @param {any} [value] value to set + * + * @returns {boolean|Array} + */ + changed(key, value) { + if (key) { + if (value !== undefined) { + this._changed[key] = value; + return this; + } + return this._changed[key] || false; + } + + const changed = Object.keys(this.dataValues).filter(key => this.changed(key)); + + return changed.length ? changed : false; + } + + /** + * Returns the previous value for key from `_previousDataValues`. + * + * If called without a key, returns the previous values for all values which have changed + * + * @param {string} [key] key to get previous value of + * + * @returns {any|Array} + */ + previous(key) { + if (key) { + return this._previousDataValues[key]; + } + + return _.pickBy(this._previousDataValues, (value, key) => this.changed(key)); + } + + _setInclude(key, value, options) { + if (!Array.isArray(value)) value = [value]; + if (value[0] instanceof Model) { + value = value.map(instance => instance.dataValues); + } + + const include = this._options.includeMap[key]; + const association = include.association; + const accessor = key; + const primaryKeyAttribute = include.model.primaryKeyAttribute; + let childOptions; + let isEmpty; + + if (!isEmpty) { + childOptions = { + isNewRecord: this.isNewRecord, + include: include.include, + includeNames: include.includeNames, + includeMap: include.includeMap, + includeValidated: true, + raw: options.raw, + attributes: include.originalAttributes + }; + } + if (include.originalAttributes === undefined || include.originalAttributes.length) { + if (association.isSingleAssociation) { + if (Array.isArray(value)) { + value = value[0]; + } + isEmpty = value && value[primaryKeyAttribute] === null || value === null; + this[accessor] = this.dataValues[accessor] = isEmpty ? null : include.model.build(value, childOptions); + } else { + isEmpty = value[0] && value[0][primaryKeyAttribute] === null; + this[accessor] = this.dataValues[accessor] = isEmpty ? [] : include.model.bulkBuild(value, childOptions); + } + } + } + + /** + * Validate this instance, and if the validation passes, persist it to the database. It will only save changed fields, and do nothing if no fields have changed. + * + * On success, the callback will be called with this instance. On validation error, the callback will be called with an instance of `Sequelize.ValidationError`. + * This error will have a property for each of the fields for which validation failed, with the error message for that field. + * + * @param {Object} [options] save options + * @param {string[]} [options.fields] An optional array of strings, representing database columns. If fields is provided, only those columns will be validated and saved. + * @param {boolean} [options.silent=false] If true, the updatedAt timestamp will not be updated. + * @param {boolean} [options.validate=true] If false, validations won't be run. + * @param {boolean} [options.hooks=true] Run before and after create / update + validate hooks + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * @param {boolean} [options.returning] Append RETURNING * to get back auto generated values (Postgres only) + * + * @returns {Promise} + */ + save(options) { + if (arguments.length > 1) { + throw new Error('The second argument was removed in favor of the options object.'); + } + + options = Utils.cloneDeep(options); + options = _.defaults(options, { + hooks: true, + validate: true + }); + + if (!options.fields) { + if (this.isNewRecord) { + options.fields = Object.keys(this.constructor.rawAttributes); + } else { + options.fields = _.intersection(this.changed(), Object.keys(this.constructor.rawAttributes)); + } + + options.defaultFields = options.fields; + } + + if (options.returning === undefined) { + if (options.association) { + options.returning = false; + } else if (this.isNewRecord) { + options.returning = true; + } + } + + const primaryKeyName = this.constructor.primaryKeyAttribute; + const primaryKeyAttribute = primaryKeyName && this.constructor.rawAttributes[primaryKeyName]; + const createdAtAttr = this.constructor._timestampAttributes.createdAt; + const versionAttr = this.constructor._versionAttribute; + const hook = this.isNewRecord ? 'Create' : 'Update'; + const wasNewRecord = this.isNewRecord; + const now = Utils.now(this.sequelize.options.dialect); + let updatedAtAttr = this.constructor._timestampAttributes.updatedAt; + + if (updatedAtAttr && options.fields.length >= 1 && !options.fields.includes(updatedAtAttr)) { + options.fields.push(updatedAtAttr); + } + if (versionAttr && options.fields.length >= 1 && !options.fields.includes(versionAttr)) { + options.fields.push(versionAttr); + } + + if (options.silent === true && !(this.isNewRecord && this.get(updatedAtAttr, { raw: true }))) { + // UpdateAtAttr might have been added as a result of Object.keys(Model.rawAttributes). In that case we have to remove it again + _.remove(options.fields, val => val === updatedAtAttr); + updatedAtAttr = false; + } + + if (this.isNewRecord === true) { + if (createdAtAttr && !options.fields.includes(createdAtAttr)) { + options.fields.push(createdAtAttr); + } + + if (primaryKeyAttribute && primaryKeyAttribute.defaultValue && !options.fields.includes(primaryKeyName)) { + options.fields.unshift(primaryKeyName); + } + } + + if (this.isNewRecord === false) { + if (primaryKeyName && this.get(primaryKeyName, { raw: true }) === undefined) { + throw new Error('You attempted to save an instance with no primary key, this is not allowed since it would result in a global update'); + } + } + + if (updatedAtAttr && !options.silent && options.fields.includes(updatedAtAttr)) { + this.dataValues[updatedAtAttr] = this.constructor._getDefaultTimestamp(updatedAtAttr) || now; + } + + if (this.isNewRecord && createdAtAttr && !this.dataValues[createdAtAttr]) { + this.dataValues[createdAtAttr] = this.constructor._getDefaultTimestamp(createdAtAttr) || now; + } + + return Promise.try(() => { + // Validate + if (options.validate) { + return this.validate(options); + } + }).then(() => { + // Run before hook + if (options.hooks) { + const beforeHookValues = _.pick(this.dataValues, options.fields); + let ignoreChanged = _.difference(this.changed(), options.fields); // In case of update where it's only supposed to update the passed values and the hook values + let hookChanged; + let afterHookValues; + + if (updatedAtAttr && options.fields.includes(updatedAtAttr)) { + ignoreChanged = _.without(ignoreChanged, updatedAtAttr); + } + + return this.constructor.runHooks(`before${hook}`, this, options) + .then(() => { + if (options.defaultFields && !this.isNewRecord) { + afterHookValues = _.pick(this.dataValues, _.difference(this.changed(), ignoreChanged)); + + hookChanged = []; + for (const key of Object.keys(afterHookValues)) { + if (afterHookValues[key] !== beforeHookValues[key]) { + hookChanged.push(key); + } + } + + options.fields = _.uniq(options.fields.concat(hookChanged)); + } + + if (hookChanged) { + if (options.validate) { + // Validate again + + options.skip = _.difference(Object.keys(this.constructor.rawAttributes), hookChanged); + return this.validate(options).then(() => { + delete options.skip; + }); + } + } + }); + } + }).then(() => { + if (!options.fields.length) return this; + if (!this.isNewRecord) return this; + if (!this._options.include || !this._options.include.length) return this; + + // Nested creation for BelongsTo relations + return Promise.map(this._options.include.filter(include => include.association instanceof BelongsTo), include => { + const instance = this.get(include.as); + if (!instance) return Promise.resolve(); + + const includeOptions = _(Utils.cloneDeep(include)) + .omit(['association']) + .defaults({ + transaction: options.transaction, + logging: options.logging, + parentRecord: this + }).value(); + + return instance.save(includeOptions).then(() => this[include.association.accessors.set](instance, { save: false, logging: options.logging })); + }); + }).then(() => { + const realFields = options.fields.filter(field => !this.constructor._virtualAttributes.has(field)); + if (!realFields.length) return this; + if (!this.changed() && !this.isNewRecord) return this; + + const versionFieldName = _.get(this.constructor.rawAttributes[versionAttr], 'field') || versionAttr; + let values = Utils.mapValueFieldNames(this.dataValues, options.fields, this.constructor); + let query = null; + let args = []; + let where; + + if (this.isNewRecord) { + query = 'insert'; + args = [this, this.constructor.getTableName(options), values, options]; + } else { + where = this.where(true); + if (versionAttr) { + values[versionFieldName] = parseInt(values[versionFieldName], 10) + 1; + } + query = 'update'; + args = [this, this.constructor.getTableName(options), values, where, options]; + } + + return this.constructor.QueryInterface[query](...args) + .then(([result, rowsUpdated])=> { + if (versionAttr) { + // Check to see that a row was updated, otherwise it's an optimistic locking error. + if (rowsUpdated < 1) { + throw new sequelizeErrors.OptimisticLockError({ + modelName: this.constructor.name, + values, + where + }); + } else { + result.dataValues[versionAttr] = values[versionFieldName]; + } + } + + // Transfer database generated values (defaults, autoincrement, etc) + for (const attr of Object.keys(this.constructor.rawAttributes)) { + if (this.constructor.rawAttributes[attr].field && + values[this.constructor.rawAttributes[attr].field] !== undefined && + this.constructor.rawAttributes[attr].field !== attr + ) { + values[attr] = values[this.constructor.rawAttributes[attr].field]; + delete values[this.constructor.rawAttributes[attr].field]; + } + } + values = Object.assign(values, result.dataValues); + + result.dataValues = Object.assign(result.dataValues, values); + return result; + }) + .tap(() => { + if (!wasNewRecord) return this; + if (!this._options.include || !this._options.include.length) return this; + + // Nested creation for HasOne/HasMany/BelongsToMany relations + return Promise.map(this._options.include.filter(include => !(include.association instanceof BelongsTo || + include.parent && include.parent.association instanceof BelongsToMany)), include => { + let instances = this.get(include.as); + + if (!instances) return Promise.resolve(); + if (!Array.isArray(instances)) instances = [instances]; + if (!instances.length) return Promise.resolve(); + + const includeOptions = _(Utils.cloneDeep(include)) + .omit(['association']) + .defaults({ + transaction: options.transaction, + logging: options.logging, + parentRecord: this + }).value(); + + // Instances will be updated in place so we can safely treat HasOne like a HasMany + return Promise.map(instances, instance => { + if (include.association instanceof BelongsToMany) { + return instance.save(includeOptions).then(() => { + const values = {}; + values[include.association.foreignKey] = this.get(this.constructor.primaryKeyAttribute, { raw: true }); + values[include.association.otherKey] = instance.get(instance.constructor.primaryKeyAttribute, { raw: true }); + + // Include values defined in the association + Object.assign(values, include.association.through.scope); + if (instance[include.association.through.model.name]) { + for (const attr of Object.keys(include.association.through.model.rawAttributes)) { + if (include.association.through.model.rawAttributes[attr]._autoGenerated || + attr === include.association.foreignKey || + attr === include.association.otherKey || + typeof instance[include.association.through.model.name][attr] === undefined) { + continue; + } + values[attr] = instance[include.association.through.model.name][attr]; + } + } + + return include.association.throughModel.create(values, includeOptions); + }); + } + instance.set(include.association.foreignKey, this.get(include.association.sourceKey || this.constructor.primaryKeyAttribute, { raw: true }), { raw: true }); + Object.assign(instance, include.association.scope); + return instance.save(includeOptions); + }); + }); + }) + .tap(result => { + // Run after hook + if (options.hooks) { + return this.constructor.runHooks(`after${hook}`, result, options); + } + }) + .then(result => { + for (const field of options.fields) { + result._previousDataValues[field] = result.dataValues[field]; + this.changed(field, false); + } + this.isNewRecord = false; + return result; + }); + }); + } + + /** + * Refresh the current instance in-place, i.e. update the object with current data from the DB and return the same object. + * This is different from doing a `find(Instance.id)`, because that would create and return a new instance. With this method, + * all references to the Instance are updated with the new data and no new objects are created. + * + * @see + * {@link Model.findAll} + * + * @param {Object} [options] Options that are passed on to `Model.find` + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * + * @returns {Promise} + */ + reload(options) { + options = Utils.defaults({}, options, { + where: this.where(), + include: this._options.include || null + }); + + return this.constructor.findOne(options) + .tap(reload => { + if (!reload) { + throw new sequelizeErrors.InstanceError( + 'Instance could not be reloaded because it does not exist anymore (find call returned null)' + ); + } + }) + .then(reload => { + // update the internal options of the instance + this._options = reload._options; + // re-set instance values + this.set(reload.dataValues, { + raw: true, + reset: true && !options.attributes + }); + return this; + }); + } + + /** + * Validate the attributes of this instance according to validation rules set in the model definition. + * + * The promise fulfills if and only if validation successful; otherwise it rejects an Error instance containing { field name : [error msgs] } entries. + * + * @param {Object} [options] Options that are passed to the validator + * @param {Array} [options.skip] An array of strings. All properties that are in this array will not be validated + * @param {Array} [options.fields] An array of strings. Only the properties that are in this array will be validated + * @param {boolean} [options.hooks=true] Run before and after validate hooks + * + * @returns {Promise} + */ + validate(options) { + return new InstanceValidator(this, options).validate(); + } + + /** + * This is the same as calling `set` and then calling `save` but it only saves the + * exact values passed to it, making it more atomic and safer. + * + * @see + * {@link Model#set} + * @see + * {@link Model#save} + * + * @param {Object} values See `set` + * @param {Object} options See `save` + * + * @returns {Promise} + */ + update(values, options) { + // Clone values so it doesn't get modified for caller scope and ignore undefined values + values = _.omitBy(values, value => value === undefined); + + const changedBefore = this.changed() || []; + + options = options || {}; + if (Array.isArray(options)) options = { fields: options }; + + options = Utils.cloneDeep(options); + const setOptions = Utils.cloneDeep(options); + setOptions.attributes = options.fields; + this.set(values, setOptions); + + // Now we need to figure out which fields were actually affected by the setter. + const sideEffects = _.without(this.changed(), ...changedBefore); + const fields = _.union(Object.keys(values), sideEffects); + + if (!options.fields) { + options.fields = _.intersection(fields, this.changed()); + options.defaultFields = options.fields; + } + + return this.save(options); + } + + /** + * Destroy the row corresponding to this instance. Depending on your setting for paranoid, the row will either be completely deleted, or have its deletedAt timestamp set to the current time. + * + * @param {Object} [options={}] destroy options + * @param {boolean} [options.force=false] If set to true, paranoid models will actually be deleted + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * + * @returns {Promise} + */ + destroy(options) { + options = Object.assign({ + hooks: true, + force: false + }, options); + + return Promise.try(() => { + // Run before hook + if (options.hooks) { + return this.constructor.runHooks('beforeDestroy', this, options); + } + }).then(() => { + const where = this.where(true); + + if (this.constructor._timestampAttributes.deletedAt && options.force === false) { + const attribute = this.constructor.rawAttributes[this.constructor._timestampAttributes.deletedAt]; + const field = attribute.field || this.constructor._timestampAttributes.deletedAt; + const values = Utils.mapValueFieldNames(this.dataValues, this.changed() || [], this.constructor); + + values[field] = new Date(); + where[field] = Object.prototype.hasOwnProperty.call(attribute, 'defaultValue') + ? attribute.defaultValue + : null; + + this.setDataValue(field, values[field]); + + return this.constructor.QueryInterface.update( + this, this.constructor.getTableName(options), values, where, _.defaults({ hooks: false, model: this.constructor }, options) + ).then(([results, rowsUpdated]) => { + if (this.constructor._versionAttribute && rowsUpdated < 1) { + throw new sequelizeErrors.OptimisticLockError({ + modelName: this.constructor.name, + values, + where + }); + } + return results; + }); + } + return this.constructor.QueryInterface.delete(this, this.constructor.getTableName(options), where, Object.assign({ type: QueryTypes.DELETE, limit: null }, options)); + }).tap(() => { + // Run after hook + if (options.hooks) { + return this.constructor.runHooks('afterDestroy', this, options); + } + }); + } + + /** + * Helper method to determine if a instance is "soft deleted". This is + * particularly useful if the implementer renamed the `deletedAt` attribute + * to something different. This method requires `paranoid` to be enabled. + * + * @returns {boolean} + */ + isSoftDeleted() { + if (!this.constructor._timestampAttributes.deletedAt) { + throw new Error('Model is not paranoid'); + } + + const deletedAtAttribute = this.constructor.rawAttributes[this.constructor._timestampAttributes.deletedAt]; + const defaultValue = Object.prototype.hasOwnProperty.call(deletedAtAttribute, 'defaultValue') ? deletedAtAttribute.defaultValue : null; + const deletedAt = this.get(this.constructor._timestampAttributes.deletedAt) || null; + const isSet = deletedAt !== defaultValue; + + return isSet; + } + + /** + * Restore the row corresponding to this instance. Only available for paranoid models. + * + * @param {Object} [options={}] restore options + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {Transaction} [options.transaction] Transaction to run query under + * + * @returns {Promise} + */ + restore(options) { + if (!this.constructor._timestampAttributes.deletedAt) throw new Error('Model is not paranoid'); + + options = Object.assign({ + hooks: true, + force: false + }, options); + + return Promise.try(() => { + // Run before hook + if (options.hooks) { + return this.constructor.runHooks('beforeRestore', this, options); + } + }).then(() => { + const deletedAtCol = this.constructor._timestampAttributes.deletedAt; + const deletedAtAttribute = this.constructor.rawAttributes[deletedAtCol]; + const deletedAtDefaultValue = Object.prototype.hasOwnProperty.call(deletedAtAttribute, 'defaultValue') ? deletedAtAttribute.defaultValue : null; + + this.setDataValue(deletedAtCol, deletedAtDefaultValue); + return this.save(Object.assign({}, options, { hooks: false, omitNull: false })); + }).tap(() => { + // Run after hook + if (options.hooks) { + return this.constructor.runHooks('afterRestore', this, options); + } + }); + } + + /** + * Increment the value of one or more columns. This is done in the database, which means it does not use the values currently stored on the Instance. The increment is done using a + * ```sql + * SET column = column + X + * ``` + * query. The updated instance will be returned by default in Postgres. However, in other dialects, you will need to do a reload to get the new values. + * + * @example + * instance.increment('number') // increment number by 1 + * + * instance.increment(['number', 'count'], { by: 2 }) // increment number and count by 2 + * + * // increment answer by 42, and tries by 1. + * // `by` is ignored, since each column has its own value + * instance.increment({ answer: 42, tries: 1}, { by: 2 }) + * + * @see + * {@link Model#reload} + * + * @param {string|Array|Object} fields If a string is provided, that column is incremented by the value of `by` given in options. If an array is provided, the same is true for each column. If and object is provided, each column is incremented by the value given. + * @param {Object} [options] options + * @param {number} [options.by=1] The number to increment by + * @param {boolean} [options.silent=false] If true, the updatedAt timestamp will not be updated. + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * @param {boolean} [options.returning=true] Append RETURNING * to get back auto generated values (Postgres only) + * + * @returns {Promise} + * @since 4.0.0 + */ + increment(fields, options) { + const identifier = this.where(); + + options = Utils.cloneDeep(options); + options.where = Object.assign({}, options.where, identifier); + options.instance = this; + + return this.constructor.increment(fields, options).return(this); + } + + /** + * Decrement the value of one or more columns. This is done in the database, which means it does not use the values currently stored on the Instance. The decrement is done using a + * ```sql + * SET column = column - X + * ``` + * query. The updated instance will be returned by default in Postgres. However, in other dialects, you will need to do a reload to get the new values. + * + * @example + * instance.decrement('number') // decrement number by 1 + * + * instance.decrement(['number', 'count'], { by: 2 }) // decrement number and count by 2 + * + * // decrement answer by 42, and tries by 1. + * // `by` is ignored, since each column has its own value + * instance.decrement({ answer: 42, tries: 1}, { by: 2 }) + * + * @see + * {@link Model#reload} + * @param {string|Array|Object} fields If a string is provided, that column is decremented by the value of `by` given in options. If an array is provided, the same is true for each column. If and object is provided, each column is decremented by the value given + * @param {Object} [options] decrement options + * @param {number} [options.by=1] The number to decrement by + * @param {boolean} [options.silent=false] If true, the updatedAt timestamp will not be updated. + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {Transaction} [options.transaction] Transaction to run query under + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * @param {boolean} [options.returning=true] Append RETURNING * to get back auto generated values (Postgres only) + * + * @returns {Promise} + */ + decrement(fields, options) { + options = _.defaults({ increment: false }, options, { + by: 1 + }); + + return this.increment(fields, options); + } + + /** + * Check whether this and `other` Instance refer to the same row + * + * @param {Model} other Other instance to compare against + * + * @returns {boolean} + */ + equals(other) { + if (!other || !other.constructor) { + return false; + } + + if (!(other instanceof this.constructor)) { + return false; + } + + return this.constructor.primaryKeyAttributes.every(attribute => this.get(attribute, { raw: true }) === other.get(attribute, { raw: true })); + } + + /** + * Check if this is equal to one of `others` by calling equals + * + * @param {Array} others An array of instances to check against + * + * @returns {boolean} + */ + equalsOneOf(others) { + return others.some(other => this.equals(other)); + } + + setValidators(attribute, validators) { + this.validators[attribute] = validators; + } + + /** + * Convert the instance to a JSON representation. + * Proxies to calling `get` with no keys. + * This means get all values gotten from the DB, and apply all custom getters. + * + * @see + * {@link Model#get} + * + * @returns {Object} + */ + toJSON() { + return _.cloneDeep( + this.get({ + plain: true + }) + ); + } + + /** + * Creates a 1:m association between this (the source) and the provided target. + * The foreign key is added on the target. + * + * @param {Model} target Target model + * @param {Object} [options] hasMany association options + * @param {boolean} [options.hooks=false] Set to true to run before-/afterDestroy hooks when an associated model is deleted because of a cascade. For example if `User.hasOne(Profile, {onDelete: 'cascade', hooks:true})`, the before-/afterDestroy hooks for profile will be called when a user is deleted. Otherwise the profile will be deleted without invoking any hooks + * @param {string|Object} [options.as] The alias of this model. If you provide a string, it should be plural, and will be singularized using node.inflection. If you want to control the singular version yourself, provide an object with `plural` and `singular` keys. See also the `name` option passed to `sequelize.define`. If you create multiple associations between the same tables, you should provide an alias to be able to distinguish between them. If you provide an alias when creating the association, you should provide the same alias when eager loading and when getting associated models. Defaults to the pluralized name of target + * @param {string|Object} [options.foreignKey] The name of the foreign key in the target table or an object representing the type definition for the foreign column (see `Sequelize.define` for syntax). When using an object, you can add a `name` property to set the name of the column. Defaults to the name of source + primary key of source + * @param {string} [options.sourceKey] The name of the field to use as the key for the association in the source table. Defaults to the primary key of the source table + * @param {Object} [options.scope] A key/value set that will be used for association create and find defaults on the target. (sqlite not supported for N:M) + * @param {string} [options.onDelete='SET NULL|CASCADE'] SET NULL if foreignKey allows nulls, CASCADE if otherwise + * @param {string} [options.onUpdate='CASCADE'] Set `ON UPDATE` + * @param {boolean} [options.constraints=true] Should on update and on delete constraints be enabled on the foreign key. + * + * @returns {HasMany} + * + * @example + * User.hasMany(Profile) // This will add userId to the profile table + */ + static hasMany(target, options) {} // eslint-disable-line + + /** + * Create an N:M association with a join table. Defining `through` is required. + * + * @param {Model} target Target model + * @param {Object} options belongsToMany association options + * @param {boolean} [options.hooks=false] Set to true to run before-/afterDestroy hooks when an associated model is deleted because of a cascade. For example if `User.hasOne(Profile, {onDelete: 'cascade', hooks:true})`, the before-/afterDestroy hooks for profile will be called when a user is deleted. Otherwise the profile will be deleted without invoking any hooks + * @param {Model|string|Object} options.through The name of the table that is used to join source and target in n:m associations. Can also be a sequelize model if you want to define the junction table yourself and add extra attributes to it. + * @param {Model} [options.through.model] The model used to join both sides of the N:M association. + * @param {Object} [options.through.scope] A key/value set that will be used for association create and find defaults on the through model. (Remember to add the attributes to the through model) + * @param {boolean} [options.through.unique=true] If true a unique key will be generated from the foreign keys used (might want to turn this off and create specific unique keys when using scopes) + * @param {string|Object} [options.as] The alias of this association. If you provide a string, it should be plural, and will be singularized using node.inflection. If you want to control the singular version yourself, provide an object with `plural` and `singular` keys. See also the `name` option passed to `sequelize.define`. If you create multiple associations between the same tables, you should provide an alias to be able to distinguish between them. If you provide an alias when creating the association, you should provide the same alias when eager loading and when getting associated models. Defaults to the pluralized name of target + * @param {string|Object} [options.foreignKey] The name of the foreign key in the join table (representing the source model) or an object representing the type definition for the foreign column (see `Sequelize.define` for syntax). When using an object, you can add a `name` property to set the name of the column. Defaults to the name of source + primary key of source + * @param {string|Object} [options.otherKey] The name of the foreign key in the join table (representing the target model) or an object representing the type definition for the other column (see `Sequelize.define` for syntax). When using an object, you can add a `name` property to set the name of the column. Defaults to the name of target + primary key of target + * @param {Object} [options.scope] A key/value set that will be used for association create and find defaults on the target. (sqlite not supported for N:M) + * @param {boolean} [options.timestamps=sequelize.options.timestamps] Should the join model have timestamps + * @param {string} [options.onDelete='SET NULL|CASCADE'] Cascade if this is a n:m, and set null if it is a 1:m + * @param {string} [options.onUpdate='CASCADE'] Sets `ON UPDATE` + * @param {boolean} [options.constraints=true] Should on update and on delete constraints be enabled on the foreign key. + * + * @returns {BelongsToMany} + * + * @example + * // Automagically generated join model + * User.belongsToMany(Project, { through: 'UserProjects' }) + * Project.belongsToMany(User, { through: 'UserProjects' }) + * + * // Join model with additional attributes + * const UserProjects = sequelize.define('UserProjects', { + * started: Sequelize.BOOLEAN + * }) + * User.belongsToMany(Project, { through: UserProjects }) + * Project.belongsToMany(User, { through: UserProjects }) + */ + static belongsToMany(target, options) {} // eslint-disable-line + + /** + * Creates an association between this (the source) and the provided target. The foreign key is added on the target. + * + * @param {Model} target Target model + * @param {Object} [options] hasOne association options + * @param {boolean} [options.hooks=false] Set to true to run before-/afterDestroy hooks when an associated model is deleted because of a cascade. For example if `User.hasOne(Profile, {onDelete: 'cascade', hooks:true})`, the before-/afterDestroy hooks for profile will be called when a user is deleted. Otherwise the profile will be deleted without invoking any hooks + * @param {string} [options.as] The alias of this model, in singular form. See also the `name` option passed to `sequelize.define`. If you create multiple associations between the same tables, you should provide an alias to be able to distinguish between them. If you provide an alias when creating the association, you should provide the same alias when eager loading and when getting associated models. Defaults to the singularized name of target + * @param {string|Object} [options.foreignKey] The name of the foreign key attribute in the target model or an object representing the type definition for the foreign column (see `Sequelize.define` for syntax). When using an object, you can add a `name` property to set the name of the column. Defaults to the name of source + primary key of source + * @param {string} [options.sourceKey] The name of the attribute to use as the key for the association in the source table. Defaults to the primary key of the source table + * @param {string} [options.onDelete='SET NULL|CASCADE'] SET NULL if foreignKey allows nulls, CASCADE if otherwise + * @param {string} [options.onUpdate='CASCADE'] Sets 'ON UPDATE' + * @param {boolean} [options.constraints=true] Should on update and on delete constraints be enabled on the foreign key. + * @param {string} [options.uniqueKey] The custom name for unique constraint. + * + * @returns {HasOne} + * + * @example + * User.hasOne(Profile) // This will add userId to the profile table + */ + static hasOne(target, options) {} // eslint-disable-line + + /** + * Creates an association between this (the source) and the provided target. The foreign key is added on the source. + * + * @param {Model} target The target model + * @param {Object} [options] belongsTo association options + * @param {boolean} [options.hooks=false] Set to true to run before-/afterDestroy hooks when an associated model is deleted because of a cascade. For example if `User.hasOne(Profile, {onDelete: 'cascade', hooks:true})`, the before-/afterDestroy hooks for profile will be called when a user is deleted. Otherwise the profile will be deleted without invoking any hooks + * @param {string} [options.as] The alias of this model, in singular form. See also the `name` option passed to `sequelize.define`. If you create multiple associations between the same tables, you should provide an alias to be able to distinguish between them. If you provide an alias when creating the association, you should provide the same alias when eager loading and when getting associated models. Defaults to the singularized name of target + * @param {string|Object} [options.foreignKey] The name of the foreign key attribute in the source table or an object representing the type definition for the foreign column (see `Sequelize.define` for syntax). When using an object, you can add a `name` property to set the name of the column. Defaults to the name of target + primary key of target + * @param {string} [options.targetKey] The name of the attribute to use as the key for the association in the target table. Defaults to the primary key of the target table + * @param {string} [options.onDelete='SET NULL|NO ACTION'] SET NULL if foreignKey allows nulls, NO ACTION if otherwise + * @param {string} [options.onUpdate='CASCADE'] Sets 'ON UPDATE' + * @param {boolean} [options.constraints=true] Should on update and on delete constraints be enabled on the foreign key. + * + * @returns {BelongsTo} + * + * @example + * Profile.belongsTo(User) // This will add userId to the profile table + */ + static belongsTo(target, options) {} // eslint-disable-line +} + +Object.assign(Model, associationsMixin); +Hooks.applyTo(Model, true); + +module.exports = Model; diff --git a/node_modules/sequelize/lib/operators.js b/node_modules/sequelize/lib/operators.js new file mode 100644 index 00000000..a5b55f9b --- /dev/null +++ b/node_modules/sequelize/lib/operators.js @@ -0,0 +1,90 @@ + +'use strict'; +/** + * Operator symbols to be used when querying data + * + * @see {@link Model#where} + * + * @property eq + * @property ne + * @property gte + * @property gt + * @property lte + * @property lt + * @property not + * @property is + * @property in + * @property notIn + * @property like + * @property notLike + * @property iLike + * @property notILike + * @property startsWith + * @property endsWith + * @property substring + * @property regexp + * @property notRegexp + * @property iRegexp + * @property notIRegexp + * @property between + * @property notBetween + * @property overlap + * @property contains + * @property contained + * @property adjacent + * @property strictLeft + * @property strictRight + * @property noExtendRight + * @property noExtendLeft + * @property and + * @property or + * @property any + * @property all + * @property values + * @property col + * @property placeholder + * @property join + */ +const Op = { + eq: Symbol.for('eq'), + ne: Symbol.for('ne'), + gte: Symbol.for('gte'), + gt: Symbol.for('gt'), + lte: Symbol.for('lte'), + lt: Symbol.for('lt'), + not: Symbol.for('not'), + is: Symbol.for('is'), + in: Symbol.for('in'), + notIn: Symbol.for('notIn'), + like: Symbol.for('like'), + notLike: Symbol.for('notLike'), + iLike: Symbol.for('iLike'), + notILike: Symbol.for('notILike'), + startsWith: Symbol.for('startsWith'), + endsWith: Symbol.for('endsWith'), + substring: Symbol.for('substring'), + regexp: Symbol.for('regexp'), + notRegexp: Symbol.for('notRegexp'), + iRegexp: Symbol.for('iRegexp'), + notIRegexp: Symbol.for('notIRegexp'), + between: Symbol.for('between'), + notBetween: Symbol.for('notBetween'), + overlap: Symbol.for('overlap'), + contains: Symbol.for('contains'), + contained: Symbol.for('contained'), + adjacent: Symbol.for('adjacent'), + strictLeft: Symbol.for('strictLeft'), + strictRight: Symbol.for('strictRight'), + noExtendRight: Symbol.for('noExtendRight'), + noExtendLeft: Symbol.for('noExtendLeft'), + and: Symbol.for('and'), + or: Symbol.for('or'), + any: Symbol.for('any'), + all: Symbol.for('all'), + values: Symbol.for('values'), + col: Symbol.for('col'), + placeholder: Symbol.for('placeholder'), + join: Symbol.for('join') +}; + +module.exports = Op; diff --git a/node_modules/sequelize/lib/promise.js b/node_modules/sequelize/lib/promise.js new file mode 100644 index 00000000..4bc16c1f --- /dev/null +++ b/node_modules/sequelize/lib/promise.js @@ -0,0 +1,7 @@ +'use strict'; + +const Promise = require('bluebird').getNewLibraryCopy(); + +module.exports = Promise; +module.exports.Promise = Promise; +module.exports.default = Promise; diff --git a/node_modules/sequelize/lib/query-interface.js b/node_modules/sequelize/lib/query-interface.js new file mode 100644 index 00000000..95ac40de --- /dev/null +++ b/node_modules/sequelize/lib/query-interface.js @@ -0,0 +1,1455 @@ +'use strict'; + +const _ = require('lodash'); + +const Utils = require('./utils'); +const DataTypes = require('./data-types'); +const SQLiteQueryInterface = require('./dialects/sqlite/query-interface'); +const MSSQLQueryInterface = require('./dialects/mssql/query-interface'); +const MySQLQueryInterface = require('./dialects/mysql/query-interface'); +const PostgresQueryInterface = require('./dialects/postgres/query-interface'); +const Transaction = require('./transaction'); +const Promise = require('./promise'); +const QueryTypes = require('./query-types'); +const Op = require('./operators'); + +/** + * The interface that Sequelize uses to talk to all databases + * + * @class QueryInterface + */ +class QueryInterface { + constructor(sequelize) { + this.sequelize = sequelize; + this.QueryGenerator = this.sequelize.dialect.QueryGenerator; + } + + /** + * Create a database + * + * @param {string} database Database name to create + * @param {Object} [options] Query options + * @param {string} [options.charset] Database default character set, MYSQL only + * @param {string} [options.collate] Database default collation + * @param {string} [options.encoding] Database default character set, PostgreSQL only + * @param {string} [options.ctype] Database character classification, PostgreSQL only + * @param {string} [options.template] The name of the template from which to create the new database, PostgreSQL only + * + * @returns {Promise} + */ + createDatabase(database, options) { + options = options || {}; + const sql = this.QueryGenerator.createDatabaseQuery(database, options); + return this.sequelize.query(sql, options); + } + + /** + * Drop a database + * + * @param {string} database Database name to drop + * @param {Object} [options] Query options + * + * @returns {Promise} + */ + dropDatabase(database, options) { + options = options || {}; + const sql = this.QueryGenerator.dropDatabaseQuery(database); + return this.sequelize.query(sql, options); + } + + /** + * Create a schema + * + * @param {string} schema Schema name to create + * @param {Object} [options] Query options + * + * @returns {Promise} + */ + createSchema(schema, options) { + options = options || {}; + const sql = this.QueryGenerator.createSchema(schema); + return this.sequelize.query(sql, options); + } + + /** + * Drop a schema + * + * @param {string} schema Schema name to drop + * @param {Object} [options] Query options + * + * @returns {Promise} + */ + dropSchema(schema, options) { + options = options || {}; + const sql = this.QueryGenerator.dropSchema(schema); + return this.sequelize.query(sql, options); + } + + /** + * Drop all schemas + * + * @param {Object} [options] Query options + * + * @returns {Promise} + */ + dropAllSchemas(options) { + options = options || {}; + + if (!this.QueryGenerator._dialect.supports.schemas) { + return this.sequelize.drop(options); + } + return this.showAllSchemas(options).map(schemaName => this.dropSchema(schemaName, options)); + } + + /** + * Show all schemas + * + * @param {Object} [options] Query options + * + * @returns {Promise} + */ + showAllSchemas(options) { + options = Object.assign({}, options, { + raw: true, + type: this.sequelize.QueryTypes.SELECT + }); + + const showSchemasSql = this.QueryGenerator.showSchemasQuery(options); + + return this.sequelize.query(showSchemasSql, options).then(schemaNames => _.flatten( + schemaNames.map(value => value.schema_name ? value.schema_name : value) + )); + } + + /** + * Return database version + * + * @param {Object} [options] Query options + * @param {QueryType} [options.type] Query type + * + * @returns {Promise} + * @private + */ + databaseVersion(options) { + return this.sequelize.query( + this.QueryGenerator.versionQuery(), + Object.assign({}, options, { type: QueryTypes.VERSION }) + ); + } + + /** + * Create a table with given set of attributes + * + * ```js + * queryInterface.createTable( + * 'nameOfTheNewTable', + * { + * id: { + * type: Sequelize.INTEGER, + * primaryKey: true, + * autoIncrement: true + * }, + * createdAt: { + * type: Sequelize.DATE + * }, + * updatedAt: { + * type: Sequelize.DATE + * }, + * attr1: Sequelize.STRING, + * attr2: Sequelize.INTEGER, + * attr3: { + * type: Sequelize.BOOLEAN, + * defaultValue: false, + * allowNull: false + * }, + * //foreign key usage + * attr4: { + * type: Sequelize.INTEGER, + * references: { + * model: 'another_table_name', + * key: 'id' + * }, + * onUpdate: 'cascade', + * onDelete: 'cascade' + * } + * }, + * { + * engine: 'MYISAM', // default: 'InnoDB' + * charset: 'latin1', // default: null + * schema: 'public', // default: public, PostgreSQL only. + * comment: 'my table', // comment for table + * collate: 'latin1_danish_ci' // collation, MYSQL only + * } + * ) + * ``` + * + * @param {string} tableName Name of table to create + * @param {Object} attributes Object representing a list of table attributes to create + * @param {Object} [options] create table and query options + * @param {Model} [model] model class + * + * @returns {Promise} + */ + createTable(tableName, attributes, options, model) { + let sql = ''; + let promise; + + options = _.clone(options) || {}; + + if (options && options.uniqueKeys) { + _.forOwn(options.uniqueKeys, uniqueKey => { + if (uniqueKey.customIndex === undefined) { + uniqueKey.customIndex = true; + } + }); + } + + if (model) { + options.uniqueKeys = options.uniqueKeys || model.uniqueKeys; + } + + attributes = _.mapValues( + attributes, + attribute => this.sequelize.normalizeAttribute(attribute) + ); + + // Postgres requires special SQL commands for ENUM/ENUM[] + if (this.sequelize.options.dialect === 'postgres') { + promise = PostgresQueryInterface.ensureEnums(this, tableName, attributes, options, model); + } else { + promise = Promise.resolve(); + } + + if ( + !tableName.schema && + (options.schema || !!model && model._schema) + ) { + tableName = this.QueryGenerator.addSchema({ + tableName, + _schema: !!model && model._schema || options.schema + }); + } + + attributes = this.QueryGenerator.attributesToSQL(attributes, { table: tableName, context: 'createTable' }); + sql = this.QueryGenerator.createTableQuery(tableName, attributes, options); + + return promise.then(() => this.sequelize.query(sql, options)); + } + + /** + * Drop a table from database + * + * @param {string} tableName Table name to drop + * @param {Object} options Query options + * + * @returns {Promise} + */ + dropTable(tableName, options) { + // if we're forcing we should be cascading unless explicitly stated otherwise + options = _.clone(options) || {}; + options.cascade = options.cascade || options.force || false; + + let sql = this.QueryGenerator.dropTableQuery(tableName, options); + + return this.sequelize.query(sql, options).then(() => { + const promises = []; + + // Since postgres has a special case for enums, we should drop the related + // enum type within the table and attribute + if (this.sequelize.options.dialect === 'postgres') { + const instanceTable = this.sequelize.modelManager.getModel(tableName, { attribute: 'tableName' }); + + if (instanceTable) { + const getTableName = (!options || !options.schema || options.schema === 'public' ? '' : `${options.schema}_`) + tableName; + + const keys = Object.keys(instanceTable.rawAttributes); + const keyLen = keys.length; + + for (let i = 0; i < keyLen; i++) { + if (instanceTable.rawAttributes[keys[i]].type instanceof DataTypes.ENUM) { + sql = this.QueryGenerator.pgEnumDrop(getTableName, keys[i]); + options.supportsSearchPath = false; + promises.push(this.sequelize.query(sql, Object.assign({}, options, { raw: true }))); + } + } + } + } + + return Promise.all(promises).get(0); + }); + } + + /** + * Drop all tables from database + * + * @param {Object} [options] query options + * @param {Array} [options.skip] List of table to skip + * + * @returns {Promise} + */ + dropAllTables(options) { + options = options || {}; + const skip = options.skip || []; + + const dropAllTables = tableNames => Promise.each(tableNames, tableName => { + // if tableName is not in the Array of tables names then don't drop it + if (!skip.includes(tableName.tableName || tableName)) { + return this.dropTable(tableName, Object.assign({}, options, { cascade: true }) ); + } + }); + + return this.showAllTables(options).then(tableNames => { + if (this.sequelize.options.dialect === 'sqlite') { + return this.sequelize.query('PRAGMA foreign_keys;', options).then(result => { + const foreignKeysAreEnabled = result.foreign_keys === 1; + + if (foreignKeysAreEnabled) { + return this.sequelize.query('PRAGMA foreign_keys = OFF', options) + .then(() => dropAllTables(tableNames)) + .then(() => this.sequelize.query('PRAGMA foreign_keys = ON', options)); + } + return dropAllTables(tableNames); + }); + } + return this.getForeignKeysForTables(tableNames, options).then(foreignKeys => { + const queries = []; + + tableNames.forEach(tableName => { + let normalizedTableName = tableName; + if (_.isObject(tableName)) { + normalizedTableName = `${tableName.schema}.${tableName.tableName}`; + } + + foreignKeys[normalizedTableName].forEach(foreignKey => { + queries.push(this.QueryGenerator.dropForeignKeyQuery(tableName, foreignKey)); + }); + }); + + return Promise.each(queries, q => this.sequelize.query(q, options)) + .then(() => dropAllTables(tableNames)); + }); + }); + } + + /** + * Drop specified enum from database (Postgres only) + * + * @param {string} [enumName] Enum name to drop + * @param {Object} options Query options + * + * @returns {Promise} + * @private + */ + dropEnum(enumName, options) { + if (this.sequelize.getDialect() !== 'postgres') { + return Promise.resolve(); + } + + options = options || {}; + + return this.sequelize.query( + this.QueryGenerator.pgEnumDrop(null, null, this.QueryGenerator.pgEscapeAndQuote(enumName)), + Object.assign({}, options, { raw: true }) + ); + } + + /** + * Drop all enums from database (Postgres only) + * + * @param {Object} options Query options + * + * @returns {Promise} + * @private + */ + dropAllEnums(options) { + if (this.sequelize.getDialect() !== 'postgres') { + return Promise.resolve(); + } + + options = options || {}; + + return this.pgListEnums(null, options).map(result => this.sequelize.query( + this.QueryGenerator.pgEnumDrop(null, null, this.QueryGenerator.pgEscapeAndQuote(result.enum_name)), + Object.assign({}, options, { raw: true }) + )); + } + + /** + * List all enums (Postgres only) + * + * @param {string} [tableName] Table whose enum to list + * @param {Object} [options] Query options + * + * @returns {Promise} + * @private + */ + pgListEnums(tableName, options) { + options = options || {}; + const sql = this.QueryGenerator.pgListEnums(tableName); + return this.sequelize.query(sql, Object.assign({}, options, { plain: false, raw: true, type: QueryTypes.SELECT })); + } + + /** + * Rename a table + * + * @param {string} before Current name of table + * @param {string} after New name from table + * @param {Object} [options] Query options + * + * @returns {Promise} + */ + renameTable(before, after, options) { + options = options || {}; + const sql = this.QueryGenerator.renameTableQuery(before, after); + return this.sequelize.query(sql, options); + } + + /** + * Get all tables in current database + * + * @param {Object} [options] Query options + * @param {boolean} [options.raw=true] Run query in raw mode + * @param {QueryType} [options.type=QueryType.SHOWTABLE] query type + * + * @returns {Promise} + * @private + */ + showAllTables(options) { + options = Object.assign({}, options, { + raw: true, + type: QueryTypes.SHOWTABLES + }); + + const showTablesSql = this.QueryGenerator.showTablesQuery(); + return this.sequelize.query(showTablesSql, options).then(tableNames => _.flatten(tableNames)); + } + + /** + * Describe a table structure + * + * This method returns an array of hashes containing information about all attributes in the table. + * + * ```js + * { + * name: { + * type: 'VARCHAR(255)', // this will be 'CHARACTER VARYING' for pg! + * allowNull: true, + * defaultValue: null + * }, + * isBetaMember: { + * type: 'TINYINT(1)', // this will be 'BOOLEAN' for pg! + * allowNull: false, + * defaultValue: false + * } + * } + * ``` + * + * @param {string} tableName table name + * @param {Object} [options] Query options + * + * @returns {Promise} + */ + describeTable(tableName, options) { + let schema = null; + let schemaDelimiter = null; + + if (typeof options === 'string') { + schema = options; + } else if (typeof options === 'object' && options !== null) { + schema = options.schema || null; + schemaDelimiter = options.schemaDelimiter || null; + } + + if (typeof tableName === 'object' && tableName !== null) { + schema = tableName.schema; + tableName = tableName.tableName; + } + + const sql = this.QueryGenerator.describeTableQuery(tableName, schema, schemaDelimiter); + options = Object.assign({}, options, { type: QueryTypes.DESCRIBE }); + + return this.sequelize.query(sql, options).then(data => { + /* + * If no data is returned from the query, then the table name may be wrong. + * Query generators that use information_schema for retrieving table info will just return an empty result set, + * it will not throw an error like built-ins do (e.g. DESCRIBE on MySql). + */ + if (_.isEmpty(data)) { + throw new Error(`No description found for "${tableName}" table. Check the table name and schema; remember, they _are_ case sensitive.`); + } + + return data; + }).catch(e => { + if (e.original && e.original.code === 'ER_NO_SUCH_TABLE') { + throw Error(`No description found for "${tableName}" table. Check the table name and schema; remember, they _are_ case sensitive.`); + } + + throw e; + }); + } + + /** + * Add a new column to a table + * + * ```js + * queryInterface.addColumn('tableA', 'columnC', Sequelize.STRING, { + * after: 'columnB' // after option is only supported by MySQL + * }); + * ``` + * + * @param {string} table Table to add column to + * @param {string} key Column name + * @param {Object} attribute Attribute definition + * @param {Object} [options] Query options + * + * @returns {Promise} + */ + addColumn(table, key, attribute, options) { + if (!table || !key || !attribute) { + throw new Error('addColumn takes at least 3 arguments (table, attribute name, attribute definition)'); + } + + options = options || {}; + attribute = this.sequelize.normalizeAttribute(attribute); + return this.sequelize.query(this.QueryGenerator.addColumnQuery(table, key, attribute), options); + } + + /** + * Remove a column from a table + * + * @param {string} tableName Table to remove column from + * @param {string} attributeName Columns name to remove + * @param {Object} [options] Query options + * + * @returns {Promise} + */ + removeColumn(tableName, attributeName, options) { + options = options || {}; + switch (this.sequelize.options.dialect) { + case 'sqlite': + // sqlite needs some special treatment as it cannot drop a column + return SQLiteQueryInterface.removeColumn(this, tableName, attributeName, options); + case 'mssql': + // mssql needs special treatment as it cannot drop a column with a default or foreign key constraint + return MSSQLQueryInterface.removeColumn(this, tableName, attributeName, options); + case 'mysql': + case 'mariadb': + // mysql/mariadb need special treatment as it cannot drop a column with a foreign key constraint + return MySQLQueryInterface.removeColumn(this, tableName, attributeName, options); + default: + return this.sequelize.query(this.QueryGenerator.removeColumnQuery(tableName, attributeName), options); + } + } + + /** + * Change a column definition + * + * @param {string} tableName Table name to change from + * @param {string} attributeName Column name + * @param {Object} dataTypeOrOptions Attribute definition for new column + * @param {Object} [options] Query options + * + * @returns {Promise} + */ + changeColumn(tableName, attributeName, dataTypeOrOptions, options) { + const attributes = {}; + options = options || {}; + + if (_.values(DataTypes).includes(dataTypeOrOptions)) { + attributes[attributeName] = { type: dataTypeOrOptions, allowNull: true }; + } else { + attributes[attributeName] = dataTypeOrOptions; + } + + attributes[attributeName] = this.sequelize.normalizeAttribute(attributes[attributeName]); + + if (this.sequelize.options.dialect === 'sqlite') { + // sqlite needs some special treatment as it cannot change a column + return SQLiteQueryInterface.changeColumn(this, tableName, attributes, options); + } + const query = this.QueryGenerator.attributesToSQL(attributes, { + context: 'changeColumn', + table: tableName + }); + const sql = this.QueryGenerator.changeColumnQuery(tableName, query); + + return this.sequelize.query(sql, options); + } + + /** + * Rename a column + * + * @param {string} tableName Table name whose column to rename + * @param {string} attrNameBefore Current column name + * @param {string} attrNameAfter New column name + * @param {Object} [options] Query option + * + * @returns {Promise} + */ + renameColumn(tableName, attrNameBefore, attrNameAfter, options) { + options = options || {}; + return this.describeTable(tableName, options).then(data => { + if (!data[attrNameBefore]) { + throw new Error(`Table ${tableName} doesn't have the column ${attrNameBefore}`); + } + + data = data[attrNameBefore] || {}; + + const _options = {}; + + _options[attrNameAfter] = { + attribute: attrNameAfter, + type: data.type, + allowNull: data.allowNull, + defaultValue: data.defaultValue + }; + + // fix: a not-null column cannot have null as default value + if (data.defaultValue === null && !data.allowNull) { + delete _options[attrNameAfter].defaultValue; + } + + if (this.sequelize.options.dialect === 'sqlite') { + // sqlite needs some special treatment as it cannot rename a column + return SQLiteQueryInterface.renameColumn(this, tableName, attrNameBefore, attrNameAfter, options); + } + const sql = this.QueryGenerator.renameColumnQuery( + tableName, + attrNameBefore, + this.QueryGenerator.attributesToSQL(_options) + ); + return this.sequelize.query(sql, options); + }); + } + + /** + * Add an index to a column + * + * @param {string|Object} tableName Table name to add index on, can be a object with schema + * @param {Array} [attributes] Use options.fields instead, List of attributes to add index on + * @param {Object} options indexes options + * @param {Array} options.fields List of attributes to add index on + * @param {boolean} [options.concurrently] Pass CONCURRENT so other operations run while the index is created + * @param {boolean} [options.unique] Create a unique index + * @param {string} [options.using] Useful for GIN indexes + * @param {string} [options.operator] Index operator + * @param {string} [options.type] Type of index, available options are UNIQUE|FULLTEXT|SPATIAL + * @param {string} [options.name] Name of the index. Default is
how to create scopesTo invoke scope functions you can doSimple search using AND and =Using greater than, less than etc.Queries using ORincrement number by 1increment number and count by 2increment answer by 42, and decrement tries by 1decrement number by 1decrement number and count by 2decrement answer by 42, and decrement tries by -1
__ + * @param {Object} [options.where] Where condition on index, for partial indexes + * @param {string} [rawTablename] table name, this is just for backward compatibiity + * + * @returns {Promise} + */ + addIndex(tableName, attributes, options, rawTablename) { + // Support for passing tableName, attributes, options or tableName, options (with a fields param which is the attributes) + if (!Array.isArray(attributes)) { + rawTablename = options; + options = attributes; + attributes = options.fields; + } + + if (!rawTablename) { + // Map for backwards compat + rawTablename = tableName; + } + + options = Utils.cloneDeep(options); + options.fields = attributes; + const sql = this.QueryGenerator.addIndexQuery(tableName, options, rawTablename); + return this.sequelize.query(sql, Object.assign({}, options, { supportsSearchPath: false })); + } + + /** + * Show indexes on a table + * + * @param {string} tableName table name + * @param {Object} [options] Query options + * + * @returns {Promise} + * @private + */ + showIndex(tableName, options) { + const sql = this.QueryGenerator.showIndexesQuery(tableName, options); + return this.sequelize.query(sql, Object.assign({}, options, { type: QueryTypes.SHOWINDEXES })); + } + + getForeignKeysForTables(tableNames, options) { + if (tableNames.length === 0) { + return Promise.resolve({}); + } + + options = Object.assign({}, options || {}, { type: QueryTypes.FOREIGNKEYS }); + + return Promise.map(tableNames, tableName => + this.sequelize.query(this.QueryGenerator.getForeignKeysQuery(tableName, this.sequelize.config.database), options) + ).then(results => { + const result = {}; + + tableNames.forEach((tableName, i) => { + if (_.isObject(tableName)) { + tableName = `${tableName.schema}.${tableName.tableName}`; + } + + result[tableName] = Array.isArray(results[i]) + ? results[i].map(r => r.constraint_name) + : [results[i] && results[i].constraint_name]; + + result[tableName] = result[tableName].filter(_.identity); + }); + + return result; + }); + } + + /** + * Get foreign key references details for the table + * + * Those details contains constraintSchema, constraintName, constraintCatalog + * tableCatalog, tableSchema, tableName, columnName, + * referencedTableCatalog, referencedTableCatalog, referencedTableSchema, referencedTableName, referencedColumnName. + * Remind: constraint informations won't return if it's sqlite. + * + * @param {string} tableName table name + * @param {Object} [options] Query options + * + * @returns {Promise} + */ + getForeignKeyReferencesForTable(tableName, options) { + const queryOptions = Object.assign({}, options, { + type: QueryTypes.FOREIGNKEYS + }); + const catalogName = this.sequelize.config.database; + switch (this.sequelize.options.dialect) { + case 'sqlite': + // sqlite needs some special treatment. + return SQLiteQueryInterface.getForeignKeyReferencesForTable(this, tableName, queryOptions); + case 'postgres': + { + // postgres needs some special treatment as those field names returned are all lowercase + // in order to keep same result with other dialects. + const query = this.QueryGenerator.getForeignKeyReferencesQuery(tableName, catalogName); + return this.sequelize.query(query, queryOptions) + .then(result => result.map(Utils.camelizeObjectKeys)); + } + case 'mssql': + case 'mysql': + case 'mariadb': + default: { + const query = this.QueryGenerator.getForeignKeysQuery(tableName, catalogName); + return this.sequelize.query(query, queryOptions); + } + } + } + + /** + * Remove an already existing index from a table + * + * @param {string} tableName Table name to drop index from + * @param {string} indexNameOrAttributes Index name + * @param {Object} [options] Query options + * + * @returns {Promise} + */ + removeIndex(tableName, indexNameOrAttributes, options) { + options = options || {}; + const sql = this.QueryGenerator.removeIndexQuery(tableName, indexNameOrAttributes); + return this.sequelize.query(sql, options); + } + + /** + * Add a constraint to a table + * + * Available constraints: + * - UNIQUE + * - DEFAULT (MSSQL only) + * - CHECK (MySQL - Ignored by the database engine ) + * - FOREIGN KEY + * - PRIMARY KEY + * + * @example + * queryInterface.addConstraint('Users', ['email'], { + * type: 'unique', + * name: 'custom_unique_constraint_name' + * }); + * + * @example + * queryInterface.addConstraint('Users', ['roles'], { + * type: 'check', + * where: { + * roles: ['user', 'admin', 'moderator', 'guest'] + * } + * }); + * + * @example + * queryInterface.addConstraint('Users', ['roles'], { + * type: 'default', + * defaultValue: 'guest' + * }); + * + * @example + * queryInterface.addConstraint('Users', ['username'], { + * type: 'primary key', + * name: 'custom_primary_constraint_name' + * }); + * + * @example + * queryInterface.addConstraint('Posts', ['username'], { + * type: 'foreign key', + * name: 'custom_fkey_constraint_name', + * references: { //Required field + * table: 'target_table_name', + * field: 'target_column_name' + * }, + * onDelete: 'cascade', + * onUpdate: 'cascade' + * }); + * + * @param {string} tableName Table name where you want to add a constraint + * @param {Array} attributes Array of column names to apply the constraint over + * @param {Object} options An object to define the constraint name, type etc + * @param {string} options.type Type of constraint. One of the values in available constraints(case insensitive) + * @param {string} [options.name] Name of the constraint. If not specified, sequelize automatically creates a named constraint based on constraint type, table & column names + * @param {string} [options.defaultValue] The value for the default constraint + * @param {Object} [options.where] Where clause/expression for the CHECK constraint + * @param {Object} [options.references] Object specifying target table, column name to create foreign key constraint + * @param {string} [options.references.table] Target table name + * @param {string} [options.references.field] Target column name + * @param {string} [rawTablename] Table name, for backward compatibility + * + * @returns {Promise} + */ + addConstraint(tableName, attributes, options, rawTablename) { + if (!Array.isArray(attributes)) { + rawTablename = options; + options = attributes; + attributes = options.fields; + } + + if (!options.type) { + throw new Error('Constraint type must be specified through options.type'); + } + + if (!rawTablename) { + // Map for backwards compat + rawTablename = tableName; + } + + options = Utils.cloneDeep(options); + options.fields = attributes; + + if (this.sequelize.dialect.name === 'sqlite') { + return SQLiteQueryInterface.addConstraint(this, tableName, options, rawTablename); + } + const sql = this.QueryGenerator.addConstraintQuery(tableName, options, rawTablename); + return this.sequelize.query(sql, options); + } + + showConstraint(tableName, constraintName, options) { + const sql = this.QueryGenerator.showConstraintsQuery(tableName, constraintName); + return this.sequelize.query(sql, Object.assign({}, options, { type: QueryTypes.SHOWCONSTRAINTS })); + } + + /** + * Remove a constraint from a table + * + * @param {string} tableName Table name to drop constraint from + * @param {string} constraintName Constraint name + * @param {Object} options Query options + * + * @returns {Promise} + */ + removeConstraint(tableName, constraintName, options) { + options = options || {}; + + switch (this.sequelize.options.dialect) { + case 'mysql': + case 'mariadb': + //does not support DROP CONSTRAINT. Instead DROP PRIMARY, FOREIGN KEY, INDEX should be used + return MySQLQueryInterface.removeConstraint(this, tableName, constraintName, options); + case 'sqlite': + return SQLiteQueryInterface.removeConstraint(this, tableName, constraintName, options); + default: + const sql = this.QueryGenerator.removeConstraintQuery(tableName, constraintName); + return this.sequelize.query(sql, options); + } + } + + insert(instance, tableName, values, options) { + options = Utils.cloneDeep(options); + options.hasTrigger = instance && instance.constructor.options.hasTrigger; + const sql = this.QueryGenerator.insertQuery(tableName, values, instance && instance.constructor.rawAttributes, options); + + options.type = QueryTypes.INSERT; + options.instance = instance; + + return this.sequelize.query(sql, options).then(results => { + if (instance) results[0].isNewRecord = false; + return results; + }); + } + + /** + * Upsert + * + * @param {string} tableName table to upsert on + * @param {Object} insertValues values to be inserted, mapped to field name + * @param {Object} updateValues values to be updated, mapped to field name + * @param {Object} where various conditions + * @param {Model} model Model to upsert on + * @param {Object} options query options + * + * @returns {Promise} Resolves an array with + */ + upsert(tableName, insertValues, updateValues, where, model, options) { + const wheres = []; + const attributes = Object.keys(insertValues); + let indexes = []; + let indexFields; + + options = _.clone(options); + + if (!Utils.isWhereEmpty(where)) { + wheres.push(where); + } + + // Lets combine unique keys and indexes into one + indexes = _.map(model.uniqueKeys, value => { + return value.fields; + }); + + model._indexes.forEach(value => { + if (value.unique) { + // fields in the index may both the strings or objects with an attribute property - lets sanitize that + indexFields = value.fields.map(field => { + if (_.isPlainObject(field)) { + return field.attribute; + } + return field; + }); + indexes.push(indexFields); + } + }); + + for (const index of indexes) { + if (_.intersection(attributes, index).length === index.length) { + where = {}; + for (const field of index) { + where[field] = insertValues[field]; + } + wheres.push(where); + } + } + + where = { [Op.or]: wheres }; + + options.type = QueryTypes.UPSERT; + options.raw = true; + + const sql = this.QueryGenerator.upsertQuery(tableName, insertValues, updateValues, where, model, options); + return this.sequelize.query(sql, options).then(result => { + switch (this.sequelize.options.dialect) { + case 'postgres': + return [result.created, result.primary_key]; + + case 'mssql': + return [ + result.$action === 'INSERT', + result[model.primaryKeyField] + ]; + + // MySQL returns 1 for inserted, 2 for updated + // http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html. + case 'mysql': + case 'mariadb': + return [result === 1, undefined]; + + default: + return [result, undefined]; + } + }); + } + + /** + * Insert multiple records into a table + * + * @example + * queryInterface.bulkInsert('roles', [{ + * label: 'user', + * createdAt: new Date(), + * updatedAt: new Date() + * }, { + * label: 'admin', + * createdAt: new Date(), + * updatedAt: new Date() + * }]); + * + * @param {string} tableName Table name to insert record to + * @param {Array} records List of records to insert + * @param {Object} options Various options, please see Model.bulkCreate options + * @param {Object} attributes Various attributes mapped by field name + * + * @returns {Promise} + */ + bulkInsert(tableName, records, options, attributes) { + options = _.clone(options) || {}; + options.type = QueryTypes.INSERT; + + return this.sequelize.query( + this.QueryGenerator.bulkInsertQuery(tableName, records, options, attributes), + options + ).then(results => results[0]); + } + + update(instance, tableName, values, identifier, options) { + options = _.clone(options || {}); + options.hasTrigger = !!(instance && instance._modelOptions && instance._modelOptions.hasTrigger); + + const sql = this.QueryGenerator.updateQuery(tableName, values, identifier, options, instance.constructor.rawAttributes); + + options.type = QueryTypes.UPDATE; + + options.instance = instance; + return this.sequelize.query(sql, options); + } + + /** + * Update multiple records of a table + * + * @example + * queryInterface.bulkUpdate('roles', { + * label: 'admin', + * }, { + * userType: 3, + * }, + * ); + * + * @param {string} tableName Table name to update + * @param {Object} values Values to be inserted, mapped to field name + * @param {Object} identifier A hash with conditions OR an ID as integer OR a string with conditions + * @param {Object} [options] Various options, please see Model.bulkCreate options + * @param {Object} [attributes] Attributes on return objects if supported by SQL dialect + * + * @returns {Promise} + */ + bulkUpdate(tableName, values, identifier, options, attributes) { + options = Utils.cloneDeep(options); + if (typeof identifier === 'object') identifier = Utils.cloneDeep(identifier); + + const sql = this.QueryGenerator.updateQuery(tableName, values, identifier, options, attributes); + const table = _.isObject(tableName) ? tableName : { tableName }; + const model = _.find(this.sequelize.modelManager.models, { tableName: table.tableName }); + + options.model = model; + return this.sequelize.query(sql, options); + } + + delete(instance, tableName, identifier, options) { + const cascades = []; + const sql = this.QueryGenerator.deleteQuery(tableName, identifier, {}, instance.constructor); + + options = _.clone(options) || {}; + + // Check for a restrict field + if (!!instance.constructor && !!instance.constructor.associations) { + const keys = Object.keys(instance.constructor.associations); + const length = keys.length; + let association; + + for (let i = 0; i < length; i++) { + association = instance.constructor.associations[keys[i]]; + if (association.options && association.options.onDelete && + association.options.onDelete.toLowerCase() === 'cascade' && + association.options.useHooks === true) { + cascades.push(association.accessors.get); + } + } + } + + return Promise.each(cascades, cascade => { + return instance[cascade](options).then(instances => { + // Check for hasOne relationship with non-existing associate ("has zero") + if (!instances) { + return Promise.resolve(); + } + + if (!Array.isArray(instances)) instances = [instances]; + + return Promise.each(instances, instance => instance.destroy(options)); + }); + }).then(() => { + options.instance = instance; + return this.sequelize.query(sql, options); + }); + } + + /** + * Delete multiple records from a table + * + * @param {string} tableName table name from where to delete records + * @param {Object} where where conditions to find records to delete + * @param {Object} [options] options + * @param {boolean} [options.truncate] Use truncate table command + * @param {Model} [model] Model + * + * @returns {Promise} + */ + bulkDelete(tableName, where, options, model) { + options = Utils.cloneDeep(options); + options = _.defaults(options, { limit: null }); + + if (options.truncate === true) { + return this.sequelize.query( + this.QueryGenerator.truncateTableQuery(tableName, options), + options + ); + } + + if (typeof identifier === 'object') where = Utils.cloneDeep(where); + + return this.sequelize.query( + this.QueryGenerator.deleteQuery(tableName, where, options, model), + options + ); + } + + select(model, tableName, options) { + options = Utils.cloneDeep(options); + options.type = QueryTypes.SELECT; + options.model = model; + + return this.sequelize.query( + this.QueryGenerator.selectQuery(tableName, options, model), + options + ); + } + + increment(model, tableName, values, identifier, options) { + options = Utils.cloneDeep(options); + + const sql = this.QueryGenerator.arithmeticQuery('+', tableName, values, identifier, options, options.attributes); + + options.type = QueryTypes.UPDATE; + options.model = model; + + return this.sequelize.query(sql, options); + } + + decrement(model, tableName, values, identifier, options) { + options = Utils.cloneDeep(options); + + const sql = this.QueryGenerator.arithmeticQuery('-', tableName, values, identifier, options, options.attributes); + + options.type = QueryTypes.UPDATE; + options.model = model; + + return this.sequelize.query(sql, options); + } + + rawSelect(tableName, options, attributeSelector, Model) { + options = Utils.cloneDeep(options); + options = _.defaults(options, { + raw: true, + plain: true, + type: QueryTypes.SELECT + }); + + const sql = this.QueryGenerator.selectQuery(tableName, options, Model); + + if (attributeSelector === undefined) { + throw new Error('Please pass an attribute selector!'); + } + + return this.sequelize.query(sql, options).then(data => { + if (!options.plain) { + return data; + } + + const result = data ? data[attributeSelector] : null; + + if (!options || !options.dataType) { + return result; + } + + const dataType = options.dataType; + + if (dataType instanceof DataTypes.DECIMAL || dataType instanceof DataTypes.FLOAT) { + if (result !== null) { + return parseFloat(result); + } + } + if (dataType instanceof DataTypes.INTEGER || dataType instanceof DataTypes.BIGINT) { + return parseInt(result, 10); + } + if (dataType instanceof DataTypes.DATE) { + if (result !== null && !(result instanceof Date)) { + return new Date(result); + } + } + return result; + }); + } + + createTrigger(tableName, triggerName, timingType, fireOnArray, functionName, functionParams, optionsArray, options) { + const sql = this.QueryGenerator.createTrigger(tableName, triggerName, timingType, fireOnArray, functionName, functionParams, optionsArray); + options = options || {}; + if (sql) { + return this.sequelize.query(sql, options); + } + return Promise.resolve(); + } + + dropTrigger(tableName, triggerName, options) { + const sql = this.QueryGenerator.dropTrigger(tableName, triggerName); + options = options || {}; + + if (sql) { + return this.sequelize.query(sql, options); + } + return Promise.resolve(); + } + + renameTrigger(tableName, oldTriggerName, newTriggerName, options) { + const sql = this.QueryGenerator.renameTrigger(tableName, oldTriggerName, newTriggerName); + options = options || {}; + + if (sql) { + return this.sequelize.query(sql, options); + } + return Promise.resolve(); + } + + /** + * Create an SQL function + * + * @example + * queryInterface.createFunction( + * 'someFunction', + * [ + * {type: 'integer', name: 'param', direction: 'IN'} + * ], + * 'integer', + * 'plpgsql', + * 'RETURN param + 1;', + * [ + * 'IMMUTABLE', + * 'LEAKPROOF' + * ] + * ); + * + * @param {string} functionName Name of SQL function to create + * @param {Array} params List of parameters declared for SQL function + * @param {string} returnType SQL type of function returned value + * @param {string} language The name of the language that the function is implemented in + * @param {string} body Source code of function + * @param {Array} optionsArray Extra-options for creation + * @param {Object} [options] query options + * @param {boolean} options.force If force is true, any existing functions with the same parameters will be replaced. For postgres, this means using `CREATE OR REPLACE FUNCTION` instead of `CREATE FUNCTION`. Default is false + * + * @returns {Promise} + */ + createFunction(functionName, params, returnType, language, body, optionsArray, options) { + const sql = this.QueryGenerator.createFunction(functionName, params, returnType, language, body, optionsArray, options); + options = options || {}; + + if (sql) { + return this.sequelize.query(sql, options); + } + return Promise.resolve(); + } + + /** + * Drop an SQL function + * + * @example + * queryInterface.dropFunction( + * 'someFunction', + * [ + * {type: 'varchar', name: 'param1', direction: 'IN'}, + * {type: 'integer', name: 'param2', direction: 'INOUT'} + * ] + * ); + * + * @param {string} functionName Name of SQL function to drop + * @param {Array} params List of parameters declared for SQL function + * @param {Object} [options] query options + * + * @returns {Promise} + */ + dropFunction(functionName, params, options) { + const sql = this.QueryGenerator.dropFunction(functionName, params); + options = options || {}; + + if (sql) { + return this.sequelize.query(sql, options); + } + return Promise.resolve(); + } + + /** + * Rename an SQL function + * + * @example + * queryInterface.renameFunction( + * 'fooFunction', + * [ + * {type: 'varchar', name: 'param1', direction: 'IN'}, + * {type: 'integer', name: 'param2', direction: 'INOUT'} + * ], + * 'barFunction' + * ); + * + * @param {string} oldFunctionName Current name of function + * @param {Array} params List of parameters declared for SQL function + * @param {string} newFunctionName New name of function + * @param {Object} [options] query options + * + * @returns {Promise} + */ + renameFunction(oldFunctionName, params, newFunctionName, options) { + const sql = this.QueryGenerator.renameFunction(oldFunctionName, params, newFunctionName); + options = options || {}; + + if (sql) { + return this.sequelize.query(sql, options); + } + return Promise.resolve(); + } + + // Helper methods useful for querying + + /** + * Escape an identifier (e.g. a table or attribute name) + * + * @param {string} identifier identifier to quote + * @param {boolean} [force] If force is true,the identifier will be quoted even if the `quoteIdentifiers` option is false. + * + * @private + */ + quoteIdentifier(identifier, force) { + return this.QueryGenerator.quoteIdentifier(identifier, force); + } + + quoteTable(identifier) { + return this.QueryGenerator.quoteTable(identifier); + } + + /** + * Quote array of identifiers at once + * + * @param {string[]} identifiers array of identifiers to quote + * @param {boolean} [force] If force is true,the identifier will be quoted even if the `quoteIdentifiers` option is false. + * + * @private + */ + quoteIdentifiers(identifiers, force) { + return this.QueryGenerator.quoteIdentifiers(identifiers, force); + } + + /** + * Escape a value (e.g. a string, number or date) + * + * @param {string} value string to escape + * + * @private + */ + escape(value) { + return this.QueryGenerator.escape(value); + } + + setIsolationLevel(transaction, value, options) { + if (!transaction || !(transaction instanceof Transaction)) { + throw new Error('Unable to set isolation level for a transaction without transaction object!'); + } + + if (transaction.parent || !value) { + // Not possible to set a separate isolation level for savepoints + return Promise.resolve(); + } + + options = Object.assign({}, options, { + transaction: transaction.parent || transaction + }); + + const sql = this.QueryGenerator.setIsolationLevelQuery(value, { + parent: transaction.parent + }); + + if (!sql) return Promise.resolve(); + + return this.sequelize.query(sql, options); + } + + startTransaction(transaction, options) { + if (!transaction || !(transaction instanceof Transaction)) { + throw new Error('Unable to start a transaction without transaction object!'); + } + + options = Object.assign({}, options, { + transaction: transaction.parent || transaction + }); + options.transaction.name = transaction.parent ? transaction.name : undefined; + const sql = this.QueryGenerator.startTransactionQuery(transaction); + + return this.sequelize.query(sql, options); + } + + deferConstraints(transaction, options) { + options = Object.assign({}, options, { + transaction: transaction.parent || transaction + }); + + const sql = this.QueryGenerator.deferConstraintsQuery(options); + + if (sql) { + return this.sequelize.query(sql, options); + } + + return Promise.resolve(); + } + + commitTransaction(transaction, options) { + if (!transaction || !(transaction instanceof Transaction)) { + throw new Error('Unable to commit a transaction without transaction object!'); + } + if (transaction.parent) { + // Savepoints cannot be committed + return Promise.resolve(); + } + + options = Object.assign({}, options, { + transaction: transaction.parent || transaction, + supportsSearchPath: false, + completesTransaction: true + }); + + const sql = this.QueryGenerator.commitTransactionQuery(transaction); + const promise = this.sequelize.query(sql, options); + + transaction.finished = 'commit'; + + return promise; + } + + rollbackTransaction(transaction, options) { + if (!transaction || !(transaction instanceof Transaction)) { + throw new Error('Unable to rollback a transaction without transaction object!'); + } + + options = Object.assign({}, options, { + transaction: transaction.parent || transaction, + supportsSearchPath: false, + completesTransaction: true + }); + options.transaction.name = transaction.parent ? transaction.name : undefined; + const sql = this.QueryGenerator.rollbackTransactionQuery(transaction); + const promise = this.sequelize.query(sql, options); + + transaction.finished = 'rollback'; + + return promise; + } +} + +module.exports = QueryInterface; +module.exports.QueryInterface = QueryInterface; +module.exports.default = QueryInterface; diff --git a/node_modules/sequelize/lib/query-types.js b/node_modules/sequelize/lib/query-types.js new file mode 100644 index 00000000..f4bbb272 --- /dev/null +++ b/node_modules/sequelize/lib/query-types.js @@ -0,0 +1,38 @@ +'use strict'; + +/** + * An enum of query types used by `sequelize.query` + * + * @see {@link Sequelize#query} + * + * @property SELECT + * @property INSERT + * @property UPDATE + * @property BULKUPDATE + * @property BULKDELETE + * @property DELETE + * @property UPSERT + * @property VERSION + * @property SHOWTABLES + * @property SHOWINDEXES + * @property DESCRIBE + * @property RAW + * @property FOREIGNKEYS + * @property SHOWCONSTRAINTS + */ +const QueryTypes = module.exports = { // eslint-disable-line + SELECT: 'SELECT', + INSERT: 'INSERT', + UPDATE: 'UPDATE', + BULKUPDATE: 'BULKUPDATE', + BULKDELETE: 'BULKDELETE', + DELETE: 'DELETE', + UPSERT: 'UPSERT', + VERSION: 'VERSION', + SHOWTABLES: 'SHOWTABLES', + SHOWINDEXES: 'SHOWINDEXES', + DESCRIBE: 'DESCRIBE', + RAW: 'RAW', + FOREIGNKEYS: 'FOREIGNKEYS', + SHOWCONSTRAINTS: 'SHOWCONSTRAINTS' +}; diff --git a/node_modules/sequelize/lib/sequelize.js b/node_modules/sequelize/lib/sequelize.js new file mode 100755 index 00000000..9cafead3 --- /dev/null +++ b/node_modules/sequelize/lib/sequelize.js @@ -0,0 +1,1371 @@ +'use strict'; + +const url = require('url'); +const path = require('path'); +const retry = require('retry-as-promised'); +const clsBluebird = require('cls-bluebird'); +const _ = require('lodash'); + +const Utils = require('./utils'); +const Model = require('./model'); +const DataTypes = require('./data-types'); +const Deferrable = require('./deferrable'); +const ModelManager = require('./model-manager'); +const QueryInterface = require('./query-interface'); +const Transaction = require('./transaction'); +const QueryTypes = require('./query-types'); +const TableHints = require('./table-hints'); +const IndexHints = require('./index-hints'); +const sequelizeErrors = require('./errors'); +const Promise = require('./promise'); +const Hooks = require('./hooks'); +const Association = require('./associations/index'); +const Validator = require('./utils/validator-extras').validator; +const Op = require('./operators'); +const deprecations = require('./utils/deprecations'); + +/** + * This is the main class, the entry point to sequelize. + */ +class Sequelize { + /** + * Instantiate sequelize with name of database, username and password. + * + * @example + * // without password / with blank password + * const sequelize = new Sequelize('database', 'username', null, { + * dialect: 'mysql' + * }) + * + * // with password and options + * const sequelize = new Sequelize('my_database', 'john', 'doe', { + * dialect: 'postgres' + * }) + * + * // with database, username, and password in the options object + * const sequelize = new Sequelize({ database, username, password, dialect: 'mssql' }); + * + * // with uri + * const sequelize = new Sequelize('mysql://localhost:3306/database', {}) + * + * // option examples + * const sequelize = new Sequelize('database', 'username', 'password', { + * // the sql dialect of the database + * // currently supported: 'mysql', 'sqlite', 'postgres', 'mssql' + * dialect: 'mysql', + * + * // custom host; default: localhost + * host: 'my.server.tld', + * // for postgres, you can also specify an absolute path to a directory + * // containing a UNIX socket to connect over + * // host: '/sockets/psql_sockets'. + * + * // custom port; default: dialect default + * port: 12345, + * + * // custom protocol; default: 'tcp' + * // postgres only, useful for Heroku + * protocol: null, + * + * // disable logging or provide a custom logging function; default: console.log + * logging: false, + * + * // you can also pass any dialect options to the underlying dialect library + * // - default is empty + * // - currently supported: 'mysql', 'postgres', 'mssql' + * dialectOptions: { + * socketPath: '/Applications/MAMP/tmp/mysql/mysql.sock', + * supportBigNumbers: true, + * bigNumberStrings: true + * }, + * + * // the storage engine for sqlite + * // - default ':memory:' + * storage: 'path/to/database.sqlite', + * + * // disable inserting undefined values as NULL + * // - default: false + * omitNull: true, + * + * // a flag for using a native library or not. + * // in the case of 'pg' -- set this to true will allow SSL support + * // - default: false + * native: true, + * + * // Specify options, which are used when sequelize.define is called. + * // The following example: + * // define: { timestamps: false } + * // is basically the same as: + * // Model.init(attributes, { timestamps: false }); + * // sequelize.define(name, attributes, { timestamps: false }); + * // so defining the timestamps for each model will be not necessary + * define: { + * underscored: false, + * freezeTableName: false, + * charset: 'utf8', + * dialectOptions: { + * collate: 'utf8_general_ci' + * }, + * timestamps: true + * }, + * + * // similar for sync: you can define this to always force sync for models + * sync: { force: true }, + * + * // pool configuration used to pool database connections + * pool: { + * max: 5, + * idle: 30000, + * acquire: 60000, + * }, + * + * // isolation level of each transaction + * // defaults to dialect default + * isolationLevel: Transaction.ISOLATION_LEVELS.REPEATABLE_READ + * }) + * + * @param {string} [database] The name of the database + * @param {string} [username=null] The username which is used to authenticate against the database. + * @param {string} [password=null] The password which is used to authenticate against the database. Supports SQLCipher encryption for SQLite. + * @param {Object} [options={}] An object with options. + * @param {string} [options.host='localhost'] The host of the relational database. + * @param {number} [options.port=] The port of the relational database. + * @param {string} [options.username=null] The username which is used to authenticate against the database. + * @param {string} [options.password=null] The password which is used to authenticate against the database. + * @param {string} [options.database=null] The name of the database + * @param {string} [options.dialect] The dialect of the database you are connecting to. One of mysql, postgres, sqlite and mssql. + * @param {string} [options.dialectModule=null] If specified, use this dialect library. For example, if you want to use pg.js instead of pg when connecting to a pg database, you should specify 'require("pg.js")' here + * @param {string} [options.dialectModulePath=null] If specified, load the dialect library from this path. For example, if you want to use pg.js instead of pg when connecting to a pg database, you should specify '/path/to/pg.js' here + * @param {Object} [options.dialectOptions] An object of additional options, which are passed directly to the connection library + * @param {string} [options.storage] Only used by sqlite. Defaults to ':memory:' + * @param {string} [options.protocol='tcp'] The protocol of the relational database. + * @param {Object} [options.define={}] Default options for model definitions. See {@link Model.init}. + * @param {Object} [options.query={}] Default options for sequelize.query + * @param {string} [options.schema=null] A schema to use + * @param {Object} [options.set={}] Default options for sequelize.set + * @param {Object} [options.sync={}] Default options for sequelize.sync + * @param {string} [options.timezone='+00:00'] The timezone used when converting a date from the database into a JavaScript date. The timezone is also used to SET TIMEZONE when connecting to the server, to ensure that the result of NOW, CURRENT_TIMESTAMP and other time related functions have in the right timezone. For best cross platform performance use the format +/-HH:MM. Will also accept string versions of timezones used by moment.js (e.g. 'America/Los_Angeles'); this is useful to capture daylight savings time changes. + * @param {string|boolean} [options.clientMinMessages='warning'] The PostgreSQL `client_min_messages` session parameter. Set to `false` to not override the database's default. + * @param {boolean} [options.standardConformingStrings=true] The PostgreSQL `standard_conforming_strings` session parameter. Set to `false` to not set the option. WARNING: Setting this to false may expose vulnerabilities and is not recommended! + * @param {Function} [options.logging=console.log] A function that gets executed every time Sequelize would log something. + * @param {boolean} [options.benchmark=false] Pass query execution time in milliseconds as second argument to logging function (options.logging). + * @param {boolean} [options.omitNull=false] A flag that defines if null values should be passed to SQL queries or not. + * @param {boolean} [options.native=false] A flag that defines if native library shall be used or not. Currently only has an effect for postgres + * @param {boolean} [options.replication=false] Use read / write replication. To enable replication, pass an object, with two properties, read and write. Write should be an object (a single server for handling writes), and read an array of object (several servers to handle reads). Each read/write server can have the following properties: `host`, `port`, `username`, `password`, `database` + * @param {Object} [options.pool] sequelize connection pool configuration + * @param {number} [options.pool.max=5] Maximum number of connection in pool + * @param {number} [options.pool.min=0] Minimum number of connection in pool + * @param {number} [options.pool.idle=10000] The maximum time, in milliseconds, that a connection can be idle before being released. + * @param {number} [options.pool.acquire=60000] The maximum time, in milliseconds, that pool will try to get connection before throwing error + * @param {number} [options.pool.evict=1000] The time interval, in milliseconds, after which sequelize-pool will remove idle connections. + * @param {Function} [options.pool.validate] A function that validates a connection. Called with client. The default function checks that client is an object, and that its state is not disconnected + * @param {boolean} [options.quoteIdentifiers=true] Set to `false` to make table names and attributes case-insensitive on Postgres and skip double quoting of them. WARNING: Setting this to false may expose vulnerabilities and is not recommended! + * @param {string} [options.transactionType='DEFERRED'] Set the default transaction type. See `Sequelize.Transaction.TYPES` for possible options. Sqlite only. + * @param {string} [options.isolationLevel] Set the default transaction isolation level. See `Sequelize.Transaction.ISOLATION_LEVELS` for possible options. + * @param {Object} [options.retry] Set of flags that control when a query is automatically retried. + * @param {Array} [options.retry.match] Only retry a query if the error matches one of these strings. + * @param {number} [options.retry.max] How many times a failing query is automatically retried. Set to 0 to disable retrying on SQL_BUSY error. + * @param {boolean} [options.typeValidation=false] Run built in type validators on insert and update, e.g. validate that arguments passed to integer fields are integer-like. + * @param {Object} [options.operatorsAliases] String based operator alias. Pass object to limit set of aliased operators. + * @param {Object} [options.hooks] An object of global hook functions that are called before and after certain lifecycle events. Global hooks will run after any model-specific hooks defined for the same event (See `Sequelize.Model.init()` for a list). Additionally, `beforeConnect()`, `afterConnect()`, `beforeDisconnect()`, and `afterDisconnect()` hooks may be defined here. + */ + constructor(database, username, password, options) { + let config; + + if (arguments.length === 1 && typeof database === 'object') { + // new Sequelize({ ... options }) + options = database; + config = _.pick(options, 'host', 'port', 'database', 'username', 'password'); + } else if (arguments.length === 1 && typeof database === 'string' || arguments.length === 2 && typeof username === 'object') { + // new Sequelize(URI, { ... options }) + + config = {}; + options = username || {}; + + const urlParts = url.parse(arguments[0], true); + + options.dialect = urlParts.protocol.replace(/:$/, ''); + options.host = urlParts.hostname; + + if (options.dialect === 'sqlite' && urlParts.pathname && !urlParts.pathname.startsWith('/:memory')) { + const storagePath = path.join(options.host, urlParts.pathname); + options.storage = path.resolve(options.storage || storagePath); + } + + if (urlParts.pathname) { + config.database = urlParts.pathname.replace(/^\//, ''); + } + + if (urlParts.port) { + options.port = urlParts.port; + } + + if (urlParts.auth) { + const authParts = urlParts.auth.split(':'); + + config.username = authParts[0]; + + if (authParts.length > 1) + config.password = authParts.slice(1).join(':'); + } + + if (urlParts.query) { + if (options.dialectOptions) + Object.assign(options.dialectOptions, urlParts.query); + else + options.dialectOptions = urlParts.query; + } + } else { + // new Sequelize(database, username, password, { ... options }) + options = options || {}; + config = { database, username, password }; + } + + Sequelize.runHooks('beforeInit', config, options); + + this.options = Object.assign({ + dialect: null, + dialectModule: null, + dialectModulePath: null, + host: 'localhost', + protocol: 'tcp', + define: {}, + query: {}, + sync: {}, + timezone: '+00:00', + clientMinMessages: 'warning', + standardConformingStrings: true, + // eslint-disable-next-line no-console + logging: console.log, + omitNull: false, + native: false, + replication: false, + ssl: undefined, + pool: {}, + quoteIdentifiers: true, + hooks: {}, + retry: { + max: 5, + match: [ + 'SQLITE_BUSY: database is locked' + ] + }, + transactionType: Transaction.TYPES.DEFERRED, + isolationLevel: null, + databaseVersion: 0, + typeValidation: false, + benchmark: false + }, options || {}); + + if (!this.options.dialect) { + throw new Error('Dialect needs to be explicitly supplied as of v4.0.0'); + } + + if (this.options.dialect === 'postgresql') { + this.options.dialect = 'postgres'; + } + + if (this.options.dialect === 'sqlite' && this.options.timezone !== '+00:00') { + throw new Error('Setting a custom timezone is not supported by SQLite, dates are always returned as UTC. Please remove the custom timezone parameter.'); + } + + if (this.options.logging === true) { + deprecations.noTrueLogging(); + // eslint-disable-next-line no-console + this.options.logging = console.log; + } + + this._setupHooks(options.hooks); + + this.config = { + database: config.database || this.options.database, + username: config.username || this.options.username, + password: config.password || this.options.password || null, + host: config.host || this.options.host, + port: config.port || this.options.port, + pool: this.options.pool, + protocol: this.options.protocol, + native: this.options.native, + ssl: this.options.ssl, + replication: this.options.replication, + dialectModule: this.options.dialectModule, + dialectModulePath: this.options.dialectModulePath, + keepDefaultTimezone: this.options.keepDefaultTimezone, + dialectOptions: this.options.dialectOptions + }; + + let Dialect; + // Requiring the dialect in a switch-case to keep the + // require calls static. (Browserify fix) + switch (this.getDialect()) { + case 'mariadb': + Dialect = require('./dialects/mariadb'); + break; + case 'mssql': + Dialect = require('./dialects/mssql'); + break; + case 'mysql': + Dialect = require('./dialects/mysql'); + break; + case 'postgres': + Dialect = require('./dialects/postgres'); + break; + case 'sqlite': + Dialect = require('./dialects/sqlite'); + break; + default: + throw new Error(`The dialect ${this.getDialect()} is not supported. Supported dialects: mssql, mariadb, mysql, postgres, and sqlite.`); + } + + this.dialect = new Dialect(this); + this.dialect.QueryGenerator.typeValidation = options.typeValidation; + + if (_.isPlainObject(this.options.operatorsAliases)) { + deprecations.noStringOperators(); + this.dialect.QueryGenerator.setOperatorsAliases(this.options.operatorsAliases); + } else if (typeof this.options.operatorsAliases === 'boolean') { + deprecations.noBoolOperatorAliases(); + } + + this.queryInterface = new QueryInterface(this); + + /** + * Models are stored here under the name given to `sequelize.define` + */ + this.models = {}; + this.modelManager = new ModelManager(this); + this.connectionManager = this.dialect.connectionManager; + + this.importCache = {}; + + Sequelize.runHooks('afterInit', this); + } + + /** + * Refresh data types and parsers. + * + * @private + */ + refreshTypes() { + this.connectionManager.refreshTypeParser(DataTypes); + } + + /** + * Returns the specified dialect. + * + * @returns {string} The specified dialect. + */ + getDialect() { + return this.options.dialect; + } + + /** + * Returns the database name. + * + * @returns {string} The database name. + */ + getDatabaseName() { + return this.config.database; + } + + /** + * Returns an instance of QueryInterface. + * + * @returns {QueryInterface} An instance (singleton) of QueryInterface. + */ + getQueryInterface() { + this.queryInterface = this.queryInterface || new QueryInterface(this); + return this.queryInterface; + } + + /** + * Define a new model, representing a table in the database. + * + * The table columns are defined by the object that is given as the second argument. Each key of the object represents a column + * + * @param {string} modelName The name of the model. The model will be stored in `sequelize.models` under this name + * @param {Object} attributes An object, where each attribute is a column of the table. See {@link Model.init} + * @param {Object} [options] These options are merged with the default define options provided to the Sequelize constructor and passed to Model.init() + * + * @see + * {@link Model.init} for a more comprehensive specification of the `options` and `attributes` objects. + * @see Model definition Manual related to model definition + * @see + * {@link DataTypes} For a list of possible data types + * + * @returns {Model} Newly defined model + * + * @example + * sequelize.define('modelName', { + * columnA: { + * type: Sequelize.BOOLEAN, + * validate: { + * is: ["[a-z]",'i'], // will only allow letters + * max: 23, // only allow values <= 23 + * isIn: { + * args: [['en', 'zh']], + * msg: "Must be English or Chinese" + * } + * }, + * field: 'column_a' + * }, + * columnB: Sequelize.STRING, + * columnC: 'MY VERY OWN COLUMN TYPE' + * }); + * + * sequelize.models.modelName // The model will now be available in models under the name given to define + */ + define(modelName, attributes, options = {}) { + options.modelName = modelName; + options.sequelize = this; + + const model = class extends Model {}; + + model.init(attributes, options); + + return model; + } + + /** + * Fetch a Model which is already defined + * + * @param {string} modelName The name of a model defined with Sequelize.define + * + * @throws Will throw an error if the model is not defined (that is, if sequelize#isDefined returns false) + * @returns {Model} Specified model + */ + model(modelName) { + if (!this.isDefined(modelName)) { + throw new Error(`${modelName} has not been defined`); + } + + return this.modelManager.getModel(modelName); + } + + /** + * Checks whether a model with the given name is defined + * + * @param {string} modelName The name of a model defined with Sequelize.define + * + * @returns {boolean} Returns true if model is already defined, otherwise false + */ + isDefined(modelName) { + return !!this.modelManager.models.find(model => model.name === modelName); + } + + /** + * Imports a model defined in another file. Imported models are cached, so multiple + * calls to import with the same path will not load the file multiple times. + * + * @tutorial https://github.com/sequelize/express-example + * + * @param {string} importPath The path to the file that holds the model you want to import. If the part is relative, it will be resolved relatively to the calling file + * + * @returns {Model} Imported model, returned from cache if was already imported + */ + import(importPath) { + // is it a relative path? + if (path.normalize(importPath) !== path.resolve(importPath)) { + // make path relative to the caller + const callerFilename = Utils.stack()[1].getFileName(); + const callerPath = path.dirname(callerFilename); + + importPath = path.resolve(callerPath, importPath); + } + + if (!this.importCache[importPath]) { + let defineCall = arguments.length > 1 ? arguments[1] : require(importPath); + if (typeof defineCall === 'object') { + // ES6 module compatibility + defineCall = defineCall.default; + } + this.importCache[importPath] = defineCall(this, DataTypes); + } + + return this.importCache[importPath]; + } + + /** + * Execute a query on the DB, with the possibility to bypass all the sequelize goodness. + * + * By default, the function will return two arguments: an array of results, and a metadata object, containing number of affected rows etc. + * + * If you are running a type of query where you don't need the metadata, for example a `SELECT` query, you can pass in a query type to make sequelize format the results: + * + * ```js + * sequelize.query('SELECT...').then(([results, metadata]) => { + * // Raw query - use then plus array spread + * }); + * + * sequelize.query('SELECT...', { type: sequelize.QueryTypes.SELECT }).then(results => { + * // SELECT query - use then + * }) + * ``` + * + * @param {string} sql + * @param {Object} [options={}] Query options. + * @param {boolean} [options.raw] If true, sequelize will not try to format the results of the query, or build an instance of a model from the result + * @param {Transaction} [options.transaction=null] The transaction that the query should be executed under + * @param {QueryTypes} [options.type='RAW'] The type of query you are executing. The query type affects how results are formatted before they are passed back. The type is a string, but `Sequelize.QueryTypes` is provided as convenience shortcuts. + * @param {boolean} [options.nest=false] If true, transforms objects with `.` separated property names into nested objects using [dottie.js](https://github.com/mickhansen/dottie.js). For example { 'user.username': 'john' } becomes { user: { username: 'john' }}. When `nest` is true, the query type is assumed to be `'SELECT'`, unless otherwise specified + * @param {boolean} [options.plain=false] Sets the query type to `SELECT` and return a single row + * @param {Object|Array} [options.replacements] Either an object of named parameter replacements in the format `:param` or an array of unnamed replacements to replace `?` in your SQL. + * @param {Object|Array} [options.bind] Either an object of named bind parameter in the format `_param` or an array of unnamed bind parameter to replace `$1, $2, ...` in your SQL. + * @param {boolean} [options.useMaster=false] Force the query to use the write pool, regardless of the query type. + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {new Model()} [options.instance] A sequelize instance used to build the return instance + * @param {Model} [options.model] A sequelize model used to build the returned model instances (used to be called callee) + * @param {Object} [options.retry] Set of flags that control when a query is automatically retried. + * @param {Array} [options.retry.match] Only retry a query if the error matches one of these strings. + * @param {Integer} [options.retry.max] How many times a failing query is automatically retried. + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * @param {boolean} [options.supportsSearchPath] If false do not prepend the query with the search_path (Postgres only) + * @param {boolean} [options.mapToModel=false] Map returned fields to model's fields if `options.model` or `options.instance` is present. Mapping will occur before building the model instance. + * @param {Object} [options.fieldMap] Map returned fields to arbitrary names for `SELECT` query type. + * + * @returns {Promise} + * + * @see {@link Model.build} for more information about instance option. + */ + + query(sql, options) { + options = Object.assign({}, this.options.query, options); + + if (options.instance && !options.model) { + options.model = options.instance.constructor; + } + + if (!options.instance && !options.model) { + options.raw = true; + } + + // map raw fields to model attributes + if (options.mapToModel) { + options.fieldMap = _.get(options, 'model.fieldAttributeMap', {}); + } + + options = _.defaults(options, { + // eslint-disable-next-line no-console + logging: Object.prototype.hasOwnProperty.call(this.options, 'logging') ? this.options.logging : console.log, + searchPath: Object.prototype.hasOwnProperty.call(this.options, 'searchPath') ? this.options.searchPath : 'DEFAULT' + }); + + if (!options.type) { + if (options.model || options.nest || options.plain) { + options.type = QueryTypes.SELECT; + } else { + options.type = QueryTypes.RAW; + } + } + + //if dialect doesn't support search_path or dialect option + //to prepend searchPath is not true delete the searchPath option + if ( + !this.dialect.supports.searchPath || + !this.options.dialectOptions || + !this.options.dialectOptions.prependSearchPath || + options.supportsSearchPath === false + ) { + delete options.searchPath; + } else if (!options.searchPath) { + //if user wants to always prepend searchPath (dialectOptions.preprendSearchPath = true) + //then set to DEFAULT if none is provided + options.searchPath = 'DEFAULT'; + } + + return Promise.try(() => { + if (typeof sql === 'object') { + if (sql.values !== undefined) { + if (options.replacements !== undefined) { + throw new Error('Both `sql.values` and `options.replacements` cannot be set at the same time'); + } + options.replacements = sql.values; + } + + if (sql.bind !== undefined) { + if (options.bind !== undefined) { + throw new Error('Both `sql.bind` and `options.bind` cannot be set at the same time'); + } + options.bind = sql.bind; + } + + if (sql.query !== undefined) { + sql = sql.query; + } + } + + sql = sql.trim(); + + if (options.replacements && options.bind) { + throw new Error('Both `replacements` and `bind` cannot be set at the same time'); + } + + if (options.replacements) { + if (Array.isArray(options.replacements)) { + sql = Utils.format([sql].concat(options.replacements), this.options.dialect); + } else { + sql = Utils.formatNamedParameters(sql, options.replacements, this.options.dialect); + } + } + + let bindParameters; + + if (options.bind) { + [sql, bindParameters] = this.dialect.Query.formatBindParameters(sql, options.bind, this.options.dialect); + } + + const checkTransaction = () => { + if (options.transaction && options.transaction.finished && !options.completesTransaction) { + const error = new Error(`${options.transaction.finished} has been called on this transaction(${options.transaction.id}), you can no longer use it. (The rejected query is attached as the 'sql' property of this error)`); + error.sql = sql; + throw error; + } + }; + + const retryOptions = Object.assign({}, this.options.retry, options.retry || {}); + + return Promise.resolve(retry(() => Promise.try(() => { + if (options.transaction === undefined && Sequelize._cls) { + options.transaction = Sequelize._cls.get('transaction'); + } + + checkTransaction(); + + return options.transaction + ? options.transaction.connection + : this.connectionManager.getConnection(options); + }).then(connection => { + const query = new this.dialect.Query(connection, this, options); + return this.runHooks('beforeQuery', options, query) + .then(() => checkTransaction()) + .then(() => query.run(sql, bindParameters)) + .finally(() => this.runHooks('afterQuery', options, query)) + .finally(() => { + if (!options.transaction) { + return this.connectionManager.releaseConnection(connection); + } + }); + }), retryOptions)); + }); + } + + /** + * Execute a query which would set an environment or user variable. The variables are set per connection, so this function needs a transaction. + * Only works for MySQL. + * + * @param {Object} variables Object with multiple variables. + * @param {Object} [options] query options. + * @param {Transaction} [options.transaction] The transaction that the query should be executed under + * + * @memberof Sequelize + * + * @returns {Promise} + */ + set(variables, options) { + + // Prepare options + options = Object.assign({}, this.options.set, typeof options === 'object' && options); + + if (this.options.dialect !== 'mysql') { + throw new Error('sequelize.set is only supported for mysql'); + } + if (!options.transaction || !(options.transaction instanceof Transaction) ) { + throw new TypeError('options.transaction is required'); + } + + // Override some options, since this isn't a SELECT + options.raw = true; + options.plain = true; + options.type = 'SET'; + + // Generate SQL Query + const query = + `SET ${ + _.map(variables, (v, k) => `@${k} := ${typeof v === 'string' ? `"${v}"` : v}`).join(', ')}`; + + return this.query(query, options); + } + + /** + * Escape value. + * + * @param {string} value string value to escape + * + * @returns {string} + */ + escape(value) { + return this.getQueryInterface().escape(value); + } + + /** + * Create a new database schema. + * + * **Note:** this is a schema in the [postgres sense of the word](http://www.postgresql.org/docs/9.1/static/ddl-schemas.html), + * not a database table. In mysql and sqlite, this command will do nothing. + * + * @see + * {@link Model.schema} + * + * @param {string} schema Name of the schema + * @param {Object} [options={}] query options + * @param {boolean|Function} [options.logging] A function that logs sql queries, or false for no logging + * + * @returns {Promise} + */ + createSchema(schema, options) { + return this.getQueryInterface().createSchema(schema, options); + } + + /** + * Show all defined schemas + * + * **Note:** this is a schema in the [postgres sense of the word](http://www.postgresql.org/docs/9.1/static/ddl-schemas.html), + * not a database table. In mysql and sqlite, this will show all tables. + * + * @param {Object} [options={}] query options + * @param {boolean|Function} [options.logging] A function that logs sql queries, or false for no logging + * + * @returns {Promise} + */ + showAllSchemas(options) { + return this.getQueryInterface().showAllSchemas(options); + } + + /** + * Drop a single schema + * + * **Note:** this is a schema in the [postgres sense of the word](http://www.postgresql.org/docs/9.1/static/ddl-schemas.html), + * not a database table. In mysql and sqlite, this drop a table matching the schema name + * + * @param {string} schema Name of the schema + * @param {Object} [options={}] query options + * @param {boolean|Function} [options.logging] A function that logs sql queries, or false for no logging + * + * @returns {Promise} + */ + dropSchema(schema, options) { + return this.getQueryInterface().dropSchema(schema, options); + } + + /** + * Drop all schemas. + * + * **Note:** this is a schema in the [postgres sense of the word](http://www.postgresql.org/docs/9.1/static/ddl-schemas.html), + * not a database table. In mysql and sqlite, this is the equivalent of drop all tables. + * + * @param {Object} [options={}] query options + * @param {boolean|Function} [options.logging] A function that logs sql queries, or false for no logging + * + * @returns {Promise} + */ + dropAllSchemas(options) { + return this.getQueryInterface().dropAllSchemas(options); + } + + /** + * Sync all defined models to the DB. + * + * @param {Object} [options={}] sync options + * @param {boolean} [options.force=false] If force is true, each Model will run `DROP TABLE IF EXISTS`, before it tries to create its own table + * @param {RegExp} [options.match] Match a regex against the database name before syncing, a safety check for cases where force: true is used in tests but not live code + * @param {boolean|Function} [options.logging=console.log] A function that logs sql queries, or false for no logging + * @param {string} [options.schema='public'] The schema that the tables should be created in. This can be overridden for each table in sequelize.define + * @param {string} [options.searchPath=DEFAULT] An optional parameter to specify the schema search_path (Postgres only) + * @param {boolean} [options.hooks=true] If hooks is true then beforeSync, afterSync, beforeBulkSync, afterBulkSync hooks will be called + * @param {boolean} [options.alter=false] Alters tables to fit models. Not recommended for production use. Deletes data in columns that were removed or had their type changed in the model. + * + * @returns {Promise} + */ + sync(options) { + options = _.clone(options) || {}; + options.hooks = options.hooks === undefined ? true : !!options.hooks; + options = _.defaults(options, this.options.sync, this.options); + + if (options.match) { + if (!options.match.test(this.config.database)) { + return Promise.reject(new Error(`Database "${this.config.database}" does not match sync match parameter "${options.match}"`)); + } + } + + return Promise.try(() => { + if (options.hooks) { + return this.runHooks('beforeBulkSync', options); + } + }).then(() => { + if (options.force) { + return this.drop(options); + } + }).then(() => { + const models = []; + + // Topologically sort by foreign key constraints to give us an appropriate + // creation order + this.modelManager.forEachModel(model => { + if (model) { + models.push(model); + } else { + // DB should throw an SQL error if referencing non-existent table + } + }); + + // no models defined, just authenticate + if (!models.length) return this.authenticate(options); + + return Promise.each(models, model => model.sync(options)); + }).then(() => { + if (options.hooks) { + return this.runHooks('afterBulkSync', options); + } + }).return(this); + } + + /** + * Truncate all tables defined through the sequelize models. + * This is done by calling `Model.truncate()` on each model. + * + * @param {Object} [options] The options passed to Model.destroy in addition to truncate + * @param {boolean|Function} [options.logging] A function that logs sql queries, or false for no logging + * @returns {Promise} + * + * @see + * {@link Model.truncate} for more information + */ + truncate(options) { + const models = []; + + this.modelManager.forEachModel(model => { + if (model) { + models.push(model); + } + }, { reverse: false }); + + const truncateModel = model => model.truncate(options); + + if (options && options.cascade) { + return Promise.each(models, truncateModel); + } + return Promise.map(models, truncateModel); + } + + /** + * Drop all tables defined through this sequelize instance. + * This is done by calling Model.drop on each model. + * + * @see + * {@link Model.drop} for options + * + * @param {Object} [options] The options passed to each call to Model.drop + * @param {boolean|Function} [options.logging] A function that logs sql queries, or false for no logging + * + * @returns {Promise} + */ + drop(options) { + const models = []; + + this.modelManager.forEachModel(model => { + if (model) { + models.push(model); + } + }, { reverse: false }); + + return Promise.each(models, model => model.drop(options)); + } + + /** + * Test the connection by trying to authenticate. It runs `SELECT 1+1 AS result` query. + * + * @param {Object} [options={}] query options + * + * @returns {Promise} + */ + authenticate(options) { + options = Object.assign({ + raw: true, + plain: true, + type: QueryTypes.SELECT + }, options); + + return this.query('SELECT 1+1 AS result', options).return(); + } + + databaseVersion(options) { + return this.getQueryInterface().databaseVersion(options); + } + + /** + * Get the fn for random based on the dialect + * + * @returns {Sequelize.fn} + */ + random() { + const dia = this.getDialect(); + if (dia === 'postgres' || dia === 'sqlite') { + return this.fn('RANDOM'); + } + return this.fn('RAND'); + } + + /** + * Creates an object representing a database function. This can be used in search queries, both in where and order parts, and as default values in column definitions. + * If you want to refer to columns in your function, you should use `sequelize.col`, so that the columns are properly interpreted as columns and not a strings. + * + * @see + * {@link Model.findAll} + * @see + * {@link Sequelize.define} + * @see + * {@link Sequelize.col} + * + * @param {string} fn The function you want to call + * @param {any} args All further arguments will be passed as arguments to the function + * + * @since v2.0.0-dev3 + * @memberof Sequelize + * @returns {Sequelize.fn} + * + * @example + * instance.update({ + * username: sequelize.fn('upper', sequelize.col('username')) + * }); + */ + static fn(fn, ...args) { + return new Utils.Fn(fn, args); + } + + /** + * Creates an object which represents a column in the DB, this allows referencing another column in your query. This is often useful in conjunction with `sequelize.fn`, since raw string arguments to fn will be escaped. + * + * @see + * {@link Sequelize#fn} + * + * @param {string} col The name of the column + * @since v2.0.0-dev3 + * @memberof Sequelize + * + * @returns {Sequelize.col} + */ + static col(col) { + return new Utils.Col(col); + } + + /** + * Creates an object representing a call to the cast function. + * + * @param {any} val The value to cast + * @param {string} type The type to cast it to + * @since v2.0.0-dev3 + * @memberof Sequelize + * + * @returns {Sequelize.cast} + */ + static cast(val, type) { + return new Utils.Cast(val, type); + } + + /** + * Creates an object representing a literal, i.e. something that will not be escaped. + * + * @param {any} val literal value + * @since v2.0.0-dev3 + * @memberof Sequelize + * + * @returns {Sequelize.literal} + */ + static literal(val) { + return new Utils.Literal(val); + } + + /** + * An AND query + * + * @see + * {@link Model.findAll} + * + * @param {...string|Object} args Each argument will be joined by AND + * @since v2.0.0-dev3 + * @memberof Sequelize + * + * @returns {Sequelize.and} + */ + static and(...args) { + return { [Op.and]: args }; + } + + /** + * An OR query + * + * @see + * {@link Model.findAll} + * + * @param {...string|Object} args Each argument will be joined by OR + * @since v2.0.0-dev3 + * @memberof Sequelize + * + * @returns {Sequelize.or} + */ + static or(...args) { + return { [Op.or]: args }; + } + + /** + * Creates an object representing nested where conditions for postgres/sqlite/mysql json data-type. + * + * @see + * {@link Model.findAll} + * + * @param {string|Object} conditionsOrPath A hash containing strings/numbers or other nested hash, a string using dot notation or a string using postgres/sqlite/mysql json syntax. + * @param {string|number|boolean} [value] An optional value to compare against. Produces a string of the form " = ''". + * @memberof Sequelize + * + * @returns {Sequelize.json} + */ + static json(conditionsOrPath, value) { + return new Utils.Json(conditionsOrPath, value); + } + + /** + * A way of specifying attr = condition. + * + * The attr can either be an object taken from `Model.rawAttributes` (for example `Model.rawAttributes.id` or `Model.rawAttributes.name`). The + * attribute should be defined in your model definition. The attribute can also be an object from one of the sequelize utility functions (`sequelize.fn`, `sequelize.col` etc.) + * + * For string attributes, use the regular `{ where: { attr: something }}` syntax. If you don't want your string to be escaped, use `sequelize.literal`. + * + * @see + * {@link Model.findAll} + * + * @param {Object} attr The attribute, which can be either an attribute object from `Model.rawAttributes` or a sequelize object, for example an instance of `sequelize.fn`. For simple string attributes, use the POJO syntax + * @param {Symbol} [comparator='Op.eq'] operator + * @param {string|Object} logic The condition. Can be both a simply type, or a further condition (`or`, `and`, `.literal` etc.) + * @since v2.0.0-dev3 + */ + static where(attr, comparator, logic) { + return new Utils.Where(attr, comparator, logic); + } + + /** + * Start a transaction. When using transactions, you should pass the transaction in the options argument in order for the query to happen under that transaction @see {@link Transaction} + * + * If you have [CLS](https://github.com/othiym23/node-continuation-local-storage) enabled, the transaction will automatically be passed to any query that runs within the callback + * + * @example + * sequelize.transaction().then(transaction => { + * return User.findOne(..., {transaction}) + * .then(user => user.update(..., {transaction})) + * .then(() => transaction.commit()) + * .catch(() => transaction.rollback()); + * }) + * + * @example + * + * sequelize.transaction(transaction => { // Note that we use a callback rather than a promise.then() + * return User.findOne(..., {transaction}) + * .then(user => user.update(..., {transaction})) + * }).then(() => { + * // Committed + * }).catch(err => { + * // Rolled back + * console.error(err); + * }); + * + * @example + * + * const cls = require('continuation-local-storage'); + * const ns = cls.createNamespace('....'); + * const Sequelize = require('sequelize'); + * Sequelize.useCLS(ns); + * + * // Note, that CLS is enabled for all sequelize instances, and all instances will share the same namespace + * + * @param {Object} [options] Transaction options + * @param {string} [options.type='DEFERRED'] See `Sequelize.Transaction.TYPES` for possible options. Sqlite only. + * @param {string} [options.isolationLevel] See `Sequelize.Transaction.ISOLATION_LEVELS` for possible options + * @param {Function} [options.logging=false] A function that gets executed while running the query to log the sql. + * @param {Function} [autoCallback] The callback is called with the transaction object, and should return a promise. If the promise is resolved, the transaction commits; if the promise rejects, the transaction rolls back + * + * @returns {Promise} + */ + transaction(options, autoCallback) { + if (typeof options === 'function') { + autoCallback = options; + options = undefined; + } + + const transaction = new Transaction(this, options); + + if (!autoCallback) return transaction.prepareEnvironment(false).return(transaction); + + // autoCallback provided + return Sequelize._clsRun(() => { + return transaction.prepareEnvironment() + .then(() => autoCallback(transaction)) + .tap(() => transaction.commit()) + .catch(err => { + // Rollback transaction if not already finished (commit, rollback, etc) + // and reject with original error (ignore any error in rollback) + return Promise.try(() => { + if (!transaction.finished) return transaction.rollback().catch(() => {}); + }).throw(err); + }); + }); + } + + /** + * Use CLS with Sequelize. + * CLS namespace provided is stored as `Sequelize._cls` + * and bluebird Promise is patched to use the namespace, using `cls-bluebird` module. + * + * @param {Object} ns CLS namespace + * @returns {Object} Sequelize constructor + */ + static useCLS(ns) { + // check `ns` is valid CLS namespace + if (!ns || typeof ns !== 'object' || typeof ns.bind !== 'function' || typeof ns.run !== 'function') throw new Error('Must provide CLS namespace'); + + // save namespace as `Sequelize._cls` + this._cls = ns; + + // patch bluebird to bind all promise callbacks to CLS namespace + clsBluebird(ns, Promise); + + // return Sequelize for chaining + return this; + } + + /** + * Run function in CLS context. + * If no CLS context in use, just runs the function normally + * + * @private + * @param {Function} fn Function to run + * @returns {*} Return value of function + */ + static _clsRun(fn) { + const ns = Sequelize._cls; + if (!ns) return fn(); + + let res; + ns.run(context => res = fn(context)); + return res; + } + + log(...args) { + let options; + + const last = _.last(args); + + if (last && _.isPlainObject(last) && Object.prototype.hasOwnProperty.call(last, 'logging')) { + options = last; + + // remove options from set of logged arguments if options.logging is equal to console.log + // eslint-disable-next-line no-console + if (options.logging === console.log) { + args.splice(args.length-1, 1); + } + } else { + options = this.options; + } + + if (options.logging) { + if (options.logging === true) { + deprecations.noTrueLogging(); + // eslint-disable-next-line no-console + options.logging = console.log; + } + + // second argument is sql-timings, when benchmarking option enabled + // eslint-disable-next-line no-console + if ((this.options.benchmark || options.benchmark) && options.logging === console.log) { + args = [`${args[0]} Elapsed time: ${args[1]}ms`]; + } + + options.logging(...args); + } + } + + /** + * Close all connections used by this sequelize instance, and free all references so the instance can be garbage collected. + * + * Normally this is done on process exit, so you only need to call this method if you are creating multiple instances, and want + * to garbage collect some of them. + * + * @returns {Promise} + */ + close() { + return this.connectionManager.close(); + } + + normalizeDataType(Type) { + let type = typeof Type === 'function' ? new Type() : Type; + const dialectTypes = this.dialect.DataTypes || {}; + + if (dialectTypes[type.key]) { + type = dialectTypes[type.key].extend(type); + } + + if (type instanceof DataTypes.ARRAY) { + if (!type.type) { + throw new Error('ARRAY is missing type definition for its values.'); + } + if (dialectTypes[type.type.key]) { + type.type = dialectTypes[type.type.key].extend(type.type); + } + } + + return type; + } + + normalizeAttribute(attribute) { + if (!_.isPlainObject(attribute)) { + attribute = { type: attribute }; + } + + if (!attribute.type) return attribute; + + attribute.type = this.normalizeDataType(attribute.type); + + if (Object.prototype.hasOwnProperty.call(attribute, 'defaultValue')) { + if (typeof attribute.defaultValue === 'function' && ( + attribute.defaultValue === DataTypes.NOW || + attribute.defaultValue === DataTypes.UUIDV1 || + attribute.defaultValue === DataTypes.UUIDV4 + )) { + attribute.defaultValue = new attribute.defaultValue(); + } + } + + if (attribute.type instanceof DataTypes.ENUM) { + // The ENUM is a special case where the type is an object containing the values + if (attribute.values) { + attribute.type.values = attribute.type.options.values = attribute.values; + } else { + attribute.values = attribute.type.values; + } + + if (!attribute.values.length) { + throw new Error('Values for ENUM have not been defined.'); + } + } + + return attribute; + } +} + +// Aliases +Sequelize.prototype.fn = Sequelize.fn; +Sequelize.prototype.col = Sequelize.col; +Sequelize.prototype.cast = Sequelize.cast; +Sequelize.prototype.literal = Sequelize.literal; +Sequelize.prototype.and = Sequelize.and; +Sequelize.prototype.or = Sequelize.or; +Sequelize.prototype.json = Sequelize.json; +Sequelize.prototype.where = Sequelize.where; +Sequelize.prototype.validate = Sequelize.prototype.authenticate; + +/** + * Sequelize version number. + */ +Sequelize.version = require('../package.json').version; + +Sequelize.options = { hooks: {} }; + +/** + * @private + */ +Sequelize.Utils = Utils; + +/** + * Operators symbols to be used for querying data + * @see {@link Operators} + */ +Sequelize.Op = Op; + +/** + * A handy reference to the bluebird Promise class + */ +Sequelize.Promise = Promise; + +/** + * Available table hints to be used for querying data in mssql for table hints + * @see {@link TableHints} + */ +Sequelize.TableHints = TableHints; + +/** + * Available index hints to be used for querying data in mysql for index hints + * @see {@link IndexHints} + */ +Sequelize.IndexHints = IndexHints; + +/** + * A reference to the sequelize transaction class. Use this to access isolationLevels and types when creating a transaction + * @see {@link Transaction} + * @see {@link Sequelize.transaction} + */ +Sequelize.Transaction = Transaction; + +/** + * A reference to Sequelize constructor from sequelize. Useful for accessing DataTypes, Errors etc. + * @see {@link Sequelize} + */ +Sequelize.prototype.Sequelize = Sequelize; + +/** + * Available query types for use with `sequelize.query` + * @see {@link QueryTypes} + */ +Sequelize.prototype.QueryTypes = Sequelize.QueryTypes = QueryTypes; + +/**.Deferrable + * Exposes the validator.js object, so you can extend it with custom validation functions. The validator is exposed both on the instance, and on the constructor. + * @see https://github.com/chriso/validator.js + */ +Sequelize.prototype.Validator = Sequelize.Validator = Validator; + +Sequelize.Model = Model; + +Sequelize.DataTypes = DataTypes; +for (const dataType in DataTypes) { + Sequelize[dataType] = DataTypes[dataType]; +} + +/** + * A reference to the deferrable collection. Use this to access the different deferrable options. + * @see {@link Transaction.Deferrable} + * @see {@link Sequelize#transaction} + */ +Sequelize.Deferrable = Deferrable; + +/** + * A reference to the sequelize association class. + * @see {@link Association} + */ +Sequelize.prototype.Association = Sequelize.Association = Association; + +/** + * Provide alternative version of `inflection` module to be used by `Utils.pluralize` etc. + * @param {Object} _inflection - `inflection` module + */ +Sequelize.useInflection = Utils.useInflection; + +/** + * Allow hooks to be defined on Sequelize + on sequelize instance as universal hooks to run on all models + * and on Sequelize/sequelize methods e.g. Sequelize(), Sequelize#define() + */ +Hooks.applyTo(Sequelize); +Hooks.applyTo(Sequelize.prototype); + +/** + * Expose various errors available + */ + +// expose alias to BaseError +Sequelize.Error = sequelizeErrors.BaseError; + +for (const error of Object.keys(sequelizeErrors)) { + Sequelize[error] = sequelizeErrors[error]; +} + +module.exports = Sequelize; +module.exports.Sequelize = Sequelize; +module.exports.default = Sequelize; diff --git a/node_modules/sequelize/lib/sql-string.js b/node_modules/sequelize/lib/sql-string.js new file mode 100644 index 00000000..2e334309 --- /dev/null +++ b/node_modules/sequelize/lib/sql-string.js @@ -0,0 +1,124 @@ +'use strict'; + +const dataTypes = require('./data-types'); +const { logger } = require('./utils/logger'); + +function arrayToList(array, timeZone, dialect, format) { + return array.reduce((sql, val, i) => { + if (i !== 0) { + sql += ', '; + } + if (Array.isArray(val)) { + sql += `(${arrayToList(val, timeZone, dialect, format)})`; + } else { + sql += escape(val, timeZone, dialect, format); + } + return sql; + }, ''); +} +exports.arrayToList = arrayToList; + +function escape(val, timeZone, dialect, format) { + let prependN = false; + if (val === undefined || val === null) { + return 'NULL'; + } + switch (typeof val) { + case 'boolean': + // SQLite doesn't have true/false support. MySQL aliases true/false to 1/0 + // for us. Postgres actually has a boolean type with true/false literals, + // but sequelize doesn't use it yet. + if (dialect === 'sqlite' || dialect === 'mssql') { + return +!!val; + } + return (!!val).toString(); + case 'number': + return val.toString(); + case 'string': + // In mssql, prepend N to all quoted vals which are originally a string (for + // unicode compatibility) + prependN = dialect === 'mssql'; + break; + } + + if (val instanceof Date) { + val = dataTypes[dialect].DATE.prototype.stringify(val, { timezone: timeZone }); + } + + if (Buffer.isBuffer(val)) { + if (dataTypes[dialect].BLOB) { + return dataTypes[dialect].BLOB.prototype.stringify(val); + } + + return dataTypes.BLOB.prototype.stringify(val); + } + + if (Array.isArray(val)) { + const partialEscape = escVal => escape(escVal, timeZone, dialect, format); + if (dialect === 'postgres' && !format) { + return dataTypes.ARRAY.prototype.stringify(val, { escape: partialEscape }); + } + return arrayToList(val, timeZone, dialect, format); + } + + if (!val.replace) { + throw new Error(`Invalid value ${logger.inspect(val)}`); + } + + if (dialect === 'postgres' || dialect === 'sqlite' || dialect === 'mssql') { + // http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS + // http://stackoverflow.com/q/603572/130598 + val = val.replace(/'/g, "''"); + + if (dialect === 'postgres') { + // null character is not allowed in Postgres + val = val.replace(/\0/g, '\\0'); + } + } else { + // eslint-disable-next-line no-control-regex + val = val.replace(/[\0\n\r\b\t\\'"\x1a]/g, s => { + switch (s) { + case '\0': return '\\0'; + case '\n': return '\\n'; + case '\r': return '\\r'; + case '\b': return '\\b'; + case '\t': return '\\t'; + case '\x1a': return '\\Z'; + default: return `\\${s}`; + } + }); + } + return `${(prependN ? "N'" : "'") + val}'`; +} +exports.escape = escape; + +function format(sql, values, timeZone, dialect) { + values = [].concat(values); + + if (typeof sql !== 'string') { + throw new Error(`Invalid SQL string provided: ${sql}`); + } + + return sql.replace(/\?/g, match => { + if (!values.length) { + return match; + } + + return escape(values.shift(), timeZone, dialect, true); + }); +} +exports.format = format; + +function formatNamedParameters(sql, values, timeZone, dialect) { + return sql.replace(/:+(?!\d)(\w+)/g, (value, key) => { + if ('postgres' === dialect && '::' === value.slice(0, 2)) { + return value; + } + + if (values[key] !== undefined) { + return escape(values[key], timeZone, dialect, true); + } + throw new Error(`Named parameter "${value}" has no value in the given object.`); + }); +} +exports.formatNamedParameters = formatNamedParameters; diff --git a/node_modules/sequelize/lib/table-hints.js b/node_modules/sequelize/lib/table-hints.js new file mode 100644 index 00000000..837b4ae2 --- /dev/null +++ b/node_modules/sequelize/lib/table-hints.js @@ -0,0 +1,38 @@ +'use strict'; + +/** + * An enum of table hints to be used in mssql for querying with table hints + * + * @property NOLOCK + * @property READUNCOMMITTED + * @property UPDLOCK + * @property REPEATABLEREAD + * @property SERIALIZABLE + * @property READCOMMITTED + * @property TABLOCK + * @property TABLOCKX + * @property PAGLOCK + * @property ROWLOCK + * @property NOWAIT + * @property READPAST + * @property XLOCK + * @property SNAPSHOT + * @property NOEXPAND + */ +const TableHints = module.exports = { // eslint-disable-line + NOLOCK: 'NOLOCK', + READUNCOMMITTED: 'READUNCOMMITTED', + UPDLOCK: 'UPDLOCK', + REPEATABLEREAD: 'REPEATABLEREAD', + SERIALIZABLE: 'SERIALIZABLE', + READCOMMITTED: 'READCOMMITTED', + TABLOCK: 'TABLOCK', + TABLOCKX: 'TABLOCKX', + PAGLOCK: 'PAGLOCK', + ROWLOCK: 'ROWLOCK', + NOWAIT: 'NOWAIT', + READPAST: 'READPAST', + XLOCK: 'XLOCK', + SNAPSHOT: 'SNAPSHOT', + NOEXPAND: 'NOEXPAND' +}; diff --git a/node_modules/sequelize/lib/transaction.js b/node_modules/sequelize/lib/transaction.js new file mode 100644 index 00000000..a197f2e5 --- /dev/null +++ b/node_modules/sequelize/lib/transaction.js @@ -0,0 +1,316 @@ +'use strict'; + +const Promise = require('./promise'); + +/** + * The transaction object is used to identify a running transaction. + * It is created by calling `Sequelize.transaction()`. + * To run a query under a transaction, you should pass the transaction in the options object. + * + * @class Transaction + * @see {@link Sequelize.transaction} + */ +class Transaction { + /** + * Creates a new transaction instance + * + * @param {Sequelize} sequelize A configured sequelize Instance + * @param {Object} options An object with options + * @param {string} options.type=true Sets the type of the transaction. + * @param {string} options.isolationLevel=true Sets the isolation level of the transaction. + * @param {string} options.deferrable Sets the constraints to be deferred or immediately checked. + */ + constructor(sequelize, options) { + this.sequelize = sequelize; + this.savepoints = []; + this._afterCommitHooks = []; + + // get dialect specific transaction options + const generateTransactionId = this.sequelize.dialect.QueryGenerator.generateTransactionId; + + this.options = Object.assign({ + type: sequelize.options.transactionType, + isolationLevel: sequelize.options.isolationLevel, + readOnly: false + }, options || {}); + + this.parent = this.options.transaction; + this.id = this.parent ? this.parent.id : generateTransactionId(); + + if (this.parent) { + this.id = this.parent.id; + this.parent.savepoints.push(this); + this.name = `${this.id}-sp-${this.parent.savepoints.length}`; + } else { + this.id = this.name = generateTransactionId(); + } + + delete this.options.transaction; + } + + /** + * Commit the transaction + * + * @returns {Promise} + */ + commit() { + if (this.finished) { + return Promise.reject(new Error(`Transaction cannot be committed because it has been finished with state: ${this.finished}`)); + } + + this._clearCls(); + + return this + .sequelize + .getQueryInterface() + .commitTransaction(this, this.options) + .finally(() => { + this.finished = 'commit'; + if (!this.parent) { + return this.cleanup(); + } + return null; + }).tap( + () => Promise.each( + this._afterCommitHooks, + hook => Promise.resolve(hook.apply(this, [this]))) + ); + } + + /** + * Rollback (abort) the transaction + * + * @returns {Promise} + */ + rollback() { + if (this.finished) { + return Promise.reject(new Error(`Transaction cannot be rolled back because it has been finished with state: ${this.finished}`)); + } + + if (!this.connection) { + return Promise.reject(new Error('Transaction cannot be rolled back because it never started')); + } + + this._clearCls(); + + return this + .sequelize + .getQueryInterface() + .rollbackTransaction(this, this.options) + .finally(() => { + if (!this.parent) { + return this.cleanup(); + } + return this; + }); + } + + prepareEnvironment(useCLS) { + let connectionPromise; + + if (useCLS === undefined) { + useCLS = true; + } + + if (this.parent) { + connectionPromise = Promise.resolve(this.parent.connection); + } else { + const acquireOptions = { uuid: this.id }; + if (this.options.readOnly) { + acquireOptions.type = 'SELECT'; + } + connectionPromise = this.sequelize.connectionManager.getConnection(acquireOptions); + } + + return connectionPromise + .then(connection => { + this.connection = connection; + this.connection.uuid = this.id; + }) + .then(() => { + return this.begin() + .then(() => this.setDeferrable()) + .then(() => this.setIsolationLevel()) + .catch(setupErr => this.rollback().finally(() => { + throw setupErr; + })); + }) + .tap(() => { + if (useCLS && this.sequelize.constructor._cls) { + this.sequelize.constructor._cls.set('transaction', this); + } + return null; + }); + } + + begin() { + return this + .sequelize + .getQueryInterface() + .startTransaction(this, this.options); + } + + setDeferrable() { + if (this.options.deferrable) { + return this + .sequelize + .getQueryInterface() + .deferConstraints(this, this.options); + } + } + + setIsolationLevel() { + return this + .sequelize + .getQueryInterface() + .setIsolationLevel(this, this.options.isolationLevel, this.options); + } + + cleanup() { + const res = this.sequelize.connectionManager.releaseConnection(this.connection); + this.connection.uuid = undefined; + return res; + } + + _clearCls() { + const cls = this.sequelize.constructor._cls; + + if (cls) { + if (cls.get('transaction') === this) { + cls.set('transaction', null); + } + } + } + + /** + * A hook that is run after a transaction is committed + * + * @param {Function} fn A callback function that is called with the committed transaction + * @name afterCommit + * @memberof Sequelize.Transaction + */ + afterCommit(fn) { + if (!fn || typeof fn !== 'function') { + throw new Error('"fn" must be a function'); + } + this._afterCommitHooks.push(fn); + } + + /** + * Types can be set per-transaction by passing `options.type` to `sequelize.transaction`. + * Default to `DEFERRED` but you can override the default type by passing `options.transactionType` in `new Sequelize`. + * Sqlite only. + * + * Pass in the desired level as the first argument: + * + * @example + * return sequelize.transaction({type: Sequelize.Transaction.TYPES.EXCLUSIVE}, transaction => { + * // your transactions + * }).then(result => { + * // transaction has been committed. Do something after the commit if required. + * }).catch(err => { + * // do something with the err. + * }); + * + * @property DEFERRED + * @property IMMEDIATE + * @property EXCLUSIVE + */ + static get TYPES() { + return { + DEFERRED: 'DEFERRED', + IMMEDIATE: 'IMMEDIATE', + EXCLUSIVE: 'EXCLUSIVE' + }; + } + + /** + * Isolation levels can be set per-transaction by passing `options.isolationLevel` to `sequelize.transaction`. + * Sequelize uses the default isolation level of the database, you can override this by passing `options.isolationLevel` in Sequelize constructor options. + * + * Pass in the desired level as the first argument: + * + * @example + * return sequelize.transaction({isolationLevel: Sequelize.Transaction.ISOLATION_LEVELS.SERIALIZABLE}, transaction => { + * // your transactions + * }).then(result => { + * // transaction has been committed. Do something after the commit if required. + * }).catch(err => { + * // do something with the err. + * }); + * + * @property READ_UNCOMMITTED + * @property READ_COMMITTED + * @property REPEATABLE_READ + * @property SERIALIZABLE + */ + static get ISOLATION_LEVELS() { + return { + READ_UNCOMMITTED: 'READ UNCOMMITTED', + READ_COMMITTED: 'READ COMMITTED', + REPEATABLE_READ: 'REPEATABLE READ', + SERIALIZABLE: 'SERIALIZABLE' + }; + } + + + /** + * Possible options for row locking. Used in conjunction with `find` calls: + * + * @example + * // t1 is a transaction + * Model.findAll({ + * where: ..., + * transaction: t1, + * lock: t1.LOCK... + * }); + * + * @example + * UserModel.findAll({ + * where: ..., + * include: [TaskModel, ...], + * transaction: t1, + * lock: { + * level: t1.LOCK..., + * of: UserModel + * } + * }); + * + * # UserModel will be locked but TaskModel won't! + * + * @example + * // t1 is a transaction + * Model.findAll({ + * where: ..., + * transaction: t1, + * lock: true, + * skipLocked: true + * }); + * # The query will now return any rows that aren't locked by another transaction + * + * @returns {Object} + * @property UPDATE + * @property SHARE + * @property KEY_SHARE Postgres 9.3+ only + * @property NO_KEY_UPDATE Postgres 9.3+ only + */ + static get LOCK() { + return { + UPDATE: 'UPDATE', + SHARE: 'SHARE', + KEY_SHARE: 'KEY SHARE', + NO_KEY_UPDATE: 'NO KEY UPDATE' + }; + } + + /** + * Please see {@link Transaction.LOCK} + */ + get LOCK() { + return Transaction.LOCK; + } +} + +module.exports = Transaction; +module.exports.Transaction = Transaction; +module.exports.default = Transaction; diff --git a/node_modules/sequelize/lib/utils.js b/node_modules/sequelize/lib/utils.js new file mode 100644 index 00000000..71cc53fd --- /dev/null +++ b/node_modules/sequelize/lib/utils.js @@ -0,0 +1,637 @@ +'use strict'; + +const DataTypes = require('./data-types'); +const SqlString = require('./sql-string'); +const _ = require('lodash'); +const uuidv1 = require('uuid/v1'); +const uuidv4 = require('uuid/v4'); +const Promise = require('./promise'); +const operators = require('./operators'); +const operatorsSet = new Set(_.values(operators)); + +let inflection = require('inflection'); + +exports.classToInvokable = require('./utils/classToInvokable').classToInvokable; + +exports.Promise = Promise; + +function useInflection(_inflection) { + inflection = _inflection; +} +exports.useInflection = useInflection; + +function camelizeIf(str, condition) { + let result = str; + + if (condition) { + result = camelize(str); + } + + return result; +} +exports.camelizeIf = camelizeIf; + +function underscoredIf(str, condition) { + let result = str; + + if (condition) { + result = underscore(str); + } + + return result; +} +exports.underscoredIf = underscoredIf; + +function isPrimitive(val) { + const type = typeof val; + return type === 'string' || type === 'number' || type === 'boolean'; +} +exports.isPrimitive = isPrimitive; + +// Same concept as _.merge, but don't overwrite properties that have already been assigned +function mergeDefaults(a, b) { + return _.mergeWith(a, b, objectValue => { + // If it's an object, let _ handle it this time, we will be called again for each property + if (!_.isPlainObject(objectValue) && objectValue !== undefined) { + return objectValue; + } + }); +} +exports.mergeDefaults = mergeDefaults; + +// An alternative to _.merge, which doesn't clone its arguments +// Cloning is a bad idea because options arguments may contain references to sequelize +// models - which again reference database libs which don't like to be cloned (in particular pg-native) +function merge() { + const result = {}; + + for (const obj of arguments) { + _.forOwn(obj, (value, key) => { + if (value !== undefined) { + if (!result[key]) { + result[key] = value; + } else if (_.isPlainObject(value) && _.isPlainObject(result[key])) { + result[key] = merge(result[key], value); + } else if (Array.isArray(value) && Array.isArray(result[key])) { + result[key] = value.concat(result[key]); + } else { + result[key] = value; + } + } + }); + } + + return result; +} +exports.merge = merge; + +function spliceStr(str, index, count, add) { + return str.slice(0, index) + add + str.slice(index + count); +} +exports.spliceStr = spliceStr; + +function camelize(str) { + return str.trim().replace(/[-_\s]+(.)?/g, (match, c) => c.toUpperCase()); +} +exports.camelize = camelize; + +function underscore(str) { + return inflection.underscore(str); +} +exports.underscore = underscore; + +function singularize(str) { + return inflection.singularize(str); +} +exports.singularize = singularize; + +function pluralize(str) { + return inflection.pluralize(str); +} +exports.pluralize = pluralize; + +function format(arr, dialect) { + const timeZone = null; + // Make a clone of the array beacuse format modifies the passed args + return SqlString.format(arr[0], arr.slice(1), timeZone, dialect); +} +exports.format = format; + +function formatNamedParameters(sql, parameters, dialect) { + const timeZone = null; + return SqlString.formatNamedParameters(sql, parameters, timeZone, dialect); +} +exports.formatNamedParameters = formatNamedParameters; + +function cloneDeep(obj, onlyPlain) { + obj = obj || {}; + return _.cloneDeepWith(obj, elem => { + // Do not try to customize cloning of arrays or POJOs + if (Array.isArray(elem) || _.isPlainObject(elem)) { + return undefined; + } + + // If we specified to clone only plain objects & arrays, we ignore everyhing else + // In any case, don't clone stuff that's an object, but not a plain one - fx example sequelize models and instances + if (onlyPlain || typeof elem === 'object') { + return elem; + } + + // Preserve special data-types like `fn` across clones. _.get() is used for checking up the prototype chain + if (elem && typeof elem.clone === 'function') { + return elem.clone(); + } + }); +} +exports.cloneDeep = cloneDeep; + +/* Expand and normalize finder options */ +function mapFinderOptions(options, Model) { + if (options.attributes && Array.isArray(options.attributes)) { + options.attributes = Model._injectDependentVirtualAttributes(options.attributes); + options.attributes = options.attributes.filter(v => !Model._virtualAttributes.has(v)); + } + + mapOptionFieldNames(options, Model); + + return options; +} +exports.mapFinderOptions = mapFinderOptions; + +/* Used to map field names in attributes and where conditions */ +function mapOptionFieldNames(options, Model) { + if (Array.isArray(options.attributes)) { + options.attributes = options.attributes.map(attr => { + // Object lookups will force any variable to strings, we don't want that for special objects etc + if (typeof attr !== 'string') return attr; + // Map attributes to aliased syntax attributes + if (Model.rawAttributes[attr] && attr !== Model.rawAttributes[attr].field) { + return [Model.rawAttributes[attr].field, attr]; + } + return attr; + }); + } + + if (options.where && _.isPlainObject(options.where)) { + options.where = mapWhereFieldNames(options.where, Model); + } + + return options; +} +exports.mapOptionFieldNames = mapOptionFieldNames; + +function mapWhereFieldNames(attributes, Model) { + if (attributes) { + getComplexKeys(attributes).forEach(attribute => { + const rawAttribute = Model.rawAttributes[attribute]; + + if (rawAttribute && rawAttribute.field !== rawAttribute.fieldName) { + attributes[rawAttribute.field] = attributes[attribute]; + delete attributes[attribute]; + } + + if (_.isPlainObject(attributes[attribute]) + && !(rawAttribute && ( + rawAttribute.type instanceof DataTypes.HSTORE + || rawAttribute.type instanceof DataTypes.JSON))) { // Prevent renaming of HSTORE & JSON fields + attributes[attribute] = mapOptionFieldNames({ + where: attributes[attribute] + }, Model).where; + } + + if (Array.isArray(attributes[attribute])) { + attributes[attribute].forEach((where, index) => { + if (_.isPlainObject(where)) { + attributes[attribute][index] = mapWhereFieldNames(where, Model); + } + }); + } + + }); + } + + return attributes; +} +exports.mapWhereFieldNames = mapWhereFieldNames; + +/* Used to map field names in values */ +function mapValueFieldNames(dataValues, fields, Model) { + const values = {}; + + for (const attr of fields) { + if (dataValues[attr] !== undefined && !Model._virtualAttributes.has(attr)) { + // Field name mapping + if (Model.rawAttributes[attr] && Model.rawAttributes[attr].field && Model.rawAttributes[attr].field !== attr) { + values[Model.rawAttributes[attr].field] = dataValues[attr]; + } else { + values[attr] = dataValues[attr]; + } + } + } + + return values; +} +exports.mapValueFieldNames = mapValueFieldNames; + +function isColString(value) { + return typeof value === 'string' && value[0] === '$' && value[value.length - 1] === '$'; +} +exports.isColString = isColString; + +function canTreatArrayAsAnd(arr) { + return arr.some(arg => _.isPlainObject(arg)); +} +exports.canTreatArrayAsAnd = canTreatArrayAsAnd; + +function combineTableNames(tableName1, tableName2) { + return tableName1.toLowerCase() < tableName2.toLowerCase() ? tableName1 + tableName2 : tableName2 + tableName1; +} +exports.combineTableNames = combineTableNames; + +function toDefaultValue(value, dialect) { + if (typeof value === 'function') { + const tmp = value(); + if (tmp instanceof DataTypes.ABSTRACT) { + return tmp.toSql(); + } + return tmp; + } + if (value instanceof DataTypes.UUIDV1) { + return uuidv1(); + } + if (value instanceof DataTypes.UUIDV4) { + return uuidv4(); + } + if (value instanceof DataTypes.NOW) { + return now(dialect); + } + if (_.isPlainObject(value) || Array.isArray(value)) { + return _.clone(value); + } + return value; +} +exports.toDefaultValue = toDefaultValue; + +/** + * Determine if the default value provided exists and can be described + * in a db schema using the DEFAULT directive. + * + * @param {*} value Any default value. + * @returns {boolean} yes / no. + * @private + */ +function defaultValueSchemable(value) { + if (value === undefined) { return false; } + + // TODO this will be schemable when all supported db + // have been normalized for this case + if (value instanceof DataTypes.NOW) { return false; } + + if (value instanceof DataTypes.UUIDV1 || value instanceof DataTypes.UUIDV4) { return false; } + + return typeof value !== 'function'; +} +exports.defaultValueSchemable = defaultValueSchemable; + +function removeNullValuesFromHash(hash, omitNull, options) { + let result = hash; + + options = options || {}; + options.allowNull = options.allowNull || []; + + if (omitNull) { + const _hash = {}; + + _.forIn(hash, (val, key) => { + if (options.allowNull.includes(key) || key.endsWith('Id') || val !== null && val !== undefined) { + _hash[key] = val; + } + }); + + result = _hash; + } + + return result; +} +exports.removeNullValuesFromHash = removeNullValuesFromHash; + +function stack() { + const orig = Error.prepareStackTrace; + Error.prepareStackTrace = (_, stack) => stack; + const err = new Error(); + Error.captureStackTrace(err, stack); + const errStack = err.stack; + Error.prepareStackTrace = orig; + return errStack; +} +exports.stack = stack; + +const dialects = new Set(['mariadb', 'mysql', 'postgres', 'sqlite', 'mssql']); + +function now(dialect) { + const d = new Date(); + if (!dialects.has(dialect)) { + d.setMilliseconds(0); + } + return d; +} +exports.now = now; + +// Note: Use the `quoteIdentifier()` and `escape()` methods on the +// `QueryInterface` instead for more portable code. + +const TICK_CHAR = '`'; +exports.TICK_CHAR = TICK_CHAR; + +function addTicks(s, tickChar) { + tickChar = tickChar || TICK_CHAR; + return tickChar + removeTicks(s, tickChar) + tickChar; +} +exports.addTicks = addTicks; + +function removeTicks(s, tickChar) { + tickChar = tickChar || TICK_CHAR; + return s.replace(new RegExp(tickChar, 'g'), ''); +} +exports.removeTicks = removeTicks; + +/** + * Receives a tree-like object and returns a plain object which depth is 1. + * + * - Input: + * + * { + * name: 'John', + * address: { + * street: 'Fake St. 123', + * coordinates: { + * longitude: 55.6779627, + * latitude: 12.5964313 + * } + * } + * } + * + * - Output: + * + * { + * name: 'John', + * address.street: 'Fake St. 123', + * address.coordinates.latitude: 55.6779627, + * address.coordinates.longitude: 12.5964313 + * } + * + * @param {Object} value an Object + * @returns {Object} a flattened object + * @private + */ +function flattenObjectDeep(value) { + if (!_.isPlainObject(value)) return value; + const flattenedObj = {}; + + function flattenObject(obj, subPath) { + Object.keys(obj).forEach(key => { + const pathToProperty = subPath ? `${subPath}.${key}` : key; + if (typeof obj[key] === 'object' && obj[key] !== null) { + flattenObject(obj[key], pathToProperty); + } else { + flattenedObj[pathToProperty] = _.get(obj, key); + } + }); + return flattenedObj; + } + + return flattenObject(value, undefined); +} +exports.flattenObjectDeep = flattenObjectDeep; + +/** + * Utility functions for representing SQL functions, and columns that should be escaped. + * Please do not use these functions directly, use Sequelize.fn and Sequelize.col instead. + * @private + */ +class SequelizeMethod {} +exports.SequelizeMethod = SequelizeMethod; + +class Fn extends SequelizeMethod { + constructor(fn, args) { + super(); + this.fn = fn; + this.args = args; + } + clone() { + return new Fn(this.fn, this.args); + } +} +exports.Fn = Fn; + +class Col extends SequelizeMethod { + constructor(col, ...args) { + super(); + if (args.length > 0) { + col = args; + } + this.col = col; + } +} +exports.Col = Col; + +class Cast extends SequelizeMethod { + constructor(val, type, json) { + super(); + this.val = val; + this.type = (type || '').trim(); + this.json = json || false; + } +} +exports.Cast = Cast; + +class Literal extends SequelizeMethod { + constructor(val) { + super(); + this.val = val; + } +} +exports.Literal = Literal; + +class Json extends SequelizeMethod { + constructor(conditionsOrPath, value) { + super(); + if (_.isObject(conditionsOrPath)) { + this.conditions = conditionsOrPath; + } else { + this.path = conditionsOrPath; + if (value) { + this.value = value; + } + } + } +} +exports.Json = Json; + +class Where extends SequelizeMethod { + constructor(attribute, comparator, logic) { + super(); + if (logic === undefined) { + logic = comparator; + comparator = '='; + } + + this.attribute = attribute; + this.comparator = comparator; + this.logic = logic; + } +} +exports.Where = Where; + +//Collection of helper methods to make it easier to work with symbol operators + +/** + * getOperators + * + * @param {Object} obj + * @returns {Array} All operators properties of obj + * @private + */ +function getOperators(obj) { + return Object.getOwnPropertySymbols(obj).filter(s => operatorsSet.has(s)); +} +exports.getOperators = getOperators; + +/** + * getComplexKeys + * + * @param {Object} obj + * @returns {Array} All keys including operators + * @private + */ +function getComplexKeys(obj) { + return getOperators(obj).concat(Object.keys(obj)); +} +exports.getComplexKeys = getComplexKeys; + +/** + * getComplexSize + * + * @param {Object|Array} obj + * @returns {number} Length of object properties including operators if obj is array returns its length + * @private + */ +function getComplexSize(obj) { + return Array.isArray(obj) ? obj.length : getComplexKeys(obj).length; +} +exports.getComplexSize = getComplexSize; + +/** + * Returns true if a where clause is empty, even with Symbols + * + * @param {Object} obj + * @returns {boolean} + * @private + */ +function isWhereEmpty(obj) { + return !!obj && _.isEmpty(obj) && getOperators(obj).length === 0; +} +exports.isWhereEmpty = isWhereEmpty; + +/** + * Returns ENUM name by joining table and column name + * + * @param {string} tableName + * @param {string} columnName + * @returns {string} + * @private + */ +function generateEnumName(tableName, columnName) { + return `enum_${tableName}_${columnName}`; +} +exports.generateEnumName = generateEnumName; + +/** + * Returns an new Object which keys are camelized + * + * @param {Object} obj + * @returns {string} + * @private + */ +function camelizeObjectKeys(obj) { + const newObj = new Object(); + Object.keys(obj).forEach(key => { + newObj[camelize(key)] = obj[key]; + }); + return newObj; +} +exports.camelizeObjectKeys = camelizeObjectKeys; + +/** + * Assigns own and inherited enumerable string and symbol keyed properties of source + * objects to the destination object. + * + * https://lodash.com/docs/4.17.4#defaults + * + * **Note:** This method mutates `object`. + * + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @private + */ +function defaults(object, ...sources) { + object = Object(object); + + sources.forEach(source => { + if (source) { + source = Object(source); + + getComplexKeys(source).forEach(key => { + const value = object[key]; + if ( + value === undefined || + _.eq(value, Object.prototype[key]) && + !Object.prototype.hasOwnProperty.call(object, key) + + ) { + object[key] = source[key]; + } + }); + } + }); + + return object; +} +exports.defaults = defaults; + +/** + * + * @param {Object} index + * @param {Array} index.fields + * @param {string} [index.name] + * @param {string|Object} tableName + * + * @returns {Object} + * @private + */ +function nameIndex(index, tableName) { + if (tableName.tableName) tableName = tableName.tableName; + + if (!Object.prototype.hasOwnProperty.call(index, 'name')) { + const fields = index.fields.map( + field => typeof field === 'string' ? field : field.name || field.attribute + ); + index.name = underscore(`${tableName}_${fields.join('_')}`); + } + + return index; +} +exports.nameIndex = nameIndex; + +/** + * Checks if 2 arrays intersect. + * + * @param {Array} arr1 + * @param {Array} arr2 + * @private + */ +function intersects(arr1, arr2) { + return arr1.some(v => arr2.includes(v)); +} +exports.intersects = intersects; diff --git a/node_modules/sequelize/lib/utils/classToInvokable.js b/node_modules/sequelize/lib/utils/classToInvokable.js new file mode 100644 index 00000000..0bc63c51 --- /dev/null +++ b/node_modules/sequelize/lib/utils/classToInvokable.js @@ -0,0 +1,24 @@ +'use strict'; + +/** + * Wraps a constructor to not need the `new` keyword using a proxy. + * Only used for data types. + * + * @param {Function} Class The class instance to wrap as invocable. + * @returns {Proxy} Wrapped class instance. + * @private + */ +function classToInvokable(Class) { + return new Proxy(Class, { + apply(Target, thisArg, args) { + return new Target(...args); + }, + construct(Target, args) { + return new Target(...args); + }, + get(target, p) { + return target[p]; + } + }); +} +exports.classToInvokable = classToInvokable; diff --git a/node_modules/sequelize/lib/utils/deprecations.js b/node_modules/sequelize/lib/utils/deprecations.js new file mode 100644 index 00000000..3d284ee8 --- /dev/null +++ b/node_modules/sequelize/lib/utils/deprecations.js @@ -0,0 +1,11 @@ +'use strict'; + +const { deprecate } = require('util'); + +const noop = () => {}; + +exports.noRawAttributes = deprecate(noop, 'Use sequelize.fn / sequelize.literal to construct attributes', 'SEQUELIZE0001'); +exports.noTrueLogging = deprecate(noop, 'The logging-option should be either a function or false. Default: console.log', 'SEQUELIZE0002'); +exports.noStringOperators = deprecate(noop, 'String based operators are deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/querying.html#operators', 'SEQUELIZE0003'); +exports.noBoolOperatorAliases = deprecate(noop, 'A boolean value was passed to options.operatorsAliases. This is a no-op with v5 and should be removed.', 'SEQUELIZE0004'); +exports.noDoubleNestedGroup = deprecate(noop, 'Passing a double nested nested array to `group` is unsupported and will be removed in v6.', 'SEQUELIZE0005'); diff --git a/node_modules/sequelize/lib/utils/logger.js b/node_modules/sequelize/lib/utils/logger.js new file mode 100644 index 00000000..13c160de --- /dev/null +++ b/node_modules/sequelize/lib/utils/logger.js @@ -0,0 +1,39 @@ +'use strict'; + +/** + * Sequelize module for debug and deprecation messages. + * It require a `context` for which messages will be printed. + * + * @module logging + * @private + */ + +const debug = require('debug'); +const util = require('util'); + +class Logger { + constructor(config) { + + this.config = Object.assign({ + context: 'sequelize', + debug: true + }, config); + } + + warn(message) { + // eslint-disable-next-line no-console + console.warn(`(${this.config.context}) Warning: ${message}`); + } + + inspect(value) { + return util.inspect(value, false, 3); + } + + debugContext(name) { + return debug(`${this.config.context}:${name}`); + } +} + +exports.logger = new Logger(); + +exports.Logger = Logger; diff --git a/node_modules/sequelize/lib/utils/validator-extras.js b/node_modules/sequelize/lib/utils/validator-extras.js new file mode 100644 index 00000000..6c554aa8 --- /dev/null +++ b/node_modules/sequelize/lib/utils/validator-extras.js @@ -0,0 +1,102 @@ +'use strict'; + +const _ = require('lodash'); +const validator = _.cloneDeep(require('validator')); +const moment = require('moment'); + +const extensions = { + extend(name, fn) { + this[name] = fn; + + return this; + }, + notEmpty(str) { + return !str.match(/^[\s\t\r\n]*$/); + }, + len(str, min, max) { + return this.isLength(str, min, max); + }, + isUrl(str) { + return this.isURL(str); + }, + isIPv6(str) { + return this.isIP(str, 6); + }, + isIPv4(str) { + return this.isIP(str, 4); + }, + notIn(str, values) { + return !this.isIn(str, values); + }, + regex(str, pattern, modifiers) { + str += ''; + if (Object.prototype.toString.call(pattern).slice(8, -1) !== 'RegExp') { + pattern = new RegExp(pattern, modifiers); + } + return str.match(pattern); + }, + notRegex(str, pattern, modifiers) { + return !this.regex(str, pattern, modifiers); + }, + isDecimal(str) { + return str !== '' && !!str.match(/^(?:-?(?:[0-9]+))?(?:\.[0-9]*)?(?:[eE][+-]?(?:[0-9]+))?$/); + }, + min(str, val) { + const number = parseFloat(str); + return isNaN(number) || number >= val; + }, + max(str, val) { + const number = parseFloat(str); + return isNaN(number) || number <= val; + }, + not(str, pattern, modifiers) { + return this.notRegex(str, pattern, modifiers); + }, + contains(str, elem) { + return !!elem && str.includes(elem); + }, + notContains(str, elem) { + return !this.contains(str, elem); + }, + is(str, pattern, modifiers) { + return this.regex(str, pattern, modifiers); + } +}; +exports.extensions = extensions; + +// instance based validators +validator.isImmutable = function(value, validatorArgs, field, modelInstance) { + return modelInstance.isNewRecord || modelInstance.dataValues[field] === modelInstance._previousDataValues[field]; +}; + +// extra validators +validator.notNull = function(val) { + return val !== null && val !== undefined; +}; + +// https://github.com/chriso/validator.js/blob/6.2.0/validator.js +_.forEach(extensions, (extend, key) => { + validator[key] = extend; +}); + +// map isNull to isEmpty +// https://github.com/chriso/validator.js/commit/e33d38a26ee2f9666b319adb67c7fc0d3dea7125 +validator.isNull = validator.isEmpty; + +// isDate removed in 7.0.0 +// https://github.com/chriso/validator.js/commit/095509fc707a4dc0e99f85131df1176ad6389fc9 +validator.isDate = function(dateString) { + // avoid http://momentjs.com/guides/#/warnings/js-date/ + // by doing a preliminary check on `dateString` + const parsed = Date.parse(dateString); + if (isNaN(parsed)) { + // fail if we can't parse it + return false; + } + // otherwise convert to ISO 8601 as moment prefers + // http://momentjs.com/docs/#/parsing/string/ + const date = new Date(parsed); + return moment(date.toISOString()).isValid(); +}; + +exports.validator = validator; diff --git a/node_modules/sequelize/node_modules/.bin/semver b/node_modules/sequelize/node_modules/.bin/semver new file mode 120000 index 00000000..5aaadf42 --- /dev/null +++ b/node_modules/sequelize/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/sequelize/node_modules/.bin/uuid b/node_modules/sequelize/node_modules/.bin/uuid new file mode 120000 index 00000000..740f800c --- /dev/null +++ b/node_modules/sequelize/node_modules/.bin/uuid @@ -0,0 +1 @@ +../../../uuid/bin/uuid \ No newline at end of file diff --git a/node_modules/sequelize/node_modules/debug/CHANGELOG.md b/node_modules/sequelize/node_modules/debug/CHANGELOG.md new file mode 100644 index 00000000..820d21e3 --- /dev/null +++ b/node_modules/sequelize/node_modules/debug/CHANGELOG.md @@ -0,0 +1,395 @@ + +3.1.0 / 2017-09-26 +================== + + * Add `DEBUG_HIDE_DATE` env var (#486) + * Remove ReDoS regexp in %o formatter (#504) + * Remove "component" from package.json + * Remove `component.json` + * Ignore package-lock.json + * Examples: fix colors printout + * Fix: browser detection + * Fix: spelling mistake (#496, @EdwardBetts) + +3.0.1 / 2017-08-24 +================== + + * Fix: Disable colors in Edge and Internet Explorer (#489) + +3.0.0 / 2017-08-08 +================== + + * Breaking: Remove DEBUG_FD (#406) + * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418) + * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408) + * Addition: document `enabled` flag (#465) + * Addition: add 256 colors mode (#481) + * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440) + * Update: component: update "ms" to v2.0.0 + * Update: separate the Node and Browser tests in Travis-CI + * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots + * Update: separate Node.js and web browser examples for organization + * Update: update "browserify" to v14.4.0 + * Fix: fix Readme typo (#473) + +2.6.9 / 2017-09-22 +================== + + * remove ReDoS regexp in %o formatter (#504) + +2.6.8 / 2017-05-18 +================== + + * Fix: Check for undefined on browser globals (#462, @marbemac) + +2.6.7 / 2017-05-16 +================== + + * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) + * Fix: Inline extend function in node implementation (#452, @dougwilson) + * Docs: Fix typo (#455, @msasad) + +2.6.5 / 2017-04-27 +================== + + * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) + * Misc: clean up browser reference checks (#447, @thebigredgeek) + * Misc: add npm-debug.log to .gitignore (@thebigredgeek) + + +2.6.4 / 2017-04-20 +================== + + * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) + * Chore: ignore bower.json in npm installations. (#437, @joaovieira) + * Misc: update "ms" to v0.7.3 (@tootallnate) + +2.6.3 / 2017-03-13 +================== + + * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) + * Docs: Changelog fix (@thebigredgeek) + +2.6.2 / 2017-03-10 +================== + + * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) + * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) + * Docs: Add Slackin invite badge (@tootallnate) + +2.6.1 / 2017-02-10 +================== + + * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error + * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) + * Fix: IE8 "Expected identifier" error (#414, @vgoma) + * Fix: Namespaces would not disable once enabled (#409, @musikov) + +2.6.0 / 2016-12-28 +================== + + * Fix: added better null pointer checks for browser useColors (@thebigredgeek) + * Improvement: removed explicit `window.debug` export (#404, @tootallnate) + * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) + +2.5.2 / 2016-12-25 +================== + + * Fix: reference error on window within webworkers (#393, @KlausTrainer) + * Docs: fixed README typo (#391, @lurch) + * Docs: added notice about v3 api discussion (@thebigredgeek) + +2.5.1 / 2016-12-20 +================== + + * Fix: babel-core compatibility + +2.5.0 / 2016-12-20 +================== + + * Fix: wrong reference in bower file (@thebigredgeek) + * Fix: webworker compatibility (@thebigredgeek) + * Fix: output formatting issue (#388, @kribblo) + * Fix: babel-loader compatibility (#383, @escwald) + * Misc: removed built asset from repo and publications (@thebigredgeek) + * Misc: moved source files to /src (#378, @yamikuronue) + * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) + * Test: coveralls integration (#378, @yamikuronue) + * Docs: simplified language in the opening paragraph (#373, @yamikuronue) + +2.4.5 / 2016-12-17 +================== + + * Fix: `navigator` undefined in Rhino (#376, @jochenberger) + * Fix: custom log function (#379, @hsiliev) + * Improvement: bit of cleanup + linting fixes (@thebigredgeek) + * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) + * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) + +2.4.4 / 2016-12-14 +================== + + * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) + +2.4.3 / 2016-12-14 +================== + + * Fix: navigation.userAgent error for react native (#364, @escwald) + +2.4.2 / 2016-12-14 +================== + + * Fix: browser colors (#367, @tootallnate) + * Misc: travis ci integration (@thebigredgeek) + * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) + +2.4.1 / 2016-12-13 +================== + + * Fix: typo that broke the package (#356) + +2.4.0 / 2016-12-13 +================== + + * Fix: bower.json references unbuilt src entry point (#342, @justmatt) + * Fix: revert "handle regex special characters" (@tootallnate) + * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) + * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) + * Improvement: allow colors in workers (#335, @botverse) + * Improvement: use same color for same namespace. (#338, @lchenay) + +2.3.3 / 2016-11-09 +================== + + * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) + * Fix: Returning `localStorage` saved values (#331, Levi Thomason) + * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) + +2.3.2 / 2016-11-09 +================== + + * Fix: be super-safe in index.js as well (@TooTallNate) + * Fix: should check whether process exists (Tom Newby) + +2.3.1 / 2016-11-09 +================== + + * Fix: Added electron compatibility (#324, @paulcbetts) + * Improvement: Added performance optimizations (@tootallnate) + * Readme: Corrected PowerShell environment variable example (#252, @gimre) + * Misc: Removed yarn lock file from source control (#321, @fengmk2) + +2.3.0 / 2016-11-07 +================== + + * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) + * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) + * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) + * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) + * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) + * Package: Update "ms" to 0.7.2 (#315, @DevSide) + * Package: removed superfluous version property from bower.json (#207 @kkirsche) + * Readme: fix USE_COLORS to DEBUG_COLORS + * Readme: Doc fixes for format string sugar (#269, @mlucool) + * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) + * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) + * Readme: better docs for browser support (#224, @matthewmueller) + * Tooling: Added yarn integration for development (#317, @thebigredgeek) + * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) + * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) + * Misc: Updated contributors (@thebigredgeek) + +2.2.0 / 2015-05-09 +================== + + * package: update "ms" to v0.7.1 (#202, @dougwilson) + * README: add logging to file example (#193, @DanielOchoa) + * README: fixed a typo (#191, @amir-s) + * browser: expose `storage` (#190, @stephenmathieson) + * Makefile: add a `distclean` target (#189, @stephenmathieson) + +2.1.3 / 2015-03-13 +================== + + * Updated stdout/stderr example (#186) + * Updated example/stdout.js to match debug current behaviour + * Renamed example/stderr.js to stdout.js + * Update Readme.md (#184) + * replace high intensity foreground color for bold (#182, #183) + +2.1.2 / 2015-03-01 +================== + + * dist: recompile + * update "ms" to v0.7.0 + * package: update "browserify" to v9.0.3 + * component: fix "ms.js" repo location + * changed bower package name + * updated documentation about using debug in a browser + * fix: security error on safari (#167, #168, @yields) + +2.1.1 / 2014-12-29 +================== + + * browser: use `typeof` to check for `console` existence + * browser: check for `console.log` truthiness (fix IE 8/9) + * browser: add support for Chrome apps + * Readme: added Windows usage remarks + * Add `bower.json` to properly support bower install + +2.1.0 / 2014-10-15 +================== + + * node: implement `DEBUG_FD` env variable support + * package: update "browserify" to v6.1.0 + * package: add "license" field to package.json (#135, @panuhorsmalahti) + +2.0.0 / 2014-09-01 +================== + + * package: update "browserify" to v5.11.0 + * node: use stderr rather than stdout for logging (#29, @stephenmathieson) + +1.0.4 / 2014-07-15 +================== + + * dist: recompile + * example: remove `console.info()` log usage + * example: add "Content-Type" UTF-8 header to browser example + * browser: place %c marker after the space character + * browser: reset the "content" color via `color: inherit` + * browser: add colors support for Firefox >= v31 + * debug: prefer an instance `log()` function over the global one (#119) + * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) + +1.0.3 / 2014-07-09 +================== + + * Add support for multiple wildcards in namespaces (#122, @seegno) + * browser: fix lint + +1.0.2 / 2014-06-10 +================== + + * browser: update color palette (#113, @gscottolson) + * common: make console logging function configurable (#108, @timoxley) + * node: fix %o colors on old node <= 0.8.x + * Makefile: find node path using shell/which (#109, @timoxley) + +1.0.1 / 2014-06-06 +================== + + * browser: use `removeItem()` to clear localStorage + * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) + * package: add "contributors" section + * node: fix comment typo + * README: list authors + +1.0.0 / 2014-06-04 +================== + + * make ms diff be global, not be scope + * debug: ignore empty strings in enable() + * node: make DEBUG_COLORS able to disable coloring + * *: export the `colors` array + * npmignore: don't publish the `dist` dir + * Makefile: refactor to use browserify + * package: add "browserify" as a dev dependency + * Readme: add Web Inspector Colors section + * node: reset terminal color for the debug content + * node: map "%o" to `util.inspect()` + * browser: map "%j" to `JSON.stringify()` + * debug: add custom "formatters" + * debug: use "ms" module for humanizing the diff + * Readme: add "bash" syntax highlighting + * browser: add Firebug color support + * browser: add colors for WebKit browsers + * node: apply log to `console` + * rewrite: abstract common logic for Node & browsers + * add .jshintrc file + +0.8.1 / 2014-04-14 +================== + + * package: re-add the "component" section + +0.8.0 / 2014-03-30 +================== + + * add `enable()` method for nodejs. Closes #27 + * change from stderr to stdout + * remove unnecessary index.js file + +0.7.4 / 2013-11-13 +================== + + * remove "browserify" key from package.json (fixes something in browserify) + +0.7.3 / 2013-10-30 +================== + + * fix: catch localStorage security error when cookies are blocked (Chrome) + * add debug(err) support. Closes #46 + * add .browser prop to package.json. Closes #42 + +0.7.2 / 2013-02-06 +================== + + * fix package.json + * fix: Mobile Safari (private mode) is broken with debug + * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript + +0.7.1 / 2013-02-05 +================== + + * add repository URL to package.json + * add DEBUG_COLORED to force colored output + * add browserify support + * fix component. Closes #24 + +0.7.0 / 2012-05-04 +================== + + * Added .component to package.json + * Added debug.component.js build + +0.6.0 / 2012-03-16 +================== + + * Added support for "-" prefix in DEBUG [Vinay Pulim] + * Added `.enabled` flag to the node version [TooTallNate] + +0.5.0 / 2012-02-02 +================== + + * Added: humanize diffs. Closes #8 + * Added `debug.disable()` to the CS variant + * Removed padding. Closes #10 + * Fixed: persist client-side variant again. Closes #9 + +0.4.0 / 2012-02-01 +================== + + * Added browser variant support for older browsers [TooTallNate] + * Added `debug.enable('project:*')` to browser variant [TooTallNate] + * Added padding to diff (moved it to the right) + +0.3.0 / 2012-01-26 +================== + + * Added millisecond diff when isatty, otherwise UTC string + +0.2.0 / 2012-01-22 +================== + + * Added wildcard support + +0.1.0 / 2011-12-02 +================== + + * Added: remove colors unless stderr isatty [TooTallNate] + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/node_modules/sequelize/node_modules/debug/LICENSE b/node_modules/sequelize/node_modules/debug/LICENSE new file mode 100644 index 00000000..658c933d --- /dev/null +++ b/node_modules/sequelize/node_modules/debug/LICENSE @@ -0,0 +1,19 @@ +(The MIT License) + +Copyright (c) 2014 TJ Holowaychuk + +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/sequelize/node_modules/debug/README.md b/node_modules/sequelize/node_modules/debug/README.md new file mode 100644 index 00000000..88dae35d --- /dev/null +++ b/node_modules/sequelize/node_modules/debug/README.md @@ -0,0 +1,455 @@ +# debug +[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) + + + +A tiny JavaScript debugging utility modelled after Node.js core's debugging +technique. Works in Node.js and web browsers. + +## Installation + +```bash +$ npm install debug +``` + +## Usage + +`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. + +Example [_app.js_](./examples/node/app.js): + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %o', name); + +http.createServer(function(req, res){ + debug(req.method + ' ' + req.url); + res.end('hello\n'); +}).listen(3000, function(){ + debug('listening'); +}); + +// fake worker of some kind + +require('./worker'); +``` + +Example [_worker.js_](./examples/node/worker.js): + +```js +var a = require('debug')('worker:a') + , b = require('debug')('worker:b'); + +function work() { + a('doing lots of uninteresting work'); + setTimeout(work, Math.random() * 1000); +} + +work(); + +function workb() { + b('doing some work'); + setTimeout(workb, Math.random() * 2000); +} + +workb(); +``` + +The `DEBUG` environment variable is then used to enable these based on space or +comma-delimited names. + +Here are some examples: + +screen shot 2017-08-08 at 12 53 04 pm +screen shot 2017-08-08 at 12 53 38 pm +screen shot 2017-08-08 at 12 53 25 pm + +#### Windows command prompt notes + +##### CMD + +On Windows the environment variable is set using the `set` command. + +```cmd +set DEBUG=*,-not_this +``` + +Example: + +```cmd +set DEBUG=* & node app.js +``` + +##### PowerShell (VS Code default) + +PowerShell uses different syntax to set environment variables. + +```cmd +$env:DEBUG = "*,-not_this" +``` + +Example: + +```cmd +$env:DEBUG='app';node app.js +``` + +Then, run the program to be debugged as usual. + +npm script example: +```js + "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", +``` + +## Namespace Colors + +Every debug instance has a color generated for it based on its namespace name. +This helps when visually parsing the debug output to identify which debug instance +a debug line belongs to. + +#### Node.js + +In Node.js, colors are enabled when stderr is a TTY. You also _should_ install +the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, +otherwise debug will only use a small handful of basic colors. + + + +#### Web Browser + +Colors are also enabled on "Web Inspectors" that understand the `%c` formatting +option. These are WebKit web inspectors, Firefox ([since version +31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) +and the Firebug plugin for Firefox (any version). + + + + +## Millisecond diff + +When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + + +When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: + + + + +## Conventions + +If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. + +## Wildcards + +The `*` character may be used as a wildcard. Suppose for example your library has +debuggers named "connect:bodyParser", "connect:compress", "connect:session", +instead of listing all three with +`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do +`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + +You can also exclude specific debuggers by prefixing them with a "-" character. +For example, `DEBUG=*,-connect:*` would include all debuggers except those +starting with "connect:". + +## Environment Variables + +When running through Node.js, you can set a few environment variables that will +change the behavior of the debug logging: + +| Name | Purpose | +|-----------|-------------------------------------------------| +| `DEBUG` | Enables/disables specific debugging namespaces. | +| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | +| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | +| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | + + +__Note:__ The environment variables beginning with `DEBUG_` end up being +converted into an Options object that gets used with `%o`/`%O` formatters. +See the Node.js documentation for +[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) +for the complete list. + +## Formatters + +Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. +Below are the officially supported formatters: + +| Formatter | Representation | +|-----------|----------------| +| `%O` | Pretty-print an Object on multiple lines. | +| `%o` | Pretty-print an Object all on a single line. | +| `%s` | String. | +| `%d` | Number (both integer and float). | +| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | +| `%%` | Single percent sign ('%'). This does not consume an argument. | + + +### Custom formatters + +You can add custom formatters by extending the `debug.formatters` object. +For example, if you wanted to add support for rendering a Buffer as hex with +`%h`, you could do something like: + +```js +const createDebug = require('debug') +createDebug.formatters.h = (v) => { + return v.toString('hex') +} + +// …elsewhere +const debug = createDebug('foo') +debug('this is hex: %h', new Buffer('hello world')) +// foo this is hex: 68656c6c6f20776f726c6421 +0ms +``` + + +## Browser Support + +You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), +or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), +if you don't want to build it yourself. + +Debug's enable state is currently persisted by `localStorage`. +Consider the situation shown below where you have `worker:a` and `worker:b`, +and wish to debug both. You can enable this using `localStorage.debug`: + +```js +localStorage.debug = 'worker:*' +``` + +And then refresh the page. + +```js +a = debug('worker:a'); +b = debug('worker:b'); + +setInterval(function(){ + a('doing some work'); +}, 1000); + +setInterval(function(){ + b('doing some work'); +}, 1200); +``` + + +## Output streams + + By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: + +Example [_stdout.js_](./examples/node/stdout.js): + +```js +var debug = require('debug'); +var error = debug('app:error'); + +// by default stderr is used +error('goes to stderr!'); + +var log = debug('app:log'); +// set this namespace to log via console.log +log.log = console.log.bind(console); // don't forget to bind to console! +log('goes to stdout'); +error('still goes to stderr!'); + +// set all output to go via console.info +// overrides all per-namespace log settings +debug.log = console.info.bind(console); +error('now goes to stdout via console.info'); +log('still goes to stdout, but via console.info now'); +``` + +## Extend +You can simply extend debugger +```js +const log = require('debug')('auth'); + +//creates new debug instance with extended namespace +const logSign = log.extend('sign'); +const logLogin = log.extend('login'); + +log('hello'); // auth hello +logSign('hello'); //auth:sign hello +logLogin('hello'); //auth:login hello +``` + +## Set dynamically + +You can also enable debug dynamically by calling the `enable()` method : + +```js +let debug = require('debug'); + +console.log(1, debug.enabled('test')); + +debug.enable('test'); +console.log(2, debug.enabled('test')); + +debug.disable(); +console.log(3, debug.enabled('test')); + +``` + +print : +``` +1 false +2 true +3 false +``` + +Usage : +`enable(namespaces)` +`namespaces` can include modes separated by a colon and wildcards. + +Note that calling `enable()` completely overrides previously set DEBUG variable : + +``` +$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' +=> false +``` + +`disable()` + +Will disable all namespaces. The functions returns the namespaces currently +enabled (and skipped). This can be useful if you want to disable debugging +temporarily without knowing what was enabled to begin with. + +For example: + +```js +let debug = require('debug'); +debug.enable('foo:*,-foo:bar'); +let namespaces = debug.disable(); +debug.enable(namespaces); +``` + +Note: There is no guarantee that the string will be identical to the initial +enable string, but semantically they will be identical. + +## Checking whether a debug target is enabled + +After you've created a debug instance, you can determine whether or not it is +enabled by checking the `enabled` property: + +```javascript +const debug = require('debug')('http'); + +if (debug.enabled) { + // do stuff... +} +``` + +You can also manually toggle this property to force the debug instance to be +enabled or disabled. + + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + - Andrew Rhyne + +## Backers + +Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Sponsors + +Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## License + +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> + +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/sequelize/node_modules/debug/dist/debug.js b/node_modules/sequelize/node_modules/debug/dist/debug.js new file mode 100644 index 00000000..89ad0c21 --- /dev/null +++ b/node_modules/sequelize/node_modules/debug/dist/debug.js @@ -0,0 +1,912 @@ +"use strict"; + +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } + +function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +(function (f) { + if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") { + module.exports = f(); + } else if (typeof define === "function" && define.amd) { + define([], f); + } else { + var g; + + if (typeof window !== "undefined") { + g = window; + } else if (typeof global !== "undefined") { + g = global; + } else if (typeof self !== "undefined") { + g = self; + } else { + g = this; + } + + g.debug = f(); + } +})(function () { + var define, module, exports; + return function () { + function r(e, n, t) { + function o(i, f) { + if (!n[i]) { + if (!e[i]) { + var c = "function" == typeof require && require; + if (!f && c) return c(i, !0); + if (u) return u(i, !0); + var a = new Error("Cannot find module '" + i + "'"); + throw a.code = "MODULE_NOT_FOUND", a; + } + + var p = n[i] = { + exports: {} + }; + e[i][0].call(p.exports, function (r) { + var n = e[i][1][r]; + return o(n || r); + }, p, p.exports, r, e, n, t); + } + + return n[i].exports; + } + + for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) { + o(t[i]); + } + + return o; + } + + return r; + }()({ + 1: [function (require, module, exports) { + /** + * Helpers. + */ + var s = 1000; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + /** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + + module.exports = function (val, options) { + options = options || {}; + + var type = _typeof(val); + + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + + throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val)); + }; + /** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + + + function parse(str) { + str = String(str); + + if (str.length > 100) { + return; + } + + var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); + + if (!match) { + return; + } + + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + + case 'weeks': + case 'week': + case 'w': + return n * w; + + case 'days': + case 'day': + case 'd': + return n * d; + + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + + default: + return undefined; + } + } + /** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + + function fmtShort(ms) { + var msAbs = Math.abs(ms); + + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + + return ms + 'ms'; + } + /** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + + function fmtLong(ms) { + var msAbs = Math.abs(ms); + + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + + return ms + ' ms'; + } + /** + * Pluralization helper. + */ + + + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); + } + }, {}], + 2: [function (require, module, exports) { + // shim for using process in browser + var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it + // don't break things. But we need to wrap it in a try catch in case it is + // wrapped in strict mode code which doesn't define any globals. It's inside a + // function because try/catches deoptimize in certain engines. + + var cachedSetTimeout; + var cachedClearTimeout; + + function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); + } + + function defaultClearTimeout() { + throw new Error('clearTimeout has not been defined'); + } + + (function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } + })(); + + function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } // if setTimeout wasn't available but was latter defined + + + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + } + + function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } // if clearTimeout wasn't available but was latter defined + + + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + } + + var queue = []; + var draining = false; + var currentQueue; + var queueIndex = -1; + + function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + + draining = false; + + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + + if (queue.length) { + drainQueue(); + } + } + + function drainQueue() { + if (draining) { + return; + } + + var timeout = runTimeout(cleanUpNextTick); + draining = true; + var len = queue.length; + + while (len) { + currentQueue = queue; + queue = []; + + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + + queueIndex = -1; + len = queue.length; + } + + currentQueue = null; + draining = false; + runClearTimeout(timeout); + } + + process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + + queue.push(new Item(fun, args)); + + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } + }; // v8 likes predictible objects + + + function Item(fun, array) { + this.fun = fun; + this.array = array; + } + + Item.prototype.run = function () { + this.fun.apply(null, this.array); + }; + + process.title = 'browser'; + process.browser = true; + process.env = {}; + process.argv = []; + process.version = ''; // empty string to avoid regexp issues + + process.versions = {}; + + function noop() {} + + process.on = noop; + process.addListener = noop; + process.once = noop; + process.off = noop; + process.removeListener = noop; + process.removeAllListeners = noop; + process.emit = noop; + process.prependListener = noop; + process.prependOnceListener = noop; + + process.listeners = function (name) { + return []; + }; + + process.binding = function (name) { + throw new Error('process.binding is not supported'); + }; + + process.cwd = function () { + return '/'; + }; + + process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); + }; + + process.umask = function () { + return 0; + }; + }, {}], + 3: [function (require, module, exports) { + /** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require('ms'); + Object.keys(env).forEach(function (key) { + createDebug[key] = env[key]; + }); + /** + * Active `debug` instances. + */ + + createDebug.instances = []; + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + + createDebug.formatters = {}; + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + + function selectColor(namespace) { + var hash = 0; + + for (var i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + + createDebug.selectColor = selectColor; + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + + function createDebug(namespace) { + var prevTime; + + function debug() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + // Disabled? + if (!debug.enabled) { + return; + } + + var self = debug; // Set `diff` timestamp + + var curr = Number(new Date()); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } // Apply any `formatters` transformations + + + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return match; + } + + index++; + var formatter = createDebug.formatters[format]; + + if (typeof formatter === 'function') { + var val = args[index]; + match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` + + args.splice(index, 1); + index--; + } + + return match; + }); // Apply env-specific formatting (colors, etc.) + + createDebug.formatArgs.call(self, args); + var logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = createDebug.enabled(namespace); + debug.useColors = createDebug.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + debug.extend = extend; // Debug.formatArgs = formatArgs; + // debug.rawLog = rawLog; + // env-specific initialization logic for debug instances + + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + createDebug.instances.push(debug); + return debug; + } + + function destroy() { + var index = createDebug.instances.indexOf(this); + + if (index !== -1) { + createDebug.instances.splice(index, 1); + return true; + } + + return false; + } + + function extend(namespace, delimiter) { + var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + + + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.names = []; + createDebug.skips = []; + var i; + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + + for (i = 0; i < createDebug.instances.length; i++) { + var instance = createDebug.instances[i]; + instance.enabled = createDebug.enabled(instance.namespace); + } + } + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + + + function disable() { + var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) { + return '-' + namespace; + }))).join(','); + createDebug.enable(''); + return namespaces; + } + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + + + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + var i; + var len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + + + function toNamespace(regexp) { + return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*'); + } + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + + + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + + return val; + } + + createDebug.enable(createDebug.load()); + return createDebug; + } + + module.exports = setup; + }, { + "ms": 1 + }], + 4: [function (require, module, exports) { + (function (process) { + /* eslint-env browser */ + + /** + * This is the web browser implementation of `debug()`. + */ + exports.log = log; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; + exports.storage = localstorage(); + /** + * Colors. + */ + + exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; + /** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + // eslint-disable-next-line complexity + + function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } // Internet Explorer and Edge do not support colors. + + + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + + + return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker + typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + /** + * Colorize log arguments if enabled. + * + * @api public + */ + + + function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function (match) { + if (match === '%%') { + return; + } + + index++; + + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + args.splice(lastC, 0, c); + } + /** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + + + function log() { + var _console; + + // This hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments); + } + /** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + + + function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) {// Swallow + // XXX (@Qix-) should we be logging these? + } + } + /** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + + + function load() { + var r; + + try { + r = exports.storage.getItem('debug'); + } catch (error) {} // Swallow + // XXX (@Qix-) should we be logging these? + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + + + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; + } + /** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + + + function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) {// Swallow + // XXX (@Qix-) should we be logging these? + } + } + + module.exports = require('./common')(exports); + var formatters = module.exports.formatters; + /** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + + formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } + }; + }).call(this, require('_process')); + }, { + "./common": 3, + "_process": 2 + }] + }, {}, [4])(4); +}); diff --git a/node_modules/sequelize/node_modules/debug/package.json b/node_modules/sequelize/node_modules/debug/package.json new file mode 100644 index 00000000..86713156 --- /dev/null +++ b/node_modules/sequelize/node_modules/debug/package.json @@ -0,0 +1,63 @@ +{ + "name": "debug", + "version": "4.1.1", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "description": "small debugging utility", + "keywords": [ + "debug", + "log", + "debugger" + ], + "files": [ + "src", + "dist/debug.js", + "LICENSE", + "README.md" + ], + "author": "TJ Holowaychuk ", + "contributors": [ + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne " + ], + "license": "MIT", + "scripts": { + "lint": "xo", + "test": "npm run test:node && npm run test:browser", + "test:node": "istanbul cover _mocha -- test.js", + "pretest:browser": "npm run build", + "test:browser": "karma start --single-run", + "prebuild:debug": "mkdir -p dist && browserify --standalone debug -o dist/debug.es6.js .", + "build:debug": "babel -o dist/debug.js dist/debug.es6.js > dist/debug.js", + "build:test": "babel -d dist test.js", + "build": "npm run build:debug && npm run build:test", + "clean": "rimraf dist coverage", + "test:coverage": "cat ./coverage/lcov.info | coveralls" + }, + "dependencies": { + "ms": "^2.1.1" + }, + "devDependencies": { + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "browserify": "14.4.0", + "chai": "^3.5.0", + "concurrently": "^3.1.0", + "coveralls": "^3.0.2", + "istanbul": "^0.4.5", + "karma": "^3.0.0", + "karma-chai": "^0.1.0", + "karma-mocha": "^1.3.0", + "karma-phantomjs-launcher": "^1.0.2", + "mocha": "^5.2.0", + "mocha-lcov-reporter": "^1.2.0", + "rimraf": "^2.5.4", + "xo": "^0.23.0" + }, + "main": "./src/index.js", + "browser": "./src/browser.js", + "unpkg": "./dist/debug.js" +} diff --git a/node_modules/sequelize/node_modules/debug/src/browser.js b/node_modules/sequelize/node_modules/debug/src/browser.js new file mode 100644 index 00000000..5f34c0d0 --- /dev/null +++ b/node_modules/sequelize/node_modules/debug/src/browser.js @@ -0,0 +1,264 @@ +/* eslint-env browser */ + +/** + * This is the web browser implementation of `debug()`. + */ + +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } + + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ +function log(...args) { + // This hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return typeof console === 'object' && + console.log && + console.log(...args); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ +function load() { + let r; + try { + r = exports.storage.getItem('debug'); + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +module.exports = require('./common')(exports); + +const {formatters} = module.exports; + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; diff --git a/node_modules/sequelize/node_modules/debug/src/common.js b/node_modules/sequelize/node_modules/debug/src/common.js new file mode 100644 index 00000000..2f82b8dc --- /dev/null +++ b/node_modules/sequelize/node_modules/debug/src/common.js @@ -0,0 +1,266 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require('ms'); + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * Active `debug` instances. + */ + createDebug.instances = []; + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return match; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = createDebug.enabled(namespace); + debug.useColors = createDebug.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + debug.extend = extend; + // Debug.formatArgs = formatArgs; + // debug.rawLog = rawLog; + + // env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + createDebug.instances.push(debug); + + return debug; + } + + function destroy() { + const index = createDebug.instances.indexOf(this); + if (index !== -1) { + createDebug.instances.splice(index, 1); + return true; + } + return false; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + + for (i = 0; i < createDebug.instances.length; i++) { + const instance = createDebug.instances[i]; + instance.enabled = createDebug.enabled(instance.namespace); + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + let i; + let len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + createDebug.enable(createDebug.load()); + + return createDebug; +} + +module.exports = setup; diff --git a/node_modules/sequelize/node_modules/debug/src/index.js b/node_modules/sequelize/node_modules/debug/src/index.js new file mode 100644 index 00000000..bf4c57f2 --- /dev/null +++ b/node_modules/sequelize/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. + */ + +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/node_modules/sequelize/node_modules/debug/src/node.js b/node_modules/sequelize/node_modules/debug/src/node.js new file mode 100644 index 00000000..5e1f1541 --- /dev/null +++ b/node_modules/sequelize/node_modules/debug/src/node.js @@ -0,0 +1,257 @@ +/** + * Module dependencies. + */ + +const tty = require('tty'); +const util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + */ + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = require('supports-color'); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. +} + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); +} + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; +} + +/** + * Invokes `util.format()` with the specified arguments and writes to stderr. + */ + +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +module.exports = require('./common')(exports); + +const {formatters} = module.exports; + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .replace(/\s*\n\s*/g, ' '); +}; + +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; diff --git a/node_modules/sequelize/node_modules/semver/CHANGELOG.md b/node_modules/sequelize/node_modules/semver/CHANGELOG.md new file mode 100644 index 00000000..91f298d0 --- /dev/null +++ b/node_modules/sequelize/node_modules/semver/CHANGELOG.md @@ -0,0 +1,47 @@ +# changes log + +## 6.0 + +* Fix `intersects` logic. + + This is technically a bug fix, but since it is also a change to behavior + that may require users updating their code, it is marked as a major + version increment. + +## 5.7 + +* Add `minVersion` method + +## 5.6 + +* Move boolean `loose` param to an options object, with + backwards-compatibility protection. +* Add ability to opt out of special prerelease version handling with + the `includePrerelease` option flag. + +## 5.5 + +* Add version coercion capabilities + +## 5.4 + +* Add intersection checking + +## 5.3 + +* Add `minSatisfying` method + +## 5.2 + +* Add `prerelease(v)` that returns prerelease components + +## 5.1 + +* Add Backus-Naur for ranges +* Remove excessively cute inspection methods + +## 5.0 + +* Remove AMD/Browserified build artifacts +* Fix ltr and gtr when using the `*` range +* Fix for range `*` with a prerelease identifier diff --git a/node_modules/sequelize/node_modules/semver/LICENSE b/node_modules/sequelize/node_modules/semver/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/node_modules/sequelize/node_modules/semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/sequelize/node_modules/semver/README.md b/node_modules/sequelize/node_modules/semver/README.md new file mode 100644 index 00000000..2293a14f --- /dev/null +++ b/node_modules/sequelize/node_modules/semver/README.md @@ -0,0 +1,443 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Install + +```bash +npm install semver +```` + +## Usage + +As a node module: + +```js +const semver = require('semver') + +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' +semver.valid(semver.coerce('v2')) // '2.0.0' +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' +``` + +As a command-line utility: + +``` +$ semver -h + +A JavaScript implementation of the https://semver.org/ specification +Copyright Isaac Z. Schlueter + +Usage: semver [options] [ [...]] +Prints valid versions sorted by SemVer precedence + +Options: +-r --range + Print versions that match the specified range. + +-i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + +--preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + +-l --loose + Interpret versions and ranges loosely + +-p --include-prerelease + Always include prerelease versions in range matching + +-c --coerce + Coerce a string into SemVer if possible + (does not imply --loose) + +--rtl + Coerce version strings right to left + +--ltr + Coerce version strings left to right (default) + +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions. + +If no satisfying versions are found, then exits failure. + +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them. +``` + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the `includePrerelease` flag on the options +object to any +[functions](https://github.com/npm/node-semver#functions) that do +range matching. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +semver.inc('1.2.3', 'prerelease', 'beta') +// '1.2.4-beta.0' +``` + +command-line example: + +```bash +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```bash +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero element in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `options` object argument. All +options in this object are `false` by default. The options supported +are: + +- `loose` Be more forgiving about not-quite-valid semver strings. + (Any resulting output will always be 100% strict compliant, of + course.) For backwards compatibility reasons, if the `options` + argument is a boolean value instead of an object, it is interpreted + to be the `loose` param. +- `includePrerelease` Set to suppress the [default + behavior](https://github.com/npm/node-semver#prerelease-tags) of + excluding prerelease tagged versions from ranges unless they are + explicitly opted into. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges + or comparators intersect. +* `parse(v)`: Attempt to parse a string as a semantic version, returning either + a `SemVer` object or `null`. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions + are equal. Sorts in ascending order if passed to `Array.sort()`. + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + +### Comparators + +* `intersects(comparator)`: Return true if the comparators intersect + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `minVersion(range)`: Return the lowest version that can possibly match + the given range. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) +* `intersects(range)`: Return true if any of the ranges comparators intersect + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. + +### Coercion + +* `coerce(version, options)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver string to +semver. It looks for the first digit in a string, and consumes all +remaining characters which satisfy at least a partial semver (e.g., `1`, +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes +`3.4.0`). Only text which lacks digits will fail coercion (`version one` +is not valid). The maximum length for any semver component considered for +coercion is 16 characters; longer components will be ignored +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any +semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +components are invalid (`9999999999999999.4.7.4` is likely invalid). + +If the `options.rtl` flag is set, then `coerce` will return the right-most +coercible tuple that does not share an ending index with a longer coercible +tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not +`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of +any other overlapping SemVer tuple. + +### Clean + +* `clean(version)`: Clean a string to be a valid semver if possible + +This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges. + +ex. +* `s.clean(' = v 2.1.5foo')`: `null` +* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean(' = v 2.1.5-foo')`: `null` +* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean('=v2.1.5')`: `'2.1.5'` +* `s.clean(' =v2.1.5')`: `2.1.5` +* `s.clean(' 2.1.5 ')`: `'2.1.5'` +* `s.clean('~1.0.0')`: `null` diff --git a/node_modules/sequelize/node_modules/semver/bin/.semver.js.swp b/node_modules/sequelize/node_modules/semver/bin/.semver.js.swp new file mode 100644 index 0000000000000000000000000000000000000000..c22a49e3a4edda25a698b9d793b65ef605064236 GIT binary patch literal 16384 zcmeHNO^h5z6)ro0gg_FM@DpqVwHx8-!81KxgMci%wt}(9MnSf;u_ahWxVEQyrq?~) zldkTu2PXlE5EQY15E6%=z$FP%5C^1yNKQx~gdhW4do|m~&To92f5<<^@Od+1f7?COed)Ou*;|VPEK))QiXOcB zCl`eur-6uHy&8Mi2<-IaxU-`=N)E>|>ug7fz4dplp|jWMqkdd7P&2TIft%U;j<4vc ze&_NMzx}pziz?RTH3KyRH3KyRH3KyRH3KyRH3KyR|A!3Zql4_Tucq?N+0loy>4{QR*ffeB0z`KB3fm?uo-@@2c;6>mC;CbLV;G4kXz!!l>fiX}3 zAs~TMz()WdXanyA4g+riZU-3fyPFyN8Sp*e^S}k*F5m{>0Pv?bG4_4nabOp?2%HD* z0S*EGcq3yk13w3z1ik?Tz&*eL;HNh+_7w1S;B!C-+z;FftN}-W>w#C^z}T;WXMv}I zM}P#l0Ne-M1snz54qONP^+v{i0Xz#l1?&P31DAmuP{1;<1pNI5#-0Jb3gkcvYyekZ z&)C0!Ujk165wH!c0v`Yl1MdLt01g5_d>wcKz6(49d;xd_NPu42CEx|%E5M@w`Hln@e>gskcEsE5Czycch&tUJ{ED*n|7ztEQj#z3Ez~%^D^V3Oa`(ilR&zL z=alHnRc`*r!naZ*zsuLG&L?2w^w#(N?jBoDrK3p}^#?iMpg-I2Px^c_7{rClW#+oM zo8K$OVl&91QO={`DAxQ5GKQz2CS#E2BemLb|D#E>e#a3M=!#C3z6M|+jV1oG)AzO- z*1QHk>Wpu(ut)+ee<0%#_nQ0)V-GRTA8Ptxnw=KGz$>eG;}(xv{L`q!tCGh}R7V@m zGnp4z!ZGyxq-D#;58W^cTHF!`F`zf6LCutQ!pYp1T zAdpH~YD+Fd5yiR;-j-4YUtW%KZv|AE0iX&V8RwXmS(avALr*Lo2zW#iPx!Xvg@X6O zLj+e*(vPJZTz)Ca2Rup5v}rV_I+5%RjL~$s?Z8=OJx7NoR}VrIa&O5M`>{;=`Jm~> zyVRA2LRT+c!H$}OZz>G8qLI^+bt~%5i~x6PE6`hZ6h<-TM`b|ZYvdL1P43Z_eHahcc#O-@qtpUT$O3ZABS+BEzG|!?d})21ukZ&SoRQH)!>WZ~4203- zxHd9o=Y%Cfzk9r~_1Z<|mGlLv%mQ*V&$+)YsQN#teZ?_`xkR(U+GnShv$jg?KJx{J z5uVkwPhT);lOQg7@@ytEiCIWb_7q`s^LUlM$dTa>fcvJq?M#Y`jPB^; zH1kJ=8hFC_PEUrSi1SsZE8)w!C%vQeoS^am3Sg-jG*;bho1Ra9o@`77%yvuKt@BXC zN-`2v3TwxC_8P77te9^EaSI#S0bJ*M+XYiq+osw=DaN%8Nm+mFt3edzUeobqsetMw z6}rVjdDGV~cn}qdOtVo+!AcnQ7D_Q=Yg){YES1u1Tjz}tt>g{n>T$kjc>*NWraRUGrX= zs@9GwqXAQ9f0><8McSUb|hn4wGoTC~3RqR%iRxEVmv*5hZr%r(3*G+1z^{Z*D4?j)!?w z>O!*)fs9N(P(+#Z8oqCLqtIJdnZ8}DoXYD~S14bK6}kI)XXUZ;uS${i_c>KYBDjdn zI{smvCXI3>w2J8$Qc}dRRg88FXus7pzumN}6cM5L={9MaU*j#uVQr_wMKa;47>!~I zP@GDU3o=B~<0GMzR9wU{&!x(hPt8tax2MohZw^CfG=U`4rASDb;0K#IC(u((j4!p@ z%u!9mX@a;&|Eu0^N+Xy{TJ|$B^x2(DokE#E+{@E+g};P;5de+&Ey_!{sS zKr#A_00VxE{(l5q0ZsxPfOKjB^`~Z_W}s%EW}s%EW}s%EW}s%^zrp~;iCupuMR?Ts z6ygXIku`?MN<~P^yL~y%DpH-6FY+jk@(EI|*yZmOD(93)rbk2Hq&^zw-SGx8&}N^H zfB})1P=QQ(wAoLyp3GWkX#$D~%4V|pI9b^UDWPk!sq}oR2uTgoBI&iL*Mw6#Ss}+2 z#YHwfGjZ}L7%8I`ohwqUY5=02>zwUOFXh?GSrcj4US`4=#Gw=u%^b2=jgkL#3b-rc zT>Uv^5}hu9QaJ*lzT&YA!6H)F`sBp3nWLs_-PQ@a1*b|2L>f_$NwTMcD2cZ~kk?BQ zza^4chXF*pR2@>t-pmGjJ0jco~lL3w=rR>;|;7Z)p zaREs>?*^ydM{Tmmq`*|^Qm*Ajc{D@=@6I=H3z1=TnJzkW*V1>C>}$Es+mxxo(caoL z15us{x;n0#Gjw`FVYG9(q0px(|4!I$xI*u-94@$KnQ0zXf5DtrA G{eJ+#s{f4u literal 0 HcmV?d00001 diff --git a/node_modules/sequelize/node_modules/semver/bin/semver.js b/node_modules/sequelize/node_modules/semver/bin/semver.js new file mode 100755 index 00000000..666034a7 --- /dev/null +++ b/node_modules/sequelize/node_modules/semver/bin/semver.js @@ -0,0 +1,174 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + +var versions = [] + +var range = [] + +var inc = null + +var version = require('../package.json').version + +var loose = false + +var includePrerelease = false + +var coerce = false + +var rtl = false + +var identifier + +var semver = require('../semver') + +var reverse = false + +var options = {} + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var indexOfEqualSign = a.indexOf('=') + if (indexOfEqualSign !== -1) { + a = a.slice(0, indexOfEqualSign) + argv.unshift(a.slice(indexOfEqualSign + 1)) + } + switch (a) { + case '-rv': case '-rev': case '--rev': case '--reverse': + reverse = true + break + case '-l': case '--loose': + loose = true + break + case '-p': case '--include-prerelease': + includePrerelease = true + break + case '-v': case '--version': + versions.push(argv.shift()) + break + case '-i': case '--inc': case '--increment': + switch (argv[0]) { + case 'major': case 'minor': case 'patch': case 'prerelease': + case 'premajor': case 'preminor': case 'prepatch': + inc = argv.shift() + break + default: + inc = 'patch' + break + } + break + case '--preid': + identifier = argv.shift() + break + case '-r': case '--range': + range.push(argv.shift()) + break + case '-c': case '--coerce': + coerce = true + break + case '--rtl': + rtl = true + break + case '--ltr': + rtl = false + break + case '-h': case '--help': case '-?': + return help() + default: + versions.push(a) + break + } + } + + var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } + + versions = versions.map(function (v) { + return coerce ? (semver.coerce(v, options) || { version: v }).version : v + }).filter(function (v) { + return semver.valid(v) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) { return failInc() } + + for (var i = 0, l = range.length; i < l; i++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], options) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error('--inc can only be used on a single version with no range') + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? 'rcompare' : 'compare' + versions.sort(function (a, b) { + return semver[compare](a, b, options) + }).map(function (v) { + return semver.clean(v, options) + }).map(function (v) { + return inc ? semver.inc(v, inc, options, identifier) : v + }).forEach(function (v, i, _) { console.log(v) }) +} + +function help () { + console.log(['SemVer ' + version, + '', + 'A JavaScript implementation of the https://semver.org/ specification', + 'Copyright Isaac Z. Schlueter', + '', + 'Usage: semver [options] [ [...]]', + 'Prints valid versions sorted by SemVer precedence', + '', + 'Options:', + '-r --range ', + ' Print versions that match the specified range.', + '', + '-i --increment []', + ' Increment a version by the specified level. Level can', + ' be one of: major, minor, patch, premajor, preminor,', + " prepatch, or prerelease. Default level is 'patch'.", + ' Only one version may be specified.', + '', + '--preid ', + ' Identifier to be used to prefix premajor, preminor,', + ' prepatch or prerelease version increments.', + '', + '-l --loose', + ' Interpret versions and ranges loosely', + '', + '-p --include-prerelease', + ' Always include prerelease versions in range matching', + '', + '-c --coerce', + ' Coerce a string into SemVer if possible', + ' (does not imply --loose)', + '', + '--rtl', + ' Coerce version strings right to left', + '', + '--ltr', + ' Coerce version strings left to right (default)', + '', + 'Program exits successfully if any valid version satisfies', + 'all supplied ranges, and prints all satisfying versions.', + '', + 'If no satisfying versions are found, then exits failure.', + '', + 'Versions are printed in ascending order, so supplying', + 'multiple versions to the utility will just sort them.' + ].join('\n')) +} diff --git a/node_modules/sequelize/node_modules/semver/package.json b/node_modules/sequelize/node_modules/semver/package.json new file mode 100644 index 00000000..2b533c04 --- /dev/null +++ b/node_modules/sequelize/node_modules/semver/package.json @@ -0,0 +1,28 @@ +{ + "name": "semver", + "version": "6.2.0", + "description": "The semantic version parser used by npm.", + "main": "semver.js", + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags" + }, + "devDependencies": { + "tap": "^14.3.1" + }, + "license": "ISC", + "repository": "https://github.com/npm/node-semver", + "bin": { + "semver": "./bin/semver.js" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "tap": { + "check-coverage": true + } +} diff --git a/node_modules/sequelize/node_modules/semver/range.bnf b/node_modules/sequelize/node_modules/semver/range.bnf new file mode 100644 index 00000000..d4c6ae0d --- /dev/null +++ b/node_modules/sequelize/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | [1-9] ( [0-9] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/sequelize/node_modules/semver/semver.js b/node_modules/sequelize/node_modules/semver/semver.js new file mode 100644 index 00000000..fd6453f4 --- /dev/null +++ b/node_modules/sequelize/node_modules/semver/semver.js @@ -0,0 +1,1589 @@ +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +// The actual regexps go on exports.re +var re = exports.re = [] +var src = exports.src = [] +var R = 0 + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++ +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' +var NUMERICIDENTIFIERLOOSE = R++ +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++ +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++ +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')' + +var MAINVERSIONLOOSE = R++ +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++ +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +var PRERELEASEIDENTIFIERLOOSE = R++ +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++ +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' + +var PRERELEASELOOSE = R++ +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++ +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++ +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++ +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?' + +src[FULL] = '^' + FULLPLAIN + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?' + +var LOOSE = R++ +src[LOOSE] = '^' + LOOSEPLAIN + '$' + +var GTLT = R++ +src[GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++ +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +var XRANGEIDENTIFIER = R++ +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' + +var XRANGEPLAIN = R++ +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGEPLAINLOOSE = R++ +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGE = R++ +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' +var XRANGELOOSE = R++ +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++ +src[COERCE] = '(^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' +var COERCERTL = R++ +re[COERCERTL] = new RegExp(src[COERCE], 'g') + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++ +src[LONETILDE] = '(?:~>?)' + +var TILDETRIM = R++ +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') +var tildeTrimReplace = '$1~' + +var TILDE = R++ +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' +var TILDELOOSE = R++ +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++ +src[LONECARET] = '(?:\\^)' + +var CARETTRIM = R++ +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') +var caretTrimReplace = '$1^' + +var CARET = R++ +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' +var CARETLOOSE = R++ +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++ +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' +var COMPARATOR = R++ +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++ +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++ +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$' + +var HYPHENRANGELOOSE = R++ +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +var STAR = R++ +src[STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? re[LOOSE] : re[FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +SemVer.prototype.compareBuild = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + var i = 0 + do { + var a = this.build[i] + var b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.compareBuild = compareBuild +function compareBuild (a, b, loose) { + var versionA = new SemVer(a, loose) + var versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(b, a, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + if (this.value === '') { + return true + } + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return ( + isSatisfiable(thisComparators, options) && + range.set.some(function (rangeComparators) { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every(function (thisComparator) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) +} + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +function isSatisfiable (comparators, options) { + var result = true + var remainingComparators = comparators.slice() + var testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every(function (otherComparator) { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[TILDELOOSE] : re[TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[CARETLOOSE] : re[CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + pr + } else if (xm) { + ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr + } else if (xp) { + ret = '>=' + M + '.' + m + '.0' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + pr + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], '') +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version, options) { + if (version instanceof SemVer) { + return version + } + + if (typeof version === 'number') { + version = String(version) + } + + if (typeof version !== 'string') { + return null + } + + options = options || {} + + var match = null + if (!options.rtl) { + match = version.match(re[COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + var next + while ((next = re[COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[COERCERTL].lastIndex = -1 + } + + if (match === null) { + return null + } + + return parse(match[2] + + '.' + (match[3] || '0') + + '.' + (match[4] || '0'), options) +} diff --git a/node_modules/sequelize/package.json b/node_modules/sequelize/package.json new file mode 100644 index 00000000..f0c99f63 --- /dev/null +++ b/node_modules/sequelize/package.json @@ -0,0 +1,165 @@ +{ + "name": "sequelize", + "description": "Multi dialect ORM for Node.JS", + "version": "5.10.1", + "author": "Sascha Depold ", + "contributors": [ + "Sascha Depold ", + "Jan Aagaard Meier ", + "Daniel Durante ", + "Mick Hansen ", + "Sushant Dhiman " + ], + "repository": { + "type": "git", + "url": "https://github.com/sequelize/sequelize.git" + }, + "bugs": { + "url": "https://github.com/sequelize/sequelize/issues" + }, + "homepage": "http://docs.sequelizejs.com/", + "main": "index.js", + "types": "types", + "engines": { + "node": ">=6.0.0" + }, + "files": [ + "lib", + "types/index.d.ts", + "types/lib" + ], + "license": "MIT", + "dependencies": { + "bluebird": "^3.5.0", + "cls-bluebird": "^2.1.0", + "debug": "^4.1.1", + "dottie": "^2.0.0", + "inflection": "1.12.0", + "lodash": "^4.17.11", + "moment": "^2.24.0", + "moment-timezone": "^0.5.21", + "retry-as-promised": "^3.1.0", + "semver": "^6.1.1", + "sequelize-pool": "^2.3.0", + "toposort-class": "^1.0.1", + "uuid": "^3.2.1", + "validator": "^10.11.0", + "wkx": "^0.4.6" + }, + "devDependencies": { + "@commitlint/cli": "^8.0.0", + "@commitlint/config-angular": "^8.0.0", + "@types/bluebird": "^3.5.26", + "@types/node": "^10.12.27", + "@types/validator": "^10.11.0", + "big-integer": "^1.6.42", + "chai": "^4.x", + "chai-as-promised": "^7.x", + "chai-datetime": "^1.x", + "chai-spies": "^1.x", + "continuation-local-storage": "^3.x", + "cross-env": "^5.2.0", + "env-cmd": "^8.0.2", + "esdoc": "^1.1.0", + "esdoc-inject-style-plugin": "^1.0.0", + "esdoc-standard-plugin": "^1.0.0", + "eslint": "^6.0.0", + "eslint-plugin-jsdoc": "^4.1.1", + "eslint-plugin-mocha": "^5.2.1", + "husky": "^1.3.1", + "js-combinatorics": "^0.5.4", + "lcov-result-merger": "^3.0.0", + "lint-staged": "^8.1.5", + "mariadb": "^2.0.3", + "markdownlint-cli": "^0.17.0", + "mocha": "^6.1.4", + "mysql2": "^1.6.5", + "nyc": "^14.1.1", + "pg": "^7.8.1", + "pg-hstore": "^2.x", + "pg-types": "^2.0.0", + "rimraf": "^2.6.3", + "semantic-release": "^15.13.16", + "sinon": "^7.3.2", + "sinon-chai": "^3.3.0", + "sqlite3": "^4.0.6", + "tedious": "6.0.0", + "typescript": "^3.3.3333" + }, + "keywords": [ + "mysql", + "mariadb", + "sqlite", + "postgresql", + "postgres", + "mssql", + "orm", + "nodejs", + "object relational mapper" + ], + "options": { + "env_cmd": "./test/config/.docker.env" + }, + "commitlint": { + "extends": [ + "@commitlint/config-angular" + ] + }, + "lint-staged": { + "*.js": "eslint" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged", + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" + } + }, + "scripts": { + "lint": "eslint lib test --quiet", + "lint-docs": "markdownlint docs", + "test": "npm run teaser && npm run test-unit && npm run test-integration", + "test-docker": "npm run test-docker-unit && npm run test-docker-integration", + "test-docker-unit": "npm run test-unit", + "test-docker-integration": "env-cmd $npm_package_options_env_cmd npm run test-integration", + "docs": "esdoc && cp docs/ROUTER esdoc/ROUTER && cp docs/favicon.ico esdoc/favicon.ico", + "teaser": "node scripts/teaser", + "test-unit": "mocha --require scripts/mocha-bootload --globals setImmediate,clearImmediate --exit --check-leaks --colors -t 30000 --reporter spec \"test/unit/**/*.js\"", + "test-unit-mariadb": "cross-env DIALECT=mariadb npm run test-unit", + "test-unit-mysql": "cross-env DIALECT=mysql npm run test-unit", + "test-unit-postgres": "cross-env DIALECT=postgres npm run test-unit", + "test-unit-postgres-native": "cross-env DIALECT=postgres-native npm run test-unit", + "test-unit-sqlite": "cross-env DIALECT=sqlite npm run test-unit", + "test-unit-mssql": "cross-env DIALECT=mssql npm run test-unit", + "test-unit-all": "npm run test-unit-mariadb && npm run test-unit-mysql && npm run test-unit-postgres && npm run test-unit-postgres-native && npm run test-unit-mssql && npm run test-unit-sqlite", + "test-integration": "mocha --require scripts/mocha-bootload --globals setImmediate,clearImmediate --exit --check-leaks --colors -t 30000 --reporter spec \"test/integration/**/*.test.js\"", + "test-integration-mariadb": "cross-env DIALECT=mariadb npm run test-integration", + "test-integration-mysql": "cross-env DIALECT=mysql npm run test-integration", + "test-integration-postgres": "cross-env DIALECT=postgres npm run test-integration", + "test-integration-postgres-native": "cross-env DIALECT=postgres-native npm run test-integration", + "test-integration-sqlite": "cross-env DIALECT=sqlite npm run test-integration", + "test-integration-mssql": "cross-env DIALECT=mssql npm run test-integration", + "test-integration-all": "npm run test-integration-mariadb && npm run test-integration-mysql && npm run test-integration-postgres && npm run test-integration-postgres-native && npm run test-integration-mssql && npm run test-integration-sqlite", + "test-mariadb": "cross-env DIALECT=mariadb npm test", + "test-mysql": "cross-env DIALECT=mysql npm test", + "test-sqlite": "cross-env DIALECT=sqlite npm test", + "test-postgres": "cross-env DIALECT=postgres npm test", + "test-pgsql": "npm run test-postgres", + "test-postgres-native": "cross-env DIALECT=postgres-native npm test", + "test-postgresn": "npm run test-postgres-native", + "test-mssql": "cross-env DIALECT=mssql npm test", + "test-all": "npm run test-mariadb && npm run test-mysql && npm run test-sqlite && npm run test-postgres && npm run test-postgres-native && npm run test-mssql", + "test-typings": "tsc -b types/tsconfig.json && tsc -b types/test/tsconfig.json", + "cover": "rimraf coverage && npm run teaser && npm run cover-integration && npm run cover-unit && npm run merge-coverage", + "cover-integration": "cross-env COVERAGE=true nyc --reporter=lcovonly mocha --require scripts/mocha-bootload -t 30000 --exit \"test/integration/**/*.test.js\" && node -e \"require('fs').renameSync('coverage/lcov.info', 'coverage/integration.info')\"", + "cover-unit": "cross-env COVERAGE=true nyc --reporter=lcovonly mocha --require scripts/mocha-bootload -t 30000 --exit \"test/unit/**/*.test.js\" && node -e \"require('fs').renameSync('coverage/lcov.info', 'coverage/unit.info')\"", + "merge-coverage": "lcov-result-merger \"coverage/*.info\" \"coverage/lcov.info\"", + "sscce": "env-cmd $npm_package_options_env_cmd node sscce.js", + "sscce-mariadb": "cross-env DIALECT=mariadb npm run sscce", + "sscce-mysql": "cross-env DIALECT=mysql npm run sscce", + "sscce-postgres": "cross-env DIALECT=postgres npm run sscce", + "sscce-sqlite": "cross-env DIALECT=sqlite npm run sscce", + "sscce-mssql": "cross-env DIALECT=mssql npm run sscce", + "setup-mssql": "env-cmd $npm_package_options_env_cmd ./scripts/setup-mssql", + "semantic-release": "semantic-release" + } +} diff --git a/node_modules/sequelize/types/index.d.ts b/node_modules/sequelize/types/index.d.ts new file mode 100644 index 00000000..7bcd710b --- /dev/null +++ b/node_modules/sequelize/types/index.d.ts @@ -0,0 +1,20 @@ +import DataTypes = require('./lib/data-types'); +import Deferrable = require('./lib/deferrable'); +import Op = require('./lib/operators'); +import QueryTypes = require('./lib/query-types'); +import TableHints = require('./lib/table-hints'); +import IndexHints = require('./lib/index-hints'); +import Utils = require('./lib/utils'); + +export * from './lib/sequelize'; +export * from './lib/query-interface'; +export * from './lib/data-types'; +export * from './lib/model'; +export * from './lib/transaction'; +export * from './lib/associations/index'; +export * from './lib/errors'; +export { BaseError as Error } from './lib/errors'; +export { useInflection } from './lib/utils'; +export { Promise } from './lib/promise'; +export { Utils, QueryTypes, Op, TableHints, IndexHints, DataTypes, Deferrable }; +export { Validator as validator } from './lib/utils/validator-extras'; diff --git a/node_modules/sequelize/types/lib/associations/base.d.ts b/node_modules/sequelize/types/lib/associations/base.d.ts new file mode 100644 index 00000000..75603eba --- /dev/null +++ b/node_modules/sequelize/types/lib/associations/base.d.ts @@ -0,0 +1,116 @@ +import { ColumnOptions, Model, ModelCtor } from '../model'; + +export abstract class Association { + public associationType: string; + public source: ModelCtor; + public target: ModelCtor; + public isSelfAssociation: boolean; + public isSingleAssociation: boolean; + public isMultiAssociation: boolean; + public as: string; + public isAliased: boolean; + public foreignKey: string; + public identifier: string; + public inspect(): string; +} + +export interface SingleAssociationAccessors { + get: string; + set: string; + create: string; +} + +export interface MultiAssociationAccessors { + get: string; + set: string; + addMultiple: string; + add: string; + create: string; + remove: string; + removeMultiple: string; + hasSingle: string; + hasAll: string; + count: string; +} + +/** Foreign Key Options */ +export interface ForeignKeyOptions extends ColumnOptions { + /** Attribute name for the relation */ + name?: string; +} + +/** + * Options provided when associating models + */ +export interface AssociationOptions { + /** + * Set to true to run before-/afterDestroy hooks when an associated model is deleted because of a cascade. + * For example if `User.hasOne(Profile, {onDelete: 'cascade', hooks:true})`, the before-/afterDestroy hooks + * for profile will be called when a user is deleted. Otherwise the profile will be deleted without invoking + * any hooks. + * + * @default false + */ + hooks?: boolean; + + /** + * The alias of this model, in singular form. See also the `name` option passed to `sequelize.define`. If + * you create multiple associations between the same tables, you should provide an alias to be able to + * distinguish between them. If you provide an alias when creating the assocition, you should provide the + * same alias when eager loading and when getting associated models. Defaults to the singularized name of + * target + */ + as?: string | { singular: string; plural: string }; + + /** + * The name of the foreign key in the target table or an object representing the type definition for the + * foreign column (see `Sequelize.define` for syntax). When using an object, you can add a `name` property + * to set the name of the column. Defaults to the name of source + primary key of source + */ + foreignKey?: string | ForeignKeyOptions; + + /** + * What happens when delete occurs. + * + * Cascade if this is a n:m, and set null if it is a 1:m + * + * @default 'SET NULL' or 'CASCADE' + */ + onDelete?: string; + + /** + * What happens when update occurs + * + * @default 'CASCADE' + */ + onUpdate?: string; + + /** + * Should on update and on delete constraints be enabled on the foreign key. + */ + constraints?: boolean; + foreignKeyConstraint?: boolean; + + scope?: AssociationScope; +} + +/** + * Options for Association Scope + */ +export interface AssociationScope { + /** + * The name of the column that will be used for the associated scope and it's value + */ + [scopeName: string]: unknown; +} + +/** + * Options provided for many-to-many relationships + */ +export interface ManyToManyOptions extends AssociationOptions { + /** + * A key/value set that will be used for association create and find defaults on the target. + * (sqlite not supported for N:M) + */ + scope?: AssociationScope; +} diff --git a/node_modules/sequelize/types/lib/associations/belongs-to-many.d.ts b/node_modules/sequelize/types/lib/associations/belongs-to-many.d.ts new file mode 100644 index 00000000..8b642eaa --- /dev/null +++ b/node_modules/sequelize/types/lib/associations/belongs-to-many.d.ts @@ -0,0 +1,468 @@ +import { + BulkCreateOptions, + CreateOptions, + Filterable, + FindOptions, + InstanceDestroyOptions, + InstanceUpdateOptions, + Model, + ModelCtor, + Transactionable, + WhereOptions, +} from '../model'; +import { Promise } from '../promise'; +import { Transaction } from '../transaction'; +import { Association, AssociationScope, ForeignKeyOptions, ManyToManyOptions, MultiAssociationAccessors } from './base'; + +/** + * Used for a association table in n:m associations. + */ +export interface ThroughOptions { + /** + * The model used to join both sides of the N:M association. + */ + model: typeof Model; + + /** + * A key/value set that will be used for association create and find defaults on the through model. + * (Remember to add the attributes to the through model) + */ + scope?: AssociationScope; + + /** + * If true a unique key will be generated from the foreign keys used (might want to turn this off and create + * specific unique keys when using scopes) + * + * @default true + */ + unique?: boolean; +} + +/** + * Attributes for the join table + */ +export interface JoinTableAttributes { + [attribute: string]: unknown; +} + +/** + * Options provided when associating models with belongsToMany relationship + */ +export interface BelongsToManyOptions extends ManyToManyOptions { + /** + * The name of the table that is used to join source and target in n:m associations. Can also be a + * sequelize model if you want to define the junction table yourself and add extra attributes to it. + */ + through: typeof Model | string | ThroughOptions; + + /** + * The name of the foreign key in the join table (representing the target model) or an object representing + * the type definition for the other column (see `Sequelize.define` for syntax). When using an object, you + * can add a `name` property to set the name of the colum. Defaults to the name of target + primary key of + * target + */ + otherKey?: string | ForeignKeyOptions; + + /** + * Should the join model have timestamps + */ + timestamps?: boolean; + + /** + * The unique key name to override the autogenerated one when primary key is not present on through model + */ + uniqueKey?: string; +} + +export class BelongsToMany extends Association { + public otherKey: string; + public accessors: MultiAssociationAccessors; + constructor(source: ModelCtor, target: ModelCtor, options: BelongsToManyOptions); +} + +/** + * The options for the getAssociations mixin of the belongsToMany association. + * @see BelongsToManyGetAssociationsMixin + */ +export interface BelongsToManyGetAssociationsMixinOptions extends FindOptions { + /** + * Apply a scope on the related model, or remove its default scope by passing false. + */ + scope?: string | boolean; +} + +/** + * The getAssociations mixin applied to models with belongsToMany. + * An example of usage is as follows: + * + * ```js + * + * User.belongsToMany(Role, { through: UserRole }); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * getRoles: Sequelize.BelongsToManyGetAssociationsMixin; + * // setRoles... + * // addRoles... + * // addRole... + * // createRole... + * // removeRole... + * // removeRoles... + * // hasRole... + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to-many/ + * @see Instance + */ +export type BelongsToManyGetAssociationsMixin = ( + options?: BelongsToManyGetAssociationsMixinOptions +) => Promise; + +/** + * The options for the setAssociations mixin of the belongsToMany association. + * @see BelongsToManySetAssociationsMixin + */ +export interface BelongsToManySetAssociationsMixinOptions + extends FindOptions, + BulkCreateOptions, + InstanceUpdateOptions, + InstanceDestroyOptions { + through?: JoinTableAttributes; +} + +/** + * The setAssociations mixin applied to models with belongsToMany. + * An example of usage is as follows: + * + * ```js + * + * User.belongsToMany(Role, { through: UserRole }); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * setRoles: Sequelize.BelongsToManySetAssociationsMixin; + * // addRoles... + * // addRole... + * // createRole... + * // removeRole... + * // removeRoles... + * // hasRole... + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to-many/ + * @see Instance + */ +export type BelongsToManySetAssociationsMixin = ( + newAssociations?: (TModel | TModelPrimaryKey)[], + options?: BelongsToManySetAssociationsMixinOptions +) => Promise; + +/** + * The options for the addAssociations mixin of the belongsToMany association. + * @see BelongsToManyAddAssociationsMixin + */ +export interface BelongsToManyAddAssociationsMixinOptions + extends FindOptions, + BulkCreateOptions, + InstanceUpdateOptions, + InstanceDestroyOptions { + through?: JoinTableAttributes; +} + +/** + * The addAssociations mixin applied to models with belongsToMany. + * An example of usage is as follows: + * + * ```js + * + * User.belongsToMany(Role, { through: UserRole }); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * addRoles: Sequelize.BelongsToManyAddAssociationsMixin; + * // addRole... + * // createRole... + * // removeRole... + * // removeRoles... + * // hasRole... + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to-many/ + * @see Instance + */ +export type BelongsToManyAddAssociationsMixin = ( + newAssociations?: (TModel | TModelPrimaryKey)[], + options?: BelongsToManyAddAssociationsMixinOptions +) => Promise; + +/** + * The options for the addAssociation mixin of the belongsToMany association. + * @see BelongsToManyAddAssociationMixin + */ +export interface BelongsToManyAddAssociationMixinOptions + extends FindOptions, + BulkCreateOptions, + InstanceUpdateOptions, + InstanceDestroyOptions { + through?: JoinTableAttributes; +} + +/** + * The addAssociation mixin applied to models with belongsToMany. + * An example of usage is as follows: + * + * ```js + * + * User.belongsToMany(Role, { through: UserRole }); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * // addRoles... + * addRole: Sequelize.BelongsToManyAddAssociationMixin; + * // createRole... + * // removeRole... + * // removeRoles... + * // hasRole... + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to-many/ + * @see Instance + */ +export type BelongsToManyAddAssociationMixin = ( + newAssociation?: TModel | TModelPrimaryKey, + options?: BelongsToManyAddAssociationMixinOptions +) => Promise; + +/** + * The options for the createAssociation mixin of the belongsToMany association. + * @see BelongsToManyCreateAssociationMixin + */ +export interface BelongsToManyCreateAssociationMixinOptions extends CreateOptions { + through?: JoinTableAttributes; +} +/** + * The createAssociation mixin applied to models with belongsToMany. + * An example of usage is as follows: + * + * ```js + * + * User.belongsToMany(Role, { through: UserRole }); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * // addRoles... + * // addRole... + * createRole: Sequelize.BelongsToManyCreateAssociationMixin; + * // removeRole... + * // removeRoles... + * // hasRole... + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to-many/ + * @see Instance + */ +export type BelongsToManyCreateAssociationMixin = ( + values?: { [attribute: string]: unknown }, + options?: BelongsToManyCreateAssociationMixinOptions +) => Promise; + +/** + * The options for the removeAssociation mixin of the belongsToMany association. + * @see BelongsToManyRemoveAssociationMixin + */ +export interface BelongsToManyRemoveAssociationMixinOptions extends InstanceDestroyOptions {} + +/** + * The removeAssociation mixin applied to models with belongsToMany. + * An example of usage is as follows: + * + * ```js + * + * User.belongsToMany(Role, { through: UserRole }); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * // addRoles... + * // addRole... + * // createRole... + * removeRole: Sequelize.BelongsToManyRemoveAssociationMixin; + * // removeRoles... + * // hasRole... + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to-many/ + * @see Instance + */ +export type BelongsToManyRemoveAssociationMixin = ( + oldAssociated?: TModel | TModelPrimaryKey, + options?: BelongsToManyRemoveAssociationMixinOptions +) => Promise; + +/** + * The options for the removeAssociations mixin of the belongsToMany association. + * @see BelongsToManyRemoveAssociationsMixin + */ +export interface BelongsToManyRemoveAssociationsMixinOptions extends InstanceDestroyOptions, InstanceDestroyOptions {} + +/** + * The removeAssociations mixin applied to models with belongsToMany. + * An example of usage is as follows: + * + * ```js + * + * User.belongsToMany(Role, { through: UserRole }); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * // addRoles... + * // addRole... + * // createRole... + * // removeRole... + * removeRoles: Sequelize.BelongsToManyRemoveAssociationsMixin; + * // hasRole... + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to-many/ + * @see Instance + */ +export type BelongsToManyRemoveAssociationsMixin = ( + oldAssociateds?: (TModel | TModelPrimaryKey)[], + options?: BelongsToManyRemoveAssociationsMixinOptions +) => Promise; + +/** + * The options for the hasAssociation mixin of the belongsToMany association. + * @see BelongsToManyHasAssociationMixin + */ +export interface BelongsToManyHasAssociationMixinOptions extends BelongsToManyGetAssociationsMixinOptions {} + +/** + * The hasAssociation mixin applied to models with belongsToMany. + * An example of usage is as follows: + * + * ```js + * + * User.belongsToMany(Role, { through: UserRole }); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * // addRoles... + * // addRole... + * // createRole... + * // removeRole... + * // removeRoles... + * hasRole: Sequelize.BelongsToManyHasAssociationMixin; + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to-many/ + * @see Instance + */ +export type BelongsToManyHasAssociationMixin = ( + target: TModel | TModelPrimaryKey, + options?: BelongsToManyHasAssociationMixinOptions +) => Promise; + +/** + * The options for the hasAssociations mixin of the belongsToMany association. + * @see BelongsToManyHasAssociationsMixin + */ +export interface BelongsToManyHasAssociationsMixinOptions extends BelongsToManyGetAssociationsMixinOptions {} + +/** + * The removeAssociations mixin applied to models with belongsToMany. + * An example of usage is as follows: + * + * ```js + * + * User.belongsToMany(Role, { through: UserRole }); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * // addRoles... + * // addRole... + * // createRole... + * // removeRole... + * // removeRoles + * // hasRole... + * hasRoles: Sequelize.BelongsToManyHasAssociationsMixin; + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to-many/ + * @see Instance + */ +export type BelongsToManyHasAssociationsMixin = ( + targets: (TModel | TModelPrimaryKey)[], + options?: BelongsToManyHasAssociationsMixinOptions +) => Promise; + +/** + * The options for the countAssociations mixin of the belongsToMany association. + * @see BelongsToManyCountAssociationsMixin + */ +export interface BelongsToManyCountAssociationsMixinOptions extends Transactionable, Filterable { + /** + * Apply a scope on the related model, or remove its default scope by passing false. + */ + scope?: string | boolean; +} + +/** + * The countAssociations mixin applied to models with belongsToMany. + * An example of usage is as follows: + * + * ```js + * + * User.belongsToMany(Role, { through: UserRole }); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * // addRoles... + * // addRole... + * // createRole... + * // removeRole... + * // removeRoles... + * // hasRole... + * // hasRoles... + * countRoles: Sequelize.BelongsToManyCountAssociationsMixin; + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to-many/ + * @see Instance + */ +export type BelongsToManyCountAssociationsMixin = ( + options?: BelongsToManyCountAssociationsMixinOptions +) => Promise; diff --git a/node_modules/sequelize/types/lib/associations/belongs-to.d.ts b/node_modules/sequelize/types/lib/associations/belongs-to.d.ts new file mode 100644 index 00000000..4ed166bd --- /dev/null +++ b/node_modules/sequelize/types/lib/associations/belongs-to.d.ts @@ -0,0 +1,124 @@ +import { DataType } from '../data-types'; +import { CreateOptions, FindOptions, Model, ModelCtor, SaveOptions } from '../model'; +import { Promise } from '../promise'; +import { Association, AssociationOptions, SingleAssociationAccessors } from './base'; + +// type ModelCtor = InstanceType; +/** + * Options provided when associating models with belongsTo relationship + * + * @see Association class belongsTo method + */ +export interface BelongsToOptions extends AssociationOptions { + /** + * The name of the field to use as the key for the association in the target table. Defaults to the primary + * key of the target table + */ + targetKey?: string; + + /** + * A string or a data type to represent the identifier in the table + */ + keyType?: DataType; +} + +export class BelongsTo extends Association { + public accessors: SingleAssociationAccessors; + constructor(source: ModelCtor, target: ModelCtor, options: BelongsToOptions); +} + +/** + * The options for the getAssociation mixin of the belongsTo association. + * @see BelongsToGetAssociationMixin + */ +export interface BelongsToGetAssociationMixinOptions extends FindOptions { + /** + * Apply a scope on the related model, or remove its default scope by passing false. + */ + scope?: string | string[] | boolean; +} + +/** + * The getAssociation mixin applied to models with belongsTo. + * An example of usage is as follows: + * + * ```js + * + * User.belongsTo(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttrib { + * getRole: Sequelize.BelongsToGetAssociationMixin; + * // setRole... + * // createRole... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to/ + * @see Instance + */ +export type BelongsToGetAssociationMixin = (options?: BelongsToGetAssociationMixinOptions) => Promise; + +/** + * The options for the setAssociation mixin of the belongsTo association. + * @see BelongsToSetAssociationMixin + */ +export interface BelongsToSetAssociationMixinOptions extends SaveOptions { + /** + * Skip saving this after setting the foreign key if false. + */ + save?: boolean; +} + +/** + * The setAssociation mixin applied to models with belongsTo. + * An example of usage is as follows: + * + * ```js + * + * User.belongsTo(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRole... + * setRole: Sequelize.BelongsToSetAssociationMixin; + * // createRole... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to/ + * @see Instance + */ +export type BelongsToSetAssociationMixin = ( + newAssociation?: TModel | TPrimaryKey, + options?: BelongsToSetAssociationMixinOptions +) => Promise; + +/** + * The options for the createAssociation mixin of the belongsTo association. + * @see BelongsToCreateAssociationMixin + */ +export interface BelongsToCreateAssociationMixinOptions extends CreateOptions, BelongsToSetAssociationMixinOptions {} + +/** + * The createAssociation mixin applied to models with belongsTo. + * An example of usage is as follows: + * + * ```js + * + * User.belongsTo(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRole... + * // setRole... + * createRole: Sequelize.BelongsToCreateAssociationMixin; + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to/ + * @see Instance + */ +export type BelongsToCreateAssociationMixin = ( + values?: { [attribute: string]: unknown }, + options?: BelongsToCreateAssociationMixinOptions +) => Promise; + +export default BelongsTo; diff --git a/node_modules/sequelize/types/lib/associations/has-many.d.ts b/node_modules/sequelize/types/lib/associations/has-many.d.ts new file mode 100644 index 00000000..f3523ac9 --- /dev/null +++ b/node_modules/sequelize/types/lib/associations/has-many.d.ts @@ -0,0 +1,398 @@ +import { DataType } from '../data-types'; +import { + CreateOptions, + Filterable, + FindOptions, + InstanceUpdateOptions, + Model, + ModelCtor, + Transactionable, +} from '../model'; +import { Promise } from '../promise'; +import { Association, ManyToManyOptions, MultiAssociationAccessors } from './base'; + +/** + * Options provided when associating models with hasMany relationship + */ +export interface HasManyOptions extends ManyToManyOptions { + + /** + * The name of the field to use as the key for the association in the source table. Defaults to the primary + * key of the source table + */ + sourceKey?: string; + + /** + * A string or a data type to represent the identifier in the table + */ + keyType?: DataType; +} + +export class HasMany extends Association { + public accessors: MultiAssociationAccessors; + constructor(source: ModelCtor, target: ModelCtor, options: HasManyOptions); +} + +/** + * The options for the getAssociations mixin of the hasMany association. + * @see HasManyGetAssociationsMixin + */ +export interface HasManyGetAssociationsMixinOptions extends FindOptions { + /** + * Apply a scope on the related model, or remove its default scope by passing false. + */ + scope?: string | string[] | boolean; +} + +/** + * The getAssociations mixin applied to models with hasMany. + * An example of usage is as follows: + * + * ```js + * + * User.hasMany(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * getRoles: Sequelize.HasManyGetAssociationsMixin; + * // setRoles... + * // addRoles... + * // addRole... + * // createRole... + * // removeRole... + * // removeRoles... + * // hasRole... + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/has-many/ + * @see Instance + */ +export type HasManyGetAssociationsMixin = (options?: HasManyGetAssociationsMixinOptions) => Promise; + +/** + * The options for the setAssociations mixin of the hasMany association. + * @see HasManySetAssociationsMixin + */ +export interface HasManySetAssociationsMixinOptions extends FindOptions, InstanceUpdateOptions {} + +/** + * The setAssociations mixin applied to models with hasMany. + * An example of usage is as follows: + * + * ```js + * + * User.hasMany(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * setRoles: Sequelize.HasManySetAssociationsMixin; + * // addRoles... + * // addRole... + * // createRole... + * // removeRole... + * // removeRoles... + * // hasRole... + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/has-many/ + * @see Instance + */ +export type HasManySetAssociationsMixin = ( + newAssociations?: (TModel | TModelPrimaryKey)[], + options?: HasManySetAssociationsMixinOptions +) => Promise; + +/** + * The options for the addAssociations mixin of the hasMany association. + * @see HasManyAddAssociationsMixin + */ +export interface HasManyAddAssociationsMixinOptions extends InstanceUpdateOptions {} + +/** + * The addAssociations mixin applied to models with hasMany. + * An example of usage is as follows: + * + * ```js + * + * User.hasMany(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * addRoles: Sequelize.HasManyAddAssociationsMixin; + * // addRole... + * // createRole... + * // removeRole... + * // removeRoles... + * // hasRole... + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/has-many/ + * @see Instance + */ +export type HasManyAddAssociationsMixin = ( + newAssociations?: (TModel | TModelPrimaryKey)[], + options?: HasManyAddAssociationsMixinOptions +) => Promise; + +/** + * The options for the addAssociation mixin of the hasMany association. + * @see HasManyAddAssociationMixin + */ +export interface HasManyAddAssociationMixinOptions extends InstanceUpdateOptions {} + +/** + * The addAssociation mixin applied to models with hasMany. + * An example of usage is as follows: + * + * ```js + * + * User.hasMany(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * // addRoles... + * addRole: Sequelize.HasManyAddAssociationMixin; + * // createRole... + * // removeRole... + * // removeRoles... + * // hasRole... + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/has-many/ + * @see Instance + */ +export type HasManyAddAssociationMixin = ( + newAssociation?: TModel | TModelPrimaryKey, + options?: HasManyAddAssociationMixinOptions +) => Promise; + +/** + * The options for the createAssociation mixin of the hasMany association. + * @see HasManyCreateAssociationMixin + */ +export interface HasManyCreateAssociationMixinOptions extends CreateOptions {} + +/** + * The createAssociation mixin applied to models with hasMany. + * An example of usage is as follows: + * + * ```js + * + * User.hasMany(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * // addRoles... + * // addRole... + * createRole: Sequelize.HasManyCreateAssociationMixin; + * // removeRole... + * // removeRoles... + * // hasRole... + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/has-many/ + * @see Instance + */ +export type HasManyCreateAssociationMixin = ( + values?: { [attribute: string]: unknown }, + options?: HasManyCreateAssociationMixinOptions +) => Promise; + +/** + * The options for the removeAssociation mixin of the hasMany association. + * @see HasManyRemoveAssociationMixin + */ +export interface HasManyRemoveAssociationMixinOptions extends InstanceUpdateOptions {} + +/** + * The removeAssociation mixin applied to models with hasMany. + * An example of usage is as follows: + * + * ```js + * + * User.hasMany(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * // addRoles... + * // addRole... + * // createRole... + * removeRole: Sequelize.HasManyRemoveAssociationMixin; + * // removeRoles... + * // hasRole... + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/has-many/ + * @see Instance + */ +export type HasManyRemoveAssociationMixin = ( + oldAssociated?: TModel | TModelPrimaryKey, + options?: HasManyRemoveAssociationMixinOptions +) => Promise; + +/** + * The options for the removeAssociations mixin of the hasMany association. + * @see HasManyRemoveAssociationsMixin + */ +export interface HasManyRemoveAssociationsMixinOptions extends InstanceUpdateOptions {} + +/** + * The removeAssociations mixin applied to models with hasMany. + * An example of usage is as follows: + * + * ```js + * + * User.hasMany(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * // addRoles... + * // addRole... + * // createRole... + * // removeRole... + * removeRoles: Sequelize.HasManyRemoveAssociationsMixin; + * // hasRole... + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/has-many/ + * @see Instance + */ +export type HasManyRemoveAssociationsMixin = ( + oldAssociateds?: (TModel | TModelPrimaryKey)[], + options?: HasManyRemoveAssociationsMixinOptions +) => Promise; + +/** + * The options for the hasAssociation mixin of the hasMany association. + * @see HasManyHasAssociationMixin + */ +export interface HasManyHasAssociationMixinOptions extends HasManyGetAssociationsMixinOptions {} + +/** + * The hasAssociation mixin applied to models with hasMany. + * An example of usage is as follows: + * + * ```js + * + * User.hasMany(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * // addRoles... + * // addRole... + * // createRole... + * // removeRole... + * // removeRoles... + * hasRole: Sequelize.HasManyHasAssociationMixin; + * // hasRoles... + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/has-many/ + * @see Instance + */ +export type HasManyHasAssociationMixin = ( + target: TModel | TModelPrimaryKey, + options?: HasManyHasAssociationMixinOptions +) => Promise; + +/** + * The options for the hasAssociations mixin of the hasMany association. + * @see HasManyHasAssociationsMixin + */ +export interface HasManyHasAssociationsMixinOptions extends HasManyGetAssociationsMixinOptions {} + +/** + * The removeAssociations mixin applied to models with hasMany. + * An example of usage is as follows: + * + * ```js + * + * User.hasMany(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * // addRoles... + * // addRole... + * // createRole... + * // removeRole... + * // removeRoles + * // hasRole... + * hasRoles: Sequelize.HasManyHasAssociationsMixin; + * // countRoles... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/has-many/ + * @see Instance + */ +export type HasManyHasAssociationsMixin = ( + targets: (TModel | TModelPrimaryKey)[], + options?: HasManyHasAssociationsMixinOptions +) => Promise; + +/** + * The options for the countAssociations mixin of the hasMany association. + * @see HasManyCountAssociationsMixin + */ +export interface HasManyCountAssociationsMixinOptions extends Transactionable, Filterable { + /** + * Apply a scope on the related model, or remove its default scope by passing false. + */ + scope?: string | boolean; +} + +/** + * The countAssociations mixin applied to models with hasMany. + * An example of usage is as follows: + * + * ```js + * + * User.hasMany(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRoles... + * // setRoles... + * // addRoles... + * // addRole... + * // createRole... + * // removeRole... + * // removeRoles... + * // hasRole... + * // hasRoles... + * countRoles: Sequelize.HasManyCountAssociationsMixin; + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/has-many/ + * @see Instance + */ +export type HasManyCountAssociationsMixin = (options?: HasManyCountAssociationsMixinOptions) => Promise; diff --git a/node_modules/sequelize/types/lib/associations/has-one.d.ts b/node_modules/sequelize/types/lib/associations/has-one.d.ts new file mode 100644 index 00000000..0ce323e3 --- /dev/null +++ b/node_modules/sequelize/types/lib/associations/has-one.d.ts @@ -0,0 +1,120 @@ +import { DataType } from '../data-types'; +import { CreateOptions, FindOptions, Model, ModelCtor, SaveOptions } from '../model'; +import { Promise } from '../promise'; +import { Association, AssociationOptions, SingleAssociationAccessors } from './base'; + +/** + * Options provided when associating models with hasOne relationship + */ +export interface HasOneOptions extends AssociationOptions { + + /** + * The name of the field to use as the key for the association in the source table. Defaults to the primary + * key of the source table + */ + sourceKey?: string; + + /** + * A string or a data type to represent the identifier in the table + */ + keyType?: DataType; +} + +export class HasOne extends Association { + public accessors: SingleAssociationAccessors; + constructor(source: ModelCtor, target: ModelCtor, options: HasOneOptions); +} + +/** + * The options for the getAssociation mixin of the hasOne association. + * @see HasOneGetAssociationMixin + */ +export interface HasOneGetAssociationMixinOptions extends FindOptions { + /** + * Apply a scope on the related model, or remove its default scope by passing false. + */ + scope?: string | string[] | boolean; +} + +/** + * The getAssociation mixin applied to models with hasOne. + * An example of usage is as follows: + * + * ```js + * + * User.hasOne(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttrib { + * getRole: Sequelize.HasOneGetAssociationMixin; + * // setRole... + * // createRole... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/has-one/ + * @see Instance + */ +export type HasOneGetAssociationMixin = (options?: HasOneGetAssociationMixinOptions) => Promise; + +/** + * The options for the setAssociation mixin of the hasOne association. + * @see HasOneSetAssociationMixin + */ +export interface HasOneSetAssociationMixinOptions extends HasOneGetAssociationMixinOptions, SaveOptions { + /** + * Skip saving this after setting the foreign key if false. + */ + save?: boolean; +} + +/** + * The setAssociation mixin applied to models with hasOne. + * An example of usage is as follows: + * + * ```js + * + * User.hasOne(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRole... + * setRole: Sequelize.HasOneSetAssociationMixin; + * // createRole... + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/has-one/ + * @see Instance + */ +export type HasOneSetAssociationMixin = ( + newAssociation?: TModel | TModelPrimaryKey, + options?: HasOneSetAssociationMixinOptions +) => Promise; + +/** + * The options for the createAssociation mixin of the hasOne association. + * @see HasOneCreateAssociationMixin + */ +export interface HasOneCreateAssociationMixinOptions extends HasOneSetAssociationMixinOptions, CreateOptions {} + +/** + * The createAssociation mixin applied to models with hasOne. + * An example of usage is as follows: + * + * ```js + * + * User.hasOne(Role); + * + * interface UserInstance extends Sequelize.Instance, UserAttributes { + * // getRole... + * // setRole... + * createRole: Sequelize.HasOneCreateAssociationMixin; + * } + * ``` + * + * @see http://docs.sequelizejs.com/en/latest/api/associations/has-one/ + * @see Instance + */ +export type HasOneCreateAssociationMixin = ( + values?: { [attribute: string]: unknown }, + options?: HasOneCreateAssociationMixinOptions +) => Promise; diff --git a/node_modules/sequelize/types/lib/associations/index.d.ts b/node_modules/sequelize/types/lib/associations/index.d.ts new file mode 100644 index 00000000..2fbdbe04 --- /dev/null +++ b/node_modules/sequelize/types/lib/associations/index.d.ts @@ -0,0 +1,5 @@ +export * from './base'; +export * from './belongs-to'; +export * from './has-one'; +export * from './has-many'; +export * from './belongs-to-many'; diff --git a/node_modules/sequelize/types/lib/connection-manager.d.ts b/node_modules/sequelize/types/lib/connection-manager.d.ts new file mode 100644 index 00000000..071bb32a --- /dev/null +++ b/node_modules/sequelize/types/lib/connection-manager.d.ts @@ -0,0 +1,36 @@ +import { Promise } from './promise'; + +export interface GetConnectionOptions { + /** + * Set which replica to use. Available options are `read` and `write` + */ + type: 'read' | 'write'; + /** + * Force master or write replica to get connection from + */ + useMaster?: boolean; +} + +export type Connection = object; + +export interface ConnectionManager { + refreshTypeParser(dataTypes: object): void; + /** + * Drain the pool and close it permanently + */ + close(): Promise; + /** + * Initialize connection pool. By default pool autostart is set to false, so no connection will be + * be created unless `pool.acquire` is called. + */ + initPools(): void; + /** + * Get connection from pool. It sets database version if it's not already set. + * Call pool.acquire to get a connection. + */ + getConnection(opts: GetConnectionOptions): Promise; + /** + * Release a pooled connection so it can be utilized by other connection requests + */ + releaseConnection(conn: Connection): Promise; +} diff --git a/node_modules/sequelize/types/lib/data-types.d.ts b/node_modules/sequelize/types/lib/data-types.d.ts new file mode 100644 index 00000000..617b01e8 --- /dev/null +++ b/node_modules/sequelize/types/lib/data-types.d.ts @@ -0,0 +1,610 @@ +/** + * The datatypes are used when defining a new model using `Model.init`, like this: + * ```js + * class MyModel extends MyModel {} + * MyModel.init({ column: DataTypes.INTEGER }, { sequelize }); + * ``` + * When defining a model you can just as easily pass a string as type, but often using the types defined here is beneficial. For example, using `DataTypes.BLOB`, mean + * that that column will be returned as an instance of `Buffer` when being fetched by sequelize. + * + * Some data types have special properties that can be accessed in order to change the data type. + * For example, to get an unsigned integer with zerofill you can do `DataTypes.INTEGER.UNSIGNED.ZEROFILL`. + * The order you access the properties in do not matter, so `DataTypes.INTEGER.ZEROFILL.UNSIGNED` is fine as well. The available properties are listed under each data type. + * + * To provide a length for the data type, you can invoke it like a function: `INTEGER(2)` + * + * Three of the values provided here (`NOW`, `UUIDV1` and `UUIDV4`) are special default values, that should not be used to define types. Instead they are used as shorthands for + * defining default values. For example, to get a uuid field with a default value generated following v1 of the UUID standard: + * ```js + * class MyModel extends Model {} + * MyModel.init({ + * uuid: { + * type: DataTypes.UUID, + * defaultValue: DataTypes.UUIDV1, + * primaryKey: true + * } + * }, { sequelize }) + * ``` + * There may be times when you want to generate your own UUID conforming to some other algorithm. This is accomplised + * using the defaultValue property as well, but instead of specifying one of the supplied UUID types, you return a value + * from a function. + * ```js + * class MyModel extends Model {} + * MyModel.init({ + * uuid: { + * type: DataTypes.UUID, + * defaultValue() { + * return generateMyId() + * }, + * primaryKey: true + * } + * }, { sequelize }) + * ``` + */ + +/** + * + */ +export type DataType = string | AbstractDataTypeConstructor | AbstractDataType; + +export const ABSTRACT: AbstractDataTypeConstructor; + +interface AbstractDataTypeConstructor { + key: string; + warn(link: string, text: string): void; +} + +export interface AbstractDataType { + key: string; + dialectTypes: string; + toSql(): string; + stringify(value: unknown, options?: object): string; + toString(options: object): string; +} + +/** + * A variable length string. Default length 255 + */ +export const STRING: StringDataTypeConstructor; + +interface StringDataTypeConstructor extends AbstractDataTypeConstructor { + new (length?: number, binary?: boolean): StringDataType; + new (options?: StringDataTypeOptions): StringDataType; + (length?: number, binary?: boolean): StringDataType; + (options?: StringDataTypeOptions): StringDataType; +} + +export interface StringDataType extends AbstractDataType { + options?: StringDataTypeOptions; + BINARY: this; + validate(value: unknown): boolean; +} + +export interface StringDataTypeOptions { + length?: number; + binary?: boolean; +} + +/** + * A fixed length string. Default length 255 + */ +export const CHAR: CharDataTypeConstructor; + +interface CharDataTypeConstructor extends StringDataTypeConstructor { + new (length?: number, binary?: boolean): CharDataType; + new (options?: CharDataTypeOptions): CharDataType; + (length?: number, binary?: boolean): CharDataType; + (options?: CharDataTypeOptions): CharDataType; +} + +export interface CharDataType extends StringDataType { + options: CharDataTypeOptions; +} + +export interface CharDataTypeOptions extends StringDataTypeOptions {} + +export type TextLength = 'tiny' | 'medium' | 'long'; + +/** + * An (un)limited length text column. Available lengths: `tiny`, `medium`, `long` + */ +export const TEXT: TextDataTypeConstructor; + +interface TextDataTypeConstructor extends AbstractDataTypeConstructor { + new (length?: TextLength): TextDataType; + (options?: TextDataTypeOptions): TextDataType; +} + +export interface TextDataType extends AbstractDataType { + options: TextDataTypeOptions; + validate(value: unknown): boolean; +} + +export interface TextDataTypeOptions { + length?: TextLength; +} + +export const NUMBER: NumberDataTypeConstructor; + +interface NumberDataTypeConstructor extends AbstractDataTypeConstructor { + options: NumberDataTypeOptions; + UNSIGNED: this; + ZEROFILL: this; + new (options?: NumberDataTypeOptions): NumberDataType; + (options?: NumberDataTypeOptions): NumberDataType; + validate(value: unknown): boolean; +} + +export interface NumberDataType extends AbstractDataType { + options: NumberDataTypeOptions; + UNSIGNED: this; + ZEROFILL: this; + validate(value: unknown): boolean; +} + +export interface IntegerDataTypeOptions { + length?: number; + zerofill?: boolean; + unsigned?: boolean; +} +export interface NumberDataTypeOptions extends IntegerDataTypeOptions { + decimals?: number; + precision?: number; + scale?: number; +} + +/** + * A 8 bit integer. + */ +export const TINYINT: TinyIntegerDataTypeConstructor; + +interface TinyIntegerDataTypeConstructor extends NumberDataTypeConstructor { + new (options?: IntegerDataTypeOptions): TinyIntegerDataType; + (options?: IntegerDataTypeOptions): TinyIntegerDataType; +} + +export interface TinyIntegerDataType extends NumberDataType { + options: IntegerDataTypeOptions; +} + +/** + * A 16 bit integer. + */ +export const SMALLINT: SmallIntegerDataTypeConstructor; + +interface SmallIntegerDataTypeConstructor extends NumberDataTypeConstructor { + new (options?: IntegerDataTypeOptions): SmallIntegerDataType; + (options?: IntegerDataTypeOptions): SmallIntegerDataType; +} + +export interface SmallIntegerDataType extends NumberDataType { + options: IntegerDataTypeOptions; +} + +/** + * A 24 bit integer. + */ +export const MEDIUMINT: MediumIntegerDataTypeConstructor; + +interface MediumIntegerDataTypeConstructor extends NumberDataTypeConstructor { + new (options?: IntegerDataTypeOptions): MediumIntegerDataType; + (options?: IntegerDataTypeOptions): MediumIntegerDataType; +} + +export interface MediumIntegerDataType extends NumberDataType { + options: IntegerDataTypeOptions; +} + +/** + * A 32 bit integer. + */ +export const INTEGER: IntegerDataTypeConstructor; + +interface IntegerDataTypeConstructor extends NumberDataTypeConstructor { + new (options?: NumberDataTypeOptions): IntegerDataType; + (options?: NumberDataTypeOptions): IntegerDataType; +} + +export interface IntegerDataType extends NumberDataType { + options: NumberDataTypeOptions; +} + +/** + * A 64 bit integer. + * + * Available properties: `UNSIGNED`, `ZEROFILL` + * + */ +export const BIGINT: BigIntDataTypeConstructor; + +interface BigIntDataTypeConstructor extends NumberDataTypeConstructor { + new (options?: IntegerDataTypeOptions): BigIntDataType; + (options?: IntegerDataTypeOptions): BigIntDataType; +} + +export interface BigIntDataType extends NumberDataType { + options: IntegerDataTypeOptions; +} + +/** + * Floating point number (4-byte precision). Accepts one or two arguments for precision + */ +export const FLOAT: FloatDataTypeConstructor; + +interface FloatDataTypeConstructor extends NumberDataTypeConstructor { + new (length?: number, decimals?: number): FloatDataType; + new (options?: FloatDataTypeOptions): FloatDataType; + (length?: number, decimals?: number): FloatDataType; + (options?: FloatDataTypeOptions): FloatDataType; +} + +export interface FloatDataType extends NumberDataType { + options: FloatDataTypeOptions; +} + +export interface FloatDataTypeOptions { + length?: number; + decimals?: number; +} + +/** + * Floating point number (4-byte precision). Accepts one or two arguments for precision + */ +export const REAL: RealDataTypeConstructor; + +interface RealDataTypeConstructor extends NumberDataTypeConstructor { + new (length?: number, decimals?: number): RealDataType; + new (options?: RealDataTypeOptions): RealDataType; + (length?: number, decimals?: number): RealDataType; + (options?: RealDataTypeOptions): RealDataType; +} + +export interface RealDataType extends NumberDataType { + options: RealDataTypeOptions; +} + +export interface RealDataTypeOptions { + length?: number; + decimals?: number; +} + +/** + * Floating point number (8-byte precision). Accepts one or two arguments for precision + */ +export const DOUBLE: DoubleDataTypeConstructor; + +interface DoubleDataTypeConstructor extends NumberDataTypeConstructor { + new (length?: number, decimals?: number): DoubleDataType; + new (options?: DoubleDataTypeOptions): DoubleDataType; + (length?: number, decimals?: number): DoubleDataType; + (options?: DoubleDataTypeOptions): DoubleDataType; +} + +export interface DoubleDataType extends NumberDataType { + options: DoubleDataTypeOptions; +} + +export interface DoubleDataTypeOptions { + length?: number; + decimals?: number; +} + +/** + * Decimal number. Accepts one or two arguments for precision + */ +export const DECIMAL: DecimalDataTypeConstructor; + +interface DecimalDataTypeConstructor extends NumberDataTypeConstructor { + PRECISION: this; + SCALE: this; + new (precision?: number, scale?: number): DecimalDataType; + new (options?: DecimalDataTypeOptions): DecimalDataType; + (precision?: number, scale?: number): DecimalDataType; + (options?: DecimalDataTypeOptions): DecimalDataType; +} + +export interface DecimalDataType extends NumberDataType { + options: DecimalDataTypeOptions; +} + +export interface DecimalDataTypeOptions { + precision?: number; + scale?: number; +} + +/** + * A boolean / tinyint column, depending on dialect + */ +export const BOOLEAN: AbstractDataTypeConstructor; + +/** + * A time column + */ +export const TIME: AbstractDataTypeConstructor; + +/** + * A datetime column + */ +export const DATE: DateDataTypeConstructor; + +interface DateDataTypeConstructor extends AbstractDataTypeConstructor { + new (length?: string | number): DateDataType; + new (options?: DateDataTypeOptions): DateDataType; + (length?: string | number): DateDataType; + (options?: DateDataTypeOptions): DateDataType; +} + +export interface DateDataType extends AbstractDataTypeConstructor { + options: DateDataTypeOptions; +} + +export interface DateDataTypeOptions { + length?: string | number; +} + +/** + * A date only column + */ +export const DATEONLY: DateOnlyDataTypeConstructor; + +interface DateOnlyDataTypeConstructor extends AbstractDataTypeConstructor { + new (): DateOnlyDataType; + (): DateOnlyDataType; +} + +export interface DateOnlyDataType extends AbstractDataType { +} + + +/** + * A key / value column. Only available in postgres. + */ +export const HSTORE: AbstractDataTypeConstructor; + +/** + * A JSON string column. Only available in postgres. + */ +export const JSON: AbstractDataTypeConstructor; + +/** + * A pre-processed JSON data column. Only available in postgres. + */ +export const JSONB: AbstractDataTypeConstructor; + +/** + * A default value of the current timestamp + */ +export const NOW: AbstractDataTypeConstructor; + +/** + * Binary storage. Available lengths: `tiny`, `medium`, `long` + */ +export const BLOB: BlobDataTypeConstructor; + +export type BlobSize = 'tiny' | 'medium' | 'long'; + +interface BlobDataTypeConstructor extends AbstractDataTypeConstructor { + new (length?: BlobSize): BlobDataType; + new (options?: BlobDataTypeOptions): BlobDataType; + (length?: BlobSize): BlobDataType; + (options?: BlobDataTypeOptions): BlobDataType; +} + +export interface BlobDataType extends AbstractDataType { + options: BlobDataTypeOptions; + escape: boolean; +} + +export interface BlobDataTypeOptions { + length?: BlobSize; + escape?: boolean; +} + +/** + * Range types are data types representing a range of values of some element type (called the range's subtype). + * Only available in postgres. + * + * See [Postgres documentation](http://www.postgresql.org/docs/9.4/static/rangetypes.html) for more details + */ +export const RANGE: RangeDataTypeConstructor; + +export type RangeableDataType = + | IntegerDataTypeConstructor + | IntegerDataType + | BigIntDataTypeConstructor + | BigIntDataType + | DecimalDataTypeConstructor + | DecimalDataType + | DateOnlyDataTypeConstructor + | DateOnlyDataType + | DateDataTypeConstructor + | DateDataType; + +interface RangeDataTypeConstructor extends AbstractDataTypeConstructor { + new (subtype?: T): RangeDataType; + new (options: RangeDataTypeOptions): RangeDataType; + (subtype?: T): RangeDataType; + (options: RangeDataTypeOptions): RangeDataType; +} + +export interface RangeDataType extends AbstractDataType { + options: RangeDataTypeOptions; +} + +export interface RangeDataTypeOptions { + subtype?: T; +} + +/** + * A column storing a unique universal identifier. Use with `UUIDV1` or `UUIDV4` for default values. + */ +export const UUID: AbstractDataTypeConstructor; + +/** + * A default unique universal identifier generated following the UUID v1 standard + */ +export const UUIDV1: AbstractDataTypeConstructor; + +/** + * A default unique universal identifier generated following the UUID v4 standard + */ +export const UUIDV4: AbstractDataTypeConstructor; + +/** + * A virtual value that is not stored in the DB. This could for example be useful if you want to provide a default value in your model that is returned to the user but not stored in the DB. + * + * You could also use it to validate a value before permuting and storing it. Checking password length before hashing it for example: + * ```js + * class User extends Model {} + * User.init({ + * password_hash: DataTypes.STRING, + * password: { + * type: DataTypes.VIRTUAL, + * set (val) { + * this.setDataValue('password', val); // Remember to set the data value, otherwise it won't be validated + * this.setDataValue('password_hash', this.salt + val); + * }, + * validate: { + * isLongEnough (val) { + * if (val.length < 7) { + * throw new Error("Please choose a longer password") + * } + * } + * } + * } + * }, { sequelize }); + * ``` + * + * VIRTUAL also takes a return type and dependency fields as arguments + * If a virtual attribute is present in `attributes` it will automatically pull in the extra fields as well. + * Return type is mostly useful for setups that rely on types like GraphQL. + * ```js + * { + * active: { + * type: new DataTypes.VIRTUAL(DataTypes.BOOLEAN, ['createdAt']), + * get() { + * return this.get('createdAt') > Date.now() - (7 * 24 * 60 * 60 * 1000) + * } + * } + * } + * ``` + * + * In the above code the password is stored plainly in the password field so it can be validated, but is never stored in the DB. + */ +export const VIRTUAL: VirtualDataTypeConstructor; + +interface VirtualDataTypeConstructor extends AbstractDataTypeConstructor { + new (ReturnType: T, fields?: string[]): VirtualDataType< + T + >; + (ReturnType: T, fields?: string[]): VirtualDataType; +} + +export interface VirtualDataType extends AbstractDataType { + returnType: T; + fields: string[]; +} + +/** + * An enumeration. `DataTypes.ENUM('value', 'another value')`. + */ +export const ENUM: EnumDataTypeConstructor; + +interface EnumDataTypeConstructor extends AbstractDataTypeConstructor { + new (...values: T[]): EnumDataType; + new (options: EnumDataTypeOptions): EnumDataType; + (...values: T[]): EnumDataType; + (options: EnumDataTypeOptions): EnumDataType; +} + +export interface EnumDataType extends AbstractDataType { + values: T[]; + options: EnumDataTypeOptions; +} + +export interface EnumDataTypeOptions { + values: T[]; +} + +/** + * An array of `type`, e.g. `DataTypes.ARRAY(DataTypes.DECIMAL)`. Only available in postgres. + */ +export const ARRAY: ArrayDataTypeConstructor; + +interface ArrayDataTypeConstructor extends AbstractDataTypeConstructor { + new (type: T): ArrayDataType; + new (options: ArrayDataTypeOptions): ArrayDataType; + (type: T): ArrayDataType; + (options: ArrayDataTypeOptions): ArrayDataType; + is(obj: unknown, type: T): obj is ArrayDataType; +} + +export interface ArrayDataType extends AbstractDataType { + options: ArrayDataTypeOptions; +} + +export interface ArrayDataTypeOptions { + type: T; +} + +/** + * A geometry datatype represents two dimensional spacial objects. + */ +export const GEOMETRY: GeometryDataTypeConstructor; + +interface GeometryDataTypeConstructor extends AbstractDataTypeConstructor { + new (type: string, srid?: number): GeometryDataType; + new (options: GeometryDataTypeOptions): GeometryDataType; + (type: string, srid?: number): GeometryDataType; + (options: GeometryDataTypeOptions): GeometryDataType; +} + +export interface GeometryDataType extends AbstractDataType { + options: GeometryDataTypeOptions; + type: string; + srid?: number; + escape: boolean; +} + +export interface GeometryDataTypeOptions { + type: string; + srid?: number; +} + +/** + * A geography datatype represents two dimensional spacial objects in an elliptic coord system. + */ +export const GEOGRAPHY: GeographyDataTypeConstructor; + +interface GeographyDataTypeConstructor extends AbstractDataTypeConstructor { + new (type: string, srid?: number): GeographyDataType; + new (options: GeographyDataTypeOptions): GeographyDataType; + (type: string, srid?: number): GeographyDataType; + (options: GeographyDataTypeOptions): GeographyDataType; +} + +export interface GeographyDataType extends AbstractDataType { + options: GeographyDataTypeOptions; + type: string; + srid?: number; + escape: boolean; +} + +export interface GeographyDataTypeOptions { + type: string; + srid?: number; +} + +export const CIDR: AbstractDataTypeConstructor; + +export const INET: AbstractDataTypeConstructor; + +export const MACADDR: AbstractDataTypeConstructor; + +/** + * Case incenstive text + */ +export const CITEXT: AbstractDataTypeConstructor; + +// umzug compatibility +export type DataTypeAbstract = AbstractDataTypeConstructor; diff --git a/node_modules/sequelize/types/lib/deferrable.d.ts b/node_modules/sequelize/types/lib/deferrable.d.ts new file mode 100644 index 00000000..887cb781 --- /dev/null +++ b/node_modules/sequelize/types/lib/deferrable.d.ts @@ -0,0 +1,105 @@ +/** + * Can be used to + * make foreign key constraints deferrable and to set the constaints within a + * transaction. This is only supported in PostgreSQL. + * + * The foreign keys can be configured like this. It will create a foreign key + * that will check the constraints immediately when the data was inserted. + * + * ```js + * class MyModel extends Model {} + * MyModel.init({ + * foreign_id: { + * type: Sequelize.INTEGER, + * references: { + * model: OtherModel, + * key: 'id', + * deferrable: Sequelize.Deferrable.INITIALLY_IMMEDIATE + * } + * } + * }, { sequelize }); + * ``` + * + * The constraints can be configured in a transaction like this. It will + * trigger a query once the transaction has been started and set the constraints + * to be checked at the very end of the transaction. + * + * ```js + * sequelize.transaction({ + * deferrable: Sequelize.Deferrable.SET_DEFERRED + * }); + * ``` + */ + +/** + * + */ +export interface AbstractDeferrableStatic { + new (): Deferrable; + (): Deferrable; +} +export interface Deferrable { + toString(): string; + toSql(): string; +} + +export interface InitiallyDeferredDeferrableStatic extends AbstractDeferrableStatic { + new (): InitiallyDeferredDeferrable; + (): InitiallyDeferredDeferrable; +} +export interface InitiallyDeferredDeferrable extends Deferrable {} +export const INITIALLY_DEFERRED: InitiallyDeferredDeferrableStatic; + +export interface InitiallyImmediateDeferrableStatic extends AbstractDeferrableStatic { + new (): InitiallyImmediateDeferrable; + (): InitiallyImmediateDeferrable; +} +export interface InitiallyImmediateDeferrable extends Deferrable {} +export const INITIALLY_IMMEDIATE: InitiallyImmediateDeferrableStatic; + +export interface NotDeferrableStatic extends AbstractDeferrableStatic { + new (): NotDeferrable; + (): NotDeferrable; +} +export interface NotDeferrable extends Deferrable {} +/** + * Will set the constraints to not deferred. This is the default in PostgreSQL and it make + * it impossible to dynamically defer the constraints within a transaction. + */ +export const NOT: NotDeferrableStatic; + +export interface SetDeferredDeferrableStatic extends AbstractDeferrableStatic { + /** + * @param constraints An array of constraint names. Will defer all constraints by default. + */ + new (constraints: string[]): SetDeferredDeferrable; + /** + * @param constraints An array of constraint names. Will defer all constraints by default. + */ + (constraints: string[]): SetDeferredDeferrable; +} +export interface SetDeferredDeferrable extends Deferrable {} +/** + * Will trigger an additional query at the beginning of a + * transaction which sets the constraints to deferred. + */ +export const SET_DEFERRED: SetDeferredDeferrableStatic; + +export interface SetImmediateDeferrableStatic extends AbstractDeferrableStatic { + /** + * @param constraints An array of constraint names. Will defer all constraints by default. + */ + new (constraints: string[]): SetImmediateDeferrable; + /** + * @param constraints An array of constraint names. Will defer all constraints by default. + */ + (constraints: string[]): SetImmediateDeferrable; +} +export interface SetImmediateDeferrable extends Deferrable {} +/** + * Will trigger an additional query at the beginning of a + * transaction which sets the constraints to immediately. + * + * @param constraints An array of constraint names. Will defer all constraints by default. + */ +export const SET_IMMEDIATE: SetImmediateDeferrableStatic; diff --git a/node_modules/sequelize/types/lib/errors.d.ts b/node_modules/sequelize/types/lib/errors.d.ts new file mode 100644 index 00000000..83fbee9e --- /dev/null +++ b/node_modules/sequelize/types/lib/errors.d.ts @@ -0,0 +1,176 @@ +/** + * The Base Error all Sequelize Errors inherit from. + */ +export class BaseError extends Error { + public name: string; +} + +/** + * Scope Error. Thrown when the sequelize cannot query the specified scope. + */ +export class SequelizeScopeError extends BaseError {} + +export class ValidationError extends BaseError { + /** Array of ValidationErrorItem objects describing the validation errors */ + public readonly errors: ValidationErrorItem[]; + + /** + * Validation Error. Thrown when the sequelize validation has failed. The error contains an `errors` + * property, which is an array with 1 or more ValidationErrorItems, one for each validation that failed. + * + * @param message Error message + * @param errors Array of ValidationErrorItem objects describing the validation errors + */ + constructor(message: string, errors?: ValidationErrorItem[]); + + /** + * Gets all validation error items for the path / field specified. + * + * @param path The path to be checked for error items + */ + public get(path: string): ValidationErrorItem[]; +} + +export class ValidationErrorItem { + /** An error message */ + public readonly message: string; + + /** The type of the validation error */ + public readonly type: string; + + /** The field that triggered the validation error */ + public readonly path: string; + + /** The value that generated the error */ + public readonly value: string; + + public readonly original: Error; + + /** + * Validation Error Item + * Instances of this class are included in the `ValidationError.errors` property. + * + * @param message An error message + * @param type The type of the validation error + * @param path The field that triggered the validation error + * @param value The value that generated the error + */ + constructor(message?: string, type?: string, path?: string, value?: string); +} + +export interface CommonErrorProperties { + /** The database specific error which triggered this one */ + readonly parent: Error; + + /** The database specific error which triggered this one */ + readonly original: Error; + + /** The SQL that triggered the error */ + readonly sql: string; +} + +/** + * Thrown when a record was not found, Usually used with rejectOnEmpty mode (see message for details) + */ +export class EmptyResultError extends BaseError { +} + +export class DatabaseError extends BaseError implements CommonErrorProperties { + public readonly parent: Error; + public readonly original: Error; + public readonly sql: string; + /** + * A base class for all database related errors. + * @param parent The database specific error which triggered this one + */ + constructor(parent: Error); +} + +/** Thrown when a database query times out because of a deadlock */ +export class TimeoutError extends DatabaseError {} + +export interface UniqueConstraintErrorOptions { + parent?: Error; + message?: string; + errors?: ValidationErrorItem[]; + fields?: { [key: string]: unknown }; + original?: Error; +} + +/** + * Thrown when a unique constraint is violated in the database + */ +export class UniqueConstraintError extends ValidationError implements CommonErrorProperties { + public readonly parent: Error; + public readonly original: Error; + public readonly sql: string; + public readonly fields: { [key: string]: unknown }; + constructor(options?: UniqueConstraintErrorOptions); +} + +/** + * Thrown when a foreign key constraint is violated in the database + */ +export class ForeignKeyConstraintError extends DatabaseError { + public table: string; + public fields: { [field: string]: string }; + public value: unknown; + public index: string; + constructor(options: { parent?: Error; message?: string; index?: string; fields?: string[]; table?: string }); +} + +/** + * Thrown when an exclusion constraint is violated in the database + */ +export class ExclusionConstraintError extends DatabaseError { + public constraint: string; + public fields: { [field: string]: string }; + public table: string; + constructor(options: { parent?: Error; message?: string; constraint?: string; fields?: string[]; table?: string }); +} + +/** + * Thrown when attempting to update a stale model instance + */ +export class OptimisticLockError extends BaseError { + constructor(options: { message?: string, modelName?: string, values?: { [key: string]: any }, where?: { [key: string]: any } }); +} + +/** + * A base class for all connection related errors. + */ +export class ConnectionError extends BaseError { + public parent: Error; + public original: Error; + constructor(parent: Error); +} + +/** + * Thrown when a connection to a database is refused + */ +export class ConnectionRefusedError extends ConnectionError {} + +/** + * Thrown when a connection to a database is refused due to insufficient privileges + */ +export class AccessDeniedError extends ConnectionError {} + +/** + * Thrown when a connection to a database has a hostname that was not found + */ +export class HostNotFoundError extends ConnectionError {} + +/** + * Thrown when a connection to a database has a hostname that was not reachable + */ +export class HostNotReachableError extends ConnectionError {} + +/** + * Thrown when a connection to a database has invalid values for any of the connection parameters + */ +export class InvalidConnectionError extends ConnectionError {} + +/** + * Thrown when a connection to a database times out + */ +export class ConnectionTimedOutError extends ConnectionError {} diff --git a/node_modules/sequelize/types/lib/hooks.d.ts b/node_modules/sequelize/types/lib/hooks.d.ts new file mode 100644 index 00000000..cc49ae9c --- /dev/null +++ b/node_modules/sequelize/types/lib/hooks.d.ts @@ -0,0 +1,110 @@ +import { ValidationOptions } from './instance-validator'; +import Model, { + BulkCreateOptions, + CountOptions, + CreateOptions, + DestroyOptions, + FindOptions, + InstanceDestroyOptions, + InstanceUpdateOptions, + ModelAttributes, + ModelOptions, + UpdateOptions, +} from './model'; +import { Config, Options, Sequelize, SyncOptions } from './sequelize'; + +export type HookReturn = Promise | void; + +/** + * Options for Model.init. We mostly duplicate the Hooks here, since there is no way to combine the two + * interfaces. + */ +export interface ModelHooks { + beforeValidate(instance: M, options: ValidationOptions): HookReturn; + afterValidate(instance: M, options: ValidationOptions): HookReturn; + beforeCreate(attributes: M, options: CreateOptions): HookReturn; + afterCreate(attributes: M, options: CreateOptions): HookReturn; + beforeDestroy(instance: M, options: InstanceDestroyOptions): HookReturn; + afterDestroy(instance: M, options: InstanceDestroyOptions): HookReturn; + beforeUpdate(instance: M, options: InstanceUpdateOptions): HookReturn; + afterUpdate(instance: M, options: InstanceUpdateOptions): HookReturn; + beforeSave(instance: M, options: InstanceUpdateOptions | CreateOptions): HookReturn; + afterSave(instance: M, options: InstanceUpdateOptions | CreateOptions): HookReturn; + beforeBulkCreate(instances: M[], options: BulkCreateOptions): HookReturn; + afterBulkCreate(instances: M[], options: BulkCreateOptions): HookReturn; + beforeBulkDestroy(options: DestroyOptions): HookReturn; + afterBulkDestroy(options: DestroyOptions): HookReturn; + beforeBulkUpdate(options: UpdateOptions): HookReturn; + afterBulkUpdate(options: UpdateOptions): HookReturn; + beforeFind(options: FindOptions): HookReturn; + beforeCount(options: CountOptions): HookReturn; + beforeFindAfterExpandIncludeAll(options: FindOptions): HookReturn; + beforeFindAfterOptions(options: FindOptions): HookReturn; + afterFind(instancesOrInstance: M[] | M | null, options: FindOptions): HookReturn; + beforeSync(options: SyncOptions): HookReturn; + afterSync(options: SyncOptions): HookReturn; + beforeBulkSync(options: SyncOptions): HookReturn; + afterBulkSync(options: SyncOptions): HookReturn; +} + +export interface SequelizeHooks extends ModelHooks { + beforeDefine(attributes: ModelAttributes, options: ModelOptions): void; + afterDefine(model: typeof Model): void; + beforeInit(config: Config, options: Options): void; + afterInit(sequelize: Sequelize): void; + beforeConnect(config: Config): HookReturn; + afterConnect(connection: unknown, config: Config): HookReturn; + beforeDisconnect(connection: unknown): HookReturn; + afterDisconnect(connection: unknown): HookReturn; +} + +/** + * Virtual class for deduplication + */ +export class Hooks { + /** + * Add a hook to the model + * + * @param name Provide a name for the hook function. It can be used to remove the hook later or to order + * hooks based on some sort of priority system in the future. + */ + public static addHook( + hookType: K, + name: string, + fn: SequelizeHooks[K] + ): C; + public static addHook( + hookType: K, + fn: SequelizeHooks[K] + ): C; + + /** + * Remove hook from the model + */ + public static removeHook(hookType: K, name: string): C; + + /** + * Check whether the mode has any hooks of this type + */ + public static hasHook(hookType: K): boolean; + public static hasHooks(hookType: K): boolean; + + /** + * Add a hook to the model + * + * @param name Provide a name for the hook function. It can be used to remove the hook later or to order + * hooks based on some sort of priority system in the future. + */ + public addHook(hookType: K, name: string, fn: SequelizeHooks[K]): this; + public addHook(hookType: K, fn: SequelizeHooks[K]): this; + /** + * Remove hook from the model + */ + public removeHook(hookType: K, name: string): this; + + /** + * Check whether the mode has any hooks of this type + */ + public hasHook(hookType: K): boolean; + public hasHooks(hookType: K): boolean; +} diff --git a/node_modules/sequelize/types/lib/index-hints.d.ts b/node_modules/sequelize/types/lib/index-hints.d.ts new file mode 100644 index 00000000..f33d182d --- /dev/null +++ b/node_modules/sequelize/types/lib/index-hints.d.ts @@ -0,0 +1,10 @@ +/** + * Available index hints to be used for querying data in mysql for index hints. + */ +declare enum IndexHints { + USE = 'USE', + FORCE = 'FORCE', + IGNORE = 'IGNORE' +} + +export = IndexHints; diff --git a/node_modules/sequelize/types/lib/instance-validator.d.ts b/node_modules/sequelize/types/lib/instance-validator.d.ts new file mode 100644 index 00000000..0d441995 --- /dev/null +++ b/node_modules/sequelize/types/lib/instance-validator.d.ts @@ -0,0 +1,15 @@ +export interface ValidationOptions { + /** + * An array of strings. All properties that are in this array will not be validated + */ + skip?: string[]; + /** + * An array of strings. Only the properties that are in this array will be validated + */ + fields?: string[]; + /** + * Run before and after validate hooks. + * @default true. + */ + hooks?: boolean; +} diff --git a/node_modules/sequelize/types/lib/model-manager.d.ts b/node_modules/sequelize/types/lib/model-manager.d.ts new file mode 100644 index 00000000..29eac496 --- /dev/null +++ b/node_modules/sequelize/types/lib/model-manager.d.ts @@ -0,0 +1,15 @@ +import { Model } from './model'; +import { Sequelize } from './sequelize'; + +export class ModelManager { + public sequelize: Sequelize; + public models: typeof Model[]; + public all: typeof Model[]; + + constructor(sequelize: Sequelize); + public addModel(model: T): T; + public removeModel(model: typeof Model): void; + public getModel(against: unknown, options?: { attribute?: string }): typeof Model; +} + +export default ModelManager; diff --git a/node_modules/sequelize/types/lib/model.d.ts b/node_modules/sequelize/types/lib/model.d.ts new file mode 100644 index 00000000..4da9a616 --- /dev/null +++ b/node_modules/sequelize/types/lib/model.d.ts @@ -0,0 +1,2713 @@ +import { + Association, + BelongsTo, + BelongsToMany, + BelongsToManyOptions, + BelongsToOptions, + HasMany, + HasManyOptions, + HasOne, + HasOneOptions, +} from './associations/index'; +import { DataType } from './data-types'; +import { Deferrable } from './deferrable'; +import { HookReturn, Hooks, ModelHooks } from './hooks'; +import { ValidationOptions } from './instance-validator'; +import { ModelManager } from './model-manager'; +import Op = require('./operators'); +import { Promise } from './promise'; +import { QueryOptions, IndexesOptions } from './query-interface'; +import { Config, Options, Sequelize, SyncOptions } from './sequelize'; +import { Transaction } from './transaction'; +import { Col, Fn, Literal, Where } from './utils'; +import { IndexHints } from '..'; + +export interface Logging { + /** + * A function that gets executed while running the query to log the sql. + */ + logging?: boolean | ((sql: string, timing?: number) => void); + + /** + * Pass query execution time in milliseconds as second argument to logging function (options.logging). + */ + benchmark?: boolean; +} + +export interface Poolable { + /** + * Force the query to use the write pool, regardless of the query type. + * + * @default false + */ + useMaster?: boolean; +} + +export interface Transactionable { + /** + * Transaction to run query under + */ + transaction?: Transaction; +} + +export interface SearchPathable { + /** + * An optional parameter to specify the schema search_path (Postgres only) + */ + searchPath?: string; +} + +export interface Filterable { + /** + * Attribute has to be matched for rows to be selected for the given action. + */ + where?: WhereOptions; +} + +export interface Projectable { + /** + * A list of the attributes that you want to select. To rename an attribute, you can pass an array, with + * two elements - the first is the name of the attribute in the DB (or some kind of expression such as + * `Sequelize.literal`, `Sequelize.fn` and so on), and the second is the name you want the attribute to + * have in the returned instance + */ + attributes?: FindAttributeOptions; +} + +export interface Paranoid { + /** + * If true, only non-deleted records will be returned. If false, both deleted and non-deleted records will + * be returned. Only applies if `options.paranoid` is true for the model. + */ + paranoid?: boolean; +} + +export type GroupOption = string | Fn | Col | (string | Fn | Col)[]; + +/** + * Options to pass to Model on drop + */ +export interface DropOptions extends Logging { + /** + * Also drop all objects depending on this table, such as views. Only works in postgres + */ + cascade?: boolean; +} + +/** + * Schema Options provided for applying a schema to a model + */ +export interface SchemaOptions extends Logging { + /** + * The character(s) that separates the schema name from the table name + */ + schemaDelimiter?: string; +} + +/** + * Scope Options for Model.scope + */ +export interface ScopeOptions { + /** + * The scope(s) to apply. Scopes can either be passed as consecutive arguments, or as an array of arguments. + * To apply simple scopes and scope functions with no arguments, pass them as strings. For scope function, + * pass an object, with a `method` property. The value can either be a string, if the method does not take + * any arguments, or an array, where the first element is the name of the method, and consecutive elements + * are arguments to that method. Pass null to remove all scopes, including the default. + */ + method: string | [string, ...unknown[]]; +} + +/** + * The type accepted by every `where` option + */ +export type WhereOptions = WhereAttributeHash | AndOperator | OrOperator | Literal | Where; + +/** + * Example: `[Op.any]: [2,3]` becomes `ANY ARRAY[2, 3]::INTEGER` + * + * _PG only_ + */ +export interface AnyOperator { + [Op.any]: (string | number)[]; +} + +/** Undocumented? */ +export interface AllOperator { + [Op.all]: (string | number | Date | Literal)[]; +} + +export type Rangable = [number, number] | [Date, Date] | Literal; + +/** + * Operators that can be used in WhereOptions + * + * See http://docs.sequelizejs.com/en/v3/docs/querying/#operators + */ +export interface WhereOperators { + /** + * Example: `[Op.any]: [2,3]` becomes `ANY ARRAY[2, 3]::INTEGER` + * + * _PG only_ + */ + [Op.any]?: (string | number | Literal)[] | Literal; + + /** Example: `[Op.gte]: 6,` becomes `>= 6` */ + [Op.gte]?: number | string | Date | Literal; + + /** Example: `[Op.lt]: 10,` becomes `< 10` */ + [Op.lt]?: number | string | Date | Literal; + + /** Example: `[Op.lte]: 10,` becomes `<= 10` */ + [Op.lte]?: number | string | Date | Literal; + + /** Example: `[Op.ne]: 20,` becomes `!= 20` */ + [Op.ne]?: string | number | Literal | WhereOperators; + + /** Example: `[Op.not]: true,` becomes `IS NOT TRUE` */ + [Op.not]?: boolean | string | number | Literal | WhereOperators; + + /** Example: `[Op.between]: [6, 10],` becomes `BETWEEN 6 AND 10` */ + [Op.between]?: [number, number]; + + /** Example: `[Op.in]: [1, 2],` becomes `IN [1, 2]` */ + [Op.in]?: (string | number | Literal)[] | Literal; + + /** Example: `[Op.notIn]: [1, 2],` becomes `NOT IN [1, 2]` */ + [Op.notIn]?: (string | number | Literal)[] | Literal; + + /** + * Examples: + * - `[Op.like]: '%hat',` becomes `LIKE '%hat'` + * - `[Op.like]: { [Op.any]: ['cat', 'hat']}` becomes `LIKE ANY ARRAY['cat', 'hat']` + */ + [Op.like]?: string | Literal | AnyOperator | AllOperator; + + /** + * Examples: + * - `[Op.notLike]: '%hat'` becomes `NOT LIKE '%hat'` + * - `[Op.notLike]: { [Op.any]: ['cat', 'hat']}` becomes `NOT LIKE ANY ARRAY['cat', 'hat']` + */ + [Op.notLike]?: string | Literal | AnyOperator | AllOperator; + + /** + * case insensitive PG only + * + * Examples: + * - `[Op.iLike]: '%hat'` becomes `ILIKE '%hat'` + * - `[Op.iLike]: { [Op.any]: ['cat', 'hat']}` becomes `ILIKE ANY ARRAY['cat', 'hat']` + */ + [Op.iLike]?: string | Literal | AnyOperator | AllOperator; + + /** + * PG array overlap operator + * + * Example: `[Op.overlap]: [1, 2]` becomes `&& [1, 2]` + */ + [Op.overlap]?: Rangable; + + /** + * PG array contains operator + * + * Example: `[Op.contains]: [1, 2]` becomes `@> [1, 2]` + */ + [Op.contains]?: Rangable; + + /** + * PG array contained by operator + * + * Example: `[Op.contained]: [1, 2]` becomes `<@ [1, 2]` + */ + [Op.contained]?: Rangable; + + /** Example: `[Op.gt]: 6,` becomes `> 6` */ + [Op.gt]?: number | string | Date | Literal; + + /** + * PG only + * + * Examples: + * - `[Op.notILike]: '%hat'` becomes `NOT ILIKE '%hat'` + * - `[Op.notLike]: ['cat', 'hat']` becomes `LIKE ANY ARRAY['cat', 'hat']` + */ + [Op.notILike]?: string | Literal | AnyOperator | AllOperator; + + /** Example: `[Op.notBetween]: [11, 15],` becomes `NOT BETWEEN 11 AND 15` */ + [Op.notBetween]?: [number, number]; + + /** + * Strings starts with value. + */ + [Op.startsWith]?: string; + + /** + * String ends with value. + */ + [Op.endsWith]?: string; + /** + * String contains value. + */ + [Op.substring]?: string; + + /** + * MySQL/PG only + * + * Matches regular expression, case sensitive + * + * Example: `[Op.regexp]: '^[h|a|t]'` becomes `REGEXP/~ '^[h|a|t]'` + */ + [Op.regexp]?: string; + + /** + * MySQL/PG only + * + * Does not match regular expression, case sensitive + * + * Example: `[Op.notRegexp]: '^[h|a|t]'` becomes `NOT REGEXP/!~ '^[h|a|t]'` + */ + [Op.notRegexp]?: string; + + /** + * PG only + * + * Matches regular expression, case insensitive + * + * Example: `[Op.iRegexp]: '^[h|a|t]'` becomes `~* '^[h|a|t]'` + */ + [Op.iRegexp]?: string; + + /** + * PG only + * + * Does not match regular expression, case insensitive + * + * Example: `[Op.notIRegexp]: '^[h|a|t]'` becomes `!~* '^[h|a|t]'` + */ + [Op.notIRegexp]?: string; + + /** + * PG only + * + * Forces the operator to be strictly left eg. `<< [a, b)` + */ + [Op.strictLeft]?: Rangable; + + /** + * PG only + * + * Forces the operator to be strictly right eg. `>> [a, b)` + */ + [Op.strictRight]?: Rangable; + + /** + * PG only + * + * Forces the operator to not extend the left eg. `&> [1, 2)` + */ + [Op.noExtendLeft]?: Rangable; + + /** + * PG only + * + * Forces the operator to not extend the left eg. `&< [1, 2)` + */ + [Op.noExtendRight]?: Rangable; + +} + +/** Example: `[Op.or]: [{a: 5}, {a: 6}]` becomes `(a = 5 OR a = 6)` */ +export interface OrOperator { + [Op.or]: WhereOptions | WhereOptions[] | WhereValue | WhereValue[]; +} + +/** Example: `[Op.and]: {a: 5}` becomes `AND (a = 5)` */ +export interface AndOperator { + [Op.and]: WhereOptions | WhereOptions[] | WhereValue | WhereValue[]; +} + +/** + * Where Geometry Options + */ +export interface WhereGeometryOptions { + type: string; + coordinates: (number[] | number)[]; +} + +/** + * Used for the right hand side of WhereAttributeHash. + * WhereAttributeHash is in there for JSON columns. + */ +export type WhereValue = + | string // literal value + | number // literal value + | boolean // literal value + | null + | WhereOperators + | WhereAttributeHash // for JSON columns + | Col // reference another column + | Fn + | OrOperator + | AndOperator + | WhereGeometryOptions + | (string | number | WhereAttributeHash)[]; // implicit [Op.or] + +/** + * A hash of attributes to describe your search. + */ +export interface WhereAttributeHash { + /** + * Possible key values: + * - A simple attribute name + * - A nested key for JSON columns + * + * { + * "meta.audio.length": { + * [Op.gt]: 20 + * } + * } + */ + [field: string]: WhereValue | WhereOptions; +} +/** + * Through options for Include Options + */ +export interface IncludeThroughOptions extends Filterable, Projectable {} + +/** + * Options for eager-loading associated models, also allowing for all associations to be loaded at once + */ +export type Includeable = typeof Model | Association | IncludeOptions | { all: true } | string; + +/** + * Complex include options + */ +export interface IncludeOptions extends Filterable, Projectable, Paranoid { + /** + * Mark the include as duplicating, will prevent a subquery from being used. + */ + duplicating?: boolean; + /** + * The model you want to eagerly load + */ + model?: typeof Model; + + /** + * The alias of the relation, in case the model you want to eagerly load is aliassed. For `hasOne` / + * `belongsTo`, this should be the singular name, and for `hasMany`, it should be the plural + */ + as?: string; + + /** + * The association you want to eagerly load. (This can be used instead of providing a model/as pair) + */ + association?: Association | string; + + /** + * Custom `on` clause, overrides default. + */ + on?: WhereOptions; + + /** + * Note that this converts the eager load to an inner join, + * unless you explicitly set `required: false` + */ + where?: WhereOptions; + + /** + * If true, converts to an inner join, which means that the parent model will only be loaded if it has any + * matching children. True if `include.where` is set, false otherwise. + */ + required?: boolean; + + /** + * Limit include. Only available when setting `separate` to true. + */ + limit?: number; + + /** + * Run include in separate queries. + */ + separate?: boolean; + + /** + * Through Options + */ + through?: IncludeThroughOptions; + + /** + * Load further nested related models + */ + include?: Includeable[]; + + /** + * Order include. Only available when setting `separate` to true. + */ + order?: Order; + + /** + * Use sub queries. This should only be used if you know for sure the query does not result in a cartesian product. + */ + subQuery?: boolean; +} + +type OrderItemModel = typeof Model | { model: typeof Model; as: string } | string +type OrderItemColumn = string | Col | Fn | Literal +export type OrderItem = + | string + | Fn + | Col + | Literal + | [OrderItemColumn, string] + | [OrderItemModel, OrderItemColumn] + | [OrderItemModel, OrderItemColumn, string] + | [OrderItemModel, OrderItemModel, OrderItemColumn] + | [OrderItemModel, OrderItemModel, OrderItemColumn, string] + | [OrderItemModel, OrderItemModel, OrderItemModel, OrderItemColumn] + | [OrderItemModel, OrderItemModel, OrderItemModel, OrderItemColumn, string] + | [OrderItemModel, OrderItemModel, OrderItemModel, OrderItemModel, OrderItemColumn] + | [OrderItemModel, OrderItemModel, OrderItemModel, OrderItemModel, OrderItemColumn, string] +export type Order = string | Fn | Col | Literal | OrderItem[]; + +/** + * Please note if this is used the aliased property will not be available on the model instance + * as a property but only via `instance.get('alias')`. + */ +export type ProjectionAlias = [string | Literal | Fn, string]; + +export type FindAttributeOptions = + | (string | ProjectionAlias)[] + | { + exclude: string[]; + include?: (string | ProjectionAlias)[]; + } + | { + exclude?: string[]; + include: (string | ProjectionAlias)[]; + }; + +export interface IndexHint { + type: IndexHints; + values: string[]; +} + +export interface IndexHintable { + /** + * MySQL only. + */ + indexHints?: IndexHint[]; +} + +type Omit = Pick> + +/** + * Options that are passed to any model creating a SELECT query + * + * A hash of options to describe the scope of the search + */ +export interface FindOptions extends QueryOptions, Filterable, Projectable, Paranoid, IndexHintable { + /** + * A list of associations to eagerly load using a left join. Supported is either + * `{ include: [ Model1, Model2, ...]}`, `{ include: [{ model: Model1, as: 'Alias' }]}` or + * `{ include: [{ all: true }]}`. + * If your association are set up with an `as` (eg. `X.hasMany(Y, { as: 'Z }`, you need to specify Z in + * the as attribute when eager loading Y). + */ + include?: Includeable[]; + + /** + * Specifies an ordering. If a string is provided, it will be escaped. Using an array, you can provide + * several columns / functions to order by. Each element can be further wrapped in a two-element array. The + * first element is the column / function to order by, the second is the direction. For example: + * `order: [['name', 'DESC']]`. In this way the column will be escaped, but the direction will not. + */ + order?: Order; + + /** + * GROUP BY in sql + */ + group?: GroupOption; + + /** + * Limit the results + */ + limit?: number; + + /** + * Skip the results; + */ + offset?: number; + + /** + * Lock the selected rows. Possible options are transaction.LOCK.UPDATE and transaction.LOCK.SHARE. + * Postgres also supports transaction.LOCK.KEY_SHARE, transaction.LOCK.NO_KEY_UPDATE and specific model + * locks with joins. See [transaction.LOCK for an example](transaction#lock) + */ + lock?: Transaction.LOCK | { level: Transaction.LOCK; of: typeof Model }; + + /** + * Return raw result. See sequelize.query for more information. + */ + raw?: boolean; + + /** + * Select group rows after groups and aggregates are computed. + */ + having?: WhereOptions; + + /** + * Use sub queries (internal) + */ + subQuery?: boolean; +} + +export interface NonNullFindOptions extends FindOptions { + /** + * Throw if nothing was found. + */ + rejectOnEmpty: boolean; +} + +/** + * Options for Model.count method + */ +export interface CountOptions extends Logging, Transactionable, Filterable, Projectable, Paranoid, Poolable { + /** + * Include options. See `find` for details + */ + include?: Includeable[]; + + /** + * Apply COUNT(DISTINCT(col)) + */ + distinct?: boolean; + + /** + * GROUP BY in sql + * Used in conjunction with `attributes`. + * @see Projectable + */ + group?: GroupOption; + + /** + * The column to aggregate on. + */ + col?: string; +} + +/** + * Options for Model.count when GROUP BY is used + */ +export interface CountWithOptions extends CountOptions { + /** + * GROUP BY in sql + * Used in conjunction with `attributes`. + * @see Projectable + */ + group: GroupOption; +} + +export interface FindAndCountOptions extends CountOptions, FindOptions {} + +/** + * Options for Model.build method + */ +export interface BuildOptions { + /** + * If set to true, values will ignore field and virtual setters. + */ + raw?: boolean; + + /** + * Is this record new + */ + isNewRecord?: boolean; + + /** + * an array of include options - Used to build prefetched/included model instances. See `set` + * + * TODO: See set + */ + include?: Includeable[]; +} + +export interface Silent { + /** + * If true, the updatedAt timestamp will not be updated. + * + * @default false + */ + silent?: boolean; +} + +/** + * Options for Model.create method + */ +export interface CreateOptions extends BuildOptions, Logging, Silent, Transactionable { + /** + * If set, only columns matching those in fields will be saved + */ + fields?: string[]; + + /** + * On Duplicate + */ + onDuplicate?: string; + + /** + * If false, validations won't be run. + * + * @default true + */ + validate?: boolean; +} + +/** + * Options for Model.findOrCreate method + */ +export interface FindOrCreateOptions extends Logging, Transactionable { + /** + * A hash of search attributes. + */ + where: WhereOptions; + + /** + * Default values to use if building a new instance + */ + defaults?: object; +} + +/** + * Options for Model.upsert method + */ +export interface UpsertOptions extends Logging, Transactionable, SearchPathable { + /** + * The fields to insert / update. Defaults to all fields + */ + fields?: string[]; + + /** + * Run before / after bulk create hooks? + */ + hooks?: boolean; + + /** + * Return the affected rows (only for postgres) + */ + returning?: boolean; + + /** + * Run validations before the row is inserted + */ + validate?: boolean; +} + +/** + * Options for Model.bulkCreate method + */ +export interface BulkCreateOptions extends Logging, Transactionable { + /** + * Fields to insert (defaults to all fields) + */ + fields?: string[]; + + /** + * Should each row be subject to validation before it is inserted. The whole insert will fail if one row + * fails validation + */ + validate?: boolean; + + /** + * Run before / after bulk create hooks? + */ + hooks?: boolean; + + /** + * Run before / after create hooks for each individual Instance? BulkCreate hooks will still be run if + * options.hooks is true. + */ + individualHooks?: boolean; + + /** + * Ignore duplicate values for primary keys? (not supported by postgres) + * + * @default false + */ + ignoreDuplicates?: boolean; + + /** + * Fields to update if row key already exists (on duplicate key update)? (only supported by mysql & + * mariadb). By default, all fields are updated. + */ + updateOnDuplicate?: string[]; + + /** + * Return the affected rows (only for postgres) + */ + returning?: boolean; +} + +/** + * The options passed to Model.destroy in addition to truncate + */ +export interface TruncateOptions extends Logging, Transactionable, Filterable { + /** + * Only used in conjuction with TRUNCATE. Truncates all tables that have foreign-key references to the + * named table, or to any tables added to the group due to CASCADE. + * + * @default false; + */ + cascade?: boolean; + + /** + * Run before / after bulk destroy hooks? + */ + hooks?: boolean; + + /** + * If set to true, destroy will SELECT all records matching the where parameter and will execute before / + * after destroy hooks on each row + */ + individualHooks?: boolean; + + /** + * How many rows to delete + */ + limit?: number; + + /** + * Delete instead of setting deletedAt to current timestamp (only applicable if `paranoid` is enabled) + */ + force?: boolean; + + /** + * Only used in conjunction with `truncate`. + * Automatically restart sequences owned by columns of the truncated table + */ + restartIdentity?: boolean; +} + +/** + * Options used for Model.destroy + */ +export interface DestroyOptions extends TruncateOptions { + /** + * If set to true, dialects that support it will use TRUNCATE instead of DELETE FROM. If a table is + * truncated the where and limit options are ignored + */ + truncate?: boolean; +} + +/** + * Options for Model.restore + */ +export interface RestoreOptions extends Logging, Transactionable, Filterable { + /** + * Run before / after bulk restore hooks? + */ + hooks?: boolean; + + /** + * If set to true, restore will find all records within the where parameter and will execute before / after + * bulkRestore hooks on each row + */ + individualHooks?: boolean; + + /** + * How many rows to undelete + */ + limit?: number; +} + +/** + * Options used for Model.update + */ +export interface UpdateOptions extends Logging, Transactionable { + /** + * Options to describe the scope of the search. + */ + where: WhereOptions; + + /** + * Fields to update (defaults to all fields) + */ + fields?: string[]; + + /** + * Should each row be subject to validation before it is inserted. The whole insert will fail if one row + * fails validation. + * + * @default true + */ + validate?: boolean; + + /** + * Run before / after bulk update hooks? + * + * @default true + */ + hooks?: boolean; + + /** + * Whether or not to update the side effects of any virtual setters. + * + * @default true + */ + sideEffects?: boolean; + + /** + * Run before / after update hooks?. If true, this will execute a SELECT followed by individual UPDATEs. + * A select is needed, because the row data needs to be passed to the hooks + * + * @default false + */ + individualHooks?: boolean; + + /** + * Return the affected rows (only for postgres) + */ + returning?: boolean; + + /** + * How many rows to update (only for mysql and mariadb) + */ + limit?: number; + + /** + * If true, the updatedAt timestamp will not be updated. + */ + silent?: boolean; +} + +/** + * Options used for Model.aggregate + */ +export interface AggregateOptions extends QueryOptions, Filterable, Paranoid { + /** + * The type of the result. If `field` is a field in this Model, the default will be the type of that field, + * otherwise defaults to float. + */ + dataType?: string | T; + + /** + * Applies DISTINCT to the field being aggregated over + */ + distinct?: boolean; +} + +// instance + +/** + * Options used for Instance.increment method + */ +export interface IncrementDecrementOptions extends Logging, Transactionable, Silent, SearchPathable, Filterable {} + +/** + * Options used for Instance.increment method + */ +export interface IncrementDecrementOptionsWithBy extends IncrementDecrementOptions { + /** + * The number to increment by + * + * @default 1 + */ + by?: number; +} + +/** + * Options used for Instance.restore method + */ +export interface InstanceRestoreOptions extends Logging, Transactionable {} + +/** + * Options used for Instance.destroy method + */ +export interface InstanceDestroyOptions extends Logging, Transactionable { + /** + * If set to true, paranoid models will actually be deleted + */ + force?: boolean; +} + +/** + * Options used for Instance.update method + */ +export interface InstanceUpdateOptions extends SaveOptions, SetOptions, Filterable {} + +/** + * Options used for Instance.set method + */ +export interface SetOptions { + /** + * If set to true, field and virtual setters will be ignored + */ + raw?: boolean; + + /** + * Clear all previously set data values + */ + reset?: boolean; +} + +/** + * Options used for Instance.save method + */ +export interface SaveOptions extends Logging, Transactionable, Silent { + /** + * An optional array of strings, representing database columns. If fields is provided, only those columns + * will be validated and saved. + */ + fields?: string[]; + + /** + * If false, validations won't be run. + * + * @default true + */ + validate?: boolean; +} + +/** + * Model validations, allow you to specify format/content/inheritance validations for each attribute of the + * model. + * + * Validations are automatically run on create, update and save. You can also call validate() to manually + * validate an instance. + * + * The validations are implemented by validator.js. + */ +export interface ModelValidateOptions { + /** + * is: ["^[a-z]+$",'i'] // will only allow letters + * is: /^[a-z]+[Op./i] // same as the previous example using real RegExp + */ + is?: string | (string | RegExp)[] | RegExp | { msg: string; args: string | (string | RegExp)[] | RegExp }; + + /** + * not: ["[a-z]",'i'] // will not allow letters + */ + not?: string | (string | RegExp)[] | RegExp | { msg: string; args: string | (string | RegExp)[] | RegExp }; + + /** + * checks for email format (foo@bar.com) + */ + isEmail?: boolean | { msg: string }; + + /** + * checks for url format (http://foo.com) + */ + isUrl?: boolean | { msg: string }; + + /** + * checks for IPv4 (129.89.23.1) or IPv6 format + */ + isIP?: boolean | { msg: string }; + + /** + * checks for IPv4 (129.89.23.1) + */ + isIPv4?: boolean | { msg: string }; + + /** + * checks for IPv6 format + */ + isIPv6?: boolean | { msg: string }; + + /** + * will only allow letters + */ + isAlpha?: boolean | { msg: string }; + + /** + * will only allow alphanumeric characters, so "_abc" will fail + */ + isAlphanumeric?: boolean | { msg: string }; + + /** + * will only allow numbers + */ + isNumeric?: boolean | { msg: string }; + + /** + * checks for valid integers + */ + isInt?: boolean | { msg: string }; + + /** + * checks for valid floating point numbers + */ + isFloat?: boolean | { msg: string }; + + /** + * checks for any numbers + */ + isDecimal?: boolean | { msg: string }; + + /** + * checks for lowercase + */ + isLowercase?: boolean | { msg: string }; + + /** + * checks for uppercase + */ + isUppercase?: boolean | { msg: string }; + + /** + * won't allow null + */ + notNull?: boolean | { msg: string }; + + /** + * only allows null + */ + isNull?: boolean | { msg: string }; + + /** + * don't allow empty strings + */ + notEmpty?: boolean | { msg: string }; + + /** + * only allow a specific value + */ + equals?: string | { msg: string }; + + /** + * force specific substrings + */ + contains?: string | { msg: string }; + + /** + * check the value is not one of these + */ + notIn?: string[][] | { msg: string; args: string[][] }; + + /** + * check the value is one of these + */ + isIn?: string[][] | { msg: string; args: string[][] }; + + /** + * don't allow specific substrings + */ + notContains?: string[] | string | { msg: string; args: string[] | string }; + + /** + * only allow values with length between 2 and 10 + */ + len?: [number, number] | { msg: string; args: [number, number] }; + + /** + * only allow uuids + */ + isUUID?: number | { msg: string; args: number }; + + /** + * only allow date strings + */ + isDate?: boolean | { msg: string; args: boolean }; + + /** + * only allow date strings after a specific date + */ + isAfter?: string | { msg: string; args: string }; + + /** + * only allow date strings before a specific date + */ + isBefore?: string | { msg: string; args: string }; + + /** + * only allow values + */ + max?: number | { msg: string; args: [number] }; + + /** + * only allow values >= 23 + */ + min?: number | { msg: string; args: [number] }; + + /** + * only allow arrays + */ + isArray?: boolean | { msg: string; args: boolean }; + + /** + * check for valid credit card numbers + */ + isCreditCard?: boolean | { msg: string; args: boolean }; + + /** + * custom validations are also possible + * + * Implementation notes : + * + * We can't enforce any other method to be a function, so : + * + * ```typescript + * [name: string] : ( value : unknown ) => boolean; + * ``` + * + * doesn't work in combination with the properties above + * + * @see https://github.com/Microsoft/TypeScript/issues/1889 + */ + [name: string]: unknown; +} + +/** + * Interface for indexes property in InitOptions + */ +export type ModelIndexesOptions = IndexesOptions + +/** + * Interface for name property in InitOptions + */ +export interface ModelNameOptions { + /** + * Singular model name + */ + singular?: string; + + /** + * Plural model name + */ + plural?: string; +} + +/** + * Interface for getterMethods in InitOptions + */ +export interface ModelGetterOptions { + [name: string]: (this: Model) => unknown; +} + +/** + * Interface for setterMethods in InitOptions + */ +export interface ModelSetterOptions { + [name: string]: (this: Model, val: any) => void; +} + +/** + * Interface for Define Scope Options + */ +export interface ModelScopeOptions { + /** + * Name of the scope and it's query + */ + [scopeName: string]: FindOptions | ((...args: any[]) => FindOptions); +} + +/** + * General column options + */ +export interface ColumnOptions { + /** + * If false, the column will have a NOT NULL constraint, and a not null validation will be run before an + * instance is saved. + * @default true + */ + allowNull?: boolean; + + /** + * If set, sequelize will map the attribute name to a different name in the database + */ + field?: string; + + /** + * A literal default value, a JavaScript function, or an SQL function (see `sequelize.fn`) + */ + defaultValue?: unknown; +} + +/** + * References options for the column's attributes + */ +export interface ModelAttributeColumnReferencesOptions { + /** + * If this column references another table, provide it here as a Model, or a string + */ + model?: string | typeof Model; + + /** + * The column of the foreign table that this column references + */ + key?: string; + + /** + * When to check for the foreign key constraing + * + * PostgreSQL only + */ + deferrable?: Deferrable; +} + +/** + * Column options for the model schema attributes + */ +export interface ModelAttributeColumnOptions extends ColumnOptions { + /** + * A string or a data type + */ + type: DataType; + + /** + * If true, the column will get a unique constraint. If a string is provided, the column will be part of a + * composite unique index. If multiple columns have the same string, they will be part of the same unique + * index + */ + unique?: boolean | string | { name: string; msg: string }; + + /** + * Primary key flag + */ + primaryKey?: boolean; + + /** + * Is this field an auto increment field + */ + autoIncrement?: boolean; + + /** + * Comment for the database + */ + comment?: string; + + /** + * An object with reference configurations + */ + references?: ModelAttributeColumnReferencesOptions; + + /** + * What should happen when the referenced key is updated. One of CASCADE, RESTRICT, SET DEFAULT, SET NULL or + * NO ACTION + */ + onUpdate?: string; + + /** + * What should happen when the referenced key is deleted. One of CASCADE, RESTRICT, SET DEFAULT, SET NULL or + * NO ACTION + */ + onDelete?: string; + + + /** + * An object of validations to execute for this column every time the model is saved. Can be either the + * name of a validation provided by validator.js, a validation function provided by extending validator.js + * (see the + * `DAOValidator` property for more details), or a custom validation function. Custom validation functions + * are called with the value of the field, and can possibly take a second callback argument, to signal that + * they are asynchronous. If the validator is sync, it should throw in the case of a failed validation, it + * it is async, the callback should be called with the error text. + */ + validate?: ModelValidateOptions; + + /** + * Usage in object notation + * + * ```js + * class MyModel extends Model {} + * MyModel.init({ + * states: { + * type: Sequelize.ENUM, + * values: ['active', 'pending', 'deleted'] + * } + * }, { sequelize }) + * ``` + */ + values?: string[]; + + /** + * Provide a custom getter for this column. Use `this.getDataValue(String)` to manipulate the underlying + * values. + */ + get?(): unknown; + + /** + * Provide a custom setter for this column. Use `this.setDataValue(String, Value)` to manipulate the + * underlying values. + */ + set?(val: unknown): void; +} + +/** + * Interface for Attributes provided for a column + */ +export interface ModelAttributes { + /** + * The description of a database column + */ + [name: string]: DataType | ModelAttributeColumnOptions; +} + +/** + * Possible types for primary keys + */ +export type Identifier = number | string | Buffer; + +/** + * Options for model definition + */ +export interface ModelOptions { + /** + * Define the default search scope to use for this model. Scopes have the same form as the options passed to + * find / findAll. + */ + defaultScope?: FindOptions; + + /** + * More scopes, defined in the same way as defaultScope above. See `Model.scope` for more information about + * how scopes are defined, and what you can do with them + */ + scopes?: ModelScopeOptions; + + /** + * Don't persits null values. This means that all columns with null values will not be saved. + */ + omitNull?: boolean; + + /** + * Adds createdAt and updatedAt timestamps to the model. Default true. + */ + timestamps?: boolean; + + /** + * Calling destroy will not delete the model, but instead set a deletedAt timestamp if this is true. Needs + * timestamps=true to work. Default false. + */ + paranoid?: boolean; + + /** + * Converts all camelCased columns to underscored if true. Default false. + */ + underscored?: boolean; + + /** + * Indicates if the model's table has a trigger associated with it. Default false. + */ + hasTrigger?: boolean; + + /** + * If freezeTableName is true, sequelize will not try to alter the DAO name to get the table name. + * Otherwise, the dao name will be pluralized. Default false. + */ + freezeTableName?: boolean; + + /** + * An object with two attributes, `singular` and `plural`, which are used when this model is associated to + * others. + */ + name?: ModelNameOptions; + + /** + * Set name of the model. By default its same as Class name. + */ + modelName?: string; + + /** + * Indexes for the provided database table + */ + indexes?: ModelIndexesOptions[]; + + /** + * Override the name of the createdAt column if a string is provided, or disable it if false. Timestamps + * must be true. Not affected by underscored setting. + */ + createdAt?: string | boolean; + + /** + * Override the name of the deletedAt column if a string is provided, or disable it if false. Timestamps + * must be true. Not affected by underscored setting. + */ + deletedAt?: string | boolean; + + /** + * Override the name of the updatedAt column if a string is provided, or disable it if false. Timestamps + * must be true. Not affected by underscored setting. + */ + updatedAt?: string | boolean; + + /** + * @default pluralized model name, unless freezeTableName is true, in which case it uses model name + * verbatim + */ + tableName?: string; + + schema?: string; + + /** + * You can also change the database engine, e.g. to MyISAM. InnoDB is the default. + */ + engine?: string; + + charset?: string; + + /** + * Finaly you can specify a comment for the table in MySQL and PG + */ + comment?: string; + + collate?: string; + + /** + * Set the initial AUTO_INCREMENT value for the table in MySQL. + */ + initialAutoIncrement?: string; + + /** + * An object of hook function that are called before and after certain lifecycle events. + * See Hooks for more information about hook + * functions and their signatures. Each property can either be a function, or an array of functions. + */ + hooks?: Partial>; + + /** + * An object of model wide validations. Validations have access to all model values via `this`. If the + * validator function takes an argument, it is asumed to be async, and is called with a callback that + * accepts an optional error. + */ + validate?: ModelValidateOptions; + + /** + * Allows defining additional setters that will be available on model instances. + */ + setterMethods?: ModelSetterOptions; + + /** + * Allows defining additional getters that will be available on model instances. + */ + getterMethods?: ModelGetterOptions; + + /** + * Enable optimistic locking. + * When enabled, sequelize will add a version count attribute to the model and throw an + * OptimisticLockingError error when stale instances are saved. + * - If string: Uses the named attribute. + * - If boolean: Uses `version`. + * @default false + */ + version?: boolean | string; +} + +/** + * Options passed to [[Model.init]] + */ +export interface InitOptions extends ModelOptions { + /** + * The sequelize connection. Required ATM. + */ + sequelize: Sequelize; +} + +/** + * AddScope Options for Model.addScope + */ +export interface AddScopeOptions { + /** + * If a scope of the same name already exists, should it be overwritten? + */ + override: boolean; +} + +export abstract class Model extends Hooks { + /** The name of the database table */ + public static readonly tableName: string; + + /** + * The name of the primary key attribute + */ + public static readonly primaryKeyAttribute: string; + + /** + * An object hash from alias to association object + */ + public static readonly associations: { + [key: string]: Association; + }; + + /** + * The options that the model was initialized with + */ + public static readonly options: InitOptions; + + /** + * The attributes of the model + */ + public static readonly rawAttributes: { [attribute: string]: ModelAttributeColumnOptions }; + + /** + * Reference to the sequelize instance the model was initialized with + */ + public static readonly sequelize?: Sequelize; + + /** + * Initialize a model, representing a table in the DB, with attributes and options. + * + * The table columns are define by the hash that is given as the second argument. Each attribute of the hash represents a column. A short table definition might look like this: + * + * ```js + * Project.init({ + * columnA: { + * type: Sequelize.BOOLEAN, + * validate: { + * is: ['[a-z]','i'], // will only allow letters + * max: 23, // only allow values <= 23 + * isIn: { + * args: [['en', 'zh']], + * msg: "Must be English or Chinese" + * } + * }, + * field: 'column_a' + * // Other attributes here + * }, + * columnB: Sequelize.STRING, + * columnC: 'MY VERY OWN COLUMN TYPE' + * }, {sequelize}) + * + * sequelize.models.modelName // The model will now be available in models under the class name + * ``` + * + * As shown above, column definitions can be either strings, a reference to one of the datatypes that are predefined on the Sequelize constructor, or an object that allows you to specify both the type of the column, and other attributes such as default values, foreign key constraints and custom setters and getters. + * + * For a list of possible data types, see http://docs.sequelizejs.com/en/latest/docs/models-definition/#data-types + * + * For more about getters and setters, see http://docs.sequelizejs.com/en/latest/docs/models-definition/#getters-setters + * + * For more about instance and class methods, see http://docs.sequelizejs.com/en/latest/docs/models-definition/#expansion-of-models + * + * For more about validation, see http://docs.sequelizejs.com/en/latest/docs/models-definition/#validations + * + * @param attributes + * An object, where each attribute is a column of the table. Each column can be either a DataType, a + * string or a type-description object, with the properties described below: + * @param options These options are merged with the default define options provided to the Sequelize constructor + */ + public static init(attributes: ModelAttributes, options: InitOptions): void; + + /** + * Remove attribute from model definition + * + * @param attribute + */ + public static removeAttribute(attribute: string): void; + + /** + * Sync this Model to the DB, that is create the table. Upon success, the callback will be called with the + * model instance (this) + */ + public static sync(options?: SyncOptions): Promise; + + /** + * Drop the table represented by this Model + * + * @param options + */ + public static drop(options?: DropOptions): Promise; + + /** + * Apply a schema to this model. For postgres, this will actually place the schema in front of the table + * name + * - `"schema"."tableName"`, while the schema will be prepended to the table name for mysql and + * sqlite - `'schema.tablename'`. + * + * @param schema The name of the schema + * @param options + */ + public static schema( + this: { new (): M } & typeof Model, + schema: string, + options?: SchemaOptions + ): { new (): M } & typeof Model; + + /** + * Get the tablename of the model, taking schema into account. The method will return The name as a string + * if the model has no schema, or an object with `tableName`, `schema` and `delimiter` properties. + * + * @param options The hash of options from any query. You can use one model to access tables with matching + * schemas by overriding `getTableName` and using custom key/values to alter the name of the table. + * (eg. + * subscribers_1, subscribers_2) + */ + public static getTableName(): string | { + tableName: string; + schema: string; + delimiter: string; + }; + + /** + * Apply a scope created in `define` to the model. First let's look at how to create scopes: + * ```js + * class MyModel extends Model {} + * MyModel.init(attributes, { + * defaultScope: { + * where: { + * username: 'dan' + * }, + * limit: 12 + * }, + * scopes: { + * isALie: { + * where: { + * stuff: 'cake' + * } + * }, + * complexFunction(email, accessLevel) { + * return { + * where: { + * email: { + * [Op.like]: email + * }, + * accesss_level { + * [Op.gte]: accessLevel + * } + * } + * } + * } + * }, + * sequelize, + * }) + * ``` + * Now, since you defined a default scope, every time you do Model.find, the default scope is appended to + * your query. Here's a couple of examples: + * ```js + * Model.findAll() // WHERE username = 'dan' + * Model.findAll({ where: { age: { gt: 12 } } }) // WHERE age > 12 AND username = 'dan' + * ``` + * + * To invoke scope functions you can do: + * ```js + * Model.scope({ method: ['complexFunction' 'dan@sequelize.com', 42]}).findAll() + * // WHERE email like 'dan@sequelize.com%' AND access_level >= 42 + * ``` + * + * @return Model A reference to the model, with the scope(s) applied. Calling scope again on the returned + * model will clear the previous scope. + */ + public static scope( + this: M, + options?: string | ScopeOptions | (string | ScopeOptions)[] | WhereAttributeHash + ): M; + + /** + * Add a new scope to the model + * + * This is especially useful for adding scopes with includes, when the model you want to + * include is not available at the time this model is defined. By default this will throw an + * error if a scope with that name already exists. Pass `override: true` in the options + * object to silence this error. + */ + public static addScope(name: string, scope: FindOptions, options?: AddScopeOptions): void; + public static addScope(name: string, scope: (...args: any[]) => FindOptions, options?: AddScopeOptions): void; + + /** + * Search for multiple instances. + * + * __Simple search using AND and =__ + * ```js + * Model.findAll({ + * where: { + * attr1: 42, + * attr2: 'cake' + * } + * }) + * ``` + * ```sql + * WHERE attr1 = 42 AND attr2 = 'cake' + * ``` + * + * __Using greater than, less than etc.__ + * ```js + * + * Model.findAll({ + * where: { + * attr1: { + * gt: 50 + * }, + * attr2: { + * lte: 45 + * }, + * attr3: { + * in: [1,2,3] + * }, + * attr4: { + * ne: 5 + * } + * } + * }) + * ``` + * ```sql + * WHERE attr1 > 50 AND attr2 <= 45 AND attr3 IN (1,2,3) AND attr4 != 5 + * ``` + * Possible options are: `[Op.ne], [Op.in], [Op.not], [Op.notIn], [Op.gte], [Op.gt], [Op.lte], [Op.lt], [Op.like], [Op.ilike]/[Op.iLike], [Op.notLike], + * [Op.notILike], '..'/[Op.between], '!..'/[Op.notBetween], '&&'/[Op.overlap], '@>'/[Op.contains], '<@'/[Op.contained]` + * + * __Queries using OR__ + * ```js + * Model.findAll({ + * where: Sequelize.and( + * { name: 'a project' }, + * Sequelize.or( + * { id: [1,2,3] }, + * { id: { gt: 10 } } + * ) + * ) + * }) + * ``` + * ```sql + * WHERE name = 'a project' AND (id` IN (1,2,3) OR id > 10) + * ``` + * + * The success listener is called with an array of instances if the query succeeds. + * + * @see {Sequelize#query} + */ + public static findAll(this: { new (): M } & typeof Model, options?: FindOptions): Promise; + + /** + * Search for a single instance by its primary key. This applies LIMIT 1, so the listener will + * always be called with a single instance. + */ + public static findByPk( + this: { new (): M } & typeof Model, + identifier?: Identifier, + options?: Omit + ): Promise; + public static findByPk( + this: { new (): M } & typeof Model, + identifier: Identifier, + options: Omit + ): Promise; + + /** + * Search for a single instance. This applies LIMIT 1, so the listener will always be called with a single + * instance. + */ + public static findOne( + this: { new (): M } & typeof Model, + options?: FindOptions + ): Promise; + public static findOne(this: { new (): M } & typeof Model, options: NonNullFindOptions): Promise; + + /** + * Run an aggregation method on the specified field + * + * @param field The field to aggregate over. Can be a field name or * + * @param aggregateFunction The function to use for aggregation, e.g. sum, max etc. + * @param options Query options. See sequelize.query for full options + * @return Returns the aggregate result cast to `options.dataType`, unless `options.plain` is false, in + * which case the complete data result is returned. + */ + public static aggregate( + this: { new (): M } & typeof Model, + field: keyof M, + aggregateFunction: string, + options?: AggregateOptions + ): Promise; + + /** + * Count number of records if group by is used + */ + public static count(options: CountWithOptions): Promise<{ [key: string]: number }>; + + /** + * Count the number of records matching the provided where clause. + * + * If you provide an `include` option, the number of matching associations will be counted instead. + */ + public static count(options?: CountOptions): Promise; + + /** + * Find all the rows matching your query, within a specified offset / limit, and get the total number of + * rows matching your query. This is very usefull for paging + * + * ```js + * Model.findAndCountAll({ + * where: ..., + * limit: 12, + * offset: 12 + * }).then(result => { + * ... + * }) + * ``` + * In the above example, `result.rows` will contain rows 13 through 24, while `result.count` will return + * the + * total number of rows that matched your query. + * + * When you add includes, only those which are required (either because they have a where clause, or + * because + * `required` is explicitly set to true on the include) will be added to the count part. + * + * Suppose you want to find all users who have a profile attached: + * ```js + * User.findAndCountAll({ + * include: [ + * { model: Profile, required: true} + * ], + * limit 3 + * }); + * ``` + * Because the include for `Profile` has `required` set it will result in an inner join, and only the users + * who have a profile will be counted. If we remove `required` from the include, both users with and + * without + * profiles will be counted + */ + public static findAndCountAll( + this: { new (): M } & typeof Model, + options?: FindAndCountOptions + ): Promise<{ rows: M[]; count: number }>; + + /** + * Find the maximum value of field + */ + public static max( + this: { new (): M } & typeof Model, + field: keyof M, + options?: AggregateOptions + ): Promise; + + /** + * Find the minimum value of field + */ + public static min( + this: { new (): M } & typeof Model, + field: keyof M, + options?: AggregateOptions + ): Promise; + + /** + * Find the sum of field + */ + public static sum( + this: { new (): M } & typeof Model, + field: keyof M, + options?: AggregateOptions + ): Promise; + + /** + * Builds a new model instance. Values is an object of key value pairs, must be defined but can be empty. + */ + public static build( + this: { new (): M } & typeof Model, + record?: object, + options?: BuildOptions + ): M; + + /** + * Undocumented bulkBuild + */ + public static bulkBuild( + this: { new (): M } & typeof Model, + records: object[], + options?: BuildOptions + ): M[]; + + /** + * Builds a new model instance and calls save on it. + */ + public static create( + this: { new (): M } & typeof Model, + values?: object, + options?: CreateOptions + ): Promise; + public static create(values: object, options: CreateOptions & { returning: false }): Promise; + + /** + * Find a row that matches the query, or build (but don't save) the row if none is found. + * The successfull result of the promise will be (instance, initialized) - Make sure to use `.then(([...]))` + */ + public static findOrBuild( + this: { new (): M } & typeof Model, + options: FindOrCreateOptions + ): Promise<[M, boolean]>; + + /** + * Find a row that matches the query, or build and save the row if none is found + * The successful result of the promise will be (instance, created) - Make sure to use `.then(([...]))` + * + * If no transaction is passed in the `options` object, a new transaction will be created internally, to + * prevent the race condition where a matching row is created by another connection after the find but + * before the insert call. However, it is not always possible to handle this case in SQLite, specifically + * if one transaction inserts and another tries to select before the first one has comitted. In this case, + * an instance of sequelize.TimeoutError will be thrown instead. If a transaction is created, a savepoint + * will be created instead, and any unique constraint violation will be handled internally. + */ + public static findOrCreate( + this: { new (): M } & typeof Model, + options: FindOrCreateOptions + ): Promise<[M, boolean]>; + + /** + * A more performant findOrCreate that will not work under a transaction (at least not in postgres) + * Will execute a find call, if empty then attempt to create, if unique constraint then attempt to find again + */ + public static findCreateFind( + this: { new (): M } & typeof Model, + options: FindOrCreateOptions + ): Promise<[M, boolean]>; + + /** + * Insert or update a single row. An update will be executed if a row which matches the supplied values on + * either the primary key or a unique key is found. Note that the unique index must be defined in your + * sequelize model and not just in the table. Otherwise you may experience a unique constraint violation, + * because sequelize fails to identify the row that should be updated. + * + * **Implementation details:** + * + * * MySQL - Implemented as a single query `INSERT values ON DUPLICATE KEY UPDATE values` + * * PostgreSQL - Implemented as a temporary function with exception handling: INSERT EXCEPTION WHEN + * unique_constraint UPDATE + * * SQLite - Implemented as two queries `INSERT; UPDATE`. This means that the update is executed + * regardless + * of whether the row already existed or not + * + * **Note** that SQLite returns undefined for created, no matter if the row was created or updated. This is + * because SQLite always runs INSERT OR IGNORE + UPDATE, in a single query, so there is no way to know + * whether the row was inserted or not. + */ + public static upsert( + this: { new (): M } & typeof Model, + values: object, + options?: UpsertOptions & { returning?: false | undefined } + ): Promise; + + public static upsert ( + this: { new (): M } & typeof Model, + values: object, + options?: UpsertOptions & { returning: true } + ): Promise<[ M, boolean ]>; + + /** + * Create and insert multiple instances in bulk. + * + * The success handler is passed an array of instances, but please notice that these may not completely + * represent the state of the rows in the DB. This is because MySQL and SQLite do not make it easy to + * obtain + * back automatically generated IDs and other default values in a way that can be mapped to multiple + * records. To obtain Instances for the newly created values, you will need to query for them again. + * + * @param records List of objects (key/value pairs) to create instances from + */ + public static bulkCreate( + this: { new (): M } & typeof Model, + records: object[], + options?: BulkCreateOptions + ): Promise; + + /** + * Truncate all instances of the model. This is a convenient method for Model.destroy({ truncate: true }). + */ + public static truncate(options?: TruncateOptions): Promise; + + /** + * Delete multiple instances, or set their deletedAt timestamp to the current time if `paranoid` is enabled. + * + * @return Promise The number of destroyed rows + */ + public static destroy(options?: DestroyOptions): Promise; + + /** + * Restore multiple instances if `paranoid` is enabled. + */ + public static restore(options?: RestoreOptions): Promise; + + /** + * Update multiple instances that match the where options. The promise returns an array with one or two + * elements. The first element is always the number of affected rows, while the second element is the actual + * affected rows (only supported in postgres with `options.returning` true.) + */ + public static update( + this: { new (): M } & typeof Model, + values: object, + options: UpdateOptions + ): Promise<[number, M[]]>; + + /** + * Increments a single field. + */ + public static increment( + this: { new (): M }, + field: K, + options: IncrementDecrementOptionsWithBy + ): Promise; + + /** + * Increments multiple fields by the same value. + */ + public static increment( + this: { new (): M }, + fields: K[], + options: IncrementDecrementOptionsWithBy + ): Promise; + + /** + * Increments multiple fields by different values. + */ + public static increment( + this: { new (): M }, + fields: { [key in K]?: number }, + options: IncrementDecrementOptions + ): Promise; + + /** + * Run a describe query on the table. The result will be return to the listener as a hash of attributes and + * their types. + */ + public static describe(): Promise; + + /** + * Unscope the model + */ + public static unscoped(this: M): M; + + /** + * A hook that is run before validation + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static beforeValidate( + this: { new (): M } & typeof Model, + name: string, + fn: (instance: M, options: ValidationOptions) => HookReturn + ): void; + public static beforeValidate( + this: { new (): M } & typeof Model, + fn: (instance: M, options: ValidationOptions) => HookReturn + ): void; + + /** + * A hook that is run after validation + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static afterValidate( + this: { new (): M } & typeof Model, + name: string, + fn: (instance: M, options: ValidationOptions) => HookReturn + ): void; + public static afterValidate( + this: { new (): M } & typeof Model, + fn: (instance: M, options: ValidationOptions) => HookReturn + ): void; + + /** + * A hook that is run before creating a single instance + * + * @param name + * @param fn A callback function that is called with attributes, options + */ + public static beforeCreate( + this: { new (): M } & typeof Model, + name: string, + fn: (attributes: M, options: CreateOptions) => HookReturn + ): void; + public static beforeCreate( + this: { new (): M } & typeof Model, + fn: (attributes: M, options: CreateOptions) => HookReturn + ): void; + + /** + * A hook that is run after creating a single instance + * + * @param name + * @param fn A callback function that is called with attributes, options + */ + public static afterCreate( + this: { new (): M } & typeof Model, + name: string, + fn: (attributes: M, options: CreateOptions) => HookReturn + ): void; + public static afterCreate( + this: { new (): M } & typeof Model, + fn: (attributes: M, options: CreateOptions) => HookReturn + ): void; + + /** + * A hook that is run before destroying a single instance + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static beforeDestroy( + this: { new (): M } & typeof Model, + name: string, + fn: (instance: M, options: InstanceDestroyOptions) => HookReturn + ): void; + public static beforeDestroy( + this: { new (): M } & typeof Model, + fn: (instance: Model, options: InstanceDestroyOptions) => HookReturn + ): void; + + /** + * A hook that is run after destroying a single instance + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static afterDestroy( + this: { new (): M } & typeof Model, + name: string, + fn: (instance: M, options: InstanceDestroyOptions) => HookReturn + ): void; + public static afterDestroy( + this: { new (): M } & typeof Model, + fn: (instance: M, options: InstanceDestroyOptions) => HookReturn + ): void; + + /** + * A hook that is run before updating a single instance + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static beforeUpdate( + this: { new (): M } & typeof Model, + name: string, + fn: (instance: M, options: UpdateOptions) => HookReturn + ): void; + public static beforeUpdate( + this: { new (): M } & typeof Model, + fn: (instance: M, options: UpdateOptions) => HookReturn + ): void; + + /** + * A hook that is run after updating a single instance + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static afterUpdate( + this: { new (): M } & typeof Model, + name: string, + fn: (instance: M, options: UpdateOptions) => HookReturn + ): void; + public static afterUpdate( + this: { new (): M } & typeof Model, + fn: (instance: M, options: UpdateOptions) => HookReturn + ): void; + + /** + * A hook that is run before creating or updating a single instance, It proxies `beforeCreate` and `beforeUpdate` + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static beforeSave( + this: { new (): M } & typeof Model, + name: string, + fn: (instance: M, options: UpdateOptions | SaveOptions) => HookReturn + ): void; + public static beforeSave( + this: { new (): M } & typeof Model, + fn: (instance: M, options: UpdateOptions | SaveOptions) => HookReturn + ): void; + + /** + * A hook that is run after creating or updating a single instance, It proxies `afterCreate` and `afterUpdate` + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static afterSave( + this: { new (): M } & typeof Model, + name: string, + fn: (instance: M, options: UpdateOptions | SaveOptions) => HookReturn + ): void; + public static afterSave( + this: { new (): M } & typeof Model, + fn: (instance: M, options: UpdateOptions | SaveOptions) => HookReturn + ): void; + + /** + * A hook that is run before creating instances in bulk + * + * @param name + * @param fn A callback function that is called with instances, options + */ + public static beforeBulkCreate( + this: { new (): M } & typeof Model, + name: string, + fn: (instances: M[], options: BulkCreateOptions) => HookReturn + ): void; + public static beforeBulkCreate( + this: { new (): M } & typeof Model, + fn: (instances: M[], options: BulkCreateOptions) => HookReturn + ): void; + + /** + * A hook that is run after creating instances in bulk + * + * @param name + * @param fn A callback function that is called with instances, options + */ + public static afterBulkCreate( + this: { new (): M } & typeof Model, + name: string, + fn: (instances: M[], options: BulkCreateOptions) => HookReturn + ): void; + public static afterBulkCreate( + this: { new (): M } & typeof Model, + fn: (instances: M[], options: BulkCreateOptions) => HookReturn + ): void; + + /** + * A hook that is run before destroying instances in bulk + * + * @param name + * @param fn A callback function that is called with options + */ + public static beforeBulkDestroy(name: string, fn: (options: BulkCreateOptions) => HookReturn): void; + public static beforeBulkDestroy(fn: (options: BulkCreateOptions) => HookReturn): void; + + /** + * A hook that is run after destroying instances in bulk + * + * @param name + * @param fn A callback function that is called with options + */ + public static afterBulkDestroy(name: string, fn: (options: DestroyOptions) => HookReturn): void; + public static afterBulkDestroy(fn: (options: DestroyOptions) => HookReturn): void; + + /** + * A hook that is run after updating instances in bulk + * + * @param name + * @param fn A callback function that is called with options + */ + public static beforeBulkUpdate(name: string, fn: (options: UpdateOptions) => HookReturn): void; + public static beforeBulkUpdate(fn: (options: UpdateOptions) => HookReturn): void; + + /** + * A hook that is run after updating instances in bulk + * + * @param name + * @param fn A callback function that is called with options + */ + public static afterBulkUpdate(name: string, fn: (options: UpdateOptions) => HookReturn): void; + public static afterBulkUpdate(fn: (options: UpdateOptions) => HookReturn): void; + + /** + * A hook that is run before a find (select) query + * + * @param name + * @param fn A callback function that is called with options + */ + public static beforeFind(name: string, fn: (options: FindOptions) => HookReturn): void; + public static beforeFind(fn: (options: FindOptions) => HookReturn): void; + + /** + * A hook that is run before a count query + * + * @param name + * @param fn A callback function that is called with options + */ + public static beforeCount(name: string, fn: (options: CountOptions) => HookReturn): void; + public static beforeCount(fn: (options: CountOptions) => HookReturn): void; + + /** + * A hook that is run before a find (select) query, after any { include: {all: ...} } options are expanded + * + * @param name + * @param fn A callback function that is called with options + */ + public static beforeFindAfterExpandIncludeAll(name: string, fn: (options: FindOptions) => HookReturn): void; + public static beforeFindAfterExpandIncludeAll(fn: (options: FindOptions) => HookReturn): void; + + /** + * A hook that is run before a find (select) query, after all option parsing is complete + * + * @param name + * @param fn A callback function that is called with options + */ + public static beforeFindAfterOptions(name: string, fn: (options: FindOptions) => HookReturn): void; + public static beforeFindAfterOptions(fn: (options: FindOptions) => void): HookReturn; + + /** + * A hook that is run after a find (select) query + * + * @param name + * @param fn A callback function that is called with instance(s), options + */ + public static afterFind( + this: { new (): M } & typeof Model, + name: string, + fn: (instancesOrInstance: M[] | M | null, options: FindOptions) => HookReturn + ): void; + public static afterFind( + this: { new (): M } & typeof Model, + fn: (instancesOrInstance: M[] | M | null, options: FindOptions) => HookReturn + ): void; + + /** + * A hook that is run before sequelize.sync call + * @param fn A callback function that is called with options passed to sequelize.sync + */ + public static beforeBulkSync(name: string, fn: (options: SyncOptions) => HookReturn): void; + public static beforeBulkSync(fn: (options: SyncOptions) => HookReturn): void; + + /** + * A hook that is run after sequelize.sync call + * @param fn A callback function that is called with options passed to sequelize.sync + */ + public static afterBulkSync(name: string, fn: (options: SyncOptions) => HookReturn): void; + public static afterBulkSync(fn: (options: SyncOptions) => HookReturn): void; + + /** + * A hook that is run before Model.sync call + * @param fn A callback function that is called with options passed to Model.sync + */ + public static beforeSync(name: string, fn: (options: SyncOptions) => HookReturn): void; + public static beforeSync(fn: (options: SyncOptions) => HookReturn): void; + + /** + * A hook that is run after Model.sync call + * @param fn A callback function that is called with options passed to Model.sync + */ + public static afterSync(name: string, fn: (options: SyncOptions) => HookReturn): void; + public static afterSync(fn: (options: SyncOptions) => HookReturn): void; + + /** + * Creates an association between this (the source) and the provided target. The foreign key is added + * on the target. + * + * Example: `User.hasOne(Profile)`. This will add userId to the profile table. + * + * @param target The model that will be associated with hasOne relationship + * @param options Options for the association + */ + public static hasOne( + this: ModelCtor, target: ModelCtor, options?: HasOneOptions + ): HasOne; + + /** + * Creates an association between this (the source) and the provided target. The foreign key is added on the + * source. + * + * Example: `Profile.belongsTo(User)`. This will add userId to the profile table. + * + * @param target The model that will be associated with hasOne relationship + * @param options Options for the association + */ + public static belongsTo( + this: ModelCtor, target: ModelCtor, options?: BelongsToOptions + ): BelongsTo; + + /** + * Create an association that is either 1:m or n:m. + * + * ```js + * // Create a 1:m association between user and project + * User.hasMany(Project) + * ``` + * ```js + * // Create a n:m association between user and project + * User.hasMany(Project) + * Project.hasMany(User) + * ``` + * By default, the name of the join table will be source+target, so in this case projectsusers. This can be + * overridden by providing either a string or a Model as `through` in the options. If you use a through + * model with custom attributes, these attributes can be set when adding / setting new associations in two + * ways. Consider users and projects from before with a join table that stores whether the project has been + * started yet: + * ```js + * class UserProjects extends Model {} + * UserProjects.init({ + * started: Sequelize.BOOLEAN + * }, { sequelize }) + * User.hasMany(Project, { through: UserProjects }) + * Project.hasMany(User, { through: UserProjects }) + * ``` + * ```js + * jan.addProject(homework, { started: false }) // The homework project is not started yet + * jan.setProjects([makedinner, doshopping], { started: true}) // Both shopping and dinner have been + * started + * ``` + * + * If you want to set several target instances, but with different attributes you have to set the + * attributes on the instance, using a property with the name of the through model: + * + * ```js + * p1.userprojects { + * started: true + * } + * user.setProjects([p1, p2], {started: false}) // The default value is false, but p1 overrides that. + * ``` + * + * Similarily, when fetching through a join table with custom attributes, these attributes will be + * available as an object with the name of the through model. + * ```js + * user.getProjects().then(projects => { + * const p1 = projects[0] + * p1.userprojects.started // Is this project started yet? + * }) + * ``` + * + * @param target The model that will be associated with hasOne relationship + * @param options Options for the association + */ + public static hasMany( + this: ModelCtor, target: ModelCtor, options?: HasManyOptions + ): HasMany; + + /** + * Create an N:M association with a join table + * + * ```js + * User.belongsToMany(Project) + * Project.belongsToMany(User) + * ``` + * By default, the name of the join table will be source+target, so in this case projectsusers. This can be + * overridden by providing either a string or a Model as `through` in the options. + * + * If you use a through model with custom attributes, these attributes can be set when adding / setting new + * associations in two ways. Consider users and projects from before with a join table that stores whether + * the project has been started yet: + * ```js + * class UserProjects extends Model {} + * UserProjects.init({ + * started: Sequelize.BOOLEAN + * }, { sequelize }); + * User.belongsToMany(Project, { through: UserProjects }) + * Project.belongsToMany(User, { through: UserProjects }) + * ``` + * ```js + * jan.addProject(homework, { started: false }) // The homework project is not started yet + * jan.setProjects([makedinner, doshopping], { started: true}) // Both shopping and dinner has been started + * ``` + * + * If you want to set several target instances, but with different attributes you have to set the + * attributes on the instance, using a property with the name of the through model: + * + * ```js + * p1.userprojects { + * started: true + * } + * user.setProjects([p1, p2], {started: false}) // The default value is false, but p1 overrides that. + * ``` + * + * Similarily, when fetching through a join table with custom attributes, these attributes will be + * available as an object with the name of the through model. + * ```js + * user.getProjects().then(projects => { + * const p1 = projects[0] + * p1.userprojects.started // Is this project started yet? + * }) + * ``` + * + * @param target The model that will be associated with hasOne relationship + * @param options Options for the association + * + */ + public static belongsToMany( + this: ModelCtor, target: ModelCtor, options: BelongsToManyOptions + ): BelongsToMany; + + /** + * Returns true if this instance has not yet been persisted to the database + */ + public isNewRecord: boolean; + + /** + * A reference to the sequelize instance + */ + public sequelize: Sequelize; + + /** + * Builds a new model instance. + * @param values an object of key value pairs + */ + constructor(values?: object, options?: BuildOptions); + + /** + * Get an object representing the query for this instance, use with `options.where` + */ + public where(): object; + + /** + * Get the value of the underlying data value + */ + public getDataValue(key: K): this[K]; + + /** + * Update the underlying data value + */ + public setDataValue(key: K, value: this[K]): void; + + /** + * If no key is given, returns all values of the instance, also invoking virtual getters. + * + * If key is given and a field or virtual getter is present for the key it will call that getter - else it + * will return the value for key. + * + * @param options.plain If set to true, included instances will be returned as plain objects + */ + public get(options?: { plain?: boolean; clone?: boolean }): object; + public get(key: K, options?: { plain?: boolean; clone?: boolean }): this[K]; + public get(key: string, options?: { plain?: boolean; clone?: boolean }): unknown; + + /** + * Set is used to update values on the instance (the sequelize representation of the instance that is, + * remember that nothing will be persisted before you actually call `save`). In its most basic form `set` + * will update a value stored in the underlying `dataValues` object. However, if a custom setter function + * is defined for the key, that function will be called instead. To bypass the setter, you can pass `raw: + * true` in the options object. + * + * If set is called with an object, it will loop over the object, and call set recursively for each key, + * value pair. If you set raw to true, the underlying dataValues will either be set directly to the object + * passed, or used to extend dataValues, if dataValues already contain values. + * + * When set is called, the previous value of the field is stored and sets a changed flag(see `changed`). + * + * Set can also be used to build instances for associations, if you have values for those. + * When using set with associations you need to make sure the property key matches the alias of the + * association while also making sure that the proper include options have been set (from .build() or + * .findOne()) + * + * If called with a dot.seperated key on a JSON/JSONB attribute it will set the value nested and flag the + * entire object as changed. + * + * @param options.raw If set to true, field and virtual setters will be ignored + * @param options.reset Clear all previously set data values + */ + public set(key: K, value: this[K], options?: SetOptions): this; + public set(keys: Partial, options?: SetOptions): this; + public setAttributes(key: K, value: this[K], options?: SetOptions): this; + public setAttributes(keys: object, options?: SetOptions): this; + + /** + * If changed is called with a string it will return a boolean indicating whether the value of that key in + * `dataValues` is different from the value in `_previousDataValues`. + * + * If changed is called without an argument, it will return an array of keys that have changed. + * + * If changed is called with two arguments, it will set the property to `dirty`. + * + * If changed is called without an argument and no keys have changed, it will return `false`. + */ + public changed(key: K): boolean; + public changed(key: K, dirty: boolean): void; + public changed(): false | string[]; + + /** + * Returns the previous value for key from `_previousDataValues`. + */ + public previous(key: K): this[K]; + + /** + * Validate this instance, and if the validation passes, persist it to the database. + * + * On success, the callback will be called with this instance. On validation error, the callback will be + * called with an instance of `Sequelize.ValidationError`. This error will have a property for each of the + * fields for which validation failed, with the error message for that field. + */ + public save(options?: SaveOptions): Promise; + + /** + * Refresh the current instance in-place, i.e. update the object with current data from the DB and return + * the same object. This is different from doing a `find(Instance.id)`, because that would create and + * return a new instance. With this method, all references to the Instance are updated with the new data + * and no new objects are created. + */ + public reload(options?: FindOptions): Promise; + + /** + * Validate the attribute of this instance according to validation rules set in the model definition. + * + * Emits null if and only if validation successful; otherwise an Error instance containing + * { field name : [error msgs] } entries. + * + * @param options.skip An array of strings. All properties that are in this array will not be validated + */ + public validate(options?: ValidationOptions): Promise; + + /** + * This is the same as calling `set` and then calling `save`. + */ + public update(key: K, value: this[K], options?: InstanceUpdateOptions): Promise; + public update(keys: object, options?: InstanceUpdateOptions): Promise; + + /** + * Destroy the row corresponding to this instance. Depending on your setting for paranoid, the row will + * either be completely deleted, or have its deletedAt timestamp set to the current time. + */ + public destroy(options?: InstanceDestroyOptions): Promise; + + /** + * Restore the row corresponding to this instance. Only available for paranoid models. + */ + public restore(options?: InstanceRestoreOptions): Promise; + + /** + * Increment the value of one or more columns. This is done in the database, which means it does not use + * the values currently stored on the Instance. The increment is done using a + * ```sql + * SET column = column + X + * ``` + * query. To get the correct value after an increment into the Instance you should do a reload. + * + * ```js + * instance.increment('number') // increment number by 1 + * instance.increment(['number', 'count'], { by: 2 }) // increment number and count by 2 + * instance.increment({ answer: 42, tries: 1}, { by: 2 }) // increment answer by 42, and tries by 1. + * // `by` is ignored, since each column has its own + * // value + * ``` + * + * @param fields If a string is provided, that column is incremented by the value of `by` given in options. + * If an array is provided, the same is true for each column. + * If and object is provided, each column is incremented by the value given. + */ + public increment( + fields: K | K[] | Partial, + options?: IncrementDecrementOptionsWithBy + ): Promise; + + /** + * Decrement the value of one or more columns. This is done in the database, which means it does not use + * the values currently stored on the Instance. The decrement is done using a + * ```sql + * SET column = column - X + * ``` + * query. To get the correct value after an decrement into the Instance you should do a reload. + * + * ```js + * instance.decrement('number') // decrement number by 1 + * instance.decrement(['number', 'count'], { by: 2 }) // decrement number and count by 2 + * instance.decrement({ answer: 42, tries: 1}, { by: 2 }) // decrement answer by 42, and tries by 1. + * // `by` is ignored, since each column has its own + * // value + * ``` + * + * @param fields If a string is provided, that column is decremented by the value of `by` given in options. + * If an array is provided, the same is true for each column. + * If and object is provided, each column is decremented by the value given + */ + public decrement( + fields: K | K[] | Partial, + options?: IncrementDecrementOptionsWithBy + ): Promise; + + /** + * Check whether all values of this and `other` Instance are the same + */ + public equals(other: this): boolean; + + /** + * Check if this is eqaul to one of `others` by calling equals + */ + public equalsOneOf(others: this[]): boolean; + + /** + * Convert the instance to a JSON representation. Proxies to calling `get` with no keys. This means get all + * values gotten from the DB, and apply all custom getters. + */ + public toJSON(): object; +} + +export type ModelType = typeof Model; + +export type ModelCtor = { new (): M } & ModelType; + +export default Model; diff --git a/node_modules/sequelize/types/lib/operators.d.ts b/node_modules/sequelize/types/lib/operators.d.ts new file mode 100644 index 00000000..a64f828b --- /dev/null +++ b/node_modules/sequelize/types/lib/operators.d.ts @@ -0,0 +1,44 @@ +/** + * object that holds all operator symbols + */ +declare const Op: { + readonly adjacent: unique symbol; + readonly all: unique symbol; + readonly and: unique symbol; + readonly any: unique symbol; + readonly between: unique symbol; + readonly col: unique symbol; + readonly contained: unique symbol; + readonly contains: unique symbol; + readonly endsWith: unique symbol; + readonly eq: unique symbol; + readonly gt: unique symbol; + readonly gte: unique symbol; + readonly iLike: unique symbol; + readonly in: unique symbol; + readonly iRegexp: unique symbol; + readonly is: unique symbol; + readonly like: unique symbol; + readonly lt: unique symbol; + readonly lte: unique symbol; + readonly ne: unique symbol; + readonly noExtendLeft: unique symbol; + readonly noExtendRight: unique symbol; + readonly not: unique symbol; + readonly notBetween: unique symbol; + readonly notILike: unique symbol; + readonly notIn: unique symbol; + readonly notIRegexp: unique symbol; + readonly notLike: unique symbol; + readonly notRegexp: unique symbol; + readonly or: unique symbol; + readonly overlap: unique symbol; + readonly placeholder: unique symbol; + readonly regexp: unique symbol; + readonly startsWith: unique symbol; + readonly strictLeft: unique symbol; + readonly strictRight: unique symbol; + readonly substring: unique symbol; + readonly values: unique symbol; +}; +export = Op; diff --git a/node_modules/sequelize/types/lib/promise.d.ts b/node_modules/sequelize/types/lib/promise.d.ts new file mode 100644 index 00000000..2ee910de --- /dev/null +++ b/node_modules/sequelize/types/lib/promise.d.ts @@ -0,0 +1,6 @@ +// tslint:disable-next-line:no-implicit-dependencies +import * as Bluebird from 'bluebird'; + +export const Promise: typeof Bluebird; +export type Promise = Bluebird; +export default Promise; diff --git a/node_modules/sequelize/types/lib/query-interface.d.ts b/node_modules/sequelize/types/lib/query-interface.d.ts new file mode 100644 index 00000000..b53b3774 --- /dev/null +++ b/node_modules/sequelize/types/lib/query-interface.d.ts @@ -0,0 +1,640 @@ +import { DataType } from './data-types'; +import { Logging, Model, ModelAttributeColumnOptions, ModelAttributes, Transactionable, WhereOptions, Filterable, Poolable } from './model'; +import { Promise } from './promise'; +import QueryTypes = require('./query-types'); +import { Sequelize, RetryOptions } from './sequelize'; +import { Transaction } from './transaction'; + +type BindOrReplacements = { [key: string]: unknown } | unknown[]; + +/** + * Interface for query options + */ +export interface QueryOptions extends Logging, Transactionable, Poolable { + /** + * If true, sequelize will not try to format the results of the query, or build an instance of a model from + * the result + */ + raw?: boolean; + + /** + * The type of query you are executing. The query type affects how results are formatted before they are + * passed back. The type is a string, but `Sequelize.QueryTypes` is provided as convenience shortcuts. + */ + type?: string; + + /** + * If true, transforms objects with `.` separated property names into nested objects using + * [dottie.js](https://github.com/mickhansen/dottie.js). For example { 'user.username': 'john' } becomes + * { user: { username: 'john' }}. When `nest` is true, the query type is assumed to be `'SELECT'`, + * unless otherwise specified + * + * @default false + */ + nest?: boolean; + + /** + * Sets the query type to `SELECT` and return a single row + */ + plain?: boolean; + + /** + * Either an object of named parameter replacements in the format `:param` or an array of unnamed + * replacements to replace `?` in your SQL. + */ + replacements?: BindOrReplacements; + + /** + * Either an object of named parameter bindings in the format `$param` or an array of unnamed + * values to bind to `$1`, `$2`, etc in your SQL. + */ + bind?: BindOrReplacements; + + /** + * A sequelize instance used to build the return instance + */ + instance?: Model; + + /** + * Map returned fields to model's fields if `options.model` or `options.instance` is present. + * Mapping will occur before building the model instance. + */ + mapToModel?: boolean; + + retry?: RetryOptions; +} + +export interface QueryOptionsWithWhere extends QueryOptions, Filterable { + +} + +export interface QueryOptionsWithModel extends QueryOptions { + /** + * A sequelize model used to build the returned model instances (used to be called callee) + */ + model: typeof Model; +} + +export interface QueryOptionsWithType extends QueryOptions { + /** + * The type of query you are executing. The query type affects how results are formatted before they are + * passed back. The type is a string, but `Sequelize.QueryTypes` is provided as convenience shortcuts. + */ + type: T; +} + +export interface QueryOptionsWithForce extends QueryOptions { + force?: boolean; +} + +/** +* Most of the methods accept options and use only the logger property of the options. That's why the most used +* interface type for options in a method is separated here as another interface. +*/ +export interface QueryInterfaceOptions extends Logging, Transactionable {} + +export interface CollateCharsetOptions { + collate?: string; + charset?: string; +} + +export interface QueryInterfaceCreateTableOptions extends QueryInterfaceOptions, CollateCharsetOptions { + engine?: string; + /** + * Used for compound unique keys. + */ + uniqueKeys?: { + [keyName: string]: { + fields: string[]; + customIndex?: boolean; + }; + }; +} + +export interface QueryInterfaceDropTableOptions extends QueryInterfaceOptions { + cascade?: boolean; + force?: boolean; +} + +export interface QueryInterfaceDropAllTablesOptions extends QueryInterfaceOptions { + skip?: string[]; +} + +export type IndexType = 'UNIQUE' | 'FULLTEXT' | 'SPATIAL'; +export type IndexMethod = 'BTREE' | 'HASH' | 'GIST' | 'SPGIST' | 'GIN' | 'BRIN' | string; + +export interface IndexesOptions { + /** + * The name of the index. Defaults to model name + _ + fields concatenated + */ + name?: string; + + /** For FULLTEXT columns set your parser */ + parser?: string | null; + + /** + * Index type. Only used by mysql. One of `UNIQUE`, `FULLTEXT` and `SPATIAL` + */ + type?: IndexType; + + /** + * Should the index by unique? Can also be triggered by setting type to `UNIQUE` + * + * @default false + */ + unique?: boolean; + + /** + * PostgreSQL will build the index without taking any write locks. Postgres only + * + * @default false + */ + concurrently?: boolean; + + /** + * An array of the fields to index. Each field can either be a string containing the name of the field, + * a sequelize object (e.g `sequelize.fn`), or an object with the following attributes: `name` + * (field name), `length` (create a prefix index of length chars), `order` (the direction the column + * should be sorted in), `collate` (the collation (sort order) for the column) + */ + fields?: (string | { name: string; length?: number; order?: 'ASC' | 'DESC'; collate?: string })[]; + + /** + * The method to create the index by (`USING` statement in SQL). BTREE and HASH are supported by mysql and + * postgres, and postgres additionally supports GIST, SPGIST, BRIN and GIN. + */ + using?: IndexMethod; + + /** + * Index operator type. Postgres only + */ + operator?: string; + + /** + * Optional where parameter for index. Can be used to limit the index to certain rows. + */ + where?: WhereOptions; + + /** + * Prefix to append to the index name. + */ + prefix?: string; +} + +export interface QueryInterfaceIndexOptions extends IndexesOptions, QueryInterfaceOptions {} + +export interface AddUniqueConstraintOptions { + type: 'unique'; + name?: string; +} + +export interface AddDefaultConstraintOptions { + type: 'default'; + name?: string; + defaultValue?: unknown; +} + +export interface AddCheckConstraintOptions { + type: 'check'; + name?: string; + where?: WhereOptions; +} + +export interface AddPrimaryKeyConstraintOptions { + type: 'primary key'; + name?: string; +} + +export interface AddForeignKeyConstraintOptions { + type: 'foreign key'; + name?: string; + references?: { + table: string; + field: string; + }; + onDelete: string; + onUpdate: string; +} + +export type AddConstraintOptions = +| AddUniqueConstraintOptions +| AddDefaultConstraintOptions +| AddCheckConstraintOptions +| AddPrimaryKeyConstraintOptions +| AddForeignKeyConstraintOptions; + +export interface CreateDatabaseOptions extends CollateCharsetOptions, QueryOptions { + encoding?: string; +} + +export interface FunctionParam { + type: string; + name?: string; + direction?: string; +} + +/** +* The interface that Sequelize uses to talk to all databases. +* +* This interface is available through sequelize.QueryInterface. It should not be commonly used, but it's +* referenced anyway, so it can be used. +*/ +export class QueryInterface { + /** + * Returns the dialect-specific sql generator. + * + * We don't have a definition for the QueryGenerator, because I doubt it is commonly in use separately. + */ + public QueryGenerator: unknown; + + /** + * Returns the current sequelize instance. + */ + public sequelize: Sequelize; + + constructor(sequelize: Sequelize); + + /** + * Queries the schema (table list). + * + * @param schema The schema to query. Applies only to Postgres. + */ + public createSchema(schema?: string, options?: QueryInterfaceOptions): Promise; + + /** + * Drops the specified schema (table). + * + * @param schema The schema to query. Applies only to Postgres. + */ + public dropSchema(schema?: string, options?: QueryInterfaceOptions): Promise; + + /** + * Drops all tables. + */ + public dropAllSchemas(options?: QueryInterfaceDropAllTablesOptions): Promise; + + /** + * Queries all table names in the database. + * + * @param options + */ + public showAllSchemas(options?: QueryOptions): Promise; + + /** + * Return database version + */ + public databaseVersion(options?: QueryInterfaceOptions): Promise; + + /** + * Creates a table with specified attributes. + * + * @param tableName Name of table to create + * @param attributes Hash of attributes, key is attribute name, value is data type + * @param options Table options. + */ + public createTable( + tableName: string | { schema?: string; tableName?: string }, + attributes: ModelAttributes, + options?: QueryInterfaceCreateTableOptions + ): Promise; + + /** + * Drops the specified table. + * + * @param tableName Table name. + * @param options Query options, particularly "force". + */ + public dropTable(tableName: string, options?: QueryInterfaceDropTableOptions): Promise; + + /** + * Drops all tables. + * + * @param options + */ + public dropAllTables(options?: QueryInterfaceDropTableOptions): Promise; + + /** + * Drops all defined enums + * + * @param options + */ + public dropAllEnums(options?: QueryOptions): Promise; + + /** + * Renames a table + */ + public renameTable(before: string, after: string, options?: QueryInterfaceOptions): Promise; + + /** + * Returns all tables + */ + public showAllTables(options?: QueryOptions): Promise; + + /** + * Describe a table + */ + public describeTable( + tableName: string | { schema?: string; tableName?: string }, + options?: string | { schema?: string; schemaDelimiter?: string } & Logging + ): Promise; + + /** + * Adds a new column to a table + */ + public addColumn( + table: string | { schema?: string; tableName?: string }, + key: string, + attribute: ModelAttributeColumnOptions | DataType, + options?: QueryInterfaceOptions + ): Promise; + + /** + * Removes a column from a table + */ + public removeColumn( + table: string | { schema?: string; tableName?: string }, + attribute: string, + options?: QueryInterfaceOptions + ): Promise; + + /** + * Changes a column + */ + public changeColumn( + tableName: string | { schema?: string; tableName?: string }, + attributeName: string, + dataTypeOrOptions?: DataType | ModelAttributeColumnOptions, + options?: QueryInterfaceOptions + ): Promise; + + /** + * Renames a column + */ + public renameColumn( + tableName: string | { schema?: string; tableName?: string }, + attrNameBefore: string, + attrNameAfter: string, + options?: QueryInterfaceOptions + ): Promise; + + /** + * Adds a new index to a table + */ + public addIndex( + tableName: string, + attributes: string[], + options?: QueryInterfaceIndexOptions, + rawTablename?: string + ): Promise; + public addIndex( + tableName: string, + options: QueryInterfaceIndexOptions & { fields: string[] }, + rawTablename?: string + ): Promise; + + /** + * Removes an index of a table + */ + public removeIndex(tableName: string, indexName: string, options?: QueryInterfaceIndexOptions): Promise; + public removeIndex(tableName: string, attributes: string[], options?: QueryInterfaceIndexOptions): Promise; + + /** + * Adds constraints to a table + */ + public addConstraint( + tableName: string, + attributes: string[], + options?: AddConstraintOptions & QueryInterfaceOptions + ): Promise; + + /** + * Removes constraints from a table + */ + public removeConstraint(tableName: string, constraintName: string, options?: QueryInterfaceOptions): Promise; + + /** + * Shows the index of a table + */ + public showIndex(tableName: string | object, options?: QueryOptions): Promise; + + /** + * Put a name to an index + */ + public nameIndexes(indexes: string[], rawTablename: string): Promise; + + /** + * Returns all foreign key constraints of a table + */ + public getForeignKeysForTables(tableNames: string, options?: QueryInterfaceOptions): Promise; + + /** + * Inserts a new record + */ + public insert(instance: Model, tableName: string, values: object, options?: QueryOptions): Promise; + + /** + * Inserts or Updates a record in the database + */ + public upsert( + tableName: string, + values: object, + updateValues: object, + model: typeof Model, + options?: QueryOptions + ): Promise; + + /** + * Inserts multiple records at once + */ + public bulkInsert( + tableName: string, + records: object[], + options?: QueryOptions, + attributes?: string[] | string + ): Promise; + + /** + * Updates a row + */ + public update( + instance: Model, + tableName: string, + values: object, + identifier: WhereOptions, + options?: QueryOptions + ): Promise; + + /** + * Updates multiple rows at once + */ + public bulkUpdate( + tableName: string, + values: object, + identifier: WhereOptions, + options?: QueryOptions, + attributes?: string[] | string + ): Promise; + + /** + * Deletes a row + */ + public delete(instance: Model | null, tableName: string, identifier: WhereOptions, options?: QueryOptions): Promise; + + /** + * Deletes multiple rows at once + */ + public bulkDelete( + tableName: string, + identifier: WhereOptions, + options?: QueryOptions, + model?: typeof Model + ): Promise; + + /** + * Returns selected rows + */ + public select(model: typeof Model | null, tableName: string, options?: QueryOptionsWithWhere): Promise; + + /** + * Increments a row value + */ + public increment( + instance: Model, + tableName: string, + values: object, + identifier: WhereOptions, + options?: QueryOptions + ): Promise; + + /** + * Selects raw without parsing the string into an object + */ + public rawSelect( + tableName: string, + options: QueryOptionsWithWhere, + attributeSelector: string | string[], + model?: typeof Model + ): Promise; + + /** + * Postgres only. Creates a trigger on specified table to call the specified function with supplied + * parameters. + */ + public createTrigger( + tableName: string, + triggerName: string, + timingType: string, + fireOnArray: { + [key: string]: unknown; + }[], + functionName: string, + functionParams: FunctionParam[], + optionsArray: string[], + options?: QueryInterfaceOptions + ): Promise; + + /** + * Postgres only. Drops the specified trigger. + */ + public dropTrigger(tableName: string, triggerName: string, options?: QueryInterfaceOptions): Promise; + + /** + * Postgres only. Renames a trigger + */ + public renameTrigger( + tableName: string, + oldTriggerName: string, + newTriggerName: string, + options?: QueryInterfaceOptions + ): Promise; + + /** + * Postgres only. Create a function + */ + public createFunction( + functionName: string, + params: FunctionParam[], + returnType: string, + language: string, + body: string, + optionsArray?: string[], + options?: QueryOptionsWithForce + ): Promise; + + /** + * Postgres only. Drops a function + */ + public dropFunction(functionName: string, params: FunctionParam[], options?: QueryInterfaceOptions): Promise; + + /** + * Postgres only. Rename a function + */ + public renameFunction( + oldFunctionName: string, + params: FunctionParam[], + newFunctionName: string, + options?: QueryInterfaceOptions + ): Promise; + + /** + * Escape an identifier (e.g. a table or attribute name). If force is true, the identifier will be quoted + * even if the `quoteIdentifiers` option is false. + */ + public quoteIdentifier(identifier: string, force: boolean): string; + + /** + * Escape a table name + */ + public quoteTable(identifier: string): string; + + /** + * Split an identifier into .-separated tokens and quote each part. If force is true, the identifier will be + * quoted even if the `quoteIdentifiers` option is false. + */ + public quoteIdentifiers(identifiers: string, force: boolean): string; + + /** + * Escape a value (e.g. a string, number or date) + */ + public escape(value?: string | number | Date): string; + + /** + * Set option for autocommit of a transaction + */ + public setAutocommit(transaction: Transaction, value: boolean, options?: QueryOptions): Promise; + + /** + * Set the isolation level of a transaction + */ + public setIsolationLevel(transaction: Transaction, value: string, options?: QueryOptions): Promise; + + /** + * Begin a new transaction + */ + public startTransaction(transaction: Transaction, options?: QueryOptions): Promise; + + /** + * Defer constraints + */ + public deferConstraints(transaction: Transaction, options?: QueryOptions): Promise; + + /** + * Commit an already started transaction + */ + public commitTransaction(transaction: Transaction, options?: QueryOptions): Promise; + + /** + * Rollback ( revert ) a transaction that has'nt been commited + */ + public rollbackTransaction(transaction: Transaction, options?: QueryOptions): Promise; + + /** + * Creates a database + */ + public createDatabase(name: string, options?: CreateDatabaseOptions): Promise; + + /** + * Creates a database + */ + public dropDatabase(name: string, options?: QueryOptions): Promise; +} diff --git a/node_modules/sequelize/types/lib/query-types.d.ts b/node_modules/sequelize/types/lib/query-types.d.ts new file mode 100644 index 00000000..5e5d18a2 --- /dev/null +++ b/node_modules/sequelize/types/lib/query-types.d.ts @@ -0,0 +1,17 @@ +declare enum QueryTypes { + SELECT = 'SELECT', + INSERT = 'INSERT', + UPDATE = 'UPDATE', + BULKUPDATE = 'BULKUPDATE', + BULKDELETE = 'BULKDELETE', + DELETE = 'DELETE', + UPSERT = 'UPSERT', + VERSION = 'VERSION', + SHOWTABLES = 'SHOWTABLES', + SHOWINDEXES = 'SHOWINDEXES', + DESCRIBE = 'DESCRIBE', + RAW = 'RAW', + FOREIGNKEYS = 'FOREIGNKEYS', +} + +export = QueryTypes; diff --git a/node_modules/sequelize/types/lib/sequelize.d.ts b/node_modules/sequelize/types/lib/sequelize.d.ts new file mode 100644 index 00000000..f23b00a6 --- /dev/null +++ b/node_modules/sequelize/types/lib/sequelize.d.ts @@ -0,0 +1,1441 @@ +import * as DataTypes from './data-types'; +import * as Deferrable from './deferrable'; +import { HookReturn, Hooks, SequelizeHooks } from './hooks'; +import { ValidationOptions } from './instance-validator'; +import { + AndOperator, + BulkCreateOptions, + CreateOptions, + DestroyOptions, + DropOptions, + FindOptions, + InstanceDestroyOptions, + Logging, + Model, + ModelAttributeColumnOptions, + ModelAttributes, + ModelOptions, + OrOperator, + UpdateOptions, + WhereAttributeHash, + WhereOperators, +} from './model'; +import { ModelManager } from './model-manager'; +import * as Op from './operators'; +import { Promise } from './promise'; +import { QueryInterface, QueryOptions, QueryOptionsWithModel, QueryOptionsWithType } from './query-interface'; +import QueryTypes = require('./query-types'); +import { Transaction, TransactionOptions } from './transaction'; +import { Cast, Col, Fn, Json, Literal, Where } from './utils'; +// tslint:disable-next-line:no-duplicate-imports +import * as Utils from './utils'; +import { validator } from './utils/validator-extras'; +import { ConnectionManager } from './connection-manager'; + +/** + * Sync Options + */ +export interface SyncOptions extends Logging { + /** + * If force is true, each DAO will do DROP TABLE IF EXISTS ..., before it tries to create its own table + */ + force?: boolean; + + /** + * If alter is true, each DAO will do ALTER TABLE ... CHANGE ... + * Alters tables to fit models. Not recommended for production use. Deletes data in columns that were removed or had their type changed in the model. + */ + alter?: boolean; + + /** + * Match a regex against the database name before syncing, a safety check for cases where force: true is + * used in tests but not live code + */ + match?: RegExp; + + /** + * The schema that the tables should be created in. This can be overridden for each table in sequelize.define + */ + schema?: string; + + /** + * An optional parameter to specify the schema search_path (Postgres only) + */ + searchPath?: string; + + /** + * If hooks is true then beforeSync, afterSync, beforeBulkSync, afterBulkSync hooks will be called + */ + hooks?: boolean; +} + +export interface DefaultSetOptions {} + +/** + * Connection Pool options + */ +export interface PoolOptions { + /** + * Maximum number of connections in pool. Default is 5 + */ + max?: number; + + /** + * Minimum number of connections in pool. Default is 0 + */ + min?: number; + + /** + * The maximum time, in milliseconds, that a connection can be idle before being released + */ + idle?: number; + + /** + * The maximum time, in milliseconds, that pool will try to get connection before throwing error + */ + acquire?: number; + + /** + * A function that validates a connection. Called with client. The default function checks that client is an + * object, and that its state is not disconnected + */ + validate?(client?: unknown): boolean; +} + +export interface ConnectionOptions { + host?: string; + port?: string | number; + username?: string; + password?: string; + database?: string; +} + +/** + * Interface for replication Options in the sequelize constructor + */ +export interface ReplicationOptions { + read: ConnectionOptions[]; + + write: ConnectionOptions; +} + +/** + * Used to map operators to their Symbol representations + */ +export interface OperatorsAliases { + [K: string]: symbol; +} + +/** + * Final config options generated by sequelize. + */ +export interface Config { + readonly database: string; + readonly dialectModule?: object; + readonly host?: string; + readonly port?: string; + readonly username: string; + readonly password: string | null; + readonly pool?: { + readonly acquire: number; + readonly idle: number; + readonly max: number; + readonly min: number; + }; + readonly protocol: 'tcp'; + readonly native: boolean; + readonly ssl: boolean; + readonly replication: boolean; + readonly dialectModulePath: null | string; + readonly keepDefaultTimezone?: boolean; + readonly dialectOptions?: { + readonly charset?: string; + readonly timeout?: number; + }; +} + +export type Dialect = 'mysql' | 'postgres' | 'sqlite' | 'mariadb' | 'mssql' | 'mariadb'; + +export interface RetryOptions { + match?: (RegExp | string | Function)[]; + max?: number; +} + +/** + * Options for the constructor of Sequelize main class + */ +export interface Options extends Logging { + /** + * The dialect of the database you are connecting to. One of mysql, postgres, sqlite, mariadb and mssql. + * + * @default 'mysql' + */ + dialect?: Dialect; + + /** + * If specified, will use the provided module as the dialect. + * + * @example + * `dialectModule: require('@myorg/tedious'),` + */ + dialectModule?: object; + + + /** + * If specified, load the dialect library from this path. For example, if you want to use pg.js instead of + * pg when connecting to a pg database, you should specify 'pg.js' here + */ + dialectModulePath?: string; + + /** + * An object of additional options, which are passed directly to the connection library + */ + dialectOptions?: object; + + /** + * Only used by sqlite. + * + * @default ':memory:' + */ + storage?: string; + + /** + * The name of the database + */ + database?: string; + + /** + * The username which is used to authenticate against the database. + */ + username?: string; + + /** + * The password which is used to authenticate against the database. + */ + password?: string; + + /** + * The host of the relational database. + * + * @default 'localhost' + */ + host?: string; + + /** + * The port of the relational database. + */ + port?: number; + + /** + * A flag that defines if is used SSL. + */ + ssl?: boolean; + + /** + * The protocol of the relational database. + * + * @default 'tcp' + */ + protocol?: string; + + /** + * Default options for model definitions. See Model.init. + */ + define?: ModelOptions; + + /** + * Default options for sequelize.query + */ + query?: QueryOptions; + + /** + * Default options for sequelize.set + */ + set?: DefaultSetOptions; + + /** + * Default options for sequelize.sync + */ + sync?: SyncOptions; + + /** + * The timezone used when converting a date from the database into a JavaScript date. The timezone is also + * used to SET TIMEZONE when connecting to the server, to ensure that the result of NOW, CURRENT_TIMESTAMP + * and other time related functions have in the right timezone. For best cross platform performance use the + * format + * +/-HH:MM. Will also accept string versions of timezones used by moment.js (e.g. 'America/Los_Angeles'); + * this is useful to capture daylight savings time changes. + * + * @default '+00:00' + */ + timezone?: string; + + /** + * A flag that defines if null values should be passed to SQL queries or not. + * + * @default false + */ + omitNull?: boolean; + + /** + * A flag that defines if native library shall be used or not. Currently only has an effect for postgres + * + * @default false + */ + native?: boolean; + + /** + * Use read / write replication. To enable replication, pass an object, with two properties, read and write. + * Write should be an object (a single server for handling writes), and read an array of object (several + * servers to handle reads). Each read/write server can have the following properties: `host`, `port`, + * `username`, `password`, `database` + * + * @default false + */ + replication?: ReplicationOptions; + + /** + * Connection pool options + */ + pool?: PoolOptions; + + /** + * Set to `false` to make table names and attributes case-insensitive on Postgres and skip double quoting of + * them. + * + * @default true + */ + quoteIdentifiers?: boolean; + + /** + * Set the default transaction isolation level. See `Sequelize.Transaction.ISOLATION_LEVELS` for possible + * options. + * + * @default 'REPEATABLE_READ' + */ + isolationLevel?: string; + + /** + * Run built in type validators on insert and update, e.g. validate that arguments passed to integer + * fields are integer-like. + * + * @default false + */ + typeValidation?: boolean; + + /** + * Sets available operator aliases. See (http://docs.sequelizejs.com/manual/tutorial/querying.html#operators) + * for more information. Set to false to disable operator aliases completely (recommended) + * + * @default all aliases + */ + operatorsAliases?: OperatorsAliases; + + + /** + * The PostgreSQL `standard_conforming_strings` session parameter. Set to `false` to not set the option. + * WARNING: Setting this to false may expose vulnerabilities and is not recommended! + * + * @default true + */ + standardConformingStrings?: boolean; + + /** + * Sets global permanent hooks. + */ + hooks?: Partial; + + retry?: RetryOptions; +} + +export interface QueryOptionsTransactionRequired {} + +/** + * This is the main class, the entry point to sequelize. To use it, you just need to + * import sequelize: + * + * ```js + * const Sequelize = require('sequelize'); + * ``` + * + * In addition to sequelize, the connection library for the dialect you want to use + * should also be installed in your project. You don't need to import it however, as + * sequelize will take care of that. + */ +export class Sequelize extends Hooks { + + // -------------------- Utilities ------------------------------------------------------------------------ + + /** + * Creates a object representing a database function. This can be used in search queries, both in where and + * order parts, and as default values in column definitions. If you want to refer to columns in your + * function, you should use `sequelize.col`, so that the columns are properly interpreted as columns and + * not a strings. + * + * Convert a user's username to upper case + * ```js + * instance.update({ + * username: self.sequelize.fn('upper', self.sequelize.col('username')) + * }) + * ``` + * @param fn The function you want to call + * @param args All further arguments will be passed as arguments to the function + */ + public static fn: typeof fn; + + /** + * Creates a object representing a column in the DB. This is often useful in conjunction with + * `sequelize.fn`, since raw string arguments to fn will be escaped. + * + * @param col The name of the column + */ + public static col: typeof col; + + /** + * Creates a object representing a call to the cast function. + * + * @param val The value to cast + * @param type The type to cast it to + */ + public static cast: typeof cast; + + /** + * Creates a object representing a literal, i.e. something that will not be escaped. + * + * @param val + */ + public static literal: typeof literal; + + /** + * An AND query + * + * @param args Each argument will be joined by AND + */ + public static and: typeof and; + + /** + * An OR query + * + * @param args Each argument will be joined by OR + */ + public static or: typeof or; + + /** + * Creates an object representing nested where conditions for postgres's json data-type. + * + * @param conditionsOrPath A hash containing strings/numbers or other nested hash, a string using dot + * notation or a string using postgres json syntax. + * @param value An optional value to compare against. Produces a string of the form " = + * ''". + */ + public static json: typeof json; + + /** + * A way of specifying attr = condition. + * + * The attr can either be an object taken from `Model.rawAttributes` (for example `Model.rawAttributes.id` + * or + * `Model.rawAttributes.name`). The attribute should be defined in your model definition. The attribute can + * also be an object from one of the sequelize utility functions (`sequelize.fn`, `sequelize.col` etc.) + * + * For string attributes, use the regular `{ where: { attr: something }}` syntax. If you don't want your + * string to be escaped, use `sequelize.literal`. + * + * @param attr The attribute, which can be either an attribute object from `Model.rawAttributes` or a + * sequelize object, for example an instance of `sequelize.fn`. For simple string attributes, use the + * POJO syntax + * @param comparator Comparator + * @param logic The condition. Can be both a simply type, or a further condition (`.or`, `.and`, `.literal` + * etc.) + */ + public static where: typeof where; + + /** + * A hook that is run before validation + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static beforeValidate(name: string, fn: (instance: Model, options: ValidationOptions) => void): void; + public static beforeValidate(fn: (instance: Model, options: ValidationOptions) => void): void; + + /** + * A hook that is run after validation + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static afterValidate(name: string, fn: (instance: Model, options: ValidationOptions) => void): void; + public static afterValidate(fn: (instance: Model, options: ValidationOptions) => void): void; + + /** + * A hook that is run before creating a single instance + * + * @param name + * @param fn A callback function that is called with attributes, options + */ + public static beforeCreate(name: string, fn: (attributes: Model, options: CreateOptions) => void): void; + public static beforeCreate(fn: (attributes: Model, options: CreateOptions) => void): void; + + /** + * A hook that is run after creating a single instance + * + * @param name + * @param fn A callback function that is called with attributes, options + */ + public static afterCreate(name: string, fn: (attributes: Model, options: CreateOptions) => void): void; + public static afterCreate(fn: (attributes: Model, options: CreateOptions) => void): void; + + /** + * A hook that is run before destroying a single instance + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static beforeDestroy(name: string, fn: (instance: Model, options: InstanceDestroyOptions) => void): void; + public static beforeDestroy(fn: (instance: Model, options: InstanceDestroyOptions) => void): void; + + /** + * A hook that is run after destroying a single instance + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static afterDestroy(name: string, fn: (instance: Model, options: InstanceDestroyOptions) => void): void; + public static afterDestroy(fn: (instance: Model, options: InstanceDestroyOptions) => void): void; + + /** + * A hook that is run before updating a single instance + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static beforeUpdate(name: string, fn: (instance: Model, options: UpdateOptions) => void): void; + public static beforeUpdate(fn: (instance: Model, options: UpdateOptions) => void): void; + + /** + * A hook that is run after updating a single instance + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static afterUpdate(name: string, fn: (instance: Model, options: UpdateOptions) => void): void; + public static afterUpdate(fn: (instance: Model, options: UpdateOptions) => void): void; + + /** + * A hook that is run before creating or updating a single instance, It proxies `beforeCreate` and `beforeUpdate` + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static beforeSave(name: string, fn: (instance: Model, options: UpdateOptions | CreateOptions) => void): void; + public static beforeSave(fn: (instance: Model, options: UpdateOptions | CreateOptions) => void): void; + + /** + * A hook that is run after creating or updating a single instance, It proxies `afterCreate` and `afterUpdate` + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public static afterSave(name: string, fn: (instance: Model, options: UpdateOptions | CreateOptions) => void): void; + public static afterSave(fn: (instance: Model, options: UpdateOptions | CreateOptions) => void): void; + + /** + * A hook that is run before creating instances in bulk + * + * @param name + * @param fn A callback function that is called with instances, options + */ + public static beforeBulkCreate(name: string, fn: (instances: Model[], options: BulkCreateOptions) => void): void; + public static beforeBulkCreate(fn: (instances: Model[], options: BulkCreateOptions) => void): void; + + /** + * A hook that is run after creating instances in bulk + * + * @param name + * @param fn A callback function that is called with instances, options + */ + public static afterBulkCreate(name: string, fn: (instances: Model[], options: BulkCreateOptions) => void): void; + public static afterBulkCreate(fn: (instances: Model[], options: BulkCreateOptions) => void): void; + + /** + * A hook that is run before destroying instances in bulk + * + * @param name + * @param fn A callback function that is called with options + */ + public static beforeBulkDestroy(name: string, fn: (options: BulkCreateOptions) => void): void; + public static beforeBulkDestroy(fn: (options: BulkCreateOptions) => void): void; + + /** + * A hook that is run after destroying instances in bulk + * + * @param name + * @param fn A callback function that is called with options + */ + public static afterBulkDestroy(name: string, fn: (options: DestroyOptions) => void): void; + public static afterBulkDestroy(fn: (options: DestroyOptions) => void): void; + + /** + * A hook that is run after updating instances in bulk + * + * @param name + * @param fn A callback function that is called with options + */ + public static beforeBulkUpdate(name: string, fn: (options: UpdateOptions) => void): void; + public static beforeBulkUpdate(fn: (options: UpdateOptions) => void): void; + + /** + * A hook that is run after updating instances in bulk + * + * @param name + * @param fn A callback function that is called with options + */ + public static afterBulkUpdate(name: string, fn: (options: UpdateOptions) => void): void; + public static afterBulkUpdate(fn: (options: UpdateOptions) => void): void; + + /** + * A hook that is run before a find (select) query + * + * @param name + * @param fn A callback function that is called with options + */ + public static beforeFind(name: string, fn: (options: FindOptions) => void): void; + public static beforeFind(fn: (options: FindOptions) => void): void; + + /** + * A hook that is run before a connection is established + * + * @param name + * @param fn A callback function that is called with options + */ + public static beforeConnect(name: string, fn: (options: Config) => void): void; + public static beforeConnect(fn: (options: Config) => void): void; + + /** + * A hook that is run after a connection is established + * + * @param name + * @param fn A callback function that is called with options + */ + public static afterConnect(name: string, fn: (connection: unknown, options: Config) => void): void; + public static afterConnect(fn: (connection: unknown, options: Config) => void): void; + + /** + * A hook that is run before a connection is released + * + * @param name + * @param fn A callback function that is called with options + */ + public static beforeDisconnect(name: string, fn: (connection: unknown) => void): void; + public static beforeDisconnect(fn: (connection: unknown) => void): void; + + /** + * A hook that is run after a connection is released + * + * @param name + * @param fn A callback function that is called with options + */ + public static afterDisconnect(name: string, fn: (connection: unknown) => void): void; + public static afterDisconnect(fn: (connection: unknown) => void): void; + + /** + * A hook that is run before a find (select) query, after any { include: {all: ...} } options are expanded + * + * @param name + * @param fn A callback function that is called with options + */ + public static beforeFindAfterExpandIncludeAll(name: string, fn: (options: FindOptions) => void): void; + public static beforeFindAfterExpandIncludeAll(fn: (options: FindOptions) => void): void; + + /** + * A hook that is run before a find (select) query, after all option parsing is complete + * + * @param name + * @param fn A callback function that is called with options + */ + public static beforeFindAfterOptions(name: string, fn: (options: FindOptions) => void): void; + public static beforeFindAfterOptions(fn: (options: FindOptions) => void): void; + + /** + * A hook that is run after a find (select) query + * + * @param name + * @param fn A callback function that is called with instance(s), options + */ + public static afterFind( + name: string, + fn: (instancesOrInstance: Model[] | Model | null, options: FindOptions) => void + ): void; + public static afterFind( + fn: (instancesOrInstance: Model[] | Model | null, options: FindOptions) => void + ): void; + + /** + * A hook that is run before a define call + * + * @param name + * @param fn A callback function that is called with attributes, options + */ + public static beforeDefine( + name: string, + fn: (attributes: ModelAttributes, options: ModelOptions) => void + ): void; + public static beforeDefine( + fn: (attributes: ModelAttributes, options: ModelOptions) => void + ): void; + + /** + * A hook that is run after a define call + * + * @param name + * @param fn A callback function that is called with factory + */ + public static afterDefine(name: string, fn: (model: typeof Model) => void): void; + public static afterDefine(fn: (model: typeof Model) => void): void; + + /** + * A hook that is run before Sequelize() call + * + * @param name + * @param fn A callback function that is called with config, options + */ + public static beforeInit(name: string, fn: (config: Config, options: Options) => void): void; + public static beforeInit(fn: (config: Config, options: Options) => void): void; + + /** + * A hook that is run after Sequelize() call + * + * @param name + * @param fn A callback function that is called with sequelize + */ + public static afterInit(name: string, fn: (sequelize: Sequelize) => void): void; + public static afterInit(fn: (sequelize: Sequelize) => void): void; + + /** + * A hook that is run before sequelize.sync call + * @param fn A callback function that is called with options passed to sequelize.sync + */ + public static beforeBulkSync(name: string, fn: (options: SyncOptions) => HookReturn): void; + public static beforeBulkSync(fn: (options: SyncOptions) => HookReturn): void; + + /** + * A hook that is run after sequelize.sync call + * @param fn A callback function that is called with options passed to sequelize.sync + */ + public static afterBulkSync(name: string, fn: (options: SyncOptions) => HookReturn): void; + public static afterBulkSync(fn: (options: SyncOptions) => HookReturn): void; + + /** + * A hook that is run before Model.sync call + * @param fn A callback function that is called with options passed to Model.sync + */ + public static beforeSync(name: string, fn: (options: SyncOptions) => HookReturn): void; + public static beforeSync(fn: (options: SyncOptions) => HookReturn): void; + + /** + * A hook that is run after Model.sync call + * @param fn A callback function that is called with options passed to Model.sync + */ + public static afterSync(name: string, fn: (options: SyncOptions) => HookReturn): void; + public static afterSync(fn: (options: SyncOptions) => HookReturn): void; + + /** + * Use CLS with Sequelize. + * CLS namespace provided is stored as `Sequelize._cls` + * and bluebird Promise is patched to use the namespace, using `cls-bluebird` module. + * + * @param namespace + */ + public static useCLS(namespace: object): typeof Sequelize; + + /** + * A reference to Sequelize constructor from sequelize. Useful for accessing DataTypes, Errors etc. + */ + public Sequelize: typeof Sequelize; + + /** + * Final config that is used by sequelize. + */ + public readonly config: Config; + + public readonly modelManager: ModelManager; + + public readonly connectionManager: ConnectionManager; + + /** + * Dictionary of all models linked with this instance. + */ + public readonly models: { + [key: string]: typeof Model; + }; + + /** + * Instantiate sequelize with name of database, username and password + * + * #### Example usage + * + * ```javascript + * // without password and options + * const sequelize = new Sequelize('database', 'username') + * + * // without options + * const sequelize = new Sequelize('database', 'username', 'password') + * + * // without password / with blank password + * const sequelize = new Sequelize('database', 'username', null, {}) + * + * // with password and options + * const sequelize = new Sequelize('my_database', 'john', 'doe', {}) + * + * // with uri (see below) + * const sequelize = new Sequelize('mysql://localhost:3306/database', {}) + * ``` + * + * @param database The name of the database + * @param username The username which is used to authenticate against the + * database. + * @param password The password which is used to authenticate against the + * database. + * @param options An object with options. + */ + constructor(database: string, username: string, password?: string, options?: Options); + constructor(database: string, username: string, options?: Options); + constructor(options?: Options); + + /** + * Instantiate sequelize with an URI + * @param uri A full database URI + * @param options See above for possible options + */ + constructor(uri: string, options?: Options); + + /** + * A hook that is run before validation + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public beforeValidate(name: string, fn: (instance: Model, options: ValidationOptions) => void): void; + public beforeValidate(fn: (instance: Model, options: ValidationOptions) => void): void; + + /** + * A hook that is run after validation + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public afterValidate(name: string, fn: (instance: Model, options: ValidationOptions) => void): void; + public afterValidate(fn: (instance: Model, options: ValidationOptions) => void): void; + + /** + * A hook that is run before creating a single instance + * + * @param name + * @param fn A callback function that is called with attributes, options + */ + public beforeCreate(name: string, fn: (attributes: Model, options: CreateOptions) => void): void; + public beforeCreate(fn: (attributes: Model, options: CreateOptions) => void): void; + + /** + * A hook that is run after creating a single instance + * + * @param name + * @param fn A callback function that is called with attributes, options + */ + public afterCreate(name: string, fn: (attributes: Model, options: CreateOptions) => void): void; + public afterCreate(fn: (attributes: Model, options: CreateOptions) => void): void; + + /** + * A hook that is run before destroying a single instance + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public beforeDestroy(name: string, fn: (instance: Model, options: InstanceDestroyOptions) => void): void; + public beforeDestroy(fn: (instance: Model, options: InstanceDestroyOptions) => void): void; + + /** + * A hook that is run after destroying a single instance + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public afterDestroy(name: string, fn: (instance: Model, options: InstanceDestroyOptions) => void): void; + public afterDestroy(fn: (instance: Model, options: InstanceDestroyOptions) => void): void; + + /** + * A hook that is run before updating a single instance + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public beforeUpdate(name: string, fn: (instance: Model, options: UpdateOptions) => void): void; + public beforeUpdate(fn: (instance: Model, options: UpdateOptions) => void): void; + + /** + * A hook that is run after updating a single instance + * + * @param name + * @param fn A callback function that is called with instance, options + */ + public afterUpdate(name: string, fn: (instance: Model, options: UpdateOptions) => void): void; + public afterUpdate(fn: (instance: Model, options: UpdateOptions) => void): void; + + /** + * A hook that is run before creating instances in bulk + * + * @param name + * @param fn A callback function that is called with instances, options + */ + public beforeBulkCreate(name: string, fn: (instances: Model[], options: BulkCreateOptions) => void): void; + public beforeBulkCreate(fn: (instances: Model[], options: BulkCreateOptions) => void): void; + + /** + * A hook that is run after creating instances in bulk + * + * @param name + * @param fn A callback function that is called with instances, options + */ + public afterBulkCreate(name: string, fn: (instances: Model[], options: BulkCreateOptions) => void): void; + public afterBulkCreate(fn: (instances: Model[], options: BulkCreateOptions) => void): void; + + /** + * A hook that is run before destroying instances in bulk + * + * @param name + * @param fn A callback function that is called with options + */ + public beforeBulkDestroy(name: string, fn: (options: BulkCreateOptions) => void): void; + public beforeBulkDestroy(fn: (options: BulkCreateOptions) => void): void; + + /** + * A hook that is run after destroying instances in bulk + * + * @param name + * @param fn A callback function that is called with options + */ + public afterBulkDestroy(name: string, fn: (options: DestroyOptions) => void): void; + public afterBulkDestroy(fn: (options: DestroyOptions) => void): void; + + /** + * A hook that is run after updating instances in bulk + * + * @param name + * @param fn A callback function that is called with options + */ + public beforeBulkUpdate(name: string, fn: (options: UpdateOptions) => void): void; + public beforeBulkUpdate(fn: (options: UpdateOptions) => void): void; + + /** + * A hook that is run after updating instances in bulk + * + * @param name + * @param fn A callback function that is called with options + */ + public afterBulkUpdate(name: string, fn: (options: UpdateOptions) => void): void; + public afterBulkUpdate(fn: (options: UpdateOptions) => void): void; + + /** + * A hook that is run before a find (select) query + * + * @param name + * @param fn A callback function that is called with options + */ + public beforeFind(name: string, fn: (options: FindOptions) => void): void; + public beforeFind(fn: (options: FindOptions) => void): void; + + /** + * A hook that is run before a find (select) query, after any { include: {all: ...} } options are expanded + * + * @param name + * @param fn A callback function that is called with options + */ + public beforeFindAfterExpandIncludeAll(name: string, fn: (options: FindOptions) => void): void; + public beforeFindAfterExpandIncludeAll(fn: (options: FindOptions) => void): void; + + /** + * A hook that is run before a find (select) query, after all option parsing is complete + * + * @param name + * @param fn A callback function that is called with options + */ + public beforeFindAfterOptions(name: string, fn: (options: FindOptions) => void): void; + public beforeFindAfterOptions(fn: (options: FindOptions) => void): void; + + /** + * A hook that is run after a find (select) query + * + * @param name + * @param fn A callback function that is called with instance(s), options + */ + public afterFind( + name: string, + fn: (instancesOrInstance: Model[] | Model | null, options: FindOptions) => void + ): void; + public afterFind(fn: (instancesOrInstance: Model[] | Model | null, options: FindOptions) => void): void; + + /** + * A hook that is run before a define call + * + * @param name + * @param fn A callback function that is called with attributes, options + */ + public beforeDefine(name: string, fn: (attributes: ModelAttributes, options: ModelOptions) => void): void; + public beforeDefine(fn: (attributes: ModelAttributes, options: ModelOptions) => void): void; + + /** + * A hook that is run after a define call + * + * @param name + * @param fn A callback function that is called with factory + */ + public afterDefine(name: string, fn: (model: typeof Model) => void): void; + public afterDefine(fn: (model: typeof Model) => void): void; + + /** + * A hook that is run before Sequelize() call + * + * @param name + * @param fn A callback function that is called with config, options + */ + public beforeInit(name: string, fn: (config: Config, options: Options) => void): void; + public beforeInit(fn: (config: Config, options: Options) => void): void; + + /** + * A hook that is run after Sequelize() call + * + * @param name + * @param fn A callback function that is called with sequelize + */ + public afterInit(name: string, fn: (sequelize: Sequelize) => void): void; + public afterInit(fn: (sequelize: Sequelize) => void): void; + + /** + * A hook that is run before sequelize.sync call + * @param fn A callback function that is called with options passed to sequelize.sync + */ + public beforeBulkSync(name: string, fn: (options: SyncOptions) => HookReturn): void; + public beforeBulkSync(fn: (options: SyncOptions) => HookReturn): void; + + /** + * A hook that is run after sequelize.sync call + * @param fn A callback function that is called with options passed to sequelize.sync + */ + public afterBulkSync(name: string, fn: (options: SyncOptions) => HookReturn): void; + public afterBulkSync(fn: (options: SyncOptions) => HookReturn): void; + + /** + * A hook that is run before Model.sync call + * @param fn A callback function that is called with options passed to Model.sync + */ + public beforeSync(name: string, fn: (options: SyncOptions) => HookReturn): void; + public beforeSync(fn: (options: SyncOptions) => HookReturn): void; + + /** + * A hook that is run after Model.sync call + * @param fn A callback function that is called with options passed to Model.sync + */ + public afterSync(name: string, fn: (options: SyncOptions) => HookReturn): void; + public afterSync(fn: (options: SyncOptions) => HookReturn): void; + + /** + * Returns the specified dialect. + */ + public getDialect(): string; + + /** + * Returns an instance of QueryInterface. + */ + public getQueryInterface(): QueryInterface; + + /** + * Define a new model, representing a table in the DB. + * + * The table columns are defined by the hash that is given as the second argument. Each attribute of the + * hash + * represents a column. A short table definition might look like this: + * + * ```js + * class MyModel extends Model {} + * MyModel.init({ + * columnA: { + * type: Sequelize.BOOLEAN, + * validate: { + * is: ["[a-z]",'i'], // will only allow letters + * max: 23, // only allow values <= 23 + * isIn: { + * args: [['en', 'zh']], + * msg: "Must be English or Chinese" + * } + * }, + * field: 'column_a' + * // Other attributes here + * }, + * columnB: Sequelize.STRING, + * columnC: 'MY VERY OWN COLUMN TYPE' + * }, { sequelize }) + * + * sequelize.models.modelName // The model will now be available in models under the name given to define + * ``` + * + * As shown above, column definitions can be either strings, a reference to one of the datatypes that are + * predefined on the Sequelize constructor, or an object that allows you to specify both the type of the + * column, and other attributes such as default values, foreign key constraints and custom setters and + * getters. + * + * For a list of possible data types, see + * http://docs.sequelizejs.com/en/latest/docs/models-definition/#data-types + * + * For more about getters and setters, see + * http://docs.sequelizejs.com/en/latest/docs/models-definition/#getters-setters + * + * For more about instance and class methods, see + * http://docs.sequelizejs.com/en/latest/docs/models-definition/#expansion-of-models + * + * For more about validation, see + * http://docs.sequelizejs.com/en/latest/docs/models-definition/#validations + * + * @param modelName The name of the model. The model will be stored in `sequelize.models` under this name + * @param attributes An object, where each attribute is a column of the table. Each column can be either a + * DataType, a string or a type-description object, with the properties described below: + * @param options These options are merged with the default define options provided to the Sequelize + * constructor + */ + public define(modelName: string, attributes: ModelAttributes, options?: ModelOptions): typeof Model; + + /** + * Fetch a Model which is already defined + * + * @param modelName The name of a model defined with Sequelize.define + */ + public model(modelName: string): typeof Model; + + /** + * Checks whether a model with the given name is defined + * + * @param modelName The name of a model defined with Sequelize.define + */ + public isDefined(modelName: string): boolean; + + /** + * Imports a model defined in another file + * + * Imported models are cached, so multiple calls to import with the same path will not load the file + * multiple times + * + * See https://github.com/sequelize/sequelize/blob/master/examples/using-multiple-model-files/Task.js for a + * short example of how to define your models in separate files so that they can be imported by + * sequelize.import + * + * @param path The path to the file that holds the model you want to import. If the part is relative, it + * will be resolved relatively to the calling file + * + * @param defineFunction An optional function that provides model definitions. Useful if you do not + * want to use the module root as the define function + */ + public import( + path: string, + defineFunction?: (sequelize: Sequelize, dataTypes: typeof DataTypes) => T + ): T; + + /** + * Execute a query on the DB, with the posibility to bypass all the sequelize goodness. + * + * By default, the function will return two arguments: an array of results, and a metadata object, + * containing number of affected rows etc. Use `.then(([...]))` to access the results. + * + * If you are running a type of query where you don't need the metadata, for example a `SELECT` query, you + * can pass in a query type to make sequelize format the results: + * + * ```js + * sequelize.query('SELECT...').then(([results, metadata]) { + * // Raw query - use spread + * }); + * + * sequelize.query('SELECT...', { type: sequelize.QueryTypes.SELECT }).then(results => { + * // SELECT query - use then + * }) + * ``` + * + * @param sql + * @param options Query options + */ + public query(sql: string | { query: string; values: unknown[] }, options: QueryOptionsWithType): Promise<[undefined, number]>; + public query(sql: string | { query: string; values: unknown[] }, options: QueryOptionsWithType): Promise; + public query(sql: string | { query: string; values: unknown[] }, options: QueryOptionsWithType): Promise<[number, number]>; + public query(sql: string | { query: string; values: unknown[] }, options: QueryOptionsWithType): Promise; + public query(sql: string | { query: string; values: unknown[] }, options: QueryOptionsWithType): Promise; + public query(sql: string | { query: string; values: unknown[] }, options: QueryOptionsWithType): Promise; + public query(sql: string | { query: string; values: unknown[] }, options: QueryOptionsWithType): Promise; + public query(sql: string | { query: string; values: unknown[] }, options: QueryOptionsWithType): Promise<{ + [key: string]: { + type: string; + allowNull: boolean; + defaultValue: string; + primaryKey: boolean; + autoIncrement: boolean; + comment: string | null; + } + }>; + public query( + sql: string | { query: string; values: unknown[] }, + options: QueryOptionsWithModel + ): Promise; + public query(sql: string | { query: string; values: unknown[] }, options: QueryOptionsWithType): Promise; + public query(sql: string | { query: string; values: unknown[] }, options?: QueryOptions | QueryOptionsWithType): Promise; + + /** + * Get the fn for random based on the dialect + */ + public random(): Fn; + + /** + * Execute a query which would set an environment or user variable. The variables are set per connection, + * so this function needs a transaction. + * + * Only works for MySQL. + * + * @param variables object with multiple variables. + * @param options Query options. + */ + public set(variables: object, options: QueryOptionsTransactionRequired): Promise; + + /** + * Escape value. + * + * @param value Value that needs to be escaped + */ + public escape(value: string | number | Date): string; + + /** + * Create a new database schema. + * + * Note,that this is a schema in the + * [postgres sense of the word](http://www.postgresql.org/docs/9.1/static/ddl-schemas.html), + * not a database table. In mysql and sqlite, this command will do nothing. + * + * @param schema Name of the schema + * @param options Options supplied + */ + public createSchema(schema: string, options: Logging): Promise; + + /** + * Show all defined schemas + * + * Note,that this is a schema in the + * [postgres sense of the word](http://www.postgresql.org/docs/9.1/static/ddl-schemas.html), + * not a database table. In mysql and sqlite, this will show all tables. + * + * @param options Options supplied + */ + public showAllSchemas(options: Logging): Promise; + + /** + * Drop a single schema + * + * Note,that this is a schema in the + * [postgres sense of the word](http://www.postgresql.org/docs/9.1/static/ddl-schemas.html), + * not a database table. In mysql and sqlite, this drop a table matching the schema name + * + * @param schema Name of the schema + * @param options Options supplied + */ + public dropSchema(schema: string, options: Logging): Promise; + + /** + * Drop all schemas + * + * Note,that this is a schema in the + * [postgres sense of the word](http://www.postgresql.org/docs/9.1/static/ddl-schemas.html), + * not a database table. In mysql and sqlite, this is the equivalent of drop all tables. + * + * @param options Options supplied + */ + public dropAllSchemas(options: Logging): Promise; + + /** + * Sync all defined models to the DB. + * + * @param options Sync Options + */ + public sync(options?: SyncOptions): Promise; + + /** + * Truncate all tables defined through the sequelize models. This is done + * by calling Model.truncate() on each model. + * + * @param [options] The options passed to Model.destroy in addition to truncate + */ + public truncate(options?: DestroyOptions): Promise; + + /** + * Drop all tables defined through this sequelize instance. This is done by calling Model.drop on each model + * + * @param options The options passed to each call to Model.drop + */ + public drop(options?: DropOptions): Promise; + + /** + * Test the connection by trying to authenticate + * + * @param options Query Options for authentication + */ + public authenticate(options?: QueryOptions): Promise; + public validate(options?: QueryOptions): Promise; + + /** + * Start a transaction. When using transactions, you should pass the transaction in the options argument + * in order for the query to happen under that transaction + * + * ```js + * sequelize.transaction().then(t => { + * return User.findOne(..., { transaction: t}).then(user => { + * return user.update(..., { transaction: t}); + * }) + * .then(t.commit.bind(t)) + * .catch(t.rollback.bind(t)); + * }) + * ``` + * + * A syntax for automatically committing or rolling back based on the promise chain resolution is also + * supported: + * + * ```js + * sequelize.transaction(t => { // Note that we use a callback rather than a promise.then() + * return User.findOne(..., { transaction: t}).then(user => { + * return user.update(..., { transaction: t}); + * }); + * }).then(() => { + * // Commited + * }).catch(err => { + * // Rolled back + * console.error(err); + * }); + * ``` + * + * If you have [CLS](https://github.com/othiym23/node-continuation-local-storage) enabled, the transaction + * will automatically be passed to any query that runs witin the callback. To enable CLS, add it do your + * project, create a namespace and set it on the sequelize constructor: + * + * ```js + * const cls = require('continuation-local-storage'), + * ns = cls.createNamespace('....'); + * const Sequelize = require('sequelize'); + * Sequelize.cls = ns; + * ``` + * Note, that CLS is enabled for all sequelize instances, and all instances will share the same namespace + * + * @param options Transaction Options + * @param autoCallback Callback for the transaction + */ + public transaction(options: TransactionOptions, autoCallback: (t: Transaction) => PromiseLike): Promise; + public transaction(autoCallback: (t: Transaction) => PromiseLike): Promise; + public transaction(options?: TransactionOptions): Promise; + + /** + * Close all connections used by this sequelize instance, and free all references so the instance can be + * garbage collected. + * + * Normally this is done on process exit, so you only need to call this method if you are creating multiple + * instances, and want to garbage collect some of them. + */ + public close(): Promise; + + /** + * Returns the database version + */ + public databaseVersion(): Promise; +} + +// Utilities + +/** + * Creates a object representing a database function. This can be used in search queries, both in where and + * order parts, and as default values in column definitions. If you want to refer to columns in your + * function, you should use `sequelize.col`, so that the columns are properly interpreted as columns and + * not a strings. + * + * Convert a user's username to upper case + * ```js + * instance.update({ + * username: self.sequelize.fn('upper', self.sequelize.col('username')) + * }) + * ``` + * @param fn The function you want to call + * @param args All further arguments will be passed as arguments to the function + */ +export function fn(fn: string, ...args: unknown[]): Fn; + +/** + * Creates a object representing a column in the DB. This is often useful in conjunction with + * `sequelize.fn`, since raw string arguments to fn will be escaped. + * + * @param col The name of the column + */ +export function col(col: string): Col; + +/** + * Creates a object representing a call to the cast function. + * + * @param val The value to cast + * @param type The type to cast it to + */ +export function cast(val: unknown, type: string): Cast; + +/** + * Creates a object representing a literal, i.e. something that will not be escaped. + * + * @param val + */ +export function literal(val: string): Literal; + +/** + * An AND query + * + * @param args Each argument will be joined by AND + */ +export function and(...args: (WhereOperators | WhereAttributeHash | Where)[]): AndOperator; + +/** + * An OR query + * + * @param args Each argument will be joined by OR + */ +export function or(...args: (WhereOperators | WhereAttributeHash | Where)[]): OrOperator; + +/** + * Creates an object representing nested where conditions for postgres's json data-type. + * + * @param conditionsOrPath A hash containing strings/numbers or other nested hash, a string using dot + * notation or a string using postgres json syntax. + * @param value An optional value to compare against. Produces a string of the form " = + * ''". + */ +export function json(conditionsOrPath: string | object, value?: string | number | boolean): Json; + +export type AttributeType = Fn | Col | Literal | ModelAttributeColumnOptions | string; +export type LogicType = Fn | Col | Literal | OrOperator | AndOperator | WhereOperators | string; + +/** + * A way of specifying attr = condition. + * + * The attr can either be an object taken from `Model.rawAttributes` (for example `Model.rawAttributes.id` + * or + * `Model.rawAttributes.name`). The attribute should be defined in your model definition. The attribute can + * also be an object from one of the sequelize utility functions (`sequelize.fn`, `sequelize.col` etc.) + * + * For string attributes, use the regular `{ where: { attr: something }}` syntax. If you don't want your + * string to be escaped, use `sequelize.literal`. + * + * @param attr The attribute, which can be either an attribute object from `Model.rawAttributes` or a + * sequelize object, for example an instance of `sequelize.fn`. For simple string attributes, use the + * POJO syntax + * @param comparator Comparator + * @param logic The condition. Can be both a simply type, or a further condition (`.or`, `.and`, `.literal` + * etc.) + */ +export function where(attr: AttributeType, comparator: string, logic: LogicType): Where; +export function where(attr: AttributeType, logic: LogicType): Where; + +export default Sequelize; diff --git a/node_modules/sequelize/types/lib/sql-string.d.ts b/node_modules/sequelize/types/lib/sql-string.d.ts new file mode 100644 index 00000000..bf2d068a --- /dev/null +++ b/node_modules/sequelize/types/lib/sql-string.d.ts @@ -0,0 +1,5 @@ +export type Escapable = undefined | null | boolean | number | string | Date; +export function escapeId(val: string, forbidQualified?: boolean): string; +export function escape(val: Escapable | Escapable[], timeZone?: string, dialect?: string, format?: string): string; +export function format(sql: string, values: unknown[], timeZone?: string, dialect?: string): string; +export function formatNamedParameters(sql: string, values: unknown[], timeZone?: string, dialect?: string): string; diff --git a/node_modules/sequelize/types/lib/table-hints.d.ts b/node_modules/sequelize/types/lib/table-hints.d.ts new file mode 100644 index 00000000..8e5eeacd --- /dev/null +++ b/node_modules/sequelize/types/lib/table-hints.d.ts @@ -0,0 +1,19 @@ +declare enum TableHints { + NOLOCK = 'NOLOCK', + READUNCOMMITTED = 'READUNCOMMITTED', + UPDLOCK = 'UPDLOCK', + REPEATABLEREAD = 'REPEATABLEREAD', + SERIALIZABLE = 'SERIALIZABLE', + READCOMMITTED = 'READCOMMITTED', + TABLOCK = 'TABLOCK', + TABLOCKX = 'TABLOCKX', + PAGLOCK = 'PAGLOCK', + ROWLOCK = 'ROWLOCK', + NOWAIT = 'NOWAIT', + READPAST = 'READPAST', + XLOCK = 'XLOCK', + SNAPSHOT = 'SNAPSHOT', + NOEXPAND = 'NOEXPAND', +} + +export = TableHints; diff --git a/node_modules/sequelize/types/lib/transaction.d.ts b/node_modules/sequelize/types/lib/transaction.d.ts new file mode 100644 index 00000000..4b4faa09 --- /dev/null +++ b/node_modules/sequelize/types/lib/transaction.d.ts @@ -0,0 +1,138 @@ +import { Deferrable } from './deferrable'; +import { Logging } from './model'; +import { Promise } from './promise'; +import { Sequelize } from './sequelize'; + +/** + * The transaction object is used to identify a running transaction. It is created by calling + * `Sequelize.transaction()`. + * + * To run a query under a transaction, you should pass the transaction in the options object. + */ +export class Transaction { + constructor(sequelize: Sequelize, options: TransactionOptions); + + /** + * Commit the transaction + */ + public commit(): Promise; + + /** + * Rollback (abort) the transaction + */ + public rollback(): Promise; + + /** + * Adds hook that is run after a transaction is committed + */ + public afterCommit(fn: (transaction: this) => void | Promise): void; +} + +// tslint:disable-next-line no-namespace +export namespace Transaction { + /** + * Isolations levels can be set per-transaction by passing `options.isolationLevel` to `sequelize.transaction`. + * Default to `REPEATABLE_READ` but you can override the default isolation level by passing `options.isolationLevel` in `new Sequelize`. + * + * The possible isolations levels to use when starting a transaction: + * + * ```js + * { + * READ_UNCOMMITTED: "READ UNCOMMITTED", + * READ_COMMITTED: "READ COMMITTED", + * REPEATABLE_READ: "REPEATABLE READ", + * SERIALIZABLE: "SERIALIZABLE" + * } + * ``` + * + * Pass in the desired level as the first argument: + * + * ```js + * return sequelize.transaction({isolationLevel: Sequelize.Transaction.SERIALIZABLE}, transaction => { + * + * // your transactions + * + * }).then(result => { + * // transaction has been committed. Do something after the commit if required. + * }).catch(err => { + * // do something with the err. + * }); + * ``` + */ + enum ISOLATION_LEVELS { + READ_UNCOMMITTED = 'READ UNCOMMITTED', + READ_COMMITTED = 'READ COMMITTED', + REPEATABLE_READ = 'REPEATABLE READ', + SERIALIZABLE = 'SERIALIZABLE', + } + + enum TYPES { + DEFERRED = 'DEFERRED', + IMMEDIATE = 'IMMEDIATE', + EXCLUSIVE = 'EXCLUSIVE', + } + + /** + * Possible options for row locking. Used in conjunction with `find` calls: + * + * ```js + * t1 // is a transaction + * t1.LOCK.UPDATE, + * t1.LOCK.SHARE, + * t1.LOCK.KEY_SHARE, // Postgres 9.3+ only + * t1.LOCK.NO_KEY_UPDATE // Postgres 9.3+ only + * ``` + * + * Usage: + * ```js + * t1 // is a transaction + * Model.findAll({ + * where: ..., + * transaction: t1, + * lock: t1.LOCK... + * }); + * ``` + * + * Postgres also supports specific locks while eager loading by using OF: + * ```js + * UserModel.findAll({ + * where: ..., + * include: [TaskModel, ...], + * transaction: t1, + * lock: { + * level: t1.LOCK..., + * of: UserModel + * } + * }); + * ``` + * UserModel will be locked but TaskModel won't! + */ + enum LOCK { + UPDATE = 'UPDATE', + SHARE = 'SHARE', + /** + * Postgres 9.3+ only + */ + KEY_SHARE = 'KEY SHARE', + /** + * Postgres 9.3+ only + */ + NO_KEY_UPDATE = 'NO KEY UPDATE', + } +} + +/** + * Options provided when the transaction is created + */ +export interface TransactionOptions extends Logging { + autocommit?: boolean; + isolationLevel?: Transaction.ISOLATION_LEVELS; + type?: Transaction.TYPES; + deferrable?: string | Deferrable; + /** + * Parent transaction. + */ + transaction?: Transaction; +} + +export default Transaction; diff --git a/node_modules/sequelize/types/lib/utils.d.ts b/node_modules/sequelize/types/lib/utils.d.ts new file mode 100644 index 00000000..7c8169be --- /dev/null +++ b/node_modules/sequelize/types/lib/utils.d.ts @@ -0,0 +1,119 @@ +import { DataType } from './data-types'; +import { Model, WhereOptions } from './model'; + +export type Primitive = 'string' | 'number' | 'boolean'; + +export interface Inflector { + singularize(str: string): string; + pluralize(str: string): string; +} + +export function useInflection(inflection: Inflector): void; + +export function camelizeIf(string: string, condition?: boolean): string; +export function underscoredIf(string: string, condition?: boolean): string; +export function isPrimitive(val: unknown): val is Primitive; + +/** Same concept as _.merge, but don't overwrite properties that have already been assigned */ +export function mergeDefaults(a: T, b: Partial): T; +export function spliceStr(str: string, index: number, count: number, add: string): string; +export function camelize(str: string): string; +export function format(arr: string[], dialect: string): string; +export function formatNamedParameters(sql: string, parameters: { + [key: string]: string | number | boolean; +}, dialect: string): string; +export function cloneDeep(obj: T, fn?: (el: unknown) => unknown): T; + +export interface OptionsForMapping { + attributes?: string[]; + where?: WhereOptions; +} + +/** Expand and normalize finder options */ +export function mapFinderOptions(options: T, model: typeof Model): T; + +/* Used to map field names in attributes and where conditions */ +export function mapOptionFieldNames(options: T, model: typeof Model): T; + +export function mapWhereFieldNames(attributes: object, model: typeof Model): object; +/** Used to map field names in values */ +export function mapValueFieldNames(dataValues: object, fields: string[], model: typeof Model): object; + +export function isColString(value: string): boolean; +export function canTreatArrayAsAnd(arr: unknown[]): boolean; +export function combineTableNames(tableName1: string, tableName2: string): string; + +export function singularize(s: string): string; +export function pluralize(s: string): string; + +export function toDefaultValue(value: unknown): unknown; + +/** + * Determine if the default value provided exists and can be described + * in a db schema using the DEFAULT directive. + * + * @param value Any default value. + */ +export function defaultValueSchemable(hash: DataType): boolean; +export function stack(): NodeJS.CallSite[]; +export function now(dialect: string): Date; + +// Note: Use the `quoteIdentifier()` and `escape()` methods on the +// `QueryInterface` instead for more portable code. +export const TICK_CHAR: string; +export function addTicks(s: string, tickChar?: string): string; +export function removeTicks(s: string, tickChar?: string): string; + +/** + * Wraps a constructor to not need the `new` keyword using a proxy. + * Only used for data types. + */ +export function classToInvokable any>(ctor: T): T & { + (...args: ConstructorParameters): T; +} + +export class SequelizeMethod { + +} + +/* + * Utility functions for representing SQL functions, and columns that should be escaped. + * Please do not use these functions directly, use Sequelize.fn and Sequelize.col instead. + */ +export class Fn extends SequelizeMethod { + constructor(fn: string, args: unknown[]); + public clone(): this; +} + +export class Col extends SequelizeMethod { + public col: string; + constructor(col: string); +} + +export class Cast extends SequelizeMethod { + public val: unknown; + public type: string; + constructor(val: unknown, type?: string); +} + +export class Literal extends SequelizeMethod { + public val: unknown; + constructor(val: unknown); +} + +export class Json extends SequelizeMethod { + public conditions: object; + public path: string; + public value: string | number | boolean; + constructor(conditionsOrPath: string | object, value?: string | number | boolean); +} + +export class Where extends SequelizeMethod { + public attribute: object; + public comparator: string; + public logic: string | object; + constructor(attr: object, comparator: string, logic: string | object); + constructor(attr: object, logic: string | object); +} + +export { Promise } from './promise'; diff --git a/node_modules/sequelize/types/lib/utils/logger.d.ts b/node_modules/sequelize/types/lib/utils/logger.d.ts new file mode 100644 index 00000000..2ad86681 --- /dev/null +++ b/node_modules/sequelize/types/lib/utils/logger.d.ts @@ -0,0 +1,18 @@ +export interface LoggerConfig { + /** + * @default `sequelize` + */ + context?: string; + /** + * @default `true` + */ + debug?: boolean; +} + +export class Logger { + constructor(config: LoggerConfig) + public debug(message: string): void; + public warn(message: string): void; +} + +export const logger: Logger; diff --git a/node_modules/sequelize/types/lib/utils/validator-extras.d.ts b/node_modules/sequelize/types/lib/utils/validator-extras.d.ts new file mode 100644 index 00000000..a80cd139 --- /dev/null +++ b/node_modules/sequelize/types/lib/utils/validator-extras.d.ts @@ -0,0 +1,27 @@ +// tslint:disable-next-line:no-implicit-dependencies +import * as val from 'validator'; + +type OrigValidator = typeof val; + +export interface Extensions { + notEmpty(str: string): boolean; + len(str: string, min: number, max: number): boolean; + isUrl(str: string): boolean; + isIPv6(str: string): boolean; + isIPv4(str: string): boolean; + notIn(str: string, values: string[]): boolean; + regex(str: string, pattern: string, modifiers: string): boolean; + notRegex(str: string, pattern: string, modifiers: string): boolean; + min(str: string, val: number): boolean; + max(str: string, val: number): boolean; + not(str: string, pattern: string, modifiers: string): boolean; + contains(str: string, elem: string[]): boolean; + notContains(str: string, elem: string[]): boolean; + is(str: string, pattern: string, modifiers: string): boolean; +} +export const extensions: Extensions; + +export interface Validator extends OrigValidator, Extensions { + contains(str: string, elem: string[]): boolean; +} +export const validator: Validator; diff --git a/node_modules/shimmer/.travis.yml b/node_modules/shimmer/.travis.yml new file mode 100644 index 00000000..41ab0a8a --- /dev/null +++ b/node_modules/shimmer/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - "4" + - "6" + - "8" + - "9" +sudo: false diff --git a/node_modules/shimmer/LICENSE b/node_modules/shimmer/LICENSE new file mode 100644 index 00000000..a87c6555 --- /dev/null +++ b/node_modules/shimmer/LICENSE @@ -0,0 +1,25 @@ +BSD 2-Clause License + +Copyright (c) 2013-2019, Forrest L Norvell +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/shimmer/README.md b/node_modules/shimmer/README.md new file mode 100644 index 00000000..9f6e55b5 --- /dev/null +++ b/node_modules/shimmer/README.md @@ -0,0 +1,80 @@ +[![Build Status](https://travis-ci.org/othiym23/shimmer.svg)](https://travis-ci.org/othiym23/shimmer) +[![Coverage Status](https://coveralls.io/repos/othiym23/shimmer/badge.svg?branch=master)](https://coveralls.io/r/othiym23/shimmer?branch=master) + +## Safer monkeypatching for Node.js + +`shimmer` does a bunch of the work necessary to wrap other methods in +a wrapper you provide: + +```javascript +var http = require('http'); +var shimmer = require('shimmer'); + +shimmer.wrap(http, 'request', function (original) { + return function () { + console.log("Starting request!"); + var returned = original.apply(this, arguments) + console.log("Done setting up request -- OH YEAH!"); + return returned; + }; +}); +``` + +### Mandatory disclaimer + +There are times when it's necessary to monkeypatch default behavior in +JavaScript and Node. However, changing the behavior of the runtime on the fly +is rarely a good idea, and you should be using this module because you need to, +not because it seems like fun. + +### API + +All monkeypatched functions have an attribute, `__wrapped`, set to true on +them. + +#### shimmer(options) + +If you pass in an options object containing a function labeled `logger`, +`shimmer` will use it instead of the logger, which defaults to `console.error`. +`shimmer` is built to be as unobtrusive as possible and has no need to run +asynchronously, so it defaults to logging when things fail, instead of +throwing. + +#### shimmer.wrap(nodule, name, wrapper) + +`shimmer` monkeypatches in place, so it expects to be passed an object. +It accepts either instances, prototypes, or the results of calling +`require`. `name` must be the string key for the field's name on the +object. + +`wrapper` is a function that takes a single parameter, which is the original +function to be monkeypatched. `shimmer` assumes that you're adding behavior +to the original method, and not replacing it outright. If you *are* replacing +the original function, feel free to ignore the passed-in function. + +If you *aren't* discarding the original, remember these tips: + +* call the original with something like `original.apply(this, arguments)`, + unless your reason for monkeypatching is to transform the arguments. +* always capture and return the return value coming from the original function. + Today's null-returning callback is tomorrow's error-code returning callback. +* Don't make an asynchronous function synchronous and vice versa. + +#### shimmer.massWrap(nodules, names, wrapper) + +Just like `wrap`, with the addition that you can wrap multiple methods on +multiple modules. Note that this function expects the list of functions to be +monkeypatched on all of the modules to be the same. + +#### shimmer.unwrap(nodule, name) + +A convenience function for restoring the function back the way it was before +you started. Won't unwrap if somebody else has monkeypatched the function after +you (but will log in that case). Won't throw if you try to double-unwrap a +function (but will log). + +#### shimmer.massUnwrap(nodules, names) + +Just like `unwrap`, with the addition that you can unwrap multiple methods on +multiple modules. Note that this function expects the list of functions to be +unwrapped on all of the modules to be the same. \ No newline at end of file diff --git a/node_modules/shimmer/index.js b/node_modules/shimmer/index.js new file mode 100644 index 00000000..fbc38eed --- /dev/null +++ b/node_modules/shimmer/index.js @@ -0,0 +1,121 @@ +'use strict' + +function isFunction (funktion) { + return typeof funktion === 'function' +} + +// Default to complaining loudly when things don't go according to plan. +var logger = console.error.bind(console) + +// Sets a property on an object, preserving its enumerability. +// This function assumes that the property is already writable. +function defineProperty (obj, name, value) { + var enumerable = !!obj[name] && obj.propertyIsEnumerable(name) + Object.defineProperty(obj, name, { + configurable: true, + enumerable: enumerable, + writable: true, + value: value + }) +} + +// Keep initialization idempotent. +function shimmer (options) { + if (options && options.logger) { + if (!isFunction(options.logger)) logger("new logger isn't a function, not replacing") + else logger = options.logger + } +} + +function wrap (nodule, name, wrapper) { + if (!nodule || !nodule[name]) { + logger('no original function ' + name + ' to wrap') + return + } + + if (!wrapper) { + logger('no wrapper function') + logger((new Error()).stack) + return + } + + if (!isFunction(nodule[name]) || !isFunction(wrapper)) { + logger('original object and wrapper must be functions') + return + } + + var original = nodule[name] + var wrapped = wrapper(original, name) + + defineProperty(wrapped, '__original', original) + defineProperty(wrapped, '__unwrap', function () { + if (nodule[name] === wrapped) defineProperty(nodule, name, original) + }) + defineProperty(wrapped, '__wrapped', true) + + defineProperty(nodule, name, wrapped) + return wrapped +} + +function massWrap (nodules, names, wrapper) { + if (!nodules) { + logger('must provide one or more modules to patch') + logger((new Error()).stack) + return + } else if (!Array.isArray(nodules)) { + nodules = [nodules] + } + + if (!(names && Array.isArray(names))) { + logger('must provide one or more functions to wrap on modules') + return + } + + nodules.forEach(function (nodule) { + names.forEach(function (name) { + wrap(nodule, name, wrapper) + }) + }) +} + +function unwrap (nodule, name) { + if (!nodule || !nodule[name]) { + logger('no function to unwrap.') + logger((new Error()).stack) + return + } + + if (!nodule[name].__unwrap) { + logger('no original to unwrap to -- has ' + name + ' already been unwrapped?') + } else { + return nodule[name].__unwrap() + } +} + +function massUnwrap (nodules, names) { + if (!nodules) { + logger('must provide one or more modules to patch') + logger((new Error()).stack) + return + } else if (!Array.isArray(nodules)) { + nodules = [nodules] + } + + if (!(names && Array.isArray(names))) { + logger('must provide one or more functions to unwrap on modules') + return + } + + nodules.forEach(function (nodule) { + names.forEach(function (name) { + unwrap(nodule, name) + }) + }) +} + +shimmer.wrap = wrap +shimmer.massWrap = massWrap +shimmer.unwrap = unwrap +shimmer.massUnwrap = massUnwrap + +module.exports = shimmer diff --git a/node_modules/shimmer/package.json b/node_modules/shimmer/package.json new file mode 100644 index 00000000..f9d3062e --- /dev/null +++ b/node_modules/shimmer/package.json @@ -0,0 +1,28 @@ +{ + "name": "shimmer", + "version": "1.2.1", + "description": "Safe(r) monkeypatching for JavaScript.", + "main": "index.js", + "scripts": { + "test": "standard && tap test/*.tap.js --coverage" + }, + "repository": { + "type": "git", + "url": "https://github.com/othiym23/shimmer.git" + }, + "keywords": [ + "monkeypatch", + "swizzle", + "wrapping", + "danger", + "hmm", + "shim" + ], + "author": "Forrest L Norvell ", + "license": "BSD-2-Clause", + "devDependencies": { + "sinon": "^7.2.2", + "standard": "^12.0.1", + "tap": "^12.1.1" + } +} diff --git a/node_modules/shimmer/test/init.tap.js b/node_modules/shimmer/test/init.tap.js new file mode 100644 index 00000000..ff4d5f8b --- /dev/null +++ b/node_modules/shimmer/test/init.tap.js @@ -0,0 +1,48 @@ +'use strict' + +var tap = require('tap') +var test = tap.test +var sinon = require('sinon') +var shimmer = require('../index.js') + +test('shimmer initialization', function (t) { + t.plan(4) + + t.doesNotThrow(function () { shimmer() }) + + var mock = sinon.expectation + .create('logger') + .withArgs('no original function undefined to wrap') + .once() + + t.doesNotThrow(function () { + shimmer({ logger: mock }) + }, "initializer doesn't throw") + + t.doesNotThrow(function () { + shimmer.wrap() + }, "invoking the wrap method with no params doesn't throw") + + t.doesNotThrow(function () { + mock.verify() + }, 'logger method was called with the expected message') +}) + +test('shimmer initialized with non-function logger', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .withArgs("new logger isn't a function, not replacing") + .once() + + shimmer({ logger: mock }) + + t.doesNotThrow(function () { + shimmer({ logger: { ham: 'chunx' } }) + }, "even bad initialization doesn't throw") + + t.doesNotThrow(function () { + mock.verify() + }, 'logger initialization failed in the expected way') +}) diff --git a/node_modules/shimmer/test/massUnwrap.tap.js b/node_modules/shimmer/test/massUnwrap.tap.js new file mode 100644 index 00000000..200c45cd --- /dev/null +++ b/node_modules/shimmer/test/massUnwrap.tap.js @@ -0,0 +1,121 @@ +'use strict' + +var tap = require('tap') +var test = tap.test +var sinon = require('sinon') +var shimmer = require('../index.js') + +var outsider = 0 +function counter () { return ++outsider } +function anticounter () { return --outsider } + +var generator = { + inc: counter, + dec: anticounter +} + +test('should unwrap safely', function (t) { + t.plan(18) + + t.equal(counter, generator.inc, 'basic function equality testing should work') + t.equal(anticounter, generator.dec, 'basic function equality testing should work') + t.doesNotThrow(function () { generator.inc() }) + t.equal(1, outsider, 'calls have side effects') + t.doesNotThrow(function () { generator.dec() }) + t.equal(0, outsider, 'calls have side effects') + + function wrapper (original) { + return function () { + return original.apply(this, arguments) + } + } + shimmer.massWrap(generator, ['inc', 'dec'], wrapper) + + t.doesNotEqual(counter, generator.inc, 'function should be wrapped') + t.doesNotEqual(anticounter, generator.dec, 'function should be wrapped') + + t.doesNotThrow(function () { generator.inc() }) + t.equal(1, outsider, 'original function has still been called') + t.doesNotThrow(function () { generator.dec() }) + t.equal(0, outsider, 'original function has still been called') + + shimmer.massUnwrap(generator, ['inc', 'dec']) + t.equal(counter, generator.inc, 'basic function equality testing should work') + t.equal(anticounter, generator.dec, 'basic function equality testing should work') + + t.doesNotThrow(function () { generator.inc() }) + t.equal(1, outsider, 'original function has still been called') + t.doesNotThrow(function () { generator.dec() }) + t.equal(0, outsider, 'original function has still been called') +}) + +test("shouldn't throw on double unwrapping", function (t) { + t.plan(10) + + t.equal(counter, generator.inc, 'basic function equality testing should work') + t.equal(anticounter, generator.dec, 'basic function equality testing should work') + + var mock = sinon.stub() + shimmer({ logger: mock }) + + function wrapper (original) { + return function () { + return original.apply(this, arguments) + } + } + shimmer.wrap(generator, 'inc', wrapper) + shimmer.wrap(generator, 'dec', wrapper) + + t.doesNotEqual(counter, generator.inc, 'function should be wrapped') + t.doesNotEqual(anticounter, generator.dec, 'function should be wrapped') + + shimmer.massUnwrap(generator, ['inc', 'dec']) + t.equal(counter, generator.inc, 'basic function equality testing should work') + t.equal(anticounter, generator.dec, 'basic function equality testing should work') + + t.doesNotThrow(function () { shimmer.massUnwrap(generator, ['inc', 'dec']) }, + 'should double unwrap without issue') + t.equal(counter, generator.inc, 'function is unchanged after unwrapping') + t.equal(anticounter, generator.dec, 'function is unchanged after unwrapping') + + t.doesNotThrow(function () { + sinon.assert.calledWith(mock, 'no original to unwrap to -- ' + + 'has inc already been unwrapped?') + sinon.assert.calledWith(mock, 'no original to unwrap to -- ' + + 'has dec already been unwrapped?') + sinon.assert.calledTwice(mock) + }, 'logger was called with the expected message') +}) + +test('massUnwrap called with no arguments', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .twice() + shimmer({ logger: mock }) + + t.doesNotThrow(function () { shimmer.massUnwrap() }, 'should log instead of throwing') + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) + +test('massUnwrap called with module but nothing else', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .withExactArgs('must provide one or more functions to unwrap on modules') + .once() + shimmer({ logger: mock }) + + t.doesNotThrow(function () { + shimmer.massUnwrap(generator) + }, "wrapping with only 1 argument doesn't throw") + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) diff --git a/node_modules/shimmer/test/massWrap.tap.js b/node_modules/shimmer/test/massWrap.tap.js new file mode 100644 index 00000000..18ce6043 --- /dev/null +++ b/node_modules/shimmer/test/massWrap.tap.js @@ -0,0 +1,174 @@ +'use strict' + +var tap = require('tap') +var test = tap.test +var sinon = require('sinon') +var shimmer = require('../index.js') + +var outsider = 0 +function counter () { return ++outsider } +function anticounter () { return --outsider } + +var generator = { + inc: counter, + dec: anticounter +} + +var arrow = { + in: counter, + out: anticounter +} + +var nester = { + in: counter, + out: anticounter +} + +test('should wrap multiple functions safely', function (t) { + t.plan(9) + + t.equal(counter, generator.inc, 'basic function equality testing should work') + t.equal(anticounter, generator.dec, 'basic function equality testing should work') + t.doesNotThrow(function () { generator.inc() }) + t.doesNotThrow(function () { generator.dec() }) + t.equal(0, outsider, 'calls have side effects') + + var count = 0 + function wrapper (original) { + return function () { + count++ + var returned = original.apply(this, arguments) + count++ + return returned + } + } + shimmer.massWrap(generator, ['inc', 'dec'], wrapper) + + t.doesNotThrow(function () { generator.inc() }) + t.doesNotThrow(function () { generator.dec() }) + t.equal(4, count, 'both pre and post increments should have happened') + t.equal(0, outsider, 'original function has still been called') +}) + +test('should wrap multiple functions on multiple modules safely', function (t) { + t.plan(15) + + t.equal(counter, arrow.in, 'basic function equality testing should work') + t.equal(counter, nester.in, 'basic function equality testing should work') + t.equal(anticounter, arrow.out, 'basic function equality testing should work') + t.equal(anticounter, nester.out, 'basic function equality testing should work') + + t.doesNotThrow(function () { arrow.in() }) + t.doesNotThrow(function () { nester.in() }) + t.doesNotThrow(function () { arrow.out() }) + t.doesNotThrow(function () { nester.out() }) + + t.equal(0, outsider, 'calls have side effects') + + var count = 0 + function wrapper (original) { + return function () { + count++ + var returned = original.apply(this, arguments) + count++ + return returned + } + } + shimmer.massWrap([arrow, nester], ['in', 'out'], wrapper) + + t.doesNotThrow(function () { arrow.in() }) + t.doesNotThrow(function () { arrow.out() }) + t.doesNotThrow(function () { nester.in() }) + t.doesNotThrow(function () { nester.out() }) + + t.equal(8, count, 'both pre and post increments should have happened') + t.equal(0, outsider, 'original function has still been called') +}) + +test('wrap called with no arguments', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .twice() + shimmer({ logger: mock }) + + t.doesNotThrow(function () { + shimmer.massWrap() + }, "wrapping with no arguments doesn't throw") + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) + +test('wrap called with module but nothing else', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .withExactArgs('must provide one or more functions to wrap on modules') + .once() + shimmer({ logger: mock }) + + t.doesNotThrow(function () { + shimmer.massWrap(generator) + }, "wrapping with only 1 argument doesn't throw") + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) + +test('wrap called with original but no wrapper', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .twice() + shimmer({ logger: mock }) + + t.doesNotThrow(function () { + shimmer.massWrap(generator, ['inc']) + }, "wrapping with only original function doesn't throw") + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) + +test('wrap called with non-function original', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .withExactArgs('must provide one or more functions to wrap on modules') + .once() + shimmer({ logger: mock }) + + t.doesNotThrow(function () { + shimmer.massWrap({ orange: 'slices' }, 'orange', function () {}) + }, "wrapping non-function original doesn't throw") + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) + +test('wrap called with non-function wrapper', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .withArgs('must provide one or more functions to wrap on modules') + .once() + shimmer({ logger: mock }) + + t.doesNotThrow(function () { + shimmer.massWrap({ orange: function () {} }, 'orange', 'hamchunx') + }, "wrapping with non-function wrapper doesn't throw") + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) diff --git a/node_modules/shimmer/test/unwrap.tap.js b/node_modules/shimmer/test/unwrap.tap.js new file mode 100644 index 00000000..1ed52fa2 --- /dev/null +++ b/node_modules/shimmer/test/unwrap.tap.js @@ -0,0 +1,101 @@ +'use strict' + +var tap = require('tap') +var test = tap.test +var sinon = require('sinon') +var shimmer = require('../index.js') + +var outsider = 0 +function counter () { return ++outsider } + +var generator = { + inc: counter +} + +test('should unwrap safely', function (t) { + t.plan(9) + + t.equal(counter, generator.inc, 'basic function equality testing should work') + t.doesNotThrow(function () { generator.inc() }) + t.equal(1, outsider, 'calls have side effects') + + function wrapper (original) { + return function () { + return original.apply(this, arguments) + } + } + shimmer.wrap(generator, 'inc', wrapper) + + t.doesNotEqual(counter, generator.inc, 'function should be wrapped') + + t.doesNotThrow(function () { generator.inc() }) + t.equal(2, outsider, 'original function has still been called') + + shimmer.unwrap(generator, 'inc') + t.equal(counter, generator.inc, 'basic function equality testing should work') + t.doesNotThrow(function () { generator.inc() }) + t.equal(3, outsider, 'original function has still been called') +}) + +test("shouldn't throw on double unwrapping", function (t) { + t.plan(6) + + t.equal(counter, generator.inc, 'basic function equality testing should work') + + var mock = sinon.expectation + .create('logger') + .withArgs('no original to unwrap to -- ' + + 'has inc already been unwrapped?') + .once() + shimmer({ logger: mock }) + + function wrapper (original) { + return function () { + return original.apply(this, arguments) + } + } + shimmer.wrap(generator, 'inc', wrapper) + + t.doesNotEqual(counter, generator.inc, 'function should be wrapped') + + shimmer.unwrap(generator, 'inc') + t.equal(counter, generator.inc, 'basic function equality testing should work') + + t.doesNotThrow(function () { shimmer.unwrap(generator, 'inc') }, + 'should double unwrap without issue') + t.equal(counter, generator.inc, 'function is unchanged after unwrapping') + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) + +test('unwrap called with no arguments', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .twice() + shimmer({ logger: mock }) + + t.doesNotThrow(function () { shimmer.unwrap() }, 'should log instead of throwing') + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) + +test('unwrap called with module but no name', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .twice() + shimmer({ logger: mock }) + + t.doesNotThrow(function () { shimmer.unwrap({}) }, 'should log instead of throwing') + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) diff --git a/node_modules/shimmer/test/wrap.tap.js b/node_modules/shimmer/test/wrap.tap.js new file mode 100644 index 00000000..6a4b664a --- /dev/null +++ b/node_modules/shimmer/test/wrap.tap.js @@ -0,0 +1,148 @@ +'use strict' + +var tap = require('tap') +var test = tap.test +var sinon = require('sinon') +var shimmer = require('../index.js') + +var outsider = 0 +function counter () { return ++outsider } +function anticounter () { return --outsider } + +var generator = { + inc: counter +} +Object.defineProperty(generator, 'dec', { + value: anticounter, + writable: true, + configurable: true, + enumerable: false +}) + +test('should wrap safely', function (t) { + t.plan(12) + + t.equal(counter, generator.inc, 'method is mapped to function') + t.doesNotThrow(function () { generator.inc() }, 'original function works') + t.equal(1, outsider, 'calls have side effects') + + var count = 0 + function wrapper (original, name) { + t.equal(name, 'inc') + return function () { + count++ + var returned = original.apply(this, arguments) + count++ + return returned + } + } + shimmer.wrap(generator, 'inc', wrapper) + + t.ok(generator.inc.__wrapped, "function tells us it's wrapped") + t.equal(generator.inc.__original, counter, 'original function is available') + t.doesNotThrow(function () { generator.inc() }, 'wrapping works') + t.equal(2, count, 'both pre and post increments should have happened') + t.equal(2, outsider, 'original function has still been called') + t.ok(generator.propertyIsEnumerable('inc'), + 'wrapped enumerable property is still enumerable') + t.equal(Object.keys(generator.inc).length, 0, + 'wrapped object has no additional properties') + + shimmer.wrap(generator, 'dec', function (original) { + return function () { + return original.apply(this, arguments) + } + }) + + t.ok(!generator.propertyIsEnumerable('dec'), + 'wrapped unenumerable property is still unenumerable') +}) + +test('wrap called with no arguments', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .withExactArgs('no original function undefined to wrap') + .once() + shimmer({ logger: mock }) + + t.doesNotThrow(function () { + shimmer.wrap() + }, "wrapping with no arguments doesn't throw") + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) + +test('wrap called with module but nothing else', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .withExactArgs('no original function undefined to wrap') + .once() + shimmer({ logger: mock }) + + t.doesNotThrow(function () { + shimmer.wrap(generator) + }, "wrapping with only 1 argument doesn't throw") + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) + +test('wrap called with original but no wrapper', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .twice() + shimmer({ logger: mock }) + + t.doesNotThrow(function () { + shimmer.wrap(generator, 'inc') + }, "wrapping with only original method doesn't throw") + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) + +test('wrap called with non-function original', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .withExactArgs('original object and wrapper must be functions') + .once() + shimmer({ logger: mock }) + + t.doesNotThrow(function () { + shimmer.wrap({ orange: 'slices' }, 'orange', function () {}) + }, "wrapping non-function original doesn't throw") + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) + +test('wrap called with non-function wrapper', function (t) { + t.plan(2) + + var mock = sinon.expectation + .create('logger') + .withArgs('original object and wrapper must be functions') + .once() + shimmer({ logger: mock }) + + t.doesNotThrow(function () { + shimmer.wrap({ orange: function () {} }, 'orange', 'hamchunx') + }, "wrapping with non-function wrapper doesn't throw") + + t.doesNotThrow(function () { + mock.verify() + }, 'logger was called with the expected message') +}) diff --git a/node_modules/sigmund/LICENSE b/node_modules/sigmund/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/node_modules/sigmund/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/sigmund/README.md b/node_modules/sigmund/README.md new file mode 100644 index 00000000..25a38a53 --- /dev/null +++ b/node_modules/sigmund/README.md @@ -0,0 +1,53 @@ +# sigmund + +Quick and dirty signatures for Objects. + +This is like a much faster `deepEquals` comparison, which returns a +string key suitable for caches and the like. + +## Usage + +```javascript +function doSomething (someObj) { + var key = sigmund(someObj, maxDepth) // max depth defaults to 10 + var cached = cache.get(key) + if (cached) return cached + + var result = expensiveCalculation(someObj) + cache.set(key, result) + return result +} +``` + +The resulting key will be as unique and reproducible as calling +`JSON.stringify` or `util.inspect` on the object, but is much faster. +In order to achieve this speed, some differences are glossed over. +For example, the object `{0:'foo'}` will be treated identically to the +array `['foo']`. + +Also, just as there is no way to summon the soul from the scribblings +of a cocaine-addled psychoanalyst, there is no way to revive the object +from the signature string that sigmund gives you. In fact, it's +barely even readable. + +As with `util.inspect` and `JSON.stringify`, larger objects will +produce larger signature strings. + +Because sigmund is a bit less strict than the more thorough +alternatives, the strings will be shorter, and also there is a +slightly higher chance for collisions. For example, these objects +have the same signature: + + var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} + var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} + +Like a good Freudian, sigmund is most effective when you already have +some understanding of what you're looking for. It can help you help +yourself, but you must be willing to do some work as well. + +Cycles are handled, and cyclical objects are silently omitted (though +the key is included in the signature output.) + +The second argument is the maximum depth, which defaults to 10, +because that is the maximum object traversal depth covered by most +insurance carriers. diff --git a/node_modules/sigmund/bench.js b/node_modules/sigmund/bench.js new file mode 100644 index 00000000..5acfd6d9 --- /dev/null +++ b/node_modules/sigmund/bench.js @@ -0,0 +1,283 @@ +// different ways to id objects +// use a req/res pair, since it's crazy deep and cyclical + +// sparseFE10 and sigmund are usually pretty close, which is to be expected, +// since they are essentially the same algorithm, except that sigmund handles +// regular expression objects properly. + + +var http = require('http') +var util = require('util') +var sigmund = require('./sigmund.js') +var sreq, sres, creq, cres, test + +http.createServer(function (q, s) { + sreq = q + sres = s + sres.end('ok') + this.close(function () { setTimeout(function () { + start() + }, 200) }) +}).listen(1337, function () { + creq = http.get({ port: 1337 }) + creq.on('response', function (s) { cres = s }) +}) + +function start () { + test = [sreq, sres, creq, cres] + // test = sreq + // sreq.sres = sres + // sreq.creq = creq + // sreq.cres = cres + + for (var i in exports.compare) { + console.log(i) + var hash = exports.compare[i]() + console.log(hash) + console.log(hash.length) + console.log('') + } + + require('bench').runMain() +} + +function customWs (obj, md, d) { + d = d || 0 + var to = typeof obj + if (to === 'undefined' || to === 'function' || to === null) return '' + if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '') + + if (Array.isArray(obj)) { + return obj.map(function (i, _, __) { + return customWs(i, md, d + 1) + }).reduce(function (a, b) { return a + b }, '') + } + + var keys = Object.keys(obj) + return keys.map(function (k, _, __) { + return k + ':' + customWs(obj[k], md, d + 1) + }).reduce(function (a, b) { return a + b }, '') +} + +function custom (obj, md, d) { + d = d || 0 + var to = typeof obj + if (to === 'undefined' || to === 'function' || to === null) return '' + if (d > md || !obj || to !== 'object') return '' + obj + + if (Array.isArray(obj)) { + return obj.map(function (i, _, __) { + return custom(i, md, d + 1) + }).reduce(function (a, b) { return a + b }, '') + } + + var keys = Object.keys(obj) + return keys.map(function (k, _, __) { + return k + ':' + custom(obj[k], md, d + 1) + }).reduce(function (a, b) { return a + b }, '') +} + +function sparseFE2 (obj, maxDepth) { + var seen = [] + var soFar = '' + function ch (v, depth) { + if (depth > maxDepth) return + if (typeof v === 'function' || typeof v === 'undefined') return + if (typeof v !== 'object' || !v) { + soFar += v + return + } + if (seen.indexOf(v) !== -1 || depth === maxDepth) return + seen.push(v) + soFar += '{' + Object.keys(v).forEach(function (k, _, __) { + // pseudo-private values. skip those. + if (k.charAt(0) === '_') return + var to = typeof v[k] + if (to === 'function' || to === 'undefined') return + soFar += k + ':' + ch(v[k], depth + 1) + }) + soFar += '}' + } + ch(obj, 0) + return soFar +} + +function sparseFE (obj, maxDepth) { + var seen = [] + var soFar = '' + function ch (v, depth) { + if (depth > maxDepth) return + if (typeof v === 'function' || typeof v === 'undefined') return + if (typeof v !== 'object' || !v) { + soFar += v + return + } + if (seen.indexOf(v) !== -1 || depth === maxDepth) return + seen.push(v) + soFar += '{' + Object.keys(v).forEach(function (k, _, __) { + // pseudo-private values. skip those. + if (k.charAt(0) === '_') return + var to = typeof v[k] + if (to === 'function' || to === 'undefined') return + soFar += k + ch(v[k], depth + 1) + }) + } + ch(obj, 0) + return soFar +} + +function sparse (obj, maxDepth) { + var seen = [] + var soFar = '' + function ch (v, depth) { + if (depth > maxDepth) return + if (typeof v === 'function' || typeof v === 'undefined') return + if (typeof v !== 'object' || !v) { + soFar += v + return + } + if (seen.indexOf(v) !== -1 || depth === maxDepth) return + seen.push(v) + soFar += '{' + for (var k in v) { + // pseudo-private values. skip those. + if (k.charAt(0) === '_') continue + var to = typeof v[k] + if (to === 'function' || to === 'undefined') continue + soFar += k + ch(v[k], depth + 1) + } + } + ch(obj, 0) + return soFar +} + +function noCommas (obj, maxDepth) { + var seen = [] + var soFar = '' + function ch (v, depth) { + if (depth > maxDepth) return + if (typeof v === 'function' || typeof v === 'undefined') return + if (typeof v !== 'object' || !v) { + soFar += v + return + } + if (seen.indexOf(v) !== -1 || depth === maxDepth) return + seen.push(v) + soFar += '{' + for (var k in v) { + // pseudo-private values. skip those. + if (k.charAt(0) === '_') continue + var to = typeof v[k] + if (to === 'function' || to === 'undefined') continue + soFar += k + ':' + ch(v[k], depth + 1) + } + soFar += '}' + } + ch(obj, 0) + return soFar +} + + +function flatten (obj, maxDepth) { + var seen = [] + var soFar = '' + function ch (v, depth) { + if (depth > maxDepth) return + if (typeof v === 'function' || typeof v === 'undefined') return + if (typeof v !== 'object' || !v) { + soFar += v + return + } + if (seen.indexOf(v) !== -1 || depth === maxDepth) return + seen.push(v) + soFar += '{' + for (var k in v) { + // pseudo-private values. skip those. + if (k.charAt(0) === '_') continue + var to = typeof v[k] + if (to === 'function' || to === 'undefined') continue + soFar += k + ':' + ch(v[k], depth + 1) + soFar += ',' + } + soFar += '}' + } + ch(obj, 0) + return soFar +} + +exports.compare = +{ + // 'custom 2': function () { + // return custom(test, 2, 0) + // }, + // 'customWs 2': function () { + // return customWs(test, 2, 0) + // }, + 'JSON.stringify (guarded)': function () { + var seen = [] + return JSON.stringify(test, function (k, v) { + if (typeof v !== 'object' || !v) return v + if (seen.indexOf(v) !== -1) return undefined + seen.push(v) + return v + }) + }, + + 'flatten 10': function () { + return flatten(test, 10) + }, + + // 'flattenFE 10': function () { + // return flattenFE(test, 10) + // }, + + 'noCommas 10': function () { + return noCommas(test, 10) + }, + + 'sparse 10': function () { + return sparse(test, 10) + }, + + 'sparseFE 10': function () { + return sparseFE(test, 10) + }, + + 'sparseFE2 10': function () { + return sparseFE2(test, 10) + }, + + sigmund: function() { + return sigmund(test, 10) + }, + + + // 'util.inspect 1': function () { + // return util.inspect(test, false, 1, false) + // }, + // 'util.inspect undefined': function () { + // util.inspect(test) + // }, + // 'util.inspect 2': function () { + // util.inspect(test, false, 2, false) + // }, + // 'util.inspect 3': function () { + // util.inspect(test, false, 3, false) + // }, + // 'util.inspect 4': function () { + // util.inspect(test, false, 4, false) + // }, + // 'util.inspect Infinity': function () { + // util.inspect(test, false, Infinity, false) + // } +} + +/** results +**/ diff --git a/node_modules/sigmund/package.json b/node_modules/sigmund/package.json new file mode 100644 index 00000000..d69a8e26 --- /dev/null +++ b/node_modules/sigmund/package.json @@ -0,0 +1,30 @@ +{ + "name": "sigmund", + "version": "1.0.1", + "description": "Quick and dirty signatures for Objects.", + "main": "sigmund.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "~0.3.0" + }, + "scripts": { + "test": "tap test/*.js", + "bench": "node bench.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/sigmund" + }, + "keywords": [ + "object", + "signature", + "key", + "data", + "psychoanalysis" + ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC" +} diff --git a/node_modules/sigmund/sigmund.js b/node_modules/sigmund/sigmund.js new file mode 100644 index 00000000..82c7ab8c --- /dev/null +++ b/node_modules/sigmund/sigmund.js @@ -0,0 +1,39 @@ +module.exports = sigmund +function sigmund (subject, maxSessions) { + maxSessions = maxSessions || 10; + var notes = []; + var analysis = ''; + var RE = RegExp; + + function psychoAnalyze (subject, session) { + if (session > maxSessions) return; + + if (typeof subject === 'function' || + typeof subject === 'undefined') { + return; + } + + if (typeof subject !== 'object' || !subject || + (subject instanceof RE)) { + analysis += subject; + return; + } + + if (notes.indexOf(subject) !== -1 || session === maxSessions) return; + + notes.push(subject); + analysis += '{'; + Object.keys(subject).forEach(function (issue, _, __) { + // pseudo-private values. skip those. + if (issue.charAt(0) === '_') return; + var to = typeof subject[issue]; + if (to === 'function' || to === 'undefined') return; + analysis += issue; + psychoAnalyze(subject[issue], session + 1); + }); + } + psychoAnalyze(subject, 0); + return analysis; +} + +// vim: set softtabstop=4 shiftwidth=4: diff --git a/node_modules/sigmund/test/basic.js b/node_modules/sigmund/test/basic.js new file mode 100644 index 00000000..50c53a13 --- /dev/null +++ b/node_modules/sigmund/test/basic.js @@ -0,0 +1,24 @@ +var test = require('tap').test +var sigmund = require('../sigmund.js') + + +// occasionally there are duplicates +// that's an acceptable edge-case. JSON.stringify and util.inspect +// have some collision potential as well, though less, and collision +// detection is expensive. +var hash = '{abc/def/g{0h1i2{jkl' +var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} +var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} + +var obj3 = JSON.parse(JSON.stringify(obj1)) +obj3.c = /def/ +obj3.g[2].cycle = obj3 +var cycleHash = '{abc/def/g{0h1i2{jklcycle' + +test('basic', function (t) { + t.equal(sigmund(obj1), hash) + t.equal(sigmund(obj2), hash) + t.equal(sigmund(obj3), cycleHash) + t.end() +}) + diff --git a/node_modules/inquirer/node_modules/strip-ansi/index.d.ts b/node_modules/strip-ansi/index.d.ts similarity index 100% rename from node_modules/inquirer/node_modules/strip-ansi/index.d.ts rename to node_modules/strip-ansi/index.d.ts diff --git a/node_modules/strip-ansi/index.js b/node_modules/strip-ansi/index.js index 099480fb..9788c96d 100644 --- a/node_modules/strip-ansi/index.js +++ b/node_modules/strip-ansi/index.js @@ -1,6 +1,7 @@ 'use strict'; -var ansiRegex = require('ansi-regex')(); +const ansiRegex = require('ansi-regex'); -module.exports = function (str) { - return typeof str === 'string' ? str.replace(ansiRegex, '') : str; -}; +const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; + +module.exports = stripAnsi; +module.exports.default = stripAnsi; diff --git a/node_modules/strip-ansi/license b/node_modules/strip-ansi/license index 654d0bfe..e7af2f77 100644 --- a/node_modules/strip-ansi/license +++ b/node_modules/strip-ansi/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +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: +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 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. diff --git a/node_modules/inquirer/node_modules/ansi-regex/index.js b/node_modules/strip-ansi/node_modules/ansi-regex/index.js similarity index 100% rename from node_modules/inquirer/node_modules/ansi-regex/index.js rename to node_modules/strip-ansi/node_modules/ansi-regex/index.js diff --git a/node_modules/inquirer/node_modules/strip-ansi/license b/node_modules/strip-ansi/node_modules/ansi-regex/license similarity index 100% rename from node_modules/inquirer/node_modules/strip-ansi/license rename to node_modules/strip-ansi/node_modules/ansi-regex/license diff --git a/node_modules/inquirer/node_modules/ansi-regex/package.json b/node_modules/strip-ansi/node_modules/ansi-regex/package.json similarity index 100% rename from node_modules/inquirer/node_modules/ansi-regex/package.json rename to node_modules/strip-ansi/node_modules/ansi-regex/package.json diff --git a/node_modules/inquirer/node_modules/ansi-regex/readme.md b/node_modules/strip-ansi/node_modules/ansi-regex/readme.md similarity index 100% rename from node_modules/inquirer/node_modules/ansi-regex/readme.md rename to node_modules/strip-ansi/node_modules/ansi-regex/readme.md diff --git a/node_modules/strip-ansi/package.json b/node_modules/strip-ansi/package.json index 301685ba..7494fd7e 100644 --- a/node_modules/strip-ansi/package.json +++ b/node_modules/strip-ansi/package.json @@ -1,57 +1,54 @@ { - "name": "strip-ansi", - "version": "3.0.1", - "description": "Strip ANSI escape codes", - "license": "MIT", - "repository": "chalk/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "maintainers": [ - "Sindre Sorhus (sindresorhus.com)", - "Joshua Boy Nicolai Appelman (jbna.nl)", - "JD Ballard (github.com/qix-)" - ], - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - } + "name": "strip-ansi", + "version": "5.2.0", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd-check" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "devDependencies": { + "ava": "^1.3.1", + "tsd-check": "^0.5.0", + "xo": "^0.24.0" + } } diff --git a/node_modules/strip-ansi/readme.md b/node_modules/strip-ansi/readme.md index cb7d9ff7..8681fe8a 100644 --- a/node_modules/strip-ansi/readme.md +++ b/node_modules/strip-ansi/readme.md @@ -1,33 +1,61 @@ # strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) -> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string +--- + +
+ + Get professional support for 'strip-ansi' 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 --save strip-ansi +$ npm install strip-ansi ``` ## Usage ```js -var stripAnsi = require('strip-ansi'); +const stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' -stripAnsi('\u001b[4mcake\u001b[0m'); -//=> 'cake' +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' ``` +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + ## Related - [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module - [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes - [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT diff --git a/node_modules/table/node_modules/ansi-regex/index.js b/node_modules/table/node_modules/ansi-regex/index.js deleted file mode 100644 index c2544800..00000000 --- a/node_modules/table/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -module.exports = options => { - options = Object.assign({ - onlyFirst: false - }, options); - - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, options.onlyFirst ? undefined : 'g'); -}; diff --git a/node_modules/table/node_modules/ansi-regex/package.json b/node_modules/table/node_modules/ansi-regex/package.json deleted file mode 100644 index a849fdf5..00000000 --- a/node_modules/table/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "ansi-regex", - "version": "4.1.0", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "xo && ava", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "^0.25.0", - "xo": "^0.23.0" - } -} diff --git a/node_modules/table/node_modules/ansi-regex/readme.md b/node_modules/table/node_modules/ansi-regex/readme.md deleted file mode 100644 index d19c4466..00000000 --- a/node_modules/table/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,87 +0,0 @@ -# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) - -> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) - ---- - -
- - 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. -
-
- ---- - - -## Install - -``` -$ npm install ansi-regex -``` - - -## Usage - -```js -const ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` - - -## API - -### ansiRegex([options]) - -Returns a regex for matching ANSI escape codes. - -#### options - -##### onlyFirst - -Type: `boolean`
-Default: `false` *(Matches any ANSI escape codes in a string)* - -Match only the first ANSI escape. - - -## FAQ - -### Why do you test for codes not in the ECMA 48 standard? - -Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. - -On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/table/node_modules/strip-ansi/index.d.ts b/node_modules/table/node_modules/strip-ansi/index.d.ts deleted file mode 100644 index 44e954d0..00000000 --- a/node_modules/table/node_modules/strip-ansi/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** -Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. - -@example -``` -import stripAnsi from 'strip-ansi'; - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` -*/ -export default function stripAnsi(string: string): string; diff --git a/node_modules/table/node_modules/strip-ansi/index.js b/node_modules/table/node_modules/strip-ansi/index.js deleted file mode 100644 index 9788c96d..00000000 --- a/node_modules/table/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; - -module.exports = stripAnsi; -module.exports.default = stripAnsi; diff --git a/node_modules/table/node_modules/strip-ansi/readme.md b/node_modules/table/node_modules/strip-ansi/readme.md deleted file mode 100644 index 8681fe8a..00000000 --- a/node_modules/table/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,61 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) - -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string - ---- - -
- - Get professional support for 'strip-ansi' 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 strip-ansi -``` - - -## Usage - -```js -const stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/timers-ext/.editorconfig b/node_modules/timers-ext/.editorconfig new file mode 100644 index 00000000..c24a6cd1 --- /dev/null +++ b/node_modules/timers-ext/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = tab + +[{*.json,*.yml}] +indent_style = space +indent_size = 2 diff --git a/node_modules/timers-ext/CHANGELOG.md b/node_modules/timers-ext/CHANGELOG.md new file mode 100644 index 00000000..8522ceb9 --- /dev/null +++ b/node_modules/timers-ext/CHANGELOG.md @@ -0,0 +1,55 @@ +# Change Log + +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. + + +## [0.1.7](https://github.com/medikoo/timers-ext/compare/v0.1.6...v0.1.7) (2018-10-04) + + +### Bug Fixes + +* typo in error message ([36720cf](https://github.com/medikoo/timers-ext/commit/36720cf)) + + + + +## [0.1.6](https://github.com/medikoo/timers-ext/compare/v0.1.5...v0.1.6) (2018-10-04) + + +### Features + +* report timeout value on error ([abb4afa](https://github.com/medikoo/timers-ext/commit/abb4afa)) + + + + +## [0.1.5](https://github.com/medikoo/timers-ext/compare/v0.1.4...v0.1.5) (2018-03-13) + + +### Features + +* **promise:** sleep util ([c50d575](https://github.com/medikoo/timers-ext/commit/c50d575)) + + + + +## [0.1.4](https://github.com/medikoo/timers-ext/compare/v0.1.3...v0.1.4) (2018-03-08) + + +### Bug Fixes + +* **promise:** clear timeout on promise resolution ([6301a6b](https://github.com/medikoo/timers-ext/commit/6301a6b)) + + + + + +## [0.1.3](https://github.com/medikoo/timers-ext/compare/v0.1.2...v0.1.3) (2018-03-07) + +### Features + +* **promise:** promise.timeout method ([3f52d27](https://github.com/medikoo/timers-ext/commit/3f52d27)) + +## Changelog for previous versions + +See `CHANGES` file diff --git a/node_modules/timers-ext/CHANGES b/node_modules/timers-ext/CHANGES new file mode 100644 index 00000000..28781d49 --- /dev/null +++ b/node_modules/timers-ext/CHANGES @@ -0,0 +1,26 @@ +For recent changelog see CHANGELOG.md + +----- + + +v0.1.2 -- 2017.04.03 +* `throttle` util + +v0.1.1 -- 2017.03.15 +* Workaround IE8 resolution issue +* Support any callable objects as callbacks +* Improve documentation +* Fix spelling of LICENSE +* Configure lint scripts +* Update dependencies + +v0.1.0 -- 2014.04.27 +First production ready version +- Depend strictly on npm hosted package versions +- Full documentation +- Add `once` (moved from next-tick project) +- Make timeout value optional in delay +- Rename MAX_VALUE into MAX_TIMEOUT + +v0.0.0 -- 2013.08.27 +Initial (dev) version diff --git a/node_modules/timers-ext/LICENSE b/node_modules/timers-ext/LICENSE new file mode 100644 index 00000000..923b7f65 --- /dev/null +++ b/node_modules/timers-ext/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2013-2018, Mariusz Nowak, @medikoo, medikoo.com + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/timers-ext/README.md b/node_modules/timers-ext/README.md new file mode 100644 index 00000000..5a438d40 --- /dev/null +++ b/node_modules/timers-ext/README.md @@ -0,0 +1,69 @@ +[![Build status][nix-build-image]][nix-build-url] +[![Windows status][win-build-image]][win-build-url] +![Transpilation status][transpilation-image] +[![npm version][npm-image]][npm-url] + +# timers-ext + +## Timers extensions + +### Installation + + $ npm install timers-ext + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### API + +#### MAX*TIMEOUT *(timers-ext/max-timeout)\_ + +Maximum possible timeout value in milliseconds. It equals to maximum positive value for 32bit signed integer, so _2³¹ (2147483647)_, which makes it around 24.9 days + +#### delay(fn[, timeout]) _(timers-ext/delay)_ + +Returns function which when invoked will call _fn_ function after specified +_timeout_. If _timeout_ is not provided [nextTick](https://github.com/medikoo/next-tick/#next-tick) propagation is used. + +#### once(fn[, timeout]) _(timers-ext/once)_ + +Makes sure to execute _fn_ function only once after a defined interval of time (debounce). If _timeout_ is not provided [nextTick](https://github.com/medikoo/next-tick/#next-tick) propagation is used. + +```javascript +var nextTick = require("next-tick"); +var logFoo = function() { + console.log("foo"); +}; +var logFooOnce = require("timers-ext/once")(logFoo); + +logFooOnce(); +logFooOnce(); // ignored, logFoo will be logged only once +logFooOnce(); // ignored + +nextTick(function() { + logFooOnce(); // Invokes another log (as tick passed) + logFooOnce(); // ignored + logFooOnce(); // ignored +}); +``` + +#### validTimeout(timeout) _(timers-ext/valid-timeout)_ + +Validates timeout value. +For `NaN` resolved _timeout_ `0` is returned. +If _timeout_ resolves to a number: + +- for _timeout < 0_ `0` is returned +- for _0 >= timeout <= [MAX_TIMEOUT](#max_timeout-timers-extmax-timeout)_, `timeout` value is returned +- for _timeout > [MAX_TIMEOUT](#max_timeout-timers-extmax-timeout)_ exception is thrown + +### Tests + + $ npm test + +[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/timers-ext/branches/master/shields_badge.svg +[nix-build-url]: https://semaphoreci.com/medikoo-org/timers-ext +[win-build-image]: https://ci.appveyor.com/api/projects/status/2i5nerowov2ho3o9?svg=true +[win-build-url]: https://ci.appveyor.com/project/medikoo/timers-ext +[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg +[npm-image]: https://img.shields.io/npm/v/timers-ext.svg +[npm-url]: https://www.npmjs.com/package/timers-ext diff --git a/node_modules/timers-ext/delay.js b/node_modules/timers-ext/delay.js new file mode 100644 index 00000000..187a5d79 --- /dev/null +++ b/node_modules/timers-ext/delay.js @@ -0,0 +1,21 @@ +"use strict"; + +var callable = require("es5-ext/object/valid-callable") + , nextTick = require("next-tick") + , validTimeout = require("./valid-timeout"); + +var apply = Function.prototype.apply; + +module.exports = function (fn/*, timeout*/) { + var delay, timeout = arguments[1]; + callable(fn); + if (timeout === undefined) { + delay = nextTick; + } else { + timeout = validTimeout(timeout); + delay = setTimeout; + } + return function () { + return delay(apply.bind(fn, this, arguments), timeout); + }; +}; diff --git a/node_modules/timers-ext/max-timeout.js b/node_modules/timers-ext/max-timeout.js new file mode 100644 index 00000000..399dab2c --- /dev/null +++ b/node_modules/timers-ext/max-timeout.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = 2147483647; diff --git a/node_modules/timers-ext/once.js b/node_modules/timers-ext/once.js new file mode 100644 index 00000000..1e1decca --- /dev/null +++ b/node_modules/timers-ext/once.js @@ -0,0 +1,42 @@ +// It's actually "debounce" + +"use strict"; + +var isValue = require("es5-ext/object/is-value") + , callable = require("es5-ext/object/valid-callable") + , nextTick = require("next-tick") + , validTimeout = require("./valid-timeout"); + +var apply = Function.prototype.apply; + +module.exports = function (fn/*, timeout*/) { + var scheduled, run, context, args, delay, timeout = arguments[1], handle; + callable(fn); + if (isValue(timeout)) { + timeout = validTimeout(timeout); + delay = setTimeout; + } else { + delay = nextTick; + } + run = function () { + if (!scheduled) return; // IE8 tends to not clear immediate timeouts properly + scheduled = false; + handle = null; + apply.call(fn, context, args); + context = null; + args = null; + }; + return function () { + if (scheduled) { + if (!isValue(handle)) { + // 'nextTick' based, no room for debounce + return; + } + clearTimeout(handle); + } + scheduled = true; + context = this; + args = arguments; + handle = delay(run, timeout); + }; +}; diff --git a/node_modules/timers-ext/package.json b/node_modules/timers-ext/package.json new file mode 100644 index 00000000..f7cf9c47 --- /dev/null +++ b/node_modules/timers-ext/package.json @@ -0,0 +1,42 @@ +{ + "name": "timers-ext", + "version": "0.1.7", + "description": "Timers extensions", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "repository": { + "type": "git", + "url": "git://github.com/medikoo/timers-ext.git" + }, + "keywords": [ + "timeout", + "delay", + "interval", + "time", + "timer", + "timers" + ], + "dependencies": { + "es5-ext": "~0.10.46", + "next-tick": "1" + }, + "devDependencies": { + "eslint": "^5.6.1", + "eslint-config-medikoo-es5": "^1.7.2", + "tad": "^0.2.8" + }, + "eslintConfig": { + "extends": "medikoo-es5", + "root": true, + "globals": { + "clearInterval": true, + "clearTimeout": true, + "setInterval": true, + "setTimeout": true + } + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "test": "node node_modules/tad/bin/tad" + }, + "license": "ISC" +} diff --git a/node_modules/timers-ext/promise/.eslintrc.json b/node_modules/timers-ext/promise/.eslintrc.json new file mode 100644 index 00000000..95a62429 --- /dev/null +++ b/node_modules/timers-ext/promise/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "globals": { "Promise": true } +} diff --git a/node_modules/timers-ext/promise/sleep.js b/node_modules/timers-ext/promise/sleep.js new file mode 100644 index 00000000..5e5c07a5 --- /dev/null +++ b/node_modules/timers-ext/promise/sleep.js @@ -0,0 +1,21 @@ +"use strict"; + +var isValue = require("es5-ext/object/is-value") + , isPromise = require("es5-ext/object/is-promise") + , nextTick = require("next-tick") + , ensureTimeout = require("../valid-timeout"); + +module.exports = function (/* timeout */) { + var Constructor = isPromise(this) ? this.constructor : Promise; + var timeout = arguments[0]; + if (isValue(timeout)) timeout = ensureTimeout(timeout); + return new Constructor(function (resolve) { + if (isValue(timeout)) { + setTimeout(function () { + resolve(); + }, timeout); + } else { + nextTick(resolve); + } + }); +}; diff --git a/node_modules/timers-ext/promise_/timeout.js b/node_modules/timers-ext/promise_/timeout.js new file mode 100644 index 00000000..cf1a5368 --- /dev/null +++ b/node_modules/timers-ext/promise_/timeout.js @@ -0,0 +1,43 @@ +"use strict"; + +var customError = require("es5-ext/error/custom") + , isValue = require("es5-ext/object/is-value") + , ensurePromise = require("es5-ext/object/ensure-promise") + , nextTick = require("next-tick") + , ensureTimeout = require("../valid-timeout"); + +module.exports = function (/* timeout */) { + ensurePromise(this); + var timeout = arguments[0]; + if (isValue(timeout)) timeout = ensureTimeout(timeout); + return new this.constructor( + function (resolve, reject) { + var isSettled = false, timeoutId; + var timeoutCallback = function () { + if (isSettled) return; + reject( + customError( + "Operation timeout (exceeded " + + (isValue(timeout) ? timeout + "ms" : "tick") + + ")", + "PROMISE_TIMEOUT" + ) + ); + }; + if (isValue(timeout)) timeoutId = setTimeout(timeoutCallback, timeout); + else nextTick(timeoutCallback); + this.then( + function (value) { + isSettled = true; + clearTimeout(timeoutId); + resolve(value); + }, + function (reason) { + isSettled = true; + clearTimeout(timeoutId); + reject(reason); + } + ); + }.bind(this) + ); +}; diff --git a/node_modules/timers-ext/test/.eslintrc.json b/node_modules/timers-ext/test/.eslintrc.json new file mode 100644 index 00000000..78875946 --- /dev/null +++ b/node_modules/timers-ext/test/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + "id-length": "off", + "no-shadow": "off" + } +} diff --git a/node_modules/timers-ext/test/delay.js b/node_modules/timers-ext/test/delay.js new file mode 100644 index 00000000..01f00c19 --- /dev/null +++ b/node_modules/timers-ext/test/delay.js @@ -0,0 +1,27 @@ +"use strict"; + +module.exports = function (t, a, d) { + var data + , count = 0 + , x = function (a, b, c) { + data = [this, a, b, c, ++count]; + } + , y = t(x, 200) + , z = {}; + + a(data, undefined, "Setup"); + y.call(z, 111, "foo", false); + a(data, undefined, "Immediately"); + setTimeout(function () { + a(data, undefined, "100ms"); + setTimeout(function () { + a.deep(data, [z, 111, "foo", false, 1], "250ms"); + data = null; + clearTimeout(y()); + setTimeout(function () { + a(data, null, "Clear"); + d(); + }, 300); + }, 150); + }, 100); +}; diff --git a/node_modules/timers-ext/test/max-timeout.js b/node_modules/timers-ext/test/max-timeout.js new file mode 100644 index 00000000..c0e7997a --- /dev/null +++ b/node_modules/timers-ext/test/max-timeout.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function (t, a, d) { + var invoked, id; + id = setTimeout(function () { + invoked = true; +}, t); + setTimeout(function () { + a(invoked, undefined); + clearTimeout(id); + d(); + }, 100); +}; diff --git a/node_modules/timers-ext/test/once.js b/node_modules/timers-ext/test/once.js new file mode 100644 index 00000000..afdbbf8b --- /dev/null +++ b/node_modules/timers-ext/test/once.js @@ -0,0 +1,42 @@ +"use strict"; + +module.exports = function (t, a, d) { + var called = 0, fn = t(function () { + ++called; +}); + + fn(); + fn(); + fn(); + setTimeout(function () { + a(called, 1); + + called = 0; + fn = t(function () { + ++called; +}, 50); + fn(); + fn(); + fn(); + + setTimeout(function () { + fn(); + fn(); + + setTimeout(function () { + fn(); + fn(); + + setTimeout(function () { + fn(); + fn(); + + setTimeout(function () { + a(called, 1); + d(); + }, 70); + }, 30); + }, 30); + }, 30); + }, 10); +}; diff --git a/node_modules/timers-ext/test/promise/sleep.js b/node_modules/timers-ext/test/promise/sleep.js new file mode 100644 index 00000000..1c7e796c --- /dev/null +++ b/node_modules/timers-ext/test/promise/sleep.js @@ -0,0 +1,34 @@ +"use strict"; + +var delay = require("../../delay"); + +module.exports = function (t, a) { + if (typeof Promise !== "function") return null; + return { + Tick: function (d) { + var isInvoked = false; + t().then(function (result) { + isInvoked = true; + delay(function () { + a(result, undefined); + d(); + })(); + }, delay(d)); + a(isInvoked, false); + }, + Timeout: function (d) { + var isInvoked = false; + t(100).then( + delay(function (result) { + isInvoked = true; + a(result, undefined); + d(); + }), + delay(d) + ); + setTimeout(function () { + a(isInvoked, false); + }, 50); + } + }; +}; diff --git a/node_modules/timers-ext/test/promise_/.eslintrc.json b/node_modules/timers-ext/test/promise_/.eslintrc.json new file mode 100644 index 00000000..95a62429 --- /dev/null +++ b/node_modules/timers-ext/test/promise_/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "globals": { "Promise": true } +} diff --git a/node_modules/timers-ext/test/promise_/timeout.js b/node_modules/timers-ext/test/promise_/timeout.js new file mode 100644 index 00000000..fd4333c7 --- /dev/null +++ b/node_modules/timers-ext/test/promise_/timeout.js @@ -0,0 +1,46 @@ +"use strict"; + +var delay = require("../../delay"); + +module.exports = function (t, a) { + if (typeof Promise !== "function") return null; + return { + Success: function (d) { + var promise = t.call( + new Promise(function (resolve) { + setTimeout(function () { resolve("foo"); }, 20); + }), + 40 + ); + + promise.then( + // Delay to escape error swallowing + delay(function (result) { + a(result, "foo"); + d(); + }), + delay(d) + ); + }, + Timeout: function (d) { + var promise = t.call( + new Promise(function (resolve) { + setTimeout(function () { resolve("foo"); }, 40); + }), + 20 + ); + + promise.then( + // Delay to escape error swallowing + delay(function () { + a.never(); + d(); + }), + delay(function (err) { + a(err.code, "PROMISE_TIMEOUT"); + d(); + }) + ); + } + }; +}; diff --git a/node_modules/timers-ext/test/throttle.js b/node_modules/timers-ext/test/throttle.js new file mode 100644 index 00000000..7a4f65f0 --- /dev/null +++ b/node_modules/timers-ext/test/throttle.js @@ -0,0 +1,41 @@ +"use strict"; + +module.exports = function (t, a, d) { + var called = 0; + var fn = t(function () { + ++called; + }, 200); + + fn(); + a(called, 1); + fn(); + fn(); + a(called, 1); + // Wait 120ms + setTimeout(function () { + a(called, 1); + fn(); + // Wait 120ms + setTimeout(function () { + a(called, 2); + fn(); + fn(); + + // Wait 80ms + setTimeout(function () { + a(called, 2); + + // Wait 120ms + setTimeout(function () { + a(called, 3); + + // Wait 400ms + setTimeout(function () { + a(called, 3); + d(); + }, 400); + }, 120); + }, 80); + }, 120); + }, 120); +}; diff --git a/node_modules/timers-ext/test/valid-timeout.js b/node_modules/timers-ext/test/valid-timeout.js new file mode 100644 index 00000000..01df6c97 --- /dev/null +++ b/node_modules/timers-ext/test/valid-timeout.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (t, a) { + a(t(NaN), 0, "NaN"); + a(t(-343), 0, "Negative"); + a(t(232342), 232342, "Positive"); + a.throws(function () { + t(1e23); +}, TypeError, "Too large"); +}; diff --git a/node_modules/timers-ext/throttle.js b/node_modules/timers-ext/throttle.js new file mode 100644 index 00000000..16a18dad --- /dev/null +++ b/node_modules/timers-ext/throttle.js @@ -0,0 +1,33 @@ +"use strict"; + +var callable = require("es5-ext/object/valid-callable") + , validTimeout = require("./valid-timeout") + + , apply = Function.prototype.apply; + +module.exports = function (fn, timeout) { + var isScheduled = false, context, args, run; + callable(fn); + timeout = validTimeout(timeout); + run = function () { + var currentContext = context, currentArgs = args; + if (!args) { + isScheduled = false; + return; + } + context = null; + args = null; + setTimeout(run, timeout); + apply.call(fn, currentContext, currentArgs); + }; + return function () { + if (isScheduled) { + context = this; + args = arguments; + return; + } + isScheduled = true; + setTimeout(run, timeout); + apply.call(fn, this, arguments); + }; +}; diff --git a/node_modules/timers-ext/valid-timeout.js b/node_modules/timers-ext/valid-timeout.js new file mode 100644 index 00000000..8b7d0071 --- /dev/null +++ b/node_modules/timers-ext/valid-timeout.js @@ -0,0 +1,10 @@ +"use strict"; + +var toPosInt = require("es5-ext/number/to-pos-integer") + , maxTimeout = require("./max-timeout"); + +module.exports = function (value) { + value = toPosInt(value); + if (value > maxTimeout) throw new TypeError(value + " exceeds maximum possible timeout"); + return value; +}; diff --git a/node_modules/toposort-class/.eslintrc b/node_modules/toposort-class/.eslintrc new file mode 100644 index 00000000..e36568aa --- /dev/null +++ b/node_modules/toposort-class/.eslintrc @@ -0,0 +1,35 @@ +{ + "parser": "babel-eslint", + "env": { + "node": true, + "mocha": true, + "browser": true + }, + "rules": { + "strict": 0, //taken care of automatically by babel + "no-mixed-spaces-and-tabs": 2, + "eqeqeq": 2, + "no-eq-null": 2, + "consistent-this": 2, + "guard-for-in": 2, + "no-caller": 2, + "no-underscore-dangle": 2, + "curly": 2, + "no-multi-spaces": 2, + "key-spacing": 0, + "no-return-assign": 2, + "consistent-return": 2, + "no-shadow": 2, + "comma-dangle": 2, + "no-use-before-define": 2, + "no-empty": 2, + "new-parens": 2, + "no-cond-assign": 2, + "no-fallthrough": 2, + "new-cap": 2, + "no-loop-func": 2, + "no-unreachable": 2, + "no-process-exit": 2, + "quotes": [2, "double", "avoid-escape"] + } +} diff --git a/node_modules/toposort-class/.gitattributes b/node_modules/toposort-class/.gitattributes new file mode 100644 index 00000000..44b4224b --- /dev/null +++ b/node_modules/toposort-class/.gitattributes @@ -0,0 +1 @@ +* eol=lf \ No newline at end of file diff --git a/node_modules/toposort-class/.npmignore b/node_modules/toposort-class/.npmignore new file mode 100644 index 00000000..e64c1846 --- /dev/null +++ b/node_modules/toposort-class/.npmignore @@ -0,0 +1,44 @@ +# Development stuff +test/ +Gruntfile.js + +# Configuration files +.jscsrc +.jshintrc +.travis.yml +bower.json + +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# Deployed apps should consider commenting this line out: +# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git +node_modules + +# JetBrains exclusion +.idea + +# Source files +src + +# example files +examples diff --git a/node_modules/toposort-class/LICENSE b/node_modules/toposort-class/LICENSE new file mode 100644 index 00000000..aa93e0ff --- /dev/null +++ b/node_modules/toposort-class/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Gustavo Henke and Aaron Trent + +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/toposort-class/README.md b/node_modules/toposort-class/README.md new file mode 100644 index 00000000..427691af --- /dev/null +++ b/node_modules/toposort-class/README.md @@ -0,0 +1,93 @@ +# Toposort +[![Build Status](http://img.shields.io/travis/gustavohenke/toposort.svg?branch=master&style=flat)](https://travis-ci.org/gustavohenke/toposort) +[![Dependency Status](http://img.shields.io/gemnasium/gustavohenke/toposort.png?style=flat)](https://gemnasium.com/gustavohenke/toposort) + +__Sorting directed acyclic graphs, for Node.js, io.js and the browser__ +_This was originally done by Marcel Klehr. [Why not checkout his original repo?](https://github.com/marcelklehr/toposort)_ + +## Installation +There are a few ways for installing Toposort. Here are them: + +* Via NPM: `npm install toposort-class` +* Via Bower: `bower install toposort` +* Via Git: `git clone git://github.com/gustavohenke/toposort.git` +* [Direct download](https://raw.githubusercontent.com/gustavohenke/toposort/master/build/toposort.js) ([Minified](https://raw.githubusercontent.com/gustavohenke/toposort/master/build/toposort.min.js)) for use in the browser + +## Example +Let's say you have the following dependency graph: + +* Plugin depends on Backbone and jQuery UI Button; +* Backbone depends on jQuery and Underscore; +* jQuery UI Button depends on jQuery UI Core and jQuery UI Widget; +* jQuery UI Widget and jQuery UI Core depend on jQuery; +* jQuery and Underscore don't depend on anyone. + +Now, how would you sort this in a way that each asset will be correctly placed? You'll probably need the following sorting: + +* `jQuery`, `jQuery UI Core`, `jQuery UI Widget`, `jQuery UI Button`, `Underscore`, `Backbone`, `Plugin` + +You can achieve it with the following code, using `toposort-class`: +```javascript +var Toposort = require('toposort-class'), + t = new Toposort(); + +t.add("jquery-ui-core", "jquery") + .add("jquery-ui-widget", "jquery") + .add("jquery-ui-button", ["jquery-ui-core", "jquery-ui-widget"]) + .add("plugin", ["backbone", "jquery-ui-button"]) + .add("backbone", ["underscore", "jquery"]); + +console.log(t.sort().reverse()); + +/* Will output: + * ['jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-button', 'underscore', 'backbone', 'plugin'] + * + * And you're done. + */ +``` + +## Usage +CommonJS (Node.js and io.js): +```javascript +var Toposort = require('toposort-class'), + t = new Toposort(); +``` + +Browser with AMD: +```javascript +define("myModule", ["Toposort"], function(Toposort) { + var t = new Toposort(); +}); +``` + +Browser without AMD: +```javascript +var t = new window.Toposort(); +``` + +or whatever global object there is instead of `window`. + +## API + +#### `.add(item, deps)` +* _{String}_ `item` - The name of the dependent item that is being added +* _{Array|String}_ `deps` - A dependency or list of dependencies of `item` + +__Returns:__ _{Toposort}_ The Toposort instance, for chaining. + +#### `.sort()` +__Returns:__ _{Array}_ The list of dependencies topologically sorted. + +This method will check for cyclic dependencies, like "A is dependent of A". + +#### `.clear()` +__Returns:__ _{Toposort}_ The Toposort instance, for chaining. + +Clears all edges, effectively resetting the instance. + +#### `.Toposort` + +Reference to the Toposort constructor. + +## Legal +MIT License diff --git a/node_modules/toposort-class/benchmark/0.3.1/toposort.js b/node_modules/toposort-class/benchmark/0.3.1/toposort.js new file mode 100644 index 00000000..92fcb65e --- /dev/null +++ b/node_modules/toposort-class/benchmark/0.3.1/toposort.js @@ -0,0 +1,128 @@ +!function() { + "use strict"; + + /** + * Topological sort class. + * Original by Marcel Klehr, contributed by Gustavo Henke. + * + * @class + * @since 0.1.0 + * @see https://github.com/marcelklehr/toposort + * @author Marcel Klehr + * + * @see https://github.com/gustavohenke/toposort + * @author Gustavo Henke + */ + function Toposort() { + var self = this; + var edges = []; + + /** + * Adds dependency edges. + * + * @since 0.1.0 + * @param {String} item An dependent name. Must be an string and not empty + * @param {String[]|String} [deps] An dependency or array of dependencies + * @returns {Toposort} The Toposort instance + */ + self.add = function( item, deps ) { + if( typeof item !== "string" || !item ) { + throw new TypeError( "Dependent name must be given as a not empty string" ); + } + + deps = Array.isArray( deps ) ? deps.slice() : [deps]; + if( deps.length ) { + deps.forEach( function( dep ) { + if( typeof dep !== "string" || !dep ) { + throw new TypeError( + "Dependency name must be given as a not empty string" + ); + } + + edges.push( [item, dep] ); + } ); + } else { + edges.push( [item] ); + } + + return self; + }; + + /** + * Runs the toposorting and return an ordered array of strings + * + * @since 0.1.0 + * @returns {String[]} The list of items topologically sorted. + */ + self.sort = function() { + var nodes = []; + var sorted = []; + + edges.forEach( function( edge ) { + edge.forEach( function( n ) { + if( nodes.indexOf( n ) === -1 ) { + nodes.push( n ); + } + } ); + } ); + + function visit( node, predecessors, i ) { + var index, predsCopy; + predecessors = predecessors || []; + + if( predecessors.indexOf( node ) > -1 ) { + throw new Error( + "Cyclic dependency found. '" + node + "' is dependent of itself.\n" + + "Dependency Chain: " + predecessors.join( " -> " ) + " => " + node + ); + } + + index = nodes.indexOf( node ); + if( index === -1 ) { + return i; + } + + nodes.splice( index, 1 ); + if( predecessors.length === 0 ) { + i--; + } + + predsCopy = predecessors.slice(); + predsCopy.push( node ); + + edges.filter( function( e ) { + return e[0] === node; + } ).forEach( function( e ) { + i = visit( e[1], predsCopy, i ); + } ); + + sorted.unshift( node ); + return i; + } + + for( var i = 0; i < nodes.length; i++ ) { + i = visit( nodes[i], null, i ); + } + + return sorted; + }; + + } + + if( typeof module === "object" && module && typeof module.exports === "object" ) { + // Expose toposort to CommonJS loaders (aka Node) + module.exports = exports.Toposort = Toposort; + } else { + // Expose toposort to AMD loaders (aka Require.js) + if( typeof define === "function" && define.amd ) { + define( function() { + return Toposort; + } ); + } + + // Expose toposort as a browser global + if( typeof window === "object" ) { + window.Toposort = Toposort; + } + } +}(); diff --git a/node_modules/toposort-class/benchmark/README.md b/node_modules/toposort-class/benchmark/README.md new file mode 100644 index 00000000..362f6306 --- /dev/null +++ b/node_modules/toposort-class/benchmark/README.md @@ -0,0 +1,11 @@ +Benchmarks +========== + +Since I'm obsessed with performance, here is a tiny benchmark comparing the performance of the 0.3.1 version and the current version written in ES6 + +| Description | Library | Op/s | % | +|------------------------------|-----------------|-----------:|-----:| +| simple dependency chains | 0.3.1 version | 66,722.22 | 8% | +| | current version | 837,416.60 | 100% | +| slightly more complex chains | 0.3.1 version | 24,530.85 | 6% | +| | current version | 386,620.50 | 100% | diff --git a/node_modules/toposort-class/benchmark/general.js b/node_modules/toposort-class/benchmark/general.js new file mode 100644 index 00000000..fc99c836 --- /dev/null +++ b/node_modules/toposort-class/benchmark/general.js @@ -0,0 +1,56 @@ +var Toposort = require( "../index.js" ); +var OldToposort = require( "./0.3.1/toposort.js" ); + +suite( "simple dependency chains", function() { + set( "delay", 0 ); + set( "mintime", 1750 ); + + bench( "0.3.1 version", function() { + var t = new OldToposort(); + + t.add( "3", "2" ) + .add( "2", "1" ) + .add( "6", "5" ) + .add( "5", ["2", "4"] ).sort(); + } ); + + bench( "current version", function() { + var t = new Toposort(); + + t.add( "3", "2" ) + .add( "2", "1" ) + .add( "6", "5" ) + .add( "5", ["2", "4"] ).sort(); + } ); +} ); + +suite( "slightly more complex chains", function() { + set( "delay", 0 ); + set( "mintime", 1750 ); + + bench( "0.3.1 version", function() { + var t = new OldToposort(); + + t.add( "3", "1" ) + .add( "2", "3" ) + .add( "4", ["2", "3"] ) + .add( "5", ["3", "4"] ) + .add( "6", ["3", "4", "5"] ) + .add( "7", "1" ) + .add( "8", ["1", "2", "3", "4", "5"] ) + .add( "9", ["8", "6", "7"] ).sort(); + } ); + + bench( "current version", function() { + var t = new Toposort(); + + t.add( "3", "1" ) + .add( "2", "3" ) + .add( "4", ["2", "3"] ) + .add( "5", ["3", "4"] ) + .add( "6", ["3", "4", "5"] ) + .add( "7", "1" ) + .add( "8", ["1", "2", "3", "4", "5"] ) + .add( "9", ["8", "6", "7"] ).sort(); + } ); +} ); diff --git a/node_modules/toposort-class/benchmark/results.csv b/node_modules/toposort-class/benchmark/results.csv new file mode 100644 index 00000000..88f6e230 --- /dev/null +++ b/node_modules/toposort-class/benchmark/results.csv @@ -0,0 +1,4 @@ +2015-07-31 22:37:51,"simple dependency chains","0.3.1 version",2295.217390,153142 +2015-07-31 22:37:51,"simple dependency chains","current version",3299.024625,2762658 +2015-07-31 22:37:51,"slightly more complex chains","0.3.1 version",3313.337523,81279 +2015-07-31 22:37:51,"slightly more complex chains","current version",1797.512029,694955 diff --git a/node_modules/toposort-class/build/toposort.js b/node_modules/toposort-class/build/toposort.js new file mode 100644 index 00000000..616fee67 --- /dev/null +++ b/node_modules/toposort-class/build/toposort.js @@ -0,0 +1,281 @@ +/**** + * The MIT License (MIT) + * + * Copyright (c) 2015 Gustavo Henke and Aaron Trent + * + * 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. + * + ****/ +(function( global, factory ) { + if( typeof define === "function" && define.amd ) { + define( "Toposort", ["exports", "module"], factory ); + } else if( typeof exports !== "undefined" && typeof module !== "undefined" ) { + factory( exports, module ); + } else { + var mod = { + exports: {} + }; + factory( mod.exports, mod ); + global.Toposort = mod.exports; + } +})( this, function( exports, module ) { + "use strict"; + + function _classCallCheck( instance, Constructor ) { + if( !(instance instanceof Constructor) ) { + throw new TypeError( "Cannot call a class as a function" ); + } + } + + var Toposort = (function() { + function Toposort() { + _classCallCheck( this, Toposort ); + + this.edges = []; + this.Toposort = Toposort; + } + + /** + * Adds dependency edges. + * + * @since 0.1.0 + * @param {String} item An dependent name. Must be an string and not empty + * @param {String[]|String} [deps] An dependency or array of dependencies + * @returns {Toposort} The Toposort instance + */ + + Toposort.prototype.add = function add( item, deps ) { + if( typeof item !== "string" || !item ) { + throw new TypeError( "Dependent name must be given as a not empty string" ); + } + + deps = Array.isArray( deps ) ? deps : [deps]; + + if( deps.length > 0 ) { + for( var _iterator = deps, _isArray = Array.isArray( _iterator ), _i = 0, _iterator = _isArray ? + _iterator : + _iterator[Symbol.iterator](); ; ) { + var _ref; + + if( _isArray ) { + if( _i >= _iterator.length ) { + break; + } + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if( _i.done ) { + break; + } + _ref = _i.value; + } + + var dep = _ref; + + if( typeof dep !== "string" || !dep ) { + throw new TypeError( "Dependency name must be given as a not empty string" ); + } + + this.edges.push( [item, dep] ); + } + } else { + this.edges.push( [item] ); + } + + return this; + }; + + /** + * Runs the toposorting and return an ordered array of strings + * + * @since 0.1.0 + * @returns {String[]} The list of items topologically sorted. + */ + + Toposort.prototype.sort = function sort() { + var _this = this; + + var nodes = []; + + //accumulate unique nodes into a large list + for( var _iterator2 = this.edges, _isArray2 = Array.isArray( _iterator2 ), _i2 = 0, _iterator2 = _isArray2 ? + _iterator2 : + _iterator2[Symbol.iterator](); ; ) { + var _ref2; + + if( _isArray2 ) { + if( _i2 >= _iterator2.length ) { + break; + } + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if( _i2.done ) { + break; + } + _ref2 = _i2.value; + } + + var edge = _ref2; + + for( var _iterator3 = edge, _isArray3 = Array.isArray( _iterator3 ), _i3 = 0, _iterator3 = _isArray3 ? + _iterator3 : + _iterator3[Symbol.iterator](); ; ) { + var _ref3; + + if( _isArray3 ) { + if( _i3 >= _iterator3.length ) { + break; + } + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if( _i3.done ) { + break; + } + _ref3 = _i3.value; + } + + var node = _ref3; + + if( nodes.indexOf( node ) === -1 ) { + nodes.push( node ); + } + } + } + + //initialize the placement of nodes into the sorted array at the end + var place = nodes.length; + + //initialize the sorted array with the same length as the unique nodes array + var sorted = new Array( nodes.length ); + + //define a visitor function that recursively traverses dependencies. + var visit = function visit( node, predecessors ) { + //check if a node is dependent of itself + if( predecessors.length !== 0 && predecessors.indexOf( node ) !== -1 ) { + throw new Error( "Cyclic dependency found. " + node + " is dependent of itself.\nDependency chain: " + + predecessors.join( " -> " ) + " => " + node ); + } + + var index = nodes.indexOf( node ); + + //if the node still exists, traverse its dependencies + if( index !== -1 ) { + var copy = false; + + //mark the node as false to exclude it from future iterations + nodes[index] = false; + + //loop through all edges and follow dependencies of the current node + for( var _iterator4 = _this.edges, _isArray4 = Array.isArray( _iterator4 ), _i4 = 0, _iterator4 = _isArray4 ? + _iterator4 : + _iterator4[Symbol.iterator](); ; ) { + var _ref4; + + if( _isArray4 ) { + if( _i4 >= _iterator4.length ) { + break; + } + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if( _i4.done ) { + break; + } + _ref4 = _i4.value; + } + + var edge = _ref4; + + if( edge[0] === node ) { + //lazily create a copy of predecessors with the current node concatenated onto it + copy = copy || predecessors.concat( [node] ); + + //recurse to node dependencies + visit( edge[1], copy ); + } + } + + //add the node to the next place in the sorted array + sorted[--place] = node; + } + }; + + for( var i = 0; i < nodes.length; i++ ) { + var node = nodes[i]; + + //ignore nodes that have been excluded + if( node !== false ) { + //mark the node as false to exclude it from future iterations + nodes[i] = false; + + //loop through all edges and follow dependencies of the current node + for( var _iterator5 = this.edges, _isArray5 = Array.isArray( _iterator5 ), _i5 = 0, _iterator5 = _isArray5 ? + _iterator5 : + _iterator5[Symbol.iterator](); ; ) { + var _ref5; + + if( _isArray5 ) { + if( _i5 >= _iterator5.length ) { + break; + } + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if( _i5.done ) { + break; + } + _ref5 = _i5.value; + } + + var edge = _ref5; + + if( edge[0] === node ) { + //recurse to node dependencies + visit( edge[1], [node] ); + } + } + + //add the node to the next place in the sorted array + sorted[--place] = node; + } + } + + return sorted; + }; + + /** + * Clears edges + * + * @since 0.4.0 + * @returns {Toposort} The Toposort instance + */ + + Toposort.prototype.clear = function clear() { + this.edges = []; + + return this; + }; + + return Toposort; + })(); + + module.exports = Toposort; +} ); diff --git a/node_modules/toposort-class/build/toposort.min.js b/node_modules/toposort-class/build/toposort.min.js new file mode 100644 index 00000000..97e40f6c --- /dev/null +++ b/node_modules/toposort-class/build/toposort.min.js @@ -0,0 +1 @@ +!function(a,b){if("function"==typeof define&&define.amd)define("Toposort",["exports","module"],b);else if("undefined"!=typeof exports&&"undefined"!=typeof module)b(exports,module);else{var c={exports:{}};b(c.exports,c),a.Toposort=c.exports}}(this,function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d=function(){function a(){c(this,a),this.edges=[],this.Toposort=a}return a.prototype.add=function(a,b){if("string"!=typeof a||!a)throw new TypeError("Dependent name must be given as a not empty string");if(b=Array.isArray(b)?b:[b],b.length>0)for(var c=b,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}var g=f;if("string"!=typeof g||!g)throw new TypeError("Dependency name must be given as a not empty string");this.edges.push([a,g])}else this.edges.push([a]);return this},a.prototype.sort=function(){for(var a=this,b=[],c=this.edges,d=Array.isArray(c),e=0,c=d?c:c[Symbol.iterator]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{if(e=c.next(),e.done)break;f=e.value}for(var g=f,h=g,i=Array.isArray(h),j=0,h=i?h:h[Symbol.iterator]();;){var k;if(i){if(j>=h.length)break;k=h[j++]}else{if(j=h.next(),j.done)break;k=j.value}var l=k;-1===b.indexOf(l)&&b.push(l)}}for(var m=b.length,n=new Array(b.length),o=function u(c,d){if(0!==d.length&&-1!==d.indexOf(c))throw new Error("Cyclic dependency found. "+c+" is dependent of itself.\nDependency chain: "+d.join(" -> ")+" => "+c);var e=b.indexOf(c);if(-1!==e){var f=!1;b[e]=!1;for(var g=a.edges,h=Array.isArray(g),i=0,g=h?g:g[Symbol.iterator]();;){var j;if(h){if(i>=g.length)break;j=g[i++]}else{if(i=g.next(),i.done)break;j=i.value}var k=j;k[0]===c&&(f=f||d.concat([c]),u(k[1],f))}n[--m]=c}},p=0;p=q.length)break;t=q[s++]}else{if(s=q.next(),s.done)break;t=s.value}var g=t;g[0]===l&&o(g[1],[l])}n[--m]=l}}return n},a.prototype.clear=function(){return this.edges=[],this},a}();b.exports=d}); \ No newline at end of file diff --git a/node_modules/toposort-class/index.js b/node_modules/toposort-class/index.js new file mode 100644 index 00000000..f7ff1f24 --- /dev/null +++ b/node_modules/toposort-class/index.js @@ -0,0 +1 @@ +module.exports = require( './build/toposort.js' ); diff --git a/node_modules/toposort-class/package.json b/node_modules/toposort-class/package.json new file mode 100644 index 00000000..9352f7e2 --- /dev/null +++ b/node_modules/toposort-class/package.json @@ -0,0 +1,46 @@ +{ + "name": "toposort-class", + "version": "1.0.1", + "description": "Topological sort of directed acyclic graphs (like dependecy lists)", + "main": "./index.js", + "devDependencies": { + "babel-eslint": "^4.0.5", + "eslint": "^1.0.0", + "grunt": "^0.4.5", + "grunt-babel": "^5.0.1", + "grunt-banner": "^0.4.0", + "grunt-contrib-clean": "^0.6.0", + "grunt-contrib-uglify": "^0.9.1", + "matcha": "^0.6.0", + "mocha": "^2.2.5" + }, + "scripts": { + "test": "mocha -b test", + "eslint": "eslint src/toposort.js test/spec.js Gruntfile.js", + "benchmark": "matcha benchmark/general.js", + "benchmark-save": "matcha -R csv benchmark/general.js > benchmark/results.csv" + }, + "repository": { + "type": "git", + "url": "https://github.com/gustavohenke/toposort.git" + }, + "keywords": [ + "topological", + "sort", + "sorting", + "graphs", + "graph", + "dependency", + "list", + "dependencies", + "acyclic", + "browser" + ], + "author": [ + "Marcel Klehr ", + "Gustavo Henke ", + "Aaron Trent " + ], + "license": "MIT", + "readmeFilename": "README.md" +} diff --git a/node_modules/touch/node_modules/.bin/nopt b/node_modules/touch/node_modules/.bin/nopt index d6493b6a..6b6566ea 120000 --- a/node_modules/touch/node_modules/.bin/nopt +++ b/node_modules/touch/node_modules/.bin/nopt @@ -1 +1 @@ -../../../nopt/bin/nopt.js \ No newline at end of file +../nopt/bin/nopt.js \ No newline at end of file diff --git a/node_modules/touch/node_modules/nopt/.gitignore b/node_modules/touch/node_modules/nopt/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/node_modules/touch/node_modules/nopt/LICENSE b/node_modules/touch/node_modules/nopt/LICENSE new file mode 100644 index 00000000..05a40109 --- /dev/null +++ b/node_modules/touch/node_modules/nopt/LICENSE @@ -0,0 +1,23 @@ +Copyright 2009, 2010, 2011 Isaac Z. Schlueter. +All rights reserved. + +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/node-pre-gyp/node_modules/nopt/README.md b/node_modules/touch/node_modules/nopt/README.md similarity index 76% rename from node_modules/node-pre-gyp/node_modules/nopt/README.md rename to node_modules/touch/node_modules/nopt/README.md index a99531c0..eeddfd4f 100644 --- a/node_modules/node-pre-gyp/node_modules/nopt/README.md +++ b/node_modules/touch/node_modules/nopt/README.md @@ -5,10 +5,9 @@ The Wrong Way is to sit down and write an option parser. We've all done that. The Right Way is to write some complex configurable program with so many -options that you hit the limit of your frustration just trying to -manage them all, and defer it with duct-tape solutions until you see -exactly to the core of the problem, and finally snap and write an -awesome option parser. +options that you go half-insane just trying to manage them all, and put +it off with duct-tape solutions until you see exactly to the core of the +problem, and finally snap and write an awesome option parser. If you want to write an option parser, don't write an option parser. Write a package manager, or a source control system, or a service @@ -19,37 +18,34 @@ nice option parser. ## USAGE -```javascript -// my-program.js -var nopt = require("nopt") - , Stream = require("stream").Stream - , path = require("path") - , knownOpts = { "foo" : [String, null] - , "bar" : [Stream, Number] - , "baz" : path - , "bloo" : [ "big", "medium", "small" ] - , "flag" : Boolean - , "pick" : Boolean - , "many1" : [String, Array] - , "many2" : [path, Array] - } - , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] - , "b7" : ["--bar", "7"] - , "m" : ["--bloo", "medium"] - , "p" : ["--pick"] - , "f" : ["--flag"] - } - // everything is optional. - // knownOpts and shorthands default to {} - // arg list defaults to process.argv - // slice defaults to 2 - , parsed = nopt(knownOpts, shortHands, process.argv, 2) -console.log(parsed) -``` + // my-program.js + var nopt = require("nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + , "many" : [String, Array] + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag"] + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) + console.log(parsed) This would give you support for any of the following: -```console +```bash $ node my-program.js --foo "blerp" --no-flag { "foo" : "blerp", "flag" : false } @@ -65,12 +61,12 @@ $ node my-program.js -fp --foofoo $ node my-program.js --foofoo -- -fp # -- stops the flag parsing. { foo: "Mr. Foo", argv: { remain: ["-fp"] } } -$ node my-program.js --blatzk -fp # unknown opts are ok. -{ blatzk: true, flag: true, pick: true } - -$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value +$ node my-program.js --blatzk 1000 -fp # unknown opts are ok. { blatzk: 1000, flag: true, pick: true } +$ node my-program.js --blatzk true -fp # but they need a value +{ blatzk: true, flag: true, pick: true } + $ node my-program.js --no-blatzk -fp # unless they start with "no-" { blatzk: false, flag: true, pick: true } @@ -81,11 +77,11 @@ $ node my-program.js --baz b/a/z # known paths are resolved. # values, and will always be an array. The other types provided # specify what types are allowed in the list. -$ node my-program.js --many1 5 --many1 null --many1 foo -{ many1: ["5", "null", "foo"] } +$ node my-program.js --many 1 --many null --many foo +{ many: ["1", "null", "foo"] } -$ node my-program.js --many2 foo --many2 bar -{ many2: ["/path/to/foo", "path/to/bar"] } +$ node my-program.js --many foo +{ many: ["foo"] } ``` Read the tests at the bottom of `lib/nopt.js` for more examples of @@ -120,13 +116,12 @@ considered valid values. For instance, in the example above, the and any other value will be rejected. When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be -interpreted as their JavaScript equivalents. +interpreted as their JavaScript equivalents, and numeric values will be +interpreted as a number. You can also mix types and values, or multiple types, in a list. For instance `{ blah: [Number, null] }` would allow a value to be set to -either a Number or null. When types are ordered, this implies a -preference, and the first type that can be used to properly interpret -the value will be used. +either a Number or null. To define a new type, add it to `nopt.typeDefs`. Each item in that hash is an object with a `type` member and a `validate` method. The @@ -141,8 +136,8 @@ config object and remove its invalid properties. ## Error Handling -By default, nopt outputs a warning to standard error when invalid values for -known options are found. You can change this behavior by assigning a method +By default, nopt outputs a warning to standard error when invalid +options are found. You can change this behavior by assigning a method to `nopt.invalidHandler`. This method will be called with the offending `nopt.invalidHandler(key, val, types)`. diff --git a/node_modules/node-pre-gyp/node_modules/nopt/bin/nopt.js b/node_modules/touch/node_modules/nopt/bin/nopt.js similarity index 77% rename from node_modules/node-pre-gyp/node_modules/nopt/bin/nopt.js rename to node_modules/touch/node_modules/nopt/bin/nopt.js index 3232d4c5..df90c729 100755 --- a/node_modules/node-pre-gyp/node_modules/nopt/bin/nopt.js +++ b/node_modules/touch/node_modules/nopt/bin/nopt.js @@ -1,6 +1,5 @@ #!/usr/bin/env node var nopt = require("../lib/nopt") - , path = require("path") , types = { num: Number , bool: Boolean , help: Boolean @@ -8,12 +7,7 @@ var nopt = require("../lib/nopt") , "num-list": [Number, Array] , "str-list": [String, Array] , "bool-list": [Boolean, Array] - , str: String - , clear: Boolean - , config: Boolean - , length: Number - , file: path - } + , str: String } , shorthands = { s: [ "--str", "astring" ] , b: [ "--bool" ] , nb: [ "--no-bool" ] @@ -21,11 +15,7 @@ var nopt = require("../lib/nopt") , "?": ["--help"] , h: ["--help"] , H: ["--help"] - , n: [ "--num", "125" ] - , c: ["--config"] - , l: ["--length"] - , f: ["--file"] - } + , n: [ "--num", "125" ] } , parsed = nopt( types , shorthands , process.argv diff --git a/node_modules/node-pre-gyp/node_modules/nopt/examples/my-program.js b/node_modules/touch/node_modules/nopt/examples/my-program.js similarity index 100% rename from node_modules/node-pre-gyp/node_modules/nopt/examples/my-program.js rename to node_modules/touch/node_modules/nopt/examples/my-program.js diff --git a/node_modules/node-pre-gyp/node_modules/nopt/lib/nopt.js b/node_modules/touch/node_modules/nopt/lib/nopt.js similarity index 54% rename from node_modules/node-pre-gyp/node_modules/nopt/lib/nopt.js rename to node_modules/touch/node_modules/nopt/lib/nopt.js index 1fb11351..ff802daf 100644 --- a/node_modules/node-pre-gyp/node_modules/nopt/lib/nopt.js +++ b/node_modules/touch/node_modules/nopt/lib/nopt.js @@ -8,7 +8,6 @@ var url = require("url") , path = require("path") , Stream = require("stream").Stream , abbrev = require("abbrev") - , osenv = require("osenv") module.exports = exports = nopt exports.clean = clean @@ -34,26 +33,24 @@ function nopt (types, shorthands, args, slice) { args = args.slice(slice) var data = {} , key - , argv = { - remain: [], - cooked: args, - original: args.slice(0) - } + , remain = [] + , cooked = args + , original = args.slice(0) - parse(args, data, argv.remain, types, shorthands) + parse(args, data, remain, types, shorthands) // now data is full clean(data, types, exports.typeDefs) - data.argv = argv - Object.defineProperty(data.argv, 'toString', { value: function () { + data.argv = {remain:remain,cooked:cooked,original:original} + data.argv.toString = function () { return this.original.map(JSON.stringify).join(" ") - }, enumerable: false }) + } return data } function clean (data, types, typeDefs) { typeDefs = typeDefs || exports.typeDefs var remove = {} - , typeDefault = [false, true, null, String, Array] + , typeDefault = [false, true, null, String, Number] Object.keys(data).forEach(function (k) { if (k === "argv") return @@ -128,20 +125,7 @@ function validateString (data, k, val) { } function validatePath (data, k, val) { - if (val === true) return false - if (val === null) return true - - val = String(val) - - var isWin = process.platform === 'win32' - , homePattern = isWin ? /^~(\/|\\)/ : /^~\// - , home = osenv.home() - - if (home && val.match(homePattern)) { - data[k] = path.resolve(home, val.substr(2)) - } else { - data[k] = path.resolve(val) - } + data[k] = path.resolve(String(val)) return true } @@ -152,8 +136,8 @@ function validateNumber (data, k, val) { } function validateDate (data, k, val) { + debug("validate Date %j %j %j", k, val, Date.parse(val)) var s = Date.parse(val) - debug("validate Date %j %j %j", k, val, s) if (isNaN(s)) return false data[k] = new Date(val) } @@ -215,8 +199,7 @@ function validate (data, k, val, type, typeDefs) { for (var i = 0, l = types.length; i < l; i ++) { debug("test type %j %j %j", k, val, types[i]) var t = typeDefs[types[i]] - if (t && - ((type && type.name && t.type && t.type.name) ? (type.name === t.type.name) : (type === t.type))) { + if (t && type === t.type) { var d = {} ok = false !== t.validate(d, k, val) val = d[k] @@ -252,16 +235,13 @@ function parse (args, data, remain, types, shorthands) { args[i] = "--" break } - var hadEq = false - if (arg.charAt(0) === "-" && arg.length > 1) { - var at = arg.indexOf('=') - if (at > -1) { - hadEq = true - var v = arg.substr(at + 1) - arg = arg.substr(0, at) - args.splice(i, 1, arg, v) + if (arg.charAt(0) === "-") { + if (arg.indexOf("=") !== -1) { + var v = arg.split("=") + arg = v.shift() + v = v.join("=") + args.splice.apply(args, [i, 1].concat([arg, v])) } - // see if it's a shorthand // if so, splice and back up to re-parse it. var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs) @@ -275,7 +255,7 @@ function parse (args, data, remain, types, shorthands) { } } arg = arg.replace(/^-+/, "") - var no = null + var no = false while (arg.toLowerCase().indexOf("no-") === 0) { no = !no arg = arg.substr(3) @@ -283,33 +263,18 @@ function parse (args, data, remain, types, shorthands) { if (abbrevs[arg]) arg = abbrevs[arg] - var argType = types[arg] - var isTypeArray = Array.isArray(argType) - if (isTypeArray && argType.length === 1) { - isTypeArray = false - argType = argType[0] - } - - var isArray = argType === Array || - isTypeArray && argType.indexOf(Array) !== -1 - - // allow unknown things to be arrays if specified multiple times. - if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) { - if (!Array.isArray(data[arg])) - data[arg] = [data[arg]] - isArray = true - } + var isArray = types[arg] === Array || + Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1 var val , la = args[i + 1] - var isBool = typeof no === 'boolean' || - argType === Boolean || - isTypeArray && argType.indexOf(Boolean) !== -1 || - (typeof argType === 'undefined' && !hadEq) || + var isBool = no || + types[arg] === Boolean || + Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 || (la === "false" && - (argType === null || - isTypeArray && ~argType.indexOf(null))) + (types[arg] === null || + Array.isArray(types[arg]) && ~types[arg].indexOf(null))) if (isBool) { // just set and move along @@ -323,22 +288,22 @@ function parse (args, data, remain, types, shorthands) { } // also support "foo":[Boolean, "bar"] and "--foo bar" - if (isTypeArray && la) { - if (~argType.indexOf(la)) { + if (Array.isArray(types[arg]) && la) { + if (~types[arg].indexOf(la)) { // an explicit type val = la i ++ - } else if ( la === "null" && ~argType.indexOf(null) ) { + } else if ( la === "null" && ~types[arg].indexOf(null) ) { // null allowed val = null i ++ } else if ( !la.match(/^-{2,}[^-]/) && !isNaN(la) && - ~argType.indexOf(Number) ) { + ~types[arg].indexOf(Number) ) { // number val = +la i ++ - } else if ( !la.match(/^-[^-]/) && ~argType.indexOf(String) ) { + } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) { // string val = la i ++ @@ -351,15 +316,6 @@ function parse (args, data, remain, types, shorthands) { continue } - if (argType === String) { - if (la === undefined) { - la = "" - } else if (la.match(/^-{1,2}[^-]+/)) { - la = "" - i -- - } - } - if (la && la.match(/^-{2,}$/)) { la = undefined i -- @@ -382,55 +338,215 @@ function resolveShort (arg, shorthands, shortAbbr, abbrevs) { // all of the chars are single-char shorthands, and it's // not a match to some other abbrev. arg = arg.replace(/^-+/, '') - - // if it's an exact known option, then don't go any further - if (abbrevs[arg] === arg) + if (abbrevs[arg] && !shorthands[arg]) { return null - - // if it's an exact known shortopt, same deal - if (shorthands[arg]) { - // make it an array, if it's a list of words - if (shorthands[arg] && !Array.isArray(shorthands[arg])) - shorthands[arg] = shorthands[arg].split(/\s+/) - - return shorthands[arg] } - - // first check to see if this arg is a set of single-char shorthands - var singles = shorthands.___singles - if (!singles) { - singles = Object.keys(shorthands).filter(function (s) { - return s.length === 1 - }).reduce(function (l,r) { - l[r] = true - return l - }, {}) - shorthands.___singles = singles - debug('shorthand singles', singles) + if (shortAbbr[arg]) { + arg = shortAbbr[arg] + } else { + var singles = shorthands.___singles + if (!singles) { + singles = Object.keys(shorthands).filter(function (s) { + return s.length === 1 + }).reduce(function (l,r) { l[r] = true ; return l }, {}) + shorthands.___singles = singles + } + var chrs = arg.split("").filter(function (c) { + return singles[c] + }) + if (chrs.join("") === arg) return chrs.map(function (c) { + return shorthands[c] + }).reduce(function (l, r) { + return l.concat(r) + }, []) } - var chrs = arg.split("").filter(function (c) { - return singles[c] - }) - - if (chrs.join("") === arg) return chrs.map(function (c) { - return shorthands[c] - }).reduce(function (l, r) { - return l.concat(r) - }, []) - - - // if it's an arg abbrev, and not a literal shorthand, then prefer the arg - if (abbrevs[arg] && !shorthands[arg]) - return null + if (shorthands[arg] && !Array.isArray(shorthands[arg])) { + shorthands[arg] = shorthands[arg].split(/\s+/) + } + return shorthands[arg] +} - // if it's an abbr for a shorthand, then use that - if (shortAbbr[arg]) - arg = shortAbbr[arg] +if (module === require.main) { +var assert = require("assert") + , util = require("util") + + , shorthands = + { s : ["--loglevel", "silent"] + , d : ["--loglevel", "info"] + , dd : ["--loglevel", "verbose"] + , ddd : ["--loglevel", "silly"] + , noreg : ["--no-registry"] + , reg : ["--registry"] + , "no-reg" : ["--no-registry"] + , silent : ["--loglevel", "silent"] + , verbose : ["--loglevel", "verbose"] + , h : ["--usage"] + , H : ["--usage"] + , "?" : ["--usage"] + , help : ["--usage"] + , v : ["--version"] + , f : ["--force"] + , desc : ["--description"] + , "no-desc" : ["--no-description"] + , "local" : ["--no-global"] + , l : ["--long"] + , p : ["--parseable"] + , porcelain : ["--parseable"] + , g : ["--global"] + } - // make it an array, if it's a list of words - if (shorthands[arg] && !Array.isArray(shorthands[arg])) - shorthands[arg] = shorthands[arg].split(/\s+/) + , types = + { aoa: Array + , nullstream: [null, Stream] + , date: Date + , str: String + , browser : String + , cache : path + , color : ["always", Boolean] + , depth : Number + , description : Boolean + , dev : Boolean + , editor : path + , force : Boolean + , global : Boolean + , globalconfig : path + , group : [String, Number] + , gzipbin : String + , logfd : [Number, Stream] + , loglevel : ["silent","win","error","warn","info","verbose","silly"] + , long : Boolean + , "node-version" : [false, String] + , npaturl : url + , npat : Boolean + , "onload-script" : [false, String] + , outfd : [Number, Stream] + , parseable : Boolean + , pre: Boolean + , prefix: path + , proxy : url + , "rebuild-bundle" : Boolean + , registry : url + , searchopts : String + , searchexclude: [null, String] + , shell : path + , t: [Array, String] + , tag : String + , tar : String + , tmp : path + , "unsafe-perm" : Boolean + , usage : Boolean + , user : String + , username : String + , userconfig : path + , version : Boolean + , viewer: path + , _exit : Boolean + } - return shorthands[arg] +; [["-v", {version:true}, []] + ,["---v", {version:true}, []] + ,["ls -s --no-reg connect -d", + {loglevel:"info",registry:null},["ls","connect"]] + ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]] + ,["ls --registry blargle", {}, ["ls"]] + ,["--no-registry", {registry:null}, []] + ,["--no-color true", {color:false}, []] + ,["--no-color false", {color:true}, []] + ,["--no-color", {color:false}, []] + ,["--color false", {color:false}, []] + ,["--color --logfd 7", {logfd:7,color:true}, []] + ,["--color=true", {color:true}, []] + ,["--logfd=10", {logfd:10}, []] + ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]] + ,["--tmp=tmp -tar=gtar", + {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]] + ,["--logfd x", {}, []] + ,["a -true -- -no-false", {true:true},["a","-no-false"]] + ,["a -no-false", {false:false},["a"]] + ,["a -no-no-true", {true:true}, ["a"]] + ,["a -no-no-no-false", {false:false}, ["a"]] + ,["---NO-no-No-no-no-no-nO-no-no"+ + "-No-no-no-no-no-no-no-no-no"+ + "-no-no-no-no-NO-NO-no-no-no-no-no-no"+ + "-no-body-can-do-the-boogaloo-like-I-do" + ,{"body-can-do-the-boogaloo-like-I-do":false}, []] + ,["we are -no-strangers-to-love "+ + "--you-know the-rules --and so-do-i "+ + "---im-thinking-of=a-full-commitment "+ + "--no-you-would-get-this-from-any-other-guy "+ + "--no-gonna-give-you-up "+ + "-no-gonna-let-you-down=true "+ + "--no-no-gonna-run-around false "+ + "--desert-you=false "+ + "--make-you-cry false "+ + "--no-tell-a-lie "+ + "--no-no-and-hurt-you false" + ,{"strangers-to-love":false + ,"you-know":"the-rules" + ,"and":"so-do-i" + ,"you-would-get-this-from-any-other-guy":false + ,"gonna-give-you-up":false + ,"gonna-let-you-down":false + ,"gonna-run-around":false + ,"desert-you":false + ,"make-you-cry":false + ,"tell-a-lie":false + ,"and-hurt-you":false + },["we", "are"]] + ,["-t one -t two -t three" + ,{t: ["one", "two", "three"]} + ,[]] + ,["-t one -t null -t three four five null" + ,{t: ["one", "null", "three"]} + ,["four", "five", "null"]] + ,["-t foo" + ,{t:["foo"]} + ,[]] + ,["--no-t" + ,{t:["false"]} + ,[]] + ,["-no-no-t" + ,{t:["true"]} + ,[]] + ,["-aoa one -aoa null -aoa 100" + ,{aoa:["one", null, 100]} + ,[]] + ,["-str 100" + ,{str:"100"} + ,[]] + ,["--color always" + ,{color:"always"} + ,[]] + ,["--no-nullstream" + ,{nullstream:null} + ,[]] + ,["--nullstream false" + ,{nullstream:null} + ,[]] + ,["--notadate 2011-01-25" + ,{notadate: "2011-01-25"} + ,[]] + ,["--date 2011-01-25" + ,{date: new Date("2011-01-25")} + ,[]] + ].forEach(function (test) { + var argv = test[0].split(/\s+/) + , opts = test[1] + , rem = test[2] + , actual = nopt(types, shorthands, argv, 0) + , parsed = actual.argv + delete actual.argv + console.log(util.inspect(actual, false, 2, true), parsed.remain) + for (var i in opts) { + var e = JSON.stringify(opts[i]) + , a = JSON.stringify(actual[i] === undefined ? null : actual[i]) + if (e && typeof e === "object") { + assert.deepEqual(e, a) + } else { + assert.equal(e, a) + } + } + assert.deepEqual(rem, parsed.remain) + }) } diff --git a/node_modules/touch/node_modules/nopt/package.json b/node_modules/touch/node_modules/nopt/package.json new file mode 100644 index 00000000..d1118e39 --- /dev/null +++ b/node_modules/touch/node_modules/nopt/package.json @@ -0,0 +1,12 @@ +{ "name" : "nopt" +, "version" : "1.0.10" +, "description" : "Option parsing for Node, supporting types, shorthands, etc. Used by npm." +, "author" : "Isaac Z. Schlueter (http://blog.izs.me/)" +, "main" : "lib/nopt.js" +, "scripts" : { "test" : "node lib/nopt.js" } +, "repository" : "http://github.com/isaacs/nopt" +, "bin" : "./bin/nopt.js" +, "license" : + { "type" : "MIT" + , "url" : "https://github.com/isaacs/nopt/raw/master/LICENSE" } +, "dependencies" : { "abbrev" : "1" }} diff --git a/node_modules/type/.editorconfig b/node_modules/type/.editorconfig new file mode 100644 index 00000000..cbfa577a --- /dev/null +++ b/node_modules/type/.editorconfig @@ -0,0 +1,15 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +trim_trailing_whitespace = true + +[{*.md,*.yml}] +indent_size = 2 +indent_style = space diff --git a/node_modules/type/.prettierrc.js b/node_modules/type/.prettierrc.js new file mode 100644 index 00000000..176ecddc --- /dev/null +++ b/node_modules/type/.prettierrc.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = { printWidth: 100, tabWidth: 4 }; diff --git a/node_modules/type/CHANGELOG.md b/node_modules/type/CHANGELOG.md new file mode 100644 index 00000000..883b54fc --- /dev/null +++ b/node_modules/type/CHANGELOG.md @@ -0,0 +1,62 @@ +# Change Log + +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. + +## [1.0.1](https://github.com/medikoo/type/compare/v1.0.0...v1.0.1) (2019-04-08) + +# 1.0.0 (2019-04-05) + +### Bug Fixes + +- ensure 'is' functions can't crash ([59ceb78](https://github.com/medikoo/type/commit/59ceb78)) + +### Features + +- array-length/coerce ([af8ddec](https://github.com/medikoo/type/commit/af8ddec)) +- array-length/ensure ([d313eb6](https://github.com/medikoo/type/commit/d313eb6)) +- array-like/ensure ([45f1ddd](https://github.com/medikoo/type/commit/45f1ddd)) +- array-like/is ([9a026a5](https://github.com/medikoo/type/commit/9a026a5)) +- array/ensure ([9db1515](https://github.com/medikoo/type/commit/9db1515)) +- array/is ([9672839](https://github.com/medikoo/type/commit/9672839)) +- date/ensure ([44e25a0](https://github.com/medikoo/type/commit/44e25a0)) +- date/is ([0316558](https://github.com/medikoo/type/commit/0316558)) +- ensure to not crash ([3998348](https://github.com/medikoo/type/commit/3998348)) +- ensure/number ([134b5cb](https://github.com/medikoo/type/commit/134b5cb)) +- error/ensure ([d5c8a30](https://github.com/medikoo/type/commit/d5c8a30)) +- error/is-error ([4d6b899](https://github.com/medikoo/type/commit/4d6b899)) +- finite/coerce ([accaad1](https://github.com/medikoo/type/commit/accaad1)) +- finite/ensure ([51e4174](https://github.com/medikoo/type/commit/51e4174)) +- function/ensure ([b624c9a](https://github.com/medikoo/type/commit/b624c9a)) +- function/is ([dab8026](https://github.com/medikoo/type/commit/dab8026)) +- integer/coerce ([89dea2e](https://github.com/medikoo/type/commit/89dea2e)) +- integer/ensure ([44a7071](https://github.com/medikoo/type/commit/44a7071)) +- iterable/ensure ([3d48841](https://github.com/medikoo/type/commit/3d48841)) +- iterable/is ([cf09513](https://github.com/medikoo/type/commit/cf09513)) +- lib/is-to-string-tag-supported ([c8c001d](https://github.com/medikoo/type/commit/c8c001d)) +- natural-number/coerce ([d08fdd9](https://github.com/medikoo/type/commit/d08fdd9)) +- natural-number/ensure ([6c24d12](https://github.com/medikoo/type/commit/6c24d12)) +- number/coerce ([86ccf08](https://github.com/medikoo/type/commit/86ccf08)) +- object/ensure ([a9e8eed](https://github.com/medikoo/type/commit/a9e8eed)) +- object/is ([d2d7251](https://github.com/medikoo/type/commit/d2d7251)) +- plain-function/ensure ([5186518](https://github.com/medikoo/type/commit/5186518)) +- plain-function/is ([51bc791](https://github.com/medikoo/type/commit/51bc791)) +- plain-object/ensure ([91cf5e5](https://github.com/medikoo/type/commit/91cf5e5)) +- plain-object/is ([4dcf393](https://github.com/medikoo/type/commit/4dcf393)) +- promise/ensure ([8d096a4](https://github.com/medikoo/type/commit/8d096a4)) +- promise/is ([a00de02](https://github.com/medikoo/type/commit/a00de02)) +- prototype/is ([b23bdcc](https://github.com/medikoo/type/commit/b23bdcc)) +- reg-exp/ensure ([6f7bbcb](https://github.com/medikoo/type/commit/6f7bbcb)) +- reg-exp/is ([9728519](https://github.com/medikoo/type/commit/9728519)) +- safe-integer/coerce ([b8549c4](https://github.com/medikoo/type/commit/b8549c4)) +- safe-integer/ensure ([a70ef3f](https://github.com/medikoo/type/commit/a70ef3f)) +- string/coerce ([b25c71f](https://github.com/medikoo/type/commit/b25c71f)) +- string/ensure ([b62577d](https://github.com/medikoo/type/commit/b62577d)) +- support 'default' in resolveException ([e08332a](https://github.com/medikoo/type/commit/e08332a)) +- switch config to ES3 based ([37606d9](https://github.com/medikoo/type/commit/37606d9)) +- thenable/ensure ([6762c0d](https://github.com/medikoo/type/commit/6762c0d)) +- thenable/is ([2711d70](https://github.com/medikoo/type/commit/2711d70)) +- time-value/coerce ([27fd109](https://github.com/medikoo/type/commit/27fd109)) +- time-value/ensure ([1f6a8ea](https://github.com/medikoo/type/commit/1f6a8ea)) +- **string/coerce:** restrict toString acceptance ([2a87100](https://github.com/medikoo/type/commit/2a87100)) +- value/ensure ([dd6d8cb](https://github.com/medikoo/type/commit/dd6d8cb)) +- value/is ([fdf4763](https://github.com/medikoo/type/commit/fdf4763)) diff --git a/node_modules/type/README.md b/node_modules/type/README.md new file mode 100644 index 00000000..7eb53c7e --- /dev/null +++ b/node_modules/type/README.md @@ -0,0 +1,743 @@ +[![*nix build status][nix-build-image]][nix-build-url] +[![Windows build status][win-build-image]][win-build-url] +[![Tests coverage][cov-image]][cov-url] +[![npm version][npm-image]][npm-url] + +# type + +## Runtime validation and processing of JavaScript types + +- Respects language nature and acknowledges its quirks +- Allows coercion in restricted forms (rejects clearly invalid input, normalizes permissible type deviations) +- No transpilation implied, written to work in all ECMAScript 3+ engines + +### Example usage + +Bulletproof input arguments normalization and validation: + +```javascript +const ensureString = require('type/string/ensure') + , ensureDate = require('type/date/ensure') + , ensureNaturalNumber = require('type/natural-number/ensure') + , isObject = require('type/object/is'); + +module.exports = (path, options = { min: 0 }) { + path = ensureString(path, { errorMessage: "%v is not a path" }); + if (!isObject(options)) options = {}; + const min = ensureNaturalNumber(options.min, { default: 0 }) + , max = ensureNaturalNumber(options.max, { isOptional: true }) + , startTime = ensureDate(options.startTime, { isOptional: true }); + + // ...logic +}; +``` + +### Installation + +```bash +npm install type +``` + +## Utilities + +Serves following kind of utilities: + +##### `*/coerce` + +Restricted coercion into primitive type. Returns coerced value or `null` if value is not coercible per rules. + +##### `*/is` + +Object type/kind confirmation, returns either `true` or `false`. + +##### `*/ensure` + +Value validation. Returns input value (in primitive cases possibly coerced) or if value doesn't meet the constraints throws `TypeError` . + +Each `*/ensure` utility, accepts following options (eventually passed with second argument): + +- `isOptional` - Makes `null` or `undefined` accepted as valid value. In such case instead of `TypeError` being thrown, `null` is returned. +- `default` - A value to be returned if `null` or `undefined` is passed as an input value. +- `errorMessage` - Custom error message (`%v` can be used as a placeholder for input value) + +--- + +### Value + +_Value_, any value that's neither `null` nor `undefined` . + +#### `value/is` + +Confirms whether passed argument is a _value_ + +```javascript +const isValue = require("type/value/is"); + +isValue({}); // true +isValue(null); // false +``` + +#### `value/ensure` + +Ensures if given argument is a _value_. If it's a value it is returned back, if not `TypeError` is thrown + +```javascript +const ensureValue = require("type/value/ensure"); + +const obj = {}; + +ensureValue(obj); // obj +ensureValue(null); // Thrown TypeError: Cannot use null +``` + +--- + +### Object + +_Object_, any non-primitive value + +#### `object/is` + +Confirms if passed value is an object + +```javascript +const isObject = require("type/object/is"); + +isObject({}); // true +isObject(true); // false +isObject(null); // false +``` + +#### `object/ensure` + +If given argument is an object, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureObject = require("type/object/ensure"); + +const obj = {}; + +ensureObject(obj); // obj +ensureString(null); // Thrown TypeError: null is not an object +``` + +--- + +### String + +_string_ primitive + +#### `string/coerce` + +Restricted string coercion. Returns string presentation for every value that follows below constraints + +- is implicitly coercible to string +- is neither`null` nor `undefined` +- its `toString` method is not `Object.prototype.toString` + +For all other values `null` is returned + +```javascript +const coerceToString = require("type/string/coerce"); + +coerceToString(12); // "12" +coerceToString(undefined); // null +``` + +#### `string/ensure` + +If given argument is a string coercible value (via [`string/coerce`](#stringcoerce)) returns result string. +Otherwise `TypeError` is thrown. + +```javascript +const ensureString = require("type/string/ensure"); + +ensureString(12); // "12" +ensureString(null); // Thrown TypeError: null is not a string +``` + +--- + +### Number + +_number_ primitive + +#### `number/coerce` + +Restricted number coercion. Returns number presentation for every value that follows below constraints + +- is implicitly coercible to number +- is neither `null` nor `undefined` +- is not `NaN` and doesn't coerce to `NaN` + +For all other values `null` is returned + +```javascript +const coerceToNumber = require("type/number/coerce"); + +coerceToNumber("12"); // 12 +coerceToNumber({}); // null +coerceToNumber(null); // null +``` + +#### `number/ensure` + +If given argument is a number coercible value (via [`number/coerce`](#numbercoerce)) returns result number. +Otherwise `TypeError` is thrown. + +```javascript +const ensureNumber = require("type/number/ensure"); + +ensureNumber(12); // "12" +ensureNumber(null); // Thrown TypeError: null is not a number +``` + +--- + +#### Finite Number + +Finite _number_ primitive + +##### `finite/coerce` + +Follows [`number/coerce`](#numbercoerce) additionally rejecting `Infinity` and `-Infinity` values (`null` is returned if given values coerces to them) + +```javascript +const coerceToFinite = require("type/finite/coerce"); + +coerceToFinite("12"); // 12 +coerceToFinite(Infinity); // null +coerceToFinite(null); // null +``` + +##### `finite/ensure` + +If given argument is a finite number coercible value (via [`finite/coerce`](#finitecoerce)) returns result number. +Otherwise `TypeError` is thrown. + +```javascript +const ensureFinite = require("type/finite/ensure"); + +ensureFinite(12); // "12" +ensureFinite(null); // Thrown TypeError: null is not a finite number +``` + +--- + +#### Integer Number + +Integer _number_ primitive + +##### `integer/coerce` + +Follows [`finite/coerce`](#finitecoerce) additionally stripping decimal part from the number + +```javascript +const coerceToInteger = require("type/integer/coerce"); + +coerceToInteger("12.95"); // 12 +coerceToInteger(Infinity); // null +coerceToInteger(null); // null +``` + +##### `integer/ensure` + +If given argument is an integer coercible value (via [`integer/coerce`](#integercoerce)) returns result number. +Otherwise `TypeError` is thrown. + +```javascript +const ensureInteger = require("type/integer/ensure"); + +ensureInteger(12.93); // "12" +ensureInteger(null); // Thrown TypeError: null is not an integer +``` + +--- + +#### Safe Integer Number + +Safe integer _number_ primitive + +##### `safe-integer/coerce` + +Follows [`integer/coerce`](#integercoerce) but returns `null` in place of values which are beyond `Number.MIN_SAFE_INTEGER` and `Number.MAX_SAFE_INTEGER` range. + +```javascript +const coerceToSafeInteger = require("type/safe-integer/coerce"); + +coerceToInteger("12.95"); // 12 +coerceToInteger(9007199254740992); // null +coerceToInteger(null); // null +``` + +##### `safe-integer/ensure` + +If given argument is a safe integer coercible value (via [`safe-integer/coerce`](#safe-integercoerce)) returns result number. +Otherwise `TypeError` is thrown. + +```javascript +const ensureSafeInteger = require("type/safe-integer/ensure"); + +ensureSafeInteger(12.93); // "12" +ensureSafeInteger(9007199254740992); // Thrown TypeError: null is not a safe integer +``` + +--- + +#### Natural Number + +Natural _number_ primitive + +##### `natural-number/coerce` + +Follows [`integer/coerce`](#integercoerce) but returns `null` for values below `0` + +```javascript +const coerceToNaturalNumber = require("type/natural-number/coerce"); + +coerceToNaturalNumber("12.95"); // 12 +coerceToNaturalNumber(-120); // null +coerceToNaturalNumber(null); // null +``` + +##### `natural-number/ensure` + +If given argument is a natural number coercible value (via [`natural-number/coerce`](#natural-numbercoerce)) returns result number. +Otherwise `TypeError` is thrown. + +```javascript +const ensureNaturalNumber = require("type/natural-number/ensure"); + +ensureNaturalNumber(12.93); // "12" +ensureNaturalNumber(-230); // Thrown TypeError: null is not a natural number +``` + +--- + +### Plain Object + +A _plain object_ + +- Inherits directly from `Object.prototype` or `null` +- Is not a constructor's `prototype` property + +#### `plain-object/is` + +Confirms if given object is a _plain object_ + +```javascript +const isPlainObject = require("type/plain-object/is"); + +isPlainObject({}); // true +isPlainObject(Object.create(null)); // true +isPlainObject([]); // false +``` + +#### `plain-object/ensure` + +If given argument is a plain object it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensurePlainObject = require("type/plain-object/ensure"); + +ensurePlainObject({}); // {} +ensureArray("foo"); // Thrown TypeError: foo is not a plain object +``` + +--- + +### Array + +_Array_ instance + +#### `array/is` + +Confirms if given object is a native array + +```javascript +const isArray = require("type/array/is"); + +isArray([]); // true +isArray({}); // false +isArray("foo"); // false +``` + +#### `array/ensure` + +If given argument is an array, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureArray = require("type/array/ensure"); + +ensureArray(["foo"]); // ["foo"] +ensureArray("foo"); // Thrown TypeError: foo is not an array +``` + +--- + +#### Array Like + +_Array-like_ value (any value with `length` property) + +#### `array-like/is` + +Restricted _array-like_ confirmation. Returns true for every value that meets following contraints + +- is an _object_ (or with `allowString` option, a _string_) +- is not a _function_ +- Exposes `length` that meets [`array-length`](#array-lengthcoerce) constraints + +```javascript +const isArrayLike = require("type/array-like/is"); + +isArrayLike([]); // true +isArrayLike({}); // false +isArrayLike({ length: 0 }); // true +isArrayLike("foo"); // false +isArrayLike("foo", { allowString: true }); // true +``` + +#### `array-like/ensure` + +If given argument is an _array-like_, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureArrayLike = require("type/array-like/ensure"); + +ensureArrayLike({ length: 0 }); // { length: 0 } +ensureArrayLike("foo", { allowString: true }); // "foo" +ensureArrayLike({}); // Thrown TypeError: null is not an iterable +``` + +--- + +#### Array length + +_number_ primitive that conforms as valid _array length_ + +##### `array-length/coerce` + +Follows [`safe-integer/coerce`](#safe-integercoerce) but returns `null` in place of values which are below `0` + +```javascript +const coerceToArrayLength = require("type/safe-integer/coerce"); + +coerceToArrayLength("12.95"); // 12 +coerceToArrayLength(9007199254740992); // null +coerceToArrayLength(null); // null +``` + +##### `array-length/ensure` + +If given argument is an _array length_ coercible value (via [`array-length/coerce`](#array-lengthcoerce)) returns result number. +Otherwise `TypeError` is thrown. + +```javascript +const ensureArrayLength = require("type/array-length/ensure"); + +ensureArrayLength(12.93); // "12" +ensureArrayLength(9007199254740992); // Thrown TypeError: null is not a valid array length +``` + +--- + +### Iterable + +Value which implements _iterable_ protocol + +#### `iterable/is` + +Confirms if given object is an _iterable_ and is not a _string_ (unless `allowString` option is passed) + +```javascript +const isIterable = require("type/iterable/is"); + +isIterable([]); // true +isIterable({}); // false +isIterable("foo"); // false +isIterable("foo", { allowString: true }); // true +``` + +#### `iterable/ensure` + +If given argument is an _iterable_, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureIterable = require("type/iterable/ensure"); + +ensureIterable([]); // [] +ensureIterable("foo", { allowString: true }); // "foo" +ensureIterable({}); // Thrown TypeError: null is not a iterable +``` + +--- + +### Date + +_Date_ instance + +#### `date/is` + +Confirms if given object is a native date, and is not an _Invalid Date_ + +```javascript +const isDate = require("type/date/is"); + +isDate(new Date()); // true +isDate(new Date("Invalid date")); // false +isDate(Date.now()); // false +isDate("foo"); // false +``` + +#### `date/ensure` + +If given argument is a date object, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureDate = require("type/date/ensure"); + +const date = new Date(); +ensureDate(date); // date +ensureDate(123123); // Thrown TypeError: 123123 is not a date object +``` + +--- + +### Time value + +_number_ primitive which is a valid _time value_ (as used internally in _Date_ instances) + +#### `time-value/coerce` + +Follows [`integer/coerce`](#integercoerce) but returns `null` in place of values which go beyond 100 000 0000 days from unix epoch + +```javascript +const coerceToTimeValue = require("type/time-value/coerce"); + +coerceToTimeValue(12312312); // true +coerceToTimeValue(Number.MAX_SAFE_INTEGER); // false +coerceToTimeValue("foo"); // false +``` + +##### `time-value/ensure` + +If given argument is a _time value_ coercible value (via [`time-value/coerce`](#time-valuecoerce)) returns result number. +Otherwise `TypeError` is thrown. + +```javascript +const ensureTimeValue = require("type/time-value/ensure"); + +ensureTimeValue(12.93); // "12" +ensureTimeValue(Number.MAX_SAFE_INTEGER); // Thrown TypeError: null is not a natural number +``` + +--- + +### Function + +_Function_ instance + +#### `function/is` + +Confirms if given object is a native function + +```javascript +const isFunction = require("type/function/is"); + +isFunction(function () {}); // true +isFunction(() => {}); // true +isFunction(class {}); // true +isFunction("foo"); // false +``` + +#### `function/ensure` + +If given argument is a function object, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureFunction = require("type/function/ensure"); + +const fn = function () {}; +ensureFunction(fn); // fn +ensureFunction(/foo/); // Thrown TypeError: /foo/ is not a function +``` + +--- + +#### Plain Function + +A _Function_ instance that is not a _Class_ + +##### `plain-function/is` + +Confirms if given object is a _plain function_ + +```javascript +const isPlainFunction = require("type/plain-function/is"); + +isPlainFunction(function () {}); // true +isPlainFunction(() => {}); // true +isPlainFunction(class {}); // false +isPlainFunction("foo"); // false +``` + +##### `plain-function/ensure` + +If given argument is a _plain function_ object, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensurePlainFunction = require("type/function/ensure"); + +const fn = function () {}; +ensurePlainFunction(fn); // fn +ensurePlainFunction(class {}); // Thrown TypeError: class is not a plain function +``` + +--- + +### RegExp + +_RegExp_ instance + +#### `reg-exp/is` + +Confirms if given object is a native regular expression object + +```javascript +const isRegExp = require("type/reg-exp/is"); + +isRegExp(/foo/); +isRegExp({}); // false +isRegExp("foo"); // false +``` + +#### `reg-exp/ensure` + +If given argument is a regular expression object, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureRegExp = require("type/reg-exp/ensure"); + +ensureRegExp(/foo/); // /foo/ +ensureRegExp("foo"); // Thrown TypeError: null is not a regular expression object +``` + +--- + +### Promise + +_Promise_ instance + +#### `promise/is` + +Confirms if given object is a native _promise_ + +```javascript +const isPromise = require("type/promise/is"); + +isPromise(Promise.resolve()); // true +isPromise({ then: () => {} }); // false +isPromise({}); // false +``` + +##### `promise/ensure` + +If given argument is a promise, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensurePromise = require("type/promise/ensure"); + +const promise = Promise.resolve(); +ensurePromise(promise); // promise +eensurePromise({}); // Thrown TypeError: [object Object] is not a promise +``` + +--- + +#### Thenable + +_Thenable_ object (an object with `then` method) + +##### `thenable/is` + +Confirms if given object is a _thenable_ + +```javascript +const isThenable = require("type/thenable/is"); + +isThenable(Promise.resolve()); // true +isThenable({ then: () => {} }); // true +isThenable({}); // false +``` + +##### `thenable/ensure` + +If given argument is a _thenable_ object, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureThenable = require("type/thenable/ensure"); + +const promise = Promise.resolve(); +ensureThenable(promise); // promise +ensureThenable({}); // Thrown TypeError: [object Object] is not a thenable object +``` + +--- + +### Error + +_Error_ instance + +#### `error/is` + +Confirms if given object is a native error object + +```javascript +const isError = require("type/error/is"); + +isError(new Error()); // true +isError({ mesage: "Fake error" }); // false +``` + +#### `error/ensure` + +If given argument is an error object, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureError = require("type/error/ensure"); + +const someError = new Error("Some error"); +ensureError(someError); // someError +ensureError({ mesage: "Fake error" }); // Thrown TypeError: [object Object] is not an error object +``` + +--- + +### Prototype + +Some constructor's `prototype` property + +#### `prototype/is` + +Confirms if given object serves as a _prototype_ property + +```javascript +const isPrototype = require("type/prototype/is"); + +isPrototype({}); // false +isPrototype(Object.prototype); // true +isPrototype(Array.prototype); // true +``` + +### Tests + + $ npm test + +[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/type/branches/master/shields_badge.svg +[nix-build-url]: https://semaphoreci.com/medikoo-org/type +[win-build-image]: https://ci.appveyor.com/api/projects/status/8nrtluuwsb5k9l8d?svg=true +[win-build-url]: https://ci.appveyor.com/api/project/medikoo/type +[cov-image]: https://img.shields.io/codecov/c/github/medikoo/type.svg +[cov-url]: https://codecov.io/gh/medikoo/type +[npm-image]: https://img.shields.io/npm/v/type.svg +[npm-url]: https://www.npmjs.com/package/type diff --git a/node_modules/type/array-length/coerce.js b/node_modules/type/array-length/coerce.js new file mode 100644 index 00000000..3dbbf977 --- /dev/null +++ b/node_modules/type/array-length/coerce.js @@ -0,0 +1,10 @@ +"use strict"; + +var coerceToSafeInteger = require("../safe-integer/coerce"); + +module.exports = function (value) { + value = coerceToSafeInteger(value); + if (!value) return value; + if (value < 0) return null; + return value; +}; diff --git a/node_modules/type/array-length/ensure.js b/node_modules/type/array-length/ensure.js new file mode 100644 index 00000000..ee0b5566 --- /dev/null +++ b/node_modules/type/array-length/ensure.js @@ -0,0 +1,10 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + return resolveException(value, "%v is not a valid array length", arguments[1]); +}; diff --git a/node_modules/type/array-like/ensure.js b/node_modules/type/array-like/ensure.js new file mode 100644 index 00000000..f3c9b504 --- /dev/null +++ b/node_modules/type/array-like/ensure.js @@ -0,0 +1,9 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value, arguments[1])) return value; + return resolveException(value, "%v is not an array like value", arguments[1]); +}; diff --git a/node_modules/type/array-like/is.js b/node_modules/type/array-like/is.js new file mode 100644 index 00000000..7778fede --- /dev/null +++ b/node_modules/type/array-like/is.js @@ -0,0 +1,21 @@ +"use strict"; + +var coerceToArrayLength = require("../array-length/coerce") + , isObject = require("../object/is"); + +module.exports = function (value/*, options*/) { + if (!isObject(value)) { + var options = arguments[1]; + if (isObject(options) && options.allowString && typeof value === "string") return true; + return false; + } + + if (typeof value === "function") return false; + + var length; + try { length = value.length; } + catch (error) { return false; } + + if (coerceToArrayLength(length) === null) return false; + return true; +}; diff --git a/node_modules/type/array/ensure.js b/node_modules/type/array/ensure.js new file mode 100644 index 00000000..5474a78c --- /dev/null +++ b/node_modules/type/array/ensure.js @@ -0,0 +1,9 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + return resolveException(value, "%v is not an array object", arguments[1]); +}; diff --git a/node_modules/type/array/is.js b/node_modules/type/array/is.js new file mode 100644 index 00000000..13fd8d39 --- /dev/null +++ b/node_modules/type/array/is.js @@ -0,0 +1,27 @@ +"use strict"; + +var isPrototype = require("../prototype/is"); + +var isArray; +if (typeof Array.isArray === "function") { + isArray = Array.isArray; +} else { + var objectToString = Object.prototype.toString, objectTaggedString = objectToString.call([]); + isArray = function (value) { return objectToString.call(value) === objectTaggedString; }; +} + +module.exports = function (value) { + if (!isArray(value)) return false; + + // Sanity check (reject objects which do not expose common Array interface) + if (!hasOwnProperty.call(value, "length")) return false; + try { + if (typeof value.length !== "number") return false; + if (typeof value.push !== "function") return false; + if (typeof value.splice !== "function") return false; + } catch (error) { + return false; + } + + return !isPrototype(value); +}; diff --git a/node_modules/type/date/ensure.js b/node_modules/type/date/ensure.js new file mode 100644 index 00000000..b249a67a --- /dev/null +++ b/node_modules/type/date/ensure.js @@ -0,0 +1,9 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + return resolveException(value, "%v is not a date object", arguments[1]); +}; diff --git a/node_modules/type/date/is.js b/node_modules/type/date/is.js new file mode 100644 index 00000000..0754085f --- /dev/null +++ b/node_modules/type/date/is.js @@ -0,0 +1,26 @@ +"use strict"; + +var isPrototype = require("../prototype/is"); + +var dateValueOf = Date.prototype.valueOf; + +module.exports = function (value) { + if (!value) return false; + + try { + // Sanity check (reject objects which do not expose common Date interface) + if (typeof value.getFullYear !== "function") return false; + if (typeof value.getTimezoneOffset !== "function") return false; + if (typeof value.setFullYear !== "function") return false; + + // Ensure its native Date object (has [[DateValue]] slot) + dateValueOf.call(value); + } catch (error) { + return false; + } + + // Ensure it hosts valid date + if (isNaN(value)) return false; + + return !isPrototype(value); +}; diff --git a/node_modules/type/error/ensure.js b/node_modules/type/error/ensure.js new file mode 100644 index 00000000..a304f59c --- /dev/null +++ b/node_modules/type/error/ensure.js @@ -0,0 +1,9 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + return resolveException(value, "%v is not an error object", arguments[1]); +}; diff --git a/node_modules/type/error/is.js b/node_modules/type/error/is.js new file mode 100644 index 00000000..4326e844 --- /dev/null +++ b/node_modules/type/error/is.js @@ -0,0 +1,24 @@ +"use strict"; + +var isPrototype = require("../prototype/is"); + +var objectToString = Object.prototype.toString + , objectTaggedString = objectToString.call(new Error()); + +module.exports = function (value) { + if (!value) return false; + + // Sanity check (reject objects which do not expose common Error interface) + try { + if (typeof value.message !== "string") return false; + } catch (error) { + return false; + } + + // Ensure its native Error object (has [[ErrorData]] slot) + // Note: it's not 100% precise as string tag may be overriden + // and other objects can be hacked to expose it + if (objectToString.call(value) !== objectTaggedString) return false; + + return !isPrototype(value); +}; diff --git a/node_modules/type/finite/coerce.js b/node_modules/type/finite/coerce.js new file mode 100644 index 00000000..a3783be5 --- /dev/null +++ b/node_modules/type/finite/coerce.js @@ -0,0 +1,8 @@ +"use strict"; + +var coerceToNumber = require("../number/coerce"); + +module.exports = function (value) { + value = coerceToNumber(value); + return isFinite(value) ? value : null; +}; diff --git a/node_modules/type/finite/ensure.js b/node_modules/type/finite/ensure.js new file mode 100644 index 00000000..0f899d1e --- /dev/null +++ b/node_modules/type/finite/ensure.js @@ -0,0 +1,10 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + return resolveException(value, "%v is not a finite number", arguments[1]); +}; diff --git a/node_modules/type/function/ensure.js b/node_modules/type/function/ensure.js new file mode 100644 index 00000000..b560ae93 --- /dev/null +++ b/node_modules/type/function/ensure.js @@ -0,0 +1,9 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + return resolveException(value, "%v is not a function", arguments[1]); +}; diff --git a/node_modules/type/function/is.js b/node_modules/type/function/is.js new file mode 100644 index 00000000..981990a7 --- /dev/null +++ b/node_modules/type/function/is.js @@ -0,0 +1,19 @@ +"use strict"; + +var isPrototype = require("../prototype/is"); + +module.exports = function (value) { + if (typeof value !== "function") return false; + + if (!hasOwnProperty.call(value, "length")) return false; + + try { + if (typeof value.length !== "number") return false; + if (typeof value.call !== "function") return false; + if (typeof value.apply !== "function") return false; + } catch (error) { + return false; + } + + return !isPrototype(value); +}; diff --git a/node_modules/type/integer/coerce.js b/node_modules/type/integer/coerce.js new file mode 100644 index 00000000..cba5e17e --- /dev/null +++ b/node_modules/type/integer/coerce.js @@ -0,0 +1,11 @@ +"use strict"; + +var coerceToFinite = require("../finite/coerce"); + +var abs = Math.abs, floor = Math.floor; + +module.exports = function (value) { + value = coerceToFinite(value); + if (!value) return value; + return (value > 0 ? 1 : -1) * floor(abs(value)); +}; diff --git a/node_modules/type/integer/ensure.js b/node_modules/type/integer/ensure.js new file mode 100644 index 00000000..a6c97d09 --- /dev/null +++ b/node_modules/type/integer/ensure.js @@ -0,0 +1,10 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + return resolveException(value, "%v is not an integer", arguments[1]); +}; diff --git a/node_modules/type/iterable/ensure.js b/node_modules/type/iterable/ensure.js new file mode 100644 index 00000000..2812784e --- /dev/null +++ b/node_modules/type/iterable/ensure.js @@ -0,0 +1,9 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value, arguments[1])) return value; + return resolveException(value, "%v is not an iterable value", arguments[1]); +}; diff --git a/node_modules/type/iterable/is.js b/node_modules/type/iterable/is.js new file mode 100644 index 00000000..895102da --- /dev/null +++ b/node_modules/type/iterable/is.js @@ -0,0 +1,20 @@ +// Polyfills friendly, therefore ES5 syntax + +"use strict"; + +var isObject = require("../object/is"); + +var iteratorSymbol = Symbol.iterator; + +if (!iteratorSymbol) { + throw new Error("Cannot initialize iterator/is due to Symbol.iterator not being implemented"); +} + +module.exports = function (value/*, options*/) { + if (!isObject(value)) { + var options = arguments[1]; + if (!isObject(options) || !options.allowString || typeof value !== "string") return false; + } + try { return typeof value[iteratorSymbol] === "function"; } + catch (error) { return false; } +}; diff --git a/node_modules/type/lib/is-to-string-tag-supported.js b/node_modules/type/lib/is-to-string-tag-supported.js new file mode 100644 index 00000000..254d8b3d --- /dev/null +++ b/node_modules/type/lib/is-to-string-tag-supported.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol"; diff --git a/node_modules/type/lib/resolve-exception.js b/node_modules/type/lib/resolve-exception.js new file mode 100644 index 00000000..52dfbe25 --- /dev/null +++ b/node_modules/type/lib/resolve-exception.js @@ -0,0 +1,21 @@ +"use strict"; + +var isValue = require("../value/is") + , isObject = require("../object/is") + , stringCoerce = require("../string/coerce") + , toShortString = require("./to-short-string"); + +var resolveMessage = function (message, value) { + return message.replace("%v", toShortString(value)); +}; + +module.exports = function (value, defaultMessage, inputOptions) { + if (!isObject(inputOptions)) throw new TypeError(resolveMessage(defaultMessage, value)); + if (!isValue(value)) { + if ("default" in inputOptions) return inputOptions["default"]; + if (inputOptions.isOptional) return null; + } + var errorMessage = stringCoerce(inputOptions.errorMessage); + if (!isValue(errorMessage)) errorMessage = defaultMessage; + throw new TypeError(resolveMessage(errorMessage, value)); +}; diff --git a/node_modules/type/lib/safe-to-string.js b/node_modules/type/lib/safe-to-string.js new file mode 100644 index 00000000..a756dd37 --- /dev/null +++ b/node_modules/type/lib/safe-to-string.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (value) { + try { + return value.toString(); + } catch (error) { + try { return String(value); } + catch (error2) { return null; } + } +}; diff --git a/node_modules/type/lib/to-short-string.js b/node_modules/type/lib/to-short-string.js new file mode 100644 index 00000000..c8d7ed88 --- /dev/null +++ b/node_modules/type/lib/to-short-string.js @@ -0,0 +1,29 @@ +"use strict"; + +var safeToString = require("./safe-to-string"); + +var reNewLine = /[\n\r\u2028\u2029]/g; + +module.exports = function (value) { + var string = safeToString(value); + if (string === null) return ""; + // Trim if too long + if (string.length > 100) string = string.slice(0, 99) + "…"; + // Replace eventual new lines + string = string.replace(reNewLine, function (char) { + switch (char) { + case "\n": + return "\\n"; + case "\r": + return "\\r"; + case "\u2028": + return "\\u2028"; + case "\u2029": + return "\\u2029"; + /* istanbul ignore next */ + default: + throw new Error("Unexpected character"); + } + }); + return string; +}; diff --git a/node_modules/type/natural-number/coerce.js b/node_modules/type/natural-number/coerce.js new file mode 100644 index 00000000..4b7931c5 --- /dev/null +++ b/node_modules/type/natural-number/coerce.js @@ -0,0 +1,10 @@ +"use strict"; + +var coerceToInteger = require("../integer/coerce"); + +module.exports = function (value) { + value = coerceToInteger(value); + if (!value) return value; + if (value < 0) return null; + return value; +}; diff --git a/node_modules/type/natural-number/ensure.js b/node_modules/type/natural-number/ensure.js new file mode 100644 index 00000000..ec307bf6 --- /dev/null +++ b/node_modules/type/natural-number/ensure.js @@ -0,0 +1,10 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + return resolveException(value, "%v is not a natural number", arguments[1]); +}; diff --git a/node_modules/type/number/coerce.js b/node_modules/type/number/coerce.js new file mode 100644 index 00000000..1bb15125 --- /dev/null +++ b/node_modules/type/number/coerce.js @@ -0,0 +1,14 @@ +"use strict"; + +var isValue = require("../value/is"); + +module.exports = function (value) { + if (!isValue(value)) return null; + try { + value = +value; // Ensure implicit coercion + } catch (error) { + return null; + } + if (isNaN(value)) return null; + return value; +}; diff --git a/node_modules/type/number/ensure.js b/node_modules/type/number/ensure.js new file mode 100644 index 00000000..ada44204 --- /dev/null +++ b/node_modules/type/number/ensure.js @@ -0,0 +1,10 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + return resolveException(value, "%v is not a number", arguments[1]); +}; diff --git a/node_modules/type/object/ensure.js b/node_modules/type/object/ensure.js new file mode 100644 index 00000000..95ae5df3 --- /dev/null +++ b/node_modules/type/object/ensure.js @@ -0,0 +1,9 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + return resolveException(value, "%v is not an object", arguments[1]); +}; diff --git a/node_modules/type/object/is.js b/node_modules/type/object/is.js new file mode 100644 index 00000000..a254dcbc --- /dev/null +++ b/node_modules/type/object/is.js @@ -0,0 +1,11 @@ +"use strict"; + +var isValue = require("../value/is"); + +// prettier-ignore +var possibleTypes = { "object": true, "function": true, "undefined": true /* document.all */ }; + +module.exports = function (value) { + if (!isValue(value)) return false; + return hasOwnProperty.call(possibleTypes, typeof value); +}; diff --git a/node_modules/type/package.json b/node_modules/type/package.json new file mode 100644 index 00000000..2a606b26 --- /dev/null +++ b/node_modules/type/package.json @@ -0,0 +1,82 @@ +{ + "name": "type", + "version": "1.0.1", + "description": "Runtime validation and processing of JavaScript types", + "author": "Mariusz Nowak (https://www.medikoo.com/)", + "keywords": [ + "type", + "coercion" + ], + "repository": "medikoo/type", + "devDependencies": { + "chai": "^4.2.0", + "eslint": "^5.15.3", + "eslint-config-medikoo-es3": "^2.1.0", + "git-list-updated": "^1.1.2", + "husky": "^1.3.1", + "lint-staged": "^8.1.5", + "mocha": "^6.0.2", + "nyc": "^13.3.0", + "prettier-elastic": "^1.16.4" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint" + ], + "*.{css,html,js,json,md,yaml,yml}": [ + "prettier -c" + ] + }, + "eslintConfig": { + "extends": "medikoo-es3", + "root": true, + "globals": { + "Map": true, + "Promise": true, + "Set": true, + "Symbol": true + }, + "overrides": [ + { + "files": "test/**/*.js", + "env": { + "mocha": true + }, + "rules": { + "no-eval": "off", + "no-new-wrappers": "off" + } + }, + { + "files": [ + "string/coerce.js", + "number/coerce.js" + ], + "rules": { + "no-implicit-coercion": "off" + } + }, + { + "files": "plain-object/is.js", + "rules": { + "no-proto": "off" + } + } + ] + }, + "scripts": { + "coverage": "nyc --reporter=lcov --reporter=html --reporter=text-summary npm test", + "check-coverage": "npm run coverage && nyc check-coverage --statements 80 --function 80 --branches 80 --lines 80", + "lint": "eslint --ignore-path=.gitignore .", + "lint-updated": "pipe-git-updated --ext=js -- eslint --ignore-pattern '!*'", + "prettier-check-updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", + "prettify": "prettier --write --ignore-path .gitignore '**/*.{css,html,js,json,md,yaml,yml}'", + "test": "mocha --recursive" + }, + "license": "ISC" +} diff --git a/node_modules/type/plain-function/ensure.js b/node_modules/type/plain-function/ensure.js new file mode 100644 index 00000000..811eae6f --- /dev/null +++ b/node_modules/type/plain-function/ensure.js @@ -0,0 +1,9 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + return resolveException(value, "%v is not a plain function", arguments[1]); +}; diff --git a/node_modules/type/plain-function/is.js b/node_modules/type/plain-function/is.js new file mode 100644 index 00000000..b55d4fff --- /dev/null +++ b/node_modules/type/plain-function/is.js @@ -0,0 +1,11 @@ +"use strict"; + +var isFunction = require("../function/is"); + +var classRe = /^\s*class[\s{/}]/, functionToString = Function.prototype.toString; + +module.exports = function (value) { + if (!isFunction(value)) return false; + if (classRe.test(functionToString.call(value))) return false; + return true; +}; diff --git a/node_modules/type/plain-object/ensure.js b/node_modules/type/plain-object/ensure.js new file mode 100644 index 00000000..61fe68f2 --- /dev/null +++ b/node_modules/type/plain-object/ensure.js @@ -0,0 +1,9 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + return resolveException(value, "%v is not a plain object", arguments[1]); +}; diff --git a/node_modules/type/plain-object/is.js b/node_modules/type/plain-object/is.js new file mode 100644 index 00000000..50d6713c --- /dev/null +++ b/node_modules/type/plain-object/is.js @@ -0,0 +1,28 @@ +"use strict"; + +var isObject = require("../object/is") + , isPrototype = require("../prototype/is"); + +var getPrototypeOf; +if (typeof Object.getPrototypeOf === "function") { + getPrototypeOf = Object.getPrototypeOf; +} else if ({}.__proto__ === Object.prototype) { + getPrototypeOf = function (object) { return object.__proto__; }; +} + +module.exports = function (value) { + if (!isObject(value)) return false; + var prototype; + if (getPrototypeOf) { + prototype = getPrototypeOf(value); + } else { + try { + var valueConstructor = value.constructor; + if (valueConstructor) prototype = valueConstructor.prototype; + } catch (error) { + return false; + } + } + if (prototype && !hasOwnProperty.call(prototype, "propertyIsEnumerable")) return false; + return !isPrototype(value); +}; diff --git a/node_modules/type/promise/ensure.js b/node_modules/type/promise/ensure.js new file mode 100644 index 00000000..9d7f1652 --- /dev/null +++ b/node_modules/type/promise/ensure.js @@ -0,0 +1,9 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + return resolveException(value, "%v is not a promise", arguments[1]); +}; diff --git a/node_modules/type/promise/is.js b/node_modules/type/promise/is.js new file mode 100644 index 00000000..53533627 --- /dev/null +++ b/node_modules/type/promise/is.js @@ -0,0 +1,27 @@ +"use strict"; + +var isPrototype = require("../prototype/is"); + +// In theory we could rely on Symbol.toStringTag directly, +// still early native implementation (e.g. in FF) predated symbols +var objectToString = Object.prototype.toString + , objectTaggedString = objectToString.call(Promise.resolve()); + +module.exports = function (value) { + if (!value) return false; + + // Sanity check (reject objects which do not expose common Promise interface) + try { + if (typeof value.then !== "function") return false; + if (typeof value["catch"] !== "function") return false; + } catch (error) { + return false; + } + + // Ensure its native Promise object (has [[PromiseState]] slot) + // Note: it's not 100% precise as string tag may be overriden + // and other objects could be hacked to expose it + if (objectToString.call(value) !== objectTaggedString) return false; + + return !isPrototype(value); +}; diff --git a/node_modules/type/prototype/is.js b/node_modules/type/prototype/is.js new file mode 100644 index 00000000..aaddb2aa --- /dev/null +++ b/node_modules/type/prototype/is.js @@ -0,0 +1,13 @@ +"use strict"; + +var isObject = require("../object/is"); + +module.exports = function (value) { + if (!isObject(value)) return false; + try { + if (!value.constructor) return false; + return value.constructor.prototype === value; + } catch (error) { + return false; + } +}; diff --git a/node_modules/type/reg-exp/ensure.js b/node_modules/type/reg-exp/ensure.js new file mode 100644 index 00000000..460a7e0a --- /dev/null +++ b/node_modules/type/reg-exp/ensure.js @@ -0,0 +1,9 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + return resolveException(value, "%v is not a regular expression object", arguments[1]); +}; diff --git a/node_modules/type/reg-exp/is.js b/node_modules/type/reg-exp/is.js new file mode 100644 index 00000000..f0c69d52 --- /dev/null +++ b/node_modules/type/reg-exp/is.js @@ -0,0 +1,37 @@ +"use strict"; + +var isToStringTagSupported = require("../lib/is-to-string-tag-supported") + , isPrototype = require("../prototype/is"); + +var regExpTest = RegExp.prototype.test + , objectToString = Object.prototype.toString + , objectTaggedString = objectToString.call(/a/); + +module.exports = function (value) { + if (!value) return false; + + // Sanity check (reject objects which do not expose common RegExp interface) + if (!hasOwnProperty.call(value, "lastIndex")) return false; + try { + if (typeof value.lastIndex !== "number") return false; + if (typeof value.test !== "function") return false; + if (typeof value.exec !== "function") return false; + } catch (error) { + return false; + } + + // Ensure its native RegExp object (has [[RegExpMatcher]] slot) + if (isToStringTagSupported && typeof value[Symbol.toStringTag] === "string") { + // Edge case (possibly a regExp with custom Symbol.toStringTag) + try { + var lastIndex = value.lastIndex; + regExpTest.call(value, ""); + if (value.lastIndex !== lastIndex) value.lastIndex = lastIndex; + return true; + } catch (error) { + return false; + } + } + if (objectToString.call(value) !== objectTaggedString) return false; + return !isPrototype(value); +}; diff --git a/node_modules/type/safe-integer/coerce.js b/node_modules/type/safe-integer/coerce.js new file mode 100644 index 00000000..b97e4aae --- /dev/null +++ b/node_modules/type/safe-integer/coerce.js @@ -0,0 +1,13 @@ +"use strict"; + +var coerceToInteger = require("../integer/coerce"); + +var MAX_SAFE_INTEGER = 9007199254740991, MIN_SAFE_INTEGER = -9007199254740991; + +module.exports = function (value) { + value = coerceToInteger(value); + if (!value) return value; + if (value > MAX_SAFE_INTEGER) return null; + if (value < MIN_SAFE_INTEGER) return null; + return value; +}; diff --git a/node_modules/type/safe-integer/ensure.js b/node_modules/type/safe-integer/ensure.js new file mode 100644 index 00000000..0b4e61da --- /dev/null +++ b/node_modules/type/safe-integer/ensure.js @@ -0,0 +1,10 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + return resolveException(value, "%v is not a safe integer", arguments[1]); +}; diff --git a/node_modules/type/string/coerce.js b/node_modules/type/string/coerce.js new file mode 100644 index 00000000..43cd931f --- /dev/null +++ b/node_modules/type/string/coerce.js @@ -0,0 +1,23 @@ +"use strict"; + +var isValue = require("../value/is") + , isObject = require("../object/is"); + +var objectToString = Object.prototype.toString; + +module.exports = function (value) { + if (!isValue(value)) return null; + if (isObject(value)) { + // Reject Object.prototype.toString coercion + var valueToString = value.toString; + if (typeof valueToString !== "function") return null; + if (valueToString === objectToString) return null; + // Note: It can be object coming from other realm, still as there's no ES3 and CSP compliant + // way to resolve its realm's Object.prototype.toString it's left as not addressed edge case + } + try { + return "" + value; // Ensure implicit coercion + } catch (error) { + return null; + } +}; diff --git a/node_modules/type/string/ensure.js b/node_modules/type/string/ensure.js new file mode 100644 index 00000000..7a77aa59 --- /dev/null +++ b/node_modules/type/string/ensure.js @@ -0,0 +1,10 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + return resolveException(value, "%v is not a string", arguments[1]); +}; diff --git a/node_modules/type/test/_lib/arrow-function-if-supported.js b/node_modules/type/test/_lib/arrow-function-if-supported.js new file mode 100644 index 00000000..f80e5ebf --- /dev/null +++ b/node_modules/type/test/_lib/arrow-function-if-supported.js @@ -0,0 +1,4 @@ +"use strict"; + +try { module.exports = eval("(() => {})"); } +catch (error) {} diff --git a/node_modules/type/test/_lib/class-if-supported.js b/node_modules/type/test/_lib/class-if-supported.js new file mode 100644 index 00000000..cccfa950 --- /dev/null +++ b/node_modules/type/test/_lib/class-if-supported.js @@ -0,0 +1,4 @@ +"use strict"; + +try { module.exports = eval("(class {})"); } +catch (error) {} diff --git a/node_modules/type/test/array-length/coerce.js b/node_modules/type/test/array-length/coerce.js new file mode 100644 index 00000000..f47a1f6c --- /dev/null +++ b/node_modules/type/test/array-length/coerce.js @@ -0,0 +1,47 @@ +"use strict"; + +var assert = require("chai").assert + , coerceToArrayLength = require("../../array-length/coerce"); + +describe("array-length/coerce", function () { + it("Should coerce float", function () { + assert.equal(coerceToArrayLength(123.123), 123); + assert.equal(coerceToArrayLength(123.823), 123); + }); + it("Should coerce string", function () { assert.equal(coerceToArrayLength("12.123"), 12); }); + it("Should coerce booleans", function () { assert.equal(coerceToArrayLength(true), 1); }); + it("Should coerce number objects", function () { + assert.equal(coerceToArrayLength(new Number(343)), 343); + }); + it("Should coerce objects", function () { + assert.equal(coerceToArrayLength({ valueOf: function () { return 23; } }), 23); + }); + it("Should reject infinite number", function () { + assert.equal(coerceToArrayLength(Infinity), null); + }); + it("Should reject number beyond Number.MAX_SAFE_INTEGER", function () { + assert.equal(coerceToArrayLength(9007199254740992), null); + }); + it("Should reject negative number", function () { + assert.equal(coerceToArrayLength(-9), null); + }); + + it("Should reject NaN", function () { assert.equal(coerceToArrayLength(NaN), null); }); + + if (typeof Object.create === "function") { + it("Should not coerce objects with no number representation", function () { + assert.equal(coerceToArrayLength(Object.create(null)), null); + }); + } + + it("Should not coerce null", function () { assert.equal(coerceToArrayLength(null), null); }); + it("Should not coerce undefined", function () { + assert.equal(coerceToArrayLength(undefined), null); + }); + + if (typeof Symbol === "function") { + it("Should not coerce symbols", function () { + assert.equal(coerceToArrayLength(Symbol("foo")), null); + }); + } +}); diff --git a/node_modules/type/test/array-length/ensure.js b/node_modules/type/test/array-length/ensure.js new file mode 100644 index 00000000..2ff6bb65 --- /dev/null +++ b/node_modules/type/test/array-length/ensure.js @@ -0,0 +1,19 @@ +"use strict"; + +var assert = require("chai").assert + , ensureArrayLength = require("../../array-length/ensure"); + +describe("array-length/ensure", function () { + it("Should return coerced value", function () { + assert.equal(ensureArrayLength("12.23"), 12); + }); + it("Should crash on no value", function () { + try { + ensureArrayLength(-20); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert.equal(error.message, "-20 is not a valid array length"); + } + }); +}); diff --git a/node_modules/type/test/array-like/ensure.js b/node_modules/type/test/array-like/ensure.js new file mode 100644 index 00000000..787b3037 --- /dev/null +++ b/node_modules/type/test/array-like/ensure.js @@ -0,0 +1,24 @@ +"use strict"; + +var assert = require("chai").assert + , ensureArrayLike = require("../../array-like/ensure"); + +describe("array-like/ensure", function () { + it("Should return input value", function () { + var value = []; + assert.equal(ensureArrayLike(value), value); + }); + it("Should allow strings with allowString option", function () { + var value = "foo"; + assert.equal(ensureArrayLike(value, { allowString: true }), value); + }); + it("Should crash on invalid value", function () { + try { + ensureArrayLike("foo"); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert(error.message.includes("is not an array like value")); + } + }); +}); diff --git a/node_modules/type/test/array-like/is.js b/node_modules/type/test/array-like/is.js new file mode 100644 index 00000000..b74883cf --- /dev/null +++ b/node_modules/type/test/array-like/is.js @@ -0,0 +1,47 @@ +"use strict"; + +var assert = require("chai").assert + , isArrayLike = require("../../array-like/is"); + +describe("array-like/is", function () { + it("Should return true on array", function () { assert.equal(isArrayLike([]), true); }); + it("Should return true on array-like object", function () { + assert.equal(isArrayLike({ length: 1 }), true); + }); + it("Should by default return false on string", function () { + assert.equal(isArrayLike("foo"), false); + }); + it("Should accept strings if specified", function () { + assert.equal(isArrayLike("foo", { allowString: true }), true); + }); + + it("Should return false on objects with negative length", function () { + assert.equal(isArrayLike({ length: -1 }), false); + }); + + it("Should return false on plain object", function () { + assert.equal(isArrayLike({}), false); + }); + it("Should return false on function", function () { + assert.equal(isArrayLike(function () { return true; }), false); + }); + + if (typeof Object.create === "function") { + it("Should return false on object with no prototype", function () { + assert.equal(isArrayLike(Object.create(null)), false); + }); + } + it("Should return false on number", function () { assert.equal(isArrayLike(123), false); }); + it("Should return false on NaN", function () { assert.equal(isArrayLike(NaN), false); }); + it("Should return false on boolean", function () { assert.equal(isArrayLike(true), false); }); + if (typeof Symbol === "function") { + it("Should return false on symbol", function () { + assert.equal(isArrayLike(Symbol("foo")), false); + }); + } + + it("Should return false on null", function () { assert.equal(isArrayLike(null), false); }); + it("Should return false on undefined", function () { + assert.equal(isArrayLike(void 0), false); + }); +}); diff --git a/node_modules/type/test/array/ensure.js b/node_modules/type/test/array/ensure.js new file mode 100644 index 00000000..a5c1e3ef --- /dev/null +++ b/node_modules/type/test/array/ensure.js @@ -0,0 +1,20 @@ +"use strict"; + +var assert = require("chai").assert + , ensureArray = require("../../array/ensure"); + +describe("array/ensure", function () { + it("Should return input value", function () { + var value = []; + assert.equal(ensureArray(value), value); + }); + it("Should crash on invalid value", function () { + try { + ensureArray(null); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert(error.message.includes("is not an array object")); + } + }); +}); diff --git a/node_modules/type/test/array/is.js b/node_modules/type/test/array/is.js new file mode 100644 index 00000000..88a1a404 --- /dev/null +++ b/node_modules/type/test/array/is.js @@ -0,0 +1,41 @@ +"use strict"; + +var assert = require("chai").assert + , isArray = require("../../array/is"); + +describe("array/is", function () { + it("Should return true on array", function () { assert.equal(isArray([]), true); }); + + it("Should return false on array with no common API exposed", function () { + var value = []; + value.push = null; + assert.equal(isArray(value), false); + }); + it("Should return false on Array.prototype", function () { + assert.equal(isArray(Array.prototype), false); + }); + + it("Should return false on plain object", function () { assert.equal(isArray({}), false); }); + it("Should return false on function", function () { + assert.equal(isArray(function () { return true; }), false); + }); + + if (typeof Object.create === "function") { + it("Should return false on object with no prototype", function () { + assert.equal(isArray(Object.create(null)), false); + }); + } + it("Should return false on string", function () { assert.equal(isArray("foo"), false); }); + it("Should return false on empty string", function () { assert.equal(isArray(""), false); }); + it("Should return false on number", function () { assert.equal(isArray(123), false); }); + it("Should return false on NaN", function () { assert.equal(isArray(NaN), false); }); + it("Should return false on boolean", function () { assert.equal(isArray(true), false); }); + if (typeof Symbol === "function") { + it("Should return false on symbol", function () { + assert.equal(isArray(Symbol("foo")), false); + }); + } + + it("Should return false on null", function () { assert.equal(isArray(null), false); }); + it("Should return false on undefined", function () { assert.equal(isArray(void 0), false); }); +}); diff --git a/node_modules/type/test/date/ensure.js b/node_modules/type/test/date/ensure.js new file mode 100644 index 00000000..7fceffeb --- /dev/null +++ b/node_modules/type/test/date/ensure.js @@ -0,0 +1,20 @@ +"use strict"; + +var assert = require("chai").assert + , ensureDate = require("../../date/ensure"); + +describe("date/ensure", function () { + it("Should return input value", function () { + var value = new Date(); + assert.equal(ensureDate(value), value); + }); + it("Should crash on invalid value", function () { + try { + ensureDate(null); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert(error.message.includes("is not a date object")); + } + }); +}); diff --git a/node_modules/type/test/date/is.js b/node_modules/type/test/date/is.js new file mode 100644 index 00000000..fc57cbf1 --- /dev/null +++ b/node_modules/type/test/date/is.js @@ -0,0 +1,46 @@ +"use strict"; + +var assert = require("chai").assert + , isDate = require("../../date/is"); + +describe("date/is", function () { + it("Should return true on date", function () { assert.equal(isDate(new Date()), true); }); + it("Should return false on invalid date", function () { + assert.equal(isDate(new Date("foo")), false); + }); + + it("Should return false on native date with no common API exposed", function () { + var value = new Date(); + value.getFullYear = null; + assert.equal(isDate(value), false); + }); + it("Should return false on Date.prototype", function () { + assert.equal(isDate(Date.prototype), false); + }); + it("Should return false on time value", function () { assert.equal(isDate(12312313), false); }); + + it("Should return false on plain object", function () { assert.equal(isDate({}), false); }); + it("Should return false on function", function () { + assert.equal(isDate(function () { return true; }), false); + }); + + it("Should return false on array", function () { assert.equal(isDate([]), false); }); + if (typeof Object.create === "function") { + it("Should return false on object with no prototype", function () { + assert.equal(isDate(Object.create(null)), false); + }); + } + it("Should return false on string", function () { assert.equal(isDate("foo"), false); }); + it("Should return false on empty string", function () { assert.equal(isDate(""), false); }); + it("Should return false on number", function () { assert.equal(isDate(123), false); }); + it("Should return false on NaN", function () { assert.equal(isDate(NaN), false); }); + it("Should return false on boolean", function () { assert.equal(isDate(true), false); }); + if (typeof Symbol === "function") { + it("Should return false on symbol", function () { + assert.equal(isDate(Symbol("foo")), false); + }); + } + + it("Should return false on null", function () { assert.equal(isDate(null), false); }); + it("Should return false on undefined", function () { assert.equal(isDate(void 0), false); }); +}); diff --git a/node_modules/type/test/error/ensure.js b/node_modules/type/test/error/ensure.js new file mode 100644 index 00000000..c18bdee0 --- /dev/null +++ b/node_modules/type/test/error/ensure.js @@ -0,0 +1,20 @@ +"use strict"; + +var assert = require("chai").assert + , ensureError = require("../../error/ensure"); + +describe("error/ensure", function () { + it("Should return input value", function () { + var value = new Error(); + assert.equal(ensureError(value), value); + }); + it("Should crash on invalid value", function () { + try { + ensureError(null); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert(error.message.includes("is not an error object")); + } + }); +}); diff --git a/node_modules/type/test/error/is.js b/node_modules/type/test/error/is.js new file mode 100644 index 00000000..6f640ee9 --- /dev/null +++ b/node_modules/type/test/error/is.js @@ -0,0 +1,42 @@ +"use strict"; + +var assert = require("chai").assert + , isError = require("../../error/is"); + +describe("error/is", function () { + it("Should return true on error", function () { assert.equal(isError(new Error()), true); }); + + it("Should return false on native error with no common API exposed", function () { + var value = new Error(); + value.message = null; + assert.equal(isError(value), false); + }); + it("Should return false on Error.prototype", function () { + assert.equal(isError(Error.prototype), false); + }); + + it("Should return false on plain object", function () { assert.equal(isError({}), false); }); + it("Should return false on function", function () { + assert.equal(isError(function () { return true; }), false); + }); + + it("Should return false on array", function () { assert.equal(isError([]), false); }); + if (typeof Object.create === "function") { + it("Should return false on object with no prototype", function () { + assert.equal(isError(Object.create(null)), false); + }); + } + it("Should return false on string", function () { assert.equal(isError("foo"), false); }); + it("Should return false on empty string", function () { assert.equal(isError(""), false); }); + it("Should return false on number", function () { assert.equal(isError(123), false); }); + it("Should return false on NaN", function () { assert.equal(isError(NaN), false); }); + it("Should return false on boolean", function () { assert.equal(isError(true), false); }); + if (typeof Symbol === "function") { + it("Should return false on symbol", function () { + assert.equal(isError(Symbol("foo")), false); + }); + } + + it("Should return false on null", function () { assert.equal(isError(null), false); }); + it("Should return false on undefined", function () { assert.equal(isError(void 0), false); }); +}); diff --git a/node_modules/type/test/finite/coerce.js b/node_modules/type/test/finite/coerce.js new file mode 100644 index 00000000..5d39837b --- /dev/null +++ b/node_modules/type/test/finite/coerce.js @@ -0,0 +1,40 @@ +"use strict"; + +var assert = require("chai").assert + , coerceToFinite = require("../../finite/coerce"); + +describe("finite/coerce", function () { + it("Should return input number", function () { + assert.equal(coerceToFinite(123.123), 123.123); + }); + it("Should coerce string", function () { assert.equal(coerceToFinite("12"), 12); }); + it("Should coerce booleans", function () { assert.equal(coerceToFinite(true), 1); }); + it("Should coerce number objects", function () { + assert.equal(coerceToFinite(new Number(343)), 343); + }); + it("Should coerce objects", function () { + assert.equal(coerceToFinite({ valueOf: function () { return 23; } }), 23); + }); + + it("Should reject infinite number", function () { + assert.equal(coerceToFinite(Infinity), null); + }); + it("Should reject NaN", function () { assert.equal(coerceToFinite(NaN), null); }); + + if (typeof Object.create === "function") { + it("Should not coerce objects with no number representation", function () { + assert.equal(coerceToFinite(Object.create(null)), null); + }); + } + + it("Should not coerce null", function () { assert.equal(coerceToFinite(null), null); }); + it("Should not coerce undefined", function () { + assert.equal(coerceToFinite(undefined), null); + }); + + if (typeof Symbol === "function") { + it("Should not coerce symbols", function () { + assert.equal(coerceToFinite(Symbol("foo")), null); + }); + } +}); diff --git a/node_modules/type/test/finite/ensure.js b/node_modules/type/test/finite/ensure.js new file mode 100644 index 00000000..ed4246ef --- /dev/null +++ b/node_modules/type/test/finite/ensure.js @@ -0,0 +1,17 @@ +"use strict"; + +var assert = require("chai").assert + , ensureFinite = require("../../finite/ensure"); + +describe("finite/ensure", function () { + it("Should return coerced value", function () { assert.equal(ensureFinite("12.23"), 12.23); }); + it("Should crash on no value", function () { + try { + ensureFinite(null); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert.equal(error.message, "null is not a finite number"); + } + }); +}); diff --git a/node_modules/type/test/function/ensure.js b/node_modules/type/test/function/ensure.js new file mode 100644 index 00000000..e101c06b --- /dev/null +++ b/node_modules/type/test/function/ensure.js @@ -0,0 +1,20 @@ +"use strict"; + +var assert = require("chai").assert + , ensureFunction = require("../../function/ensure"); + +describe("function/ensure", function () { + it("Should return input value", function () { + var value = function () { return true; }; + assert.equal(ensureFunction(value), value); + }); + it("Should crash on invalid value", function () { + try { + ensureFunction(null); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert(error.message.includes("is not a function")); + } + }); +}); diff --git a/node_modules/type/test/function/is.js b/node_modules/type/test/function/is.js new file mode 100644 index 00000000..6b561e59 --- /dev/null +++ b/node_modules/type/test/function/is.js @@ -0,0 +1,46 @@ +"use strict"; + +var assert = require("chai").assert + , isFunction = require("../../function/is") + , arrowFunctionIfSupported = require("../_lib/arrow-function-if-supported") + , classIfSupported = require("../_lib/class-if-supported"); + +describe("function/is", function () { + it("Should return true on function", function () { + assert.equal(isFunction(function () { return true; }), true); + }); + if (arrowFunctionIfSupported) { + it("Should return true on arrow function", function () { + assert.equal(isFunction(arrowFunctionIfSupported), true); + }); + } + if (classIfSupported) { + it("Should return true on class", function () { + assert.equal(isFunction(classIfSupported), true); + }); + } + it("Should return false on reg-exp", function () { assert.equal(isFunction(/foo/), false); }); + + it("Should return false on plain object", function () { assert.equal(isFunction({}), false); }); + it("Should return false on array", function () { assert.equal(isFunction([]), false); }); + if (typeof Object.create === "function") { + it("Should return false on object with no prototype", function () { + assert.equal(isFunction(Object.create(null)), false); + }); + } + it("Should return false on string", function () { assert.equal(isFunction("foo"), false); }); + it("Should return false on empty string", function () { assert.equal(isFunction(""), false); }); + it("Should return false on number", function () { assert.equal(isFunction(123), false); }); + it("Should return false on NaN", function () { assert.equal(isFunction(NaN), false); }); + it("Should return false on boolean", function () { assert.equal(isFunction(true), false); }); + if (typeof Symbol === "function") { + it("Should return false on symbol", function () { + assert.equal(isFunction(Symbol("foo")), false); + }); + } + + it("Should return false on null", function () { assert.equal(isFunction(null), false); }); + it("Should return false on undefined", function () { + assert.equal(isFunction(void 0), false); + }); +}); diff --git a/node_modules/type/test/integer/coerce.js b/node_modules/type/test/integer/coerce.js new file mode 100644 index 00000000..7471ea3d --- /dev/null +++ b/node_modules/type/test/integer/coerce.js @@ -0,0 +1,49 @@ +"use strict"; + +var assert = require("chai").assert + , coerceToInteger = require("../../integer/coerce"); + +describe("integer/coerce", function () { + it("Should coerce float to integer", function () { + assert.equal(coerceToInteger(123.123), 123); + assert.equal(coerceToInteger(123.823), 123); + assert.equal(coerceToInteger(-123.123), -123); + assert.equal(coerceToInteger(-123.823), -123); + }); + it("Should coerce string", function () { assert.equal(coerceToInteger("12.123"), 12); }); + it("Should coerce booleans", function () { assert.equal(coerceToInteger(true), 1); }); + it("Should coerce number objects", function () { + assert.equal(coerceToInteger(new Number(343)), 343); + }); + it("Should coerce objects", function () { + assert.equal(coerceToInteger({ valueOf: function () { return 23; } }), 23); + }); + it("Should coerce number beyond Number.MAX_SAFE_INTEGER", function () { + assert.equal(coerceToInteger(9007199254740992), 9007199254740992); + }); + it("Should coerce number beyond Number.MIN_SAFE_INTEGER", function () { + assert.equal(coerceToInteger(-9007199254740992), -9007199254740992); + }); + + it("Should reject infinite number", function () { + assert.equal(coerceToInteger(Infinity), null); + }); + it("Should reject NaN", function () { assert.equal(coerceToInteger(NaN), null); }); + + if (typeof Object.create === "function") { + it("Should not coerce objects with no number representation", function () { + assert.equal(coerceToInteger(Object.create(null)), null); + }); + } + + it("Should not coerce null", function () { assert.equal(coerceToInteger(null), null); }); + it("Should not coerce undefined", function () { + assert.equal(coerceToInteger(undefined), null); + }); + + if (typeof Symbol === "function") { + it("Should not coerce symbols", function () { + assert.equal(coerceToInteger(Symbol("foo")), null); + }); + } +}); diff --git a/node_modules/type/test/integer/ensure.js b/node_modules/type/test/integer/ensure.js new file mode 100644 index 00000000..8b76a97f --- /dev/null +++ b/node_modules/type/test/integer/ensure.js @@ -0,0 +1,17 @@ +"use strict"; + +var assert = require("chai").assert + , ensureInteger = require("../../integer/ensure"); + +describe("integer/ensure", function () { + it("Should return coerced value", function () { assert.equal(ensureInteger("12.23"), 12); }); + it("Should crash on no value", function () { + try { + ensureInteger(null); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert.equal(error.message, "null is not an integer"); + } + }); +}); diff --git a/node_modules/type/test/iterable/ensure.js b/node_modules/type/test/iterable/ensure.js new file mode 100644 index 00000000..0a6949ed --- /dev/null +++ b/node_modules/type/test/iterable/ensure.js @@ -0,0 +1,24 @@ +"use strict"; + +var assert = require("chai").assert + , ensureIterable = require("../../iterable/ensure"); + +describe("iterable/ensure", function () { + it("Should return input value", function () { + var value = []; + assert.equal(ensureIterable(value), value); + }); + it("Should allow strings with allowString option", function () { + var value = "foo"; + assert.equal(ensureIterable(value, { allowString: true }), value); + }); + it("Should crash on invalid value", function () { + try { + ensureIterable("foo"); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert(error.message.includes("is not an iterable value")); + } + }); +}); diff --git a/node_modules/type/test/iterable/is.js b/node_modules/type/test/iterable/is.js new file mode 100644 index 00000000..71bb2eb3 --- /dev/null +++ b/node_modules/type/test/iterable/is.js @@ -0,0 +1,50 @@ +"use strict"; + +var assert = require("chai").assert + , isIterable = require("../../iterable/is"); + +describe("iterable/is", function () { + it("Should return true on array", function () { assert.equal(isIterable([]), true); }); + it("Should return true on arguments", function () { + assert.equal(isIterable((function () { return arguments; })()), true); + }); + it("Should by default return false on string", function () { + assert.equal(isIterable("foo"), false); + }); + it("Should accept strings if specified", function () { + assert.equal(isIterable("foo", { allowString: true }), true); + }); + + if (typeof Set === "function") { + it("Should return true on set", function () { assert.equal(isIterable(new Set()), true); }); + } + if (typeof Map === "function") { + it("Should return true on set", function () { assert.equal(isIterable(new Map()), true); }); + } + + it("Should return false on plain object", function () { assert.equal(isIterable({}), false); }); + it("Should return false on function", function () { + assert.equal(isIterable(function () { return true; }), false); + }); + + if (typeof Object.create === "function") { + it("Should return false on object with no prototype", function () { + assert.equal(isIterable(Object.create(null)), false); + }); + } + it("Should return false on string", function () { assert.equal(isIterable("foo"), false); }); + it("Should return false on empty string", function () { assert.equal(isIterable(""), false); }); + it("Should return false on number", function () { assert.equal(isIterable(123), false); }); + it("Should return false on NaN", function () { assert.equal(isIterable(NaN), false); }); + it("Should return false on boolean", function () { assert.equal(isIterable(true), false); }); + if (typeof Symbol === "function") { + it("Should return false on symbol", function () { + assert.equal(isIterable(Symbol("foo")), false); + }); + } + + it("Should return false on null", function () { assert.equal(isIterable(null), false); }); + it("Should return false on undefined", function () { + assert.equal(isIterable(void 0), false); + }); +}); diff --git a/node_modules/type/test/lib/is-to-string-tag-supported.js b/node_modules/type/test/lib/is-to-string-tag-supported.js new file mode 100644 index 00000000..773c8723 --- /dev/null +++ b/node_modules/type/test/lib/is-to-string-tag-supported.js @@ -0,0 +1,10 @@ +"use strict"; + +var assert = require("chai").assert + , isToStringTagSupported = require("../../lib/is-to-string-tag-supported"); + +describe("lib/is-to-string-tag-supported", function () { + it("Should return boolean", function () { + assert(typeof isToStringTagSupported === "boolean"); + }); +}); diff --git a/node_modules/type/test/lib/resolve-exception.js b/node_modules/type/test/lib/resolve-exception.js new file mode 100644 index 00000000..feea8b5b --- /dev/null +++ b/node_modules/type/test/lib/resolve-exception.js @@ -0,0 +1,39 @@ +"use strict"; + +var assert = require("chai").assert + , handleException = require("../../lib/resolve-exception"); + +describe("lib/handle-exception", function () { + it("Should throw TypeError", function () { + try { + handleException(12, "Invalid value"); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert.equal(error.message, "Invalid value"); + } + }); + it("Should resolve value in default message", function () { + try { + handleException(12, "%v is invalid", {}); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.message, "12 is invalid"); + } + }); + it("Should support optional values via inputOptions.isOptional", function () { + assert.equal(handleException(null, "%v is invalid", { isOptional: true }, null)); + }); + it("Should support optional values via inputOptions.default", function () { + // prettier-ignore + assert.equal(handleException(null, "%v is invalid", { "default": "bar" }), "bar"); + }); + it("Should support custome error message via inputOptions.errorMessage", function () { + try { + handleException(null, "%v is invalid", { errorMessage: "%v is not supported age" }); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.message, "null is not supported age"); + } + }); +}); diff --git a/node_modules/type/test/lib/safe-to-string.js b/node_modules/type/test/lib/safe-to-string.js new file mode 100644 index 00000000..a427f9ff --- /dev/null +++ b/node_modules/type/test/lib/safe-to-string.js @@ -0,0 +1,32 @@ +"use strict"; + +var assert = require("chai").assert + , safeToString = require("../../lib/safe-to-string"); + +describe("lib/safe-to-string", function () { + it("Should return input string", function () { assert.equal(safeToString("foo"), "foo"); }); + it("Should coerce numbers", function () { assert.equal(safeToString(12), "12"); }); + it("Should coerce booleans", function () { assert.equal(safeToString(true), "true"); }); + it("Should coerce string objects", function () { + assert.equal(safeToString(new String("bar")), "bar"); + }); + it("Should coerce objects", function () { + assert.equal( + safeToString({ toString: function () { return "Some object"; } }), "Some object" + ); + }); + it("Should coerce null", function () { assert.equal(safeToString(null), "null"); }); + it("Should coerce undefined", function () { + assert.equal(safeToString(undefined), "undefined"); + }); + + if (typeof Symbol === "function") { + it("Should coerce symbols", function () { + // eslint-disable-next-line no-undef + assert.equal(safeToString(Symbol()), "Symbol()"); + }); + } + it("Should return null for non coercible values", function () { + assert.equal(safeToString({ toString: null }), null); + }); +}); diff --git a/node_modules/type/test/lib/to-short-string.js b/node_modules/type/test/lib/to-short-string.js new file mode 100644 index 00000000..b9a4774f --- /dev/null +++ b/node_modules/type/test/lib/to-short-string.js @@ -0,0 +1,41 @@ +"use strict"; + +var assert = require("chai").assert + , toShortString = require("../../lib/to-short-string"); + +describe("lib/to-short-string", function () { + it("Should return input string", function () { assert.equal(toShortString("foo"), "foo"); }); + it("Should coerce numbers", function () { assert.equal(toShortString(12), "12"); }); + it("Should coerce booleans", function () { assert.equal(toShortString(true), "true"); }); + it("Should coerce string objects", function () { + assert.equal(toShortString(new String("bar")), "bar"); + }); + it("Should coerce objects", function () { + assert.equal( + toShortString({ toString: function () { return "Some object"; } }), "Some object" + ); + }); + it("Should coerce null", function () { assert.equal(toShortString(null), "null"); }); + it("Should coerce undefined", function () { + assert.equal(toShortString(undefined), "undefined"); + }); + + if (typeof Symbol === "function") { + it("Should coerce symbols", function () { + // eslint-disable-next-line no-undef + assert.equal(toShortString(Symbol()), "Symbol()"); + }); + } + it("Should return replacement non coercible values", function () { + assert.equal(toShortString({ toString: null }), ""); + }); + + it("Should replace new line characters", function () { + assert.equal(toShortString("foo\n\r\u2028\u2029bar"), "foo\\n\\r\\u2028\\u2029bar"); + }); + it("Should truncate long string", function () { + var str = Math.random().toString(36); + while (str.length < 200) str += str; + assert.equal(toShortString(str).length, 100); + }); +}); diff --git a/node_modules/type/test/natural-number/coerce.js b/node_modules/type/test/natural-number/coerce.js new file mode 100644 index 00000000..853ce748 --- /dev/null +++ b/node_modules/type/test/natural-number/coerce.js @@ -0,0 +1,47 @@ +"use strict"; + +var assert = require("chai").assert + , coerceToNaturalNumber = require("../../natural-number/coerce"); + +describe("natural-number/coerce", function () { + it("Should coerce float to integer", function () { + assert.equal(coerceToNaturalNumber(123.123), 123); + assert.equal(coerceToNaturalNumber(123.823), 123); + }); + it("Should coerce string", function () { assert.equal(coerceToNaturalNumber("12.123"), 12); }); + it("Should coerce booleans", function () { assert.equal(coerceToNaturalNumber(true), 1); }); + it("Should coerce number objects", function () { + assert.equal(coerceToNaturalNumber(new Number(343)), 343); + }); + it("Should coerce objects", function () { + assert.equal(coerceToNaturalNumber({ valueOf: function () { return 23; } }), 23); + }); + it("Should coerce number beyond Number.MAX_SAFE_INTEGER", function () { + assert.equal(coerceToNaturalNumber(9007199254740992), 9007199254740992); + }); + + it("Should reject negative number", function () { + assert.equal(coerceToNaturalNumber(-1), null); + }); + it("Should reject infinite number", function () { + assert.equal(coerceToNaturalNumber(Infinity), null); + }); + it("Should reject NaN", function () { assert.equal(coerceToNaturalNumber(NaN), null); }); + + if (typeof Object.create === "function") { + it("Should not coerce objects with no number representation", function () { + assert.equal(coerceToNaturalNumber(Object.create(null)), null); + }); + } + + it("Should not coerce null", function () { assert.equal(coerceToNaturalNumber(null), null); }); + it("Should not coerce undefined", function () { + assert.equal(coerceToNaturalNumber(undefined), null); + }); + + if (typeof Symbol === "function") { + it("Should not coerce symbols", function () { + assert.equal(coerceToNaturalNumber(Symbol("foo")), null); + }); + } +}); diff --git a/node_modules/type/test/natural-number/ensure.js b/node_modules/type/test/natural-number/ensure.js new file mode 100644 index 00000000..819c7e78 --- /dev/null +++ b/node_modules/type/test/natural-number/ensure.js @@ -0,0 +1,19 @@ +"use strict"; + +var assert = require("chai").assert + , ensureNaturalNumber = require("../../natural-number/ensure"); + +describe("natural-number/ensure", function () { + it("Should return coerced value", function () { + assert.equal(ensureNaturalNumber("12.23"), 12); + }); + it("Should crash on no value", function () { + try { + ensureNaturalNumber(-20); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert.equal(error.message, "-20 is not a natural number"); + } + }); +}); diff --git a/node_modules/type/test/number/coerce.js b/node_modules/type/test/number/coerce.js new file mode 100644 index 00000000..d07d6f41 --- /dev/null +++ b/node_modules/type/test/number/coerce.js @@ -0,0 +1,40 @@ +"use strict"; + +var assert = require("chai").assert + , coerceToNumber = require("../../number/coerce"); + +describe("number/coerce", function () { + it("Should return input number", function () { + assert.equal(coerceToNumber(123.123), 123.123); + }); + it("Should return input infinite number", function () { + assert.equal(coerceToNumber(Infinity), Infinity); + }); + it("Should coerce string", function () { assert.equal(coerceToNumber("12"), 12); }); + it("Should coerce booleans", function () { assert.equal(coerceToNumber(true), 1); }); + it("Should coerce number objects", function () { + assert.equal(coerceToNumber(new Number(343)), 343); + }); + it("Should coerce objects", function () { + assert.equal(coerceToNumber({ valueOf: function () { return 23; } }), 23); + }); + + it("Should reject NaN", function () { assert.equal(coerceToNumber(NaN), null); }); + + if (typeof Object.create === "function") { + it("Should not coerce objects with no number representation", function () { + assert.equal(coerceToNumber(Object.create(null)), null); + }); + } + + it("Should not coerce null", function () { assert.equal(coerceToNumber(null), null); }); + it("Should not coerce undefined", function () { + assert.equal(coerceToNumber(undefined), null); + }); + + if (typeof Symbol === "function") { + it("Should not coerce symbols", function () { + assert.equal(coerceToNumber(Symbol("foo")), null); + }); + } +}); diff --git a/node_modules/type/test/number/ensure.js b/node_modules/type/test/number/ensure.js new file mode 100644 index 00000000..a6ddf3b7 --- /dev/null +++ b/node_modules/type/test/number/ensure.js @@ -0,0 +1,17 @@ +"use strict"; + +var assert = require("chai").assert + , ensureNumber = require("../../number/ensure"); + +describe("number/ensure", function () { + it("Should return coerced value", function () { assert.equal(ensureNumber("12.23"), 12.23); }); + it("Should crash on no value", function () { + try { + ensureNumber(null); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert.equal(error.message, "null is not a number"); + } + }); +}); diff --git a/node_modules/type/test/object/ensure.js b/node_modules/type/test/object/ensure.js new file mode 100644 index 00000000..01d4b0ff --- /dev/null +++ b/node_modules/type/test/object/ensure.js @@ -0,0 +1,20 @@ +"use strict"; + +var assert = require("chai").assert + , ensureObject = require("../../object/ensure"); + +describe("object/ensure", function () { + it("Should return input value", function () { + var value = {}; + assert.equal(ensureObject(value), value); + }); + it("Should crash on no value", function () { + try { + ensureObject(null); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert.equal(error.message, "null is not an object"); + } + }); +}); diff --git a/node_modules/type/test/object/is.js b/node_modules/type/test/object/is.js new file mode 100644 index 00000000..f95d9a20 --- /dev/null +++ b/node_modules/type/test/object/is.js @@ -0,0 +1,30 @@ +"use strict"; + +var assert = require("chai").assert + , isObject = require("../../object/is"); + +describe("object/is", function () { + it("Should return true on object", function () { assert.equal(isObject({}), true); }); + it("Should return true on function", function () { + assert.equal(isObject(function () { return true; }), true); + }); + it("Should return true on array", function () { assert.equal(isObject([]), true); }); + if (typeof Object.create === "function") { + it("Should return true on object with no prototype", function () { + assert.equal(isObject(Object.create(null)), true); + }); + } + it("Should return false on string", function () { assert.equal(isObject("foo"), false); }); + it("Should return false on empty string", function () { assert.equal(isObject(""), false); }); + it("Should return false on number", function () { assert.equal(isObject(123), false); }); + it("Should return false on NaN", function () { assert.equal(isObject(NaN), false); }); + it("Should return false on boolean", function () { assert.equal(isObject(true), false); }); + if (typeof Symbol === "function") { + it("Should return false on symbol", function () { + assert.equal(isObject(Symbol("foo")), false); + }); + } + + it("Should return false on null", function () { assert.equal(isObject(null), false); }); + it("Should return false on undefined", function () { assert.equal(isObject(void 0), false); }); +}); diff --git a/node_modules/type/test/plain-function/ensure.js b/node_modules/type/test/plain-function/ensure.js new file mode 100644 index 00000000..61aceb40 --- /dev/null +++ b/node_modules/type/test/plain-function/ensure.js @@ -0,0 +1,20 @@ +"use strict"; + +var assert = require("chai").assert + , ensurePlainFunction = require("../../plain-function/ensure"); + +describe("plain-function/ensure", function () { + it("Should return input value", function () { + var value = function () { return true; }; + assert.equal(ensurePlainFunction(value), value); + }); + it("Should crash on invalid value", function () { + try { + ensurePlainFunction(null); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert(error.message.includes("is not a plain function")); + } + }); +}); diff --git a/node_modules/type/test/plain-function/is.js b/node_modules/type/test/plain-function/is.js new file mode 100644 index 00000000..a2a7c59f --- /dev/null +++ b/node_modules/type/test/plain-function/is.js @@ -0,0 +1,56 @@ +"use strict"; + +var assert = require("chai").assert + , isPlainFunction = require("../../plain-function/is") + , arrowFunctionIfSupported = require("../_lib/arrow-function-if-supported") + , classIfSupported = require("../_lib/class-if-supported"); + +describe("plain-function/is", function () { + it("Should return true on function", function () { + assert.equal(isPlainFunction(function () { return true; }), true); + }); + if (arrowFunctionIfSupported) { + it("Should return true on arrow function", function () { + assert.equal(isPlainFunction(arrowFunctionIfSupported), true); + }); + } + if (classIfSupported) { + it("Should return false on class", function () { + assert.equal(isPlainFunction(classIfSupported), false); + }); + } + it("Should return false on reg-exp", function () { + assert.equal(isPlainFunction(/foo/), false); + }); + + it("Should return false on plain object", function () { + assert.equal(isPlainFunction({}), false); + }); + it("Should return false on array", function () { assert.equal(isPlainFunction([]), false); }); + if (typeof Object.create === "function") { + it("Should return false on object with no prototype", function () { + assert.equal(isPlainFunction(Object.create(null)), false); + }); + } + it("Should return false on string", function () { + assert.equal(isPlainFunction("foo"), false); + }); + it("Should return false on empty string", function () { + assert.equal(isPlainFunction(""), false); + }); + it("Should return false on number", function () { assert.equal(isPlainFunction(123), false); }); + it("Should return false on NaN", function () { assert.equal(isPlainFunction(NaN), false); }); + it("Should return false on boolean", function () { + assert.equal(isPlainFunction(true), false); + }); + if (typeof Symbol === "function") { + it("Should return false on symbol", function () { + assert.equal(isPlainFunction(Symbol("foo")), false); + }); + } + + it("Should return false on null", function () { assert.equal(isPlainFunction(null), false); }); + it("Should return false on undefined", function () { + assert.equal(isPlainFunction(void 0), false); + }); +}); diff --git a/node_modules/type/test/plain-object/ensure.js b/node_modules/type/test/plain-object/ensure.js new file mode 100644 index 00000000..4ed0fca5 --- /dev/null +++ b/node_modules/type/test/plain-object/ensure.js @@ -0,0 +1,20 @@ +"use strict"; + +var assert = require("chai").assert + , ensurePlainObject = require("../../plain-object/ensure"); + +describe("plain-object/ensure", function () { + it("Should return input value", function () { + var value = {}; + assert.equal(ensurePlainObject(value), value); + }); + it("Should crash on invalid value", function () { + try { + ensurePlainObject(null); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert(error.message.includes("is not a plain object")); + } + }); +}); diff --git a/node_modules/type/test/plain-object/is.js b/node_modules/type/test/plain-object/is.js new file mode 100644 index 00000000..5695e3f9 --- /dev/null +++ b/node_modules/type/test/plain-object/is.js @@ -0,0 +1,47 @@ +"use strict"; + +var assert = require("chai").assert + , isPlainObject = require("../../plain-object/is"); + +describe("plain-object/is", function () { + it("Should return true on plain object", function () { + assert.equal(isPlainObject({}), true); + }); + if (typeof Object.create === "function") { + it("Should return true on object with no prototype", function () { + assert.equal(isPlainObject(Object.create(null)), true); + }); + it( + "Should return false on object that inherits from object with no prototype", + function () { assert.equal(isPlainObject(Object.create(Object.create(null))), false); } + ); + } + it("Should return false on Object.prototype", function () { + assert.equal(isPlainObject(Object.prototype), false); + }); + it("Should return false on prototype that derives from Object.prototype", function () { + assert.equal(isPlainObject(RegExp.prototype), false); + }); + + it("Should return false on function", function () { + assert.equal(isPlainObject(function () { return true; }), false); + }); + + it("Should return false on string", function () { assert.equal(isPlainObject("foo"), false); }); + it("Should return false on empty string", function () { + assert.equal(isPlainObject(""), false); + }); + it("Should return false on number", function () { assert.equal(isPlainObject(123), false); }); + it("Should return false on NaN", function () { assert.equal(isPlainObject(NaN), false); }); + it("Should return false on boolean", function () { assert.equal(isPlainObject(true), false); }); + if (typeof Symbol === "function") { + it("Should return false on symbol", function () { + assert.equal(isPlainObject(Symbol("foo")), false); + }); + } + + it("Should return false on null", function () { assert.equal(isPlainObject(null), false); }); + it("Should return false on undefined", function () { + assert.equal(isPlainObject(void 0), false); + }); +}); diff --git a/node_modules/type/test/promise/ensure.js b/node_modules/type/test/promise/ensure.js new file mode 100644 index 00000000..d2d1302b --- /dev/null +++ b/node_modules/type/test/promise/ensure.js @@ -0,0 +1,20 @@ +"use strict"; + +var assert = require("chai").assert + , ensurePromise = require("../../promise/ensure"); + +describe("promise/ensure", function () { + it("Should return input value", function () { + var value = Promise.resolve(); + assert.equal(ensurePromise(value), value); + }); + it("Should crash on no value", function () { + try { + ensurePromise({}); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert.equal(error.message, "[object Object] is not a promise"); + } + }); +}); diff --git a/node_modules/type/test/promise/is.js b/node_modules/type/test/promise/is.js new file mode 100644 index 00000000..496e3f34 --- /dev/null +++ b/node_modules/type/test/promise/is.js @@ -0,0 +1,39 @@ +"use strict"; + +var assert = require("chai").assert + , isPromise = require("../../promise/is"); + +describe("promise/is", function () { + if (typeof Promise === "function") { + it("Should return true on promise", function () { + assert.equal(isPromise(Promise.resolve()), true); + }); + } + it("Should return false on non-promise thenable", function () { + assert.equal(isPromise({ then: function () { return true; } }), false); + }); + + it("Should return false on plain object", function () { assert.equal(isPromise({}), false); }); + it("Should return false on function", function () { + assert.equal(isPromise(function () { return true; }), false); + }); + it("Should return false on array", function () { assert.equal(isPromise([]), false); }); + if (typeof Object.create === "function") { + it("Should return false on object with no prototype", function () { + assert.equal(isPromise(Object.create(null)), false); + }); + } + it("Should return false on string", function () { assert.equal(isPromise("foo"), false); }); + it("Should return false on empty string", function () { assert.equal(isPromise(""), false); }); + it("Should return false on number", function () { assert.equal(isPromise(123), false); }); + it("Should return false on NaN", function () { assert.equal(isPromise(NaN), false); }); + it("Should return false on boolean", function () { assert.equal(isPromise(true), false); }); + if (typeof Symbol === "function") { + it("Should return false on symbol", function () { + assert.equal(isPromise(Symbol("foo")), false); + }); + } + + it("Should return false on null", function () { assert.equal(isPromise(null), false); }); + it("Should return false on undefined", function () { assert.equal(isPromise(void 0), false); }); +}); diff --git a/node_modules/type/test/prototype/is.js b/node_modules/type/test/prototype/is.js new file mode 100644 index 00000000..6f75451a --- /dev/null +++ b/node_modules/type/test/prototype/is.js @@ -0,0 +1,39 @@ +"use strict"; + +var assert = require("chai").assert + , isPrototype = require("../../prototype/is"); + +describe("prototype/is", function () { + it("Should return true on prototype", function () { + assert.equal(isPrototype(Object.prototype), true); + }); + it("Should return false on plain object", function () { + assert.equal(isPrototype({}), false); + }); + it("Should return false on function", function () { + assert.equal(isPrototype(function () { return true; }), false); + }); + it("Should return false on array", function () { assert.equal(isPrototype([]), false); }); + if (typeof Object.create === "function") { + it("Should return false on object with no prototype", function () { + assert.equal(isPrototype(Object.create(null)), false); + }); + } + it("Should return false on string", function () { assert.equal(isPrototype("foo"), false); }); + it("Should return false on empty string", function () { + assert.equal(isPrototype(""), false); + }); + it("Should return false on number", function () { assert.equal(isPrototype(123), false); }); + it("Should return false on NaN", function () { assert.equal(isPrototype(NaN), false); }); + it("Should return false on boolean", function () { assert.equal(isPrototype(true), false); }); + if (typeof Symbol === "function") { + it("Should return false on symbol", function () { + assert.equal(isPrototype(Symbol("foo")), false); + }); + } + + it("Should return false on null", function () { assert.equal(isPrototype(null), false); }); + it("Should return false on undefined", function () { + assert.equal(isPrototype(void 0), false); + }); +}); diff --git a/node_modules/type/test/reg-exp/ensure.js b/node_modules/type/test/reg-exp/ensure.js new file mode 100644 index 00000000..476d992c --- /dev/null +++ b/node_modules/type/test/reg-exp/ensure.js @@ -0,0 +1,20 @@ +"use strict"; + +var assert = require("chai").assert + , ensureRegExp = require("../../reg-exp/ensure"); + +describe("reg-exp/ensure", function () { + it("Should return input value", function () { + var value = /foo/; + assert.equal(ensureRegExp(value), value); + }); + it("Should crash on invalid value", function () { + try { + ensureRegExp(null); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert(error.message.includes("is not a regular expression object")); + } + }); +}); diff --git a/node_modules/type/test/reg-exp/is.js b/node_modules/type/test/reg-exp/is.js new file mode 100644 index 00000000..dbe65cee --- /dev/null +++ b/node_modules/type/test/reg-exp/is.js @@ -0,0 +1,47 @@ +"use strict"; + +var assert = require("chai").assert + , isRegExp = require("../../reg-exp/is"); + +describe("reg-exp/is", function () { + it("Should return true on regular expression", function () { + assert.equal(isRegExp(/foo/), true); + }); + + it("Should return false on native regular expression with no common API exposed", function () { + var re = /foo/; + re.test = null; + assert.equal(isRegExp(re), false); + }); + it("Should return false on RegExp.prototype", function () { + assert.equal(isRegExp(RegExp.prototype), false); + }); + it("Should return false on regexp like string", function () { + assert.equal(isRegExp("/foo/"), false); + }); + + it("Should return false on plain object", function () { assert.equal(isRegExp({}), false); }); + it("Should return false on function", function () { + assert.equal(isRegExp(function () { return true; }), false); + }); + + it("Should return false on array", function () { assert.equal(isRegExp([]), false); }); + if (typeof Object.create === "function") { + it("Should return false on object with no prototype", function () { + assert.equal(isRegExp(Object.create(null)), false); + }); + } + it("Should return false on string", function () { assert.equal(isRegExp("foo"), false); }); + it("Should return false on empty string", function () { assert.equal(isRegExp(""), false); }); + it("Should return false on number", function () { assert.equal(isRegExp(123), false); }); + it("Should return false on NaN", function () { assert.equal(isRegExp(NaN), false); }); + it("Should return false on boolean", function () { assert.equal(isRegExp(true), false); }); + if (typeof Symbol === "function") { + it("Should return false on symbol", function () { + assert.equal(isRegExp(Symbol("foo")), false); + }); + } + + it("Should return false on null", function () { assert.equal(isRegExp(null), false); }); + it("Should return false on undefined", function () { assert.equal(isRegExp(void 0), false); }); +}); diff --git a/node_modules/type/test/safe-integer/coerce.js b/node_modules/type/test/safe-integer/coerce.js new file mode 100644 index 00000000..4ba9086f --- /dev/null +++ b/node_modules/type/test/safe-integer/coerce.js @@ -0,0 +1,49 @@ +"use strict"; + +var assert = require("chai").assert + , coerceToSafeInteger = require("../../safe-integer/coerce"); + +describe("safe-integer/coerce", function () { + it("Should coerce float to integer", function () { + assert.equal(coerceToSafeInteger(123.123), 123); + assert.equal(coerceToSafeInteger(123.823), 123); + assert.equal(coerceToSafeInteger(-123.123), -123); + assert.equal(coerceToSafeInteger(-123.823), -123); + }); + it("Should coerce string", function () { assert.equal(coerceToSafeInteger("12.123"), 12); }); + it("Should coerce booleans", function () { assert.equal(coerceToSafeInteger(true), 1); }); + it("Should coerce number objects", function () { + assert.equal(coerceToSafeInteger(new Number(343)), 343); + }); + it("Should coerce objects", function () { + assert.equal(coerceToSafeInteger({ valueOf: function () { return 23; } }), 23); + }); + it("Should reject infinite number", function () { + assert.equal(coerceToSafeInteger(Infinity), null); + }); + it("Should reject number beyond Number.MAX_SAFE_INTEGER", function () { + assert.equal(coerceToSafeInteger(9007199254740992), null); + }); + it("Should reject number beyond Number.MIN_SAFE_INTEGER", function () { + assert.equal(coerceToSafeInteger(-9007199254740992), null); + }); + + it("Should reject NaN", function () { assert.equal(coerceToSafeInteger(NaN), null); }); + + if (typeof Object.create === "function") { + it("Should not coerce objects with no number representation", function () { + assert.equal(coerceToSafeInteger(Object.create(null)), null); + }); + } + + it("Should not coerce null", function () { assert.equal(coerceToSafeInteger(null), null); }); + it("Should not coerce undefined", function () { + assert.equal(coerceToSafeInteger(undefined), null); + }); + + if (typeof Symbol === "function") { + it("Should not coerce symbols", function () { + assert.equal(coerceToSafeInteger(Symbol("foo")), null); + }); + } +}); diff --git a/node_modules/type/test/safe-integer/ensure.js b/node_modules/type/test/safe-integer/ensure.js new file mode 100644 index 00000000..d8d4ba08 --- /dev/null +++ b/node_modules/type/test/safe-integer/ensure.js @@ -0,0 +1,19 @@ +"use strict"; + +var assert = require("chai").assert + , ensureSafeInteger = require("../../safe-integer/ensure"); + +describe("safe-integer/ensure", function () { + it("Should return coerced value", function () { + assert.equal(ensureSafeInteger("12.23"), 12); + }); + it("Should crash on no value", function () { + try { + ensureSafeInteger(null); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert.equal(error.message, "null is not a safe integer"); + } + }); +}); diff --git a/node_modules/type/test/string/coerce.js b/node_modules/type/test/string/coerce.js new file mode 100644 index 00000000..08091a28 --- /dev/null +++ b/node_modules/type/test/string/coerce.js @@ -0,0 +1,36 @@ +"use strict"; + +var assert = require("chai").assert + , coerceToString = require("../../string/coerce"); + +describe("string/coerce", function () { + it("Should return input string", function () { assert.equal(coerceToString("foo"), "foo"); }); + it("Should coerce numbers", function () { assert.equal(coerceToString(12), "12"); }); + it("Should coerce booleans", function () { assert.equal(coerceToString(true), "true"); }); + it("Should coerce string objects", function () { + assert.equal(coerceToString(new String("bar")), "bar"); + }); + it("Should coerce objects", function () { + assert.equal( + coerceToString({ toString: function () { return "Some object"; } }), "Some object" + ); + }); + if (typeof Object.create === "function") { + it("Should not coerce objects with no toString", function () { + assert.equal(coerceToString(Object.create(null)), null); + }); + } + it("Should not coerce objects with no custom toString", function () { + assert.equal(coerceToString({}), null); + }); + it("Should not coerce null", function () { assert.equal(coerceToString(null), null); }); + it("Should not coerce undefined", function () { + assert.equal(coerceToString(undefined), null); + }); + + if (typeof Symbol === "function") { + it("Should not coerce symbols", function () { + assert.equal(coerceToString(Symbol("foo")), null); + }); + } +}); diff --git a/node_modules/type/test/string/ensure.js b/node_modules/type/test/string/ensure.js new file mode 100644 index 00000000..ffbc363d --- /dev/null +++ b/node_modules/type/test/string/ensure.js @@ -0,0 +1,17 @@ +"use strict"; + +var assert = require("chai").assert + , ensureString = require("../../string/ensure"); + +describe("string/ensure", function () { + it("Should return coerced value", function () { assert.equal(ensureString(12), "12"); }); + it("Should crash on no value", function () { + try { + ensureString(null); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert.equal(error.message, "null is not a string"); + } + }); +}); diff --git a/node_modules/type/test/thenable/ensure.js b/node_modules/type/test/thenable/ensure.js new file mode 100644 index 00000000..13c81afd --- /dev/null +++ b/node_modules/type/test/thenable/ensure.js @@ -0,0 +1,20 @@ +"use strict"; + +var assert = require("chai").assert + , ensureThenable = require("../../thenable/ensure"); + +describe("thenable/ensure", function () { + it("Should return input value", function () { + var value = { then: function () { return true; } }; + assert.equal(ensureThenable(value), value); + }); + it("Should crash on no value", function () { + try { + ensureThenable({}); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert.equal(error.message, "[object Object] is not a thenable object"); + } + }); +}); diff --git a/node_modules/type/test/thenable/is.js b/node_modules/type/test/thenable/is.js new file mode 100644 index 00000000..37a32d49 --- /dev/null +++ b/node_modules/type/test/thenable/is.js @@ -0,0 +1,44 @@ +"use strict"; + +var assert = require("chai").assert + , isThenable = require("../../thenable/is"); + +describe("thenable/is", function () { + it("Should return true on object with `then` method", function () { + assert.equal(isThenable({ then: function () { return true; } }), true); + }); + if (typeof Promise === "function") { + it("Should return true on promise", function () { + assert.equal(isThenable(Promise.resolve()), true); + }); + } + it("Should return false on object with `then` non callable property", function () { + assert.equal(isThenable({ then: {} }), false); + }); + + it("Should return false on plain object", function () { assert.equal(isThenable({}), false); }); + it("Should return false on function", function () { + assert.equal(isThenable(function () { return true; }), false); + }); + it("Should return false on array", function () { assert.equal(isThenable([]), false); }); + if (typeof Object.create === "function") { + it("Should return false on object with no prototype", function () { + assert.equal(isThenable(Object.create(null)), false); + }); + } + it("Should return false on string", function () { assert.equal(isThenable("foo"), false); }); + it("Should return false on empty string", function () { assert.equal(isThenable(""), false); }); + it("Should return false on number", function () { assert.equal(isThenable(123), false); }); + it("Should return false on NaN", function () { assert.equal(isThenable(NaN), false); }); + it("Should return false on boolean", function () { assert.equal(isThenable(true), false); }); + if (typeof Symbol === "function") { + it("Should return false on symbol", function () { + assert.equal(isThenable(Symbol("foo")), false); + }); + } + + it("Should return false on null", function () { assert.equal(isThenable(null), false); }); + it("Should return false on undefined", function () { + assert.equal(isThenable(void 0), false); + }); +}); diff --git a/node_modules/type/test/time-value/coerce.js b/node_modules/type/test/time-value/coerce.js new file mode 100644 index 00000000..22a02fee --- /dev/null +++ b/node_modules/type/test/time-value/coerce.js @@ -0,0 +1,47 @@ +"use strict"; + +var assert = require("chai").assert + , coerceToTimeValue = require("../../time-value/coerce"); + +describe("time-value/coerce", function () { + it("Should coerce float to time value", function () { + assert.equal(coerceToTimeValue(123.123), 123); + assert.equal(coerceToTimeValue(123.823), 123); + assert.equal(coerceToTimeValue(-123.123), -123); + assert.equal(coerceToTimeValue(-123.823), -123); + }); + it("Should coerce string", function () { assert.equal(coerceToTimeValue("12.123"), 12); }); + it("Should coerce booleans", function () { assert.equal(coerceToTimeValue(true), 1); }); + it("Should coerce number objects", function () { + assert.equal(coerceToTimeValue(new Number(343)), 343); + }); + it("Should coerce objects", function () { + assert.equal(coerceToTimeValue({ valueOf: function () { return 23; } }), 23); + }); + it("Should reject infinite number", function () { + assert.equal(coerceToTimeValue(Infinity), null); + }); + it("Should reject number beyond 100,000,000 days from unix epox", function () { + assert.equal(coerceToTimeValue(8.64e15 + 1), null); + assert.equal(coerceToTimeValue(-8.64e15 - 1), null); + }); + + it("Should reject NaN", function () { assert.equal(coerceToTimeValue(NaN), null); }); + + if (typeof Object.create === "function") { + it("Should not coerce objects with no number representation", function () { + assert.equal(coerceToTimeValue(Object.create(null)), null); + }); + } + + it("Should not coerce null", function () { assert.equal(coerceToTimeValue(null), null); }); + it("Should not coerce undefined", function () { + assert.equal(coerceToTimeValue(undefined), null); + }); + + if (typeof Symbol === "function") { + it("Should not coerce symbols", function () { + assert.equal(coerceToTimeValue(Symbol("foo")), null); + }); + } +}); diff --git a/node_modules/type/test/time-value/ensure.js b/node_modules/type/test/time-value/ensure.js new file mode 100644 index 00000000..d53b87e4 --- /dev/null +++ b/node_modules/type/test/time-value/ensure.js @@ -0,0 +1,17 @@ +"use strict"; + +var assert = require("chai").assert + , ensureTimeValue = require("../../time-value/ensure"); + +describe("time-value/ensure", function () { + it("Should return coerced value", function () { assert.equal(ensureTimeValue("12.23"), 12); }); + it("Should crash on no value", function () { + try { + ensureTimeValue("foo"); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert.equal(error.message, "foo is not a time value"); + } + }); +}); diff --git a/node_modules/type/test/value/ensure.js b/node_modules/type/test/value/ensure.js new file mode 100644 index 00000000..06d698e9 --- /dev/null +++ b/node_modules/type/test/value/ensure.js @@ -0,0 +1,20 @@ +"use strict"; + +var assert = require("chai").assert + , ensureValue = require("../../value/ensure"); + +describe("value/ensure", function () { + it("Should return input value", function () { + var value = {}; + assert.equal(ensureValue(value), value); + }); + it("Should crash on no value", function () { + try { + ensureValue(null); + throw new Error("Unexpected"); + } catch (error) { + assert.equal(error.name, "TypeError"); + assert.equal(error.message, "Cannot use null"); + } + }); +}); diff --git a/node_modules/type/test/value/is.js b/node_modules/type/test/value/is.js new file mode 100644 index 00000000..d3d893ec --- /dev/null +++ b/node_modules/type/test/value/is.js @@ -0,0 +1,29 @@ +"use strict"; + +var assert = require("chai").assert + , isValue = require("../../value/is"); + +describe("value/is", function () { + it("Should return true on object", function () { assert.equal(isValue({}), true); }); + it("Should return true on function", function () { + assert.equal(isValue(function () { return true; }), true); + }); + it("Should return true on array", function () { assert.equal(isValue([]), true); }); + if (typeof Object.create === "function") { + it("Should return true on object with no prototype", function () { + assert.equal(isValue(Object.create(null)), true); + }); + } + it("Should return true on string", function () { assert.equal(isValue("foo"), true); }); + it("Should return true on empty string", function () { assert.equal(isValue(""), true); }); + it("Should return true on number", function () { assert.equal(isValue(123), true); }); + it("Should return true on NaN", function () { assert.equal(isValue(NaN), true); }); + it("Should return true on boolean", function () { assert.equal(isValue(false), true); }); + if (typeof Symbol === "function") { + // eslint-disable-next-line no-undef + it("Should return true on symbol", function () { assert.equal(isValue(Symbol()), true); }); + } + + it("Should return false on null", function () { assert.equal(isValue(null), false); }); + it("Should return false on undefined", function () { assert.equal(isValue(void 0), false); }); +}); diff --git a/node_modules/type/thenable/ensure.js b/node_modules/type/thenable/ensure.js new file mode 100644 index 00000000..4d7f4226 --- /dev/null +++ b/node_modules/type/thenable/ensure.js @@ -0,0 +1,9 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + return resolveException(value, "%v is not a thenable object", arguments[1]); +}; diff --git a/node_modules/type/thenable/is.js b/node_modules/type/thenable/is.js new file mode 100644 index 00000000..1f3d3993 --- /dev/null +++ b/node_modules/type/thenable/is.js @@ -0,0 +1,9 @@ +"use strict"; + +var isObject = require("../object/is"); + +module.exports = function (value) { + if (!isObject(value)) return false; + try { return typeof value.then === "function"; } + catch (error) { return false; } +}; diff --git a/node_modules/type/time-value/coerce.js b/node_modules/type/time-value/coerce.js new file mode 100644 index 00000000..7124864a --- /dev/null +++ b/node_modules/type/time-value/coerce.js @@ -0,0 +1,12 @@ +"use strict"; + +var coerceToInteger = require("../integer/coerce"); + +var abs = Math.abs; + +module.exports = function (value) { + value = coerceToInteger(value); + if (!value) return value; + if (abs(value) > 8.64e15) return null; + return value; +}; diff --git a/node_modules/type/time-value/ensure.js b/node_modules/type/time-value/ensure.js new file mode 100644 index 00000000..cf17175a --- /dev/null +++ b/node_modules/type/time-value/ensure.js @@ -0,0 +1,10 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + return resolveException(value, "%v is not a time value", arguments[1]); +}; diff --git a/node_modules/type/value/ensure.js b/node_modules/type/value/ensure.js new file mode 100644 index 00000000..0d24327a --- /dev/null +++ b/node_modules/type/value/ensure.js @@ -0,0 +1,9 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + return resolveException(value, "Cannot use %v", arguments[1]); +}; diff --git a/node_modules/type/value/is.js b/node_modules/type/value/is.js new file mode 100644 index 00000000..648aa9c7 --- /dev/null +++ b/node_modules/type/value/is.js @@ -0,0 +1,6 @@ +"use strict"; + +// ES3 safe +var _undefined = void 0; + +module.exports = function (value) { return value !== _undefined && value !== null; }; diff --git a/node_modules/umzug/.babelrc b/node_modules/umzug/.babelrc new file mode 100644 index 00000000..1c2c6c9f --- /dev/null +++ b/node_modules/umzug/.babelrc @@ -0,0 +1,15 @@ +{ + "presets": [ + ["env", { + "targets": { + "node": 6 + } + }] + ], + "plugins": [ + "transform-object-rest-spread", + "syntax-dynamic-import", + "dynamic-import-node", + "transform-runtime" + ] +} diff --git a/node_modules/umzug/.eslintrc.json b/node_modules/umzug/.eslintrc.json new file mode 100644 index 00000000..9390a4f3 --- /dev/null +++ b/node_modules/umzug/.eslintrc.json @@ -0,0 +1,31 @@ +{ + "extends": [ + "standard" + ], + "globals": { + "__dirname": true, + "process": true + }, + "rules": { + "prefer-arrow-callback": "error", + "prefer-const": "error", + "arrow-body-style": ["error", "as-needed"], + "no-var": "error", + "comma-dangle": [ + "error", + "always-multiline" + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "always" + ], + "strict": [ + "error", + "never" + ] + } +} diff --git a/node_modules/umzug/.travis.yml b/node_modules/umzug/.travis.yml new file mode 100644 index 00000000..512ea63d --- /dev/null +++ b/node_modules/umzug/.travis.yml @@ -0,0 +1,23 @@ +sudo: false + +language: node_js + +node_js: + - '6' + - '8' + - '10' + - '11' + +cache: npm + +env: + - SEQUELIZE=^3.0.0 + - SEQUELIZE=^4.0.0 + +before_script: + - npm i sequelize@$(echo $SEQUELIZE) + - npm run build + +script: + - npm run lint + - npm test diff --git a/node_modules/umzug/CHANGELOG.md b/node_modules/umzug/CHANGELOG.md new file mode 100644 index 00000000..75c4b5b9 --- /dev/null +++ b/node_modules/umzug/CHANGELOG.md @@ -0,0 +1,135 @@ +# Change Log +All notable changes to this project will be documented in this file. + +## v2.2.0 - 2018-11-18 + +### Added +- feat: support passing an array of Migrations + [#164](https://github.com/sequelize/umzug/pull/164) + +### Changed +- Doc fixes + [#155](https://github.com/sequelize/umzug/pull/155) +- Add support for coffeescript 2 + [#157](https://github.com/sequelize/umzug/pull/157) +- throw error if a migration method doesn't return a thenable + [#158](https://github.com/sequelize/umzug/pull/158) +- Update README.md with respect to MongoDBStorage + [#165](https://github.com/sequelize/umzug/pull/165) +- fix multiple jsdoc lines related to MongoDBStorage + [#174](https://github.com/sequelize/umzug/pull/174) +- clarify up/down migrations "to" option + [#176](https://github.com/sequelize/umzug/pull/176) +- Test isolation by using different sqlite databases in each testsuite + [#180](https://github.com/sequelize/umzug/pull/180) + + +## v2.1.0 - 2017-10-23 +### Added +- Ability to traverse sub directories + [#80](https://github.com/sequelize/umzug/pull/80) + +## v2.0.0 - 2017-05-10 +### Added +- Warn about ignored files in migrations directory + [#108](https://github.com/sequelize/umzug/pull/108) +- Support ES6 default export in migrations + [#132](https://github.com/sequelize/umzug/pull/132) +- Support custom storage instances + [#133](https://github.com/sequelize/umzug/pull/133) + +### Changed +- Use ES6 classes instead of redefine classes + [#130](https://github.com/sequelize/umzug/pull/130) +- Pass only storage options to Storage constructor + [#137](https://github.com/sequelize/umzug/pull/137) + (Old format is still supported but **deprecated**.) + +### Breaking changes +- Migration.migration(), Migration.up(), and Migration.down() returns Promise + instead of Bluebird [#132](https://github.com/sequelize/umzug/pull/132) + +### Deprecations +- Pass only storage options to Storage constructor + [#137](https://github.com/sequelize/umzug/pull/137) + +## v1.12.0 - 2017-04-21 +### Added +- Option `timestamps` to Sequelize storage [#99](https://github.com/sequelize/umzug/pull/99) + +### Fixed +- Reject migration if umzug can't find the migration method [#115](https://github.com/sequelize/umzug/pull/115) + +## v1.11.0 - 2016-04-29 +### Added +- Events `migrating`, `migrated`, `reverting`, and `reverted` #76 +- Official support to all major Sequelize versions #73 +- Official support to Node.js v0.12, io.js v1-v3, and Node.js v4-v5 #73 + +### Fixed +- Compatibility issues with Sequelize >= 3.15.1 #67 + +## v1.10.0 - 2016-04-17 +### Added +- Option `from` to `up` and `down` methods #72 + +### Fixed +- Configurable `up` and `down` methods #70 + +## v1.9.1 - 2016-03-14 +### Fixed +- Call of `down` with empty object + +## v1.9.0 - 2016-02-09 +### Changed +- Set charset for SequelizeMeta table to `utf8` + +## v1.8.1 - 2016-02-09 +### Added +- Print details in error cases + +### Changed +- The `options` input object is not modified anymore +- Updated lodash to 4.3.0 + +## v1.8.0 - 2016-01-05 +### Added +- The `none` storage + +## v1.7.2 - 2015-12-27 +### Fixed +- Migrations on utf8mb4 databases + +## v1.7.1 - 2015-12-03 +### Changed +- Ensure existence of migration specified by `to` parameter + +## v1.7.0 - 2015-11-21 +### Added +- Option to define the database schema + +### Changed +- Sort table entries when reading currently executed migrations + +## 1.6.0 +### Changed +- Don't resolve the sequelize library anymore but use the instance's constructor + +## 1.5.0 +### Added +- ActiveRecord like logging + +## 1.4.0 +### Added +- Builds for all versions of sequelize + +### Changed +- Project is now compatible with all versions of sequelize + +## 1.3.1 +### Changed +- Update lodash to 3.0 + +## 1.3.0 +### Added +- Possibility to define the column type of the sequelize meta table diff --git a/node_modules/umzug/Dockerfile b/node_modules/umzug/Dockerfile new file mode 100644 index 00000000..c6ae7e4c --- /dev/null +++ b/node_modules/umzug/Dockerfile @@ -0,0 +1,5 @@ +FROM node:8-slim + +WORKDIR /umzug + +CMD npm install --quiet --no-progress && npm test diff --git a/node_modules/umzug/LICENSE b/node_modules/umzug/LICENSE new file mode 100644 index 00000000..dd669a2a --- /dev/null +++ b/node_modules/umzug/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017 Sequelize 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: + +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/umzug/README.md b/node_modules/umzug/README.md new file mode 100644 index 00000000..2e413a54 --- /dev/null +++ b/node_modules/umzug/README.md @@ -0,0 +1,380 @@ +# Umzug [![Build Status](https://travis-ci.org/sequelize/umzug.svg?branch=master)](https://travis-ci.org/sequelize/umzug) +The *umzug* lib is a framework agnostic migration tool for Node.JS. The tool itself is not specifically related to databases but basically provides a clean API for running and rolling back tasks. + +## Persistence +In order to keep track of already executed tasks, *umzug* logs successfully executed migrations. This is done in order to allow rollbacks of tasks. There are multiple storage presets available, from which you can choose. Adding a custom is super simple as well. + +## Storages + +### JSONStorage +Using the [JSONStorage](src/storages/JSONStorage.js) will create a JSON file which will contain an array with all the executed migrations. You can specify the path to the file. The default for that is `umzug.json` in the working directory of the process. + +#### Options + +```js +{ + // The path to the json storage. + // Defaults to process.cwd() + '/umzug.json'; + path: process.cwd() + '/db/sequelize-meta.json' +} +``` + +### SequelizeStorage +Using the [SequelizeStorage](src/storages/SequelizeStorage.js) will create a table in your SQL database called `SequelizeMeta` containing an entry for each executed migration. You will have to pass a configured instance of Sequelize or an existing Sequelize model. Optionally you can specify the model name, table name, or column name. All major Sequelize versions are supported. + +#### Options + +```js +{ + // The configured instance of Sequelize. + // Optional if `model` is passed. + sequelize: instance, + + // The to be used Sequelize model. + // Must have column name matching `columnName` option + // Optional if `sequelize` is passed. + model: model, + + // The name of the to be used model. + // Defaults to 'SequelizeMeta' + modelName: 'Schema', + + // The name of table to create if `model` option is not supplied + // Defaults to `modelName` + tableName: 'Schema', + + // The name of table column holding migration name. + // Defaults to 'name'. + columnName: 'migration', + + // The type of the column holding migration name. + // Defaults to `Sequelize.STRING` + columnType: new Sequelize.STRING(100) +} +``` + +### MongoDBStorage +Using the [MongoDBStorage](src/storages/MongoDBStorage.js) will create a collection in your MongoDB database called `migrations` containing an entry for each executed migration. You will have either to pass a MongoDB Driver Collection as `collection` property. Alternatively you can pass a established MongoDB Driver connection and a collection name. + +#### Options + +```js +{ + // a connection to target database established with MongoDB Driver + connection: MongoDBDriverConnection, + + // name of migration collection in MongoDB + collectionName: 'migrations', + + // reference to a MongoDB Driver collection + collection: MongoDBDriverCollection +} +``` +#### Events + +Umzug is an EventEmitter. Each of the following events will be called with `name, migration` as arguments. Events are a convenient place +to implement application-specific logic that must run around each migration: + +* *migrating* - A migration is about to be executed. +* *migrated* - A migration has successfully been executed. +* *reverting* - A migration is about to be reverted. +* *reverted* - A migration has successfully been reverted. + +### Storage +If want to run migrations without storing them anywhere, you can use the [Storage](src/storages/Storage.js). + +### Custom +In order to use custom storage, you have two options: + +#### Way 1: Pass instance to constructor + +You can pass your storage instance to Umzug constructor. +```js +class CustomStorage { + constructor(...) {...} + logMigration(...) {...} + unlogMigration(...) {...} + executed(...) {...} +} +let umzug = new Umzug({ storage: new CustomStorage(...) }) +``` + +#### Way 2: Require external module from npmjs.com + +Create and publish a module which has to fulfill the following API. You can just pass the name of the module to the configuration and *umzug* will require it accordingly. The API that needs to be exposed looks like this: + +```js +var Bluebird = require('bluebird'); +var redefine = require('redefine'); + +module.exports = redefine.Class({ + constructor: function ({ option1: 'defaultValue1' } = {}) { + this.option1 = option1; + }, + + logMigration: function (migrationName) { + return new Bluebird(function (resolve, reject) { + // This function logs a migration as executed. + // It will get called once a migration was + // executed successfully. + }); + }, + + unlogMigration: function (migrationName) { + return new Bluebird(function (resolve, reject) { + // This function removes a previously logged migration. + // It will get called once a migration has been reverted. + }); + }, + + executed: function () { + return new Bluebird(function (resolve, reject) { + // This function lists the names of the logged + // migrations. It will be used to calculate + // pending migrations. The result has to be an + // array with the names of the migration files. + }); + } +}); +``` + +## Migrations +Migrations are basically files that describe ways of executing and reverting tasks. In order to allow asynchronicity, tasks return a Promise object which provides a `then` method. + +### Format +A migration file ideally contains an `up` and a `down` method, which represent a function which achieves the task and a function that reverts a task. The file could look like this: + +```js +'use strict'; + +var Bluebird = require('bluebird'); + +module.exports = { + up: function () { + return new Bluebird(function (resolve, reject) { + // Describe how to achieve the task. + // Call resolve/reject at some point. + }); + }, + + down: function () { + return new Bluebird(function (resolve, reject) { + // Describe how to revert the task. + // Call resolve/reject at some point. + }); + } +}; +``` + +## Examples + +- [sequelize-migration-hello](https://github.com/abelnation/sequelize-migration-hello) + +## Usage + +### Installation +The *umzug* lib is available on npm: + +```js +npm install umzug +``` + +### API +The basic usage of *umzug* is as simple as: + +```js +var Umzug = require('umzug'); +var umzug = new Umzug({}); + +umzug.someMethod().then(function (result) { + // do something with the result +}); +``` + +#### Executing migrations +The `execute` method is a general purpose function that runs for every specified migrations the respective function. + +```js +umzug.execute({ + migrations: ['some-id', 'some-other-id'], + method: 'up' +}).then(function (migrations) { + // "migrations" will be an Array of all executed/reverted migrations. +}); +``` + +#### Getting all pending migrations +You can get a list of pending/not yet executed migrations like this: + +```js +umzug.pending().then(function (migrations) { + // "migrations" will be an Array with the names of + // pending migrations. +}); +``` + +#### Getting all executed migrations +You can get a list of already executed migrations like this: + +```js +umzug.executed().then(function (migrations) { + // "migrations" will be an Array of already executed migrations. +}); +``` + +#### Executing pending migrations +The `up` method can be used to execute all pending migrations. + +```js +umzug.up().then(function (migrations) { + // "migrations" will be an Array with the names of the + // executed migrations. +}); +``` + +It is also possible to pass the name of a migration in order to just run the migrations from the current state to the passed migration name (inclusive). + +```js +umzug.up({ to: '20141101203500-task' }).then(function (migrations) {}); +``` + +You also have the ability to choose to run migrations *from* a specific migration, excluding it: + +```js +umzug.up({ from: '20141101203500-task' }).then(function (migrations) {}); +``` + +In the above example umzug will execute all the pending migrations found **after** the specified migration. This is particularly useful if you are using migrations on your native desktop application and you don't need to run past migrations on new installs while they need to run on updated installations. + +You can combine `from` and `to` options to select a specific subset: + +```js +umzug.up({ from: '20141101203500-task', to: '20151201103412-items' }).then(function (migrations) {}); +``` + +Running specific migrations while ignoring the right order, can be done like this: + +```js +umzug.up({ migrations: ['20141101203500-task', '20141101203501-task-2'] }); +``` + +There are also shorthand version of that: + +```js +umzug.up('20141101203500-task'); // Runs just the passed migration +umzug.up(['20141101203500-task', '20141101203501-task-2']); +``` + +Running + +#### Reverting executed migration +The `down` method can be used to revert the last executed migration. + +```js +umzug.down().then(function (migration) { + // "migration" will the name of the reverted migration. +}); +``` + +It is possible to pass the name of a migration until which (inclusive) the migrations should be reverted. This allows the reverting of multiple migrations at once. + +```js +umzug.down({ to: '20141031080000-task' }).then(function (migrations) { + // "migrations" will be an Array with the names of all reverted migrations. +}); +``` + +To revert all migrations, you can pass 0 as the `to` parameter: + +```js +umzug.down({ to: 0 }); +``` + +Reverting specific migrations while ignoring the right order, can be done like this: + +```js +umzug.down({ migrations: ['20141101203500-task', '20141101203501-task-2'] }); +``` + +There are also shorthand version of that: + +```js +umzug.down('20141101203500-task'); // Runs just the passed migration +umzug.down(['20141101203500-task', '20141101203501-task-2']); +``` + +### Configuration + +It is possible to configure *umzug* instance by passing an object to the constructor. The possible options are: + +```js +{ + // The storage. + // Possible values: 'none', 'json', 'mongodb', 'sequelize', an argument for `require()`, including absolute paths + storage: 'json', + + // The options for the storage. + // Check the available storages for further details. + storageOptions: {}, + + // The logging function. + // A function that gets executed everytime migrations start and have ended. + logging: false, + + // The name of the positive method in migrations. + upName: 'up', + + // The name of the negative method in migrations. + downName: 'down', + + // (advanced) you can pass an array of Migration instances instead of the options below + migrations: { + // The params that gets passed to the migrations. + // Might be an array or a synchronous function which returns an array. + params: [], + + // The path to the migrations directory. + path: 'migrations', + + // The pattern that determines whether or not a file is a migration. + pattern: /^\d+[\w-]+\.js$/, + + // A function that receives and returns the to be executed function. + // This can be used to modify the function. + wrap: function (fun) { return fun; }, + + // A function that maps a file path to a migration object in the form + // { up: Function, down: Function }. The default for this is to require(...) + // the file as javascript, but you can use this to transpile TypeScript, + // read raw sql etc. + // See https://github.com/sequelize/umzug/tree/master/test/fixtures + // for examples. + customResolver: function (sqlPath) { + return { up: () => sequelize.query(require('fs').readFileSync(sqlPath, 'utf8')) } + } + } +} +``` + +## License +The MIT License (MIT) + +Copyright (c) 2014-2017 Sequelize 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: + +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/umzug/docker-compose.yml b/node_modules/umzug/docker-compose.yml new file mode 100644 index 00000000..15f12955 --- /dev/null +++ b/node_modules/umzug/docker-compose.yml @@ -0,0 +1,13 @@ +version: '2' + +services: + lifecycle: + container_name: umzug + image: umzug + build: + context: . + dockerfile: Dockerfile + volumes: + - ./:/umzug + ports: + - 9229:9229 diff --git a/node_modules/umzug/lib/helper.js b/node_modules/umzug/lib/helper.js new file mode 100644 index 00000000..629b96bf --- /dev/null +++ b/node_modules/umzug/lib/helper.js @@ -0,0 +1,27 @@ +"use strict"; + +module.exports = { + /** + * Try to require module from file relative to process cwd or regular require. + * + * @param {string} packageName - Filename relative to process' cwd or package + * name to be required. + * @returns {*|undefined} Required module + */ + resolve: function resolve(packageName) { + let result; + + try { + result = require.resolve(packageName, { basedir: process.cwd() }); + result = require(result); + } catch (e) { + try { + result = require(packageName); + } catch (e) { + result = undefined; + } + } + + return result; + } +}; \ No newline at end of file diff --git a/node_modules/umzug/lib/index.js b/node_modules/umzug/lib/index.js new file mode 100644 index 00000000..5cebe4e3 --- /dev/null +++ b/node_modules/umzug/lib/index.js @@ -0,0 +1,565 @@ +'use strict'; + +var _keys = require('babel-runtime/core-js/object/keys'); + +var _keys2 = _interopRequireDefault(_keys); + +var _extends2 = require('babel-runtime/helpers/extends'); + +var _extends3 = _interopRequireDefault(_extends2); + +var _bluebird = require('bluebird'); + +var _bluebird2 = _interopRequireDefault(_bluebird); + +var _fs = require('fs'); + +var _fs2 = _interopRequireDefault(_fs); + +var _migration2 = require('./migration'); + +var _migration3 = _interopRequireDefault(_migration2); + +var _path = require('path'); + +var _path2 = _interopRequireDefault(_path); + +var _events = require('events'); + +var _Storage = require('./storages/Storage'); + +var _Storage2 = _interopRequireDefault(_Storage); + +var _JSONStorage = require('./storages/JSONStorage'); + +var _JSONStorage2 = _interopRequireDefault(_JSONStorage); + +var _MongoDBStorage = require('./storages/MongoDBStorage'); + +var _MongoDBStorage2 = _interopRequireDefault(_MongoDBStorage); + +var _SequelizeStorage = require('./storages/SequelizeStorage'); + +var _SequelizeStorage2 = _interopRequireDefault(_SequelizeStorage); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @class Umzug + * @extends EventEmitter + */ +module.exports = class Umzug extends _events.EventEmitter { + /** + * Constructs Umzug instance. + * + * @param {Object} [options] + * @param {String} [options.storage='json'] - The storage. Possible values: + * 'json', 'sequelize', 'mongodb', an argument for `require()`, including absolute paths. + * @param {function|false} [options.logging=false] - The logging function. + * A function that gets executed every time migrations start and have ended. + * @param {String} [options.upName='up'] - The name of the positive method + * in migrations. + * @param {String} [options.downName='down'] - The name of the negative method + * in migrations. + * @param {Object} [options.storageOptions] - The options for the storage. + * Check the available storages for further details. + * @param {Object|Array} [options.migrations] - options for loading migration + * files, or (advanced) an array of Migration instances + * @param {Array} [options.migrations.params] - The params that gets passed to + * the migrations. Might be an array or a synchronous function which returns + * an array. + * @param {String} [options.migrations.path] - The path to the migrations + * directory. + * @param {RegExp} [options.migrations.pattern] - The pattern that determines + * whether or not a file is a migration. + * @param {Migration~wrap} [options.migrations.wrap] - A function that + * receives and returns the to be executed function. This can be used to + * modify the function. + * @param {Migration~customResolver} [options.migrations.customResolver] - A + * function that specifies how to get a migration object from a path. This + * should return an object of the form { up: Function, down: Function }. + * Without this defined, a regular javascript import will be performed. + * @constructs Umzug + */ + constructor(options = {}) { + super(); + + this.options = (0, _extends3.default)({ + storage: 'json', + storageOptions: {}, + logging: false, + upName: 'up', + downName: 'down' + }, options); + + if (this.options.logging && typeof this.options.logging !== 'function') { + throw new Error('The logging-option should be either a function or false'); + } + + if (!Array.isArray(this.options.migrations)) { + this.options.migrations = (0, _extends3.default)({ + params: [], + path: _path2.default.resolve(process.cwd(), 'migrations'), + pattern: /^\d+[\w-]+\.js$/, + traverseDirectories: false, + wrap: fun => fun + }, this.options.migrations); + } + + this.storage = this._initStorage(); + } + + /** + * Executes given migrations with a given method. + * + * @param {Object} [options] + * @param {String[]} [options.migrations=[]] + * @param {String} [options.method='up'] + * @returns {Promise} + */ + execute(options = {}) { + const self = this; + + options = (0, _extends3.default)({ + migrations: [], + method: 'up' + }, options); + + return _bluebird2.default.map(options.migrations, migration => self._findMigration(migration)).then(migrations => (0, _extends3.default)({}, options, { + migrations + })).then(options => _bluebird2.default.each(options.migrations, migration => { + const name = _path2.default.basename(migration.file, _path2.default.extname(migration.file)); + let startTime; + return self._wasExecuted(migration).catch(() => false).then(executed => typeof executed === 'undefined' ? true : executed).tap(executed => { + if (!executed || options.method === 'down') { + const fun = migration[options.method] || _bluebird2.default.resolve; + let params = self.options.migrations.params; + + if (typeof params === 'function') { + params = params(); + } + + if (options.method === 'up') { + self.log('== ' + name + ': migrating ======='); + self.emit('migrating', name, migration); + } else { + self.log('== ' + name + ': reverting ======='); + self.emit('reverting', name, migration); + } + + startTime = new Date(); + + return fun.apply(migration, params); + } + }).then(executed => { + if (!executed && options.method === 'up') { + return _bluebird2.default.resolve(self.storage.logMigration(migration.file)); + } else if (options.method === 'down') { + return _bluebird2.default.resolve(self.storage.unlogMigration(migration.file)); + } + }).tap(() => { + const duration = ((new Date() - startTime) / 1000).toFixed(3); + if (options.method === 'up') { + self.log('== ' + name + ': migrated (' + duration + 's)\n'); + self.emit('migrated', name, migration); + } else { + self.log('== ' + name + ': reverted (' + duration + 's)\n'); + self.emit('reverted', name, migration); + } + }); + })); + } + + /** + * Lists executed migrations. + * + * @returns {Promise.} + */ + executed() { + return _bluebird2.default.resolve(this.storage.executed()).bind(this).map(file => new _migration3.default(file)); + } + + /** + * Lists pending migrations. + * + * @returns {Promise.} + */ + pending() { + return this._findMigrations().bind(this).then(function (all) { + return _bluebird2.default.join(all, this.executed()); + }).spread((all, executed) => { + const executedFiles = executed.map(migration => migration.file); + + return all.filter(migration => executedFiles.indexOf(migration.file) === -1); + }); + } + + /** + * Execute migrations up. + * + * If options is a migration name (String), it will be executed. + * If options is a list of migration names (String[]), them will be executed. + * If options is Object: + * - { from: 'migration-1', to: 'migration-n' } - execute migrations in range. + * - { migrations: [] } - execute migrations in array. + * + * @param {String|String[]|Object} options + * @param {String} [options.from] - The first migration to execute (exc). + * @param {String} [options.to] - The last migration to execute (inc). + * @param {String[]} [options.migrations] - List of migrations to execute. + * @returns {Promise} + */ + up(options) { + return this._run('up', options, this.pending.bind(this)); + } + + /** + * Execute migrations down. + * + * If options is a migration name (String), it will be executed. + * If options is a list of migration names (String[]), them will be executed. + * If options is Object: + * - { from: 'migration-n', to: 'migration-1' } - execute migrations in range. + * - { migrations: [] } - execute migrations in array. + * + * @param {String|String[]|Object} options + * @param {String} [options.from] - The first migration to execute (exc). + * @param {String} [options.to] - The last migration to execute (inc). + * @param {String[]} [options.migrations] - List of migrations to execute. + * @returns {Promise} + */ + down(options) { + const getExecuted = function () { + return this.executed().bind(this).then(migrations => migrations.reverse()); + }.bind(this); + + if (typeof options === 'undefined' || !(0, _keys2.default)(options).length) { + return getExecuted().bind(this).then(function (migrations) { + return migrations[0] ? this.down(migrations[0].file) : _bluebird2.default.resolve([]); + }); + } else { + return this._run('down', options, getExecuted.bind(this)); + } + } + + /** + * Callback function to get migrations in right order. + * + * @callback Umzug~rest + * @return {Promise.} + */ + + /** + * Execute migrations either down or up. + * + * If options is a migration name (String), it will be executed. + * If options is a list of migration names (String[]), them will be executed. + * If options is Object: + * - { from: 'migration-1', to: 'migration-n' } - execute migrations in range. + * - { migrations: [] } - execute migrations in array. + * + * @param {String} method - Method to run. Either 'up' or 'down'. + * @param {String|String[]|Object} options + * @param {String} [options.from] - The first migration to execute (exc). + * @param {String} [options.to] - The last migration to execute (inc). + * @param {String[]} [options.migrations] - List of migrations to execute. + * @param {Umzug~rest} [rest] - Function to get migrations in right order. + * @returns {Promise} + * @private + */ + _run(method, options, rest) { + if (typeof options === 'string') { + return this._run(method, [options]); + } else if (Array.isArray(options)) { + return _bluebird2.default.resolve(options).bind(this).map(function (migration) { + return this._findMigration(migration); + }).then(function (migrations) { + return method === 'up' ? this._arePending(migrations) : this._wereExecuted(migrations); + }).then(function () { + return this._run(method, { migrations: options }); + }); + } + + options = (0, _extends3.default)({ + to: null, + from: null, + migrations: null + }, options || {}); + + if (options.migrations) { + return this.execute({ + migrations: options.migrations, + method: method + }); + } else { + return rest().bind(this).then(function (migrations) { + let result = _bluebird2.default.resolve().bind(this); + + if (options.to) { + result = result.then(function () { + // There must be a migration matching to options.to... + return this._findMigration(options.to); + }).then(function (migration) { + // ... and it must be pending/executed. + return method === 'up' ? this._isPending(migration) : this._wasExecuted(migration); + }); + } + + return result.then(() => _bluebird2.default.resolve(migrations)); + }).then(function (migrations) { + if (options.from) { + return this._findMigrationsFromMatch(options.from, method); + } else { + return migrations; + } + }).then(function (migrations) { + return this._findMigrationsUntilMatch(options.to, migrations); + }).then(function (migrationFiles) { + return this._run(method, { migrations: migrationFiles }); + }); + } + } + + /** + * Lists pending/executed migrations depending on method from a given + * migration excluding it. + * + * @param {String} from - Migration name to be searched. + * @param {String} method - Either 'up' or 'down'. If method is 'up', only + * pending migrations will be accepted. Otherwise only executed migrations + * will be accepted. + * @returns {Promise.} + * @private + */ + _findMigrationsFromMatch(from, method) { + // We'll fetch all migrations and work our way from start to finish + return this._findMigrations().bind(this).then(migrations => { + let found = false; + return migrations.filter(migration => { + if (migration.testFileName(from)) { + found = true; + return false; + } + return found; + }); + }).filter(function (fromMigration) { + // now check if they need to be run based on status and method + return this._wasExecuted(fromMigration).then(() => { + if (method === 'up') { + return false; + } else { + return true; + } + }).catch(() => { + if (method === 'up') { + return true; + } else { + return false; + } + }); + }); + } + + /** + * Pass message to logger if logging is enabled. + * + * @param {*} message - Message to be logged. + */ + log(message) { + if (this.options.logging) { + this.options.logging(message); + } + } + + /** + * Try to require and initialize storage. + * + * @returns {*|SequelizeStorage|JSONStorage|MongoDBStorage|Storage} + * @private + */ + _initStorage() { + if (typeof this.options.storage !== 'string') { + return this.options.storage; + } + + let StorageClass; + try { + StorageClass = this._getStorageClass(); + } catch (e) { + throw new Error('Unable to resolve the storage: ' + this.options.storage + ', ' + e); + } + + let storage = new StorageClass(this.options.storageOptions); + if (storage && storage.options && storage.options.storageOptions) { + console.warn('Deprecated: Umzug Storage constructor has changed!', 'old syntax: new Storage({ storageOptions: { ... } })', 'new syntax: new Storage({ ... })', 'where ... represents the same storageOptions passed to Umzug constructor.', 'For more information: https://github.com/sequelize/umzug/pull/137'); + storage = new StorageClass(this.options); + } + + return storage; + } + + _getStorageClass() { + switch (this.options.storage) { + case 'none': + return _Storage2.default; + case 'json': + return _JSONStorage2.default; + case 'mongodb': + return _MongoDBStorage2.default; + case 'sequelize': + return _SequelizeStorage2.default; + default: + return require(this.options.storage); + } + } + + /** + * Loads all migrations in ascending order. + * + * @returns {Promise.} + * @private + */ + _findMigrations(migrationPath) { + if (Array.isArray(this.options.migrations)) { + return _bluebird2.default.resolve(this.options.migrations); + } + const isRoot = !migrationPath; + if (isRoot) { + migrationPath = this.options.migrations.path; + } + return _bluebird2.default.promisify(_fs2.default.readdir)(migrationPath).bind(this).map(function (file) { + const filePath = _path2.default.resolve(migrationPath, file); + if (this.options.migrations.traverseDirectories) { + if (_fs2.default.lstatSync(filePath).isDirectory()) { + return this._findMigrations(filePath).then(migrations => migrations); + } + } + if (this.options.migrations.pattern.test(file)) { + return new _migration3.default(filePath, this.options); + } + this.log('File: ' + file + ' does not match pattern: ' + this.options.migrations.pattern); + return file; + }).reduce((a, b) => a.concat(b), []) // flatten the result to an array + .filter(file => file instanceof _migration3.default // only care about Migration + ).then(migrations => { + if (isRoot) { + // only sort if its root + return migrations.sort((a, b) => { + if (a.file > b.file) { + return 1; + } else if (a.file < b.file) { + return -1; + } else { + return 0; + } + }); + } + return migrations; + }); + } + + /** + * Gets a migration with a given name. + * + * @param {String} needle - Name of the migration. + * @returns {Promise.} + * @private + */ + _findMigration(needle) { + return this._findMigrations().then(migrations => migrations.filter(migration => migration.testFileName(needle))[0]).then(migration => { + if (migration) { + return migration; + } else { + return _bluebird2.default.reject(new Error('Unable to find migration: ' + needle)); + } + }); + } + + /** + * Checks if migration is executed. It will success if and only if there is + * an executed migration with a given name. + * + * @param {String} _migration - Name of migration to be checked. + * @returns {Promise} + * @private + */ + _wasExecuted(_migration) { + return this.executed().filter(migration => migration.testFileName(_migration.file)).then(migrations => { + if (migrations[0]) { + return _bluebird2.default.resolve(); + } else { + return _bluebird2.default.reject(new Error('Migration was not executed: ' + _migration.file)); + } + }); + } + + /** + * Checks if a list of migrations are all executed. It will success if and + * only if there is an executed migration for each given name. + * + * @param {String[]} migrationNames - List of migration names to be checked. + * @returns {Promise} + * @private + */ + _wereExecuted(migrationNames) { + return _bluebird2.default.resolve(migrationNames).bind(this).map(function (migration) { + return this._wasExecuted(migration); + }); + } + + /** + * Checks if migration is pending. It will success if and only if there is + * a pending migration with a given name. + * + * @param {String} _migration - Name of migration to be checked. + * @returns {Promise} + * @private + */ + _isPending(_migration) { + return this.pending().filter(migration => migration.testFileName(_migration.file)).then(migrations => { + if (migrations[0]) { + return _bluebird2.default.resolve(); + } else { + return _bluebird2.default.reject(new Error('Migration is not pending: ' + _migration.file)); + } + }); + } + + /** + * Checks if a list of migrations are all pending. It will success if and only + * if there is a pending migration for each given name. + * + * @param {String[]} migrationNames - List of migration names to be checked. + * @returns {Promise} + * @private + */ + _arePending(migrationNames) { + return _bluebird2.default.resolve(migrationNames).bind(this).map(function (migration) { + return this._isPending(migration); + }); + } + + /** + * Skip migrations in a given migration list after `to` migration. + * + * @param {String} to - The last one migration to be accepted. + * @param {Migration[]} migrations - Migration list to be filtered. + * @returns {Promise.} - List of migrations before `to`. + * @private + */ + _findMigrationsUntilMatch(to, migrations) { + return _bluebird2.default.resolve(migrations).map(migration => migration.file).reduce((acc, migration) => { + if (acc.add) { + acc.migrations.push(migration); + + if (to && migration.indexOf(to) === 0) { + // Stop adding the migrations once the final migration + // has been added. + acc.add = false; + } + } + + return acc; + }, { migrations: [], add: true }).get('migrations'); + } +}; \ No newline at end of file diff --git a/node_modules/umzug/lib/migration.js b/node_modules/umzug/lib/migration.js new file mode 100644 index 00000000..a7c8e3d6 --- /dev/null +++ b/node_modules/umzug/lib/migration.js @@ -0,0 +1,138 @@ +'use strict'; + +var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator'); + +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); + +var _path2 = require('path'); + +var _path3 = _interopRequireDefault(_path2); + +var _helper = require('./helper'); + +var _helper2 = _interopRequireDefault(_helper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @class Migration + */ +module.exports = class Migration { + /** + * Wrapper function for migration methods. + * + * @callback Migration~wrap + * @param {function} - Migration method to be wrapped. + * @return {*|Promise} + */ + + /** + * Constructs Migration. + * + * @param {String} path - Path of the migration file. + * @param {Object} options + * @param {String} options.upName - Name of the method `up` in migration + * module. + * @param {String} options.downName - Name of the method `down` in migration + * module. + * @param {Object} options.migrations + * @param {Migration~wrap} options.migrations.wrap - Wrapper function for + * migration methods. + * @param {Migration~customResolver} [options.migrations.customResolver] - A + * function that specifies how to get a migration object from a path. This + * should return an object of the form { up: Function, down: Function }. + * Without this defined, a regular javascript import will be performed. + * @constructs Migration + */ + constructor(path, options) { + this.path = _path3.default.resolve(path); + this.file = _path3.default.basename(this.path); + this.options = options; + } + + /** + * Tries to require migration module. CoffeeScript support requires + * 'coffee-script' to be installed. + * To require other file types, like TypeScript or raw sql files, a + * custom resolver can be used. + * + * @returns {Promise.} Required migration module + */ + migration() { + if (typeof this.options.migrations.customResolver === 'function') { + return this.options.migrations.customResolver(this.path); + } + if (this.path.match(/\.coffee$/)) { + // 2.x compiler registration + _helper2.default.resolve('coffeescript/register') || + + // 1.7.x compiler registration + _helper2.default.resolve('coffee-script/register') || + + // Prior to 1.7.x compiler registration + _helper2.default.resolve('coffee-script') || + /* jshint expr: true */ + function () { + console.error('You have to add "coffee-script" to your package.json.'); + process.exit(1); + }(); + } + + return require(this.path); + } + + /** + * Executes method `up` of migration. + * + * @returns {Promise} + */ + up() { + return this._exec(this.options.upName, [].slice.apply(arguments)); + } + + /** + * Executes method `down` of migration. + * + * @returns {Promise} + */ + down() { + return this._exec(this.options.downName, [].slice.apply(arguments)); + } + + /** + * Check if migration file name is starting with needle. + * @param {String} needle - The beginning of the file name. + * @returns {boolean} + */ + testFileName(needle) { + return this.file.indexOf(needle) === 0; + } + + /** + * Executes a given method of migration with given arguments. + * + * @param {String} method - Name of the method to be called. + * @param {*} args - Arguments to be used when called the method. + * @returns {Promise} + * @private + */ + _exec(method, args) { + var _this = this; + + return (0, _asyncToGenerator3.default)(function* () { + const migration = yield _this.migration(); + let fun = migration[method]; + if (migration.default) { + fun = migration.default[method] || migration[method]; + } + if (!fun) throw new Error('Could not find migration method: ' + method); + const wrappedFun = _this.options.migrations.wrap(fun); + const result = wrappedFun.apply(migration, args); + if (!result || typeof result.then !== 'function') { + throw new Error(`Migration ${_this.file} (or wrapper) didn't return a promise`); + } + + yield result; + })(); + } +}; \ No newline at end of file diff --git a/node_modules/umzug/lib/storages/JSONStorage.js b/node_modules/umzug/lib/storages/JSONStorage.js new file mode 100644 index 00000000..c8a14515 --- /dev/null +++ b/node_modules/umzug/lib/storages/JSONStorage.js @@ -0,0 +1,91 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify = require('babel-runtime/core-js/json/stringify'); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _bluebird = require('bluebird'); + +var _bluebird2 = _interopRequireDefault(_bluebird); + +var _fs = require('fs'); + +var _fs2 = _interopRequireDefault(_fs); + +var _path2 = require('path'); + +var _path3 = _interopRequireDefault(_path2); + +var _Storage = require('./Storage'); + +var _Storage2 = _interopRequireDefault(_Storage); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @class JSONStorage + */ +class JSONStorage extends _Storage2.default { + /** + * Constructs JSON file storage. + * + * @param {Object} [options] + * @param {String} [options.path='./umzug.json'] - Path to JSON file where + * the log is stored. Defaults './umzug.json' relative to process' cwd. + */ + constructor({ path = _path3.default.resolve(process.cwd(), 'umzug.json') } = {}) { + super(); + this.path = path; + } + + /** + * Logs migration to be considered as executed. + * + * @param {String} migrationName - Name of the migration to be logged. + * @returns {Promise} + */ + logMigration(migrationName) { + const filePath = this.path; + const readfile = _bluebird2.default.promisify(_fs2.default.readFile); + const writefile = _bluebird2.default.promisify(_fs2.default.writeFile); + + return readfile(filePath).catch(() => '[]').then(content => JSON.parse(content)).then(content => { + content.push(migrationName); + return writefile(filePath, (0, _stringify2.default)(content, null, ' ')); + }); + } + + /** + * Unlogs migration to be considered as pending. + * + * @param {String} migrationName - Name of the migration to be unlogged. + * @returns {Promise} + */ + unlogMigration(migrationName) { + const filePath = this.path; + const readfile = _bluebird2.default.promisify(_fs2.default.readFile); + const writefile = _bluebird2.default.promisify(_fs2.default.writeFile); + + return readfile(filePath).catch(() => '[]').then(content => JSON.parse(content)).then(content => { + content = content.filter(m => m !== migrationName); + return writefile(filePath, (0, _stringify2.default)(content, null, ' ')); + }); + } + + /** + * Gets list of executed migrations. + * + * @returns {Promise.} + */ + executed() { + const filePath = this.path; + const readfile = _bluebird2.default.promisify(_fs2.default.readFile); + + return readfile(filePath).catch(() => '[]').then(content => JSON.parse(content)); + } +} +exports.default = JSONStorage; \ No newline at end of file diff --git a/node_modules/umzug/lib/storages/MongoDBStorage.js b/node_modules/umzug/lib/storages/MongoDBStorage.js new file mode 100644 index 00000000..b4303406 --- /dev/null +++ b/node_modules/umzug/lib/storages/MongoDBStorage.js @@ -0,0 +1,70 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _Storage = require('./Storage'); + +var _Storage2 = _interopRequireDefault(_Storage); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @class MongoDBStorage + */ +class MongoDBStorage extends _Storage2.default { + /** + * Constructs MongoDB collection storage. + * + * @param {Object} [options] + * Required either connection and collectionName OR collection + * @param {String} [options.connection] - a connection to target database established with MongoDB Driver + * @param {String} [options.collectionName] - name of migration collection in MongoDB + * @param {String} [options.collection] - reference to a MongoDB Driver collection + */ + constructor({ connection, collectionName, collection }) { + super(); + this.connection = connection; + this.collection = collection; + this.collectionName = collectionName || 'migrations'; + + if (!this.connection && !this.collection) { + throw new Error('MongoDB Connection or Collection required'); + } + + if (!this.collection) { + this.collection = this.connection.collection(this.collectionName); + } + } + + /** + * Logs migration to be considered as executed. + * + * @param {String} migrationName - Name of the migration to be logged. + * @returns {Promise} + */ + logMigration(migrationName) { + return this.collection.insertOne({ migrationName }); + } + + /** + * Unlogs migration to be considered as pending. + * + * @param {String} migrationName - Name of the migration to be unlogged. + * @returns {Promise} + */ + unlogMigration(migrationName) { + return this.collection.removeOne({ migrationName }); + } + + /** + * Gets list of executed migrations. + * + * @returns {Promise.} + */ + executed() { + return this.collection.find({}).sort({ migrationName: 1 }).toArray().then(records => records.map(r => r.migrationName)); + } +} +exports.default = MongoDBStorage; \ No newline at end of file diff --git a/node_modules/umzug/lib/storages/SequelizeStorage.js b/node_modules/umzug/lib/storages/SequelizeStorage.js new file mode 100644 index 00000000..c6a92c18 --- /dev/null +++ b/node_modules/umzug/lib/storages/SequelizeStorage.js @@ -0,0 +1,161 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _Storage = require('./Storage'); + +var _Storage2 = _interopRequireDefault(_Storage); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @class SequelizeStorage + */ +class SequelizeStorage extends _Storage2.default { + /** + * Constructs Sequelize based storage. + * + * Stores migration in a database table using Sequelize. One of "sequelize" or + * "model" storage option is required. + * + * If "sequelize" option is supplied will create a model named "SequelizeMeta" + * with timestamps and an attribute "name" for storing migrations. The model + * name, table name, and column name are customizable with options. + * + * If "model" option is supplied will use existing model for storing + * migrations. The model must have an attribute "name", which can be + * customized. + * + * If the table does not exist it will be created automatically. + * + * @param {Object} [options] + * @param {Object} [options.] + * @param {Object} [options.sequelize] - configured instance of Sequelize. + * @param {Object} [options.model] - Sequelize model - must have column name + * matching "columnName" option. + * @param {String} [options.modelName='SequelizeMeta'] - name of the model + * to create if "model" option is not supplied. + * @param {String} [options.tableName=modelName] - name of the table to create + * if "model" option is not supplied. + * @param {String} [options.schema=schema] - name of the schema to create + * the table under, defaults to undefined. + * @param {String} [options.columnName='name'] - name of the table column + * holding migration name. + * @param {String} [options.columnType=Sequelize.STRING] - type of the column. + * For utf8mb4 charsets under InnoDB, you may need to set this <= 190. + * @param {Boolean} [options.timestamps=false] - option to add timestamps to the model table + */ + constructor({ + sequelize, + model, + modelName = 'SequelizeMeta', + tableName, + schema, + columnName = 'name', + columnType, + timestamps = false + } = {}) { + super(); + if (!model && !sequelize) { + throw new Error('One of "sequelize" or "model" storage option is required'); + } + + this.sequelize = sequelize || model.sequelize; + + const Sequelize = this.sequelize.constructor; + + this.columnType = columnType || Sequelize.STRING; + this.columnName = columnName; + this.timestamps = timestamps; + this.modelName = modelName; + this.tableName = tableName; + this.schema = schema; + this.model = model || this.getModel(); + } + + getModel() { + if (this.sequelize.isDefined(this.modelName)) { + return this.sequelize.model(this.modelName); + } + + return this.sequelize.define(this.modelName, { + [this.columnName]: { + type: this.columnType, + allowNull: false, + unique: true, + primaryKey: true, + autoIncrement: false + } + }, { + tableName: this.tableName, + schema: this.schema, + timestamps: this.timestamps, + charset: 'utf8', + collate: 'utf8_unicode_ci' + }); + } + + /** + * Logs migration to be considered as executed. + * + * @param {String} migrationName - Name of the migration to be logged. + * @returns {Promise} + */ + logMigration(migrationName) { + const self = this; + + return this._model().sync().then(Model => { + const migration = {}; + migration[self.columnName] = migrationName; + return Model.create(migration); + }); + } + + /** + * Unlogs migration to be considered as pending. + * + * @param {String} migrationName - Name of the migration to be unlogged. + * @returns {Promise} + */ + unlogMigration(migrationName) { + const self = this; + const sequelize = this.sequelize; + const sequelizeVersion = sequelize.modelManager ? 2 : 1; + + return this._model().sync().then(Model => { + let where = {}; + where[self.columnName] = migrationName; + + if (sequelizeVersion > 1) { + // This is an ugly hack to find out which function signature we have to use. + where = { where: where }; + } + + return Model.destroy(where); + }); + } + + /** + * Gets list of executed migrations. + * + * @returns {Promise.} + */ + executed() { + const self = this; + + return this._model().sync().then(Model => Model.findAll({ order: [[self.columnName, 'ASC']] })).then(migrations => migrations.map(migration => migration[self.columnName])); + } + + /** + * Gets Sequelize model used as a storage. + * + * @returns {Sequelize.Model} + * @private + */ + _model() { + return this.model; + } +} +exports.default = SequelizeStorage; \ No newline at end of file diff --git a/node_modules/umzug/lib/storages/Storage.js b/node_modules/umzug/lib/storages/Storage.js new file mode 100644 index 00000000..ffe507a6 --- /dev/null +++ b/node_modules/umzug/lib/storages/Storage.js @@ -0,0 +1,46 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _bluebird = require('bluebird'); + +var _bluebird2 = _interopRequireDefault(_bluebird); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @class Storage + */ +class Storage { + /** + * Does nothing. + * + * @param {String} migrationName - Name of migration to be logged. + * @returns {Promise} + */ + logMigration(migrationName) { + return _bluebird2.default.resolve(); + } + + /** + * Does nothing. + * + * @param {String} migrationName - Name of migration to unlog. + * @returns {Promise} + */ + unlogMigration(migrationName) { + return _bluebird2.default.resolve(); + } + + /** + * Does nothing. + * + * @returns {Promise.} + */ + executed() { + return _bluebird2.default.resolve([]); + } +} +exports.default = Storage; \ No newline at end of file diff --git a/node_modules/umzug/lib/storages/json.js b/node_modules/umzug/lib/storages/json.js new file mode 100644 index 00000000..58089d66 --- /dev/null +++ b/node_modules/umzug/lib/storages/json.js @@ -0,0 +1,11 @@ +'use strict'; + +var _JSONStorage = require('./JSONStorage'); + +var _JSONStorage2 = _interopRequireDefault(_JSONStorage); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = _JSONStorage2.default; + +console.warn('Deprecated: JSONStorage\'s filename has changed!', 'Use \'umzug/lib/storages/JSONStorage\' instead of \'umzug/lib/storages/json\'', 'For more information: https://github.com/sequelize/umzug/pull/139'); \ No newline at end of file diff --git a/node_modules/umzug/lib/storages/none.js b/node_modules/umzug/lib/storages/none.js new file mode 100644 index 00000000..ca159ba9 --- /dev/null +++ b/node_modules/umzug/lib/storages/none.js @@ -0,0 +1,11 @@ +'use strict'; + +var _Storage = require('./Storage'); + +var _Storage2 = _interopRequireDefault(_Storage); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = _Storage2.default; + +console.warn('Deprecated: Storage\'s (former none storage) filename has changed!', 'Use \'umzug/lib/storages/Storage\' instead of \'umzug/lib/storages/none\'', 'For more information: https://github.com/sequelize/umzug/pull/139'); \ No newline at end of file diff --git a/node_modules/umzug/lib/storages/sequelize.js b/node_modules/umzug/lib/storages/sequelize.js new file mode 100644 index 00000000..66ebc16a --- /dev/null +++ b/node_modules/umzug/lib/storages/sequelize.js @@ -0,0 +1,11 @@ +'use strict'; + +var _SequelizeStorage = require('./SequelizeStorage'); + +var _SequelizeStorage2 = _interopRequireDefault(_SequelizeStorage); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = _SequelizeStorage2.default; + +console.warn('Deprecated: SequelizeStorage\'s filename has changed!', 'Use \'umzug/lib/storages/SequelizeStorage\' instead of \'umzug/lib/storages/sequelize\'', 'For more information: https://github.com/sequelize/umzug/pull/139'); \ No newline at end of file diff --git a/node_modules/umzug/package.json b/node_modules/umzug/package.json new file mode 100644 index 00000000..ad80bcfa --- /dev/null +++ b/node_modules/umzug/package.json @@ -0,0 +1,70 @@ +{ + "name": "umzug", + "version": "2.2.0", + "description": "Framework agnostic migration tool for Node.JS", + "keywords": [ + "migrate", + "migration", + "migrations", + "sequelize" + ], + "main": "lib/index.js", + "dependencies": { + "babel-runtime": "^6.23.0", + "bluebird": "^3.5.3" + }, + "devDependencies": { + "babel-cli": "^6.24.1", + "babel-plugin-dynamic-import-node": "^2.2.0", + "babel-plugin-syntax-dynamic-import": "^6.18.0", + "babel-plugin-transform-object-rest-spread": "^6.23.0", + "babel-plugin-transform-runtime": "^6.23.0", + "babel-preset-env": "^1.7.0", + "babel-register": "^6.24.1", + "chai": "^4.2.0", + "coffee-script": "^1.8.0", + "eslint": "^5.9.0", + "eslint-config-standard": "^12.0.0", + "eslint-plugin-import": "^2.14.0", + "eslint-plugin-mocha": "^5.2.0", + "eslint-plugin-node": "^8.0.0", + "eslint-plugin-promise": "^4.0.1", + "eslint-plugin-standard": "^4.0.0", + "lodash": "^4.17.11", + "mocha": "^5.2.0", + "sequelize": "^4.41.2", + "sinon": "^7.1.1", + "sinon-chai": "^3.2.0", + "sqlite3": "^4.0.4", + "typescript": "^3.1.6", + "uuid": "^3.3.2" + }, + "scripts": { + "build": "babel src --out-dir lib", + "lint": "eslint src test", + "test": "mocha -r babel-register --check-leaks test/index.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/sequelize/umzug.git" + }, + "author": "Sascha Depold ", + "contributors": [ + { + "name": "Jukka Hyytiälä", + "email": "hyytiala.jukka@gmail.com" + }, + { + "name": "Pascal Pflaum", + "email": "mail@pascalpflaum.de" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/sequelize/umzug/issues" + }, + "homepage": "https://github.com/sequelize/umzug", + "engines": { + "node": ">=6.0.0" + } +} diff --git a/node_modules/universalify/LICENSE b/node_modules/universalify/LICENSE new file mode 100644 index 00000000..514e84e6 --- /dev/null +++ b/node_modules/universalify/LICENSE @@ -0,0 +1,20 @@ +(The MIT License) + +Copyright (c) 2017, Ryan Zimmerman + +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/universalify/README.md b/node_modules/universalify/README.md new file mode 100644 index 00000000..487067bf --- /dev/null +++ b/node_modules/universalify/README.md @@ -0,0 +1,76 @@ +# universalify + +[![Travis branch](https://img.shields.io/travis/RyanZim/universalify/master.svg)](https://travis-ci.org/RyanZim/universalify) +![Coveralls github branch](https://img.shields.io/coveralls/github/RyanZim/universalify/master.svg) +![npm](https://img.shields.io/npm/dm/universalify.svg) +![npm](https://img.shields.io/npm/l/universalify.svg) + +Make a callback- or promise-based function support both promises and callbacks. + +Uses the native promise implementation. + +## Installation + +```bash +npm install universalify +``` + +## API + +### `universalify.fromCallback(fn)` + +Takes a callback-based function to universalify, and returns the universalified function. + +Function must take a callback as the last parameter that will be called with the signature `(error, result)`. `universalify` does not support calling the callback with more than three arguments, and does not ensure that the callback is only called once. + +```js +function callbackFn (n, cb) { + setTimeout(() => cb(null, n), 15) +} + +const fn = universalify.fromCallback(callbackFn) + +// Works with Promises: +fn('Hello World!') +.then(result => console.log(result)) // -> Hello World! +.catch(error => console.error(error)) + +// Works with Callbacks: +fn('Hi!', (error, result) => { + if (error) return console.error(error) + console.log(result) + // -> Hi! +}) +``` + +### `universalify.fromPromise(fn)` + +Takes a promise-based function to universalify, and returns the universalified function. + +Function must return a valid JS promise. `universalify` does not ensure that a valid promise is returned. + +```js +function promiseFn (n) { + return new Promise(resolve => { + setTimeout(() => resolve(n), 15) + }) +} + +const fn = universalify.fromPromise(promiseFn) + +// Works with Promises: +fn('Hello World!') +.then(result => console.log(result)) // -> Hello World! +.catch(error => console.error(error)) + +// Works with Callbacks: +fn('Hi!', (error, result) => { + if (error) return console.error(error) + console.log(result) + // -> Hi! +}) +``` + +## License + +MIT diff --git a/node_modules/universalify/index.js b/node_modules/universalify/index.js new file mode 100644 index 00000000..0c9ba393 --- /dev/null +++ b/node_modules/universalify/index.js @@ -0,0 +1,25 @@ +'use strict' + +exports.fromCallback = function (fn) { + return Object.defineProperty(function () { + if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments) + else { + return new Promise((resolve, reject) => { + arguments[arguments.length] = (err, res) => { + if (err) return reject(err) + resolve(res) + } + arguments.length++ + fn.apply(this, arguments) + }) + } + }, 'name', { value: fn.name }) +} + +exports.fromPromise = function (fn) { + return Object.defineProperty(function () { + const cb = arguments[arguments.length - 1] + if (typeof cb !== 'function') return fn.apply(this, arguments) + else fn.apply(this, arguments).then(r => cb(null, r), cb) + }, 'name', { value: fn.name }) +} diff --git a/node_modules/universalify/package.json b/node_modules/universalify/package.json new file mode 100644 index 00000000..321b1928 --- /dev/null +++ b/node_modules/universalify/package.json @@ -0,0 +1,34 @@ +{ + "name": "universalify", + "version": "0.1.2", + "description": "Make a callback- or promise-based function support both promises and callbacks.", + "keywords": [ + "callback", + "native", + "promise" + ], + "homepage": "https://github.com/RyanZim/universalify#readme", + "bugs": "https://github.com/RyanZim/universalify/issues", + "license": "MIT", + "author": "Ryan Zimmerman ", + "files": [ + "index.js" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/RyanZim/universalify.git" + }, + "scripts": { + "test": "standard && nyc tape test/*.js | colortape" + }, + "devDependencies": { + "colortape": "^0.1.2", + "coveralls": "^3.0.1", + "nyc": "^10.2.0", + "standard": "^10.0.1", + "tape": "^4.6.3" + }, + "engines": { + "node": ">= 4.0.0" + } +} diff --git a/node_modules/uuid/.eslintrc.json b/node_modules/uuid/.eslintrc.json new file mode 100644 index 00000000..734a8e14 --- /dev/null +++ b/node_modules/uuid/.eslintrc.json @@ -0,0 +1,47 @@ +{ + "root": true, + "env": { + "browser": true, + "commonjs": true, + "node": true, + "mocha": true + }, + "extends": ["eslint:recommended"], + "rules": { + "array-bracket-spacing": ["warn", "never"], + "arrow-body-style": ["warn", "as-needed"], + "arrow-parens": ["warn", "as-needed"], + "arrow-spacing": "warn", + "brace-style": ["warn", "1tbs"], + "camelcase": "warn", + "comma-spacing": ["warn", {"after": true}], + "dot-notation": "warn", + "eqeqeq": ["warn", "smart"], + "indent": ["warn", 2, { + "SwitchCase": 1, + "FunctionDeclaration": {"parameters": 1}, + "MemberExpression": 1, + "CallExpression": {"arguments": 1} + }], + "key-spacing": ["warn", {"beforeColon": false, "afterColon": true, "mode": "minimum"}], + "keyword-spacing": "warn", + "no-console": "off", + "no-empty": "off", + "no-multi-spaces": "warn", + "no-redeclare": "off", + "no-restricted-globals": ["warn", "Promise"], + "no-trailing-spaces": "warn", + "no-undef": "error", + "no-unused-vars": ["warn", {"args": "none"}], + "one-var": ["warn", "never"], + "padded-blocks": ["warn", "never"], + "object-curly-spacing": ["warn", "never"], + "quotes": ["warn", "single"], + "react/prop-types": "off", + "react/jsx-no-bind": "off", + "semi": ["warn", "always"], + "space-before-blocks": ["warn", "always"], + "space-before-function-paren": ["warn", "never"], + "space-in-parens": ["warn", "never"] + } +} diff --git a/node_modules/uuid/AUTHORS b/node_modules/uuid/AUTHORS new file mode 100644 index 00000000..5a105230 --- /dev/null +++ b/node_modules/uuid/AUTHORS @@ -0,0 +1,5 @@ +Robert Kieffer +Christoph Tavan +AJ ONeal +Vincent Voyer +Roman Shtylman diff --git a/node_modules/uuid/CHANGELOG.md b/node_modules/uuid/CHANGELOG.md new file mode 100644 index 00000000..f29d3991 --- /dev/null +++ b/node_modules/uuid/CHANGELOG.md @@ -0,0 +1,110 @@ +# Change Log + +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. + + +## [3.3.2](https://github.com/kelektiv/node-uuid/compare/v3.3.1...v3.3.2) (2018-06-28) + + +### Bug Fixes + +* typo ([305d877](https://github.com/kelektiv/node-uuid/commit/305d877)) + + + + +## [3.3.1](https://github.com/kelektiv/node-uuid/compare/v3.3.0...v3.3.1) (2018-06-28) + + +### Bug Fixes + +* fix [#284](https://github.com/kelektiv/node-uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/kelektiv/node-uuid/commit/f2a60f2)) + + + + +# [3.3.0](https://github.com/kelektiv/node-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/kelektiv/node-uuid/issues/270)) ([d062fdc](https://github.com/kelektiv/node-uuid/commit/d062fdc)) +* fix [#229](https://github.com/kelektiv/node-uuid/issues/229) ([c9684d4](https://github.com/kelektiv/node-uuid/commit/c9684d4)) +* Get correct version of IE11 crypto ([#274](https://github.com/kelektiv/node-uuid/issues/274)) ([153d331](https://github.com/kelektiv/node-uuid/commit/153d331)) +* mem issue when generating uuid ([#267](https://github.com/kelektiv/node-uuid/issues/267)) ([c47702c](https://github.com/kelektiv/node-uuid/commit/c47702c)) + +### Features + +* enforce Conventional Commit style commit messages ([#282](https://github.com/kelektiv/node-uuid/issues/282)) ([cc9a182](https://github.com/kelektiv/node-uuid/commit/cc9a182)) + + + +## [3.2.1](https://github.com/kelektiv/node-uuid/compare/v3.2.0...v3.2.1) (2018-01-16) + + +### Bug Fixes + +* use msCrypto if available. Fixes [#241](https://github.com/kelektiv/node-uuid/issues/241) ([#247](https://github.com/kelektiv/node-uuid/issues/247)) ([1fef18b](https://github.com/kelektiv/node-uuid/commit/1fef18b)) + + + + +# [3.2.0](https://github.com/kelektiv/node-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/kelektiv/node-uuid/commit/09fa824)) +* use msCrypto if available. Fixes [#241](https://github.com/kelektiv/node-uuid/issues/241) ([#247](https://github.com/kelektiv/node-uuid/issues/247)) ([1fef18b](https://github.com/kelektiv/node-uuid/commit/1fef18b)) + + +### Features + +* Add v3 Support ([#217](https://github.com/kelektiv/node-uuid/issues/217)) ([d94f726](https://github.com/kelektiv/node-uuid/commit/d94f726)) + + +# [3.1.0](https://github.com/kelektiv/node-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/LICENSE.md b/node_modules/uuid/LICENSE.md new file mode 100644 index 00000000..8c84e398 --- /dev/null +++ b/node_modules/uuid/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010-2016 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: + +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/uuid/README.md b/node_modules/uuid/README.md new file mode 100644 index 00000000..9cbe1ac1 --- /dev/null +++ b/node_modules/uuid/README.md @@ -0,0 +1,293 @@ + + +# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # + +Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. + +Features: + +* Support for version 1, 3, 4 and 5 UUIDs +* Cross-platform +* Uses cryptographically-strong random number APIs (when available) +* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) + +[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be +supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] + +## Quickstart - CommonJS (Recommended) + +```shell +npm install uuid +``` + +Then generate your uuid version of choice ... + +Version 1 (timestamp): + +```javascript +const uuidv1 = require('uuid/v1'); +uuidv1(); // ⇨ '45745c60-7b1a-11e8-9c9c-2d42b21b1a3e' + +``` + +Version 3 (namespace): + +```javascript +const uuidv3 = require('uuid/v3'); + +// ... using predefined DNS namespace (for domain names) +uuidv3('hello.example.com', uuidv3.DNS); // ⇨ '9125a8dc-52ee-365b-a5aa-81b0b3681cf6' + +// ... using predefined URL namespace (for, well, URLs) +uuidv3('http://example.com/hello', uuidv3.URL); // ⇨ 'c6235813-3ba4-3801-ae84-e0a6ebb7d138' + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv3('Hello, World!', MY_NAMESPACE); // ⇨ 'e8b5a51d-11c8-3310-a6ab-367563f20686' + +``` + +Version 4 (random): + +```javascript +const uuidv4 = require('uuid/v4'); +uuidv4(); // ⇨ '10ba038e-48da-487b-96e8-8d3b99b6d18a' + +``` + +Version 5 (namespace): + +```javascript +const uuidv5 = require('uuid/v5'); + +// ... using predefined DNS namespace (for domain names) +uuidv5('hello.example.com', uuidv5.DNS); // ⇨ 'fdda765f-fc57-5604-a269-52a7df8164ec' + +// ... using predefined URL namespace (for, well, URLs) +uuidv5('http://example.com/hello', uuidv5.URL); // ⇨ '3bbcee75-cecc-5b56-8031-b6641c1ed1f1' + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' + +``` + +## Quickstart - Browser-ready Versions + +Browser-ready versions of this module are available via [wzrd.in](https://github.com/jfhbrook/wzrd.in). + +For version 1 uuids: + +```html + + +``` + +For version 3 uuids: + +```html + + +``` + +For version 4 uuids: + +```html + + +``` + +For version 5 uuids: + +```html + + +``` + +## API + +### Version 1 + +```javascript +const uuidv1 = require('uuid/v1'); + +// Incantations +uuidv1(); +uuidv1(options); +uuidv1(options, buffer, offset); +``` + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. + * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Note: The id is generated guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) + +Example: Generate string UUID with fully-specified options + +```javascript +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' + +``` + +Example: In-place generation of two binary IDs + +```javascript +// Generate two ids in an array +const arr = new Array(); +uuidv1(null, arr, 0); // ⇨ [ 69, 117, 109, 208, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62 ] +uuidv1(null, arr, 16); // ⇨ [ 69, 117, 109, 208, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62, 69, 117, 109, 209, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62 ] + +``` + +### Version 3 + +```javascript +const uuidv3 = require('uuid/v3'); + +// Incantations +uuidv3(name, namespace); +uuidv3(name, namespace, buffer); +uuidv3(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v3 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript +uuidv3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172424' + +``` + +### Version 4 + +```javascript +const uuidv4 = require('uuid/v4') + +// Incantations +uuidv4(); +uuidv4(options); +uuidv4(options, buffer, offset); +``` + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values + * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: Generate string UUID with predefined `random` values + +```javascript +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' + +``` + +Example: Generate two IDs in a single buffer + +```javascript +const buffer = new Array(); +uuidv4(null, buffer, 0); // ⇨ [ 54, 122, 218, 70, 45, 70, 65, 24, 171, 53, 95, 130, 83, 195, 242, 45 ] +uuidv4(null, buffer, 16); // ⇨ [ 54, 122, 218, 70, 45, 70, 65, 24, 171, 53, 95, 130, 83, 195, 242, 45, 108, 204, 255, 103, 171, 86, 76, 94, 178, 225, 188, 236, 150, 20, 151, 87 ] + +``` + +### Version 5 + +```javascript +const uuidv5 = require('uuid/v5'); + +// Incantations +uuidv5(name, namespace); +uuidv5(name, namespace, buffer); +uuidv5(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v5 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript +uuidv5('hello world', MY_NAMESPACE); // ⇨ '9f282611-e0fd-5650-8953-89c8e342da0b' + +``` + +## Command Line + +UUIDs can be generated from the command line with the `uuid` command. + +```shell +$ uuid +ddeb27fb-d9a0-4624-be4d-4615062daed4 + +$ uuid v1 +02d37060-d446-11e7-a9fa-7bdae751ebe1 +``` + +Type `uuid --help` for usage details + +## Testing + +```shell +npm test +``` + +---- +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/README_js.md b/node_modules/uuid/README_js.md new file mode 100644 index 00000000..f34453be --- /dev/null +++ b/node_modules/uuid/README_js.md @@ -0,0 +1,280 @@ +```javascript --hide +runmd.onRequire = path => path.replace(/^uuid/, './'); +``` + +# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # + +Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. + +Features: + +* Support for version 1, 3, 4 and 5 UUIDs +* Cross-platform +* Uses cryptographically-strong random number APIs (when available) +* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) + +[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be +supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] + +## Quickstart - CommonJS (Recommended) + +```shell +npm install uuid +``` + +Then generate your uuid version of choice ... + +Version 1 (timestamp): + +```javascript --run v1 +const uuidv1 = require('uuid/v1'); +uuidv1(); // RESULT +``` + +Version 3 (namespace): + +```javascript --run v3 +const uuidv3 = require('uuid/v3'); + +// ... using predefined DNS namespace (for domain names) +uuidv3('hello.example.com', uuidv3.DNS); // RESULT + +// ... using predefined URL namespace (for, well, URLs) +uuidv3('http://example.com/hello', uuidv3.URL); // RESULT + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv3('Hello, World!', MY_NAMESPACE); // RESULT +``` + +Version 4 (random): + +```javascript --run v4 +const uuidv4 = require('uuid/v4'); +uuidv4(); // RESULT +``` + +Version 5 (namespace): + +```javascript --run v5 +const uuidv5 = require('uuid/v5'); + +// ... using predefined DNS namespace (for domain names) +uuidv5('hello.example.com', uuidv5.DNS); // RESULT + +// ... using predefined URL namespace (for, well, URLs) +uuidv5('http://example.com/hello', uuidv5.URL); // RESULT + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv5('Hello, World!', MY_NAMESPACE); // RESULT +``` + +## Quickstart - Browser-ready Versions + +Browser-ready versions of this module are available via [wzrd.in](https://github.com/jfhbrook/wzrd.in). + +For version 1 uuids: + +```html + + +``` + +For version 3 uuids: + +```html + + +``` + +For version 4 uuids: + +```html + + +``` + +For version 5 uuids: + +```html + + +``` + +## API + +### Version 1 + +```javascript +const uuidv1 = require('uuid/v1'); + +// Incantations +uuidv1(); +uuidv1(options); +uuidv1(options, buffer, offset); +``` + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. + * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Note: The id is generated guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) + +Example: Generate string UUID with fully-specified options + +```javascript --run v1 +const v1options = { + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678 +}; +uuidv1(v1options); // RESULT +``` + +Example: In-place generation of two binary IDs + +```javascript --run v1 +// Generate two ids in an array +const arr = new Array(); +uuidv1(null, arr, 0); // RESULT +uuidv1(null, arr, 16); // RESULT +``` + +### Version 3 + +```javascript +const uuidv3 = require('uuid/v3'); + +// Incantations +uuidv3(name, namespace); +uuidv3(name, namespace, buffer); +uuidv3(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v3 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript --run v3 +uuidv3('hello world', MY_NAMESPACE); // RESULT +``` + +### Version 4 + +```javascript +const uuidv4 = require('uuid/v4') + +// Incantations +uuidv4(); +uuidv4(options); +uuidv4(options, buffer, offset); +``` + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values + * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: Generate string UUID with predefined `random` values + +```javascript --run v4 +const v4options = { + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, + 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 + ] +}; +uuidv4(v4options); // RESULT +``` + +Example: Generate two IDs in a single buffer + +```javascript --run v4 +const buffer = new Array(); +uuidv4(null, buffer, 0); // RESULT +uuidv4(null, buffer, 16); // RESULT +``` + +### Version 5 + +```javascript +const uuidv5 = require('uuid/v5'); + +// Incantations +uuidv5(name, namespace); +uuidv5(name, namespace, buffer); +uuidv5(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v5 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript --run v5 +uuidv5('hello world', MY_NAMESPACE); // RESULT +``` + +## Command Line + +UUIDs can be generated from the command line with the `uuid` command. + +```shell +$ uuid +ddeb27fb-d9a0-4624-be4d-4615062daed4 + +$ uuid v1 +02d37060-d446-11e7-a9fa-7bdae751ebe1 +``` + +Type `uuid --help` for usage details + +## Testing + +```shell +npm test +``` diff --git a/node_modules/uuid/bin/uuid b/node_modules/uuid/bin/uuid new file mode 100755 index 00000000..502626e6 --- /dev/null +++ b/node_modules/uuid/bin/uuid @@ -0,0 +1,65 @@ +#!/usr/bin/env node +var assert = require('assert'); + +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'); +} + +var args = process.argv.slice(2); + +if (args.indexOf('--help') >= 0) { + usage(); + process.exit(0); +} +var version = args.shift() || 'v4'; + +switch (version) { + case 'v1': + var uuidV1 = require('../v1'); + console.log(uuidV1()); + break; + + case 'v3': + var uuidV3 = require('../v3'); + + var name = args.shift(); + var namespace = args.shift(); + assert(name != null, 'v3 name not specified'); + assert(namespace != null, 'v3 namespace not specified'); + + if (namespace == 'URL') namespace = uuidV3.URL; + if (namespace == 'DNS') namespace = uuidV3.DNS; + + console.log(uuidV3(name, namespace)); + break; + + case 'v4': + var uuidV4 = require('../v4'); + console.log(uuidV4()); + break; + + case 'v5': + var uuidV5 = require('../v5'); + + var name = args.shift(); + var namespace = args.shift(); + assert(name != null, 'v5 name not specified'); + assert(namespace != null, 'v5 namespace not specified'); + + if (namespace == 'URL') namespace = uuidV5.URL; + if (namespace == 'DNS') namespace = uuidV5.DNS; + + console.log(uuidV5(name, namespace)); + break; + + default: + usage(); + process.exit(1); +} diff --git a/node_modules/uuid/index.js b/node_modules/uuid/index.js new file mode 100644 index 00000000..e96791ab --- /dev/null +++ b/node_modules/uuid/index.js @@ -0,0 +1,8 @@ +var v1 = require('./v1'); +var v4 = require('./v4'); + +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; + +module.exports = uuid; diff --git a/node_modules/uuid/lib/bytesToUuid.js b/node_modules/uuid/lib/bytesToUuid.js new file mode 100644 index 00000000..847c4828 --- /dev/null +++ b/node_modules/uuid/lib/bytesToUuid.js @@ -0,0 +1,24 @@ +/** + * 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[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]]]).join(''); +} + +module.exports = bytesToUuid; diff --git a/node_modules/uuid/lib/md5-browser.js b/node_modules/uuid/lib/md5-browser.js new file mode 100644 index 00000000..9b3b6c7e --- /dev/null +++ b/node_modules/uuid/lib/md5-browser.js @@ -0,0 +1,216 @@ +/* + * 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. + */ + +'use strict'; + +function md5(bytes) { + if (typeof(bytes) == 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + bytes = new Array(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 i; + var x; + var output = []; + var length32 = input.length * 32; + var hexTab = '0123456789abcdef'; + var hex; + + for (i = 0; i < length32; i += 8) { + x = (input[i >> 5] >>> (i % 32)) & 0xFF; + + hex = parseInt(hexTab.charAt((x >>> 4) & 0x0F) + hexTab.charAt(x & 0x0F), 16); + + output.push(hex); + } + return output; +} + +/* +* 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[(((len + 64) >>> 9) << 4) + 14] = len; + + var i; + var olda; + var oldb; + var oldc; + var oldd; + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + + var d = 271733878; + + for (i = 0; i < x.length; i += 16) { + olda = a; + oldb = b; + oldc = c; + 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) { + var i; + var output = []; + output[(input.length >> 2) - 1] = undefined; + for (i = 0; i < output.length; i += 1) { + output[i] = 0; + } + var length8 = input.length * 8; + for (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); +} + +module.exports = md5; diff --git a/node_modules/uuid/lib/md5.js b/node_modules/uuid/lib/md5.js new file mode 100644 index 00000000..7044b872 --- /dev/null +++ b/node_modules/uuid/lib/md5.js @@ -0,0 +1,25 @@ +'use strict'; + +var crypto = require('crypto'); + +function md5(bytes) { + if (typeof Buffer.from === 'function') { + // Modern Buffer API + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + } else { + // Pre-v4 Buffer API + if (Array.isArray(bytes)) { + bytes = new Buffer(bytes); + } else if (typeof bytes === 'string') { + bytes = new Buffer(bytes, 'utf8'); + } + } + + return crypto.createHash('md5').update(bytes).digest(); +} + +module.exports = md5; diff --git a/node_modules/uuid/lib/rng-browser.js b/node_modules/uuid/lib/rng-browser.js new file mode 100644 index 00000000..6361fb81 --- /dev/null +++ b/node_modules/uuid/lib/rng-browser.js @@ -0,0 +1,34 @@ +// Unique ID creation requires a high quality random # generator. In the +// browser this is a little complicated due to unknown quality of Math.random() +// and inconsistent support for the `crypto` API. We do the best we can via +// feature-detection + +// getRandomValues needs to be invoked in a context where "this" is a Crypto +// implementation. Also, find the complete implementation of crypto on IE11. +var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) || + (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto)); + +if (getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + + module.exports = function whatwgRNG() { + getRandomValues(rnds8); + return rnds8; + }; +} else { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + + module.exports = function mathRNG() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return rnds; + }; +} diff --git a/node_modules/uuid/lib/rng.js b/node_modules/uuid/lib/rng.js new file mode 100644 index 00000000..58f0dc9c --- /dev/null +++ b/node_modules/uuid/lib/rng.js @@ -0,0 +1,8 @@ +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. + +var crypto = require('crypto'); + +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; diff --git a/node_modules/uuid/lib/sha1-browser.js b/node_modules/uuid/lib/sha1-browser.js new file mode 100644 index 00000000..5758ed75 --- /dev/null +++ b/node_modules/uuid/lib/sha1-browser.js @@ -0,0 +1,89 @@ +// Adapted from Chris Veness' SHA1 code at +// http://www.movable-type.co.uk/scripts/sha1.html +'use strict'; + +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 = new Array(msg.length); + for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); + } + + 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>> 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 + ]; +} + +module.exports = sha1; diff --git a/node_modules/uuid/lib/sha1.js b/node_modules/uuid/lib/sha1.js new file mode 100644 index 00000000..0b54b250 --- /dev/null +++ b/node_modules/uuid/lib/sha1.js @@ -0,0 +1,25 @@ +'use strict'; + +var crypto = require('crypto'); + +function sha1(bytes) { + if (typeof Buffer.from === 'function') { + // Modern Buffer API + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + } else { + // Pre-v4 Buffer API + if (Array.isArray(bytes)) { + bytes = new Buffer(bytes); + } else if (typeof bytes === 'string') { + bytes = new Buffer(bytes, 'utf8'); + } + } + + return crypto.createHash('sha1').update(bytes).digest(); +} + +module.exports = sha1; diff --git a/node_modules/uuid/lib/v35.js b/node_modules/uuid/lib/v35.js new file mode 100644 index 00000000..8b066cc5 --- /dev/null +++ b/node_modules/uuid/lib/v35.js @@ -0,0 +1,57 @@ +var bytesToUuid = require('./bytesToUuid'); + +function uuidToBytes(uuid) { + // Note: We assume we're being passed a valid uuid string + var bytes = []; + uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) { + bytes.push(parseInt(hex, 16)); + }); + + return bytes; +} + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + var bytes = new Array(str.length); + for (var i = 0; i < str.length; i++) { + bytes[i] = str.charCodeAt(i); + } + return bytes; +} + +module.exports = function(name, version, hashfunc) { + var generateUUID = function(value, namespace, buf, offset) { + var off = buf && offset || 0; + + if (typeof(value) == 'string') value = stringToBytes(value); + if (typeof(namespace) == 'string') namespace = uuidToBytes(namespace); + + if (!Array.isArray(value)) throw TypeError('value must be an array of bytes'); + if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values'); + + // Per 4.3 + var bytes = hashfunc(namespace.concat(value)); + bytes[6] = (bytes[6] & 0x0f) | version; + bytes[8] = (bytes[8] & 0x3f) | 0x80; + + if (buf) { + for (var idx = 0; idx < 16; ++idx) { + buf[off+idx] = bytes[idx]; + } + } + + return buf || bytesToUuid(bytes); + }; + + // Function#name is not settable on some platforms (#270) + try { + generateUUID.name = name; + } catch (err) { + } + + // Pre-defined namespaces, per Appendix C + generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; + generateUUID.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; + + return generateUUID; +}; diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json new file mode 100644 index 00000000..d753b94e --- /dev/null +++ b/node_modules/uuid/package.json @@ -0,0 +1,44 @@ +{ + "name": "uuid", + "version": "3.3.2", + "description": "RFC4122 (v1, v4, and v5) UUIDs", + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "license": "MIT", + "bin": { + "uuid": "./bin/uuid" + }, + "devDependencies": { + "@commitlint/cli": "7.0.0", + "@commitlint/config-conventional": "7.0.1", + "eslint": "4.19.1", + "husky": "0.14.3", + "mocha": "5.2.0", + "runmd": "1.0.1", + "standard-version": "4.4.0" + }, + "scripts": { + "commitmsg": "commitlint -E GIT_PARAMS", + "test": "mocha test/test.js", + "md": "runmd --watch --output=README.md README_js.md", + "release": "standard-version", + "prepare": "runmd --output=README.md README_js.md" + }, + "browser": { + "./lib/rng.js": "./lib/rng-browser.js", + "./lib/sha1.js": "./lib/sha1-browser.js", + "./lib/md5.js": "./lib/md5-browser.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/kelektiv/node-uuid.git" + } +} diff --git a/node_modules/uuid/v1.js b/node_modules/uuid/v1.js new file mode 100644 index 00000000..d84c0f45 --- /dev/null +++ b/node_modules/uuid/v1.js @@ -0,0 +1,109 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +// **`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/broofa/node-uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + 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 = 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 : new Date().getTime(); + + // 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 ? buf : bytesToUuid(b); +} + +module.exports = v1; diff --git a/node_modules/uuid/v3.js b/node_modules/uuid/v3.js new file mode 100644 index 00000000..ee7e14c0 --- /dev/null +++ b/node_modules/uuid/v3.js @@ -0,0 +1,4 @@ +var v35 = require('./lib/v35.js'); +var md5 = require('./lib/md5'); + +module.exports = v35('v3', 0x30, md5); \ No newline at end of file diff --git a/node_modules/uuid/v4.js b/node_modules/uuid/v4.js new file mode 100644 index 00000000..1f07be1c --- /dev/null +++ b/node_modules/uuid/v4.js @@ -0,0 +1,29 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + 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) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); +} + +module.exports = v4; diff --git a/node_modules/uuid/v5.js b/node_modules/uuid/v5.js new file mode 100644 index 00000000..4945baf3 --- /dev/null +++ b/node_modules/uuid/v5.js @@ -0,0 +1,3 @@ +var v35 = require('./lib/v35.js'); +var sha1 = require('./lib/sha1'); +module.exports = v35('v5', 0x50, sha1); diff --git a/node_modules/validator/CHANGELOG.md b/node_modules/validator/CHANGELOG.md new file mode 100644 index 00000000..64956381 --- /dev/null +++ b/node_modules/validator/CHANGELOG.md @@ -0,0 +1,558 @@ +#### 10.11.0 + +- Fix imports like `import .. from "validator/lib/.."` + ([#961](https://github.com/chriso/validator.js/pull/961)) +- New locale + ([#958](https://github.com/chriso/validator.js/pull/958)) + +#### 10.10.0 + +- `isISO8601()` strict mode now works in the browser + ([#932](https://github.com/chriso/validator.js/pull/932)) +- New and improved locales + ([#931](https://github.com/chriso/validator.js/pull/931), + [#933](https://github.com/chriso/validator.js/pull/933), + [#947](https://github.com/chriso/validator.js/pull/947), + [#950](https://github.com/chriso/validator.js/pull/950)) + +#### 10.9.0 + +- Added an option to `isURL()` to reject email-like URLs + ([#901](https://github.com/chriso/validator.js/pull/901)) +- Added a `strict` option to `isISO8601()` + ([#910](https://github.com/chriso/validator.js/pull/910)) +- Relaxed `isJWT()` signature requirements + ([#906](https://github.com/chriso/validator.js/pull/906)) +- New and improved locales + ([#899](https://github.com/chriso/validator.js/pull/899), + [#904](https://github.com/chriso/validator.js/pull/904), + [#913](https://github.com/chriso/validator.js/pull/913), + [#916](https://github.com/chriso/validator.js/pull/916), + [#925](https://github.com/chriso/validator.js/pull/925), + [#928](https://github.com/chriso/validator.js/pull/928)) + +#### 10.8.0 + +- Added `isIdentityCard()` + ([#846](https://github.com/chriso/validator.js/pull/846)) +- Better error when validators are passed an invalid type + ([#895](https://github.com/chriso/validator.js/pull/895)) +- Locales are now exported + ([#890](https://github.com/chriso/validator.js/pull/890), + [#892](https://github.com/chriso/validator.js/pull/892)) +- New locale + ([#896](https://github.com/chriso/validator.js/pull/896)) + +#### 10.7.1 + +- Ignore case when checking URL protocol + ([#887](https://github.com/chriso/validator.js/issues/887)) +- Locale fix + ([#889](https://github.com/chriso/validator.js/pull/889)) + +#### 10.7.0 + +- Added `isMagnetURI()` to validate [magnet URIs](https://en.wikipedia.org/wiki/Magnet_URI_scheme) + ([#884](https://github.com/chriso/validator.js/pull/884)) +- Added `isJWT()` to validate [JSON web tokens](https://en.wikipedia.org/wiki/JSON_Web_Token) + ([#885](https://github.com/chriso/validator.js/pull/885)) + +#### 10.6.0 + +- Updated `isMobilePhone()` to match any locale's pattern by default + ([#874](https://github.com/chriso/validator.js/pull/874)) +- Added an option to ignore whitespace in `isEmpty()` + ([#880](https://github.com/chriso/validator.js/pull/880)) +- New and improved locales + ([#878](https://github.com/chriso/validator.js/pull/878), + [#879](https://github.com/chriso/validator.js/pull/879)) + +#### 10.5.0 + +- Disabled domain-specific email validation + ([#873](https://github.com/chriso/validator.js/pull/873)) +- Added support for IP hostnames in `isEmail()` + ([#845](https://github.com/chriso/validator.js/pull/845)) +- Added a `no_symbols` option to `isNumeric()` + ([#848](https://github.com/chriso/validator.js/pull/848)) +- Added a `no_colons` option to `isMACAddress()` + ([#849](https://github.com/chriso/validator.js/pull/849)) +- Updated `isURL()` to reject protocol relative URLs unless a flag is set + ([#860](https://github.com/chriso/validator.js/issues/860)) +- New and improved locales + ([#801](https://github.com/chriso/validator.js/pull/801), + [#856](https://github.com/chriso/validator.js/pull/856), + [#859](https://github.com/chriso/validator.js/issues/859), + [#861](https://github.com/chriso/validator.js/pull/861), + [#862](https://github.com/chriso/validator.js/pull/862), + [#863](https://github.com/chriso/validator.js/pull/863), + [#864](https://github.com/chriso/validator.js/pull/864), + [#870](https://github.com/chriso/validator.js/pull/870), + [#872](https://github.com/chriso/validator.js/pull/872)) + +#### 10.4.0 + +- Added an `isIPRange()` validator + ([#842](https://github.com/chriso/validator.js/pull/842)) +- Accept an array of locales in `isMobilePhone()` + ([#742](https://github.com/chriso/validator.js/pull/742)) +- New locale + ([#843](https://github.com/chriso/validator.js/pull/843)) + +#### 10.3.0 + +- Strict Gmail validation in `isEmail()` + ([#832](https://github.com/chriso/validator.js/pull/832)) +- New locales + ([#831](https://github.com/chriso/validator.js/pull/831), + [#835](https://github.com/chriso/validator.js/pull/835), + [#836](https://github.com/chriso/validator.js/pull/836)) + +#### 10.2.0 + +- Export the list of supported locales in `isPostalCode()` + ([#830](https://github.com/chriso/validator.js/pull/830)) + +#### 10.1.0 + +- Added an `isISO31661Alpha3()` validator + ([#809](https://github.com/chriso/validator.js/pull/809)) + +#### 10.0.0 + +- Allow floating points in `isNumeric()` + ([#810](https://github.com/chriso/validator.js/pull/810)) +- Disallow GMail addresses with multiple consecutive dots, or leading/trailing dots + ([#820](https://github.com/chriso/validator.js/pull/820)) +- Added an `isRFC3339()` validator + ([#816](https://github.com/chriso/validator.js/pull/816)) +- Reject domain parts longer than 63 octets in `isFQDN()`, `isURL()` and `isEmail()` + ([bb3e542](https://github.com/chriso/validator.js/commit/bb3e542)) +- Added a new Amex prefix to `isCreditCard()` + ([#805](https://github.com/chriso/validator.js/pull/805)) +- Fixed `isFloat()` min/max/gt/lt filters when a locale with a comma decimal is used + ([2b70821](https://github.com/chriso/validator.js/commit/2b70821)) +- Normalize Yandex emails + ([#807](https://github.com/chriso/validator.js/pull/807)) +- New locales + ([#803](https://github.com/chriso/validator.js/pull/803)) + +#### 9.4.1 + +- Patched a [REDOS](https://en.wikipedia.org/wiki/ReDoS) vulnerability in `isDataURI` +- New and improved locales + ([#788](https://github.com/chriso/validator.js/pull/788)) + +#### 9.4.0 + +- Added an option to `isMobilePhone` to require a country code + ([#769](https://github.com/chriso/validator.js/pull/769)) +- New and improved locales + ([#785](https://github.com/chriso/validator.js/pull/785)) + +#### 9.3.0 + +- New and improved locales + ([#763](https://github.com/chriso/validator.js/pull/763), + [#768](https://github.com/chriso/validator.js/pull/768), + [#774](https://github.com/chriso/validator.js/pull/774), + [#777](https://github.com/chriso/validator.js/pull/777), + [#779](https://github.com/chriso/validator.js/pull/779)) + +#### 9.2.0 + +- Added an `isMimeType()` validator + ([#760](https://github.com/chriso/validator.js/pull/760)) +- New and improved locales + ([#753](https://github.com/chriso/validator.js/pull/753), + [#755](https://github.com/chriso/validator.js/pull/755), + [#764](https://github.com/chriso/validator.js/pull/764)) + +#### 9.1.2 + +- Fixed a bug with the `isFloat` validator + ([#752](https://github.com/chriso/validator.js/pull/752)) + +#### 9.1.1 + +- Locale fixes + ([#738](https://github.com/chriso/validator.js/pull/738), + [#739](https://github.com/chriso/validator.js/pull/739)) + +#### 9.1.0 + +- Added an `isISO31661Alpha2()` validator + ([#734](https://github.com/chriso/validator.js/pull/734)) +- New locales + ([#735](https://github.com/chriso/validator.js/pull/735), + [#737](https://github.com/chriso/validator.js/pull/737)) + +#### 9.0.0 + +- `normalizeEmail()` no longer validates the email address + ([#725](https://github.com/chriso/validator.js/pull/725)) +- Added locale-aware validation to `isFloat()` and `isDecimal()` + ([#721](https://github.com/chriso/validator.js/pull/721)) +- Added an `isPort()` validator + ([#733](https://github.com/chriso/validator.js/pull/733)) +- New locales + ([#731](https://github.com/chriso/validator.js/pull/731)) + +#### 8.2.0 + +- Added an `isHash()` validator + ([#711](https://github.com/chriso/validator.js/pull/711)) +- Control decimal places in `isCurrency()` + ([#713](https://github.com/chriso/validator.js/pull/713)) +- New and improved locales + ([#700](https://github.com/chriso/validator.js/pull/700), + [#701](https://github.com/chriso/validator.js/pull/701), + [#714](https://github.com/chriso/validator.js/pull/714), + [#715](https://github.com/chriso/validator.js/pull/715), + [#718](https://github.com/chriso/validator.js/pull/718)) + +#### 8.1.0 + +- Fix `require('validator/lib/isIS8601')` calls + ([#688](https://github.com/chriso/validator.js/issues/688)) +- Added an `isLatLong()` and `isPostalCode()` validator + ([#684](https://github.com/chriso/validator.js/pull/684)) +- Allow comma in email display names + ([#692](https://github.com/chriso/validator.js/pull/692)) +- Add missing string to `unescape()` + ([#690](https://github.com/chriso/validator.js/pull/690)) +- Fix `isMobilePhone()` with Node <= 6.x + ([#681](https://github.com/chriso/validator.js/issues/681)) +- New locales + ([#695](https://github.com/chriso/validator.js/pull/695)) + +#### 8.0.0 + +- `isURL()` now requires the `require_tld: false` option to validate `localhost` + ([#675](https://github.com/chriso/validator.js/issues/675)) +- `isURL()` now rejects URLs that are protocol only + ([#642](https://github.com/chriso/validator.js/issues/642)) +- Fixed a bug where `isMobilePhone()` would silently return false if the locale was invalid or unsupported + ([#657](https://github.com/chriso/validator.js/issues/657)) + +#### 7.2.0 + +- Added an option to validate any phone locale + ([#663](https://github.com/chriso/validator.js/pull/663)) +- Fixed a bug in credit card validation + ([#672](https://github.com/chriso/validator.js/pull/672)) +- Disallow whitespace, including unicode whitespace, in TLDs + ([#677](https://github.com/chriso/validator.js/pull/677)) +- New locales + ([#673](https://github.com/chriso/validator.js/pull/673), + [#676](https://github.com/chriso/validator.js/pull/676)) + +#### 7.1.0 + +- Added an `isISRC()` validator for [ISRC](https://en.wikipedia.org/wiki/International_Standard_Recording_Code) + ([#660](https://github.com/chriso/validator.js/pull/660)) +- Fixed a bug in credit card validation + ([#670](https://github.com/chriso/validator.js/pull/670)) +- Reduced the maximum allowed address in `isEmail()` based on + [RFC3696 errata](http://www.rfc-editor.org/errata_search.php?rfc=3696&eid=1690) + ([#655](https://github.com/chriso/validator.js/issues/655)) +- New locales + ([#647](https://github.com/chriso/validator.js/pull/647), + [#667](https://github.com/chriso/validator.js/pull/667), + [#667](https://github.com/chriso/validator.js/pull/667), + [#671](https://github.com/chriso/validator.js/pull/671)) + +#### 7.0.0 + +- Remove `isDate()` + +#### 6.3.0 + +- Allow values like `-.01` in `isFloat()` + ([#618](https://github.com/chriso/validator.js/issues/618)) +- New locales + ([#616](https://github.com/chriso/validator.js/pull/616), + [#622](https://github.com/chriso/validator.js/pull/622), + [#627](https://github.com/chriso/validator.js/pull/627), + [#630](https://github.com/chriso/validator.js/pull/630)) + +#### 6.2.1 + +- Disallow `<` and `>` in URLs + ([#613](https://github.com/chriso/validator.js/issues/613)) +- New locales + ([#610](https://github.com/chriso/validator.js/pull/610)) + +#### 6.2.0 + +- Added an option to require an email display name + ([#607](https://github.com/chriso/validator.js/pull/607)) +- Added support for `lt` and `gt` to `isInt()` + ([#588](https://github.com/chriso/validator.js/pull/588)) +- New locales + ([#601](https://github.com/chriso/validator.js/pull/601)) + +#### 6.1.0 + +- Added support for greater or less than in `isFloat()` + ([#544](https://github.com/chriso/validator.js/issues/544)) +- Added support for ISSN validation via `isISSN()` + ([#593](https://github.com/chriso/validator.js/pull/593)) +- Fixed a bug in `normalizeEmail()` + ([#594](https://github.com/chriso/validator.js/issues/594)) +- New locales + ([#585](https://github.com/chriso/validator.js/pull/585)) + +#### 6.0.0 + +- Renamed `isNull()` to `isEmpty()` + ([#574](https://github.com/chriso/validator.js/issues/574)) +- Backslash is now escaped in `escape()` + ([#516](https://github.com/chriso/validator.js/issues/516)) +- Improved `normalizeEmail()` + ([#583](https://github.com/chriso/validator.js/pull/583)) +- Allow leading zeroes by default in `isInt()` + ([#532](https://github.com/chriso/validator.js/pull/532)) + +#### 5.7.0 + +- Added support for IPv6 in `isURL()` + ([#564](https://github.com/chriso/validator.js/issues/564)) +- Added support for urls without a host (e.g. `file:///foo.txt`) in `isURL()` + ([#563](https://github.com/chriso/validator.js/issues/563)) +- Added support for regular expressions in the `isURL()` host whitelist and blacklist + ([#562](https://github.com/chriso/validator.js/issues/562)) +- Added support for MasterCard 2-Series BIN + ([#576](https://github.com/chriso/validator.js/pull/576)) +- New locales + ([#575](https://github.com/chriso/validator.js/pull/575), + [#552](https://github.com/chriso/validator.js/issues/552)) + +#### 5.6.0 + +- Added an `isMD5()` validator + ([#557](https://github.com/chriso/validator.js/pull/557)) +- Fixed an exceptional case in `isDate()` + ([#566](https://github.com/chriso/validator.js/pull/566)) +- New locales + ([#559](https://github.com/chriso/validator.js/pull/559), + [#568](https://github.com/chriso/validator.js/pull/568), + [#571](https://github.com/chriso/validator.js/pull/571), + [#573](https://github.com/chriso/validator.js/pull/573)) + +#### 5.5.0 + +- Fixed a regex denial of service in `trim()` and `rtrim()` + ([#556](https://github.com/chriso/validator.js/pull/556)) +- Added an Algerian locale to `isMobilePhone()` + ([#540](https://github.com/chriso/validator.js/pull/540)) +- Fixed the Hungarian locale in `isAlpha()` and `isAlphanumeric()` + ([#541](https://github.com/chriso/validator.js/pull/541)) +- Added a Polish locale to `isMobilePhone()` + ([#545](https://github.com/chriso/validator.js/pull/545)) + +#### 5.4.0 + +- Accept Union Pay credit cards in `isCreditCard()` + ([#539](https://github.com/chriso/validator.js/pull/539)) +- Added Danish locale to `isMobilePhone()` + ([#538](https://github.com/chriso/validator.js/pull/538)) +- Added Hungarian locales to `isAlpha()`, `isAlphanumeric()` and `isMobilePhone()` + ([#537](https://github.com/chriso/validator.js/pull/537)) + +#### 5.3.0 + +- Added an `allow_leading_zeroes` option to `isInt()` + ([#532](https://github.com/chriso/validator.js/pull/532)) +- Adjust Chinese mobile phone validation + ([#523](https://github.com/chriso/validator.js/pull/523)) +- Added a Canadian locale to `isMobilePhone()` + ([#524](https://github.com/chriso/validator.js/issues/524)) + +#### 5.2.0 + +- Added a `isDataURI()` validator + ([#521](https://github.com/chriso/validator.js/pull/521)) +- Added Czech locales + ([#522](https://github.com/chriso/validator.js/pull/522)) +- Fixed a bug with `isURL()` when protocol was missing and "://" appeared in the query + ([#518](https://github.com/chriso/validator.js/issues/518)) + +#### 5.1.0 + +- Added a `unescape()` HTML function + ([#509](https://github.com/chriso/validator.js/pull/509)) +- Added a Malaysian locale to `isMobilePhone()` + ([#507](https://github.com/chriso/validator.js/pull/507)) +- Added Polish locales to `isAlpha()` and `isAlphanumeric()` + ([#506](https://github.com/chriso/validator.js/pull/506)) +- Added Turkish locales to `isAlpha()`, `isAlphanumeric()` and `isMobilePhone()` + ([#512](https://github.com/chriso/validator.js/pull/512)) +- Allow >1 underscore in hostnames when using `allow_underscores` + ([#510](https://github.com/chriso/validator.js/issues/510)) + +#### 5.0.0 + +- Migrate to ES6 + ([#496](https://github.com/chriso/validator.js/pull/496)) +- Break the library up so that individual functions can be imported + ([#496](https://github.com/chriso/validator.js/pull/496)) +- Remove auto-coercion of input to a string + ([#496](https://github.com/chriso/validator.js/pull/496)) +- Remove the `extend()` function + ([#496](https://github.com/chriso/validator.js/pull/496)) +- Added Arabic locales to `isAlpha()` and `isAlphanumeric()` + ([#496](https://github.com/chriso/validator.js/pull/496#issuecomment-184781730)) +- Fix validation of very large base64 strings + ([#503](https://github.com/chriso/validator.js/pull/503)) + +#### 4.9.0 + +- Added a Russian locale to `isAlpha()` and `isAlphanumeric()` + ([#499](https://github.com/chriso/validator.js/pull/499)) +- Remove the restriction on adjacent hyphens in hostnames + ([#500](https://github.com/chriso/validator.js/issues/500)) + +#### 4.8.0 + +- Added Spanish, French, Portuguese and Dutch support for `isAlpha()` and `isAlphanumeric()` + ([#492](https://github.com/chriso/validator.js/pull/492)) +- Added a Brazilian locale to `isMobilePhone()` + ([#489](https://github.com/chriso/validator.js/pull/489)) +- Reject IPv4 addresses with invalid zero padding + ([#490](https://github.com/chriso/validator.js/pull/490)) +- Fix the client-side version when used with RequireJS + ([#494](https://github.com/chriso/validator.js/issues/494)) + +#### 4.7.1 + +- Use [node-depd](https://github.com/dougwilson/nodejs-depd) to print deprecation notices + ([#487](https://github.com/chriso/validator.js/issues/487)) + +#### 4.7.0 + +- Print a deprecation warning if validator input is not a string + ([1f67e1e](https://github.com/chriso/validator.js/commit/1f67e1e15198c0ae735151290dc8dc2bf14da254)). + Note that this will be an error in v5. +- Added a German locale to `isMobilePhone()`, `isAlpha()` and `isAlphanumeric()` + ([#477](https://github.com/chriso/validator.js/pull/477)) +- Added a Finnish locale to `isMobilePhone()` + ([#455](https://github.com/chriso/validator.js/pull/455)) + +#### 4.6.1 + +- Fix coercion of objects: `Object.toString()` is `[object Object]` not `""` + ([a57f3c8](https://github.com/chriso/validator.js/commit/a57f3c843c715fba2664ee22ec80e9e28e88e0a6)) + +#### 4.6.0 + +- Added a Spanish locale to `isMobilePhone()` + ([#481](https://github.com/chriso/validator.js/pull/481)) +- Fix string coercion of objects created with `Object.create(null)` + ([#484](https://github.com/chriso/validator.js/issues/484)) + +#### 4.5.2 + +- Fix a timezone issue with short-form ISO 8601 dates, e.g. + `validator.isDate('2011-12-21')` + ([#480](https://github.com/chriso/validator.js/issues/480)) + +#### 4.5.1 + +- Make `isLength()` / `isByteLength()` accept `{min, max}` as options object. + ([#474](https://github.com/chriso/validator.js/issues/474)) + +#### 4.5.0 + +- Add validation for Indian mobile phone numbers + ([#471](https://github.com/chriso/validator.js/pull/471)) +- Tweak Greek and Chinese mobile phone validation + ([#467](https://github.com/chriso/validator.js/pull/467), + [#468](https://github.com/chriso/validator.js/pull/468)) +- Fixed a bug in `isDate()` when validating ISO 8601 dates without a timezone + ([#472](https://github.com/chriso/validator.js/issues/472)) + +#### 4.4.1 + +- Allow triple hyphens in IDNA hostnames + ([#466](https://github.com/chriso/validator.js/issues/466)) + +#### 4.4.0 + +- Added `isMACAddress()` validator + ([#458](https://github.com/chriso/validator.js/pull/458)) +- Added `isWhitelisted()` validator + ([#462](https://github.com/chriso/validator.js/pull/462)) +- Added a New Zealand locale to `isMobilePhone()` + ([#452](https://github.com/chriso/validator.js/pull/452)) +- Added options to control GMail address normalization + ([#460](https://github.com/chriso/validator.js/pull/460)) + +#### 4.3.0 + +- Support Ember CLI module definitions + ([#448](https://github.com/chriso/validator.js/pull/448)) +- Added a Vietnam locale to `isMobilePhone()` + ([#451](https://github.com/chriso/validator.js/pull/451)) + +#### 4.2.1 + +- Fix `isDate()` handling of RFC2822 timezones + ([#447](https://github.com/chriso/validator.js/pull/447)) + +#### 4.2.0 + +- Fix `isDate()` handling of ISO8601 timezones + ([#444](https://github.com/chriso/validator.js/pull/444)) +- Fix the incorrect `isFloat('.') === true` + ([#443](https://github.com/chriso/validator.js/pull/443)) +- Added a Norwegian locale to `isMobilePhone()` + ([#439](https://github.com/chriso/validator.js/pull/439)) + +#### 4.1.0 + +- General `isDate()` improvements + ([#431](https://github.com/chriso/validator.js/pull/431)) +- Tests now require node 4.0+ + ([#438](https://github.com/chriso/validator.js/pull/438)) + +#### 4.0.6 + +- Added a Taiwan locale to `isMobilePhone()` + ([#432](https://github.com/chriso/validator.js/pull/432)) +- Fixed a bug in `isBefore()` where it would return `null` + ([#436](https://github.com/chriso/validator.js/pull/436)) + +#### 4.0.5 + +- Fixed a denial of service vulnerability in the `isEmail()` regex + ([#152](https://github.com/chriso/validator.js/issues/152#issuecomment-131874928)) + +#### 4.0.4 + +- Reverted the leap year validation in `isDate()` as it introduced some regressions + ([#422](https://github.com/chriso/validator.js/issues/422), [#423](https://github.com/chriso/validator.js/issues/423)) + +#### 4.0.3 + +- Added leap year validation to `isDate()` + ([#418](https://github.com/chriso/validator.js/pull/418)) + +#### 4.0.2 + +- Fixed `isDecimal()` with an empty string + ([#419](https://github.com/chriso/validator.js/issues/419)) + +#### 4.0.1 + +- Fixed `isByteLength()` with certain strings + ([09f0c6d](https://github.com/chriso/validator.js/commit/09f0c6d2321f0c78af6a7de42e91b63955e4c01e)) +- Put length restrictions on email parts + ([#258](https://github.com/chriso/validator.js/issues/258#issuecomment-127173612)) + +#### 4.0.0 + +- Simplified the `isEmail()` regex and fixed some edge cases + ([#258](https://github.com/chriso/validator.js/issues/258#issuecomment-127173612)) +- Added ISO 8601 date validation via `isISO8601()` + ([#373](https://github.com/chriso/validator.js/issues/373)) diff --git a/node_modules/validator/LICENSE b/node_modules/validator/LICENSE new file mode 100644 index 00000000..4e49a384 --- /dev/null +++ b/node_modules/validator/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2018 Chris O'Hara + +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/validator/README.md b/node_modules/validator/README.md new file mode 100644 index 00000000..261b5e57 --- /dev/null +++ b/node_modules/validator/README.md @@ -0,0 +1,234 @@ +# validator.js + +[![NPM version][npm-image]][npm-url] +[![Build Status][travis-image]][travis-url] +[![Downloads][downloads-image]][npm-url] +[![Backers on Open Collective](https://opencollective.com/validatorjs/backers/badge.svg)](#backers) +[![Sponsors on Open Collective](https://opencollective.com/validatorjs/sponsors/badge.svg)](#sponsors) + +A library of string validators and sanitizers. + +## Strings only + +**This library validates and sanitizes strings only.** + +If you're not sure if your input is a string, coerce it using `input + ''`. +Passing anything other than a string is an error. + +## Installation and Usage + +### Server-side usage + +Install the library with `npm install validator` + +#### No ES6 + +```javascript +var validator = require('validator'); + +validator.isEmail('foo@bar.com'); //=> true +``` + +#### ES6 + +```javascript +import validator from 'validator'; +``` + +Or, import only a subset of the library: + +```javascript +import isEmail from 'validator/lib/isEmail'; +``` + +### Client-side usage + +The library can be loaded either as a standalone script, or through an [AMD][amd]-compatible loader + +```html + + +``` + +The library can also be installed through [bower][bower] + +```bash +$ bower install validator-js +``` + +## Contributors + +[Become a backer](https://opencollective.com/validatorjs#backer) + +[Become a sponsor](https://opencollective.com/validatorjs#sponsor) + +Thank you to the people who have already contributed: + + + +## Validators + +Here is a list of the validators currently available. + +Validator | Description +--------------------------------------- | -------------------------------------- +***contains(str, seed)*** | check if the string contains the seed. +**equals(str, comparison)** | check if the string matches the comparison. +**isAfter(str [, date])** | check if the string is a date that's after the specified date (defaults to now). +**isAlpha(str [, locale])** | check if the string contains only letters (a-zA-Z).

Locale is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', 'it-IT', 'ku-IQ', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sk-SK', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA']`) and defaults to `en-US`. Locale list is `validator.isAlphaLocales`. +**isAlphanumeric(str [, locale])** | check if the string contains only letters and numbers.

Locale is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', 'it-IT', 'ku-IQ', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sk-SK', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA']`) and defaults to `en-US`. Locale list is `validator.isAlphanumericLocales`. +**isAscii(str)** | check if the string contains ASCII chars only. +**isBase64(str)** | check if a string is base64 encoded. +**isBefore(str [, date])** | check if the string is a date that's before the specified date. +**isBoolean(str)** | check if a string is a boolean. +**isByteLength(str [, options])** | check if the string's length (in UTF-8 bytes) falls in a range.

`options` is an object which defaults to `{min:0, max: undefined}`. +**isCreditCard(str)** | check if the string is a credit card. +**isCurrency(str [, options])** | check if the string is a valid currency amount.

`options` is an object which defaults to `{symbol: '$', require_symbol: false, allow_space_after_symbol: false, symbol_after_digits: false, allow_negatives: true, parens_for_negatives: false, negative_sign_before_digits: false, negative_sign_after_digits: false, allow_negative_sign_placeholder: false, thousands_separator: ',', decimal_separator: '.', allow_decimal: true, require_decimal: false, digits_after_decimal: [2], allow_space_after_digits: false}`.
**Note:** The array `digits_after_decimal` is filled with the exact number of digits allowed not a range, for example a range 1 to 3 will be given as [1, 2, 3]. +**isDataURI(str)** | check if the string is a [data uri format](https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs). +**isMagnetURI(str)** | check if the string is a [magnet uri format](https://en.wikipedia.org/wiki/Magnet_URI_scheme). +**isDecimal(str [, options])** | check if the string represents a decimal number, such as 0.1, .3, 1.1, 1.00003, 4.0, etc.

`options` is an object which defaults to `{force_decimal: false, decimal_digits: '1,', locale: 'en-US'}`

`locale` determine the decimal separator and is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', 'it-IT', 'ku-IQ', nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA']`.
**Note:** `decimal_digits` is given as a range like '1,3', a specific value like '3' or min like '1,'. +**isDivisibleBy(str, number)** | check if the string is a number that's divisible by another. +**isEmail(str [, options])** | check if the string is an email.

`options` is an object which defaults to `{ allow_display_name: false, require_display_name: false, allow_utf8_local_part: true, require_tld: true, allow_ip_domain: false, domain_specific_validation: false }`. If `allow_display_name` is set to true, the validator will also match `Display Name `. If `require_display_name` is set to true, the validator will reject strings without the format `Display Name `. If `allow_utf8_local_part` is set to false, the validator will not allow any non-English UTF8 character in email address' local part. If `require_tld` is set to false, e-mail addresses without having TLD in their domain will also be matched. If `allow_ip_domain` is set to true, the validator will allow IP addresses in the host part. If `domain_specific_validation` is true, some additional validation will be enabled, e.g. disallowing certain syntactically valid email addresses that are rejected by GMail. +**isEmpty(str [, options])** | check if the string has a length of zero.

`options` is an object which defaults to `{ ignore_whitespace:false }`. +**isFQDN(str [, options])** | check if the string is a fully qualified domain name (e.g. domain.com).

`options` is an object which defaults to `{ require_tld: true, allow_underscores: false, allow_trailing_dot: false }`. +**isFloat(str [, options])** | check if the string is a float.

`options` is an object which can contain the keys `min`, `max`, `gt`, and/or `lt` to validate the float is within boundaries (e.g. `{ min: 7.22, max: 9.55 }`) it also has `locale` as an option.

`min` and `max` are equivalent to 'greater or equal' and 'less or equal', respectively while `gt` and `lt` are their strict counterparts.

`locale` determine the decimal separator and is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', 'it-IT', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA']`. Locale list is `validator.isFloatLocales`. +**isFullWidth(str)** | check if the string contains any full-width chars. +**isHalfWidth(str)** | check if the string contains any half-width chars. +**isHash(str, algorithm)** | check if the string is a hash of type algorithm.

Algorithm is one of `['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', 'tiger160', 'tiger192', 'crc32', 'crc32b']` +**isHexColor(str)** | check if the string is a hexadecimal color. +**isHexadecimal(str)** | check if the string is a hexadecimal number. +**isIdentityCard(str [, locale])** | check if the string is a valid identity card code.

`locale` is one of `['ES']` OR `'any'`. If 'any' is used, function will check if any of the locals match.

Defaults to 'any'. +**isIP(str [, version])** | check if the string is an IP (version 4 or 6). +**isIPRange(str)** | check if the string is an IP Range(version 4 only). +**isISBN(str [, version])** | check if the string is an ISBN (version 10 or 13). +**isISSN(str [, options])** | check if the string is an [ISSN](https://en.wikipedia.org/wiki/International_Standard_Serial_Number).

`options` is an object which defaults to `{ case_sensitive: false, require_hyphen: false }`. If `case_sensitive` is true, ISSNs with a lowercase `'x'` as the check digit are rejected. +**isISIN(str)** | check if the string is an [ISIN][ISIN] (stock/security identifier). +**isISO8601(str)** | check if the string is a valid [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date; for additional checks for valid dates, e.g. invalidates dates like `2009-02-29`, pass `options` object as a second parameter with `options.strict = true`. +**isRFC3339(str)** | check if the string is a valid [RFC 3339](https://tools.ietf.org/html/rfc3339) date. +**isISO31661Alpha2(str)** | check if the string is a valid [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) officially assigned country code. +**isISO31661Alpha3(str)** | check if the string is a valid [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) officially assigned country code. +**isISRC(str)** | check if the string is a [ISRC](https://en.wikipedia.org/wiki/International_Standard_Recording_Code). +**isIn(str, values)** | check if the string is in a array of allowed values. +**isInt(str [, options])** | check if the string is an integer.

`options` is an object which can contain the keys `min` and/or `max` to check the integer is within boundaries (e.g. `{ min: 10, max: 99 }`). `options` can also contain the key `allow_leading_zeroes`, which when set to false will disallow integer values with leading zeroes (e.g. `{ allow_leading_zeroes: false }`). Finally, `options` can contain the keys `gt` and/or `lt` which will enforce integers being greater than or less than, respectively, the value provided (e.g. `{gt: 1, lt: 4}` for a number between 1 and 4). +**isJSON(str)** | check if the string is valid JSON (note: uses JSON.parse). +**isJWT(str)** | check if the string is valid JWT token. +**isLatLong(str)**                     | check if the string is a valid latitude-longitude coordinate in the format `lat,long` or `lat, long`. +**isLength(str [, options])** | check if the string's length falls in a range.

`options` is an object which defaults to `{min:0, max: undefined}`. Note: this function takes into account surrogate pairs. +**isLowercase(str)** | check if the string is lowercase. +**isMACAddress(str)** | check if the string is a MAC address.

`options` is an object which defaults to `{no_colons: false}`. If `no_colons` is true, the validator will allow MAC addresses without the colons. +**isMD5(str)** | check if the string is a MD5 hash. +**isMimeType(str)** | check if the string matches to a valid [MIME type](https://en.wikipedia.org/wiki/Media_type) format +**isMobilePhone(str [, locale [, options]])** | check if the string is a mobile phone number,

(locale is either an array of locales (e.g `['sk-SK', 'sr-RS']`) OR one of `['ar-AE', 'ar-DZ', 'ar-EG', 'ar-IQ', ar-JO', 'ar-KW', 'ar-SA', 'ar-SY', 'ar-TN', 'be-BY', 'bg-BG', 'bn-BD', 'cs-CZ', 'de-DE', 'da-DK', 'el-GR', 'en-AU', 'en-CA', 'en-GB', 'en-GH', 'en-HK', 'en-IE', 'en-IN', 'en-KE', 'en-MU', en-NG', 'en-NZ', 'en-RW', 'en-SG', 'en-UG', 'en-US', 'en-TZ', 'en-ZA', 'en-ZM', 'en-PK', 'es-ES', 'es-MX', 'es-UY', 'et-EE', 'fa-IR', 'fi-FI', 'fr-FR', 'he-IL', 'hu-HU', 'it-IT', 'ja-JP', 'kk-KZ', 'ko-KR', 'lt-LT', 'ms-MY', 'nb-NO', 'nn-NO', 'pl-PL', 'pt-PT', 'pt-BR', 'ro-RO', 'ru-RU', 'sl-SI', 'sk-SK', 'sr-RS', 'sv-SE', 'th-TH', 'tr-TR', 'uk-UA', 'vi-VN', 'zh-CN', 'zh-HK', 'zh-TW']` OR defaults to 'any'. If 'any' or a falsey value is used, function will check if any of the locales match).

`options` is an optional object that can be supplied with the following keys: `strictMode`, if this is set to `true`, the mobile phone number must be supplied with the country code and therefore must start with `+`. Locale list is `validator.isMobilePhoneLocales`. +**isMongoId(str)** | check if the string is a valid hex-encoded representation of a [MongoDB ObjectId][mongoid]. +**isMultibyte(str)** | check if the string contains one or more multibyte chars. +**isNumeric(str [, options])** | check if the string contains only numbers.

`options` is an object which defaults to `{no_symbols: false}`. If `no_symbols` is true, the validator will reject numeric strings that feature a symbol (e.g. `+`, `-`, or `.`). +**isPort(str)** | check if the string is a valid port number. +**isPostalCode(str, locale)** | check if the string is a postal code,

(locale is one of `[ 'AD', 'AT', 'AU', 'BE', 'BG', 'CA', 'CH', 'CZ', 'DE', 'DK', 'DZ', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HU', 'IL', 'IN', 'IS', 'IT', 'JP', 'KE', 'LI', 'LT', 'LU', 'LV', 'MX', 'NL', 'NO', 'PL', 'PT', 'RO', 'RU', 'SA', 'SE', 'SI', 'TN', 'TW', 'UA', 'US', 'ZA', 'ZM' ]` OR 'any'. If 'any' is used, function will check if any of the locals match. Locale list is `validator.isPostalCodeLocales`.). +**isSurrogatePair(str)** | check if the string contains any surrogate pairs chars. +**isURL(str [, options])** | check if the string is an URL.

`options` is an object which defaults to `{ protocols: ['http','https','ftp'], require_tld: true, require_protocol: false, require_host: true, require_valid_protocol: true, allow_underscores: false, host_whitelist: false, host_blacklist: false, allow_trailing_dot: false, allow_protocol_relative_urls: false, disallow_auth: false }`. +**isUUID(str [, version])** | check if the string is a UUID (version 3, 4 or 5). +**isUppercase(str)** | check if the string is uppercase. +**isVariableWidth(str)** | check if the string contains a mixture of full and half-width chars. +**isWhitelisted(str, chars)** | checks characters if they appear in the whitelist. +**matches(str, pattern [, modifiers])** | check if string matches the pattern.

Either `matches('foo', /foo/i)` or `matches('foo', 'foo', 'i')`. + +## Sanitizers + +Here is a list of the sanitizers currently available. + +Sanitizer | Description +-------------------------------------- | ------------------------------- +**blacklist(input, chars)** | remove characters that appear in the blacklist. The characters are used in a RegExp and so you will need to escape some chars, e.g. `blacklist(input, '\\[\\]')`. +**escape(input)** | replace `<`, `>`, `&`, `'`, `"` and `/` with HTML entities. +**unescape(input)** | replaces HTML encoded entities with `<`, `>`, `&`, `'`, `"` and `/`. +**ltrim(input [, chars])** | trim characters from the left-side of the input. +**normalizeEmail(email [, options])** | canonicalizes an email address. (This doesn't validate that the input is an email, if you want to validate the email use isEmail beforehand)

`options` is an object with the following keys and default values:
  • *all_lowercase: true* - Transforms the local part (before the @ symbol) of all email addresses to lowercase. Please note that this may violate RFC 5321, which gives providers the possibility to treat the local part of email addresses in a case sensitive way (although in practice most - yet not all - providers don't). The domain part of the email address is always lowercased, as it's case insensitive per RFC 1035.
  • *gmail_lowercase: true* - GMail addresses are known to be case-insensitive, so this switch allows lowercasing them even when *all_lowercase* is set to false. Please note that when *all_lowercase* is true, GMail addresses are lowercased regardless of the value of this setting.
  • *gmail_remove_dots: true*: Removes dots from the local part of the email address, as GMail ignores them (e.g. "john.doe" and "johndoe" are considered equal).
  • *gmail_remove_subaddress: true*: Normalizes addresses by removing "sub-addresses", which is the part following a "+" sign (e.g. "foo+bar@gmail.com" becomes "foo@gmail.com").
  • *gmail_convert_googlemaildotcom: true*: Converts addresses with domain @googlemail.com to @gmail.com, as they're equivalent.
  • *outlookdotcom_lowercase: true* - Outlook.com addresses (including Windows Live and Hotmail) are known to be case-insensitive, so this switch allows lowercasing them even when *all_lowercase* is set to false. Please note that when *all_lowercase* is true, Outlook.com addresses are lowercased regardless of the value of this setting.
  • *outlookdotcom_remove_subaddress: true*: Normalizes addresses by removing "sub-addresses", which is the part following a "+" sign (e.g. "foo+bar@outlook.com" becomes "foo@outlook.com").
  • *yahoo_lowercase: true* - Yahoo Mail addresses are known to be case-insensitive, so this switch allows lowercasing them even when *all_lowercase* is set to false. Please note that when *all_lowercase* is true, Yahoo Mail addresses are lowercased regardless of the value of this setting.
  • *yahoo_remove_subaddress: true*: Normalizes addresses by removing "sub-addresses", which is the part following a "-" sign (e.g. "foo-bar@yahoo.com" becomes "foo@yahoo.com").
  • *icloud_lowercase: true* - iCloud addresses (including MobileMe) are known to be case-insensitive, so this switch allows lowercasing them even when *all_lowercase* is set to false. Please note that when *all_lowercase* is true, iCloud addresses are lowercased regardless of the value of this setting.
  • *icloud_remove_subaddress: true*: Normalizes addresses by removing "sub-addresses", which is the part following a "+" sign (e.g. "foo+bar@icloud.com" becomes "foo@icloud.com").
+**rtrim(input [, chars])** | trim characters from the right-side of the input. +**stripLow(input [, keep_new_lines])** | remove characters with a numerical value < 32 and 127, mostly control characters. If `keep_new_lines` is `true`, newline characters are preserved (`\n` and `\r`, hex `0xA` and `0xD`). Unicode-safe in JavaScript. +**toBoolean(input [, strict])** | convert the input string to a boolean. Everything except for `'0'`, `'false'` and `''` returns `true`. In strict mode only `'1'` and `'true'` return `true`. +**toDate(input)** | convert the input string to a date, or `null` if the input is not a date. +**toFloat(input)** | convert the input string to a float, or `NaN` if the input is not a float. +**toInt(input [, radix])** | convert the input string to an integer, or `NaN` if the input is not an integer. +**trim(input [, chars])** | trim characters (whitespace by default) from both sides of the input. +**whitelist(input, chars)** | remove characters that do not appear in the whitelist. The characters are used in a RegExp and so you will need to escape some chars, e.g. `whitelist(input, '\\[\\]')`. + +### XSS Sanitization + +XSS sanitization was removed from the library in [2d5d6999](https://github.com/chriso/validator.js/commit/2d5d6999541add350fb396ef02dc42ca3215049e). + +For an alternative, have a look at Yahoo's [xss-filters library](https://github.com/yahoo/xss-filters) or at [DOMPurify](https://github.com/cure53/DOMPurify). + +## Contributing + +In general, we follow the "fork-and-pull" Git workflow. + +1. Fork the repo on GitHub +2. Clone the project to your own machine +3. Work on your fork + 1. Make your changes and additions + 2. Change or add tests if needed + 3. Run tests and make sure they pass + 4. Add changes to README.md if needed +4. Commit changes to your own branch +5. **Make sure** you merge the latest from "upstream" and resolve conflicts if there is any +6. Repeat step 3(3) above +7. Push your work back up to your fork +8. Submit a Pull request so that we can review your changes + +## Tests + +Tests are using mocha, to run the tests use: + +```sh +$ npm test +``` + +## Maintainers + +- [chriso](https://github.com/chriso) - **Chris O'Hara** (author) +- [profnandaa](https://github.com/profnandaa) - **Anthony Nandaa** + +## Reading + +Remember, validating can be troublesome sometimes. See [A list of articles about programming assumptions commonly made that aren't true](https://github.com/jameslk/awesome-falsehoods). + +## License (MIT) + +``` +Copyright (c) 2018 Chris O'Hara + +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. +``` + +[downloads-image]: http://img.shields.io/npm/dm/validator.svg + +[npm-url]: https://npmjs.org/package/validator +[npm-image]: http://img.shields.io/npm/v/validator.svg + +[travis-url]: https://travis-ci.org/chriso/validator.js +[travis-image]: http://img.shields.io/travis/chriso/validator.js.svg + +[amd]: http://requirejs.org/docs/whyamd.html +[bower]: http://bower.io/ + +[mongoid]: http://docs.mongodb.org/manual/reference/object-id/ +[ISIN]: https://en.wikipedia.org/wiki/International_Securities_Identification_Number diff --git a/node_modules/validator/index.js b/node_modules/validator/index.js new file mode 100644 index 00000000..478b5686 --- /dev/null +++ b/node_modules/validator/index.js @@ -0,0 +1,243 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _toDate = _interopRequireDefault(require("./lib/toDate")); + +var _toFloat = _interopRequireDefault(require("./lib/toFloat")); + +var _toInt = _interopRequireDefault(require("./lib/toInt")); + +var _toBoolean = _interopRequireDefault(require("./lib/toBoolean")); + +var _equals = _interopRequireDefault(require("./lib/equals")); + +var _contains = _interopRequireDefault(require("./lib/contains")); + +var _matches = _interopRequireDefault(require("./lib/matches")); + +var _isEmail = _interopRequireDefault(require("./lib/isEmail")); + +var _isURL = _interopRequireDefault(require("./lib/isURL")); + +var _isMACAddress = _interopRequireDefault(require("./lib/isMACAddress")); + +var _isIP = _interopRequireDefault(require("./lib/isIP")); + +var _isIPRange = _interopRequireDefault(require("./lib/isIPRange")); + +var _isFQDN = _interopRequireDefault(require("./lib/isFQDN")); + +var _isBoolean = _interopRequireDefault(require("./lib/isBoolean")); + +var _isAlpha = _interopRequireWildcard(require("./lib/isAlpha")); + +var _isAlphanumeric = _interopRequireWildcard(require("./lib/isAlphanumeric")); + +var _isNumeric = _interopRequireDefault(require("./lib/isNumeric")); + +var _isPort = _interopRequireDefault(require("./lib/isPort")); + +var _isLowercase = _interopRequireDefault(require("./lib/isLowercase")); + +var _isUppercase = _interopRequireDefault(require("./lib/isUppercase")); + +var _isAscii = _interopRequireDefault(require("./lib/isAscii")); + +var _isFullWidth = _interopRequireDefault(require("./lib/isFullWidth")); + +var _isHalfWidth = _interopRequireDefault(require("./lib/isHalfWidth")); + +var _isVariableWidth = _interopRequireDefault(require("./lib/isVariableWidth")); + +var _isMultibyte = _interopRequireDefault(require("./lib/isMultibyte")); + +var _isSurrogatePair = _interopRequireDefault(require("./lib/isSurrogatePair")); + +var _isInt = _interopRequireDefault(require("./lib/isInt")); + +var _isFloat = _interopRequireWildcard(require("./lib/isFloat")); + +var _isDecimal = _interopRequireDefault(require("./lib/isDecimal")); + +var _isHexadecimal = _interopRequireDefault(require("./lib/isHexadecimal")); + +var _isDivisibleBy = _interopRequireDefault(require("./lib/isDivisibleBy")); + +var _isHexColor = _interopRequireDefault(require("./lib/isHexColor")); + +var _isISRC = _interopRequireDefault(require("./lib/isISRC")); + +var _isMD = _interopRequireDefault(require("./lib/isMD5")); + +var _isHash = _interopRequireDefault(require("./lib/isHash")); + +var _isJWT = _interopRequireDefault(require("./lib/isJWT")); + +var _isJSON = _interopRequireDefault(require("./lib/isJSON")); + +var _isEmpty = _interopRequireDefault(require("./lib/isEmpty")); + +var _isLength = _interopRequireDefault(require("./lib/isLength")); + +var _isByteLength = _interopRequireDefault(require("./lib/isByteLength")); + +var _isUUID = _interopRequireDefault(require("./lib/isUUID")); + +var _isMongoId = _interopRequireDefault(require("./lib/isMongoId")); + +var _isAfter = _interopRequireDefault(require("./lib/isAfter")); + +var _isBefore = _interopRequireDefault(require("./lib/isBefore")); + +var _isIn = _interopRequireDefault(require("./lib/isIn")); + +var _isCreditCard = _interopRequireDefault(require("./lib/isCreditCard")); + +var _isIdentityCard = _interopRequireDefault(require("./lib/isIdentityCard")); + +var _isISIN = _interopRequireDefault(require("./lib/isISIN")); + +var _isISBN = _interopRequireDefault(require("./lib/isISBN")); + +var _isISSN = _interopRequireDefault(require("./lib/isISSN")); + +var _isMobilePhone = _interopRequireWildcard(require("./lib/isMobilePhone")); + +var _isCurrency = _interopRequireDefault(require("./lib/isCurrency")); + +var _isISO = _interopRequireDefault(require("./lib/isISO8601")); + +var _isRFC = _interopRequireDefault(require("./lib/isRFC3339")); + +var _isISO31661Alpha = _interopRequireDefault(require("./lib/isISO31661Alpha2")); + +var _isISO31661Alpha2 = _interopRequireDefault(require("./lib/isISO31661Alpha3")); + +var _isBase = _interopRequireDefault(require("./lib/isBase64")); + +var _isDataURI = _interopRequireDefault(require("./lib/isDataURI")); + +var _isMagnetURI = _interopRequireDefault(require("./lib/isMagnetURI")); + +var _isMimeType = _interopRequireDefault(require("./lib/isMimeType")); + +var _isLatLong = _interopRequireDefault(require("./lib/isLatLong")); + +var _isPostalCode = _interopRequireWildcard(require("./lib/isPostalCode")); + +var _ltrim = _interopRequireDefault(require("./lib/ltrim")); + +var _rtrim = _interopRequireDefault(require("./lib/rtrim")); + +var _trim = _interopRequireDefault(require("./lib/trim")); + +var _escape = _interopRequireDefault(require("./lib/escape")); + +var _unescape = _interopRequireDefault(require("./lib/unescape")); + +var _stripLow = _interopRequireDefault(require("./lib/stripLow")); + +var _whitelist = _interopRequireDefault(require("./lib/whitelist")); + +var _blacklist = _interopRequireDefault(require("./lib/blacklist")); + +var _isWhitelisted = _interopRequireDefault(require("./lib/isWhitelisted")); + +var _normalizeEmail = _interopRequireDefault(require("./lib/normalizeEmail")); + +var _toString = _interopRequireDefault(require("./lib/util/toString")); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var version = '10.11.0'; +var validator = { + version: version, + toDate: _toDate.default, + toFloat: _toFloat.default, + toInt: _toInt.default, + toBoolean: _toBoolean.default, + equals: _equals.default, + contains: _contains.default, + matches: _matches.default, + isEmail: _isEmail.default, + isURL: _isURL.default, + isMACAddress: _isMACAddress.default, + isIP: _isIP.default, + isIPRange: _isIPRange.default, + isFQDN: _isFQDN.default, + isBoolean: _isBoolean.default, + isAlpha: _isAlpha.default, + isAlphaLocales: _isAlpha.locales, + isAlphanumeric: _isAlphanumeric.default, + isAlphanumericLocales: _isAlphanumeric.locales, + isNumeric: _isNumeric.default, + isPort: _isPort.default, + isLowercase: _isLowercase.default, + isUppercase: _isUppercase.default, + isAscii: _isAscii.default, + isFullWidth: _isFullWidth.default, + isHalfWidth: _isHalfWidth.default, + isVariableWidth: _isVariableWidth.default, + isMultibyte: _isMultibyte.default, + isSurrogatePair: _isSurrogatePair.default, + isInt: _isInt.default, + isFloat: _isFloat.default, + isFloatLocales: _isFloat.locales, + isDecimal: _isDecimal.default, + isHexadecimal: _isHexadecimal.default, + isDivisibleBy: _isDivisibleBy.default, + isHexColor: _isHexColor.default, + isISRC: _isISRC.default, + isMD5: _isMD.default, + isHash: _isHash.default, + isJWT: _isJWT.default, + isJSON: _isJSON.default, + isEmpty: _isEmpty.default, + isLength: _isLength.default, + isByteLength: _isByteLength.default, + isUUID: _isUUID.default, + isMongoId: _isMongoId.default, + isAfter: _isAfter.default, + isBefore: _isBefore.default, + isIn: _isIn.default, + isCreditCard: _isCreditCard.default, + isIdentityCard: _isIdentityCard.default, + isISIN: _isISIN.default, + isISBN: _isISBN.default, + isISSN: _isISSN.default, + isMobilePhone: _isMobilePhone.default, + isMobilePhoneLocales: _isMobilePhone.locales, + isPostalCode: _isPostalCode.default, + isPostalCodeLocales: _isPostalCode.locales, + isCurrency: _isCurrency.default, + isISO8601: _isISO.default, + isRFC3339: _isRFC.default, + isISO31661Alpha2: _isISO31661Alpha.default, + isISO31661Alpha3: _isISO31661Alpha2.default, + isBase64: _isBase.default, + isDataURI: _isDataURI.default, + isMagnetURI: _isMagnetURI.default, + isMimeType: _isMimeType.default, + isLatLong: _isLatLong.default, + ltrim: _ltrim.default, + rtrim: _rtrim.default, + trim: _trim.default, + escape: _escape.default, + unescape: _unescape.default, + stripLow: _stripLow.default, + whitelist: _whitelist.default, + blacklist: _blacklist.default, + isWhitelisted: _isWhitelisted.default, + normalizeEmail: _normalizeEmail.default, + toString: _toString.default +}; +var _default = validator; +exports.default = _default; +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/alpha.js b/node_modules/validator/lib/alpha.js new file mode 100644 index 00000000..f3669408 --- /dev/null +++ b/node_modules/validator/lib/alpha.js @@ -0,0 +1,109 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.commaDecimal = exports.dotDecimal = exports.arabicLocales = exports.englishLocales = exports.decimal = exports.alphanumeric = exports.alpha = void 0; +var alpha = { + 'en-US': /^[A-Z]+$/i, + 'bg-BG': /^[А-Я]+$/i, + 'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + 'da-DK': /^[A-ZÆØÅ]+$/i, + 'de-DE': /^[A-ZÄÖÜß]+$/i, + 'el-GR': /^[Α-ω]+$/i, + 'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i, + 'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + 'it-IT': /^[A-ZÀÉÈÌÎÓÒÙ]+$/i, + 'nb-NO': /^[A-ZÆØÅ]+$/i, + 'nl-NL': /^[A-ZÁÉËÏÓÖÜÚ]+$/i, + 'nn-NO': /^[A-ZÆØÅ]+$/i, + 'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + 'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + 'pt-PT': /^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i, + 'ru-RU': /^[А-ЯЁ]+$/i, + 'sl-SI': /^[A-ZČĆĐŠŽ]+$/i, + 'sk-SK': /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, + 'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i, + 'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i, + 'sv-SE': /^[A-ZÅÄÖ]+$/i, + 'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i, + 'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i, + 'ku-IQ': /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, + ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/ +}; +exports.alpha = alpha; +var alphanumeric = { + 'en-US': /^[0-9A-Z]+$/i, + 'bg-BG': /^[0-9А-Я]+$/i, + 'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + 'da-DK': /^[0-9A-ZÆØÅ]+$/i, + 'de-DE': /^[0-9A-ZÄÖÜß]+$/i, + 'el-GR': /^[0-9Α-ω]+$/i, + 'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i, + 'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + 'it-IT': /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i, + 'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + 'nb-NO': /^[0-9A-ZÆØÅ]+$/i, + 'nl-NL': /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i, + 'nn-NO': /^[0-9A-ZÆØÅ]+$/i, + 'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + 'pt-PT': /^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i, + 'ru-RU': /^[0-9А-ЯЁ]+$/i, + 'sl-SI': /^[0-9A-ZČĆĐŠŽ]+$/i, + 'sk-SK': /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, + 'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i, + 'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i, + 'sv-SE': /^[0-9A-ZÅÄÖ]+$/i, + 'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i, + 'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i, + 'ku-IQ': /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, + ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/ +}; +exports.alphanumeric = alphanumeric; +var decimal = { + 'en-US': '.', + ar: '٫' +}; +exports.decimal = decimal; +var englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM']; +exports.englishLocales = englishLocales; + +for (var locale, i = 0; i < englishLocales.length; i++) { + locale = "en-".concat(englishLocales[i]); + alpha[locale] = alpha['en-US']; + alphanumeric[locale] = alphanumeric['en-US']; + decimal[locale] = decimal['en-US']; +} // Source: http://www.localeplanet.com/java/ + + +var arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE']; +exports.arabicLocales = arabicLocales; + +for (var _locale, _i = 0; _i < arabicLocales.length; _i++) { + _locale = "ar-".concat(arabicLocales[_i]); + alpha[_locale] = alpha.ar; + alphanumeric[_locale] = alphanumeric.ar; + decimal[_locale] = decimal.ar; +} // Source: https://en.wikipedia.org/wiki/Decimal_mark + + +var dotDecimal = []; +exports.dotDecimal = dotDecimal; +var commaDecimal = ['bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'es-ES', 'fr-FR', 'it-IT', 'ku-IQ', 'hu-HU', 'nb-NO', 'nn-NO', 'nl-NL', 'pl-PL', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS@latin', 'sr-RS', 'sv-SE', 'tr-TR', 'uk-UA']; +exports.commaDecimal = commaDecimal; + +for (var _i2 = 0; _i2 < dotDecimal.length; _i2++) { + decimal[dotDecimal[_i2]] = decimal['en-US']; +} + +for (var _i3 = 0; _i3 < commaDecimal.length; _i3++) { + decimal[commaDecimal[_i3]] = ','; +} + +alpha['pt-BR'] = alpha['pt-PT']; +alphanumeric['pt-BR'] = alphanumeric['pt-PT']; +decimal['pt-BR'] = decimal['pt-PT']; // see #862 + +alpha['pl-Pl'] = alpha['pl-PL']; +alphanumeric['pl-Pl'] = alphanumeric['pl-PL']; +decimal['pl-Pl'] = decimal['pl-PL']; \ No newline at end of file diff --git a/node_modules/validator/lib/blacklist.js b/node_modules/validator/lib/blacklist.js new file mode 100644 index 00000000..5dd42ed2 --- /dev/null +++ b/node_modules/validator/lib/blacklist.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = blacklist; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function blacklist(str, chars) { + (0, _assertString.default)(str); + return str.replace(new RegExp("[".concat(chars, "]+"), 'g'), ''); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/contains.js b/node_modules/validator/lib/contains.js new file mode 100644 index 00000000..b02fda2c --- /dev/null +++ b/node_modules/validator/lib/contains.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = contains; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _toString = _interopRequireDefault(require("./util/toString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function contains(str, elem) { + (0, _assertString.default)(str); + return str.indexOf((0, _toString.default)(elem)) >= 0; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/equals.js b/node_modules/validator/lib/equals.js new file mode 100644 index 00000000..a33c5ab2 --- /dev/null +++ b/node_modules/validator/lib/equals.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = equals; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function equals(str, comparison) { + (0, _assertString.default)(str); + return str === comparison; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/escape.js b/node_modules/validator/lib/escape.js new file mode 100644 index 00000000..05e42203 --- /dev/null +++ b/node_modules/validator/lib/escape.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = escape; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function escape(str) { + (0, _assertString.default)(str); + return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(//g, '>').replace(/\//g, '/').replace(/\\/g, '\').replace(/`/g, '`'); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isAfter.js b/node_modules/validator/lib/isAfter.js new file mode 100644 index 00000000..1fa18adb --- /dev/null +++ b/node_modules/validator/lib/isAfter.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isAfter; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _toDate = _interopRequireDefault(require("./toDate")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isAfter(str) { + var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date()); + (0, _assertString.default)(str); + var comparison = (0, _toDate.default)(date); + var original = (0, _toDate.default)(str); + return !!(original && comparison && original > comparison); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isAlpha.js b/node_modules/validator/lib/isAlpha.js new file mode 100644 index 00000000..50352545 --- /dev/null +++ b/node_modules/validator/lib/isAlpha.js @@ -0,0 +1,27 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isAlpha; +exports.locales = void 0; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _alpha = require("./alpha"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isAlpha(str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; + (0, _assertString.default)(str); + + if (locale in _alpha.alpha) { + return _alpha.alpha[locale].test(str); + } + + throw new Error("Invalid locale '".concat(locale, "'")); +} + +var locales = Object.keys(_alpha.alpha); +exports.locales = locales; \ No newline at end of file diff --git a/node_modules/validator/lib/isAlphanumeric.js b/node_modules/validator/lib/isAlphanumeric.js new file mode 100644 index 00000000..33fc3c1a --- /dev/null +++ b/node_modules/validator/lib/isAlphanumeric.js @@ -0,0 +1,27 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isAlphanumeric; +exports.locales = void 0; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _alpha = require("./alpha"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isAlphanumeric(str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; + (0, _assertString.default)(str); + + if (locale in _alpha.alphanumeric) { + return _alpha.alphanumeric[locale].test(str); + } + + throw new Error("Invalid locale '".concat(locale, "'")); +} + +var locales = Object.keys(_alpha.alphanumeric); +exports.locales = locales; \ No newline at end of file diff --git a/node_modules/validator/lib/isAscii.js b/node_modules/validator/lib/isAscii.js new file mode 100644 index 00000000..3c622717 --- /dev/null +++ b/node_modules/validator/lib/isAscii.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isAscii; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable no-control-regex */ +var ascii = /^[\x00-\x7F]+$/; +/* eslint-enable no-control-regex */ + +function isAscii(str) { + (0, _assertString.default)(str); + return ascii.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isBase64.js b/node_modules/validator/lib/isBase64.js new file mode 100644 index 00000000..283daecb --- /dev/null +++ b/node_modules/validator/lib/isBase64.js @@ -0,0 +1,27 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBase64; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var notBase64 = /[^A-Z0-9+\/=]/i; + +function isBase64(str) { + (0, _assertString.default)(str); + var len = str.length; + + if (!len || len % 4 !== 0 || notBase64.test(str)) { + return false; + } + + var firstPaddingChar = str.indexOf('='); + return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && str[len - 1] === '='; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isBefore.js b/node_modules/validator/lib/isBefore.js new file mode 100644 index 00000000..a54eda8f --- /dev/null +++ b/node_modules/validator/lib/isBefore.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBefore; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _toDate = _interopRequireDefault(require("./toDate")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isBefore(str) { + var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date()); + (0, _assertString.default)(str); + var comparison = (0, _toDate.default)(date); + var original = (0, _toDate.default)(str); + return !!(original && comparison && original < comparison); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isBoolean.js b/node_modules/validator/lib/isBoolean.js new file mode 100644 index 00000000..79d0eb0f --- /dev/null +++ b/node_modules/validator/lib/isBoolean.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBoolean; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isBoolean(str) { + (0, _assertString.default)(str); + return ['true', 'false', '1', '0'].indexOf(str) >= 0; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isByteLength.js b/node_modules/validator/lib/isByteLength.js new file mode 100644 index 00000000..bbf12eeb --- /dev/null +++ b/node_modules/validator/lib/isByteLength.js @@ -0,0 +1,34 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isByteLength; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +/* eslint-disable prefer-rest-params */ +function isByteLength(str, options) { + (0, _assertString.default)(str); + var min; + var max; + + if (_typeof(options) === 'object') { + min = options.min || 0; + max = options.max; + } else { + // backwards compatibility: isByteLength(str, min [, max]) + min = arguments[1]; + max = arguments[2]; + } + + var len = encodeURI(str).split(/%..|./).length - 1; + return len >= min && (typeof max === 'undefined' || len <= max); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isCreditCard.js b/node_modules/validator/lib/isCreditCard.js new file mode 100644 index 00000000..6f77f565 --- /dev/null +++ b/node_modules/validator/lib/isCreditCard.js @@ -0,0 +1,52 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isCreditCard; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable max-len */ +var creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|6[27][0-9]{14})$/; +/* eslint-enable max-len */ + +function isCreditCard(str) { + (0, _assertString.default)(str); + var sanitized = str.replace(/[- ]+/g, ''); + + if (!creditCard.test(sanitized)) { + return false; + } + + var sum = 0; + var digit; + var tmpNum; + var shouldDouble; + + for (var i = sanitized.length - 1; i >= 0; i--) { + digit = sanitized.substring(i, i + 1); + tmpNum = parseInt(digit, 10); + + if (shouldDouble) { + tmpNum *= 2; + + if (tmpNum >= 10) { + sum += tmpNum % 10 + 1; + } else { + sum += tmpNum; + } + } else { + sum += tmpNum; + } + + shouldDouble = !shouldDouble; + } + + return !!(sum % 10 === 0 ? sanitized : false); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isCurrency.js b/node_modules/validator/lib/isCurrency.js new file mode 100644 index 00000000..743b2e88 --- /dev/null +++ b/node_modules/validator/lib/isCurrency.js @@ -0,0 +1,89 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isCurrency; + +var _merge = _interopRequireDefault(require("./util/merge")); + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function currencyRegex(options) { + var decimal_digits = "\\d{".concat(options.digits_after_decimal[0], "}"); + options.digits_after_decimal.forEach(function (digit, index) { + if (index !== 0) decimal_digits = "".concat(decimal_digits, "|\\d{").concat(digit, "}"); + }); + var symbol = "(\\".concat(options.symbol.replace(/\./g, '\\.'), ")").concat(options.require_symbol ? '' : '?'), + negative = '-?', + whole_dollar_amount_without_sep = '[1-9]\\d*', + whole_dollar_amount_with_sep = "[1-9]\\d{0,2}(\\".concat(options.thousands_separator, "\\d{3})*"), + valid_whole_dollar_amounts = ['0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep], + whole_dollar_amount = "(".concat(valid_whole_dollar_amounts.join('|'), ")?"), + decimal_amount = "(\\".concat(options.decimal_separator, "(").concat(decimal_digits, "))").concat(options.require_decimal ? '' : '?'); + var pattern = whole_dollar_amount + (options.allow_decimal || options.require_decimal ? decimal_amount : ''); // default is negative sign before symbol, but there are two other options (besides parens) + + if (options.allow_negatives && !options.parens_for_negatives) { + if (options.negative_sign_after_digits) { + pattern += negative; + } else if (options.negative_sign_before_digits) { + pattern = negative + pattern; + } + } // South African Rand, for example, uses R 123 (space) and R-123 (no space) + + + if (options.allow_negative_sign_placeholder) { + pattern = "( (?!\\-))?".concat(pattern); + } else if (options.allow_space_after_symbol) { + pattern = " ?".concat(pattern); + } else if (options.allow_space_after_digits) { + pattern += '( (?!$))?'; + } + + if (options.symbol_after_digits) { + pattern += symbol; + } else { + pattern = symbol + pattern; + } + + if (options.allow_negatives) { + if (options.parens_for_negatives) { + pattern = "(\\(".concat(pattern, "\\)|").concat(pattern, ")"); + } else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) { + pattern = negative + pattern; + } + } // ensure there's a dollar and/or decimal amount, and that + // it doesn't start with a space or a negative sign followed by a space + + + return new RegExp("^(?!-? )(?=.*\\d)".concat(pattern, "$")); +} + +var default_currency_options = { + symbol: '$', + require_symbol: false, + allow_space_after_symbol: false, + symbol_after_digits: false, + allow_negatives: true, + parens_for_negatives: false, + negative_sign_before_digits: false, + negative_sign_after_digits: false, + allow_negative_sign_placeholder: false, + thousands_separator: ',', + decimal_separator: '.', + allow_decimal: true, + require_decimal: false, + digits_after_decimal: [2], + allow_space_after_digits: false +}; + +function isCurrency(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_currency_options); + return currencyRegex(options).test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isDataURI.js b/node_modules/validator/lib/isDataURI.js new file mode 100644 index 00000000..e8829660 --- /dev/null +++ b/node_modules/validator/lib/isDataURI.js @@ -0,0 +1,54 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isDataURI; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var validMediaType = /^[a-z]+\/[a-z0-9\-\+]+$/i; +var validAttribute = /^[a-z\-]+=[a-z0-9\-]+$/i; +var validData = /^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i; + +function isDataURI(str) { + (0, _assertString.default)(str); + var data = str.split(','); + + if (data.length < 2) { + return false; + } + + var attributes = data.shift().trim().split(';'); + var schemeAndMediaType = attributes.shift(); + + if (schemeAndMediaType.substr(0, 5) !== 'data:') { + return false; + } + + var mediaType = schemeAndMediaType.substr(5); + + if (mediaType !== '' && !validMediaType.test(mediaType)) { + return false; + } + + for (var i = 0; i < attributes.length; i++) { + if (i === attributes.length - 1 && attributes[i].toLowerCase() === 'base64') {// ok + } else if (!validAttribute.test(attributes[i])) { + return false; + } + } + + for (var _i = 0; _i < data.length; _i++) { + if (!validData.test(data[_i])) { + return false; + } + } + + return true; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isDecimal.js b/node_modules/validator/lib/isDecimal.js new file mode 100644 index 00000000..d45b05f6 --- /dev/null +++ b/node_modules/validator/lib/isDecimal.js @@ -0,0 +1,42 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isDecimal; + +var _merge = _interopRequireDefault(require("./util/merge")); + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _includes = _interopRequireDefault(require("./util/includes")); + +var _alpha = require("./alpha"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function decimalRegExp(options) { + var regExp = new RegExp("^[-+]?([0-9]+)?(\\".concat(_alpha.decimal[options.locale], "[0-9]{").concat(options.decimal_digits, "})").concat(options.force_decimal ? '' : '?', "$")); + return regExp; +} + +var default_decimal_options = { + force_decimal: false, + decimal_digits: '1,', + locale: 'en-US' +}; +var blacklist = ['', '-', '+']; + +function isDecimal(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_decimal_options); + + if (options.locale in _alpha.decimal) { + return !(0, _includes.default)(blacklist, str.replace(/ /g, '')) && decimalRegExp(options).test(str); + } + + throw new Error("Invalid locale '".concat(options.locale, "'")); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isDivisibleBy.js b/node_modules/validator/lib/isDivisibleBy.js new file mode 100644 index 00000000..02408b37 --- /dev/null +++ b/node_modules/validator/lib/isDivisibleBy.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isDivisibleBy; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _toFloat = _interopRequireDefault(require("./toFloat")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isDivisibleBy(str, num) { + (0, _assertString.default)(str); + return (0, _toFloat.default)(str) % parseInt(num, 10) === 0; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isEmail.js b/node_modules/validator/lib/isEmail.js new file mode 100644 index 00000000..ab897f77 --- /dev/null +++ b/node_modules/validator/lib/isEmail.js @@ -0,0 +1,133 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isEmail; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _merge = _interopRequireDefault(require("./util/merge")); + +var _isByteLength = _interopRequireDefault(require("./isByteLength")); + +var _isFQDN = _interopRequireDefault(require("./isFQDN")); + +var _isIP = _interopRequireDefault(require("./isIP")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var default_email_options = { + allow_display_name: false, + require_display_name: false, + allow_utf8_local_part: true, + require_tld: true +}; +/* eslint-disable max-len */ + +/* eslint-disable no-control-regex */ + +var displayName = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\,\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i; +var emailUserPart = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i; +var gmailUserPart = /^[a-z\d]+$/; +var quotedEmailUser = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i; +var emailUserUtf8Part = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i; +var quotedEmailUserUtf8 = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i; +/* eslint-enable max-len */ + +/* eslint-enable no-control-regex */ + +function isEmail(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_email_options); + + if (options.require_display_name || options.allow_display_name) { + var display_email = str.match(displayName); + + if (display_email) { + str = display_email[1]; + } else if (options.require_display_name) { + return false; + } + } + + var parts = str.split('@'); + var domain = parts.pop(); + var user = parts.join('@'); + var lower_domain = domain.toLowerCase(); + + if (options.domain_specific_validation && (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')) { + /* + Previously we removed dots for gmail addresses before validating. + This was removed because it allows `multiple..dots@gmail.com` + to be reported as valid, but it is not. + Gmail only normalizes single dots, removing them from here is pointless, + should be done in normalizeEmail + */ + user = user.toLowerCase(); // Removing sub-address from username before gmail validation + + var username = user.split('+')[0]; // Dots are not included in gmail length restriction + + if (!(0, _isByteLength.default)(username.replace('.', ''), { + min: 6, + max: 30 + })) { + return false; + } + + var _user_parts = username.split('.'); + + for (var i = 0; i < _user_parts.length; i++) { + if (!gmailUserPart.test(_user_parts[i])) { + return false; + } + } + } + + if (!(0, _isByteLength.default)(user, { + max: 64 + }) || !(0, _isByteLength.default)(domain, { + max: 254 + })) { + return false; + } + + if (!(0, _isFQDN.default)(domain, { + require_tld: options.require_tld + })) { + if (!options.allow_ip_domain) { + return false; + } + + if (!(0, _isIP.default)(domain)) { + if (!domain.startsWith('[') || !domain.endsWith(']')) { + return false; + } + + var noBracketdomain = domain.substr(1, domain.length - 2); + + if (noBracketdomain.length === 0 || !(0, _isIP.default)(noBracketdomain)) { + return false; + } + } + } + + if (user[0] === '"') { + user = user.slice(1, user.length - 1); + return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user); + } + + var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart; + var user_parts = user.split('.'); + + for (var _i = 0; _i < user_parts.length; _i++) { + if (!pattern.test(user_parts[_i])) { + return false; + } + } + + return true; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isEmpty.js b/node_modules/validator/lib/isEmpty.js new file mode 100644 index 00000000..26766d5e --- /dev/null +++ b/node_modules/validator/lib/isEmpty.js @@ -0,0 +1,25 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isEmpty; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _merge = _interopRequireDefault(require("./util/merge")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var default_is_empty_options = { + ignore_whitespace: false +}; + +function isEmpty(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_is_empty_options); + return (options.ignore_whitespace ? str.trim().length : str.length) === 0; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isFQDN.js b/node_modules/validator/lib/isFQDN.js new file mode 100644 index 00000000..b5c769db --- /dev/null +++ b/node_modules/validator/lib/isFQDN.js @@ -0,0 +1,75 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isFQDN; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _merge = _interopRequireDefault(require("./util/merge")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var default_fqdn_options = { + require_tld: true, + allow_underscores: false, + allow_trailing_dot: false +}; + +function isFQDN(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_fqdn_options); + /* Remove the optional trailing dot before checking validity */ + + if (options.allow_trailing_dot && str[str.length - 1] === '.') { + str = str.substring(0, str.length - 1); + } + + var parts = str.split('.'); + + for (var i = 0; i < parts.length; i++) { + if (parts[i].length > 63) { + return false; + } + } + + if (options.require_tld) { + var tld = parts.pop(); + + if (!parts.length || !/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) { + return false; + } // disallow spaces + + + if (/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(tld)) { + return false; + } + } + + for (var part, _i = 0; _i < parts.length; _i++) { + part = parts[_i]; + + if (options.allow_underscores) { + part = part.replace(/_/g, ''); + } + + if (!/^[a-z\u00a1-\uffff0-9-]+$/i.test(part)) { + return false; + } // disallow full-width chars + + + if (/[\uff01-\uff5e]/.test(part)) { + return false; + } + + if (part[0] === '-' || part[part.length - 1] === '-') { + return false; + } + } + + return true; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isFloat.js b/node_modules/validator/lib/isFloat.js new file mode 100644 index 00000000..3fdab860 --- /dev/null +++ b/node_modules/validator/lib/isFloat.js @@ -0,0 +1,29 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isFloat; +exports.locales = void 0; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _alpha = require("./alpha"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isFloat(str, options) { + (0, _assertString.default)(str); + options = options || {}; + var float = new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(options.locale ? _alpha.decimal[options.locale] : '.', "[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$")); + + if (str === '' || str === '.' || str === '-' || str === '+') { + return false; + } + + var value = parseFloat(str.replace(',', '.')); + return float.test(str) && (!options.hasOwnProperty('min') || value >= options.min) && (!options.hasOwnProperty('max') || value <= options.max) && (!options.hasOwnProperty('lt') || value < options.lt) && (!options.hasOwnProperty('gt') || value > options.gt); +} + +var locales = Object.keys(_alpha.decimal); +exports.locales = locales; \ No newline at end of file diff --git a/node_modules/validator/lib/isFullWidth.js b/node_modules/validator/lib/isFullWidth.js new file mode 100644 index 00000000..1960f13c --- /dev/null +++ b/node_modules/validator/lib/isFullWidth.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isFullWidth; +exports.fullWidth = void 0; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var fullWidth = /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; +exports.fullWidth = fullWidth; + +function isFullWidth(str) { + (0, _assertString.default)(str); + return fullWidth.test(str); +} \ No newline at end of file diff --git a/node_modules/validator/lib/isHalfWidth.js b/node_modules/validator/lib/isHalfWidth.js new file mode 100644 index 00000000..55a9e1a4 --- /dev/null +++ b/node_modules/validator/lib/isHalfWidth.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isHalfWidth; +exports.halfWidth = void 0; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var halfWidth = /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; +exports.halfWidth = halfWidth; + +function isHalfWidth(str) { + (0, _assertString.default)(str); + return halfWidth.test(str); +} \ No newline at end of file diff --git a/node_modules/validator/lib/isHash.js b/node_modules/validator/lib/isHash.js new file mode 100644 index 00000000..30e90ac1 --- /dev/null +++ b/node_modules/validator/lib/isHash.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isHash; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var lengths = { + md5: 32, + md4: 32, + sha1: 40, + sha256: 64, + sha384: 96, + sha512: 128, + ripemd128: 32, + ripemd160: 40, + tiger128: 32, + tiger160: 40, + tiger192: 48, + crc32: 8, + crc32b: 8 +}; + +function isHash(str, algorithm) { + (0, _assertString.default)(str); + var hash = new RegExp("^[a-f0-9]{".concat(lengths[algorithm], "}$")); + return hash.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isHexColor.js b/node_modules/validator/lib/isHexColor.js new file mode 100644 index 00000000..08bdfe45 --- /dev/null +++ b/node_modules/validator/lib/isHexColor.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isHexColor; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{6})$/i; + +function isHexColor(str) { + (0, _assertString.default)(str); + return hexcolor.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isHexadecimal.js b/node_modules/validator/lib/isHexadecimal.js new file mode 100644 index 00000000..fd894f86 --- /dev/null +++ b/node_modules/validator/lib/isHexadecimal.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isHexadecimal; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var hexadecimal = /^[0-9A-F]+$/i; + +function isHexadecimal(str) { + (0, _assertString.default)(str); + return hexadecimal.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isIP.js b/node_modules/validator/lib/isIP.js new file mode 100644 index 00000000..dc7f9544 --- /dev/null +++ b/node_modules/validator/lib/isIP.js @@ -0,0 +1,86 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isIP; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ipv4Maybe = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/; +var ipv6Block = /^[0-9A-F]{1,4}$/i; + +function isIP(str) { + var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + (0, _assertString.default)(str); + version = String(version); + + if (!version) { + return isIP(str, 4) || isIP(str, 6); + } else if (version === '4') { + if (!ipv4Maybe.test(str)) { + return false; + } + + var parts = str.split('.').sort(function (a, b) { + return a - b; + }); + return parts[3] <= 255; + } else if (version === '6') { + var blocks = str.split(':'); + var foundOmissionBlock = false; // marker to indicate :: + // At least some OS accept the last 32 bits of an IPv6 address + // (i.e. 2 of the blocks) in IPv4 notation, and RFC 3493 says + // that '::ffff:a.b.c.d' is valid for IPv4-mapped IPv6 addresses, + // and '::a.b.c.d' is deprecated, but also valid. + + var foundIPv4TransitionBlock = isIP(blocks[blocks.length - 1], 4); + var expectedNumberOfBlocks = foundIPv4TransitionBlock ? 7 : 8; + + if (blocks.length > expectedNumberOfBlocks) { + return false; + } // initial or final :: + + + if (str === '::') { + return true; + } else if (str.substr(0, 2) === '::') { + blocks.shift(); + blocks.shift(); + foundOmissionBlock = true; + } else if (str.substr(str.length - 2) === '::') { + blocks.pop(); + blocks.pop(); + foundOmissionBlock = true; + } + + for (var i = 0; i < blocks.length; ++i) { + // test for a :: which can not be at the string start/end + // since those cases have been handled above + if (blocks[i] === '' && i > 0 && i < blocks.length - 1) { + if (foundOmissionBlock) { + return false; // multiple :: in address + } + + foundOmissionBlock = true; + } else if (foundIPv4TransitionBlock && i === blocks.length - 1) {// it has been checked before that the last + // block is a valid IPv4 address + } else if (!ipv6Block.test(blocks[i])) { + return false; + } + } + + if (foundOmissionBlock) { + return blocks.length >= 1; + } + + return blocks.length === expectedNumberOfBlocks; + } + + return false; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isIPRange.js b/node_modules/validator/lib/isIPRange.js new file mode 100644 index 00000000..8c6cbb5c --- /dev/null +++ b/node_modules/validator/lib/isIPRange.js @@ -0,0 +1,37 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isIPRange; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _isIP = _interopRequireDefault(require("./isIP")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var subnetMaybe = /^\d{1,2}$/; + +function isIPRange(str) { + (0, _assertString.default)(str); + var parts = str.split('/'); // parts[0] -> ip, parts[1] -> subnet + + if (parts.length !== 2) { + return false; + } + + if (!subnetMaybe.test(parts[1])) { + return false; + } // Disallow preceding 0 i.e. 01, 02, ... + + + if (parts[1].length > 1 && parts[1].startsWith('0')) { + return false; + } + + return (0, _isIP.default)(parts[0], 4) && parts[1] <= 32 && parts[1] >= 0; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isISBN.js b/node_modules/validator/lib/isISBN.js new file mode 100644 index 00000000..f00bb7a9 --- /dev/null +++ b/node_modules/validator/lib/isISBN.js @@ -0,0 +1,65 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISBN; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isbn10Maybe = /^(?:[0-9]{9}X|[0-9]{10})$/; +var isbn13Maybe = /^(?:[0-9]{13})$/; +var factor = [1, 3]; + +function isISBN(str) { + var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + (0, _assertString.default)(str); + version = String(version); + + if (!version) { + return isISBN(str, 10) || isISBN(str, 13); + } + + var sanitized = str.replace(/[\s-]+/g, ''); + var checksum = 0; + var i; + + if (version === '10') { + if (!isbn10Maybe.test(sanitized)) { + return false; + } + + for (i = 0; i < 9; i++) { + checksum += (i + 1) * sanitized.charAt(i); + } + + if (sanitized.charAt(9) === 'X') { + checksum += 10 * 10; + } else { + checksum += 10 * sanitized.charAt(9); + } + + if (checksum % 11 === 0) { + return !!sanitized; + } + } else if (version === '13') { + if (!isbn13Maybe.test(sanitized)) { + return false; + } + + for (i = 0; i < 12; i++) { + checksum += factor[i % 2] * sanitized.charAt(i); + } + + if (sanitized.charAt(12) - (10 - checksum % 10) % 10 === 0) { + return !!sanitized; + } + } + + return false; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isISIN.js b/node_modules/validator/lib/isISIN.js new file mode 100644 index 00000000..cadcc926 --- /dev/null +++ b/node_modules/validator/lib/isISIN.js @@ -0,0 +1,52 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISIN; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/; + +function isISIN(str) { + (0, _assertString.default)(str); + + if (!isin.test(str)) { + return false; + } + + var checksumStr = str.replace(/[A-Z]/g, function (character) { + return parseInt(character, 36); + }); + var sum = 0; + var digit; + var tmpNum; + var shouldDouble = true; + + for (var i = checksumStr.length - 2; i >= 0; i--) { + digit = checksumStr.substring(i, i + 1); + tmpNum = parseInt(digit, 10); + + if (shouldDouble) { + tmpNum *= 2; + + if (tmpNum >= 10) { + sum += tmpNum + 1; + } else { + sum += tmpNum; + } + } else { + sum += tmpNum; + } + + shouldDouble = !shouldDouble; + } + + return parseInt(str.substr(str.length - 1), 10) === (10000 - sum) % 10; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isISO31661Alpha2.js b/node_modules/validator/lib/isISO31661Alpha2.js new file mode 100644 index 00000000..44748a7e --- /dev/null +++ b/node_modules/validator/lib/isISO31661Alpha2.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISO31661Alpha2; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _includes = _interopRequireDefault(require("./util/includes")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 +var validISO31661Alpha2CountriesCodes = ['AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW']; + +function isISO31661Alpha2(str) { + (0, _assertString.default)(str); + return (0, _includes.default)(validISO31661Alpha2CountriesCodes, str.toUpperCase()); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isISO31661Alpha3.js b/node_modules/validator/lib/isISO31661Alpha3.js new file mode 100644 index 00000000..8dcaabd0 --- /dev/null +++ b/node_modules/validator/lib/isISO31661Alpha3.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISO31661Alpha3; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _includes = _interopRequireDefault(require("./util/includes")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 +var validISO31661Alpha3CountriesCodes = ['AFG', 'ALA', 'ALB', 'DZA', 'ASM', 'AND', 'AGO', 'AIA', 'ATA', 'ATG', 'ARG', 'ARM', 'ABW', 'AUS', 'AUT', 'AZE', 'BHS', 'BHR', 'BGD', 'BRB', 'BLR', 'BEL', 'BLZ', 'BEN', 'BMU', 'BTN', 'BOL', 'BES', 'BIH', 'BWA', 'BVT', 'BRA', 'IOT', 'BRN', 'BGR', 'BFA', 'BDI', 'KHM', 'CMR', 'CAN', 'CPV', 'CYM', 'CAF', 'TCD', 'CHL', 'CHN', 'CXR', 'CCK', 'COL', 'COM', 'COG', 'COD', 'COK', 'CRI', 'CIV', 'HRV', 'CUB', 'CUW', 'CYP', 'CZE', 'DNK', 'DJI', 'DMA', 'DOM', 'ECU', 'EGY', 'SLV', 'GNQ', 'ERI', 'EST', 'ETH', 'FLK', 'FRO', 'FJI', 'FIN', 'FRA', 'GUF', 'PYF', 'ATF', 'GAB', 'GMB', 'GEO', 'DEU', 'GHA', 'GIB', 'GRC', 'GRL', 'GRD', 'GLP', 'GUM', 'GTM', 'GGY', 'GIN', 'GNB', 'GUY', 'HTI', 'HMD', 'VAT', 'HND', 'HKG', 'HUN', 'ISL', 'IND', 'IDN', 'IRN', 'IRQ', 'IRL', 'IMN', 'ISR', 'ITA', 'JAM', 'JPN', 'JEY', 'JOR', 'KAZ', 'KEN', 'KIR', 'PRK', 'KOR', 'KWT', 'KGZ', 'LAO', 'LVA', 'LBN', 'LSO', 'LBR', 'LBY', 'LIE', 'LTU', 'LUX', 'MAC', 'MKD', 'MDG', 'MWI', 'MYS', 'MDV', 'MLI', 'MLT', 'MHL', 'MTQ', 'MRT', 'MUS', 'MYT', 'MEX', 'FSM', 'MDA', 'MCO', 'MNG', 'MNE', 'MSR', 'MAR', 'MOZ', 'MMR', 'NAM', 'NRU', 'NPL', 'NLD', 'NCL', 'NZL', 'NIC', 'NER', 'NGA', 'NIU', 'NFK', 'MNP', 'NOR', 'OMN', 'PAK', 'PLW', 'PSE', 'PAN', 'PNG', 'PRY', 'PER', 'PHL', 'PCN', 'POL', 'PRT', 'PRI', 'QAT', 'REU', 'ROU', 'RUS', 'RWA', 'BLM', 'SHN', 'KNA', 'LCA', 'MAF', 'SPM', 'VCT', 'WSM', 'SMR', 'STP', 'SAU', 'SEN', 'SRB', 'SYC', 'SLE', 'SGP', 'SXM', 'SVK', 'SVN', 'SLB', 'SOM', 'ZAF', 'SGS', 'SSD', 'ESP', 'LKA', 'SDN', 'SUR', 'SJM', 'SWZ', 'SWE', 'CHE', 'SYR', 'TWN', 'TJK', 'TZA', 'THA', 'TLS', 'TGO', 'TKL', 'TON', 'TTO', 'TUN', 'TUR', 'TKM', 'TCA', 'TUV', 'UGA', 'UKR', 'ARE', 'GBR', 'USA', 'UMI', 'URY', 'UZB', 'VUT', 'VEN', 'VNM', 'VGB', 'VIR', 'WLF', 'ESH', 'YEM', 'ZMB', 'ZWE']; + +function isISO31661Alpha3(str) { + (0, _assertString.default)(str); + return (0, _includes.default)(validISO31661Alpha3CountriesCodes, str.toUpperCase()); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isISO8601.js b/node_modules/validator/lib/isISO8601.js new file mode 100644 index 00000000..e29eebb2 --- /dev/null +++ b/node_modules/validator/lib/isISO8601.js @@ -0,0 +1,58 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISO8601; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable max-len */ +// from http://goo.gl/0ejHHW +var iso8601 = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; +/* eslint-enable max-len */ + +var isValidDate = function isValidDate(str) { + // str must have passed the ISO8601 check + // this check is meant to catch invalid dates + // like 2009-02-31 + // first check for ordinal dates + var ordinalMatch = str.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/); + + if (ordinalMatch) { + var oYear = Number(ordinalMatch[1]); + var oDay = Number(ordinalMatch[2]); // if is leap year + + if (oYear % 4 === 0 && oYear % 100 !== 0) return oDay <= 366; + return oDay <= 365; + } + + var match = str.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number); + var year = match[1]; + var month = match[2]; + var day = match[3]; + var monthString = month ? "0".concat(month).slice(-2) : month; + var dayString = day ? "0".concat(day).slice(-2) : day; // create a date object and compare + + var d = new Date("".concat(year, "-").concat(monthString || '01', "-").concat(dayString || '01')); + if (isNaN(d.getUTCFullYear())) return false; + + if (month && day) { + return d.getUTCFullYear() === year && d.getUTCMonth() + 1 === month && d.getUTCDate() === day; + } + + return true; +}; + +function isISO8601(str, options) { + (0, _assertString.default)(str); + var check = iso8601.test(str); + if (!options) return check; + if (check && options.strict) return isValidDate(str); + return check; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isISRC.js b/node_modules/validator/lib/isISRC.js new file mode 100644 index 00000000..c5ce1e21 --- /dev/null +++ b/node_modules/validator/lib/isISRC.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISRC; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// see http://isrc.ifpi.org/en/isrc-standard/code-syntax +var isrc = /^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/; + +function isISRC(str) { + (0, _assertString.default)(str); + return isrc.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isISSN.js b/node_modules/validator/lib/isISSN.js new file mode 100644 index 00000000..eee87b35 --- /dev/null +++ b/node_modules/validator/lib/isISSN.js @@ -0,0 +1,37 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISSN; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var issn = '^\\d{4}-?\\d{3}[\\dX]$'; + +function isISSN(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + (0, _assertString.default)(str); + var testIssn = issn; + testIssn = options.require_hyphen ? testIssn.replace('?', '') : testIssn; + testIssn = options.case_sensitive ? new RegExp(testIssn) : new RegExp(testIssn, 'i'); + + if (!testIssn.test(str)) { + return false; + } + + var digits = str.replace('-', '').toUpperCase(); + var checksum = 0; + + for (var i = 0; i < digits.length; i++) { + var digit = digits[i]; + checksum += (digit === 'X' ? 10 : +digit) * (8 - i); + } + + return checksum % 11 === 0; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isIdentityCard.js b/node_modules/validator/lib/isIdentityCard.js new file mode 100644 index 00000000..5ead773f --- /dev/null +++ b/node_modules/validator/lib/isIdentityCard.js @@ -0,0 +1,61 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isIdentityCard; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var validators = { + ES: function ES(str) { + (0, _assertString.default)(str); + var DNI = /^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/; + var charsValue = { + X: 0, + Y: 1, + Z: 2 + }; + var controlDigits = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E']; // sanitize user input + + var sanitized = str.trim().toUpperCase(); // validate the data structure + + if (!DNI.test(sanitized)) { + return false; + } // validate the control digit + + + var number = sanitized.slice(0, -1).replace(/[X,Y,Z]/g, function (char) { + return charsValue[char]; + }); + return sanitized.endsWith(controlDigits[number % 23]); + } +}; + +function isIdentityCard(str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'any'; + (0, _assertString.default)(str); + + if (locale in validators) { + return validators[locale](str); + } else if (locale === 'any') { + for (var key in validators) { + if (validators.hasOwnProperty(key)) { + var validator = validators[key]; + + if (validator(str)) { + return true; + } + } + } + + return false; + } + + throw new Error("Invalid locale '".concat(locale, "'")); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isIn.js b/node_modules/validator/lib/isIn.js new file mode 100644 index 00000000..e24f7cb8 --- /dev/null +++ b/node_modules/validator/lib/isIn.js @@ -0,0 +1,40 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isIn; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _toString = _interopRequireDefault(require("./util/toString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function isIn(str, options) { + (0, _assertString.default)(str); + var i; + + if (Object.prototype.toString.call(options) === '[object Array]') { + var array = []; + + for (i in options) { + if ({}.hasOwnProperty.call(options, i)) { + array[i] = (0, _toString.default)(options[i]); + } + } + + return array.indexOf(str) >= 0; + } else if (_typeof(options) === 'object') { + return options.hasOwnProperty(str); + } else if (options && typeof options.indexOf === 'function') { + return options.indexOf(str) >= 0; + } + + return false; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isInt.js b/node_modules/validator/lib/isInt.js new file mode 100644 index 00000000..40f776c3 --- /dev/null +++ b/node_modules/validator/lib/isInt.js @@ -0,0 +1,30 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isInt; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/; +var intLeadingZeroes = /^[-+]?[0-9]+$/; + +function isInt(str, options) { + (0, _assertString.default)(str); + options = options || {}; // Get the regex to use for testing, based on whether + // leading zeroes are allowed or not. + + var regex = options.hasOwnProperty('allow_leading_zeroes') && !options.allow_leading_zeroes ? int : intLeadingZeroes; // Check min/max/lt/gt + + var minCheckPassed = !options.hasOwnProperty('min') || str >= options.min; + var maxCheckPassed = !options.hasOwnProperty('max') || str <= options.max; + var ltCheckPassed = !options.hasOwnProperty('lt') || str < options.lt; + var gtCheckPassed = !options.hasOwnProperty('gt') || str > options.gt; + return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isJSON.js b/node_modules/validator/lib/isJSON.js new file mode 100644 index 00000000..b0e43c20 --- /dev/null +++ b/node_modules/validator/lib/isJSON.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isJSON; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function isJSON(str) { + (0, _assertString.default)(str); + + try { + var obj = JSON.parse(str); + return !!obj && _typeof(obj) === 'object'; + } catch (e) { + /* ignore */ + } + + return false; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isJWT.js b/node_modules/validator/lib/isJWT.js new file mode 100644 index 00000000..9dfb7cfb --- /dev/null +++ b/node_modules/validator/lib/isJWT.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isJWT; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var jwt = /^([A-Za-z0-9\-_~+\/]+[=]{0,2})\.([A-Za-z0-9\-_~+\/]+[=]{0,2})(?:\.([A-Za-z0-9\-_~+\/]+[=]{0,2}))?$/; + +function isJWT(str) { + (0, _assertString.default)(str); + return jwt.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isLatLong.js b/node_modules/validator/lib/isLatLong.js new file mode 100644 index 00000000..88da0c25 --- /dev/null +++ b/node_modules/validator/lib/isLatLong.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var lat = /^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/; +var long = /^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/; + +function _default(str) { + (0, _assertString.default)(str); + if (!str.includes(',')) return false; + var pair = str.split(','); + return lat.test(pair[0]) && long.test(pair[1]); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isLength.js b/node_modules/validator/lib/isLength.js new file mode 100644 index 00000000..b70e40da --- /dev/null +++ b/node_modules/validator/lib/isLength.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isLength; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +/* eslint-disable prefer-rest-params */ +function isLength(str, options) { + (0, _assertString.default)(str); + var min; + var max; + + if (_typeof(options) === 'object') { + min = options.min || 0; + max = options.max; + } else { + // backwards compatibility: isLength(str, min [, max]) + min = arguments[1]; + max = arguments[2]; + } + + var surrogatePairs = str.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g) || []; + var len = str.length - surrogatePairs.length; + return len >= min && (typeof max === 'undefined' || len <= max); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isLowercase.js b/node_modules/validator/lib/isLowercase.js new file mode 100644 index 00000000..7f412d90 --- /dev/null +++ b/node_modules/validator/lib/isLowercase.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isLowercase; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isLowercase(str) { + (0, _assertString.default)(str); + return str === str.toLowerCase(); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isMACAddress.js b/node_modules/validator/lib/isMACAddress.js new file mode 100644 index 00000000..7d5cc20c --- /dev/null +++ b/node_modules/validator/lib/isMACAddress.js @@ -0,0 +1,26 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMACAddress; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var macAddress = /^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/; +var macAddressNoColons = /^([0-9a-fA-F]){12}$/; + +function isMACAddress(str, options) { + (0, _assertString.default)(str); + + if (options && options.no_colons) { + return macAddressNoColons.test(str); + } + + return macAddress.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isMD5.js b/node_modules/validator/lib/isMD5.js new file mode 100644 index 00000000..57f2b0e4 --- /dev/null +++ b/node_modules/validator/lib/isMD5.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMD5; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var md5 = /^[a-f0-9]{32}$/; + +function isMD5(str) { + (0, _assertString.default)(str); + return md5.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isMagnetURI.js b/node_modules/validator/lib/isMagnetURI.js new file mode 100644 index 00000000..79aab333 --- /dev/null +++ b/node_modules/validator/lib/isMagnetURI.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMagnetURI; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var magnetURI = /^magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32,40}&dn=.+&tr=.+$/i; + +function isMagnetURI(url) { + (0, _assertString.default)(url); + return magnetURI.test(url.trim()); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isMimeType.js b/node_modules/validator/lib/isMimeType.js new file mode 100644 index 00000000..917aef2c --- /dev/null +++ b/node_modules/validator/lib/isMimeType.js @@ -0,0 +1,51 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMimeType; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* + Checks if the provided string matches to a correct Media type format (MIME type) + + This function only checks is the string format follows the + etablished rules by the according RFC specifications. + This function supports 'charset' in textual media types + (https://tools.ietf.org/html/rfc6657). + + This function does not check against all the media types listed + by the IANA (https://www.iana.org/assignments/media-types/media-types.xhtml) + because of lightness purposes : it would require to include + all these MIME types in this librairy, which would weigh it + significantly. This kind of effort maybe is not worth for the use that + this function has in this entire librairy. + + More informations in the RFC specifications : + - https://tools.ietf.org/html/rfc2045 + - https://tools.ietf.org/html/rfc2046 + - https://tools.ietf.org/html/rfc7231#section-3.1.1.1 + - https://tools.ietf.org/html/rfc7231#section-3.1.1.5 +*/ +// Match simple MIME types +// NB : +// Subtype length must not exceed 100 characters. +// This rule does not comply to the RFC specs (what is the max length ?). +var mimeTypeSimple = /^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+]{1,100}$/i; // eslint-disable-line max-len +// Handle "charset" in "text/*" + +var mimeTypeText = /^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i; // eslint-disable-line max-len +// Handle "boundary" in "multipart/*" + +var mimeTypeMultipart = /^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i; // eslint-disable-line max-len + +function isMimeType(str) { + (0, _assertString.default)(str); + return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isMobilePhone.js b/node_modules/validator/lib/isMobilePhone.js new file mode 100644 index 00000000..b72cddad --- /dev/null +++ b/node_modules/validator/lib/isMobilePhone.js @@ -0,0 +1,132 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMobilePhone; +exports.locales = void 0; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable max-len */ +var phones = { + 'ar-AE': /^((\+?971)|0)?5[024568]\d{7}$/, + 'ar-DZ': /^(\+?213|0)(5|6|7)\d{8}$/, + 'ar-EG': /^((\+?20)|0)?1[012]\d{8}$/, + 'ar-IQ': /^(\+?964|0)?7[0-9]\d{8}$/, + 'ar-JO': /^(\+?962|0)?7[789]\d{7}$/, + 'ar-KW': /^(\+?965)[569]\d{7}$/, + 'ar-SA': /^(!?(\+?966)|0)?5\d{8}$/, + 'ar-SY': /^(!?(\+?963)|0)?9\d{8}$/, + 'ar-TN': /^(\+?216)?[2459]\d{7}$/, + 'be-BY': /^(\+?375)?(24|25|29|33|44)\d{7}$/, + 'bg-BG': /^(\+?359|0)?8[789]\d{7}$/, + 'bn-BD': /\+?(88)?0?1[356789][0-9]{8}\b/, + 'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + 'da-DK': /^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'de-DE': /^(\+49)?0?1(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7}$/, + 'el-GR': /^(\+?30|0)?(69\d{8})$/, + 'en-AU': /^(\+?61|0)4\d{8}$/, + 'en-GB': /^(\+?44|0)7\d{9}$/, + 'en-GH': /^(\+233|0)(20|50|24|54|27|57|26|56|23|28)\d{7}$/, + 'en-HK': /^(\+?852\-?)?[456789]\d{3}\-?\d{4}$/, + 'en-IE': /^(\+?353|0)8[356789]\d{7}$/, + 'en-IN': /^(\+?91|0)?[6789]\d{9}$/, + 'en-KE': /^(\+?254|0)?[7]\d{8}$/, + 'en-MU': /^(\+?230|0)?\d{8}$/, + 'en-NG': /^(\+?234|0)?[789]\d{9}$/, + 'en-NZ': /^(\+?64|0)[28]\d{7,9}$/, + 'en-PK': /^((\+92)|(0092))-{0,1}\d{3}-{0,1}\d{7}$|^\d{11}$|^\d{4}-\d{7}$/, + 'en-RW': /^(\+?250|0)?[7]\d{8}$/, + 'en-SG': /^(\+65)?[89]\d{7}$/, + 'en-TZ': /^(\+?255|0)?[67]\d{8}$/, + 'en-UG': /^(\+?256|0)?[7]\d{8}$/, + 'en-US': /^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/, + 'en-ZA': /^(\+?27|0)\d{9}$/, + 'en-ZM': /^(\+?26)?09[567]\d{7}$/, + 'es-ES': /^(\+?34)?(6\d{1}|7[1234])\d{7}$/, + 'es-MX': /^(\+?52)?(1|01)?\d{10,11}$/, + 'es-UY': /^(\+598|0)9[1-9][\d]{6}$/, + 'et-EE': /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/, + 'fa-IR': /^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/, + 'fi-FI': /^(\+?358|0)\s?(4(0|1|2|4|5|6)?|50)\s?(\d\s?){4,8}\d$/, + 'fo-FO': /^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'fr-FR': /^(\+?33|0)[67]\d{8}$/, + 'he-IL': /^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/, + 'hu-HU': /^(\+?36)(20|30|70)\d{7}$/, + 'id-ID': /^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/, + 'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/, + 'ja-JP': /^(\+?81|0)[789]0[ \-]?[1-9]\d{2}[ \-]?\d{5}$/, + 'kk-KZ': /^(\+?7|8)?7\d{9}$/, + 'kl-GL': /^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'ko-KR': /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/, + 'lt-LT': /^(\+370|8)\d{8}$/, + 'ms-MY': /^(\+?6?01){1}(([0145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/, + 'nb-NO': /^(\+?47)?[49]\d{7}$/, + 'nl-BE': /^(\+?32|0)4?\d{8}$/, + 'nn-NO': /^(\+?47)?[49]\d{7}$/, + 'pl-PL': /^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/, + 'pt-BR': /(?=^(\+?5{2}\-?|0)[1-9]{2}\-?\d{4}\-?\d{4}$)(^(\+?5{2}\-?|0)[1-9]{2}\-?[6-9]{1}\d{3}\-?\d{4}$)|(^(\+?5{2}\-?|0)[1-9]{2}\-?9[6-9]{1}\d{3}\-?\d{4}$)/, + 'pt-PT': /^(\+?351)?9[1236]\d{7}$/, + 'ro-RO': /^(\+?4?0)\s?7\d{2}(\/|\s|\.|\-)?\d{3}(\s|\.|\-)?\d{3}$/, + 'ru-RU': /^(\+?7|8)?9\d{9}$/, + 'sl-SI': /^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/, + 'sk-SK': /^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + 'sr-RS': /^(\+3816|06)[- \d]{5,9}$/, + 'sv-SE': /^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/, + 'th-TH': /^(\+66|66|0)\d{9}$/, + 'tr-TR': /^(\+?90|0)?5\d{9}$/, + 'uk-UA': /^(\+?38|8)?0\d{9}$/, + 'vi-VN': /^(\+?84|0)((3([2-9]))|(5([689]))|(7([0|6-9]))|(8([1-5]))|(9([0-9])))([0-9]{7})$/, + 'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/, + 'zh-TW': /^(\+?886\-?|0)?9\d{8}$/ +}; +/* eslint-enable max-len */ +// aliases + +phones['en-CA'] = phones['en-US']; +phones['fr-BE'] = phones['nl-BE']; +phones['zh-HK'] = phones['en-HK']; + +function isMobilePhone(str, locale, options) { + (0, _assertString.default)(str); + + if (options && options.strictMode && !str.startsWith('+')) { + return false; + } + + if (Array.isArray(locale)) { + return locale.some(function (key) { + if (phones.hasOwnProperty(key)) { + var phone = phones[key]; + + if (phone.test(str)) { + return true; + } + } + + return false; + }); + } else if (locale in phones) { + return phones[locale].test(str); // alias falsey locale as 'any' + } else if (!locale || locale === 'any') { + for (var key in phones) { + if (phones.hasOwnProperty(key)) { + var phone = phones[key]; + + if (phone.test(str)) { + return true; + } + } + } + + return false; + } + + throw new Error("Invalid locale '".concat(locale, "'")); +} + +var locales = Object.keys(phones); +exports.locales = locales; \ No newline at end of file diff --git a/node_modules/validator/lib/isMongoId.js b/node_modules/validator/lib/isMongoId.js new file mode 100644 index 00000000..2e9884de --- /dev/null +++ b/node_modules/validator/lib/isMongoId.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMongoId; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _isHexadecimal = _interopRequireDefault(require("./isHexadecimal")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isMongoId(str) { + (0, _assertString.default)(str); + return (0, _isHexadecimal.default)(str) && str.length === 24; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isMultibyte.js b/node_modules/validator/lib/isMultibyte.js new file mode 100644 index 00000000..3b4477e9 --- /dev/null +++ b/node_modules/validator/lib/isMultibyte.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMultibyte; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable no-control-regex */ +var multibyte = /[^\x00-\x7F]/; +/* eslint-enable no-control-regex */ + +function isMultibyte(str) { + (0, _assertString.default)(str); + return multibyte.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isNumeric.js b/node_modules/validator/lib/isNumeric.js new file mode 100644 index 00000000..8c1bc44f --- /dev/null +++ b/node_modules/validator/lib/isNumeric.js @@ -0,0 +1,26 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isNumeric; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var numeric = /^[+-]?([0-9]*[.])?[0-9]+$/; +var numericNoSymbols = /^[0-9]+$/; + +function isNumeric(str, options) { + (0, _assertString.default)(str); + + if (options && options.no_symbols) { + return numericNoSymbols.test(str); + } + + return numeric.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isPort.js b/node_modules/validator/lib/isPort.js new file mode 100644 index 00000000..9274a4c0 --- /dev/null +++ b/node_modules/validator/lib/isPort.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isPort; + +var _isInt = _interopRequireDefault(require("./isInt")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isPort(str) { + return (0, _isInt.default)(str, { + min: 0, + max: 65535 + }); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isPostalCode.js b/node_modules/validator/lib/isPostalCode.js new file mode 100644 index 00000000..e1008821 --- /dev/null +++ b/node_modules/validator/lib/isPostalCode.js @@ -0,0 +1,89 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.locales = void 0; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// common patterns +var threeDigit = /^\d{3}$/; +var fourDigit = /^\d{4}$/; +var fiveDigit = /^\d{5}$/; +var sixDigit = /^\d{6}$/; +var patterns = { + AD: /^AD\d{3}$/, + AT: fourDigit, + AU: fourDigit, + BE: fourDigit, + BG: fourDigit, + CA: /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i, + CH: fourDigit, + CZ: /^\d{3}\s?\d{2}$/, + DE: fiveDigit, + DK: fourDigit, + DZ: fiveDigit, + EE: fiveDigit, + ES: fiveDigit, + FI: fiveDigit, + FR: /^\d{2}\s?\d{3}$/, + GB: /^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i, + GR: /^\d{3}\s?\d{2}$/, + HR: /^([1-5]\d{4}$)/, + HU: fourDigit, + IL: fiveDigit, + IN: sixDigit, + IS: threeDigit, + IT: fiveDigit, + JP: /^\d{3}\-\d{4}$/, + KE: fiveDigit, + LI: /^(948[5-9]|949[0-7])$/, + LT: /^LT\-\d{5}$/, + LU: fourDigit, + LV: /^LV\-\d{4}$/, + MX: fiveDigit, + NL: /^\d{4}\s?[a-z]{2}$/i, + NO: fourDigit, + PL: /^\d{2}\-\d{3}$/, + PT: /^\d{4}\-\d{3}?$/, + RO: sixDigit, + RU: sixDigit, + SA: fiveDigit, + SE: /^\d{3}\s?\d{2}$/, + SI: fourDigit, + SK: /^\d{3}\s?\d{2}$/, + TN: fourDigit, + TW: /^\d{3}(\d{2})?$/, + UA: fiveDigit, + US: /^\d{5}(-\d{4})?$/, + ZA: fourDigit, + ZM: fiveDigit +}; +var locales = Object.keys(patterns); +exports.locales = locales; + +function _default(str, locale) { + (0, _assertString.default)(str); + + if (locale in patterns) { + return patterns[locale].test(str); + } else if (locale === 'any') { + for (var key in patterns) { + if (patterns.hasOwnProperty(key)) { + var pattern = patterns[key]; + + if (pattern.test(str)) { + return true; + } + } + } + + return false; + } + + throw new Error("Invalid locale '".concat(locale, "'")); +} \ No newline at end of file diff --git a/node_modules/validator/lib/isRFC3339.js b/node_modules/validator/lib/isRFC3339.js new file mode 100644 index 00000000..61e4582a --- /dev/null +++ b/node_modules/validator/lib/isRFC3339.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isRFC3339; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* Based on https://tools.ietf.org/html/rfc3339#section-5.6 */ +var dateFullYear = /[0-9]{4}/; +var dateMonth = /(0[1-9]|1[0-2])/; +var dateMDay = /([12]\d|0[1-9]|3[01])/; +var timeHour = /([01][0-9]|2[0-3])/; +var timeMinute = /[0-5][0-9]/; +var timeSecond = /([0-5][0-9]|60)/; +var timeSecFrac = /(\.[0-9]+)?/; +var timeNumOffset = new RegExp("[-+]".concat(timeHour.source, ":").concat(timeMinute.source)); +var timeOffset = new RegExp("([zZ]|".concat(timeNumOffset.source, ")")); +var partialTime = new RegExp("".concat(timeHour.source, ":").concat(timeMinute.source, ":").concat(timeSecond.source).concat(timeSecFrac.source)); +var fullDate = new RegExp("".concat(dateFullYear.source, "-").concat(dateMonth.source, "-").concat(dateMDay.source)); +var fullTime = new RegExp("".concat(partialTime.source).concat(timeOffset.source)); +var rfc3339 = new RegExp("".concat(fullDate.source, "[ tT]").concat(fullTime.source)); + +function isRFC3339(str) { + (0, _assertString.default)(str); + return rfc3339.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isSurrogatePair.js b/node_modules/validator/lib/isSurrogatePair.js new file mode 100644 index 00000000..ee5678bc --- /dev/null +++ b/node_modules/validator/lib/isSurrogatePair.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isSurrogatePair; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/; + +function isSurrogatePair(str) { + (0, _assertString.default)(str); + return surrogatePair.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isURL.js b/node_modules/validator/lib/isURL.js new file mode 100644 index 00000000..f9586ee7 --- /dev/null +++ b/node_modules/validator/lib/isURL.js @@ -0,0 +1,152 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isURL; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _isFQDN = _interopRequireDefault(require("./isFQDN")); + +var _isIP = _interopRequireDefault(require("./isIP")); + +var _merge = _interopRequireDefault(require("./util/merge")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var default_url_options = { + protocols: ['http', 'https', 'ftp'], + require_tld: true, + require_protocol: false, + require_host: true, + require_valid_protocol: true, + allow_underscores: false, + allow_trailing_dot: false, + allow_protocol_relative_urls: false +}; +var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/; + +function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +} + +function checkHost(host, matches) { + for (var i = 0; i < matches.length; i++) { + var match = matches[i]; + + if (host === match || isRegExp(match) && match.test(host)) { + return true; + } + } + + return false; +} + +function isURL(url, options) { + (0, _assertString.default)(url); + + if (!url || url.length >= 2083 || /[\s<>]/.test(url)) { + return false; + } + + if (url.indexOf('mailto:') === 0) { + return false; + } + + options = (0, _merge.default)(options, default_url_options); + var protocol, auth, host, hostname, port, port_str, split, ipv6; + split = url.split('#'); + url = split.shift(); + split = url.split('?'); + url = split.shift(); + split = url.split('://'); + + if (split.length > 1) { + protocol = split.shift().toLowerCase(); + + if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) { + return false; + } + } else if (options.require_protocol) { + return false; + } else if (url.substr(0, 2) === '//') { + if (!options.allow_protocol_relative_urls) { + return false; + } + + split[0] = url.substr(2); + } + + url = split.join('://'); + + if (url === '') { + return false; + } + + split = url.split('/'); + url = split.shift(); + + if (url === '' && !options.require_host) { + return true; + } + + split = url.split('@'); + + if (split.length > 1) { + if (options.disallow_auth) { + return false; + } + + auth = split.shift(); + + if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) { + return false; + } + } + + hostname = split.join('@'); + port_str = null; + ipv6 = null; + var ipv6_match = hostname.match(wrapped_ipv6); + + if (ipv6_match) { + host = ''; + ipv6 = ipv6_match[1]; + port_str = ipv6_match[2] || null; + } else { + split = hostname.split(':'); + host = split.shift(); + + if (split.length) { + port_str = split.join(':'); + } + } + + if (port_str !== null) { + port = parseInt(port_str, 10); + + if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) { + return false; + } + } + + if (!(0, _isIP.default)(host) && !(0, _isFQDN.default)(host, options) && (!ipv6 || !(0, _isIP.default)(ipv6, 6))) { + return false; + } + + host = host || ipv6; + + if (options.host_whitelist && !checkHost(host, options.host_whitelist)) { + return false; + } + + if (options.host_blacklist && checkHost(host, options.host_blacklist)) { + return false; + } + + return true; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isUUID.js b/node_modules/validator/lib/isUUID.js new file mode 100644 index 00000000..08ec27e6 --- /dev/null +++ b/node_modules/validator/lib/isUUID.js @@ -0,0 +1,27 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isUUID; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var uuid = { + 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i, + 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i +}; + +function isUUID(str) { + var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'all'; + (0, _assertString.default)(str); + var pattern = uuid[version]; + return pattern && pattern.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isUppercase.js b/node_modules/validator/lib/isUppercase.js new file mode 100644 index 00000000..c1c02f9f --- /dev/null +++ b/node_modules/validator/lib/isUppercase.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isUppercase; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isUppercase(str) { + (0, _assertString.default)(str); + return str === str.toUpperCase(); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isVariableWidth.js b/node_modules/validator/lib/isVariableWidth.js new file mode 100644 index 00000000..6bf226e6 --- /dev/null +++ b/node_modules/validator/lib/isVariableWidth.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isVariableWidth; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _isFullWidth = require("./isFullWidth"); + +var _isHalfWidth = require("./isHalfWidth"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isVariableWidth(str) { + (0, _assertString.default)(str); + return _isFullWidth.fullWidth.test(str) && _isHalfWidth.halfWidth.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/isWhitelisted.js b/node_modules/validator/lib/isWhitelisted.js new file mode 100644 index 00000000..5a80a1b7 --- /dev/null +++ b/node_modules/validator/lib/isWhitelisted.js @@ -0,0 +1,25 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isWhitelisted; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isWhitelisted(str, chars) { + (0, _assertString.default)(str); + + for (var i = str.length - 1; i >= 0; i--) { + if (chars.indexOf(str[i]) === -1) { + return false; + } + } + + return true; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/ltrim.js b/node_modules/validator/lib/ltrim.js new file mode 100644 index 00000000..b7159fd0 --- /dev/null +++ b/node_modules/validator/lib/ltrim.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = ltrim; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function ltrim(str, chars) { + (0, _assertString.default)(str); + var pattern = chars ? new RegExp("^[".concat(chars, "]+"), 'g') : /^\s+/g; + return str.replace(pattern, ''); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/matches.js b/node_modules/validator/lib/matches.js new file mode 100644 index 00000000..ea01ac16 --- /dev/null +++ b/node_modules/validator/lib/matches.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = matches; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function matches(str, pattern, modifiers) { + (0, _assertString.default)(str); + + if (Object.prototype.toString.call(pattern) !== '[object RegExp]') { + pattern = new RegExp(pattern, modifiers); + } + + return pattern.test(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/normalizeEmail.js b/node_modules/validator/lib/normalizeEmail.js new file mode 100644 index 00000000..dcab4b97 --- /dev/null +++ b/node_modules/validator/lib/normalizeEmail.js @@ -0,0 +1,151 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = normalizeEmail; + +var _merge = _interopRequireDefault(require("./util/merge")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var default_normalize_email_options = { + // The following options apply to all email addresses + // Lowercases the local part of the email address. + // Please note this may violate RFC 5321 as per http://stackoverflow.com/a/9808332/192024). + // The domain is always lowercased, as per RFC 1035 + all_lowercase: true, + // The following conversions are specific to GMail + // Lowercases the local part of the GMail address (known to be case-insensitive) + gmail_lowercase: true, + // Removes dots from the local part of the email address, as that's ignored by GMail + gmail_remove_dots: true, + // Removes the subaddress (e.g. "+foo") from the email address + gmail_remove_subaddress: true, + // Conversts the googlemail.com domain to gmail.com + gmail_convert_googlemaildotcom: true, + // The following conversions are specific to Outlook.com / Windows Live / Hotmail + // Lowercases the local part of the Outlook.com address (known to be case-insensitive) + outlookdotcom_lowercase: true, + // Removes the subaddress (e.g. "+foo") from the email address + outlookdotcom_remove_subaddress: true, + // The following conversions are specific to Yahoo + // Lowercases the local part of the Yahoo address (known to be case-insensitive) + yahoo_lowercase: true, + // Removes the subaddress (e.g. "-foo") from the email address + yahoo_remove_subaddress: true, + // The following conversions are specific to Yandex + // Lowercases the local part of the Yandex address (known to be case-insensitive) + yandex_lowercase: true, + // The following conversions are specific to iCloud + // Lowercases the local part of the iCloud address (known to be case-insensitive) + icloud_lowercase: true, + // Removes the subaddress (e.g. "+foo") from the email address + icloud_remove_subaddress: true +}; // List of domains used by iCloud + +var icloud_domains = ['icloud.com', 'me.com']; // List of domains used by Outlook.com and its predecessors +// This list is likely incomplete. +// Partial reference: +// https://blogs.office.com/2013/04/17/outlook-com-gets-two-step-verification-sign-in-by-alias-and-new-international-domains/ + +var outlookdotcom_domains = ['hotmail.at', 'hotmail.be', 'hotmail.ca', 'hotmail.cl', 'hotmail.co.il', 'hotmail.co.nz', 'hotmail.co.th', 'hotmail.co.uk', 'hotmail.com', 'hotmail.com.ar', 'hotmail.com.au', 'hotmail.com.br', 'hotmail.com.gr', 'hotmail.com.mx', 'hotmail.com.pe', 'hotmail.com.tr', 'hotmail.com.vn', 'hotmail.cz', 'hotmail.de', 'hotmail.dk', 'hotmail.es', 'hotmail.fr', 'hotmail.hu', 'hotmail.id', 'hotmail.ie', 'hotmail.in', 'hotmail.it', 'hotmail.jp', 'hotmail.kr', 'hotmail.lv', 'hotmail.my', 'hotmail.ph', 'hotmail.pt', 'hotmail.sa', 'hotmail.sg', 'hotmail.sk', 'live.be', 'live.co.uk', 'live.com', 'live.com.ar', 'live.com.mx', 'live.de', 'live.es', 'live.eu', 'live.fr', 'live.it', 'live.nl', 'msn.com', 'outlook.at', 'outlook.be', 'outlook.cl', 'outlook.co.il', 'outlook.co.nz', 'outlook.co.th', 'outlook.com', 'outlook.com.ar', 'outlook.com.au', 'outlook.com.br', 'outlook.com.gr', 'outlook.com.pe', 'outlook.com.tr', 'outlook.com.vn', 'outlook.cz', 'outlook.de', 'outlook.dk', 'outlook.es', 'outlook.fr', 'outlook.hu', 'outlook.id', 'outlook.ie', 'outlook.in', 'outlook.it', 'outlook.jp', 'outlook.kr', 'outlook.lv', 'outlook.my', 'outlook.ph', 'outlook.pt', 'outlook.sa', 'outlook.sg', 'outlook.sk', 'passport.com']; // List of domains used by Yahoo Mail +// This list is likely incomplete + +var yahoo_domains = ['rocketmail.com', 'yahoo.ca', 'yahoo.co.uk', 'yahoo.com', 'yahoo.de', 'yahoo.fr', 'yahoo.in', 'yahoo.it', 'ymail.com']; // List of domains used by yandex.ru + +var yandex_domains = ['yandex.ru', 'yandex.ua', 'yandex.kz', 'yandex.com', 'yandex.by', 'ya.ru']; // replace single dots, but not multiple consecutive dots + +function dotsReplacer(match) { + if (match.length > 1) { + return match; + } + + return ''; +} + +function normalizeEmail(email, options) { + options = (0, _merge.default)(options, default_normalize_email_options); + var raw_parts = email.split('@'); + var domain = raw_parts.pop(); + var user = raw_parts.join('@'); + var parts = [user, domain]; // The domain is always lowercased, as it's case-insensitive per RFC 1035 + + parts[1] = parts[1].toLowerCase(); + + if (parts[1] === 'gmail.com' || parts[1] === 'googlemail.com') { + // Address is GMail + if (options.gmail_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + + if (options.gmail_remove_dots) { + // this does not replace consecutive dots like example..email@gmail.com + parts[0] = parts[0].replace(/\.+/g, dotsReplacer); + } + + if (!parts[0].length) { + return false; + } + + if (options.all_lowercase || options.gmail_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + + parts[1] = options.gmail_convert_googlemaildotcom ? 'gmail.com' : parts[1]; + } else if (icloud_domains.indexOf(parts[1]) >= 0) { + // Address is iCloud + if (options.icloud_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + + if (!parts[0].length) { + return false; + } + + if (options.all_lowercase || options.icloud_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (outlookdotcom_domains.indexOf(parts[1]) >= 0) { + // Address is Outlook.com + if (options.outlookdotcom_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + + if (!parts[0].length) { + return false; + } + + if (options.all_lowercase || options.outlookdotcom_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (yahoo_domains.indexOf(parts[1]) >= 0) { + // Address is Yahoo + if (options.yahoo_remove_subaddress) { + var components = parts[0].split('-'); + parts[0] = components.length > 1 ? components.slice(0, -1).join('-') : components[0]; + } + + if (!parts[0].length) { + return false; + } + + if (options.all_lowercase || options.yahoo_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (yandex_domains.indexOf(parts[1]) >= 0) { + if (options.all_lowercase || options.yandex_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + + parts[1] = 'yandex.ru'; // all yandex domains are equal, 1st preffered + } else if (options.all_lowercase) { + // Any other address + parts[0] = parts[0].toLowerCase(); + } + + return parts.join('@'); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/rtrim.js b/node_modules/validator/lib/rtrim.js new file mode 100644 index 00000000..6b24d69e --- /dev/null +++ b/node_modules/validator/lib/rtrim.js @@ -0,0 +1,25 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = rtrim; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function rtrim(str, chars) { + (0, _assertString.default)(str); + var pattern = chars ? new RegExp("[".concat(chars, "]")) : /\s/; + var idx = str.length - 1; + + for (; idx >= 0 && pattern.test(str[idx]); idx--) { + ; + } + + return idx < str.length ? str.substr(0, idx + 1) : str; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/stripLow.js b/node_modules/validator/lib/stripLow.js new file mode 100644 index 00000000..aec2e0b5 --- /dev/null +++ b/node_modules/validator/lib/stripLow.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = stripLow; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +var _blacklist = _interopRequireDefault(require("./blacklist")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stripLow(str, keep_new_lines) { + (0, _assertString.default)(str); + var chars = keep_new_lines ? '\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F' : '\\x00-\\x1F\\x7F'; + return (0, _blacklist.default)(str, chars); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/toBoolean.js b/node_modules/validator/lib/toBoolean.js new file mode 100644 index 00000000..d55d8f09 --- /dev/null +++ b/node_modules/validator/lib/toBoolean.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toBoolean; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toBoolean(str, strict) { + (0, _assertString.default)(str); + + if (strict) { + return str === '1' || str === 'true'; + } + + return str !== '0' && str !== 'false' && str !== ''; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/toDate.js b/node_modules/validator/lib/toDate.js new file mode 100644 index 00000000..cb0756ca --- /dev/null +++ b/node_modules/validator/lib/toDate.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toDate; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toDate(date) { + (0, _assertString.default)(date); + date = Date.parse(date); + return !isNaN(date) ? new Date(date) : null; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/toFloat.js b/node_modules/validator/lib/toFloat.js new file mode 100644 index 00000000..fbf6c2e2 --- /dev/null +++ b/node_modules/validator/lib/toFloat.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toFloat; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toFloat(str) { + (0, _assertString.default)(str); + return parseFloat(str); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/toInt.js b/node_modules/validator/lib/toInt.js new file mode 100644 index 00000000..4c0e7add --- /dev/null +++ b/node_modules/validator/lib/toInt.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toInt; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toInt(str, radix) { + (0, _assertString.default)(str); + return parseInt(str, radix || 10); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/trim.js b/node_modules/validator/lib/trim.js new file mode 100644 index 00000000..497e3c3d --- /dev/null +++ b/node_modules/validator/lib/trim.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = trim; + +var _rtrim = _interopRequireDefault(require("./rtrim")); + +var _ltrim = _interopRequireDefault(require("./ltrim")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function trim(str, chars) { + return (0, _rtrim.default)((0, _ltrim.default)(str, chars), chars); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/unescape.js b/node_modules/validator/lib/unescape.js new file mode 100644 index 00000000..ab5dbbfa --- /dev/null +++ b/node_modules/validator/lib/unescape.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = unescape; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function unescape(str) { + (0, _assertString.default)(str); + return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, "'").replace(/</g, '<').replace(/>/g, '>').replace(///g, '/').replace(/\/g, '\\').replace(/`/g, '`'); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/util/assertString.js b/node_modules/validator/lib/util/assertString.js new file mode 100644 index 00000000..ba67de6b --- /dev/null +++ b/node_modules/validator/lib/util/assertString.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = assertString; + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function assertString(input) { + var isString = typeof input === 'string' || input instanceof String; + + if (!isString) { + var invalidType; + + if (input === null) { + invalidType = 'null'; + } else { + invalidType = _typeof(input); + + if (invalidType === 'object' && input.constructor && input.constructor.hasOwnProperty('name')) { + invalidType = input.constructor.name; + } else { + invalidType = "a ".concat(invalidType); + } + } + + throw new TypeError("Expected string but received ".concat(invalidType, ".")); + } +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/util/includes.js b/node_modules/validator/lib/util/includes.js new file mode 100644 index 00000000..e0618288 --- /dev/null +++ b/node_modules/validator/lib/util/includes.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var includes = function includes(arr, val) { + return arr.some(function (arrVal) { + return val === arrVal; + }); +}; + +var _default = includes; +exports.default = _default; +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/util/merge.js b/node_modules/validator/lib/util/merge.js new file mode 100644 index 00000000..a96c7393 --- /dev/null +++ b/node_modules/validator/lib/util/merge.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = merge; + +function merge() { + var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var defaults = arguments.length > 1 ? arguments[1] : undefined; + + for (var key in defaults) { + if (typeof obj[key] === 'undefined') { + obj[key] = defaults[key]; + } + } + + return obj; +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/util/toString.js b/node_modules/validator/lib/util/toString.js new file mode 100644 index 00000000..96658578 --- /dev/null +++ b/node_modules/validator/lib/util/toString.js @@ -0,0 +1,25 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toString; + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function toString(input) { + if (_typeof(input) === 'object' && input !== null) { + if (typeof input.toString === 'function') { + input = input.toString(); + } else { + input = '[object Object]'; + } + } else if (input === null || typeof input === 'undefined' || isNaN(input) && !input.length) { + input = ''; + } + + return String(input); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/lib/whitelist.js b/node_modules/validator/lib/whitelist.js new file mode 100644 index 00000000..7ae624e9 --- /dev/null +++ b/node_modules/validator/lib/whitelist.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = whitelist; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function whitelist(str, chars) { + (0, _assertString.default)(str); + return str.replace(new RegExp("[^".concat(chars, "]+"), 'g'), ''); +} + +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/node_modules/validator/package.json b/node_modules/validator/package.json new file mode 100644 index 00000000..cc99db57 --- /dev/null +++ b/node_modules/validator/package.json @@ -0,0 +1,71 @@ +{ + "name": "validator", + "description": "String validation and sanitization", + "version": "10.11.0", + "homepage": "https://github.com/chriso/validator.js", + "files": [ + "index.js", + "lib", + "README.md", + "LICENCE", + "validator.js", + "validator.min.js" + ], + "keywords": [ + "validator", + "validation", + "validate", + "sanitization", + "sanitize", + "sanitisation", + "sanitise", + "assert" + ], + "author": "Chris O'Hara ", + "contributors": [ + { + "name": "Anthony Nandaa", + "url": "https://github.com/profnandaa" + } + ], + "main": "index.js", + "bugs": { + "url": "https://github.com/chriso/validator.js/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/chriso/validator.js.git" + }, + "devDependencies": { + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/register": "^7.0.0", + "babel-eslint": "^10.0.1", + "babel-plugin-add-module-exports": "^1.0.0", + "eslint": "^4.19.1", + "eslint-config-airbnb-base": "^12.1.0", + "eslint-plugin-import": "^2.11.0", + "mocha": "^5.1.1", + "rollup": "^0.43.0", + "rollup-plugin-babel": "^4.0.1", + "uglify-js": "^3.0.19" + }, + "scripts": { + "lint": "eslint src test", + "lint:fix": "eslint --fix src test", + "clean:node": "rm -rf index.js lib", + "clean:browser": "rm -rf validator*.js", + "clean": "npm run clean:node && npm run clean:browser", + "minify": "uglifyjs validator.js -o validator.min.js --compress --mangle --comments /Copyright/", + "build:browser": "node --require @babel/register build-browser && npm run minify", + "build:node": "babel src -d .", + "build": "npm run build:browser && npm run build:node", + "pretest": "npm run lint && npm run build", + "test": "mocha --require @babel/register --reporter dot" + }, + "engines": { + "node": ">= 0.10" + }, + "license": "MIT" +} diff --git a/node_modules/validator/validator.js b/node_modules/validator/validator.js new file mode 100644 index 00000000..7a32e3bb --- /dev/null +++ b/node_modules/validator/validator.js @@ -0,0 +1,2098 @@ +/*! + * Copyright (c) 2018 Chris O'Hara + * + * 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. + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.validator = factory()); +}(this, (function () { 'use strict'; + +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +function _toArray(arr) { + return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); +} + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); +} + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); +} + +function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + + return (hint === "string" ? String : Number)(input); +} + +function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + + return typeof key === "symbol" ? key : String(key); +} + +function _addElementPlacement(element, placements, silent) { + var keys = placements[element.placement]; + + if (!silent && keys.indexOf(element.key) !== -1) { + throw new TypeError("Duplicated element (" + element.key + ")"); + } + + keys.push(element.key); +} + +function _fromElementDescriptor(element) { + var obj = { + kind: element.kind, + key: element.key, + placement: element.placement, + descriptor: element.descriptor + }; + var desc = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + if (element.kind === "field") obj.initializer = element.initializer; + return obj; +} + +function _toElementDescriptors(elementObjects) { + if (elementObjects === undefined) return; + return _toArray(elementObjects).map(function (elementObject) { + var element = _toElementDescriptor(elementObject); + + _disallowProperty(elementObject, "finisher", "An element descriptor"); + + _disallowProperty(elementObject, "extras", "An element descriptor"); + + return element; + }); +} + +function _toElementDescriptor(elementObject) { + var kind = String(elementObject.kind); + + if (kind !== "method" && kind !== "field") { + throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"'); + } + + var key = _toPropertyKey(elementObject.key); + + var placement = String(elementObject.placement); + + if (placement !== "static" && placement !== "prototype" && placement !== "own") { + throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"'); + } + + var descriptor = elementObject.descriptor; + + _disallowProperty(elementObject, "elements", "An element descriptor"); + + var element = { + kind: kind, + key: key, + placement: placement, + descriptor: Object.assign({}, descriptor) + }; + + if (kind !== "field") { + _disallowProperty(elementObject, "initializer", "A method descriptor"); + } else { + _disallowProperty(descriptor, "get", "The property descriptor of a field descriptor"); + + _disallowProperty(descriptor, "set", "The property descriptor of a field descriptor"); + + _disallowProperty(descriptor, "value", "The property descriptor of a field descriptor"); + + element.initializer = elementObject.initializer; + } + + return element; +} + +function _toElementFinisherExtras(elementObject) { + var element = _toElementDescriptor(elementObject); + + var finisher = _optionalCallableProperty(elementObject, "finisher"); + + var extras = _toElementDescriptors(elementObject.extras); + + return { + element: element, + finisher: finisher, + extras: extras + }; +} + +function _fromClassDescriptor(elements) { + var obj = { + kind: "class", + elements: elements.map(_fromElementDescriptor) + }; + var desc = { + value: "Descriptor", + configurable: true + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + return obj; +} + +function _toClassDescriptor(obj) { + var kind = String(obj.kind); + + if (kind !== "class") { + throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"'); + } + + _disallowProperty(obj, "key", "A class descriptor"); + + _disallowProperty(obj, "placement", "A class descriptor"); + + _disallowProperty(obj, "descriptor", "A class descriptor"); + + _disallowProperty(obj, "initializer", "A class descriptor"); + + _disallowProperty(obj, "extras", "A class descriptor"); + + var finisher = _optionalCallableProperty(obj, "finisher"); + + var elements = _toElementDescriptors(obj.elements); + + return { + elements: elements, + finisher: finisher + }; +} + +function _disallowProperty(obj, name, objectType) { + if (obj[name] !== undefined) { + throw new TypeError(objectType + " can't have a ." + name + " property."); + } +} + +function _optionalCallableProperty(obj, name) { + var value = obj[name]; + + if (value !== undefined && typeof value !== "function") { + throw new TypeError("Expected '" + name + "' to be a function"); + } + + return value; +} + +function assertString(input) { + var isString = typeof input === 'string' || input instanceof String; + + if (!isString) { + var invalidType; + + if (input === null) { + invalidType = 'null'; + } else { + invalidType = _typeof(input); + + if (invalidType === 'object' && input.constructor && input.constructor.hasOwnProperty('name')) { + invalidType = input.constructor.name; + } else { + invalidType = "a ".concat(invalidType); + } + } + + throw new TypeError("Expected string but received ".concat(invalidType, ".")); + } +} + +function toDate(date) { + assertString(date); + date = Date.parse(date); + return !isNaN(date) ? new Date(date) : null; +} + +function toFloat(str) { + assertString(str); + return parseFloat(str); +} + +function toInt(str, radix) { + assertString(str); + return parseInt(str, radix || 10); +} + +function toBoolean(str, strict) { + assertString(str); + + if (strict) { + return str === '1' || str === 'true'; + } + + return str !== '0' && str !== 'false' && str !== ''; +} + +function equals(str, comparison) { + assertString(str); + return str === comparison; +} + +function toString(input) { + if (_typeof(input) === 'object' && input !== null) { + if (typeof input.toString === 'function') { + input = input.toString(); + } else { + input = '[object Object]'; + } + } else if (input === null || typeof input === 'undefined' || isNaN(input) && !input.length) { + input = ''; + } + + return String(input); +} + +function contains(str, elem) { + assertString(str); + return str.indexOf(toString(elem)) >= 0; +} + +function matches(str, pattern, modifiers) { + assertString(str); + + if (Object.prototype.toString.call(pattern) !== '[object RegExp]') { + pattern = new RegExp(pattern, modifiers); + } + + return pattern.test(str); +} + +function merge() { + var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var defaults = arguments.length > 1 ? arguments[1] : undefined; + + for (var key in defaults) { + if (typeof obj[key] === 'undefined') { + obj[key] = defaults[key]; + } + } + + return obj; +} + +/* eslint-disable prefer-rest-params */ + +function isByteLength(str, options) { + assertString(str); + var min; + var max; + + if (_typeof(options) === 'object') { + min = options.min || 0; + max = options.max; + } else { + // backwards compatibility: isByteLength(str, min [, max]) + min = arguments[1]; + max = arguments[2]; + } + + var len = encodeURI(str).split(/%..|./).length - 1; + return len >= min && (typeof max === 'undefined' || len <= max); +} + +var default_fqdn_options = { + require_tld: true, + allow_underscores: false, + allow_trailing_dot: false +}; +function isFQDN(str, options) { + assertString(str); + options = merge(options, default_fqdn_options); + /* Remove the optional trailing dot before checking validity */ + + if (options.allow_trailing_dot && str[str.length - 1] === '.') { + str = str.substring(0, str.length - 1); + } + + var parts = str.split('.'); + + for (var i = 0; i < parts.length; i++) { + if (parts[i].length > 63) { + return false; + } + } + + if (options.require_tld) { + var tld = parts.pop(); + + if (!parts.length || !/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) { + return false; + } // disallow spaces + + + if (/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(tld)) { + return false; + } + } + + for (var part, _i = 0; _i < parts.length; _i++) { + part = parts[_i]; + + if (options.allow_underscores) { + part = part.replace(/_/g, ''); + } + + if (!/^[a-z\u00a1-\uffff0-9-]+$/i.test(part)) { + return false; + } // disallow full-width chars + + + if (/[\uff01-\uff5e]/.test(part)) { + return false; + } + + if (part[0] === '-' || part[part.length - 1] === '-') { + return false; + } + } + + return true; +} + +var ipv4Maybe = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/; +var ipv6Block = /^[0-9A-F]{1,4}$/i; +function isIP(str) { + var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + assertString(str); + version = String(version); + + if (!version) { + return isIP(str, 4) || isIP(str, 6); + } else if (version === '4') { + if (!ipv4Maybe.test(str)) { + return false; + } + + var parts = str.split('.').sort(function (a, b) { + return a - b; + }); + return parts[3] <= 255; + } else if (version === '6') { + var blocks = str.split(':'); + var foundOmissionBlock = false; // marker to indicate :: + // At least some OS accept the last 32 bits of an IPv6 address + // (i.e. 2 of the blocks) in IPv4 notation, and RFC 3493 says + // that '::ffff:a.b.c.d' is valid for IPv4-mapped IPv6 addresses, + // and '::a.b.c.d' is deprecated, but also valid. + + var foundIPv4TransitionBlock = isIP(blocks[blocks.length - 1], 4); + var expectedNumberOfBlocks = foundIPv4TransitionBlock ? 7 : 8; + + if (blocks.length > expectedNumberOfBlocks) { + return false; + } // initial or final :: + + + if (str === '::') { + return true; + } else if (str.substr(0, 2) === '::') { + blocks.shift(); + blocks.shift(); + foundOmissionBlock = true; + } else if (str.substr(str.length - 2) === '::') { + blocks.pop(); + blocks.pop(); + foundOmissionBlock = true; + } + + for (var i = 0; i < blocks.length; ++i) { + // test for a :: which can not be at the string start/end + // since those cases have been handled above + if (blocks[i] === '' && i > 0 && i < blocks.length - 1) { + if (foundOmissionBlock) { + return false; // multiple :: in address + } + + foundOmissionBlock = true; + } else if (foundIPv4TransitionBlock && i === blocks.length - 1) {// it has been checked before that the last + // block is a valid IPv4 address + } else if (!ipv6Block.test(blocks[i])) { + return false; + } + } + + if (foundOmissionBlock) { + return blocks.length >= 1; + } + + return blocks.length === expectedNumberOfBlocks; + } + + return false; +} + +var default_email_options = { + allow_display_name: false, + require_display_name: false, + allow_utf8_local_part: true, + require_tld: true +}; +/* eslint-disable max-len */ + +/* eslint-disable no-control-regex */ + +var displayName = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\,\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i; +var emailUserPart = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i; +var gmailUserPart = /^[a-z\d]+$/; +var quotedEmailUser = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i; +var emailUserUtf8Part = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i; +var quotedEmailUserUtf8 = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i; +/* eslint-enable max-len */ + +/* eslint-enable no-control-regex */ + +function isEmail(str, options) { + assertString(str); + options = merge(options, default_email_options); + + if (options.require_display_name || options.allow_display_name) { + var display_email = str.match(displayName); + + if (display_email) { + str = display_email[1]; + } else if (options.require_display_name) { + return false; + } + } + + var parts = str.split('@'); + var domain = parts.pop(); + var user = parts.join('@'); + var lower_domain = domain.toLowerCase(); + + if (options.domain_specific_validation && (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')) { + /* + Previously we removed dots for gmail addresses before validating. + This was removed because it allows `multiple..dots@gmail.com` + to be reported as valid, but it is not. + Gmail only normalizes single dots, removing them from here is pointless, + should be done in normalizeEmail + */ + user = user.toLowerCase(); // Removing sub-address from username before gmail validation + + var username = user.split('+')[0]; // Dots are not included in gmail length restriction + + if (!isByteLength(username.replace('.', ''), { + min: 6, + max: 30 + })) { + return false; + } + + var _user_parts = username.split('.'); + + for (var i = 0; i < _user_parts.length; i++) { + if (!gmailUserPart.test(_user_parts[i])) { + return false; + } + } + } + + if (!isByteLength(user, { + max: 64 + }) || !isByteLength(domain, { + max: 254 + })) { + return false; + } + + if (!isFQDN(domain, { + require_tld: options.require_tld + })) { + if (!options.allow_ip_domain) { + return false; + } + + if (!isIP(domain)) { + if (!domain.startsWith('[') || !domain.endsWith(']')) { + return false; + } + + var noBracketdomain = domain.substr(1, domain.length - 2); + + if (noBracketdomain.length === 0 || !isIP(noBracketdomain)) { + return false; + } + } + } + + if (user[0] === '"') { + user = user.slice(1, user.length - 1); + return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user); + } + + var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart; + var user_parts = user.split('.'); + + for (var _i = 0; _i < user_parts.length; _i++) { + if (!pattern.test(user_parts[_i])) { + return false; + } + } + + return true; +} + +var default_url_options = { + protocols: ['http', 'https', 'ftp'], + require_tld: true, + require_protocol: false, + require_host: true, + require_valid_protocol: true, + allow_underscores: false, + allow_trailing_dot: false, + allow_protocol_relative_urls: false +}; +var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/; + +function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +} + +function checkHost(host, matches) { + for (var i = 0; i < matches.length; i++) { + var match = matches[i]; + + if (host === match || isRegExp(match) && match.test(host)) { + return true; + } + } + + return false; +} + +function isURL(url, options) { + assertString(url); + + if (!url || url.length >= 2083 || /[\s<>]/.test(url)) { + return false; + } + + if (url.indexOf('mailto:') === 0) { + return false; + } + + options = merge(options, default_url_options); + var protocol, auth, host, hostname, port, port_str, split, ipv6; + split = url.split('#'); + url = split.shift(); + split = url.split('?'); + url = split.shift(); + split = url.split('://'); + + if (split.length > 1) { + protocol = split.shift().toLowerCase(); + + if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) { + return false; + } + } else if (options.require_protocol) { + return false; + } else if (url.substr(0, 2) === '//') { + if (!options.allow_protocol_relative_urls) { + return false; + } + + split[0] = url.substr(2); + } + + url = split.join('://'); + + if (url === '') { + return false; + } + + split = url.split('/'); + url = split.shift(); + + if (url === '' && !options.require_host) { + return true; + } + + split = url.split('@'); + + if (split.length > 1) { + if (options.disallow_auth) { + return false; + } + + auth = split.shift(); + + if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) { + return false; + } + } + + hostname = split.join('@'); + port_str = null; + ipv6 = null; + var ipv6_match = hostname.match(wrapped_ipv6); + + if (ipv6_match) { + host = ''; + ipv6 = ipv6_match[1]; + port_str = ipv6_match[2] || null; + } else { + split = hostname.split(':'); + host = split.shift(); + + if (split.length) { + port_str = split.join(':'); + } + } + + if (port_str !== null) { + port = parseInt(port_str, 10); + + if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) { + return false; + } + } + + if (!isIP(host) && !isFQDN(host, options) && (!ipv6 || !isIP(ipv6, 6))) { + return false; + } + + host = host || ipv6; + + if (options.host_whitelist && !checkHost(host, options.host_whitelist)) { + return false; + } + + if (options.host_blacklist && checkHost(host, options.host_blacklist)) { + return false; + } + + return true; +} + +var macAddress = /^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/; +var macAddressNoColons = /^([0-9a-fA-F]){12}$/; +function isMACAddress(str, options) { + assertString(str); + + if (options && options.no_colons) { + return macAddressNoColons.test(str); + } + + return macAddress.test(str); +} + +var subnetMaybe = /^\d{1,2}$/; +function isIPRange(str) { + assertString(str); + var parts = str.split('/'); // parts[0] -> ip, parts[1] -> subnet + + if (parts.length !== 2) { + return false; + } + + if (!subnetMaybe.test(parts[1])) { + return false; + } // Disallow preceding 0 i.e. 01, 02, ... + + + if (parts[1].length > 1 && parts[1].startsWith('0')) { + return false; + } + + return isIP(parts[0], 4) && parts[1] <= 32 && parts[1] >= 0; +} + +function isBoolean(str) { + assertString(str); + return ['true', 'false', '1', '0'].indexOf(str) >= 0; +} + +var alpha = { + 'en-US': /^[A-Z]+$/i, + 'bg-BG': /^[А-Я]+$/i, + 'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + 'da-DK': /^[A-ZÆØÅ]+$/i, + 'de-DE': /^[A-ZÄÖÜß]+$/i, + 'el-GR': /^[Α-ω]+$/i, + 'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i, + 'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + 'it-IT': /^[A-ZÀÉÈÌÎÓÒÙ]+$/i, + 'nb-NO': /^[A-ZÆØÅ]+$/i, + 'nl-NL': /^[A-ZÁÉËÏÓÖÜÚ]+$/i, + 'nn-NO': /^[A-ZÆØÅ]+$/i, + 'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + 'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + 'pt-PT': /^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i, + 'ru-RU': /^[А-ЯЁ]+$/i, + 'sl-SI': /^[A-ZČĆĐŠŽ]+$/i, + 'sk-SK': /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, + 'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i, + 'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i, + 'sv-SE': /^[A-ZÅÄÖ]+$/i, + 'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i, + 'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i, + 'ku-IQ': /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, + ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/ +}; +var alphanumeric = { + 'en-US': /^[0-9A-Z]+$/i, + 'bg-BG': /^[0-9А-Я]+$/i, + 'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + 'da-DK': /^[0-9A-ZÆØÅ]+$/i, + 'de-DE': /^[0-9A-ZÄÖÜß]+$/i, + 'el-GR': /^[0-9Α-ω]+$/i, + 'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i, + 'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + 'it-IT': /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i, + 'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + 'nb-NO': /^[0-9A-ZÆØÅ]+$/i, + 'nl-NL': /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i, + 'nn-NO': /^[0-9A-ZÆØÅ]+$/i, + 'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + 'pt-PT': /^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i, + 'ru-RU': /^[0-9А-ЯЁ]+$/i, + 'sl-SI': /^[0-9A-ZČĆĐŠŽ]+$/i, + 'sk-SK': /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, + 'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i, + 'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i, + 'sv-SE': /^[0-9A-ZÅÄÖ]+$/i, + 'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i, + 'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i, + 'ku-IQ': /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, + ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/ +}; +var decimal = { + 'en-US': '.', + ar: '٫' +}; +var englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM']; + +for (var locale, i = 0; i < englishLocales.length; i++) { + locale = "en-".concat(englishLocales[i]); + alpha[locale] = alpha['en-US']; + alphanumeric[locale] = alphanumeric['en-US']; + decimal[locale] = decimal['en-US']; +} // Source: http://www.localeplanet.com/java/ + + +var arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE']; + +for (var _locale, _i = 0; _i < arabicLocales.length; _i++) { + _locale = "ar-".concat(arabicLocales[_i]); + alpha[_locale] = alpha.ar; + alphanumeric[_locale] = alphanumeric.ar; + decimal[_locale] = decimal.ar; +} // Source: https://en.wikipedia.org/wiki/Decimal_mark + + +var dotDecimal = []; +var commaDecimal = ['bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'es-ES', 'fr-FR', 'it-IT', 'ku-IQ', 'hu-HU', 'nb-NO', 'nn-NO', 'nl-NL', 'pl-PL', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS@latin', 'sr-RS', 'sv-SE', 'tr-TR', 'uk-UA']; + +for (var _i2 = 0; _i2 < dotDecimal.length; _i2++) { + decimal[dotDecimal[_i2]] = decimal['en-US']; +} + +for (var _i3 = 0; _i3 < commaDecimal.length; _i3++) { + decimal[commaDecimal[_i3]] = ','; +} + +alpha['pt-BR'] = alpha['pt-PT']; +alphanumeric['pt-BR'] = alphanumeric['pt-PT']; +decimal['pt-BR'] = decimal['pt-PT']; // see #862 + +alpha['pl-Pl'] = alpha['pl-PL']; +alphanumeric['pl-Pl'] = alphanumeric['pl-PL']; +decimal['pl-Pl'] = decimal['pl-PL']; + +function isAlpha(str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; + assertString(str); + + if (locale in alpha) { + return alpha[locale].test(str); + } + + throw new Error("Invalid locale '".concat(locale, "'")); +} +var locales = Object.keys(alpha); + +function isAlphanumeric(str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; + assertString(str); + + if (locale in alphanumeric) { + return alphanumeric[locale].test(str); + } + + throw new Error("Invalid locale '".concat(locale, "'")); +} +var locales$1 = Object.keys(alphanumeric); + +var numeric = /^[+-]?([0-9]*[.])?[0-9]+$/; +var numericNoSymbols = /^[0-9]+$/; +function isNumeric(str, options) { + assertString(str); + + if (options && options.no_symbols) { + return numericNoSymbols.test(str); + } + + return numeric.test(str); +} + +var int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/; +var intLeadingZeroes = /^[-+]?[0-9]+$/; +function isInt(str, options) { + assertString(str); + options = options || {}; // Get the regex to use for testing, based on whether + // leading zeroes are allowed or not. + + var regex = options.hasOwnProperty('allow_leading_zeroes') && !options.allow_leading_zeroes ? int : intLeadingZeroes; // Check min/max/lt/gt + + var minCheckPassed = !options.hasOwnProperty('min') || str >= options.min; + var maxCheckPassed = !options.hasOwnProperty('max') || str <= options.max; + var ltCheckPassed = !options.hasOwnProperty('lt') || str < options.lt; + var gtCheckPassed = !options.hasOwnProperty('gt') || str > options.gt; + return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed; +} + +function isPort(str) { + return isInt(str, { + min: 0, + max: 65535 + }); +} + +function isLowercase(str) { + assertString(str); + return str === str.toLowerCase(); +} + +function isUppercase(str) { + assertString(str); + return str === str.toUpperCase(); +} + +/* eslint-disable no-control-regex */ + +var ascii = /^[\x00-\x7F]+$/; +/* eslint-enable no-control-regex */ + +function isAscii(str) { + assertString(str); + return ascii.test(str); +} + +var fullWidth = /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; +function isFullWidth(str) { + assertString(str); + return fullWidth.test(str); +} + +var halfWidth = /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; +function isHalfWidth(str) { + assertString(str); + return halfWidth.test(str); +} + +function isVariableWidth(str) { + assertString(str); + return fullWidth.test(str) && halfWidth.test(str); +} + +/* eslint-disable no-control-regex */ + +var multibyte = /[^\x00-\x7F]/; +/* eslint-enable no-control-regex */ + +function isMultibyte(str) { + assertString(str); + return multibyte.test(str); +} + +var surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/; +function isSurrogatePair(str) { + assertString(str); + return surrogatePair.test(str); +} + +function isFloat(str, options) { + assertString(str); + options = options || {}; + var float = new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(options.locale ? decimal[options.locale] : '.', "[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$")); + + if (str === '' || str === '.' || str === '-' || str === '+') { + return false; + } + + var value = parseFloat(str.replace(',', '.')); + return float.test(str) && (!options.hasOwnProperty('min') || value >= options.min) && (!options.hasOwnProperty('max') || value <= options.max) && (!options.hasOwnProperty('lt') || value < options.lt) && (!options.hasOwnProperty('gt') || value > options.gt); +} +var locales$2 = Object.keys(decimal); + +var includes = function includes(arr, val) { + return arr.some(function (arrVal) { + return val === arrVal; + }); +}; + +function decimalRegExp(options) { + var regExp = new RegExp("^[-+]?([0-9]+)?(\\".concat(decimal[options.locale], "[0-9]{").concat(options.decimal_digits, "})").concat(options.force_decimal ? '' : '?', "$")); + return regExp; +} + +var default_decimal_options = { + force_decimal: false, + decimal_digits: '1,', + locale: 'en-US' +}; +var blacklist = ['', '-', '+']; +function isDecimal(str, options) { + assertString(str); + options = merge(options, default_decimal_options); + + if (options.locale in decimal) { + return !includes(blacklist, str.replace(/ /g, '')) && decimalRegExp(options).test(str); + } + + throw new Error("Invalid locale '".concat(options.locale, "'")); +} + +var hexadecimal = /^[0-9A-F]+$/i; +function isHexadecimal(str) { + assertString(str); + return hexadecimal.test(str); +} + +function isDivisibleBy(str, num) { + assertString(str); + return toFloat(str) % parseInt(num, 10) === 0; +} + +var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{6})$/i; +function isHexColor(str) { + assertString(str); + return hexcolor.test(str); +} + +var isrc = /^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/; +function isISRC(str) { + assertString(str); + return isrc.test(str); +} + +var md5 = /^[a-f0-9]{32}$/; +function isMD5(str) { + assertString(str); + return md5.test(str); +} + +var lengths = { + md5: 32, + md4: 32, + sha1: 40, + sha256: 64, + sha384: 96, + sha512: 128, + ripemd128: 32, + ripemd160: 40, + tiger128: 32, + tiger160: 40, + tiger192: 48, + crc32: 8, + crc32b: 8 +}; +function isHash(str, algorithm) { + assertString(str); + var hash = new RegExp("^[a-f0-9]{".concat(lengths[algorithm], "}$")); + return hash.test(str); +} + +var jwt = /^([A-Za-z0-9\-_~+\/]+[=]{0,2})\.([A-Za-z0-9\-_~+\/]+[=]{0,2})(?:\.([A-Za-z0-9\-_~+\/]+[=]{0,2}))?$/; +function isJWT(str) { + assertString(str); + return jwt.test(str); +} + +function isJSON(str) { + assertString(str); + + try { + var obj = JSON.parse(str); + return !!obj && _typeof(obj) === 'object'; + } catch (e) { + /* ignore */ + } + + return false; +} + +var default_is_empty_options = { + ignore_whitespace: false +}; +function isEmpty(str, options) { + assertString(str); + options = merge(options, default_is_empty_options); + return (options.ignore_whitespace ? str.trim().length : str.length) === 0; +} + +/* eslint-disable prefer-rest-params */ + +function isLength(str, options) { + assertString(str); + var min; + var max; + + if (_typeof(options) === 'object') { + min = options.min || 0; + max = options.max; + } else { + // backwards compatibility: isLength(str, min [, max]) + min = arguments[1]; + max = arguments[2]; + } + + var surrogatePairs = str.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g) || []; + var len = str.length - surrogatePairs.length; + return len >= min && (typeof max === 'undefined' || len <= max); +} + +var uuid = { + 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i, + 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i +}; +function isUUID(str) { + var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'all'; + assertString(str); + var pattern = uuid[version]; + return pattern && pattern.test(str); +} + +function isMongoId(str) { + assertString(str); + return isHexadecimal(str) && str.length === 24; +} + +function isAfter(str) { + var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date()); + assertString(str); + var comparison = toDate(date); + var original = toDate(str); + return !!(original && comparison && original > comparison); +} + +function isBefore(str) { + var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date()); + assertString(str); + var comparison = toDate(date); + var original = toDate(str); + return !!(original && comparison && original < comparison); +} + +function isIn(str, options) { + assertString(str); + var i; + + if (Object.prototype.toString.call(options) === '[object Array]') { + var array = []; + + for (i in options) { + if ({}.hasOwnProperty.call(options, i)) { + array[i] = toString(options[i]); + } + } + + return array.indexOf(str) >= 0; + } else if (_typeof(options) === 'object') { + return options.hasOwnProperty(str); + } else if (options && typeof options.indexOf === 'function') { + return options.indexOf(str) >= 0; + } + + return false; +} + +/* eslint-disable max-len */ + +var creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|6[27][0-9]{14})$/; +/* eslint-enable max-len */ + +function isCreditCard(str) { + assertString(str); + var sanitized = str.replace(/[- ]+/g, ''); + + if (!creditCard.test(sanitized)) { + return false; + } + + var sum = 0; + var digit; + var tmpNum; + var shouldDouble; + + for (var i = sanitized.length - 1; i >= 0; i--) { + digit = sanitized.substring(i, i + 1); + tmpNum = parseInt(digit, 10); + + if (shouldDouble) { + tmpNum *= 2; + + if (tmpNum >= 10) { + sum += tmpNum % 10 + 1; + } else { + sum += tmpNum; + } + } else { + sum += tmpNum; + } + + shouldDouble = !shouldDouble; + } + + return !!(sum % 10 === 0 ? sanitized : false); +} + +var validators = { + ES: function ES(str) { + assertString(str); + var DNI = /^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/; + var charsValue = { + X: 0, + Y: 1, + Z: 2 + }; + var controlDigits = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E']; // sanitize user input + + var sanitized = str.trim().toUpperCase(); // validate the data structure + + if (!DNI.test(sanitized)) { + return false; + } // validate the control digit + + + var number = sanitized.slice(0, -1).replace(/[X,Y,Z]/g, function (char) { + return charsValue[char]; + }); + return sanitized.endsWith(controlDigits[number % 23]); + } +}; +function isIdentityCard(str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'any'; + assertString(str); + + if (locale in validators) { + return validators[locale](str); + } else if (locale === 'any') { + for (var key in validators) { + if (validators.hasOwnProperty(key)) { + var validator = validators[key]; + + if (validator(str)) { + return true; + } + } + } + + return false; + } + + throw new Error("Invalid locale '".concat(locale, "'")); +} + +var isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/; +function isISIN(str) { + assertString(str); + + if (!isin.test(str)) { + return false; + } + + var checksumStr = str.replace(/[A-Z]/g, function (character) { + return parseInt(character, 36); + }); + var sum = 0; + var digit; + var tmpNum; + var shouldDouble = true; + + for (var i = checksumStr.length - 2; i >= 0; i--) { + digit = checksumStr.substring(i, i + 1); + tmpNum = parseInt(digit, 10); + + if (shouldDouble) { + tmpNum *= 2; + + if (tmpNum >= 10) { + sum += tmpNum + 1; + } else { + sum += tmpNum; + } + } else { + sum += tmpNum; + } + + shouldDouble = !shouldDouble; + } + + return parseInt(str.substr(str.length - 1), 10) === (10000 - sum) % 10; +} + +var isbn10Maybe = /^(?:[0-9]{9}X|[0-9]{10})$/; +var isbn13Maybe = /^(?:[0-9]{13})$/; +var factor = [1, 3]; +function isISBN(str) { + var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + assertString(str); + version = String(version); + + if (!version) { + return isISBN(str, 10) || isISBN(str, 13); + } + + var sanitized = str.replace(/[\s-]+/g, ''); + var checksum = 0; + var i; + + if (version === '10') { + if (!isbn10Maybe.test(sanitized)) { + return false; + } + + for (i = 0; i < 9; i++) { + checksum += (i + 1) * sanitized.charAt(i); + } + + if (sanitized.charAt(9) === 'X') { + checksum += 10 * 10; + } else { + checksum += 10 * sanitized.charAt(9); + } + + if (checksum % 11 === 0) { + return !!sanitized; + } + } else if (version === '13') { + if (!isbn13Maybe.test(sanitized)) { + return false; + } + + for (i = 0; i < 12; i++) { + checksum += factor[i % 2] * sanitized.charAt(i); + } + + if (sanitized.charAt(12) - (10 - checksum % 10) % 10 === 0) { + return !!sanitized; + } + } + + return false; +} + +var issn = '^\\d{4}-?\\d{3}[\\dX]$'; +function isISSN(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + assertString(str); + var testIssn = issn; + testIssn = options.require_hyphen ? testIssn.replace('?', '') : testIssn; + testIssn = options.case_sensitive ? new RegExp(testIssn) : new RegExp(testIssn, 'i'); + + if (!testIssn.test(str)) { + return false; + } + + var digits = str.replace('-', '').toUpperCase(); + var checksum = 0; + + for (var i = 0; i < digits.length; i++) { + var digit = digits[i]; + checksum += (digit === 'X' ? 10 : +digit) * (8 - i); + } + + return checksum % 11 === 0; +} + +/* eslint-disable max-len */ + +var phones = { + 'ar-AE': /^((\+?971)|0)?5[024568]\d{7}$/, + 'ar-DZ': /^(\+?213|0)(5|6|7)\d{8}$/, + 'ar-EG': /^((\+?20)|0)?1[012]\d{8}$/, + 'ar-IQ': /^(\+?964|0)?7[0-9]\d{8}$/, + 'ar-JO': /^(\+?962|0)?7[789]\d{7}$/, + 'ar-KW': /^(\+?965)[569]\d{7}$/, + 'ar-SA': /^(!?(\+?966)|0)?5\d{8}$/, + 'ar-SY': /^(!?(\+?963)|0)?9\d{8}$/, + 'ar-TN': /^(\+?216)?[2459]\d{7}$/, + 'be-BY': /^(\+?375)?(24|25|29|33|44)\d{7}$/, + 'bg-BG': /^(\+?359|0)?8[789]\d{7}$/, + 'bn-BD': /\+?(88)?0?1[356789][0-9]{8}\b/, + 'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + 'da-DK': /^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'de-DE': /^(\+49)?0?1(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7}$/, + 'el-GR': /^(\+?30|0)?(69\d{8})$/, + 'en-AU': /^(\+?61|0)4\d{8}$/, + 'en-GB': /^(\+?44|0)7\d{9}$/, + 'en-GH': /^(\+233|0)(20|50|24|54|27|57|26|56|23|28)\d{7}$/, + 'en-HK': /^(\+?852\-?)?[456789]\d{3}\-?\d{4}$/, + 'en-IE': /^(\+?353|0)8[356789]\d{7}$/, + 'en-IN': /^(\+?91|0)?[6789]\d{9}$/, + 'en-KE': /^(\+?254|0)?[7]\d{8}$/, + 'en-MU': /^(\+?230|0)?\d{8}$/, + 'en-NG': /^(\+?234|0)?[789]\d{9}$/, + 'en-NZ': /^(\+?64|0)[28]\d{7,9}$/, + 'en-PK': /^((\+92)|(0092))-{0,1}\d{3}-{0,1}\d{7}$|^\d{11}$|^\d{4}-\d{7}$/, + 'en-RW': /^(\+?250|0)?[7]\d{8}$/, + 'en-SG': /^(\+65)?[89]\d{7}$/, + 'en-TZ': /^(\+?255|0)?[67]\d{8}$/, + 'en-UG': /^(\+?256|0)?[7]\d{8}$/, + 'en-US': /^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/, + 'en-ZA': /^(\+?27|0)\d{9}$/, + 'en-ZM': /^(\+?26)?09[567]\d{7}$/, + 'es-ES': /^(\+?34)?(6\d{1}|7[1234])\d{7}$/, + 'es-MX': /^(\+?52)?(1|01)?\d{10,11}$/, + 'es-UY': /^(\+598|0)9[1-9][\d]{6}$/, + 'et-EE': /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/, + 'fa-IR': /^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/, + 'fi-FI': /^(\+?358|0)\s?(4(0|1|2|4|5|6)?|50)\s?(\d\s?){4,8}\d$/, + 'fo-FO': /^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'fr-FR': /^(\+?33|0)[67]\d{8}$/, + 'he-IL': /^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/, + 'hu-HU': /^(\+?36)(20|30|70)\d{7}$/, + 'id-ID': /^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/, + 'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/, + 'ja-JP': /^(\+?81|0)[789]0[ \-]?[1-9]\d{2}[ \-]?\d{5}$/, + 'kk-KZ': /^(\+?7|8)?7\d{9}$/, + 'kl-GL': /^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'ko-KR': /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/, + 'lt-LT': /^(\+370|8)\d{8}$/, + 'ms-MY': /^(\+?6?01){1}(([0145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/, + 'nb-NO': /^(\+?47)?[49]\d{7}$/, + 'nl-BE': /^(\+?32|0)4?\d{8}$/, + 'nn-NO': /^(\+?47)?[49]\d{7}$/, + 'pl-PL': /^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/, + 'pt-BR': /(?=^(\+?5{2}\-?|0)[1-9]{2}\-?\d{4}\-?\d{4}$)(^(\+?5{2}\-?|0)[1-9]{2}\-?[6-9]{1}\d{3}\-?\d{4}$)|(^(\+?5{2}\-?|0)[1-9]{2}\-?9[6-9]{1}\d{3}\-?\d{4}$)/, + 'pt-PT': /^(\+?351)?9[1236]\d{7}$/, + 'ro-RO': /^(\+?4?0)\s?7\d{2}(\/|\s|\.|\-)?\d{3}(\s|\.|\-)?\d{3}$/, + 'ru-RU': /^(\+?7|8)?9\d{9}$/, + 'sl-SI': /^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/, + 'sk-SK': /^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + 'sr-RS': /^(\+3816|06)[- \d]{5,9}$/, + 'sv-SE': /^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/, + 'th-TH': /^(\+66|66|0)\d{9}$/, + 'tr-TR': /^(\+?90|0)?5\d{9}$/, + 'uk-UA': /^(\+?38|8)?0\d{9}$/, + 'vi-VN': /^(\+?84|0)((3([2-9]))|(5([689]))|(7([0|6-9]))|(8([1-5]))|(9([0-9])))([0-9]{7})$/, + 'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/, + 'zh-TW': /^(\+?886\-?|0)?9\d{8}$/ +}; +/* eslint-enable max-len */ +// aliases + +phones['en-CA'] = phones['en-US']; +phones['fr-BE'] = phones['nl-BE']; +phones['zh-HK'] = phones['en-HK']; +function isMobilePhone(str, locale, options) { + assertString(str); + + if (options && options.strictMode && !str.startsWith('+')) { + return false; + } + + if (Array.isArray(locale)) { + return locale.some(function (key) { + if (phones.hasOwnProperty(key)) { + var phone = phones[key]; + + if (phone.test(str)) { + return true; + } + } + + return false; + }); + } else if (locale in phones) { + return phones[locale].test(str); // alias falsey locale as 'any' + } else if (!locale || locale === 'any') { + for (var key in phones) { + if (phones.hasOwnProperty(key)) { + var phone = phones[key]; + + if (phone.test(str)) { + return true; + } + } + } + + return false; + } + + throw new Error("Invalid locale '".concat(locale, "'")); +} +var locales$3 = Object.keys(phones); + +function currencyRegex(options) { + var decimal_digits = "\\d{".concat(options.digits_after_decimal[0], "}"); + options.digits_after_decimal.forEach(function (digit, index) { + if (index !== 0) decimal_digits = "".concat(decimal_digits, "|\\d{").concat(digit, "}"); + }); + var symbol = "(\\".concat(options.symbol.replace(/\./g, '\\.'), ")").concat(options.require_symbol ? '' : '?'), + negative = '-?', + whole_dollar_amount_without_sep = '[1-9]\\d*', + whole_dollar_amount_with_sep = "[1-9]\\d{0,2}(\\".concat(options.thousands_separator, "\\d{3})*"), + valid_whole_dollar_amounts = ['0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep], + whole_dollar_amount = "(".concat(valid_whole_dollar_amounts.join('|'), ")?"), + decimal_amount = "(\\".concat(options.decimal_separator, "(").concat(decimal_digits, "))").concat(options.require_decimal ? '' : '?'); + var pattern = whole_dollar_amount + (options.allow_decimal || options.require_decimal ? decimal_amount : ''); // default is negative sign before symbol, but there are two other options (besides parens) + + if (options.allow_negatives && !options.parens_for_negatives) { + if (options.negative_sign_after_digits) { + pattern += negative; + } else if (options.negative_sign_before_digits) { + pattern = negative + pattern; + } + } // South African Rand, for example, uses R 123 (space) and R-123 (no space) + + + if (options.allow_negative_sign_placeholder) { + pattern = "( (?!\\-))?".concat(pattern); + } else if (options.allow_space_after_symbol) { + pattern = " ?".concat(pattern); + } else if (options.allow_space_after_digits) { + pattern += '( (?!$))?'; + } + + if (options.symbol_after_digits) { + pattern += symbol; + } else { + pattern = symbol + pattern; + } + + if (options.allow_negatives) { + if (options.parens_for_negatives) { + pattern = "(\\(".concat(pattern, "\\)|").concat(pattern, ")"); + } else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) { + pattern = negative + pattern; + } + } // ensure there's a dollar and/or decimal amount, and that + // it doesn't start with a space or a negative sign followed by a space + + + return new RegExp("^(?!-? )(?=.*\\d)".concat(pattern, "$")); +} + +var default_currency_options = { + symbol: '$', + require_symbol: false, + allow_space_after_symbol: false, + symbol_after_digits: false, + allow_negatives: true, + parens_for_negatives: false, + negative_sign_before_digits: false, + negative_sign_after_digits: false, + allow_negative_sign_placeholder: false, + thousands_separator: ',', + decimal_separator: '.', + allow_decimal: true, + require_decimal: false, + digits_after_decimal: [2], + allow_space_after_digits: false +}; +function isCurrency(str, options) { + assertString(str); + options = merge(options, default_currency_options); + return currencyRegex(options).test(str); +} + +/* eslint-disable max-len */ +// from http://goo.gl/0ejHHW + +var iso8601 = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; +/* eslint-enable max-len */ + +var isValidDate = function isValidDate(str) { + // str must have passed the ISO8601 check + // this check is meant to catch invalid dates + // like 2009-02-31 + // first check for ordinal dates + var ordinalMatch = str.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/); + + if (ordinalMatch) { + var oYear = Number(ordinalMatch[1]); + var oDay = Number(ordinalMatch[2]); // if is leap year + + if (oYear % 4 === 0 && oYear % 100 !== 0) return oDay <= 366; + return oDay <= 365; + } + + var match = str.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number); + var year = match[1]; + var month = match[2]; + var day = match[3]; + var monthString = month ? "0".concat(month).slice(-2) : month; + var dayString = day ? "0".concat(day).slice(-2) : day; // create a date object and compare + + var d = new Date("".concat(year, "-").concat(monthString || '01', "-").concat(dayString || '01')); + if (isNaN(d.getUTCFullYear())) return false; + + if (month && day) { + return d.getUTCFullYear() === year && d.getUTCMonth() + 1 === month && d.getUTCDate() === day; + } + + return true; +}; + +function isISO8601(str, options) { + assertString(str); + var check = iso8601.test(str); + if (!options) return check; + if (check && options.strict) return isValidDate(str); + return check; +} + +/* Based on https://tools.ietf.org/html/rfc3339#section-5.6 */ + +var dateFullYear = /[0-9]{4}/; +var dateMonth = /(0[1-9]|1[0-2])/; +var dateMDay = /([12]\d|0[1-9]|3[01])/; +var timeHour = /([01][0-9]|2[0-3])/; +var timeMinute = /[0-5][0-9]/; +var timeSecond = /([0-5][0-9]|60)/; +var timeSecFrac = /(\.[0-9]+)?/; +var timeNumOffset = new RegExp("[-+]".concat(timeHour.source, ":").concat(timeMinute.source)); +var timeOffset = new RegExp("([zZ]|".concat(timeNumOffset.source, ")")); +var partialTime = new RegExp("".concat(timeHour.source, ":").concat(timeMinute.source, ":").concat(timeSecond.source).concat(timeSecFrac.source)); +var fullDate = new RegExp("".concat(dateFullYear.source, "-").concat(dateMonth.source, "-").concat(dateMDay.source)); +var fullTime = new RegExp("".concat(partialTime.source).concat(timeOffset.source)); +var rfc3339 = new RegExp("".concat(fullDate.source, "[ tT]").concat(fullTime.source)); +function isRFC3339(str) { + assertString(str); + return rfc3339.test(str); +} + +var validISO31661Alpha2CountriesCodes = ['AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW']; +function isISO31661Alpha2(str) { + assertString(str); + return includes(validISO31661Alpha2CountriesCodes, str.toUpperCase()); +} + +var validISO31661Alpha3CountriesCodes = ['AFG', 'ALA', 'ALB', 'DZA', 'ASM', 'AND', 'AGO', 'AIA', 'ATA', 'ATG', 'ARG', 'ARM', 'ABW', 'AUS', 'AUT', 'AZE', 'BHS', 'BHR', 'BGD', 'BRB', 'BLR', 'BEL', 'BLZ', 'BEN', 'BMU', 'BTN', 'BOL', 'BES', 'BIH', 'BWA', 'BVT', 'BRA', 'IOT', 'BRN', 'BGR', 'BFA', 'BDI', 'KHM', 'CMR', 'CAN', 'CPV', 'CYM', 'CAF', 'TCD', 'CHL', 'CHN', 'CXR', 'CCK', 'COL', 'COM', 'COG', 'COD', 'COK', 'CRI', 'CIV', 'HRV', 'CUB', 'CUW', 'CYP', 'CZE', 'DNK', 'DJI', 'DMA', 'DOM', 'ECU', 'EGY', 'SLV', 'GNQ', 'ERI', 'EST', 'ETH', 'FLK', 'FRO', 'FJI', 'FIN', 'FRA', 'GUF', 'PYF', 'ATF', 'GAB', 'GMB', 'GEO', 'DEU', 'GHA', 'GIB', 'GRC', 'GRL', 'GRD', 'GLP', 'GUM', 'GTM', 'GGY', 'GIN', 'GNB', 'GUY', 'HTI', 'HMD', 'VAT', 'HND', 'HKG', 'HUN', 'ISL', 'IND', 'IDN', 'IRN', 'IRQ', 'IRL', 'IMN', 'ISR', 'ITA', 'JAM', 'JPN', 'JEY', 'JOR', 'KAZ', 'KEN', 'KIR', 'PRK', 'KOR', 'KWT', 'KGZ', 'LAO', 'LVA', 'LBN', 'LSO', 'LBR', 'LBY', 'LIE', 'LTU', 'LUX', 'MAC', 'MKD', 'MDG', 'MWI', 'MYS', 'MDV', 'MLI', 'MLT', 'MHL', 'MTQ', 'MRT', 'MUS', 'MYT', 'MEX', 'FSM', 'MDA', 'MCO', 'MNG', 'MNE', 'MSR', 'MAR', 'MOZ', 'MMR', 'NAM', 'NRU', 'NPL', 'NLD', 'NCL', 'NZL', 'NIC', 'NER', 'NGA', 'NIU', 'NFK', 'MNP', 'NOR', 'OMN', 'PAK', 'PLW', 'PSE', 'PAN', 'PNG', 'PRY', 'PER', 'PHL', 'PCN', 'POL', 'PRT', 'PRI', 'QAT', 'REU', 'ROU', 'RUS', 'RWA', 'BLM', 'SHN', 'KNA', 'LCA', 'MAF', 'SPM', 'VCT', 'WSM', 'SMR', 'STP', 'SAU', 'SEN', 'SRB', 'SYC', 'SLE', 'SGP', 'SXM', 'SVK', 'SVN', 'SLB', 'SOM', 'ZAF', 'SGS', 'SSD', 'ESP', 'LKA', 'SDN', 'SUR', 'SJM', 'SWZ', 'SWE', 'CHE', 'SYR', 'TWN', 'TJK', 'TZA', 'THA', 'TLS', 'TGO', 'TKL', 'TON', 'TTO', 'TUN', 'TUR', 'TKM', 'TCA', 'TUV', 'UGA', 'UKR', 'ARE', 'GBR', 'USA', 'UMI', 'URY', 'UZB', 'VUT', 'VEN', 'VNM', 'VGB', 'VIR', 'WLF', 'ESH', 'YEM', 'ZMB', 'ZWE']; +function isISO31661Alpha3(str) { + assertString(str); + return includes(validISO31661Alpha3CountriesCodes, str.toUpperCase()); +} + +var notBase64 = /[^A-Z0-9+\/=]/i; +function isBase64(str) { + assertString(str); + var len = str.length; + + if (!len || len % 4 !== 0 || notBase64.test(str)) { + return false; + } + + var firstPaddingChar = str.indexOf('='); + return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && str[len - 1] === '='; +} + +var validMediaType = /^[a-z]+\/[a-z0-9\-\+]+$/i; +var validAttribute = /^[a-z\-]+=[a-z0-9\-]+$/i; +var validData = /^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i; +function isDataURI(str) { + assertString(str); + var data = str.split(','); + + if (data.length < 2) { + return false; + } + + var attributes = data.shift().trim().split(';'); + var schemeAndMediaType = attributes.shift(); + + if (schemeAndMediaType.substr(0, 5) !== 'data:') { + return false; + } + + var mediaType = schemeAndMediaType.substr(5); + + if (mediaType !== '' && !validMediaType.test(mediaType)) { + return false; + } + + for (var i = 0; i < attributes.length; i++) { + if (i === attributes.length - 1 && attributes[i].toLowerCase() === 'base64') {// ok + } else if (!validAttribute.test(attributes[i])) { + return false; + } + } + + for (var _i = 0; _i < data.length; _i++) { + if (!validData.test(data[_i])) { + return false; + } + } + + return true; +} + +var magnetURI = /^magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32,40}&dn=.+&tr=.+$/i; +function isMagnetURI(url) { + assertString(url); + return magnetURI.test(url.trim()); +} + +/* + Checks if the provided string matches to a correct Media type format (MIME type) + + This function only checks is the string format follows the + etablished rules by the according RFC specifications. + This function supports 'charset' in textual media types + (https://tools.ietf.org/html/rfc6657). + + This function does not check against all the media types listed + by the IANA (https://www.iana.org/assignments/media-types/media-types.xhtml) + because of lightness purposes : it would require to include + all these MIME types in this librairy, which would weigh it + significantly. This kind of effort maybe is not worth for the use that + this function has in this entire librairy. + + More informations in the RFC specifications : + - https://tools.ietf.org/html/rfc2045 + - https://tools.ietf.org/html/rfc2046 + - https://tools.ietf.org/html/rfc7231#section-3.1.1.1 + - https://tools.ietf.org/html/rfc7231#section-3.1.1.5 +*/ +// Match simple MIME types +// NB : +// Subtype length must not exceed 100 characters. +// This rule does not comply to the RFC specs (what is the max length ?). + +var mimeTypeSimple = /^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+]{1,100}$/i; // eslint-disable-line max-len +// Handle "charset" in "text/*" + +var mimeTypeText = /^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i; // eslint-disable-line max-len +// Handle "boundary" in "multipart/*" + +var mimeTypeMultipart = /^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i; // eslint-disable-line max-len + +function isMimeType(str) { + assertString(str); + return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str); +} + +var lat = /^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/; +var long = /^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/; +var isLatLong = function (str) { + assertString(str); + if (!str.includes(',')) return false; + var pair = str.split(','); + return lat.test(pair[0]) && long.test(pair[1]); +}; + +var threeDigit = /^\d{3}$/; +var fourDigit = /^\d{4}$/; +var fiveDigit = /^\d{5}$/; +var sixDigit = /^\d{6}$/; +var patterns = { + AD: /^AD\d{3}$/, + AT: fourDigit, + AU: fourDigit, + BE: fourDigit, + BG: fourDigit, + CA: /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i, + CH: fourDigit, + CZ: /^\d{3}\s?\d{2}$/, + DE: fiveDigit, + DK: fourDigit, + DZ: fiveDigit, + EE: fiveDigit, + ES: fiveDigit, + FI: fiveDigit, + FR: /^\d{2}\s?\d{3}$/, + GB: /^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i, + GR: /^\d{3}\s?\d{2}$/, + HR: /^([1-5]\d{4}$)/, + HU: fourDigit, + IL: fiveDigit, + IN: sixDigit, + IS: threeDigit, + IT: fiveDigit, + JP: /^\d{3}\-\d{4}$/, + KE: fiveDigit, + LI: /^(948[5-9]|949[0-7])$/, + LT: /^LT\-\d{5}$/, + LU: fourDigit, + LV: /^LV\-\d{4}$/, + MX: fiveDigit, + NL: /^\d{4}\s?[a-z]{2}$/i, + NO: fourDigit, + PL: /^\d{2}\-\d{3}$/, + PT: /^\d{4}\-\d{3}?$/, + RO: sixDigit, + RU: sixDigit, + SA: fiveDigit, + SE: /^\d{3}\s?\d{2}$/, + SI: fourDigit, + SK: /^\d{3}\s?\d{2}$/, + TN: fourDigit, + TW: /^\d{3}(\d{2})?$/, + UA: fiveDigit, + US: /^\d{5}(-\d{4})?$/, + ZA: fourDigit, + ZM: fiveDigit +}; +var locales$4 = Object.keys(patterns); +var isPostalCode = function (str, locale) { + assertString(str); + + if (locale in patterns) { + return patterns[locale].test(str); + } else if (locale === 'any') { + for (var key in patterns) { + if (patterns.hasOwnProperty(key)) { + var pattern = patterns[key]; + + if (pattern.test(str)) { + return true; + } + } + } + + return false; + } + + throw new Error("Invalid locale '".concat(locale, "'")); +}; + +function ltrim(str, chars) { + assertString(str); + var pattern = chars ? new RegExp("^[".concat(chars, "]+"), 'g') : /^\s+/g; + return str.replace(pattern, ''); +} + +function rtrim(str, chars) { + assertString(str); + var pattern = chars ? new RegExp("[".concat(chars, "]")) : /\s/; + var idx = str.length - 1; + + for (; idx >= 0 && pattern.test(str[idx]); idx--) { + + } + + return idx < str.length ? str.substr(0, idx + 1) : str; +} + +function trim(str, chars) { + return rtrim(ltrim(str, chars), chars); +} + +function escape(str) { + assertString(str); + return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(//g, '>').replace(/\//g, '/').replace(/\\/g, '\').replace(/`/g, '`'); +} + +function unescape(str) { + assertString(str); + return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, "'").replace(/</g, '<').replace(/>/g, '>').replace(///g, '/').replace(/\/g, '\\').replace(/`/g, '`'); +} + +function blacklist$1(str, chars) { + assertString(str); + return str.replace(new RegExp("[".concat(chars, "]+"), 'g'), ''); +} + +function stripLow(str, keep_new_lines) { + assertString(str); + var chars = keep_new_lines ? '\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F' : '\\x00-\\x1F\\x7F'; + return blacklist$1(str, chars); +} + +function whitelist(str, chars) { + assertString(str); + return str.replace(new RegExp("[^".concat(chars, "]+"), 'g'), ''); +} + +function isWhitelisted(str, chars) { + assertString(str); + + for (var i = str.length - 1; i >= 0; i--) { + if (chars.indexOf(str[i]) === -1) { + return false; + } + } + + return true; +} + +var default_normalize_email_options = { + // The following options apply to all email addresses + // Lowercases the local part of the email address. + // Please note this may violate RFC 5321 as per http://stackoverflow.com/a/9808332/192024). + // The domain is always lowercased, as per RFC 1035 + all_lowercase: true, + // The following conversions are specific to GMail + // Lowercases the local part of the GMail address (known to be case-insensitive) + gmail_lowercase: true, + // Removes dots from the local part of the email address, as that's ignored by GMail + gmail_remove_dots: true, + // Removes the subaddress (e.g. "+foo") from the email address + gmail_remove_subaddress: true, + // Conversts the googlemail.com domain to gmail.com + gmail_convert_googlemaildotcom: true, + // The following conversions are specific to Outlook.com / Windows Live / Hotmail + // Lowercases the local part of the Outlook.com address (known to be case-insensitive) + outlookdotcom_lowercase: true, + // Removes the subaddress (e.g. "+foo") from the email address + outlookdotcom_remove_subaddress: true, + // The following conversions are specific to Yahoo + // Lowercases the local part of the Yahoo address (known to be case-insensitive) + yahoo_lowercase: true, + // Removes the subaddress (e.g. "-foo") from the email address + yahoo_remove_subaddress: true, + // The following conversions are specific to Yandex + // Lowercases the local part of the Yandex address (known to be case-insensitive) + yandex_lowercase: true, + // The following conversions are specific to iCloud + // Lowercases the local part of the iCloud address (known to be case-insensitive) + icloud_lowercase: true, + // Removes the subaddress (e.g. "+foo") from the email address + icloud_remove_subaddress: true +}; // List of domains used by iCloud + +var icloud_domains = ['icloud.com', 'me.com']; // List of domains used by Outlook.com and its predecessors +// This list is likely incomplete. +// Partial reference: +// https://blogs.office.com/2013/04/17/outlook-com-gets-two-step-verification-sign-in-by-alias-and-new-international-domains/ + +var outlookdotcom_domains = ['hotmail.at', 'hotmail.be', 'hotmail.ca', 'hotmail.cl', 'hotmail.co.il', 'hotmail.co.nz', 'hotmail.co.th', 'hotmail.co.uk', 'hotmail.com', 'hotmail.com.ar', 'hotmail.com.au', 'hotmail.com.br', 'hotmail.com.gr', 'hotmail.com.mx', 'hotmail.com.pe', 'hotmail.com.tr', 'hotmail.com.vn', 'hotmail.cz', 'hotmail.de', 'hotmail.dk', 'hotmail.es', 'hotmail.fr', 'hotmail.hu', 'hotmail.id', 'hotmail.ie', 'hotmail.in', 'hotmail.it', 'hotmail.jp', 'hotmail.kr', 'hotmail.lv', 'hotmail.my', 'hotmail.ph', 'hotmail.pt', 'hotmail.sa', 'hotmail.sg', 'hotmail.sk', 'live.be', 'live.co.uk', 'live.com', 'live.com.ar', 'live.com.mx', 'live.de', 'live.es', 'live.eu', 'live.fr', 'live.it', 'live.nl', 'msn.com', 'outlook.at', 'outlook.be', 'outlook.cl', 'outlook.co.il', 'outlook.co.nz', 'outlook.co.th', 'outlook.com', 'outlook.com.ar', 'outlook.com.au', 'outlook.com.br', 'outlook.com.gr', 'outlook.com.pe', 'outlook.com.tr', 'outlook.com.vn', 'outlook.cz', 'outlook.de', 'outlook.dk', 'outlook.es', 'outlook.fr', 'outlook.hu', 'outlook.id', 'outlook.ie', 'outlook.in', 'outlook.it', 'outlook.jp', 'outlook.kr', 'outlook.lv', 'outlook.my', 'outlook.ph', 'outlook.pt', 'outlook.sa', 'outlook.sg', 'outlook.sk', 'passport.com']; // List of domains used by Yahoo Mail +// This list is likely incomplete + +var yahoo_domains = ['rocketmail.com', 'yahoo.ca', 'yahoo.co.uk', 'yahoo.com', 'yahoo.de', 'yahoo.fr', 'yahoo.in', 'yahoo.it', 'ymail.com']; // List of domains used by yandex.ru + +var yandex_domains = ['yandex.ru', 'yandex.ua', 'yandex.kz', 'yandex.com', 'yandex.by', 'ya.ru']; // replace single dots, but not multiple consecutive dots + +function dotsReplacer(match) { + if (match.length > 1) { + return match; + } + + return ''; +} + +function normalizeEmail(email, options) { + options = merge(options, default_normalize_email_options); + var raw_parts = email.split('@'); + var domain = raw_parts.pop(); + var user = raw_parts.join('@'); + var parts = [user, domain]; // The domain is always lowercased, as it's case-insensitive per RFC 1035 + + parts[1] = parts[1].toLowerCase(); + + if (parts[1] === 'gmail.com' || parts[1] === 'googlemail.com') { + // Address is GMail + if (options.gmail_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + + if (options.gmail_remove_dots) { + // this does not replace consecutive dots like example..email@gmail.com + parts[0] = parts[0].replace(/\.+/g, dotsReplacer); + } + + if (!parts[0].length) { + return false; + } + + if (options.all_lowercase || options.gmail_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + + parts[1] = options.gmail_convert_googlemaildotcom ? 'gmail.com' : parts[1]; + } else if (icloud_domains.indexOf(parts[1]) >= 0) { + // Address is iCloud + if (options.icloud_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + + if (!parts[0].length) { + return false; + } + + if (options.all_lowercase || options.icloud_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (outlookdotcom_domains.indexOf(parts[1]) >= 0) { + // Address is Outlook.com + if (options.outlookdotcom_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + + if (!parts[0].length) { + return false; + } + + if (options.all_lowercase || options.outlookdotcom_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (yahoo_domains.indexOf(parts[1]) >= 0) { + // Address is Yahoo + if (options.yahoo_remove_subaddress) { + var components = parts[0].split('-'); + parts[0] = components.length > 1 ? components.slice(0, -1).join('-') : components[0]; + } + + if (!parts[0].length) { + return false; + } + + if (options.all_lowercase || options.yahoo_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (yandex_domains.indexOf(parts[1]) >= 0) { + if (options.all_lowercase || options.yandex_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + + parts[1] = 'yandex.ru'; // all yandex domains are equal, 1st preffered + } else if (options.all_lowercase) { + // Any other address + parts[0] = parts[0].toLowerCase(); + } + + return parts.join('@'); +} + +var version = '10.11.0'; +var validator = { + version: version, + toDate: toDate, + toFloat: toFloat, + toInt: toInt, + toBoolean: toBoolean, + equals: equals, + contains: contains, + matches: matches, + isEmail: isEmail, + isURL: isURL, + isMACAddress: isMACAddress, + isIP: isIP, + isIPRange: isIPRange, + isFQDN: isFQDN, + isBoolean: isBoolean, + isAlpha: isAlpha, + isAlphaLocales: locales, + isAlphanumeric: isAlphanumeric, + isAlphanumericLocales: locales$1, + isNumeric: isNumeric, + isPort: isPort, + isLowercase: isLowercase, + isUppercase: isUppercase, + isAscii: isAscii, + isFullWidth: isFullWidth, + isHalfWidth: isHalfWidth, + isVariableWidth: isVariableWidth, + isMultibyte: isMultibyte, + isSurrogatePair: isSurrogatePair, + isInt: isInt, + isFloat: isFloat, + isFloatLocales: locales$2, + isDecimal: isDecimal, + isHexadecimal: isHexadecimal, + isDivisibleBy: isDivisibleBy, + isHexColor: isHexColor, + isISRC: isISRC, + isMD5: isMD5, + isHash: isHash, + isJWT: isJWT, + isJSON: isJSON, + isEmpty: isEmpty, + isLength: isLength, + isByteLength: isByteLength, + isUUID: isUUID, + isMongoId: isMongoId, + isAfter: isAfter, + isBefore: isBefore, + isIn: isIn, + isCreditCard: isCreditCard, + isIdentityCard: isIdentityCard, + isISIN: isISIN, + isISBN: isISBN, + isISSN: isISSN, + isMobilePhone: isMobilePhone, + isMobilePhoneLocales: locales$3, + isPostalCode: isPostalCode, + isPostalCodeLocales: locales$4, + isCurrency: isCurrency, + isISO8601: isISO8601, + isRFC3339: isRFC3339, + isISO31661Alpha2: isISO31661Alpha2, + isISO31661Alpha3: isISO31661Alpha3, + isBase64: isBase64, + isDataURI: isDataURI, + isMagnetURI: isMagnetURI, + isMimeType: isMimeType, + isLatLong: isLatLong, + ltrim: ltrim, + rtrim: rtrim, + trim: trim, + escape: escape, + unescape: unescape, + stripLow: stripLow, + whitelist: whitelist, + blacklist: blacklist$1, + isWhitelisted: isWhitelisted, + normalizeEmail: normalizeEmail, + toString: toString +}; + +return validator; + +}))); diff --git a/node_modules/validator/validator.min.js b/node_modules/validator/validator.min.js new file mode 100644 index 00000000..8fbfc7f4 --- /dev/null +++ b/node_modules/validator/validator.min.js @@ -0,0 +1,23 @@ +/*! + * Copyright (c) 2018 Chris O'Hara + * + * 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. + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.validator=e()}(this,function(){"use strict";function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t){var e;if(!("string"==typeof t||t instanceof String))throw e=null===t?"null":"object"===(e=a(t))&&t.constructor&&t.constructor.hasOwnProperty("name")?t.constructor.name:"a ".concat(e),new TypeError("Expected string but received ".concat(e,"."))}function n(t){return g(t),t=Date.parse(t),isNaN(t)?null:new Date(t)}function r(t){return g(t),parseFloat(t)}function i(t){return"object"===a(t)&&null!==t?t="function"==typeof t.toString?t.toString():"[object Object]":(null==t||isNaN(t)&&!t.length)&&(t=""),String(t)}function h(){var t=0i)return!1;if("::"===t)return!0;"::"===t.substr(0,2)?(r.shift(),r.shift(),o=!0):"::"===t.substr(t.length-2)&&(r.pop(),r.pop(),o=!0);for(var a=0;a$/i,F=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,S=/^[a-z\d]+$/,R=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,E=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,C=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;var d={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},f=/^\[([^\]]+)\](?::([0-9]+))?$/;function p(t,e){for(var r=0;r=e.min,n=!e.hasOwnProperty("max")||t<=e.max,i=!e.hasOwnProperty("lt")||te.gt;return r.test(t)&&o&&n&&i&&a}var z=/^[\x00-\x7F]+$/;var W=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;var Y=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;var V=/[^\x00-\x7F]/;var j=/[\uD800-\uDBFF][\uDC00-\uDFFF]/;var J=Object.keys(w),q=function(t,e){return t.some(function(t){return e===t})};var Q={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},X=["","-","+"];var tt=/^[0-9A-F]+$/i;function et(t){return g(t),tt.test(t)}var rt=/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i;var ot=/^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;var nt=/^[a-f0-9]{32}$/;var it={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};var at=/^([A-Za-z0-9\-_~+\/]+[=]{0,2})\.([A-Za-z0-9\-_~+\/]+[=]{0,2})(?:\.([A-Za-z0-9\-_~+\/]+[=]{0,2}))?$/;var lt={ignore_whitespace:!1};var st={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};var ut=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|6[27][0-9]{14})$/;var ct={ES:function(t){g(t);var e={X:0,Y:1,Z:2},r=t.trim().toUpperCase();if(!/^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/.test(r))return!1;var o=r.slice(0,-1).replace(/[X,Y,Z]/g,function(t){return e[t]});return r.endsWith(["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"][o%23])}};var dt=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;var ft=/^(?:[0-9]{9}X|[0-9]{10})$/,pt=/^(?:[0-9]{13})$/,gt=[1,3];var ht={"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-EG":/^((\+?20)|0)?1[012]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)[569]\d{7}$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/\+?(88)?0?1[356789][0-9]{8}\b/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^(\+49)?0?1(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7}$/,"el-GR":/^(\+?30|0)?(69\d{8})$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|28)\d{7}$/,"en-HK":/^(\+?852\-?)?[456789]\d{3}\-?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-KE":/^(\+?254|0)?[7]\d{8}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PK":/^((\+92)|(0092))-{0,1}\d{3}-{0,1}\d{7}$|^\d{11}$|^\d{4}-\d{7}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[89]\d{7}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"es-ES":/^(\+?34)?(6\d{1}|7[1234])\d{7}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4(0|1|2|4|5|6)?|50)\s?(\d\s?){4,8}\d$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36)(20|30|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"ja-JP":/^(\+?81|0)[789]0[ \-]?[1-9]\d{2}[ \-]?\d{5}$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"lt-LT":/^(\+370|8)\d{8}$/,"ms-MY":/^(\+?6?01){1}(([0145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"nl-BE":/^(\+?32|0)4?\d{8}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/(?=^(\+?5{2}\-?|0)[1-9]{2}\-?\d{4}\-?\d{4}$)(^(\+?5{2}\-?|0)[1-9]{2}\-?[6-9]{1}\d{3}\-?\d{4}$)|(^(\+?5{2}\-?|0)[1-9]{2}\-?9[6-9]{1}\d{3}\-?\d{4}$)/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"ro-RO":/^(\+?4?0)\s?7\d{2}(\/|\s|\.|\-)?\d{3}(\s|\.|\-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"uk-UA":/^(\+?38|8)?0\d{9}$/,"vi-VN":/^(\+?84|0)((3([2-9]))|(5([689]))|(7([0|6-9]))|(8([1-5]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/};ht["en-CA"]=ht["en-US"],ht["fr-BE"]=ht["nl-BE"],ht["zh-HK"]=ht["en-HK"];var At=Object.keys(ht);var mt={symbol:"$",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:",",decimal_separator:".",allow_decimal:!0,require_decimal:!1,digits_after_decimal:[2],allow_space_after_digits:!1};var $t=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;var vt=/([01][0-9]|2[0-3])/,_t=/[0-5][0-9]/,Ft=new RegExp("[-+]".concat(vt.source,":").concat(_t.source)),St=new RegExp("([zZ]|".concat(Ft.source,")")),Rt=new RegExp("".concat(vt.source,":").concat(_t.source,":").concat(/([0-5][0-9]|60)/.source).concat(/(\.[0-9]+)?/.source)),Et=new RegExp("".concat(/[0-9]{4}/.source,"-").concat(/(0[1-9]|1[0-2])/.source,"-").concat(/([12]\d|0[1-9]|3[01])/.source)),Ct=new RegExp("".concat(Rt.source).concat(St.source)),xt=new RegExp("".concat(Et.source,"[ tT]").concat(Ct.source));var Mt=["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"];var Nt=["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","VAT","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWZ","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","URY","UZB","VUT","VEN","VNM","VGB","VIR","WLF","ESH","YEM","ZMB","ZWE"];var wt=/[^A-Z0-9+\/=]/i;var Lt=/^[a-z]+\/[a-z0-9\-\+]+$/i,It=/^[a-z\-]+=[a-z0-9\-]+$/i,Tt=/^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i;var Zt=/^magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32,40}&dn=.+&tr=.+$/i;var Bt=/^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+]{1,100}$/i,yt=/^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i,bt=/^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i;var Dt=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,Ut=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,Ot=/^\d{4}$/,Gt=/^\d{5}$/,Pt=/^\d{6}$/,kt={AD:/^AD\d{3}$/,AT:Ot,AU:Ot,BE:Ot,BG:Ot,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:Ot,CZ:/^\d{3}\s?\d{2}$/,DE:Gt,DK:Ot,DZ:Gt,EE:Gt,ES:Gt,FI:Gt,FR:/^\d{2}\s?\d{3}$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HU:Ot,IL:Gt,IN:Pt,IS:/^\d{3}$/,IT:Gt,JP:/^\d{3}\-\d{4}$/,KE:Gt,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:Ot,LV:/^LV\-\d{4}$/,MX:Gt,NL:/^\d{4}\s?[a-z]{2}$/i,NO:Ot,PL:/^\d{2}\-\d{3}$/,PT:/^\d{4}\-\d{3}?$/,RO:Pt,RU:Pt,SA:Gt,SE:/^\d{3}\s?\d{2}$/,SI:Ot,SK:/^\d{3}\s?\d{2}$/,TN:Ot,TW:/^\d{3}(\d{2})?$/,UA:Gt,US:/^\d{5}(-\d{4})?$/,ZA:Ot,ZM:Gt},Kt=Object.keys(kt);function Ht(t,e){g(t);var r=e?new RegExp("^[".concat(e,"]+"),"g"):/^\s+/g;return t.replace(r,"")}function zt(t,e){g(t);for(var r=e?new RegExp("[".concat(e,"]")):/\s/,o=t.length-1;0<=o&&r.test(t[o]);o--);return o]/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;var r,o,n,i,a,l,s,u;if(e=h(e,d),1<(s=(t=(s=(t=(s=t.split("#")).shift()).split("?")).shift()).split("://")).length){if(r=s.shift().toLowerCase(),e.require_valid_protocol&&-1===e.protocols.indexOf(r))return!1}else{if(e.require_protocol)return!1;if("//"===t.substr(0,2)){if(!e.allow_protocol_relative_urls)return!1;s[0]=t.substr(2)}}if(""===(t=s.join("://")))return!1;if(""===(t=(s=t.split("/")).shift())&&!e.require_host)return!0;if(1<(s=t.split("@")).length){if(e.disallow_auth)return!1;if(0<=(o=s.shift()).indexOf(":")&&2=e.min)&&(!e.hasOwnProperty("max")||o<=e.max)&&(!e.hasOwnProperty("lt")||oe.gt)},isFloatLocales:J,isDecimal:function(t,e){if(g(t),(e=h(e,Q)).locale in w)return!q(X,t.replace(/ /g,""))&&(r=e,new RegExp("^[-+]?([0-9]+)?(\\".concat(w[r.locale],"[0-9]{").concat(r.decimal_digits,"})").concat(r.force_decimal?"":"?","$"))).test(t);var r;throw new Error("Invalid locale '".concat(e.locale,"'"))},isHexadecimal:et,isDivisibleBy:function(t,e){return g(t),r(t)%parseInt(e,10)==0},isHexColor:function(t){return g(t),rt.test(t)},isISRC:function(t){return g(t),ot.test(t)},isMD5:function(t){return g(t),nt.test(t)},isHash:function(t,e){return g(t),new RegExp("^[a-f0-9]{".concat(it[e],"}$")).test(t)},isJWT:function(t){return g(t),at.test(t)},isJSON:function(t){g(t);try{var e=JSON.parse(t);return!!e&&"object"===a(e)}catch(t){}return!1},isEmpty:function(t,e){return g(t),0===((e=h(e,lt)).ignore_whitespace?t.trim().length:t.length)},isLength:function(t,e){var r,o;g(t),o="object"===a(e)?(r=e.min||0,e.max):(r=e,arguments[2]);var n=t.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],i=t.length-n.length;return r<=i&&(void 0===o||i<=o)},isByteLength:A,isUUID:function(t){var e=1/g,">").replace(/\//g,"/").replace(/\\/g,"\").replace(/`/g,"`")},unescape:function(t){return g(t),t.replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(///g,"/").replace(/\/g,"\\").replace(/`/g,"`")},stripLow:function(t,e){return g(t),Wt(t,e?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F")},whitelist:function(t,e){return g(t),t.replace(new RegExp("[^".concat(e,"]+"),"g"),"")},blacklist:Wt,isWhitelisted:function(t,e){g(t);for(var r=t.length-1;0<=r;r--)if(-1===e.indexOf(t[r]))return!1;return!0},normalizeEmail:function(t,e){e=h(e,Yt);var r=t.split("@"),o=r.pop(),n=[r.join("@"),o];if(n[1]=n[1].toLowerCase(),"gmail.com"===n[1]||"googlemail.com"===n[1]){if(e.gmail_remove_subaddress&&(n[0]=n[0].split("+")[0]),e.gmail_remove_dots&&(n[0]=n[0].replace(/\.+/g,Qt)),!n[0].length)return!1;(e.all_lowercase||e.gmail_lowercase)&&(n[0]=n[0].toLowerCase()),n[1]=e.gmail_convert_googlemaildotcom?"gmail.com":n[1]}else if(0<=Vt.indexOf(n[1])){if(e.icloud_remove_subaddress&&(n[0]=n[0].split("+")[0]),!n[0].length)return!1;(e.all_lowercase||e.icloud_lowercase)&&(n[0]=n[0].toLowerCase())}else if(0<=jt.indexOf(n[1])){if(e.outlookdotcom_remove_subaddress&&(n[0]=n[0].split("+")[0]),!n[0].length)return!1;(e.all_lowercase||e.outlookdotcom_lowercase)&&(n[0]=n[0].toLowerCase())}else if(0<=Jt.indexOf(n[1])){if(e.yahoo_remove_subaddress){var i=n[0].split("-");n[0]=1 +# [2.0.0](https://github.com/nexdrew/which-module/compare/v1.0.0...v2.0.0) (2017-05-01) + + +### Features + +* remove Node < 4 from official testing/support ([#22](https://github.com/nexdrew/which-module/issues/22)) ([ee7aff4](https://github.com/nexdrew/which-module/commit/ee7aff4)) + + +### BREAKING CHANGES + +* Node 0.10 or 0.12 no longer supported, please update to Node 4+ or use which-module@1.0.0 + + + + +# 1.0.0 (2016-06-06) + + +### Features + +* initial code ([08074cd](https://github.com/nexdrew/which-module/commit/08074cd)) diff --git a/node_modules/which-module/LICENSE b/node_modules/which-module/LICENSE new file mode 100644 index 00000000..ab601b65 --- /dev/null +++ b/node_modules/which-module/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/node_modules/which-module/README.md b/node_modules/which-module/README.md new file mode 100644 index 00000000..a8c4bf8d --- /dev/null +++ b/node_modules/which-module/README.md @@ -0,0 +1,55 @@ +# which-module + +> Find the module object for something that was require()d + +[![Build Status](https://travis-ci.org/nexdrew/which-module.svg?branch=master)](https://travis-ci.org/nexdrew/which-module) +[![Coverage Status](https://coveralls.io/repos/github/nexdrew/which-module/badge.svg?branch=master)](https://coveralls.io/github/nexdrew/which-module?branch=master) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +Find the `module` object in `require.cache` for something that was `require()`d +or `import`ed - essentially a reverse `require()` lookup. + +Useful for libs that want to e.g. lookup a filename for a module or submodule +that it did not `require()` itself. + +## Install and Usage + +``` +npm install --save which-module +``` + +```js +const whichModule = require('which-module') + +console.log(whichModule(require('something'))) +// Module { +// id: '/path/to/project/node_modules/something/index.js', +// exports: [Function], +// parent: ..., +// filename: '/path/to/project/node_modules/something/index.js', +// loaded: true, +// children: [], +// paths: [ '/path/to/project/node_modules/something/node_modules', +// '/path/to/project/node_modules', +// '/path/to/node_modules', +// '/path/node_modules', +// '/node_modules' ] } +``` + +## API + +### `whichModule(exported)` + +Return the [`module` object](https://nodejs.org/api/modules.html#modules_the_module_object), +if any, that represents the given argument in the `require.cache`. + +`exported` can be anything that was previously `require()`d or `import`ed as a +module, submodule, or dependency - which means `exported` is identical to the +`module.exports` returned by this method. + +If `exported` did not come from the `exports` of a `module` in `require.cache`, +then this method returns `null`. + +## License + +ISC © Contributors diff --git a/node_modules/which-module/index.js b/node_modules/which-module/index.js new file mode 100644 index 00000000..45559b78 --- /dev/null +++ b/node_modules/which-module/index.js @@ -0,0 +1,9 @@ +'use strict' + +module.exports = function whichModule (exported) { + for (var i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) { + mod = require.cache[files[i]] + if (mod.exports === exported) return mod + } + return null +} diff --git a/node_modules/which-module/package.json b/node_modules/which-module/package.json new file mode 100644 index 00000000..3566aff0 --- /dev/null +++ b/node_modules/which-module/package.json @@ -0,0 +1,41 @@ +{ + "name": "which-module", + "version": "2.0.0", + "description": "Find the module object for something that was require()d", + "main": "index.js", + "scripts": { + "pretest": "standard", + "test": "nyc ava", + "coverage": "nyc report --reporter=text-lcov | coveralls", + "release": "standard-version" + }, + "files": [ + "index.js" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/nexdrew/which-module.git" + }, + "keywords": [ + "which", + "module", + "exports", + "filename", + "require", + "reverse", + "lookup" + ], + "author": "nexdrew", + "license": "ISC", + "bugs": { + "url": "https://github.com/nexdrew/which-module/issues" + }, + "homepage": "https://github.com/nexdrew/which-module#readme", + "devDependencies": { + "ava": "^0.19.1", + "coveralls": "^2.13.1", + "nyc": "^10.3.0", + "standard": "^10.0.2", + "standard-version": "^4.0.0" + } +} diff --git a/node_modules/wkx/LICENSE.txt b/node_modules/wkx/LICENSE.txt new file mode 100644 index 00000000..26594465 --- /dev/null +++ b/node_modules/wkx/LICENSE.txt @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Christian Schwarz + +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/wkx/README.md b/node_modules/wkx/README.md new file mode 100644 index 00000000..1d3a3530 --- /dev/null +++ b/node_modules/wkx/README.md @@ -0,0 +1,92 @@ +wkx [![Build Status](https://travis-ci.org/cschwarz/wkx.svg?branch=master)](https://travis-ci.org/cschwarz/wkx) [![Coverage Status](https://coveralls.io/repos/cschwarz/wkx/badge.svg?branch=master)](https://coveralls.io/r/cschwarz/wkx?branch=master) +======== + +A WKT/WKB/EWKT/EWKB/TWKB/GeoJSON parser and serializer with support for + +- Point +- LineString +- Polygon +- MultiPoint +- MultiLineString +- MultiPolygon +- GeometryCollection + +Examples +-------- + +The following examples show you how to work with wkx. + +```javascript +var wkx = require('wkx'); + +//Parsing a WKT string +var geometry = wkx.Geometry.parse('POINT(1 2)'); + +//Parsing an EWKT string +var geometry = wkx.Geometry.parse('SRID=4326;POINT(1 2)'); + +//Parsing a node Buffer containing a WKB object +var geometry = wkx.Geometry.parse(wkbBuffer); + +//Parsing a node Buffer containing an EWKB object +var geometry = wkx.Geometry.parse(ewkbBuffer); + +//Parsing a node Buffer containing a TWKB object +var geometry = wkx.Geometry.parseTwkb(twkbBuffer); + +//Parsing a GeoJSON object +var geometry = wkx.Geometry.parseGeoJSON({ type: 'Point', coordinates: [1, 2] }); + +//Serializing a Point geometry to WKT +var wktString = new wkx.Point(1, 2).toWkt(); + +//Serializing a Point geometry to WKB +var wkbBuffer = new wkx.Point(1, 2).toWkb(); + +//Serializing a Point geometry to EWKT +var ewktString = new wkx.Point(1, 2, undefined, undefined, 4326).toEwkt(); + +//Serializing a Point geometry to EWKB +var ewkbBuffer = new wkx.Point(1, 2, undefined, undefined, 4326).toEwkb(); + +//Serializing a Point geometry to TWKB +var twkbBuffer = new wkx.Point(1, 2).toTwkb(); + +//Serializing a Point geometry to GeoJSON +var geoJSONObject = new wkx.Point(1, 2).toGeoJSON(); +``` + +Browser +------- + +To use `wkx` in a webpage, simply copy a built browser version from `dist/` into your project, and use a `script` tag +to include it: +```html + +``` + +If you use [browserify][] for your project, you can simply `npm install wkx --save`, and just require `wkx` as usual in +your code. + +---- + +Regardless of which of the preceeding options you choose, using `wkx` in the browser will look the same: +```javascript +var wkx = require('wkx'); + +var geometry = wkx.Geometry.parse('POINT(1 2)'); + +console.log(geometry.toGeoJSON()); +``` + +In addition to the `wkx` module, the browser versions also export `buffer`, which is useful for parsing WKB: +```javascript +var Buffer = require('buffer').Buffer; +var wkx = require('wkx'); + +var wkbBuffer = new Buffer('0101000000000000000000f03f0000000000000040', 'hex'); +var geometry = wkx.Geometry.parse(wkbBuffer); + +console.log(geometry.toGeoJSON()); +``` +[browserify]: http://browserify.org/ diff --git a/node_modules/wkx/dist/wkx.js b/node_modules/wkx/dist/wkx.js new file mode 100644 index 00000000..76acc6a7 --- /dev/null +++ b/node_modules/wkx/dist/wkx.js @@ -0,0 +1,4988 @@ +require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i= 0x80); + + this.position += bytesRead; + + return result; +}; + +}).call(this,require("buffer").Buffer) +},{"buffer":"buffer"}],2:[function(require,module,exports){ +(function (Buffer){ +module.exports = BinaryWriter; + +function BinaryWriter(size, allowResize) { + this.buffer = new Buffer(size); + this.position = 0; + this.allowResize = allowResize; +} + +function _write(write, size) { + return function (value, noAssert) { + this.ensureSize(size); + + write.call(this.buffer, value, this.position, noAssert); + this.position += size; + }; +} + +BinaryWriter.prototype.writeUInt8 = _write(Buffer.prototype.writeUInt8, 1); +BinaryWriter.prototype.writeUInt16LE = _write(Buffer.prototype.writeUInt16LE, 2); +BinaryWriter.prototype.writeUInt16BE = _write(Buffer.prototype.writeUInt16BE, 2); +BinaryWriter.prototype.writeUInt32LE = _write(Buffer.prototype.writeUInt32LE, 4); +BinaryWriter.prototype.writeUInt32BE = _write(Buffer.prototype.writeUInt32BE, 4); +BinaryWriter.prototype.writeInt8 = _write(Buffer.prototype.writeInt8, 1); +BinaryWriter.prototype.writeInt16LE = _write(Buffer.prototype.writeInt16LE, 2); +BinaryWriter.prototype.writeInt16BE = _write(Buffer.prototype.writeInt16BE, 2); +BinaryWriter.prototype.writeInt32LE = _write(Buffer.prototype.writeInt32LE, 4); +BinaryWriter.prototype.writeInt32BE = _write(Buffer.prototype.writeInt32BE, 4); +BinaryWriter.prototype.writeFloatLE = _write(Buffer.prototype.writeFloatLE, 4); +BinaryWriter.prototype.writeFloatBE = _write(Buffer.prototype.writeFloatBE, 4); +BinaryWriter.prototype.writeDoubleLE = _write(Buffer.prototype.writeDoubleLE, 8); +BinaryWriter.prototype.writeDoubleBE = _write(Buffer.prototype.writeDoubleBE, 8); + +BinaryWriter.prototype.writeBuffer = function (buffer) { + this.ensureSize(buffer.length); + + buffer.copy(this.buffer, this.position, 0, buffer.length); + this.position += buffer.length; +}; + +BinaryWriter.prototype.writeVarInt = function (value) { + var length = 1; + + while ((value & 0xFFFFFF80) !== 0) { + this.writeUInt8((value & 0x7F) | 0x80); + value >>>= 7; + length++; + } + + this.writeUInt8(value & 0x7F); + + return length; +}; + +BinaryWriter.prototype.ensureSize = function (size) { + if (this.buffer.length < this.position + size) { + if (this.allowResize) { + var tempBuffer = new Buffer(this.position + size); + this.buffer.copy(tempBuffer, 0, 0, this.buffer.length); + this.buffer = tempBuffer; + } + else { + throw new RangeError('index out of range'); + } + } +}; + +}).call(this,require("buffer").Buffer) +},{"buffer":"buffer"}],3:[function(require,module,exports){ +(function (Buffer){ +module.exports = Geometry; + +var Types = require('./types'); +var Point = require('./point'); +var LineString = require('./linestring'); +var Polygon = require('./polygon'); +var MultiPoint = require('./multipoint'); +var MultiLineString = require('./multilinestring'); +var MultiPolygon = require('./multipolygon'); +var GeometryCollection = require('./geometrycollection'); +var BinaryReader = require('./binaryreader'); +var BinaryWriter = require('./binarywriter'); +var WktParser = require('./wktparser'); +var ZigZag = require('./zigzag.js'); + +function Geometry() { + this.srid = undefined; + this.hasZ = false; + this.hasM = false; +} + +Geometry.parse = function (value, options) { + var valueType = typeof value; + + if (valueType === 'string' || value instanceof WktParser) + return Geometry._parseWkt(value); + else if (Buffer.isBuffer(value) || value instanceof BinaryReader) + return Geometry._parseWkb(value, options); + else + throw new Error('first argument must be a string or Buffer'); +}; + +Geometry._parseWkt = function (value) { + var wktParser, + srid; + + if (value instanceof WktParser) + wktParser = value; + else + wktParser = new WktParser(value); + + var match = wktParser.matchRegex([/^SRID=(\d+);/]); + if (match) + srid = parseInt(match[1], 10); + + var geometryType = wktParser.matchType(); + var dimension = wktParser.matchDimension(); + + var options = { + srid: srid, + hasZ: dimension.hasZ, + hasM: dimension.hasM + }; + + switch (geometryType) { + case Types.wkt.Point: + return Point._parseWkt(wktParser, options); + case Types.wkt.LineString: + return LineString._parseWkt(wktParser, options); + case Types.wkt.Polygon: + return Polygon._parseWkt(wktParser, options); + case Types.wkt.MultiPoint: + return MultiPoint._parseWkt(wktParser, options); + case Types.wkt.MultiLineString: + return MultiLineString._parseWkt(wktParser, options); + case Types.wkt.MultiPolygon: + return MultiPolygon._parseWkt(wktParser, options); + case Types.wkt.GeometryCollection: + return GeometryCollection._parseWkt(wktParser, options); + } +}; + +Geometry._parseWkb = function (value, parentOptions) { + var binaryReader, + wkbType, + geometryType, + options = {}; + + if (value instanceof BinaryReader) + binaryReader = value; + else + binaryReader = new BinaryReader(value); + + binaryReader.isBigEndian = !binaryReader.readInt8(); + + wkbType = binaryReader.readUInt32(); + + options.hasSrid = (wkbType & 0x20000000) === 0x20000000; + options.isEwkb = (wkbType & 0x20000000) || (wkbType & 0x40000000) || (wkbType & 0x80000000); + + if (options.hasSrid) + options.srid = binaryReader.readUInt32(); + + options.hasZ = false; + options.hasM = false; + + if (!options.isEwkb && (!parentOptions || !parentOptions.isEwkb)) { + if (wkbType >= 1000 && wkbType < 2000) { + options.hasZ = true; + geometryType = wkbType - 1000; + } + else if (wkbType >= 2000 && wkbType < 3000) { + options.hasM = true; + geometryType = wkbType - 2000; + } + else if (wkbType >= 3000 && wkbType < 4000) { + options.hasZ = true; + options.hasM = true; + geometryType = wkbType - 3000; + } + else { + geometryType = wkbType; + } + } + else { + if (wkbType & 0x80000000) + options.hasZ = true; + if (wkbType & 0x40000000) + options.hasM = true; + + geometryType = wkbType & 0xF; + } + + switch (geometryType) { + case Types.wkb.Point: + return Point._parseWkb(binaryReader, options); + case Types.wkb.LineString: + return LineString._parseWkb(binaryReader, options); + case Types.wkb.Polygon: + return Polygon._parseWkb(binaryReader, options); + case Types.wkb.MultiPoint: + return MultiPoint._parseWkb(binaryReader, options); + case Types.wkb.MultiLineString: + return MultiLineString._parseWkb(binaryReader, options); + case Types.wkb.MultiPolygon: + return MultiPolygon._parseWkb(binaryReader, options); + case Types.wkb.GeometryCollection: + return GeometryCollection._parseWkb(binaryReader, options); + default: + throw new Error('GeometryType ' + geometryType + ' not supported'); + } +}; + +Geometry.parseTwkb = function (value) { + var binaryReader, + options = {}; + + if (value instanceof BinaryReader) + binaryReader = value; + else + binaryReader = new BinaryReader(value); + + var type = binaryReader.readUInt8(); + var metadataHeader = binaryReader.readUInt8(); + + var geometryType = type & 0x0F; + options.precision = ZigZag.decode(type >> 4); + options.precisionFactor = Math.pow(10, options.precision); + + options.hasBoundingBox = metadataHeader >> 0 & 1; + options.hasSizeAttribute = metadataHeader >> 1 & 1; + options.hasIdList = metadataHeader >> 2 & 1; + options.hasExtendedPrecision = metadataHeader >> 3 & 1; + options.isEmpty = metadataHeader >> 4 & 1; + + if (options.hasExtendedPrecision) { + var extendedPrecision = binaryReader.readUInt8(); + options.hasZ = (extendedPrecision & 0x01) === 0x01; + options.hasM = (extendedPrecision & 0x02) === 0x02; + + options.zPrecision = ZigZag.decode((extendedPrecision & 0x1C) >> 2); + options.zPrecisionFactor = Math.pow(10, options.zPrecision); + + options.mPrecision = ZigZag.decode((extendedPrecision & 0xE0) >> 5); + options.mPrecisionFactor = Math.pow(10, options.mPrecision); + } + else { + options.hasZ = false; + options.hasM = false; + } + + if (options.hasSizeAttribute) + binaryReader.readVarInt(); + if (options.hasBoundingBox) { + var dimensions = 2; + + if (options.hasZ) + dimensions++; + if (options.hasM) + dimensions++; + + for (var i = 0; i < dimensions; i++) { + binaryReader.readVarInt(); + binaryReader.readVarInt(); + } + } + + switch (geometryType) { + case Types.wkb.Point: + return Point._parseTwkb(binaryReader, options); + case Types.wkb.LineString: + return LineString._parseTwkb(binaryReader, options); + case Types.wkb.Polygon: + return Polygon._parseTwkb(binaryReader, options); + case Types.wkb.MultiPoint: + return MultiPoint._parseTwkb(binaryReader, options); + case Types.wkb.MultiLineString: + return MultiLineString._parseTwkb(binaryReader, options); + case Types.wkb.MultiPolygon: + return MultiPolygon._parseTwkb(binaryReader, options); + case Types.wkb.GeometryCollection: + return GeometryCollection._parseTwkb(binaryReader, options); + default: + throw new Error('GeometryType ' + geometryType + ' not supported'); + } +}; + +Geometry.parseGeoJSON = function (value) { + return Geometry._parseGeoJSON(value); +}; + +Geometry._parseGeoJSON = function (value, isSubGeometry) { + var geometry; + + switch (value.type) { + case Types.geoJSON.Point: + geometry = Point._parseGeoJSON(value); break; + case Types.geoJSON.LineString: + geometry = LineString._parseGeoJSON(value); break; + case Types.geoJSON.Polygon: + geometry = Polygon._parseGeoJSON(value); break; + case Types.geoJSON.MultiPoint: + geometry = MultiPoint._parseGeoJSON(value); break; + case Types.geoJSON.MultiLineString: + geometry = MultiLineString._parseGeoJSON(value); break; + case Types.geoJSON.MultiPolygon: + geometry = MultiPolygon._parseGeoJSON(value); break; + case Types.geoJSON.GeometryCollection: + geometry = GeometryCollection._parseGeoJSON(value); break; + default: + throw new Error('GeometryType ' + value.type + ' not supported'); + } + + if (value.crs && value.crs.type && value.crs.type === 'name' && value.crs.properties && value.crs.properties.name) { + var crs = value.crs.properties.name; + + if (crs.indexOf('EPSG:') === 0) + geometry.srid = parseInt(crs.substring(5)); + else if (crs.indexOf('urn:ogc:def:crs:EPSG::') === 0) + geometry.srid = parseInt(crs.substring(22)); + else + throw new Error('Unsupported crs: ' + crs); + } + else if (!isSubGeometry) { + geometry.srid = 4326; + } + + return geometry; +}; + +Geometry.prototype.toEwkt = function () { + return 'SRID=' + this.srid + ';' + this.toWkt(); +}; + +Geometry.prototype.toEwkb = function () { + var ewkb = new BinaryWriter(this._getWkbSize() + 4); + var wkb = this.toWkb(); + + ewkb.writeInt8(1); + ewkb.writeUInt32LE((wkb.slice(1, 5).readUInt32LE(0) | 0x20000000) >>> 0, true); + ewkb.writeUInt32LE(this.srid); + + ewkb.writeBuffer(wkb.slice(5)); + + return ewkb.buffer; +}; + +Geometry.prototype._getWktType = function (wktType, isEmpty) { + var wkt = wktType; + + if (this.hasZ && this.hasM) + wkt += ' ZM '; + else if (this.hasZ) + wkt += ' Z '; + else if (this.hasM) + wkt += ' M '; + + if (isEmpty && !this.hasZ && !this.hasM) + wkt += ' '; + + if (isEmpty) + wkt += 'EMPTY'; + + return wkt; +}; + +Geometry.prototype._getWktCoordinate = function (point) { + var coordinates = point.x + ' ' + point.y; + + if (this.hasZ) + coordinates += ' ' + point.z; + if (this.hasM) + coordinates += ' ' + point.m; + + return coordinates; +}; + +Geometry.prototype._writeWkbType = function (wkb, geometryType, parentOptions) { + var dimensionType = 0; + + if (typeof this.srid === 'undefined' && (!parentOptions || typeof parentOptions.srid === 'undefined')) { + if (this.hasZ && this.hasM) + dimensionType += 3000; + else if (this.hasZ) + dimensionType += 1000; + else if (this.hasM) + dimensionType += 2000; + } + else { + if (this.hasZ) + dimensionType |= 0x80000000; + if (this.hasM) + dimensionType |= 0x40000000; + } + + wkb.writeUInt32LE((dimensionType + geometryType) >>> 0, true); +}; + +Geometry.getTwkbPrecision = function (xyPrecision, zPrecision, mPrecision) { + return { + xy: xyPrecision, + z: zPrecision, + m: mPrecision, + xyFactor: Math.pow(10, xyPrecision), + zFactor: Math.pow(10, zPrecision), + mFactor: Math.pow(10, mPrecision) + }; +}; + +Geometry.prototype._writeTwkbHeader = function (twkb, geometryType, precision, isEmpty) { + var type = (ZigZag.encode(precision.xy) << 4) + geometryType; + var metadataHeader = (this.hasZ || this.hasM) << 3; + metadataHeader += isEmpty << 4; + + twkb.writeUInt8(type); + twkb.writeUInt8(metadataHeader); + + if (this.hasZ || this.hasM) { + var extendedPrecision = 0; + if (this.hasZ) + extendedPrecision |= 0x1; + if (this.hasM) + extendedPrecision |= 0x2; + + twkb.writeUInt8(extendedPrecision); + } +}; + +Geometry.prototype.toGeoJSON = function (options) { + var geoJSON = {}; + + if (this.srid) { + if (options) { + if (options.shortCrs) { + geoJSON.crs = { + type: 'name', + properties: { + name: 'EPSG:' + this.srid + } + }; + } + else if (options.longCrs) { + geoJSON.crs = { + type: 'name', + properties: { + name: 'urn:ogc:def:crs:EPSG::' + this.srid + } + }; + } + } + } + + return geoJSON; +}; + +}).call(this,{"isBuffer":require("../node_modules/is-buffer/index.js")}) +},{"../node_modules/is-buffer/index.js":17,"./binaryreader":1,"./binarywriter":2,"./geometrycollection":4,"./linestring":5,"./multilinestring":6,"./multipoint":7,"./multipolygon":8,"./point":9,"./polygon":10,"./types":11,"./wktparser":12,"./zigzag.js":13}],4:[function(require,module,exports){ +module.exports = GeometryCollection; + +var util = require('util'); + +var Types = require('./types'); +var Geometry = require('./geometry'); +var BinaryWriter = require('./binarywriter'); + +function GeometryCollection(geometries, srid) { + Geometry.call(this); + + this.geometries = geometries || []; + this.srid = srid; + + if (this.geometries.length > 0) { + this.hasZ = this.geometries[0].hasZ; + this.hasM = this.geometries[0].hasM; + } +} + +util.inherits(GeometryCollection, Geometry); + +GeometryCollection.Z = function (geometries, srid) { + var geometryCollection = new GeometryCollection(geometries, srid); + geometryCollection.hasZ = true; + return geometryCollection; +}; + +GeometryCollection.M = function (geometries, srid) { + var geometryCollection = new GeometryCollection(geometries, srid); + geometryCollection.hasM = true; + return geometryCollection; +}; + +GeometryCollection.ZM = function (geometries, srid) { + var geometryCollection = new GeometryCollection(geometries, srid); + geometryCollection.hasZ = true; + geometryCollection.hasM = true; + return geometryCollection; +}; + +GeometryCollection._parseWkt = function (value, options) { + var geometryCollection = new GeometryCollection(); + geometryCollection.srid = options.srid; + geometryCollection.hasZ = options.hasZ; + geometryCollection.hasM = options.hasM; + + if (value.isMatch(['EMPTY'])) + return geometryCollection; + + value.expectGroupStart(); + + do { + geometryCollection.geometries.push(Geometry.parse(value)); + } while (value.isMatch([','])); + + value.expectGroupEnd(); + + return geometryCollection; +}; + +GeometryCollection._parseWkb = function (value, options) { + var geometryCollection = new GeometryCollection(); + geometryCollection.srid = options.srid; + geometryCollection.hasZ = options.hasZ; + geometryCollection.hasM = options.hasM; + + var geometryCount = value.readUInt32(); + + for (var i = 0; i < geometryCount; i++) + geometryCollection.geometries.push(Geometry.parse(value, options)); + + return geometryCollection; +}; + +GeometryCollection._parseTwkb = function (value, options) { + var geometryCollection = new GeometryCollection(); + geometryCollection.hasZ = options.hasZ; + geometryCollection.hasM = options.hasM; + + if (options.isEmpty) + return geometryCollection; + + var geometryCount = value.readVarInt(); + + for (var i = 0; i < geometryCount; i++) + geometryCollection.geometries.push(Geometry.parseTwkb(value)); + + return geometryCollection; +}; + +GeometryCollection._parseGeoJSON = function (value) { + var geometryCollection = new GeometryCollection(); + + for (var i = 0; i < value.geometries.length; i++) + geometryCollection.geometries.push(Geometry._parseGeoJSON(value.geometries[i], true)); + + if (geometryCollection.geometries.length > 0) + geometryCollection.hasZ = geometryCollection.geometries[0].hasZ; + + return geometryCollection; +}; + +GeometryCollection.prototype.toWkt = function () { + if (this.geometries.length === 0) + return this._getWktType(Types.wkt.GeometryCollection, true); + + var wkt = this._getWktType(Types.wkt.GeometryCollection, false) + '('; + + for (var i = 0; i < this.geometries.length; i++) + wkt += this.geometries[i].toWkt() + ','; + + wkt = wkt.slice(0, -1); + wkt += ')'; + + return wkt; +}; + +GeometryCollection.prototype.toWkb = function () { + var wkb = new BinaryWriter(this._getWkbSize()); + + wkb.writeInt8(1); + + this._writeWkbType(wkb, Types.wkb.GeometryCollection); + wkb.writeUInt32LE(this.geometries.length); + + for (var i = 0; i < this.geometries.length; i++) + wkb.writeBuffer(this.geometries[i].toWkb({ srid: this.srid })); + + return wkb.buffer; +}; + +GeometryCollection.prototype.toTwkb = function () { + var twkb = new BinaryWriter(0, true); + + var precision = Geometry.getTwkbPrecision(5, 0, 0); + var isEmpty = this.geometries.length === 0; + + this._writeTwkbHeader(twkb, Types.wkb.GeometryCollection, precision, isEmpty); + + if (this.geometries.length > 0) { + twkb.writeVarInt(this.geometries.length); + + for (var i = 0; i < this.geometries.length; i++) + twkb.writeBuffer(this.geometries[i].toTwkb()); + } + + return twkb.buffer; +}; + +GeometryCollection.prototype._getWkbSize = function () { + var size = 1 + 4 + 4; + + for (var i = 0; i < this.geometries.length; i++) + size += this.geometries[i]._getWkbSize(); + + return size; +}; + +GeometryCollection.prototype.toGeoJSON = function (options) { + var geoJSON = Geometry.prototype.toGeoJSON.call(this, options); + geoJSON.type = Types.geoJSON.GeometryCollection; + geoJSON.geometries = []; + + for (var i = 0; i < this.geometries.length; i++) + geoJSON.geometries.push(this.geometries[i].toGeoJSON()); + + return geoJSON; +}; + +},{"./binarywriter":2,"./geometry":3,"./types":11,"util":20}],5:[function(require,module,exports){ +module.exports = LineString; + +var util = require('util'); + +var Geometry = require('./geometry'); +var Types = require('./types'); +var Point = require('./point'); +var BinaryWriter = require('./binarywriter'); + +function LineString(points, srid) { + Geometry.call(this); + + this.points = points || []; + this.srid = srid; + + if (this.points.length > 0) { + this.hasZ = this.points[0].hasZ; + this.hasM = this.points[0].hasM; + } +} + +util.inherits(LineString, Geometry); + +LineString.Z = function (points, srid) { + var lineString = new LineString(points, srid); + lineString.hasZ = true; + return lineString; +}; + +LineString.M = function (points, srid) { + var lineString = new LineString(points, srid); + lineString.hasM = true; + return lineString; +}; + +LineString.ZM = function (points, srid) { + var lineString = new LineString(points, srid); + lineString.hasZ = true; + lineString.hasM = true; + return lineString; +}; + +LineString._parseWkt = function (value, options) { + var lineString = new LineString(); + lineString.srid = options.srid; + lineString.hasZ = options.hasZ; + lineString.hasM = options.hasM; + + if (value.isMatch(['EMPTY'])) + return lineString; + + value.expectGroupStart(); + lineString.points.push.apply(lineString.points, value.matchCoordinates(options)); + value.expectGroupEnd(); + + return lineString; +}; + +LineString._parseWkb = function (value, options) { + var lineString = new LineString(); + lineString.srid = options.srid; + lineString.hasZ = options.hasZ; + lineString.hasM = options.hasM; + + var pointCount = value.readUInt32(); + + for (var i = 0; i < pointCount; i++) + lineString.points.push(Point._readWkbPoint(value, options)); + + return lineString; +}; + +LineString._parseTwkb = function (value, options) { + var lineString = new LineString(); + lineString.hasZ = options.hasZ; + lineString.hasM = options.hasM; + + if (options.isEmpty) + return lineString; + + var previousPoint = new Point(0, 0, options.hasZ ? 0 : undefined, options.hasM ? 0 : undefined); + var pointCount = value.readVarInt(); + + for (var i = 0; i < pointCount; i++) + lineString.points.push(Point._readTwkbPoint(value, options, previousPoint)); + + return lineString; +}; + +LineString._parseGeoJSON = function (value) { + var lineString = new LineString(); + + if (value.coordinates.length > 0) + lineString.hasZ = value.coordinates[0].length > 2; + + for (var i = 0; i < value.coordinates.length; i++) + lineString.points.push(Point._readGeoJSONPoint(value.coordinates[i])); + + return lineString; +}; + +LineString.prototype.toWkt = function () { + if (this.points.length === 0) + return this._getWktType(Types.wkt.LineString, true); + + return this._getWktType(Types.wkt.LineString, false) + this._toInnerWkt(); +}; + +LineString.prototype._toInnerWkt = function () { + var innerWkt = '('; + + for (var i = 0; i < this.points.length; i++) + innerWkt += this._getWktCoordinate(this.points[i]) + ','; + + innerWkt = innerWkt.slice(0, -1); + innerWkt += ')'; + + return innerWkt; +}; + +LineString.prototype.toWkb = function (parentOptions) { + var wkb = new BinaryWriter(this._getWkbSize()); + + wkb.writeInt8(1); + + this._writeWkbType(wkb, Types.wkb.LineString, parentOptions); + wkb.writeUInt32LE(this.points.length); + + for (var i = 0; i < this.points.length; i++) + this.points[i]._writeWkbPoint(wkb); + + return wkb.buffer; +}; + +LineString.prototype.toTwkb = function () { + var twkb = new BinaryWriter(0, true); + + var precision = Geometry.getTwkbPrecision(5, 0, 0); + var isEmpty = this.points.length === 0; + + this._writeTwkbHeader(twkb, Types.wkb.LineString, precision, isEmpty); + + if (this.points.length > 0) { + twkb.writeVarInt(this.points.length); + + var previousPoint = new Point(0, 0, 0, 0); + for (var i = 0; i < this.points.length; i++) + this.points[i]._writeTwkbPoint(twkb, precision, previousPoint); + } + + return twkb.buffer; +}; + +LineString.prototype._getWkbSize = function () { + var coordinateSize = 16; + + if (this.hasZ) + coordinateSize += 8; + if (this.hasM) + coordinateSize += 8; + + return 1 + 4 + 4 + (this.points.length * coordinateSize); +}; + +LineString.prototype.toGeoJSON = function (options) { + var geoJSON = Geometry.prototype.toGeoJSON.call(this, options); + geoJSON.type = Types.geoJSON.LineString; + geoJSON.coordinates = []; + + for (var i = 0; i < this.points.length; i++) { + if (this.hasZ) + geoJSON.coordinates.push([this.points[i].x, this.points[i].y, this.points[i].z]); + else + geoJSON.coordinates.push([this.points[i].x, this.points[i].y]); + } + + return geoJSON; +}; + +},{"./binarywriter":2,"./geometry":3,"./point":9,"./types":11,"util":20}],6:[function(require,module,exports){ +module.exports = MultiLineString; + +var util = require('util'); + +var Types = require('./types'); +var Geometry = require('./geometry'); +var Point = require('./point'); +var LineString = require('./linestring'); +var BinaryWriter = require('./binarywriter'); + +function MultiLineString(lineStrings, srid) { + Geometry.call(this); + + this.lineStrings = lineStrings || []; + this.srid = srid; + + if (this.lineStrings.length > 0) { + this.hasZ = this.lineStrings[0].hasZ; + this.hasM = this.lineStrings[0].hasM; + } +} + +util.inherits(MultiLineString, Geometry); + +MultiLineString.Z = function (lineStrings, srid) { + var multiLineString = new MultiLineString(lineStrings, srid); + multiLineString.hasZ = true; + return multiLineString; +}; + +MultiLineString.M = function (lineStrings, srid) { + var multiLineString = new MultiLineString(lineStrings, srid); + multiLineString.hasM = true; + return multiLineString; +}; + +MultiLineString.ZM = function (lineStrings, srid) { + var multiLineString = new MultiLineString(lineStrings, srid); + multiLineString.hasZ = true; + multiLineString.hasM = true; + return multiLineString; +}; + +MultiLineString._parseWkt = function (value, options) { + var multiLineString = new MultiLineString(); + multiLineString.srid = options.srid; + multiLineString.hasZ = options.hasZ; + multiLineString.hasM = options.hasM; + + if (value.isMatch(['EMPTY'])) + return multiLineString; + + value.expectGroupStart(); + + do { + value.expectGroupStart(); + multiLineString.lineStrings.push(new LineString(value.matchCoordinates(options))); + value.expectGroupEnd(); + } while (value.isMatch([','])); + + value.expectGroupEnd(); + + return multiLineString; +}; + +MultiLineString._parseWkb = function (value, options) { + var multiLineString = new MultiLineString(); + multiLineString.srid = options.srid; + multiLineString.hasZ = options.hasZ; + multiLineString.hasM = options.hasM; + + var lineStringCount = value.readUInt32(); + + for (var i = 0; i < lineStringCount; i++) + multiLineString.lineStrings.push(Geometry.parse(value, options)); + + return multiLineString; +}; + +MultiLineString._parseTwkb = function (value, options) { + var multiLineString = new MultiLineString(); + multiLineString.hasZ = options.hasZ; + multiLineString.hasM = options.hasM; + + if (options.isEmpty) + return multiLineString; + + var previousPoint = new Point(0, 0, options.hasZ ? 0 : undefined, options.hasM ? 0 : undefined); + var lineStringCount = value.readVarInt(); + + for (var i = 0; i < lineStringCount; i++) { + var lineString = new LineString(); + lineString.hasZ = options.hasZ; + lineString.hasM = options.hasM; + + var pointCount = value.readVarInt(); + + for (var j = 0; j < pointCount; j++) + lineString.points.push(Point._readTwkbPoint(value, options, previousPoint)); + + multiLineString.lineStrings.push(lineString); + } + + return multiLineString; +}; + +MultiLineString._parseGeoJSON = function (value) { + var multiLineString = new MultiLineString(); + + if (value.coordinates.length > 0 && value.coordinates[0].length > 0) + multiLineString.hasZ = value.coordinates[0][0].length > 2; + + for (var i = 0; i < value.coordinates.length; i++) + multiLineString.lineStrings.push(LineString._parseGeoJSON({ coordinates: value.coordinates[i] })); + + return multiLineString; +}; + +MultiLineString.prototype.toWkt = function () { + if (this.lineStrings.length === 0) + return this._getWktType(Types.wkt.MultiLineString, true); + + var wkt = this._getWktType(Types.wkt.MultiLineString, false) + '('; + + for (var i = 0; i < this.lineStrings.length; i++) + wkt += this.lineStrings[i]._toInnerWkt() + ','; + + wkt = wkt.slice(0, -1); + wkt += ')'; + + return wkt; +}; + +MultiLineString.prototype.toWkb = function () { + var wkb = new BinaryWriter(this._getWkbSize()); + + wkb.writeInt8(1); + + this._writeWkbType(wkb, Types.wkb.MultiLineString); + wkb.writeUInt32LE(this.lineStrings.length); + + for (var i = 0; i < this.lineStrings.length; i++) + wkb.writeBuffer(this.lineStrings[i].toWkb({ srid: this.srid })); + + return wkb.buffer; +}; + +MultiLineString.prototype.toTwkb = function () { + var twkb = new BinaryWriter(0, true); + + var precision = Geometry.getTwkbPrecision(5, 0, 0); + var isEmpty = this.lineStrings.length === 0; + + this._writeTwkbHeader(twkb, Types.wkb.MultiLineString, precision, isEmpty); + + if (this.lineStrings.length > 0) { + twkb.writeVarInt(this.lineStrings.length); + + var previousPoint = new Point(0, 0, 0, 0); + for (var i = 0; i < this.lineStrings.length; i++) { + twkb.writeVarInt(this.lineStrings[i].points.length); + + for (var j = 0; j < this.lineStrings[i].points.length; j++) + this.lineStrings[i].points[j]._writeTwkbPoint(twkb, precision, previousPoint); + } + } + + return twkb.buffer; +}; + +MultiLineString.prototype._getWkbSize = function () { + var size = 1 + 4 + 4; + + for (var i = 0; i < this.lineStrings.length; i++) + size += this.lineStrings[i]._getWkbSize(); + + return size; +}; + +MultiLineString.prototype.toGeoJSON = function (options) { + var geoJSON = Geometry.prototype.toGeoJSON.call(this, options); + geoJSON.type = Types.geoJSON.MultiLineString; + geoJSON.coordinates = []; + + for (var i = 0; i < this.lineStrings.length; i++) + geoJSON.coordinates.push(this.lineStrings[i].toGeoJSON().coordinates); + + return geoJSON; +}; + +},{"./binarywriter":2,"./geometry":3,"./linestring":5,"./point":9,"./types":11,"util":20}],7:[function(require,module,exports){ +module.exports = MultiPoint; + +var util = require('util'); + +var Types = require('./types'); +var Geometry = require('./geometry'); +var Point = require('./point'); +var BinaryWriter = require('./binarywriter'); + +function MultiPoint(points, srid) { + Geometry.call(this); + + this.points = points || []; + this.srid = srid; + + if (this.points.length > 0) { + this.hasZ = this.points[0].hasZ; + this.hasM = this.points[0].hasM; + } +} + +util.inherits(MultiPoint, Geometry); + +MultiPoint.Z = function (points, srid) { + var multiPoint = new MultiPoint(points, srid); + multiPoint.hasZ = true; + return multiPoint; +}; + +MultiPoint.M = function (points, srid) { + var multiPoint = new MultiPoint(points, srid); + multiPoint.hasM = true; + return multiPoint; +}; + +MultiPoint.ZM = function (points, srid) { + var multiPoint = new MultiPoint(points, srid); + multiPoint.hasZ = true; + multiPoint.hasM = true; + return multiPoint; +}; + +MultiPoint._parseWkt = function (value, options) { + var multiPoint = new MultiPoint(); + multiPoint.srid = options.srid; + multiPoint.hasZ = options.hasZ; + multiPoint.hasM = options.hasM; + + if (value.isMatch(['EMPTY'])) + return multiPoint; + + value.expectGroupStart(); + multiPoint.points.push.apply(multiPoint.points, value.matchCoordinates(options)); + value.expectGroupEnd(); + + return multiPoint; +}; + +MultiPoint._parseWkb = function (value, options) { + var multiPoint = new MultiPoint(); + multiPoint.srid = options.srid; + multiPoint.hasZ = options.hasZ; + multiPoint.hasM = options.hasM; + + var pointCount = value.readUInt32(); + + for (var i = 0; i < pointCount; i++) + multiPoint.points.push(Geometry.parse(value, options)); + + return multiPoint; +}; + +MultiPoint._parseTwkb = function (value, options) { + var multiPoint = new MultiPoint(); + multiPoint.hasZ = options.hasZ; + multiPoint.hasM = options.hasM; + + if (options.isEmpty) + return multiPoint; + + var previousPoint = new Point(0, 0, options.hasZ ? 0 : undefined, options.hasM ? 0 : undefined); + var pointCount = value.readVarInt(); + + for (var i = 0; i < pointCount; i++) + multiPoint.points.push(Point._readTwkbPoint(value, options, previousPoint)); + + return multiPoint; +}; + +MultiPoint._parseGeoJSON = function (value) { + var multiPoint = new MultiPoint(); + + if (value.coordinates.length > 0) + multiPoint.hasZ = value.coordinates[0].length > 2; + + for (var i = 0; i < value.coordinates.length; i++) + multiPoint.points.push(Point._parseGeoJSON({ coordinates: value.coordinates[i] })); + + return multiPoint; +}; + +MultiPoint.prototype.toWkt = function () { + if (this.points.length === 0) + return this._getWktType(Types.wkt.MultiPoint, true); + + var wkt = this._getWktType(Types.wkt.MultiPoint, false) + '('; + + for (var i = 0; i < this.points.length; i++) + wkt += this._getWktCoordinate(this.points[i]) + ','; + + wkt = wkt.slice(0, -1); + wkt += ')'; + + return wkt; +}; + +MultiPoint.prototype.toWkb = function () { + var wkb = new BinaryWriter(this._getWkbSize()); + + wkb.writeInt8(1); + + this._writeWkbType(wkb, Types.wkb.MultiPoint); + wkb.writeUInt32LE(this.points.length); + + for (var i = 0; i < this.points.length; i++) + wkb.writeBuffer(this.points[i].toWkb({ srid: this.srid })); + + return wkb.buffer; +}; + +MultiPoint.prototype.toTwkb = function () { + var twkb = new BinaryWriter(0, true); + + var precision = Geometry.getTwkbPrecision(5, 0, 0); + var isEmpty = this.points.length === 0; + + this._writeTwkbHeader(twkb, Types.wkb.MultiPoint, precision, isEmpty); + + if (this.points.length > 0) { + twkb.writeVarInt(this.points.length); + + var previousPoint = new Point(0, 0, 0, 0); + for (var i = 0; i < this.points.length; i++) + this.points[i]._writeTwkbPoint(twkb, precision, previousPoint); + } + + return twkb.buffer; +}; + +MultiPoint.prototype._getWkbSize = function () { + var coordinateSize = 16; + + if (this.hasZ) + coordinateSize += 8; + if (this.hasM) + coordinateSize += 8; + + coordinateSize += 5; + + return 1 + 4 + 4 + (this.points.length * coordinateSize); +}; + +MultiPoint.prototype.toGeoJSON = function (options) { + var geoJSON = Geometry.prototype.toGeoJSON.call(this, options); + geoJSON.type = Types.geoJSON.MultiPoint; + geoJSON.coordinates = []; + + for (var i = 0; i < this.points.length; i++) + geoJSON.coordinates.push(this.points[i].toGeoJSON().coordinates); + + return geoJSON; +}; + +},{"./binarywriter":2,"./geometry":3,"./point":9,"./types":11,"util":20}],8:[function(require,module,exports){ +module.exports = MultiPolygon; + +var util = require('util'); + +var Types = require('./types'); +var Geometry = require('./geometry'); +var Point = require('./point'); +var Polygon = require('./polygon'); +var BinaryWriter = require('./binarywriter'); + +function MultiPolygon(polygons, srid) { + Geometry.call(this); + + this.polygons = polygons || []; + this.srid = srid; + + if (this.polygons.length > 0) { + this.hasZ = this.polygons[0].hasZ; + this.hasM = this.polygons[0].hasM; + } +} + +util.inherits(MultiPolygon, Geometry); + +MultiPolygon.Z = function (polygons, srid) { + var multiPolygon = new MultiPolygon(polygons, srid); + multiPolygon.hasZ = true; + return multiPolygon; +}; + +MultiPolygon.M = function (polygons, srid) { + var multiPolygon = new MultiPolygon(polygons, srid); + multiPolygon.hasM = true; + return multiPolygon; +}; + +MultiPolygon.ZM = function (polygons, srid) { + var multiPolygon = new MultiPolygon(polygons, srid); + multiPolygon.hasZ = true; + multiPolygon.hasM = true; + return multiPolygon; +}; + +MultiPolygon._parseWkt = function (value, options) { + var multiPolygon = new MultiPolygon(); + multiPolygon.srid = options.srid; + multiPolygon.hasZ = options.hasZ; + multiPolygon.hasM = options.hasM; + + if (value.isMatch(['EMPTY'])) + return multiPolygon; + + value.expectGroupStart(); + + do { + value.expectGroupStart(); + + var exteriorRing = []; + var interiorRings = []; + + value.expectGroupStart(); + exteriorRing.push.apply(exteriorRing, value.matchCoordinates(options)); + value.expectGroupEnd(); + + while (value.isMatch([','])) { + value.expectGroupStart(); + interiorRings.push(value.matchCoordinates(options)); + value.expectGroupEnd(); + } + + multiPolygon.polygons.push(new Polygon(exteriorRing, interiorRings)); + + value.expectGroupEnd(); + + } while (value.isMatch([','])); + + value.expectGroupEnd(); + + return multiPolygon; +}; + +MultiPolygon._parseWkb = function (value, options) { + var multiPolygon = new MultiPolygon(); + multiPolygon.srid = options.srid; + multiPolygon.hasZ = options.hasZ; + multiPolygon.hasM = options.hasM; + + var polygonCount = value.readUInt32(); + + for (var i = 0; i < polygonCount; i++) + multiPolygon.polygons.push(Geometry.parse(value, options)); + + return multiPolygon; +}; + +MultiPolygon._parseTwkb = function (value, options) { + var multiPolygon = new MultiPolygon(); + multiPolygon.hasZ = options.hasZ; + multiPolygon.hasM = options.hasM; + + if (options.isEmpty) + return multiPolygon; + + var previousPoint = new Point(0, 0, options.hasZ ? 0 : undefined, options.hasM ? 0 : undefined); + var polygonCount = value.readVarInt(); + + for (var i = 0; i < polygonCount; i++) { + var polygon = new Polygon(); + polygon.hasZ = options.hasZ; + polygon.hasM = options.hasM; + + var ringCount = value.readVarInt(); + var exteriorRingCount = value.readVarInt(); + + for (var j = 0; j < exteriorRingCount; j++) + polygon.exteriorRing.push(Point._readTwkbPoint(value, options, previousPoint)); + + for (j = 1; j < ringCount; j++) { + var interiorRing = []; + + var interiorRingCount = value.readVarInt(); + + for (var k = 0; k < interiorRingCount; k++) + interiorRing.push(Point._readTwkbPoint(value, options, previousPoint)); + + polygon.interiorRings.push(interiorRing); + } + + multiPolygon.polygons.push(polygon); + } + + return multiPolygon; +}; + +MultiPolygon._parseGeoJSON = function (value) { + var multiPolygon = new MultiPolygon(); + + if (value.coordinates.length > 0 && value.coordinates[0].length > 0 && value.coordinates[0][0].length > 0) + multiPolygon.hasZ = value.coordinates[0][0][0].length > 2; + + for (var i = 0; i < value.coordinates.length; i++) + multiPolygon.polygons.push(Polygon._parseGeoJSON({ coordinates: value.coordinates[i] })); + + return multiPolygon; +}; + +MultiPolygon.prototype.toWkt = function () { + if (this.polygons.length === 0) + return this._getWktType(Types.wkt.MultiPolygon, true); + + var wkt = this._getWktType(Types.wkt.MultiPolygon, false) + '('; + + for (var i = 0; i < this.polygons.length; i++) + wkt += this.polygons[i]._toInnerWkt() + ','; + + wkt = wkt.slice(0, -1); + wkt += ')'; + + return wkt; +}; + +MultiPolygon.prototype.toWkb = function () { + var wkb = new BinaryWriter(this._getWkbSize()); + + wkb.writeInt8(1); + + this._writeWkbType(wkb, Types.wkb.MultiPolygon); + wkb.writeUInt32LE(this.polygons.length); + + for (var i = 0; i < this.polygons.length; i++) + wkb.writeBuffer(this.polygons[i].toWkb({ srid: this.srid })); + + return wkb.buffer; +}; + +MultiPolygon.prototype.toTwkb = function () { + var twkb = new BinaryWriter(0, true); + + var precision = Geometry.getTwkbPrecision(5, 0, 0); + var isEmpty = this.polygons.length === 0; + + this._writeTwkbHeader(twkb, Types.wkb.MultiPolygon, precision, isEmpty); + + if (this.polygons.length > 0) { + twkb.writeVarInt(this.polygons.length); + + var previousPoint = new Point(0, 0, 0, 0); + for (var i = 0; i < this.polygons.length; i++) { + twkb.writeVarInt(1 + this.polygons[i].interiorRings.length); + + twkb.writeVarInt(this.polygons[i].exteriorRing.length); + + for (var j = 0; j < this.polygons[i].exteriorRing.length; j++) + this.polygons[i].exteriorRing[j]._writeTwkbPoint(twkb, precision, previousPoint); + + for (j = 0; j < this.polygons[i].interiorRings.length; j++) { + twkb.writeVarInt(this.polygons[i].interiorRings[j].length); + + for (var k = 0; k < this.polygons[i].interiorRings[j].length; k++) + this.polygons[i].interiorRings[j][k]._writeTwkbPoint(twkb, precision, previousPoint); + } + } + } + + return twkb.buffer; +}; + +MultiPolygon.prototype._getWkbSize = function () { + var size = 1 + 4 + 4; + + for (var i = 0; i < this.polygons.length; i++) + size += this.polygons[i]._getWkbSize(); + + return size; +}; + +MultiPolygon.prototype.toGeoJSON = function (options) { + var geoJSON = Geometry.prototype.toGeoJSON.call(this, options); + geoJSON.type = Types.geoJSON.MultiPolygon; + geoJSON.coordinates = []; + + for (var i = 0; i < this.polygons.length; i++) + geoJSON.coordinates.push(this.polygons[i].toGeoJSON().coordinates); + + return geoJSON; +}; + +},{"./binarywriter":2,"./geometry":3,"./point":9,"./polygon":10,"./types":11,"util":20}],9:[function(require,module,exports){ +module.exports = Point; + +var util = require('util'); + +var Geometry = require('./geometry'); +var Types = require('./types'); +var BinaryWriter = require('./binarywriter'); +var ZigZag = require('./zigzag.js'); + +function Point(x, y, z, m, srid) { + Geometry.call(this); + + this.x = x; + this.y = y; + this.z = z; + this.m = m; + this.srid = srid; + + this.hasZ = typeof this.z !== 'undefined'; + this.hasM = typeof this.m !== 'undefined'; +} + +util.inherits(Point, Geometry); + +Point.Z = function (x, y, z, srid) { + var point = new Point(x, y, z, undefined, srid); + point.hasZ = true; + return point; +}; + +Point.M = function (x, y, m, srid) { + var point = new Point(x, y, undefined, m, srid); + point.hasM = true; + return point; +}; + +Point.ZM = function (x, y, z, m, srid) { + var point = new Point(x, y, z, m, srid); + point.hasZ = true; + point.hasM = true; + return point; +}; + +Point._parseWkt = function (value, options) { + var point = new Point(); + point.srid = options.srid; + point.hasZ = options.hasZ; + point.hasM = options.hasM; + + if (value.isMatch(['EMPTY'])) + return point; + + value.expectGroupStart(); + + var coordinate = value.matchCoordinate(options); + + point.x = coordinate.x; + point.y = coordinate.y; + point.z = coordinate.z; + point.m = coordinate.m; + + value.expectGroupEnd(); + + return point; +}; + +Point._parseWkb = function (value, options) { + var point = Point._readWkbPoint(value, options); + point.srid = options.srid; + return point; +}; + +Point._readWkbPoint = function (value, options) { + return new Point(value.readDouble(), value.readDouble(), + options.hasZ ? value.readDouble() : undefined, + options.hasM ? value.readDouble() : undefined); +}; + +Point._parseTwkb = function (value, options) { + var point = new Point(); + point.hasZ = options.hasZ; + point.hasM = options.hasM; + + if (options.isEmpty) + return point; + + point.x = ZigZag.decode(value.readVarInt()) / options.precisionFactor; + point.y = ZigZag.decode(value.readVarInt()) / options.precisionFactor; + point.z = options.hasZ ? ZigZag.decode(value.readVarInt()) / options.zPrecisionFactor : undefined; + point.m = options.hasM ? ZigZag.decode(value.readVarInt()) / options.mPrecisionFactor : undefined; + + return point; +}; + +Point._readTwkbPoint = function (value, options, previousPoint) { + previousPoint.x += ZigZag.decode(value.readVarInt()) / options.precisionFactor; + previousPoint.y += ZigZag.decode(value.readVarInt()) / options.precisionFactor; + + if (options.hasZ) + previousPoint.z += ZigZag.decode(value.readVarInt()) / options.zPrecisionFactor; + if (options.hasM) + previousPoint.m += ZigZag.decode(value.readVarInt()) / options.mPrecisionFactor; + + return new Point(previousPoint.x, previousPoint.y, previousPoint.z, previousPoint.m); +}; + +Point._parseGeoJSON = function (value) { + return Point._readGeoJSONPoint(value.coordinates); +}; + +Point._readGeoJSONPoint = function (coordinates) { + if (coordinates.length === 0) + return new Point(); + + if (coordinates.length > 2) + return new Point(coordinates[0], coordinates[1], coordinates[2]); + + return new Point(coordinates[0], coordinates[1]); +}; + +Point.prototype.toWkt = function () { + if (typeof this.x === 'undefined' && typeof this.y === 'undefined' && + typeof this.z === 'undefined' && typeof this.m === 'undefined') + return this._getWktType(Types.wkt.Point, true); + + return this._getWktType(Types.wkt.Point, false) + '(' + this._getWktCoordinate(this) + ')'; +}; + +Point.prototype.toWkb = function (parentOptions) { + var wkb = new BinaryWriter(this._getWkbSize()); + + wkb.writeInt8(1); + this._writeWkbType(wkb, Types.wkb.Point, parentOptions); + + if (typeof this.x === 'undefined' && typeof this.y === 'undefined') { + wkb.writeDoubleLE(NaN); + wkb.writeDoubleLE(NaN); + + if (this.hasZ) + wkb.writeDoubleLE(NaN); + if (this.hasM) + wkb.writeDoubleLE(NaN); + } + else { + this._writeWkbPoint(wkb); + } + + return wkb.buffer; +}; + +Point.prototype._writeWkbPoint = function (wkb) { + wkb.writeDoubleLE(this.x); + wkb.writeDoubleLE(this.y); + + if (this.hasZ) + wkb.writeDoubleLE(this.z); + if (this.hasM) + wkb.writeDoubleLE(this.m); +}; + +Point.prototype.toTwkb = function () { + var twkb = new BinaryWriter(0, true); + + var precision = Geometry.getTwkbPrecision(5, 0, 0); + var isEmpty = typeof this.x === 'undefined' && typeof this.y === 'undefined'; + + this._writeTwkbHeader(twkb, Types.wkb.Point, precision, isEmpty); + + if (!isEmpty) + this._writeTwkbPoint(twkb, precision, new Point(0, 0, 0, 0)); + + return twkb.buffer; +}; + +Point.prototype._writeTwkbPoint = function (twkb, precision, previousPoint) { + var x = this.x * precision.xyFactor; + var y = this.y * precision.xyFactor; + var z = this.z * precision.zFactor; + var m = this.m * precision.mFactor; + + twkb.writeVarInt(ZigZag.encode(x - previousPoint.x)); + twkb.writeVarInt(ZigZag.encode(y - previousPoint.y)); + if (this.hasZ) + twkb.writeVarInt(ZigZag.encode(z - previousPoint.z)); + if (this.hasM) + twkb.writeVarInt(ZigZag.encode(m - previousPoint.m)); + + previousPoint.x = x; + previousPoint.y = y; + previousPoint.z = z; + previousPoint.m = m; +}; + +Point.prototype._getWkbSize = function () { + var size = 1 + 4 + 8 + 8; + + if (this.hasZ) + size += 8; + if (this.hasM) + size += 8; + + return size; +}; + +Point.prototype.toGeoJSON = function (options) { + var geoJSON = Geometry.prototype.toGeoJSON.call(this, options); + geoJSON.type = Types.geoJSON.Point; + + if (typeof this.x === 'undefined' && typeof this.y === 'undefined') + geoJSON.coordinates = []; + else if (typeof this.z !== 'undefined') + geoJSON.coordinates = [this.x, this.y, this.z]; + else + geoJSON.coordinates = [this.x, this.y]; + + return geoJSON; +}; + +},{"./binarywriter":2,"./geometry":3,"./types":11,"./zigzag.js":13,"util":20}],10:[function(require,module,exports){ +module.exports = Polygon; + +var util = require('util'); + +var Geometry = require('./geometry'); +var Types = require('./types'); +var Point = require('./point'); +var BinaryWriter = require('./binarywriter'); + +function Polygon(exteriorRing, interiorRings, srid) { + Geometry.call(this); + + this.exteriorRing = exteriorRing || []; + this.interiorRings = interiorRings || []; + this.srid = srid; + + if (this.exteriorRing.length > 0) { + this.hasZ = this.exteriorRing[0].hasZ; + this.hasM = this.exteriorRing[0].hasM; + } +} + +util.inherits(Polygon, Geometry); + +Polygon.Z = function (exteriorRing, interiorRings, srid) { + var polygon = new Polygon(exteriorRing, interiorRings, srid); + polygon.hasZ = true; + return polygon; +}; + +Polygon.M = function (exteriorRing, interiorRings, srid) { + var polygon = new Polygon(exteriorRing, interiorRings, srid); + polygon.hasM = true; + return polygon; +}; + +Polygon.ZM = function (exteriorRing, interiorRings, srid) { + var polygon = new Polygon(exteriorRing, interiorRings, srid); + polygon.hasZ = true; + polygon.hasM = true; + return polygon; +}; + +Polygon._parseWkt = function (value, options) { + var polygon = new Polygon(); + polygon.srid = options.srid; + polygon.hasZ = options.hasZ; + polygon.hasM = options.hasM; + + if (value.isMatch(['EMPTY'])) + return polygon; + + value.expectGroupStart(); + + value.expectGroupStart(); + polygon.exteriorRing.push.apply(polygon.exteriorRing, value.matchCoordinates(options)); + value.expectGroupEnd(); + + while (value.isMatch([','])) { + value.expectGroupStart(); + polygon.interiorRings.push(value.matchCoordinates(options)); + value.expectGroupEnd(); + } + + value.expectGroupEnd(); + + return polygon; +}; + +Polygon._parseWkb = function (value, options) { + var polygon = new Polygon(); + polygon.srid = options.srid; + polygon.hasZ = options.hasZ; + polygon.hasM = options.hasM; + + var ringCount = value.readUInt32(); + + if (ringCount > 0) { + var exteriorRingCount = value.readUInt32(); + + for (var i = 0; i < exteriorRingCount; i++) + polygon.exteriorRing.push(Point._readWkbPoint(value, options)); + + for (i = 1; i < ringCount; i++) { + var interiorRing = []; + + var interiorRingCount = value.readUInt32(); + + for (var j = 0; j < interiorRingCount; j++) + interiorRing.push(Point._readWkbPoint(value, options)); + + polygon.interiorRings.push(interiorRing); + } + } + + return polygon; +}; + +Polygon._parseTwkb = function (value, options) { + var polygon = new Polygon(); + polygon.hasZ = options.hasZ; + polygon.hasM = options.hasM; + + if (options.isEmpty) + return polygon; + + var previousPoint = new Point(0, 0, options.hasZ ? 0 : undefined, options.hasM ? 0 : undefined); + var ringCount = value.readVarInt(); + var exteriorRingCount = value.readVarInt(); + + for (var i = 0; i < exteriorRingCount; i++) + polygon.exteriorRing.push(Point._readTwkbPoint(value, options, previousPoint)); + + for (i = 1; i < ringCount; i++) { + var interiorRing = []; + + var interiorRingCount = value.readVarInt(); + + for (var j = 0; j < interiorRingCount; j++) + interiorRing.push(Point._readTwkbPoint(value, options, previousPoint)); + + polygon.interiorRings.push(interiorRing); + } + + return polygon; +}; + +Polygon._parseGeoJSON = function (value) { + var polygon = new Polygon(); + + if (value.coordinates.length > 0 && value.coordinates[0].length > 0) + polygon.hasZ = value.coordinates[0][0].length > 2; + + for (var i = 0; i < value.coordinates.length; i++) { + if (i > 0) + polygon.interiorRings.push([]); + + for (var j = 0; j < value.coordinates[i].length; j++) { + if (i === 0) + polygon.exteriorRing.push(Point._readGeoJSONPoint(value.coordinates[i][j])); + else + polygon.interiorRings[i - 1].push(Point._readGeoJSONPoint(value.coordinates[i][j])); + } + } + + return polygon; +}; + +Polygon.prototype.toWkt = function () { + if (this.exteriorRing.length === 0) + return this._getWktType(Types.wkt.Polygon, true); + + return this._getWktType(Types.wkt.Polygon, false) + this._toInnerWkt(); +}; + +Polygon.prototype._toInnerWkt = function () { + var innerWkt = '(('; + + for (var i = 0; i < this.exteriorRing.length; i++) + innerWkt += this._getWktCoordinate(this.exteriorRing[i]) + ','; + + innerWkt = innerWkt.slice(0, -1); + innerWkt += ')'; + + for (i = 0; i < this.interiorRings.length; i++) { + innerWkt += ',('; + + for (var j = 0; j < this.interiorRings[i].length; j++) { + innerWkt += this._getWktCoordinate(this.interiorRings[i][j]) + ','; + } + + innerWkt = innerWkt.slice(0, -1); + innerWkt += ')'; + } + + innerWkt += ')'; + + return innerWkt; +}; + +Polygon.prototype.toWkb = function (parentOptions) { + var wkb = new BinaryWriter(this._getWkbSize()); + + wkb.writeInt8(1); + + this._writeWkbType(wkb, Types.wkb.Polygon, parentOptions); + + if (this.exteriorRing.length > 0) { + wkb.writeUInt32LE(1 + this.interiorRings.length); + wkb.writeUInt32LE(this.exteriorRing.length); + } + else { + wkb.writeUInt32LE(0); + } + + for (var i = 0; i < this.exteriorRing.length; i++) + this.exteriorRing[i]._writeWkbPoint(wkb); + + for (i = 0; i < this.interiorRings.length; i++) { + wkb.writeUInt32LE(this.interiorRings[i].length); + + for (var j = 0; j < this.interiorRings[i].length; j++) + this.interiorRings[i][j]._writeWkbPoint(wkb); + } + + return wkb.buffer; +}; + +Polygon.prototype.toTwkb = function () { + var twkb = new BinaryWriter(0, true); + + var precision = Geometry.getTwkbPrecision(5, 0, 0); + var isEmpty = this.exteriorRing.length === 0; + + this._writeTwkbHeader(twkb, Types.wkb.Polygon, precision, isEmpty); + + if (this.exteriorRing.length > 0) { + twkb.writeVarInt(1 + this.interiorRings.length); + + twkb.writeVarInt(this.exteriorRing.length); + + var previousPoint = new Point(0, 0, 0, 0); + for (var i = 0; i < this.exteriorRing.length; i++) + this.exteriorRing[i]._writeTwkbPoint(twkb, precision, previousPoint); + + for (i = 0; i < this.interiorRings.length; i++) { + twkb.writeVarInt(this.interiorRings[i].length); + + for (var j = 0; j < this.interiorRings[i].length; j++) + this.interiorRings[i][j]._writeTwkbPoint(twkb, precision, previousPoint); + } + } + + return twkb.buffer; +}; + +Polygon.prototype._getWkbSize = function () { + var coordinateSize = 16; + + if (this.hasZ) + coordinateSize += 8; + if (this.hasM) + coordinateSize += 8; + + var size = 1 + 4 + 4; + + if (this.exteriorRing.length > 0) + size += 4 + (this.exteriorRing.length * coordinateSize); + + for (var i = 0; i < this.interiorRings.length; i++) + size += 4 + (this.interiorRings[i].length * coordinateSize); + + return size; +}; + +Polygon.prototype.toGeoJSON = function (options) { + var geoJSON = Geometry.prototype.toGeoJSON.call(this, options); + geoJSON.type = Types.geoJSON.Polygon; + geoJSON.coordinates = []; + + if (this.exteriorRing.length > 0) { + var exteriorRing = []; + + for (var i = 0; i < this.exteriorRing.length; i++) { + if (this.hasZ) + exteriorRing.push([this.exteriorRing[i].x, this.exteriorRing[i].y, this.exteriorRing[i].z]); + else + exteriorRing.push([this.exteriorRing[i].x, this.exteriorRing[i].y]); + } + + geoJSON.coordinates.push(exteriorRing); + } + + for (var j = 0; j < this.interiorRings.length; j++) { + var interiorRing = []; + + for (var k = 0; k < this.interiorRings[j].length; k++) { + if (this.hasZ) + interiorRing.push([this.interiorRings[j][k].x, this.interiorRings[j][k].y, this.interiorRings[j][k].z]); + else + interiorRing.push([this.interiorRings[j][k].x, this.interiorRings[j][k].y]); + } + + geoJSON.coordinates.push(interiorRing); + } + + return geoJSON; +}; + +},{"./binarywriter":2,"./geometry":3,"./point":9,"./types":11,"util":20}],11:[function(require,module,exports){ +module.exports = { + wkt: { + Point: 'POINT', + LineString: 'LINESTRING', + Polygon: 'POLYGON', + MultiPoint: 'MULTIPOINT', + MultiLineString: 'MULTILINESTRING', + MultiPolygon: 'MULTIPOLYGON', + GeometryCollection: 'GEOMETRYCOLLECTION' + }, + wkb: { + Point: 1, + LineString: 2, + Polygon: 3, + MultiPoint: 4, + MultiLineString: 5, + MultiPolygon: 6, + GeometryCollection: 7 + }, + geoJSON: { + Point: 'Point', + LineString: 'LineString', + Polygon: 'Polygon', + MultiPoint: 'MultiPoint', + MultiLineString: 'MultiLineString', + MultiPolygon: 'MultiPolygon', + GeometryCollection: 'GeometryCollection' + } +}; + +},{}],12:[function(require,module,exports){ +module.exports = WktParser; + +var Types = require('./types'); +var Point = require('./point'); + +function WktParser(value) { + this.value = value; + this.position = 0; +} + +WktParser.prototype.match = function (tokens) { + this.skipWhitespaces(); + + for (var i = 0; i < tokens.length; i++) { + if (this.value.substring(this.position).indexOf(tokens[i]) === 0) { + this.position += tokens[i].length; + return tokens[i]; + } + } + + return null; +}; + +WktParser.prototype.matchRegex = function (tokens) { + this.skipWhitespaces(); + + for (var i = 0; i < tokens.length; i++) { + var match = this.value.substring(this.position).match(tokens[i]); + + if (match) { + this.position += match[0].length; + return match; + } + } + + return null; +}; + +WktParser.prototype.isMatch = function (tokens) { + this.skipWhitespaces(); + + for (var i = 0; i < tokens.length; i++) { + if (this.value.substring(this.position).indexOf(tokens[i]) === 0) { + this.position += tokens[i].length; + return true; + } + } + + return false; +}; + +WktParser.prototype.matchType = function () { + var geometryType = this.match([Types.wkt.Point, Types.wkt.LineString, Types.wkt.Polygon, Types.wkt.MultiPoint, + Types.wkt.MultiLineString, Types.wkt.MultiPolygon, Types.wkt.GeometryCollection]); + + if (!geometryType) + throw new Error('Expected geometry type'); + + return geometryType; +}; + +WktParser.prototype.matchDimension = function () { + var dimension = this.match(['ZM', 'Z', 'M']); + + switch (dimension) { + case 'ZM': return { hasZ: true, hasM: true }; + case 'Z': return { hasZ: true, hasM: false }; + case 'M': return { hasZ: false, hasM: true }; + default: return { hasZ: false, hasM: false }; + } +}; + +WktParser.prototype.expectGroupStart = function () { + if (!this.isMatch(['('])) + throw new Error('Expected group start'); +}; + +WktParser.prototype.expectGroupEnd = function () { + if (!this.isMatch([')'])) + throw new Error('Expected group end'); +}; + +WktParser.prototype.matchCoordinate = function (options) { + var match; + + if (options.hasZ && options.hasM) + match = this.matchRegex([/^(\S*)\s+(\S*)\s+(\S*)\s+([^\s,)]*)/]); + else if (options.hasZ || options.hasM) + match = this.matchRegex([/^(\S*)\s+(\S*)\s+([^\s,)]*)/]); + else + match = this.matchRegex([/^(\S*)\s+([^\s,)]*)/]); + + if (!match) + throw new Error('Expected coordinates'); + + if (options.hasZ && options.hasM) + return new Point(parseFloat(match[1]), parseFloat(match[2]), parseFloat(match[3]), parseFloat(match[4])); + else if (options.hasZ) + return new Point(parseFloat(match[1]), parseFloat(match[2]), parseFloat(match[3])); + else if (options.hasM) + return new Point(parseFloat(match[1]), parseFloat(match[2]), undefined, parseFloat(match[3])); + else + return new Point(parseFloat(match[1]), parseFloat(match[2])); +}; + +WktParser.prototype.matchCoordinates = function (options) { + var coordinates = []; + + do { + var startsWithBracket = this.isMatch(['(']); + + coordinates.push(this.matchCoordinate(options)); + + if (startsWithBracket) + this.expectGroupEnd(); + } while (this.isMatch([','])); + + return coordinates; +}; + +WktParser.prototype.skipWhitespaces = function () { + while (this.position < this.value.length && this.value[this.position] === ' ') + this.position++; +}; + +},{"./point":9,"./types":11}],13:[function(require,module,exports){ +module.exports = { + encode: function (value) { + return (value << 1) ^ (value >> 31); + }, + decode: function (value) { + return (value >> 1) ^ (-(value & 1)); + } +}; + +},{}],14:[function(require,module,exports){ +'use strict' + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + for (var i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk( + uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) + )) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + +},{}],15:[function(require,module,exports){ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],16:[function(require,module,exports){ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} + +},{}],17:[function(require,module,exports){ +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually +module.exports = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) +} + +function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} + +// For Node v0.10 support. Remove this eventually. +function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) +} + +},{}],18:[function(require,module,exports){ +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],19:[function(require,module,exports){ +module.exports = function isBuffer(arg) { + return arg && typeof arg === 'object' + && typeof arg.copy === 'function' + && typeof arg.fill === 'function' + && typeof arg.readUInt8 === 'function'; +} +},{}],20:[function(require,module,exports){ +(function (process,global){ +// Copyright Joyent, Inc. and other Node 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: +// +// 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. + +var formatRegExp = /%[sdj%]/g; +exports.format = function(f) { + if (!isString(f)) { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function(x) { + if (x === '%%') return '%'; + if (i >= len) return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; +}; + + +// Mark that a method should not be used. +// Returns a modified function which warns once by default. +// If --no-deprecation is set, then it is a no-op. +exports.deprecate = function(fn, msg) { + // Allow for deprecating things in the process of starting up. + if (isUndefined(global.process)) { + return function() { + return exports.deprecate(fn, msg).apply(this, arguments); + }; + } + + if (process.noDeprecation === true) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +}; + + +var debugs = {}; +var debugEnviron; +exports.debuglog = function(set) { + if (isUndefined(debugEnviron)) + debugEnviron = process.env.NODE_DEBUG || ''; + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = process.pid; + debugs[set] = function() { + var msg = exports.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function() {}; + } + } + return debugs[set]; +}; + + +/** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ +/* legacy: obj, showHidden, depth, colors*/ +function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} +exports.inspect = inspect; + + +// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +inspect.colors = { + 'bold' : [1, 22], + 'italic' : [3, 23], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'white' : [37, 39], + 'grey' : [90, 39], + 'black' : [30, 39], + 'blue' : [34, 39], + 'cyan' : [36, 39], + 'green' : [32, 39], + 'magenta' : [35, 39], + 'red' : [31, 39], + 'yellow' : [33, 39] +}; + +// Don't use 'blue' not visible on cmd.exe +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' +}; + + +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } +} + + +function stylizeNoColor(str, styleType) { + return str; +} + + +function arrayToHash(array) { + var hash = {}; + + array.forEach(function(val, idx) { + hash[val] = true; + }); + + return hash; +} + + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && + value && + isFunction(value.inspect) && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + if (isError(value) + && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', array = false, braces = ['{', '}']; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + + +function formatPrimitive(ctx, value) { + if (isUndefined(value)) + return ctx.stylize('undefined', 'undefined'); + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) + return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) + return ctx.stylize('' + value, 'boolean'); + // For some reason typeof null is "object", so special case here. + if (isNull(value)) + return ctx.stylize('null', 'null'); +} + + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + + +function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function(prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) numLinesEst++; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray(ar) { + return Array.isArray(ar); +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = require('./support/isBuffer'); + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} + + +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec']; + +// 26 Feb 16:19:34 +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} + + +// log is just a thin wrapper to console.log that prepends a timestamp +exports.log = function() { + console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +}; + + +/** + * Inherit the prototype methods from one constructor into another. + * + * The Function.prototype.inherits from lang.js rewritten as a standalone + * function (not on Function.prototype). NOTE: If this file is to be loaded + * during bootstrapping this function needs to be rewritten using some native + * functions as prototype setup using normal JavaScript does not work as + * expected during bootstrapping (see mirror.js in r114903). + * + * @param {function} ctor Constructor function which needs to inherit the + * prototype. + * @param {function} superCtor Constructor function to inherit prototype from. + */ +exports.inherits = require('inherits'); + +exports._extend = function(origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) return origin; + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; +}; + +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./support/isBuffer":19,"_process":18,"inherits":16}],"buffer":[function(require,module,exports){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +var base64 = require('base64-js') +var ieee754 = require('ieee754') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +var K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by ' + + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + var arr = new Uint8Array(1) + arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } + return arr.foo() === 42 + } catch (e) { + return false + } +} + +Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.buffer + } +}) + +Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.byteOffset + } +}) + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"') + } + // Return an augmented `Uint8Array` instance + var buf = new Uint8Array(length) + buf.__proto__ = Buffer.prototype + return buf +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 +if (typeof Symbol !== 'undefined' && Symbol.species != null && + Buffer[Symbol.species] === Buffer) { + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true, + enumerable: false, + writable: false + }) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + if (ArrayBuffer.isView(value)) { + return fromArrayLike(value) + } + + if (value == null) { + throw TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) + } + + if (isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ) + } + + var valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length) + } + + var b = fromObject(value) + if (b) return b + + if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function') { + return Buffer.from( + value[Symbol.toPrimitive]('string'), encodingOrOffset, length + ) + } + + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Buffer.prototype.__proto__ = Uint8Array.prototype +Buffer.__proto__ = Uint8Array + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + var length = byteLength(string, encoding) | 0 + var buf = createBuffer(length) + + var actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + var buf = createBuffer(length) + for (var i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + + var buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + buf.__proto__ = Buffer.prototype + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + var buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj.length !== undefined) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return b != null && b._isBuffer === true && + b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false +} + +Buffer.compare = function compare (a, b) { + if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ) + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (isInstance(buf, Uint8Array)) { + buf = Buffer.from(buf) + } + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + 'Received type ' + typeof string + ) + } + + var len = string.length + var mustMatch = (arguments.length > 2 && arguments[2] === true) + if (!mustMatch && len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 + } + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.toLocaleString = Buffer.prototype.toString + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() + if (this.length > max) str += ' ... ' + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength) + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + 'Received type ' + (typeof target) + ) + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + var strLen = string.length + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + newBuf.__proto__ = Buffer.prototype + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('Index out of range') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + + if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end) + } else if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (var i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || + encoding === 'latin1') { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code + } + } + } else if (typeof val === 'number') { + val = val & 255 + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : Buffer.from(val, encoding) + var len = bytes.length + if (len === 0) { + throw new TypeError('The value "' + val + + '" is invalid for argument "value"') + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node takes equal signs as end of the Base64 encoding + str = str.split('=')[0] + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass +// the `instanceof` check but they should be treated as of that type. +// See: https://github.com/feross/buffer/issues/166 +function isInstance (obj, type) { + return obj instanceof type || + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) +} +function numberIsNaN (obj) { + // For IE11 support + return obj !== obj // eslint-disable-line no-self-compare +} + +},{"base64-js":14,"ieee754":15}],"wkx":[function(require,module,exports){ +exports.Types = require('./types'); +exports.Geometry = require('./geometry'); +exports.Point = require('./point'); +exports.LineString = require('./linestring'); +exports.Polygon = require('./polygon'); +exports.MultiPoint = require('./multipoint'); +exports.MultiLineString = require('./multilinestring'); +exports.MultiPolygon = require('./multipolygon'); +exports.GeometryCollection = require('./geometrycollection'); +},{"./geometry":3,"./geometrycollection":4,"./linestring":5,"./multilinestring":6,"./multipoint":7,"./multipolygon":8,"./point":9,"./polygon":10,"./types":11}]},{},["wkx"]); diff --git a/node_modules/wkx/dist/wkx.min.js b/node_modules/wkx/dist/wkx.min.js new file mode 100644 index 00000000..6c3a8225 --- /dev/null +++ b/node_modules/wkx/dist/wkx.min.js @@ -0,0 +1 @@ +require=function o(s,a,h){function u(e,t){if(!a[e]){if(!s[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(p)return p(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var i=a[e]={exports:{}};s[e][0].call(i.exports,function(t){return u(s[e][1][t]||t)},i,i.exports,o,s,a,h)}return a[e].exports}for(var p="function"==typeof require&&require,t=0;t>>=7,e++;return this.writeUInt8(127&t),e},t.prototype.ensureSize=function(t){if(this.buffer.length>4),r.precisionFactor=Math.pow(10,r.precision),r.hasBoundingBox=i>>0&1,r.hasSizeAttribute=i>>1&1,r.hasIdList=i>>2&1,r.hasExtendedPrecision=i>>3&1,r.isEmpty=i>>4&1,r.hasExtendedPrecision){var s=e.readUInt8();r.hasZ=1==(1&s),r.hasM=2==(2&s),r.zPrecision=b.decode((28&s)>>2),r.zPrecisionFactor=Math.pow(10,r.zPrecision),r.mPrecision=b.decode((224&s)>>5),r.mPrecisionFactor=Math.pow(10,r.mPrecision)}else r.hasZ=!1,r.hasM=!1;if(r.hasSizeAttribute&&e.readVarInt(),r.hasBoundingBox){var a=2;r.hasZ&&a++,r.hasM&&a++;for(var h=0;h>>0,!0),t.writeUInt32LE(this.srid),t.writeBuffer(e.slice(5)),t.buffer},i.prototype._getWktType=function(t,e){var r=t;return this.hasZ&&this.hasM?r+=" ZM ":this.hasZ?r+=" Z ":this.hasM&&(r+=" M "),!e||this.hasZ||this.hasM||(r+=" "),e&&(r+="EMPTY"),r},i.prototype._getWktCoordinate=function(t){var e=t.x+" "+t.y;return this.hasZ&&(e+=" "+t.z),this.hasM&&(e+=" "+t.m),e},i.prototype._writeWkbType=function(t,e,r){var n=0;void 0!==this.srid||r&&void 0!==r.srid?(this.hasZ&&(n|=2147483648),this.hasM&&(n|=1073741824)):this.hasZ&&this.hasM?n+=3e3:this.hasZ?n+=1e3:this.hasM&&(n+=2e3),t.writeUInt32LE(n+e>>>0,!0)},i.getTwkbPrecision=function(t,e,r){return{xy:t,z:e,m:r,xyFactor:Math.pow(10,t),zFactor:Math.pow(10,e),mFactor:Math.pow(10,r)}},i.prototype._writeTwkbHeader=function(t,e,r,n){var i=(b.encode(r.xy)<<4)+e,o=(this.hasZ||this.hasM)<<3;if(o+=n<<4,t.writeUInt8(i),t.writeUInt8(o),this.hasZ||this.hasM){var s=0;this.hasZ&&(s|=1),this.hasM&&(s|=2),t.writeUInt8(s)}},i.prototype.toGeoJSON=function(t){var e={};return this.srid&&t&&(t.shortCrs?e.crs={type:"name",properties:{name:"EPSG:"+this.srid}}:t.longCrs&&(e.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+this.srid}})),e}}).call(this,{isBuffer:t("../node_modules/is-buffer/index.js")})},{"../node_modules/is-buffer/index.js":17,"./binaryreader":1,"./binarywriter":2,"./geometrycollection":4,"./linestring":5,"./multilinestring":6,"./multipoint":7,"./multipolygon":8,"./point":9,"./polygon":10,"./types":11,"./wktparser":12,"./zigzag.js":13}],4:[function(t,e,r){e.exports=a;var n=t("util"),i=t("./types"),o=t("./geometry"),s=t("./binarywriter");function a(t,e){o.call(this),this.geometries=t||[],this.srid=e,0>31},decode:function(t){return t>>1^-(1&t)}}},{}],14:[function(t,e,r){"use strict";r.byteLength=function(t){var e=f(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){for(var e,r=f(t),n=r[0],i=r[1],o=new p(function(t,e,r){return 3*(e+r)/4-r}(0,n,i)),s=0,a=0>16&255,o[s++]=e>>8&255,o[s++]=255&e;2===i&&(e=u[t.charCodeAt(h)]<<2|u[t.charCodeAt(h+1)]>>4,o[s++]=255&e);1===i&&(e=u[t.charCodeAt(h)]<<10|u[t.charCodeAt(h+1)]<<4|u[t.charCodeAt(h+2)]>>2,o[s++]=e>>8&255,o[s++]=255&e);return o},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,i=[],o=0,s=r-n;o>2]+a[e<<4&63]+"==")):2==n&&(e=(t[r-2]<<8)+t[r-1],i.push(a[e>>10]+a[e>>4&63]+a[e<<2&63]+"="));return i.join("")};for(var a=[],u=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=n.length;i>18&63]+a[i>>12&63]+a[i>>6&63]+a[63&i]);return o.join("")}u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63},{}],15:[function(t,e,r){r.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,h=(1<>1,p=-7,f=r?i-1:0,c=r?-1:1,l=t[e+f];for(f+=c,o=l&(1<<-p)-1,l>>=-p,p+=a;0>=-p,p+=n;0>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,g=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=p):(s=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-s))<1&&(s--,h*=2),2<=(e+=1<=s+f?c/h:c*Math.pow(2,1-f))*h&&(s++,h/=2),p<=s+f?(a=0,s=p):1<=s+f?(a=(e*h-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));8<=i;t[r+l]=255&a,l+=g,a/=256,i-=8);for(s=s<>>1;case"base64":return R(t).length;default:if(i)return n?-1:O(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){var o,s=1,a=t.length,h=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a/=s=2,h/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var p=-1;for(o=r;o>>10&1023|55296),p=56320|1023&p),n.push(p),i+=f}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":return S(this,e,r);case"utf8":case"utf-8":return m(this,e,r);case"ascii":return M(this,e,r);case"latin1":case"binary":return E(this,e,r);case"base64":return v(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),""},f.prototype.compare=function(t,e,r,n,i){if(U(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(i<=n&&r<=e)return 0;if(i<=n)return-1;if(r<=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),h=this.slice(n,i),u=t.slice(e,r),p=0;p>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||ithis.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var o,s,a,h,u,p,f,c,l,g=!1;;)switch(n){case"hex":return d(this,t,e,r);case"utf8":case"utf-8":return c=e,l=r,B(O(t,(f=this).length-c),f,c,l);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return b(this,t,e,r);case"base64":return h=this,u=e,p=r,B(R(t),h,u,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s=e,a=r,B(function(t,e){for(var r,n,i,o=[],s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,(o=this).length-s),o,s,a);default:if(g)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),g=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function M(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;it.length)throw new RangeError("Index out of range")}function T(t,e,r,n){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Z(t,e,r,n,i){return e=+e,r>>>=0,i||T(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,i){return e=+e,r>>>=0,i||T(t,0,r,8),o.write(t,e,r,n,52,8),r+8}f.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):r>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t+--e],i=1;0>>=0,e||I(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||I(t,e,this.length);for(var n=e,i=1,o=this[t+--n];0>>=0,e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(t,e){t>>>=0,e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,e){return t>>>=0,e||I(t,4,this.length),o.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||I(t,4,this.length),o.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||I(t,8,this.length),o.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||I(t,8,this.length),o.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||x(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n||x(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;0<=--i&&(o*=256);)this[e+i]=t/o&255;return e+r},f.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);x(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},f.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);x(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;0<=--o&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeFloatLE=function(t,e,r){return Z(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return Z(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r=r||0,n||0===n||(n=this.length),e>=t.length&&(e=t.length),e=e||0,0=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(t=t||0))for(o=e;o>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function R(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function B(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function U(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function G(t){return t!=t}},{"base64-js":14,ieee754:15}],wkx:[function(t,e,r){r.Types=t("./types"),r.Geometry=t("./geometry"),r.Point=t("./point"),r.LineString=t("./linestring"),r.Polygon=t("./polygon"),r.MultiPoint=t("./multipoint"),r.MultiLineString=t("./multilinestring"),r.MultiPolygon=t("./multipolygon"),r.GeometryCollection=t("./geometrycollection")},{"./geometry":3,"./geometrycollection":4,"./linestring":5,"./multilinestring":6,"./multipoint":7,"./multipolygon":8,"./point":9,"./polygon":10,"./types":11}]},{},["wkx"]); diff --git a/node_modules/wkx/lib/binaryreader.js b/node_modules/wkx/lib/binaryreader.js new file mode 100644 index 00000000..16753375 --- /dev/null +++ b/node_modules/wkx/lib/binaryreader.js @@ -0,0 +1,47 @@ +module.exports = BinaryReader; + +function BinaryReader(buffer, isBigEndian) { + this.buffer = buffer; + this.position = 0; + this.isBigEndian = isBigEndian || false; +} + +function _read(readLE, readBE, size) { + return function () { + var value; + + if (this.isBigEndian) + value = readBE.call(this.buffer, this.position); + else + value = readLE.call(this.buffer, this.position); + + this.position += size; + + return value; + }; +} + +BinaryReader.prototype.readUInt8 = _read(Buffer.prototype.readUInt8, Buffer.prototype.readUInt8, 1); +BinaryReader.prototype.readUInt16 = _read(Buffer.prototype.readUInt16LE, Buffer.prototype.readUInt16BE, 2); +BinaryReader.prototype.readUInt32 = _read(Buffer.prototype.readUInt32LE, Buffer.prototype.readUInt32BE, 4); +BinaryReader.prototype.readInt8 = _read(Buffer.prototype.readInt8, Buffer.prototype.readInt8, 1); +BinaryReader.prototype.readInt16 = _read(Buffer.prototype.readInt16LE, Buffer.prototype.readInt16BE, 2); +BinaryReader.prototype.readInt32 = _read(Buffer.prototype.readInt32LE, Buffer.prototype.readInt32BE, 4); +BinaryReader.prototype.readFloat = _read(Buffer.prototype.readFloatLE, Buffer.prototype.readFloatBE, 4); +BinaryReader.prototype.readDouble = _read(Buffer.prototype.readDoubleLE, Buffer.prototype.readDoubleBE, 8); + +BinaryReader.prototype.readVarInt = function () { + var nextByte, + result = 0, + bytesRead = 0; + + do { + nextByte = this.buffer[this.position + bytesRead]; + result += (nextByte & 0x7F) << (7 * bytesRead); + bytesRead++; + } while (nextByte >= 0x80); + + this.position += bytesRead; + + return result; +}; diff --git a/node_modules/wkx/lib/binarywriter.js b/node_modules/wkx/lib/binarywriter.js new file mode 100644 index 00000000..99dc4546 --- /dev/null +++ b/node_modules/wkx/lib/binarywriter.js @@ -0,0 +1,65 @@ +module.exports = BinaryWriter; + +function BinaryWriter(size, allowResize) { + this.buffer = new Buffer(size); + this.position = 0; + this.allowResize = allowResize; +} + +function _write(write, size) { + return function (value, noAssert) { + this.ensureSize(size); + + write.call(this.buffer, value, this.position, noAssert); + this.position += size; + }; +} + +BinaryWriter.prototype.writeUInt8 = _write(Buffer.prototype.writeUInt8, 1); +BinaryWriter.prototype.writeUInt16LE = _write(Buffer.prototype.writeUInt16LE, 2); +BinaryWriter.prototype.writeUInt16BE = _write(Buffer.prototype.writeUInt16BE, 2); +BinaryWriter.prototype.writeUInt32LE = _write(Buffer.prototype.writeUInt32LE, 4); +BinaryWriter.prototype.writeUInt32BE = _write(Buffer.prototype.writeUInt32BE, 4); +BinaryWriter.prototype.writeInt8 = _write(Buffer.prototype.writeInt8, 1); +BinaryWriter.prototype.writeInt16LE = _write(Buffer.prototype.writeInt16LE, 2); +BinaryWriter.prototype.writeInt16BE = _write(Buffer.prototype.writeInt16BE, 2); +BinaryWriter.prototype.writeInt32LE = _write(Buffer.prototype.writeInt32LE, 4); +BinaryWriter.prototype.writeInt32BE = _write(Buffer.prototype.writeInt32BE, 4); +BinaryWriter.prototype.writeFloatLE = _write(Buffer.prototype.writeFloatLE, 4); +BinaryWriter.prototype.writeFloatBE = _write(Buffer.prototype.writeFloatBE, 4); +BinaryWriter.prototype.writeDoubleLE = _write(Buffer.prototype.writeDoubleLE, 8); +BinaryWriter.prototype.writeDoubleBE = _write(Buffer.prototype.writeDoubleBE, 8); + +BinaryWriter.prototype.writeBuffer = function (buffer) { + this.ensureSize(buffer.length); + + buffer.copy(this.buffer, this.position, 0, buffer.length); + this.position += buffer.length; +}; + +BinaryWriter.prototype.writeVarInt = function (value) { + var length = 1; + + while ((value & 0xFFFFFF80) !== 0) { + this.writeUInt8((value & 0x7F) | 0x80); + value >>>= 7; + length++; + } + + this.writeUInt8(value & 0x7F); + + return length; +}; + +BinaryWriter.prototype.ensureSize = function (size) { + if (this.buffer.length < this.position + size) { + if (this.allowResize) { + var tempBuffer = new Buffer(this.position + size); + this.buffer.copy(tempBuffer, 0, 0, this.buffer.length); + this.buffer = tempBuffer; + } + else { + throw new RangeError('index out of range'); + } + } +}; diff --git a/node_modules/wkx/lib/geometry.js b/node_modules/wkx/lib/geometry.js new file mode 100644 index 00000000..37d1bef1 --- /dev/null +++ b/node_modules/wkx/lib/geometry.js @@ -0,0 +1,384 @@ +module.exports = Geometry; + +var Types = require('./types'); +var Point = require('./point'); +var LineString = require('./linestring'); +var Polygon = require('./polygon'); +var MultiPoint = require('./multipoint'); +var MultiLineString = require('./multilinestring'); +var MultiPolygon = require('./multipolygon'); +var GeometryCollection = require('./geometrycollection'); +var BinaryReader = require('./binaryreader'); +var BinaryWriter = require('./binarywriter'); +var WktParser = require('./wktparser'); +var ZigZag = require('./zigzag.js'); + +function Geometry() { + this.srid = undefined; + this.hasZ = false; + this.hasM = false; +} + +Geometry.parse = function (value, options) { + var valueType = typeof value; + + if (valueType === 'string' || value instanceof WktParser) + return Geometry._parseWkt(value); + else if (Buffer.isBuffer(value) || value instanceof BinaryReader) + return Geometry._parseWkb(value, options); + else + throw new Error('first argument must be a string or Buffer'); +}; + +Geometry._parseWkt = function (value) { + var wktParser, + srid; + + if (value instanceof WktParser) + wktParser = value; + else + wktParser = new WktParser(value); + + var match = wktParser.matchRegex([/^SRID=(\d+);/]); + if (match) + srid = parseInt(match[1], 10); + + var geometryType = wktParser.matchType(); + var dimension = wktParser.matchDimension(); + + var options = { + srid: srid, + hasZ: dimension.hasZ, + hasM: dimension.hasM + }; + + switch (geometryType) { + case Types.wkt.Point: + return Point._parseWkt(wktParser, options); + case Types.wkt.LineString: + return LineString._parseWkt(wktParser, options); + case Types.wkt.Polygon: + return Polygon._parseWkt(wktParser, options); + case Types.wkt.MultiPoint: + return MultiPoint._parseWkt(wktParser, options); + case Types.wkt.MultiLineString: + return MultiLineString._parseWkt(wktParser, options); + case Types.wkt.MultiPolygon: + return MultiPolygon._parseWkt(wktParser, options); + case Types.wkt.GeometryCollection: + return GeometryCollection._parseWkt(wktParser, options); + } +}; + +Geometry._parseWkb = function (value, parentOptions) { + var binaryReader, + wkbType, + geometryType, + options = {}; + + if (value instanceof BinaryReader) + binaryReader = value; + else + binaryReader = new BinaryReader(value); + + binaryReader.isBigEndian = !binaryReader.readInt8(); + + wkbType = binaryReader.readUInt32(); + + options.hasSrid = (wkbType & 0x20000000) === 0x20000000; + options.isEwkb = (wkbType & 0x20000000) || (wkbType & 0x40000000) || (wkbType & 0x80000000); + + if (options.hasSrid) + options.srid = binaryReader.readUInt32(); + + options.hasZ = false; + options.hasM = false; + + if (!options.isEwkb && (!parentOptions || !parentOptions.isEwkb)) { + if (wkbType >= 1000 && wkbType < 2000) { + options.hasZ = true; + geometryType = wkbType - 1000; + } + else if (wkbType >= 2000 && wkbType < 3000) { + options.hasM = true; + geometryType = wkbType - 2000; + } + else if (wkbType >= 3000 && wkbType < 4000) { + options.hasZ = true; + options.hasM = true; + geometryType = wkbType - 3000; + } + else { + geometryType = wkbType; + } + } + else { + if (wkbType & 0x80000000) + options.hasZ = true; + if (wkbType & 0x40000000) + options.hasM = true; + + geometryType = wkbType & 0xF; + } + + switch (geometryType) { + case Types.wkb.Point: + return Point._parseWkb(binaryReader, options); + case Types.wkb.LineString: + return LineString._parseWkb(binaryReader, options); + case Types.wkb.Polygon: + return Polygon._parseWkb(binaryReader, options); + case Types.wkb.MultiPoint: + return MultiPoint._parseWkb(binaryReader, options); + case Types.wkb.MultiLineString: + return MultiLineString._parseWkb(binaryReader, options); + case Types.wkb.MultiPolygon: + return MultiPolygon._parseWkb(binaryReader, options); + case Types.wkb.GeometryCollection: + return GeometryCollection._parseWkb(binaryReader, options); + default: + throw new Error('GeometryType ' + geometryType + ' not supported'); + } +}; + +Geometry.parseTwkb = function (value) { + var binaryReader, + options = {}; + + if (value instanceof BinaryReader) + binaryReader = value; + else + binaryReader = new BinaryReader(value); + + var type = binaryReader.readUInt8(); + var metadataHeader = binaryReader.readUInt8(); + + var geometryType = type & 0x0F; + options.precision = ZigZag.decode(type >> 4); + options.precisionFactor = Math.pow(10, options.precision); + + options.hasBoundingBox = metadataHeader >> 0 & 1; + options.hasSizeAttribute = metadataHeader >> 1 & 1; + options.hasIdList = metadataHeader >> 2 & 1; + options.hasExtendedPrecision = metadataHeader >> 3 & 1; + options.isEmpty = metadataHeader >> 4 & 1; + + if (options.hasExtendedPrecision) { + var extendedPrecision = binaryReader.readUInt8(); + options.hasZ = (extendedPrecision & 0x01) === 0x01; + options.hasM = (extendedPrecision & 0x02) === 0x02; + + options.zPrecision = ZigZag.decode((extendedPrecision & 0x1C) >> 2); + options.zPrecisionFactor = Math.pow(10, options.zPrecision); + + options.mPrecision = ZigZag.decode((extendedPrecision & 0xE0) >> 5); + options.mPrecisionFactor = Math.pow(10, options.mPrecision); + } + else { + options.hasZ = false; + options.hasM = false; + } + + if (options.hasSizeAttribute) + binaryReader.readVarInt(); + if (options.hasBoundingBox) { + var dimensions = 2; + + if (options.hasZ) + dimensions++; + if (options.hasM) + dimensions++; + + for (var i = 0; i < dimensions; i++) { + binaryReader.readVarInt(); + binaryReader.readVarInt(); + } + } + + switch (geometryType) { + case Types.wkb.Point: + return Point._parseTwkb(binaryReader, options); + case Types.wkb.LineString: + return LineString._parseTwkb(binaryReader, options); + case Types.wkb.Polygon: + return Polygon._parseTwkb(binaryReader, options); + case Types.wkb.MultiPoint: + return MultiPoint._parseTwkb(binaryReader, options); + case Types.wkb.MultiLineString: + return MultiLineString._parseTwkb(binaryReader, options); + case Types.wkb.MultiPolygon: + return MultiPolygon._parseTwkb(binaryReader, options); + case Types.wkb.GeometryCollection: + return GeometryCollection._parseTwkb(binaryReader, options); + default: + throw new Error('GeometryType ' + geometryType + ' not supported'); + } +}; + +Geometry.parseGeoJSON = function (value) { + return Geometry._parseGeoJSON(value); +}; + +Geometry._parseGeoJSON = function (value, isSubGeometry) { + var geometry; + + switch (value.type) { + case Types.geoJSON.Point: + geometry = Point._parseGeoJSON(value); break; + case Types.geoJSON.LineString: + geometry = LineString._parseGeoJSON(value); break; + case Types.geoJSON.Polygon: + geometry = Polygon._parseGeoJSON(value); break; + case Types.geoJSON.MultiPoint: + geometry = MultiPoint._parseGeoJSON(value); break; + case Types.geoJSON.MultiLineString: + geometry = MultiLineString._parseGeoJSON(value); break; + case Types.geoJSON.MultiPolygon: + geometry = MultiPolygon._parseGeoJSON(value); break; + case Types.geoJSON.GeometryCollection: + geometry = GeometryCollection._parseGeoJSON(value); break; + default: + throw new Error('GeometryType ' + value.type + ' not supported'); + } + + if (value.crs && value.crs.type && value.crs.type === 'name' && value.crs.properties && value.crs.properties.name) { + var crs = value.crs.properties.name; + + if (crs.indexOf('EPSG:') === 0) + geometry.srid = parseInt(crs.substring(5)); + else if (crs.indexOf('urn:ogc:def:crs:EPSG::') === 0) + geometry.srid = parseInt(crs.substring(22)); + else + throw new Error('Unsupported crs: ' + crs); + } + else if (!isSubGeometry) { + geometry.srid = 4326; + } + + return geometry; +}; + +Geometry.prototype.toEwkt = function () { + return 'SRID=' + this.srid + ';' + this.toWkt(); +}; + +Geometry.prototype.toEwkb = function () { + var ewkb = new BinaryWriter(this._getWkbSize() + 4); + var wkb = this.toWkb(); + + ewkb.writeInt8(1); + ewkb.writeUInt32LE((wkb.slice(1, 5).readUInt32LE(0) | 0x20000000) >>> 0, true); + ewkb.writeUInt32LE(this.srid); + + ewkb.writeBuffer(wkb.slice(5)); + + return ewkb.buffer; +}; + +Geometry.prototype._getWktType = function (wktType, isEmpty) { + var wkt = wktType; + + if (this.hasZ && this.hasM) + wkt += ' ZM '; + else if (this.hasZ) + wkt += ' Z '; + else if (this.hasM) + wkt += ' M '; + + if (isEmpty && !this.hasZ && !this.hasM) + wkt += ' '; + + if (isEmpty) + wkt += 'EMPTY'; + + return wkt; +}; + +Geometry.prototype._getWktCoordinate = function (point) { + var coordinates = point.x + ' ' + point.y; + + if (this.hasZ) + coordinates += ' ' + point.z; + if (this.hasM) + coordinates += ' ' + point.m; + + return coordinates; +}; + +Geometry.prototype._writeWkbType = function (wkb, geometryType, parentOptions) { + var dimensionType = 0; + + if (typeof this.srid === 'undefined' && (!parentOptions || typeof parentOptions.srid === 'undefined')) { + if (this.hasZ && this.hasM) + dimensionType += 3000; + else if (this.hasZ) + dimensionType += 1000; + else if (this.hasM) + dimensionType += 2000; + } + else { + if (this.hasZ) + dimensionType |= 0x80000000; + if (this.hasM) + dimensionType |= 0x40000000; + } + + wkb.writeUInt32LE((dimensionType + geometryType) >>> 0, true); +}; + +Geometry.getTwkbPrecision = function (xyPrecision, zPrecision, mPrecision) { + return { + xy: xyPrecision, + z: zPrecision, + m: mPrecision, + xyFactor: Math.pow(10, xyPrecision), + zFactor: Math.pow(10, zPrecision), + mFactor: Math.pow(10, mPrecision) + }; +}; + +Geometry.prototype._writeTwkbHeader = function (twkb, geometryType, precision, isEmpty) { + var type = (ZigZag.encode(precision.xy) << 4) + geometryType; + var metadataHeader = (this.hasZ || this.hasM) << 3; + metadataHeader += isEmpty << 4; + + twkb.writeUInt8(type); + twkb.writeUInt8(metadataHeader); + + if (this.hasZ || this.hasM) { + var extendedPrecision = 0; + if (this.hasZ) + extendedPrecision |= 0x1; + if (this.hasM) + extendedPrecision |= 0x2; + + twkb.writeUInt8(extendedPrecision); + } +}; + +Geometry.prototype.toGeoJSON = function (options) { + var geoJSON = {}; + + if (this.srid) { + if (options) { + if (options.shortCrs) { + geoJSON.crs = { + type: 'name', + properties: { + name: 'EPSG:' + this.srid + } + }; + } + else if (options.longCrs) { + geoJSON.crs = { + type: 'name', + properties: { + name: 'urn:ogc:def:crs:EPSG::' + this.srid + } + }; + } + } + } + + return geoJSON; +}; diff --git a/node_modules/wkx/lib/geometrycollection.js b/node_modules/wkx/lib/geometrycollection.js new file mode 100644 index 00000000..a886111b --- /dev/null +++ b/node_modules/wkx/lib/geometrycollection.js @@ -0,0 +1,169 @@ +module.exports = GeometryCollection; + +var util = require('util'); + +var Types = require('./types'); +var Geometry = require('./geometry'); +var BinaryWriter = require('./binarywriter'); + +function GeometryCollection(geometries, srid) { + Geometry.call(this); + + this.geometries = geometries || []; + this.srid = srid; + + if (this.geometries.length > 0) { + this.hasZ = this.geometries[0].hasZ; + this.hasM = this.geometries[0].hasM; + } +} + +util.inherits(GeometryCollection, Geometry); + +GeometryCollection.Z = function (geometries, srid) { + var geometryCollection = new GeometryCollection(geometries, srid); + geometryCollection.hasZ = true; + return geometryCollection; +}; + +GeometryCollection.M = function (geometries, srid) { + var geometryCollection = new GeometryCollection(geometries, srid); + geometryCollection.hasM = true; + return geometryCollection; +}; + +GeometryCollection.ZM = function (geometries, srid) { + var geometryCollection = new GeometryCollection(geometries, srid); + geometryCollection.hasZ = true; + geometryCollection.hasM = true; + return geometryCollection; +}; + +GeometryCollection._parseWkt = function (value, options) { + var geometryCollection = new GeometryCollection(); + geometryCollection.srid = options.srid; + geometryCollection.hasZ = options.hasZ; + geometryCollection.hasM = options.hasM; + + if (value.isMatch(['EMPTY'])) + return geometryCollection; + + value.expectGroupStart(); + + do { + geometryCollection.geometries.push(Geometry.parse(value)); + } while (value.isMatch([','])); + + value.expectGroupEnd(); + + return geometryCollection; +}; + +GeometryCollection._parseWkb = function (value, options) { + var geometryCollection = new GeometryCollection(); + geometryCollection.srid = options.srid; + geometryCollection.hasZ = options.hasZ; + geometryCollection.hasM = options.hasM; + + var geometryCount = value.readUInt32(); + + for (var i = 0; i < geometryCount; i++) + geometryCollection.geometries.push(Geometry.parse(value, options)); + + return geometryCollection; +}; + +GeometryCollection._parseTwkb = function (value, options) { + var geometryCollection = new GeometryCollection(); + geometryCollection.hasZ = options.hasZ; + geometryCollection.hasM = options.hasM; + + if (options.isEmpty) + return geometryCollection; + + var geometryCount = value.readVarInt(); + + for (var i = 0; i < geometryCount; i++) + geometryCollection.geometries.push(Geometry.parseTwkb(value)); + + return geometryCollection; +}; + +GeometryCollection._parseGeoJSON = function (value) { + var geometryCollection = new GeometryCollection(); + + for (var i = 0; i < value.geometries.length; i++) + geometryCollection.geometries.push(Geometry._parseGeoJSON(value.geometries[i], true)); + + if (geometryCollection.geometries.length > 0) + geometryCollection.hasZ = geometryCollection.geometries[0].hasZ; + + return geometryCollection; +}; + +GeometryCollection.prototype.toWkt = function () { + if (this.geometries.length === 0) + return this._getWktType(Types.wkt.GeometryCollection, true); + + var wkt = this._getWktType(Types.wkt.GeometryCollection, false) + '('; + + for (var i = 0; i < this.geometries.length; i++) + wkt += this.geometries[i].toWkt() + ','; + + wkt = wkt.slice(0, -1); + wkt += ')'; + + return wkt; +}; + +GeometryCollection.prototype.toWkb = function () { + var wkb = new BinaryWriter(this._getWkbSize()); + + wkb.writeInt8(1); + + this._writeWkbType(wkb, Types.wkb.GeometryCollection); + wkb.writeUInt32LE(this.geometries.length); + + for (var i = 0; i < this.geometries.length; i++) + wkb.writeBuffer(this.geometries[i].toWkb({ srid: this.srid })); + + return wkb.buffer; +}; + +GeometryCollection.prototype.toTwkb = function () { + var twkb = new BinaryWriter(0, true); + + var precision = Geometry.getTwkbPrecision(5, 0, 0); + var isEmpty = this.geometries.length === 0; + + this._writeTwkbHeader(twkb, Types.wkb.GeometryCollection, precision, isEmpty); + + if (this.geometries.length > 0) { + twkb.writeVarInt(this.geometries.length); + + for (var i = 0; i < this.geometries.length; i++) + twkb.writeBuffer(this.geometries[i].toTwkb()); + } + + return twkb.buffer; +}; + +GeometryCollection.prototype._getWkbSize = function () { + var size = 1 + 4 + 4; + + for (var i = 0; i < this.geometries.length; i++) + size += this.geometries[i]._getWkbSize(); + + return size; +}; + +GeometryCollection.prototype.toGeoJSON = function (options) { + var geoJSON = Geometry.prototype.toGeoJSON.call(this, options); + geoJSON.type = Types.geoJSON.GeometryCollection; + geoJSON.geometries = []; + + for (var i = 0; i < this.geometries.length; i++) + geoJSON.geometries.push(this.geometries[i].toGeoJSON()); + + return geoJSON; +}; diff --git a/node_modules/wkx/lib/linestring.js b/node_modules/wkx/lib/linestring.js new file mode 100644 index 00000000..fd245d98 --- /dev/null +++ b/node_modules/wkx/lib/linestring.js @@ -0,0 +1,178 @@ +module.exports = LineString; + +var util = require('util'); + +var Geometry = require('./geometry'); +var Types = require('./types'); +var Point = require('./point'); +var BinaryWriter = require('./binarywriter'); + +function LineString(points, srid) { + Geometry.call(this); + + this.points = points || []; + this.srid = srid; + + if (this.points.length > 0) { + this.hasZ = this.points[0].hasZ; + this.hasM = this.points[0].hasM; + } +} + +util.inherits(LineString, Geometry); + +LineString.Z = function (points, srid) { + var lineString = new LineString(points, srid); + lineString.hasZ = true; + return lineString; +}; + +LineString.M = function (points, srid) { + var lineString = new LineString(points, srid); + lineString.hasM = true; + return lineString; +}; + +LineString.ZM = function (points, srid) { + var lineString = new LineString(points, srid); + lineString.hasZ = true; + lineString.hasM = true; + return lineString; +}; + +LineString._parseWkt = function (value, options) { + var lineString = new LineString(); + lineString.srid = options.srid; + lineString.hasZ = options.hasZ; + lineString.hasM = options.hasM; + + if (value.isMatch(['EMPTY'])) + return lineString; + + value.expectGroupStart(); + lineString.points.push.apply(lineString.points, value.matchCoordinates(options)); + value.expectGroupEnd(); + + return lineString; +}; + +LineString._parseWkb = function (value, options) { + var lineString = new LineString(); + lineString.srid = options.srid; + lineString.hasZ = options.hasZ; + lineString.hasM = options.hasM; + + var pointCount = value.readUInt32(); + + for (var i = 0; i < pointCount; i++) + lineString.points.push(Point._readWkbPoint(value, options)); + + return lineString; +}; + +LineString._parseTwkb = function (value, options) { + var lineString = new LineString(); + lineString.hasZ = options.hasZ; + lineString.hasM = options.hasM; + + if (options.isEmpty) + return lineString; + + var previousPoint = new Point(0, 0, options.hasZ ? 0 : undefined, options.hasM ? 0 : undefined); + var pointCount = value.readVarInt(); + + for (var i = 0; i < pointCount; i++) + lineString.points.push(Point._readTwkbPoint(value, options, previousPoint)); + + return lineString; +}; + +LineString._parseGeoJSON = function (value) { + var lineString = new LineString(); + + if (value.coordinates.length > 0) + lineString.hasZ = value.coordinates[0].length > 2; + + for (var i = 0; i < value.coordinates.length; i++) + lineString.points.push(Point._readGeoJSONPoint(value.coordinates[i])); + + return lineString; +}; + +LineString.prototype.toWkt = function () { + if (this.points.length === 0) + return this._getWktType(Types.wkt.LineString, true); + + return this._getWktType(Types.wkt.LineString, false) + this._toInnerWkt(); +}; + +LineString.prototype._toInnerWkt = function () { + var innerWkt = '('; + + for (var i = 0; i < this.points.length; i++) + innerWkt += this._getWktCoordinate(this.points[i]) + ','; + + innerWkt = innerWkt.slice(0, -1); + innerWkt += ')'; + + return innerWkt; +}; + +LineString.prototype.toWkb = function (parentOptions) { + var wkb = new BinaryWriter(this._getWkbSize()); + + wkb.writeInt8(1); + + this._writeWkbType(wkb, Types.wkb.LineString, parentOptions); + wkb.writeUInt32LE(this.points.length); + + for (var i = 0; i < this.points.length; i++) + this.points[i]._writeWkbPoint(wkb); + + return wkb.buffer; +}; + +LineString.prototype.toTwkb = function () { + var twkb = new BinaryWriter(0, true); + + var precision = Geometry.getTwkbPrecision(5, 0, 0); + var isEmpty = this.points.length === 0; + + this._writeTwkbHeader(twkb, Types.wkb.LineString, precision, isEmpty); + + if (this.points.length > 0) { + twkb.writeVarInt(this.points.length); + + var previousPoint = new Point(0, 0, 0, 0); + for (var i = 0; i < this.points.length; i++) + this.points[i]._writeTwkbPoint(twkb, precision, previousPoint); + } + + return twkb.buffer; +}; + +LineString.prototype._getWkbSize = function () { + var coordinateSize = 16; + + if (this.hasZ) + coordinateSize += 8; + if (this.hasM) + coordinateSize += 8; + + return 1 + 4 + 4 + (this.points.length * coordinateSize); +}; + +LineString.prototype.toGeoJSON = function (options) { + var geoJSON = Geometry.prototype.toGeoJSON.call(this, options); + geoJSON.type = Types.geoJSON.LineString; + geoJSON.coordinates = []; + + for (var i = 0; i < this.points.length; i++) { + if (this.hasZ) + geoJSON.coordinates.push([this.points[i].x, this.points[i].y, this.points[i].z]); + else + geoJSON.coordinates.push([this.points[i].x, this.points[i].y]); + } + + return geoJSON; +}; diff --git a/node_modules/wkx/lib/multilinestring.js b/node_modules/wkx/lib/multilinestring.js new file mode 100644 index 00000000..c4176667 --- /dev/null +++ b/node_modules/wkx/lib/multilinestring.js @@ -0,0 +1,189 @@ +module.exports = MultiLineString; + +var util = require('util'); + +var Types = require('./types'); +var Geometry = require('./geometry'); +var Point = require('./point'); +var LineString = require('./linestring'); +var BinaryWriter = require('./binarywriter'); + +function MultiLineString(lineStrings, srid) { + Geometry.call(this); + + this.lineStrings = lineStrings || []; + this.srid = srid; + + if (this.lineStrings.length > 0) { + this.hasZ = this.lineStrings[0].hasZ; + this.hasM = this.lineStrings[0].hasM; + } +} + +util.inherits(MultiLineString, Geometry); + +MultiLineString.Z = function (lineStrings, srid) { + var multiLineString = new MultiLineString(lineStrings, srid); + multiLineString.hasZ = true; + return multiLineString; +}; + +MultiLineString.M = function (lineStrings, srid) { + var multiLineString = new MultiLineString(lineStrings, srid); + multiLineString.hasM = true; + return multiLineString; +}; + +MultiLineString.ZM = function (lineStrings, srid) { + var multiLineString = new MultiLineString(lineStrings, srid); + multiLineString.hasZ = true; + multiLineString.hasM = true; + return multiLineString; +}; + +MultiLineString._parseWkt = function (value, options) { + var multiLineString = new MultiLineString(); + multiLineString.srid = options.srid; + multiLineString.hasZ = options.hasZ; + multiLineString.hasM = options.hasM; + + if (value.isMatch(['EMPTY'])) + return multiLineString; + + value.expectGroupStart(); + + do { + value.expectGroupStart(); + multiLineString.lineStrings.push(new LineString(value.matchCoordinates(options))); + value.expectGroupEnd(); + } while (value.isMatch([','])); + + value.expectGroupEnd(); + + return multiLineString; +}; + +MultiLineString._parseWkb = function (value, options) { + var multiLineString = new MultiLineString(); + multiLineString.srid = options.srid; + multiLineString.hasZ = options.hasZ; + multiLineString.hasM = options.hasM; + + var lineStringCount = value.readUInt32(); + + for (var i = 0; i < lineStringCount; i++) + multiLineString.lineStrings.push(Geometry.parse(value, options)); + + return multiLineString; +}; + +MultiLineString._parseTwkb = function (value, options) { + var multiLineString = new MultiLineString(); + multiLineString.hasZ = options.hasZ; + multiLineString.hasM = options.hasM; + + if (options.isEmpty) + return multiLineString; + + var previousPoint = new Point(0, 0, options.hasZ ? 0 : undefined, options.hasM ? 0 : undefined); + var lineStringCount = value.readVarInt(); + + for (var i = 0; i < lineStringCount; i++) { + var lineString = new LineString(); + lineString.hasZ = options.hasZ; + lineString.hasM = options.hasM; + + var pointCount = value.readVarInt(); + + for (var j = 0; j < pointCount; j++) + lineString.points.push(Point._readTwkbPoint(value, options, previousPoint)); + + multiLineString.lineStrings.push(lineString); + } + + return multiLineString; +}; + +MultiLineString._parseGeoJSON = function (value) { + var multiLineString = new MultiLineString(); + + if (value.coordinates.length > 0 && value.coordinates[0].length > 0) + multiLineString.hasZ = value.coordinates[0][0].length > 2; + + for (var i = 0; i < value.coordinates.length; i++) + multiLineString.lineStrings.push(LineString._parseGeoJSON({ coordinates: value.coordinates[i] })); + + return multiLineString; +}; + +MultiLineString.prototype.toWkt = function () { + if (this.lineStrings.length === 0) + return this._getWktType(Types.wkt.MultiLineString, true); + + var wkt = this._getWktType(Types.wkt.MultiLineString, false) + '('; + + for (var i = 0; i < this.lineStrings.length; i++) + wkt += this.lineStrings[i]._toInnerWkt() + ','; + + wkt = wkt.slice(0, -1); + wkt += ')'; + + return wkt; +}; + +MultiLineString.prototype.toWkb = function () { + var wkb = new BinaryWriter(this._getWkbSize()); + + wkb.writeInt8(1); + + this._writeWkbType(wkb, Types.wkb.MultiLineString); + wkb.writeUInt32LE(this.lineStrings.length); + + for (var i = 0; i < this.lineStrings.length; i++) + wkb.writeBuffer(this.lineStrings[i].toWkb({ srid: this.srid })); + + return wkb.buffer; +}; + +MultiLineString.prototype.toTwkb = function () { + var twkb = new BinaryWriter(0, true); + + var precision = Geometry.getTwkbPrecision(5, 0, 0); + var isEmpty = this.lineStrings.length === 0; + + this._writeTwkbHeader(twkb, Types.wkb.MultiLineString, precision, isEmpty); + + if (this.lineStrings.length > 0) { + twkb.writeVarInt(this.lineStrings.length); + + var previousPoint = new Point(0, 0, 0, 0); + for (var i = 0; i < this.lineStrings.length; i++) { + twkb.writeVarInt(this.lineStrings[i].points.length); + + for (var j = 0; j < this.lineStrings[i].points.length; j++) + this.lineStrings[i].points[j]._writeTwkbPoint(twkb, precision, previousPoint); + } + } + + return twkb.buffer; +}; + +MultiLineString.prototype._getWkbSize = function () { + var size = 1 + 4 + 4; + + for (var i = 0; i < this.lineStrings.length; i++) + size += this.lineStrings[i]._getWkbSize(); + + return size; +}; + +MultiLineString.prototype.toGeoJSON = function (options) { + var geoJSON = Geometry.prototype.toGeoJSON.call(this, options); + geoJSON.type = Types.geoJSON.MultiLineString; + geoJSON.coordinates = []; + + for (var i = 0; i < this.lineStrings.length; i++) + geoJSON.coordinates.push(this.lineStrings[i].toGeoJSON().coordinates); + + return geoJSON; +}; diff --git a/node_modules/wkx/lib/multipoint.js b/node_modules/wkx/lib/multipoint.js new file mode 100644 index 00000000..7d1a887b --- /dev/null +++ b/node_modules/wkx/lib/multipoint.js @@ -0,0 +1,172 @@ +module.exports = MultiPoint; + +var util = require('util'); + +var Types = require('./types'); +var Geometry = require('./geometry'); +var Point = require('./point'); +var BinaryWriter = require('./binarywriter'); + +function MultiPoint(points, srid) { + Geometry.call(this); + + this.points = points || []; + this.srid = srid; + + if (this.points.length > 0) { + this.hasZ = this.points[0].hasZ; + this.hasM = this.points[0].hasM; + } +} + +util.inherits(MultiPoint, Geometry); + +MultiPoint.Z = function (points, srid) { + var multiPoint = new MultiPoint(points, srid); + multiPoint.hasZ = true; + return multiPoint; +}; + +MultiPoint.M = function (points, srid) { + var multiPoint = new MultiPoint(points, srid); + multiPoint.hasM = true; + return multiPoint; +}; + +MultiPoint.ZM = function (points, srid) { + var multiPoint = new MultiPoint(points, srid); + multiPoint.hasZ = true; + multiPoint.hasM = true; + return multiPoint; +}; + +MultiPoint._parseWkt = function (value, options) { + var multiPoint = new MultiPoint(); + multiPoint.srid = options.srid; + multiPoint.hasZ = options.hasZ; + multiPoint.hasM = options.hasM; + + if (value.isMatch(['EMPTY'])) + return multiPoint; + + value.expectGroupStart(); + multiPoint.points.push.apply(multiPoint.points, value.matchCoordinates(options)); + value.expectGroupEnd(); + + return multiPoint; +}; + +MultiPoint._parseWkb = function (value, options) { + var multiPoint = new MultiPoint(); + multiPoint.srid = options.srid; + multiPoint.hasZ = options.hasZ; + multiPoint.hasM = options.hasM; + + var pointCount = value.readUInt32(); + + for (var i = 0; i < pointCount; i++) + multiPoint.points.push(Geometry.parse(value, options)); + + return multiPoint; +}; + +MultiPoint._parseTwkb = function (value, options) { + var multiPoint = new MultiPoint(); + multiPoint.hasZ = options.hasZ; + multiPoint.hasM = options.hasM; + + if (options.isEmpty) + return multiPoint; + + var previousPoint = new Point(0, 0, options.hasZ ? 0 : undefined, options.hasM ? 0 : undefined); + var pointCount = value.readVarInt(); + + for (var i = 0; i < pointCount; i++) + multiPoint.points.push(Point._readTwkbPoint(value, options, previousPoint)); + + return multiPoint; +}; + +MultiPoint._parseGeoJSON = function (value) { + var multiPoint = new MultiPoint(); + + if (value.coordinates.length > 0) + multiPoint.hasZ = value.coordinates[0].length > 2; + + for (var i = 0; i < value.coordinates.length; i++) + multiPoint.points.push(Point._parseGeoJSON({ coordinates: value.coordinates[i] })); + + return multiPoint; +}; + +MultiPoint.prototype.toWkt = function () { + if (this.points.length === 0) + return this._getWktType(Types.wkt.MultiPoint, true); + + var wkt = this._getWktType(Types.wkt.MultiPoint, false) + '('; + + for (var i = 0; i < this.points.length; i++) + wkt += this._getWktCoordinate(this.points[i]) + ','; + + wkt = wkt.slice(0, -1); + wkt += ')'; + + return wkt; +}; + +MultiPoint.prototype.toWkb = function () { + var wkb = new BinaryWriter(this._getWkbSize()); + + wkb.writeInt8(1); + + this._writeWkbType(wkb, Types.wkb.MultiPoint); + wkb.writeUInt32LE(this.points.length); + + for (var i = 0; i < this.points.length; i++) + wkb.writeBuffer(this.points[i].toWkb({ srid: this.srid })); + + return wkb.buffer; +}; + +MultiPoint.prototype.toTwkb = function () { + var twkb = new BinaryWriter(0, true); + + var precision = Geometry.getTwkbPrecision(5, 0, 0); + var isEmpty = this.points.length === 0; + + this._writeTwkbHeader(twkb, Types.wkb.MultiPoint, precision, isEmpty); + + if (this.points.length > 0) { + twkb.writeVarInt(this.points.length); + + var previousPoint = new Point(0, 0, 0, 0); + for (var i = 0; i < this.points.length; i++) + this.points[i]._writeTwkbPoint(twkb, precision, previousPoint); + } + + return twkb.buffer; +}; + +MultiPoint.prototype._getWkbSize = function () { + var coordinateSize = 16; + + if (this.hasZ) + coordinateSize += 8; + if (this.hasM) + coordinateSize += 8; + + coordinateSize += 5; + + return 1 + 4 + 4 + (this.points.length * coordinateSize); +}; + +MultiPoint.prototype.toGeoJSON = function (options) { + var geoJSON = Geometry.prototype.toGeoJSON.call(this, options); + geoJSON.type = Types.geoJSON.MultiPoint; + geoJSON.coordinates = []; + + for (var i = 0; i < this.points.length; i++) + geoJSON.coordinates.push(this.points[i].toGeoJSON().coordinates); + + return geoJSON; +}; diff --git a/node_modules/wkx/lib/multipolygon.js b/node_modules/wkx/lib/multipolygon.js new file mode 100644 index 00000000..5c03ed2b --- /dev/null +++ b/node_modules/wkx/lib/multipolygon.js @@ -0,0 +1,226 @@ +module.exports = MultiPolygon; + +var util = require('util'); + +var Types = require('./types'); +var Geometry = require('./geometry'); +var Point = require('./point'); +var Polygon = require('./polygon'); +var BinaryWriter = require('./binarywriter'); + +function MultiPolygon(polygons, srid) { + Geometry.call(this); + + this.polygons = polygons || []; + this.srid = srid; + + if (this.polygons.length > 0) { + this.hasZ = this.polygons[0].hasZ; + this.hasM = this.polygons[0].hasM; + } +} + +util.inherits(MultiPolygon, Geometry); + +MultiPolygon.Z = function (polygons, srid) { + var multiPolygon = new MultiPolygon(polygons, srid); + multiPolygon.hasZ = true; + return multiPolygon; +}; + +MultiPolygon.M = function (polygons, srid) { + var multiPolygon = new MultiPolygon(polygons, srid); + multiPolygon.hasM = true; + return multiPolygon; +}; + +MultiPolygon.ZM = function (polygons, srid) { + var multiPolygon = new MultiPolygon(polygons, srid); + multiPolygon.hasZ = true; + multiPolygon.hasM = true; + return multiPolygon; +}; + +MultiPolygon._parseWkt = function (value, options) { + var multiPolygon = new MultiPolygon(); + multiPolygon.srid = options.srid; + multiPolygon.hasZ = options.hasZ; + multiPolygon.hasM = options.hasM; + + if (value.isMatch(['EMPTY'])) + return multiPolygon; + + value.expectGroupStart(); + + do { + value.expectGroupStart(); + + var exteriorRing = []; + var interiorRings = []; + + value.expectGroupStart(); + exteriorRing.push.apply(exteriorRing, value.matchCoordinates(options)); + value.expectGroupEnd(); + + while (value.isMatch([','])) { + value.expectGroupStart(); + interiorRings.push(value.matchCoordinates(options)); + value.expectGroupEnd(); + } + + multiPolygon.polygons.push(new Polygon(exteriorRing, interiorRings)); + + value.expectGroupEnd(); + + } while (value.isMatch([','])); + + value.expectGroupEnd(); + + return multiPolygon; +}; + +MultiPolygon._parseWkb = function (value, options) { + var multiPolygon = new MultiPolygon(); + multiPolygon.srid = options.srid; + multiPolygon.hasZ = options.hasZ; + multiPolygon.hasM = options.hasM; + + var polygonCount = value.readUInt32(); + + for (var i = 0; i < polygonCount; i++) + multiPolygon.polygons.push(Geometry.parse(value, options)); + + return multiPolygon; +}; + +MultiPolygon._parseTwkb = function (value, options) { + var multiPolygon = new MultiPolygon(); + multiPolygon.hasZ = options.hasZ; + multiPolygon.hasM = options.hasM; + + if (options.isEmpty) + return multiPolygon; + + var previousPoint = new Point(0, 0, options.hasZ ? 0 : undefined, options.hasM ? 0 : undefined); + var polygonCount = value.readVarInt(); + + for (var i = 0; i < polygonCount; i++) { + var polygon = new Polygon(); + polygon.hasZ = options.hasZ; + polygon.hasM = options.hasM; + + var ringCount = value.readVarInt(); + var exteriorRingCount = value.readVarInt(); + + for (var j = 0; j < exteriorRingCount; j++) + polygon.exteriorRing.push(Point._readTwkbPoint(value, options, previousPoint)); + + for (j = 1; j < ringCount; j++) { + var interiorRing = []; + + var interiorRingCount = value.readVarInt(); + + for (var k = 0; k < interiorRingCount; k++) + interiorRing.push(Point._readTwkbPoint(value, options, previousPoint)); + + polygon.interiorRings.push(interiorRing); + } + + multiPolygon.polygons.push(polygon); + } + + return multiPolygon; +}; + +MultiPolygon._parseGeoJSON = function (value) { + var multiPolygon = new MultiPolygon(); + + if (value.coordinates.length > 0 && value.coordinates[0].length > 0 && value.coordinates[0][0].length > 0) + multiPolygon.hasZ = value.coordinates[0][0][0].length > 2; + + for (var i = 0; i < value.coordinates.length; i++) + multiPolygon.polygons.push(Polygon._parseGeoJSON({ coordinates: value.coordinates[i] })); + + return multiPolygon; +}; + +MultiPolygon.prototype.toWkt = function () { + if (this.polygons.length === 0) + return this._getWktType(Types.wkt.MultiPolygon, true); + + var wkt = this._getWktType(Types.wkt.MultiPolygon, false) + '('; + + for (var i = 0; i < this.polygons.length; i++) + wkt += this.polygons[i]._toInnerWkt() + ','; + + wkt = wkt.slice(0, -1); + wkt += ')'; + + return wkt; +}; + +MultiPolygon.prototype.toWkb = function () { + var wkb = new BinaryWriter(this._getWkbSize()); + + wkb.writeInt8(1); + + this._writeWkbType(wkb, Types.wkb.MultiPolygon); + wkb.writeUInt32LE(this.polygons.length); + + for (var i = 0; i < this.polygons.length; i++) + wkb.writeBuffer(this.polygons[i].toWkb({ srid: this.srid })); + + return wkb.buffer; +}; + +MultiPolygon.prototype.toTwkb = function () { + var twkb = new BinaryWriter(0, true); + + var precision = Geometry.getTwkbPrecision(5, 0, 0); + var isEmpty = this.polygons.length === 0; + + this._writeTwkbHeader(twkb, Types.wkb.MultiPolygon, precision, isEmpty); + + if (this.polygons.length > 0) { + twkb.writeVarInt(this.polygons.length); + + var previousPoint = new Point(0, 0, 0, 0); + for (var i = 0; i < this.polygons.length; i++) { + twkb.writeVarInt(1 + this.polygons[i].interiorRings.length); + + twkb.writeVarInt(this.polygons[i].exteriorRing.length); + + for (var j = 0; j < this.polygons[i].exteriorRing.length; j++) + this.polygons[i].exteriorRing[j]._writeTwkbPoint(twkb, precision, previousPoint); + + for (j = 0; j < this.polygons[i].interiorRings.length; j++) { + twkb.writeVarInt(this.polygons[i].interiorRings[j].length); + + for (var k = 0; k < this.polygons[i].interiorRings[j].length; k++) + this.polygons[i].interiorRings[j][k]._writeTwkbPoint(twkb, precision, previousPoint); + } + } + } + + return twkb.buffer; +}; + +MultiPolygon.prototype._getWkbSize = function () { + var size = 1 + 4 + 4; + + for (var i = 0; i < this.polygons.length; i++) + size += this.polygons[i]._getWkbSize(); + + return size; +}; + +MultiPolygon.prototype.toGeoJSON = function (options) { + var geoJSON = Geometry.prototype.toGeoJSON.call(this, options); + geoJSON.type = Types.geoJSON.MultiPolygon; + geoJSON.coordinates = []; + + for (var i = 0; i < this.polygons.length; i++) + geoJSON.coordinates.push(this.polygons[i].toGeoJSON().coordinates); + + return geoJSON; +}; diff --git a/node_modules/wkx/lib/point.js b/node_modules/wkx/lib/point.js new file mode 100644 index 00000000..a425a8ef --- /dev/null +++ b/node_modules/wkx/lib/point.js @@ -0,0 +1,217 @@ +module.exports = Point; + +var util = require('util'); + +var Geometry = require('./geometry'); +var Types = require('./types'); +var BinaryWriter = require('./binarywriter'); +var ZigZag = require('./zigzag.js'); + +function Point(x, y, z, m, srid) { + Geometry.call(this); + + this.x = x; + this.y = y; + this.z = z; + this.m = m; + this.srid = srid; + + this.hasZ = typeof this.z !== 'undefined'; + this.hasM = typeof this.m !== 'undefined'; +} + +util.inherits(Point, Geometry); + +Point.Z = function (x, y, z, srid) { + var point = new Point(x, y, z, undefined, srid); + point.hasZ = true; + return point; +}; + +Point.M = function (x, y, m, srid) { + var point = new Point(x, y, undefined, m, srid); + point.hasM = true; + return point; +}; + +Point.ZM = function (x, y, z, m, srid) { + var point = new Point(x, y, z, m, srid); + point.hasZ = true; + point.hasM = true; + return point; +}; + +Point._parseWkt = function (value, options) { + var point = new Point(); + point.srid = options.srid; + point.hasZ = options.hasZ; + point.hasM = options.hasM; + + if (value.isMatch(['EMPTY'])) + return point; + + value.expectGroupStart(); + + var coordinate = value.matchCoordinate(options); + + point.x = coordinate.x; + point.y = coordinate.y; + point.z = coordinate.z; + point.m = coordinate.m; + + value.expectGroupEnd(); + + return point; +}; + +Point._parseWkb = function (value, options) { + var point = Point._readWkbPoint(value, options); + point.srid = options.srid; + return point; +}; + +Point._readWkbPoint = function (value, options) { + return new Point(value.readDouble(), value.readDouble(), + options.hasZ ? value.readDouble() : undefined, + options.hasM ? value.readDouble() : undefined); +}; + +Point._parseTwkb = function (value, options) { + var point = new Point(); + point.hasZ = options.hasZ; + point.hasM = options.hasM; + + if (options.isEmpty) + return point; + + point.x = ZigZag.decode(value.readVarInt()) / options.precisionFactor; + point.y = ZigZag.decode(value.readVarInt()) / options.precisionFactor; + point.z = options.hasZ ? ZigZag.decode(value.readVarInt()) / options.zPrecisionFactor : undefined; + point.m = options.hasM ? ZigZag.decode(value.readVarInt()) / options.mPrecisionFactor : undefined; + + return point; +}; + +Point._readTwkbPoint = function (value, options, previousPoint) { + previousPoint.x += ZigZag.decode(value.readVarInt()) / options.precisionFactor; + previousPoint.y += ZigZag.decode(value.readVarInt()) / options.precisionFactor; + + if (options.hasZ) + previousPoint.z += ZigZag.decode(value.readVarInt()) / options.zPrecisionFactor; + if (options.hasM) + previousPoint.m += ZigZag.decode(value.readVarInt()) / options.mPrecisionFactor; + + return new Point(previousPoint.x, previousPoint.y, previousPoint.z, previousPoint.m); +}; + +Point._parseGeoJSON = function (value) { + return Point._readGeoJSONPoint(value.coordinates); +}; + +Point._readGeoJSONPoint = function (coordinates) { + if (coordinates.length === 0) + return new Point(); + + if (coordinates.length > 2) + return new Point(coordinates[0], coordinates[1], coordinates[2]); + + return new Point(coordinates[0], coordinates[1]); +}; + +Point.prototype.toWkt = function () { + if (typeof this.x === 'undefined' && typeof this.y === 'undefined' && + typeof this.z === 'undefined' && typeof this.m === 'undefined') + return this._getWktType(Types.wkt.Point, true); + + return this._getWktType(Types.wkt.Point, false) + '(' + this._getWktCoordinate(this) + ')'; +}; + +Point.prototype.toWkb = function (parentOptions) { + var wkb = new BinaryWriter(this._getWkbSize()); + + wkb.writeInt8(1); + this._writeWkbType(wkb, Types.wkb.Point, parentOptions); + + if (typeof this.x === 'undefined' && typeof this.y === 'undefined') { + wkb.writeDoubleLE(NaN); + wkb.writeDoubleLE(NaN); + + if (this.hasZ) + wkb.writeDoubleLE(NaN); + if (this.hasM) + wkb.writeDoubleLE(NaN); + } + else { + this._writeWkbPoint(wkb); + } + + return wkb.buffer; +}; + +Point.prototype._writeWkbPoint = function (wkb) { + wkb.writeDoubleLE(this.x); + wkb.writeDoubleLE(this.y); + + if (this.hasZ) + wkb.writeDoubleLE(this.z); + if (this.hasM) + wkb.writeDoubleLE(this.m); +}; + +Point.prototype.toTwkb = function () { + var twkb = new BinaryWriter(0, true); + + var precision = Geometry.getTwkbPrecision(5, 0, 0); + var isEmpty = typeof this.x === 'undefined' && typeof this.y === 'undefined'; + + this._writeTwkbHeader(twkb, Types.wkb.Point, precision, isEmpty); + + if (!isEmpty) + this._writeTwkbPoint(twkb, precision, new Point(0, 0, 0, 0)); + + return twkb.buffer; +}; + +Point.prototype._writeTwkbPoint = function (twkb, precision, previousPoint) { + var x = this.x * precision.xyFactor; + var y = this.y * precision.xyFactor; + var z = this.z * precision.zFactor; + var m = this.m * precision.mFactor; + + twkb.writeVarInt(ZigZag.encode(x - previousPoint.x)); + twkb.writeVarInt(ZigZag.encode(y - previousPoint.y)); + if (this.hasZ) + twkb.writeVarInt(ZigZag.encode(z - previousPoint.z)); + if (this.hasM) + twkb.writeVarInt(ZigZag.encode(m - previousPoint.m)); + + previousPoint.x = x; + previousPoint.y = y; + previousPoint.z = z; + previousPoint.m = m; +}; + +Point.prototype._getWkbSize = function () { + var size = 1 + 4 + 8 + 8; + + if (this.hasZ) + size += 8; + if (this.hasM) + size += 8; + + return size; +}; + +Point.prototype.toGeoJSON = function (options) { + var geoJSON = Geometry.prototype.toGeoJSON.call(this, options); + geoJSON.type = Types.geoJSON.Point; + + if (typeof this.x === 'undefined' && typeof this.y === 'undefined') + geoJSON.coordinates = []; + else if (typeof this.z !== 'undefined') + geoJSON.coordinates = [this.x, this.y, this.z]; + else + geoJSON.coordinates = [this.x, this.y]; + + return geoJSON; +}; diff --git a/node_modules/wkx/lib/polygon.js b/node_modules/wkx/lib/polygon.js new file mode 100644 index 00000000..1fccafb1 --- /dev/null +++ b/node_modules/wkx/lib/polygon.js @@ -0,0 +1,288 @@ +module.exports = Polygon; + +var util = require('util'); + +var Geometry = require('./geometry'); +var Types = require('./types'); +var Point = require('./point'); +var BinaryWriter = require('./binarywriter'); + +function Polygon(exteriorRing, interiorRings, srid) { + Geometry.call(this); + + this.exteriorRing = exteriorRing || []; + this.interiorRings = interiorRings || []; + this.srid = srid; + + if (this.exteriorRing.length > 0) { + this.hasZ = this.exteriorRing[0].hasZ; + this.hasM = this.exteriorRing[0].hasM; + } +} + +util.inherits(Polygon, Geometry); + +Polygon.Z = function (exteriorRing, interiorRings, srid) { + var polygon = new Polygon(exteriorRing, interiorRings, srid); + polygon.hasZ = true; + return polygon; +}; + +Polygon.M = function (exteriorRing, interiorRings, srid) { + var polygon = new Polygon(exteriorRing, interiorRings, srid); + polygon.hasM = true; + return polygon; +}; + +Polygon.ZM = function (exteriorRing, interiorRings, srid) { + var polygon = new Polygon(exteriorRing, interiorRings, srid); + polygon.hasZ = true; + polygon.hasM = true; + return polygon; +}; + +Polygon._parseWkt = function (value, options) { + var polygon = new Polygon(); + polygon.srid = options.srid; + polygon.hasZ = options.hasZ; + polygon.hasM = options.hasM; + + if (value.isMatch(['EMPTY'])) + return polygon; + + value.expectGroupStart(); + + value.expectGroupStart(); + polygon.exteriorRing.push.apply(polygon.exteriorRing, value.matchCoordinates(options)); + value.expectGroupEnd(); + + while (value.isMatch([','])) { + value.expectGroupStart(); + polygon.interiorRings.push(value.matchCoordinates(options)); + value.expectGroupEnd(); + } + + value.expectGroupEnd(); + + return polygon; +}; + +Polygon._parseWkb = function (value, options) { + var polygon = new Polygon(); + polygon.srid = options.srid; + polygon.hasZ = options.hasZ; + polygon.hasM = options.hasM; + + var ringCount = value.readUInt32(); + + if (ringCount > 0) { + var exteriorRingCount = value.readUInt32(); + + for (var i = 0; i < exteriorRingCount; i++) + polygon.exteriorRing.push(Point._readWkbPoint(value, options)); + + for (i = 1; i < ringCount; i++) { + var interiorRing = []; + + var interiorRingCount = value.readUInt32(); + + for (var j = 0; j < interiorRingCount; j++) + interiorRing.push(Point._readWkbPoint(value, options)); + + polygon.interiorRings.push(interiorRing); + } + } + + return polygon; +}; + +Polygon._parseTwkb = function (value, options) { + var polygon = new Polygon(); + polygon.hasZ = options.hasZ; + polygon.hasM = options.hasM; + + if (options.isEmpty) + return polygon; + + var previousPoint = new Point(0, 0, options.hasZ ? 0 : undefined, options.hasM ? 0 : undefined); + var ringCount = value.readVarInt(); + var exteriorRingCount = value.readVarInt(); + + for (var i = 0; i < exteriorRingCount; i++) + polygon.exteriorRing.push(Point._readTwkbPoint(value, options, previousPoint)); + + for (i = 1; i < ringCount; i++) { + var interiorRing = []; + + var interiorRingCount = value.readVarInt(); + + for (var j = 0; j < interiorRingCount; j++) + interiorRing.push(Point._readTwkbPoint(value, options, previousPoint)); + + polygon.interiorRings.push(interiorRing); + } + + return polygon; +}; + +Polygon._parseGeoJSON = function (value) { + var polygon = new Polygon(); + + if (value.coordinates.length > 0 && value.coordinates[0].length > 0) + polygon.hasZ = value.coordinates[0][0].length > 2; + + for (var i = 0; i < value.coordinates.length; i++) { + if (i > 0) + polygon.interiorRings.push([]); + + for (var j = 0; j < value.coordinates[i].length; j++) { + if (i === 0) + polygon.exteriorRing.push(Point._readGeoJSONPoint(value.coordinates[i][j])); + else + polygon.interiorRings[i - 1].push(Point._readGeoJSONPoint(value.coordinates[i][j])); + } + } + + return polygon; +}; + +Polygon.prototype.toWkt = function () { + if (this.exteriorRing.length === 0) + return this._getWktType(Types.wkt.Polygon, true); + + return this._getWktType(Types.wkt.Polygon, false) + this._toInnerWkt(); +}; + +Polygon.prototype._toInnerWkt = function () { + var innerWkt = '(('; + + for (var i = 0; i < this.exteriorRing.length; i++) + innerWkt += this._getWktCoordinate(this.exteriorRing[i]) + ','; + + innerWkt = innerWkt.slice(0, -1); + innerWkt += ')'; + + for (i = 0; i < this.interiorRings.length; i++) { + innerWkt += ',('; + + for (var j = 0; j < this.interiorRings[i].length; j++) { + innerWkt += this._getWktCoordinate(this.interiorRings[i][j]) + ','; + } + + innerWkt = innerWkt.slice(0, -1); + innerWkt += ')'; + } + + innerWkt += ')'; + + return innerWkt; +}; + +Polygon.prototype.toWkb = function (parentOptions) { + var wkb = new BinaryWriter(this._getWkbSize()); + + wkb.writeInt8(1); + + this._writeWkbType(wkb, Types.wkb.Polygon, parentOptions); + + if (this.exteriorRing.length > 0) { + wkb.writeUInt32LE(1 + this.interiorRings.length); + wkb.writeUInt32LE(this.exteriorRing.length); + } + else { + wkb.writeUInt32LE(0); + } + + for (var i = 0; i < this.exteriorRing.length; i++) + this.exteriorRing[i]._writeWkbPoint(wkb); + + for (i = 0; i < this.interiorRings.length; i++) { + wkb.writeUInt32LE(this.interiorRings[i].length); + + for (var j = 0; j < this.interiorRings[i].length; j++) + this.interiorRings[i][j]._writeWkbPoint(wkb); + } + + return wkb.buffer; +}; + +Polygon.prototype.toTwkb = function () { + var twkb = new BinaryWriter(0, true); + + var precision = Geometry.getTwkbPrecision(5, 0, 0); + var isEmpty = this.exteriorRing.length === 0; + + this._writeTwkbHeader(twkb, Types.wkb.Polygon, precision, isEmpty); + + if (this.exteriorRing.length > 0) { + twkb.writeVarInt(1 + this.interiorRings.length); + + twkb.writeVarInt(this.exteriorRing.length); + + var previousPoint = new Point(0, 0, 0, 0); + for (var i = 0; i < this.exteriorRing.length; i++) + this.exteriorRing[i]._writeTwkbPoint(twkb, precision, previousPoint); + + for (i = 0; i < this.interiorRings.length; i++) { + twkb.writeVarInt(this.interiorRings[i].length); + + for (var j = 0; j < this.interiorRings[i].length; j++) + this.interiorRings[i][j]._writeTwkbPoint(twkb, precision, previousPoint); + } + } + + return twkb.buffer; +}; + +Polygon.prototype._getWkbSize = function () { + var coordinateSize = 16; + + if (this.hasZ) + coordinateSize += 8; + if (this.hasM) + coordinateSize += 8; + + var size = 1 + 4 + 4; + + if (this.exteriorRing.length > 0) + size += 4 + (this.exteriorRing.length * coordinateSize); + + for (var i = 0; i < this.interiorRings.length; i++) + size += 4 + (this.interiorRings[i].length * coordinateSize); + + return size; +}; + +Polygon.prototype.toGeoJSON = function (options) { + var geoJSON = Geometry.prototype.toGeoJSON.call(this, options); + geoJSON.type = Types.geoJSON.Polygon; + geoJSON.coordinates = []; + + if (this.exteriorRing.length > 0) { + var exteriorRing = []; + + for (var i = 0; i < this.exteriorRing.length; i++) { + if (this.hasZ) + exteriorRing.push([this.exteriorRing[i].x, this.exteriorRing[i].y, this.exteriorRing[i].z]); + else + exteriorRing.push([this.exteriorRing[i].x, this.exteriorRing[i].y]); + } + + geoJSON.coordinates.push(exteriorRing); + } + + for (var j = 0; j < this.interiorRings.length; j++) { + var interiorRing = []; + + for (var k = 0; k < this.interiorRings[j].length; k++) { + if (this.hasZ) + interiorRing.push([this.interiorRings[j][k].x, this.interiorRings[j][k].y, this.interiorRings[j][k].z]); + else + interiorRing.push([this.interiorRings[j][k].x, this.interiorRings[j][k].y]); + } + + geoJSON.coordinates.push(interiorRing); + } + + return geoJSON; +}; diff --git a/node_modules/wkx/lib/types.js b/node_modules/wkx/lib/types.js new file mode 100644 index 00000000..b21ee162 --- /dev/null +++ b/node_modules/wkx/lib/types.js @@ -0,0 +1,29 @@ +module.exports = { + wkt: { + Point: 'POINT', + LineString: 'LINESTRING', + Polygon: 'POLYGON', + MultiPoint: 'MULTIPOINT', + MultiLineString: 'MULTILINESTRING', + MultiPolygon: 'MULTIPOLYGON', + GeometryCollection: 'GEOMETRYCOLLECTION' + }, + wkb: { + Point: 1, + LineString: 2, + Polygon: 3, + MultiPoint: 4, + MultiLineString: 5, + MultiPolygon: 6, + GeometryCollection: 7 + }, + geoJSON: { + Point: 'Point', + LineString: 'LineString', + Polygon: 'Polygon', + MultiPoint: 'MultiPoint', + MultiLineString: 'MultiLineString', + MultiPolygon: 'MultiPolygon', + GeometryCollection: 'GeometryCollection' + } +}; diff --git a/node_modules/wkx/lib/wktparser.js b/node_modules/wkx/lib/wktparser.js new file mode 100644 index 00000000..ffb8a933 --- /dev/null +++ b/node_modules/wkx/lib/wktparser.js @@ -0,0 +1,124 @@ +module.exports = WktParser; + +var Types = require('./types'); +var Point = require('./point'); + +function WktParser(value) { + this.value = value; + this.position = 0; +} + +WktParser.prototype.match = function (tokens) { + this.skipWhitespaces(); + + for (var i = 0; i < tokens.length; i++) { + if (this.value.substring(this.position).indexOf(tokens[i]) === 0) { + this.position += tokens[i].length; + return tokens[i]; + } + } + + return null; +}; + +WktParser.prototype.matchRegex = function (tokens) { + this.skipWhitespaces(); + + for (var i = 0; i < tokens.length; i++) { + var match = this.value.substring(this.position).match(tokens[i]); + + if (match) { + this.position += match[0].length; + return match; + } + } + + return null; +}; + +WktParser.prototype.isMatch = function (tokens) { + this.skipWhitespaces(); + + for (var i = 0; i < tokens.length; i++) { + if (this.value.substring(this.position).indexOf(tokens[i]) === 0) { + this.position += tokens[i].length; + return true; + } + } + + return false; +}; + +WktParser.prototype.matchType = function () { + var geometryType = this.match([Types.wkt.Point, Types.wkt.LineString, Types.wkt.Polygon, Types.wkt.MultiPoint, + Types.wkt.MultiLineString, Types.wkt.MultiPolygon, Types.wkt.GeometryCollection]); + + if (!geometryType) + throw new Error('Expected geometry type'); + + return geometryType; +}; + +WktParser.prototype.matchDimension = function () { + var dimension = this.match(['ZM', 'Z', 'M']); + + switch (dimension) { + case 'ZM': return { hasZ: true, hasM: true }; + case 'Z': return { hasZ: true, hasM: false }; + case 'M': return { hasZ: false, hasM: true }; + default: return { hasZ: false, hasM: false }; + } +}; + +WktParser.prototype.expectGroupStart = function () { + if (!this.isMatch(['('])) + throw new Error('Expected group start'); +}; + +WktParser.prototype.expectGroupEnd = function () { + if (!this.isMatch([')'])) + throw new Error('Expected group end'); +}; + +WktParser.prototype.matchCoordinate = function (options) { + var match; + + if (options.hasZ && options.hasM) + match = this.matchRegex([/^(\S*)\s+(\S*)\s+(\S*)\s+([^\s,)]*)/]); + else if (options.hasZ || options.hasM) + match = this.matchRegex([/^(\S*)\s+(\S*)\s+([^\s,)]*)/]); + else + match = this.matchRegex([/^(\S*)\s+([^\s,)]*)/]); + + if (!match) + throw new Error('Expected coordinates'); + + if (options.hasZ && options.hasM) + return new Point(parseFloat(match[1]), parseFloat(match[2]), parseFloat(match[3]), parseFloat(match[4])); + else if (options.hasZ) + return new Point(parseFloat(match[1]), parseFloat(match[2]), parseFloat(match[3])); + else if (options.hasM) + return new Point(parseFloat(match[1]), parseFloat(match[2]), undefined, parseFloat(match[3])); + else + return new Point(parseFloat(match[1]), parseFloat(match[2])); +}; + +WktParser.prototype.matchCoordinates = function (options) { + var coordinates = []; + + do { + var startsWithBracket = this.isMatch(['(']); + + coordinates.push(this.matchCoordinate(options)); + + if (startsWithBracket) + this.expectGroupEnd(); + } while (this.isMatch([','])); + + return coordinates; +}; + +WktParser.prototype.skipWhitespaces = function () { + while (this.position < this.value.length && this.value[this.position] === ' ') + this.position++; +}; diff --git a/node_modules/wkx/lib/wkx.d.ts b/node_modules/wkx/lib/wkx.d.ts new file mode 100644 index 00000000..cfe74699 --- /dev/null +++ b/node_modules/wkx/lib/wkx.d.ts @@ -0,0 +1,100 @@ +/// + +declare module "wkx" { + + export class Geometry { + srid: number; + hasZ: boolean; + hasM: boolean; + + static parse(value: string | Buffer): Geometry; + static parseTwkb(value: Buffer): Geometry; + static parseGeoJSON(value: {}): Geometry; + + toWkt(): string; + toEwkt(): string; + toWkb(): Buffer; + toEwkb(): Buffer; + toTwkb(): Buffer; + toGeoJSON(options?: GeoJSONOptions): {}; + } + + export interface GeoJSONOptions { + shortCrs?: boolean; + longCrs?: boolean; + } + + export class Point extends Geometry { + x: number; + y: number; + z: number; + m: number; + + constructor(x?: number, y?: number, z?: number, m?: number, srid?: number); + + static Z(x: number, y: number, z: number, srid?: number): Point; + static M(x: number, y: number, m: number, srid?: number): Point; + static ZM(x: number, y: number, z: number, m: number, srid?: number): Point; + } + + export class LineString extends Geometry { + points: Point[]; + + constructor(points?: Point[], srid?: number); + + static Z(points?: Point[], srid?: number): LineString; + static M(points?: Point[], srid?: number): LineString; + static ZM(points?: Point[], srid?: number): LineString; + } + + export class Polygon extends Geometry { + exteriorRing: Point[]; + interiorRings: Point[][]; + + constructor(exteriorRing?: Point[], interiorRings?: Point[][], srid?: number); + + static Z(exteriorRing?: Point[], interiorRings?: Point[][], srid?: number): Polygon; + static M(exteriorRing?: Point[], interiorRings?: Point[][], srid?: number): Polygon; + static ZM(exteriorRing?: Point[], interiorRings?: Point[][], srid?: number): Polygon; + } + + export class MultiPoint extends Geometry { + points: Point[]; + + constructor(points?: Point[], srid?: number); + + static Z(points?: Point[], srid?: number): MultiPoint; + static M(points?: Point[], srid?: number): MultiPoint; + static ZM(points?: Point[], srid?: number): MultiPoint; + } + + export class MultiLineString extends Geometry { + lineStrings: LineString[]; + + constructor(lineStrings?: LineString[], srid?: number); + + static Z(lineStrings?: LineString[], srid?: number): MultiLineString; + static M(lineStrings?: LineString[], srid?: number): MultiLineString; + static ZM(lineStrings?: LineString[], srid?: number): MultiLineString; + } + + export class MultiPolygon extends Geometry { + polygons: Polygon[]; + + constructor(polygons?: Polygon[], srid?: number); + + static Z(polygons?: Polygon[], srid?: number): MultiPolygon; + static M(polygons?: Polygon[], srid?: number): MultiPolygon; + static ZM(polygons?: Polygon[], srid?: number): MultiPolygon; + } + + export class GeometryCollection extends Geometry { + geometries: Geometry[]; + + constructor(geometries?: Geometry[], srid?: number); + + static Z(geometries?: Geometry[], srid?: number): GeometryCollection; + static M(geometries?: Geometry[], srid?: number): GeometryCollection; + static ZM(geometries?: Geometry[], srid?: number): GeometryCollection; + } +} \ No newline at end of file diff --git a/node_modules/wkx/lib/wkx.js b/node_modules/wkx/lib/wkx.js new file mode 100644 index 00000000..48ba61ee --- /dev/null +++ b/node_modules/wkx/lib/wkx.js @@ -0,0 +1,9 @@ +exports.Types = require('./types'); +exports.Geometry = require('./geometry'); +exports.Point = require('./point'); +exports.LineString = require('./linestring'); +exports.Polygon = require('./polygon'); +exports.MultiPoint = require('./multipoint'); +exports.MultiLineString = require('./multilinestring'); +exports.MultiPolygon = require('./multipolygon'); +exports.GeometryCollection = require('./geometrycollection'); \ No newline at end of file diff --git a/node_modules/wkx/lib/zigzag.js b/node_modules/wkx/lib/zigzag.js new file mode 100644 index 00000000..aceb238d --- /dev/null +++ b/node_modules/wkx/lib/zigzag.js @@ -0,0 +1,8 @@ +module.exports = { + encode: function (value) { + return (value << 1) ^ (value >> 31); + }, + decode: function (value) { + return (value >> 1) ^ (-(value & 1)); + } +}; diff --git a/node_modules/wkx/package.json b/node_modules/wkx/package.json new file mode 100644 index 00000000..39997a3f --- /dev/null +++ b/node_modules/wkx/package.json @@ -0,0 +1,50 @@ +{ + "name": "wkx", + "version": "0.4.7", + "description": "A WKT/WKB/EWKT/EWKB/TWKB/GeoJSON parser and serializer", + "main": "lib/wkx.js", + "types": "lib/wkx.d.ts", + "files": [ + "dist/", + "lib/" + ], + "scripts": { + "test": "jshint . && mocha", + "build": "mkdirp ./dist && browserify -r buffer -r ./lib/wkx.js:wkx ./lib/wkx.js > ./dist/wkx.js && uglifyjs -c -m -- ./dist/wkx.js > ./dist/wkx.min.js", + "coveralls": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" + }, + "author": "Christian Schwarz", + "license": "MIT", + "devDependencies": { + "async": "^3.0.1", + "browserify": "^16.2.3", + "coveralls": "^3.0.4", + "deep-eql": "^4.0.0", + "istanbul": "^0.4.5", + "jshint": "^2.10.2", + "json-stringify-pretty-compact": "^2.0.0", + "mkdirp": "^0.5.1", + "mocha": "^6.1.4", + "pg": "^7.11.0", + "uglify-js": "^3.6.0" + }, + "repository": { + "type": "git", + "url": "http://github.com/cschwarz/wkx.git" + }, + "keywords": [ + "wkt", + "wkb", + "ewkt", + "ewkb", + "twkb", + "geojson", + "ogc", + "geometry", + "geography", + "spatial" + ], + "dependencies": { + "@types/node": "*" + } +} diff --git a/node_modules/wrap-ansi/index.js b/node_modules/wrap-ansi/index.js new file mode 100755 index 00000000..5038bb0c --- /dev/null +++ b/node_modules/wrap-ansi/index.js @@ -0,0 +1,188 @@ +'use strict'; +const stringWidth = require('string-width'); +const stripAnsi = require('strip-ansi'); +const ansiStyles = require('ansi-styles'); + +const ESCAPES = new Set([ + '\u001B', + '\u009B' +]); + +const END_CODE = 39; + +const wrapAnsi = code => `${ESCAPES.values().next().value}[${code}m`; + +// Calculate the length of words split on ' ', ignoring +// the extra characters added by ansi escape codes +const wordLengths = string => string.split(' ').map(character => stringWidth(character)); + +// Wrap a long word across multiple rows +// Ansi escape codes do not count towards length +const wrapWord = (rows, word, columns) => { + const characters = [...word]; + + let insideEscape = false; + let visible = stringWidth(stripAnsi(rows[rows.length - 1])); + + for (const [index, character] of characters.entries()) { + const characterLength = stringWidth(character); + + if (visible + characterLength <= columns) { + rows[rows.length - 1] += character; + } else { + rows.push(character); + visible = 0; + } + + if (ESCAPES.has(character)) { + insideEscape = true; + } else if (insideEscape && character === 'm') { + insideEscape = false; + continue; + } + + if (insideEscape) { + continue; + } + + visible += characterLength; + + if (visible === columns && index < characters.length - 1) { + rows.push(''); + visible = 0; + } + } + + // It's possible that the last row we copy over is only + // ansi escape characters, handle this edge-case + if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { + rows[rows.length - 2] += rows.pop(); + } +}; + +// Trims spaces from a string ignoring invisible sequences +const stringVisibleTrimSpacesRight = str => { + const words = str.split(' '); + let last = words.length; + + while (last > 0) { + if (stringWidth(words[last - 1]) > 0) { + break; + } + + last--; + } + + if (last === words.length) { + return str; + } + + return words.slice(0, last).join(' ') + words.slice(last).join(''); +}; + +// The wrap-ansi module can be invoked +// in either 'hard' or 'soft' wrap mode +// +// 'hard' will never allow a string to take up more +// than columns characters +// +// 'soft' allows long words to expand past the column length +const exec = (string, columns, options = {}) => { + if (options.trim !== false && string.trim() === '') { + return ''; + } + + let pre = ''; + let ret = ''; + let escapeCode; + + const lengths = wordLengths(string); + let rows = ['']; + + for (const [index, word] of string.split(' ').entries()) { + if (options.trim !== false) { + rows[rows.length - 1] = rows[rows.length - 1].trimLeft(); + } + + let rowLength = stringWidth(rows[rows.length - 1]); + + if (index !== 0) { + if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { + // If we start with a new word but the current row length equals the length of the columns, add a new row + rows.push(''); + rowLength = 0; + } + + if (rowLength > 0 || options.trim === false) { + rows[rows.length - 1] += ' '; + rowLength++; + } + } + + // In 'hard' wrap mode, the length of a line is + // never allowed to extend past 'columns' + if (options.hard && lengths[index] > columns) { + const remainingColumns = (columns - rowLength); + const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); + const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); + if (breaksStartingNextLine < breaksStartingThisLine) { + rows.push(''); + } + + wrapWord(rows, word, columns); + continue; + } + + if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { + if (options.wordWrap === false && rowLength < columns) { + wrapWord(rows, word, columns); + continue; + } + + rows.push(''); + } + + if (rowLength + lengths[index] > columns && options.wordWrap === false) { + wrapWord(rows, word, columns); + continue; + } + + rows[rows.length - 1] += word; + } + + if (options.trim !== false) { + rows = rows.map(stringVisibleTrimSpacesRight); + } + + pre = rows.join('\n'); + + for (const [index, character] of [...pre].entries()) { + ret += character; + + if (ESCAPES.has(character)) { + const code = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4))); + escapeCode = code === END_CODE ? null : code; + } + + const code = ansiStyles.codes.get(Number(escapeCode)); + + if (escapeCode && code) { + if (pre[index + 1] === '\n') { + ret += wrapAnsi(code); + } else if (character === '\n') { + ret += wrapAnsi(escapeCode); + } + } + } + + return ret; +}; + +// For each newline, invoke the method separately +module.exports = (string, columns, options) => { + return String(string) + .normalize() + .split('\n') + .map(line => exec(line, columns, options)) + .join('\n'); +}; diff --git a/node_modules/table/node_modules/ansi-regex/license b/node_modules/wrap-ansi/license similarity index 100% rename from node_modules/table/node_modules/ansi-regex/license rename to node_modules/wrap-ansi/license diff --git a/node_modules/wrap-ansi/node_modules/string-width/index.js b/node_modules/wrap-ansi/node_modules/string-width/index.js new file mode 100644 index 00000000..33c9d6c0 --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/string-width/index.js @@ -0,0 +1,39 @@ +'use strict'; +const stripAnsi = require('strip-ansi'); +const isFullwidthCodePoint = require('is-fullwidth-code-point'); +const emojiRegex = require('emoji-regex')(); + +module.exports = input => { + input = input.replace(emojiRegex, ' '); + + if (typeof input !== 'string' || input.length === 0) { + return 0; + } + + input = stripAnsi(input); + + let width = 0; + + for (let i = 0; i < input.length; i++) { + const code = input.codePointAt(i); + + // Ignore control characters + if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { + continue; + } + + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; + } + + // Surrogates + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint(code) ? 2 : 1; + } + + return width; +}; diff --git a/node_modules/table/node_modules/strip-ansi/license b/node_modules/wrap-ansi/node_modules/string-width/license similarity index 100% rename from node_modules/table/node_modules/strip-ansi/license rename to node_modules/wrap-ansi/node_modules/string-width/license diff --git a/node_modules/wrap-ansi/node_modules/string-width/package.json b/node_modules/wrap-ansi/node_modules/string-width/package.json new file mode 100644 index 00000000..e040183e --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/string-width/package.json @@ -0,0 +1,56 @@ +{ + "name": "string-width", + "version": "3.1.0", + "description": "Get the visual width of a string - the number of columns required to display it", + "license": "MIT", + "repository": "sindresorhus/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "string", + "str", + "character", + "char", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width" + ], + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "devDependencies": { + "ava": "^1.0.1", + "xo": "^0.23.0" + } +} diff --git a/node_modules/wrap-ansi/node_modules/string-width/readme.md b/node_modules/wrap-ansi/node_modules/string-width/readme.md new file mode 100644 index 00000000..d39d95f5 --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/string-width/readme.md @@ -0,0 +1,45 @@ +# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +Useful to be able to measure the actual width of command-line output. + + +## Install + +``` +$ npm install string-width +``` + + +## Usage + +```js +const stringWidth = require('string-width'); + +stringWidth('古'); +//=> 2 + +stringWidth('\u001b[1m古\u001b[22m'); +//=> 2 + +stringWidth('a'); +//=> 1 + +stringWidth('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +// => 5 +``` + + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/table/node_modules/strip-ansi/package.json b/node_modules/wrap-ansi/package.json similarity index 53% rename from node_modules/table/node_modules/strip-ansi/package.json rename to node_modules/wrap-ansi/package.json index 7494fd7e..dcbb7f6e 100644 --- a/node_modules/table/node_modules/strip-ansi/package.json +++ b/node_modules/wrap-ansi/package.json @@ -1,9 +1,9 @@ { - "name": "strip-ansi", - "version": "5.2.0", - "description": "Strip ANSI escape codes from a string", + "name": "wrap-ansi", + "version": "5.1.0", + "description": "Wordwrap a string with ANSI escape codes", "license": "MIT", - "repository": "chalk/strip-ansi", + "repository": "chalk/wrap-ansi", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -13,16 +13,17 @@ "node": ">=6" }, "scripts": { - "test": "xo && ava && tsd-check" + "test": "xo && nyc ava" }, "files": [ - "index.js", - "index.d.ts" + "index.js" ], "keywords": [ - "strip", - "trim", - "remove", + "wrap", + "break", + "wordwrap", + "wordbreak", + "linewrap", "ansi", "styles", "color", @@ -30,6 +31,7 @@ "colors", "terminal", "console", + "cli", "string", "tty", "escape", @@ -44,11 +46,16 @@ "text" ], "dependencies": { - "ansi-regex": "^4.1.0" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" }, "devDependencies": { - "ava": "^1.3.1", - "tsd-check": "^0.5.0", + "ava": "^1.2.1", + "chalk": "^2.4.2", + "coveralls": "^3.0.3", + "has-ansi": "^3.0.0", + "nyc": "^13.3.0", "xo": "^0.24.0" } } diff --git a/node_modules/wrap-ansi/readme.md b/node_modules/wrap-ansi/readme.md new file mode 100644 index 00000000..73b87de2 --- /dev/null +++ b/node_modules/wrap-ansi/readme.md @@ -0,0 +1,108 @@ +# wrap-ansi [![Build Status](https://travis-ci.org/chalk/wrap-ansi.svg?branch=master)](https://travis-ci.org/chalk/wrap-ansi) [![Coverage Status](https://coveralls.io/repos/github/chalk/wrap-ansi/badge.svg?branch=master)](https://coveralls.io/github/chalk/wrap-ansi?branch=master) + +> Wordwrap a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) + + +## Install + +``` +$ npm install wrap-ansi +``` + + +## Usage + +```js +const chalk = require('chalk'); +const wrapAnsi = require('wrap-ansi'); + +const input = 'The quick brown ' + chalk.red('fox jumped over ') + + 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); + +console.log(wrapAnsi(input, 20)); +``` + + + +--- + +
+ + 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. +
+
+ +--- + + +## API + +### wrapAnsi(input, columns, [options]) + +Wrap words to the specified column width. + +#### input + +Type: `string` + +String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk). + +#### columns + +Type: `number` + +Number of columns to wrap the text to. + +#### options + +Type: `Object` + +##### hard + +Type: `boolean`
+Default: `false` + +By default the wrap is soft, meaning long words may extend past the column width. Setting this to `true` will make it hard wrap at the column width. + +##### wordWrap + +Type: `boolean`
+Default: `true` + +By default, an attempt is made to split words at spaces, ensuring that they don't extend past the configured columns. If wordWrap is `false`, each column will instead be completely filled splitting words as necessary. + +##### trim + +Type: `boolean`
+Default: `true` + +Whitespace on all lines is removed by default. Set this option to `false` if you don't want to trim. + + +## Related + +- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes +- [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right +- [jsesc](https://github.com/mathiasbynens/jsesc) - Generate ASCII-only output from Unicode strings. Useful for creating test fixtures. + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) +- [Benjamin Coe](https://github.com/bcoe) + + +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + +## License + +MIT diff --git a/node_modules/y18n/CHANGELOG.md b/node_modules/y18n/CHANGELOG.md new file mode 100644 index 00000000..c259076a --- /dev/null +++ b/node_modules/y18n/CHANGELOG.md @@ -0,0 +1,21 @@ +# Change Log + +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. + + +# [4.0.0](https://github.com/yargs/y18n/compare/v3.2.1...v4.0.0) (2017-10-10) + + +### Bug Fixes + +* allow support for falsy values like 0 in tagged literal ([#45](https://github.com/yargs/y18n/issues/45)) ([c926123](https://github.com/yargs/y18n/commit/c926123)) + + +### Features + +* **__:** added tagged template literal support ([#44](https://github.com/yargs/y18n/issues/44)) ([0598daf](https://github.com/yargs/y18n/commit/0598daf)) + + +### BREAKING CHANGES + +* **__:** dropping Node 0.10/Node 0.12 support diff --git a/node_modules/y18n/LICENSE b/node_modules/y18n/LICENSE new file mode 100644 index 00000000..3c157f0b --- /dev/null +++ b/node_modules/y18n/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/node_modules/y18n/README.md b/node_modules/y18n/README.md new file mode 100644 index 00000000..826474f2 --- /dev/null +++ b/node_modules/y18n/README.md @@ -0,0 +1,109 @@ +# y18n + +[![Build Status][travis-image]][travis-url] +[![Coverage Status][coveralls-image]][coveralls-url] +[![NPM version][npm-image]][npm-url] +[![js-standard-style][standard-image]][standard-url] +[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) + +The bare-bones internationalization library used by yargs. + +Inspired by [i18n](https://www.npmjs.com/package/i18n). + +## Examples + +_simple string translation:_ + +```js +var __ = require('y18n').__ + +console.log(__('my awesome string %s', 'foo')) +``` + +output: + +`my awesome string foo` + +_using tagged template literals_ + +```js +var __ = require('y18n').__ +var str = 'foo' + +console.log(__`my awesome string ${str}`) +``` + +output: + +`my awesome string foo` + +_pluralization support:_ + +```js +var __n = require('y18n').__n + +console.log(__n('one fish %s', '%d fishes %s', 2, 'foo')) +``` + +output: + +`2 fishes foo` + +## JSON Language Files + +The JSON language files should be stored in a `./locales` folder. +File names correspond to locales, e.g., `en.json`, `pirate.json`. + +When strings are observed for the first time they will be +added to the JSON file corresponding to the current locale. + +## Methods + +### require('y18n')(config) + +Create an instance of y18n with the config provided, options include: + +* `directory`: the locale directory, default `./locales`. +* `updateFiles`: should newly observed strings be updated in file, default `true`. +* `locale`: what locale should be used. +* `fallbackToLanguage`: should fallback to a language-only file (e.g. `en.json`) + be allowed if a file matching the locale does not exist (e.g. `en_US.json`), + default `true`. + +### y18n.\_\_(str, arg, arg, arg) + +Print a localized string, `%s` will be replaced with `arg`s. + +This function can also be used as a tag for a template literal. You can use it +like this: __`hello ${'world'}`. This will be equivalent to +`__('hello %s', 'world')`. + +### y18n.\_\_n(singularString, pluralString, count, arg, arg, arg) + +Print a localized string with appropriate pluralization. If `%d` is provided +in the string, the `count` will replace this placeholder. + +### y18n.setLocale(str) + +Set the current locale being used. + +### y18n.getLocale() + +What locale is currently being used? + +### y18n.updateLocale(obj) + +Update the current locale with the key value pairs in `obj`. + +## License + +ISC + +[travis-url]: https://travis-ci.org/yargs/y18n +[travis-image]: https://img.shields.io/travis/yargs/y18n.svg +[coveralls-url]: https://coveralls.io/github/yargs/y18n +[coveralls-image]: https://img.shields.io/coveralls/yargs/y18n.svg +[npm-url]: https://npmjs.org/package/y18n +[npm-image]: https://img.shields.io/npm/v/y18n.svg +[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg +[standard-url]: https://github.com/feross/standard diff --git a/node_modules/y18n/index.js b/node_modules/y18n/index.js new file mode 100644 index 00000000..d7206816 --- /dev/null +++ b/node_modules/y18n/index.js @@ -0,0 +1,188 @@ +var fs = require('fs') +var path = require('path') +var util = require('util') + +function Y18N (opts) { + // configurable options. + opts = opts || {} + this.directory = opts.directory || './locales' + this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true + this.locale = opts.locale || 'en' + this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true + + // internal stuff. + this.cache = {} + this.writeQueue = [] +} + +Y18N.prototype.__ = function () { + if (typeof arguments[0] !== 'string') { + return this._taggedLiteral.apply(this, arguments) + } + var args = Array.prototype.slice.call(arguments) + var str = args.shift() + var cb = function () {} // start with noop. + + if (typeof args[args.length - 1] === 'function') cb = args.pop() + cb = cb || function () {} // noop. + + if (!this.cache[this.locale]) this._readLocaleFile() + + // we've observed a new string, update the language file. + if (!this.cache[this.locale][str] && this.updateFiles) { + this.cache[this.locale][str] = str + + // include the current directory and locale, + // since these values could change before the + // write is performed. + this._enqueueWrite([this.directory, this.locale, cb]) + } else { + cb() + } + + return util.format.apply(util, [this.cache[this.locale][str] || str].concat(args)) +} + +Y18N.prototype._taggedLiteral = function (parts) { + var args = arguments + var str = '' + parts.forEach(function (part, i) { + var arg = args[i + 1] + str += part + if (typeof arg !== 'undefined') { + str += '%s' + } + }) + return this.__.apply(null, [str].concat([].slice.call(arguments, 1))) +} + +Y18N.prototype._enqueueWrite = function (work) { + this.writeQueue.push(work) + if (this.writeQueue.length === 1) this._processWriteQueue() +} + +Y18N.prototype._processWriteQueue = function () { + var _this = this + var work = this.writeQueue[0] + + // destructure the enqueued work. + var directory = work[0] + var locale = work[1] + var cb = work[2] + + var languageFile = this._resolveLocaleFile(directory, locale) + var serializedLocale = JSON.stringify(this.cache[locale], null, 2) + + fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { + _this.writeQueue.shift() + if (_this.writeQueue.length > 0) _this._processWriteQueue() + cb(err) + }) +} + +Y18N.prototype._readLocaleFile = function () { + var localeLookup = {} + var languageFile = this._resolveLocaleFile(this.directory, this.locale) + + try { + localeLookup = JSON.parse(fs.readFileSync(languageFile, 'utf-8')) + } catch (err) { + if (err instanceof SyntaxError) { + err.message = 'syntax error in ' + languageFile + } + + if (err.code === 'ENOENT') localeLookup = {} + else throw err + } + + this.cache[this.locale] = localeLookup +} + +Y18N.prototype._resolveLocaleFile = function (directory, locale) { + var file = path.resolve(directory, './', locale + '.json') + if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { + // attempt fallback to language only + var languageFile = path.resolve(directory, './', locale.split('_')[0] + '.json') + if (this._fileExistsSync(languageFile)) file = languageFile + } + return file +} + +// this only exists because fs.existsSync() "will be deprecated" +// see https://nodejs.org/api/fs.html#fs_fs_existssync_path +Y18N.prototype._fileExistsSync = function (file) { + try { + return fs.statSync(file).isFile() + } catch (err) { + return false + } +} + +Y18N.prototype.__n = function () { + var args = Array.prototype.slice.call(arguments) + var singular = args.shift() + var plural = args.shift() + var quantity = args.shift() + + var cb = function () {} // start with noop. + if (typeof args[args.length - 1] === 'function') cb = args.pop() + + if (!this.cache[this.locale]) this._readLocaleFile() + + var str = quantity === 1 ? singular : plural + if (this.cache[this.locale][singular]) { + str = this.cache[this.locale][singular][quantity === 1 ? 'one' : 'other'] + } + + // we've observed a new string, update the language file. + if (!this.cache[this.locale][singular] && this.updateFiles) { + this.cache[this.locale][singular] = { + one: singular, + other: plural + } + + // include the current directory and locale, + // since these values could change before the + // write is performed. + this._enqueueWrite([this.directory, this.locale, cb]) + } else { + cb() + } + + // if a %d placeholder is provided, add quantity + // to the arguments expanded by util.format. + var values = [str] + if (~str.indexOf('%d')) values.push(quantity) + + return util.format.apply(util, values.concat(args)) +} + +Y18N.prototype.setLocale = function (locale) { + this.locale = locale +} + +Y18N.prototype.getLocale = function () { + return this.locale +} + +Y18N.prototype.updateLocale = function (obj) { + if (!this.cache[this.locale]) this._readLocaleFile() + + for (var key in obj) { + this.cache[this.locale][key] = obj[key] + } +} + +module.exports = function (opts) { + var y18n = new Y18N(opts) + + // bind all functions to y18n, so that + // they can be used in isolation. + for (var key in y18n) { + if (typeof y18n[key] === 'function') { + y18n[key] = y18n[key].bind(y18n) + } + } + + return y18n +} diff --git a/node_modules/y18n/package.json b/node_modules/y18n/package.json new file mode 100644 index 00000000..f44d52d3 --- /dev/null +++ b/node_modules/y18n/package.json @@ -0,0 +1,39 @@ +{ + "name": "y18n", + "version": "4.0.0", + "description": "the bare-bones internationalization library used by yargs", + "main": "index.js", + "scripts": { + "pretest": "standard", + "test": "nyc mocha", + "coverage": "nyc report --reporter=text-lcov | coveralls", + "release": "standard-version" + }, + "repository": { + "type": "git", + "url": "git@github.com:yargs/y18n.git" + }, + "files": [ + "index.js" + ], + "keywords": [ + "i18n", + "internationalization", + "yargs" + ], + "author": "Ben Coe ", + "license": "ISC", + "bugs": { + "url": "https://github.com/yargs/y18n/issues" + }, + "homepage": "https://github.com/yargs/y18n", + "devDependencies": { + "chai": "^4.0.1", + "coveralls": "^3.0.0", + "mocha": "^4.0.1", + "nyc": "^11.0.1", + "rimraf": "^2.5.0", + "standard": "^10.0.0-beta.0", + "standard-version": "^4.2.0" + } +} diff --git a/node_modules/yargs-parser/CHANGELOG.md b/node_modules/yargs-parser/CHANGELOG.md new file mode 100644 index 00000000..df11c002 --- /dev/null +++ b/node_modules/yargs-parser/CHANGELOG.md @@ -0,0 +1,467 @@ +# 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. + +### [13.1.1](https://www.github.com/yargs/yargs-parser/compare/v13.1.0...v13.1.1) (2019-06-10) + + +### Bug Fixes + +* convert values to strings when tokenizing ([#167](https://www.github.com/yargs/yargs-parser/issues/167)) ([57b7883](https://www.github.com/yargs/yargs-parser/commit/57b7883)) +* nargs should allow duplicates when duplicate-arguments-array=false ([#164](https://www.github.com/yargs/yargs-parser/issues/164)) ([47ccb0b](https://www.github.com/yargs/yargs-parser/commit/47ccb0b)) +* should populate "_" when given config with "short-option-groups" false ([#179](https://www.github.com/yargs/yargs-parser/issues/179)) ([6055974](https://www.github.com/yargs/yargs-parser/commit/6055974)) + +## [13.1.0](https://github.com/yargs/yargs-parser/compare/v13.0.0...v13.1.0) (2019-05-05) + + +### Features + +* add `strip-aliased` and `strip-dashed` configuration options. ([#172](https://github.com/yargs/yargs-parser/issues/172)) ([a3936aa](https://github.com/yargs/yargs-parser/commit/a3936aa)) +* support boolean which do not consume next argument. ([#171](https://github.com/yargs/yargs-parser/issues/171)) ([0ae7fcb](https://github.com/yargs/yargs-parser/commit/0ae7fcb)) + + + + +# [13.0.0](https://github.com/yargs/yargs-parser/compare/v12.0.0...v13.0.0) (2019-02-02) + + +### Features + +* don't coerce number from string with leading '0' or '+' ([#158](https://github.com/yargs/yargs-parser/issues/158)) ([18d0fd5](https://github.com/yargs/yargs-parser/commit/18d0fd5)) + + +### BREAKING CHANGES + +* options with leading '+' or '0' now parse as strings + + + + +# [12.0.0](https://github.com/yargs/yargs-parser/compare/v11.1.1...v12.0.0) (2019-01-29) + + +### Bug Fixes + +* better handling of quoted strings ([#153](https://github.com/yargs/yargs-parser/issues/153)) ([2fb71b2](https://github.com/yargs/yargs-parser/commit/2fb71b2)) + + +### Features + +* default value is now used if no right-hand value provided for numbers/strings ([#156](https://github.com/yargs/yargs-parser/issues/156)) ([5a7c46a](https://github.com/yargs/yargs-parser/commit/5a7c46a)) + + +### BREAKING CHANGES + +* a flag with no right-hand value no longer populates defaulted options with `undefined`. +* quotes at beginning and endings of strings are not removed during parsing. + + + + +## [11.1.1](https://github.com/yargs/yargs-parser/compare/v11.1.0...v11.1.1) (2018-11-19) + + +### Bug Fixes + +* ensure empty string is added into argv._ ([#140](https://github.com/yargs/yargs-parser/issues/140)) ([79cda98](https://github.com/yargs/yargs-parser/commit/79cda98)) + + +### Reverts + +* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([f4a3063](https://github.com/yargs/yargs-parser/commit/f4a3063)) + + + + +# [11.1.0](https://github.com/yargs/yargs-parser/compare/v11.0.0...v11.1.0) (2018-11-10) + + +### Bug Fixes + +* handling of one char alias ([#139](https://github.com/yargs/yargs-parser/issues/139)) ([ee56e31](https://github.com/yargs/yargs-parser/commit/ee56e31)) + + +### Features + +* add halt-at-non-option configuration option ([#130](https://github.com/yargs/yargs-parser/issues/130)) ([a849fce](https://github.com/yargs/yargs-parser/commit/a849fce)) + + + + +# [11.0.0](https://github.com/yargs/yargs-parser/compare/v10.1.0...v11.0.0) (2018-10-06) + + +### Bug Fixes + +* flatten-duplicate-arrays:false for more than 2 arrays ([#128](https://github.com/yargs/yargs-parser/issues/128)) ([2bc395f](https://github.com/yargs/yargs-parser/commit/2bc395f)) +* hyphenated flags combined with dot notation broke parsing ([#131](https://github.com/yargs/yargs-parser/issues/131)) ([dc788da](https://github.com/yargs/yargs-parser/commit/dc788da)) +* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([77ae1d4](https://github.com/yargs/yargs-parser/commit/77ae1d4)) + + +### Chores + +* update dependencies ([6dc42a1](https://github.com/yargs/yargs-parser/commit/6dc42a1)) + + +### Features + +* also add camelCase array options ([#125](https://github.com/yargs/yargs-parser/issues/125)) ([08c0117](https://github.com/yargs/yargs-parser/commit/08c0117)) +* array.type can now be provided, supporting coercion ([#132](https://github.com/yargs/yargs-parser/issues/132)) ([4b8cfce](https://github.com/yargs/yargs-parser/commit/4b8cfce)) + + +### BREAKING CHANGES + +* drops Node 4 support +* the argv object is now populated differently (correctly) when hyphens and dot notation are used in conjunction. + + + + +# [10.1.0](https://github.com/yargs/yargs-parser/compare/v10.0.0...v10.1.0) (2018-06-29) + + +### Features + +* add `set-placeholder-key` configuration ([#123](https://github.com/yargs/yargs-parser/issues/123)) ([19386ee](https://github.com/yargs/yargs-parser/commit/19386ee)) + + + + +# [10.0.0](https://github.com/yargs/yargs-parser/compare/v9.0.2...v10.0.0) (2018-04-04) + + +### Bug Fixes + +* do not set boolean flags if not defined in `argv` ([#119](https://github.com/yargs/yargs-parser/issues/119)) ([f6e6599](https://github.com/yargs/yargs-parser/commit/f6e6599)) + + +### BREAKING CHANGES + +* `boolean` flags defined without a `default` value will now behave like other option type and won't be set in the parsed results when the user doesn't set the corresponding CLI arg. + +Previous behavior: +```js +var parse = require('yargs-parser'); + +parse('--flag', {boolean: ['flag']}); +// => { _: [], flag: true } + +parse('--no-flag', {boolean: ['flag']}); +// => { _: [], flag: false } + +parse('', {boolean: ['flag']}); +// => { _: [], flag: false } +``` + +New behavior: +```js +var parse = require('yargs-parser'); + +parse('--flag', {boolean: ['flag']}); +// => { _: [], flag: true } + +parse('--no-flag', {boolean: ['flag']}); +// => { _: [], flag: false } + +parse('', {boolean: ['flag']}); +// => { _: [] } => flag not set similarly to other option type +``` + + + + +## [9.0.2](https://github.com/yargs/yargs-parser/compare/v9.0.1...v9.0.2) (2018-01-20) + + +### Bug Fixes + +* nargs was still aggressively consuming too many arguments ([9b28aad](https://github.com/yargs/yargs-parser/commit/9b28aad)) + + + + +## [9.0.1](https://github.com/yargs/yargs-parser/compare/v9.0.0...v9.0.1) (2018-01-20) + + +### Bug Fixes + +* nargs was consuming too many arguments ([4fef206](https://github.com/yargs/yargs-parser/commit/4fef206)) + + + + +# [9.0.0](https://github.com/yargs/yargs-parser/compare/v8.1.0...v9.0.0) (2018-01-20) + + +### Features + +* narg arguments no longer consume flag arguments ([#114](https://github.com/yargs/yargs-parser/issues/114)) ([60bb9b3](https://github.com/yargs/yargs-parser/commit/60bb9b3)) + + +### BREAKING CHANGES + +* arguments of form --foo, -abc, will no longer be consumed by nargs + + + + +# [8.1.0](https://github.com/yargs/yargs-parser/compare/v8.0.0...v8.1.0) (2017-12-20) + + +### Bug Fixes + +* allow null config values ([#108](https://github.com/yargs/yargs-parser/issues/108)) ([d8b14f9](https://github.com/yargs/yargs-parser/commit/d8b14f9)) +* ensure consistent parsing of dot-notation arguments ([#102](https://github.com/yargs/yargs-parser/issues/102)) ([c9bd79c](https://github.com/yargs/yargs-parser/commit/c9bd79c)) +* implement [@antoniom](https://github.com/antoniom)'s fix for camel-case expansion ([3087e1d](https://github.com/yargs/yargs-parser/commit/3087e1d)) +* only run coercion functions once, despite aliases. ([#76](https://github.com/yargs/yargs-parser/issues/76)) ([#103](https://github.com/yargs/yargs-parser/issues/103)) ([507aaef](https://github.com/yargs/yargs-parser/commit/507aaef)) +* scientific notation circumvented bounds check ([#110](https://github.com/yargs/yargs-parser/issues/110)) ([3571f57](https://github.com/yargs/yargs-parser/commit/3571f57)) +* tokenizer should ignore spaces at the beginning of the argString ([#106](https://github.com/yargs/yargs-parser/issues/106)) ([f34ead9](https://github.com/yargs/yargs-parser/commit/f34ead9)) + + +### Features + +* make combining arrays a configurable option ([#111](https://github.com/yargs/yargs-parser/issues/111)) ([c8bf536](https://github.com/yargs/yargs-parser/commit/c8bf536)) +* merge array from arguments with array from config ([#83](https://github.com/yargs/yargs-parser/issues/83)) ([806ddd6](https://github.com/yargs/yargs-parser/commit/806ddd6)) + + + + +# [8.0.0](https://github.com/yargs/yargs-parser/compare/v7.0.0...v8.0.0) (2017-10-05) + + +### Bug Fixes + +* Ignore multiple spaces between arguments. ([#100](https://github.com/yargs/yargs-parser/issues/100)) ([d137227](https://github.com/yargs/yargs-parser/commit/d137227)) + + +### Features + +* allow configuration of prefix for boolean negation ([#94](https://github.com/yargs/yargs-parser/issues/94)) ([00bde7d](https://github.com/yargs/yargs-parser/commit/00bde7d)) +* reworking how numbers are parsed ([#104](https://github.com/yargs/yargs-parser/issues/104)) ([fba00eb](https://github.com/yargs/yargs-parser/commit/fba00eb)) + + +### BREAKING CHANGES + +* strings that fail `Number.isSafeInteger()` are no longer coerced into numbers. + + + + +# [7.0.0](https://github.com/yargs/yargs-parser/compare/v6.0.1...v7.0.0) (2017-05-02) + + +### Chores + +* revert populate-- logic ([#91](https://github.com/yargs/yargs-parser/issues/91)) ([6003e6d](https://github.com/yargs/yargs-parser/commit/6003e6d)) + + +### BREAKING CHANGES + +* populate-- now defaults to false. + + + + +## [6.0.1](https://github.com/yargs/yargs-parser/compare/v6.0.0...v6.0.1) (2017-05-01) + + +### Bug Fixes + +* default '--' to undefined when not provided; this is closer to the array API ([#90](https://github.com/yargs/yargs-parser/issues/90)) ([4e739cc](https://github.com/yargs/yargs-parser/commit/4e739cc)) + + + + +# [6.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v6.0.0) (2017-05-01) + + +### Bug Fixes + +* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f)) +* parsing hints should apply for dot notation keys ([#86](https://github.com/yargs/yargs-parser/issues/86)) ([3e47d62](https://github.com/yargs/yargs-parser/commit/3e47d62)) + + +### Chores + +* upgrade to newest version of camelcase ([#87](https://github.com/yargs/yargs-parser/issues/87)) ([f1903aa](https://github.com/yargs/yargs-parser/commit/f1903aa)) + + +### Features + +* add -- option which allows arguments after the -- flag to be returned separated from positional arguments ([#84](https://github.com/yargs/yargs-parser/issues/84)) ([2572ca8](https://github.com/yargs/yargs-parser/commit/2572ca8)) +* when parsing stops, we now populate "--" by default ([#88](https://github.com/yargs/yargs-parser/issues/88)) ([cd666db](https://github.com/yargs/yargs-parser/commit/cd666db)) + + +### BREAKING CHANGES + +* rather than placing arguments in "_", when parsing is stopped via "--"; we now populate an array called "--" by default. +* camelcase now requires Node 4+. +* environment variables will now override config files (args, env, config-file, config-object) + + + + +# [5.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v5.0.0) (2017-02-18) + + +### Bug Fixes + +* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f)) + + +### BREAKING CHANGES + +* environment variables will now override config files (args, env, config-file, config-object) + + + + +## [4.2.1](https://github.com/yargs/yargs-parser/compare/v4.2.0...v4.2.1) (2017-01-02) + + +### Bug Fixes + +* flatten/duplicate regression ([#75](https://github.com/yargs/yargs-parser/issues/75)) ([68d68a0](https://github.com/yargs/yargs-parser/commit/68d68a0)) + + + + +# [4.2.0](https://github.com/yargs/yargs-parser/compare/v4.1.0...v4.2.0) (2016-12-01) + + +### Bug Fixes + +* inner objects in configs had their keys appended to top-level key when dot-notation was disabled ([#72](https://github.com/yargs/yargs-parser/issues/72)) ([0b1b5f9](https://github.com/yargs/yargs-parser/commit/0b1b5f9)) + + +### Features + +* allow multiple arrays to be provided, rather than always combining ([#71](https://github.com/yargs/yargs-parser/issues/71)) ([0f0fb2d](https://github.com/yargs/yargs-parser/commit/0f0fb2d)) + + + + +# [4.1.0](https://github.com/yargs/yargs-parser/compare/v4.0.2...v4.1.0) (2016-11-07) + + +### Features + +* apply coercions to default options ([#65](https://github.com/yargs/yargs-parser/issues/65)) ([c79052b](https://github.com/yargs/yargs-parser/commit/c79052b)) +* handle dot notation boolean options ([#63](https://github.com/yargs/yargs-parser/issues/63)) ([02c3545](https://github.com/yargs/yargs-parser/commit/02c3545)) + + + + +## [4.0.2](https://github.com/yargs/yargs-parser/compare/v4.0.1...v4.0.2) (2016-09-30) + + +### Bug Fixes + +* whoops, let's make the assign not change the Object key order ([29d069a](https://github.com/yargs/yargs-parser/commit/29d069a)) + + + + +## [4.0.1](https://github.com/yargs/yargs-parser/compare/v4.0.0...v4.0.1) (2016-09-30) + + +### Bug Fixes + +* lodash.assign was deprecated ([#59](https://github.com/yargs/yargs-parser/issues/59)) ([5e7eb11](https://github.com/yargs/yargs-parser/commit/5e7eb11)) + + + + +# [4.0.0](https://github.com/yargs/yargs-parser/compare/v3.2.0...v4.0.0) (2016-09-26) + + +### Bug Fixes + +* coerce should be applied to the final objects and arrays created ([#57](https://github.com/yargs/yargs-parser/issues/57)) ([4ca69da](https://github.com/yargs/yargs-parser/commit/4ca69da)) + + +### BREAKING CHANGES + +* coerce is no longer applied to individual arguments in an implicit array. + + + + +# [3.2.0](https://github.com/yargs/yargs-parser/compare/v3.1.0...v3.2.0) (2016-08-13) + + +### Features + +* coerce full array instead of each element ([#51](https://github.com/yargs/yargs-parser/issues/51)) ([cc4dc56](https://github.com/yargs/yargs-parser/commit/cc4dc56)) + + + + +# [3.1.0](https://github.com/yargs/yargs-parser/compare/v3.0.0...v3.1.0) (2016-08-09) + + +### Bug Fixes + +* address pkgConf parsing bug outlined in [#37](https://github.com/yargs/yargs-parser/issues/37) ([#45](https://github.com/yargs/yargs-parser/issues/45)) ([be76ee6](https://github.com/yargs/yargs-parser/commit/be76ee6)) +* better parsing of negative values ([#44](https://github.com/yargs/yargs-parser/issues/44)) ([2e43692](https://github.com/yargs/yargs-parser/commit/2e43692)) +* check aliases when guessing defaults for arguments fixes [#41](https://github.com/yargs/yargs-parser/issues/41) ([#43](https://github.com/yargs/yargs-parser/issues/43)) ([f3e4616](https://github.com/yargs/yargs-parser/commit/f3e4616)) + + +### Features + +* added coerce option, for providing specialized argument parsing ([#42](https://github.com/yargs/yargs-parser/issues/42)) ([7b49cd2](https://github.com/yargs/yargs-parser/commit/7b49cd2)) + + + + +# [3.0.0](https://github.com/yargs/yargs-parser/compare/v2.4.1...v3.0.0) (2016-08-07) + + +### Bug Fixes + +* parsing issue with numeric character in group of options ([#19](https://github.com/yargs/yargs-parser/issues/19)) ([f743236](https://github.com/yargs/yargs-parser/commit/f743236)) +* upgraded lodash.assign ([5d7fdf4](https://github.com/yargs/yargs-parser/commit/5d7fdf4)) + +### BREAKING CHANGES + +* subtle change to how values are parsed in a group of single-character arguments. +* _first released in 3.1.0, better handling of negative values should be considered a breaking change._ + + + + +## [2.4.1](https://github.com/yargs/yargs-parser/compare/v2.4.0...v2.4.1) (2016-07-16) + + +### Bug Fixes + +* **count:** do not increment a default value ([#39](https://github.com/yargs/yargs-parser/issues/39)) ([b04a189](https://github.com/yargs/yargs-parser/commit/b04a189)) + + + + +# [2.4.0](https://github.com/yargs/yargs-parser/compare/v2.3.0...v2.4.0) (2016-04-11) + + +### Features + +* **environment:** Support nested options in environment variables ([#26](https://github.com/yargs/yargs-parser/issues/26)) thanks [@elas7](https://github.com/elas7) \o/ ([020778b](https://github.com/yargs/yargs-parser/commit/020778b)) + + + + +# [2.3.0](https://github.com/yargs/yargs-parser/compare/v2.2.0...v2.3.0) (2016-04-09) + + +### Bug Fixes + +* **boolean:** fix for boolean options with non boolean defaults (#20) ([2dbe86b](https://github.com/yargs/yargs-parser/commit/2dbe86b)), closes [(#20](https://github.com/(/issues/20) +* **package:** remove tests from tarball ([0353c0d](https://github.com/yargs/yargs-parser/commit/0353c0d)) +* **parsing:** handle calling short option with an empty string as the next value. ([a867165](https://github.com/yargs/yargs-parser/commit/a867165)) +* boolean flag when next value contains the strings 'true' or 'false'. ([69941a6](https://github.com/yargs/yargs-parser/commit/69941a6)) +* update dependencies; add standard-version bin for next release (#24) ([822d9d5](https://github.com/yargs/yargs-parser/commit/822d9d5)) + +### Features + +* **configuration:** Allow to pass configuration objects to yargs-parser ([0780900](https://github.com/yargs/yargs-parser/commit/0780900)) +* **normalize:** allow normalize to work with arrays ([e0eaa1a](https://github.com/yargs/yargs-parser/commit/e0eaa1a)) diff --git a/node_modules/yargs-parser/LICENSE.txt b/node_modules/yargs-parser/LICENSE.txt new file mode 100644 index 00000000..836440be --- /dev/null +++ b/node_modules/yargs-parser/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/yargs-parser/README.md b/node_modules/yargs-parser/README.md new file mode 100644 index 00000000..dde9f84d --- /dev/null +++ b/node_modules/yargs-parser/README.md @@ -0,0 +1,396 @@ +# yargs-parser + +[![Build Status](https://travis-ci.org/yargs/yargs-parser.svg)](https://travis-ci.org/yargs/yargs-parser) +[![Coverage Status](https://coveralls.io/repos/yargs/yargs-parser/badge.svg?branch=)](https://coveralls.io/r/yargs/yargs-parser?branch=master) +[![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + + +The mighty option parser used by [yargs](https://github.com/yargs/yargs). + +visit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions. + + + +## Example + +```sh +npm i yargs-parser --save +``` + +```js +var argv = require('yargs-parser')(process.argv.slice(2)) +console.log(argv) +``` + +```sh +node example.js --foo=33 --bar hello +{ _: [], foo: 33, bar: 'hello' } +``` + +_or parse a string!_ + +```js +var argv = require('./')('--foo=99 --bar=33') +console.log(argv) +``` + +```sh +{ _: [], foo: 99, bar: 33 } +``` + +Convert an array of mixed types before passing to `yargs-parser`: + +```js +var parse = require('yargs-parser') +parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string +parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings +``` + +## API + +### require('yargs-parser')(args, opts={}) + +Parses command line arguments returning a simple mapping of keys and values. + +**expects:** + +* `args`: a string or array of strings representing the options to parse. +* `opts`: provide a set of hints indicating how `args` should be parsed: + * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`. + * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.
+ Indicate that keys should be parsed as an array and coerced to booleans / numbers:
+ `{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`. + * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`. + * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided + (or throws an error). For arrays the function is called only once for the entire array:
+ `{coerce: {foo: function (arg) {return modifiedArg}}}`. + * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). + * `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:
+ `{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`. + * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). + * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`. + * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`. + * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed. + * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`. + * `opts.normalize`: `path.normalize()` will be applied to values set to this key. + * `opts.number`: keys should be treated as numbers. + * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). + +**returns:** + +* `obj`: an object representing the parsed value of `args` + * `key/value`: key value pairs for each argument and their aliases. + * `_`: an array representing the positional arguments. + * [optional] `--`: an array with arguments after the end-of-options flag `--`. + +### require('yargs-parser').detailed(args, opts={}) + +Parses a command line string, returning detailed information required by the +yargs engine. + +**expects:** + +* `args`: a string or array of strings representing options to parse. +* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`. + +**returns:** + +* `argv`: an object representing the parsed value of `args` + * `key/value`: key value pairs for each argument and their aliases. + * `_`: an array representing the positional arguments. +* `error`: populated with an error object if an exception occurred during parsing. +* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`. +* `newAliases`: any new aliases added via camel-case expansion. +* `configuration`: the configuration loaded from the `yargs` stanza in package.json. + + + +### Configuration + +The yargs-parser applies several automated transformations on the keys provided +in `args`. These features can be turned on and off using the `configuration` field +of `opts`. + +```js +var parsed = parser(['--no-dice'], { + configuration: { + 'boolean-negation': false + } +}) +``` + +### short option groups + +* default: `true`. +* key: `short-option-groups`. + +Should a group of short-options be treated as boolean flags? + +```sh +node example.js -abc +{ _: [], a: true, b: true, c: true } +``` + +_if disabled:_ + +```sh +node example.js -abc +{ _: [], abc: true } +``` + +### camel-case expansion + +* default: `true`. +* key: `camel-case-expansion`. + +Should hyphenated arguments be expanded into camel-case aliases? + +```sh +node example.js --foo-bar +{ _: [], 'foo-bar': true, fooBar: true } +``` + +_if disabled:_ + +```sh +node example.js --foo-bar +{ _: [], 'foo-bar': true } +``` + +### dot-notation + +* default: `true` +* key: `dot-notation` + +Should keys that contain `.` be treated as objects? + +```sh +node example.js --foo.bar +{ _: [], foo: { bar: true } } +``` + +_if disabled:_ + +```sh +node example.js --foo.bar +{ _: [], "foo.bar": true } +``` + +### parse numbers + +* default: `true` +* key: `parse-numbers` + +Should keys that look like numbers be treated as such? + +```sh +node example.js --foo=99.3 +{ _: [], foo: 99.3 } +``` + +_if disabled:_ + +```sh +node example.js --foo=99.3 +{ _: [], foo: "99.3" } +``` + +### boolean negation + +* default: `true` +* key: `boolean-negation` + +Should variables prefixed with `--no` be treated as negations? + +```sh +node example.js --no-foo +{ _: [], foo: false } +``` + +_if disabled:_ + +```sh +node example.js --no-foo +{ _: [], "no-foo": true } +``` + +### combine arrays + +* default: `false` +* key: `combine-arrays` + +Should arrays be combined when provided by both command line arguments and +a configuration file. + +### duplicate arguments array + +* default: `true` +* key: `duplicate-arguments-array` + +Should arguments be coerced into an array when duplicated: + +```sh +node example.js -x 1 -x 2 +{ _: [], x: [1, 2] } +``` + +_if disabled:_ + +```sh +node example.js -x 1 -x 2 +{ _: [], x: 2 } +``` + +### flatten duplicate arrays + +* default: `true` +* key: `flatten-duplicate-arrays` + +Should array arguments be coerced into a single array when duplicated: + +```sh +node example.js -x 1 2 -x 3 4 +{ _: [], x: [1, 2, 3, 4] } +``` + +_if disabled:_ + +```sh +node example.js -x 1 2 -x 3 4 +{ _: [], x: [[1, 2], [3, 4]] } +``` + +### negation prefix + +* default: `no-` +* key: `negation-prefix` + +The prefix to use for negated boolean variables. + +```sh +node example.js --no-foo +{ _: [], foo: false } +``` + +_if set to `quux`:_ + +```sh +node example.js --quuxfoo +{ _: [], foo: false } +``` + +### populate -- + +* default: `false`. +* key: `populate--` + +Should unparsed flags be stored in `--` or `_`. + +_If disabled:_ + +```sh +node example.js a -b -- x y +{ _: [ 'a', 'x', 'y' ], b: true } +``` + +_If enabled:_ + +```sh +node example.js a -b -- x y +{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true } +``` + +### set placeholder key + +* default: `false`. +* key: `set-placeholder-key`. + +Should a placeholder be added for keys not set via the corresponding CLI argument? + +_If disabled:_ + +```sh +node example.js -a 1 -c 2 +{ _: [], a: 1, c: 2 } +``` + +_If enabled:_ + +```sh +node example.js -a 1 -c 2 +{ _: [], a: 1, b: undefined, c: 2 } +``` + +### halt at non-option + +* default: `false`. +* key: `halt-at-non-option`. + +Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line. + +_If disabled:_ + +```sh +node example.js -a run b -x y +{ _: [ 'b' ], a: 'run', x: 'y' } +``` + +_If enabled:_ + +```sh +node example.js -a run b -x y +{ _: [ 'b', '-x', 'y' ], a: 'run' } +``` + +### strip aliased + +* default: `false` +* key: `strip-aliased` + +Should aliases be removed before returning results? + +_If disabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 } +``` + +_If enabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1 } +``` + +### strip dashed + +* default: `false` +* key: `strip-dashed` + +Should dashed keys be removed before returning results? This option has no effect if +`camel-case-exansion` is disabled. + +_If disabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1 } +``` + +_If enabled:_ + +```sh +node example.js --test-field 1 +{ _: [], testField: 1 } +``` + +## Special Thanks + +The yargs project evolves from optimist and minimist. It owes its +existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/ + +## License + +ISC diff --git a/node_modules/yargs-parser/index.js b/node_modules/yargs-parser/index.js new file mode 100644 index 00000000..a6c95ba3 --- /dev/null +++ b/node_modules/yargs-parser/index.js @@ -0,0 +1,903 @@ +var camelCase = require('camelcase') +var decamelize = require('decamelize') +var path = require('path') +var tokenizeArgString = require('./lib/tokenize-arg-string') +var util = require('util') + +function parse (args, opts) { + if (!opts) opts = {} + // allow a string argument to be passed in rather + // than an argv array. + args = tokenizeArgString(args) + + // aliases might have transitive relationships, normalize this. + var aliases = combineAliases(opts.alias || {}) + var configuration = Object.assign({ + 'short-option-groups': true, + 'camel-case-expansion': true, + 'dot-notation': true, + 'parse-numbers': true, + 'boolean-negation': true, + 'negation-prefix': 'no-', + 'duplicate-arguments-array': true, + 'flatten-duplicate-arrays': true, + 'populate--': false, + 'combine-arrays': false, + 'set-placeholder-key': false, + 'halt-at-non-option': false, + 'strip-aliased': false, + 'strip-dashed': false + }, opts.configuration) + var defaults = opts.default || {} + var configObjects = opts.configObjects || [] + var envPrefix = opts.envPrefix + var notFlagsOption = configuration['populate--'] + var notFlagsArgv = notFlagsOption ? '--' : '_' + var newAliases = {} + // allow a i18n handler to be passed in, default to a fake one (util.format). + var __ = opts.__ || util.format + var error = null + var flags = { + aliases: {}, + arrays: {}, + bools: {}, + strings: {}, + numbers: {}, + counts: {}, + normalize: {}, + configs: {}, + defaulted: {}, + nargs: {}, + coercions: {}, + keys: [] + } + var negative = /^-[0-9]+(\.[0-9]+)?/ + var negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)') + + ;[].concat(opts.array).filter(Boolean).forEach(function (opt) { + var key = opt.key || opt + + // assign to flags[bools|strings|numbers] + const assignment = Object.keys(opt).map(function (key) { + return ({ + boolean: 'bools', + string: 'strings', + number: 'numbers' + })[key] + }).filter(Boolean).pop() + + // assign key to be coerced + if (assignment) { + flags[assignment][key] = true + } + + flags.arrays[key] = true + flags.keys.push(key) + }) + + ;[].concat(opts.boolean).filter(Boolean).forEach(function (key) { + flags.bools[key] = true + flags.keys.push(key) + }) + + ;[].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true + flags.keys.push(key) + }) + + ;[].concat(opts.number).filter(Boolean).forEach(function (key) { + flags.numbers[key] = true + flags.keys.push(key) + }) + + ;[].concat(opts.count).filter(Boolean).forEach(function (key) { + flags.counts[key] = true + flags.keys.push(key) + }) + + ;[].concat(opts.normalize).filter(Boolean).forEach(function (key) { + flags.normalize[key] = true + flags.keys.push(key) + }) + + Object.keys(opts.narg || {}).forEach(function (k) { + flags.nargs[k] = opts.narg[k] + flags.keys.push(k) + }) + + Object.keys(opts.coerce || {}).forEach(function (k) { + flags.coercions[k] = opts.coerce[k] + flags.keys.push(k) + }) + + if (Array.isArray(opts.config) || typeof opts.config === 'string') { + ;[].concat(opts.config).filter(Boolean).forEach(function (key) { + flags.configs[key] = true + }) + } else { + Object.keys(opts.config || {}).forEach(function (k) { + flags.configs[k] = opts.config[k] + }) + } + + // create a lookup table that takes into account all + // combinations of aliases: {f: ['foo'], foo: ['f']} + extendAliases(opts.key, aliases, opts.default, flags.arrays) + + // apply default values to all aliases. + Object.keys(defaults).forEach(function (key) { + (flags.aliases[key] || []).forEach(function (alias) { + defaults[alias] = defaults[key] + }) + }) + + var argv = { _: [] } + + Object.keys(flags.bools).forEach(function (key) { + if (Object.prototype.hasOwnProperty.call(defaults, key)) { + setArg(key, defaults[key]) + setDefaulted(key) + } + }) + + var notFlags = [] + + for (var i = 0; i < args.length; i++) { + var arg = args[i] + var broken + var key + var letters + var m + var next + var value + + // -- separated by = + if (arg.match(/^--.+=/) || ( + !configuration['short-option-groups'] && arg.match(/^-.+=/) + )) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + m = arg.match(/^--?([^=]+)=([\s\S]*)$/) + + // nargs format = '--f=monkey washing cat' + if (checkAllAliases(m[1], flags.nargs)) { + args.splice(i + 1, 0, m[2]) + i = eatNargs(i, m[1], args) + // arrays format = '--f=a b c' + } else if (checkAllAliases(m[1], flags.arrays) && args.length > i + 1) { + args.splice(i + 1, 0, m[2]) + i = eatArray(i, m[1], args) + } else { + setArg(m[1], m[2]) + } + } else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { + key = arg.match(negatedBoolean)[1] + setArg(key, false) + + // -- seperated by space. + } else if (arg.match(/^--.+/) || ( + !configuration['short-option-groups'] && arg.match(/^-[^-]+/) + )) { + key = arg.match(/^--?(.+)/)[1] + + // nargs format = '--foo a b c' + if (checkAllAliases(key, flags.nargs)) { + i = eatNargs(i, key, args) + // array format = '--foo a b c' + } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + i = eatArray(i, key, args) + } else { + next = flags.nargs[key] === 0 ? undefined : args[i + 1] + + if (next !== undefined && (!next.match(/^-/) || + next.match(negative)) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next) + i++ + } else if (/^(true|false)$/.test(next)) { + setArg(key, next) + i++ + } else { + setArg(key, defaultValue(key)) + } + } + + // dot-notation flag seperated by '='. + } else if (arg.match(/^-.\..+=/)) { + m = arg.match(/^-([^=]+)=([\s\S]*)$/) + setArg(m[1], m[2]) + + // dot-notation flag seperated by space. + } else if (arg.match(/^-.\..+/)) { + next = args[i + 1] + key = arg.match(/^-(.\..+)/)[1] + + if (next !== undefined && !next.match(/^-/) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next) + i++ + } else { + setArg(key, defaultValue(key)) + } + } else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { + letters = arg.slice(1, -1).split('') + broken = false + + for (var j = 0; j < letters.length; j++) { + next = arg.slice(j + 2) + + if (letters[j + 1] && letters[j + 1] === '=') { + value = arg.slice(j + 3) + key = letters[j] + + // nargs format = '-f=monkey washing cat' + if (checkAllAliases(key, flags.nargs)) { + args.splice(i + 1, 0, value) + i = eatNargs(i, key, args) + // array format = '-f=a b c' + } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + args.splice(i + 1, 0, value) + i = eatArray(i, key, args) + } else { + setArg(key, value) + } + + broken = true + break + } + + if (next === '-') { + setArg(letters[j], next) + continue + } + + // current letter is an alphabetic character and next value is a number + if (/[A-Za-z]/.test(letters[j]) && + /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next) + broken = true + break + } + + if (letters[j + 1] && letters[j + 1].match(/\W/)) { + setArg(letters[j], next) + broken = true + break + } else { + setArg(letters[j], defaultValue(letters[j])) + } + } + + key = arg.slice(-1)[0] + + if (!broken && key !== '-') { + // nargs format = '-f a b c' + if (checkAllAliases(key, flags.nargs)) { + i = eatNargs(i, key, args) + // array format = '-f a b c' + } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + i = eatArray(i, key, args) + } else { + next = args[i + 1] + + if (next !== undefined && (!/^(-|--)[^-]/.test(next) || + next.match(negative)) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next) + i++ + } else if (/^(true|false)$/.test(next)) { + setArg(key, next) + i++ + } else { + setArg(key, defaultValue(key)) + } + } + } + } else if (arg === '--') { + notFlags = args.slice(i + 1) + break + } else if (configuration['halt-at-non-option']) { + notFlags = args.slice(i) + break + } else { + argv._.push(maybeCoerceNumber('_', arg)) + } + } + + // order of precedence: + // 1. command line arg + // 2. value from env var + // 3. value from config file + // 4. value from config objects + // 5. configured default value + applyEnvVars(argv, true) // special case: check env vars that point to config file + applyEnvVars(argv, false) + setConfig(argv) + setConfigObjects() + applyDefaultsAndAliases(argv, flags.aliases, defaults) + applyCoercions(argv) + if (configuration['set-placeholder-key']) setPlaceholderKeys(argv) + + // for any counts either not in args or without an explicit default, set to 0 + Object.keys(flags.counts).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) setArg(key, 0) + }) + + // '--' defaults to undefined. + if (notFlagsOption && notFlags.length) argv[notFlagsArgv] = [] + notFlags.forEach(function (key) { + argv[notFlagsArgv].push(key) + }) + + if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { + Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { + delete argv[key] + }) + } + + if (configuration['strip-aliased']) { + // XXX Switch to [].concat(...Object.values(aliases)) once node.js 6 is dropped + ;[].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { + if (configuration['camel-case-expansion']) { + delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')] + } + + delete argv[alias] + }) + } + + // how many arguments should we consume, based + // on the nargs option? + function eatNargs (i, key, args) { + var ii + const toEat = checkAllAliases(key, flags.nargs) + + // nargs will not consume flag arguments, e.g., -abc, --foo, + // and terminates when one is observed. + var available = 0 + for (ii = i + 1; ii < args.length; ii++) { + if (!args[ii].match(/^-[^0-9]/)) available++ + else break + } + + if (available < toEat) error = Error(__('Not enough arguments following: %s', key)) + + const consumed = Math.min(available, toEat) + for (ii = i + 1; ii < (consumed + i + 1); ii++) { + setArg(key, args[ii]) + } + + return (i + consumed) + } + + // if an option is an array, eat all non-hyphenated arguments + // following it... YUM! + // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] + function eatArray (i, key, args) { + var start = i + 1 + var argsToSet = [] + var multipleArrayFlag = i > 0 + for (var ii = i + 1; ii < args.length; ii++) { + if (/^-/.test(args[ii]) && !negative.test(args[ii])) { + if (ii === start) { + setArg(key, defaultForType('array')) + } + multipleArrayFlag = true + break + } + i = ii + argsToSet.push(args[ii]) + } + if (multipleArrayFlag) { + setArg(key, argsToSet.map(function (arg) { + return processValue(key, arg) + })) + } else { + argsToSet.forEach(function (arg) { + setArg(key, arg) + }) + } + + return i + } + + function setArg (key, val) { + unsetDefaulted(key) + + if (/-/.test(key) && configuration['camel-case-expansion']) { + var alias = key.split('.').map(function (prop) { + return camelCase(prop) + }).join('.') + addNewAlias(key, alias) + } + + var value = processValue(key, val) + + var splitKey = key.split('.') + setKey(argv, splitKey, value) + + // handle populating aliases of the full key + if (flags.aliases[key]) { + flags.aliases[key].forEach(function (x) { + x = x.split('.') + setKey(argv, x, value) + }) + } + + // handle populating aliases of the first element of the dot-notation key + if (splitKey.length > 1 && configuration['dot-notation']) { + ;(flags.aliases[splitKey[0]] || []).forEach(function (x) { + x = x.split('.') + + // expand alias with nested objects in key + var a = [].concat(splitKey) + a.shift() // nuke the old key. + x = x.concat(a) + + setKey(argv, x, value) + }) + } + + // Set normalize getter and setter when key is in 'normalize' but isn't an array + if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { + var keys = [key].concat(flags.aliases[key] || []) + keys.forEach(function (key) { + argv.__defineSetter__(key, function (v) { + val = path.normalize(v) + }) + + argv.__defineGetter__(key, function () { + return typeof val === 'string' ? path.normalize(val) : val + }) + }) + } + } + + function addNewAlias (key, alias) { + if (!(flags.aliases[key] && flags.aliases[key].length)) { + flags.aliases[key] = [alias] + newAliases[alias] = true + } + if (!(flags.aliases[alias] && flags.aliases[alias].length)) { + addNewAlias(alias, key) + } + } + + function processValue (key, val) { + // strings may be quoted, clean this up as we assign values. + if (typeof val === 'string' && + (val[0] === "'" || val[0] === '"') && + val[val.length - 1] === val[0] + ) { + val = val.substring(1, val.length - 1) + } + + // handle parsing boolean arguments --foo=true --bar false. + if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { + if (typeof val === 'string') val = val === 'true' + } + + var value = maybeCoerceNumber(key, val) + + // increment a count given as arg (either no value or value parsed as boolean) + if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { + value = increment + } + + // Set normalized value when key is in 'normalize' and in 'arrays' + if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { + if (Array.isArray(val)) value = val.map(path.normalize) + else value = path.normalize(val) + } + return value + } + + function maybeCoerceNumber (key, value) { + if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.coercions)) { + const shouldCoerceNumber = isNumber(value) && configuration['parse-numbers'] && ( + Number.isSafeInteger(Math.floor(value)) + ) + if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) value = Number(value) + } + return value + } + + // set args from config.json file, this should be + // applied last so that defaults can be applied. + function setConfig (argv) { + var configLookup = {} + + // expand defaults/aliases, in-case any happen to reference + // the config.json file. + applyDefaultsAndAliases(configLookup, flags.aliases, defaults) + + Object.keys(flags.configs).forEach(function (configKey) { + var configPath = argv[configKey] || configLookup[configKey] + if (configPath) { + try { + var config = null + var resolvedConfigPath = path.resolve(process.cwd(), configPath) + + if (typeof flags.configs[configKey] === 'function') { + try { + config = flags.configs[configKey](resolvedConfigPath) + } catch (e) { + config = e + } + if (config instanceof Error) { + error = config + return + } + } else { + config = require(resolvedConfigPath) + } + + setConfigObject(config) + } catch (ex) { + if (argv[configKey]) error = Error(__('Invalid JSON config file: %s', configPath)) + } + } + }) + } + + // set args from config object. + // it recursively checks nested objects. + function setConfigObject (config, prev) { + Object.keys(config).forEach(function (key) { + var value = config[key] + var fullKey = prev ? prev + '.' + key : key + + // if the value is an inner object and we have dot-notation + // enabled, treat inner objects in config the same as + // heavily nested dot notations (foo.bar.apple). + if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { + // if the value is an object but not an array, check nested object + setConfigObject(value, fullKey) + } else { + // setting arguments via CLI takes precedence over + // values within the config file. + if (!hasKey(argv, fullKey.split('.')) || (flags.defaulted[fullKey]) || (flags.arrays[fullKey] && configuration['combine-arrays'])) { + setArg(fullKey, value) + } + } + }) + } + + // set all config objects passed in opts + function setConfigObjects () { + if (typeof configObjects === 'undefined') return + configObjects.forEach(function (configObject) { + setConfigObject(configObject) + }) + } + + function applyEnvVars (argv, configOnly) { + if (typeof envPrefix === 'undefined') return + + var prefix = typeof envPrefix === 'string' ? envPrefix : '' + Object.keys(process.env).forEach(function (envVar) { + if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { + // get array of nested keys and convert them to camel case + var keys = envVar.split('__').map(function (key, i) { + if (i === 0) { + key = key.substring(prefix.length) + } + return camelCase(key) + }) + + if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && (!hasKey(argv, keys) || flags.defaulted[keys.join('.')])) { + setArg(keys.join('.'), process.env[envVar]) + } + } + }) + } + + function applyCoercions (argv) { + var coerce + var applied = {} + Object.keys(argv).forEach(function (key) { + if (!applied.hasOwnProperty(key)) { // If we haven't already coerced this option via one of its aliases + coerce = checkAllAliases(key, flags.coercions) + if (typeof coerce === 'function') { + try { + var value = coerce(argv[key]) + ;([].concat(flags.aliases[key] || [], key)).forEach(ali => { + applied[ali] = argv[ali] = value + }) + } catch (err) { + error = err + } + } + } + }) + } + + function setPlaceholderKeys (argv) { + flags.keys.forEach((key) => { + // don't set placeholder keys for dot notation options 'foo.bar'. + if (~key.indexOf('.')) return + if (typeof argv[key] === 'undefined') argv[key] = undefined + }) + return argv + } + + function applyDefaultsAndAliases (obj, aliases, defaults) { + Object.keys(defaults).forEach(function (key) { + if (!hasKey(obj, key.split('.'))) { + setKey(obj, key.split('.'), defaults[key]) + + ;(aliases[key] || []).forEach(function (x) { + if (hasKey(obj, x.split('.'))) return + setKey(obj, x.split('.'), defaults[key]) + }) + } + }) + } + + function hasKey (obj, keys) { + var o = obj + + if (!configuration['dot-notation']) keys = [keys.join('.')] + + keys.slice(0, -1).forEach(function (key) { + o = (o[key] || {}) + }) + + var key = keys[keys.length - 1] + + if (typeof o !== 'object') return false + else return key in o + } + + function setKey (obj, keys, value) { + var o = obj + + if (!configuration['dot-notation']) keys = [keys.join('.')] + + keys.slice(0, -1).forEach(function (key, index) { + if (typeof o === 'object' && o[key] === undefined) { + o[key] = {} + } + + if (typeof o[key] !== 'object' || Array.isArray(o[key])) { + // ensure that o[key] is an array, and that the last item is an empty object. + if (Array.isArray(o[key])) { + o[key].push({}) + } else { + o[key] = [o[key], {}] + } + + // we want to update the empty object at the end of the o[key] array, so set o to that object + o = o[key][o[key].length - 1] + } else { + o = o[key] + } + }) + + var key = keys[keys.length - 1] + + var isTypeArray = checkAllAliases(keys.join('.'), flags.arrays) + var isValueArray = Array.isArray(value) + var duplicate = configuration['duplicate-arguments-array'] + + // nargs has higher priority than duplicate + if (!duplicate && checkAllAliases(key, flags.nargs)) { + duplicate = true + if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { + o[key] = undefined + } + } + + if (value === increment) { + o[key] = increment(o[key]) + } else if (Array.isArray(o[key])) { + if (duplicate && isTypeArray && isValueArray) { + o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]) + } else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { + o[key] = value + } else { + o[key] = o[key].concat([value]) + } + } else if (o[key] === undefined && isTypeArray) { + o[key] = isValueArray ? value : [value] + } else if (duplicate && !(o[key] === undefined || checkAllAliases(key, flags.bools) || checkAllAliases(keys.join('.'), flags.bools) || checkAllAliases(key, flags.counts))) { + o[key] = [ o[key], value ] + } else { + o[key] = value + } + } + + // extend the aliases list with inferred aliases. + function extendAliases (...args) { + args.forEach(function (obj) { + Object.keys(obj || {}).forEach(function (key) { + // short-circuit if we've already added a key + // to the aliases array, for example it might + // exist in both 'opts.default' and 'opts.key'. + if (flags.aliases[key]) return + + flags.aliases[key] = [].concat(aliases[key] || []) + // For "--option-name", also set argv.optionName + flags.aliases[key].concat(key).forEach(function (x) { + if (/-/.test(x) && configuration['camel-case-expansion']) { + var c = camelCase(x) + if (c !== key && flags.aliases[key].indexOf(c) === -1) { + flags.aliases[key].push(c) + newAliases[c] = true + } + } + }) + // For "--optionName", also set argv['option-name'] + flags.aliases[key].concat(key).forEach(function (x) { + if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { + var c = decamelize(x, '-') + if (c !== key && flags.aliases[key].indexOf(c) === -1) { + flags.aliases[key].push(c) + newAliases[c] = true + } + } + }) + flags.aliases[key].forEach(function (x) { + flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { + return x !== y + })) + }) + }) + }) + } + + // check if a flag is set for any of a key's aliases. + function checkAllAliases (key, flag) { + var isSet = false + var toCheck = [].concat(flags.aliases[key] || [], key) + + toCheck.forEach(function (key) { + if (flag[key]) isSet = flag[key] + }) + + return isSet + } + + function setDefaulted (key) { + [].concat(flags.aliases[key] || [], key).forEach(function (k) { + flags.defaulted[k] = true + }) + } + + function unsetDefaulted (key) { + [].concat(flags.aliases[key] || [], key).forEach(function (k) { + delete flags.defaulted[k] + }) + } + + // make a best effor to pick a default value + // for an option based on name and type. + function defaultValue (key) { + if (!checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts) && + `${key}` in defaults) { + return defaults[key] + } else { + return defaultForType(guessType(key)) + } + } + + // return a default value, given the type of a flag., + // e.g., key of type 'string' will default to '', rather than 'true'. + function defaultForType (type) { + var def = { + boolean: true, + string: '', + number: undefined, + array: [] + } + + return def[type] + } + + // given a flag, enforce a default type. + function guessType (key) { + var type = 'boolean' + + if (checkAllAliases(key, flags.strings)) type = 'string' + else if (checkAllAliases(key, flags.numbers)) type = 'number' + else if (checkAllAliases(key, flags.arrays)) type = 'array' + + return type + } + + function isNumber (x) { + if (x === null || x === undefined) return false + // if loaded from config, may already be a number. + if (typeof x === 'number') return true + // hexadecimal. + if (/^0x[0-9a-f]+$/i.test(x)) return true + // don't treat 0123 as a number; as it drops the leading '0'. + if (x.length > 1 && x[0] === '0') return false + return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x) + } + + function isUndefined (num) { + return num === undefined + } + + return { + argv: argv, + error: error, + aliases: flags.aliases, + newAliases: newAliases, + configuration: configuration + } +} + +// if any aliases reference each other, we should +// merge them together. +function combineAliases (aliases) { + var aliasArrays = [] + var change = true + var combined = {} + + // turn alias lookup hash {key: ['alias1', 'alias2']} into + // a simple array ['key', 'alias1', 'alias2'] + Object.keys(aliases).forEach(function (key) { + aliasArrays.push( + [].concat(aliases[key], key) + ) + }) + + // combine arrays until zero changes are + // made in an iteration. + while (change) { + change = false + for (var i = 0; i < aliasArrays.length; i++) { + for (var ii = i + 1; ii < aliasArrays.length; ii++) { + var intersect = aliasArrays[i].filter(function (v) { + return aliasArrays[ii].indexOf(v) !== -1 + }) + + if (intersect.length) { + aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]) + aliasArrays.splice(ii, 1) + change = true + break + } + } + } + } + + // map arrays back to the hash-lookup (de-dupe while + // we're at it). + aliasArrays.forEach(function (aliasArray) { + aliasArray = aliasArray.filter(function (v, i, self) { + return self.indexOf(v) === i + }) + combined[aliasArray.pop()] = aliasArray + }) + + return combined +} + +// this function should only be called when a count is given as an arg +// it is NOT called to set a default value +// thus we can start the count at 1 instead of 0 +function increment (orig) { + return orig !== undefined ? orig + 1 : 1 +} + +function Parser (args, opts) { + var result = parse(args.slice(), opts) + + return result.argv +} + +// parse arguments and return detailed +// meta information, aliases, etc. +Parser.detailed = function (args, opts) { + return parse(args.slice(), opts) +} + +module.exports = Parser diff --git a/node_modules/yargs-parser/lib/tokenize-arg-string.js b/node_modules/yargs-parser/lib/tokenize-arg-string.js new file mode 100644 index 00000000..fe05e27f --- /dev/null +++ b/node_modules/yargs-parser/lib/tokenize-arg-string.js @@ -0,0 +1,40 @@ +// take an un-split argv string and tokenize it. +module.exports = function (argString) { + if (Array.isArray(argString)) { + return argString.map(e => typeof e !== 'string' ? e + '' : e) + } + + argString = argString.trim() + + var i = 0 + var prevC = null + var c = null + var opening = null + var args = [] + + for (var ii = 0; ii < argString.length; ii++) { + prevC = c + c = argString.charAt(ii) + + // split on spaces unless we're in quotes. + if (c === ' ' && !opening) { + if (!(prevC === ' ')) { + i++ + } + continue + } + + // don't split the string if we're in matching + // opening or closing single and double quotes. + if (c === opening) { + opening = null + } else if ((c === "'" || c === '"') && !opening) { + opening = c + } + + if (!args[i]) args[i] = '' + args[i] += c + } + + return args +} diff --git a/node_modules/yargs-parser/node_modules/camelcase/index.d.ts b/node_modules/yargs-parser/node_modules/camelcase/index.d.ts new file mode 100644 index 00000000..58f2069a --- /dev/null +++ b/node_modules/yargs-parser/node_modules/camelcase/index.d.ts @@ -0,0 +1,63 @@ +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/yargs-parser/node_modules/camelcase/index.js b/node_modules/yargs-parser/node_modules/camelcase/index.js new file mode 100644 index 00000000..579f99b4 --- /dev/null +++ b/node_modules/yargs-parser/node_modules/camelcase/index.js @@ -0,0 +1,76 @@ +'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/yargs-parser/node_modules/camelcase/license b/node_modules/yargs-parser/node_modules/camelcase/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/yargs-parser/node_modules/camelcase/license @@ -0,0 +1,9 @@ +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/yargs-parser/node_modules/camelcase/package.json b/node_modules/yargs-parser/node_modules/camelcase/package.json new file mode 100644 index 00000000..fbdbaaa7 --- /dev/null +++ b/node_modules/yargs-parser/node_modules/camelcase/package.json @@ -0,0 +1,43 @@ +{ + "name": "camelcase", + "version": "5.3.1", + "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`", + "license": "MIT", + "repository": "sindresorhus/camelcase", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "camelcase", + "camel-case", + "camel", + "case", + "dash", + "hyphen", + "dot", + "underscore", + "separator", + "string", + "text", + "convert", + "pascalcase", + "pascal-case" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + } +} diff --git a/node_modules/yargs-parser/node_modules/camelcase/readme.md b/node_modules/yargs-parser/node_modules/camelcase/readme.md new file mode 100644 index 00000000..fde27261 --- /dev/null +++ b/node_modules/yargs-parser/node_modules/camelcase/readme.md @@ -0,0 +1,99 @@ +# 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/yargs-parser/package.json b/node_modules/yargs-parser/package.json new file mode 100644 index 00000000..35a3885d --- /dev/null +++ b/node_modules/yargs-parser/package.json @@ -0,0 +1,47 @@ +{ + "name": "yargs-parser", + "version": "13.1.1", + "description": "the mighty option parser used by yargs", + "main": "index.js", + "scripts": { + "test": "nyc mocha test/*.js", + "posttest": "standard", + "coverage": "nyc report --reporter=text-lcov | coveralls", + "release": "standard-version" + }, + "repository": { + "url": "git@github.com:yargs/yargs-parser.git" + }, + "keywords": [ + "argument", + "parser", + "yargs", + "command", + "cli", + "parsing", + "option", + "args", + "argument" + ], + "author": "Ben Coe ", + "license": "ISC", + "devDependencies": { + "chai": "^4.2.0", + "coveralls": "^3.0.2", + "mocha": "^5.2.0", + "nyc": "^14.1.0", + "standard": "^12.0.1", + "standard-version": "^6.0.0" + }, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "files": [ + "lib", + "index.js" + ], + "engine": { + "node": ">=6" + } +} diff --git a/node_modules/yargs/CHANGELOG.md b/node_modules/yargs/CHANGELOG.md new file mode 100644 index 00000000..d7898700 --- /dev/null +++ b/node_modules/yargs/CHANGELOG.md @@ -0,0 +1,1335 @@ +# 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. + +## [13.3.0](https://www.github.com/yargs/yargs/compare/v13.2.4...v13.3.0) (2019-06-10) + + +### Bug Fixes + +* **deps:** yargs-parser update addressing several parsing bugs ([#1357](https://www.github.com/yargs/yargs/issues/1357)) ([e230d5b](https://www.github.com/yargs/yargs/commit/e230d5b)) + + +### Features + +* **i18n:** swap out os-locale dependency for simple inline implementation ([#1356](https://www.github.com/yargs/yargs/issues/1356)) ([4dfa19b](https://www.github.com/yargs/yargs/commit/4dfa19b)) +* support defaultDescription for positional arguments ([812048c](https://www.github.com/yargs/yargs/commit/812048c)) + +### [13.2.4](https://github.com/yargs/yargs/compare/v13.2.3...v13.2.4) (2019-05-13) + + +### Bug Fixes + +* **i18n:** rename unclear 'implication failed' to 'missing dependent arguments' ([#1317](https://github.com/yargs/yargs/issues/1317)) ([bf46813](https://github.com/yargs/yargs/commit/bf46813)) + + + +### [13.2.3](https://github.com/yargs/yargs/compare/v13.2.2...v13.2.3) (2019-05-05) + + +### Bug Fixes + +* **deps:** upgrade cliui for compatibility with latest chalk. ([#1330](https://github.com/yargs/yargs/issues/1330)) ([b20db65](https://github.com/yargs/yargs/commit/b20db65)) +* address issues with dutch translation ([#1316](https://github.com/yargs/yargs/issues/1316)) ([0295132](https://github.com/yargs/yargs/commit/0295132)) + + +### Tests + +* accept differently formatted output ([#1327](https://github.com/yargs/yargs/issues/1327)) ([c294d1b](https://github.com/yargs/yargs/commit/c294d1b)) + + + +## [13.2.2](https://github.com/yargs/yargs/compare/v13.2.1...v13.2.2) (2019-03-06) + + + +## [13.2.1](https://github.com/yargs/yargs/compare/v13.2.0...v13.2.1) (2019-02-18) + + +### Bug Fixes + +* add zsh script to files array ([3180224](https://github.com/yargs/yargs/commit/3180224)) +* support options/sub-commands in zsh completion ([0a96394](https://github.com/yargs/yargs/commit/0a96394)) + + +# [13.2.0](https://github.com/yargs/yargs/compare/v13.1.0...v13.2.0) (2019-02-15) + + +### Features + +* zsh auto completion ([#1292](https://github.com/yargs/yargs/issues/1292)) ([16c5d25](https://github.com/yargs/yargs/commit/16c5d25)), closes [#1156](https://github.com/yargs/yargs/issues/1156) + + + +# [13.1.0](https://github.com/yargs/yargs/compare/v13.0.0...v13.1.0) (2019-02-12) + + +### Features + +* add applyBeforeValidation, for applying sync middleware before validation ([5be206a](https://github.com/yargs/yargs/commit/5be206a)) + + + + +# [13.0.0](https://github.com/yargs/yargs/compare/v12.0.5...v13.0.0) (2019-02-02) + + +### Bug Fixes + +* **deps:** Update os-locale to avoid security vulnerability ([#1270](https://github.com/yargs/yargs/issues/1270)) ([27bf739](https://github.com/yargs/yargs/commit/27bf739)) +* **validation:** Use the error as a message when none exists otherwise ([#1268](https://github.com/yargs/yargs/issues/1268)) ([0510fe6](https://github.com/yargs/yargs/commit/0510fe6)) +* better bash path completion ([#1272](https://github.com/yargs/yargs/issues/1272)) ([da75ea2](https://github.com/yargs/yargs/commit/da75ea2)) +* middleware added multiple times due to reference bug ([#1282](https://github.com/yargs/yargs/issues/1282)) ([64af518](https://github.com/yargs/yargs/commit/64af518)) + + +### Chores + +* ~drop Node 6 from testing matrix ([#1287](https://github.com/yargs/yargs/issues/1287)) ([ef16792](https://github.com/yargs/yargs/commit/ef16792))~ + * _opting to not drop Node 6 support until April, [see](https://github.com/nodejs/Release)._ +* update dependencies ([#1284](https://github.com/yargs/yargs/issues/1284)) ([f25de4f](https://github.com/yargs/yargs/commit/f25de4f)) + + +### Features + +* Add `.parserConfiguration()` method, deprecating package.json config ([#1262](https://github.com/yargs/yargs/issues/1262)) ([3c6869a](https://github.com/yargs/yargs/commit/3c6869a)) +* adds config option for sorting command output ([#1256](https://github.com/yargs/yargs/issues/1256)) ([6916ce9](https://github.com/yargs/yargs/commit/6916ce9)) +* options/positionals with leading '+' and '0' no longer parse as numbers ([#1286](https://github.com/yargs/yargs/issues/1286)) ([e9dc3aa](https://github.com/yargs/yargs/commit/e9dc3aa)) +* support promises in middleware ([f3a4e4f](https://github.com/yargs/yargs/commit/f3a4e4f)) + + +### BREAKING CHANGES + +* options with leading '+' or '0' now parse as strings +* dropping Node 6 which hits end of life in April 2019 +* see [yargs-parser@12.0.0 CHANGELOG](https://github.com/yargs/yargs-parser/blob/master/CHANGELOG.md#breaking-changes) +* we now warn if the yargs stanza package.json is used. + + + + +## [12.0.5](https://github.com/yargs/yargs/compare/v12.0.4...v12.0.5) (2018-11-19) + + +### Bug Fixes + +* allows camel-case, variadic arguments, and strict mode to be combined ([#1247](https://github.com/yargs/yargs/issues/1247)) ([eacc035](https://github.com/yargs/yargs/commit/eacc035)) + + + + +## [12.0.4](https://github.com/yargs/yargs/compare/v12.0.3...v12.0.4) (2018-11-10) + + +### Bug Fixes + +* don't load config when processing positionals ([5d0dc92](https://github.com/yargs/yargs/commit/5d0dc92)) + + + + +## [12.0.3](https://github.com/yargs/yargs/compare/v12.0.2...v12.0.3) (2018-10-06) + + +### Bug Fixes + +* $0 contains first arg in bundled electron apps ([#1206](https://github.com/yargs/yargs/issues/1206)) ([567820b](https://github.com/yargs/yargs/commit/567820b)) +* accept single function for middleware ([66fd6f7](https://github.com/yargs/yargs/commit/66fd6f7)), closes [#1214](https://github.com/yargs/yargs/issues/1214) [#1214](https://github.com/yargs/yargs/issues/1214) +* hide `hidden` options from help output even if they are in a group ([#1221](https://github.com/yargs/yargs/issues/1221)) ([da54028](https://github.com/yargs/yargs/commit/da54028)) +* improve Norwegian Bokmål translations ([#1208](https://github.com/yargs/yargs/issues/1208)) ([a458fa4](https://github.com/yargs/yargs/commit/a458fa4)) +* improve Norwegian Nynorsk translations ([#1207](https://github.com/yargs/yargs/issues/1207)) ([d422eb5](https://github.com/yargs/yargs/commit/d422eb5)) + + + + +## [12.0.2](https://github.com/yargs/yargs/compare/v12.0.1...v12.0.2) (2018-09-04) + + +### Bug Fixes + +* middleware should work regardless of when method is called ([664b265](https://github.com/yargs/yargs/commit/664b265)), closes [#1178](https://github.com/yargs/yargs/issues/1178) +* translation not working when using __ with a single parameter ([#1183](https://github.com/yargs/yargs/issues/1183)) ([f449aea](https://github.com/yargs/yargs/commit/f449aea)) +* upgrade os-locale to version that addresses license issue ([#1195](https://github.com/yargs/yargs/issues/1195)) ([efc0970](https://github.com/yargs/yargs/commit/efc0970)) + + + + +## [12.0.1](https://github.com/yargs/yargs/compare/v12.0.0...v12.0.1) (2018-06-29) + + + + +# [12.0.0](https://github.com/yargs/yargs/compare/v11.1.0...v12.0.0) (2018-06-26) + + +### Bug Fixes + +* .argv and .parse() now invoke identical code path ([#1126](https://github.com/yargs/yargs/issues/1126)) ([f13ebf4](https://github.com/yargs/yargs/commit/f13ebf4)) +* remove the trailing white spaces from the help output ([#1090](https://github.com/yargs/yargs/issues/1090)) ([3f0746c](https://github.com/yargs/yargs/commit/3f0746c)) +* **completion:** Avoid default command and recommendations during completion ([#1123](https://github.com/yargs/yargs/issues/1123)) ([036e7c5](https://github.com/yargs/yargs/commit/036e7c5)) + + +### Chores + +* test Node.js 6, 8 and 10 ([#1160](https://github.com/yargs/yargs/issues/1160)) ([84f9d2b](https://github.com/yargs/yargs/commit/84f9d2b)) +* upgrade to version of yargs-parser that does not populate value for unset boolean ([#1104](https://github.com/yargs/yargs/issues/1104)) ([d4705f4](https://github.com/yargs/yargs/commit/d4705f4)) + + +### Features + +* add support for global middleware, useful for shared tasks like metrics ([#1119](https://github.com/yargs/yargs/issues/1119)) ([9d71ac7](https://github.com/yargs/yargs/commit/9d71ac7)) +* allow setting scriptName $0 ([#1143](https://github.com/yargs/yargs/issues/1143)) ([a2f2eae](https://github.com/yargs/yargs/commit/a2f2eae)) +* remove `setPlaceholderKeys` ([#1105](https://github.com/yargs/yargs/issues/1105)) ([6ee2c82](https://github.com/yargs/yargs/commit/6ee2c82)) + + +### BREAKING CHANGES + +* Options absent from `argv` (not set via CLI argument) are now absent from the parsed result object rather than being set with `undefined` +* drop Node 4 from testing matrix, such that we'll gradually start drifting away from supporting Node 4. +* yargs-parser does not populate 'false' when boolean flag is not passed +* tests that assert against help output will need to be updated + + + + +# [11.1.0](https://github.com/yargs/yargs/compare/v11.0.0...v11.1.0) (2018-03-04) + + +### Bug Fixes + +* choose correct config directory when require.main does not exist ([#1056](https://github.com/yargs/yargs/issues/1056)) ([a04678c](https://github.com/yargs/yargs/commit/a04678c)) + + +### Features + +* allow hidden options to be displayed with --show-hidden ([#1061](https://github.com/yargs/yargs/issues/1061)) ([ea862ae](https://github.com/yargs/yargs/commit/ea862ae)) +* extend *.rc files in addition to json ([#1080](https://github.com/yargs/yargs/issues/1080)) ([11691a6](https://github.com/yargs/yargs/commit/11691a6)) + + + + +# [11.0.0](https://github.com/yargs/yargs/compare/v10.1.2...v11.0.0) (2018-01-22) + + +### Bug Fixes + +* Set implicit nargs=1 when type=number requiresArg=true ([#1050](https://github.com/yargs/yargs/issues/1050)) ([2b56812](https://github.com/yargs/yargs/commit/2b56812)) + + +### Features + +* requiresArg is now simply an alias for nargs(1) ([#1054](https://github.com/yargs/yargs/issues/1054)) ([a3ddacc](https://github.com/yargs/yargs/commit/a3ddacc)) + + +### BREAKING CHANGES + +* requiresArg now has significantly different error output, matching nargs. + + + + +## [10.1.2](https://github.com/yargs/yargs/compare/v10.1.1...v10.1.2) (2018-01-17) + + +### Bug Fixes + +* requiresArg should only be enforced if argument exists ([#1043](https://github.com/yargs/yargs/issues/1043)) ([fbf41ae](https://github.com/yargs/yargs/commit/fbf41ae)) + + + + +## [10.1.1](https://github.com/yargs/yargs/compare/v10.1.0...v10.1.1) (2018-01-09) + + +### Bug Fixes + +* Add `dirname` sanity check on `findUp` ([#1036](https://github.com/yargs/yargs/issues/1036)) ([331d103](https://github.com/yargs/yargs/commit/331d103)) + + + + +# [10.1.0](https://github.com/yargs/yargs/compare/v10.0.3...v10.1.0) (2018-01-01) + + +### Bug Fixes + +* 'undefined' should be taken to mean no argument was provided ([#1015](https://github.com/yargs/yargs/issues/1015)) ([c679e90](https://github.com/yargs/yargs/commit/c679e90)) + + +### Features + +* add missing simple chinese locale strings ([#1004](https://github.com/yargs/yargs/issues/1004)) ([3cc24ec](https://github.com/yargs/yargs/commit/3cc24ec)) +* add Norwegian Nynorsk translations ([#1028](https://github.com/yargs/yargs/issues/1028)) ([a5ac213](https://github.com/yargs/yargs/commit/a5ac213)) +* async command handlers ([#1001](https://github.com/yargs/yargs/issues/1001)) ([241124b](https://github.com/yargs/yargs/commit/241124b)) +* middleware ([#881](https://github.com/yargs/yargs/issues/881)) ([77b8dbc](https://github.com/yargs/yargs/commit/77b8dbc)) + + + + +## [10.0.3](https://github.com/yargs/yargs/compare/v10.0.2...v10.0.3) (2017-10-21) + + +### Bug Fixes + +* parse array rather than string, so that quotes are safe ([#993](https://github.com/yargs/yargs/issues/993)) ([c351685](https://github.com/yargs/yargs/commit/c351685)) + + + + +## [10.0.2](https://github.com/yargs/yargs/compare/v10.0.1...v10.0.2) (2017-10-21) + + +### Bug Fixes + +* fix tiny spacing issue with usage ([#992](https://github.com/yargs/yargs/issues/992)) ([7871327](https://github.com/yargs/yargs/commit/7871327)) + + + + +## [10.0.1](https://github.com/yargs/yargs/compare/v10.0.0...v10.0.1) (2017-10-19) + + +### Bug Fixes + +* help strings for nested commands were missing parent commands ([#990](https://github.com/yargs/yargs/issues/990)) ([cd1ca15](https://github.com/yargs/yargs/commit/cd1ca15)) +* use correct completion command in generated completion script ([#988](https://github.com/yargs/yargs/issues/988)) ([3c8ac1d](https://github.com/yargs/yargs/commit/3c8ac1d)) + + + + +# [10.0.0](https://github.com/yargs/yargs/compare/v9.1.0...v10.0.0) (2017-10-18) + + +### Bug Fixes + +* config and normalize can be disabled with false ([#952](https://github.com/yargs/yargs/issues/952)) ([3bb8771](https://github.com/yargs/yargs/commit/3bb8771)) +* less eager help command execution ([#972](https://github.com/yargs/yargs/issues/972)) ([8c1d7bf](https://github.com/yargs/yargs/commit/8c1d7bf)) +* the positional argument parse was clobbering global flag arguments ([#984](https://github.com/yargs/yargs/issues/984)) ([7e58453](https://github.com/yargs/yargs/commit/7e58453)) + + +### Features + +* .usage() can now be used to configure a default command ([#975](https://github.com/yargs/yargs/issues/975)) ([7269531](https://github.com/yargs/yargs/commit/7269531)) +* hidden options are now explicitly indicated using "hidden" flag ([#962](https://github.com/yargs/yargs/issues/962)) ([280d0d6](https://github.com/yargs/yargs/commit/280d0d6)) +* introduce .positional() for configuring positional arguments ([#967](https://github.com/yargs/yargs/issues/967)) ([cb16460](https://github.com/yargs/yargs/commit/cb16460)) +* replace $0 with file basename ([#983](https://github.com/yargs/yargs/issues/983)) ([20bb99b](https://github.com/yargs/yargs/commit/20bb99b)) + + +### BREAKING CHANGES + +* .usage() no longer accepts an options object as the second argument. It can instead be used as an alias for configuring a default command. +* previously hidden options were simply implied using a falsy description +* help command now only executes if it's the last positional in argv._ + + + + +# [9.1.0](https://github.com/yargs/yargs/compare/v9.0.1...v9.1.0) (2017-09-25) + + +### Bug Fixes + +* **command:** Run default cmd even if the only cmd ([#950](https://github.com/yargs/yargs/issues/950)) ([7b22203](https://github.com/yargs/yargs/commit/7b22203)) + + +### Features + +* multiple usage calls are now collected, not replaced ([#958](https://github.com/yargs/yargs/issues/958)) ([74a38b2](https://github.com/yargs/yargs/commit/74a38b2)) + + + + +## [9.0.1](https://github.com/yargs/yargs/compare/v9.0.0...v9.0.1) (2017-09-17) + + +### Bug Fixes + +* implications fails only displayed once ([#954](https://github.com/yargs/yargs/issues/954)) ([ac8088b](https://github.com/yargs/yargs/commit/ac8088b)) + + + + +# [9.0.0](https://github.com/yargs/yargs/compare/v8.0.2...v9.0.0) (2017-09-03) + + +### Bug Fixes + +* 'undefined' default value for choices resulted in validation failing ([782b896](https://github.com/yargs/yargs/commit/782b896)) +* address bug with handling of arrays of implications ([c240661](https://github.com/yargs/yargs/commit/c240661)) +* defaulting keys to 'undefined' interfered with conflicting key logic ([a8e0cff](https://github.com/yargs/yargs/commit/a8e0cff)) +* don't bother calling JSON.stringify() on string default values ([#891](https://github.com/yargs/yargs/issues/891)) ([628be21](https://github.com/yargs/yargs/commit/628be21)) +* exclude positional arguments from completion output ([#927](https://github.com/yargs/yargs/issues/927)) ([71c7ec7](https://github.com/yargs/yargs/commit/71c7ec7)) +* strict mode should not fail for hidden options ([#949](https://github.com/yargs/yargs/issues/949)) ([0e0c58d](https://github.com/yargs/yargs/commit/0e0c58d)) + + +### Features + +* allow implies and conflicts to accept array values ([#922](https://github.com/yargs/yargs/issues/922)) ([abdc7da](https://github.com/yargs/yargs/commit/abdc7da)) +* allow parse with no arguments as alias for yargs.argv ([#944](https://github.com/yargs/yargs/issues/944)) ([a9f03e7](https://github.com/yargs/yargs/commit/a9f03e7)) +* enable .help() and .version() by default ([#912](https://github.com/yargs/yargs/issues/912)) ([1ef44e0](https://github.com/yargs/yargs/commit/1ef44e0)) +* to allow both undefined and nulls, for benefit of TypeScript ([#945](https://github.com/yargs/yargs/issues/945)) ([792564d](https://github.com/yargs/yargs/commit/792564d)) + + +### BREAKING CHANGES + +* version() and help() are now enabled by default, and show up in help output; the implicit help command can no longer be enabled/disabled independently from the help command itself (which can now be disabled). +* parse() now behaves as an alias for .argv, unless a parseCallback is provided. + + + + +## [8.0.2](https://github.com/yargs/yargs/compare/v8.0.1...v8.0.2) (2017-06-12) + + + + +## [8.0.1](https://github.com/yargs/yargs/compare/v8.0.0...v8.0.1) (2017-05-02) + + + + +# [8.0.0](https://github.com/yargs/yargs/compare/v7.1.0...v8.0.0) (2017-05-01) + + +### Bug Fixes + +* commands are now applied in order, from left to right ([#857](https://github.com/yargs/yargs/issues/857)) ([baba863](https://github.com/yargs/yargs/commit/baba863)) +* help now takes precedence over command recommendation ([#866](https://github.com/yargs/yargs/issues/866)) ([17e3567](https://github.com/yargs/yargs/commit/17e3567)) +* positional arguments now work if no handler is provided to inner command ([#864](https://github.com/yargs/yargs/issues/864)) ([e28ded3](https://github.com/yargs/yargs/commit/e28ded3)) + + +### Chores + +* upgrade yargs-parser ([#867](https://github.com/yargs/yargs/issues/867)) ([8f9c6c6](https://github.com/yargs/yargs/commit/8f9c6c6)) + + +### Features + +* allow extends to inherit from a module ([#865](https://github.com/yargs/yargs/issues/865)) ([89456d9](https://github.com/yargs/yargs/commit/89456d9)) +* allow strict mode to be disabled ([#840](https://github.com/yargs/yargs/issues/840)) ([6f78c05](https://github.com/yargs/yargs/commit/6f78c05)) + + +### BREAKING CHANGES + +* extends functionality now always loads the JSON provided, rather than reading from a specific key +* Node 4+ is now required; this will allow us to start updating our dependencies. +* the first argument to strict() is now used to enable/disable its functionality, rather than controlling whether or not it is global. + + + + +# [7.1.0](https://github.com/yargs/yargs/compare/v7.0.2...v7.1.0) (2017-04-13) + + +### Bug Fixes + +* fix demandOption no longer treats 'false' as truthy ([#829](https://github.com/yargs/yargs/issues/829)) ([c748dd2](https://github.com/yargs/yargs/commit/c748dd2)) +* get terminalWidth in non interactive mode no longer causes a validation exception ([#837](https://github.com/yargs/yargs/issues/837)) ([360e301](https://github.com/yargs/yargs/commit/360e301)) +* we shouldn't output help if we've printed a prior help-like message ([#847](https://github.com/yargs/yargs/issues/847)) ([17e89bd](https://github.com/yargs/yargs/commit/17e89bd)) + + +### Features + +* add support for numeric commands ([#825](https://github.com/yargs/yargs/issues/825)) ([fde0564](https://github.com/yargs/yargs/commit/fde0564)) + + + + +## [7.0.2](https://github.com/yargs/yargs/compare/v7.0.1...v7.0.2) (2017-03-10) + + +### Bug Fixes + +* populating placeholder arguments broke validation ([b3eb2fe](https://github.com/yargs/yargs/commit/b3eb2fe)) + + + + +## [7.0.1](https://github.com/yargs/yargs/compare/v7.0.0...v7.0.1) (2017-03-03) + + +### Bug Fixes + +* --help with default command should print top-level help ([#810](https://github.com/yargs/yargs/issues/810)) ([9c03fa4](https://github.com/yargs/yargs/commit/9c03fa4)) + + + + +# [7.0.0](https://github.com/yargs/yargs/compare/v6.6.0...v7.0.0) (2017-02-26) + + +### Bug Fixes + +* address min/max validation message regression ([#750](https://github.com/yargs/yargs/issues/750)) ([2e5ce0f](https://github.com/yargs/yargs/commit/2e5ce0f)) +* address positional argument strict() bug introduced in [#766](https://github.com/yargs/yargs/issues/766) ([#784](https://github.com/yargs/yargs/issues/784)) ([a8528e6](https://github.com/yargs/yargs/commit/a8528e6)) +* console.warn() rather than throwing errors when api signatures are incorrect ([#804](https://github.com/yargs/yargs/issues/804)) ([a607061](https://github.com/yargs/yargs/commit/a607061)) +* context should override parsed argv ([#786](https://github.com/yargs/yargs/issues/786)) ([0997288](https://github.com/yargs/yargs/commit/0997288)) +* context variables are now recognized in strict() mode ([#796](https://github.com/yargs/yargs/issues/796)) ([48575cd](https://github.com/yargs/yargs/commit/48575cd)) +* errors were not bubbling appropriately from sub-commands to top-level ([#802](https://github.com/yargs/yargs/issues/802)) ([8a992f5](https://github.com/yargs/yargs/commit/8a992f5)) +* positional arguments of sub-commands threw strict() exception ([#805](https://github.com/yargs/yargs/issues/805)) ([f3f074b](https://github.com/yargs/yargs/commit/f3f074b)) +* pull in yargs-parser with modified env precedence ([#787](https://github.com/yargs/yargs/issues/787)) ([e0fbbe5](https://github.com/yargs/yargs/commit/e0fbbe5)) +* running parse() multiple times on the same yargs instance caused exception if help() enabled ([#790](https://github.com/yargs/yargs/issues/790)) ([07e39b7](https://github.com/yargs/yargs/commit/07e39b7)) +* use path.resolve() to support node 0.10 ([#797](https://github.com/yargs/yargs/issues/797)) ([49a93fc](https://github.com/yargs/yargs/commit/49a93fc)) + + +### Features + +* add conflicts and implies shorthands. ([#753](https://github.com/yargs/yargs/issues/753)) ([bd1472b](https://github.com/yargs/yargs/commit/bd1472b)) +* add traditional Chinese translation ([#780](https://github.com/yargs/yargs/issues/780)) ([6ab6a95](https://github.com/yargs/yargs/commit/6ab6a95)) +* allow provided config object to extend other configs ([#779](https://github.com/yargs/yargs/issues/779)) ([3280dd0](https://github.com/yargs/yargs/commit/3280dd0)) +* function argument validation ([#773](https://github.com/yargs/yargs/issues/773)) ([22ed9bb](https://github.com/yargs/yargs/commit/22ed9bb)) +* if only one column is provided for examples, allow it to take up the entire line ([#749](https://github.com/yargs/yargs/issues/749)) ([7931652](https://github.com/yargs/yargs/commit/7931652)) +* introduce custom yargs error object ([#765](https://github.com/yargs/yargs/issues/765)) ([8308efa](https://github.com/yargs/yargs/commit/8308efa)) +* introduces support for default commands, using the '*' identifier ([#785](https://github.com/yargs/yargs/issues/785)) ([d78a0f5](https://github.com/yargs/yargs/commit/d78a0f5)) +* rethink how options are inherited by commands ([#766](https://github.com/yargs/yargs/issues/766)) ([ab1fa4b](https://github.com/yargs/yargs/commit/ab1fa4b)) + + +### BREAKING CHANGES + +* `extends` key in config file is now used for extending other config files +* environment variables now take precedence over config files. +* context now takes precedence over argv and defaults +* the arguments passed to functions are now validated, there's a good chance this will throw exceptions for a few folks who are using the API in an unexpected way. +* by default options, and many of yargs' parsing helpers will now default to being applied globally; such that they are no-longer reset before being passed into commands. +* yargs will no longer aggressively suppress errors, allowing errors that are not generated internally to bubble. + + + + +# [6.6.0](https://github.com/yargs/yargs/compare/v6.5.0...v6.6.0) (2016-12-29) + + +### Bug Fixes + +* [object Object] was accidentally being populated on options object ([#736](https://github.com/yargs/yargs/issues/736)) ([f755e27](https://github.com/yargs/yargs/commit/f755e27)) +* do not use cwd when resolving package.json for yargs parsing config ([#726](https://github.com/yargs/yargs/issues/726)) ([9bdaab7](https://github.com/yargs/yargs/commit/9bdaab7)) + + +### Features + +* implement conflicts() for defining mutually exclusive arguments; thanks [@madcampos](https://github.com/madcampos)! ([#741](https://github.com/yargs/yargs/issues/741)) ([5883779](https://github.com/yargs/yargs/commit/5883779)) +* split demand() into demandCommand()/demandOption() ([#740](https://github.com/yargs/yargs/issues/740)) ([66573c8](https://github.com/yargs/yargs/commit/66573c8)) +* support for positional argument aliases ([#727](https://github.com/yargs/yargs/issues/727)) ([27e1a57](https://github.com/yargs/yargs/commit/27e1a57)) + + + + +# [6.5.0](https://github.com/yargs/yargs/compare/v6.4.0...v6.5.0) (2016-12-01) + + +### Bug Fixes + +* still freeze/unfreeze if parse() is called in isolation ([#717](https://github.com/yargs/yargs/issues/717)) ([30a9492](https://github.com/yargs/yargs/commit/30a9492)) + + +### Features + +* pull in yargs-parser introducing additional settings ([#688](https://github.com/yargs/yargs/issues/688)), and fixing [#716](https://github.com/yargs/yargs/issues/716) ([#722](https://github.com/yargs/yargs/issues/722)) ([702995a](https://github.com/yargs/yargs/commit/702995a)) + + + + +# [6.4.0](https://github.com/yargs/yargs/compare/v6.3.0...v6.4.0) (2016-11-13) + + +### Bug Fixes + +* **locales:** correct some Russian translations ([#691](https://github.com/yargs/yargs/issues/691)) ([a980671](https://github.com/yargs/yargs/commit/a980671)) + + +### Features + +* **locales:** Added Belarusian translation ([#690](https://github.com/yargs/yargs/issues/690)) ([68dac1f](https://github.com/yargs/yargs/commit/68dac1f)) +* **locales:** Create nl.json ([#687](https://github.com/yargs/yargs/issues/687)) ([46ce1bb](https://github.com/yargs/yargs/commit/46ce1bb)) +* update to yargs-parser that addresses [#598](https://github.com/yargs/yargs/issues/598), [#617](https://github.com/yargs/yargs/issues/617) ([#700](https://github.com/yargs/yargs/issues/700)) ([54cb31d](https://github.com/yargs/yargs/commit/54cb31d)) +* yargs is now passed as the third-argument to fail handler ([#613](https://github.com/yargs/yargs/issues/613)) ([21b74f9](https://github.com/yargs/yargs/commit/21b74f9)) + + +### Performance Improvements + +* normalizing package data is an expensive operation ([#705](https://github.com/yargs/yargs/issues/705)) ([49cf533](https://github.com/yargs/yargs/commit/49cf533)) + + + + +# [6.3.0](https://github.com/yargs/yargs/compare/v6.2.0...v6.3.0) (2016-10-19) + + +### Bug Fixes + +* **command:** subcommands via commandDir() now supported for parse(msg, cb) ([#678](https://github.com/yargs/yargs/issues/678)) ([6b85cc6](https://github.com/yargs/yargs/commit/6b85cc6)) + + +### Features + +* **locales:** Add Thai locale file ([#679](https://github.com/yargs/yargs/issues/679)) ([c05e36b](https://github.com/yargs/yargs/commit/c05e36b)) + + + + +# [6.2.0](https://github.com/yargs/yargs/compare/v6.1.1...v6.2.0) (2016-10-16) + + +### Bug Fixes + +* stop applying parser to context object ([#675](https://github.com/yargs/yargs/issues/675)) ([3fe9b8f](https://github.com/yargs/yargs/commit/3fe9b8f)) + + +### Features + +* add new pt_BR translations ([#674](https://github.com/yargs/yargs/issues/674)) ([5615a82](https://github.com/yargs/yargs/commit/5615a82)) +* Italian translations for 'did you mean' and 'aliases' ([#673](https://github.com/yargs/yargs/issues/673)) ([81984e6](https://github.com/yargs/yargs/commit/81984e6)) + + + + +## [6.1.1](https://github.com/yargs/yargs/compare/v6.1.0...v6.1.1) (2016-10-15) + + +### Bug Fixes + +* freeze was not resetting configObjects to initial state; addressed performance issue raised by [@nexdrew](https://github.com/nexdrew). ([#670](https://github.com/yargs/yargs/issues/670)) ([ae4bcd4](https://github.com/yargs/yargs/commit/ae4bcd4)) + + + + +# [6.1.0](https://github.com/yargs/yargs/compare/v6.0.0...v6.1.0) (2016-10-15) + + +### Bug Fixes + +* **locales:** change some translations ([#667](https://github.com/yargs/yargs/issues/667)) ([aa966c5](https://github.com/yargs/yargs/commit/aa966c5)) +* **locales:** conform hi locale to y18n.__n expectations ([#666](https://github.com/yargs/yargs/issues/666)) ([22adb18](https://github.com/yargs/yargs/commit/22adb18)) + + +### Features + +* initial support for command aliases ([#647](https://github.com/yargs/yargs/issues/647)) ([127a040](https://github.com/yargs/yargs/commit/127a040)) +* **command:** add camelcase commands to argv ([#658](https://github.com/yargs/yargs/issues/658)) ([b1cabae](https://github.com/yargs/yargs/commit/b1cabae)) +* **locales:** add Hindi translations ([9290912](https://github.com/yargs/yargs/commit/9290912)) +* **locales:** add Hungarian translations ([be92327](https://github.com/yargs/yargs/commit/be92327)) +* **locales:** Japanese translations for 'did you mean' and 'aliases' ([#651](https://github.com/yargs/yargs/issues/651)) ([5eb78fc](https://github.com/yargs/yargs/commit/5eb78fc)) +* **locales:** Polish translations for 'did you mean' and 'aliases' ([#650](https://github.com/yargs/yargs/issues/650)) ([c951c0e](https://github.com/yargs/yargs/commit/c951c0e)) +* reworking yargs API to make it easier to run in headless environments, e.g., Slack ([#646](https://github.com/yargs/yargs/issues/646)) ([f284c29](https://github.com/yargs/yargs/commit/f284c29)) +* Turkish translations for 'did you mean' and 'aliases' ([#660](https://github.com/yargs/yargs/issues/660)) ([072fd45](https://github.com/yargs/yargs/commit/072fd45)) + + + + +# [6.0.0](https://github.com/yargs/yargs/compare/v5.0.0...v6.0.0) (2016-09-30) + + +### Bug Fixes + +* changed parsing of the command string to ignore extra spaces ([#600](https://github.com/yargs/yargs/issues/600)) ([e8e5a72](https://github.com/yargs/yargs/commit/e8e5a72)) +* drop lodash.assign ([#641](https://github.com/yargs/yargs/issues/641)) ([ad3146f](https://github.com/yargs/yargs/commit/ad3146f)) +* for args that have skipValidation set to `true`, check if the parsed arg is `true` ([#619](https://github.com/yargs/yargs/issues/619)) ([658a34c](https://github.com/yargs/yargs/commit/658a34c)) +* upgrade standard, and fix appveyor config so that it works with newest standard ([#607](https://github.com/yargs/yargs/issues/607)) ([c301f42](https://github.com/yargs/yargs/commit/c301f42)) + + +### Chores + +* upgrade yargs-parser ([#633](https://github.com/yargs/yargs/issues/633)) ([cc1224e](https://github.com/yargs/yargs/commit/cc1224e)) + + +### Features + +* make opts object optional for .option() ([#624](https://github.com/yargs/yargs/issues/624)) ([4f29de6](https://github.com/yargs/yargs/commit/4f29de6)) + + +### Performance Improvements + +* defer windowWidth() to improve perf for non-help usage ([#610](https://github.com/yargs/yargs/issues/610)) ([cbc3636](https://github.com/yargs/yargs/commit/cbc3636)) + + +### BREAKING CHANGES + +* coerce is now applied as a final step after other parsing is complete + + + + +# [5.0.0](https://github.com/yargs/yargs/compare/v4.8.1...v5.0.0) (2016-08-14) + + +### Bug Fixes + +* **default:** Remove undocumented alias of default() ([#469](https://github.com/yargs/yargs/issues/469)) ([b8591b2](https://github.com/yargs/yargs/commit/b8591b2)) +* remove deprecated zh.json ([#578](https://github.com/yargs/yargs/issues/578)) ([317c62c](https://github.com/yargs/yargs/commit/317c62c)) + + +### Features + +* .help() API can now enable implicit help command ([#574](https://github.com/yargs/yargs/issues/574)) ([7645019](https://github.com/yargs/yargs/commit/7645019)) +* **command:** builder function no longer needs to return the yargs instance ([#549](https://github.com/yargs/yargs/issues/549)) ([eaa2873](https://github.com/yargs/yargs/commit/eaa2873)) +* add coerce api ([#586](https://github.com/yargs/yargs/issues/586)) ([1d53ccb](https://github.com/yargs/yargs/commit/1d53ccb)) +* adds recommendCommands() for command suggestions ([#580](https://github.com/yargs/yargs/issues/580)) ([59474dc](https://github.com/yargs/yargs/commit/59474dc)) +* apply .env() globally ([#553](https://github.com/yargs/yargs/issues/553)) ([be65728](https://github.com/yargs/yargs/commit/be65728)) +* apply default builder to command() and apply fail() handlers globally ([#583](https://github.com/yargs/yargs/issues/583)) ([0aaa68b](https://github.com/yargs/yargs/commit/0aaa68b)) +* update yargs-parser to version 3.1.0 ([#581](https://github.com/yargs/yargs/issues/581)) ([882a127](https://github.com/yargs/yargs/commit/882a127)) + + +### Performance Improvements + +* defer requiring most external libs until needed ([#584](https://github.com/yargs/yargs/issues/584)) ([f9b0ed4](https://github.com/yargs/yargs/commit/f9b0ed4)) + + +### BREAKING CHANGES + +* fail is now applied globally. +* we now default to an empty builder function when command is executed with no builder. +* yargs-parser now better handles negative integer values, at the cost of handling numeric option names, e.g., -1 hello +* default: removed undocumented `defaults` alias for `default`. +* introduces a default `help` command which outputs help, as an alternative to a help flag. +* interpret demand() numbers as relative to executing command ([#582](https://github.com/yargs/yargs/issues/582)) ([927810c](https://github.com/yargs/yargs/commit/927810c)) + + + + +## [4.8.1](https://github.com/yargs/yargs/compare/v4.8.0...v4.8.1) (2016-07-16) + + +### Bug Fixes + +* **commandDir:** make dir relative to caller instead of require.main.filename ([#548](https://github.com/yargs/yargs/issues/548)) ([3c2e479](https://github.com/yargs/yargs/commit/3c2e479)) +* add config lookup for .implies() ([#556](https://github.com/yargs/yargs/issues/556)) ([8d7585c](https://github.com/yargs/yargs/commit/8d7585c)) +* cache pkg lookups by path to avoid returning the wrong one ([#552](https://github.com/yargs/yargs/issues/552)) ([fea7e0b](https://github.com/yargs/yargs/commit/fea7e0b)) +* positional arguments were not being handled appropriately by parse() ([#559](https://github.com/yargs/yargs/issues/559)) ([063a866](https://github.com/yargs/yargs/commit/063a866)) +* pull in [@nexdrew](https://github.com/nexdrew)'s fixes to yargs-parser ([#560](https://github.com/yargs/yargs/issues/560)) ([c77c080](https://github.com/yargs/yargs/commit/c77c080)), closes [#560](https://github.com/yargs/yargs/issues/560) + + + + +# [4.8.0](https://github.com/yargs/yargs/compare/v4.7.1...v4.8.0) (2016-07-09) + + +### Bug Fixes + +* drop unused camelcase dependency fixes [#516](https://github.com/yargs/yargs/issues/516) ([#525](https://github.com/yargs/yargs/issues/525)) ([365fb9a](https://github.com/yargs/yargs/commit/365fb9a)), closes [#516](https://github.com/yargs/yargs/issues/516) [#525](https://github.com/yargs/yargs/issues/525) +* fake a tty in tests, so that we can use the new set-blocking ([#512](https://github.com/yargs/yargs/issues/512)) ([a54c742](https://github.com/yargs/yargs/commit/a54c742)) +* ignore invalid package.json during read-pkg-up ([#546](https://github.com/yargs/yargs/issues/546)) ([e058c87](https://github.com/yargs/yargs/commit/e058c87)) +* keep both zh and zh_CN until yargs[@5](https://github.com/5).x ([0f8faa7](https://github.com/yargs/yargs/commit/0f8faa7)) +* lazy-load package.json and cache. get rid of pkg-conf dependency. ([#544](https://github.com/yargs/yargs/issues/544)) ([2609b2e](https://github.com/yargs/yargs/commit/2609b2e)) +* we now respect the order of _ when applying commands ([#537](https://github.com/yargs/yargs/issues/537)) ([ed86b78](https://github.com/yargs/yargs/commit/ed86b78)) + + +### Features + +* add .commandDir(dir) to API to apply all command modules from a relative directory ([#494](https://github.com/yargs/yargs/issues/494)) ([b299dff](https://github.com/yargs/yargs/commit/b299dff)) +* **command:** derive missing command string from module filename ([#527](https://github.com/yargs/yargs/issues/527)) ([20d4b8a](https://github.com/yargs/yargs/commit/20d4b8a)) +* builder is now optional for a command module ([#545](https://github.com/yargs/yargs/issues/545)) ([8d6ad6e](https://github.com/yargs/yargs/commit/8d6ad6e)) + + + + +## [4.7.1](https://github.com/yargs/yargs/compare/v4.7.0...v4.7.1) (2016-05-15) + + +### Bug Fixes + +* switch to using `const` rather than `var` ([#499](https://github.com/yargs/yargs/pull/499)) +* make stdout flush on newer versions of Node.js ([#501](https://github.com/yargs/yargs/issues/501)) ([9f8c6f4](https://github.com/yargs/yargs/commit/9f8c6f4)) + + + + +# [4.7.0](https://github.com/yargs/yargs/compare/v4.6.0...v4.7.0) (2016-05-02) + + +### Bug Fixes + +* **pkgConf:** fix aliases issues in .pkgConf() ([#478](https://github.com/yargs/yargs/issues/478))([b900502](https://github.com/yargs/yargs/commit/b900502)) + + +### Features + +* **completion:** allow to get completions for any string, not just process.argv ([#470](https://github.com/yargs/yargs/issues/470))([74fcfbc](https://github.com/yargs/yargs/commit/74fcfbc)) +* **configuration:** Allow to directly pass a configuration object to .config() ([#480](https://github.com/yargs/yargs/issues/480))([e0a7e05](https://github.com/yargs/yargs/commit/e0a7e05)) +* **validation:** Add .skipValidation() method ([#471](https://github.com/yargs/yargs/issues/471))([d72badb](https://github.com/yargs/yargs/commit/d72badb)) + + + + +# [4.6.0](https://github.com/yargs/yargs/compare/v4.5.0...v4.6.0) (2016-04-11) + + +### Bug Fixes + +* **my brand!:** I agree with [@osher](https://github.com/osher) lightweight isn't a huge selling point of ours any longer, see [#468](https://github.com/yargs/yargs/issues/468) ([c46d7e1](https://github.com/yargs/yargs/commit/c46d7e1)) + +### Features + +* switch to standard-version for release management ([f70f801](https://github.com/yargs/yargs/commit/f70f801)) +* upgrade to version of yargs-parser that introduces some slick new features, great work [@elas7](https://github.com/elas7). update cliui, replace win-spawn, replace badge. ([#475](https://github.com/yargs/yargs/issues/475)) ([f915dd4](https://github.com/yargs/yargs/commit/f915dd4)) + + + + +# [4.5.0](https://github.com/yargs/yargs/compare/v4.4.0...v4.5.0) (2016-04-05) + + +### Bug Fixes + +* **windows:** handle $0 better on Windows platforms ([eb6e03f](https://github.com/yargs/yargs/commit/eb6e03f)) + +### Features + +* **commands:** implemented variadic positional arguments ([51d926e](https://github.com/yargs/yargs/commit/51d926e)) +* **completion:** completion now better handles aliases, and avoids duplicating keys. ([86416c8](https://github.com/yargs/yargs/commit/86416c8)) +* **config:** If invoking .config() without parameters, set a default option ([0413dd1](https://github.com/yargs/yargs/commit/0413dd1)) +* **conventional-changelog:** switching to using conventional-changelog for generating the changelog ([a2b5a2a](https://github.com/yargs/yargs/commit/a2b5a2a)) + + + +### v4.4.0 (2016/04/03 21:10 +07:00) + +- [#454](https://github.com/yargs/yargs/pull/454) fix demand() when second argument is an array (@elas7) +- [#452](https://github.com/yargs/yargs/pull/452) fix code example for `.help()` docs (@maxrimue) +- [#450](https://github.com/yargs/yargs/pull/450) fix for bash completion trailing space edge-case (@elas7) +- [#448](https://github.com/yargs/yargs/pull/448) allow a method to be passed to `showHelp`, rather than a log-level (@osher) +- [#446](https://github.com/yargs/yargs/pull/446) update yargs-parser, y18n, nyc, cliui, pkg-conf (@bcoe) +- [#436](https://github.com/yargs/yargs/pull/436) the rebase method is only used by tests, do not export it in two places (@elas7) +- [#428](https://github.com/yargs/yargs/pull/428) initial support for subcommands (@nexdrew) + +### v4.3.2 (2016/3/20 15:07 +07:00) + +- [#445](https://github.com/yargs/yargs/pull/445) strict mode was failing if no commands were registered (@nexdrew) +- [#443](https://github.com/yargs/yargs/pull/443) adds Italian translation \o/ (@madrisan) +- [#441](https://github.com/yargs/yargs/pull/441) remove duplicate keys from array options configuration (@elas7) +- [#437](https://github.com/yargs/yargs/pull/437) standardize tests for .command() (@lrlna) + +### v4.3.0 (2016/3/12 14:19 +07:00) + +- [#432](https://github.com/yargs/yargs/pull/432) non-singleton version of yargs (@bcoe) +- [#422, #425, #420] translations for number (@zkat, @rilut, @maxrimue, @watilde) +- [#414](https://github.com/yargs/yargs/pull/414) all command options can be defined in module now (@nexdrew) + +### v4.2.0 (2016/2/22 11:02 +07:00) + +- [#395](https://github.com/yargs/yargs/pull/395) do not reset groups if they contain + global keys (@novemberborn) +- [#393](https://github.com/yargs/yargs/pull/393) use sane default for usage strings (@nexdrew) +- [#392](https://github.com/yargs/yargs/pull/392) resetting wrap() was causing layout issues + with commands (@nexdrew) +- [#391](https://github.com/yargs/yargs/pull/391) commands were being added multiple times (@nexdrew) + +### v4.0.0 (2016/2/14 1:27 +07:00) + +- [#384](https://github.com/bcoe/yargs/pull/384) add new number type to yargs (@lrlna, @maxrimue) +- [#382](https://github.com/bcoe/yargs/pull/382) pass error as extra parameter to fail (@gajus) +- [#378](https://github.com/bcoe/yargs/pull/378) introduces the pkgConf feature, which tells + yargs to load default argument values from a key on a project's package.json (@bcoe) +- [#376](https://github.com/bcoe/yargs/pull/376) **breaking change**, make help() method signature + more consistent with other commands (@maxrimue) +- [#368](https://github.com/bcoe/yargs/pull/368) **breaking change**, overhaul to command handling API: + introducing named positional arguments, commands as modules, introduces the concept of global options (options that don't reset). (@nexdrew, @bcoe). +- [#364](https://github.com/bcoe/yargs/pull/364) add the slick new yargs website to the package.json (@iarna). +- [#357](https://github.com/bcoe/yargs/pull/357) .strict() now requires that a valid command is provided (@lrlna) +- [#356](https://github.com/bcoe/yargs/pull/356) pull the parsing bits of yargs into the separate module yargs-parser. Various parsing options can now be turned on and off using configuration (@bcoe). +- [#330](https://github.com/bcoe/yargs/pull/330) **breaking change**, fix inconsistencies with `.version()` API. (@maxrimue). + +### v3.32.0 (2016/1/14 10:13 +07:00) + +- [#344](https://github.com/bcoe/yargs/pull/344) yargs now has a code of conduct and contributor guidelines (@bcoe) +- [#341](https://github.com/bcoe/yargs/issues/341) Fix edge-case with camel-case arguments (@davibe) +- [#331](https://github.com/bcoe/yargs/pull/331) Handle parsing a raw argument string (@kellyselden) +- [#325](https://github.com/bcoe/yargs/pull/325) Tweaks to make tests pass again on Windows (@isaacs) +- [#321](https://github.com/bcoe/yargs/pull/321) Custom config parsing function (@bcoe) + +### v3.31.0 (2015/12/03 10:15 +07:00) + +- [#239](https://github.com/bcoe/yargs/pull/239) Pass argv to commands (@bcoe) +- [#308](https://github.com/bcoe/yargs/pull/308) Yargs now handles environment variables (@nexdrew) +- [#302](https://github.com/bcoe/yargs/pull/302) Add Indonesian translation (@rilut) +- [#300](https://github.com/bcoe/yargs/pull/300) Add Turkish translation (@feyzo) +- [#298](https://github.com/bcoe/yargs/pull/298) Add Norwegian Bokmål translation (@sindresorhus) +- [#297](https://github.com/bcoe/yargs/pull/297) Fix for layout of cjk characters (@disjukr) +- [#296](https://github.com/bcoe/yargs/pull/296) Add Korean translation (@disjukr) + +### v3.30.0 (2015/11/13 16:29 +07:00) + +- [#293](https://github.com/bcoe/yargs/pull/293) Polish language support (@kamilogorek) +- [#291](https://github.com/bcoe/yargs/pull/291) fix edge-cases with `.alias()` (@bcoe) +- [#289](https://github.com/bcoe/yargs/pull/289) group options in custom groups (@bcoe) + +### v3.29.0 (2015/10/16 21:51 +07:00) + +- [#282](https://github.com/bcoe/yargs/pull/282) completions now accept promises (@LinusU) +- [#281](https://github.com/bcoe/yargs/pull/281) fix parsing issues with dot notation (@bcoe) + +### v3.28.0 (2015/10/16 1:55 +07:00) + +- [#277](https://github.com/bcoe/yargs/pull/277) adds support for ansi escape codes (@bcoe) + +### v3.27.0 (2015/10/08 1:55 +00:00) + +- [#271](https://github.com/bcoe/yargs/pull/273) skips validation for help or version flags with exitProcess(false) (@tepez) +- [#273](https://github.com/bcoe/yargs/pull/273) implements single output for errors with exitProcess(false) (@nexdrew) +- [#269](https://github.com/bcoe/yargs/pull/269) verifies single output for errors with exitProcess(false) (@tepez) +- [#268](https://github.com/bcoe/yargs/pull/268) adds Chinese translation (@qiu8310) +- [#266](https://github.com/bcoe/yargs/pull/266) adds case for -- after -- in parser test (@geophree) + +### v3.26.0 (2015/09/25 2:14 +00:00) + +- [#263](https://github.com/bcoe/yargs/pull/263) document count() and option() object keys (@nexdrew) +- [#259](https://github.com/bcoe/yargs/pull/259) remove util in readme (@38elements) +- [#258](https://github.com/bcoe/yargs/pull/258) node v4 builds, update deps (@nexdrew) +- [#257](https://github.com/bcoe/yargs/pull/257) fix spelling errors (@dkoleary88) + +### v3.25.0 (2015/09/13 7:38 -07:00) + +- [#254](https://github.com/bcoe/yargs/pull/254) adds Japanese translation (@oti) +- [#253](https://github.com/bcoe/yargs/pull/253) fixes for tests on Windows (@bcoe) + +### v3.24.0 (2015/09/04 12:02 +00:00) + +- [#248](https://github.com/bcoe/yargs/pull/248) reinstate os-locale, no spawning (@nexdrew) +- [#249](https://github.com/bcoe/yargs/pull/249) use travis container-based infrastructure (@nexdrew) +- [#247](https://github.com/bcoe/yargs/pull/247) upgrade standard (@nexdrew) + +### v3.23.0 (2015/08/30 23:00 +00:00) + +- [#246](https://github.com/bcoe/yargs/pull/246) detect locale based only on environment variables (@bcoe) +- [#244](https://github.com/bcoe/yargs/pull/244) adds Windows CI testing (@bcoe) +- [#245](https://github.com/bcoe/yargs/pull/245) adds OSX CI testing (@bcoe, @nexdrew) + +### v3.22.0 (2015/08/28 22:26 +00:00) +- [#242](https://github.com/bcoe/yargs/pull/242) adds detectLocale config option (@bcoe) + +### v3.21.1 (2015/08/28 20:58 +00:00) +- [#240](https://github.com/bcoe/yargs/pull/240) hot-fix for Atom on Windows (@bcoe) + +### v3.21.0 (2015/08/21 21:20 +00:00) +- [#238](https://github.com/bcoe/yargs/pull/238) upgrade camelcase, window-size, chai, mocha (@nexdrew) +- [#237](https://github.com/bcoe/yargs/pull/237) adds defaultDescription to option() (@nexdrew) + +### v3.20.0 (2015/08/20 01:29 +00:00) +- [#231](https://github.com/bcoe/yargs/pull/231) Merge pull request #231 from bcoe/detect-locale (@sindresorhus) +- [#235](https://github.com/bcoe/yargs/pull/235) adds german translation to yargs (@maxrimue) + +### v3.19.0 (2015/08/14 05:12 +00:00) +- [#224](https://github.com/bcoe/yargs/pull/224) added Portuguese translation (@codemonkey3045) + +### v3.18.1 (2015/08/12 05:53 +00:00) + +- [#228](https://github.com/bcoe/yargs/pull/228) notes about embedding yargs in Electron (@etiktin) +- [#223](https://github.com/bcoe/yargs/pull/223) make booleans work in config files (@sgentle) + +### v3.18.0 (2015/08/06 20:05 +00:00) +- [#222](https://github.com/bcoe/yargs/pull/222) updates fr locale (@nexdrew) +- [#221](https://github.com/bcoe/yargs/pull/221) adds missing locale strings (@nexdrew) +- [#220](https://github.com/bcoe/yargs/pull/220) adds es locale (@zkat) + +### v3.17.1 (2015/08/02 19:35 +00:00) +- [#218](https://github.com/bcoe/yargs/pull/218) upgrades nyc (@bcoe) + +### v3.17.0 (2015/08/02 18:39 +00:00) +- [#217](https://github.com/bcoe/yargs/pull/217) sort methods in README.md (@nexdrew) +- [#215](https://github.com/bcoe/yargs/pull/215) adds fr locale (@LoicMahieu) + +### v3.16.0 (2015/07/30 04:35 +00:00) +- [#210](https://github.com/bcoe/yargs/pull/210) adds i18n support to yargs (@bcoe) +- [#209](https://github.com/bcoe/yargs/pull/209) adds choices type to yargs (@nexdrew) +- [#207](https://github.com/bcoe/yargs/pull/207) pretty new shields from shields.io (@SimenB) +- [#208](https://github.com/bcoe/yargs/pull/208) improvements to README.md (@nexdrew) +- [#205](https://github.com/bcoe/yargs/pull/205) faster build times on Travis (@ChristianMurphy) + +### v3.15.0 (2015/07/06 06:01 +00:00) +- [#197](https://github.com/bcoe/yargs/pull/197) tweaks to how errors bubble up from parser.js (@bcoe) +- [#193](https://github.com/bcoe/yargs/pull/193) upgraded nyc, reporting now happens by default (@bcoe) + +### v3.14.0 (2015/06/28 02:12 +00:00) + +- [#192](https://github.com/bcoe/yargs/pull/192) standard style nits (@bcoe) +- [#190](https://github.com/bcoe/yargs/pull/190) allow for hidden commands, e.g., + .completion('completion', false) (@tschaub) + +### v3.13.0 (2015/06/24 04:12 +00:00) + +- [#187](https://github.com/bcoe/yargs/pull/187) completion now behaves differently + if it is being run in the context of a command (@tschaub) +- [#186](https://github.com/bcoe/yargs/pull/186) if no matches are found for a completion + default to filename completion (@tschaub) + +### v3.12.0 (2015/06/19 03:23 +00:00) +- [#183](https://github.com/bcoe/yargs/pull/183) don't complete commands if they've already been completed (@tschaub) +- [#181](https://github.com/bcoe/yargs/pull/181) various fixes for completion. (@bcoe, @tschaub) +- [#182](https://github.com/bcoe/yargs/pull/182) you can now set a maximum # of of required arguments (@bcoe) + +### v3.11.0 (2015/06/15 05:15 +00:00) + +- [#173](https://github.com/bcoe/yargs/pull/173) update standard, window-size, chai (@bcoe) +- [#171](https://github.com/bcoe/yargs/pull/171) a description can now be set + when providing a config option. (@5c077yP) + +### v3.10.0 (2015/05/29 04:25 +00:00) + +- [#165](https://github.com/bcoe/yargs/pull/165) expose yargs.terminalWidth() thanks @ensonic (@bcoe) +- [#164](https://github.com/bcoe/yargs/pull/164) better array handling thanks @getify (@bcoe) + +### v3.9.1 (2015/05/20 05:14 +00:00) +- [b6662b6](https://github.com/bcoe/yargs/commit/b6662b6774cfeab4876f41ec5e2f67b7698f4e2f) clarify .config() docs (@linclark) +- [0291360](https://github.com/bcoe/yargs/commit/02913606285ce31ce81d7f12c48d8a3029776ec7) fixed tests, switched to nyc for coverage, fixed security issue, added Lin as collaborator (@bcoe) + +### v3.9.0 (2015/05/10 18:32 +00:00) +- [#157](https://github.com/bcoe/yargs/pull/157) Merge pull request #157 from bcoe/command-yargs. allows handling of command specific arguments. Thanks for the suggestion @ohjames (@bcoe) +- [#158](https://github.com/bcoe/yargs/pull/158) Merge pull request #158 from kemitchell/spdx-license. Update license format (@kemitchell) + +### v3.8.0 (2015/04/24 23:10 +00:00) +- [#154](https://github.com/bcoe/yargs/pull/154) showHelp's method signature was misleading fixes #153 (@bcoe) +- [#151](https://github.com/bcoe/yargs/pull/151) refactor yargs' table layout logic to use new helper library (@bcoe) +- [#150](https://github.com/bcoe/yargs/pull/150) Fix README example in argument requirements (@annonymouse) + +### v3.7.2 (2015/04/13 11:52 -07:00) + +* [679fbbf](https://github.com/bcoe/yargs/commit/679fbbf55904030ccee8a2635e8e5f46551ab2f0) updated yargs to use the [standard](https://github.com/feross/standard) style guide (agokjr) +* [22382ee](https://github.com/bcoe/yargs/commit/22382ee9f5b495bc2586c1758cd1091cec3647f9 various bug fixes for $0 (@nylen) + +### v3.7.1 (2015/04/10 11:06 -07:00) + +* [89e1992](https://github.com/bcoe/yargs/commit/89e1992a004ba73609b5f9ee6890c4060857aba4) detect iojs bin along with node bin. (@bcoe) +* [755509e](https://github.com/bcoe/yargs/commit/755509ea90041e5f7833bba3b8c5deffe56f0aab) improvements to example documentation in README.md (@rstacruz) +* [0d2dfc8](https://github.com/bcoe/yargs/commit/0d2dfc822a43418242908ad97ddd5291a1b35dc6) showHelp() no longer requires that .argv has been called (@bcoe) + +### v3.7.0 (2015/04/04 02:29 -07:00) + +* [56cbe2d](https://github.com/bcoe/yargs/commit/56cbe2ddd33dc176dcbf97ba40559864a9f114e4) make .requiresArg() work with type hints. (@bcoe). +* [2f5d562](https://github.com/bcoe/yargs/commit/2f5d5624f736741deeedf6a664d57bc4d857bdd0) serialize arrays and objects in usage strings. (@bcoe). +* [5126304](https://github.com/bcoe/yargs/commit/5126304dd18351fc28f10530616fdd9361e0af98) be more lenient about alias/primary key ordering in chaining API. (@bcoe) + +### v3.6.0 (2015/03/21 01:00 +00:00) +- [4e24e22](https://github.com/bcoe/yargs/commit/4e24e22e6a195e55ab943ede704a0231ac33b99c) support for .js configuration files. (@pirxpilot) + +### v3.5.4 (2015/03/12 05:56 +00:00) +- [c16cc08](https://github.com/bcoe/yargs/commit/c16cc085501155cf7fd853ccdf8584b05ab92b78) message for non-option arguments is now optional, thanks to (@raine) + +### v3.5.3 (2015/03/09 06:14 +00:00) +- [870b428](https://github.com/bcoe/yargs/commit/870b428cf515d560926ca392555b7ad57dba9e3d) completion script was missing in package.json (@bcoe) + +### v3.5.2 (2015/03/09 06:11 +00:00) +- [58a4b24](https://github.com/bcoe/yargs/commit/58a4b2473ebbb326713d522be53e32d3aabb08d2) parse was being called multiple times, resulting in strange behavior (@bcoe) + +### v3.5.1 (2015/03/09 04:55 +00:00) +- [4e588e0](https://github.com/bcoe/yargs/commit/4e588e055afbeb9336533095f051496e3977f515) accidentally left testing logic in (@bcoe) + +### v3.5.0 (2015/03/09 04:49 +00:00) +- [718bacd](https://github.com/bcoe/yargs/commit/718bacd81b9b44f786af76b2afe491fe06274f19) added support for bash completions see #4 (@bcoe) +- [a192882](https://github.com/bcoe/yargs/commit/a19288270fc431396c42af01125eeb4443664528) downgrade to mocha 2.1.0 until https://github.com/mochajs/mocha/issues/1585 can be sorted out (@bcoe) + +### v3.4.7 (2015/03/09 04:09 +00:00) +- [9845e5c](https://github.com/bcoe/yargs/commit/9845e5c1a9c684ba0be3f0bfb40e7b62ab49d9c8) the Argv singleton was not being updated when manually parsing arguments, fixes #114 (@bcoe) + +### v3.4.6 (2015/03/09 04:01 +00:00) +- [45b4c80](https://github.com/bcoe/yargs/commit/45b4c80b890d02770b0a94f326695a8a566e8fe9) set placeholders for all keys fixes #115 (@bcoe) + +### v3.4.5 (2015/03/01 20:31 +00:00) +- [a758e0b](https://github.com/bcoe/yargs/commit/a758e0b2556184f067cf3d9c4ef886d39817ebd2) fix for count consuming too many arguments (@bcoe) + +### v3.4.4 (2015/02/28 04:52 +00:00) +- [0476af7](https://github.com/bcoe/yargs/commit/0476af757966acf980d998b45108221d4888cfcb) added nargs feature, allowing you to specify the number of arguments after an option (@bcoe) +- [092477d](https://github.com/bcoe/yargs/commit/092477d7ab3efbf0ba11cede57f7d8cfc70b024f) updated README with full example of v3.0 API (@bcoe) + +### v3.3.3 (2015/02/28 04:23 +00:00) +- [0c4b769](https://github.com/bcoe/yargs/commit/0c4b769516cd8d93a7c4e5e675628ae0049aa9a8) remove string dependency, which conflicted with other libraries see #106 (@bcoe) + +### v3.3.2 (2015/02/28 04:11 +00:00) +- [2a98906](https://github.com/bcoe/yargs/commit/2a9890675821c0e7a12f146ce008b0562cb8ec9a) add $0 to epilog (@schnittstabil) + +### v3.3.1 (2015/02/24 03:28 +00:00) +- [ad485ce](https://github.com/bcoe/yargs/commit/ad485ce748ebdfce25b88ef9d6e83d97a2f68987) fix for applying defaults to camel-case args (@bcoe) + +### v3.3.0 (2015/02/24 00:49 +00:00) +- [8bfe36d](https://github.com/bcoe/yargs/commit/8bfe36d7fb0f93a799ea3f4c756a7467c320f8c0) fix and document restart() command, as a tool for building nested CLIs (@bcoe) + +### v3.2.1 (2015/02/22 05:45 +00:00) +- [49a6d18](https://github.com/bcoe/yargs/commit/49a6d1822a4ef9b1ea6f90cc366be60912628885) you can now provide a function that generates a default value (@bcoe) + +### v3.2.0 (2015/02/22 05:24 +00:00) +- [7a55886](https://github.com/bcoe/yargs/commit/7a55886c9343cf71a20744ca5cdd56d2ea7412d5) improvements to yargs two-column text layout (@bcoe) +- [b6ab513](https://github.com/bcoe/yargs/commit/b6ab5136a4c3fa6aa496f6b6360382e403183989) Tweak NPM version badge (@nylen) + +### v3.1.0 (2015/02/19 19:37 +00:00) +- [9bd2379](https://github.com/bcoe/yargs/commit/9bd237921cf1b61fd9f32c0e6d23f572fc225861) version now accepts a function, making it easy to load version #s from a package.json (@bcoe) + +### v3.0.4 (2015/02/14 01:40 +00:00) +- [0b7c19b](https://github.com/bcoe/yargs/commit/0b7c19beaecb747267ca4cc10e5cb2a8550bc4b7) various fixes for dot-notation handling (@bcoe) + +### v3.0.3 (2015/02/14 00:59 +00:00) +- [c3f35e9](https://github.com/bcoe/yargs/commit/c3f35e99bd5a0d278073fcadd95e2d778616cc17) make sure dot-notation is applied to aliases (@bcoe) + +### 3.0.2 (2015/02/13 16:50 +00:00) +- [74c8967](https://github.com/bcoe/yargs/commit/74c8967c340c204a0a7edf8a702b6f46c2705435) document epilog shorthand of epilogue. (@bcoe) +- [670110f](https://github.com/bcoe/yargs/commit/670110fc01bedc4831b6fec6afac54517d5a71bc) any non-truthy value now causes check to fail see #76 (@bcoe) +- [0d8f791](https://github.com/bcoe/yargs/commit/0d8f791a33c11ced4cd431ea8d3d3a337d456b56) finished implementing my wish-list of fetures for yargs 3.0. see #88 (@bcoe) +- [5768447](https://github.com/bcoe/yargs/commit/5768447447c4c8e8304f178846206ce86540f063) fix coverage. (@bcoe) +- [82e793f](https://github.com/bcoe/yargs/commit/82e793f3f61c41259eaacb67f0796aea2cf2aaa0) detect console width and perform word-wrapping. (@bcoe) +- [67476b3](https://github.com/bcoe/yargs/commit/67476b37eea07fee55f23f35b9e0c7d76682b86d) refactor two-column table layout so that we can use it for examples and usage (@bcoe) +- [4724cdf](https://github.com/bcoe/yargs/commit/4724cdfcc8e37ae1ca3dcce9d762f476e9ef4bb4) major refactor of index.js, in prep for 3.x release. (@bcoe) + +### v2.3.0 (2015/02/08 20:41 +00:00) +- [d824620](https://github.com/bcoe/yargs/commit/d824620493df4e63664af1fe320764dd1a9244e6) allow for undefined boolean defaults (@ashi009) + +### v2.2.0 (2015/02/08 20:07 +00:00) +- [d6edd98](https://github.com/bcoe/yargs/commit/d6edd9848826e7389ed1393858c45d03961365fd) in-prep for further refactoring, and a 3.x release I've shuffled some things around and gotten test-coverage to 100%. (@bcoe) + +### v2.1.2 (2015/02/08 06:05 +00:00) +- [d640745](https://github.com/bcoe/yargs/commit/d640745a7b9f8d476e0223879d056d18d9c265c4) switch to path.relative (@bcoe) +- [3bfd41f](https://github.com/bcoe/yargs/commit/3bfd41ff262a041f29d828b88936a79c63cad594) remove mocha.opts. (@bcoe) +- [47a2f35](https://github.com/bcoe/yargs/commit/47a2f357091db70903a402d6765501c1d63f15fe) document using .string('_') for string ids. see #56 (@bcoe) +- [#57](https://github.com/bcoe/yargs/pull/57) Merge pull request #57 from eush77/option-readme (@eush77) + +### v2.1.1 (2015/02/06 08:08 +00:00) +- [01c6c61](https://github.com/bcoe/yargs/commit/01c6c61d67b4ebf88f41f0b32a345ec67f0ac17d) fix for #71, 'newAliases' of undefined (@bcoe) + +### v2.1.0 (2015/02/06 07:59 +00:00) +- [6a1a3fa](https://github.com/bcoe/yargs/commit/6a1a3fa731958e26ccd56885f183dd8985cc828f) try to guess argument types, and apply sensible defaults see #73 (@bcoe) + +### v2.0.1 (2015/02/06 07:54 +00:00) +- [96a06b2](https://github.com/bcoe/yargs/commit/96a06b2650ff1d085a52b7328d8bba614c20cc12) Fix for strange behavior with --sort option, see #51 (@bcoe) + +### v2.0.0 (2015/02/06 07:45 +00:00) +- [0250517](https://github.com/bcoe/yargs/commit/0250517c9643e53f431b824e8ccfa54937414011) - [108fb84](https://github.com/bcoe/yargs/commit/108fb8409a3a63dcaf99d917fe4dfcfaa1de236d) fixed bug with boolean parsing, when bools separated by = see #66 (@bcoe) +- [a465a59](https://github.com/bcoe/yargs/commit/a465a5915f912715738de890982e4f8395958b10) Add `files` field to the package.json (@shinnn) +- [31043de](https://github.com/bcoe/yargs/commit/31043de7a38a17c4c97711f1099f5fb164334db3) fix for yargs.argv having the same keys added multiple times see #63 (@bcoe) +- [2d68c5b](https://github.com/bcoe/yargs/commit/2d68c5b91c976431001c4863ce47c9297850f1ad) Disable process.exit calls using .exitProcess(false) (@cianclarke) +- [45da9ec](https://github.com/bcoe/yargs/commit/45da9ec4c55a7bd394721bc6a1db0dabad7bc52a) Mention .option in README (@eush77) + +### v1.3.2 (2014/10/06 21:56 +00:00) +- [b8d3472](https://github.com/bcoe/yargs/commit/b8d34725482e5821a3cc809c0df71378f282f526) 1.3.2 (@chevex) + +### list (2014/08/30 18:41 +00:00) +- [fbc777f](https://github.com/bcoe/yargs/commit/fbc777f416eeefd37c84e44d27d7dfc7c1925721) Now that yargs is the successor to optimist, I'm changing the README language to be more universal. Pirate speak isn't very accessible to non-native speakers. (@chevex) +- [a54d068](https://github.com/bcoe/yargs/commit/a54d0682ae2efc2394d407ab171cc8a8bbd135ea) version output will not print extra newline (@boneskull) +- [1cef5d6](https://github.com/bcoe/yargs/commit/1cef5d62a9d6d61a3948a49574892e01932cc6ae) Added contributors section to package.json (@chrisn) +- [cc295c0](https://github.com/bcoe/yargs/commit/cc295c0a80a2de267e0155b60d315fc4b6f7c709) Added 'require' and 'required' as synonyms for 'demand' (@chrisn) +- [d0bf951](https://github.com/bcoe/yargs/commit/d0bf951d949066b6280101ed606593d079ee15c8) Updating minimist. (@chevex) +- [c15f8e7](https://github.com/bcoe/yargs/commit/c15f8e7f245b261e542cf205ce4f4313630cbdb4) Fix #31 (bad interaction between camelCase options and strict mode) (@nylen) +- [d991b9b](https://github.com/bcoe/yargs/commit/d991b9be687a68812dee1e3b185ba64b7778b82d) Added .help() and .version() methods (@chrisn) +- [e8c8aa4](https://github.com/bcoe/yargs/commit/e8c8aa46268379357cb11e9fc34b8c403037724b) Added .showHelpOnFail() method (@chrisn) +- [e855af4](https://github.com/bcoe/yargs/commit/e855af4a933ea966b5bbdd3c4c6397a4bac1a053) Allow boolean flag with .demand() (@chrisn) +- [14dbec2](https://github.com/bcoe/yargs/commit/14dbec24fb7380683198e2b20c4deb8423e64bea) Fixes issue #22. Arguments are no longer printed to the console when using .config. (@chevex) +- [bef74fc](https://github.com/bcoe/yargs/commit/bef74fcddc1544598a804f80d0a3728459f196bf) Informing users that Yargs is the official optimist successor. (@chevex) +- [#24](https://github.com/bcoe/yargs/pull/24) Merge pull request #24 from chrisn/strict (@chrisn) +- [889a2b2](https://github.com/bcoe/yargs/commit/889a2b28eb9768801b05163360a470d0fd6c8b79) Added requiresArg option, for options that require values (@chrisn) +- [eb16369](https://github.com/bcoe/yargs/commit/eb163692262be1fe80b992fd8803d5923c5a9b18) Added .strict() method, to report error if unknown arguments are given (@chrisn) +- [0471c3f](https://github.com/bcoe/yargs/commit/0471c3fd999e1ad4e6cded88b8aa02013b66d14f) Changed optimist to yargs in usage-options.js example (@chrisn) +- [5c88f74](https://github.com/bcoe/yargs/commit/5c88f74e3cf031b17c54b4b6606c83e485ff520e) Change optimist to yargs in examples (@chrisn) +- [66f12c8](https://github.com/bcoe/yargs/commit/66f12c82ba3c943e4de8ca862980e835da8ecb3a) Fix a couple of bad interactions between aliases and defaults (@nylen) +- [8fa1d80](https://github.com/bcoe/yargs/commit/8fa1d80f14b03eb1f2898863a61f1d1615bceb50) Document second argument of usage(message, opts) (@Gobie) +- [56e6528](https://github.com/bcoe/yargs/commit/56e6528cf674ff70d63083fb044ff240f608448e) For "--some-option", also set argv.someOption (@nylen) +- [ed5f6d3](https://github.com/bcoe/yargs/commit/ed5f6d33f57ad1086b11c91b51100f7c6c7fa8ee) Finished porting unit tests to Mocha. (@chevex) + +### v1.0.15 (2014/02/05 23:18 +00:00) +- [e2b1fc0](https://github.com/bcoe/yargs/commit/e2b1fc0c4a59cf532ae9b01b275e1ef57eeb64d2) 1.0.15 update to badges (@chevex) + +### v1.0.14 (2014/02/05 23:17 +00:00) +- [f33bbb0](https://github.com/bcoe/yargs/commit/f33bbb0f00fe18960f849cc8e15a7428a4cd59b8) Revert "Fixed issue which caused .demand function not to work correctly." (@chevex) + +### v1.0.13 (2014/02/05 22:13 +00:00) +- [6509e5e](https://github.com/bcoe/yargs/commit/6509e5e7dee6ef1a1f60eea104be0faa1a045075) Fixed issue which caused .demand function not to work correctly. (@chevex) + +### v1.0.12 (2013/12/13 00:09 +00:00) +- [05eb267](https://github.com/bcoe/yargs/commit/05eb26741c9ce446b33ff006e5d33221f53eaceb) 1.0.12 (@chevex) + +### v1.0.11 (2013/12/13 00:07 +00:00) +- [c1bde46](https://github.com/bcoe/yargs/commit/c1bde46e37318a68b87d17a50c130c861d6ce4a9) 1.0.11 (@chevex) + +### v1.0.10 (2013/12/12 23:57 +00:00) +- [dfebf81](https://github.com/bcoe/yargs/commit/dfebf8164c25c650701528ee581ca483a99dc21c) Fixed formatting in README (@chevex) + +### v1.0.9 (2013/12/12 23:47 +00:00) +- [0b4e34a](https://github.com/bcoe/yargs/commit/0b4e34af5e6d84a9dbb3bb6d02cd87588031c182) Update README.md (@chevex) + +### v1.0.8 (2013/12/06 16:36 +00:00) +- [#1](https://github.com/bcoe/yargs/pull/1) fix error caused by check() see #1 (@martinheidegger) + +### v1.0.7 (2013/11/24 18:01 +00:00) +- [a247d88](https://github.com/bcoe/yargs/commit/a247d88d6e46644cbb7303c18b1bb678fc132d72) Modified Pirate Joe image. (@chevex) + +### v1.0.6 (2013/11/23 19:21 +00:00) +- [d7f69e1](https://github.com/bcoe/yargs/commit/d7f69e1d34bc929736a8bdccdc724583e21b7eab) Updated Pirate Joe image. (@chevex) + +### v1.0.5 (2013/11/23 19:09 +00:00) +- [ece809c](https://github.com/bcoe/yargs/commit/ece809cf317cc659175e1d66d87f3ca68c2760be) Updated readme notice again. (@chevex) + +### v1.0.4 (2013/11/23 19:05 +00:00) +- [9e81e81](https://github.com/bcoe/yargs/commit/9e81e81654028f83ba86ffc3ac772a0476084e5e) Updated README with a notice about yargs being a fork of optimist and what that implies. (@chevex) + +### v1.0.3 (2013/11/23 17:43 +00:00) +- [65e7a78](https://github.com/bcoe/yargs/commit/65e7a782c86764944d63d084416aba9ee6019c5f) Changed some small wording in README.md. (@chevex) +- [459e20e](https://github.com/bcoe/yargs/commit/459e20e539b366b85128dd281ccd42221e96c7da) Fix a bug in the options function, when string and boolean options weren't applied to aliases. (@shockone) + +### v1.0.2 (2013/11/23 09:46 +00:00) +- [3d80ebe](https://github.com/bcoe/yargs/commit/3d80ebed866d3799224b6f7d596247186a3898a9) 1.0.2 (@chevex) + +### v1.0.1 (2013/11/23 09:39 +00:00) +- [f80ff36](https://github.com/bcoe/yargs/commit/f80ff3642d580d4b68bf9f5a94277481bd027142) Updated image. (@chevex) + +### v1.0.0 (2013/11/23 09:33 +00:00) +- [54e31d5](https://github.com/bcoe/yargs/commit/54e31d505f820b80af13644e460894b320bf25a3) Rebranded from optimist to yargs in the spirit of the fork :D (@chevex) +- [4ebb6c5](https://github.com/bcoe/yargs/commit/4ebb6c59f44787db7c24c5b8fe2680f01a23f498) Added documentation for demandCount(). (@chevex) +- [4561ce6](https://github.com/bcoe/yargs/commit/4561ce66dcffa95f49e8b4449b25b94cd68acb25) Simplified the error messages returned by .check(). (@chevex) +- [661c678](https://github.com/bcoe/yargs/commit/661c67886f479b16254a830b7e1db3be29e6b7a6) Fixed an issue with demand not accepting a zero value. (@chevex) +- [731dd3c](https://github.com/bcoe/yargs/commit/731dd3c37624790490bd6df4d5f1da8f4348279e) Add .fail(fn) so death isn't the only option. Should fix issue #39. (@chevex) +- [fa15417](https://github.com/bcoe/yargs/commit/fa15417ff9e70dace0d726627a5818654824c1d8) Added a few missing 'return self' (@chevex) +- [e655e4d](https://github.com/bcoe/yargs/commit/e655e4d99d1ae1d3695ef755d51c2de08d669761) Fix showing help in certain JS environments. (@chevex) +- [a746a31](https://github.com/bcoe/yargs/commit/a746a31cd47c87327028e6ea33762d6187ec5c87) Better string representation of default values. (@chevex) +- [6134619](https://github.com/bcoe/yargs/commit/6134619a7e90b911d5443230b644c5d447c1a68c) Implies: conditional demands (@chevex) +- [046b93b](https://github.com/bcoe/yargs/commit/046b93b5d40a27367af4cb29726e4d781d934639) Added support for JSON config files. (@chevex) +- [a677ec0](https://github.com/bcoe/yargs/commit/a677ec0a0ecccd99c75e571d03323f950688da03) Add .example(cmd, desc) feature. (@chevex) +- [1bd4375](https://github.com/bcoe/yargs/commit/1bd4375e11327ba1687d4bb6e5e9f3c30c1be2af) Added 'defaults' as alias to 'default' so as to avoid usage of a reserved keyword. (@chevex) +- [6b753c1](https://github.com/bcoe/yargs/commit/6b753c16ca09e723060e70b773b430323b29c45c) add .normalize(args..) support for normalizing paths (@chevex) +- [33d7d59](https://github.com/bcoe/yargs/commit/33d7d59341d364f03d3a25f0a55cb99004dbbe4b) Customize error messages with demand(key, msg) (@chevex) +- [647d37f](https://github.com/bcoe/yargs/commit/647d37f164c20f4bafbf67dd9db6cd6e2cd3b49f) Merge branch 'rewrite-duplicate-test' of github.com:isbadawi/node-optimist (@chevex) +- [9059d1a](https://github.com/bcoe/yargs/commit/9059d1ad5e8aea686c2a01c89a23efdf929fff2e) Pass aliases object to check functions for greater versatility. (@chevex) +- [623dc26](https://github.com/bcoe/yargs/commit/623dc26c7331abff2465ef8532e3418996d42fe6) Added ability to count boolean options and rolled minimist library back into project. (@chevex) +- [49f0dce](https://github.com/bcoe/yargs/commit/49f0dcef35de4db544c3966350d36eb5838703f6) Fixed small typo. (@chevex) +- [79ec980](https://github.com/bcoe/yargs/commit/79ec9806d9ca6eb0014cfa4b6d1849f4f004baf2) Removed dependency on wordwrap module. (@chevex) +- [ea14630](https://github.com/bcoe/yargs/commit/ea14630feddd69d1de99dd8c0e08948f4c91f00a) Merge branch 'master' of github.com:chbrown/node-optimist (@chevex) +- [2b75da2](https://github.com/bcoe/yargs/commit/2b75da2624061e0f4f3107d20303c06ec9054906) Merge branch 'master' of github.com:seanzhou1023/node-optimist (@chevex) +- [d9bda11](https://github.com/bcoe/yargs/commit/d9bda1116e26f3b40e833ca9ca19263afea53565) Merge branch 'patch-1' of github.com:thefourtheye/node-optimist (@chevex) +- [d6cc606](https://github.com/bcoe/yargs/commit/d6cc6064a4f1bea38a16a4430b8a1334832fbeff) Renamed README. (@chevex) +- [9498d3f](https://github.com/bcoe/yargs/commit/9498d3f59acfb5e102826503e681623c3a64b178) Renamed readme and added .gitignore. (@chevex) +- [bbd1fe3](https://github.com/bcoe/yargs/commit/bbd1fe37fefa366dde0fb3dc44d91fe8b28f57f5) Included examples for ```help``` and ```showHelp``` functions and fixed few formatting issues (@thefourtheye) +- [37fea04](https://github.com/bcoe/yargs/commit/37fea0470a5796a0294c1dcfff68d8041650e622) .alias({}) behaves differently based on mapping direction when generating descriptions (@chbrown) +- [855b20d](https://github.com/bcoe/yargs/commit/855b20d0be567ca121d06b30bea64001b74f3d6d) Documented function signatures are useful for dynamically typed languages. (@chbrown) + +### 0.6.0 (2013/06/25 08:48 +00:00) +- [d37bfe0](https://github.com/bcoe/yargs/commit/d37bfe05ae6d295a0ab481efe4881222412791f4) all tests passing using minimist (@substack) +- [76f1352](https://github.com/bcoe/yargs/commit/76f135270399d01f2bbc621e524a5966e5c422fd) all parse tests now passing (@substack) +- [a7b6754](https://github.com/bcoe/yargs/commit/a7b6754276c38d1565479a5685c3781aeb947816) using minimist, some tests passing (@substack) +- [6655688](https://github.com/bcoe/yargs/commit/66556882aa731cbbbe16cc4d42c85740a2e98099) Give credit where its due (@DeadAlready) +- [602a2a9](https://github.com/bcoe/yargs/commit/602a2a92a459f93704794ad51b115bbb08b535ce) v0.5.3 - Remove wordwrap as dependency (@DeadAlready) + +### 0.5.2 (2013/05/31 03:46 +00:00) +- [4497ca5](https://github.com/bcoe/yargs/commit/4497ca55e332760a37b866ec119ded347ca27a87) fixed the whitespace bug without breaking anything else (@substack) +- [5a3dd1a](https://github.com/bcoe/yargs/commit/5a3dd1a4e0211a38613c6e02f61328e1031953fa) failing test for whitespace arg (@substack) + +### 0.5.1 (2013/05/30 07:17 +00:00) +- [a20228f](https://github.com/bcoe/yargs/commit/a20228f62a454755dd07f628a7c5759113918327) fix parse() to work with functions before it (@substack) +- [b13bd4c](https://github.com/bcoe/yargs/commit/b13bd4cac856a9821d42fa173bdb58f089365a7d) failing test for parse() with modifiers (@substack) + +### 0.5.0 (2013/05/18 21:59 +00:00) +- [c474a64](https://github.com/bcoe/yargs/commit/c474a649231527915c222156e3b40806d365a87c) fixes for dash (@substack) + +### 0.4.0 (2013/04/13 19:03 +00:00) +- [dafe3e1](https://github.com/bcoe/yargs/commit/dafe3e18d7c6e7c2d68e06559df0e5cbea3adb14) failing short test (@substack) + +### 0.3.7 (2013/04/04 04:07 +00:00) +- [6c7a0ec](https://github.com/bcoe/yargs/commit/6c7a0ec94ce4199a505f0518b4d6635d4e47cc81) Fix for windows. On windows there is no _ in environment. (@hdf) + +### 0.3.6 (2013/04/04 04:04 +00:00) +- [e72346a](https://github.com/bcoe/yargs/commit/e72346a727b7267af5aa008b418db89970873f05) Add support for newlines in -a="" arguments (@danielbeardsley) +- [71e1fb5](https://github.com/bcoe/yargs/commit/71e1fb55ea9987110a669ac6ec12338cfff3821c) drop 0.4, add 0.8 to travis (@substack) + +### 0.3.5 (2012/10/10 11:09 +00:00) +- [ee692b3](https://github.com/bcoe/yargs/commit/ee692b37554c70a0bb16389a50a26b66745cbbea) Fix parsing booleans (@vojtajina) +- [5045122](https://github.com/bcoe/yargs/commit/5045122664c3f5b4805addf1be2148d5856f7ce8) set $0 properly in the tests (@substack) + +### 0.3.4 (2012/04/30 06:54 +00:00) +- [f28c0e6](https://github.com/bcoe/yargs/commit/f28c0e62ca94f6e0bb2e6d82fc3d91a55e69b903) bump for string "true" params (@substack) +- [8f44aeb](https://github.com/bcoe/yargs/commit/8f44aeb74121ddd689580e2bf74ef86a605e9bf2) Fix failing test for aliased booleans. (@coderarity) +- [b9f7b61](https://github.com/bcoe/yargs/commit/b9f7b613b1e68e11e6c23fbda9e555a517dcc976) Add failing test for short aliased booleans. (@coderarity) + +### 0.3.3 (2012/04/30 06:45 +00:00) +- [541bac8](https://github.com/bcoe/yargs/commit/541bac8dd787a5f1a5d28f6d8deb1627871705e7) Fixes #37. + +### 0.3.2 (2012/04/12 20:28 +00:00) +- [3a0f014](https://github.com/bcoe/yargs/commit/3a0f014c1451280ac1c9caa1f639d31675586eec) travis badge (@substack) +- [4fb60bf](https://github.com/bcoe/yargs/commit/4fb60bf17845f4ce3293f8ca49c9a1a7c736cfce) Fix boolean aliases. (@coderarity) +- [f14dda5](https://github.com/bcoe/yargs/commit/f14dda546efc4fe06ace04d36919bfbb7634f79b) Adjusted package.json to use tap (@jfhbrook) +- [88e5d32](https://github.com/bcoe/yargs/commit/88e5d32295be6e544c8d355ff84e355af38a1c74) test/usage.js no longer hangs (@jfhbrook) +- [e1e740c](https://github.com/bcoe/yargs/commit/e1e740c27082f3ce84deca2093d9db2ef735d0e5) two tests for combined boolean/alias opts parsing (@jfhbrook) + +### 0.3.1 (2011/12/31 08:44 +00:00) +- [d09b719](https://github.com/bcoe/yargs/commit/d09b71980ef711b6cf3918cd19beec8257e40e82) If "default" is set to false it was not passed on, fixed. (@wolframkriesing) + +### 0.3.0 (2011/12/09 06:03 +00:00) +- [6e74aa7](https://github.com/bcoe/yargs/commit/6e74aa7b46a65773e20c0cb68d2d336d4a0d553d) bump and documented dot notation (@substack) + +### 0.2.7 (2011/10/20 02:25 +00:00) +- [94adee2](https://github.com/bcoe/yargs/commit/94adee20e17b58d0836f80e8b9cdbe9813800916) argv._ can be told 'Hey! argv._! Don't be messing with my args.', and it WILL obey (@colinta) +- [c46fdd5](https://github.com/bcoe/yargs/commit/c46fdd56a05410ae4a1e724a4820c82e77ff5469) optimistic critter image (@substack) +- [5c95c73](https://github.com/bcoe/yargs/commit/5c95c73aedf4c7482bd423e10c545e86d7c8a125) alias options() to option() (@substack) +- [f7692ea](https://github.com/bcoe/yargs/commit/f7692ea8da342850af819367833abb685fde41d8) [fix] Fix for parsing boolean edge case (@indexzero) +- [d1f92d1](https://github.com/bcoe/yargs/commit/d1f92d1425bd7f356055e78621b30cdf9741a3c2) +- [b01bda8](https://github.com/bcoe/yargs/commit/b01bda8d86e455bbf74ce497864cb8ab5b9fb847) [fix test] Update to ensure optimist is aware of default booleans. Associated tests included (@indexzero) +- [aa753e7](https://github.com/bcoe/yargs/commit/aa753e7c54fb3a12f513769a0ff6d54aa0f63943) [dist test] Update devDependencies in package.json. Update test pathing to be more npm and require.paths future-proof (@indexzero) +- [7bfce2f](https://github.com/bcoe/yargs/commit/7bfce2f3b3c98e6539e7549d35fbabced7e9341e) s/sys/util/ (@substack) +- [d420a7a](https://github.com/bcoe/yargs/commit/d420a7a9c890d2cdb11acfaf3ea3f43bc3e39f41) update usage output (@substack) +- [cf86eed](https://github.com/bcoe/yargs/commit/cf86eede2e5fc7495b6ec15e6d137d9ac814f075) some sage readme protips about parsing rules (@substack) +- [5da9f7a](https://github.com/bcoe/yargs/commit/5da9f7a5c0e1758ec7c5801fb3e94d3f6e970513) documented all the methods finally (@substack) +- [8ca6879](https://github.com/bcoe/yargs/commit/8ca6879311224b25933642987300f6a29de5c21b) fenced syntax highlighting (@substack) +- [b72bacf](https://github.com/bcoe/yargs/commit/b72bacf1d02594778c1935405bc8137eb61761dc) right-alignment of wrapped extra params (@substack) +- [2b980bf](https://github.com/bcoe/yargs/commit/2b980bf2656b4ee8fc5134dc5f56a48855c35198) now with .wrap() (@substack) +- [d614f63](https://github.com/bcoe/yargs/commit/d614f639654057d1b7e35e3f5a306e88ec2ad1e4) don't show 'Options:' when there aren't any (@substack) +- [691eda3](https://github.com/bcoe/yargs/commit/691eda354df97b5a86168317abcbcaabdc08a0fb) failing test for multi-aliasing (@substack) +- [0826c9f](https://github.com/bcoe/yargs/commit/0826c9f462109feab2bc7a99346d22e72bf774b7) "Options:" > "options:" (@substack) +- [72f7490](https://github.com/bcoe/yargs/commit/72f749025d01b7f295738ed370a669d885fbada0) [minor] Update formatting for `.showHelp()` (@indexzero) +- [75aecce](https://github.com/bcoe/yargs/commit/75aeccea74329094072f95800e02c275e7d999aa) options works again, too lazy to write a proper test right now (@substack) +- [f742e54](https://github.com/bcoe/yargs/commit/f742e5439817c662dc3bd8734ddd6467e6018cfd) line_count_options example, which breaks (@substack) +- [4ca06b8](https://github.com/bcoe/yargs/commit/4ca06b8b4ea99b5d5714b315a2a8576bee6e5537) line count example (@substack) +- [eeb8423](https://github.com/bcoe/yargs/commit/eeb8423e0a5ecc9dc3eb1e6df9f3f8c1c88f920b) remove self.argv setting in boolean (@substack) +- [6903412](https://github.com/bcoe/yargs/commit/69034126804660af9cc20ea7f4457b50338ee3d7) removed camel case for now (@substack) +- [5a0d88b](https://github.com/bcoe/yargs/commit/5a0d88bf23e9fa79635dd034e2a1aa992acc83cd) remove dead longest checking code (@substack) +- [d782170](https://github.com/bcoe/yargs/commit/d782170babf7284b1aa34f5350df0dd49c373fa8) .help() too (@substack) +- [622ec17](https://github.com/bcoe/yargs/commit/622ec17379bb5374fdbb190404c82bc600975791) rm old help generator (@substack) +- [7c8baac](https://github.com/bcoe/yargs/commit/7c8baac4d66195e9f5158503ea9ebfb61153dab7) nub keys (@substack) +- [8197785](https://github.com/bcoe/yargs/commit/8197785ad4762465084485b041abd722f69bf344) generate help message based on the previous calls, todo: nub (@substack) +- [3ffbdc3](https://github.com/bcoe/yargs/commit/3ffbdc33c8f5e83d4ea2ac60575ce119570c7ede) stub out new showHelp, better checks (@substack) +- [d4e21f5](https://github.com/bcoe/yargs/commit/d4e21f56a4830f7de841900d3c79756fb9886184) let .options() take single options too (@substack) +- [3c4cf29](https://github.com/bcoe/yargs/commit/3c4cf2901a29bac119cca8e983028d8669230ec6) .options() is now heaps simpler (@substack) +- [89f0d04](https://github.com/bcoe/yargs/commit/89f0d043cbccd302f10ab30c2069e05d2bf817c9) defaults work again, all tests pass (@substack) +- [dd87333](https://github.com/bcoe/yargs/commit/dd8733365423006a6e4156372ebb55f98323af58) update test error messages, down to 2 failing tests (@substack) +- [53f7bc6](https://github.com/bcoe/yargs/commit/53f7bc626b9875f2abdfc5dd7a80bde7f14143a3) fix for bools doubling up, passes the parse test again, others fail (@substack) +- [2213e2d](https://github.com/bcoe/yargs/commit/2213e2ddc7263226fba717fb041dc3fde9bc2ee4) refactored for an argv getter, failing several tests (@substack) +- [d1e7379](https://github.com/bcoe/yargs/commit/d1e737970f15c6c006bebdd8917706827ff2f0f2) just rescan for now, alias test passes (@substack) +- [b2f8c99](https://github.com/bcoe/yargs/commit/b2f8c99cc477a8eb0fdf4cf178e1785b63185cfd) failing alias test (@substack) +- [d0c0174](https://github.com/bcoe/yargs/commit/d0c0174daa144bfb6dc7290fdc448c393c475e15) .alias() (@substack) +- [d85f431](https://github.com/bcoe/yargs/commit/d85f431ad7d07b058af3f2a57daa51495576c164) [api] Remove `.describe()` in favor of building upon the existing `.usage()` API (@indexzero) +- [edbd527](https://github.com/bcoe/yargs/commit/edbd5272a8e213e71acd802782135c7f9699913a) [doc api] Add `.describe()`, `.options()`, and `.showHelp()` methods along with example. (@indexzero) +- [be4902f](https://github.com/bcoe/yargs/commit/be4902ff0961ae8feb9093f2c0a4066463ded2cf) updates for coffee since it now does argv the node way (@substack) +- [e24cb23](https://github.com/bcoe/yargs/commit/e24cb23798ee64e53b60815e7fda78b87f42390c) more general coffeescript detection (@substack) +- [78ac753](https://github.com/bcoe/yargs/commit/78ac753e5d0ec32a96d39d893272afe989e42a4d) Don't trigger the CoffeeScript hack when running under node_g. (@papandreou) +- [bcfe973](https://github.com/bcoe/yargs/commit/bcfe9731d7f90d4632281b8a52e8d76eb0195ae6) .string() but failing test (@substack) +- [1987aca](https://github.com/bcoe/yargs/commit/1987aca28c7ba4e8796c07bbc547cb984804c826) test hex strings (@substack) +- [ef36db3](https://github.com/bcoe/yargs/commit/ef36db32259b0b0d62448dc907c760e5554fb7e7) more keywords (@substack) +- [cc53c56](https://github.com/bcoe/yargs/commit/cc53c56329960bed6ab077a79798e991711ba01d) Added camelCase function that converts --multi-word-option to camel case (so it becomes argv.multiWordOption). (@papandreou) +- [60b57da](https://github.com/bcoe/yargs/commit/60b57da36797716e5783a633c6d5c79099016d45) fixed boolean bug by rescanning (@substack) +- [dff6d07](https://github.com/bcoe/yargs/commit/dff6d078d97f8ac503c7d18dcc7b7a8c364c2883) boolean examples (@substack) +- [0e380b9](https://github.com/bcoe/yargs/commit/0e380b92c4ef4e3c8dac1da18b5c31d85b1d02c9) boolean() with passing test (@substack) +- [62644d4](https://github.com/bcoe/yargs/commit/62644d4bffbb8d1bbf0c2baf58a1d14a6359ef07) coffee compatibility with node regex for versions too (@substack) +- [430fafc](https://github.com/bcoe/yargs/commit/430fafcf1683d23774772826581acff84b456827) argv._ fixed by fixing the coffee detection (@substack) +- [343b8af](https://github.com/bcoe/yargs/commit/343b8afefd98af274ebe21b5a16b3a949ec5429f) whichNodeArgs test fails too (@substack) +- [63df2f3](https://github.com/bcoe/yargs/commit/63df2f371f31e63d7f1dec2cbf0022a5f08da9d2) replicated mnot's bug in whichNodeEmpty test (@substack) +- [35473a4](https://github.com/bcoe/yargs/commit/35473a4d93a45e5e7e512af8bb54ebb532997ae1) test for ./bin usage (@substack) +- [13df151](https://github.com/bcoe/yargs/commit/13df151e44228eed10e5441c7cd163e086c458a4) don't coerce booleans to numbers (@substack) +- [85f8007](https://github.com/bcoe/yargs/commit/85f8007e93b8be7124feea64b1f1916d8ba1894a) package bump for automatic number conversion (@substack) +- [8f17014](https://github.com/bcoe/yargs/commit/8f170141cded4ccc0c6d67a849c5bf996aa29643) updated readme and examples with new auto-numberification goodness (@substack) +- [73dc901](https://github.com/bcoe/yargs/commit/73dc9011ac968e39b55e19e916084a839391b506) auto number conversion works yay (@substack) +- [bcec56b](https://github.com/bcoe/yargs/commit/bcec56b3d031e018064cbb691539ccc4f28c14ad) failing test for not-implemented auto numification (@substack) +- [ebd2844](https://github.com/bcoe/yargs/commit/ebd2844d683feeac583df79af0e5124a7a7db04e) odd that eql doesn't check types careflly (@substack) +- [fd854b0](https://github.com/bcoe/yargs/commit/fd854b02e512ce854b76386d395672a7969c1bc4) package author + keywords (@substack) +- [656a1d5](https://github.com/bcoe/yargs/commit/656a1d5a1b7c0e49d72e80cb13f20671d56f76c6) updated readme with .default() stuff (@substack) +- [cd7f8c5](https://github.com/bcoe/yargs/commit/cd7f8c55f0b82b79b690d14c5f806851236998a1) passing tests for new .default() behavior (@substack) +- [932725e](https://github.com/bcoe/yargs/commit/932725e39ce65bc91a0385a5fab659a5fa976ac2) new default() thing for setting default key/values (@substack) +- [4e6c7ab](https://github.com/bcoe/yargs/commit/4e6c7aba6374ac9ebc6259ecf91f13af7bce40e3) test for coffee usage (@substack) +- [d54ffcc](https://github.com/bcoe/yargs/commit/d54ffccf2a5a905f51ed5108f7c647f35d64ae23) new --key value style with passing tests. NOTE: changes existing behavior (@substack) +- [ed2a2d5](https://github.com/bcoe/yargs/commit/ed2a2d5d828100ebeef6385c0fb88d146a5cfe9b) package bump for summatix's coffee script fix (@substack) +- [75a975e](https://github.com/bcoe/yargs/commit/75a975eed8430d28e2a79dc9e6d819ad545f4587) Added support for CoffeeScript (@summatix) +- [56b2b1d](https://github.com/bcoe/yargs/commit/56b2b1de8d11f8a2b91979d8ae2d6db02d8fe64d) test coverage for the falsy check() usage (@substack) +- [a4843a9](https://github.com/bcoe/yargs/commit/a4843a9f0e69ffb4afdf6a671d89eb6f218be35d) check bug fixed plus a handy string (@substack) +- [857bd2d](https://github.com/bcoe/yargs/commit/857bd2db933a5aaa9cfecba0ced2dc9b415f8111) tests for demandCount, back up to 100% coverage (@substack) +- [073b776](https://github.com/bcoe/yargs/commit/073b7768ebd781668ef05c13f9003aceca2f5c35) call demandCount from demand (@substack) +- [4bd4b7a](https://github.com/bcoe/yargs/commit/4bd4b7a085c8b6ce1d885a0f486cc9865cee2db1) add demandCount to check for the number of arguments in the _ list (@marshall) +- [b8689ac](https://github.com/bcoe/yargs/commit/b8689ac68dacf248119d242bba39a41cb0adfa07) Rebase checks. That will be its own module eventually. (@substack) +- [e688370](https://github.com/bcoe/yargs/commit/e688370b576f0aa733c3f46183df69e1b561668e) a $0 like in perl (@substack) +- [2e5e196](https://github.com/bcoe/yargs/commit/2e5e1960fc19afb21fb3293752316eaa8bcd3609) usage test hacking around process and console (@substack) +- [fcc3521](https://github.com/bcoe/yargs/commit/fcc352163fbec6a1dfe8caf47a0df39de24fe016) description pun (@substack) +- [87a1fe2](https://github.com/bcoe/yargs/commit/87a1fe29037ca2ca5fefda85141aaeb13e8ce761) mit/x11 license (@substack) +- [8d089d2](https://github.com/bcoe/yargs/commit/8d089d24cd687c0bde3640a96c09b78f884900dd) bool example is more consistent and also shows off short option grouping (@substack) +- [448d747](https://github.com/bcoe/yargs/commit/448d7473ac68e8e03d8befc9457b0d9e21725be0) start of the readme and examples (@substack) +- [da74dea](https://github.com/bcoe/yargs/commit/da74dea799a9b59dbf022cbb8001bfdb0d52eec9) more tests for long and short captures (@substack) +- [ab6387e](https://github.com/bcoe/yargs/commit/ab6387e6769ca4af82ca94c4c67c7319f0d9fcfa) silly bug in the tests with s/not/no/, all tests pass now (@substack) +- [102496a](https://github.com/bcoe/yargs/commit/102496a319e8e06f6550d828fc2f72992c7d9ecc) hack an instance for process.argv onto Argv so the export can be called to create an instance or used for argv, which is the most common case (@substack) +- [a01caeb](https://github.com/bcoe/yargs/commit/a01caeb532546d19f68f2b2b87f7036cfe1aaedd) divide example (@substack) +- [443da55](https://github.com/bcoe/yargs/commit/443da55736acbaf8ff8b04d1b9ce19ab016ddda2) start of the lib with a package.json (@substack) diff --git a/node_modules/yargs/LICENSE b/node_modules/yargs/LICENSE new file mode 100644 index 00000000..747ab114 --- /dev/null +++ b/node_modules/yargs/LICENSE @@ -0,0 +1,22 @@ +Copyright 2010 James Halliday (mail@substack.net) +Modified work Copyright 2014 Contributors (ben@npmjs.com) + +This project is free software released under the MIT/X11 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/yargs/README.md b/node_modules/yargs/README.md new file mode 100644 index 00000000..6b7d0966 --- /dev/null +++ b/node_modules/yargs/README.md @@ -0,0 +1,122 @@ +

+ +

+

Yargs

+

+ Yargs be a node.js library fer hearties tryin' ter parse optstrings +

+
+ +[![Build Status][travis-image]][travis-url] +[![Coverage Status][coveralls-image]][coveralls-url] +[![NPM version][npm-image]][npm-url] +[![js-standard-style][standard-image]][standard-url] +[![Conventional Commits][conventional-commits-image]][conventional-commits-url] +[![Slack][slack-image]][slack-url] + +## Description : +Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. + +It gives you: + +* commands and (grouped) options (`my-program.js serve --port=5000`). +* a dynamically generated help menu based on your arguments. + +> + +* bash-completion shortcuts for commands and options. +* and [tons more](/docs/api.md). + +## Installation + +Stable version: +```bash +npm i yargs +``` + +Bleeding edge version with the most recent features: +```bash +npm i yargs@next +``` + +## Usage : + +### Simple Example + +````javascript +#!/usr/bin/env node +const argv = require('yargs').argv + +if (argv.ships > 3 && argv.distance < 53.5) { + console.log('Plunder more riffiwobbles!') +} else { + console.log('Retreat from the xupptumblers!') +} +```` + +```bash +$ ./plunder.js --ships=4 --distance=22 +Plunder more riffiwobbles! + +$ ./plunder.js --ships 12 --distance 98.7 +Retreat from the xupptumblers! +``` + +### Complex Example + +```javascript +#!/usr/bin/env node +require('yargs') // eslint-disable-line + .command('serve [port]', 'start the server', (yargs) => { + yargs + .positional('port', { + describe: 'port to bind on', + default: 5000 + }) + }, (argv) => { + if (argv.verbose) console.info(`start server on :${argv.port}`) + serve(argv.port) + }) + .option('verbose', { + alias: 'v', + default: false + }) + .argv +``` + +Run the example above with `--help` to see the help for the application. + +## Community : + +Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com). + +## Documentation : + +### Table of Contents + +* [Yargs' API](/docs/api.md) +* [Examples](/docs/examples.md) +* [Parsing Tricks](/docs/tricks.md) + * [Stop the Parser](/docs/tricks.md#stop) + * [Negating Boolean Arguments](/docs/tricks.md#negate) + * [Numbers](/docs/tricks.md#numbers) + * [Arrays](/docs/tricks.md#arrays) + * [Objects](/docs/tricks.md#objects) +* [Advanced Topics](/docs/advanced.md) + * [Composing Your App Using Commands](/docs/advanced.md#commands) + * [Building Configurable CLI Apps](/docs/advanced.md#configuration) + * [Customizing Yargs' Parser](/docs/advanced.md#customizing) +* [Contributing](/contributing.md) + +[travis-url]: https://travis-ci.org/yargs/yargs +[travis-image]: https://img.shields.io/travis/yargs/yargs/master.svg +[coveralls-url]: https://coveralls.io/github/yargs/yargs +[coveralls-image]: https://img.shields.io/coveralls/yargs/yargs.svg +[npm-url]: https://www.npmjs.com/package/yargs +[npm-image]: https://img.shields.io/npm/v/yargs.svg +[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg +[standard-url]: http://standardjs.com/ +[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg +[conventional-commits-url]: https://conventionalcommits.org/ +[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg +[slack-url]: http://devtoolscommunity.herokuapp.com diff --git a/node_modules/yargs/index.js b/node_modules/yargs/index.js new file mode 100644 index 00000000..dfed54bc --- /dev/null +++ b/node_modules/yargs/index.js @@ -0,0 +1,32 @@ +'use strict' +// classic singleton yargs API, to use yargs +// without running as a singleton do: +// require('yargs/yargs')(process.argv.slice(2)) +const yargs = require('./yargs') + +Argv(process.argv.slice(2)) + +module.exports = Argv + +function Argv (processArgs, cwd) { + const argv = yargs(processArgs, cwd, require) + singletonify(argv) + return argv +} + +/* Hack an instance of Argv with process.argv into Argv + so people can do + require('yargs')(['--beeble=1','-z','zizzle']).argv + to parse a list of args and + require('yargs').argv + to get a parsed version of process.argv. +*/ +function singletonify (inst) { + Object.keys(inst).forEach((key) => { + if (key === 'argv') { + Argv.__defineGetter__(key, inst.__lookupGetter__(key)) + } else { + Argv[key] = typeof inst[key] === 'function' ? inst[key].bind(inst) : inst[key] + } + }) +} diff --git a/node_modules/yargs/lib/apply-extends.js b/node_modules/yargs/lib/apply-extends.js new file mode 100644 index 00000000..1436b650 --- /dev/null +++ b/node_modules/yargs/lib/apply-extends.js @@ -0,0 +1,53 @@ + +'use strict' +const fs = require('fs') +const path = require('path') +const YError = require('./yerror') + +let previouslyVisitedConfigs = [] + +function checkForCircularExtends (cfgPath) { + if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) { + throw new YError(`Circular extended configurations: '${cfgPath}'.`) + } +} + +function getPathToDefaultConfig (cwd, pathToExtend) { + return path.resolve(cwd, pathToExtend) +} + +function applyExtends (config, cwd) { + let defaultConfig = {} + + if (config.hasOwnProperty('extends')) { + if (typeof config.extends !== 'string') return defaultConfig + const isPath = /\.json|\..*rc$/.test(config.extends) + let pathToDefault = null + if (!isPath) { + try { + pathToDefault = require.resolve(config.extends) + } catch (err) { + // most likely this simply isn't a module. + } + } else { + pathToDefault = getPathToDefaultConfig(cwd, config.extends) + } + // maybe the module uses key for some other reason, + // err on side of caution. + if (!pathToDefault && !isPath) return config + + checkForCircularExtends(pathToDefault) + + previouslyVisitedConfigs.push(pathToDefault) + + defaultConfig = isPath ? JSON.parse(fs.readFileSync(pathToDefault, 'utf8')) : require(config.extends) + delete config.extends + defaultConfig = applyExtends(defaultConfig, path.dirname(pathToDefault)) + } + + previouslyVisitedConfigs = [] + + return Object.assign({}, defaultConfig, config) +} + +module.exports = applyExtends diff --git a/node_modules/yargs/lib/argsert.js b/node_modules/yargs/lib/argsert.js new file mode 100644 index 00000000..f310b4e7 --- /dev/null +++ b/node_modules/yargs/lib/argsert.js @@ -0,0 +1,68 @@ +'use strict' + +// hoisted due to circular dependency on command. +module.exports = argsert +const command = require('./command')() +const YError = require('./yerror') + +const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth'] +function argsert (expected, callerArguments, length) { + // TODO: should this eventually raise an exception. + try { + // preface the argument description with "cmd", so + // that we can run it through yargs' command parser. + let position = 0 + let parsed = { demanded: [], optional: [] } + if (typeof expected === 'object') { + length = callerArguments + callerArguments = expected + } else { + parsed = command.parseCommand(`cmd ${expected}`) + } + const args = [].slice.call(callerArguments) + + while (args.length && args[args.length - 1] === undefined) args.pop() + length = length || args.length + + if (length < parsed.demanded.length) { + throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`) + } + + const totalCommands = parsed.demanded.length + parsed.optional.length + if (length > totalCommands) { + throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`) + } + + parsed.demanded.forEach((demanded) => { + const arg = args.shift() + const observedType = guessType(arg) + const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*') + if (matchingTypes.length === 0) argumentTypeError(observedType, demanded.cmd, position, false) + position += 1 + }) + + parsed.optional.forEach((optional) => { + if (args.length === 0) return + const arg = args.shift() + const observedType = guessType(arg) + const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*') + if (matchingTypes.length === 0) argumentTypeError(observedType, optional.cmd, position, true) + position += 1 + }) + } catch (err) { + console.warn(err.stack) + } +} + +function guessType (arg) { + if (Array.isArray(arg)) { + return 'array' + } else if (arg === null) { + return 'null' + } + return typeof arg +} + +function argumentTypeError (observedType, allowedTypes, position, optional) { + throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`) +} diff --git a/node_modules/yargs/lib/command.js b/node_modules/yargs/lib/command.js new file mode 100644 index 00000000..895423a2 --- /dev/null +++ b/node_modules/yargs/lib/command.js @@ -0,0 +1,437 @@ +'use strict' + +const inspect = require('util').inspect +const isPromise = require('./is-promise') +const { applyMiddleware, commandMiddlewareFactory } = require('./middleware') +const path = require('path') +const Parser = require('yargs-parser') + +const DEFAULT_MARKER = /(^\*)|(^\$0)/ + +// handles parsing positional arguments, +// and populating argv with said positional +// arguments. +module.exports = function command (yargs, usage, validation, globalMiddleware) { + const self = {} + let handlers = {} + let aliasMap = {} + let defaultCommand + globalMiddleware = globalMiddleware || [] + + self.addHandler = function addHandler (cmd, description, builder, handler, commandMiddleware) { + let aliases = [] + const middlewares = commandMiddlewareFactory(commandMiddleware) + handler = handler || (() => {}) + + if (Array.isArray(cmd)) { + aliases = cmd.slice(1) + cmd = cmd[0] + } else if (typeof cmd === 'object') { + let command = (Array.isArray(cmd.command) || typeof cmd.command === 'string') ? cmd.command : moduleName(cmd) + if (cmd.aliases) command = [].concat(command).concat(cmd.aliases) + self.addHandler(command, extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares) + return + } + + // allow a module to be provided instead of separate builder and handler + if (typeof builder === 'object' && builder.builder && typeof builder.handler === 'function') { + self.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares) + return + } + + // parse positionals out of cmd string + const parsedCommand = self.parseCommand(cmd) + + // remove positional args from aliases only + aliases = aliases.map(alias => self.parseCommand(alias).cmd) + + // check for default and filter out '*'' + let isDefault = false + const parsedAliases = [parsedCommand.cmd].concat(aliases).filter((c) => { + if (DEFAULT_MARKER.test(c)) { + isDefault = true + return false + } + return true + }) + + // standardize on $0 for default command. + if (parsedAliases.length === 0 && isDefault) parsedAliases.push('$0') + + // shift cmd and aliases after filtering out '*' + if (isDefault) { + parsedCommand.cmd = parsedAliases[0] + aliases = parsedAliases.slice(1) + cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd) + } + + // populate aliasMap + aliases.forEach((alias) => { + aliasMap[alias] = parsedCommand.cmd + }) + + if (description !== false) { + usage.command(cmd, description, isDefault, aliases) + } + + handlers[parsedCommand.cmd] = { + original: cmd, + description: description, + handler, + builder: builder || {}, + middlewares: middlewares || [], + demanded: parsedCommand.demanded, + optional: parsedCommand.optional + } + + if (isDefault) defaultCommand = handlers[parsedCommand.cmd] + } + + self.addDirectory = function addDirectory (dir, context, req, callerFile, opts) { + opts = opts || {} + // disable recursion to support nested directories of subcommands + if (typeof opts.recurse !== 'boolean') opts.recurse = false + // exclude 'json', 'coffee' from require-directory defaults + if (!Array.isArray(opts.extensions)) opts.extensions = ['js'] + // allow consumer to define their own visitor function + const parentVisit = typeof opts.visit === 'function' ? opts.visit : o => o + // call addHandler via visitor function + opts.visit = function visit (obj, joined, filename) { + const visited = parentVisit(obj, joined, filename) + // allow consumer to skip modules with their own visitor + if (visited) { + // check for cyclic reference + // each command file path should only be seen once per execution + if (~context.files.indexOf(joined)) return visited + // keep track of visited files in context.files + context.files.push(joined) + self.addHandler(visited) + } + return visited + } + require('require-directory')({ require: req, filename: callerFile }, dir, opts) + } + + // lookup module object from require()d command and derive name + // if module was not require()d and no name given, throw error + function moduleName (obj) { + const mod = require('which-module')(obj) + if (!mod) throw new Error(`No command name given for module: ${inspect(obj)}`) + return commandFromFilename(mod.filename) + } + + // derive command name from filename + function commandFromFilename (filename) { + return path.basename(filename, path.extname(filename)) + } + + function extractDesc (obj) { + for (let keys = ['describe', 'description', 'desc'], i = 0, l = keys.length, test; i < l; i++) { + test = obj[keys[i]] + if (typeof test === 'string' || typeof test === 'boolean') return test + } + return false + } + + self.parseCommand = function parseCommand (cmd) { + const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' ') + const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/) + const bregex = /\.*[\][<>]/g + const parsedCommand = { + cmd: (splitCommand.shift()).replace(bregex, ''), + demanded: [], + optional: [] + } + splitCommand.forEach((cmd, i) => { + let variadic = false + cmd = cmd.replace(/\s/g, '') + if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1) variadic = true + if (/^\[/.test(cmd)) { + parsedCommand.optional.push({ + cmd: cmd.replace(bregex, '').split('|'), + variadic + }) + } else { + parsedCommand.demanded.push({ + cmd: cmd.replace(bregex, '').split('|'), + variadic + }) + } + }) + return parsedCommand + } + + self.getCommands = () => Object.keys(handlers).concat(Object.keys(aliasMap)) + + self.getCommandHandlers = () => handlers + + self.hasDefaultCommand = () => !!defaultCommand + + self.runCommand = function runCommand (command, yargs, parsed, commandIndex) { + let aliases = parsed.aliases + const commandHandler = handlers[command] || handlers[aliasMap[command]] || defaultCommand + const currentContext = yargs.getContext() + let numFiles = currentContext.files.length + const parentCommands = currentContext.commands.slice() + + // what does yargs look like after the buidler is run? + let innerArgv = parsed.argv + let innerYargs = null + let positionalMap = {} + if (command) { + currentContext.commands.push(command) + currentContext.fullCommands.push(commandHandler.original) + } + if (typeof commandHandler.builder === 'function') { + // a function can be provided, which builds + // up a yargs chain and possibly returns it. + innerYargs = commandHandler.builder(yargs.reset(parsed.aliases)) + // if the builder function did not yet parse argv with reset yargs + // and did not explicitly set a usage() string, then apply the + // original command string as usage() for consistent behavior with + // options object below. + if (yargs.parsed === false) { + if (shouldUpdateUsage(yargs)) { + yargs.getUsageInstance().usage( + usageFromParentCommandsCommandHandler(parentCommands, commandHandler), + commandHandler.description + ) + } + innerArgv = innerYargs ? innerYargs._parseArgs(null, null, true, commandIndex) : yargs._parseArgs(null, null, true, commandIndex) + } else { + innerArgv = yargs.parsed.argv + } + + if (innerYargs && yargs.parsed === false) aliases = innerYargs.parsed.aliases + else aliases = yargs.parsed.aliases + } else if (typeof commandHandler.builder === 'object') { + // as a short hand, an object can instead be provided, specifying + // the options that a command takes. + innerYargs = yargs.reset(parsed.aliases) + if (shouldUpdateUsage(innerYargs)) { + innerYargs.getUsageInstance().usage( + usageFromParentCommandsCommandHandler(parentCommands, commandHandler), + commandHandler.description + ) + } + Object.keys(commandHandler.builder).forEach((key) => { + innerYargs.option(key, commandHandler.builder[key]) + }) + innerArgv = innerYargs._parseArgs(null, null, true, commandIndex) + aliases = innerYargs.parsed.aliases + } + + if (!yargs._hasOutput()) { + positionalMap = populatePositionals(commandHandler, innerArgv, currentContext, yargs) + } + + const middlewares = globalMiddleware.slice(0).concat(commandHandler.middlewares || []) + applyMiddleware(innerArgv, yargs, middlewares, true) + + // we apply validation post-hoc, so that custom + // checks get passed populated positional arguments. + if (!yargs._hasOutput()) yargs._runValidation(innerArgv, aliases, positionalMap, yargs.parsed.error) + + if (commandHandler.handler && !yargs._hasOutput()) { + yargs._setHasOutput() + + innerArgv = applyMiddleware(innerArgv, yargs, middlewares, false) + + const handlerResult = isPromise(innerArgv) + ? innerArgv.then(argv => commandHandler.handler(argv)) + : commandHandler.handler(innerArgv) + + if (isPromise(handlerResult)) { + handlerResult.catch(error => + yargs.getUsageInstance().fail(null, error) + ) + } + } + + if (command) { + currentContext.commands.pop() + currentContext.fullCommands.pop() + } + numFiles = currentContext.files.length - numFiles + if (numFiles > 0) currentContext.files.splice(numFiles * -1, numFiles) + + return innerArgv + } + + function shouldUpdateUsage (yargs) { + return !yargs.getUsageInstance().getUsageDisabled() && + yargs.getUsageInstance().getUsage().length === 0 + } + + function usageFromParentCommandsCommandHandler (parentCommands, commandHandler) { + const c = DEFAULT_MARKER.test(commandHandler.original) ? commandHandler.original.replace(DEFAULT_MARKER, '').trim() : commandHandler.original + const pc = parentCommands.filter((c) => { return !DEFAULT_MARKER.test(c) }) + pc.push(c) + return `$0 ${pc.join(' ')}` + } + + self.runDefaultBuilderOn = function (yargs) { + if (shouldUpdateUsage(yargs)) { + // build the root-level command string from the default string. + const commandString = DEFAULT_MARKER.test(defaultCommand.original) + ? defaultCommand.original : defaultCommand.original.replace(/^[^[\]<>]*/, '$0 ') + yargs.getUsageInstance().usage( + commandString, + defaultCommand.description + ) + } + const builder = defaultCommand.builder + if (typeof builder === 'function') { + builder(yargs) + } else { + Object.keys(builder).forEach((key) => { + yargs.option(key, builder[key]) + }) + } + } + + // transcribe all positional arguments "command [apple]" + // onto argv. + function populatePositionals (commandHandler, argv, context, yargs) { + argv._ = argv._.slice(context.commands.length) // nuke the current commands + const demanded = commandHandler.demanded.slice(0) + const optional = commandHandler.optional.slice(0) + const positionalMap = {} + + validation.positionalCount(demanded.length, argv._.length) + + while (demanded.length) { + const demand = demanded.shift() + populatePositional(demand, argv, positionalMap) + } + + while (optional.length) { + const maybe = optional.shift() + populatePositional(maybe, argv, positionalMap) + } + + argv._ = context.commands.concat(argv._) + + postProcessPositionals(argv, positionalMap, self.cmdToParseOptions(commandHandler.original)) + + return positionalMap + } + + function populatePositional (positional, argv, positionalMap, parseOptions) { + const cmd = positional.cmd[0] + if (positional.variadic) { + positionalMap[cmd] = argv._.splice(0).map(String) + } else { + if (argv._.length) positionalMap[cmd] = [String(argv._.shift())] + } + } + + // we run yargs-parser against the positional arguments + // applying the same parsing logic used for flags. + function postProcessPositionals (argv, positionalMap, parseOptions) { + // combine the parsing hints we've inferred from the command + // string with explicitly configured parsing hints. + const options = Object.assign({}, yargs.getOptions()) + options.default = Object.assign(parseOptions.default, options.default) + options.alias = Object.assign(parseOptions.alias, options.alias) + options.array = options.array.concat(parseOptions.array) + delete options.config // don't load config when processing positionals. + + const unparsed = [] + Object.keys(positionalMap).forEach((key) => { + positionalMap[key].map((value) => { + unparsed.push(`--${key}`) + unparsed.push(value) + }) + }) + + // short-circuit parse. + if (!unparsed.length) return + + const parsed = Parser.detailed(unparsed, options) + + if (parsed.error) { + yargs.getUsageInstance().fail(parsed.error.message, parsed.error) + } else { + // only copy over positional keys (don't overwrite + // flag arguments that were already parsed). + const positionalKeys = Object.keys(positionalMap) + Object.keys(positionalMap).forEach((key) => { + [].push.apply(positionalKeys, parsed.aliases[key]) + }) + + Object.keys(parsed.argv).forEach((key) => { + if (positionalKeys.indexOf(key) !== -1) { + // any new aliases need to be placed in positionalMap, which + // is used for validation. + if (!positionalMap[key]) positionalMap[key] = parsed.argv[key] + argv[key] = parsed.argv[key] + } + }) + } + } + + self.cmdToParseOptions = function (cmdString) { + const parseOptions = { + array: [], + default: {}, + alias: {}, + demand: {} + } + + const parsed = self.parseCommand(cmdString) + parsed.demanded.forEach((d) => { + const cmds = d.cmd.slice(0) + const cmd = cmds.shift() + if (d.variadic) { + parseOptions.array.push(cmd) + parseOptions.default[cmd] = [] + } + cmds.forEach((c) => { + parseOptions.alias[cmd] = c + }) + parseOptions.demand[cmd] = true + }) + + parsed.optional.forEach((o) => { + const cmds = o.cmd.slice(0) + const cmd = cmds.shift() + if (o.variadic) { + parseOptions.array.push(cmd) + parseOptions.default[cmd] = [] + } + cmds.forEach((c) => { + parseOptions.alias[cmd] = c + }) + }) + + return parseOptions + } + + self.reset = () => { + handlers = {} + aliasMap = {} + defaultCommand = undefined + return self + } + + // used by yargs.parse() to freeze + // the state of commands such that + // we can apply .parse() multiple times + // with the same yargs instance. + let frozen + self.freeze = () => { + frozen = {} + frozen.handlers = handlers + frozen.aliasMap = aliasMap + frozen.defaultCommand = defaultCommand + } + self.unfreeze = () => { + handlers = frozen.handlers + aliasMap = frozen.aliasMap + defaultCommand = frozen.defaultCommand + frozen = undefined + } + + return self +} diff --git a/node_modules/yargs/lib/completion-templates.js b/node_modules/yargs/lib/completion-templates.js new file mode 100644 index 00000000..43714fb6 --- /dev/null +++ b/node_modules/yargs/lib/completion-templates.js @@ -0,0 +1,49 @@ +exports.completionShTemplate = +`###-begin-{{app_name}}-completions-### +# +# yargs command completion script +# +# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc +# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX. +# +_yargs_completions() +{ + local cur_word args type_list + + cur_word="\${COMP_WORDS[COMP_CWORD]}" + args=("\${COMP_WORDS[@]}") + + # ask yargs to generate completions. + type_list=$({{app_path}} --get-yargs-completions "\${args[@]}") + + COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) ) + + # if no match was found, fall back to filename completion + if [ \${#COMPREPLY[@]} -eq 0 ]; then + COMPREPLY=() + fi + + return 0 +} +complete -o default -F _yargs_completions {{app_name}} +###-end-{{app_name}}-completions-### +` + +exports.completionZshTemplate = `###-begin-{{app_name}}-completions-### +# +# yargs command completion script +# +# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc +# or {{app_path}} {{completion_command}} >> ~/.zsh_profile on OSX. +# +_{{app_name}}_yargs_completions() +{ + local reply + local si=$IFS + IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) + IFS=$si + _describe 'values' reply +} +compdef _{{app_name}}_yargs_completions {{app_name}} +###-end-{{app_name}}-completions-### +` diff --git a/node_modules/yargs/lib/completion.js b/node_modules/yargs/lib/completion.js new file mode 100644 index 00000000..e5cdd588 --- /dev/null +++ b/node_modules/yargs/lib/completion.js @@ -0,0 +1,115 @@ +'use strict' +const path = require('path') + +// add bash completions to your +// yargs-powered applications. +module.exports = function completion (yargs, usage, command) { + const self = { + completionKey: 'get-yargs-completions' + } + + const zshShell = process.env.SHELL && process.env.SHELL.indexOf('zsh') !== -1 + // get a list of completion commands. + // 'args' is the array of strings from the line to be completed + self.getCompletion = function getCompletion (args, done) { + const completions = [] + const current = args.length ? args[args.length - 1] : '' + const argv = yargs.parse(args, true) + const aliases = yargs.parsed.aliases + const parentCommands = yargs.getContext().commands + + // a custom completion function can be provided + // to completion(). + if (completionFunction) { + if (completionFunction.length < 3) { + const result = completionFunction(current, argv) + + // promise based completion function. + if (typeof result.then === 'function') { + return result.then((list) => { + process.nextTick(() => { done(list) }) + }).catch((err) => { + process.nextTick(() => { throw err }) + }) + } + + // synchronous completion function. + return done(result) + } else { + // asynchronous completion function + return completionFunction(current, argv, (completions) => { + done(completions) + }) + } + } + + const handlers = command.getCommandHandlers() + for (let i = 0, ii = args.length; i < ii; ++i) { + if (handlers[args[i]] && handlers[args[i]].builder) { + const builder = handlers[args[i]].builder + if (typeof builder === 'function') { + const y = yargs.reset() + builder(y) + return y.argv + } + } + } + + if (!current.match(/^-/) && parentCommands[parentCommands.length - 1] !== current) { + usage.getCommands().forEach((usageCommand) => { + const commandName = command.parseCommand(usageCommand[0]).cmd + if (args.indexOf(commandName) === -1) { + if (!zshShell) { + completions.push(commandName) + } else { + const desc = usageCommand[1] || '' + completions.push(commandName.replace(/:/g, '\\:') + ':' + desc) + } + } + }) + } + + if (current.match(/^-/) || (current === '' && completions.length === 0)) { + const descs = usage.getDescriptions() + Object.keys(yargs.getOptions().key).forEach((key) => { + // If the key and its aliases aren't in 'args', add the key to 'completions' + const keyAndAliases = [key].concat(aliases[key] || []) + const notInArgs = keyAndAliases.every(val => args.indexOf(`--${val}`) === -1) + if (notInArgs) { + if (!zshShell) { + completions.push(`--${key}`) + } else { + const desc = descs[key] || '' + completions.push(`--${key.replace(/:/g, '\\:')}:${desc.replace('__yargsString__:', '')}`) + } + } + }) + } + + done(completions) + } + + // generate the completion script to add to your .bashrc. + self.generateCompletionScript = function generateCompletionScript ($0, cmd) { + const templates = require('./completion-templates') + let script = zshShell ? templates.completionZshTemplate : templates.completionShTemplate + const name = path.basename($0) + + // add ./to applications not yet installed as bin. + if ($0.match(/\.js$/)) $0 = `./${$0}` + + script = script.replace(/{{app_name}}/g, name) + script = script.replace(/{{completion_command}}/g, cmd) + return script.replace(/{{app_path}}/g, $0) + } + + // register a function to perform your own custom + // completions., this function can be either + // synchrnous or asynchronous. + let completionFunction = null + self.registerFunction = (fn) => { + completionFunction = fn + } + + return self +} diff --git a/node_modules/yargs/lib/decamelize.js b/node_modules/yargs/lib/decamelize.js new file mode 100644 index 00000000..c3a41515 --- /dev/null +++ b/node_modules/yargs/lib/decamelize.js @@ -0,0 +1,32 @@ +/* +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. +*/ +'use strict' + +module.exports = (text, separator) => { + separator = typeof separator === 'undefined' ? '_' : separator + + return text + .replace(/([a-z\d])([A-Z])/g, `$1${separator}$2`) + .replace(/([A-Z]+)([A-Z][a-z\d]+)/g, `$1${separator}$2`) + .toLowerCase() +} diff --git a/node_modules/yargs/lib/is-promise.js b/node_modules/yargs/lib/is-promise.js new file mode 100644 index 00000000..0516defa --- /dev/null +++ b/node_modules/yargs/lib/is-promise.js @@ -0,0 +1,3 @@ +module.exports = function isPromise (maybePromise) { + return maybePromise instanceof Promise +} diff --git a/node_modules/yargs/lib/levenshtein.js b/node_modules/yargs/lib/levenshtein.js new file mode 100644 index 00000000..c66c1bab --- /dev/null +++ b/node_modules/yargs/lib/levenshtein.js @@ -0,0 +1,58 @@ +/* +Copyright (c) 2011 Andrei Mackenzie + +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. +*/ + +// levenshtein distance algorithm, pulled from Andrei Mackenzie's MIT licensed. +// gist, which can be found here: https://gist.github.com/andrei-m/982927 +'use strict' +// Compute the edit distance between the two given strings +module.exports = function levenshtein (a, b) { + if (a.length === 0) return b.length + if (b.length === 0) return a.length + + const matrix = [] + + // increment along the first column of each row + let i + for (i = 0; i <= b.length; i++) { + matrix[i] = [i] + } + + // increment each column in the first row + let j + for (j = 0; j <= a.length; j++) { + matrix[0][j] = j + } + + // Fill in the rest of the matrix + for (i = 1; i <= b.length; i++) { + for (j = 1; j <= a.length; j++) { + if (b.charAt(i - 1) === a.charAt(j - 1)) { + matrix[i][j] = matrix[i - 1][j - 1] + } else { + matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution + Math.min(matrix[i][j - 1] + 1, // insertion + matrix[i - 1][j] + 1)) // deletion + } + } + } + + return matrix[b.length][a.length] +} diff --git a/node_modules/yargs/lib/middleware.js b/node_modules/yargs/lib/middleware.js new file mode 100644 index 00000000..9f9c1969 --- /dev/null +++ b/node_modules/yargs/lib/middleware.js @@ -0,0 +1,65 @@ +'use strict' + +// hoisted due to circular dependency on command. +module.exports = { + applyMiddleware, + commandMiddlewareFactory, + globalMiddlewareFactory +} +const isPromise = require('./is-promise') +const argsert = require('./argsert') + +function globalMiddlewareFactory (globalMiddleware, context) { + return function (callback, applyBeforeValidation = false) { + argsert(' [boolean]', [callback, applyBeforeValidation], arguments.length) + if (Array.isArray(callback)) { + for (let i = 0; i < callback.length; i++) { + if (typeof callback[i] !== 'function') { + throw Error('middleware must be a function') + } + callback[i].applyBeforeValidation = applyBeforeValidation + } + Array.prototype.push.apply(globalMiddleware, callback) + } else if (typeof callback === 'function') { + callback.applyBeforeValidation = applyBeforeValidation + globalMiddleware.push(callback) + } + return context + } +} + +function commandMiddlewareFactory (commandMiddleware) { + if (!commandMiddleware) return [] + return commandMiddleware.map(middleware => { + middleware.applyBeforeValidation = false + return middleware + }) +} + +function applyMiddleware (argv, yargs, middlewares, beforeValidation) { + const beforeValidationError = new Error('middleware cannot return a promise when applyBeforeValidation is true') + return middlewares + .reduce((accumulation, middleware) => { + if (middleware.applyBeforeValidation !== beforeValidation && + !isPromise(accumulation)) { + return accumulation + } + + if (isPromise(accumulation)) { + return accumulation + .then(initialObj => + Promise.all([initialObj, middleware(initialObj, yargs)]) + ) + .then(([initialObj, middlewareObj]) => + Object.assign(initialObj, middlewareObj) + ) + } else { + const result = middleware(argv, yargs) + if (beforeValidation && isPromise(result)) throw beforeValidationError + + return isPromise(result) + ? result.then(middlewareObj => Object.assign(accumulation, middlewareObj)) + : Object.assign(accumulation, result) + } + }, argv) +} diff --git a/node_modules/yargs/lib/obj-filter.js b/node_modules/yargs/lib/obj-filter.js new file mode 100644 index 00000000..c344ac58 --- /dev/null +++ b/node_modules/yargs/lib/obj-filter.js @@ -0,0 +1,11 @@ +'use strict' +module.exports = function objFilter (original, filter) { + const obj = {} + filter = filter || ((k, v) => true) + Object.keys(original || {}).forEach((key) => { + if (filter(key, original[key])) { + obj[key] = original[key] + } + }) + return obj +} diff --git a/node_modules/yargs/lib/usage.js b/node_modules/yargs/lib/usage.js new file mode 100644 index 00000000..8c3b068f --- /dev/null +++ b/node_modules/yargs/lib/usage.js @@ -0,0 +1,540 @@ +'use strict' +// this file handles outputting usage instructions, +// failures, etc. keeps logging in one place. +const decamelize = require('./decamelize') +const stringWidth = require('string-width') +const objFilter = require('./obj-filter') +const path = require('path') +const setBlocking = require('set-blocking') +const YError = require('./yerror') + +module.exports = function usage (yargs, y18n) { + const __ = y18n.__ + const self = {} + + // methods for ouputting/building failure message. + const fails = [] + self.failFn = function failFn (f) { + fails.push(f) + } + + let failMessage = null + let showHelpOnFail = true + self.showHelpOnFail = function showHelpOnFailFn (enabled, message) { + if (typeof enabled === 'string') { + message = enabled + enabled = true + } else if (typeof enabled === 'undefined') { + enabled = true + } + failMessage = message + showHelpOnFail = enabled + return self + } + + let failureOutput = false + self.fail = function fail (msg, err) { + const logger = yargs._getLoggerInstance() + + if (fails.length) { + for (let i = fails.length - 1; i >= 0; --i) { + fails[i](msg, err, self) + } + } else { + if (yargs.getExitProcess()) setBlocking(true) + + // don't output failure message more than once + if (!failureOutput) { + failureOutput = true + if (showHelpOnFail) { + yargs.showHelp('error') + logger.error() + } + if (msg || err) logger.error(msg || err) + if (failMessage) { + if (msg || err) logger.error('') + logger.error(failMessage) + } + } + + err = err || new YError(msg) + if (yargs.getExitProcess()) { + return yargs.exit(1) + } else if (yargs._hasParseCallback()) { + return yargs.exit(1, err) + } else { + throw err + } + } + } + + // methods for ouputting/building help (usage) message. + let usages = [] + let usageDisabled = false + self.usage = (msg, description) => { + if (msg === null) { + usageDisabled = true + usages = [] + return + } + usageDisabled = false + usages.push([msg, description || '']) + return self + } + self.getUsage = () => { + return usages + } + self.getUsageDisabled = () => { + return usageDisabled + } + + self.getPositionalGroupName = () => { + return __('Positionals:') + } + + let examples = [] + self.example = (cmd, description) => { + examples.push([cmd, description || '']) + } + + let commands = [] + self.command = function command (cmd, description, isDefault, aliases) { + // the last default wins, so cancel out any previously set default + if (isDefault) { + commands = commands.map((cmdArray) => { + cmdArray[2] = false + return cmdArray + }) + } + commands.push([cmd, description || '', isDefault, aliases]) + } + self.getCommands = () => commands + + let descriptions = {} + self.describe = function describe (key, desc) { + if (typeof key === 'object') { + Object.keys(key).forEach((k) => { + self.describe(k, key[k]) + }) + } else { + descriptions[key] = desc + } + } + self.getDescriptions = () => descriptions + + let epilog + self.epilog = (msg) => { + epilog = msg + } + + let wrapSet = false + let wrap + self.wrap = (cols) => { + wrapSet = true + wrap = cols + } + + function getWrap () { + if (!wrapSet) { + wrap = windowWidth() + wrapSet = true + } + + return wrap + } + + const deferY18nLookupPrefix = '__yargsString__:' + self.deferY18nLookup = str => deferY18nLookupPrefix + str + + const defaultGroup = 'Options:' + self.help = function help () { + normalizeAliases() + + // handle old demanded API + const base$0 = path.basename(yargs.$0) + const demandedOptions = yargs.getDemandedOptions() + const demandedCommands = yargs.getDemandedCommands() + const groups = yargs.getGroups() + const options = yargs.getOptions() + + let keys = [] + keys = keys.concat(Object.keys(descriptions)) + keys = keys.concat(Object.keys(demandedOptions)) + keys = keys.concat(Object.keys(demandedCommands)) + keys = keys.concat(Object.keys(options.default)) + keys = keys.filter(filterHiddenOptions) + keys = Object.keys(keys.reduce((acc, key) => { + if (key !== '_') acc[key] = true + return acc + }, {})) + + const theWrap = getWrap() + const ui = require('cliui')({ + width: theWrap, + wrap: !!theWrap + }) + + // the usage string. + if (!usageDisabled) { + if (usages.length) { + // user-defined usage. + usages.forEach((usage) => { + ui.div(`${usage[0].replace(/\$0/g, base$0)}`) + if (usage[1]) { + ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] }) + } + }) + ui.div() + } else if (commands.length) { + let u = null + // demonstrate how commands are used. + if (demandedCommands._) { + u = `${base$0} <${__('command')}>\n` + } else { + u = `${base$0} [${__('command')}]\n` + } + ui.div(`${u}`) + } + } + + // your application's commands, i.e., non-option + // arguments populated in '_'. + if (commands.length) { + ui.div(__('Commands:')) + + const context = yargs.getContext() + const parentCommands = context.commands.length ? `${context.commands.join(' ')} ` : '' + + if (yargs.getParserConfiguration()['sort-commands'] === true) { + commands = commands.sort((a, b) => a[0].localeCompare(b[0])) + } + + commands.forEach((command) => { + const commandString = `${base$0} ${parentCommands}${command[0].replace(/^\$0 ?/, '')}` // drop $0 from default commands. + ui.span( + { + text: commandString, + padding: [0, 2, 0, 2], + width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4 + }, + { text: command[1] } + ) + const hints = [] + if (command[2]) hints.push(`[${__('default:').slice(0, -1)}]`) // TODO hacking around i18n here + if (command[3] && command[3].length) { + hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`) + } + if (hints.length) { + ui.div({ text: hints.join(' '), padding: [0, 0, 0, 2], align: 'right' }) + } else { + ui.div() + } + }) + + ui.div() + } + + // perform some cleanup on the keys array, making it + // only include top-level keys not their aliases. + const aliasKeys = (Object.keys(options.alias) || []) + .concat(Object.keys(yargs.parsed.newAliases) || []) + + keys = keys.filter(key => !yargs.parsed.newAliases[key] && aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1)) + + // populate 'Options:' group with any keys that have not + // explicitly had a group set. + if (!groups[defaultGroup]) groups[defaultGroup] = [] + addUngroupedKeys(keys, options.alias, groups) + + // display 'Options:' table along with any custom tables: + Object.keys(groups).forEach((groupName) => { + if (!groups[groupName].length) return + + // if we've grouped the key 'f', but 'f' aliases 'foobar', + // normalizedKeys should contain only 'foobar'. + const normalizedKeys = groups[groupName].filter(filterHiddenOptions).map((key) => { + if (~aliasKeys.indexOf(key)) return key + for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) { + if (~(options.alias[aliasKey] || []).indexOf(key)) return aliasKey + } + return key + }) + + if (normalizedKeys.length < 1) return + + ui.div(__(groupName)) + + // actually generate the switches string --foo, -f, --bar. + const switches = normalizedKeys.reduce((acc, key) => { + acc[key] = [ key ].concat(options.alias[key] || []) + .map(sw => { + // for the special positional group don't + // add '--' or '-' prefix. + if (groupName === self.getPositionalGroupName()) return sw + else return (sw.length > 1 ? '--' : '-') + sw + }) + .join(', ') + + return acc + }, {}) + + normalizedKeys.forEach((key) => { + const kswitch = switches[key] + let desc = descriptions[key] || '' + let type = null + + if (~desc.lastIndexOf(deferY18nLookupPrefix)) desc = __(desc.substring(deferY18nLookupPrefix.length)) + + if (~options.boolean.indexOf(key)) type = `[${__('boolean')}]` + if (~options.count.indexOf(key)) type = `[${__('count')}]` + if (~options.string.indexOf(key)) type = `[${__('string')}]` + if (~options.normalize.indexOf(key)) type = `[${__('string')}]` + if (~options.array.indexOf(key)) type = `[${__('array')}]` + if (~options.number.indexOf(key)) type = `[${__('number')}]` + + const extra = [ + type, + (key in demandedOptions) ? `[${__('required')}]` : null, + options.choices && options.choices[key] ? `[${__('choices:')} ${ + self.stringifiedValues(options.choices[key])}]` : null, + defaultString(options.default[key], options.defaultDescription[key]) + ].filter(Boolean).join(' ') + + ui.span( + { text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches, theWrap) + 4 }, + desc + ) + + if (extra) ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' }) + else ui.div() + }) + + ui.div() + }) + + // describe some common use-cases for your application. + if (examples.length) { + ui.div(__('Examples:')) + + examples.forEach((example) => { + example[0] = example[0].replace(/\$0/g, base$0) + }) + + examples.forEach((example) => { + if (example[1] === '') { + ui.div( + { + text: example[0], + padding: [0, 2, 0, 2] + } + ) + } else { + ui.div( + { + text: example[0], + padding: [0, 2, 0, 2], + width: maxWidth(examples, theWrap) + 4 + }, { + text: example[1] + } + ) + } + }) + + ui.div() + } + + // the usage string. + if (epilog) { + const e = epilog.replace(/\$0/g, base$0) + ui.div(`${e}\n`) + } + + // Remove the trailing white spaces + return ui.toString().replace(/\s*$/, '') + } + + // return the maximum width of a string + // in the left-hand column of a table. + function maxWidth (table, theWrap, modifier) { + let width = 0 + + // table might be of the form [leftColumn], + // or {key: leftColumn} + if (!Array.isArray(table)) { + table = Object.keys(table).map(key => [table[key]]) + } + + table.forEach((v) => { + width = Math.max( + stringWidth(modifier ? `${modifier} ${v[0]}` : v[0]), + width + ) + }) + + // if we've enabled 'wrap' we should limit + // the max-width of the left-column. + if (theWrap) width = Math.min(width, parseInt(theWrap * 0.5, 10)) + + return width + } + + // make sure any options set for aliases, + // are copied to the keys being aliased. + function normalizeAliases () { + // handle old demanded API + const demandedOptions = yargs.getDemandedOptions() + const options = yargs.getOptions() + + ;(Object.keys(options.alias) || []).forEach((key) => { + options.alias[key].forEach((alias) => { + // copy descriptions. + if (descriptions[alias]) self.describe(key, descriptions[alias]) + // copy demanded. + if (alias in demandedOptions) yargs.demandOption(key, demandedOptions[alias]) + // type messages. + if (~options.boolean.indexOf(alias)) yargs.boolean(key) + if (~options.count.indexOf(alias)) yargs.count(key) + if (~options.string.indexOf(alias)) yargs.string(key) + if (~options.normalize.indexOf(alias)) yargs.normalize(key) + if (~options.array.indexOf(alias)) yargs.array(key) + if (~options.number.indexOf(alias)) yargs.number(key) + }) + }) + } + + // given a set of keys, place any keys that are + // ungrouped under the 'Options:' grouping. + function addUngroupedKeys (keys, aliases, groups) { + let groupedKeys = [] + let toCheck = null + Object.keys(groups).forEach((group) => { + groupedKeys = groupedKeys.concat(groups[group]) + }) + + keys.forEach((key) => { + toCheck = [key].concat(aliases[key]) + if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) { + groups[defaultGroup].push(key) + } + }) + return groupedKeys + } + + function filterHiddenOptions (key) { + return yargs.getOptions().hiddenOptions.indexOf(key) < 0 || yargs.parsed.argv[yargs.getOptions().showHiddenOpt] + } + + self.showHelp = (level) => { + const logger = yargs._getLoggerInstance() + if (!level) level = 'error' + const emit = typeof level === 'function' ? level : logger[level] + emit(self.help()) + } + + self.functionDescription = (fn) => { + const description = fn.name ? decamelize(fn.name, '-') : __('generated-value') + return ['(', description, ')'].join('') + } + + self.stringifiedValues = function stringifiedValues (values, separator) { + let string = '' + const sep = separator || ', ' + const array = [].concat(values) + + if (!values || !array.length) return string + + array.forEach((value) => { + if (string.length) string += sep + string += JSON.stringify(value) + }) + + return string + } + + // format the default-value-string displayed in + // the right-hand column. + function defaultString (value, defaultDescription) { + let string = `[${__('default:')} ` + + if (value === undefined && !defaultDescription) return null + + if (defaultDescription) { + string += defaultDescription + } else { + switch (typeof value) { + case 'string': + string += `"${value}"` + break + case 'object': + string += JSON.stringify(value) + break + default: + string += value + } + } + + return `${string}]` + } + + // guess the width of the console window, max-width 80. + function windowWidth () { + const maxWidth = 80 + if (typeof process === 'object' && process.stdout && process.stdout.columns) { + return Math.min(maxWidth, process.stdout.columns) + } else { + return maxWidth + } + } + + // logic for displaying application version. + let version = null + self.version = (ver) => { + version = ver + } + + self.showVersion = () => { + const logger = yargs._getLoggerInstance() + logger.log(version) + } + + self.reset = function reset (localLookup) { + // do not reset wrap here + // do not reset fails here + failMessage = null + failureOutput = false + usages = [] + usageDisabled = false + epilog = undefined + examples = [] + commands = [] + descriptions = objFilter(descriptions, (k, v) => !localLookup[k]) + return self + } + + let frozen + self.freeze = function freeze () { + frozen = {} + frozen.failMessage = failMessage + frozen.failureOutput = failureOutput + frozen.usages = usages + frozen.usageDisabled = usageDisabled + frozen.epilog = epilog + frozen.examples = examples + frozen.commands = commands + frozen.descriptions = descriptions + } + self.unfreeze = function unfreeze () { + failMessage = frozen.failMessage + failureOutput = frozen.failureOutput + usages = frozen.usages + usageDisabled = frozen.usageDisabled + epilog = frozen.epilog + examples = frozen.examples + commands = frozen.commands + descriptions = frozen.descriptions + frozen = undefined + } + + return self +} diff --git a/node_modules/yargs/lib/validation.js b/node_modules/yargs/lib/validation.js new file mode 100644 index 00000000..e9bbb12b --- /dev/null +++ b/node_modules/yargs/lib/validation.js @@ -0,0 +1,341 @@ +'use strict' +const argsert = require('./argsert') +const objFilter = require('./obj-filter') +const specialKeys = ['$0', '--', '_'] + +// validation-type-stuff, missing params, +// bad implications, custom checks. +module.exports = function validation (yargs, usage, y18n) { + const __ = y18n.__ + const __n = y18n.__n + const self = {} + + // validate appropriate # of non-option + // arguments were provided, i.e., '_'. + self.nonOptionCount = function nonOptionCount (argv) { + const demandedCommands = yargs.getDemandedCommands() + // don't count currently executing commands + const _s = argv._.length - yargs.getContext().commands.length + + if (demandedCommands._ && (_s < demandedCommands._.min || _s > demandedCommands._.max)) { + if (_s < demandedCommands._.min) { + if (demandedCommands._.minMsg !== undefined) { + usage.fail( + // replace $0 with observed, $1 with expected. + demandedCommands._.minMsg ? demandedCommands._.minMsg.replace(/\$0/g, _s).replace(/\$1/, demandedCommands._.min) : null + ) + } else { + usage.fail( + __('Not enough non-option arguments: got %s, need at least %s', _s, demandedCommands._.min) + ) + } + } else if (_s > demandedCommands._.max) { + if (demandedCommands._.maxMsg !== undefined) { + usage.fail( + // replace $0 with observed, $1 with expected. + demandedCommands._.maxMsg ? demandedCommands._.maxMsg.replace(/\$0/g, _s).replace(/\$1/, demandedCommands._.max) : null + ) + } else { + usage.fail( + __('Too many non-option arguments: got %s, maximum of %s', _s, demandedCommands._.max) + ) + } + } + } + } + + // validate the appropriate # of + // positional arguments were provided: + self.positionalCount = function positionalCount (required, observed) { + if (observed < required) { + usage.fail( + __('Not enough non-option arguments: got %s, need at least %s', observed, required) + ) + } + } + + // make sure all the required arguments are present. + self.requiredArguments = function requiredArguments (argv) { + const demandedOptions = yargs.getDemandedOptions() + let missing = null + + Object.keys(demandedOptions).forEach((key) => { + if (!argv.hasOwnProperty(key) || typeof argv[key] === 'undefined') { + missing = missing || {} + missing[key] = demandedOptions[key] + } + }) + + if (missing) { + const customMsgs = [] + Object.keys(missing).forEach((key) => { + const msg = missing[key] + if (msg && customMsgs.indexOf(msg) < 0) { + customMsgs.push(msg) + } + }) + + const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : '' + + usage.fail(__n( + 'Missing required argument: %s', + 'Missing required arguments: %s', + Object.keys(missing).length, + Object.keys(missing).join(', ') + customMsg + )) + } + } + + // check for unknown arguments (strict-mode). + self.unknownArguments = function unknownArguments (argv, aliases, positionalMap) { + const commandKeys = yargs.getCommandInstance().getCommands() + const unknown = [] + const currentContext = yargs.getContext() + + Object.keys(argv).forEach((key) => { + if (specialKeys.indexOf(key) === -1 && + !positionalMap.hasOwnProperty(key) && + !yargs._getParseContext().hasOwnProperty(key) && + !aliases.hasOwnProperty(key) + ) { + unknown.push(key) + } + }) + + if (commandKeys.length > 0) { + argv._.slice(currentContext.commands.length).forEach((key) => { + if (commandKeys.indexOf(key) === -1) { + unknown.push(key) + } + }) + } + + if (unknown.length > 0) { + usage.fail(__n( + 'Unknown argument: %s', + 'Unknown arguments: %s', + unknown.length, + unknown.join(', ') + )) + } + } + + // validate arguments limited to enumerated choices + self.limitedChoices = function limitedChoices (argv) { + const options = yargs.getOptions() + const invalid = {} + + if (!Object.keys(options.choices).length) return + + Object.keys(argv).forEach((key) => { + if (specialKeys.indexOf(key) === -1 && + options.choices.hasOwnProperty(key)) { + [].concat(argv[key]).forEach((value) => { + // TODO case-insensitive configurability + if (options.choices[key].indexOf(value) === -1 && + value !== undefined) { + invalid[key] = (invalid[key] || []).concat(value) + } + }) + } + }) + + const invalidKeys = Object.keys(invalid) + + if (!invalidKeys.length) return + + let msg = __('Invalid values:') + invalidKeys.forEach((key) => { + msg += `\n ${__( + 'Argument: %s, Given: %s, Choices: %s', + key, + usage.stringifiedValues(invalid[key]), + usage.stringifiedValues(options.choices[key]) + )}` + }) + usage.fail(msg) + } + + // custom checks, added using the `check` option on yargs. + let checks = [] + self.check = function check (f, global) { + checks.push({ + func: f, + global + }) + } + + self.customChecks = function customChecks (argv, aliases) { + for (let i = 0, f; (f = checks[i]) !== undefined; i++) { + const func = f.func + let result = null + try { + result = func(argv, aliases) + } catch (err) { + usage.fail(err.message ? err.message : err, err) + continue + } + + if (!result) { + usage.fail(__('Argument check failed: %s', func.toString())) + } else if (typeof result === 'string' || result instanceof Error) { + usage.fail(result.toString(), result) + } + } + } + + // check implications, argument foo implies => argument bar. + let implied = {} + self.implies = function implies (key, value) { + argsert(' [array|number|string]', [key, value], arguments.length) + + if (typeof key === 'object') { + Object.keys(key).forEach((k) => { + self.implies(k, key[k]) + }) + } else { + yargs.global(key) + if (!implied[key]) { + implied[key] = [] + } + if (Array.isArray(value)) { + value.forEach((i) => self.implies(key, i)) + } else { + implied[key].push(value) + } + } + } + self.getImplied = function getImplied () { + return implied + } + + self.implications = function implications (argv) { + const implyFail = [] + + Object.keys(implied).forEach((key) => { + const origKey = key + ;(implied[key] || []).forEach((value) => { + let num + let key = origKey + const origValue = value + + // convert string '1' to number 1 + num = Number(key) + key = isNaN(num) ? key : num + + if (typeof key === 'number') { + // check length of argv._ + key = argv._.length >= key + } else if (key.match(/^--no-.+/)) { + // check if key doesn't exist + key = key.match(/^--no-(.+)/)[1] + key = !argv[key] + } else { + // check if key exists + key = argv[key] + } + + num = Number(value) + value = isNaN(num) ? value : num + + if (typeof value === 'number') { + value = argv._.length >= value + } else if (value.match(/^--no-.+/)) { + value = value.match(/^--no-(.+)/)[1] + value = !argv[value] + } else { + value = argv[value] + } + if (key && !value) { + implyFail.push(` ${origKey} -> ${origValue}`) + } + }) + }) + + if (implyFail.length) { + let msg = `${__('Implications failed:')}\n` + + implyFail.forEach((value) => { + msg += (value) + }) + + usage.fail(msg) + } + } + + let conflicting = {} + self.conflicts = function conflicts (key, value) { + argsert(' [array|string]', [key, value], arguments.length) + + if (typeof key === 'object') { + Object.keys(key).forEach((k) => { + self.conflicts(k, key[k]) + }) + } else { + yargs.global(key) + if (!conflicting[key]) { + conflicting[key] = [] + } + if (Array.isArray(value)) { + value.forEach((i) => self.conflicts(key, i)) + } else { + conflicting[key].push(value) + } + } + } + self.getConflicting = () => conflicting + + self.conflicting = function conflictingFn (argv) { + Object.keys(argv).forEach((key) => { + if (conflicting[key]) { + conflicting[key].forEach((value) => { + // we default keys to 'undefined' that have been configured, we should not + // apply conflicting check unless they are a value other than 'undefined'. + if (value && argv[key] !== undefined && argv[value] !== undefined) { + usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)) + } + }) + } + }) + } + + self.recommendCommands = function recommendCommands (cmd, potentialCommands) { + const distance = require('./levenshtein') + const threshold = 3 // if it takes more than three edits, let's move on. + potentialCommands = potentialCommands.sort((a, b) => b.length - a.length) + + let recommended = null + let bestDistance = Infinity + for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) { + const d = distance(cmd, candidate) + if (d <= threshold && d < bestDistance) { + bestDistance = d + recommended = candidate + } + } + if (recommended) usage.fail(__('Did you mean %s?', recommended)) + } + + self.reset = function reset (localLookup) { + implied = objFilter(implied, (k, v) => !localLookup[k]) + conflicting = objFilter(conflicting, (k, v) => !localLookup[k]) + checks = checks.filter(c => c.global) + return self + } + + let frozen + self.freeze = function freeze () { + frozen = {} + frozen.implied = implied + frozen.checks = checks + frozen.conflicting = conflicting + } + self.unfreeze = function unfreeze () { + implied = frozen.implied + checks = frozen.checks + conflicting = frozen.conflicting + frozen = undefined + } + + return self +} diff --git a/node_modules/yargs/lib/yerror.js b/node_modules/yargs/lib/yerror.js new file mode 100644 index 00000000..53375a0f --- /dev/null +++ b/node_modules/yargs/lib/yerror.js @@ -0,0 +1,11 @@ +'use strict' +function YError (msg) { + this.name = 'YError' + this.message = msg || 'yargs error' + Error.captureStackTrace(this, YError) +} + +YError.prototype = Object.create(Error.prototype) +YError.prototype.constructor = YError + +module.exports = YError diff --git a/node_modules/yargs/locales/be.json b/node_modules/yargs/locales/be.json new file mode 100644 index 00000000..141ebe1e --- /dev/null +++ b/node_modules/yargs/locales/be.json @@ -0,0 +1,39 @@ +{ + "Commands:": "Каманды:", + "Options:": "Опцыі:", + "Examples:": "Прыклады:", + "boolean": "булевы тып", + "count": "падлік", + "string": "радковы тып", + "number": "лік", + "array": "масіў", + "required": "неабходна", + "default:": "па змаўчанні:", + "choices:": "магчымасці:", + "aliases:": "аліасы:", + "generated-value": "згенераванае значэнне", + "Not enough non-option arguments: got %s, need at least %s": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s", + "Too many non-option arguments: got %s, maximum of %s": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s", + "Missing argument value: %s": { + "one": "Не хапае значэння аргументу: %s", + "other": "Не хапае значэнняў аргументаў: %s" + }, + "Missing required argument: %s": { + "one": "Не хапае неабходнага аргументу: %s", + "other": "Не хапае неабходных аргументаў: %s" + }, + "Unknown argument: %s": { + "one": "Невядомы аргумент: %s", + "other": "Невядомыя аргументы: %s" + }, + "Invalid values:": "Несапраўдныя значэння:", + "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Дадзенае значэнне: %s, Магчымасці: %s", + "Argument check failed: %s": "Праверка аргументаў не ўдалася: %s", + "Implications failed:": "Дадзены аргумент патрабуе наступны дадатковы аргумент:", + "Not enough arguments following: %s": "Недастаткова наступных аргументаў: %s", + "Invalid JSON config file: %s": "Несапраўдны файл канфігурацыі JSON: %s", + "Path to JSON config file": "Шлях да файла канфігурацыі JSON", + "Show help": "Паказаць дапамогу", + "Show version number": "Паказаць нумар версіі", + "Did you mean %s?": "Вы мелі на ўвазе %s?" +} diff --git a/node_modules/yargs/locales/de.json b/node_modules/yargs/locales/de.json new file mode 100644 index 00000000..05d98373 --- /dev/null +++ b/node_modules/yargs/locales/de.json @@ -0,0 +1,39 @@ +{ + "Commands:": "Kommandos:", + "Options:": "Optionen:", + "Examples:": "Beispiele:", + "boolean": "boolean", + "count": "Zähler", + "string": "string", + "number": "Zahl", + "array": "array", + "required": "erforderlich", + "default:": "Standard:", + "choices:": "Möglichkeiten:", + "aliases:": "Aliase:", + "generated-value": "Generierter-Wert", + "Not enough non-option arguments: got %s, need at least %s": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt", + "Too many non-option arguments: got %s, maximum of %s": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt", + "Missing argument value: %s": { + "one": "Fehlender Argumentwert: %s", + "other": "Fehlende Argumentwerte: %s" + }, + "Missing required argument: %s": { + "one": "Fehlendes Argument: %s", + "other": "Fehlende Argumente: %s" + }, + "Unknown argument: %s": { + "one": "Unbekanntes Argument: %s", + "other": "Unbekannte Argumente: %s" + }, + "Invalid values:": "Unzulässige Werte:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, Möglichkeiten: %s", + "Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s", + "Implications failed:": "Fehlende abhängige Argumente:", + "Not enough arguments following: %s": "Nicht genügend Argumente nach: %s", + "Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s", + "Path to JSON config file": "Pfad zur JSON-Config Datei", + "Show help": "Hilfe anzeigen", + "Show version number": "Version anzeigen", + "Did you mean %s?": "Meintest du %s?" +} diff --git a/node_modules/yargs/locales/en.json b/node_modules/yargs/locales/en.json new file mode 100644 index 00000000..b32a63f2 --- /dev/null +++ b/node_modules/yargs/locales/en.json @@ -0,0 +1,42 @@ +{ + "Commands:": "Commands:", + "Options:": "Options:", + "Examples:": "Examples:", + "boolean": "boolean", + "count": "count", + "string": "string", + "number": "number", + "array": "array", + "required": "required", + "default:": "default:", + "choices:": "choices:", + "aliases:": "aliases:", + "generated-value": "generated-value", + "Not enough non-option arguments: got %s, need at least %s": "Not enough non-option arguments: got %s, need at least %s", + "Too many non-option arguments: got %s, maximum of %s": "Too many non-option arguments: got %s, maximum of %s", + "Missing argument value: %s": { + "one": "Missing argument value: %s", + "other": "Missing argument values: %s" + }, + "Missing required argument: %s": { + "one": "Missing required argument: %s", + "other": "Missing required arguments: %s" + }, + "Unknown argument: %s": { + "one": "Unknown argument: %s", + "other": "Unknown arguments: %s" + }, + "Invalid values:": "Invalid values:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s", + "Argument check failed: %s": "Argument check failed: %s", + "Implications failed:": "Missing dependent arguments:", + "Not enough arguments following: %s": "Not enough arguments following: %s", + "Invalid JSON config file: %s": "Invalid JSON config file: %s", + "Path to JSON config file": "Path to JSON config file", + "Show help": "Show help", + "Show version number": "Show version number", + "Did you mean %s?": "Did you mean %s?", + "Arguments %s and %s are mutually exclusive" : "Arguments %s and %s are mutually exclusive", + "Positionals:": "Positionals:", + "command": "command" +} diff --git a/node_modules/yargs/locales/es.json b/node_modules/yargs/locales/es.json new file mode 100644 index 00000000..d7c8af9f --- /dev/null +++ b/node_modules/yargs/locales/es.json @@ -0,0 +1,39 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opciones:", + "Examples:": "Ejemplos:", + "boolean": "booleano", + "count": "cuenta", + "string": "cadena de caracteres", + "number": "número", + "array": "tabla", + "required": "requerido", + "default:": "defecto:", + "choices:": "selección:", + "aliases:": "alias:", + "generated-value": "valor-generado", + "Not enough non-option arguments: got %s, need at least %s": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s", + "Too many non-option arguments: got %s, maximum of %s": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s", + "Missing argument value: %s": { + "one": "Falta argumento: %s", + "other": "Faltan argumentos: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento requerido: %s", + "other": "Faltan argumentos requeridos: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconocido: %s", + "other": "Argumentos desconocidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Recibido: %s, Seleccionados: %s", + "Argument check failed: %s": "Verificación de argumento ha fallado: %s", + "Implications failed:": "Implicaciones fallidas:", + "Not enough arguments following: %s": "No hay suficientes argumentos después de: %s", + "Invalid JSON config file: %s": "Archivo de configuración JSON inválido: %s", + "Path to JSON config file": "Ruta al archivo de configuración JSON", + "Show help": "Muestra ayuda", + "Show version number": "Muestra número de versión", + "Did you mean %s?": "Quisiste decir %s?" +} diff --git a/node_modules/yargs/locales/fr.json b/node_modules/yargs/locales/fr.json new file mode 100644 index 00000000..cf9c74bf --- /dev/null +++ b/node_modules/yargs/locales/fr.json @@ -0,0 +1,37 @@ +{ + "Commands:": "Commandes:", + "Options:": "Options:", + "Examples:": "Exemples:", + "boolean": "booléen", + "count": "comptage", + "string": "chaine de caractère", + "number": "nombre", + "array": "tableau", + "required": "requis", + "default:": "défaut:", + "choices:": "choix:", + "generated-value": "valeur générée", + "Not enough non-option arguments: got %s, need at least %s": "Pas assez d'arguments non-option: reçu %s, besoin d'au moins %s", + "Too many non-option arguments: got %s, maximum of %s": "Trop d'arguments non-option: reçu %s, maximum %s", + "Missing argument value: %s": { + "one": "Argument manquant: %s", + "other": "Arguments manquants: %s" + }, + "Missing required argument: %s": { + "one": "Argument requis manquant: %s", + "other": "Arguments requis manquants: %s" + }, + "Unknown argument: %s": { + "one": "Argument inconnu: %s", + "other": "Arguments inconnus: %s" + }, + "Invalid values:": "Valeurs invalides:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Donné: %s, Choix: %s", + "Argument check failed: %s": "Echec de la vérification de l'argument: %s", + "Implications failed:": "Arguments dépendants manquants:", + "Not enough arguments following: %s": "Pas assez d'arguments suivant: %s", + "Invalid JSON config file: %s": "Fichier de configuration JSON invalide: %s", + "Path to JSON config file": "Chemin du fichier de configuration JSON", + "Show help": "Affiche de l'aide", + "Show version number": "Affiche le numéro de version" +} diff --git a/node_modules/yargs/locales/hi.json b/node_modules/yargs/locales/hi.json new file mode 100644 index 00000000..2cd677ac --- /dev/null +++ b/node_modules/yargs/locales/hi.json @@ -0,0 +1,42 @@ +{ + "Commands:": "आदेश:", + "Options:": "विकल्प:", + "Examples:": "उदाहरण:", + "boolean": "सत्यता", + "count": "संख्या", + "string": "वर्णों का तार ", + "number": "अंक", + "array": "सरणी", + "required": "आवश्यक", + "default:": "डिफॉल्ट:", + "choices:": "विकल्प:", + "aliases:": "उपनाम:", + "generated-value": "उत्पन्न-मूल्य", + "Not enough non-option arguments: got %s, need at least %s": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है", + "Too many non-option arguments: got %s, maximum of %s": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य", + "Missing argument value: %s": { + "one": "कुछ तर्को के मूल्य गुम हैं: %s", + "other": "कुछ तर्को के मूल्य गुम हैं: %s" + }, + "Missing required argument: %s": { + "one": "आवश्यक तर्क गुम हैं: %s", + "other": "आवश्यक तर्क गुम हैं: %s" + }, + "Unknown argument: %s": { + "one": "अज्ञात तर्क प्राप्त: %s", + "other": "अज्ञात तर्क प्राप्त: %s" + }, + "Invalid values:": "अमान्य मूल्य:", + "Argument: %s, Given: %s, Choices: %s": "तर्क: %s, प्राप्त: %s, विकल्प: %s", + "Argument check failed: %s": "तर्क जांच विफल: %s", + "Implications failed:": "दिए गए तर्क के लिए अतिरिक्त तर्क की अपेक्षा है:", + "Not enough arguments following: %s": "निम्नलिखित के बाद पर्याप्त तर्क नहीं प्राप्त: %s", + "Invalid JSON config file: %s": "अमान्य JSON config फाइल: %s", + "Path to JSON config file": "JSON config फाइल का पथ", + "Show help": "सहायता दिखाएँ", + "Show version number": "Version संख्या दिखाएँ", + "Did you mean %s?": "क्या आपका मतलब है %s?", + "Arguments %s and %s are mutually exclusive" : "तर्क %s और %s परस्पर अनन्य हैं", + "Positionals:": "स्थानीय:", + "command": "आदेश" +} diff --git a/node_modules/yargs/locales/hu.json b/node_modules/yargs/locales/hu.json new file mode 100644 index 00000000..7b7d1660 --- /dev/null +++ b/node_modules/yargs/locales/hu.json @@ -0,0 +1,39 @@ +{ + "Commands:": "Parancsok:", + "Options:": "Opciók:", + "Examples:": "Példák:", + "boolean": "boolean", + "count": "számláló", + "string": "szöveg", + "number": "szám", + "array": "tömb", + "required": "kötelező", + "default:": "alapértelmezett:", + "choices:": "lehetőségek:", + "aliases:": "aliaszok:", + "generated-value": "generált-érték", + "Not enough non-option arguments: got %s, need at least %s": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell", + "Too many non-option arguments: got %s, maximum of %s": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet", + "Missing argument value: %s": { + "one": "Hiányzó argumentum érték: %s", + "other": "Hiányzó argumentum értékek: %s" + }, + "Missing required argument: %s": { + "one": "Hiányzó kötelező argumentum: %s", + "other": "Hiányzó kötelező argumentumok: %s" + }, + "Unknown argument: %s": { + "one": "Ismeretlen argumentum: %s", + "other": "Ismeretlen argumentumok: %s" + }, + "Invalid values:": "Érvénytelen érték:", + "Argument: %s, Given: %s, Choices: %s": "Argumentum: %s, Megadott: %s, Lehetőségek: %s", + "Argument check failed: %s": "Argumentum ellenőrzés sikertelen: %s", + "Implications failed:": "Implikációk sikertelenek:", + "Not enough arguments following: %s": "Nem elég argumentum követi: %s", + "Invalid JSON config file: %s": "Érvénytelen JSON konfigurációs file: %s", + "Path to JSON config file": "JSON konfigurációs file helye", + "Show help": "Súgo megjelenítése", + "Show version number": "Verziószám megjelenítése", + "Did you mean %s?": "Erre gondoltál %s?" +} diff --git a/node_modules/yargs/locales/id.json b/node_modules/yargs/locales/id.json new file mode 100644 index 00000000..87e441cd --- /dev/null +++ b/node_modules/yargs/locales/id.json @@ -0,0 +1,43 @@ + +{ + "Commands:": "Perintah:", + "Options:": "Pilihan:", + "Examples:": "Contoh:", + "boolean": "boolean", + "count": "jumlah", + "number": "nomor", + "string": "string", + "array": "larik", + "required": "diperlukan", + "default:": "bawaan:", + "aliases:": "istilah lain:", + "choices:": "pilihan:", + "generated-value": "nilai-yang-dihasilkan", + "Not enough non-option arguments: got %s, need at least %s": "Argumen wajib kurang: hanya %s, minimal %s", + "Too many non-option arguments: got %s, maximum of %s": "Terlalu banyak argumen wajib: ada %s, maksimal %s", + "Missing argument value: %s": { + "one": "Kurang argumen: %s", + "other": "Kurang argumen: %s" + }, + "Missing required argument: %s": { + "one": "Kurang argumen wajib: %s", + "other": "Kurang argumen wajib: %s" + }, + "Unknown argument: %s": { + "one": "Argumen tak diketahui: %s", + "other": "Argumen tak diketahui: %s" + }, + "Invalid values:": "Nilai-nilai tidak valid:", + "Argument: %s, Given: %s, Choices: %s": "Argumen: %s, Diberikan: %s, Pilihan: %s", + "Argument check failed: %s": "Pemeriksaan argument gagal: %s", + "Implications failed:": "Implikasi gagal:", + "Not enough arguments following: %s": "Kurang argumen untuk: %s", + "Invalid JSON config file: %s": "Berkas konfigurasi JSON tidak valid: %s", + "Path to JSON config file": "Alamat berkas konfigurasi JSON", + "Show help": "Lihat bantuan", + "Show version number": "Lihat nomor versi", + "Did you mean %s?": "Maksud Anda: %s?", + "Arguments %s and %s are mutually exclusive" : "Argumen %s dan %s saling eksklusif", + "Positionals:": "Posisional-posisional:", + "command": "perintah" +} diff --git a/node_modules/yargs/locales/it.json b/node_modules/yargs/locales/it.json new file mode 100644 index 00000000..9ee900d3 --- /dev/null +++ b/node_modules/yargs/locales/it.json @@ -0,0 +1,39 @@ +{ + "Commands:": "Comandi:", + "Options:": "Opzioni:", + "Examples:": "Esempi:", + "boolean": "booleano", + "count": "contatore", + "string": "stringa", + "number": "numero", + "array": "vettore", + "required": "richiesto", + "default:": "predefinito:", + "choices:": "scelte:", + "aliases:": "alias:", + "generated-value": "valore generato", + "Not enough non-option arguments: got %s, need at least %s": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s", + "Too many non-option arguments: got %s, maximum of %s": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s", + "Missing argument value: %s": { + "one": "Argomento mancante: %s", + "other": "Argomenti mancanti: %s" + }, + "Missing required argument: %s": { + "one": "Argomento richiesto mancante: %s", + "other": "Argomenti richiesti mancanti: %s" + }, + "Unknown argument: %s": { + "one": "Argomento sconosciuto: %s", + "other": "Argomenti sconosciuti: %s" + }, + "Invalid values:": "Valori non validi:", + "Argument: %s, Given: %s, Choices: %s": "Argomento: %s, Richiesto: %s, Scelte: %s", + "Argument check failed: %s": "Controllo dell'argomento fallito: %s", + "Implications failed:": "Argomenti dipendenti mancanti:", + "Not enough arguments following: %s": "Argomenti insufficienti dopo: %s", + "Invalid JSON config file: %s": "File di configurazione JSON non valido: %s", + "Path to JSON config file": "Percorso del file di configurazione JSON", + "Show help": "Mostra la schermata di aiuto", + "Show version number": "Mostra il numero di versione", + "Did you mean %s?": "Intendi forse %s?" +} diff --git a/node_modules/yargs/locales/ja.json b/node_modules/yargs/locales/ja.json new file mode 100644 index 00000000..64ee6d3f --- /dev/null +++ b/node_modules/yargs/locales/ja.json @@ -0,0 +1,42 @@ +{ + "Commands:": "コマンド:", + "Options:": "オプション:", + "Examples:": "例:", + "boolean": "真偽", + "count": "カウント", + "string": "文字列", + "number": "数値", + "array": "配列", + "required": "必須", + "default:": "デフォルト:", + "choices:": "選択してください:", + "aliases:": "エイリアス:", + "generated-value": "生成された値", + "Not enough non-option arguments: got %s, need at least %s": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:", + "Too many non-option arguments: got %s, maximum of %s": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:", + "Missing argument value: %s": { + "one": "引数が見つかりません: %s", + "other": "引数が見つかりません: %s" + }, + "Missing required argument: %s": { + "one": "必須の引数が見つかりません: %s", + "other": "必須の引数が見つかりません: %s" + }, + "Unknown argument: %s": { + "one": "未知の引数です: %s", + "other": "未知の引数です: %s" + }, + "Invalid values:": "不正な値です:", + "Argument: %s, Given: %s, Choices: %s": "引数は %s です。指定できるのは %s つです。選択してください: %s", + "Argument check failed: %s": "引数のチェックに失敗しました: %s", + "Implications failed:": "オプションの組み合わせで不正が生じました:", + "Not enough arguments following: %s": "次の引数が不足しています。: %s", + "Invalid JSON config file: %s": "JSONの設定ファイルが不正です: %s", + "Path to JSON config file": "JSONの設定ファイルまでのpath", + "Show help": "ヘルプを表示", + "Show version number": "バージョンを表示", + "Did you mean %s?": "もしかして %s?", + "Arguments %s and %s are mutually exclusive" : "引数 %s と %s は同時に指定できません", + "Positionals:": "位置:", + "command": "コマンド" +} diff --git a/node_modules/yargs/locales/ko.json b/node_modules/yargs/locales/ko.json new file mode 100644 index 00000000..0eaeab2f --- /dev/null +++ b/node_modules/yargs/locales/ko.json @@ -0,0 +1,42 @@ +{ + "Commands:": "명령:", + "Options:": "옵션:", + "Examples:": "예시:", + "boolean": "여부", + "count": "개수", + "string": "문자열", + "number": "숫자", + "array": "배열", + "required": "필수", + "default:": "기본:", + "choices:": "선택:", + "aliases:": "별칭:", + "generated-value": "생성된 값", + "Not enough non-option arguments: got %s, need at least %s": "옵션이 아닌 인자가 충분치 않습니다: %s개를 받았지만, 적어도 %s개는 필요합니다", + "Too many non-option arguments: got %s, maximum of %s": "옵션이 아닌 인자가 너무 많습니다: %s개를 받았지만, %s개 이하여야 합니다", + "Missing argument value: %s": { + "one": "인자값을 받지 못했습니다: %s", + "other": "인자값들을 받지 못했습니다: %s" + }, + "Missing required argument: %s": { + "one": "필수 인자를 받지 못했습니다: %s", + "other": "필수 인자들을 받지 못했습니다: %s" + }, + "Unknown argument: %s": { + "one": "알 수 없는 인자입니다: %s", + "other": "알 수 없는 인자들입니다: %s" + }, + "Invalid values:": "잘못된 값입니다:", + "Argument: %s, Given: %s, Choices: %s": "인자: %s, 입력받은 값: %s, 선택지: %s", + "Argument check failed: %s": "유효하지 않은 인자입니다: %s", + "Implications failed:": "옵션의 조합이 잘못되었습니다:", + "Not enough arguments following: %s": "인자가 충분하게 주어지지 않았습니다: %s", + "Invalid JSON config file: %s": "유효하지 않은 JSON 설정파일입니다: %s", + "Path to JSON config file": "JSON 설정파일 경로", + "Show help": "도움말을 보여줍니다", + "Show version number": "버전 넘버를 보여줍니다", + "Did you mean %s?": "찾고계신게 %s입니까?", + "Arguments %s and %s are mutually exclusive" : "%s와 %s 인자는 같이 사용될 수 없습니다", + "Positionals:": "위치:", + "command": "명령" +} diff --git a/node_modules/yargs/locales/nb.json b/node_modules/yargs/locales/nb.json new file mode 100644 index 00000000..55be1fbe --- /dev/null +++ b/node_modules/yargs/locales/nb.json @@ -0,0 +1,37 @@ +{ + "Commands:": "Kommandoer:", + "Options:": "Alternativer:", + "Examples:": "Eksempler:", + "boolean": "boolsk", + "count": "antall", + "string": "streng", + "number": "nummer", + "array": "matrise", + "required": "obligatorisk", + "default:": "standard:", + "choices:": "valg:", + "generated-value": "generert-verdi", + "Not enough non-option arguments: got %s, need at least %s": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s", + "Too many non-option arguments: got %s, maximum of %s": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s", + "Missing argument value: %s": { + "one": "Mangler argument verdi: %s", + "other": "Mangler argument verdier: %s" + }, + "Missing required argument: %s": { + "one": "Mangler obligatorisk argument: %s", + "other": "Mangler obligatoriske argumenter: %s" + }, + "Unknown argument: %s": { + "one": "Ukjent argument: %s", + "other": "Ukjente argumenter: %s" + }, + "Invalid values:": "Ugyldige verdier:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gitt: %s, Valg: %s", + "Argument check failed: %s": "Argumentsjekk mislyktes: %s", + "Implications failed:": "Konsekvensene mislyktes:", + "Not enough arguments following: %s": "Ikke nok følgende argumenter: %s", + "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", + "Path to JSON config file": "Bane til JSON konfigurasjonsfil", + "Show help": "Vis hjelp", + "Show version number": "Vis versjonsnummer" +} diff --git a/node_modules/yargs/locales/nl.json b/node_modules/yargs/locales/nl.json new file mode 100644 index 00000000..5d62e0fc --- /dev/null +++ b/node_modules/yargs/locales/nl.json @@ -0,0 +1,42 @@ +{ + "Commands:": "Commando's:", + "Options:": "Opties:", + "Examples:": "Voorbeelden:", + "boolean": "booleaans", + "count": "aantal", + "string": "string", + "number": "getal", + "array": "lijst", + "required": "verplicht", + "default:": "standaard:", + "choices:": "keuzes:", + "aliases:": "aliassen:", + "generated-value": "gegenereerde waarde", + "Not enough non-option arguments: got %s, need at least %s": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig", + "Too many non-option arguments: got %s, maximum of %s": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s", + "Missing argument value: %s": { + "one": "Missende argumentwaarde: %s", + "other": "Missende argumentwaarden: %s" + }, + "Missing required argument: %s": { + "one": "Missend verplicht argument: %s", + "other": "Missende verplichte argumenten: %s" + }, + "Unknown argument: %s": { + "one": "Onbekend argument: %s", + "other": "Onbekende argumenten: %s" + }, + "Invalid values:": "Ongeldige waarden:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s", + "Argument check failed: %s": "Argumentcontrole mislukt: %s", + "Implications failed:": "Ontbrekende afhankelijke argumenten:", + "Not enough arguments following: %s": "Niet genoeg argumenten na: %s", + "Invalid JSON config file: %s": "Ongeldig JSON-config-bestand: %s", + "Path to JSON config file": "Pad naar JSON-config-bestand", + "Show help": "Toon help", + "Show version number": "Toon versienummer", + "Did you mean %s?": "Bedoelde u misschien %s?", + "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s kunnen niet tegelijk gebruikt worden", + "Positionals:": "Positie-afhankelijke argumenten", + "command": "commando" +} diff --git a/node_modules/yargs/locales/nn.json b/node_modules/yargs/locales/nn.json new file mode 100644 index 00000000..5a3c9514 --- /dev/null +++ b/node_modules/yargs/locales/nn.json @@ -0,0 +1,39 @@ +{ + "Commands:": "Kommandoar:", + "Options:": "Alternativ:", + "Examples:": "Døme:", + "boolean": "boolsk", + "count": "mengd", + "string": "streng", + "number": "nummer", + "array": "matrise", + "required": "obligatorisk", + "default:": "standard:", + "choices:": "val:", + "generated-value": "generert-verdi", + "Not enough non-option arguments: got %s, need at least %s": + "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s", + "Too many non-option arguments: got %s, maximum of %s": + "For mange ikkje-alternativ argument: fekk %s, maksimum %s", + "Missing argument value: %s": { + "one": "Manglar argumentverdi: %s", + "other": "Manglar argumentverdiar: %s" + }, + "Missing required argument: %s": { + "one": "Manglar obligatorisk argument: %s", + "other": "Manglar obligatoriske argument: %s" + }, + "Unknown argument: %s": { + "one": "Ukjent argument: %s", + "other": "Ukjende argument: %s" + }, + "Invalid values:": "Ugyldige verdiar:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gjeve: %s, Val: %s", + "Argument check failed: %s": "Argumentsjekk mislukkast: %s", + "Implications failed:": "Konsekvensane mislukkast:", + "Not enough arguments following: %s": "Ikkje nok fylgjande argument: %s", + "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", + "Path to JSON config file": "Bane til JSON konfigurasjonsfil", + "Show help": "Vis hjelp", + "Show version number": "Vis versjonsnummer" +} diff --git a/node_modules/yargs/locales/pirate.json b/node_modules/yargs/locales/pirate.json new file mode 100644 index 00000000..dcb5cb75 --- /dev/null +++ b/node_modules/yargs/locales/pirate.json @@ -0,0 +1,13 @@ +{ + "Commands:": "Choose yer command:", + "Options:": "Options for me hearties!", + "Examples:": "Ex. marks the spot:", + "required": "requi-yar-ed", + "Missing required argument: %s": { + "one": "Ye be havin' to set the followin' argument land lubber: %s", + "other": "Ye be havin' to set the followin' arguments land lubber: %s" + }, + "Show help": "Parlay this here code of conduct", + "Show version number": "'Tis the version ye be askin' fer", + "Arguments %s and %s are mutually exclusive" : "Yon scurvy dogs %s and %s be as bad as rum and a prudish wench" +} diff --git a/node_modules/yargs/locales/pl.json b/node_modules/yargs/locales/pl.json new file mode 100644 index 00000000..6926a454 --- /dev/null +++ b/node_modules/yargs/locales/pl.json @@ -0,0 +1,42 @@ +{ + "Commands:": "Polecenia:", + "Options:": "Opcje:", + "Examples:": "Przykłady:", + "boolean": "boolean", + "count": "ilość", + "string": "ciąg znaków", + "number": "liczba", + "array": "tablica", + "required": "wymagany", + "default:": "domyślny:", + "choices:": "dostępne:", + "aliases:": "aliasy:", + "generated-value": "wygenerowana-wartość", + "Not enough non-option arguments: got %s, need at least %s": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s", + "Too many non-option arguments: got %s, maximum of %s": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s", + "Missing argument value: %s": { + "one": "Brak wartości dla argumentu: %s", + "other": "Brak wartości dla argumentów: %s" + }, + "Missing required argument: %s": { + "one": "Brak wymaganego argumentu: %s", + "other": "Brak wymaganych argumentów: %s" + }, + "Unknown argument: %s": { + "one": "Nieznany argument: %s", + "other": "Nieznane argumenty: %s" + }, + "Invalid values:": "Nieprawidłowe wartości:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Otrzymano: %s, Dostępne: %s", + "Argument check failed: %s": "Weryfikacja argumentów nie powiodła się: %s", + "Implications failed:": "Założenia nie zostały spełnione:", + "Not enough arguments following: %s": "Niewystarczająca ilość argumentów następujących po: %s", + "Invalid JSON config file: %s": "Nieprawidłowy plik konfiguracyjny JSON: %s", + "Path to JSON config file": "Ścieżka do pliku konfiguracyjnego JSON", + "Show help": "Pokaż pomoc", + "Show version number": "Pokaż numer wersji", + "Did you mean %s?": "Czy chodziło Ci o %s?", + "Arguments %s and %s are mutually exclusive": "Argumenty %s i %s wzajemnie się wykluczają", + "Positionals:": "Pozycyjne:", + "command": "polecenie" +} diff --git a/node_modules/yargs/locales/pt.json b/node_modules/yargs/locales/pt.json new file mode 100644 index 00000000..75c3921c --- /dev/null +++ b/node_modules/yargs/locales/pt.json @@ -0,0 +1,38 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opções:", + "Examples:": "Exemplos:", + "boolean": "boolean", + "count": "contagem", + "string": "cadeia de caracteres", + "number": "número", + "array": "arranjo", + "required": "requerido", + "default:": "padrão:", + "choices:": "escolhas:", + "generated-value": "valor-gerado", + "Not enough non-option arguments: got %s, need at least %s": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s", + "Too many non-option arguments: got %s, maximum of %s": "Excesso de argumentos não opcionais: recebido %s, máximo de %s", + "Missing argument value: %s": { + "one": "Falta valor de argumento: %s", + "other": "Falta valores de argumento: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento obrigatório: %s", + "other": "Faltando argumentos obrigatórios: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconhecido: %s", + "other": "Argumentos desconhecidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Escolhas: %s", + "Argument check failed: %s": "Verificação de argumento falhou: %s", + "Implications failed:": "Implicações falharam:", + "Not enough arguments following: %s": "Insuficientes argumentos a seguir: %s", + "Invalid JSON config file: %s": "Arquivo de configuração em JSON esta inválido: %s", + "Path to JSON config file": "Caminho para o arquivo de configuração em JSON", + "Show help": "Mostra ajuda", + "Show version number": "Mostra número de versão", + "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos" +} diff --git a/node_modules/yargs/locales/pt_BR.json b/node_modules/yargs/locales/pt_BR.json new file mode 100644 index 00000000..904cb66e --- /dev/null +++ b/node_modules/yargs/locales/pt_BR.json @@ -0,0 +1,42 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opções:", + "Examples:": "Exemplos:", + "boolean": "booleano", + "count": "contagem", + "string": "string", + "number": "número", + "array": "array", + "required": "obrigatório", + "default:": "padrão:", + "choices:": "opções:", + "aliases:": "sinônimos:", + "generated-value": "valor-gerado", + "Not enough non-option arguments: got %s, need at least %s": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s", + "Too many non-option arguments: got %s, maximum of %s": "Excesso de argumentos: recebido %s, máximo de %s", + "Missing argument value: %s": { + "one": "Falta valor de argumento: %s", + "other": "Falta valores de argumento: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento obrigatório: %s", + "other": "Faltando argumentos obrigatórios: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconhecido: %s", + "other": "Argumentos desconhecidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Opções: %s", + "Argument check failed: %s": "Verificação de argumento falhou: %s", + "Implications failed:": "Implicações falharam:", + "Not enough arguments following: %s": "Argumentos insuficientes a seguir: %s", + "Invalid JSON config file: %s": "Arquivo JSON de configuração inválido: %s", + "Path to JSON config file": "Caminho para o arquivo JSON de configuração", + "Show help": "Exibe ajuda", + "Show version number": "Exibe a versão", + "Did you mean %s?": "Você quis dizer %s?", + "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos", + "Positionals:": "Posicionais:", + "command": "comando" +} diff --git a/node_modules/yargs/locales/ru.json b/node_modules/yargs/locales/ru.json new file mode 100644 index 00000000..cb7b88b4 --- /dev/null +++ b/node_modules/yargs/locales/ru.json @@ -0,0 +1,39 @@ +{ + "Commands:": "Команды:", + "Options:": "Опции:", + "Examples:": "Примеры:", + "boolean": "булевый тип", + "count": "подсчет", + "string": "строковой тип", + "number": "число", + "array": "массив", + "required": "необходимо", + "default:": "по умолчанию:", + "choices:": "возможности:", + "aliases:": "алиасы:", + "generated-value": "генерированное значение", + "Not enough non-option arguments: got %s, need at least %s": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s", + "Too many non-option arguments: got %s, maximum of %s": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s", + "Missing argument value: %s": { + "one": "Не хватает значения аргумента: %s", + "other": "Не хватает значений аргументов: %s" + }, + "Missing required argument: %s": { + "one": "Не хватает необходимого аргумента: %s", + "other": "Не хватает необходимых аргументов: %s" + }, + "Unknown argument: %s": { + "one": "Неизвестный аргумент: %s", + "other": "Неизвестные аргументы: %s" + }, + "Invalid values:": "Недействительные значения:", + "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Данное значение: %s, Возможности: %s", + "Argument check failed: %s": "Проверка аргументов не удалась: %s", + "Implications failed:": "Данный аргумент требует следующий дополнительный аргумент:", + "Not enough arguments following: %s": "Недостаточно следующих аргументов: %s", + "Invalid JSON config file: %s": "Недействительный файл конфигурации JSON: %s", + "Path to JSON config file": "Путь к файлу конфигурации JSON", + "Show help": "Показать помощь", + "Show version number": "Показать номер версии", + "Did you mean %s?": "Вы имели в виду %s?" +} diff --git a/node_modules/yargs/locales/th.json b/node_modules/yargs/locales/th.json new file mode 100644 index 00000000..3f08dcd2 --- /dev/null +++ b/node_modules/yargs/locales/th.json @@ -0,0 +1,39 @@ +{ + "Commands:": "คอมมาน", + "Options:": "ออฟชั่น", + "Examples:": "ตัวอย่าง", + "boolean": "บูลีน", + "count": "นับ", + "string": "สตริง", + "number": "ตัวเลข", + "array": "อาเรย์", + "required": "จำเป็น", + "default:": "ค่าเริ่มต้น", + "choices:": "ตัวเลือก", + "aliases:": "เอเลียส", + "generated-value": "ค่าที่ถูกสร้างขึ้น", + "Not enough non-option arguments: got %s, need at least %s": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า", + "Too many non-option arguments: got %s, maximum of %s": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า", + "Missing argument value: %s": { + "one": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s", + "other": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s" + }, + "Missing required argument: %s": { + "one": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s", + "other": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s" + }, + "Unknown argument: %s": { + "one": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s", + "other": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s" + }, + "Invalid values:": "ค่าไม่ถูกต้อง:", + "Argument: %s, Given: %s, Choices: %s": "อาร์กิวเมนต์: %s, ได้รับ: %s, ตัวเลือก: %s", + "Argument check failed: %s": "ตรวจสอบพบอาร์กิวเมนต์ที่ไม่ถูกต้อง: %s", + "Implications failed:": "Implications ไม่สำเร็จ:", + "Not enough arguments following: %s": "ใส่อาร์กิวเมนต์ไม่ครบ: %s", + "Invalid JSON config file: %s": "ไฟล์คอนฟิค JSON ไม่ถูกต้อง: %s", + "Path to JSON config file": "พาทไฟล์คอนฟิค JSON", + "Show help": "ขอความช่วยเหลือ", + "Show version number": "แสดงตัวเลขเวอร์ชั่น", + "Did you mean %s?": "คุณหมายถึง %s?" +} diff --git a/node_modules/yargs/locales/tr.json b/node_modules/yargs/locales/tr.json new file mode 100644 index 00000000..9b06c52a --- /dev/null +++ b/node_modules/yargs/locales/tr.json @@ -0,0 +1,41 @@ +{ + "Commands:": "Komutlar:", + "Options:": "Seçenekler:", + "Examples:": "Örnekler:", + "boolean": "boolean", + "count": "sayı", + "string": "string", + "number": "numara", + "array": "array", + "required": "zorunlu", + "default:": "varsayılan:", + "choices:": "seçimler:", + "aliases:": "takma adlar:", + "generated-value": "oluşturulan-değer", + "Not enough non-option arguments: got %s, need at least %s": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli", + "Too many non-option arguments: got %s, maximum of %s": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s", + "Missing argument value: %s": { + "one": "Eksik argüman değeri: %s", + "other": "Eksik argüman değerleri: %s" + }, + "Missing required argument: %s": { + "one": "Eksik zorunlu argüman: %s", + "other": "Eksik zorunlu argümanlar: %s" + }, + "Unknown argument: %s": { + "one": "Bilinmeyen argüman: %s", + "other": "Bilinmeyen argümanlar: %s" + }, + "Invalid values:": "Geçersiz değerler:", + "Argument: %s, Given: %s, Choices: %s": "Argüman: %s, Verilen: %s, Seçimler: %s", + "Argument check failed: %s": "Argüman kontrolü başarısız oldu: %s", + "Implications failed:": "Sonuçlar başarısız oldu:", + "Not enough arguments following: %s": "%s için yeterli argüman bulunamadı", + "Invalid JSON config file: %s": "Geçersiz JSON yapılandırma dosyası: %s", + "Path to JSON config file": "JSON yapılandırma dosya konumu", + "Show help": "Yardım detaylarını göster", + "Show version number": "Versiyon detaylarını göster", + "Did you mean %s?": "Bunu mu demek istediniz: %s?", + "Positionals:": "Sıralılar:", + "command": "komut" +} diff --git a/node_modules/yargs/locales/zh_CN.json b/node_modules/yargs/locales/zh_CN.json new file mode 100644 index 00000000..03a3d94f --- /dev/null +++ b/node_modules/yargs/locales/zh_CN.json @@ -0,0 +1,41 @@ +{ + "Commands:": "命令:", + "Options:": "选项:", + "Examples:": "示例:", + "boolean": "布尔", + "count": "计数", + "string": "字符串", + "number": "数字", + "array": "数组", + "required": "必需", + "default:": "默认值:", + "choices:": "可选值:", + "generated-value": "生成的值", + "Not enough non-option arguments: got %s, need at least %s": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个", + "Too many non-option arguments: got %s, maximum of %s": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个", + "Missing argument value: %s": { + "one": "没有给此选项指定值:%s", + "other": "没有给这些选项指定值:%s" + }, + "Missing required argument: %s": { + "one": "缺少必须的选项:%s", + "other": "缺少这些必须的选项:%s" + }, + "Unknown argument: %s": { + "one": "无法识别的选项:%s", + "other": "无法识别这些选项:%s" + }, + "Invalid values:": "无效的选项值:", + "Argument: %s, Given: %s, Choices: %s": "选项名称: %s, 传入的值: %s, 可选的值:%s", + "Argument check failed: %s": "选项值验证失败:%s", + "Implications failed:": "缺少依赖的选项:", + "Not enough arguments following: %s": "没有提供足够的值给此选项:%s", + "Invalid JSON config file: %s": "无效的 JSON 配置文件:%s", + "Path to JSON config file": "JSON 配置文件的路径", + "Show help": "显示帮助信息", + "Show version number": "显示版本号", + "Did you mean %s?": "是指 %s?", + "Arguments %s and %s are mutually exclusive" : "选项 %s 和 %s 是互斥的", + "Positionals:": "位置:", + "command": "命令" +} diff --git a/node_modules/yargs/locales/zh_TW.json b/node_modules/yargs/locales/zh_TW.json new file mode 100644 index 00000000..12498888 --- /dev/null +++ b/node_modules/yargs/locales/zh_TW.json @@ -0,0 +1,40 @@ +{ + "Commands:": "命令:", + "Options:": "選項:", + "Examples:": "例:", + "boolean": "布林", + "count": "次數", + "string": "字串", + "number": "數字", + "array": "陣列", + "required": "必須", + "default:": "預設值:", + "choices:": "可選值:", + "aliases:": "別名:", + "generated-value": "生成的值", + "Not enough non-option arguments: got %s, need at least %s": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個", + "Too many non-option arguments: got %s, maximum of %s": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個", + "Missing argument value: %s": { + "one": "此引數無指定值:%s", + "other": "這些引數無指定值:%s" + }, + "Missing required argument: %s": { + "one": "缺少必須的引數:%s", + "other": "缺少這些必須的引數:%s" + }, + "Unknown argument: %s": { + "one": "未知的引數:%s", + "other": "未知的這些引數:%s" + }, + "Invalid values:": "無效的選項值:", + "Argument: %s, Given: %s, Choices: %s": "引數名稱: %s, 傳入的值: %s, 可選的值:%s", + "Argument check failed: %s": "引數驗證失敗:%s", + "Implications failed:": "缺少依賴的選項:", + "Not enough arguments following: %s": "沒有提供足夠的值給此引數:%s", + "Invalid JSON config file: %s": "無效的 JSON 設置文件:%s", + "Path to JSON config file": "JSON 設置文件的路徑", + "Show help": "顯示說明", + "Show version number": "顯示版本", + "Did you mean %s?": "是指 %s?", + "Arguments %s and %s are mutually exclusive" : "引數 %s 和 %s 是互斥的" +} diff --git a/node_modules/yargs/node_modules/find-up/index.js b/node_modules/yargs/node_modules/find-up/index.js new file mode 100644 index 00000000..8e83819c --- /dev/null +++ b/node_modules/yargs/node_modules/find-up/index.js @@ -0,0 +1,46 @@ +'use strict'; +const path = require('path'); +const locatePath = require('locate-path'); + +module.exports = (filename, opts = {}) => { + const startDir = path.resolve(opts.cwd || ''); + const {root} = path.parse(startDir); + + const filenames = [].concat(filename); + + return new Promise(resolve => { + (function find(dir) { + locatePath(filenames, {cwd: dir}).then(file => { + if (file) { + resolve(path.join(dir, file)); + } else if (dir === root) { + resolve(null); + } else { + find(path.dirname(dir)); + } + }); + })(startDir); + }); +}; + +module.exports.sync = (filename, opts = {}) => { + let dir = path.resolve(opts.cwd || ''); + const {root} = path.parse(dir); + + const filenames = [].concat(filename); + + // eslint-disable-next-line no-constant-condition + while (true) { + const file = locatePath.sync(filenames, {cwd: dir}); + + if (file) { + return path.join(dir, file); + } + + if (dir === root) { + return null; + } + + dir = path.dirname(dir); + } +}; diff --git a/node_modules/yargs/node_modules/find-up/license b/node_modules/yargs/node_modules/find-up/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/yargs/node_modules/find-up/license @@ -0,0 +1,9 @@ +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/yargs/node_modules/find-up/package.json b/node_modules/yargs/node_modules/find-up/package.json new file mode 100644 index 00000000..a708f572 --- /dev/null +++ b/node_modules/yargs/node_modules/find-up/package.json @@ -0,0 +1,50 @@ +{ + "name": "find-up", + "version": "3.0.0", + "description": "Find a file or directory by walking up parent directories", + "license": "MIT", + "repository": "sindresorhus/find-up", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "find", + "up", + "find-up", + "findup", + "look-up", + "look", + "file", + "search", + "match", + "package", + "resolve", + "parent", + "parents", + "folder", + "directory", + "dir", + "walk", + "walking", + "path" + ], + "dependencies": { + "locate-path": "^3.0.0" + }, + "devDependencies": { + "ava": "*", + "tempy": "^0.2.1", + "xo": "*" + } +} diff --git a/node_modules/yargs/node_modules/find-up/readme.md b/node_modules/yargs/node_modules/find-up/readme.md new file mode 100644 index 00000000..810ad7ce --- /dev/null +++ b/node_modules/yargs/node_modules/find-up/readme.md @@ -0,0 +1,87 @@ +# find-up [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/l0cyjmvh5lq72vq2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/find-up/branch/master) + +> Find a file or directory by walking up parent directories + + +## Install + +``` +$ npm install find-up +``` + + +## Usage + +``` +/ +└── Users + └── sindresorhus + ├── unicorn.png + └── foo + └── bar + ├── baz + └── example.js +``` + +`example.js` + +```js +const findUp = require('find-up'); + +(async () => { + console.log(await findUp('unicorn.png')); + //=> '/Users/sindresorhus/unicorn.png' + + console.log(await findUp(['rainbow.png', 'unicorn.png'])); + //=> '/Users/sindresorhus/unicorn.png' +})(); +``` + + +## API + +### findUp(filename, [options]) + +Returns a `Promise` for either the filepath or `null` if it couldn't be found. + +### findUp([filenameA, filenameB], [options]) + +Returns a `Promise` for either the first filepath found (by respecting the order) or `null` if none could be found. + +### findUp.sync(filename, [options]) + +Returns a filepath or `null`. + +### findUp.sync([filenameA, filenameB], [options]) + +Returns the first filepath found (by respecting the order) or `null`. + +#### filename + +Type: `string` + +Filename of the file to find. + +#### options + +Type: `Object` + +##### cwd + +Type: `string`
+Default: `process.cwd()` + +Directory to start from. + + +## Related + +- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module +- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file +- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package +- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module like `require.resolve()` but from a given path + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/node_modules/locate-path/index.js b/node_modules/yargs/node_modules/locate-path/index.js new file mode 100644 index 00000000..5aae6ee4 --- /dev/null +++ b/node_modules/yargs/node_modules/locate-path/index.js @@ -0,0 +1,24 @@ +'use strict'; +const path = require('path'); +const pathExists = require('path-exists'); +const pLocate = require('p-locate'); + +module.exports = (iterable, options) => { + options = Object.assign({ + cwd: process.cwd() + }, options); + + return pLocate(iterable, el => pathExists(path.resolve(options.cwd, el)), options); +}; + +module.exports.sync = (iterable, options) => { + options = Object.assign({ + cwd: process.cwd() + }, options); + + for (const el of iterable) { + if (pathExists.sync(path.resolve(options.cwd, el))) { + return el; + } + } +}; diff --git a/node_modules/yargs/node_modules/locate-path/license b/node_modules/yargs/node_modules/locate-path/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/yargs/node_modules/locate-path/license @@ -0,0 +1,9 @@ +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/yargs/node_modules/locate-path/package.json b/node_modules/yargs/node_modules/locate-path/package.json new file mode 100644 index 00000000..d41aab44 --- /dev/null +++ b/node_modules/yargs/node_modules/locate-path/package.json @@ -0,0 +1,44 @@ +{ + "name": "locate-path", + "version": "3.0.0", + "description": "Get the first path that exists on disk of multiple paths", + "license": "MIT", + "repository": "sindresorhus/locate-path", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "locate", + "path", + "paths", + "file", + "files", + "exists", + "find", + "finder", + "search", + "searcher", + "array", + "iterable", + "iterator" + ], + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/yargs/node_modules/locate-path/readme.md b/node_modules/yargs/node_modules/locate-path/readme.md new file mode 100644 index 00000000..a1d2e628 --- /dev/null +++ b/node_modules/yargs/node_modules/locate-path/readme.md @@ -0,0 +1,99 @@ +# locate-path [![Build Status](https://travis-ci.org/sindresorhus/locate-path.svg?branch=master)](https://travis-ci.org/sindresorhus/locate-path) + +> Get the first path that exists on disk of multiple paths + + +## Install + +``` +$ npm install locate-path +``` + + +## Usage + +Here we find the first file that exists on disk, in array order. + +```js +const locatePath = require('locate-path'); + +const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' +]; + +(async () => { + console(await locatePath(files)); + //=> 'rainbow' +})(); +``` + + +## API + +### locatePath(input, [options]) + +Returns a `Promise` for the first path that exists or `undefined` if none exists. + +#### input + +Type: `Iterable` + +Paths to check. + +#### options + +Type: `Object` + +##### concurrency + +Type: `number`
+Default: `Infinity`
+Minimum: `1` + +Number of concurrently pending promises. + +##### preserveOrder + +Type: `boolean`
+Default: `true` + +Preserve `input` order when searching. + +Disable this to improve performance if you don't care about the order. + +##### cwd + +Type: `string`
+Default: `process.cwd()` + +Current working directory. + +### locatePath.sync(input, [options]) + +Returns the first path that exists or `undefined` if none exists. + +#### input + +Type: `Iterable` + +Paths to check. + +#### options + +Type: `Object` + +##### cwd + +Same as above. + + +## Related + +- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/node_modules/p-limit/index.d.ts b/node_modules/yargs/node_modules/p-limit/index.d.ts new file mode 100644 index 00000000..02988aaf --- /dev/null +++ b/node_modules/yargs/node_modules/p-limit/index.d.ts @@ -0,0 +1,29 @@ +export interface Limit { + /** + * @param fn - Promise-returning/async function. + * @param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a lot of functions. + * @returns The promise returned by calling `fn(...arguments)`. + */ + ( + fn: (...arguments: Arguments) => PromiseLike | ReturnType, + ...arguments: Arguments + ): Promise; + + /** + * The number of promises that are currently running. + */ + readonly activeCount: number; + + /** + * The number of promises that are waiting to run (i.e. their internal `fn` was not called yet). + */ + readonly pendingCount: number; +} + +/** + * Run multiple promise-returning & async functions with limited concurrency. + * + * @param concurrency - Concurrency limit. Minimum: `1`. + * @returns A `limit` function. + */ +export default function pLimit(concurrency: number): Limit; diff --git a/node_modules/yargs/node_modules/p-limit/index.js b/node_modules/yargs/node_modules/p-limit/index.js new file mode 100644 index 00000000..d22fbe8a --- /dev/null +++ b/node_modules/yargs/node_modules/p-limit/index.js @@ -0,0 +1,52 @@ +'use strict'; +const pTry = require('p-try'); + +const pLimit = concurrency => { + if (concurrency < 1) { + throw new TypeError('Expected `concurrency` to be a number from 1 and up'); + } + + const queue = []; + let activeCount = 0; + + const next = () => { + activeCount--; + + if (queue.length > 0) { + queue.shift()(); + } + }; + + const run = (fn, resolve, ...args) => { + activeCount++; + + const result = pTry(fn, ...args); + + resolve(result); + + result.then(next, next); + }; + + const enqueue = (fn, resolve, ...args) => { + if (activeCount < concurrency) { + run(fn, resolve, ...args); + } else { + queue.push(run.bind(null, fn, resolve, ...args)); + } + }; + + const generator = (fn, ...args) => new Promise(resolve => enqueue(fn, resolve, ...args)); + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.length + } + }); + + return generator; +}; + +module.exports = pLimit; +module.exports.default = pLimit; diff --git a/node_modules/yargs/node_modules/p-limit/license b/node_modules/yargs/node_modules/p-limit/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/yargs/node_modules/p-limit/license @@ -0,0 +1,9 @@ +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/yargs/node_modules/p-limit/package.json b/node_modules/yargs/node_modules/p-limit/package.json new file mode 100644 index 00000000..fbeaa6df --- /dev/null +++ b/node_modules/yargs/node_modules/p-limit/package.json @@ -0,0 +1,51 @@ +{ + "name": "p-limit", + "version": "2.2.0", + "description": "Run multiple promise-returning & async functions with limited concurrency", + "license": "MIT", + "repository": "sindresorhus/p-limit", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd-check" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "promise", + "limit", + "limited", + "concurrency", + "throttle", + "throat", + "rate", + "batch", + "ratelimit", + "task", + "queue", + "async", + "await", + "promises", + "bluebird" + ], + "dependencies": { + "p-try": "^2.0.0" + }, + "devDependencies": { + "ava": "^1.2.1", + "delay": "^4.1.0", + "in-range": "^1.0.0", + "random-int": "^1.0.0", + "time-span": "^2.0.0", + "tsd-check": "^0.3.0", + "xo": "^0.24.0" + } +} diff --git a/node_modules/yargs/node_modules/p-limit/readme.md b/node_modules/yargs/node_modules/p-limit/readme.md new file mode 100644 index 00000000..b87f3e0c --- /dev/null +++ b/node_modules/yargs/node_modules/p-limit/readme.md @@ -0,0 +1,90 @@ +# p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit) + +> Run multiple promise-returning & async functions with limited concurrency + + +## Install + +``` +$ npm install p-limit +``` + + +## Usage + +```js +const pLimit = require('p-limit'); + +const limit = pLimit(1); + +const input = [ + limit(() => fetchSomething('foo')), + limit(() => fetchSomething('bar')), + limit(() => doSomething()) +]; + +(async () => { + // Only one promise is run at once + const result = await Promise.all(input); + console.log(result); +})(); +``` + + +## API + +### pLimit(concurrency) + +Returns a `limit` function. + +#### concurrency + +Type: `number`
+Minimum: `1` + +Concurrency limit. + +### limit(fn, ...args) + +Returns the promise returned by calling `fn(...args)`. + +#### fn + +Type: `Function` + +Promise-returning/async function. + +#### args + +Any arguments to pass through to `fn`. + +Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions. + +### limit.activeCount + +The number of promises that are currently running. + +### limit.pendingCount + +The number of promises that are waiting to run (i.e. their internal `fn` was not called yet). + + +## FAQ + +### How is this different from the [`p-queue`](https://github.com/sindresorhus/p-queue) package? + +This package is only about limiting the number of concurrent executions, while `p-queue` is a fully featured queue implementation with lots of different options, introspection, and ability to pause and clear the queue. + + +## Related + +- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control +- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions +- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions +- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/node_modules/p-locate/index.js b/node_modules/yargs/node_modules/p-locate/index.js new file mode 100644 index 00000000..4bd08aad --- /dev/null +++ b/node_modules/yargs/node_modules/p-locate/index.js @@ -0,0 +1,34 @@ +'use strict'; +const pLimit = require('p-limit'); + +class EndError extends Error { + constructor(value) { + super(); + this.value = value; + } +} + +// The input can also be a promise, so we `Promise.resolve()` it +const testElement = (el, tester) => Promise.resolve(el).then(tester); + +// The input can also be a promise, so we `Promise.all()` them both +const finder = el => Promise.all(el).then(val => val[1] === true && Promise.reject(new EndError(val[0]))); + +module.exports = (iterable, tester, opts) => { + opts = Object.assign({ + concurrency: Infinity, + preserveOrder: true + }, opts); + + const limit = pLimit(opts.concurrency); + + // Start all the promises concurrently with optional limit + const items = [...iterable].map(el => [el, limit(testElement, el, tester)]); + + // Check the promises either serially or concurrently + const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity); + + return Promise.all(items.map(el => checkLimit(finder, el))) + .then(() => {}) + .catch(err => err instanceof EndError ? err.value : Promise.reject(err)); +}; diff --git a/node_modules/yargs/node_modules/p-locate/license b/node_modules/yargs/node_modules/p-locate/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/yargs/node_modules/p-locate/license @@ -0,0 +1,9 @@ +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/yargs/node_modules/p-locate/package.json b/node_modules/yargs/node_modules/p-locate/package.json new file mode 100644 index 00000000..1d28b54c --- /dev/null +++ b/node_modules/yargs/node_modules/p-locate/package.json @@ -0,0 +1,51 @@ +{ + "name": "p-locate", + "version": "3.0.0", + "description": "Get the first fulfilled promise that satisfies the provided testing function", + "license": "MIT", + "repository": "sindresorhus/p-locate", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "promise", + "locate", + "find", + "finder", + "search", + "searcher", + "test", + "array", + "collection", + "iterable", + "iterator", + "race", + "fulfilled", + "fastest", + "async", + "await", + "promises", + "bluebird" + ], + "dependencies": { + "p-limit": "^2.0.0" + }, + "devDependencies": { + "ava": "*", + "delay": "^3.0.0", + "in-range": "^1.0.0", + "time-span": "^2.0.0", + "xo": "*" + } +} diff --git a/node_modules/yargs/node_modules/p-locate/readme.md b/node_modules/yargs/node_modules/p-locate/readme.md new file mode 100644 index 00000000..3b0173bc --- /dev/null +++ b/node_modules/yargs/node_modules/p-locate/readme.md @@ -0,0 +1,88 @@ +# p-locate [![Build Status](https://travis-ci.org/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.org/sindresorhus/p-locate) + +> Get the first fulfilled promise that satisfies the provided testing function + +Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find). + + +## Install + +``` +$ npm install p-locate +``` + + +## Usage + +Here we find the first file that exists on disk, in array order. + +```js +const pathExists = require('path-exists'); +const pLocate = require('p-locate'); + +const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' +]; + +(async () => { + const foundPath = await pLocate(files, file => pathExists(file)); + + console.log(foundPath); + //=> 'rainbow' +})(); +``` + +*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.* + + +## API + +### pLocate(input, tester, [options]) + +Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`. + +#### input + +Type: `Iterable` + +#### tester(element) + +Type: `Function` + +Expected to return a `Promise` or boolean. + +#### options + +Type: `Object` + +##### concurrency + +Type: `number`
+Default: `Infinity`
+Minimum: `1` + +Number of concurrently pending promises returned by `tester`. + +##### preserveOrder + +Type: `boolean`
+Default: `true` + +Preserve `input` order when searching. + +Disable this to improve performance if you don't care about the order. + + +## Related + +- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently +- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently +- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/node_modules/p-try/index.d.ts b/node_modules/yargs/node_modules/p-try/index.d.ts new file mode 100644 index 00000000..2a7319ec --- /dev/null +++ b/node_modules/yargs/node_modules/p-try/index.d.ts @@ -0,0 +1,39 @@ +declare const pTry: { + /** + Start a promise chain. + + @param fn - The function to run to start the promise chain. + @param arguments - Arguments to pass to `fn`. + @returns The value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error. + + @example + ``` + import pTry = require('p-try'); + + (async () => { + try { + const value = await pTry(() => { + return synchronousFunctionThatMightThrow(); + }); + console.log(value); + } catch (error) { + console.error(error); + } + })(); + ``` + */ + ( + fn: (...arguments: ArgumentsType) => PromiseLike | ValueType, + ...arguments: ArgumentsType + ): Promise; + + // TODO: remove this in the next major version, refactor the whole definition to: + // declare function pTry( + // fn: (...arguments: ArgumentsType) => PromiseLike | ValueType, + // ...arguments: ArgumentsType + // ): Promise; + // export = pTry; + default: typeof pTry; +}; + +export = pTry; diff --git a/node_modules/yargs/node_modules/p-try/index.js b/node_modules/yargs/node_modules/p-try/index.js new file mode 100644 index 00000000..db858da2 --- /dev/null +++ b/node_modules/yargs/node_modules/p-try/index.js @@ -0,0 +1,9 @@ +'use strict'; + +const pTry = (fn, ...arguments_) => new Promise(resolve => { + resolve(fn(...arguments_)); +}); + +module.exports = pTry; +// TODO: remove this in the next major version +module.exports.default = pTry; diff --git a/node_modules/yargs/node_modules/p-try/license b/node_modules/yargs/node_modules/p-try/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/yargs/node_modules/p-try/license @@ -0,0 +1,9 @@ +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/yargs/node_modules/p-try/package.json b/node_modules/yargs/node_modules/p-try/package.json new file mode 100644 index 00000000..81c4d32e --- /dev/null +++ b/node_modules/yargs/node_modules/p-try/package.json @@ -0,0 +1,42 @@ +{ + "name": "p-try", + "version": "2.2.0", + "description": "`Start a promise chain", + "license": "MIT", + "repository": "sindresorhus/p-try", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "promise", + "try", + "resolve", + "function", + "catch", + "async", + "await", + "promises", + "settled", + "ponyfill", + "polyfill", + "shim", + "bluebird" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + } +} diff --git a/node_modules/yargs/node_modules/p-try/readme.md b/node_modules/yargs/node_modules/p-try/readme.md new file mode 100644 index 00000000..4d7bd64d --- /dev/null +++ b/node_modules/yargs/node_modules/p-try/readme.md @@ -0,0 +1,58 @@ +# p-try [![Build Status](https://travis-ci.org/sindresorhus/p-try.svg?branch=master)](https://travis-ci.org/sindresorhus/p-try) + +> Start a promise chain + +[How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/) + + +## Install + +``` +$ npm install p-try +``` + + +## Usage + +```js +const pTry = require('p-try'); + +(async () => { + try { + const value = await pTry(() => { + return synchronousFunctionThatMightThrow(); + }); + console.log(value); + } catch (error) { + console.error(error); + } +})(); +``` + + +## API + +### pTry(fn, ...arguments) + +Returns a `Promise` resolved with the value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error. + +Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions. + +#### fn + +The function to run to start the promise chain. + +#### arguments + +Arguments to pass to `fn`. + + +## Related + +- [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/node_modules/string-width/index.js b/node_modules/yargs/node_modules/string-width/index.js new file mode 100644 index 00000000..33c9d6c0 --- /dev/null +++ b/node_modules/yargs/node_modules/string-width/index.js @@ -0,0 +1,39 @@ +'use strict'; +const stripAnsi = require('strip-ansi'); +const isFullwidthCodePoint = require('is-fullwidth-code-point'); +const emojiRegex = require('emoji-regex')(); + +module.exports = input => { + input = input.replace(emojiRegex, ' '); + + if (typeof input !== 'string' || input.length === 0) { + return 0; + } + + input = stripAnsi(input); + + let width = 0; + + for (let i = 0; i < input.length; i++) { + const code = input.codePointAt(i); + + // Ignore control characters + if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { + continue; + } + + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; + } + + // Surrogates + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint(code) ? 2 : 1; + } + + return width; +}; diff --git a/node_modules/yargs/node_modules/string-width/license b/node_modules/yargs/node_modules/string-width/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/yargs/node_modules/string-width/license @@ -0,0 +1,9 @@ +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/yargs/node_modules/string-width/package.json b/node_modules/yargs/node_modules/string-width/package.json new file mode 100644 index 00000000..e040183e --- /dev/null +++ b/node_modules/yargs/node_modules/string-width/package.json @@ -0,0 +1,56 @@ +{ + "name": "string-width", + "version": "3.1.0", + "description": "Get the visual width of a string - the number of columns required to display it", + "license": "MIT", + "repository": "sindresorhus/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "string", + "str", + "character", + "char", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width" + ], + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "devDependencies": { + "ava": "^1.0.1", + "xo": "^0.23.0" + } +} diff --git a/node_modules/yargs/node_modules/string-width/readme.md b/node_modules/yargs/node_modules/string-width/readme.md new file mode 100644 index 00000000..d39d95f5 --- /dev/null +++ b/node_modules/yargs/node_modules/string-width/readme.md @@ -0,0 +1,45 @@ +# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +Useful to be able to measure the actual width of command-line output. + + +## Install + +``` +$ npm install string-width +``` + + +## Usage + +```js +const stringWidth = require('string-width'); + +stringWidth('古'); +//=> 2 + +stringWidth('\u001b[1m古\u001b[22m'); +//=> 2 + +stringWidth('a'); +//=> 1 + +stringWidth('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +// => 5 +``` + + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/package.json b/node_modules/yargs/package.json new file mode 100644 index 00000000..436c04ba --- /dev/null +++ b/node_modules/yargs/package.json @@ -0,0 +1,78 @@ +{ + "name": "yargs", + "version": "13.3.0", + "description": "yargs the modern, pirate-themed, successor to optimist.", + "main": "./index.js", + "contributors": [ + { + "name": "Yargs Contributors", + "url": "https://github.com/yargs/yargs/graphs/contributors" + } + ], + "files": [ + "index.js", + "yargs.js", + "lib", + "locales", + "completion.sh.hbs", + "completion.zsh.hbs", + "LICENSE" + ], + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.1" + }, + "devDependencies": { + "chai": "^4.2.0", + "chalk": "^2.4.2", + "coveralls": "^3.0.3", + "cpr": "^3.0.1", + "cross-spawn": "^6.0.4", + "es6-promise": "^4.2.5", + "hashish": "0.0.4", + "mocha": "^5.2.0", + "nyc": "^14.1.0", + "rimraf": "^2.6.3", + "standard": "^12.0.1", + "standard-version": "^6.0.1", + "which": "^1.3.1", + "yargs-test-extends": "^1.0.1" + }, + "scripts": { + "pretest": "standard", + "test": "nyc --cache mocha --require ./test/before.js --timeout=12000 --check-leaks", + "coverage": "nyc report --reporter=text-lcov | coveralls", + "release": "standard-version" + }, + "repository": { + "type": "git", + "url": "https://github.com/yargs/yargs.git" + }, + "homepage": "https://yargs.js.org/", + "standard": { + "ignore": [ + "**/example/**" + ] + }, + "keywords": [ + "argument", + "args", + "option", + "parser", + "parsing", + "cli", + "command" + ], + "license": "MIT", + "engine": { + "node": ">=6" + } +} diff --git a/node_modules/yargs/yargs.js b/node_modules/yargs/yargs.js new file mode 100644 index 00000000..f1bf8c63 --- /dev/null +++ b/node_modules/yargs/yargs.js @@ -0,0 +1,1206 @@ +'use strict' +const argsert = require('./lib/argsert') +const fs = require('fs') +const Command = require('./lib/command') +const Completion = require('./lib/completion') +const Parser = require('yargs-parser') +const path = require('path') +const Usage = require('./lib/usage') +const Validation = require('./lib/validation') +const Y18n = require('y18n') +const objFilter = require('./lib/obj-filter') +const setBlocking = require('set-blocking') +const applyExtends = require('./lib/apply-extends') +const { globalMiddlewareFactory } = require('./lib/middleware') +const YError = require('./lib/yerror') + +exports = module.exports = Yargs +function Yargs (processArgs, cwd, parentRequire) { + processArgs = processArgs || [] // handle calling yargs(). + + const self = {} + let command = null + let completion = null + let groups = {} + let globalMiddleware = [] + let output = '' + let preservedGroups = {} + let usage = null + let validation = null + + const y18n = Y18n({ + directory: path.resolve(__dirname, './locales'), + updateFiles: false + }) + + self.middleware = globalMiddlewareFactory(globalMiddleware, self) + + if (!cwd) cwd = process.cwd() + + self.scriptName = function scriptName (scriptName) { + self.$0 = scriptName + return self + } + + // ignore the node bin, specify this in your + // bin file with #!/usr/bin/env node + if (/\b(node|iojs|electron)(\.exe)?$/.test(process.argv[0])) { + self.$0 = process.argv.slice(1, 2) + } else { + self.$0 = process.argv.slice(0, 1) + } + + self.$0 = self.$0 + .map((x, i) => { + const b = rebase(cwd, x) + return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x + }) + .join(' ').trim() + + if (process.env._ !== undefined && process.argv[1] === process.env._) { + self.$0 = process.env._.replace( + `${path.dirname(process.execPath)}/`, '' + ) + } + + // use context object to keep track of resets, subcommand execution, etc + // submodules should modify and check the state of context as necessary + const context = { resets: -1, commands: [], fullCommands: [], files: [] } + self.getContext = () => context + + // puts yargs back into an initial state. any keys + // that have been set to "global" will not be reset + // by this action. + let options + self.resetOptions = self.reset = function resetOptions (aliases) { + context.resets++ + aliases = aliases || {} + options = options || {} + // put yargs back into an initial state, this + // logic is used to build a nested command + // hierarchy. + const tmpOptions = {} + tmpOptions.local = options.local ? options.local : [] + tmpOptions.configObjects = options.configObjects ? options.configObjects : [] + + // if a key has been explicitly set as local, + // we should reset it before passing options to command. + const localLookup = {} + tmpOptions.local.forEach((l) => { + localLookup[l] = true + ;(aliases[l] || []).forEach((a) => { + localLookup[a] = true + }) + }) + + // preserve all groups not set to local. + preservedGroups = Object.keys(groups).reduce((acc, groupName) => { + const keys = groups[groupName].filter(key => !(key in localLookup)) + if (keys.length > 0) { + acc[groupName] = keys + } + return acc + }, {}) + // groups can now be reset + groups = {} + + const arrayOptions = [ + 'array', 'boolean', 'string', 'skipValidation', + 'count', 'normalize', 'number', + 'hiddenOptions' + ] + + const objectOptions = [ + 'narg', 'key', 'alias', 'default', 'defaultDescription', + 'config', 'choices', 'demandedOptions', 'demandedCommands', 'coerce' + ] + + arrayOptions.forEach((k) => { + tmpOptions[k] = (options[k] || []).filter(k => !localLookup[k]) + }) + + objectOptions.forEach((k) => { + tmpOptions[k] = objFilter(options[k], (k, v) => !localLookup[k]) + }) + + tmpOptions.envPrefix = options.envPrefix + options = tmpOptions + + // if this is the first time being executed, create + // instances of all our helpers -- otherwise just reset. + usage = usage ? usage.reset(localLookup) : Usage(self, y18n) + validation = validation ? validation.reset(localLookup) : Validation(self, usage, y18n) + command = command ? command.reset() : Command(self, usage, validation, globalMiddleware) + if (!completion) completion = Completion(self, usage, command) + + completionCommand = null + output = '' + exitError = null + hasOutput = false + self.parsed = false + + return self + } + self.resetOptions() + + // temporary hack: allow "freezing" of reset-able state for parse(msg, cb) + let frozen + function freeze () { + frozen = {} + frozen.options = options + frozen.configObjects = options.configObjects.slice(0) + frozen.exitProcess = exitProcess + frozen.groups = groups + usage.freeze() + validation.freeze() + command.freeze() + frozen.strict = strict + frozen.completionCommand = completionCommand + frozen.output = output + frozen.exitError = exitError + frozen.hasOutput = hasOutput + frozen.parsed = self.parsed + } + function unfreeze () { + options = frozen.options + options.configObjects = frozen.configObjects + exitProcess = frozen.exitProcess + groups = frozen.groups + output = frozen.output + exitError = frozen.exitError + hasOutput = frozen.hasOutput + self.parsed = frozen.parsed + usage.unfreeze() + validation.unfreeze() + command.unfreeze() + strict = frozen.strict + completionCommand = frozen.completionCommand + parseFn = null + parseContext = null + frozen = undefined + } + + self.boolean = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('boolean', keys) + return self + } + + self.array = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('array', keys) + return self + } + + self.number = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('number', keys) + return self + } + + self.normalize = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('normalize', keys) + return self + } + + self.count = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('count', keys) + return self + } + + self.string = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('string', keys) + return self + } + + self.requiresArg = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintObject(self.nargs, false, 'narg', keys, 1) + return self + } + + self.skipValidation = function (keys) { + argsert('', [keys], arguments.length) + populateParserHintArray('skipValidation', keys) + return self + } + + function populateParserHintArray (type, keys, value) { + keys = [].concat(keys) + keys.forEach((key) => { + options[type].push(key) + }) + } + + self.nargs = function (key, value) { + argsert(' [number]', [key, value], arguments.length) + populateParserHintObject(self.nargs, false, 'narg', key, value) + return self + } + + self.choices = function (key, value) { + argsert(' [string|array]', [key, value], arguments.length) + populateParserHintObject(self.choices, true, 'choices', key, value) + return self + } + + self.alias = function (key, value) { + argsert(' [string|array]', [key, value], arguments.length) + populateParserHintObject(self.alias, true, 'alias', key, value) + return self + } + + // TODO: actually deprecate self.defaults. + self.default = self.defaults = function (key, value, defaultDescription) { + argsert(' [*] [string]', [key, value, defaultDescription], arguments.length) + if (defaultDescription) options.defaultDescription[key] = defaultDescription + if (typeof value === 'function') { + if (!options.defaultDescription[key]) options.defaultDescription[key] = usage.functionDescription(value) + value = value.call() + } + populateParserHintObject(self.default, false, 'default', key, value) + return self + } + + self.describe = function (key, desc) { + argsert(' [string]', [key, desc], arguments.length) + populateParserHintObject(self.describe, false, 'key', key, true) + usage.describe(key, desc) + return self + } + + self.demandOption = function (keys, msg) { + argsert(' [string]', [keys, msg], arguments.length) + populateParserHintObject(self.demandOption, false, 'demandedOptions', keys, msg) + return self + } + + self.coerce = function (keys, value) { + argsert(' [function]', [keys, value], arguments.length) + populateParserHintObject(self.coerce, false, 'coerce', keys, value) + return self + } + + function populateParserHintObject (builder, isArray, type, key, value) { + if (Array.isArray(key)) { + // an array of keys with one value ['x', 'y', 'z'], function parse () {} + const temp = {} + key.forEach((k) => { + temp[k] = value + }) + builder(temp) + } else if (typeof key === 'object') { + // an object of key value pairs: {'x': parse () {}, 'y': parse() {}} + Object.keys(key).forEach((k) => { + builder(k, key[k]) + }) + } else { + // a single key value pair 'x', parse() {} + if (isArray) { + options[type][key] = (options[type][key] || []).concat(value) + } else { + options[type][key] = value + } + } + } + + function deleteFromParserHintObject (optionKey) { + // delete from all parsing hints: + // boolean, array, key, alias, etc. + Object.keys(options).forEach((hintKey) => { + const hint = options[hintKey] + if (Array.isArray(hint)) { + if (~hint.indexOf(optionKey)) hint.splice(hint.indexOf(optionKey), 1) + } else if (typeof hint === 'object') { + delete hint[optionKey] + } + }) + // now delete the description from usage.js. + delete usage.getDescriptions()[optionKey] + } + + self.config = function config (key, msg, parseFn) { + argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length) + // allow a config object to be provided directly. + if (typeof key === 'object') { + key = applyExtends(key, cwd) + options.configObjects = (options.configObjects || []).concat(key) + return self + } + + // allow for a custom parsing function. + if (typeof msg === 'function') { + parseFn = msg + msg = null + } + + key = key || 'config' + self.describe(key, msg || usage.deferY18nLookup('Path to JSON config file')) + ;(Array.isArray(key) ? key : [key]).forEach((k) => { + options.config[k] = parseFn || true + }) + + return self + } + + self.example = function (cmd, description) { + argsert(' [string]', [cmd, description], arguments.length) + usage.example(cmd, description) + return self + } + + self.command = function (cmd, description, builder, handler, middlewares) { + argsert(' [string|boolean] [function|object] [function] [array]', [cmd, description, builder, handler, middlewares], arguments.length) + command.addHandler(cmd, description, builder, handler, middlewares) + return self + } + + self.commandDir = function (dir, opts) { + argsert(' [object]', [dir, opts], arguments.length) + const req = parentRequire || require + command.addDirectory(dir, self.getContext(), req, require('get-caller-file')(), opts) + return self + } + + // TODO: deprecate self.demand in favor of + // .demandCommand() .demandOption(). + self.demand = self.required = self.require = function demand (keys, max, msg) { + // you can optionally provide a 'max' key, + // which will raise an exception if too many '_' + // options are provided. + if (Array.isArray(max)) { + max.forEach((key) => { + self.demandOption(key, msg) + }) + max = Infinity + } else if (typeof max !== 'number') { + msg = max + max = Infinity + } + + if (typeof keys === 'number') { + self.demandCommand(keys, max, msg, msg) + } else if (Array.isArray(keys)) { + keys.forEach((key) => { + self.demandOption(key, msg) + }) + } else { + if (typeof msg === 'string') { + self.demandOption(keys, msg) + } else if (msg === true || typeof msg === 'undefined') { + self.demandOption(keys) + } + } + + return self + } + + self.demandCommand = function demandCommand (min, max, minMsg, maxMsg) { + argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length) + + if (typeof min === 'undefined') min = 1 + + if (typeof max !== 'number') { + minMsg = max + max = Infinity + } + + self.global('_', false) + + options.demandedCommands._ = { + min, + max, + minMsg, + maxMsg + } + + return self + } + + self.getDemandedOptions = () => { + argsert([], 0) + return options.demandedOptions + } + + self.getDemandedCommands = () => { + argsert([], 0) + return options.demandedCommands + } + + self.implies = function (key, value) { + argsert(' [number|string|array]', [key, value], arguments.length) + validation.implies(key, value) + return self + } + + self.conflicts = function (key1, key2) { + argsert(' [string|array]', [key1, key2], arguments.length) + validation.conflicts(key1, key2) + return self + } + + self.usage = function (msg, description, builder, handler) { + argsert(' [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length) + + if (description !== undefined) { + // .usage() can be used as an alias for defining + // a default command. + if ((msg || '').match(/^\$0( |$)/)) { + return self.command(msg, description, builder, handler) + } else { + throw new YError('.usage() description must start with $0 if being used as alias for .command()') + } + } else { + usage.usage(msg) + return self + } + } + + self.epilogue = self.epilog = function (msg) { + argsert('', [msg], arguments.length) + usage.epilog(msg) + return self + } + + self.fail = function (f) { + argsert('', [f], arguments.length) + usage.failFn(f) + return self + } + + self.check = function (f, _global) { + argsert(' [boolean]', [f, _global], arguments.length) + validation.check(f, _global !== false) + return self + } + + self.global = function global (globals, global) { + argsert(' [boolean]', [globals, global], arguments.length) + globals = [].concat(globals) + if (global !== false) { + options.local = options.local.filter(l => globals.indexOf(l) === -1) + } else { + globals.forEach((g) => { + if (options.local.indexOf(g) === -1) options.local.push(g) + }) + } + return self + } + + self.pkgConf = function pkgConf (key, rootPath) { + argsert(' [string]', [key, rootPath], arguments.length) + let conf = null + // prefer cwd to require-main-filename in this method + // since we're looking for e.g. "nyc" config in nyc consumer + // rather than "yargs" config in nyc (where nyc is the main filename) + const obj = pkgUp(rootPath || cwd) + + // If an object exists in the key, add it to options.configObjects + if (obj[key] && typeof obj[key] === 'object') { + conf = applyExtends(obj[key], rootPath || cwd) + options.configObjects = (options.configObjects || []).concat(conf) + } + + return self + } + + const pkgs = {} + function pkgUp (rootPath) { + const npath = rootPath || '*' + if (pkgs[npath]) return pkgs[npath] + const findUp = require('find-up') + + let obj = {} + try { + let startDir = rootPath || require('require-main-filename')(parentRequire || require) + + // When called in an environment that lacks require.main.filename, such as a jest test runner, + // startDir is already process.cwd(), and should not be shortened. + // Whether or not it is _actually_ a directory (e.g., extensionless bin) is irrelevant, find-up handles it. + if (!rootPath && path.extname(startDir)) { + startDir = path.dirname(startDir) + } + + const pkgJsonPath = findUp.sync('package.json', { + cwd: startDir + }) + obj = JSON.parse(fs.readFileSync(pkgJsonPath)) + } catch (noop) {} + + pkgs[npath] = obj || {} + return pkgs[npath] + } + + let parseFn = null + let parseContext = null + self.parse = function parse (args, shortCircuit, _parseFn) { + argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length) + if (typeof args === 'undefined') { + return self._parseArgs(processArgs) + } + + // a context object can optionally be provided, this allows + // additional information to be passed to a command handler. + if (typeof shortCircuit === 'object') { + parseContext = shortCircuit + shortCircuit = _parseFn + } + + // by providing a function as a second argument to + // parse you can capture output that would otherwise + // default to printing to stdout/stderr. + if (typeof shortCircuit === 'function') { + parseFn = shortCircuit + shortCircuit = null + } + // completion short-circuits the parsing process, + // skipping validation, etc. + if (!shortCircuit) processArgs = args + + freeze() + if (parseFn) exitProcess = false + + const parsed = self._parseArgs(args, shortCircuit) + if (parseFn) parseFn(exitError, parsed, output) + unfreeze() + + return parsed + } + + self._getParseContext = () => parseContext || {} + + self._hasParseCallback = () => !!parseFn + + self.option = self.options = function option (key, opt) { + argsert(' [object]', [key, opt], arguments.length) + if (typeof key === 'object') { + Object.keys(key).forEach((k) => { + self.options(k, key[k]) + }) + } else { + if (typeof opt !== 'object') { + opt = {} + } + + options.key[key] = true // track manually set keys. + + if (opt.alias) self.alias(key, opt.alias) + + const demand = opt.demand || opt.required || opt.require + + // deprecated, use 'demandOption' instead + if (demand) { + self.demand(key, demand) + } + + if (opt.demandOption) { + self.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined) + } + + if ('conflicts' in opt) { + self.conflicts(key, opt.conflicts) + } + + if ('default' in opt) { + self.default(key, opt.default) + } + + if ('implies' in opt) { + self.implies(key, opt.implies) + } + + if ('nargs' in opt) { + self.nargs(key, opt.nargs) + } + + if (opt.config) { + self.config(key, opt.configParser) + } + + if (opt.normalize) { + self.normalize(key) + } + + if ('choices' in opt) { + self.choices(key, opt.choices) + } + + if ('coerce' in opt) { + self.coerce(key, opt.coerce) + } + + if ('group' in opt) { + self.group(key, opt.group) + } + + if (opt.boolean || opt.type === 'boolean') { + self.boolean(key) + if (opt.alias) self.boolean(opt.alias) + } + + if (opt.array || opt.type === 'array') { + self.array(key) + if (opt.alias) self.array(opt.alias) + } + + if (opt.number || opt.type === 'number') { + self.number(key) + if (opt.alias) self.number(opt.alias) + } + + if (opt.string || opt.type === 'string') { + self.string(key) + if (opt.alias) self.string(opt.alias) + } + + if (opt.count || opt.type === 'count') { + self.count(key) + } + + if (typeof opt.global === 'boolean') { + self.global(key, opt.global) + } + + if (opt.defaultDescription) { + options.defaultDescription[key] = opt.defaultDescription + } + + if (opt.skipValidation) { + self.skipValidation(key) + } + + const desc = opt.describe || opt.description || opt.desc + self.describe(key, desc) + if (opt.hidden) { + self.hide(key) + } + + if (opt.requiresArg) { + self.requiresArg(key) + } + } + + return self + } + self.getOptions = () => options + + self.positional = function (key, opts) { + argsert(' ', [key, opts], arguments.length) + if (context.resets === 0) { + throw new YError(".positional() can only be called in a command's builder function") + } + + // .positional() only supports a subset of the configuration + // options available to .option(). + const supportedOpts = ['default', 'defaultDescription', 'implies', 'normalize', + 'choices', 'conflicts', 'coerce', 'type', 'describe', + 'desc', 'description', 'alias'] + opts = objFilter(opts, (k, v) => { + let accept = supportedOpts.indexOf(k) !== -1 + // type can be one of string|number|boolean. + if (k === 'type' && ['string', 'number', 'boolean'].indexOf(v) === -1) accept = false + return accept + }) + + // copy over any settings that can be inferred from the command string. + const fullCommand = context.fullCommands[context.fullCommands.length - 1] + const parseOptions = fullCommand ? command.cmdToParseOptions(fullCommand) : { + array: [], + alias: {}, + default: {}, + demand: {} + } + Object.keys(parseOptions).forEach((pk) => { + if (Array.isArray(parseOptions[pk])) { + if (parseOptions[pk].indexOf(key) !== -1) opts[pk] = true + } else { + if (parseOptions[pk][key] && !(pk in opts)) opts[pk] = parseOptions[pk][key] + } + }) + self.group(key, usage.getPositionalGroupName()) + return self.option(key, opts) + } + + self.group = function group (opts, groupName) { + argsert(' ', [opts, groupName], arguments.length) + const existing = preservedGroups[groupName] || groups[groupName] + if (preservedGroups[groupName]) { + // we now only need to track this group name in groups. + delete preservedGroups[groupName] + } + + const seen = {} + groups[groupName] = (existing || []).concat(opts).filter((key) => { + if (seen[key]) return false + return (seen[key] = true) + }) + return self + } + // combine explicit and preserved groups. explicit groups should be first + self.getGroups = () => Object.assign({}, groups, preservedGroups) + + // as long as options.envPrefix is not undefined, + // parser will apply env vars matching prefix to argv + self.env = function (prefix) { + argsert('[string|boolean]', [prefix], arguments.length) + if (prefix === false) options.envPrefix = undefined + else options.envPrefix = prefix || '' + return self + } + + self.wrap = function (cols) { + argsert('', [cols], arguments.length) + usage.wrap(cols) + return self + } + + let strict = false + self.strict = function (enabled) { + argsert('[boolean]', [enabled], arguments.length) + strict = enabled !== false + return self + } + self.getStrict = () => strict + + let parserConfig = {} + self.parserConfiguration = function parserConfiguration (config) { + argsert('', [config], arguments.length) + parserConfig = config + return self + } + self.getParserConfiguration = () => parserConfig + + self.showHelp = function (level) { + argsert('[string|function]', [level], arguments.length) + if (!self.parsed) self._parseArgs(processArgs) // run parser, if it has not already been executed. + if (command.hasDefaultCommand()) { + context.resets++ // override the restriction on top-level positoinals. + command.runDefaultBuilderOn(self, true) + } + usage.showHelp(level) + return self + } + + let versionOpt = null + self.version = function version (opt, msg, ver) { + const defaultVersionOpt = 'version' + argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length) + + // nuke the key previously configured + // to return version #. + if (versionOpt) { + deleteFromParserHintObject(versionOpt) + usage.version(undefined) + versionOpt = null + } + + if (arguments.length === 0) { + ver = guessVersion() + opt = defaultVersionOpt + } else if (arguments.length === 1) { + if (opt === false) { // disable default 'version' key. + return self + } + ver = opt + opt = defaultVersionOpt + } else if (arguments.length === 2) { + ver = msg + msg = null + } + + versionOpt = typeof opt === 'string' ? opt : defaultVersionOpt + msg = msg || usage.deferY18nLookup('Show version number') + + usage.version(ver || undefined) + self.boolean(versionOpt) + self.describe(versionOpt, msg) + return self + } + + function guessVersion () { + const obj = pkgUp() + + return obj.version || 'unknown' + } + + let helpOpt = null + self.addHelpOpt = self.help = function addHelpOpt (opt, msg) { + const defaultHelpOpt = 'help' + argsert('[string|boolean] [string]', [opt, msg], arguments.length) + + // nuke the key previously configured + // to return help. + if (helpOpt) { + deleteFromParserHintObject(helpOpt) + helpOpt = null + } + + if (arguments.length === 1) { + if (opt === false) return self + } + + // use arguments, fallback to defaults for opt and msg + helpOpt = typeof opt === 'string' ? opt : defaultHelpOpt + self.boolean(helpOpt) + self.describe(helpOpt, msg || usage.deferY18nLookup('Show help')) + return self + } + + const defaultShowHiddenOpt = 'show-hidden' + options.showHiddenOpt = defaultShowHiddenOpt + self.addShowHiddenOpt = self.showHidden = function addShowHiddenOpt (opt, msg) { + argsert('[string|boolean] [string]', [opt, msg], arguments.length) + + if (arguments.length === 1) { + if (opt === false) return self + } + + const showHiddenOpt = typeof opt === 'string' ? opt : defaultShowHiddenOpt + self.boolean(showHiddenOpt) + self.describe(showHiddenOpt, msg || usage.deferY18nLookup('Show hidden options')) + options.showHiddenOpt = showHiddenOpt + return self + } + + self.hide = function hide (key) { + argsert('', [key], arguments.length) + options.hiddenOptions.push(key) + return self + } + + self.showHelpOnFail = function showHelpOnFail (enabled, message) { + argsert('[boolean|string] [string]', [enabled, message], arguments.length) + usage.showHelpOnFail(enabled, message) + return self + } + + var exitProcess = true + self.exitProcess = function (enabled) { + argsert('[boolean]', [enabled], arguments.length) + if (typeof enabled !== 'boolean') { + enabled = true + } + exitProcess = enabled + return self + } + self.getExitProcess = () => exitProcess + + var completionCommand = null + self.completion = function (cmd, desc, fn) { + argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length) + + // a function to execute when generating + // completions can be provided as the second + // or third argument to completion. + if (typeof desc === 'function') { + fn = desc + desc = null + } + + // register the completion command. + completionCommand = cmd || 'completion' + if (!desc && desc !== false) { + desc = 'generate completion script' + } + self.command(completionCommand, desc) + + // a function can be provided + if (fn) completion.registerFunction(fn) + + return self + } + + self.showCompletionScript = function ($0) { + argsert('[string]', [$0], arguments.length) + $0 = $0 || self.$0 + _logger.log(completion.generateCompletionScript($0, completionCommand)) + return self + } + + self.getCompletion = function (args, done) { + argsert(' ', [args, done], arguments.length) + completion.getCompletion(args, done) + } + + self.locale = function (locale) { + argsert('[string]', [locale], arguments.length) + if (arguments.length === 0) { + guessLocale() + return y18n.getLocale() + } + detectLocale = false + y18n.setLocale(locale) + return self + } + + self.updateStrings = self.updateLocale = function (obj) { + argsert('', [obj], arguments.length) + detectLocale = false + y18n.updateLocale(obj) + return self + } + + let detectLocale = true + self.detectLocale = function (detect) { + argsert('', [detect], arguments.length) + detectLocale = detect + return self + } + self.getDetectLocale = () => detectLocale + + var hasOutput = false + var exitError = null + // maybe exit, always capture + // context about why we wanted to exit. + self.exit = (code, err) => { + hasOutput = true + exitError = err + if (exitProcess) process.exit(code) + } + + // we use a custom logger that buffers output, + // so that we can print to non-CLIs, e.g., chat-bots. + const _logger = { + log () { + const args = [] + for (let i = 0; i < arguments.length; i++) args.push(arguments[i]) + if (!self._hasParseCallback()) console.log.apply(console, args) + hasOutput = true + if (output.length) output += '\n' + output += args.join(' ') + }, + error () { + const args = [] + for (let i = 0; i < arguments.length; i++) args.push(arguments[i]) + if (!self._hasParseCallback()) console.error.apply(console, args) + hasOutput = true + if (output.length) output += '\n' + output += args.join(' ') + } + } + self._getLoggerInstance = () => _logger + // has yargs output an error our help + // message in the current execution context. + self._hasOutput = () => hasOutput + + self._setHasOutput = () => { + hasOutput = true + } + + let recommendCommands + self.recommendCommands = function (recommend) { + argsert('[boolean]', [recommend], arguments.length) + recommendCommands = typeof recommend === 'boolean' ? recommend : true + return self + } + + self.getUsageInstance = () => usage + + self.getValidationInstance = () => validation + + self.getCommandInstance = () => command + + self.terminalWidth = () => { + argsert([], 0) + return typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null + } + + Object.defineProperty(self, 'argv', { + get: () => self._parseArgs(processArgs), + enumerable: true + }) + + self._parseArgs = function parseArgs (args, shortCircuit, _skipValidation, commandIndex) { + let skipValidation = !!_skipValidation + args = args || processArgs + + options.__ = y18n.__ + options.configuration = self.getParserConfiguration() + + // Deprecated + let pkgConfig = pkgUp()['yargs'] + if (pkgConfig) { + console.warn('Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.') + options.configuration = Object.assign({}, pkgConfig, options.configuration) + } + + const parsed = Parser.detailed(args, options) + let argv = parsed.argv + if (parseContext) argv = Object.assign({}, argv, parseContext) + const aliases = parsed.aliases + + argv.$0 = self.$0 + self.parsed = parsed + + try { + guessLocale() // guess locale lazily, so that it can be turned off in chain. + + // while building up the argv object, there + // are two passes through the parser. If completion + // is being performed short-circuit on the first pass. + if (shortCircuit) { + return argv + } + + // if there's a handler associated with a + // command defer processing to it. + if (helpOpt) { + // consider any multi-char helpOpt alias as a valid help command + // unless all helpOpt aliases are single-char + // note that parsed.aliases is a normalized bidirectional map :) + const helpCmds = [helpOpt] + .concat(aliases[helpOpt] || []) + .filter(k => k.length > 1) + // check if help should trigger and strip it from _. + if (~helpCmds.indexOf(argv._[argv._.length - 1])) { + argv._.pop() + argv[helpOpt] = true + } + } + + const handlerKeys = command.getCommands() + const requestCompletions = completion.completionKey in argv + const skipRecommendation = argv[helpOpt] || requestCompletions + const skipDefaultCommand = skipRecommendation && (handlerKeys.length > 1 || handlerKeys[0] !== '$0') + + if (argv._.length) { + if (handlerKeys.length) { + let firstUnknownCommand + for (let i = (commandIndex || 0), cmd; argv._[i] !== undefined; i++) { + cmd = String(argv._[i]) + if (~handlerKeys.indexOf(cmd) && cmd !== completionCommand) { + // commands are executed using a recursive algorithm that executes + // the deepest command first; we keep track of the position in the + // argv._ array that is currently being executed. + return command.runCommand(cmd, self, parsed, i + 1) + } else if (!firstUnknownCommand && cmd !== completionCommand) { + firstUnknownCommand = cmd + break + } + } + + // run the default command, if defined + if (command.hasDefaultCommand() && !skipDefaultCommand) { + return command.runCommand(null, self, parsed) + } + + // recommend a command if recommendCommands() has + // been enabled, and no commands were found to execute + if (recommendCommands && firstUnknownCommand && !skipRecommendation) { + validation.recommendCommands(firstUnknownCommand, handlerKeys) + } + } + + // generate a completion script for adding to ~/.bashrc. + if (completionCommand && ~argv._.indexOf(completionCommand) && !requestCompletions) { + if (exitProcess) setBlocking(true) + self.showCompletionScript() + self.exit(0) + } + } else if (command.hasDefaultCommand() && !skipDefaultCommand) { + return command.runCommand(null, self, parsed) + } + + // we must run completions first, a user might + // want to complete the --help or --version option. + if (requestCompletions) { + if (exitProcess) setBlocking(true) + + // we allow for asynchronous completions, + // e.g., loading in a list of commands from an API. + const completionArgs = args.slice(args.indexOf(`--${completion.completionKey}`) + 1) + completion.getCompletion(completionArgs, (completions) => { + ;(completions || []).forEach((completion) => { + _logger.log(completion) + }) + + self.exit(0) + }) + return argv + } + + // Handle 'help' and 'version' options + // if we haven't already output help! + if (!hasOutput) { + Object.keys(argv).forEach((key) => { + if (key === helpOpt && argv[key]) { + if (exitProcess) setBlocking(true) + + skipValidation = true + self.showHelp('log') + self.exit(0) + } else if (key === versionOpt && argv[key]) { + if (exitProcess) setBlocking(true) + + skipValidation = true + usage.showVersion() + self.exit(0) + } + }) + } + + // Check if any of the options to skip validation were provided + if (!skipValidation && options.skipValidation.length > 0) { + skipValidation = Object.keys(argv).some(key => options.skipValidation.indexOf(key) >= 0 && argv[key] === true) + } + + // If the help or version options where used and exitProcess is false, + // or if explicitly skipped, we won't run validations. + if (!skipValidation) { + if (parsed.error) throw new YError(parsed.error.message) + + // if we're executed via bash completion, don't + // bother with validation. + if (!requestCompletions) { + self._runValidation(argv, aliases, {}, parsed.error) + } + } + } catch (err) { + if (err instanceof YError) usage.fail(err.message, err) + else throw err + } + + return argv + } + + self._runValidation = function runValidation (argv, aliases, positionalMap, parseErrors) { + if (parseErrors) throw new YError(parseErrors.message || parseErrors) + validation.nonOptionCount(argv) + validation.requiredArguments(argv) + if (strict) validation.unknownArguments(argv, aliases, positionalMap) + validation.customChecks(argv, aliases) + validation.limitedChoices(argv) + validation.implications(argv) + validation.conflicting(argv) + } + + function guessLocale () { + if (!detectLocale) return + + try { + const { env } = process + const locale = env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE || 'en_US' + self.locale(locale.replace(/[.:].*/, '')) + } catch (err) { + // if we explode looking up locale just noop + // we'll keep using the default language 'en'. + } + } + + // an app should almost always have --version and --help, + // if you *really* want to disable this use .help(false)/.version(false). + self.help() + self.version() + + return self +} + +// rebase an absolute path to a relative one with respect to a base directory +// exported for tests +exports.rebase = rebase +function rebase (base, dir) { + return path.relative(base, dir) +} diff --git a/package.json b/package.json index cb5052f4..24234229 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "dev": "nodemon src/server.js" }, "dependencies": { - "express": "^4.17.1" + "express": "^4.17.1", + "sequelize": "^5.10.1" }, "devDependencies": { "eslint": "^5.16.0", @@ -17,6 +18,7 @@ "eslint-plugin-prettier": "^3.1.0", "nodemon": "^1.19.1", "prettier": "^1.18.2", + "sequelize-cli": "^5.5.0", "sucrase": "^3.10.1" } } diff --git a/src/config/database.js b/src/config/database.js new file mode 100644 index 00000000..84717d5d --- /dev/null +++ b/src/config/database.js @@ -0,0 +1,12 @@ +module.exports = { + dialect: 'postgres', + host: 'localhost', + username: 'postgres', + password: 'docker', + database: 'gobarber', + define: { + timestamps: true, + undescored: true, + undescoredAll: true, + }, +}; diff --git a/yarn.lock b/yarn.lock index 33201c7c..fc0fa2aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,6 +18,11 @@ esutils "^2.0.2" js-tokens "^4.0.0" +"@types/node@*": + version "12.6.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.8.tgz#e469b4bf9d1c9832aee4907ba8a051494357c12c" + integrity sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg== + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -63,7 +68,7 @@ ansi-escapes@^3.2.0: resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== -ansi-regex@^2.0.0: +ansi-regex@^2.0.0, ansi-regex@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= @@ -85,7 +90,7 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -any-promise@^1.0.0: +any-promise@^1.0.0, any-promise@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= @@ -171,6 +176,14 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== +babel-runtime@^6.23.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -194,6 +207,11 @@ binary-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== +bluebird@^3.5.0, bluebird@^3.5.3: + version "3.5.5" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" + integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== + body-parser@1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" @@ -277,6 +295,11 @@ camelcase@^4.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + capture-stack-trace@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d" @@ -340,6 +363,18 @@ cli-boxes@^1.0.0: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" integrity sha1-T6kXw+WclKAEzWH47lCdplFocUM= +cli-color@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-1.4.0.tgz#7d10738f48526824f8fe7da51857cb0f572fe01f" + integrity sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w== + dependencies: + ansi-regex "^2.1.1" + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + memoizee "^0.4.14" + timers-ext "^0.1.5" + cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" @@ -352,6 +387,23 @@ cli-width@^2.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +cls-bluebird@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cls-bluebird/-/cls-bluebird-2.1.0.tgz#37ef1e080a8ffb55c2f4164f536f1919e7968aee" + integrity sha1-N+8eCAqP+1XC9BZPU28ZGeeWiu4= + dependencies: + is-bluebird "^1.0.2" + shimmer "^1.1.0" + code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -392,6 +444,14 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= +config-chain@^1.1.12: + version "1.1.12" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" + integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" + configstore@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.2.tgz#c6f25defaeef26df12dd33414b001fe81a543f8f" @@ -446,6 +506,11 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= +core-js@^2.4.0: + version "2.6.9" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" + integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== + core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -483,6 +548,14 @@ crypto-random-string@^1.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= +d@1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -497,13 +570,18 @@ debug@^3.1.0, debug@^3.2.6: dependencies: ms "^2.1.1" -debug@^4.0.1: +debug@^4.0.1, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== dependencies: ms "^2.1.1" +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -590,11 +668,26 @@ dot-prop@^4.1.0: dependencies: is-obj "^1.0.0" +dottie@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/dottie/-/dottie-2.0.1.tgz#697ad9d72004db7574d21f892466a3c285893659" + integrity sha512-ch5OQgvGDK2u8pSZeSYAQaV/lczImd7pMJ7BcEPXmnFVjy4yJIzP6CsODJUTH8mg1tyH1Z2abOiuJO3DjZ/GBw== + duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= +editorconfig@^0.15.3: + version "0.15.3" + resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.3.tgz#bef84c4e75fb8dcb0ce5cee8efd51c15999befc5" + integrity sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g== + dependencies: + commander "^2.19.0" + lru-cache "^4.1.5" + semver "^5.6.0" + sigmund "^1.0.1" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -638,6 +731,42 @@ es-to-primitive@^1.2.0: is-date-object "^1.0.1" is-symbol "^1.0.2" +es5-ext@^0.10.35, es5-ext@^0.10.45, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: + version "0.10.50" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.50.tgz#6d0e23a0abdb27018e5ac4fd09b412bc5517a778" + integrity sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw== + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.1" + next-tick "^1.0.0" + +es6-iterator@^2.0.3, es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + integrity sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc= + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-weak-map@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" + integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== + dependencies: + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + es6-symbol "^3.1.1" + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -809,6 +938,14 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk= + dependencies: + d "1" + es5-ext "~0.10.14" + execa@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" @@ -973,6 +1110,13 @@ find-up@^2.0.0, find-up@^2.1.0: dependencies: locate-path "^2.0.0" +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + flat-cache@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" @@ -1009,6 +1153,15 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= +fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-minipass@^1.2.5: version "1.2.6" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.6.tgz#2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07" @@ -1053,6 +1206,11 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + get-stdin@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" @@ -1117,7 +1275,7 @@ got@^6.7.1: unzip-response "^2.0.1" url-parse-lax "^1.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.2: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.2.0" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg== @@ -1244,6 +1402,11 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= +inflection@1.12.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.12.0.tgz#a200935656d6f5f6bc4dc7502e1aecb703228416" + integrity sha1-ogCTVlbW9fa8TcdQLhrstwMihBY= + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -1317,6 +1480,11 @@ is-binary-path@^1.0.0: dependencies: binary-extensions "^1.0.0" +is-bluebird@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-bluebird/-/is-bluebird-1.0.2.tgz#096439060f4aa411abee19143a84d6a55346d6e2" + integrity sha1-CWQ5Bg9KpBGr7hkUOoTWpVNG1uI= + is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -1453,7 +1621,7 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-promise@^2.1.0: +is-promise@^2.1, is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= @@ -1514,6 +1682,17 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= +js-beautify@^1.8.8: + version "1.10.1" + resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.10.1.tgz#bdfe738ddbcaa12e4fced5af2d7cfad59f60ac0a" + integrity sha512-4y8SHOIRC+/YQ2gs3zJEKBUraQerq49FJYyXRpdzUGYQzCq8q9xtIh0YXial1S5KmonVui4aiUb6XaGyjE51XA== + dependencies: + config-chain "^1.1.12" + editorconfig "^0.15.3" + glob "^7.1.3" + mkdirp "~0.5.1" + nopt "~4.0.1" + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -1537,6 +1716,13 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -1599,7 +1785,15 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14: +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.5: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -1609,7 +1803,7 @@ lowercase-keys@^1.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== -lru-cache@^4.0.1: +lru-cache@^4.0.1, lru-cache@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== @@ -1617,6 +1811,13 @@ lru-cache@^4.0.1: pseudomap "^1.0.2" yallist "^2.1.2" +lru-queue@0.1: + version "0.1.0" + resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" + integrity sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM= + dependencies: + es5-ext "~0.10.2" + make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -1641,6 +1842,20 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= +memoizee@^0.4.14: + version "0.4.14" + resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.14.tgz#07a00f204699f9a95c2d9e77218271c7cd610d57" + integrity sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg== + dependencies: + d "1" + es5-ext "^0.10.45" + es6-weak-map "^2.0.2" + event-emitter "^0.3.5" + is-promise "^2.1" + lru-queue "0.1" + next-tick "1" + timers-ext "^0.1.5" + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" @@ -1732,13 +1947,25 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@^0.5.0, mkdirp@^0.5.1: +mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" +moment-timezone@^0.5.21: + version "0.5.26" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.26.tgz#c0267ca09ae84631aa3dc33f65bedbe6e8e0d772" + integrity sha512-sFP4cgEKTCymBBKgoxZjYzlSovC20Y6J7y3nanDc5RoBIXKlZhoYwBoZGe3flwU6A372AcRwScH8KiwV6zjy1g== + dependencies: + moment ">= 2.9.0" + +"moment@>= 2.9.0", moment@^2.24.0: + version "2.24.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" + integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -1809,6 +2036,11 @@ negotiator@0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== +next-tick@1, next-tick@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -1851,7 +2083,7 @@ nodemon@^1.19.1: undefsafe "^2.0.2" update-notifier "^2.5.0" -nopt@^4.0.1: +nopt@^4.0.1, nopt@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= @@ -2049,6 +2281,13 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" +p-limit@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2" + integrity sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ== + dependencies: + p-try "^2.0.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -2056,11 +2295,23 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + package-json@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" @@ -2198,6 +2449,11 @@ progress@^2.0.0: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== +proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= + proxy-addr@~2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34" @@ -2290,6 +2546,11 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" @@ -2333,6 +2594,16 @@ repeat-string@^1.6.1: resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -2363,6 +2634,13 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +retry-as-promised@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/retry-as-promised/-/retry-as-promised-3.2.0.tgz#769f63d536bec4783549db0777cb56dadd9d8543" + integrity sha512-CybGs60B7oYU/qSQ6kuaFmRd9sTZ6oXSc0toqePvV74Ac6/IFZSI1ReFQmtCN+uvW1Mtqdwpvt/LGOiCBAY2Mg== + dependencies: + any-promise "^1.3.0" + rimraf@2.6.3, rimraf@^2.6.1: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -2418,11 +2696,16 @@ semver-diff@^2.0.0: dependencies: semver "^5.0.3" -"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.5.0, semver@^5.5.1: +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: version "5.7.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== +semver@^6.1.1: + version "6.2.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" + integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -2442,6 +2725,46 @@ send@0.17.1: range-parser "~1.2.1" statuses "~1.5.0" +sequelize-cli@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/sequelize-cli/-/sequelize-cli-5.5.0.tgz#b0570352f70eaa489a25dccf55cf316675d6ff06" + integrity sha512-twVQ02alCpr2XvxNmpi32C48WZs6xHTH1OFTfTS5Meg3BVqOM8ghiZoml4FITFjlD8sAJSQjlAHTwqTbuolA6Q== + dependencies: + bluebird "^3.5.3" + cli-color "^1.4.0" + fs-extra "^7.0.1" + js-beautify "^1.8.8" + lodash "^4.17.5" + resolve "^1.5.0" + umzug "^2.1.0" + yargs "^13.1.0" + +sequelize-pool@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/sequelize-pool/-/sequelize-pool-2.3.0.tgz#64f1fe8744228172c474f530604b6133be64993d" + integrity sha512-Ibz08vnXvkZ8LJTiUOxRcj1Ckdn7qafNZ2t59jYHMX1VIebTAOYefWdRYFt6z6+hy52WGthAHAoLc9hvk3onqA== + +sequelize@^5.10.1: + version "5.10.1" + resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-5.10.1.tgz#ac12614fee2fd40417c4df585dcc28ba2ccf2c57" + integrity sha512-wE7jOUABVD9Kr8pAchRqk5quHoqE3tUHfKJ/WdLyZjHx4oMK5YWv1MEiny9DmiOlXOf1JNXwbPL9imSvzFq7aw== + dependencies: + bluebird "^3.5.0" + cls-bluebird "^2.1.0" + debug "^4.1.1" + dottie "^2.0.0" + inflection "1.12.0" + lodash "^4.17.11" + moment "^2.24.0" + moment-timezone "^0.5.21" + retry-as-promised "^3.1.0" + semver "^6.1.1" + sequelize-pool "^2.3.0" + toposort-class "^1.0.1" + uuid "^3.2.1" + validator "^10.11.0" + wkx "^0.4.6" + serve-static@1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" @@ -2452,7 +2775,7 @@ serve-static@1.14.1: parseurl "~1.3.3" send "0.17.1" -set-blocking@~2.0.0: +set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= @@ -2484,6 +2807,16 @@ shebang-regex@^1.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= +shimmer@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + +sigmund@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + integrity sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA= + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -2617,7 +2950,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string-width@^3.0.0: +string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== @@ -2647,7 +2980,7 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.1.0: +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== @@ -2745,6 +3078,14 @@ timed-out@^4.0.0: resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= +timers-ext@^0.1.5: + version "0.1.7" + resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6" + integrity sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ== + dependencies: + es5-ext "~0.10.46" + next-tick "1" + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -2782,6 +3123,11 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== +toposort-class@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toposort-class/-/toposort-class-1.0.1.tgz#7ffd1f78c8be28c3ba45cd4e1a3f5ee193bd9988" + integrity sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg= + touch@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" @@ -2809,6 +3155,19 @@ type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +type@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/type/-/type-1.0.1.tgz#084c9a17fcc9151a2cdb1459905c2e45e4bb7d61" + integrity sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw== + +umzug@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/umzug/-/umzug-2.2.0.tgz#6160bdc1817e4a63a625946775063c638623e62e" + integrity sha512-xZLW76ax70pND9bx3wqwb8zqkFGzZIK8dIHD9WdNy/CrNfjWcwQgQkGCuUqcuwEBvUm+g07z+qWvY+pxDmMEEw== + dependencies: + babel-runtime "^6.23.0" + bluebird "^3.5.3" + undefsafe@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.2.tgz#225f6b9e0337663e0d8e7cfd686fc2836ccace76" @@ -2833,6 +3192,11 @@ unique-string@^1.0.0: dependencies: crypto-random-string "^1.0.0" +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -2906,6 +3270,11 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= +uuid@^3.2.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -2914,11 +3283,21 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" +validator@^10.11.0: + version "10.11.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-10.11.0.tgz#003108ea6e9a9874d31ccc9e5006856ccd76b228" + integrity sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw== + vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -2940,11 +3319,27 @@ widest-line@^2.0.0: dependencies: string-width "^2.1.1" +wkx@^0.4.6: + version "0.4.7" + resolved "https://registry.yarnpkg.com/wkx/-/wkx-0.4.7.tgz#ba0e4f9e785e95c9975856c1834f19a95c65cfb5" + integrity sha512-pHf546L96TK8RradLt1cWaIffstgv/zXZ14CGz5KnBs1AxBX0wm+IDphjJw0qrEqRv8P9W9CdTt8Z1unMRZ19A== + dependencies: + "@types/node" "*" + wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -2971,6 +3366,11 @@ xdg-basedir@^3.0.0: resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ= +y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" @@ -2980,3 +3380,27 @@ yallist@^3.0.0, yallist@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== + +yargs-parser@^13.1.1: + version "13.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" + integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs@^13.1.0: + version "13.3.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" + integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.1"
UNIQUECHECKDefault - MSSQL onlyPrimary KeyForeign KeyConvert a user's username to upper caseA syntax for automatically committing or rolling back based on the promise chain resolution is also supportedTo enable CLS, add it do your project, create a namespace and set it on the sequelize constructor:Postgres also supports specific locks while eager loading by using OF:You can also skip locked rows: